2 # Source file to generate "./configure" to prepare package for compilation
3 # Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 AC_INIT(src/libcaptive/Makefile-libcaptive.am)
20 AM_INIT_AUTOMAKE(captive,0.9cvs)
21 AM_CONFIG_HEADER(config.h)
23 #AM_ACLOCAL_INCLUDE(macros)
24 dnl Prevent "AC_TRY_COMPILE was called before AC_ISC_POSIX":
33 dnl gettext localization.
34 dnl Use simpler AM_GLIB_GNU_GETTEXT instead of AM_GNU_GETTEXT
35 dnl as we depend on glib and glib requires system installed gettext anyway.
36 dnl http://lists.gnome.org/archives/gtk-devel-list/2003-April/msg00066.html
37 dnl Special 'GETTEXT_PACKAGE' is required by glib gettext.
39 GETTEXT_PACKAGE="$PACKAGE"
40 AC_SUBST(GETTEXT_PACKAGE)
44 dnl AM_CONDITIONAL needs to be here explicitely for doc/apiref/Makefile rebuild
45 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
47 dnl Do not discard 'CFLAGS' settings as they may have been passed us by rpmbuild(8)
49 dnl Define MAINTAINER_MODE in config.h.
50 if test "$USE_MAINTAINER_MODE" = "yes";then
51 AC_DEFINE(MAINTAINER_MODE,,[Turn even some software behaviour according to MAINTAINER_MODE.])
52 CFLAGS="$CFLAGS -ggdb3 -Wall -Wstrict-prototypes -Wsign-compare" ## FIXME: fix all sources: -Wsign-compare
54 dnl Some Makefiles use additional tests etc.
55 AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"])
57 AC_ARG_WITH(sandbox-setuid,
58 [ --with-sandbox-setuid=user non-privileged user for captive-sandbox-server (def.=captive)],
59 [ CAPTIVE_SANDBOX_SETUID="$withval" ],[ CAPTIVE_SANDBOX_SETUID="captive" ])
60 AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_SETUID,"$CAPTIVE_SANDBOX_SETUID",
61 [non-privileged user for captive-sandbox-server])
63 AC_ARG_WITH(sandbox-setgid,
64 [ --with-sandbox-setgid=group non-privileged group for captive-sandbox-server (def.=captive)],
65 [ CAPTIVE_SANDBOX_SETGID="$withval" ],[ CAPTIVE_SANDBOX_SETGID="captive" ])
66 AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_SETGID,"$CAPTIVE_SANDBOX_SETGID",
67 [non-privileged group for captive-sandbox-server])
69 AC_ARG_WITH(sandbox-chroot,
70 [ --with-sandbox-chroot=dir root-owned directory for captive-sandbox-server (def.=/var/lib/captive)],
71 [ CAPTIVE_SANDBOX_CHROOT="$withval" ],[ CAPTIVE_SANDBOX_CHROOT="/var/lib/captive" ])
72 AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_CHROOT,"$CAPTIVE_SANDBOX_CHROOT",
73 [root-owned directory for captive-sandbox-server])
75 dnl Permit 'if IS_FALSE' for Makefile.am-s; symbol 'FALSE' forbidden by automake
76 AM_CONDITIONAL(IS_FALSE,false)
78 dnl Separate 'acconfig.h' is no longer recommended by autoconf
80 #ifndef _CAPTIVE_CONFIG_H
81 #define _CAPTIVE_CONFIG_H 1
84 /* Do not place any stuff to AH_TOP as some of its includes
85 * would discard the effect of _FILE_OFFSET_BITS by AC_SYS_LARGEFILE.
89 /* <libintl.h> is taken from "$(top_srcdir)/intl" if system doesn't provide intl */
92 # define _(String) dgettext (PACKAGE,String)
94 # define _(String) gettext (String)
95 #endif /* LIBCAPTIVE */
97 # define N_(String) gettext_noop (String)
99 # define N_(String) (String)
101 #else /* !ENABLE_NLS */
102 /* Stubs that do something close enough. */
103 # define textdomain(String) (String)
104 # define gettext(String) (String)
105 # define dgettext(Domain,Message) (Message)
106 # define dcgettext(Domain,Message,Type) (Message)
107 # define bindtextdomain(Domain,Directory) (Domain)
108 # define _(String) (String)
109 # define N_(String) (String)
110 #endif /* !ENABLE_NLS */
112 #include <glib/gtypes.h> /* for 'gchar' */
113 #define G_LOG_DOMAIN ((const gchar *)"Captive")
115 /* Supplemental definitions not possible in this file. */
117 #include "captive/config2.h"
120 #endif /* !_CAPTIVE_CONFIG_H */
123 AM_PATH_GLIB_2_0(,,[AC_MSG_ERROR([Captive requires glib-2.0 library.])],[gmodule gobject])
124 dnl Force glib for the whole package
125 CFLAGS="$CFLAGS $GLIB_CFLAGS"
126 LIBS="$LIBS $GLIB_LIBS"
129 AC_CHECK_LIB(popt,poptParseArgvString,[POPT_LIBS="-lpopt"],[AC_MSG_ERROR([Captive requires popt library.])])
132 AC_ARG_WITH(readline, [ --with-readline=[no/yes/auto] cmdline client w/line editing [default=auto]],,with_readline=auto)
133 AC_CHECK_HEADERS(readline/history.h)
134 dnl Check for libraries, if needed by configuration options.
135 if test "$with_readline" != "no"
137 if test -d "/usr/lib/termcap"
139 READLINE_LDFLAGS="$READLINE_LDFLAGS -L/usr/lib/termcap"
141 have_libreadline=false
143 for need in "" termcap ncurses; do
144 if test "x$need" != "x"
146 captive_save_LIBS="$LIBS"
147 AC_CHECK_LIB($need, main,,
148 [ need_failed="$need_failed $need"
151 LIBS="$captive_save_LIBS"
156 dnl Prevent AC_CHECK_LIB() here as it would _cache_ the value ignoring
157 dnl our ever-changing "additiona libraries" parameter
158 captive_save_LIBS="$LIBS"
159 LIBS="-lreadline $lneed $READLINE_LIBS"
160 AC_TRY_LINK(,[ main() ],
161 [ have_libreadline=true
162 READLINE_LIBS="$LIBS" ])
163 LIBS="$captive_save_LIBS"
171 AC_DEFINE(HAVE_LIBREADLINE,,[Use functions from libreadline?])
172 AC_CHECK_LIB(readline, add_history,
173 AC_DEFINE(HAVE_ADD_HISTORY,,[Use 'history' extension of libreadline?]),,
176 for need in $need_failed; do
177 AC_MSG_WARN(captive recommends $need library as your readline library
180 if test "$with_readline" = "yes"
182 AC_MSG_ERROR([captive did not find the requested readline library for its cmdline client line editing capability.])
184 AC_MSG_WARN([captive recommends readline library for its cmdline client line editing capability.])
188 AC_SUBST(READLINE_LIBS)
189 AC_SUBST(READLINE_LDFLAGS)
191 PKG_CHECK_MODULES(GNOME_VFS_MODULE,gnome-vfs-module-2.0)
192 AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
193 AC_SUBST(GNOME_VFS_MODULE_LIBS)
195 PKG_CHECK_MODULES(LIBXML,libxml-2.0)
196 AC_SUBST(LIBXML_CFLAGS)
197 AC_SUBST(LIBXML_LIBS)
199 PKG_CHECK_MODULES(OPENSSL,openssl)
200 AC_SUBST(OPENSSL_CFLAGS)
201 AC_SUBST(OPENSSL_LIBS)
203 dnl for $(top_srcdir)/src/libcaptive/sandbox/split-sandbox.c
204 AM_PATH_LINC(,,[AC_MSG_ERROR([Captive requires linc library used by ORBit.])])
206 dnl for $(top_srcdir)/src/libcaptive/client/
207 dnl Do not use '[client server]' as $4 to prevent: configure: test: too many arguments
208 dnl - currently this argument is not used by 'orbit2-config' in any way anyway
209 AM_PATH_ORBIT2(,,[AC_MSG_ERROR([Captive requires ORBit library.])])
215 dnl "Makefile" output files MUST have pathnames incl./excl. "./" prefix as specified!
222 ./src/libcaptive/Makefile
223 ./src/libcaptive/include/Makefile
224 ./src/libcaptive/include/captive/Makefile
225 ./src/libcaptive/include/reactos/Makefile
226 ./src/libcaptive/include/reactos/ddk/Makefile
227 ./src/libcaptive/include/reactos/ddk/i386/Makefile
228 ./src/libcaptive/include/reactos/internal/Makefile
229 ./src/libcaptive/include/reactos/internal/i386/Makefile
230 ./src/libcaptive/include/reactos/napi/Makefile
231 ./src/libcaptive/include/reactos/ntos/Makefile
232 ./src/libcaptive/reactos/Makefile
233 ./src/libcaptive/reactos/include/Makefile
234 ./src/libcaptive/reactos/hal/Makefile
235 ./src/libcaptive/reactos/hal/halx86/Makefile
236 ./src/libcaptive/reactos/ntoskrnl/Makefile
237 ./src/libcaptive/reactos/ntoskrnl/dbg/Makefile
238 ./src/libcaptive/reactos/ntoskrnl/ex/Makefile
239 ./src/libcaptive/reactos/ntoskrnl/fs/Makefile
240 ./src/libcaptive/reactos/ntoskrnl/io/Makefile
241 ./src/libcaptive/reactos/ntoskrnl/ke/Makefile
242 ./src/libcaptive/reactos/ntoskrnl/ldr/Makefile
243 ./src/libcaptive/reactos/ntoskrnl/mm/Makefile
244 ./src/libcaptive/reactos/ntoskrnl/nt/Makefile
245 ./src/libcaptive/reactos/ntoskrnl/ob/Makefile
246 ./src/libcaptive/reactos/ntoskrnl/ps/Makefile
247 ./src/libcaptive/reactos/ntoskrnl/rtl/Makefile
248 ./src/libcaptive/reactos/ntoskrnl/rtl/i386/Makefile
249 ./src/libcaptive/reactos/ntoskrnl/se/Makefile
250 ./src/libcaptive/halcaptive/Makefile
251 ./src/libcaptive/cc/Makefile
252 ./src/libcaptive/cm/Makefile
253 ./src/libcaptive/ex/Makefile
254 ./src/libcaptive/fs/Makefile
255 ./src/libcaptive/io/Makefile
256 ./src/libcaptive/kd/Makefile
257 ./src/libcaptive/ke/Makefile
258 ./src/libcaptive/ldr/Makefile
259 ./src/libcaptive/mm/Makefile
260 ./src/libcaptive/nt/Makefile
261 ./src/libcaptive/ob/Makefile
262 ./src/libcaptive/po/Makefile
263 ./src/libcaptive/ps/Makefile
264 ./src/libcaptive/rtl/Makefile
265 ./src/libcaptive/se/Makefile
266 ./src/libcaptive/storage/Makefile
267 ./src/libcaptive/sandbox/Makefile
268 ./src/libcaptive/client/Makefile
269 ./src/client/Makefile
270 ./src/client/bug-replay/Makefile
271 ./src/client/cmdline/Makefile
272 ./src/client/libcaptive-gnomevfs/Makefile
273 ./src/client/sandbox-server/Makefile
274 ./src/TraceFS/Makefile
276 ./doc/apiref/Makefile
277 ./src/client/libcaptive-gnomevfs/captive.conf
280 dnl FIXME: Why is "po/POTFILES" being substituted?
281 make -C src distfiles DISTFILES_PRINT=1 \
282 |sed -n 's/^:DISTFILES: *\(.*\)$/\1/p'|tr ' ' '\n'|grep . >po/POTFILES.in