I'm just using autoconf, with an aclocal.m4 file with my own macros. autoconf works perfectly, but not autoreconf: rousse@yquem:~/test/yquem/camlimages$ autoreconf autoheader: warning: missing template: GIFLIB_BUG_FIXED autoheader: Use AC_DEFINE([GIFLIB_BUG_FIXED], [], [Description]) autoheader: warning: missing template: HAVE_FREETYPE autoheader: warning: missing template: HAVE_GIF autoheader: warning: missing template: HAVE_JPEG autoheader: warning: missing template: HAVE_PNG autoheader: warning: missing template: HAVE_TIFF autoheader: warning: missing template: HAVE_XPM autoreconf: /usr/bin/autoheader failed with exit status: 1 configure.ac attached. Am I missing something here ?
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(camlimages, 3.0.0, Pierre.Weis@xxxxxxxx) AC_CONFIG_HEADER(config.h) # caml compiler ------------------------------------------------------------ AC_PROG_OCAML([3.08]) COMPFLAGS="-warn-error A" # Checks for programs ------------------------------------------------------- AC_PROG_CC AC_PROG_RANLIB AC_PROG_MAKE_SET AC_PROG_INSTALL # Checks for header files. -------------------------------------------------- AC_CHECK_HEADERS(fcntl.h sys/time.h) # Checks for typedefs, structures, and compiler characteristics ------------- AC_TYPE_SIZE_T # Checks for library functions ---------------------------------------------- AC_HEADER_STDC AC_TYPE_SIGNAL # Checks word size ---------------------------------------------------------- AC_CHECK_SIZEOF(long) WORD_SIZE=$ac_cv_sizeof_long # X libraries --------------------------------------------------------------- AC_PATH_XTRA # Checking -lm -------------------------------------------------------------- AC_CHECK_LIB(m, floor) # pure version (= no external libraries) ------------------------------------ AC_MSG_CHECKING(external libraries) NOEXTERNAL="false" AC_ARG_WITH( external-libraries, AC_HELP_STRING( [--without-external-libraries], [compile without any external libraries] ), if test "$withval" = "no" ; then NOEXTERNAL="true" fi ) if test "$NOEXTERNAL" = "false" ; then AC_MSG_RESULT(enabled) else AC_MSG_RESULT(disabled (are you sure?)) fi # lablgtk library ----------------------------------------------------------- SUPPORT_LABLGTK="false" lablgtkdir= LABLGTKIMGDIR= AC_MSG_CHECKING(checking lablgtk) if test "$NOEXTERNAL" = "true"; then AC_MSG_RESULT(disabled) else if test -d "$OCAMLLIB/lablgtk"; then lablgtkdir="$OCAMLLIB/lablgtk" fi AC_ARG_WITH( lablgtkdir, AC_HELP_STRING( [--with-lablgtkdir=dir], [specify lablgtk library directory] ), if test "$withval" != "no" ; then if test -f "$withval/gtk.ml"; then lablgtkdir="$withval" else lablgtkdir= echo "**************** ERROR ******************" echo "gtk.ml is not found in the directory \"$withval\", which you specified with --with-lablgtk option." echo "*****************************************" fi fi ) if test -z "$lablgtkdir"; then AC_MSG_RESULT(Not found) else AC_MSG_RESULT(found at $lablgtkdir) AC_MSG_CHECKING(the version of lablgtk) grep image: $lablgtkdir/gdk.mli > /dev/null GDK_MLI_NEW=$? if test -f "$lablgtkdir/gBin.mli" -a "$GDK_MLI_NEW" = "1"; then AC_MSG_RESULT(ok) SUPPORT_LABLGTK="true" SUPPORTED="$SUPPORTED lablgtk" LABLGTKIMGDIR="lablgtk" else AC_MSG_RESULT(found, but too old) lablgtkdir= fi fi fi # lablgtk2 ----------------------------------------------------------------- SUPPORT_LABLGTK2="false" lablgtk2dir= LABLGTK2IMGDIR= AC_MSG_CHECKING(checking lablgtk2) if test "$NOEXTERNAL" = "true"; then AC_MSG_RESULT(disabled) else if test -d "$OCAMLLIB/lablgtk2"; then lablgtk2dir="$OCAMLLIB/lablgtk2" fi AC_ARG_WITH( lablgtk2dir, AC_HELP_STRING( [--with-lablgtk2dir=dir], [specify lablgtk2 library directory] ), if test "$withval" != "no" ; then if test -f "$withval/gtk.ml"; then lablgtk2dir="$withval" else lablgtk2dir= echo "**************** ERROR ******************" echo "gtk.ml is not found in the directory \"$withval\", which you specified with --with-lablgtk2 option." echo "*****************************************" fi fi ) if test -z "$lablgtk2dir"; then AC_MSG_RESULT(Not found) else AC_MSG_RESULT(found at $lablgtk2dir) SUPPORT_LABLGTK2="true" SUPPORTED="$SUPPORTED lablgtk2" LABLGTK2IMGDIR="lablgtk2" fi fi # Checks for libraries ------------------------------------------------------ SUPPORTED="$SUPPORTED bmp ppm xvthumb" # Checking -lungif or -lgif ------------------------------------------------- SUPPORT_GIF="false" if test "$NOEXTERNAL" = "false" ; then AC_CHECK_LIB( gif, DGifOpenFileName, LIBGIF="-lgif" SUPPORT_GIF="true", AC_CHECK_LIB( ungif, DGifOpenFileName, LIBGIF="-lungif" SUPPORT_GIF="true", ), ) if test $SUPPORT_GIF = "true" ; then AC_DEFINE(HAVE_GIF) SUPPORTED="$SUPPORTED gif" fi fi # Checking -lungif/-lgif bug is fixed --------------------------------------- if test $SUPPORT_GIF = "true" ; then AC_MSG_CHECKING(-lungif/-lgif bug is fixed) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $LIBGIF" AC_TRY_RUN( #include <stdio.h> #include <gif_lib.h> main() { EGifSetGifVersion("89a"); return 0; } , AC_DEFINE(GIFLIB_BUG_FIXED) AC_MSG_RESULT(ok), echo "*************************** WARNING *********************************" echo "Gif file format is supported in Camlimages but your libungif/libgif is buggy. If you have time try to compile it with a gcc option -fwritable-strings." echo "*********************************************************************"; AC_MSG_RESULT(with bug) ) LDFLAGS=$save_LDFLAGS fi # Checking -lpng ------------------------------------------------------------ SUPPORT_PNG="false" if test "$NOEXTERNAL" = "false" ; then AC_CHECK_LIB( png, png_create_read_struct, AC_DEFINE(HAVE_PNG) LIBPNG="-lpng -lz" SUPPORTED="$SUPPORTED png" SUPPORT_PNG="true", , -lz ) fi # Checking -ljpeg ----------------------------------------------------------- SUPPORT_JPEG="false" if test "$NOEXTERNAL" = "false" ; then AC_CHECK_LIB( jpeg, jpeg_read_header, AC_DEFINE(HAVE_JPEG) LIBJPEG="-ljpeg" SUPPORTED="$SUPPORTED jpeg" SUPPORT_JPEG="true", ) fi # Checking -ltiff ----------------------------------------------------------- SUPPORT_TIFF="false" if test "$NOEXTERNAL" = "false" ; then AC_CHECK_LIB( tiff, TIFFOpen, AC_DEFINE(HAVE_TIFF) LIBTIFF="-ltiff -lz -ljpeg" SUPPORTED="$SUPPORTED tiff" SUPPORT_TIFF="true", , -lz -ljpeg ) fi # Checking xpm.h -lxpm ------------------------------------------------------ SUPPORT_XPM="false" if test "$NOEXTERNAL" = "false" ; then save_CFLAGS="$CFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS" AC_CHECK_HEADER( X11/xpm.h, AC_CHECK_LIB( Xpm, XpmReadFileToXpmImage, AC_DEFINE(HAVE_XPM) INCXPM="$X_CFLAGS" LIBXPM="$X_LIBS -lXpm $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" SUPPORTED="$SUPPORTED xpm" SUPPORT_XPM="true", , $X_PRE_LIBS -lX11 $X_EXTRA_LIBS ), ) CFLAGS="$save_CFLAGS" LDFLAGS="$save_LDFLAGS" fi # Checking freetype ------------------------------------------------------------------ SUPPORT_FREETYPE="false" if test "$NOEXTERNAL" = "false" ; then AC_PATH_PROG(FREETYPE_CONFIG, freetype-config) if test -n "$FREETYPE_CONFIG"; then AC_DEFINE(HAVE_FREETYPE) LIBFREETYPE=`freetype-config --libs` INCFREETYPE=`freetype-config --cflags` SUPPORTED="$SUPPORTED freetype" SUPPORT_FREETYPE="true" fi fi # Checking gs --------------------------------------------------------------- SUPPORT_PS="false" if test "$NOEXTERNAL" = "false" ; then AC_PATH_PROG(PATH_GS, gs, "nope") SUPPORT_PS="false" if test "X$PATH_GS" != "Xnope" ; then SUPPORTED="$SUPPORTED ps" SUPPORT_PS="true" fi fi # Checking rgb.txt --------------------------------------------------------- PATH_RGB_TXT="none" if test -f "$x_libraries/X11/rgb.txt" ; then PATH_RGB_TXT="$x_libraries/X11/rgb.txt" fi # Compute variables -------------------------------------------------------- LIBPREFIX="ci_" camlimagesdir="$OCAMLLIB/site-lib/camlimages" COREDIR="corelib" LIBRARYDIRS="ppm bmp xvthumb jpeg tiff gif png xpm ps graphics freetype" CAMLIMAGES_BASEDIRS="$COREDIR $LIBRARYDIRS" if test "$SUPPORT_GTK" = "true"; then CAMLIMAGES_GTKDIR="lablgtk" else CAMLIMAGES_GTKDIR= fi if test "$SUPPORT_GTK2" = "true"; then CAMLIMAGES_GTK2DIR="lablgtk2" else CAMLIMAGES_GTK2DIR= fi WITH_UNIX="unix.cma" WITH_CORELIB="${LIBPREFIX}core.cma" WITH_GRAPHICS="graphics.cma ${LIBPREFIX}graphics.cma" WITH_GIF="${LIBPREFIX}gif.cma" WITH_JPEG="${LIBPREFIX}jpeg.cma" WITH_TIFF="${LIBPREFIX}tiff.cma" WITH_XPM="${LIBPREFIX}xpm.cma" WITH_BMP="${LIBPREFIX}bmp.cma" WITH_PPM="${LIBPREFIX}ppm.cma" WITH_XVTHUMB="${LIBPREFIX}xvthumb.cma" WITH_PNG="${LIBPREFIX}png.cma" WITH_PS="${LIBPREFIX}ps.cma" WITH_FREETYPE="${LIBPREFIX}freetype.cma" WITH_CAMLIMAGES_BASE="$WITH_CORELIB $WITH_GRAPHICS $WITH_FREETYPE $WITH_GIF $WITH_JPEG $WITH_TIFF $WITH_BMP $WITH_PPM $WITH_PNG $WITH_XVTHUMB $WITH_XPM $WITH_PS" WITH_CAMLIMAGES_GTK="lablgtk.cma ${LIBPREFIX}lablgtk.cma" WITH_CAMLIMAGES_GTK2="lablgtk.cma ${LIBPREFIX}lablgtk2.cma" # Substitute variables ------------------------------------------------------ AC_SUBST(PACKAGE_NAME) AC_SUBST(PACKAGE_VERSION) AC_SUBST(bindir) AC_SUBST(libdir) AC_SUBST(OCAMLLIB) AC_SUBST(camlimagesdir) AC_SUBST(lablgtkdir) AC_SUBST(lablgtk2dir) AC_SUBST(LIBPREFIX) AC_SUBST(COMPFLAGS) AC_SUBST(CAMLIMAGES_BASEDIRS) AC_SUBST(CAMLIMAGES_GTKDIR) AC_SUBST(CAMLIMAGES_GTK2DIR) AC_SUBST(WITH_UNIX) AC_SUBST(WITH_CAMLIMAGES_BASE) AC_SUBST(WITH_CAMLIMAGES_GTK) AC_SUBST(WITH_CAMLIMAGES_GTK2) AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LIBGIF) AC_SUBST(LIBBMP) AC_SUBST(LIBJPEG) AC_SUBST(LIBTIFF) AC_SUBST(LIBFREETYPE) AC_SUBST(LIBPNG) AC_SUBST(LIBXPM) AC_SUBST(LIBXVTHUMB) AC_SUBST(LIBPPM) AC_SUBST(LIBPS) AC_SUBST(INCFREETYPE) AC_SUBST(INCXPM) AC_SUBST(SUPPORT_GIF) AC_SUBST(SUPPORT_PNG) AC_SUBST(SUPPORT_JPEG) AC_SUBST(SUPPORT_TIFF) AC_SUBST(SUPPORT_FREETYPE) AC_SUBST(SUPPORT_PS) AC_SUBST(SUPPORT_XPM) AC_SUBST(PATH_RGB_TXT) AC_SUBST(PATH_GS) AC_SUBST(WORD_SIZE) AC_OUTPUT( Makefile Makefile.distrib bmp/Makefile corelib/Makefile doc/Makefile freetype/Makefile gif/Makefile graphics/Makefile jpeg/Makefile lablgtk/Makefile lablgtk2/Makefile png/Makefile ppm/Makefile ps/Makefile tiff/Makefile xpm/Makefile xvthumb/Makefile examples/Makefile examples/crop/Makefile examples/normalize/Makefile examples/tiffps/Makefile examples/converter/Makefile examples/edgedetect/Makefile examples/imgstat/Makefile examples/monochrome/Makefile examples/resize/Makefile examples/ttfimg/Makefile examples/gifanim/Makefile examples/liv/Makefile test/Makefile ) echo -------------------------------------------------- Configuration finished echo Language: $CAMLVERSION echo Compilers: $CAMLC and $CAMLOPT echo Installed in: $camlimagesdir echo External libraries: $SUPPORTED echo -------------------------------------------------------------------------
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf