AC_INIT(libgnomevfs/gnome-vfs.h) # Making releases: # LIBGNOMEVFS_MICRO_VERSION += 1; # LIBGNOMEVFS_INTERFACE_AGE += 1; # if any functions have been added, set LIBGNOMEVFS_INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set LIBGNOMEVFS_BINARY_AGE and LIBGNOMEVFS_INTERFACE_AGE to 0. # LIBGNOMEVFS_MAJOR_VERSION=2 LIBGNOMEVFS_MINOR_VERSION=3 LIBGNOMEVFS_MICRO_VERSION=8 LIBGNOMEVFS_INTERFACE_AGE=8 # If you need a modifier for the version number. # Normally empty, but can be used to make "fixup" releases. LIBGNOMEVFS_EXTRAVERSION= dnl libtool versioning from libgnome LIBGNOMEVFS_CURRENT=`expr 100 '*' $LIBGNOMEVFS_MINOR_VERSION + $LIBGNOMEVFS_MICRO_VERSION - $LIBGNOMEVFS_INTERFACE_AGE` LIBGNOMEVFS_BINARY_AGE=`expr 100 '*' $LIBGNOMEVFS_MINOR_VERSION + $LIBGNOMEVFS_MICRO_VERSION` LIBGNOMEVFS_REVISION=$LIBGNOMEVFS_INTERFACE_AGE LIBGNOMEVFS_AGE=`expr $LIBGNOMEVFS_BINARY_AGE - $LIBGNOMEVFS_INTERFACE_AGE` LIBGNOMEVFS_VERSION=$LIBGNOMEVFS_MAJOR_VERSION.$LIBGNOMEVFS_MINOR_VERSION.$LIBGNOMEVFS_MICRO_VERSION$LIBGNOMEVFS_EXTRAVERSION AC_SUBST(LIBGNOMEVFS_CURRENT) AC_SUBST(LIBGNOMEVFS_REVISION) AC_SUBST(LIBGNOMEVFS_AGE) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(gnome-vfs, $LIBGNOMEVFS_VERSION) dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS") AM_MAINTAINER_MODE GNOME_COMMON_INIT GNOME_PLATFORM_GNOME_2(yes, force) dnl touch NOINST_GOB dnl AC_CONFIG_SUBDIRS(gob) AC_ISC_POSIX AC_PROG_CC AC_PROG_CPP AC_PROG_AWK AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AC_PROG_INTLTOOL dnl Versions shared with the .spec file. BONOBO_ACTIVATION_REQUIRED=1.0.0 BONOBO_REQUIRED=2.0.0 GCONF_REQUIRED=1.1.1 GLIB_REQUIRED=2.0.0 ORBIT_REQUIRED=2.4.0 XML_REQUIRED=2.2.8 AC_SUBST(BONOBO_ACTIVATION_REQUIRED) AC_SUBST(BONOBO_REQUIRED) AC_SUBST(GCONF_REQUIRED) AC_SUBST(GLIB_REQUIRED) AC_SUBST(LIBIDL_REQUIRED) AC_SUBST(ORBIT_REQUIRED) AC_SUBST(XML_REQUIRED) PKG_CHECK_MODULES(MODULES_XML, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED libxml-2.0 >= $XML_REQUIRED) AC_SUBST(MODULES_XML_CFLAGS) AC_SUBST(MODULES_XML_LIBS) PKG_CHECK_MODULES(MODULES, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED) AC_SUBST(MODULES_LIBS) AC_SUBST(MODULES_CFLAGS) PKG_CHECK_MODULES(MODULES_FILE, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED) AC_SUBST(MODULES_FILE_LIBS) AC_SUBST(MODULES_FILE_CFLAGS) PKG_CHECK_MODULES(MODULES_GCONF, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED) AC_SUBST(MODULES_GCONF_CFLAGS) AC_SUBST(MODULES_GCONF_LIBS) PKG_CHECK_MODULES(MODULES_XML_GCONF, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED libxml-2.0 >= $XML_REQUIRED gconf-2.0 >= $GCONF_REQUIRED) AC_SUBST(MODULES_XML_GCONF_CFLAGS) AC_SUBST(MODULES_XML_GCONF_LIBS) PKG_CHECK_MODULES(MONIKERS, libbonobo-2.0 >= $BONOBO_REQUIRED) AC_SUBST(MONIKERS_CFLAGS) AC_SUBST(MONIKERS_LIBS) PKG_CHECK_MODULES(TEST, bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED gconf-2.0 >= $GCONF_REQUIRED gthread-2.0 >= $GLIB_REQUIRED) AC_SUBST(TEST_LIBS) AC_SUBST(TEST_CFLAGS) ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`" AC_SUBST(ORBIT_IDL) BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`" AC_SUBST(BONOBO_IDLDIR) cflags_set=yes GNOME_COMPILE_WARNINGS VFS_CFLAGS="$warnCFLAGS $complCFLAGS" GNOME_PTHREAD_CHECK dnl semaphore functions are in librt.so on solaris AC_CHECK_LIB(rt, sem_wait) dnl Don't blindly #define them if they're typedef'ed in AM_GNOME_SIZE_T AM_GNOME_OFF_T AC_CACHE_CHECK([for off64_t], ac_cv_have_off64_t, AC_TRY_COMPILE([ # define _LARGEFILE64_SOURCE # include ], [off64_t testoffset], ac_cv_have_off64_t=yes, ac_cv_have_off64_t=no)) if test x"$ac_cv_have_off64_t" = "xyes" ; then AC_DEFINE(HAVE_OFF64_T) fi GETTEXT_PACKAGE=gnome-vfs-2.0 AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE") ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el eo es et eu fa fi fr ga gl he hi hu id is it ja ko li lt lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv tr uk vi wa yi zh_CN zh_TW" AM_GLIB_GNU_GETTEXT AC_CHECK_LIB(nsl, t_accept) AC_CHECK_LIB(socket, socket) AC_FUNC_ALLOCA AC_CHECK_FUNCS(getdtablesize open64 lseek64 statvfs seteuid setegid setresuid setresgid readdir_r mbrtowc inet_pton getdelim) dnl Specify the gconf configuration source, dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults AC_PATH_PROG(GCONFTOOL, gconftool-2, no) if test x"$GCONFTOOL" = xno; then AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) fi AM_GCONF_SOURCE_2 dnl dnl This is so that we find the 64bit type dnl AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) VFS_SIZE="unsigned long" VFS_OFFSET="long" VFS_SIZE_IS="UNSIGNED_LONG" VFS_OFFSET_IS="LONG" VFS_SIZE_PRINTF="lu" VFS_OFFSET_PRINTF="ld" dnl dnl See if any of the types is 64 bits, and in case it is, use it dnl Note: We test an (int) even though I think using (long) would be fine. dnl This is because glib does it this way for gint64 and so there dnl is probably a reason behind it dnl case 8 in $ac_cv_sizeof_int) VFS_SIZE="unsigned int" VFS_OFFSET="int" VFS_SIZE_IS="UNSIGNED_INT" VFS_OFFSET_IS="INT" VFS_SIZE_PRINTF="u" VFS_OFFSET_PRINTF="d" ;; $ac_cv_sizeof_long) # Nothing happens here, we are already using a long ;; $ac_cv_sizeof_long_long) VFS_SIZE="unsigned long long" VFS_OFFSET="long long" VFS_SIZE_IS="UNSIGNED_LONG_LONG" VFS_OFFSET_IS="LONG_LONG" VFS_SIZE_PRINTF="Lu" VFS_OFFSET_PRINTF="Ld" ;; esac AC_SUBST(VFS_SIZE) AC_SUBST(VFS_OFFSET) AC_SUBST(VFS_SIZE_IS) AC_SUBST(VFS_OFFSET_IS) AC_SUBST(VFS_SIZE_PRINTF) AC_SUBST(VFS_OFFSET_PRINTF) AC_CHECK_HEADERS(sys/param.h sys/resource.h sys/vfs.h sys/mount.h sys/statvfs.h wctype.h) dnl ==================================== dnl = dnl = Profiling support dnl = dnl ==================================== ENABLE_PROFILER= AC_ARG_ENABLE(profiler, [ --enable-profiler Enable profiler], ENABLE_PROFILER=1 AC_DEFINE(ENABLE_PROFILER)) if test "x$ENABLE_PROFILER" = "x1" then CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES" LDFLAGS="/gnome/PROFILE/lib/libprofiler.so -lpthread" fi AC_SUBST(ENABLE_PROFILER) AM_CONDITIONAL(ENABLE_PROFILER, test "x$ENABLE_PROFILER" = "x1") dnl ==================================== dnl turn warnings into errors to enforce clean code for cvs users (not in tarball) AC_ARG_ENABLE(more-warnings, [ --enable-more-warnings Maximum compiler warnings], set_more_warnings="$enableval",[ if test -f $srcdir/CVSVERSION; then set_more_warnings=yes else set_more_warnings=no fi ]) if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then echo "enable compile warnings = $set_more_warnings" VFS_CFLAGS="-Wall -Werror \ -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ -Wnested-externs -Wpointer-arith" for option in -Wno-strict-aliasing -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$VFS_CFLAGS $option $CFLAGS" AC_MSG_CHECKING([whether gcc understands $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) CFLAGS="$SAVE_CFLAGS" if test $has_option = yes; then VFS_CFLAGS="$VFS_CFLAGS $option" fi AC_MSG_RESULT($has_option) unset has_option unset SAVE_CFLAGS done unset option fi AC_SUBST(VFS_CFLAGS) dnl dnl gnome vfs Documentation dnl GNOME_VFS_DIR=`(cd $srcdir; pwd)` AC_SUBST(GNOME_VFS_DIR) VFS_LIBS="-lgnomevfs $VFS_GLIB_LIBS" VFS_LIBDIR='-L${libdir}' VFS_INCLUDEDIR='-I${includedir} -I${libdir}/vfs/include'" $VFS_GLIB_CFLAGS" AC_SUBST(VFS_LIBDIR) AC_SUBST(VFS_INCLUDEDIR) AC_SUBST(VFS_LIBS) dnl dnl efs-method.c dnl dnl if test "x$libefs_disabled" = xyes; then dnl LIBEFS_CONFIG=no dnl else dnl AC_PATH_PROG(LIBEFS_CONFIG, libefs-config, no) dnl fi dnl dnl if test "x$LIBEFS_CONFIG" != xno; then dnl LIBEFS_LIBS=`$LIBEFS_CONFIG --libs` dnl LIBEFS_CFLAGS=`$LIBEFS_CONFIG --cflags` dnl fi dnl AM_CONDITIONAL(HAVE_LIBEFS, false) LIBEFS_LIBS="" LIBEFS_CFLAGS="" AC_SUBST(LIBEFS_LIBS) AC_SUBST(LIBEFS_CFLAGS) dnl dnl ftp-method.c dnl AC_DEFUN(AC_STRUCT_LINGER, [ av_struct_linger=no AC_MSG_CHECKING(struct linger is available) AC_TRY_RUN([ #include #include struct linger li; main () { li.l_onoff = 1; li.l_linger = 120; exit (0); } ],[ AC_DEFINE(HAVE_STRUCT_LINGER) av_struct_linger=yes ],[ av_struct_linger=no ],[ av_struct_linger=no ]) AC_MSG_RESULT($av_struct_linger) ]) have_socket=no AC_CHECK_FUNCS(socket, have_socket=yes) if test $have_socket = no; then # socket is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do AC_CHECK_LIB($lib, socket, [ LIBS="$LIBS -l$lib" have_socket=yes AC_DEFINE(HAVE_SOCKET) break]) done fi have_gethostbyname=no AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes) if test $have_gethostbyname = no; then # gethostbyname is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break]) done fi AC_CHECK_LIB(bz2, bzCompressInit, AC_DEFINE(HAVE_OLDER_BZIP2)) AC_CHECK_HEADERS(bzlib.h, BZ2_LIBS="$BZ2_LIBS -lbz2", AC_MSG_ERROR([Gnome-vfs requires libbz2 to compile.]) ) AC_SUBST(BZ2_LIBS) if test $have_socket = yes; then AC_STRUCT_LINGER fi dnl modules/cdda AM_CONDITIONAL(HAVE_CDDA, false) AC_CHECK_HEADERS(cdda_interface.h cdda_paranoia.h, [ CDDA_LIBS="$CDDA_LIBS -lcdda_paranoia, -lcdda_interface" AM_CONDITIONAL(HAVE_CDDA, true) ]) dnl modules/cdemenu-desktop AC_MSG_CHECKING(for Solaris platform) case "$host" in *solaris*) build_cdemenu_module=yes ;; *) build_cdemenu_module=no ;; esac AC_MSG_RESULT([$build_cdemenu_module]) AM_CONDITIONAL(BUILD_CDEMENU_MODULE, test "$build_cdemenu_module" = "yes") dnl ****************************** dnl OpenSSL dnl ****************************** AC_ARG_ENABLE(openssl, [ --disable-openssl build without openssl support]) if test "x$enable_openssl" != "xno"; then PKG_CHECK_MODULES(OPENSSL, openssl, AM_CONDITIONAL(HAVE_SSL, true),[ AC_ARG_WITH(openssl-includes, [ --with-openssl-includes=PREFIX Location of OpenSSL includes.], with_openssl_includes="$withval", with_openssl_includes="/usr/include") have_openssl_includes="no" if test "x${with_openssl_includes}" != "xno"; then CPPFLAGS_save="$CPPFLAGS" AC_MSG_CHECKING(for OpenSSL includes) AC_MSG_RESULT("") CPPFLAGS="$CPPFLAGS -I$with_openssl_includes" AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h, [ openssl_includes="yes" ]) CPPFLAGS="$CPPFLAGS_save" if test "x{$openssl_includes}" != "xno" -a "x{$openssl_includes}" != "x"; then have_openssl_includes="yes" if test "${with_openssl_includes}" != "/usr/include" ; then OPENSSL_CFLAGS="-I$with_openssl_includes" else OPENSSL_CFLAGS="" fi else OPENSSL_CFLAGS="" fi else AC_MSG_CHECKING(for OpenSSL includes) AC_MSG_RESULT(no) fi AC_ARG_WITH(openssl-libs, [ --with-openssl-libs=PREFIX Location of OpenSSL libs.], with_openssl_libs="$withval", with_openssl_libs="/usr/lib") msg_openssl="no" if test "x${with_openssl_libs}" != "xno" -a "x${have_openssl_includes}" != "xno"; then LDFLAGS_save="$LDFLAGS" AC_CACHE_CHECK([for OpenSSL libraries], openssl_libs, [ dnl How can we test to see if we need to link to libld for sure?? dnl RedHat 6.2 seems to need to but Debian Woody doesn't LDFLAGS="$LDFLAGS -L$with_openssl_libs -lssl -lcrypto -ldl" AC_TRY_LINK_FUNC(SSL_read, openssl_libs="yes", openssl_libs="no") LDFLAGS="$LDFLAGS_save" ]) if test "x${openssl_libs}" != "xno"; then AC_DEFINE(HAVE_OPENSSL) msg_openssl="yes" if test x$with_openssl_libs != x/usr/lib; then OPENSSL_LIBS="-L$with_openssl_libs -lssl -lcrypto" else OPENSSL_LIBS="-lssl -lcrypto" fi AM_CONDITIONAL(HAVE_SSL, true) else OPENSSL_CFLAGS="" OPENSSL_LIBS="" AM_CONDITIONAL(HAVE_SSL, false) fi else AC_MSG_CHECKING(for OpenSSL libraries) AC_MSG_RESULT(no) fi ]) dnl end of PKG_CHECK_MODULES(openssl) fi dnl **************************** dnl GNUTLS dnl **************************** AC_ARG_ENABLE(gnutls, [ --enable-gnutls build with gnutls support]) if test "x$enable_gnutls" = "xyes"; then if test "x${OPENSSL_LIBS}" != "x"; then AC_MSG_ERROR([*** Can't use both openssl and gnutls at the same time. Please pick one only. ***]) else AM_PATH_LIBGNUTLS(0.5.1, AC_DEFINE(HAVE_GNUTLS), AC_MSG_ERROR([Unable to find GNUTLS])) fi fi PKG_CHECK_MODULES(LIBGNOMEVFS, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED ORBit-2.0 >= $ORBIT_REQUIRED libxml-2.0 >= $XML_REQUIRED gnome-mime-data-2.0) LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS" LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS" AC_SUBST(LIBGNOMEVFS_CFLAGS) AC_SUBST(LIBGNOMEVFS_LIBS) dnl ********************** dnl *** Checks for FAM *** dnl ********************** FAM_MISSING_WARNING="Gnome-vfs depends on FAM to provide notification when files are altered (either through filesystem polling, or a kernel notification mechanism). If Gnome-vfs is built without FAM support, directories viewed with Nautilus or other applications will not remain in synch with the actual filesystem when they are altered by external processes. Particularly if you are a distributor please compile Nautilus with FAM support. FAM is available from http://oss.sgi.com/projects/fam/. A patch to add Linux Kernel 2.4 directory notify support to FAM (highly desirable) is available from http://people.redhat.com/alexl/files/" FAM_LIBS= AC_CHECK_LIB(fam, FAMOpen, [AC_CHECK_HEADERS(fam.h, [AC_DEFINE(HAVE_FAM) FAM_LIBS="-lfam"], AC_MSG_WARN(*** FAM support will not be built (header files not found) $FAM_MISSING_WARNING ***))], AC_MSG_WARN(*** FAM support will not be built (FAM library not found) $FAM_MISSING_WARNING ***)) AC_SUBST(FAM_LIBS) dnl ************************** dnl *** Checks for gtk-doc *** dnl ************************** AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) if test "x$with_html_dir" = "x" ; then HTML_DIR='${datadir}/gtk-doc/html' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) gtk_doc_min_version=0.10 if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) IFS="${IFS= }"; gnome_vfs_save_IFS="$IFS"; IFS="." set $gtk_doc_version for min in $gtk_doc_min_version ; do cur=$1; shift if test -z $min ; then break; fi if test -z $cur ; then GTKDOC=false; break; fi if test $cur -gt $min ; then break ; fi if test $cur -lt $min ; then GTKDOC=false; break ; fi done IFS="$gnome_vfs_save_IFS" if $GTKDOC ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi AC_CHECK_PROG(DB2HTML, db2html, true, false) AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) AC_SUBST(HAVE_GTK_DOC) dnl Let people disable the gtk-doc stuff. AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) if test "x$enable_gtk_doc" = xauto ; then if test "x$GTKDOC" = xtrue ; then enable_gtk_doc=yes else enable_gtk_doc=no fi fi dnl NOTE: We need to use a separate automake conditional for this dnl to make this work with the tarballs. AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) dnl ****************************** dnl *** End checks for gtk-doc *** dnl ****************************** dnl borrowed from gnu findutils dnl and relicensed as LGPL by the FSF AC_ARG_WITH(afs, [ --with-afs support -fstype afs], [ AC_DEFINE(AFS) CPPFLAGS="$CPPFLAGS -I/usr/afsws/include" LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"]) AC_MSG_CHECKING(how to get filesystem type) fstype=no # The order of these tests is important. AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4) if test $fstype = no; then AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3) fi if test $fstype = no; then AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX) fi if test $fstype = no; then AC_TRY_CPP([#include ], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD) fi if test $fstype = no; then AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1) fi if test $fstype = no; then AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix) fi AC_MSG_RESULT($fstype) dnl Check for libpopt AC_CHECK_LIB(popt, poptGetArg, POPT_LIBS=-lpopt, [AC_CHECK_HEADER(popt.h, , AC_MSG_ERROR([[ *** Couldn't find popt. Please download and install from *** ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ and try again.]]))]) AC_SUBST(POPT_LIBS) dnl Final touch AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) dnl This is needed by `test/vfs-run.in' TOP_BUILDDIR="`pwd`" AC_SUBST(TOP_BUILDDIR) dnl ==================================================================== dnl Code for checking whether IPv6 is enabled on the system.... dnl ==================================================================== AC_MSG_CHECKING([whether to enable ipv6]) AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable IPv6 extensions], ,enable_ipv6=yes) if test $enable_ipv6 = yes; then save_libs=$LIBS dnl ==================================================================== dnl Code for checking presence of AF_INET6 on the system.... dnl ==================================================================== AC_TRY_COMPILE([ #include #include ], [ socket(AF_INET6, SOCK_STREAM, 0) ], have_ipv6=yes, have_ipv6=no ) AC_MSG_RESULT($have_ipv6) dnl ================================================================= dnl Now we would check for specific functions like getaddrinfo. dnl ================================================================= have_getaddrinfo=no if test $have_ipv6 = yes; then AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes) if test $have_getaddrinfo != yes; then # getaddrinfo is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes; break]) done fi if test $have_getaddrinfo = yes; then AC_DEFINE(ENABLE_IPV6) fi fi fi dnl ============================================================================== dnl End of IPv6 checks dnl ============================================================================== dnl Output files AC_OUTPUT([ Makefile gnome-vfs.spec libgnomevfs/gnome-vfs-file-size.h libgnomevfs/Makefile modules/Makefile modules/extfs/Makefile modules/extfs/ar modules/extfs/cpio modules/extfs/deb modules/extfs/lha modules/extfs/rar modules/extfs/zip modules/extfs/zoo modules/vfolder/Makefile monikers/Makefile schemas/Makefile devel-docs/Makefile devel-docs/gnome-vfs-tutorial/Makefile po/Makefile.in programs/Makefile test/Makefile test/vfs-run doc/Makefile gnome-vfs-2.0.pc gnome-vfs-module-2.0.pc ]) chmod u+x test/vfs-run dnl <= Configuration summary => echo "<= gnome-vfs configuration summary :" dnl <= Profile support? => case "X$ENABLE_PROFILER" in X1) echo " Enable profiler : YES" ;; *) echo " Enable profiler : NO" echo ;; esac dnl <= CFLAGS and LDFLAGS => echo " CFLAGS : $CFLAGS LDFLAGS : $LDFLAGS" echo