Versioning updated: captive-1.0.3 -> captive-1.1
[captive.git] / configure.in
1 # $Id$
2 # Source file to generate "./configure" to prepare package for compilation
3 # Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
4
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
8
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.
13
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
17
18
19 AC_INIT(src/libcaptive/Makefile-libcaptive.am)
20 dnl 2.53 for AM_GLIB_GNU_GETTEXT:
21 AC_PREREQ(2.53)
22 dnl Not yet present in: Red Hat autoconf-2.57-3
23 dnl AC_CONFIG_MACRO_DIR(macros)
24 AM_INIT_AUTOMAKE(captive,1.0.3cvs)
25 AM_CONFIG_HEADER(config.h)
26 AM_MAINTAINER_MODE
27 dnl Call AC_PROG_CC before AC_ISC_POSIX.
28 AC_PROG_CC(gcc3 gcc-3.0 gcc cc)
29 AC_TRY_CPP([
30 #if __GNUC__ >= 3
31 #else
32 #error "GCC version 3.0+ required at least for ReactOS anonymous unions"
33 #endif
34 ],,[AC_MSG_ERROR([Captive requires GCC version 3.0+.])])
35 dnl Prevent "AC_TRY_COMPILE was called before AC_ISC_POSIX":
36 AC_ISC_POSIX
37 AC_SYS_LARGEFILE
38 AM_PROG_AS
39 AM_DISABLE_STATIC
40 AM_ENABLE_SHARED
41 AM_PROG_LIBTOOL
42
43 dnl Workaround for autoconf-2.57:
44 m4_pattern_allow([AC_MSG_WARN])
45 m4_pattern_allow([AC_CHECK_LIB])
46 m4_pattern_allow([AC_CHECK_HEADERS])
47
48 dnl gettext localization.
49 dnl Use simpler AM_GLIB_GNU_GETTEXT instead of AM_GNU_GETTEXT
50 dnl as we depend on glib and glib requires system installed gettext anyway.
51 dnl http://lists.gnome.org/archives/gtk-devel-list/2003-April/msg00066.html
52 dnl Special 'GETTEXT_PACKAGE' is required by glib gettext.
53 ALL_LINGUAS="cs"
54 GETTEXT_PACKAGE="$PACKAGE"
55 AC_SUBST(GETTEXT_PACKAGE)
56 AM_GLIB_GNU_GETTEXT
57
58 GTK_DOC_CHECK
59 dnl AM_CONDITIONAL needs to be here explicitely for doc/apiref/Makefile rebuild
60 AM_CONDITIONAL(ENABLE_GTK_DOC,[test x$enable_gtk_doc = xyes])
61 AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL,[test -n "$LIBTOOL"])
62
63 dnl Do not discard 'CFLAGS' settings as they may have been passed us by rpmbuild(8)
64
65 dnl Define MAINTAINER_MODE in config.h.
66 if test "$USE_MAINTAINER_MODE" = "yes";then
67         AC_DEFINE(MAINTAINER_MODE,,[Turn even some software behaviour according to MAINTAINER_MODE.])
68         CFLAGS="$CFLAGS -ggdb3 -Wall -Wstrict-prototypes -Wsign-compare"  ## FIXME: fix all sources: -Wsign-compare
69         fi
70 dnl Some Makefiles use additional tests etc.
71 AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"])
72
73
74 AC_ARG_ENABLE(man-pages,
75                 [  --enable-man-pages=no/yes/auto   pod2man(1) required for man pages (def.=yes)],,enable_man_pages=yes)
76 AC_ARG_ENABLE(sbin-mountdir,
77                 [  --enable-sbin-mountdir=DIR       mount(8) 'mount.captive' directory (def.=/sbin)],,
78                 [ enable_sbin_mountdir="/sbin" ])
79 AC_ARG_ENABLE(sbin-mount-fs,
80                 [  --enable-sbin-mount-fs=FS1:FS2   sbin-mount pre-installed symlinks (def.=ntfs:fastfat:cdfs:ext2fsd)],,
81                 [ enable_sbin_mount_fs="ntfs:fastfat:cdfs:ext2fsd" ])
82 AC_ARG_ENABLE(sandbox-setuid,
83                 [  --enable-sandbox-setuid=USER     non-privileged user  for captive-sandbox-server (def.=captive)],
84                 [ CAPTIVE_SANDBOX_SETUID="$enableval" ],[ CAPTIVE_SANDBOX_SETUID="captive" ])
85 AC_ARG_ENABLE(sandbox-setgid,
86                 [  --enable-sandbox-setgid=GROUP    non-privileged group for captive-sandbox-server (def.=captive)],
87                 [ CAPTIVE_SANDBOX_SETGID="$enableval" ],[ CAPTIVE_SANDBOX_SETGID="captive" ])
88 AC_ARG_ENABLE(sandbox-chroot,
89                 [  --enable-sandbox-chroot=DIR      root-owned directory for captive-sandbox-server (def.=/var/lib/captive)],
90                 [ CAPTIVE_SANDBOX_CHROOT="$enableval" ],[ CAPTIVE_SANDBOX_CHROOT="/var/lib/captive" ])
91 AC_ARG_ENABLE(bug-replay,
92                 [  --enable-bug-replay=no/yes/auto  compile debugging tool (def.=auto)],,enable_bug_replay=auto)
93 AC_ARG_ENABLE(lufs,
94                 [  --enable-lufs=no/yes/auto        compile LUFS filesystem module (def.=auto)],,enable_lufs=auto)
95 AC_ARG_ENABLE(install-pkg,
96                 [  --enable-install-pkg=no/yes/auto compile installation utils (def.=auto)],,enable_install_pkg=auto)
97
98
99 # AC_ARG_ENABLE(sbin-mountdir,[--enable-sbin-mountdir=DIR],,[enable_sbin_mountdir="/sbin"])
100 AM_CONDITIONAL(ENABLE_SBIN_MOUNT,[test "$enable_sbin_mount" != "no"])
101 AC_SUBST(enable_sbin_mountdir)
102
103 # AC_ARG_ENABLE(sbin-mount-fs,[--enable-sbin-mount-fs=FS1:FS2],,[enable_sbin_mount_fs="ntfs:fastfat:cdfs:ext2fsd"])
104 AC_SUBST(enable_sbin_mount_fs)
105
106 # AC_ARG_ENABLE(sandbox-setuid,[--enable-sandbox-setuid=USER],,[CAPTIVE_SANDBOX_SETUID="captive"])
107 AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_SETUID,"$CAPTIVE_SANDBOX_SETUID",
108                 [non-privileged user  for captive-sandbox-server])
109
110 # AC_ARG_ENABLE(sandbox-setgid,[--enable-sandbox-setgid=GROUP],,[CAPTIVE_SANDBOX_SETGID="captive"])
111 AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_SETGID,"$CAPTIVE_SANDBOX_SETGID",
112                 [non-privileged group for captive-sandbox-server])
113
114 # AC_ARG_ENABLE(sandbox-chroot,[--enable-sandbox-chroot=DIR],,[CAPTIVE_SANDBOX_CHROOT="/var/lib/captive"])
115 AC_DEFINE_UNQUOTED(CAPTIVE_SANDBOX_CHROOT,"$CAPTIVE_SANDBOX_CHROOT",
116                 [root-owned directory for captive-sandbox-server])
117 AC_SUBST(CAPTIVE_SANDBOX_CHROOT)
118
119 dnl Permit 'if NEVER' for Makefile.am-s; symbol 'FALSE' forbidden by automake
120 AM_CONDITIONAL(NEVER,false)
121
122 PERL=
123 AC_PATH_PROGS(PERL,perl5 perl)
124 if test '!' -f ./src/libcaptive/ke/exports.c -a -z "$PERL";then
125         AC_MSG_ERROR([perl(1) required as './src/libcaptive/ke/exports.c' is not found.])
126 fi
127 AM_CONDITIONAL(HAVE_PERL,test -n "$PERL")
128
129 POD2MAN=
130 AC_PATH_PROGS(POD2MAN,pod2man)
131 AM_CONDITIONAL(HAVE_POD2MAN,[ test -n "$POD2MAN" ])
132 if test x$enable_man_pages = xyes;then
133         if test -z "$POD2MAN";then
134                 AC_MSG_ERROR([captive requires pod2man(1) for man pages; try --disable-man-pages.])
135         fi
136         if test -z "$PERL";then
137                 AC_MSG_ERROR([captive requires perl(1) for man pages; try --disable-man-pages.])
138         fi
139 elif test x$enable_man_pages != xno;then
140         if test -z "$POD2MAN";then
141                 AC_MSG_WARN([captive requires pod2man(1) for man pages by --enable-man-pages; mans will not be installed.])
142         fi
143         if test -z "$PERL";then
144                 AC_MSG_WARN([captive requires perl(1) for man pages by --enable-man-pages; mans will not be installed.])
145         fi
146 fi
147 AM_CONDITIONAL(ENABLE_MAN_PAGES,[ test x$enable_man_pages != xno -a -n "$POD2MAN" -a -n "$PERL" ])
148
149 dnl Separate 'acconfig.h' is no longer recommended by autoconf
150 AH_TOP([
151 #ifndef _CAPTIVE_CONFIG_H
152 #define _CAPTIVE_CONFIG_H 1
153 ])
154 AH_BOTTOM([
155 /* Do not place any stuff to AH_TOP as some of its includes
156  * would discard the effect of _FILE_OFFSET_BITS by AC_SYS_LARGEFILE.
157  */
158
159 #ifdef ENABLE_NLS
160 /* <libintl.h> is taken from "$(top_srcdir)/intl" if system doesn't provide intl */
161 #       include <libintl.h>
162 #ifdef LIBCAPTIVE
163 #       define _(String) dgettext (PACKAGE,String)
164 #else
165 #       define _(String) gettext (String)
166 #endif /* LIBCAPTIVE */
167 #       ifdef gettext_noop
168 #               define N_(String) gettext_noop (String)
169 #       else
170 #               define N_(String) (String)
171 #       endif
172 #else /* !ENABLE_NLS */
173 /* Stubs that do something close enough.  */
174 #       define textdomain(String) (String)
175 #       define gettext(String) (String)
176 #       define dgettext(Domain,Message) (Message)
177 #       define dcgettext(Domain,Message,Type) (Message)
178 #       define bindtextdomain(Domain,Directory) (Domain)
179 #       define _(String) (String)
180 #       define N_(String) (String)
181 #endif /* !ENABLE_NLS */
182
183 #include <glib/gtypes.h>        /* for 'gchar' */
184 #define G_LOG_DOMAIN ((const gchar *)"Captive")
185
186 /* Ensure we have proper -I options: */
187 #if defined(CAPTIVE_USE_GNOME_VFS_MODULE) || defined(CAPTIVE_USE_GNOME_VFS)
188 #ifndef HAVE_GNOME_VFS_READ_ENTIRE_FILE
189 #include <libgnomevfs/gnome-vfs-result.h>
190 GnomeVFSResult gnome_vfs_read_entire_file(const char *uri,int *file_size,char **file_contents);
191 #endif
192 #endif
193
194 /* Supplemental definitions not possible in this file. */
195 #ifdef LIBCAPTIVE
196 #include "captive/config2.h"
197 #endif
198
199 #endif /* !_CAPTIVE_CONFIG_H */
200 ])
201
202 dnl Do not use PKG_CHECK_MODULES() as it would not set 'GLIB_GENMARSHAL' etc.
203 AM_PATH_GLIB_2_0(,,[AC_MSG_ERROR([Captive requires glib-2.0 library.])],[gmodule gobject gthread])
204 dnl Force glib for the whole package
205 CFLAGS="$CFLAGS $GLIB_CFLAGS"
206 LIBS="$LIBS $GLIB_LIBS"
207
208 dnl popt
209 AC_CHECK_LIB(popt,poptParseArgvString,[POPT_LIBS="-lpopt"],[AC_MSG_ERROR([Captive requires popt library.])])
210 AC_SUBST(POPT_LIBS)
211
212 AC_ARG_WITH(readline,[  --with-readline=[no/yes/auto]   clients with line editing (def.=auto)],,with_readline=auto)
213 AC_CHECK_HEADERS(readline/history.h)
214 dnl Check for libraries, if needed by configuration options.
215 if test "$with_readline" != "no"
216 then
217         if test -d "/usr/lib/termcap"
218         then
219                 READLINE_LDFLAGS="$READLINE_LDFLAGS -L/usr/lib/termcap"
220         fi
221         have_libreadline=false
222         need_failed=""
223         for need in "" termcap ncurses; do
224                 if test "x$need" != "x"
225                 then
226                         captive_save_LIBS="$LIBS"
227                         AC_CHECK_LIB($need,main,,
228                                 [ need_failed="$need_failed $need"
229                                 continue ]
230                                 )
231                         LIBS="$captive_save_LIBS"
232                         lneed="-l$need"
233                 else
234                         lneed=""
235                 fi
236                 dnl Prevent AC_CHECK_LIB() here as it would _cache_ the value ignoring
237                 dnl our ever-changing "additiona libraries" parameter
238                 captive_save_LIBS="$LIBS"
239                 LIBS="-lreadline $lneed $READLINE_LIBS"
240                 AC_TRY_LINK(,[ main() ],
241                         [ have_libreadline=true
242                         READLINE_LIBS="$LIBS" ])
243                 LIBS="$captive_save_LIBS"
244                 if $have_libreadline
245                 then
246                         break
247                 fi
248         done
249         if $have_libreadline
250         then
251                 AC_DEFINE(HAVE_LIBREADLINE,,[Use functions from libreadline?])
252                 AC_CHECK_LIB(readline,add_history,
253                         AC_DEFINE(HAVE_ADD_HISTORY,,[Use 'history' extension of libreadline?]),,
254                         $READLINE_LIBS)
255         else
256                 for need in $need_failed; do
257                         AC_MSG_WARN(captive recommends $need library as your readline library
258                         probably needs it.)
259                 done
260                 if test "$with_readline" = "yes"
261                 then
262                         AC_MSG_ERROR([captive did not find the requested readline library for its client line editing capability.])
263                 else
264                         AC_MSG_WARN([captive recommends readline library for its client line editing capability.])
265                 fi
266         fi
267 fi
268 AC_SUBST(READLINE_LIBS)
269 AC_SUBST(READLINE_LDFLAGS)
270
271 PKG_CHECK_MODULES(GNOME_VFS_MODULE,gnome-vfs-module-2.0)
272 GNOME_VFS_MODULE_CFLAGS="$GNOME_VFS_MODULE_CFLAGS -DCAPTIVE_USE_GNOME_VFS_MODULE=1"
273 AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
274 AC_SUBST(GNOME_VFS_MODULE_LIBS)
275 PKG_CHECK_MODULES(GNOME_VFS,gnome-vfs-2.0)
276 GNOME_VFS_CFLAGS="$GNOME_VFS_CFLAGS -DCAPTIVE_USE_GNOME_VFS=1"
277 AC_SUBST(GNOME_VFS_CFLAGS)
278 AC_SUBST(GNOME_VFS_LIBS)
279
280 # AC_ARG_ENABLE(bug-replay,[--enable-bug-replay=[no/yes/auto]],,enable_bug_replay=auto)
281 dnl Check for 2.5.9 for: http://bugzilla.gnome.org/show_bug.cgi?id=117702
282 dnl Check the version - impossible to reliably check the missing feature.
283 PKG_CHECK_MODULES(LIBXML,libxml-2.0 >= 2.5.9,[ have_libxml_buffering=true ],[
284         dnl Disable bug-replay(1) build if not met; --bug-pathname would be still OK.
285         PKG_CHECK_MODULES(LIBXML,libxml-2.0,[ have_libxml_buffering=false ])
286         ])
287 dnl We also condition 'HAVE_LIBXML_XMLREADER_H' by 'HAVE_LIBXML_BUFFERING'
288 dnl as we have no use for xmlreader without working libxml buffering of 2.5.9.
289 AM_CONDITIONAL(ENABLE_BUG_REPLAY,[$have_libxml_buffering && test x$enable_bug_replay != xno])
290 if $have_libxml_buffering;then
291         AC_DEFINE(HAVE_LIBXML_BUFFERING,,[libxml2 correctly reads textnodes by its xmlTextReader.])
292 else
293         if test x$enable_bug_replay = xyes;then
294                 AC_MSG_ERROR([captive require libxml2 at least 2.5.9 for --enable-bug-replay feature.])
295         elif test x$enable_bug_replay != xno;then
296                 AC_MSG_WARN([libxml2 at least 2.5.9 required --enable-bug-replay feature; disabled now.])
297         fi
298 fi
299 AC_SUBST(LIBXML_CFLAGS)
300 AC_SUBST(LIBXML_LIBS)
301
302 PKG_CHECK_MODULES(OPENSSL,openssl,,[
303         dnl At least Debian-3.0r1 has openssl but without its .pc module.
304         AC_CHECK_LIB(crypto,MD5,[
305                 OPENSSL_CFLAGS=""
306                 OPENSSL_LIBS="-lcrypto"
307                 ],[AC_MSG_ERROR([Captive requires crypto library (of openssl).])])
308         ])
309 AC_SUBST(OPENSSL_CFLAGS)
310 AC_SUBST(OPENSSL_LIBS)
311
312 # AC_ARG_ENABLE(lufs,[--enable-lufs=[no/yes/auto]],,enable_lufs=auto)
313 have_lufs_includes=false
314 # Although it would be more appropriate to use lufsmount(1) instead of lufsd(1)
315 # we use lufsd(1) as lufsmount(1) is just a dumb wrapper and it would cost us
316 # another big binary file for the static build package version.
317 PATH_LUFSD=""
318 if test x$enable_lufs != no;then
319         have_lufs_includes=true
320         dnl If ACTION-IF-NOT-FOUND is given, it is executed when one of the header
321         dnl files is not found.
322         AC_CHECK_HEADERS(lufs/fs.h lufs/proto.h,,[ have_lufs_includes=false ])
323         if test x$have_lufs_includes = xfalse;then
324                 if test x$enable_lufs = xyes;then
325                         AC_MSG_ERROR([LUFS client was requested (--enable-lufs) but no LUFS include files were found. Install 'lufs-*-*captive*' package.])
326                 else
327                         AC_MSG_WARN([LUFS client not being compiled as no LUFS include files were found. Install 'lufs-*-*captive*' package.])
328                 fi
329         fi
330         AC_CHECK_TYPES([struct lufs_sbattr],,[
331                 dnl FIXME: Include 'lufs' version when 'lufs_sbattr' gets integrated:
332                 if $have_lufs_includes && test x$enable_lufs = xyes;then
333                         AC_MSG_ERROR([Although LUFS include files were found they are too old. You may also use --enable-lufs=auto.])
334                 else
335                         AC_MSG_WARN([Although LUFS include files were found they are too old. df(1) will not show available NTFS disk space.])
336                 fi
337                 ],[#include <lufs/proto.h>])
338         AC_PATH_PROGS(PATH_LUFSD,lufsd)
339         if test x$PATH_LUFSD = x;then
340                 if test x$enable_lufs = xyes;then
341                         AC_MSG_ERROR([LUFS client was requested (--enable-lufs) but no lufsd(1) binary was found. Install 'lufs-*-*captive*' package.])
342                 else
343                         AC_MSG_WARN([LUFS client not being compiled as no lufsd(1) binary was found. Install 'lufs-*-*captive*' package.])
344                 fi
345         fi
346 fi
347 AM_CONDITIONAL(ENABLE_LUFS,[ $have_lufs_includes && test x$PATH_LUFSD != x -a x$enable_lufs != no ])
348 AC_SUBST(PATH_LUFSD)
349
350 dnl for $(top_srcdir)/src/libcaptive/client/
351 dnl Do not use '[client server]' as $4 to prevent: configure: test: too many arguments
352 dnl  - currently this argument is not used by 'orbit2-config' in any way anyway
353 dnl Do not use PKG_CHECK_MODULES() as it would not set 'ORBIT_IDL' etc.
354 AM_PATH_ORBIT2(,,[AC_MSG_ERROR([Captive requires ORBit2 library.])])
355
356 AC_ARG_WITH(orbit-line,[  --with-orbit-line=[link/linc/auto]    Use 'link' for ORBit2 >=2.7.x+ (def.=auto)],,with_orbit_line=auto)
357 captive_save_CFLAGS="$CFLAGS"
358 captive_save_LIBS="$LIBS"
359 CFLAGS="$CFLAGS $ORBIT_CFLAGS"
360 LIBS="$LIBS $ORBIT_LIBS"
361 AC_CHECK_FUNC(link_get_tmpdir,[
362                 AC_DEFINE(HAVE_ORBIT_LINK,,[ORBit2 is 2.7.x+ and therefore includes its own 'link' library])
363                 found_orbit_line=link
364                 ],
365         found_orbit_line=linc
366         )
367 CFLAGS="$captive_save_CFLAGS"
368 LIBS="$captive_save_LIBS"
369 if test "x$with_orbit_line" != "xauto" -a "x$with_orbit_line" != "x$found_orbit_line";then
370         AC_MSG_ERROR([--with-orbit-line=$with_orbit_line specified but the detected line is $found_orbit_line])
371 fi
372
373 if test "x$found_orbit_line" = "xlinc";then
374         PKG_CHECK_MODULES(LINC,linc)
375 fi
376
377 # AC_ARG_ENABLE(install-pkg,[--enable-install-pkg=[no/yes/auto]],,enable_install_pkg=auto)
378 GLADE_W_INIT([
379         ./src/install/acquire/ui-gnome-interface.c
380         ./src/install/acquire/ui-gnome-interface.h
381         ./src/install/acquire/ui-gnome-callbacks.h
382         ./src/install/acquire/ui-gnome-support.c
383         ./src/install/acquire/ui-gnome-support.h
384         ],[$enable_install_pkg],[
385                 AC_CHECK_LIB(ntfs,ntfs_mount,[
386                         LIBNTFS_LIBS="-lntfs"
387
388                         have_libntfs_includes=true
389                         AC_CHECK_HEADERS
390                         # '#include "config.h"' may be required by <ntfs/*> include files.
391                         # "config.h" may be already present while not yet being compilable.
392                         rm -f config.h-ntfs_save
393                         mv -f config.h config.h-ntfs_save 2>/dev/null
394                         touch config.h
395                         captive_save_CPPFLAGS="$CPPFLAGS"
396                         CPPFLAGS="$CPPFLAGS -I."        # for "config.h" touched above
397                         AC_CHECK_HEADERS(ntfs/types.h ntfs/volume.h,,[ have_libntfs_includes=false ])
398                         CPPFLAGS="$captive_save_CPPFLAGS"
399                         rm -f config.h
400                         mv -f config.h-ntfs_save config.h 2>/dev/null
401                         if $have_libntfs_includes;then
402
403                                 captive_save_CPPFLAGS="$CPPFLAGS"
404                                 CPPFLAGS="$CPPFLAGS $LIBXML_CFLAGS"
405                                 AC_CHECK_HEADERS(libxml/xmlreader.h,
406                                         [ glade_addon=yes ],
407                                         [ AC_MSG_WARN([Captive requires libxml >= 2.4.29 for --enable-install-pkg.]) ])
408                                 CPPFLAGS="$captive_save_CPPFLAGS"
409
410                         else
411                                 AC_MSG_WARN([Captive requires ntfs/* include files (of ntfsprogs-devel) for --enable-install-pkg.])
412                         fi
413                         ],[ AC_MSG_WARN([Captive requires libntfs (of ntfsprogs-devel) for --enable-install-pkg.]) ])
414                 ])
415 AC_SUBST(GNOMEUI_CFLAGS)
416 AC_SUBST(GNOMEUI_LIBS)
417 AC_SUBST(LIBNTFS_LIBS)
418 dnl Do not: AM_CONDITIONAL(HAVE_LIBNTFS,[ test -n "$LIBNTFS_LIBS" ])
419 dnl as we do not need it as we are conditioned by ENABLE_INSTALL_PKG
420 AM_CONDITIONAL(HAVE_GLADE_WRITESOURCE,[ test "x$PATH_GLADE" != "x" ])
421 dnl Do not: AM_CONDITIONAL(BUILD_GLADESRC,[ test "xyes" = "x$BUILD_GLADESRC" ])
422 dnl as we do not need it as we are conditioned by ENABLE_INSTALL_PKG
423 GNOME_ADDON_LIBS=""
424 if test "x$BUILD_GLADESRC_TRUE" = "x"
425 then
426         AC_CHECK_LIB(Xi,XOpenDevice,GNOME_ADDON_LIBS="$GNOME_ADDON_LIBS -lXi")
427 fi
428 AC_SUBST(GNOME_ADDON_LIBS)
429 dnl $BUILD_GLADESRC is already conditioned by $enable_install_pkg by GLADE_W_INIT()
430 AM_CONDITIONAL(ENABLE_INSTALL_PKG,[ test "xyes" = "x$BUILD_GLADESRC" ])
431
432 dnl Do not use AC_REPLACE_FUNCS() as we need to link it selectively:
433 GNOME_VFS_READ_ENTIRE_FILE_O=""
434 captive_save_CFLAGS="$CFLAGS"
435 captive_save_LIBS="$LIBS"
436 CFLAGS="$CFLAGS $GNOME_VFS_MODULE_CFLAGS"
437 LIBS="$LIBS $GNOME_VFS_MODULE_LIBS"
438 AC_CHECK_FUNCS(gnome_vfs_read_entire_file,,
439         [ GNOME_VFS_READ_ENTIRE_FILE_O='gnome_vfs_read_entire_file.$(OBJEXT)' ])
440 CFLAGS="$captive_save_CFLAGS"
441 LIBS="$captive_save_LIBS"
442 AC_SUBST(GNOME_VFS_READ_ENTIRE_FILE_O)
443
444 AC_SUBST(CFLAGS)
445 AC_SUBST(LIBS)
446
447 dnl "Makefile" output files MUST have pathnames incl./excl. "./" prefix as specified!
448 dnl FIXME: Why the rule above was written here?
449 AC_OUTPUT([
450 captive.spec
451 ./src/libcaptive/captive.pod.pl
452 ./src/libcaptive/client/options.pod.pl
453 ./src/client/cmdline/captive-cmdline.pod.pl
454 ./src/client/lufs/lufs-captivefs.pod.pl
455 ./src/client/lufs/mount.captive.pod.pl
456 ./src/client/lufs/mount.captive
457 ./src/client/sandbox-server/captive-sandbox-server.pod.pl
458 ./src/install/fstab/captive-install-fstab.pod.pl
459 ./src/install/acquire/captive-install-acquire.pod.pl
460 ./src/client/gnomevfs/captive.conf
461 ./po/Makefile.in
462 ./macros/glade-w.sh
463 ./debian/changelog
464 Makefile
465 ./macros/Makefile
466 ./src/Makefile
467 ./src/libcaptive/Makefile
468 ./src/libcaptive/include/Makefile
469 ./src/libcaptive/include/captive/Makefile
470 ./src/libcaptive/include/reactos/Makefile
471 ./src/libcaptive/include/reactos/ddk/Makefile
472 ./src/libcaptive/include/reactos/ddk/i386/Makefile
473 ./src/libcaptive/include/reactos/internal/Makefile
474 ./src/libcaptive/include/reactos/internal/i386/Makefile
475 ./src/libcaptive/include/reactos/napi/Makefile
476 ./src/libcaptive/include/reactos/ntos/Makefile
477 ./src/libcaptive/reactos/Makefile
478 ./src/libcaptive/reactos/include/Makefile
479 ./src/libcaptive/reactos/hal/Makefile
480 ./src/libcaptive/reactos/hal/halx86/Makefile
481 ./src/libcaptive/reactos/ntoskrnl/Makefile
482 ./src/libcaptive/reactos/ntoskrnl/dbg/Makefile
483 ./src/libcaptive/reactos/ntoskrnl/ex/Makefile
484 ./src/libcaptive/reactos/ntoskrnl/fs/Makefile
485 ./src/libcaptive/reactos/ntoskrnl/io/Makefile
486 ./src/libcaptive/reactos/ntoskrnl/ke/Makefile
487 ./src/libcaptive/reactos/ntoskrnl/ldr/Makefile
488 ./src/libcaptive/reactos/ntoskrnl/mm/Makefile
489 ./src/libcaptive/reactos/ntoskrnl/nt/Makefile
490 ./src/libcaptive/reactos/ntoskrnl/ob/Makefile
491 ./src/libcaptive/reactos/ntoskrnl/ps/Makefile
492 ./src/libcaptive/reactos/ntoskrnl/rtl/Makefile
493 ./src/libcaptive/reactos/ntoskrnl/rtl/i386/Makefile
494 ./src/libcaptive/reactos/ntoskrnl/se/Makefile
495 ./src/libcaptive/halcaptive/Makefile
496 ./src/libcaptive/cc/Makefile
497 ./src/libcaptive/cm/Makefile
498 ./src/libcaptive/ex/Makefile
499 ./src/libcaptive/fs/Makefile
500 ./src/libcaptive/io/Makefile
501 ./src/libcaptive/kd/Makefile
502 ./src/libcaptive/ke/Makefile
503 ./src/libcaptive/ldr/Makefile
504 ./src/libcaptive/mm/Makefile
505 ./src/libcaptive/nt/Makefile
506 ./src/libcaptive/ob/Makefile
507 ./src/libcaptive/po/Makefile
508 ./src/libcaptive/ps/Makefile
509 ./src/libcaptive/rtl/Makefile
510 ./src/libcaptive/se/Makefile
511 ./src/libcaptive/storage/Makefile
512 ./src/libcaptive/sandbox/Makefile
513 ./src/libcaptive/client/Makefile
514 ./src/client/Makefile
515 ./src/client/bug-replay/Makefile
516 ./src/client/cmdline/Makefile
517 ./src/client/gnomevfs/Makefile
518 ./src/client/lufs/Makefile
519 ./src/client/sandbox-server/Makefile
520 ./src/install/Makefile
521 ./src/install/libcaptive-install/Makefile
522 ./src/install/fstab/Makefile
523 ./src/install/acquire/Makefile
524 ./src/TraceFS/Makefile
525 ./src/w32-mod/Makefile
526 ./doc/Makefile
527 ./doc/apiref/Makefile
528 ])
529
530 dnl FIXME: Why is "po/POTFILES" being substituted?
531 make -C src distfiles DISTFILES_PRINT=1 \
532                 |sed -n 's/^:DISTFILES: *\(.*\)$/\1/p'|tr ' ' '\n'|grep . >po/POTFILES.in
533 make -C po Makefile
534
535 echo done.