38
38
dnl For more detailed information, see the libtool info documentation.
40
pushdef([SBUILD_NAME], [schroot])
41
pushdef([SBUILD_MAJOR_VERSION], [1])
42
pushdef([SBUILD_MINOR_VERSION], [2])
43
pushdef([SBUILD_MICRO_VERSION], [3])
44
pushdef([SBUILD_EXTRA_VERSION], [])
40
dnl m4 magic from Eric Blake <ebb9@byu.net>, prior to automake inclusion
41
m4_define([sbuild_m4_chomp],
42
[m4_format([[%.*s]], m4_bregexp(m4_translit([$1], [
43
]]m4_dquote(_m4_defn([m4_cr_all]))[, [/]]m4_format([%255s], [])[),
45
m4_define([sbuild_m4_esyscmd_s],
46
[sbuild_m4_chomp(m4_esyscmd([$1]))])
48
dnl Quoting the first argument results in a bizarrely corrupted package tarname
49
AC_INIT(sbuild_m4_esyscmd_s([sed -ne '/^Package:/{s/Package:[[:space:]][[:space:]]*//p;q}' VERSION]),
50
[sbuild_m4_esyscmd_s([sed -ne '/^Version:/{s/Version:[[:space:]][[:space:]]*//p;q}' VERSION])],
51
[buildd-tools-devel@lists.alioth.debian.org])
45
52
pushdef([SBUILD_CURRENT_INTERFACE], [1])
46
53
pushdef([SBUILD_INTERFACE_AGE], [0])
47
54
pushdef([SBUILD_BINARY_AGE], [0])
48
pushdef([SBUILD_VERSION], SBUILD_MAJOR_VERSION.SBUILD_MINOR_VERSION.SBUILD_MICRO_VERSION[]SBUILD_EXTRA_VERSION)
50
dnl The minimum version of autoconf required.
52
dnl Initialise autoconf with the package name, version and
53
dnl bug-reporting address.
54
AC_INIT(SBUILD_NAME, SBUILD_VERSION, [buildd-tools-devel@lists.alioth.debian.org])
55
55
dnl For safety, check we are in the right directory by
56
56
dnl checking for a known unique file.
57
57
AC_CONFIG_SRCDIR([sbuild/sbuild-session.cc])
58
58
dnl Place auxilliary scripts here.
59
59
AC_CONFIG_AUX_DIR([scripts])
60
dnl Put macro definitions here.
60
dnl Add config headers.
61
61
AC_CONFIG_HEADER([config.h])
62
62
AC_CONFIG_HEADER([sbuild/sbuild-config.h])
66
Copyright © 2004-2008 Roger Leigh <rleigh@debian.org>
66
Copyright © 2004-2009 Roger Leigh <rleigh@debian.org>
68
68
Parts of this configure script come from the 'configure.ac' file, and
69
69
are not based on freely-redistributable m4 macros; you can
80
80
along with this program. If not, see <http://www.gnu.org/licenses/>.
83
[SBUILD_MAJOR_VERSION]=SBUILD_MAJOR_VERSION
84
[SBUILD_MINOR_VERSION]=SBUILD_MINOR_VERSION
85
[SBUILD_MICRO_VERSION]=SBUILD_MICRO_VERSION
86
[SBUILD_EXTRA_VERSION]=SBUILD_EXTRA_VERSION
87
83
[SBUILD_CURRENT_INTERFACE]=SBUILD_CURRENT_INTERFACE
88
84
[SBUILD_INTERFACE_AGE]=SBUILD_INTERFACE_AGE
89
85
[SBUILD_BINARY_AGE]=SBUILD_BINARY_AGE
90
[SBUILD_VERSION]=SBUILD_VERSION
91
popdef([SBUILD_MAJOR_VERSION])
92
popdef([SBUILD_MINOR_VERSION])
93
popdef([SBUILD_MICRO_VERSION])
94
popdef([SBUILD_EXTRA_VERSION])
95
86
popdef([SBUILD_CURRENT_INTERFACE])
96
87
popdef([SBUILD_INTERFACE_AGE])
97
88
popdef([SBUILD_BINARY_AGE])
99
popdef([SBUILD_VERSION])
101
AC_SUBST([SBUILD_MAJOR_VERSION])
102
AC_SUBST([SBUILD_MINOR_VERSION])
103
AC_SUBST([SBUILD_MICRO_VERSION])
104
90
AC_SUBST([SBUILD_CURRENT_INTERFACE])
105
91
AC_SUBST([SBUILD_INTERFACE_AGE])
106
92
AC_SUBST([SBUILD_BINARY_AGE])
107
AC_SUBST([SBUILD_VERSION])
109
94
dnl Initialise automake stuff.
110
AM_INIT_AUTOMAKE([1.9 gnu check-news dist-bzip2 no-dist-gzip tar-pax])
95
AM_INIT_AUTOMAKE([1.10 gnu check-news dist-bzip2 no-dist-gzip tar-pax silent-rules])
111
96
AM_MAINTAINER_MODE
97
RELEASE_DATE='sbuild_m4_esyscmd_s(date --date='sbuild_m4_esyscmd_s([sed -ne '/^Release-Date:/{s/Release-Date:[[:space:]][[:space:]]*//p;q}' VERSION])' '+%s')'
98
RELEASE_DATE_S='sbuild_m4_esyscmd_s([sed -ne '/^Release-Date:/{s/Release-Date:[[:space:]][[:space:]]*//p;q}' VERSION])'
99
AC_DEFINE_UNQUOTED([RELEASE_DATE_S], ["$RELEASE_DATE_S"], [Package release date (string).])
100
AC_DEFINE_UNQUOTED([RELEASE_DATE], [$RELEASE_DATE], [Package release date (integer).])
101
AC_SUBST([RELEASE_DATE])
102
AC_SUBST([RELEASE_DATE_S])
114
104
AC_MSG_CHECKING([whether to enable dchroot compatibility])
115
105
AC_ARG_ENABLE([dchroot], [AS_HELP_STRING([--enable-dchroot], [Enable dchroot compatibility])],
116
106
[ case "${enableval}" in
117
107
yes) enable_dchroot_compat="yes" ;;
118
108
no) enable_dchroot_compat="no" ;;
119
unset) enable_dchroot_compat="no" ;;
120
109
*) AC_MSG_RESULT([unknown])
121
110
AC_MSG_ERROR([bad value ${enableval} for --enable-dchroot]) ;;
123
if test "$enable_dchroot_compat" = ""; then
124
enable_dchroot_compat="no"
112
[ enable_dchroot_compat="no" ])
126
113
AC_MSG_RESULT([$enable_dchroot_compat])
127
114
AM_CONDITIONAL([BUILD_DCHROOT], [test "$enable_dchroot_compat" = "yes"])
162
144
[ case "${enableval}" in
163
145
yes) enable_debug="yes" ;;
164
146
no) enable_debug="no" ;;
165
unset) enable_debug="no" ;;
166
147
*) AC_MSG_RESULT([unknown])
167
148
AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
169
if test "$enable_debug" = ""; then
150
[ enable_debug="no" ])
172
151
AC_MSG_RESULT([$enable_debug])
173
152
if test "$enable_debug" = "yes"; then
174
153
AC_DEFINE_UNQUOTED([SBUILD_DEBUG], [1], [Enable debugging])
156
default_environment_filter='^(BASH_ENV|CDPATH|ENV|HOSTALIASES|IFS|KRB5_CONFIG|KRBCONFDIR|KRBTKFILE|KRB_CONF|LD_.*|LOCALDOMAIN|NLSPATH|PATH_LOCALE|RES_OPTIONS|TERMINFO|TERMINFO_DIRS|TERMPATH)$'
158
AC_MSG_CHECKING([whether to enable environment filtering regex])
159
AC_ARG_ENABLE([environment-filter], [AS_HELP_STRING([--enable-environment-filter], [Enable default environment filtering (regex)])],
160
[ case "${enableval}" in
161
yes) enable_environment_filter="$default_environment_filter" ;;
162
no) enable_environment_filter="" ;;
163
*) enable_environment_filter="${enableval}" ;;
165
[ enable_environment_filter="$default_environment_filter" ])
166
AC_MSG_RESULT([$enable_environment_filter])
167
AH_TEMPLATE(SBUILD_DEFAULT_ENVIRONMENT_FILTER, [Default regular expression used to filter user environment])
168
AC_DEFINE_UNQUOTED([SBUILD_DEFAULT_ENVIRONMENT_FILTER], ["$enable_environment_filter"])
170
AC_MSG_CHECKING([whether to enable support for PAM authentication])
171
AC_ARG_ENABLE([pam], [AS_HELP_STRING([--enable-pam], [Enable support for PAM authentication (requires libpam)])],
172
[ case "${enableval}" in
173
yes) enable_pam="yes" ;;
174
no) enable_pam="no" ;;
175
*) AC_MSG_RESULT([unknown])
176
AC_MSG_ERROR([bad value ${enableval} for --enable-pam]) ;;
179
AC_MSG_RESULT([$enable_pam])
181
AC_MSG_CHECKING([whether to enable support for block devices])
182
AC_ARG_ENABLE([block-device], [AS_HELP_STRING([--enable-block-device], [Enable support for block devices (requires liblockdev)])],
183
[ case "${enableval}" in
184
yes) enable_blockdev="yes" ;;
185
no) enable_blockdev="no" ;;
186
*) AC_MSG_RESULT([unknown])
187
AC_MSG_ERROR([bad value ${enableval} for --enable-blockdev]) ;;
189
[enable_blockdev="auto"])
190
AC_MSG_RESULT([$enable_blockdev])
192
AC_MSG_CHECKING([whether to enable support for LVM snapshots])
193
AC_ARG_ENABLE([lvm-snapshot], [AS_HELP_STRING([--enable-lvm-snapshot], [Enable support for LVM snapshots (requires LVM and liblockdev)])],
194
[ case "${enableval}" in
195
yes) enable_lvmsnapshot="yes"
196
enable_blockdev="yes" ;;
197
no) enable_lvmsnapshot="no" ;;
198
*) AC_MSG_RESULT([unknown])
199
AC_MSG_ERROR([bad value ${enableval} for --enable-lvm-snapshot]) ;;
201
[enable_lvmsnapshot="auto"])
202
AC_MSG_RESULT([$enable_lvmsnapshot])
204
AC_MSG_CHECKING([whether to enable support for loopback mounts])
205
AC_ARG_ENABLE([loopback], [AS_HELP_STRING([--enable-loopback], [Enable support for loopback mounts])],
206
[ case "${enableval}" in
207
yes) enable_loopback="yes" ;;
208
no) enable_loopback="no" ;;
209
*) AC_MSG_RESULT([unknown])
210
AC_MSG_ERROR([bad value ${enableval} for --enable-loopback]) ;;
212
[enable_loopback="auto"])
213
AC_MSG_RESULT([$enable_loopback])
215
AC_MSG_CHECKING([whether to enable support for UUIDs in session names])
216
AC_ARG_ENABLE([uuid], [AS_HELP_STRING([--enable-uuid], [Enable support for UUIDs])],
217
[ case "${enableval}" in
218
yes) enable_uuid="yes" ;;
219
no) enable_uuid="no" ;;
220
*) AC_MSG_RESULT([unknown])
221
AC_MSG_ERROR([bad value ${enableval} for --enable-uuid]) ;;
223
[enable_uuid="auto"])
224
AC_MSG_RESULT([$enable_uuid])
226
AC_MSG_CHECKING([whether to enable support for union mounts])
227
AC_ARG_ENABLE([union], [AS_HELP_STRING([--enable-union], [Enable support for union mounts])],
228
[ case "${enableval}" in
229
yes) enable_union="yes" ;;
230
no) enable_union="no" ;;
231
*) AC_MSG_RESULT([unknown])
232
AC_MSG_ERROR([bad value ${enableval} for --enable-union]) ;;
234
[enable_union="auto"])
235
AC_MSG_RESULT([$enable_union])
237
AC_MSG_CHECKING([whether to enable doxygen documentation])
238
AC_ARG_ENABLE([doxygen], [AS_HELP_STRING([--enable-doxygen], [Enable doxygen documentation])],
239
[ case "${enableval}" in
240
yes) enable_doxygen="yes" ;;
241
no) enable_doxygen="no" ;;
242
*) AC_MSG_RESULT([unknown])
243
AC_MSG_ERROR([bad value ${enableval} for --enable-doxygen]) ;;
245
[ enable_doxygen="no" ])
246
AC_MSG_RESULT([$enable_doxygen])
247
AM_CONDITIONAL([BUILD_DOXYGEN], [test "$enable_doxygen" = "yes"])
249
AC_MSG_CHECKING([for bash completion directory])
250
bashcompletiondir='${sysconfdir}/bash_completion.d'
251
AC_ARG_WITH([bash-completion-dir], [AS_HELP_STRING([--with-bash-completion-dir], [bash shell completion directory])],
252
[bashcompletiondir="${withval}"])
253
AC_MSG_RESULT([$bashcompletiondir])
254
AC_SUBST([bashcompletiondir])
177
256
# Checks for programs.
180
259
ACX_PTHREAD([], [AC_MSG_ERROR([POSIX thread support is required for correct std::tr1::shared_ptr operation])])
184
263
AM_GNU_GETTEXT_VERSION([0.16])
185
264
AM_GNU_GETTEXT([external])
186
265
AC_PATH_PROG([FIND], [find])
187
266
AC_PATH_PROG([XARGS], [xargs])
188
267
AC_PATH_PROG([DOXYGEN], [doxygen])
189
AM_CONDITIONAL([USE_DOXYGEN], [test -n "$DOXYGEN"])
269
AC_PATH_PROG([LVCREATE], [lvcreate], [HAVE_LVM="no"], [$PATH:/sbin:/usr/sbin])
270
AC_PATH_PROG([LVREMOVE], [lvremove], [HAVE_LVM="no"], [$PATH:/sbin:/usr/sbin])
272
AC_PATH_PROG([LOSETUP], [losetup], [HAVE_LOOPBACK="no"], [$PATH:/sbin:/usr/sbin])
274
if test "$enable_doxygen" = "yes" && test -z "$DOXYGEN"; then
275
AC_MSG_FAILURE([doxygen is not installed, but is required by schroot])
277
AM_CONDITIONAL([BUILD_DOXYGEN], [test -n "$DOXYGEN" && test "$enable_doxygen" = "yes"])
191
279
# Checks for libraries.
192
AH_TEMPLATE(HAVE_UUID, [Is libuuid available])
193
280
PKG_CHECK_MODULES([UUID], [uuid],
194
281
[AC_DEFINE(HAVE_UUID)
198
AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=true])
285
AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes])
199
286
AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"])
201
288
SCHROOT_CFLAGS="$UUID_CFLAGS"
227
314
AC_CHECK_HEADERS([ext/stdio_filebuf.h],, [AC_MSG_ERROR([__gnu_cxx::stdio_filebuf (GNU libstdc++) is not installed, but is required by schroot])])
316
AC_CHECK_HEADERS([sys/personality.h],
317
[PERSONALITY_HEADER="yes"],
318
[PERSONALITY_HEADER="no"])
320
AC_CHECK_HEADERS([security/pam_appl.h],
229
324
# Checks for typedefs, structures, and compiler characteristics.
231
326
# Checks for library functions.
232
327
AC_CHECK_LIB([pam], [pam_authenticate],
234
[AC_MSG_FAILURE([libpam (Linux-PAM) is not installed, but is required by schroot])])
235
332
AC_SUBST([PAM_LIBS])
237
334
AC_CHECK_LIB([lockdev], [dev_lock],
238
[LOCKDEV_LIBS="-llockdev"],
239
[AC_MSG_FAILURE([liblockdev (lockdev) is not installed, but is required by schroot])])
335
[LOCKDEV_LIBS="-llockdev"
240
339
AC_SUBST([LOCKDEV_LIBS])
242
AC_MSG_CHECKING([for boost::program_options::variables_map in -lboost_program_options-mt])
243
saved_ldflags="${LDFLAGS}"
244
LDFLAGS="${LDFLAGS} -lboost_program_options-mt"
340
AH_TEMPLATE(SBUILD_FEATURE_DEVLOCK, [Set if the device locking with liblockdev is available])
341
if test "$HAVE_LOCKDEV" = "yes"; then
342
AC_DEFINE(SBUILD_FEATURE_DEVLOCK, 1)
345
AC_CHECK_FUNC([personality],
346
[PERSONALITY_FUNC="yes"],
347
[PERSONALITY_FUNC="no"])
349
# Determine which features to enable.
350
AC_MSG_CHECKING([whether to build personality support])
351
BUILD_PERSONALITY="yes"
352
if test "$PERSONALITY_HEADER" = "no"; then
353
BUILD_PERSONALITY="no"
355
if test "$PERSONALITY_FUNC" = "no"; then
356
BUILD_PERSONALITY="no"
358
AC_MSG_RESULT([$BUILD_PERSONALITY])
360
AM_CONDITIONAL([BUILD_PERSONALITY], [test "$BUILD_PERSONALITY" = "yes"])
361
AH_TEMPLATE(SBUILD_FEATURE_PERSONALITY, [Set if personality support is present])
362
if test "$BUILD_PERSONALITY" = "yes"; then
363
AC_DEFINE(SBUILD_FEATURE_PERSONALITY, 1)
366
AC_MSG_CHECKING([whether to build UUID support])
368
if test "$enable_uuid" = "yes"; then
371
if test "$HAVE_UUID" = "no"; then
374
AC_MSG_RESULT([$BUILD_UUID])
376
AH_TEMPLATE(HAVE_UUID, [Set if UUID support is available])
377
if test "$BUILD_UUID" = "yes"; then
378
AC_DEFINE(HAVE_UUID, 1)
381
AC_MSG_CHECKING([whether to build PAM support])
383
if test "$enable_pam" = "yes"; then
384
if test "$PAM_HEADER" = "no"; then
386
AC_MSG_FAILURE([libpam (Linux-PAM) is not installed, but is required by schroot])
388
if test "$PAM_FUNC" = "no"; then
390
AC_MSG_FAILURE([libpam (Linux-PAM) is not installed, but is required by schroot])
392
elif test "$enable_pam" = "no"; then
394
elif test "$enable_pam" = "auto"; then
395
if test "$PAM_HEADER" = "no"; then
398
if test "$PAM_FUNC" = "no"; then
402
AC_MSG_RESULT([$BUILD_PAM])
404
AM_CONDITIONAL([BUILD_PAM], [test "$BUILD_PAM" = "yes"])
405
AH_TEMPLATE(SBUILD_FEATURE_PAM, [Set if PAM support is available])
406
if test "$BUILD_PAM" = "yes"; then
407
AC_DEFINE(SBUILD_FEATURE_PAM, 1)
410
AC_MSG_CHECKING([whether to build block-device support])
412
if test "$enable_blockdev" = "yes"; then
413
if test "$HAVE_LOCKDEV" = "no"; then
415
AC_MSG_FAILURE([liblockdev (lockdev) is not installed, but is required by schroot])
417
elif test "$enable_blockdev" = "no"; then
419
elif test "$enable_blockdev" = "auto"; then
420
if test "$HAVE_LOCKDEV" = "no"; then
424
AC_MSG_RESULT([$BUILD_BLOCKDEV])
426
AM_CONDITIONAL([BUILD_BLOCKDEV], [test "$BUILD_BLOCKDEV" = "yes"])
427
AH_TEMPLATE(SBUILD_FEATURE_BLOCKDEV, [Set if the block-device chroot type is present])
428
if test "$BUILD_BLOCKDEV" = "yes"; then
429
AC_DEFINE(SBUILD_FEATURE_BLOCKDEV, 1)
432
AC_MSG_CHECKING([whether to build lvm-snapshot support])
434
if test "$enable_lvmsnapshot" = "yes"; then
435
if test "$HAVE_LVM" = "no"; then
437
AC_MSG_FAILURE([LVM (lvm) is not installed, but is required by schroot])
439
elif test "$enable_lvmsnapshot" = "no"; then
441
elif test "$enable_lvmsnapshot" = "auto"; then
442
if test "$HAVE_LOCKDEV" = "no"; then
445
if test "$HAVE_LVM" = "no"; then
449
AC_MSG_RESULT([$BUILD_LVMSNAP])
451
AM_CONDITIONAL([BUILD_LVMSNAP], [test "$BUILD_LVMSNAP" = "yes"])
452
AH_TEMPLATE(SBUILD_FEATURE_LVMSNAP, [Set if the lvm-snapshot chroot type is present])
453
if test "$BUILD_LVMSNAP" = "yes"; then
454
AC_DEFINE(SBUILD_FEATURE_LVMSNAP, 1)
457
AC_MSG_CHECKING([whether to build loopback support])
459
if test "$enable_loopbackshot" = "yes"; then
460
if test "$HAVE_LOOPBACK" = "no"; then
462
AC_MSG_FAILURE([Loopback support is not avilable, but is required by schroot])
464
elif test "$enable_loopbackshot" = "no"; then
466
elif test "$enable_loopbackshot" = "auto"; then
467
if test "$HAVE_LOOPBACK" = "no"; then
471
AC_MSG_RESULT([$BUILD_LOOPBACK])
473
AM_CONDITIONAL([BUILD_LOOPBACK], [test "$BUILD_LOOPBACK" = "yes"])
474
AH_TEMPLATE(SBUILD_FEATURE_LOOPBACK, [Set if the loopback chroot type is present])
475
if test "$BUILD_LOOPBACK" = "yes"; then
476
AC_DEFINE(SBUILD_FEATURE_LOOPBACK, 1)
479
AC_MSG_CHECKING([whether to build union support])
481
if test "$enable_union" = "yes"; then
483
elif test "$enable_union" = "no"; then
485
elif test "$enable_union" = "auto"; then
488
AC_MSG_RESULT([$BUILD_UNION])
490
AM_CONDITIONAL([BUILD_UNION], [test "$BUILD_UNION" = "yes"])
491
AH_TEMPLATE(SBUILD_FEATURE_UNION, [Set if the union filesystem type is present])
492
if test "$BUILD_UNION" = "yes"; then
493
AC_DEFINE(SBUILD_FEATURE_UNION, 1)
496
AC_MSG_CHECKING([for boost::program_options::variables_map in -lboost_program_options])
498
LIBS="${LIBS} -lboost_program_options"
245
499
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/program_options.hpp>],
246
500
[boost::program_options::variables_map::variables_map dummy()])],
247
501
[AC_MSG_RESULT([yes])
248
BOOST_LIBS="${BOOST_LIBS} -lboost_program_options-mt"],
502
BOOST_LIBS="${BOOST_LIBS} -lboost_program_options"],
249
503
[AC_MSG_RESULT([no])
250
504
AC_MSG_FAILURE([libboost_program_options (Boost C++ Libraries) is not installed, but is required by schroot])])
251
LDFLAGS="${saved_ldflags}"
253
AC_MSG_CHECKING([for boost::program_options::options_description::options() in -lboost_program_options-mt])
254
saved_ldflags="${LDFLAGS}"
255
LDFLAGS="${LDFLAGS} -lboost_program_options-mt"
507
AC_MSG_CHECKING([for boost::program_options::options_description::options() in -lboost_program_options])
509
LIBS="${LIBS} -lboost_program_options"
256
510
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/program_options.hpp>],
257
511
[boost::program_options::options_description testgrp("test group");
258
512
bool notused = testgrp.options().empty();
261
515
BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS="current"],
262
516
[AC_MSG_RESULT([no])
263
517
BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS="old"])
264
LDFLAGS="${saved_ldflags}"
265
519
AH_TEMPLATE(BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD, [Set if boost::program_options::options_description::options() is not available])
266
520
if test "$BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS" = "old"; then
267
521
AC_DEFINE(BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD, 1)
270
AC_MSG_CHECKING([for boost::regex in -lboost_regex-mt])
271
saved_ldflags="${LDFLAGS}"
272
LDFLAGS="${LDFLAGS} -lboost_regex-mt"
524
AC_MSG_CHECKING([for boost::regex in -lboost_regex])
526
LIBS="${LIBS} -lboost_regex"
273
527
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/regex.hpp>],
274
528
[boost::regex("^foo[bar]$")])],
275
529
[AC_MSG_RESULT([yes])
276
BOOST_LIBS="${BOOST_LIBS} -lboost_regex-mt"],
530
BOOST_LIBS="${BOOST_LIBS} -lboost_regex"],
277
531
[AC_MSG_RESULT([no])
278
532
AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])])
279
LDFLAGS="${saved_ldflags}"
281
AC_MSG_CHECKING([for boost::filesystem in -lboost_filesystem-mt])
282
saved_ldflags="${LDFLAGS}"
283
LDFLAGS="${LDFLAGS} -lboost_filesystem-mt"
535
AC_MSG_CHECKING([for boost::filesystem in -lboost_filesystem])
537
LIBS="${LIBS} -lboost_filesystem"
284
538
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/filesystem.hpp>],
285
539
[boost::filesystem::is_directory("/")])],
286
540
[AC_MSG_RESULT([yes])
287
BOOST_LIBS="${BOOST_LIBS} -lboost_filesystem-mt"],
541
BOOST_FILESYSTEM_LIBS="-lboost_filesystem"],
288
542
[AC_MSG_RESULT([no])
289
543
AC_MSG_FAILURE([libboost_filesystem (Boost C++ Libraries) is not installed, but is required by schroot])])
290
LDFLAGS="${saved_ldflags}"
292
546
AC_SUBST([BOOST_LIBS])
547
AC_SUBST([BOOST_FILESYSTEM_LIBS])
294
AC_MSG_CHECKING([__gnu_cxx::stdio_filebuf construction semantics])
549
AC_MSG_CHECKING([for __gnu_cxx::stdio_filebuf in libstdc++])
295
550
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ext/stdio_filebuf.h>
296
551
#include <unistd.h>],
297
552
[__gnu_cxx::stdio_filebuf<char> fdbuf(STDOUT_FILENO, std::ios::out)])],
298
[AC_MSG_RESULT([new (GCC >= 3.4)])
299
STDIO_FILEBUF="new"],
300
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ext/stdio_filebuf.h>
301
#include <unistd.h>],
302
[__gnu_cxx::stdio_filebuf<char> fdbuf(STDOUT_FILENO, std::ios::out, true, BUFSIZ)])],
303
[AC_MSG_RESULT([old (GCC < 3.4)])
304
STDIO_FILEBUF="old"],
305
[AC_MSG_FAILURE([__gnu_cxx::stdio_filebuf (GNU libstdc++) is not installed, but is required by schroot])])])
307
AH_TEMPLATE(SCHROOT_FILEBUF_OLD, [Set if old __gnu_cxx::stdio_filebuf construction semantics are required])
308
if test "$STDIO_FILEBUF" = "old"; then
309
AC_DEFINE(SCHROOT_FILEBUF_OLD, 1)
553
[AC_MSG_RESULT([yes])],
555
AC_MSG_FAILURE([__gnu_cxx::stdio_filebuf (GNU libstdc++) is not installed, but is required by schroot])])
312
557
dnl Set PACKAGE_LOCALE_DIR in config.h
313
558
AH_TEMPLATE(PACKAGE_LOCALE_DIR, [Package locale directory])
473
727
AC_CONFIG_FILES([bin/Makefile])
474
728
AC_CONFIG_FILES([bin/schroot-base/Makefile])
475
729
AC_CONFIG_FILES([bin/schroot/Makefile])
476
AC_CONFIG_FILES([bin/schroot/pam/Makefile])
477
AC_CONFIG_FILES([bin/schroot/exec/Makefile])
478
AC_CONFIG_FILES([bin/schroot/setup/Makefile])
479
AC_CONFIG_FILES([bin/schroot/schroot.1])
480
AC_CONFIG_FILES([bin/schroot/schroot-setup.5])
481
AC_CONFIG_FILES([bin/schroot/schroot.conf.5])
482
AC_CONFIG_FILES([bin/schroot/schroot-script-config.5])
483
730
AC_CONFIG_FILES([bin/schroot-listmounts/Makefile])
484
731
AC_CONFIG_FILES([bin/schroot-mount/Makefile])
485
732
AC_CONFIG_FILES([bin/schroot-releaselock/Makefile])
486
733
AC_CONFIG_FILES([bin/dchroot/Makefile])
487
AC_CONFIG_FILES([bin/dchroot/dchroot.1])
488
734
AC_CONFIG_FILES([bin/dchroot-dsa/Makefile])
489
AC_CONFIG_FILES([bin/dchroot-dsa/dchroot-dsa.1])
490
735
AC_CONFIG_FILES([bin/csbuild/Makefile])
491
AC_CONFIG_FILES([bin/csbuild/csbuild.1])
736
AC_CONFIG_FILES([etc/Makefile])
737
AC_CONFIG_FILES([etc/pam/Makefile])
738
AC_CONFIG_FILES([etc/setup.d/Makefile])
739
AC_CONFIG_FILES([etc/bash_completion/Makefile])
740
AC_CONFIG_FILES([man/Makefile])
741
AC_CONFIG_FILES([man/schroot.1])
742
AC_CONFIG_FILES([man/schroot-setup.5])
743
AC_CONFIG_FILES([man/schroot.conf.5])
744
AC_CONFIG_FILES([man/schroot-script-config.5])
745
AC_CONFIG_FILES([man/dchroot.1])
746
AC_CONFIG_FILES([man/dchroot-dsa.1])
747
AC_CONFIG_FILES([man/csbuild.1])
492
748
AC_CONFIG_FILES([scripts/po-notify])
493
749
AC_CONFIG_FILES([test/Makefile])
494
750
AC_CONFIG_FILES([Makefile])