Re: imlib configure.in, was Re: hrm ... what is fsuid.h



On Thu, Jan 14, 1999 at 02:01:40PM -0500, Mike Bond wrote:

  Thanks for the reply but unfortunately the patch doesn't apply. Appears
we're talking about two different configure.in's. Just to restate my
original problem I grabbed the latest tarballs (99.3/99.3.1) and imlib 1.9.0
and started a new installation from almost scratch. Everything compiled/
installed fine until I hit control-center where I got this:

gcc -O2 -Wall -Wno-unused -o .libs/screensaver-properties-capplet screensaver-pr
operties-capplet.o callbacks.o screensaver-dialog.o parser.o -Wl,-rpath -Wl,/usr
/local/lib ../../control-center/.libs/libcapplet.so -rdynamic -L/usr/local/lib -
L/usr/X11R6/lib -L/usr/local/lib -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lg
lib -lm -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmod
ule -lXext -lX11 -lgnome -lgnomesupport -lesd -lm -laudiofile -ldb -lglib -ldl -
lImlib -lgnorba
/usr/local/lib/libImlib.so: undefined reference to `png_set_sBIT'
/usr/local/lib/libImlib.so: undefined reference to `DGifGetExtensionNext'
/usr/local/lib/libImlib.so: undefined reference to `jpeg_read_scanlines'
/usr/local/lib/libImlib.so: undefined reference to `DGifGetRecordType'
/usr/local/lib/libImlib.so: undefined reference to `DGifGetImageDesc'
<snip>
/usr/local/lib/libImlib.so: undefined reference to `jpeg_write_scanlines'
/usr/local/lib/libImlib.so: undefined reference to `png_destroy_write_struct'
/usr/local/lib/libImlib.so: undefined reference to `png_libpng_ver'
/usr/local/lib/libImlib.so: undefined reference to `png_set_shift'
/usr/local/lib/libImlib.so: undefined reference to `TIFFGetField'
/usr/local/lib/libImlib.so: undefined reference to `png_init_io'
collect2: ld returned 1 exit status
make[3]: *** [screensaver-properties-capplet] Error 1
make[3]: Leaving directory `/usr/local/src/Work/GNOME/control-center-0.99/capple
ts/screensaver-properties'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/Work/GNOME/control-center-0.99/capple
ts'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/Work/GNOME/control-center-0.99'
make: *** [all-recursive-am] Error 2

  For what its worth here is the imlib configure.in that I have from the
1.9.0 tarball. As you can see the patch isn't applicable.
  Any other ideas, thoughts about what might be the problem in either the
