configure.ac (20497B)
1 dnl $Id$ 2 3 dnl Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> 4 dnl 5 dnl This program is free software; you can redistribute it and/or modify 6 dnl it under the terms of the GNU General Public License as published by 7 dnl the Free Software Foundation; either version 2, or (at your option) 8 dnl any later version. 9 dnl 10 dnl This program is distributed in the hope that it will be useful, 11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 dnl GNU General Public License for more details. 14 dnl 15 dnl You should have received a copy of the GNU General Public License 16 dnl along with this program; if not, write to the Free Software 17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 dnl 19 dnl 20 dnl As a special exception to the GNU General Public License, if you 21 dnl distribute this file as part of a program that contains a configuration 22 dnl script generated by Autoconf, you may include it under the same 23 dnl distribution terms that you use for the rest of that program. 24 dnl 25 26 AC_PREREQ(2.57) 27 AC_INIT(util-vserver, 0.30.216-pre3131, vserver@list.linux-vserver.org) 28 AC_CONFIG_SRCDIR([src/capchroot.c]) 29 AC_CONFIG_HEADER([config.h]) 30 AC_CONFIG_MACRO_DIR([m4]) 31 32 AM_INIT_AUTOMAKE([1.9 gnu dist-xz subdir-objects]) 33 AM_MAINTAINER_MODE 34 35 AC_CANONICAL_BUILD 36 AC_CANONICAL_HOST 37 38 AC_SUBST(GPG_KEY, "0xFFD316AC53ACA43A!") 39 40 # Checks for programs. 41 AC_PROG_CC 42 AC_PROG_INSTALL 43 AC_PROG_LN_S 44 AM_PROG_CC_C_O 45 PKG_PROG_PKG_CONFIG 46 ENSC_C99COMPILER 47 AC_PROG_MKDIR_P 48 49 ENSC_SET_SEARCHPATH([$PATH:/sbin:/usr/sbin:/usr/local/sbin]) 50 ENSC_PATHPROG_STANDARD_TOOLS 51 52 ENSC_PATHPROG(IP, ip,, [Usually, this tool is shipped in the 'iproute' or 'iproute2' package of your distribution]) 53 ENSC_PATHPROG(IPTABLES, iptables) 54 ENSC_PATHPROG(MODPROBE, modprobe) 55 ENSC_PATHPROG(NAMEIF, nameif) 56 ENSC_PATHPROG(NOHUP, nohup) 57 ENSC_PATHPROG(RMMOD, rmmod) 58 ENSC_PATHPROG(WGET, wget) 59 ENSC_PATHPROG(IONICE, ionice, [], [This is usually shipped in the 'util-linux(-ng)' or 'schedutils' package]) 60 ENSC_PATHPROG(FILE, file, [file]) 61 ENSC_PATHPROG(GZIP, gzip, [gzip]) 62 ENSC_PATHPROG(BZIP2, bzip2, [bzip2]) 63 ENSC_PATHPROG(CPIO, cpio, [cpio]) 64 ENSC_PATHPROG(RESTORE, restore, [restore]) 65 ENSC_PATHPROG(RSYNC, rsync, [rsync]) 66 ENSC_PATHPROG(STRACE, strace, [strace]) 67 ENSC_PATHPROG(FSCK, fsck) 68 ENSC_PATHPROG(FIND, find) 69 70 ENSC_PATHPROG(DOXYGEN, doxygen, [:]) 71 ENSC_PATHPROG(XSLTP, xsltp, [:]) 72 ENSC_PATHPROG(XSLTPROC, xsltproc, [:]) 73 74 75 AM_CONDITIONAL(HAVE_XSLTP, test "$XSLTP" != ':') 76 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != ':') 77 78 if test x"$prefix" = x/; then 79 prefix= 80 fi 81 82 ### 'vcconfig' vs. 'ip link ... type vlan' check 83 AC_MSG_CHECKING([whether 'ip' tool supports VLAN operations]) 84 AC_ARG_ENABLE([ip-vlan], 85 [AC_HELP_STRING([--disable-ip-vlan], 86 [disable VLAN setup with 'ip' (default: auto)])], 87 [case "$enableval" in 88 (yes) use_ip_vlan=true;; 89 (no) use_ip_vlan=false;; 90 (auto) use_ip_vlan=;; 91 (*) AC_MSG_ERROR(['$enableval' is not a valid value for '--disable-ip-vlan']);; 92 esac], 93 [use_ip_vlan=]) 94 95 if test -z "$use_ip_vlan" && $IP link help 2>&1 | grep -q vlan; then 96 use_ip_vlan=true 97 else 98 use_ip_vlan=false 99 fi 100 101 if $use_ip_vlan; then 102 AC_MSG_RESULT([yes]) 103 AC_SUBST([VCONFIG],[]) 104 AC_SUBST([VCONFIGOP],[VCONFIG]) 105 ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'VCONFIG'@!!g;" 106 else 107 AC_MSG_RESULT([no]) 108 AC_SUBST([VCONFIGOP],[VCONFIG_LEGACY]) 109 ENSC_PATHPROG(VCONFIG, vconfig,, [See http://www.candelatech.com/~greear/vlan.html; usually this tool is shipped in the 'vconfig' or 'vlan' package of your distribution]) 110 fi 111 112 113 ENSC_CHECK_CC_FLAG([-std=c99 -Wall -pedantic -W]) 114 115 AC_MSG_CHECKING([whether to enable extra optimizations]) 116 AC_ARG_ENABLE([extra-optimizations], 117 [AC_HELP_STRING([--disable-extra-optimizations], 118 [disable certain extra optimizations (default: no)])], 119 [case "$enableval" in 120 (yes) use_extra_optimizations=1;; 121 (no) use_extra_optimizations=;; 122 (*) AC_MSG_ERROR(['$enableval' is not a valid value for '--disable-extra-optimizations']);; 123 esac], 124 [use_extra_optimizations=1]) 125 126 if test x"$use_extra_optimizations" = x; then 127 AC_MSG_RESULT(no) 128 else 129 AC_MSG_RESULT(yes) 130 ENSC_CHECK_CC_FLAG([-funit-at-a-time]) 131 fi 132 133 AC_MSG_CHECKING([whether to enable debug-code in library]) 134 AC_ARG_ENABLE([lib-debug], 135 [AC_HELP_STRING([--enable-lib-debug], 136 [enable additional debug code in library (default: no)])], 137 [case "$enableval" in 138 (yes) use_lib_debug=1;; 139 (no) use_lib_debug=;; 140 (*) AC_MSG_ERROR(['$enableval' is not a valid value for '--enable-lib-debug']);; 141 esac], 142 [ use_lib_debug= ]) 143 144 if test x"$use_lib_debug" = x; then 145 AC_SUBST(LIB_DEBUG_CPPFLAGS, [-DNDEBUG]) 146 AC_MSG_RESULT(no) 147 else 148 AC_SUBST(LIB_DEBUG_CPPFLAGS, []) 149 AC_MSG_RESULT(yes) 150 fi 151 152 AC_MSG_CHECKING([whether to enable expensive tests]) 153 AC_ARG_ENABLE([expensive-tests], 154 [AC_HELP_STRING([--enable-expensive-tests], 155 [disable tests which might be expensive on some systems (default: no)])], 156 [case "$enableval" in 157 (yes|no) use_expensive_tests=$enableval;; 158 (*) AC_MSG_ERROR(['$enableval' is not a valid value for '--enable-expensive-tests']);; 159 esac], 160 [ use_expensive_tests=no ]) 161 AC_MSG_RESULT($use_expensive_tests) 162 163 AC_SUBST(ENSC_USE_EXPENSIVE_TESTS, "$use_expensive_tests") 164 165 166 ENSC_CHECK_PERSONALITY_FLAGS 167 168 AC_ARG_VAR(CC, [The C compiler]) 169 170 ENSC_INITRDDIR(initrddir) 171 ENSC_RELEASE(RELEASE_CPPFLAGS) 172 173 # HACK: This needs to be before ENSC_DIETLIBC_NEED_COMPAT, or the alternative 174 # syscalls will never be enabled for glibc. 175 ENSC_SYSCALLNR(vserver,273,[lib/syscall-fallback.h]) 176 ENSC_SYSCALL 177 178 dnl ########################### 179 dnl 180 dnl {some dietlibc related tests 181 dnl 182 183 case $host_cpu in 184 (i*86|athlon) min_diet_ver=0.25;; 185 (ia64|hppa*) min_diet_ver=0.29;; 186 (sparc*) min_diet_ver=0.30;; 187 (x86_64) min_diet_ver=0.27;; 188 (*) min_diet_ver=0.28;; 189 esac 190 191 ENSC_ENABLE_DIETLIBC(USE_DIETLIBC, [$min_diet_ver]) 192 193 if test x"$ensc_have_dietlibc" = xno; then 194 AC_MSG_WARN([*** ***]) 195 AC_MSG_WARN([*** it is strongly recommended to link util-vserver against ***]) 196 AC_MSG_WARN([*** dietlibc; glibc's NSS functions are very unreliable in ***]) 197 AC_MSG_WARN([*** chroot() environments, so you have to expect problems ***]) 198 AC_MSG_WARN([*** there. ***]) 199 AC_MSG_WARN([*** ***]) 200 AM_CONDITIONAL(USE_DIETLIBC_COMPAT, false) 201 else 202 # HACK: libtool does not have cmdline options to build only 203 # dynamic libraries; this can be done with the 204 # '--disable-static' ./configure option only. As our static 205 # libraries will be build with dietlibc, we have to do set 206 # this option which is evaluated by 'AC_PROG_LIBTOOL' 207 # below. Therefore, this macro must not be called earlier. 208 enable_static=no 209 210 ENSC_DIETLIBC_NEED_COMPAT(USE_DIETLIBC_COMPAT) 211 fi 212 213 AM_CONDITIONAL(ENSC_USE_DIETLIBC, test x"$ensc_have_dietlibc" = xyes) 214 AM_CONDITIONAL(ENSC_USE_GLIBC, true) 215 216 # HACK: see comments at 'enable_static' above 217 AC_PROG_LIBTOOL 218 dnl 219 dnl dietlibc stuff ends here} 220 dnl 221 dnl ########################## 222 223 224 ENSC_UV_VROOTDIR(vserverdir) 225 ENSC_CHANGELOG 226 227 228 dnl ########################## 229 dnl 230 dnl {Check whether to use external kernel headers 231 dnl 232 AC_MSG_CHECKING([whether to use internal kernel headers]) 233 AC_ARG_ENABLE([internal-headers], 234 [AC_HELP_STRING([--disable-internal-headers], 235 [use vserver specific headers from the kernel instead of the shipped versions (default: no)])], 236 [case "$enableval" in 237 (yes|no) ;; 238 (*) AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);; 239 esac], 240 [enable_internal_headers=yes]) 241 242 AM_CONDITIONAL(ENSC_ENABLE_INTERNAL_HEADERS, [test x"$enable_internal_headers" = xyes]) 243 AC_MSG_RESULT([$enable_internal_headers]) 244 dnl 245 dnl the check regarding external kernel headers ends here} 246 dnl 247 dnl ########################## 248 249 dnl ########################## 250 dnl 251 dnl {Check for the APIs to be used 252 dnl 253 AH_TEMPLATE(VC_ENABLE_API_COMPAT, [Enable support for compatibility syscall API]) 254 AH_TEMPLATE(VC_ENABLE_API_LEGACY, [Enable support for old, /proc parsing API]) 255 AH_TEMPLATE(VC_ENABLE_API_V11, [Enable support for API of vserver 1.1.x]) 256 AH_TEMPLATE(VC_ENABLE_API_FSCOMPAT, [Enable support for filesystem compatibility API]) 257 AH_TEMPLATE(VC_ENABLE_API_V13OBS, [Enable support for some obsoleted API of vserver 1.3.x]) 258 AH_TEMPLATE(VC_ENABLE_API_V13, [Enable support for API of vserver 1.3.x]) 259 AH_TEMPLATE(VC_ENABLE_API_NET, [Enable support for network context API]) 260 AH_TEMPLATE(VC_ENABLE_API_V21, [Enable support for API of vserver 2.1.x]) 261 AH_TEMPLATE(VC_ENABLE_API_V22, [Enable support for API of vserver 2.2.x]) 262 AH_TEMPLATE(VC_ENABLE_API_V23, [Enable support for API of vserver 2.3.x]) 263 AH_TEMPLATE(VC_ENABLE_API_NETV2, [Enable support for new networking API]) 264 AH_TEMPLATE(VC_ENABLE_API_OLDPROC, [Enable API for a backward compatible /proc parsing]) 265 AH_TEMPLATE(VC_ENABLE_API_OLDUTS, [Enable API for a backward compatible uts handling]) 266 267 AC_MSG_CHECKING([for supported APIs]) 268 AC_ARG_ENABLE([apis], 269 [AC_HELP_STRING([--enable-apis=APIS], 270 [enable support for the given apis; possible values are: legacy,compat,v11,fscompat,v13obs,v13,net,v21,v22,v23,netv2 ALL,NOLEGACY (default: v13,net,v21,v22,v23,netv2)])], 271 [], 272 [enable_apis=v13,net,v21,v22,v23,netv2]) 273 274 test x"$enable_apis" != xALL || enable_apis='legacy,compat,v11,fscompat,v13obs,v13,net,v21,v22,v23,netv2' 275 test x"$enable_apis" != xNOLEGACY || enable_apis='compat,v11,fscompat,v13,net,v21,v22,v23,netv2' 276 enable_api_oldproc= 277 enable_api_olduts= 278 279 echo $enable_apis | sed 's/,/\n/g' | while read i; do 280 case "$i" in 281 (compat) AC_DEFINE(VC_ENABLE_API_COMPAT, 1) 282 enable_api_oldproc=${enable_api_oldproc:-1} 283 enable_api_olduts=${enable_api_olduts:-1} 284 ;; 285 (legacy) AC_DEFINE(VC_ENABLE_API_LEGACY, 1) 286 enable_api_oldproc=${enable_api_oldproc:-1} 287 enable_api_olduts=${enable_api_olduts:-1} 288 ;; 289 (v11) AC_DEFINE(VC_ENABLE_API_V11, 1) 290 enable_api_oldproc=${enable_api_oldproc:-1} 291 enable_api_olduts=${enable_api_olduts:-1} 292 ;; 293 (fscompat) AC_DEFINE(VC_ENABLE_API_FSCOMPAT, 1);; 294 (v13obs) AC_DEFINE(VC_ENABLE_API_V13OBS, 1) 295 AC_DEFINE(VC_ENABLE_API_V13, 1);; 296 (v13) AC_DEFINE(VC_ENABLE_API_V13, 1);; 297 (net) AC_DEFINE(VC_ENABLE_API_NET, 1);; 298 (v21) AC_DEFINE(VC_ENABLE_API_V21, 1);; 299 (v22) AC_DEFINE(VC_ENABLE_API_V22, 1);; 300 (v23) AC_DEFINE(VC_ENABLE_API_V23, 1);; 301 (netv2) AC_DEFINE(VC_ENABLE_API_NETV2, 1);; 302 (oldproc) enable_api_oldproc=2;; 303 (olduts) enable_api_olduts=2;; 304 (*) AC_MSG_ERROR(['$i' is not a supported API]);; 305 esac 306 done 307 if test x"$enable_api_oldproc" != x; then 308 AC_DEFINE(VC_ENABLE_API_OLDPROC, 1) 309 test x"$enable_api_oldproc" != x2 && enable_apis="$enable_apis,oldproc" 310 fi 311 if test x"$enable_api_olduts" != x; then 312 AC_DEFINE(VC_ENABLE_API_OLDUTS, 1) 313 test x"$enable_api_olduts" != x2 && enable_apis="$enable_apis,olduts" 314 fi 315 AC_MSG_RESULT([$enable_apis]) 316 dnl 317 dnl the check for used APIs ends here} 318 dnl 319 dnl ########################## 320 321 322 ENSC_CHECK_EXT2FS_HEADER 323 AC_CHECK_FUNCS([vserver]) 324 AC_CHECK_DECLS(MS_MOVE,,,[#include <linux/fs.h>]) 325 AC_CHECK_TYPES(xid_t,,,[#include <sys/types.h>]) 326 AC_CHECK_TYPES(nid_t,,,[#include <sys/types.h>]) 327 AC_CHECK_TYPES(tag_t,,,[#include <sys/types.h>]) 328 329 AC_CHECK_HEADERS([sys/capability.h linux/types.h]) 330 331 dnl vlogin might need -lutil 332 if test x"$ensc_have_dietlibc" = xno; then 333 AC_CHECK_FUNC([openpty],, [AC_CHECK_LIB([util], [openpty],, [AC_MSG_ERROR([ 334 **** 335 **** openpty could not be found 336 ****])])]) 337 fi 338 339 340 dnl ######################## 341 dnl 342 dnl {crypto stuff 343 dnl 344 AC_ARG_WITH(crypto-api, 345 AC_HELP_STRING([--with-crypto-api=API], 346 [select crypto api to be used; possible values are `none', `nss', `beecrypt', `auto' (default:auto)]), 347 [case $withval in 348 (none|nss|beecrypt|auto) ensc_crypto_api=$withval;; 349 (yes) ensc_crypto_api=auto;; 350 (no) ensc_crypto_api=none;; 351 (*) AC_MSG_ERROR([invalid crypto-api value, only none,nss,beecrypt,auto are supported]);; 352 esac],[ensc_crypto_api=auto]) 353 354 355 dnl Now, check for matching crypto api. When selected 'auto', the 356 dnl first matching one wins 357 358 dnl ######################## 359 dnl 360 dnl {check for beecrypt 361 dnl 362 case $ensc_crypto_api in 363 (auto|beecrypt) 364 if test x"$ensc_cv_c99_c99compiler" = xyes; then 365 ensc_have_beecrypt=yes 366 367 if test x"$ensc_have_beecrypt" = xyes; then 368 AC_CHECK_HEADER([beecrypt/beecrypt.h], [ : ], 369 [ ensc_have_beecrypt=no ]) 370 fi 371 372 if test x"$ensc_have_beecrypt" = xyes; then 373 AC_CHECK_LIB(beecrypt, hashFunctionContextInit, [ : ], 374 [ ensc_have_beecrypt=no ]) 375 fi 376 else 377 ensc_have_beecrypt=no 378 fi;; 379 esac 380 381 case $ensc_crypto_api in 382 (auto) if test x"$ensc_have_beecrypt" = xyes; then 383 AC_MSG_NOTICE([using beecrypt as crypto api]) 384 ensc_crypto_api=beecrypt 385 fi;; 386 (beecrypt) if test x"$ensc_have_beecrypt" != xyes; then 387 AC_MSG_ERROR([beecrypt crypto api not found]) 388 fi;; 389 esac 390 391 AM_CONDITIONAL(ENSC_HAVE_BEECRYPT, test x"$ensc_have_beecrypt" = xyes) 392 AM_CONDITIONAL(ENSC_CAN_BEECRYPT_WITH_DIETLIBC, false) 393 dnl 394 dnl beecrypt stuff ends here} 395 dnl 396 dnl ######################## 397 398 399 dnl ######################## 400 dnl 401 dnl {check for nss 402 dnl 403 404 case $ensc_crypto_api in 405 (nss) PKG_CHECK_MODULES(NSS, nss);; 406 (auto) PKG_CHECK_MODULES(NSS, nss, [ 407 AC_MSG_NOTICE([using NSS as crypto api]) 408 ensc_crypto_api=nss]);; 409 esac 410 411 dnl 412 dnl nss stuff ends here} 413 dnl 414 dnl ######################## 415 416 case $ensc_crypto_api in 417 (beecrypt) 418 ENSC_HAVE_CRYPTO=true 419 ENSC_CRYPTO_API=ENSC_CRYPTO_API_BEECRYPT 420 ENSC_CRYPTO_CFLAGS= 421 ENSC_CRYPTO_LIB=-lbeecrypt 422 ENSC_CAN_CRYPTO_WITH_DIETLIBC=false 423 ;; 424 425 (nss) 426 ENSC_HAVE_CRYPTO=true 427 ENSC_CRYPTO_API=ENSC_CRYPTO_API_NSS 428 ENSC_CRYPTO_CFLAGS=$NSS_CFLAGS 429 ENSC_CRYPTO_LIB=$NSS_LIBS 430 ENSC_CAN_CRYPTO_WITH_DIETLIBC=false 431 ;; 432 433 (none|auto) 434 ENSC_HAVE_CRYPTO=false 435 ENSC_CRYPTO_API=ENSC_CRYPTO_API_NONE 436 ENSC_CRYPTO_CFLAGS= 437 ENSC_CRYPTO_LIB= 438 ENSC_CAN_CRYPTO_WITH_DIETLIBC=false 439 440 AC_MSG_WARN([No crypto api found/select. This will disable the build of 'vhashify']) 441 ;; 442 443 (*) AC_MSG_ERROR([internal error]) 444 esac 445 446 AM_CONDITIONAL(ENSC_HAVE_CRYPTO, $ENSC_HAVE_CRYPTO) 447 AM_CONDITIONAL(ENSC_CAN_CRYPTO_WITH_DIETLIBC, $ENSC_CAN_CRYPTO_WITH_DIETLIBC) 448 AC_SUBST(ENSC_CRYPTO_CFLAGS, $ENSC_CRYPTO_CFLAGS) 449 AC_SUBST(ENSC_CRYPTO_LIB, $ENSC_CRYPTO_LIB) 450 AC_DEFINE_UNQUOTED(ENSC_CRYPTO_API, $ENSC_CRYPTO_API, [Used crypto API]) 451 452 dnl 453 dnl crypto stuff ends here} 454 dnl 455 dnl ######################## 456 457 458 dnl Check what distro this is, use Gentoo initscripts if appropriate 459 AC_MSG_CHECKING([for host initscripts]) 460 AC_ARG_WITH(initscripts, AC_HELP_STRING([--with-initscripts=TYPE], [force host initscripts; valid values are 'gentoo' and 'sysv' (default: guess)]), [ 461 case "$withval" in 462 gentoo) ensc_with_init=gentoo;; 463 sysv) ensc_with_init=sysv;; 464 *) AC_MSG_ERROR([invalid initscripts value, only gentoo and sysv are supported]);; 465 esac 466 ], [ 467 if test -e /etc/gentoo-release; then 468 ensc_with_init=gentoo 469 else 470 ensc_with_init=sysv 471 fi 472 ]) 473 AC_MSG_RESULT([$ensc_with_init]) 474 AM_CONDITIONAL(HAVE_GENTOO_INIT, test x"$ensc_with_init" = xgentoo) 475 AM_CONDITIONAL(HAVE_SYSV_INIT, test x"$ensc_with_init" = xsysv) 476 477 dnl Check 478 AC_MSG_CHECKING([whether to enable systemd support]) 479 AC_ARG_ENABLE([systemd], 480 [AC_HELP_STRING([--disable-systemd],[disable systemd support])], 481 [],[enable_systemd=auto]) 482 483 AS_CASE([$enable_systemd], 484 [yes|no], [AC_MSG_RESULT([$enable_systemd])], 485 [auto], [ 486 PKG_CHECK_EXISTS([systemd], [enable_systemd=yes], [enable_systemd=no]) 487 AC_MSG_RESULT([$enable_systemd (auto)]) 488 ], 489 [AC_MSG_ERROR(['$enable_systemd' is not a valid value for '--enable-systemd'])]) 490 491 if test x"$enable_systemd" != xyes; then 492 AM_CONDITIONAL([HAVE_SYSTEMD], [false]) 493 else 494 PKG_CHECK_MODULES([SYSTEMD], [systemd]) 495 dnl 'tmpfilesdir' and 'sysctldir' require a very recent version of 496 dnl systemd; provide fallback values for RHEL7 and Fedora 20... 497 PKG_CHECK_VAR([SYSTEMD_TMPFILESDIR], [systemd], [tmpfilesdir],[], 498 [SYSTEMD_TMPFILESDIR='${prefix}/lib/tmpfiles.d']) 499 PKG_CHECK_VAR([SYSTEMD_SYSCTLDIR], [systemd], [sysctldir],[], 500 [SYSTEMD_SYSCTLDIR='${prefix}/lib/sysctl.d']) 501 PKG_CHECK_VAR([SYSTEMD_UNITDIR], [systemd], [systemdsystemunitdir]) 502 PKG_CHECK_VAR([SYSTEMD_GENERATORDIR], [systemd], [systemdsystemgeneratordir]) 503 AM_CONDITIONAL([HAVE_SYSTEMD], [true]) 504 fi 505 506 dnl ######################## 507 dnl Check for Python 508 509 ensc_have_python=yes 510 AM_PATH_PYTHON([2.4],, [:]) 511 if test "x$PYTHON" = x:; then 512 ensc_have_python=no 513 fi 514 if test x$ensc_have_python = xyes; then 515 PYTHON_CFLAGS=-I`$PYTHON -c 'from distutils.sysconfig import get_python_inc; print(get_python_inc(1))'` 516 PYTHON_LDFLAGS=-L`$PYTHON -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib(1))'` 517 AC_SUBST(PYTHON_CFLAGS) 518 AC_SUBST(PYTHON_LDFLAGS) 519 else 520 ensc_have_python=no 521 fi 522 AC_PATH_PROG([CTAGS], [ctags], [no]) 523 if test "x$CTAGS" = xno; then 524 ensc_have_python=no 525 fi 526 AM_CONDITIONAL([HAVE_PYTHON], [test x$ensc_have_python = xyes]) 527 528 dnl Python stuff ends here 529 dnl ######################## 530 531 532 dnl ######################## 533 dnl Library versioning 534 535 ensc_have_versioning=yes 536 AC_ARG_ENABLE(versioning, AC_HELP_STRING([--disable-versioning], [Disable library versioning]), [ensc_have_versioning="$enableval"]) 537 AM_CONDITIONAL([HAVE_VERSIONING], [test "x$ensc_have_versioning" = xyes]) 538 if test "x$ensc_have_versioning" = xyes; then 539 AC_DEFINE([HAVE_VERSIONING], [1], [Define this to use library versioning]) 540 fi 541 542 dnl /Library versioning 543 dnl ######################## 544 545 dnl Check for pkglibdir and pkgdatadir being identical 546 AM_CONDITIONAL([PKGLIBDIR_IS_PKGLIBEXECDIR], [test "x$libdir" = "x$libexecdir"]) 547 548 549 dnl BIG HACK! Do some autodetection here! 550 AC_DEFINE(UTMP_GID, [22], [The utmp gid-number]) 551 552 if false; then 553 AC_DEFINE(HAVE_GROWING_STACK, [1], [Define to 1 if the stack is on growing addresses]) 554 fi 555 556 AC_DEFINE(_FILE_OFFSET_BITS, [64], [Use 64bit interface for filesystem operations]) 557 558 dnl ######################## 559 dnl 560 dnl {The final info-page 561 dnl 562 ensc_cxx_affected=" (affected: vbuild, vcheck)" 563 ensc_c99_affected=" (affected: vunify, vcopy, vhashify, vdlimit)" 564 ensc_diet_msg=" (you have been warned)" 565 ensc_diet_version_msg=" ($ensc_version_dietlibc)" 566 ensc_diet_compat_msg=" (using -lcompat)" 567 test x"$ensc_cv_cxx_cxxcompiler" = xno || ensc_cxx_affected= 568 test x"$ensc_cv_c99_c99compiler" = xno || ensc_c99_affected= 569 test x"$ensc_have_dietlibc" = xno || ensc_diet_msg= 570 test x"$ensc_version_dietlibc" != x || ensc_diet_version_msg= 571 test x"$ensc_have_dietlibc$ensc_cv_c_dietlibc_compat" = xyesyes || ensc_diet_compat_msg= 572 573 AH_BOTTOM([#include "compat.h" 574 ]) 575 AC_CONFIG_COMMANDS_PRE([ 576 FEATURES_TXT="\ 577 Features: 578 CC: $CC, $($CC --version | sed -e '1p;d') 579 CPPFLAGS: '$CPPFLAGS' 580 CFLAGS: '$CFLAGS' 581 build/host: $build/$host 582 Use dietlibc: $ensc_have_dietlibc$ensc_diet_version_msg$ensc_diet_msg$ensc_diet_compat_msg 583 Build C++ programs: $ensc_cv_cxx_cxxcompiler$ensc_cxx_affected 584 Build C99 programs: $ensc_cv_c99_c99compiler$ensc_c99_affected 585 Available APIs: $enable_apis 586 ext2fs Source: $ensc_cv_test_ext2fs_header 587 syscall(2) invocation: $with_syscall 588 vserver(2) syscall#: $ensc_cv_value_syscall_vserver 589 crypto api: $ensc_crypto_api 590 python bindings: $ensc_have_python 591 use library versioning: $ensc_have_versioning 592 593 Paths: 594 prefix: $prefix 595 sysconf-Directory: $sysconfdir 596 cfg-Directory: $sysconfdir/vservers 597 initrd-Directory: $initrddir 598 pkgstate-Directory: $localstatedir/run/vservers 599 vserver-Rootdir: $vserverdir 600 " 601 echo "$FEATURES_TXT" >FEATURES.txt 602 ]) 603 dnl 604 dnl final info-page ends here} 605 dnl 606 dnl ######################## 607 608 AC_CONFIG_FILES([util-vserver.spec Makefile distrib/Makefile lib/apidoc/Doxyfile]) 609 AC_OUTPUT 610 611 AC_MSG_NOTICE([ 612 613 $PACKAGE_STRING 614 615 $FEATURES_TXT])