aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLibravatar Reiner Herrmann <reiner@reiner-h.de>2019-06-21 14:48:37 +0200
committerLibravatar Reiner Herrmann <reiner@reiner-h.de>2019-06-21 14:54:59 +0200
commit275978c50742e3ee77cbb5d95a524398bcc546cc (patch)
tree7d55d8942662a9967ba9ed4c7fc453ec7d0a5d48 /configure
parentuse AX_CHECK_COMPILE_FLAG to check for spectre flags (diff)
downloadfirejail-275978c50742e3ee77cbb5d95a524398bcc546cc.tar.gz
firejail-275978c50742e3ee77cbb5d95a524398bcc546cc.tar.zst
firejail-275978c50742e3ee77cbb5d95a524398bcc546cc.zip
use pkg-config macro to locate apparmor and flags
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure836
1 files changed, 523 insertions, 313 deletions
diff --git a/configure b/configure
index c3bca4bb8..6102a470e 100755
--- a/configure
+++ b/configure
@@ -625,6 +625,9 @@ ac_includes_default="\
625ac_subst_vars='LTLIBOBJS 625ac_subst_vars='LTLIBOBJS
626LIBOBJS 626LIBOBJS
627HAVE_SECCOMP_H 627HAVE_SECCOMP_H
628EGREP
629GREP
630CPP
628HAVE_CONTRIB_INSTALL 631HAVE_CONTRIB_INSTALL
629HAVE_GCOV 632HAVE_GCOV
630BUSYBOX_WORKAROUND 633BUSYBOX_WORKAROUND
@@ -641,11 +644,13 @@ HAVE_SECCOMP
641HAVE_PRIVATE_HOME 644HAVE_PRIVATE_HOME
642HAVE_OVERLAYFS 645HAVE_OVERLAYFS
643EXTRA_LDFLAGS 646EXTRA_LDFLAGS
644EGREP
645GREP
646CPP
647HAVE_APPARMOR
648EXTRA_CFLAGS 647EXTRA_CFLAGS
648HAVE_APPARMOR
649AA_LIBS
650AA_CFLAGS
651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
653PKG_CONFIG
649RANLIB 654RANLIB
650INSTALL_DATA 655INSTALL_DATA
651INSTALL_SCRIPT 656INSTALL_SCRIPT
@@ -724,6 +729,11 @@ CFLAGS
724LDFLAGS 729LDFLAGS
725LIBS 730LIBS
726CPPFLAGS 731CPPFLAGS
732PKG_CONFIG
733PKG_CONFIG_PATH
734PKG_CONFIG_LIBDIR
735AA_CFLAGS
736AA_LIBS
727CPP' 737CPP'
728 738
729 739
@@ -1373,6 +1383,13 @@ Some influential environment variables:
1373 LIBS libraries to pass to the linker, e.g. -l<library> 1383 LIBS libraries to pass to the linker, e.g. -l<library>
1374 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1384 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1375 you have headers in a nonstandard directory <include dir> 1385 you have headers in a nonstandard directory <include dir>
1386 PKG_CONFIG path to pkg-config utility
1387 PKG_CONFIG_PATH
1388 directories to add to pkg-config's search path
1389 PKG_CONFIG_LIBDIR
1390 path overriding pkg-config's built-in search path
1391 AA_CFLAGS C compiler flags for AA, overriding pkg-config
1392 AA_LIBS linker flags for AA, overriding pkg-config
1376 CPP C preprocessor 1393 CPP C preprocessor
1377 1394
1378Use these variables to override the choices made by `configure' or to help 1395Use these variables to override the choices made by `configure' or to help
@@ -1494,6 +1511,52 @@ fi
1494 1511
1495} # ac_fn_c_try_compile 1512} # ac_fn_c_try_compile
1496 1513
1514# ac_fn_c_try_link LINENO
1515# -----------------------
1516# Try to link conftest.$ac_ext, and return whether this succeeded.
1517ac_fn_c_try_link ()
1518{
1519 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1520 rm -f conftest.$ac_objext conftest$ac_exeext
1521 if { { ac_try="$ac_link"
1522case "(($ac_try" in
1523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1524 *) ac_try_echo=$ac_try;;
1525esac
1526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1527$as_echo "$ac_try_echo"; } >&5
1528 (eval "$ac_link") 2>conftest.err
1529 ac_status=$?
1530 if test -s conftest.err; then
1531 grep -v '^ *+' conftest.err >conftest.er1
1532 cat conftest.er1 >&5
1533 mv -f conftest.er1 conftest.err
1534 fi
1535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1536 test $ac_status = 0; } && {
1537 test -z "$ac_c_werror_flag" ||
1538 test ! -s conftest.err
1539 } && test -s conftest$ac_exeext && {
1540 test "$cross_compiling" = yes ||
1541 test -x conftest$ac_exeext
1542 }; then :
1543 ac_retval=0
1544else
1545 $as_echo "$as_me: failed program was:" >&5
1546sed 's/^/| /' conftest.$ac_ext >&5
1547
1548 ac_retval=1
1549fi
1550 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1551 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1552 # interfere with the next link command; also delete a directory that is
1553 # left behind by Apple's compiler. We do this before executing the actions.
1554 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1555 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1556 as_fn_set_status $ac_retval
1557
1558} # ac_fn_c_try_link
1559
1497# ac_fn_c_try_cpp LINENO 1560# ac_fn_c_try_cpp LINENO
1498# ---------------------- 1561# ----------------------
1499# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1562# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1694,52 +1757,6 @@ $as_echo "$ac_res" >&6; }
1694 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1695 1758
1696} # ac_fn_c_check_header_compile 1759} # ac_fn_c_check_header_compile
1697
1698# ac_fn_c_try_link LINENO
1699# -----------------------
1700# Try to link conftest.$ac_ext, and return whether this succeeded.
1701ac_fn_c_try_link ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 rm -f conftest.$ac_objext conftest$ac_exeext
1705 if { { ac_try="$ac_link"
1706case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_link") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1718 fi
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && {
1721 test -z "$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 } && test -s conftest$ac_exeext && {
1724 test "$cross_compiling" = yes ||
1725 test -x conftest$ac_exeext
1726 }; then :
1727 ac_retval=0
1728else
1729 $as_echo "$as_me: failed program was:" >&5
1730sed 's/^/| /' conftest.$ac_ext >&5
1731
1732 ac_retval=1
1733fi
1734 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1735 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1736 # interfere with the next link command; also delete a directory that is
1737 # left behind by Apple's compiler. We do this before executing the actions.
1738 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740 as_fn_set_status $ac_retval
1741
1742} # ac_fn_c_try_link
1743cat >config.log <<_ACEOF 1760cat >config.log <<_ACEOF
1744This file contains any messages produced by compilers while 1761This file contains any messages produced by compilers while
1745running configure, to aid debugging if configure makes a mistake. 1762running configure, to aid debugging if configure makes a mistake.
@@ -2093,7 +2110,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2093 2110
2094 2111
2095 2112
2096#AC_CONFIG_HEADERS([config.h])
2097 2113
2098 2114
2099 2115
@@ -2886,7 +2902,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2887ac_compiler_gnu=$ac_cv_c_compiler_gnu 2903ac_compiler_gnu=$ac_cv_c_compiler_gnu
2888 2904
2889#AC_PROG_CXX
2890ac_aux_dir= 2905ac_aux_dir=
2891for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 2906for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2892 if test -f "$ac_dir/install-sh"; then 2907 if test -f "$ac_dir/install-sh"; then
@@ -3177,18 +3192,473 @@ else
3177fi 3192fi
3178 3193
3179 3194
3180
3181HAVE_APPARMOR="" 3195HAVE_APPARMOR=""
3182# Check whether --enable-apparmor was given. 3196# Check whether --enable-apparmor was given.
3183if test "${enable_apparmor+set}" = set; then : 3197if test "${enable_apparmor+set}" = set; then :
3184 enableval=$enable_apparmor; 3198 enableval=$enable_apparmor;
3185fi 3199fi
3186 3200
3201
3202
3203
3204
3205
3206
3207
3208if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
3209 if test -n "$ac_tool_prefix"; then
3210 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3211set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3213$as_echo_n "checking for $ac_word... " >&6; }
3214if ${ac_cv_path_PKG_CONFIG+:} false; then :
3215 $as_echo_n "(cached) " >&6
3216else
3217 case $PKG_CONFIG in
3218 [\\/]* | ?:[\\/]*)
3219 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3220 ;;
3221 *)
3222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223for as_dir in $PATH
3224do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
3227 for ac_exec_ext in '' $ac_executable_extensions; do
3228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3231 break 2
3232 fi
3233done
3234 done
3235IFS=$as_save_IFS
3236
3237 ;;
3238esac
3239fi
3240PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3241if test -n "$PKG_CONFIG"; then
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
3243$as_echo "$PKG_CONFIG" >&6; }
3244else
3245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3246$as_echo "no" >&6; }
3247fi
3248
3249
3250fi
3251if test -z "$ac_cv_path_PKG_CONFIG"; then
3252 ac_pt_PKG_CONFIG=$PKG_CONFIG
3253 # Extract the first word of "pkg-config", so it can be a program name with args.
3254set dummy pkg-config; ac_word=$2
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3256$as_echo_n "checking for $ac_word... " >&6; }
3257if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
3258 $as_echo_n "(cached) " >&6
3259else
3260 case $ac_pt_PKG_CONFIG in
3261 [\\/]* | ?:[\\/]*)
3262 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3263 ;;
3264 *)
3265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3266for as_dir in $PATH
3267do
3268 IFS=$as_save_IFS
3269 test -z "$as_dir" && as_dir=.
3270 for ac_exec_ext in '' $ac_executable_extensions; do
3271 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3272 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3273 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3274 break 2
3275 fi
3276done
3277 done
3278IFS=$as_save_IFS
3279
3280 ;;
3281esac
3282fi
3283ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3284if test -n "$ac_pt_PKG_CONFIG"; then
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
3286$as_echo "$ac_pt_PKG_CONFIG" >&6; }
3287else
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289$as_echo "no" >&6; }
3290fi
3291
3292 if test "x$ac_pt_PKG_CONFIG" = x; then
3293 PKG_CONFIG=""
3294 else
3295 case $cross_compiling:$ac_tool_warned in
3296yes:)
3297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3299ac_tool_warned=yes ;;
3300esac
3301 PKG_CONFIG=$ac_pt_PKG_CONFIG
3302 fi
3303else
3304 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3305fi
3306
3307fi
3308if test -n "$PKG_CONFIG"; then
3309 _pkg_min_version=0.9.0
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
3311$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
3312 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
3313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3314$as_echo "yes" >&6; }
3315 else
3316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3317$as_echo "no" >&6; }
3318 PKG_CONFIG=""
3319 fi
3320fi
3187if test "x$enable_apparmor" = "xyes"; then : 3321if test "x$enable_apparmor" = "xyes"; then :
3188 3322
3189 HAVE_APPARMOR="-DHAVE_APPARMOR" 3323 HAVE_APPARMOR="-DHAVE_APPARMOR"
3190 3324
3325pkg_failed=no
3326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AA" >&5
3327$as_echo_n "checking for AA... " >&6; }
3328
3329if test -n "$AA_CFLAGS"; then
3330 pkg_cv_AA_CFLAGS="$AA_CFLAGS"
3331 elif test -n "$PKG_CONFIG"; then
3332 if test -n "$PKG_CONFIG" && \
3333 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libapparmor\""; } >&5
3334 ($PKG_CONFIG --exists --print-errors "libapparmor") 2>&5
3335 ac_status=$?
3336 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3337 test $ac_status = 0; }; then
3338 pkg_cv_AA_CFLAGS=`$PKG_CONFIG --cflags "libapparmor" 2>/dev/null`
3339 test "x$?" != "x0" && pkg_failed=yes
3340else
3341 pkg_failed=yes
3342fi
3343 else
3344 pkg_failed=untried
3345fi
3346if test -n "$AA_LIBS"; then
3347 pkg_cv_AA_LIBS="$AA_LIBS"
3348 elif test -n "$PKG_CONFIG"; then
3349 if test -n "$PKG_CONFIG" && \
3350 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libapparmor\""; } >&5
3351 ($PKG_CONFIG --exists --print-errors "libapparmor") 2>&5
3352 ac_status=$?
3353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3354 test $ac_status = 0; }; then
3355 pkg_cv_AA_LIBS=`$PKG_CONFIG --libs "libapparmor" 2>/dev/null`
3356 test "x$?" != "x0" && pkg_failed=yes
3357else
3358 pkg_failed=yes
3359fi
3360 else
3361 pkg_failed=untried
3362fi
3363
3364
3365
3366if test $pkg_failed = yes; then
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368$as_echo "no" >&6; }
3369
3370if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
3371 _pkg_short_errors_supported=yes
3372else
3373 _pkg_short_errors_supported=no
3374fi
3375 if test $_pkg_short_errors_supported = yes; then
3376 AA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libapparmor" 2>&1`
3377 else
3378 AA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libapparmor" 2>&1`
3379 fi
3380 # Put the nasty error message in config.log where it belongs
3381 echo "$AA_PKG_ERRORS" >&5
3382
3383 as_fn_error $? "Package requirements (libapparmor) were not met:
3384
3385$AA_PKG_ERRORS
3386
3387Consider adjusting the PKG_CONFIG_PATH environment variable if you
3388installed software in a non-standard prefix.
3389
3390Alternatively, you may set the environment variables AA_CFLAGS
3391and AA_LIBS to avoid the need to call pkg-config.
3392See the pkg-config man page for more details." "$LINENO" 5
3393elif test $pkg_failed = untried; then
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3395$as_echo "no" >&6; }
3396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3398as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
3399is in your PATH or set the PKG_CONFIG environment variable to the full
3400path to pkg-config.
3401
3402Alternatively, you may set the environment variables AA_CFLAGS
3403and AA_LIBS to avoid the need to call pkg-config.
3404See the pkg-config man page for more details.
3405
3406To get pkg-config, see <http://pkg-config.freedesktop.org/>.
3407See \`config.log' for more details" "$LINENO" 5; }
3408else
3409 AA_CFLAGS=$pkg_cv_AA_CFLAGS
3410 AA_LIBS=$pkg_cv_AA_LIBS
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3412$as_echo "yes" >&6; }
3413 EXTRA_CFLAGS+=" $AA_CFLAGS" && EXTRA_LDFLAGS+=" $AA_LIBS"
3414fi
3415
3416
3417fi
3418
3419
3420
3421
3422
3423HAVE_OVERLAYFS=""
3424# Check whether --enable-overlayfs was given.
3425if test "${enable_overlayfs+set}" = set; then :
3426 enableval=$enable_overlayfs;
3427fi
3428
3429if test "x$enable_overlayfs" != "xno"; then :
3430
3431 HAVE_OVERLAYFS="-DHAVE_OVERLAYFS"
3432
3433
3434fi
3435
3436HAVE_PRIVATEHOME=""
3437# Check whether --enable-private-home was given.
3438if test "${enable_private_home+set}" = set; then :
3439 enableval=$enable_private_home;
3440fi
3441
3442if test "x$enable_private_home" != "xno"; then :
3443
3444 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME"
3445
3446
3447fi
3448
3449HAVE_SECCOMP=""
3450# Check whether --enable-seccomp was given.
3451if test "${enable_seccomp+set}" = set; then :
3452 enableval=$enable_seccomp;
3453fi
3454
3455if test "x$enable_seccomp" != "xno"; then :
3456
3457 HAVE_SECCOMP="-DHAVE_SECCOMP"
3458
3459
3460fi
3461
3462HAVE_CHROOT=""
3463# Check whether --enable-chroot was given.
3464if test "${enable_chroot+set}" = set; then :
3465 enableval=$enable_chroot;
3466fi
3467
3468if test "x$enable_chroot" != "xno"; then :
3469
3470 HAVE_CHROOT="-DHAVE_CHROOT"
3471
3472
3473fi
3474
3475HAVE_GLOBALCFG=""
3476# Check whether --enable-globalcfg was given.
3477if test "${enable_globalcfg+set}" = set; then :
3478 enableval=$enable_globalcfg;
3479fi
3480
3481if test "x$enable_globalcfg" != "xno"; then :
3482
3483 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
3484
3485
3486fi
3487
3488HAVE_NETWORK=""
3489# Check whether --enable-network was given.
3490if test "${enable_network+set}" = set; then :
3491 enableval=$enable_network;
3492fi
3493
3494if test "x$enable_network" != "xno"; then :
3495
3496 HAVE_NETWORK="-DHAVE_NETWORK"
3497
3498
3499fi
3500
3501HAVE_USERNS=""
3502# Check whether --enable-userns was given.
3503if test "${enable_userns+set}" = set; then :
3504 enableval=$enable_userns;
3505fi
3506
3507if test "x$enable_userns" != "xno"; then :
3508
3509 HAVE_USERNS="-DHAVE_USERNS"
3510
3511
3512fi
3513
3514HAVE_X11=""
3515# Check whether --enable-x11 was given.
3516if test "${enable_x11+set}" = set; then :
3517 enableval=$enable_x11;
3518fi
3519
3520if test "x$enable_x11" != "xno"; then :
3521
3522 HAVE_X11="-DHAVE_X11"
3523
3524
3525fi
3526
3527HAVE_FILE_TRANSFER=""
3528# Check whether --enable-file-transfer was given.
3529if test "${enable_file_transfer+set}" = set; then :
3530 enableval=$enable_file_transfer;
3531fi
3532
3533if test "x$enable_file_transfer" != "xno"; then :
3534
3535 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
3536
3537
3538fi
3539
3540HAVE_WHITELIST=""
3541# Check whether --enable-whitelist was given.
3542if test "${enable_whitelist+set}" = set; then :
3543 enableval=$enable_whitelist;
3544fi
3545
3546if test "x$enable_whitelist" != "xno"; then :
3547
3548 HAVE_WHITELIST="-DHAVE_WHITELIST"
3549
3550
3551fi
3552
3553HAVE_SUID=""
3554# Check whether --enable-suid was given.
3555if test "${enable_suid+set}" = set; then :
3556 enableval=$enable_suid;
3557fi
3558
3559if test "x$enable_suid" = "xno"; then :
3560 HAVE_SUID="no"
3561else
3562 HAVE_SUID="yes"
3563
3564fi
3565
3566
3567HAVE_FATAL_WARNINGS=""
3568# Check whether --enable-fatal_warnings was given.
3569if test "${enable_fatal_warnings+set}" = set; then :
3570 enableval=$enable_fatal_warnings;
3571fi
3572
3573if test "x$enable_fatal_warnings" = "xyes"; then :
3574
3575 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
3576
3577
3578fi
3579
3580BUSYBOX_WORKAROUND="no"
3581# Check whether --enable-busybox-workaround was given.
3582if test "${enable_busybox_workaround+set}" = set; then :
3583 enableval=$enable_busybox_workaround;
3584fi
3585
3586if test "x$enable_busybox_workaround" = "xyes"; then :
3587
3588 BUSYBOX_WORKAROUND="yes"
3589
3590
3591fi
3592
3593
3594HAVE_GCOV=""
3595# Check whether --enable-gcov was given.
3596if test "${enable_gcov+set}" = set; then :
3597 enableval=$enable_gcov;
3598fi
3599
3600if test "x$enable_gcov" = "xyes"; then :
3601
3602 HAVE_GCOV="--coverage -DHAVE_GCOV "
3603 EXTRA_LDFLAGS+=" -lgcov --coverage "
3604
3605
3606fi
3607
3608HAVE_CONTRIB_INSTALL="yes"
3609# Check whether --enable-contrib-install was given.
3610if test "${enable_contrib_install+set}" = set; then :
3611 enableval=$enable_contrib_install;
3612fi
3613
3614if test "x$enable_contrib_install" = "xno"; then :
3615 HAVE_CONTRIB_INSTALL="no"
3616else
3617 HAVE_CONTRIB_INSTALL="yes"
3618
3619fi
3620
3621
3622# checking pthread library
3623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
3624$as_echo_n "checking for main in -lpthread... " >&6; }
3625if ${ac_cv_lib_pthread_main+:} false; then :
3626 $as_echo_n "(cached) " >&6
3627else
3628 ac_check_lib_save_LIBS=$LIBS
3629LIBS="-lpthread $LIBS"
3630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3631/* end confdefs.h. */
3632
3633
3634int
3635main ()
3636{
3637return main ();
3638 ;
3639 return 0;
3640}
3641_ACEOF
3642if ac_fn_c_try_link "$LINENO"; then :
3643 ac_cv_lib_pthread_main=yes
3644else
3645 ac_cv_lib_pthread_main=no
3646fi
3647rm -f core conftest.err conftest.$ac_objext \
3648 conftest$ac_exeext conftest.$ac_ext
3649LIBS=$ac_check_lib_save_LIBS
3650fi
3651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
3652$as_echo "$ac_cv_lib_pthread_main" >&6; }
3653if test "x$ac_cv_lib_pthread_main" = xyes; then :
3654 cat >>confdefs.h <<_ACEOF
3655#define HAVE_LIBPTHREAD 1
3656_ACEOF
3657
3658 LIBS="-lpthread $LIBS"
3191 3659
3660else
3661 as_fn_error $? "*** POSIX thread support not installed ***" "$LINENO" 5
3192fi 3662fi
3193 3663
3194ac_ext=c 3664ac_ext=c
@@ -3588,266 +4058,6 @@ fi
3588done 4058done
3589 4059
3590 4060
3591if test "x$enable_apparmor" = "xyes"; then :
3592
3593 ac_fn_c_check_header_mongrel "$LINENO" "sys/apparmor.h" "ac_cv_header_sys_apparmor_h" "$ac_includes_default"
3594if test "x$ac_cv_header_sys_apparmor_h" = xyes; then :
3595
3596else
3597 as_fn_error $? "Couldn't find sys/apparmor.h... please install apparmor user space library and development files " "$LINENO" 5
3598fi
3599
3600
3601
3602fi
3603if test "x$enable_apparmor" = "xyes"; then :
3604
3605 EXTRA_LDFLAGS+=" -lapparmor "
3606
3607fi
3608
3609
3610HAVE_OVERLAYFS=""
3611# Check whether --enable-overlayfs was given.
3612if test "${enable_overlayfs+set}" = set; then :
3613 enableval=$enable_overlayfs;
3614fi
3615
3616if test "x$enable_overlayfs" != "xno"; then :
3617
3618 HAVE_OVERLAYFS="-DHAVE_OVERLAYFS"
3619
3620
3621fi
3622
3623HAVE_PRIVATEHOME=""
3624# Check whether --enable-private-home was given.
3625if test "${enable_private_home+set}" = set; then :
3626 enableval=$enable_private_home;
3627fi
3628
3629if test "x$enable_private_home" != "xno"; then :
3630
3631 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME"
3632
3633
3634fi
3635
3636HAVE_SECCOMP=""
3637# Check whether --enable-seccomp was given.
3638if test "${enable_seccomp+set}" = set; then :
3639 enableval=$enable_seccomp;
3640fi
3641
3642if test "x$enable_seccomp" != "xno"; then :
3643
3644 HAVE_SECCOMP="-DHAVE_SECCOMP"
3645
3646
3647fi
3648
3649HAVE_CHROOT=""
3650# Check whether --enable-chroot was given.
3651if test "${enable_chroot+set}" = set; then :
3652 enableval=$enable_chroot;
3653fi
3654
3655if test "x$enable_chroot" != "xno"; then :
3656
3657 HAVE_CHROOT="-DHAVE_CHROOT"
3658
3659
3660fi
3661
3662HAVE_GLOBALCFG=""
3663# Check whether --enable-globalcfg was given.
3664if test "${enable_globalcfg+set}" = set; then :
3665 enableval=$enable_globalcfg;
3666fi
3667
3668if test "x$enable_globalcfg" != "xno"; then :
3669
3670 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
3671
3672
3673fi
3674
3675HAVE_NETWORK=""
3676# Check whether --enable-network was given.
3677if test "${enable_network+set}" = set; then :
3678 enableval=$enable_network;
3679fi
3680
3681if test "x$enable_network" != "xno"; then :
3682
3683 HAVE_NETWORK="-DHAVE_NETWORK"
3684
3685
3686fi
3687
3688HAVE_USERNS=""
3689# Check whether --enable-userns was given.
3690if test "${enable_userns+set}" = set; then :
3691 enableval=$enable_userns;
3692fi
3693
3694if test "x$enable_userns" != "xno"; then :
3695
3696 HAVE_USERNS="-DHAVE_USERNS"
3697
3698
3699fi
3700
3701HAVE_X11=""
3702# Check whether --enable-x11 was given.
3703if test "${enable_x11+set}" = set; then :
3704 enableval=$enable_x11;
3705fi
3706
3707if test "x$enable_x11" != "xno"; then :
3708
3709 HAVE_X11="-DHAVE_X11"
3710
3711
3712fi
3713
3714HAVE_FILE_TRANSFER=""
3715# Check whether --enable-file-transfer was given.
3716if test "${enable_file_transfer+set}" = set; then :
3717 enableval=$enable_file_transfer;
3718fi
3719
3720if test "x$enable_file_transfer" != "xno"; then :
3721
3722 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
3723
3724
3725fi
3726
3727HAVE_WHITELIST=""
3728# Check whether --enable-whitelist was given.
3729if test "${enable_whitelist+set}" = set; then :
3730 enableval=$enable_whitelist;
3731fi
3732
3733if test "x$enable_whitelist" != "xno"; then :
3734
3735 HAVE_WHITELIST="-DHAVE_WHITELIST"
3736
3737
3738fi
3739
3740HAVE_SUID=""
3741# Check whether --enable-suid was given.
3742if test "${enable_suid+set}" = set; then :
3743 enableval=$enable_suid;
3744fi
3745
3746if test "x$enable_suid" = "xno"; then :
3747 HAVE_SUID="no"
3748else
3749 HAVE_SUID="yes"
3750
3751fi
3752
3753
3754HAVE_FATAL_WARNINGS=""
3755# Check whether --enable-fatal_warnings was given.
3756if test "${enable_fatal_warnings+set}" = set; then :
3757 enableval=$enable_fatal_warnings;
3758fi
3759
3760if test "x$enable_fatal_warnings" = "xyes"; then :
3761
3762 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
3763
3764
3765fi
3766
3767BUSYBOX_WORKAROUND="no"
3768# Check whether --enable-busybox-workaround was given.
3769if test "${enable_busybox_workaround+set}" = set; then :
3770 enableval=$enable_busybox_workaround;
3771fi
3772
3773if test "x$enable_busybox_workaround" = "xyes"; then :
3774
3775 BUSYBOX_WORKAROUND="yes"
3776
3777
3778fi
3779
3780
3781HAVE_GCOV=""
3782# Check whether --enable-gcov was given.
3783if test "${enable_gcov+set}" = set; then :
3784 enableval=$enable_gcov;
3785fi
3786
3787if test "x$enable_gcov" = "xyes"; then :
3788
3789 HAVE_GCOV="--coverage -DHAVE_GCOV "
3790 EXTRA_LDFLAGS+=" -lgcov --coverage "
3791
3792
3793fi
3794
3795HAVE_CONTRIB_INSTALL="yes"
3796# Check whether --enable-contrib-install was given.
3797if test "${enable_contrib_install+set}" = set; then :
3798 enableval=$enable_contrib_install;
3799fi
3800
3801if test "x$enable_contrib_install" = "xno"; then :
3802 HAVE_CONTRIB_INSTALL="no"
3803else
3804 HAVE_CONTRIB_INSTALL="yes"
3805
3806fi
3807
3808
3809# checking pthread library
3810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
3811$as_echo_n "checking for main in -lpthread... " >&6; }
3812if ${ac_cv_lib_pthread_main+:} false; then :
3813 $as_echo_n "(cached) " >&6
3814else
3815 ac_check_lib_save_LIBS=$LIBS
3816LIBS="-lpthread $LIBS"
3817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3818/* end confdefs.h. */
3819
3820
3821int
3822main ()
3823{
3824return main ();
3825 ;
3826 return 0;
3827}
3828_ACEOF
3829if ac_fn_c_try_link "$LINENO"; then :
3830 ac_cv_lib_pthread_main=yes
3831else
3832 ac_cv_lib_pthread_main=no
3833fi
3834rm -f core conftest.err conftest.$ac_objext \
3835 conftest$ac_exeext conftest.$ac_ext
3836LIBS=$ac_check_lib_save_LIBS
3837fi
3838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
3839$as_echo "$ac_cv_lib_pthread_main" >&6; }
3840if test "x$ac_cv_lib_pthread_main" = xyes; then :
3841 cat >>confdefs.h <<_ACEOF
3842#define HAVE_LIBPTHREAD 1
3843_ACEOF
3844
3845 LIBS="-lpthread $LIBS"
3846
3847else
3848 as_fn_error $? "*** POSIX thread support not installed ***" "$LINENO" 5
3849fi
3850
3851ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 4061ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
3852if test "x$ac_cv_header_pthread_h" = xyes; then : 4062if test "x$ac_cv_header_pthread_h" = xyes; then :
3853 4063