From c67fad05a60b7ccc7b67e5f21aee501bb01f1424 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Sun, 9 Sep 2001 20:40:43 +0000 Subject: [PATCH] I haven't followed the recent imlib2_loaders changes closely, but it seems someone forgot to update configure.ac? SVN revision: 5344 --- configure.ac | 146 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 123 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index ad23843..b5df6c3 100644 --- a/configure.ac +++ b/configure.ac @@ -18,34 +18,116 @@ AM_PROG_LIBTOOL AC_PATH_X AC_PATH_XTRA -dnl Check for Imlib2.h -AC_CHECK_HEADER(Imlib2.h, , AC_MSG_ERROR([Imlib2.h not found.])) +AC_ARG_ENABLE(edb, +[ --disable-edb disable building the edb loader], +[ + if test x$enableval = xno; then + edb=no; + EDB_CONFIG_IN_PATH=disabled; + fi +]) -# Test for libedb -AC_CHECK_LIB(edb, e_db_open, - edb_ok=yes, - edb_ok=no - AC_MSG_WARN(*** Native EDB support will not be built (EDB library not found) ***), $EXTRA_LIBS -lz) -if test "$edb_ok" = yes; then - AC_MSG_CHECKING([for Edb.h]) - AC_TRY_CPP( - [#include - #undef PACKAGE - #undef VERSION - #include ], - edb_ok=yes, - edb_ok=no) - AC_MSG_RESULT($edb_ok) - if test "$edb_ok" = yes; then - EDBLIBS="-ledb" - else - AC_MSG_WARN(*** Native EDB support will not be built (EDB header file not found) ***) +AC_ARG_ENABLE(xcf, +[ --disable-xcf disable building the xcf loader], +[ + if test x$enableval = xno; then + xcf=no; + fi +]) + +#Set the default +IMLIB2_CONFIG="imlib2-config" +AC_ARG_WITH(imlib2, +[ --with-imlib2-config=FILE imlib2-config script to use (eg /usr/bin/imlib2-config)], +[ + IMLIB2_CONFIG=$withval + AC_CHECK_PROG(IMLIB2_CONFIG_IN_PATH, $IMLIB2_CONFIG, yes, no) + if test $IMLIB2_CONFIG_IN_PATH = no; then + echo "ERROR:" + echo "The imlib2-config development script you specified " + echo "($IMLIB2_CONFIG) was not found. Please check the path " + echo "and make sure the script exists and is executable." + AC_MSG_ERROR([Fatal Error: no imlib2-config detected.]) + exit; fi +], +[ + AC_CHECK_PROG(IMLIB2_CONFIG_IN_PATH, $IMLIB2_CONFIG, yes, no) + if test $IMLIB2_CONFIG_IN_PATH = no; then + echo "ERROR:" + echo "The imlib2-config development script was not found in your execute" + echo "path. This may mean one of several things" + echo "1. You may not have installed the Imlib2-devel (or Imlib2-dev)" + echo " packages." + echo "2. You may have Imlib2 installed somewhere not covered by your path." + echo "" + echo "If this is the case make sure you have the packages installed, AND" + echo "that the imlib2-config script is in your execute path (see your" + echo "shell's manual page on setting the \$PATH environment variable), OR" + echo "alternatively, specify the script to use with --with-imlib2-config." + AC_MSG_ERROR([Fatal Error: no imlib2-config detected.]) + exit; + fi +]) + +EDB_CONFIG="edb-config" +if test x$edb != xno; then + AC_ARG_WITH(edb, + [ --with-edb-config=PATH edb-config script to use (eg /usr/bin/edb-config)], + [ + EDB_CONFIG=$withval + AC_CHECK_PROG(EDB_CONFIG_IN_PATH, $EDB_CONFIG, yes, no) + if test $EDB_CONFIG_IN_PATH = no; then + echo "ERROR:" + echo "The edb-config development script you specified " + echo "($EDB_CONFIG) was not found. Please check the path " + echo "and make sure the script exists and is executable." + AC_MSG_ERROR([Fatal Error: no edb-config detected.]) + exit; + fi + ], + [ + AC_CHECK_PROG(EDB_CONFIG_IN_PATH, $EDB_CONFIG, yes, no) + if test $EDB_CONFIG_IN_PATH = no; then + echo "WARNING:" + echo "------------------------------------------------------------------" + echo "The edb-config development script was not found in your execute" + echo "path. This may mean one of several things" + echo "1. You may not have installed the edb-devel (or edb-dev)" + echo " packages." + echo "2. You may have edb installed somewhere not covered by your path." + echo "" + echo "If this is the case make sure you have the packages installed, AND" + echo "that the edb-config script is in your execute path (see your" + echo "shell's manual page on setting the \$PATH environment variable), OR" + echo "alternatively, specify the script to use with --with-edb-config." + echo "------------------------------------------------------------------" + AC_MSG_WARN([no edb-config detected.]) + fi + ]) +else + AC_MSG_CHECKING([for edb-config]) + AC_MSG_RESULT(disabled) fi -AM_CONDITIONAL(EDB_LOADER, test "$edb_ok" = yes) +AM_CONDITIONAL(EDB_LOADER, + test \( $EDB_CONFIG_IN_PATH = yes -o \ + $EDB_CONFIG_IN_PATH = ignored \) -a x$edb != xno ) -AC_SUBST(EDBLIBS) +AM_CONDITIONAL(XCF_LOADER, test x$xcf != xno ) + +imlib2_includes=`$IMLIB2_CONFIG --cflags` +imlib2_libs=`$IMLIB2_CONFIG --libs` + +if test x$edb != xno; then + edb_includes=`$EDB_CONFIG --cflags` + edb_libs=`$EDB_CONFIG --libs` +fi + +AC_SUBST(imlib2_includes) +AC_SUBST(imlib2_libs) +AC_SUBST(edb_includes) +AC_SUBST(edb_libs) AC_CONFIG_FILES([ Makefile @@ -54,3 +136,21 @@ debian/Makefile imlib2_loaders.spec ]) AC_OUTPUT + +echo -e "\nBuild summary:" +echo "------------------------" +echo -n " XCF: " +if test x$XCF_LOADER_TRUE = "x#"; then + echo "Disabled " +else + echo "Enabled " +fi + +echo -n " Edb: " +if test x$EDB_LOADER_TRUE = "x#"; then + echo "Disabled " +else + echo "Enabled " +fi + +echo -e "------------------------\n"