X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=configure.ac;h=98fabc20b0c667da29ffdcb2ef6ebcb80395224d;hb=729fd3d6c07aba050261244c59f8feb9fa29549d;hp=16542c688bc0b44068df101daba881bcf5e9205d;hpb=19e7bd5e57fecb44a0d7cb7e8b824b4747fe26c4;p=captive.git diff --git a/configure.ac b/configure.ac index 16542c6..98fabc2 100644 --- a/configure.ac +++ b/configure.ac @@ -381,6 +381,62 @@ 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) GLADE_W_INIT([ ./src/install/acquire/ui-gnome-interface.c @@ -389,42 +445,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" ]) @@ -530,6 +567,7 @@ Makefile ./src/libcaptive/reactos/ntoskrnl/rtl/i386/Makefile ./src/libcaptive/reactos/ntoskrnl/se/Makefile ./src/libcaptive/halcaptive/Makefile +./src/libcaptive/captivemodid/Makefile ./src/libcaptive/cc/Makefile ./src/libcaptive/cm/Makefile ./src/libcaptive/ex/Makefile