# $Id$
# Source file to generate "./configure" to prepare package for compilation
-# Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+# Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
AC_INIT(src/libcaptive/Makefile-libcaptive.am)
-AM_INIT_AUTOMAKE(captive,0.2cvs)
+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
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
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)
+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.])])
Makefile
./macros/Makefile
./po/Makefile.in
-./intl/Makefile
-./m4/Makefile
./src/Makefile
./src/libcaptive/Makefile
./src/libcaptive/include/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
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.