sources or my setup (up until now I've had 0.99.0 and 0.99.2 going okay).  

# Process this file with autoconf to produce a configure script.
AC_INIT(gdk_imlib/gdk_imlib.h)

# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(imlib, 1.9.0)

AM_PROG_LIBTOOL

dnl Initialize maintainer mode
AM_MAINTAINER_MODE

dnl Give the user an option to compile without shared memory support,
dnl incase it is broken for example.
AC_ARG_ENABLE(shm, [  --enable-shm            support shared memory if available [default=yes]], echo $enable_shm, enable_shm="yes")

AC_PROG_CC

AM_PATH_GTK(1.1.9,[
  GDK_IMLIB="gdk_imlib utils"],[
  GDK_IMLIB="" 
  AC_MSG_WARN([*** gdk_imlib will not be built ***])])

dynworks=false
if test "x$GDK_IMLIB" != x; then
  AC_MSG_CHECKING(If dynamic linking works on this system)
  oLIBS="$LIBS"
  oCFLAGS="$CFLAGS"
  LIBS="$LIBS `glib-config --libs gmodule`"
  CFLAGS="$CFLAGS `glib-config --cflags gmodule`"
  AC_TRY_RUN([
#include <glib.h>
#include <gmodule.h>
main ()
{
    if (g_module_supported ())
        exit (0);
    else
        exit (1);
}
], dynworks=true)
  LIBS="$oLIBS"
  CFLAGS="$oCFLAGS"
fi
if $dynworks; then
   AC_DEFINE(USE_GMODULE)
   GMODULE_LIBS="`glib-config --libs gmodule`"
   GMODULE_FLAGS="`glib-config --cflags gmodule`"
   AC_SUBST(GMODULE_LIBS)
   AC_SUBST(GMODULE_FLAGS)
   AC_MSG_RESULT(yes)
else
   AC_MSG_RESULT(no)
fi

AC_SUBST(TIFFLIBS)
AC_SUBST(GIFLIBS)
AC_SUBST(JPEGLIBS)
AC_SUBST(PNGLIBS)
	

AC_SUBST(GDK_IMLIB)
AM_CONDITIONAL(DYNAMIC_MODULES_WORK, $dynworks)
AC_PATH_PROG(DJPEG_PROG, djpeg)
AC_PATH_PROG(CJPEG_PROG, cjpeg)

AC_PATH_PROG(CONVERT_PROG, convert)
echo "CONVERT_PROG is $CONVERT_PROG"
CONVERT_PATH=`echo $CONVERT_PROG | sed 's/\/convert//'`
echo "CONVERT_PATH is $CONVERT_PATH"
AC_SUBST(CONVERT_PATH)

AC_PATH_PROG(GIFTOPNM_PROG, giftopnm)
echo "GIFTOPNM_PROG is $GIFTOPNM_PROG"
NETPBM_PATH=`echo $GIFTOPNM_PROG | sed 's/\/giftopnm//'`
echo "NETPBM_PATH is $NETPBM_PATH"
AC_SUBST(NETPBM_PATH)

AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT

AC_TYPE_SIGNAL

AC_CHECK_FUNCS(vsnprintf)
AC_CHECK_FUNCS(snprintf)

AC_CHECK_FUNCS(blumfrub)
AC_CHECK_FUNCS(buckets_of_erogenous_nym)
AC_CHECK_FUNCS(buttox)

AC_CHECK_HEADER(stdarg.h, AC_DEFINE(HAVE_STDARGS))

AC_CHECK_HEADER(string.h)
AC_CHECK_HEADER(strings.h)

AC_PATH_X
AC_PATH_XTRA

if test "x$x_includes" = "x"; then
  x_includes="/usr/include"
fi

dnl If we are compiling without shared memory support, then don\'t do
dnl the checks for XShm
if test "x$enable_shm" = "xyes"; then
  # Check for the Xext library (needed for XShm extension)
  AC_CHECK_LIB(Xext, XShmAttach, 
      X_LIBS="-lXext $X_LIBS", 
      # On AIX, it is in XextSam instead, but we still need -lXext
      AC_CHECK_LIB(XextSam, XShmAttach, 
          X_LIBS="-lXextSam -lXext $X_LIBS", 
          no_xshm_ext=yes, $X_LIBS),
      $X_LIBS)
fi

if test -z "$GDK_IMLIB"; then
  # see macros/gnome-x-checks.m4, and gtk.m4
  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  GX_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lm"
else
  CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
  GX_LIBS="$GTK_LIBS"
fi

CPPFLAGS="$CPPFLAGS -I$includedir -I$prefix/include"

SUPPORT_LIBS=""

dnl Test for shared memory headers and semantics, unless we are
dnl configured to build without shared memory extensions.
if test "x$enable_shm" = "xyes"; then
  # Check for shared memory
  AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
  AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)

  if test "x$no_sys_ipc" != "xyes" \
     && test "x$no_sys_shm" != "xyes" \
     && test "x$no_xshm_ext" != "xyes" ; then
    AC_DEFINE(HAVE_SHM)
  fi

  # Check whether shmctl IPC_RMID allowes subsequent attaches
  if test "$ac_cv_header_sys_shm_h" = "yes"; then
    AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
    AC_TRY_RUN([
          #include <sys/types.h>
          #include <sys/ipc.h>
          #include <sys/shm.h>
          int main()
          {
            int id;
            char *shmaddr;
          id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0777);
          if (id == -1)
            exit (2);
            shmaddr = shmat (id, 0, 0);
            shmctl (id, IPC_RMID, 0);
            if ((char*) shmat (id, 0, 0) == (char*) -1)
            {
              shmdt (shmaddr);
              exit (1);
            }
            shmdt (shmaddr);
            shmdt (shmaddr);
            exit (0);
          }
      ],
      AC_DEFINE(IPC_RMID_DEFERRED_RELEASE)
        AC_MSG_RESULT(yes),
      AC_MSG_RESULT(no),
      AC_MSG_RESULT(assuming no))
  fi

  # Check for the X shared memory extension header file
  AC_MSG_CHECKING(X11/extensions/XShm.h)
  if test "x$no_xext_lib" = "xyes"; then
    # If we couldn't find XShmAttach earlier, don't use the header
    AC_MSG_RESULT(no)
    no_xshm=yes
  else
    if test -f "$x_includes/X11/extensions/XShm.h"; then
      AC_MSG_RESULT(yes)
      AC_DEFINE(HAVE_XSHM_H)
    else
      AC_MSG_RESULT(no)
      no_xshm=yes
    fi
  fi
