X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=configure.ac;h=ea775ea5d2004ab17cdf9f1ccfb23045a3f9d00b;hb=a089075dd3fe0752465e6b7205f4f54ac6f897ab;hp=fb9b187515ea95f9cb956420dc30a303fd3e42da;hpb=1e30dfebb2ccb5681e454ff987a8b8d6ae1525a0;p=captive.git diff --git a/configure.ac b/configure.ac index fb9b187..ea775ea 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.7) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE dnl Call AC_PROG_CC before AC_ISC_POSIX. @@ -102,6 +102,8 @@ AC_ARG_ENABLE(standalone, [ --enable-standalone=no/yes provide initialization for static-build (def.=no)],,enable_standalone=no) AC_ARG_ENABLE(standalone-fonts, [ --enable-standalone-fonts=DIR provide bundled Gnome fonts in directory (def.=no)],,enable_standalone_fonts=no) +AC_ARG_ENABLE(standalone-yum, + [ --enable-standalone-yum=DIR provide bundled yum(8) packaging configuration directory (def.=no)],,enable_standalone_yum=no) # AC_ARG_ENABLE(sbin-mountdir,[--enable-sbin-mountdir=DIR],,[enable_sbin_mountdir="/sbin"]) @@ -166,45 +168,8 @@ AH_BOTTOM([ * would discard the effect of _FILE_OFFSET_BITS by AC_SYS_LARGEFILE. */ -#ifdef ENABLE_NLS -/* is taken from "$(top_srcdir)/intl" if system doesn't provide intl */ -# include -#ifdef LIBCAPTIVE -# define _(String) dgettext (PACKAGE,String) -#else -# define _(String) gettext (String) -#endif /* LIBCAPTIVE */ -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else /* !ENABLE_NLS */ -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) -# define _(String) (String) -# define N_(String) (String) -#endif /* !ENABLE_NLS */ - -#include /* for 'gchar' */ -#define G_LOG_DOMAIN ((const gchar *)"Captive") - -/* Ensure we have proper -I options: */ -#if defined(CAPTIVE_USE_GNOME_VFS_MODULE) || defined(CAPTIVE_USE_GNOME_VFS) -#ifndef HAVE_GNOME_VFS_READ_ENTIRE_FILE -#include -GnomeVFSResult gnome_vfs_read_entire_file(const char *uri,int *file_size,char **file_contents); -#endif -#endif - /* Supplemental definitions not possible in this file. */ -#ifdef LIBCAPTIVE #include "captive/config2.h" -#endif #endif /* !_CAPTIVE_CONFIG_H */ ]) @@ -371,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" @@ -416,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 @@ -424,39 +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" ]) @@ -486,6 +500,7 @@ AC_SUBST(GNOME_VFS_READ_ENTIRE_FILE_O) if test x$enable_standalone = xyes;then AC_DEFINE(ENABLE_STANDALONE,,[Provide initialization for static-build]) fi +AM_CONDITIONAL(ENABLE_STANDALONE,[test x$enable_standalone = xyes]) fontsdir= if test x$enable_standalone_fonts != xno;then @@ -501,6 +516,13 @@ if test x$have_gnome != xtrue -a x$have_gnome != xfalse;then fi AM_CONDITIONAL(HAVE_GNOME,[test "$have_gnome" = "true"]) +yum_repos_ddir= +if test x$enable_standalone_yum != xno;then + yum_repos_ddir="$enable_standalone_yum" +fi +AC_SUBST(yum_repos_ddir) +AM_CONDITIONAL(ENABLE_STANDALONE_YUM_REPOS_D,[test "$enable_standalone_yum" != "no"]) + AC_SUBST(CFLAGS) AC_SUBST(LIBS) @@ -554,6 +576,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 @@ -589,6 +612,7 @@ Makefile ./doc/apiref/Makefile ./fonts/Makefile ./fonts/fonts.conf +./yum.repos.d/Makefile ]) dnl FIXME: Why is "po/POTFILES" being substituted?