dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(evfs, 0.0.1) AM_CONFIG_HEADER(config.h) if test "$prefix" = "NONE"; then prefix=$ac_default_prefix fi AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AM_PROG_LIBTOOL AC_C_BIGENDIAN AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_BLOCKS CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64" dnl Check for statfs call or other alternatives. AC_CHECK_FUNC(statfs, , have_statfs="no") if test "$have_statfs" = "no"; then AC_CHECK_FUNC(statvfs, have_statvfs="yes") if test "$have_stavtfs" = "yes"; then AC_DEFINE(HAVE_STATVFS, 1, [Build support for statfs]) fi else AC_DEFINE(HAVE_STATFS, 1, [Build support for statfs]) fi #Thanks to gnome for the samba checking code dnl ****************************** dnl Samba 3.0 dnl ****************************** AC_ARG_ENABLE(samba, [ --disable-samba build without samba support]) msg_samba="no" if test "x$enable_samba" != "xno"; then AC_ARG_WITH(samba-includes, [ --with-samba-includes=PREFIX Location of samba includes.], with_samba_includes="$withval", with_samba_includes="/usr/include") have_samba_includes="no" if test "x${with_samba_includes}" != "xno"; then CPPFLAGS_save="$CPPFLAGS" echo "before test, samba_includes: ${samba_includes}" CPPFLAGS="$CPPFLAGS -I$with_samba_includes" AC_CHECK_HEADER(libsmbclient.h, [ samba_includes="yes" ]) CPPFLAGS="$CPPFLAGS_save" if test "x{samba_includes}" != "xno" -a "x${samba_includes}" != "x"; then have_samba_includes="yes" if test "${with_samba_includes}" != "/usr/include" ; then SAMBA_CFLAGS="-I$with_samba_includes" else SAMBA_CFLAGS="" fi CPPFLAGS="$CPPFLAGS -I$with_samba_includes" AC_CHECK_MEMBER(SMBCCTX.flags, [AC_DEFINE(HAVE_SAMBA_FLAGS,, [Defined if flags availible in SMBCCTXT])],, [#include ]) AC_CHECK_MEMBER(SMBCCTX.close, [AC_DEFINE(HAVE_SAMBA_OLD_CLOSE, , [Defined if old close is available in SMBCCTXT])],, [#include ]) CPPFLAGS="$CPPFLAGS_save" else SAMBA_CFLAGS="" fi fi echo "have_samba_includes: ${have_samba_includes}" AC_ARG_WITH(samba-libs, [ --with-samba-libs=PREFIX Location of Samba libs.], with_samba_libs="$withval", with_samba_libs="/usr/lib") if test "x${with_samba_libs}" != "xno" -a "x${have_samba_includes}" != "xno"; then LDFLAGS_save="$LDFLAGS" LDFLAGS="$LDFLAGS -L$with_samba_libs" AC_CHECK_LIB(smbclient, smbc_new_context,samba_libs="yes", samba_libs="no") LDFLAGS="$LDFLAGS_save" if test "x${samba_libs}" != "xno"; then AC_DEFINE(HAVE_SAMBA,, [Define to 1 if you have the samba 3.0 libraries]) msg_samba="yes" if test x$with_samba_libs != x/usr/lib; then SAMBA_LIBS="-L$with_samba_libs -lsmbclient" else SAMBA_LIBS="-lsmbclient" fi else SAMBA_CFLAGS="" SAMBA_LIBS="" fi fi AC_MSG_CHECKING(for Samba 3.0 libraries) AC_MSG_RESULT($msg_samba) fi AM_CONDITIONAL(HAVE_SAMBA, test $msg_samba = yes) AC_SUBST(SAMBA_CFLAGS) AC_SUBST(SAMBA_LIBS) dnl Check for libxml. AC_ARG_WITH(xml2, AC_HELP_STRING([--with-xml2=DIR],[use libxml2 found in DIR]), [CFLAGS="$CFLAGS -I$withval/include" LIBS="-L$withval/lib $LIBS"]) AC_PATH_GENERIC(xml2, 2.3.10, [ AC_SUBST(xml2_libs) AC_SUBST(xml2_cflags)], AC_MSG_ERROR(Cannot find libxml2: Is xml2-config in path?)) xml2_libs=`xml2-config --libs` xml2_cflags=`xml2-config --cflags` dnl Checking for Perl: AC_PATH_PROG(PERL,perl,0) AC_SUBST(PERL) PROG="ecore-config"; AC_PATH_PROG(ECORE_CONFIG, $PROG, "", $PATH) if test -z "$ECORE_CONFIG" ; then echo $PROG " is not in your \$PATH. Please ensure it is."; echo "Read the manual page for you shell as to how to extend your path."; AC_MSG_ERROR(Cannot find $PROG) fi ecore_cflags=`$ECORE_CONFIG --cflags` ecore_libs=`$ECORE_CONFIG --libs` AC_SUBST(ecore_cflags) AC_SUBST(ecore_libs) PROG="curl-config"; msg_curl="no" AC_PATH_PROG(CURL_CONFIG, $PROG, "", $PATH) if test -z "$CURL_CONFIG" ; then echo $PROG " is not in your \$PATH. Please ensure it is."; echo "Read the manual page for you shell as to how to extend your path."; AC_MSG_WARN(Cannot find $PROG) curl_cflags="" curl_libs="" else curl_cflags=`$CURL_CONFIG --cflags` curl_libs=`$CURL_CONFIG --libs` msg_curl="yes" fi AC_SUBST(curl_cflags) AC_SUBST(curl_libs) AM_CONDITIONAL(HAVE_CURL, test $msg_curl = yes) AC_CHECK_LIB(bz2, bzCompressInit, AC_DEFINE(HAVE_OLDER_BZIP2, 1, [Define to 1 if older bzip2 version is used])) AC_CHECK_HEADERS(bzlib.h, BZ2_LIBS="$BZ2_LIBS -lbz2", AC_MSG_WARN([evfs requires libbz2 to compile.]) ) AC_SUBST(BZ2_LIBS) AC_CHECK_HEADERS(sqlite3.h, SQLITE_LIBS="$SQLITE_LIBS -lsqlite3", AC_MSG_ERROR([evfs requires sqlite3 to compile.]) ) AC_SUBST(SQLITE_LIBS) AC_ARG_WITH(eet-config, [ --with-eet-config=EET_CONFIG use eet-config specified ], [ EET_CONFIG=$withval; echo "using "$EET_CONFIG" for eet-config"; ],[ PROG="eet-config"; AC_PATH_PROG(EET_CONFIG, $PROG, "", $PATH) ]) eet_cflags=`$EET_CONFIG --cflags` eet_libs=`$EET_CONFIG --libs` AC_SUBST(eet_cflags) AC_SUBST(eet_libs) PROG="taglib-config"; AC_PATH_PROG(TAGLIB_CONFIG, $PROG, "", $PATH) msg_taglib="no" if test -z "$TAGLIB_CONFIG" ; then echo $PROG " is not in your \$PATH. Please ensure it is."; echo "Read the manual page for your shell as to how to extend your path."; AC_MSG_WARN(Cannot find $PROG) taglib_libs="" taglib_cflags="" else taglib_libs=`$TAGLIB_CONFIG --libs`" -ltag_c" taglib_cflags=`$TAGLIB_CONFIG --cflags` msg_taglib="yes" fi AC_SUBST(taglib_libs) AC_SUBST(taglib_cflags) AM_CONDITIONAL(HAVE_TAGLIB, test $msg_taglib = yes) AC_CHECK_HEADER(taglib/tag_c.h) dnl ################### dnl # checking for extractor (provider) dnl ################### extractor=no; AC_MSG_CHECKING(whether the extractor plugin is explicitly disabled) AC_ARG_ENABLE(plugin-extractor, AC_HELP_STRING([--enable-plugin-extractor],[build the file keywords plugin]), [ ac_use_plugin_extractor="$enableval" ], [ ac_use_plugin_extractor="yes" ] ) if test X"$ac_use_plugin_extractor" = Xyes; then AC_MSG_RESULT(no) AC_CHECK_LIB(extractor, EXTRACTOR_getKeywords,[ extractor=yes extractor_libs="-lextractor" extractor_cflags="" AC_DEFINE(HAVE_EXTRACTOR, 1, libextractor keyword-library found)],[ extractor=no AC_MSG_WARN([Could not find all headers and libraries for extractor support: there will be fewer metadata in tooltips. cf. http://www.ovmj.org/samant a/libextractor/ ])]) else AC_MSG_RESULT(yes) extractor=no fi AC_SUBST(extractor_libs) AC_SUBST(extractor_cflags) AM_CONDITIONAL(HAVE_EXTRACTOR, test $extractor = yes) dnl Set PACKAGE_LOCALE_DIR in config.h. if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", "Locale directory") else AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", "Locale directory") fi dnl Set PACKAGE_DATA_DIR in config.h. if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [PACKAGE_DATA_DIR]) else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [PACKAGE_DATA_DIR]) fi dnl Set the package lib dir if test "x${libdir}" = 'x${prefix}/lib'; then if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_PLUGIN_DIR, "${ac_default_prefix}/lib/${PACKAGE}", "Plugin directory") else AC_DEFINE_UNQUOTED(PACKAGE_PLUGIN_DIR, "${prefix}/lib/${PACKAGE}", "Plugin directory") fi else AC_DEFINE_UNQUOTED(PACKAGE_PLUGIN_DIR, "${prefix}/lib/${PACKAGE}", "Plugin directory") fi dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", "Source directory") dnl Backtrace generation code, based on code from Eterm. Cheers Michael :) AC_PATH_PROG(DBX, dbx, no) if test "$DBX" != "no"; then AC_DEFINE_UNQUOTED(DBX, "$DBX", "dbx program") fi AC_PATH_PROG(GDB, gdb, no) if test "$GDB" != "no"; then AC_DEFINE_UNQUOTED(GDB, "$GDB", "gdb program") fi AC_PATH_PROG(PSTACK, pstack, no, $PATH:/usr/proc/bin:/usr/sbin) if test "$PSTACK" != "no"; then AC_DEFINE_UNQUOTED(PSTACK, "$PSTACK", "pstack program") fi AC_CHECK_LIB(cl, U_STACK_TRACE, LIBS="$LIBS -lcl") if test "$GDB" != "no"; then GDB_CMD_FILE=`eval eval eval eval echo "$datadir/$PACKAGE/gdb.scr"` AC_DEFINE_UNQUOTED(GDB_CMD_FILE, "$GDB_CMD_FILE", "gdb command file") else GDB_CMD_FILE="" fi AC_SUBST(GDB_CMD_FILE) dnl Look for jade for sgml translations. AC_ARG_WITH(dbsheets, [ --with-dbsheets=DIR use DIR to specify your DocBook stylesheets installation path.], DB_STYLESHEETS="$withval", DB_STYLESHEETS="/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh") AC_SUBST(DB_STYLESHEETS) AC_PATH_PROG(JADE, jade) AM_CONDITIONAL(HAVE_JADE, test "x$JADE" != "x" && test -d "$DB_STYLESHEETS") dnl Volume monitor stuff AC_CHECK_FUNCS(setmntent endmntent hasmntopt getmntinfo) AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/vfstab.h sys/cdio.h sys/mount.h sys/mntctl.h sys/vfs.h sys/vmount.h sys/sysctl.h fstab.h fnmatch.h) dnl Various conditionals AM_CONDITIONAL(BUILD_ECORE_DEPENDENT, test "$ecore" != "no") AC_DEFINE(HAVE_ECORE, 1, [Build with ecore]) AC_OUTPUT([ Makefile src/Makefile src/bin/Makefile src/lib/Makefile src/plugins/Makefile src/plugins/file/Makefile src/plugins/meta/Makefile src/plugins/vfolder/Makefile src/demo/Makefile src/include/Makefile src/common/Makefile evfs-config debian/changelog ], [ chmod +x evfs-config ])