fi

dnl Test for libjpeg
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
  jpeg_ok=yes,
  jpeg_ok=no
  AC_MSG_WARN(*** Native JPEG support will not be built (JPEG library not found) ***), $GX_LIBS)
if test "$jpeg_ok" = yes; then
  AC_MSG_CHECKING([for jpeglib.h])
  AC_TRY_CPP(
[#include <stdio.h>
#undef PACKAGE
#undef VERSION
#include <jpeglib.h>],
    jpeg_ok=yes,
    jpeg_ok=no)
  AC_MSG_RESULT($jpeg_ok)
  if test "$jpeg_ok" = yes; then 
    JPEGLIBS="-ljpeg"
    SUPPORT_LIBS="$SUPPORT_LIBS -ljpeg"; AC_DEFINE(HAVE_LIBJPEG)
  else
    AC_MSG_WARN(*** Native JPEG support will not be built (JPEG header file not found) ***)
  fi
fi

dnl Test for libtiff
AC_CHECK_LIB(tiff, TIFFReadScanline,
  AC_CHECK_HEADER(tiffio.h,
    TIFFLIBS="-ltiff"
    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF),
    AC_MSG_WARN(*** Native TIFF support will not be built (TIFF header files not found) ***)),
  AC_CHECK_LIB(tiff, TIFFWriteScanline,
    AC_CHECK_HEADER(tiffio.h,
      TIFFLIBS="-ltiff -ljpeg -lz"
      SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
      AC_MSG_WARN(*** Native TIFF support will not be built (TIFF header files not found) ***)),
    AC_CHECK_LIB(tiff34, TIFFFlushData,
      AC_CHECK_HEADER(tiffio.h,
        TIFFLIBS="-ltiff34 -ljpeg -lz"
        SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
        AC_MSG_WARN(*** Native TIFF support will not be built (TIFF header files not found) ***)),
    AC_MSG_WARN(*** Native TIFF support will not be built (TIFF library not found) ***), -ljpeg -lz $GX_LIBS), -ljpeg -lz $GX_LIBS), $GX_LIBS)


AC_CHECK_HEADER(gif_lib.h,
  AC_CHECK_LIB(ungif, DGifOpenFileName,
    GIFLIBS="-lungif"
    SUPPORT_LIBS="$SUPPORT_LIBS -lungif"; AC_DEFINE(HAVE_LIBGIF),
    AC_CHECK_LIB(gif, DGifOpenFileName,
      GIFLIBS="-lgif"
      SUPPORT_LIBS="$SUPPORT_LIBS -lgif"
      AC_DEFINE(HAVE_LIBGIF),
      AC_SUBST(GIFLIBS)
      AC_MSG_WARN(*** Native GIF support will not be built (GIF library file not found) ***), 
      $GX_LIBS),
    $GX_LIBS),
  AC_MSG_WARN(*** Native GIF support will not be built (GIF header not found) ***))

AC_CHECK_LIB(png, png_read_info,
  AC_CHECK_HEADER(png.h,
    png_ok=yes,
    png_ok=no),
  AC_MSG_WARN(*** Native PNG support will not be built (PNG library not found) ***), -lz -lm $GX_LIBS)
