AC_INIT(src/libcaptive/Makefile-libcaptive.am)
+dnl 2.53 for AM_GLIB_GNU_GETTEXT:
+AC_PREREQ(2.53)
AM_INIT_AUTOMAKE(captive,0.9cvs)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
-#AM_ACLOCAL_INCLUDE(macros)
+dnl Call AC_PROG_CC before AC_ISC_POSIX.
+AC_PROG_CC(gcc3 gcc-3.0 gcc cc)
+AC_TRY_CPP([
+#if __GNUC__ >= 3
+#else
+#error "GCC version 3.0+ required at least for ReactOS anonymous unions"
+#endif
+],,[AC_MSG_ERROR([Captive requires GCC version 3.0+.])])
dnl Prevent "AC_TRY_COMPILE was called before AC_ISC_POSIX":
AC_ISC_POSIX
-AC_PROG_CC
+AC_SYS_LARGEFILE
AM_PROG_AS
AM_ENABLE_STATIC
AM_DISABLE_SHARED
dnl Use simpler AM_GLIB_GNU_GETTEXT instead of AM_GNU_GETTEXT
dnl as we depend on glib and glib requires system installed gettext anyway.
dnl http://lists.gnome.org/archives/gtk-devel-list/2003-April/msg00066.html
+dnl Special 'GETTEXT_PACKAGE' is required by glib gettext.
ALL_LINGUAS="cs"
+GETTEXT_PACKAGE="$PACKAGE"
+AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
GTK_DOC_CHECK
dnl Some Makefiles use additional tests etc.
AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"])
+AC_ARG_WITH(sandbox-setuid,
+ [ --with-sandbox-setuid=user non-privileged user for captive-sandbox-server (def.=captive)],
+ [ CAPTIVE_SANDBOX_SETUID="$withval" ],[ CAPTIVE_SANDBOX_SETUID="captive" ])
+AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_SETUID,"$CAPTIVE_SANDBOX_SETUID",
+ [non-privileged user for captive-sandbox-server])
+
+AC_ARG_WITH(sandbox-setgid,
+ [ --with-sandbox-setgid=group non-privileged group for captive-sandbox-server (def.=captive)],
+ [ CAPTIVE_SANDBOX_SETGID="$withval" ],[ CAPTIVE_SANDBOX_SETGID="captive" ])
+AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_SETGID,"$CAPTIVE_SANDBOX_SETGID",
+ [non-privileged group for captive-sandbox-server])
+
+AC_ARG_WITH(sandbox-chroot,
+ [ --with-sandbox-chroot=dir root-owned directory for captive-sandbox-server (def.=/var/lib/captive)],
+ [ CAPTIVE_SANDBOX_CHROOT="$withval" ],[ CAPTIVE_SANDBOX_CHROOT="/var/lib/captive" ])
+AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_CHROOT,"$CAPTIVE_SANDBOX_CHROOT",
+ [root-owned directory for captive-sandbox-server])
+
dnl Permit 'if IS_FALSE' for Makefile.am-s; symbol 'FALSE' forbidden by automake
AM_CONDITIONAL(IS_FALSE,false)
AH_TOP([
#ifndef _CAPTIVE_CONFIG_H
#define _CAPTIVE_CONFIG_H 1
-
-#include <glib/gtypes.h> /* for 'gchar' */
-#define G_LOG_DOMAIN ((const gchar *)"Captive")
-
-/* Supplemental definitions not possible in this file. */
-#ifdef LIBCAPTIVE
-#include "captive/config2.h"
-#endif
])
AH_BOTTOM([
-#endif /* !_CAPTIVE_CONFIG_H */
-])
+/* Do not place any stuff to AH_TOP as some of its includes
+ * would discard the effect of _FILE_OFFSET_BITS by AC_SYS_LARGEFILE.
+ */
-dnl ENABLE_NLS_HOOK name to guarantee inclusion AFTER '#undef ENABLE_NLS'
-AH_VERBATIM([ENABLE_NLS_HOOK],[
#ifdef ENABLE_NLS
/* <libintl.h> is taken from "$(top_srcdir)/intl" if system doesn't provide intl */
# include <libintl.h>
# define _(String) (String)
# define N_(String) (String)
#endif /* !ENABLE_NLS */
+
+#include <glib/gtypes.h> /* for 'gchar' */
+#define G_LOG_DOMAIN ((const gchar *)"Captive")
+
+/* Supplemental definitions not possible in this file. */
+#ifdef LIBCAPTIVE
+#include "captive/config2.h"
+#endif
+
+#endif /* !_CAPTIVE_CONFIG_H */
])
AM_PATH_GLIB_2_0(,,[AC_MSG_ERROR([Captive requires glib-2.0 library.])],[gmodule gobject])
for need in "" termcap ncurses; do
if test "x$need" != "x"
then
+ captive_save_LIBS="$LIBS"
AC_CHECK_LIB($need, main,,
[ need_failed="$need_failed $need"
continue ]
)
- lneed=-l$need
+ LIBS="$captive_save_LIBS"
+ lneed="-l$need"
else
lneed=""
fi
AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
AC_SUBST(GNOME_VFS_MODULE_LIBS)
+dnl Check for 2.5.9 for: http://bugzilla.gnome.org/show_bug.cgi?id=117702
+dnl Check the version - impossible to reliably check the missing feature.
+PKG_CHECK_MODULES(LIBXML,libxml-2.0 >= 2.5.9,[ have_libxml_buffering=true ],[
+ dnl Disable bug-replay(1) build if not met; --bug-pathname would be still OK.
+ PKG_CHECK_MODULES(LIBXML,libxml-2.0,[ have_libxml_buffering=false ])
+ ])
+AM_CONDITIONAL(HAVE_LIBXML_BUFFERING,$have_libxml_buffering)
+AC_SUBST(LIBXML_CFLAGS)
+AC_SUBST(LIBXML_LIBS)
+
+PKG_CHECK_MODULES(OPENSSL,openssl,,[
+ dnl At least Debian-3.0r1 has openssl but without its .pc module.
+ AC_CHECK_LIB(crypto,MD5,[
+ OPENSSL_CFLAGS=""
+ OPENSSL_LIBS="-lcrypto"
+ ],[AC_MSG_ERROR([Captive requires crypto library (of openssl).])])
+ ])
+AC_SUBST(OPENSSL_CFLAGS)
+AC_SUBST(OPENSSL_LIBS)
+
dnl for $(top_srcdir)/src/libcaptive/sandbox/split-sandbox.c
AM_PATH_LINC(,,[AC_MSG_ERROR([Captive requires linc library used by ORBit.])])
./src/libcaptive/sandbox/Makefile
./src/libcaptive/client/Makefile
./src/client/Makefile
+./src/client/bug-replay/Makefile
./src/client/cmdline/Makefile
-./src/client/libcaptive-gnomevfs/Makefile
+./src/client/gnomevfs/Makefile
+./src/client/lufs/Makefile
+./src/client/sandbox-server/Makefile
+./src/TraceFS/Makefile
./doc/Makefile
./doc/apiref/Makefile
-./src/client/libcaptive-gnomevfs/captive.conf
+./src/client/gnomevfs/captive.conf
])
dnl FIXME: Why is "po/POTFILES" being substituted?