[24167] | 1 | # -*- Autoconf -*- |
---|
| 2 | # Copyright © 2004-2009 Roger Leigh <rleigh@debian.org> |
---|
| 3 | # |
---|
| 4 | # schroot is free software: you can redistribute it and/or modify it |
---|
| 5 | # under the terms of the GNU General Public License as published by |
---|
| 6 | # the Free Software Foundation, either version 3 of the License, or |
---|
| 7 | # (at your option) any later version. |
---|
| 8 | # |
---|
| 9 | # schroot is distributed in the hope that it will be useful, but |
---|
| 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 12 | # 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, see |
---|
| 16 | # <http://www.gnu.org/licenses/>. |
---|
| 17 | # |
---|
| 18 | ##################################################################### |
---|
| 19 | # |
---|
| 20 | # Process this file with autoconf to produce a configure script. |
---|
| 21 | # |
---|
| 22 | ##################################################################### |
---|
| 23 | dnl MAKING RELEASES (a step-by-step guide!) |
---|
| 24 | dnl =============== |
---|
| 25 | dnl |
---|
| 26 | dnl Since the last release: |
---|
| 27 | dnl 1. if only source code (not the interface) has changed, set |
---|
| 28 | dnl SBUILD_MICRO_VERSION += 1; |
---|
| 29 | dnl SBUILD_INTERFACE_AGE += 1; |
---|
| 30 | dnl 2. if any functions have been added, removed, or changed, set |
---|
| 31 | dnl SBUILD_INTERFACE_AGE = 0; |
---|
| 32 | dnl SBUILD_CURRENT_INTERFACE += 1; |
---|
| 33 | dnl 3. if interfaces have been added, set |
---|
| 34 | dnl SBUILD_BINARY_AGE += 1; |
---|
| 35 | dnl 4. if interfaces have been removed, set |
---|
| 36 | dnl SBUILD_BINARY_AGE = 0; |
---|
| 37 | dnl |
---|
| 38 | dnl For more detailed information, see the libtool info documentation. |
---|
| 39 | dnl |
---|
| 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], [])[), |
---|
| 44 | [/*$]), [$1])]) |
---|
| 45 | m4_define([sbuild_m4_esyscmd_s], |
---|
| 46 | [sbuild_m4_chomp(m4_esyscmd([$1]))]) |
---|
| 47 | AC_PREREQ(2.59) |
---|
| 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]) |
---|
| 52 | pushdef([SBUILD_CURRENT_INTERFACE], [1]) |
---|
| 53 | pushdef([SBUILD_INTERFACE_AGE], [0]) |
---|
| 54 | pushdef([SBUILD_BINARY_AGE], [0]) |
---|
| 55 | dnl For safety, check we are in the right directory by |
---|
| 56 | dnl checking for a known unique file. |
---|
| 57 | AC_CONFIG_SRCDIR([sbuild/sbuild-session.cc]) |
---|
| 58 | dnl Place auxilliary scripts here. |
---|
| 59 | AC_CONFIG_AUX_DIR([scripts]) |
---|
| 60 | dnl Add config headers. |
---|
| 61 | AC_CONFIG_HEADER([config.h]) |
---|
| 62 | AC_CONFIG_HEADER([sbuild/sbuild-config.h]) |
---|
| 63 | |
---|
| 64 | AC_COPYRIGHT( |
---|
| 65 | [ |
---|
| 66 | Copyright © 2004-2009 Roger Leigh <rleigh@debian.org> |
---|
| 67 | |
---|
| 68 | Parts of this configure script come from the 'configure.ac' file, and |
---|
| 69 | are not based on freely-redistributable m4 macros; you can |
---|
| 70 | redistribute it and/or modify it under the terms of the GNU General |
---|
| 71 | Public License as published by the Free Software Foundation, either |
---|
| 72 | version 3 of the License, or (at your option) any later version. |
---|
| 73 | |
---|
| 74 | This software is distributed in the hope that it will be useful, but |
---|
| 75 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 76 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 77 | General Public License for more details. |
---|
| 78 | |
---|
| 79 | You should have received a copy of the GNU General Public License |
---|
| 80 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
| 81 | ]) |
---|
| 82 | |
---|
| 83 | [SBUILD_CURRENT_INTERFACE]=SBUILD_CURRENT_INTERFACE |
---|
| 84 | [SBUILD_INTERFACE_AGE]=SBUILD_INTERFACE_AGE |
---|
| 85 | [SBUILD_BINARY_AGE]=SBUILD_BINARY_AGE |
---|
| 86 | popdef([SBUILD_CURRENT_INTERFACE]) |
---|
| 87 | popdef([SBUILD_INTERFACE_AGE]) |
---|
| 88 | popdef([SBUILD_BINARY_AGE]) |
---|
| 89 | |
---|
| 90 | AC_SUBST([SBUILD_CURRENT_INTERFACE]) |
---|
| 91 | AC_SUBST([SBUILD_INTERFACE_AGE]) |
---|
| 92 | AC_SUBST([SBUILD_BINARY_AGE]) |
---|
| 93 | |
---|
| 94 | dnl Initialise automake stuff. |
---|
[24169] | 95 | AM_INIT_AUTOMAKE([1.10 gnu check-news dist-bzip2 no-dist-gzip tar-pax]) |
---|
| 96 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
---|
[24167] | 97 | AM_MAINTAINER_MODE |
---|
| 98 | 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')' |
---|
| 99 | RELEASE_DATE_S='sbuild_m4_esyscmd_s([sed -ne '/^Release-Date:/{s/Release-Date:[[:space:]][[:space:]]*//p;q}' VERSION])' |
---|
| 100 | AC_DEFINE_UNQUOTED([RELEASE_DATE_S], ["$RELEASE_DATE_S"], [Package release date (string).]) |
---|
| 101 | AC_DEFINE_UNQUOTED([RELEASE_DATE], [$RELEASE_DATE], [Package release date (integer).]) |
---|
| 102 | AC_SUBST([RELEASE_DATE]) |
---|
| 103 | AC_SUBST([RELEASE_DATE_S]) |
---|
| 104 | |
---|
| 105 | AC_MSG_CHECKING([whether to enable dchroot compatibility]) |
---|
| 106 | AC_ARG_ENABLE([dchroot], [AS_HELP_STRING([--enable-dchroot], [Enable dchroot compatibility])], |
---|
| 107 | [ case "${enableval}" in |
---|
| 108 | yes) enable_dchroot_compat="yes" ;; |
---|
| 109 | no) enable_dchroot_compat="no" ;; |
---|
| 110 | *) AC_MSG_RESULT([unknown]) |
---|
| 111 | AC_MSG_ERROR([bad value ${enableval} for --enable-dchroot]) ;; |
---|
| 112 | esac ], |
---|
| 113 | [ enable_dchroot_compat="no" ]) |
---|
| 114 | AC_MSG_RESULT([$enable_dchroot_compat]) |
---|
| 115 | AM_CONDITIONAL([BUILD_DCHROOT], [test "$enable_dchroot_compat" = "yes"]) |
---|
| 116 | |
---|
| 117 | AC_MSG_CHECKING([whether to enable dchroot-dsa compatibility]) |
---|
| 118 | AC_ARG_ENABLE([dchroot-dsa], [AS_HELP_STRING([--enable-dchroot-dsa], [Enable dchroot-dsa compatibility])], |
---|
| 119 | [ case "${enableval}" in |
---|
| 120 | yes) enable_dchroot_dsa_compat="yes" ;; |
---|
| 121 | no) enable_dchroot_dsa_compat="no" ;; |
---|
| 122 | *) AC_MSG_RESULT([unknown]) |
---|
| 123 | AC_MSG_ERROR([bad value ${enableval} for --enable-dchroot-dsa]) ;; |
---|
| 124 | esac ], |
---|
| 125 | [ enable_dchroot_dsa_compat="no" ]) |
---|
| 126 | AC_MSG_RESULT([$enable_dchroot_dsa_compat]) |
---|
| 127 | AM_CONDITIONAL([BUILD_DCHROOT_DSA], [test "$enable_dchroot_dsa_compat" = "yes"]) |
---|
| 128 | AM_CONDITIONAL([BUILD_LIBDCHROOT], [test "$enable_dchroot_compat" = "yes" || test "$enable_dchroot_dsa_compat" = "yes"]) |
---|
| 129 | |
---|
| 130 | AC_MSG_CHECKING([whether to enable csbuild]) |
---|
| 131 | AC_ARG_ENABLE([csbuild], [AS_HELP_STRING([--enable-csbuild], [Enable csbuild])], |
---|
| 132 | [ case "${enableval}" in |
---|
| 133 | yes) enable_csbuild_compat="yes" ;; |
---|
| 134 | no) enable_csbuild_compat="no" ;; |
---|
| 135 | *) AC_MSG_RESULT([unknown]) |
---|
| 136 | AC_MSG_ERROR([bad value ${enableval} for --enable-csbuild]) ;; |
---|
| 137 | esac ], |
---|
| 138 | [ enable_csbuild_compat="no" ]) |
---|
| 139 | |
---|
| 140 | AC_MSG_RESULT([$enable_csbuild_compat]) |
---|
| 141 | AM_CONDITIONAL([BUILD_CSBUILD], [test "$enable_csbuild_compat" = "yes"]) |
---|
| 142 | |
---|
| 143 | AC_MSG_CHECKING([whether to enable debugging messages]) |
---|
| 144 | AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [Enable debugging messages])], |
---|
| 145 | [ case "${enableval}" in |
---|
| 146 | yes) enable_debug="yes" ;; |
---|
| 147 | no) enable_debug="no" ;; |
---|
| 148 | *) AC_MSG_RESULT([unknown]) |
---|
| 149 | AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; |
---|
| 150 | esac ], |
---|
| 151 | [ enable_debug="no" ]) |
---|
| 152 | AC_MSG_RESULT([$enable_debug]) |
---|
| 153 | if test "$enable_debug" = "yes"; then |
---|
| 154 | AC_DEFINE_UNQUOTED([SBUILD_DEBUG], [1], [Enable debugging]) |
---|
| 155 | fi |
---|
| 156 | |
---|
| 157 | 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 | |
---|
| 159 | AC_MSG_CHECKING([whether to enable environment filtering regex]) |
---|
| 160 | AC_ARG_ENABLE([environment-filter], [AS_HELP_STRING([--enable-environment-filter], [Enable default environment filtering (regex)])], |
---|
| 161 | [ case "${enableval}" in |
---|
| 162 | yes) enable_environment_filter="$default_environment_filter" ;; |
---|
| 163 | no) enable_environment_filter="" ;; |
---|
| 164 | *) enable_environment_filter="${enableval}" ;; |
---|
| 165 | esac ], |
---|
| 166 | [ enable_environment_filter="$default_environment_filter" ]) |
---|
| 167 | AC_MSG_RESULT([$enable_environment_filter]) |
---|
| 168 | AH_TEMPLATE(SBUILD_DEFAULT_ENVIRONMENT_FILTER, [Default regular expression used to filter user environment]) |
---|
| 169 | AC_DEFINE_UNQUOTED([SBUILD_DEFAULT_ENVIRONMENT_FILTER], ["$enable_environment_filter"]) |
---|
| 170 | |
---|
| 171 | AC_MSG_CHECKING([whether to enable support for PAM authentication]) |
---|
| 172 | AC_ARG_ENABLE([pam], [AS_HELP_STRING([--enable-pam], [Enable support for PAM authentication (requires libpam)])], |
---|
| 173 | [ case "${enableval}" in |
---|
| 174 | yes) enable_pam="yes" ;; |
---|
| 175 | no) enable_pam="no" ;; |
---|
| 176 | *) AC_MSG_RESULT([unknown]) |
---|
| 177 | AC_MSG_ERROR([bad value ${enableval} for --enable-pam]) ;; |
---|
| 178 | esac], |
---|
| 179 | [enable_pam="auto"]) |
---|
| 180 | AC_MSG_RESULT([$enable_pam]) |
---|
| 181 | |
---|
| 182 | AC_MSG_CHECKING([whether to enable support for block devices]) |
---|
| 183 | AC_ARG_ENABLE([block-device], [AS_HELP_STRING([--enable-block-device], [Enable support for block devices (requires liblockdev)])], |
---|
| 184 | [ case "${enableval}" in |
---|
| 185 | yes) enable_blockdev="yes" ;; |
---|
| 186 | no) enable_blockdev="no" ;; |
---|
| 187 | *) AC_MSG_RESULT([unknown]) |
---|
| 188 | AC_MSG_ERROR([bad value ${enableval} for --enable-blockdev]) ;; |
---|
| 189 | esac], |
---|
| 190 | [enable_blockdev="auto"]) |
---|
| 191 | AC_MSG_RESULT([$enable_blockdev]) |
---|
| 192 | |
---|
| 193 | AC_MSG_CHECKING([whether to enable support for LVM snapshots]) |
---|
| 194 | AC_ARG_ENABLE([lvm-snapshot], [AS_HELP_STRING([--enable-lvm-snapshot], [Enable support for LVM snapshots (requires LVM and liblockdev)])], |
---|
| 195 | [ case "${enableval}" in |
---|
| 196 | yes) enable_lvmsnapshot="yes" |
---|
| 197 | enable_blockdev="yes" ;; |
---|
| 198 | no) enable_lvmsnapshot="no" ;; |
---|
| 199 | *) AC_MSG_RESULT([unknown]) |
---|
| 200 | AC_MSG_ERROR([bad value ${enableval} for --enable-lvm-snapshot]) ;; |
---|
| 201 | esac], |
---|
| 202 | [enable_lvmsnapshot="auto"]) |
---|
| 203 | AC_MSG_RESULT([$enable_lvmsnapshot]) |
---|
| 204 | |
---|
| 205 | AC_MSG_CHECKING([whether to enable support for loopback mounts]) |
---|
| 206 | AC_ARG_ENABLE([loopback], [AS_HELP_STRING([--enable-loopback], [Enable support for loopback mounts])], |
---|
| 207 | [ case "${enableval}" in |
---|
| 208 | yes) enable_loopback="yes" ;; |
---|
| 209 | no) enable_loopback="no" ;; |
---|
| 210 | *) AC_MSG_RESULT([unknown]) |
---|
| 211 | AC_MSG_ERROR([bad value ${enableval} for --enable-loopback]) ;; |
---|
| 212 | esac], |
---|
| 213 | [enable_loopback="auto"]) |
---|
| 214 | AC_MSG_RESULT([$enable_loopback]) |
---|
| 215 | |
---|
| 216 | AC_MSG_CHECKING([whether to enable support for UUIDs in session names]) |
---|
| 217 | AC_ARG_ENABLE([uuid], [AS_HELP_STRING([--enable-uuid], [Enable support for UUIDs])], |
---|
| 218 | [ case "${enableval}" in |
---|
| 219 | yes) enable_uuid="yes" ;; |
---|
| 220 | no) enable_uuid="no" ;; |
---|
| 221 | *) AC_MSG_RESULT([unknown]) |
---|
| 222 | AC_MSG_ERROR([bad value ${enableval} for --enable-uuid]) ;; |
---|
| 223 | esac], |
---|
| 224 | [enable_uuid="auto"]) |
---|
| 225 | AC_MSG_RESULT([$enable_uuid]) |
---|
| 226 | |
---|
| 227 | AC_MSG_CHECKING([whether to enable support for union mounts]) |
---|
| 228 | AC_ARG_ENABLE([union], [AS_HELP_STRING([--enable-union], [Enable support for union mounts])], |
---|
| 229 | [ case "${enableval}" in |
---|
| 230 | yes) enable_union="yes" ;; |
---|
| 231 | no) enable_union="no" ;; |
---|
| 232 | *) AC_MSG_RESULT([unknown]) |
---|
| 233 | AC_MSG_ERROR([bad value ${enableval} for --enable-union]) ;; |
---|
| 234 | esac], |
---|
| 235 | [enable_union="auto"]) |
---|
| 236 | AC_MSG_RESULT([$enable_union]) |
---|
| 237 | |
---|
| 238 | AC_MSG_CHECKING([whether to enable doxygen documentation]) |
---|
| 239 | AC_ARG_ENABLE([doxygen], [AS_HELP_STRING([--enable-doxygen], [Enable doxygen documentation])], |
---|
| 240 | [ case "${enableval}" in |
---|
| 241 | yes) enable_doxygen="yes" ;; |
---|
| 242 | no) enable_doxygen="no" ;; |
---|
| 243 | *) AC_MSG_RESULT([unknown]) |
---|
| 244 | AC_MSG_ERROR([bad value ${enableval} for --enable-doxygen]) ;; |
---|
| 245 | esac], |
---|
| 246 | [ enable_doxygen="no" ]) |
---|
| 247 | AC_MSG_RESULT([$enable_doxygen]) |
---|
| 248 | AM_CONDITIONAL([BUILD_DOXYGEN], [test "$enable_doxygen" = "yes"]) |
---|
| 249 | |
---|
| 250 | AC_MSG_CHECKING([for bash completion directory]) |
---|
| 251 | bashcompletiondir='${sysconfdir}/bash_completion.d' |
---|
| 252 | AC_ARG_WITH([bash-completion-dir], [AS_HELP_STRING([--with-bash-completion-dir], [bash shell completion directory])], |
---|
| 253 | [bashcompletiondir="${withval}"]) |
---|
| 254 | AC_MSG_RESULT([$bashcompletiondir]) |
---|
| 255 | AC_SUBST([bashcompletiondir]) |
---|
| 256 | |
---|
| 257 | # Checks for programs. |
---|
| 258 | AC_PROG_CXX |
---|
| 259 | AC_LANG([C++]) |
---|
| 260 | ACX_PTHREAD([], [AC_MSG_ERROR([POSIX thread support is required for correct std::tr1::shared_ptr operation])]) |
---|
| 261 | AC_DISABLE_SHARED |
---|
| 262 | AC_ENABLE_STATIC |
---|
| 263 | AC_PROG_LIBTOOL |
---|
| 264 | AM_GNU_GETTEXT_VERSION([0.16]) |
---|
| 265 | AM_GNU_GETTEXT([external]) |
---|
| 266 | AC_PATH_PROG([FIND], [find]) |
---|
| 267 | AC_PATH_PROG([XARGS], [xargs]) |
---|
| 268 | AC_PATH_PROG([DOXYGEN], [doxygen]) |
---|
| 269 | HAVE_LVM="yes" |
---|
| 270 | AC_PATH_PROG([LVCREATE], [lvcreate], [HAVE_LVM="no"], [$PATH:/sbin:/usr/sbin]) |
---|
| 271 | AC_PATH_PROG([LVREMOVE], [lvremove], [HAVE_LVM="no"], [$PATH:/sbin:/usr/sbin]) |
---|
| 272 | HAVE_LOOPBACK="yes" |
---|
| 273 | AC_PATH_PROG([LOSETUP], [losetup], [HAVE_LOOPBACK="no"], [$PATH:/sbin:/usr/sbin]) |
---|
| 274 | |
---|
| 275 | if test "$enable_doxygen" = "yes" && test -z "$DOXYGEN"; then |
---|
| 276 | AC_MSG_FAILURE([doxygen is not installed, but is required by schroot]) |
---|
| 277 | fi; |
---|
| 278 | AM_CONDITIONAL([BUILD_DOXYGEN], [test -n "$DOXYGEN" && test "$enable_doxygen" = "yes"]) |
---|
| 279 | |
---|
| 280 | # Checks for libraries. |
---|
| 281 | PKG_CHECK_MODULES([UUID], [uuid], |
---|
| 282 | [AC_DEFINE(HAVE_UUID) |
---|
| 283 | HAVE_UUID=yes], |
---|
| 284 | [HAVE_UUID=no]) |
---|
| 285 | |
---|
| 286 | AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes]) |
---|
| 287 | AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"]) |
---|
| 288 | |
---|
| 289 | SCHROOT_CFLAGS="$UUID_CFLAGS" |
---|
| 290 | AC_SUBST([SCHROOT_CFLAGS]) |
---|
| 291 | |
---|
| 292 | # Checks for header files. |
---|
| 293 | AC_CHECK_HEADERS([tr1/memory]) |
---|
| 294 | |
---|
| 295 | AC_CHECK_HEADERS([boost/shared_ptr.hpp],, [ |
---|
| 296 | if test $ac_cv_header_tr1_memory = yes; then |
---|
| 297 | : |
---|
| 298 | else |
---|
| 299 | AC_MSG_ERROR([Boost.shared_ptr (Boost C++ Libraries) is not installed, but is required by schroot]) |
---|
| 300 | fi]) |
---|
| 301 | |
---|
| 302 | AC_CHECK_HEADERS([tr1/tuple]) |
---|
| 303 | |
---|
| 304 | AC_CHECK_HEADERS([boost/tuple/tuple.hpp],, [ |
---|
| 305 | if test $ac_cv_header_tr1_memory = yes; then |
---|
| 306 | : |
---|
| 307 | else |
---|
| 308 | AC_MSG_ERROR([Boost.Tuple (Boost C++ Libraries) is not installed, but is required by schroot]) |
---|
| 309 | fi]) |
---|
| 310 | |
---|
| 311 | AC_CHECK_HEADERS([boost/format.hpp],, [AC_MSG_ERROR([Boost.Format (Boost C++ Libraries) is not installed, but is required by schroot])]) |
---|
| 312 | AC_CHECK_HEADERS([boost/program_options.hpp],, [AC_MSG_ERROR([Boost.Program_options (Boost C++ Libraries) is not installed, but is required by schroot])]) |
---|
| 313 | AC_CHECK_HEADERS([boost/type_traits.hpp],, [AC_MSG_ERROR([Boost.TypeTraits (Boost C++ Libraries) is not installed, but is required by schroot])]) |
---|
| 314 | |
---|
| 315 | 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 | |
---|
| 317 | AC_CHECK_HEADERS([sys/personality.h], |
---|
| 318 | [PERSONALITY_HEADER="yes"], |
---|
| 319 | [PERSONALITY_HEADER="no"]) |
---|
| 320 | |
---|
| 321 | AC_CHECK_HEADERS([security/pam_appl.h], |
---|
| 322 | [PAM_HEADER="yes"], |
---|
| 323 | [PAM_HEADER="no"]) |
---|
| 324 | |
---|
| 325 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 326 | |
---|
| 327 | # Checks for library functions. |
---|
| 328 | AC_CHECK_LIB([pam], [pam_authenticate], |
---|
| 329 | [PAM_LIBS="-lpam" |
---|
| 330 | PAM_FUNC="yes"], |
---|
| 331 | [PAM_LIBS="" |
---|
| 332 | PAM_FUNC="no"]) |
---|
| 333 | AC_SUBST([PAM_LIBS]) |
---|
| 334 | |
---|
| 335 | AC_CHECK_LIB([lockdev], [dev_lock], |
---|
| 336 | [LOCKDEV_LIBS="-llockdev" |
---|
| 337 | HAVE_LOCKDEV="yes"], |
---|
| 338 | [LOCKDEV_LIBS="" |
---|
| 339 | HAVE_LOCKDEV="no"]) |
---|
| 340 | AC_SUBST([LOCKDEV_LIBS]) |
---|
| 341 | AH_TEMPLATE(SBUILD_FEATURE_DEVLOCK, [Set if the device locking with liblockdev is available]) |
---|
| 342 | if test "$HAVE_LOCKDEV" = "yes"; then |
---|
| 343 | AC_DEFINE(SBUILD_FEATURE_DEVLOCK, 1) |
---|
| 344 | fi |
---|
| 345 | |
---|
| 346 | AC_CHECK_FUNC([personality], |
---|
| 347 | [PERSONALITY_FUNC="yes"], |
---|
| 348 | [PERSONALITY_FUNC="no"]) |
---|
| 349 | |
---|
| 350 | # Determine which features to enable. |
---|
| 351 | AC_MSG_CHECKING([whether to build personality support]) |
---|
| 352 | BUILD_PERSONALITY="yes" |
---|
| 353 | if test "$PERSONALITY_HEADER" = "no"; then |
---|
| 354 | BUILD_PERSONALITY="no" |
---|
| 355 | fi |
---|
| 356 | if test "$PERSONALITY_FUNC" = "no"; then |
---|
| 357 | BUILD_PERSONALITY="no" |
---|
| 358 | fi |
---|
| 359 | AC_MSG_RESULT([$BUILD_PERSONALITY]) |
---|
| 360 | |
---|
| 361 | AM_CONDITIONAL([BUILD_PERSONALITY], [test "$BUILD_PERSONALITY" = "yes"]) |
---|
| 362 | AH_TEMPLATE(SBUILD_FEATURE_PERSONALITY, [Set if personality support is present]) |
---|
| 363 | if test "$BUILD_PERSONALITY" = "yes"; then |
---|
| 364 | AC_DEFINE(SBUILD_FEATURE_PERSONALITY, 1) |
---|
| 365 | fi |
---|
| 366 | |
---|
| 367 | AC_MSG_CHECKING([whether to build UUID support]) |
---|
| 368 | BUILD_UUID="yes" |
---|
| 369 | if test "$enable_uuid" = "yes"; then |
---|
| 370 | BUILD_UUID="no" |
---|
| 371 | fi |
---|
| 372 | if test "$HAVE_UUID" = "no"; then |
---|
| 373 | BUILD_UUID="no" |
---|
| 374 | fi |
---|
| 375 | AC_MSG_RESULT([$BUILD_UUID]) |
---|
| 376 | |
---|
| 377 | AH_TEMPLATE(HAVE_UUID, [Set if UUID support is available]) |
---|
| 378 | if test "$BUILD_UUID" = "yes"; then |
---|
| 379 | AC_DEFINE(HAVE_UUID, 1) |
---|
| 380 | fi |
---|
| 381 | |
---|
| 382 | AC_MSG_CHECKING([whether to build PAM support]) |
---|
| 383 | BUILD_PAM="yes" |
---|
| 384 | if test "$enable_pam" = "yes"; then |
---|
| 385 | if test "$PAM_HEADER" = "no"; then |
---|
| 386 | BUILD_PAM="no" |
---|
| 387 | AC_MSG_FAILURE([libpam (Linux-PAM) is not installed, but is required by schroot]) |
---|
| 388 | fi |
---|
| 389 | if test "$PAM_FUNC" = "no"; then |
---|
| 390 | BUILD_PAM="no" |
---|
| 391 | AC_MSG_FAILURE([libpam (Linux-PAM) is not installed, but is required by schroot]) |
---|
| 392 | fi |
---|
| 393 | elif test "$enable_pam" = "no"; then |
---|
| 394 | BUILD_PAM="no" |
---|
| 395 | elif test "$enable_pam" = "auto"; then |
---|
| 396 | if test "$PAM_HEADER" = "no"; then |
---|
| 397 | BUILD_PAM="no" |
---|
| 398 | fi |
---|
| 399 | if test "$PAM_FUNC" = "no"; then |
---|
| 400 | BUILD_PAM="no" |
---|
| 401 | fi |
---|
| 402 | fi |
---|
| 403 | AC_MSG_RESULT([$BUILD_PAM]) |
---|
| 404 | |
---|
| 405 | AM_CONDITIONAL([BUILD_PAM], [test "$BUILD_PAM" = "yes"]) |
---|
| 406 | AH_TEMPLATE(SBUILD_FEATURE_PAM, [Set if PAM support is available]) |
---|
| 407 | if test "$BUILD_PAM" = "yes"; then |
---|
| 408 | AC_DEFINE(SBUILD_FEATURE_PAM, 1) |
---|
| 409 | fi |
---|
| 410 | |
---|
| 411 | AC_MSG_CHECKING([whether to build block-device support]) |
---|
| 412 | BUILD_BLOCKDEV="yes" |
---|
| 413 | if test "$enable_blockdev" = "yes"; then |
---|
| 414 | if test "$HAVE_LOCKDEV" = "no"; then |
---|
| 415 | BUILD_BLOCKDEV="no" |
---|
| 416 | AC_MSG_FAILURE([liblockdev (lockdev) is not installed, but is required by schroot]) |
---|
| 417 | fi |
---|
| 418 | elif test "$enable_blockdev" = "no"; then |
---|
| 419 | BUILD_BLOCKDEV="no" |
---|
| 420 | elif test "$enable_blockdev" = "auto"; then |
---|
| 421 | if test "$HAVE_LOCKDEV" = "no"; then |
---|
| 422 | BUILD_BLOCKDEV="no" |
---|
| 423 | fi |
---|
| 424 | fi |
---|
| 425 | AC_MSG_RESULT([$BUILD_BLOCKDEV]) |
---|
| 426 | |
---|
| 427 | AM_CONDITIONAL([BUILD_BLOCKDEV], [test "$BUILD_BLOCKDEV" = "yes"]) |
---|
| 428 | AH_TEMPLATE(SBUILD_FEATURE_BLOCKDEV, [Set if the block-device chroot type is present]) |
---|
| 429 | if test "$BUILD_BLOCKDEV" = "yes"; then |
---|
| 430 | AC_DEFINE(SBUILD_FEATURE_BLOCKDEV, 1) |
---|
| 431 | fi |
---|
| 432 | |
---|
| 433 | AC_MSG_CHECKING([whether to build lvm-snapshot support]) |
---|
| 434 | BUILD_LVMSNAP="yes" |
---|
| 435 | if test "$enable_lvmsnapshot" = "yes"; then |
---|
| 436 | if test "$HAVE_LVM" = "no"; then |
---|
| 437 | BUILD_LVMSNAP="no" |
---|
| 438 | AC_MSG_FAILURE([LVM (lvm) is not installed, but is required by schroot]) |
---|
| 439 | fi |
---|
| 440 | elif test "$enable_lvmsnapshot" = "no"; then |
---|
| 441 | BUILD_LVMSNAP="no" |
---|
| 442 | elif test "$enable_lvmsnapshot" = "auto"; then |
---|
| 443 | if test "$HAVE_LOCKDEV" = "no"; then |
---|
| 444 | BUILD_LVMSNAP="no" |
---|
| 445 | fi |
---|
| 446 | if test "$HAVE_LVM" = "no"; then |
---|
| 447 | BUILD_LVMSNAP="no" |
---|
| 448 | fi |
---|
| 449 | fi |
---|
| 450 | AC_MSG_RESULT([$BUILD_LVMSNAP]) |
---|
| 451 | |
---|
| 452 | AM_CONDITIONAL([BUILD_LVMSNAP], [test "$BUILD_LVMSNAP" = "yes"]) |
---|
| 453 | AH_TEMPLATE(SBUILD_FEATURE_LVMSNAP, [Set if the lvm-snapshot chroot type is present]) |
---|
| 454 | if test "$BUILD_LVMSNAP" = "yes"; then |
---|
| 455 | AC_DEFINE(SBUILD_FEATURE_LVMSNAP, 1) |
---|
| 456 | fi |
---|
| 457 | |
---|
| 458 | AC_MSG_CHECKING([whether to build loopback support]) |
---|
| 459 | BUILD_LOOPBACK="yes" |
---|
| 460 | if test "$enable_loopbackshot" = "yes"; then |
---|
| 461 | if test "$HAVE_LOOPBACK" = "no"; then |
---|
| 462 | BUILD_LOOPBACK="no" |
---|
| 463 | AC_MSG_FAILURE([Loopback support is not avilable, but is required by schroot]) |
---|
| 464 | fi |
---|
| 465 | elif test "$enable_loopbackshot" = "no"; then |
---|
| 466 | BUILD_LOOPBACK="no" |
---|
| 467 | elif test "$enable_loopbackshot" = "auto"; then |
---|
| 468 | if test "$HAVE_LOOPBACK" = "no"; then |
---|
| 469 | BUILD_LOOPBACK="no" |
---|
| 470 | fi |
---|
| 471 | fi |
---|
| 472 | AC_MSG_RESULT([$BUILD_LOOPBACK]) |
---|
| 473 | |
---|
| 474 | AM_CONDITIONAL([BUILD_LOOPBACK], [test "$BUILD_LOOPBACK" = "yes"]) |
---|
| 475 | AH_TEMPLATE(SBUILD_FEATURE_LOOPBACK, [Set if the loopback chroot type is present]) |
---|
| 476 | if test "$BUILD_LOOPBACK" = "yes"; then |
---|
| 477 | AC_DEFINE(SBUILD_FEATURE_LOOPBACK, 1) |
---|
| 478 | fi |
---|
| 479 | |
---|
| 480 | AC_MSG_CHECKING([whether to build union support]) |
---|
| 481 | BUILD_UNION="yes" |
---|
| 482 | if test "$enable_union" = "yes"; then |
---|
| 483 | : |
---|
| 484 | elif test "$enable_union" = "no"; then |
---|
| 485 | BUILD_UNION="no" |
---|
| 486 | elif test "$enable_union" = "auto"; then |
---|
| 487 | BUILD_UNION="yes" |
---|
| 488 | fi |
---|
| 489 | AC_MSG_RESULT([$BUILD_UNION]) |
---|
| 490 | |
---|
| 491 | AM_CONDITIONAL([BUILD_UNION], [test "$BUILD_UNION" = "yes"]) |
---|
| 492 | AH_TEMPLATE(SBUILD_FEATURE_UNION, [Set if the union filesystem type is present]) |
---|
| 493 | if test "$BUILD_UNION" = "yes"; then |
---|
| 494 | AC_DEFINE(SBUILD_FEATURE_UNION, 1) |
---|
| 495 | fi |
---|
| 496 | |
---|
[24314] | 497 | AC_MSG_CHECKING([for boost::program_options::variables_map in -lboost_program_options]) |
---|
[24167] | 498 | saved_LIBS="${LIBS}" |
---|
[24314] | 499 | LIBS="${saved_LIBS} -lboost_program_options" |
---|
| 500 | define([testprog], [AC_LANG_PROGRAM([#include <boost/program_options.hpp>], |
---|
| 501 | [boost::program_options::variables_map::variables_map dummy()])]) |
---|
| 502 | AC_LINK_IFELSE(testprog, |
---|
[24167] | 503 | [AC_MSG_RESULT([yes]) |
---|
[24314] | 504 | BOOST_LIBS="${BOOST_LIBS} -lboost_program_options"], |
---|
| 505 | LIBS="${saved_LIBS} -lboost_program_options-mt" |
---|
| 506 | [AC_LINK_IFELSE(testprog, |
---|
| 507 | [AC_MSG_RESULT([yes]) |
---|
[24173] | 508 | BOOST_LIBS="${BOOST_LIBS} -lboost_program_options-mt"], |
---|
[24167] | 509 | [AC_MSG_RESULT([no]) |
---|
[24314] | 510 | AC_MSG_FAILURE([libboost_program_options (Boost C++ Libraries) is not installed, but is required by schroot])])]) |
---|
[24167] | 511 | LIBS="${saved_LIBS}" |
---|
| 512 | |
---|
[24314] | 513 | AC_MSG_CHECKING([for boost::program_options::options_description::options() in -lboost_program_options]) |
---|
[24167] | 514 | saved_LIBS="${LIBS}" |
---|
[24314] | 515 | LIBS="${saved_LIBS} -lboost_program_options" |
---|
| 516 | define([testprog], [AC_LANG_PROGRAM([#include <boost/program_options.hpp>], |
---|
| 517 | [boost::program_options::options_description testgrp("test group"); |
---|
| 518 | bool notused = testgrp.options().empty(); |
---|
| 519 | ])]) |
---|
| 520 | AC_LINK_IFELSE(testprog, |
---|
[24167] | 521 | [AC_MSG_RESULT([yes]) |
---|
| 522 | BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS="current"], |
---|
[24314] | 523 | LIBS="${saved_LIBS} -lboost_program_options" |
---|
| 524 | [AC_LINK_IFELSE(testprog, |
---|
| 525 | [AC_MSG_RESULT([yes]) |
---|
| 526 | BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS="current"], |
---|
[24167] | 527 | [AC_MSG_RESULT([no]) |
---|
[24314] | 528 | BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS="old"])]) |
---|
[24167] | 529 | LIBS="${saved_LIBS}" |
---|
| 530 | AH_TEMPLATE(BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD, [Set if boost::program_options::options_description::options() is not available]) |
---|
| 531 | if test "$BOOST_PROGRAM_OPTIONS_DESCRIPTION_METHODS" = "old"; then |
---|
| 532 | AC_DEFINE(BOOST_PROGRAM_OPTIONS_DESCRIPTION_OLD, 1) |
---|
| 533 | fi |
---|
| 534 | |
---|
[24314] | 535 | AC_MSG_CHECKING([for boost::regex in -lboost_regex]) |
---|
[24167] | 536 | saved_LIBS="${LIBS}" |
---|
[24314] | 537 | LIBS="${saved_LIBS} -lboost_regex" |
---|
| 538 | define([testprog], [AC_LANG_PROGRAM([#include <boost/regex.hpp>], |
---|
| 539 | [boost::regex("^foo[bar]$")])]) |
---|
| 540 | AC_LINK_IFELSE(testprog, |
---|
[24167] | 541 | [AC_MSG_RESULT([yes]) |
---|
[24314] | 542 | BOOST_LIBS="${BOOST_LIBS} -lboost_regex"], |
---|
| 543 | LIBS="${saved_LIBS} -lboost_regex-mt" |
---|
| 544 | [AC_LINK_IFELSE(testprog, |
---|
| 545 | [AC_MSG_RESULT([yes]) |
---|
[24173] | 546 | BOOST_LIBS="${BOOST_LIBS} -lboost_regex-mt"], |
---|
[24167] | 547 | [AC_MSG_RESULT([no]) |
---|
[24314] | 548 | AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])])]) |
---|
[24167] | 549 | LIBS="${saved_LIBS}" |
---|
| 550 | |
---|
[24314] | 551 | AC_MSG_CHECKING([for boost::filesystem in -lboost_filesystem]) |
---|
[24167] | 552 | saved_LIBS="${LIBS}" |
---|
[24314] | 553 | LIBS="${saved_LIBS} -lboost_filesystem" |
---|
| 554 | define([testprog], [AC_LANG_PROGRAM([#include <boost/filesystem.hpp>], |
---|
| 555 | [boost::filesystem::is_directory("/")])]) |
---|
| 556 | AC_LINK_IFELSE(testprog, |
---|
[24167] | 557 | [AC_MSG_RESULT([yes]) |
---|
[24314] | 558 | BOOST_FILESYSTEM_LIBS="-lboost_filesystem"], |
---|
| 559 | LIBS="${saved_LIBS} -lboost_filesystem-mt" |
---|
| 560 | [AC_LINK_IFELSE(testprog, |
---|
| 561 | [AC_MSG_RESULT([yes]) |
---|
[24173] | 562 | BOOST_FILESYSTEM_LIBS="-lboost_filesystem-mt"], |
---|
[24167] | 563 | [AC_MSG_RESULT([no]) |
---|
[24314] | 564 | AC_MSG_FAILURE([libboost_filesystem (Boost C++ Libraries) is not installed, but is required by schroot])])]) |
---|
[24167] | 565 | LIBS="${saved_LIBS}" |
---|
| 566 | |
---|
| 567 | AC_SUBST([BOOST_LIBS]) |
---|
| 568 | AC_SUBST([BOOST_FILESYSTEM_LIBS]) |
---|
| 569 | |
---|
| 570 | AC_MSG_CHECKING([for __gnu_cxx::stdio_filebuf in libstdc++]) |
---|
| 571 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ext/stdio_filebuf.h> |
---|
| 572 | #include <unistd.h>], |
---|
| 573 | [__gnu_cxx::stdio_filebuf<char> fdbuf(STDOUT_FILENO, std::ios::out)])], |
---|
| 574 | [AC_MSG_RESULT([yes])], |
---|
| 575 | [AC_MSG_RESULT([no]) |
---|
| 576 | AC_MSG_FAILURE([__gnu_cxx::stdio_filebuf (GNU libstdc++) is not installed, but is required by schroot])]) |
---|
| 577 | |
---|
| 578 | dnl Set PACKAGE_LOCALE_DIR in config.h |
---|
| 579 | AH_TEMPLATE(PACKAGE_LOCALE_DIR, [Package locale directory]) |
---|
| 580 | if test "x${prefix}" = "xNONE"; then |
---|
| 581 | AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, ["${ac_default_prefix}/share/locale"]) |
---|
| 582 | else |
---|
| 583 | AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, ["${prefix}/share/locale"]) |
---|
| 584 | fi |
---|
| 585 | |
---|
| 586 | dnl Set PACKAGE_DATA_DIR in config.h. |
---|
| 587 | AH_TEMPLATE(PACKAGE_DATA_DIR, [Package data directory]) |
---|
| 588 | if test "x${datadir}" = 'x${prefix}/share' || test "x${datadir}" = 'x${datarootdir}'; then |
---|
| 589 | if test "x${prefix}" = "xNONE"; then |
---|
| 590 | PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}" |
---|
| 591 | else |
---|
| 592 | PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}" |
---|
| 593 | fi |
---|
| 594 | else |
---|
| 595 | PACKAGE_DATA_DIR="${datadir}/${PACKAGE}" |
---|
| 596 | fi |
---|
| 597 | |
---|
| 598 | AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${PACKAGE_DATA_DIR}") |
---|
| 599 | |
---|
| 600 | dnl Set PACKAGE_LIB_DIR in config.h. |
---|
| 601 | AH_TEMPLATE(PACKAGE_LIB_DIR, [Package lib directory]) |
---|
| 602 | if test "x${libdir}" = 'x${exec_prefix}/lib'; then |
---|
| 603 | if test "x${exec_prefix}" = "xNONE"; then |
---|
| 604 | if test "x${prefix}" = "xNONE"; then |
---|
| 605 | PACKAGE_LIB_DIR="${ac_default_prefix}/lib/${PACKAGE}" |
---|
| 606 | else |
---|
| 607 | PACKAGE_LIB_DIR="${prefix}/lib/${PACKAGE}" |
---|
| 608 | fi |
---|
| 609 | else |
---|
| 610 | PACKAGE_LIB_DIR="${exec_prefix}/lib/${PACKAGE}" |
---|
| 611 | fi |
---|
| 612 | else |
---|
| 613 | PACKAGE_LIB_DIR="${libdir}/${PACKAGE}" |
---|
| 614 | fi |
---|
| 615 | |
---|
| 616 | dnl Set PACKAGE_LIBEXEC_DIR in config.h. |
---|
| 617 | AH_TEMPLATE(PACKAGE_LIBEXEC_DIR, [Package libexec directory]) |
---|
| 618 | if test "x${libexecdir}" = 'x${exec_prefix}/libexec'; then |
---|
| 619 | if test "x${exec_prefix}" = "xNONE"; then |
---|
| 620 | if test "x${prefix}" = "xNONE"; then |
---|
| 621 | PACKAGE_LIBEXEC_DIR="${ac_default_prefix}/libexec/${PACKAGE}" |
---|
| 622 | else |
---|
| 623 | PACKAGE_LIBEXEC_DIR="${prefix}/libexec/${PACKAGE}" |
---|
| 624 | fi |
---|
| 625 | else |
---|
| 626 | PACKAGE_LIBEXEC_DIR="${exec_prefix}/libexec/${PACKAGE}" |
---|
| 627 | fi |
---|
| 628 | else |
---|
| 629 | PACKAGE_LIBEXEC_DIR="${libexecdir}/${PACKAGE}" |
---|
| 630 | fi |
---|
| 631 | |
---|
| 632 | SCHROOT_LIBEXEC_DIR="${PACKAGE_LIBEXEC_DIR}" |
---|
| 633 | AC_SUBST(SCHROOT_LIBEXEC_DIR) |
---|
| 634 | AH_TEMPLATE(SCHROOT_LIBEXEC_DIR, [Package libexec directory]) |
---|
| 635 | AC_DEFINE_UNQUOTED(SCHROOT_LIBEXEC_DIR, ["$SCHROOT_LIBEXEC_DIR"]) |
---|
| 636 | |
---|
| 637 | dnl Set PACKAGE_LOCALSTATE_DIR in config.h. |
---|
| 638 | AH_TEMPLATE(PACKAGE_LOCALSTATE_DIR, [Package localstate directory]) |
---|
| 639 | if test "x${localstatedir}" = 'x${prefix}/var'; then |
---|
| 640 | if test "x${prefix}" = "xNONE"; then |
---|
| 641 | if test "x${prefix}" = "xNONE"; then |
---|
| 642 | PACKAGE_LOCALSTATE_DIR="${ac_default_prefix}/var" |
---|
| 643 | else |
---|
| 644 | PACKAGE_LOCALSTATE_DIR="${prefix}/var" |
---|
| 645 | fi |
---|
| 646 | else |
---|
| 647 | PACKAGE_LOCALSTATE_DIR="${prefix}/var" |
---|
| 648 | fi |
---|
| 649 | else |
---|
| 650 | PACKAGE_LOCALSTATE_DIR="${localstatedir}" |
---|
| 651 | fi |
---|
| 652 | |
---|
| 653 | SCHROOT_MOUNT_DIR="${PACKAGE_LOCALSTATE_DIR}/lib/${PACKAGE}/mount" |
---|
| 654 | AC_SUBST([SCHROOT_MOUNT_DIR]) |
---|
| 655 | AH_TEMPLATE(SCHROOT_MOUNT_DIR, [schroot mount directory]) |
---|
| 656 | AC_DEFINE_UNQUOTED(SCHROOT_MOUNT_DIR, ["$SCHROOT_MOUNT_DIR"]) |
---|
| 657 | |
---|
| 658 | SCHROOT_SESSION_DIR="${PACKAGE_LOCALSTATE_DIR}/lib/${PACKAGE}/session" |
---|
| 659 | AC_SUBST([SCHROOT_SESSION_DIR]) |
---|
| 660 | AH_TEMPLATE(SCHROOT_SESSION_DIR, [schroot session directory]) |
---|
| 661 | AC_DEFINE_UNQUOTED(SCHROOT_SESSION_DIR, ["$SCHROOT_SESSION_DIR"]) |
---|
| 662 | |
---|
| 663 | SCHROOT_FILE_UNPACK_DIR="${PACKAGE_LOCALSTATE_DIR}/lib/${PACKAGE}/unpack" |
---|
| 664 | AC_SUBST([SCHROOT_FILE_UNPACK_DIR]) |
---|
| 665 | AH_TEMPLATE(SCHROOT_FILE_UNPACK_DIR, [schroot file unpack directory]) |
---|
| 666 | AC_DEFINE_UNQUOTED(SCHROOT_FILE_UNPACK_DIR, ["$SCHROOT_FILE_UNPACK_DIR"]) |
---|
| 667 | |
---|
| 668 | SCHROOT_OVERLAY_DIR="${PACKAGE_LOCALSTATE_DIR}/lib/${PACKAGE}/union/overlay" |
---|
| 669 | AC_SUBST([SCHROOT_OVERLAY_DIR]) |
---|
| 670 | AH_TEMPLATE(SCHROOT_OVERLAY_DIR, [schroot overlay directory]) |
---|
| 671 | AC_DEFINE_UNQUOTED(SCHROOT_OVERLAY_DIR, ["$SCHROOT_OVERLAY_DIR"]) |
---|
| 672 | |
---|
| 673 | SCHROOT_UNDERLAY_DIR="${PACKAGE_LOCALSTATE_DIR}/lib/${PACKAGE}/union/underlay" |
---|
| 674 | AC_SUBST([SCHROOT_UNDERLAY_DIR]) |
---|
| 675 | AH_TEMPLATE(SCHROOT_UNDERLAY_DIR, [schroot underlay directory]) |
---|
| 676 | AC_DEFINE_UNQUOTED(SCHROOT_UNDERLAY_DIR, ["$SCHROOT_UNDERLAY_DIR"]) |
---|
| 677 | |
---|
| 678 | dnl Set PACKAGE_SYSCONF_DIR in config.h. |
---|
| 679 | AH_TEMPLATE(PACKAGE_SYSCONF_DIR, [Package system configuration directory]) |
---|
| 680 | if test "x${sysconfdir}" = 'x${prefix}/etc'; then |
---|
| 681 | if test "x${prefix}" = "xNONE"; then |
---|
| 682 | PACKAGE_SYSCONF_DIR="${ac_default_prefix}/etc" |
---|
| 683 | else |
---|
| 684 | PACKAGE_SYSCONF_DIR="${prefix}/etc" |
---|
| 685 | fi |
---|
| 686 | else |
---|
| 687 | PACKAGE_SYSCONF_DIR="${sysconfdir}" |
---|
| 688 | fi |
---|
| 689 | PACKAGE_SYSCONF_DIR="${PACKAGE_SYSCONF_DIR}/schroot" |
---|
| 690 | AC_DEFINE_UNQUOTED([PACKAGE_SYSCONF_DIR], ["$PACKAGE_SYSCONF_DIR"]) |
---|
| 691 | AC_SUBST([PACKAGE_SYSCONF_DIR]) |
---|
| 692 | |
---|
| 693 | SCHROOT_CONF="${PACKAGE_SYSCONF_DIR}/schroot.conf" |
---|
| 694 | AC_SUBST([SCHROOT_CONF]) |
---|
| 695 | |
---|
| 696 | AH_TEMPLATE(SCHROOT_CONF, [schroot config file path]) |
---|
| 697 | AC_DEFINE_UNQUOTED(SCHROOT_CONF, ["$SCHROOT_CONF"]) |
---|
| 698 | |
---|
| 699 | SCHROOT_CONF_CHROOT_D="${PACKAGE_SYSCONF_DIR}/chroot.d" |
---|
| 700 | AC_SUBST([SCHROOT_CONF_CHROOT_D]) |
---|
| 701 | |
---|
| 702 | AH_TEMPLATE(SCHROOT_CONF_CHROOT_D, [schroot chroot directory]) |
---|
| 703 | AC_DEFINE_UNQUOTED(SCHROOT_CONF_CHROOT_D, ["$SCHROOT_CONF_CHROOT_D"]) |
---|
| 704 | |
---|
| 705 | SCHROOT_CONF_SETUP_D="${PACKAGE_SYSCONF_DIR}/setup.d" |
---|
| 706 | AC_SUBST([SCHROOT_CONF_SETUP_D]) |
---|
| 707 | |
---|
| 708 | AH_TEMPLATE(SCHROOT_CONF_SETUP_D, [schroot chroot setup directory]) |
---|
| 709 | AC_DEFINE_UNQUOTED(SCHROOT_CONF_SETUP_D, ["$SCHROOT_CONF_SETUP_D"]) |
---|
| 710 | |
---|
| 711 | AH_TEMPLATE(SCHROOT_DATADIR, [Package data directory]) |
---|
| 712 | SCHROOT_DATADIR="${PACKAGE_DATA_DIR}/${PACKAGE_VERSION}" |
---|
| 713 | AC_DEFINE_UNQUOTED(SCHROOT_DATADIR, ["$SCHROOT_DATADIR"]) |
---|
| 714 | |
---|
| 715 | AH_TEMPLATE(SCHROOT_MODULEDIR, [Package module directory]) |
---|
| 716 | SCHROOT_MODULEDIR="${PACKAGE_LIB_DIR}/${PACKAGE_VERSION}/modules" |
---|
| 717 | AC_DEFINE_UNQUOTED(SCHROOT_MODULEDIR, ["$SCHROOT_MODULEDIR"]) |
---|
| 718 | |
---|
| 719 | if test "x${sysconfdir}" = 'x${prefix}/etc'; then |
---|
| 720 | if test "x${prefix}" = "xNONE"; then |
---|
| 721 | DCHROOT_SYSCONF_DIR="${ac_default_prefix}/etc" |
---|
| 722 | else |
---|
| 723 | DCHROOT_SYSCONF_DIR="${prefix}/etc" |
---|
| 724 | fi |
---|
| 725 | else |
---|
| 726 | DCHROOT_SYSCONF_DIR="${sysconfdir}" |
---|
| 727 | fi |
---|
| 728 | |
---|
| 729 | DCHROOT_CONF="${DCHROOT_SYSCONF_DIR}/dchroot.conf" |
---|
| 730 | AC_SUBST([DCHROOT_CONF]) |
---|
| 731 | |
---|
| 732 | AH_TEMPLATE(DCHROOT_CONF, [dchroot config file path]) |
---|
| 733 | AC_DEFINE_UNQUOTED(DCHROOT_CONF, ["$DCHROOT_CONF"]) |
---|
| 734 | |
---|
| 735 | CSBUILD_CONF="${CSBUILD_SYSCONF_DIR}/csbuild.conf" |
---|
| 736 | AC_SUBST([CSBUILD_CONF]) |
---|
| 737 | |
---|
| 738 | AH_TEMPLATE(CSBUILD_CONF, [csbuild config file path]) |
---|
| 739 | AC_DEFINE_UNQUOTED(CSBUILD_CONF, ["$CSBUILD_CONF"]) |
---|
| 740 | |
---|
| 741 | dnl Configure which files to generate. |
---|
| 742 | AC_CONFIG_FILES([doc/Makefile]) |
---|
| 743 | AC_CONFIG_FILES([doc/sbuild.dox]) |
---|
| 744 | AC_CONFIG_FILES([doc/schroot.dox]) |
---|
| 745 | AC_CONFIG_FILES([po/Makefile.in]) |
---|
| 746 | AC_CONFIG_FILES([sbuild/Makefile]) |
---|
| 747 | AC_CONFIG_FILES([sbuild/sbuild.pc]) |
---|
| 748 | AC_CONFIG_FILES([bin/Makefile]) |
---|
| 749 | AC_CONFIG_FILES([bin/schroot-base/Makefile]) |
---|
| 750 | AC_CONFIG_FILES([bin/schroot/Makefile]) |
---|
| 751 | AC_CONFIG_FILES([bin/schroot-listmounts/Makefile]) |
---|
| 752 | AC_CONFIG_FILES([bin/schroot-mount/Makefile]) |
---|
| 753 | AC_CONFIG_FILES([bin/schroot-releaselock/Makefile]) |
---|
| 754 | AC_CONFIG_FILES([bin/dchroot/Makefile]) |
---|
| 755 | AC_CONFIG_FILES([bin/dchroot-dsa/Makefile]) |
---|
| 756 | AC_CONFIG_FILES([bin/csbuild/Makefile]) |
---|
| 757 | AC_CONFIG_FILES([etc/Makefile]) |
---|
| 758 | AC_CONFIG_FILES([etc/pam/Makefile]) |
---|
| 759 | AC_CONFIG_FILES([etc/setup.d/Makefile]) |
---|
| 760 | AC_CONFIG_FILES([etc/bash_completion/Makefile]) |
---|
| 761 | AC_CONFIG_FILES([man/Makefile]) |
---|
| 762 | AC_CONFIG_FILES([man/schroot.1]) |
---|
| 763 | AC_CONFIG_FILES([man/schroot-setup.5]) |
---|
| 764 | AC_CONFIG_FILES([man/schroot.conf.5]) |
---|
| 765 | AC_CONFIG_FILES([man/schroot-script-config.5]) |
---|
| 766 | AC_CONFIG_FILES([man/dchroot.1]) |
---|
| 767 | AC_CONFIG_FILES([man/dchroot-dsa.1]) |
---|
| 768 | AC_CONFIG_FILES([man/csbuild.1]) |
---|
| 769 | AC_CONFIG_FILES([scripts/po-notify]) |
---|
| 770 | AC_CONFIG_FILES([test/Makefile]) |
---|
| 771 | AC_CONFIG_FILES([Makefile]) |
---|
| 772 | dnl Output the generated config.status script. |
---|
| 773 | AC_OUTPUT |
---|