if test "$png_ok" = yes; then
  AC_MSG_CHECKING([for png_structp in png.h])
  AC_TRY_COMPILE([#include <png.h>],
    [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct
; png_set_IHDR;],
    png_ok=yes,
    png_ok=no)
  AC_MSG_RESULT($png_ok)
  if test "$png_ok" = no; then
    AC_MSG_WARN(*** Native PNG support will not be built (PNG library is too old) ***)
  fi
else
  AC_MSG_WARN(*** Native PNG support will not be built (PNG header file not found) ***)
fi

dnl Now we check for libpng 1.0.2.  Not the most elegant way, but hey...this is RasterCode!
AC_MSG_CHECKING([for libpng version other than 1.0.2])
AC_EGREP_CPP("1.0.2",[#include <png.h>
PNG_LIBPNG_VER_STRING],echo "********* WARNING *********** Your libpng version is 1.0.2. Build will not continue until you revert to 1.0.1 or a newer version.";exit,png_ok=yes)
AC_MSG_RESULT($png_ok)

if test "$png_ok" = yes; then
	PNGLIBS="-lpng -lz"
	AC_SUBST(HAVE_LIBPNG)
	SUPPORT_LIBS="$SUPPORT_LIBS -lpng -lz"; AC_DEFINE(HAVE_LIBPNG)
else
	AC_MSG_WARN(*** Native PNG support will NOT be built (PNG version us 1.0.2, get 1.0.1) ***)
fi

if test ! $dynworks; then
   GIFLIBS=""
   TIFFLIBS=""
   PNGLIBS=""
   JPEGLIBS=""
fi

AM_CONDITIONAL(HAVE_GIF, test "x$GIFLIBS" != x)
AM_CONDITIONAL(HAVE_TIFF, test "x$TIFFLIBS" != x)
AM_CONDITIONAL(HAVE_PNG, test "x$PNGLIBS" != x)
AM_CONDITIONAL(HAVE_JPEG, test "x$JPEGLIBS" != x)

SUPPORT_LIBS="$SUPPORT_LIBS -lm"

AC_SUBST(SUPPORT_LIBS)
AC_SUBST(CPPFLAGS)
AC_SUBST(X_CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(X_PRE_LIBS)
AC_SUBST(X_LIBS)
AC_SUBST(X_EXTRA_LIBS)

AC_OUTPUT([
gdk_imlib/Makefile 
Imlib/Makefile 
utils/Makefile 
config/Makefile 
doc/Makefile 
Makefile 
imlib-config 
], [
case "$CONFIG_FILES" in
 *imlib-config*)
    chmod +x imlib-config
    ;;
esac])

> It has already been put into CVS, but here it is:
> 
> --- configure.in.old    Thu Jan 14 13:59:57 1999
> +++ configure.in        Thu Jan 14 13:59:12 1999
> @@ -48,16 +48,16 @@
> 
>  dnl Now we check to see if our libtool supports shared lib deps
>  dnl (in a rather ugly way even)
> -if $dynworks; then
> -   imlib_libtool_config="${CONFIG_SHELL-/bin/sh} libtool --config"
> -   imlib_deplibs_check=`$imlib_libtool_config | \
> -      grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
> -      sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
> -   if test "x$imlib_deplibs_check" = "xnone" || \
> -      test "x$imlib_deplibs_check" = "x"; then
> -      dynworks=false
> -   fi
> -fi
> +dnl if $dynworks; then
> +dnl    imlib_libtool_config="${CONFIG_SHELL-/bin/sh} libtool --config"
> +dnl    imlib_deplibs_check=`$imlib_libtool_config | \
> +dnl       grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
> +dnl       sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
> +dnl    if test "x$imlib_deplibs_check" = "xnone" || \
> +dnl       test "x$imlib_deplibs_check" = "x"; then
> +dnl       dynworks=false
> +dnl    fi
> +dnl fi
> 
>  if $dynworks; then
>     AC_DEFINE(USE_GMODULE)

--
It ain't no use to sit and wonder why, babe...

Mike Hall <mhall@riverside.org>, (MH993)   -    http://www.riverside.org
System Administrator (*nix, Perl, CGI hacker, certified OS/2 Specialist)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]