X-Git-Url: http://git.jankratochvil.net/?p=captive.git;a=blobdiff_plain;f=configure.ac;h=2c34065a93e2c8b4bb7e30ac652c43979393739b;hp=9fa79c32aa3fac421016eccc86826a3189335092;hb=0f45cca6d6d0c4a9701b82aef3cd5caa86e177dc;hpb=9f448c5ed2ba452dae7dab285acf74fda33bc5db diff --git a/configure.ac b/configure.ac index 9fa79c3..2c34065 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ dnl 2.53 for AM_GLIB_GNU_GETTEXT: AC_PREREQ(2.53) dnl Not yet present in: Red Hat autoconf-2.57-3 dnl AC_CONFIG_MACRO_DIR(macros) -AM_INIT_AUTOMAKE(captive,1.1.6cvs) +AM_INIT_AUTOMAKE(captive,1.1.7cvs2) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE dnl Call AC_PROG_CC before AC_ISC_POSIX. @@ -336,6 +336,14 @@ if test x$enable_fuse != xno;then fi ]) fi +if $have_fuse;then + AC_CHECK_MEMBERS([struct stat.st_atim]) + AC_CHECK_MEMBERS([struct stat.st_atimensec]) + AC_CHECK_MEMBERS([struct stat.st_mtim]) + AC_CHECK_MEMBERS([struct stat.st_mtimensec]) + AC_CHECK_MEMBERS([struct stat.st_ctim]) + AC_CHECK_MEMBERS([struct stat.st_ctimensec]) +fi AM_CONDITIONAL(ENABLE_FUSE,[ $have_fuse ]) # Avoid default backward compatibility mode - see the heading of: FUSE_CFLAGS="$FUSE_CFLAGS -DFUSE_USE_VERSION=22" @@ -381,7 +389,64 @@ if test "x$found_orbit_line" = "xlinc";then PKG_CHECK_MODULES(LINC,linc) fi +captive_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LIBXML_CFLAGS" +have_libxml_xmlreader_h=false +AC_CHECK_HEADERS(libxml/xmlreader.h,[ have_libxml_xmlreader_h=true ], + [ AC_MSG_WARN([Captive requires libxml >= 2.4.29 for --enable-install-pkg.]) ]) +AM_CONDITIONAL(HAVE_LIBXML_XMLREADER_H,[ $have_libxml_xmlreader_h ]) +CPPFLAGS="$captive_save_CPPFLAGS" + +have_libntfs_includes=true +# '#include "config.h"' may be required by include files. +# "config.h" may be already present while not yet being compilable. +rm -f config.h-ntfs_save +mv -f config.h config.h-ntfs_save 2>/dev/null +touch config.h +captive_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS -I." # for "config.h" touched above +AC_CHECK_HEADERS(ntfs/types.h ntfs/volume.h,,[ + have_libntfs_includes=false + AC_MSG_WARN([Captive requires ntfs/* include files (of ntfsprogs-devel) for --enable-install-pkg.]) + ]) +CPPFLAGS="$captive_save_CPPFLAGS" +rm -f config.h +mv -f config.h-ntfs_save config.h 2>/dev/null + +LIBNTFS_LIBS="" +AC_CHECK_LIB(ntfs,ntfs_mount,[ LIBNTFS_LIBS="-lntfs" ], + [ AC_MSG_WARN([Captive requires libntfs (of ntfsprogs-devel) for --enable-install-pkg.]) ]) +AC_SUBST(LIBNTFS_LIBS) + +have_libgnomevfs_gnome_vfs_filesystem_entry_h=false +if test x$enable_standalone = xyes;then + captive_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GNOME_VFS_MODULE_CFLAGS" + AC_CHECK_HEADERS(libgnomevfs/gnome-vfs-filesystem-entry.h, + [ have_libgnomevfs_gnome_vfs_filesystem_entry_h=true ], + [ AC_MSG_WARN([Captive --enable-install-pkg with --enable-standalone requires patched GnomeVFS. See: + http://bugzilla.gnome.org/show_bug.cgi?id=47053]) ]) + CPPFLAGS="$captive_save_CPPFLAGS" +fi + +LIBNTFS_GNOMEVFS_LIBS="" +if test x$enable_standalone = xyes;then + LIBNTFS_GNOMEVFS_LIBS="-L/usr/lib/gnome-vfs-2.0/modules -lntfs-gnomevfs" + captive_save_CFLAGS="$CFLAGS" + captive_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GNOME_VFS_MODULE_CFLAGS" + LIBS=" $LIBS $GNOME_VFS_MODULE_LIBS $LIBNTFS_GNOMEVFS_LIBS" + AC_CHECK_FUNCS(vfs_module_init,,[ + LIBNTFS_GNOMEVFS_LIBS="" + AC_MSG_WARN([Captive --enable-install-pkg with --enable-standalone requires GnomeVFS libntfs-gnomevfs.]) + ]) + CFLAGS="$captive_save_CFLAGS" + LIBS="$captive_save_LIBS" +fi +AC_SUBST(LIBNTFS_GNOMEVFS_LIBS) + # AC_ARG_ENABLE(install-pkg,[--enable-install-pkg=[no/yes/auto]],,enable_install_pkg=auto) +have_gnome=false GLADE_W_INIT([ ./src/install/acquire/ui-gnome-interface.c ./src/install/acquire/ui-gnome-interface.h @@ -389,42 +454,23 @@ GLADE_W_INIT([ ./src/install/acquire/ui-gnome-support.c ./src/install/acquire/ui-gnome-support.h ],[$enable_install_pkg],[ - AC_CHECK_LIB(ntfs,ntfs_mount,[ - LIBNTFS_LIBS="-lntfs" - - have_libntfs_includes=true - AC_CHECK_HEADERS - # '#include "config.h"' may be required by include files. - # "config.h" may be already present while not yet being compilable. - rm -f config.h-ntfs_save - mv -f config.h config.h-ntfs_save 2>/dev/null - touch config.h - captive_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I." # for "config.h" touched above - AC_CHECK_HEADERS(ntfs/types.h ntfs/volume.h,,[ have_libntfs_includes=false ]) - CPPFLAGS="$captive_save_CPPFLAGS" - rm -f config.h - mv -f config.h-ntfs_save config.h 2>/dev/null - if $have_libntfs_includes;then - - captive_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $LIBXML_CFLAGS" - AC_CHECK_HEADERS(libxml/xmlreader.h, - [ glade_addon=yes ], - [ AC_MSG_WARN([Captive requires libxml >= 2.4.29 for --enable-install-pkg.]) ]) - CPPFLAGS="$captive_save_CPPFLAGS" - - else - AC_MSG_WARN([Captive requires ntfs/* include files (of ntfsprogs-devel) for --enable-install-pkg.]) - fi - ],[ AC_MSG_WARN([Captive requires libntfs (of ntfsprogs-devel) for --enable-install-pkg.]) ]) + if true \ + && $have_libxml_xmlreader_h \ + && $have_libntfs_includes \ + && test -n "$LIBNTFS_LIBS" \ + && ( test x$enable_standalone != xyes || ( true \ + && $have_libgnomevfs_gnome_vfs_filesystem_entry_h \ + && test -n "$LIBNTFS_GNOMEVFS_LIBS" \ + ) ) \ + ;then + glade_addon=yes + fi ]) if $have_gnome;then GNOMEUI_CFLAGS="$GNOMEUI_CFLAGS -DCAPTIVE_USING_GNOMEUI" fi AC_SUBST(GNOMEUI_CFLAGS) AC_SUBST(GNOMEUI_LIBS) -AC_SUBST(LIBNTFS_LIBS) dnl Do not: AM_CONDITIONAL(HAVE_LIBNTFS,[ test -n "$LIBNTFS_LIBS" ]) dnl as we do not need it as we are conditioned by ENABLE_INSTALL_PKG AM_CONDITIONAL(HAVE_GLADE_WRITESOURCE,[ test "x$PATH_GLADE" != "x" ])