+Implemented TraceFS W32 Cache Manager debug tracer
[captive.git] / configure.in
index 1c3080e..40d8a3f 100644 (file)
 
 
 AC_INIT(src/libcaptive/Makefile-libcaptive.am)
-AM_INIT_AUTOMAKE(captive,0.8)
+AM_INIT_AUTOMAKE(captive,0.9cvs)
 AM_CONFIG_HEADER(config.h)
 AM_MAINTAINER_MODE
 #AM_ACLOCAL_INCLUDE(macros)
 dnl Prevent "AC_TRY_COMPILE was called before AC_ISC_POSIX":
 AC_ISC_POSIX
+AC_SYS_LARGEFILE
 AC_PROG_CC
 AM_PROG_AS
 AM_ENABLE_STATIC
@@ -30,9 +31,14 @@ AM_DISABLE_SHARED
 AM_PROG_LIBTOOL
 
 dnl gettext localization.
-dnl FIXME: should we use AM_GLIB_GNU_GETTEXT of glib-gettext.m4 ?
+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"
-AM_GNU_GETTEXT
+GETTEXT_PACKAGE="$PACKAGE"
+AC_SUBST(GETTEXT_PACKAGE)
+AM_GLIB_GNU_GETTEXT
 
 GTK_DOC_CHECK
 dnl AM_CONDITIONAL needs to be here explicitely for doc/apiref/Makefile rebuild
@@ -48,6 +54,24 @@ if test "$USE_MAINTAINER_MODE" = "yes";then
 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)
 
@@ -55,21 +79,12 @@ dnl Separate 'acconfig.h' is no longer recommended by autoconf
 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>
@@ -93,6 +108,16 @@ AH_VERBATIM([ENABLE_NLS_HOOK],[
 #      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])
@@ -118,11 +143,13 @@ then
        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
@@ -165,6 +192,14 @@ PKG_CHECK_MODULES(GNOME_VFS_MODULE,gnome-vfs-module-2.0)
 AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
 AC_SUBST(GNOME_VFS_MODULE_LIBS)
 
+PKG_CHECK_MODULES(LIBXML,libxml-2.0)
+AC_SUBST(LIBXML_CFLAGS)
+AC_SUBST(LIBXML_LIBS)
+
+PKG_CHECK_MODULES(OPENSSL,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.])])
 
@@ -183,8 +218,6 @@ captive.spec
 Makefile
 ./macros/Makefile
 ./po/Makefile.in
-./intl/Makefile
-./m4/Makefile
 ./src/Makefile
 ./src/libcaptive/Makefile
 ./src/libcaptive/include/Makefile
@@ -234,8 +267,11 @@ Makefile
 ./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/sandbox-server/Makefile
+./src/TraceFS/Makefile
 ./doc/Makefile
 ./doc/apiref/Makefile
 ./src/client/libcaptive-gnomevfs/captive.conf
@@ -244,6 +280,6 @@ Makefile
 dnl FIXME: Why is "po/POTFILES" being substituted?
 make -C src distfiles DISTFILES_PRINT=1 \
                |sed -n 's/^:DISTFILES: *\(.*\)$/\1/p'|tr ' ' '\n'|grep . >po/POTFILES.in
-cat po/POTFILES.in >po/POTFILES
+make -C po Makefile
 
 echo done.