aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-08-02 10:03:28 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-08-02 10:03:28 -0400
commit355c86b0ff225bdc48b27fb4dfcb6232e4ec7b29 (patch)
tree4bc45dad2214b25b279a0d2475c5f7b38269e3d3 /configure
parentMerge pull request #679 from manevich/xephyr (diff)
downloadfirejail-355c86b0ff225bdc48b27fb4dfcb6232e4ec7b29.tar.gz
firejail-355c86b0ff225bdc48b27fb4dfcb6232e4ec7b29.tar.zst
firejail-355c86b0ff225bdc48b27fb4dfcb6232e4ec7b29.zip
apparmor
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure492
1 files changed, 267 insertions, 225 deletions
diff --git a/configure b/configure
index 050b4df9c..0f6f8f7fb 100755
--- a/configure
+++ b/configure
@@ -625,9 +625,6 @@ ac_includes_default="\
625ac_subst_vars='LTLIBOBJS 625ac_subst_vars='LTLIBOBJS
626LIBOBJS 626LIBOBJS
627HAVE_SECCOMP_H 627HAVE_SECCOMP_H
628EGREP
629GREP
630CPP
631HAVE_FATAL_WARNINGS 628HAVE_FATAL_WARNINGS
632HAVE_WHITELIST 629HAVE_WHITELIST
633HAVE_FILE_TRANSFER 630HAVE_FILE_TRANSFER
@@ -638,6 +635,11 @@ HAVE_GLOBALCFG
638HAVE_BIND 635HAVE_BIND
639HAVE_CHROOT 636HAVE_CHROOT
640HAVE_SECCOMP 637HAVE_SECCOMP
638EXTRA_LDFLAGS
639EGREP
640GREP
641CPP
642HAVE_APPARMOR
641RANLIB 643RANLIB
642INSTALL_DATA 644INSTALL_DATA
643INSTALL_SCRIPT 645INSTALL_SCRIPT
@@ -690,6 +692,7 @@ SHELL'
690ac_subst_files='' 692ac_subst_files=''
691ac_user_opts=' 693ac_user_opts='
692enable_option_checking 694enable_option_checking
695enable_apparmor
693enable_seccomp 696enable_seccomp
694enable_chroot 697enable_chroot
695enable_bind 698enable_bind
@@ -1319,6 +1322,7 @@ Optional Features:
1319 --disable-option-checking ignore unrecognized --enable/--with options 1322 --disable-option-checking ignore unrecognized --enable/--with options
1320 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1323 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1321 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1324 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1325 --enable-apparmor enable apparmor
1322 --disable-seccomp disable seccomp 1326 --disable-seccomp disable seccomp
1323 --disable-chroot disable chroot 1327 --disable-chroot disable chroot
1324 --disable-bind disable bind 1328 --disable-bind disable bind
@@ -1462,52 +1466,6 @@ fi
1462 1466
1463} # ac_fn_c_try_compile 1467} # ac_fn_c_try_compile
1464 1468
1465# ac_fn_c_try_link LINENO
1466# -----------------------
1467# Try to link conftest.$ac_ext, and return whether this succeeded.
1468ac_fn_c_try_link ()
1469{
1470 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1471 rm -f conftest.$ac_objext conftest$ac_exeext
1472 if { { ac_try="$ac_link"
1473case "(($ac_try" in
1474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1475 *) ac_try_echo=$ac_try;;
1476esac
1477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1478$as_echo "$ac_try_echo"; } >&5
1479 (eval "$ac_link") 2>conftest.err
1480 ac_status=$?
1481 if test -s conftest.err; then
1482 grep -v '^ *+' conftest.err >conftest.er1
1483 cat conftest.er1 >&5
1484 mv -f conftest.er1 conftest.err
1485 fi
1486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1487 test $ac_status = 0; } && {
1488 test -z "$ac_c_werror_flag" ||
1489 test ! -s conftest.err
1490 } && test -s conftest$ac_exeext && {
1491 test "$cross_compiling" = yes ||
1492 test -x conftest$ac_exeext
1493 }; then :
1494 ac_retval=0
1495else
1496 $as_echo "$as_me: failed program was:" >&5
1497sed 's/^/| /' conftest.$ac_ext >&5
1498
1499 ac_retval=1
1500fi
1501 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1502 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1503 # interfere with the next link command; also delete a directory that is
1504 # left behind by Apple's compiler. We do this before executing the actions.
1505 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1506 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1507 as_fn_set_status $ac_retval
1508
1509} # ac_fn_c_try_link
1510
1511# ac_fn_c_try_cpp LINENO 1469# ac_fn_c_try_cpp LINENO
1512# ---------------------- 1470# ----------------------
1513# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1471# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1708,6 +1666,52 @@ $as_echo "$ac_res" >&6; }
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 1667
1710} # ac_fn_c_check_header_compile 1668} # ac_fn_c_check_header_compile
1669
1670# ac_fn_c_try_link LINENO
1671# -----------------------
1672# Try to link conftest.$ac_ext, and return whether this succeeded.
1673ac_fn_c_try_link ()
1674{
1675 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1676 rm -f conftest.$ac_objext conftest$ac_exeext
1677 if { { ac_try="$ac_link"
1678case "(($ac_try" in
1679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1680 *) ac_try_echo=$ac_try;;
1681esac
1682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1683$as_echo "$ac_try_echo"; } >&5
1684 (eval "$ac_link") 2>conftest.err
1685 ac_status=$?
1686 if test -s conftest.err; then
1687 grep -v '^ *+' conftest.err >conftest.er1
1688 cat conftest.er1 >&5
1689 mv -f conftest.er1 conftest.err
1690 fi
1691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1692 test $ac_status = 0; } && {
1693 test -z "$ac_c_werror_flag" ||
1694 test ! -s conftest.err
1695 } && test -s conftest$ac_exeext && {
1696 test "$cross_compiling" = yes ||
1697 test -x conftest$ac_exeext
1698 }; then :
1699 ac_retval=0
1700else
1701 $as_echo "$as_me: failed program was:" >&5
1702sed 's/^/| /' conftest.$ac_ext >&5
1703
1704 ac_retval=1
1705fi
1706 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1707 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1708 # interfere with the next link command; also delete a directory that is
1709 # left behind by Apple's compiler. We do this before executing the actions.
1710 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1711 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1712 as_fn_set_status $ac_retval
1713
1714} # ac_fn_c_try_link
1711cat >config.log <<_ACEOF 1715cat >config.log <<_ACEOF
1712This file contains any messages produced by compilers while 1716This file contains any messages produced by compilers while
1713running configure, to aid debugging if configure makes a mistake. 1717running configure, to aid debugging if configure makes a mistake.
@@ -3069,189 +3073,23 @@ else
3069fi 3073fi
3070 3074
3071 3075
3072HAVE_SECCOMP="" 3076# Allow to build without apparmor support by calling:
3073# Check whether --enable-seccomp was given. 3077# ./configure --disable-apparmor
3074if test "${enable_seccomp+set}" = set; then : 3078# This makes it possible to run snaps in devmode on almost any host,
3075 enableval=$enable_seccomp; 3079# regardless of the kernel version.
3076fi 3080HAVE_APPARMOR=""
3077 3081# Check whether --enable-apparmor was given.
3078if test "x$enable_seccomp" != "xno"; then : 3082if test "${enable_apparmor+set}" = set; then :
3079 3083 enableval=$enable_apparmor;
3080 HAVE_SECCOMP="-DHAVE_SECCOMP"
3081
3082
3083fi
3084
3085HAVE_CHROOT=""
3086# Check whether --enable-chroot was given.
3087if test "${enable_chroot+set}" = set; then :
3088 enableval=$enable_chroot;
3089fi
3090
3091if test "x$enable_chroot" != "xno"; then :
3092
3093 HAVE_CHROOT="-DHAVE_CHROOT"
3094
3095
3096fi
3097
3098HAVE_BIND=""
3099# Check whether --enable-bind was given.
3100if test "${enable_bind+set}" = set; then :
3101 enableval=$enable_bind;
3102fi
3103
3104if test "x$enable_bind" != "xno"; then :
3105
3106 HAVE_BIND="-DHAVE_BIND"
3107
3108
3109fi
3110
3111HAVE_GLOBALCFG=""
3112# Check whether --enable-globalcfg was given.
3113if test "${enable_globalcfg+set}" = set; then :
3114 enableval=$enable_globalcfg;
3115fi
3116
3117if test "x$enable_globalcfg" != "xno"; then :
3118
3119 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
3120
3121
3122fi
3123
3124HAVE_NETWORK=""
3125# Check whether --enable-network was given.
3126if test "${enable_network+set}" = set; then :
3127 enableval=$enable_network;
3128fi
3129
3130# Check whether --enable-network was given.
3131if test "${enable_network+set}" = set; then :
3132 enableval=$enable_network;
3133fi
3134
3135if test "x$enable_network" != "xno"; then :
3136
3137 HAVE_NETWORK="-DHAVE_NETWORK"
3138 if test "x$enable_network" = "xrestricted"; then :
3139
3140 HAVE_NETWORK="$HAVE_NETWORK -DHAVE_NETWORK_RESTRICTED"
3141
3142fi
3143
3144
3145fi
3146
3147HAVE_USERNS=""
3148# Check whether --enable-userns was given.
3149if test "${enable_userns+set}" = set; then :
3150 enableval=$enable_userns;
3151fi
3152
3153if test "x$enable_userns" != "xno"; then :
3154
3155 HAVE_USERNS="-DHAVE_USERNS"
3156
3157
3158fi
3159
3160HAVE_X11=""
3161# Check whether --enable-x11 was given.
3162if test "${enable_x11+set}" = set; then :
3163 enableval=$enable_x11;
3164fi
3165
3166if test "x$enable_x11" != "xno"; then :
3167
3168 HAVE_X11="-DHAVE_X11"
3169
3170
3171fi
3172
3173HAVE_FILE_TRANSFER=""
3174# Check whether --enable-file-transfer was given.
3175if test "${enable_file_transfer+set}" = set; then :
3176 enableval=$enable_file_transfer;
3177fi
3178
3179if test "x$enable_file_transfer" != "xno"; then :
3180
3181 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
3182
3183
3184fi
3185
3186HAVE_WHITELIST=""
3187# Check whether --enable-whitelist was given.
3188if test "${enable_whitelist+set}" = set; then :
3189 enableval=$enable_whitelist;
3190fi
3191
3192if test "x$enable_whitelist" != "xno"; then :
3193
3194 HAVE_WHITELIST="-DHAVE_WHITELIST"
3195
3196
3197fi
3198
3199HAVE_FATAL_WARNINGS=""
3200# Check whether --enable-fatal_warnings was given.
3201if test "${enable_fatal_warnings+set}" = set; then :
3202 enableval=$enable_fatal_warnings;
3203fi
3204
3205if test "x$enable_fatal_warnings" = "xyes"; then :
3206
3207 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
3208
3209
3210fi 3084fi
3211 3085
3086if test "x$enable_apparmor" = "xyes"; then :
3212 3087
3213# checking pthread library 3088 HAVE_APPARMOR="-DHAVE_APPARMOR"
3214
3215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
3216$as_echo_n "checking for main in -lpthread... " >&6; }
3217if ${ac_cv_lib_pthread_main+:} false; then :
3218 $as_echo_n "(cached) " >&6
3219else
3220 ac_check_lib_save_LIBS=$LIBS
3221LIBS="-lpthread $LIBS"
3222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3223/* end confdefs.h. */
3224 3089
3225 3090
3226int
3227main ()
3228{
3229return main ();
3230 ;
3231 return 0;
3232}
3233_ACEOF
3234if ac_fn_c_try_link "$LINENO"; then :
3235 ac_cv_lib_pthread_main=yes
3236else
3237 ac_cv_lib_pthread_main=no
3238fi 3091fi
3239rm -f core conftest.err conftest.$ac_objext \
3240 conftest$ac_exeext conftest.$ac_ext
3241LIBS=$ac_check_lib_save_LIBS
3242fi
3243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
3244$as_echo "$ac_cv_lib_pthread_main" >&6; }
3245if test "x$ac_cv_lib_pthread_main" = xyes; then :
3246 cat >>confdefs.h <<_ACEOF
3247#define HAVE_LIBPTHREAD 1
3248_ACEOF
3249 3092
3250 LIBS="-lpthread $LIBS"
3251
3252else
3253 as_fn_error $? "*** POSIX thread support not installed ***" "$LINENO" 5
3254fi
3255 3093
3256ac_ext=c 3094ac_ext=c
3257ac_cpp='$CPP $CPPFLAGS' 3095ac_cpp='$CPP $CPPFLAGS'
@@ -3650,6 +3488,208 @@ fi
3650done 3488done
3651 3489
3652 3490
3491if test "x$enable_apparmor" = "xyes"; then :
3492
3493 ac_fn_c_check_header_mongrel "$LINENO" "sys/apparmor.h" "ac_cv_header_sys_apparmor_h" "$ac_includes_default"
3494if test "x$ac_cv_header_sys_apparmor_h" = xyes; then :
3495
3496else
3497 as_fn_error $? "Couldn't find sys/apparmor.h... please install apparmor user space library and development files " "$LINENO" 5
3498fi
3499
3500
3501
3502fi
3503if test "x$enable_apparmor" = "xyes"; then :
3504
3505 EXTRA_LDFLAGS="-lapparmor"
3506
3507fi
3508
3509
3510HAVE_SECCOMP=""
3511# Check whether --enable-seccomp was given.
3512if test "${enable_seccomp+set}" = set; then :
3513 enableval=$enable_seccomp;
3514fi
3515
3516if test "x$enable_seccomp" != "xno"; then :
3517
3518 HAVE_SECCOMP="-DHAVE_SECCOMP"
3519
3520
3521fi
3522
3523HAVE_CHROOT=""
3524# Check whether --enable-chroot was given.
3525if test "${enable_chroot+set}" = set; then :
3526 enableval=$enable_chroot;
3527fi
3528
3529if test "x$enable_chroot" != "xno"; then :
3530
3531 HAVE_CHROOT="-DHAVE_CHROOT"
3532
3533
3534fi
3535
3536HAVE_BIND=""
3537# Check whether --enable-bind was given.
3538if test "${enable_bind+set}" = set; then :
3539 enableval=$enable_bind;
3540fi
3541
3542if test "x$enable_bind" != "xno"; then :
3543
3544 HAVE_BIND="-DHAVE_BIND"
3545
3546
3547fi
3548
3549HAVE_GLOBALCFG=""
3550# Check whether --enable-globalcfg was given.
3551if test "${enable_globalcfg+set}" = set; then :
3552 enableval=$enable_globalcfg;
3553fi
3554
3555if test "x$enable_globalcfg" != "xno"; then :
3556
3557 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
3558
3559
3560fi
3561
3562HAVE_NETWORK=""
3563# Check whether --enable-network was given.
3564if test "${enable_network+set}" = set; then :
3565 enableval=$enable_network;
3566fi
3567
3568# Check whether --enable-network was given.
3569if test "${enable_network+set}" = set; then :
3570 enableval=$enable_network;
3571fi
3572
3573if test "x$enable_network" != "xno"; then :
3574
3575 HAVE_NETWORK="-DHAVE_NETWORK"
3576 if test "x$enable_network" = "xrestricted"; then :
3577
3578 HAVE_NETWORK="$HAVE_NETWORK -DHAVE_NETWORK_RESTRICTED"
3579
3580fi
3581
3582
3583fi
3584
3585HAVE_USERNS=""
3586# Check whether --enable-userns was given.
3587if test "${enable_userns+set}" = set; then :
3588 enableval=$enable_userns;
3589fi
3590
3591if test "x$enable_userns" != "xno"; then :
3592
3593 HAVE_USERNS="-DHAVE_USERNS"
3594
3595
3596fi
3597
3598HAVE_X11=""
3599# Check whether --enable-x11 was given.
3600if test "${enable_x11+set}" = set; then :
3601 enableval=$enable_x11;
3602fi
3603
3604if test "x$enable_x11" != "xno"; then :
3605
3606 HAVE_X11="-DHAVE_X11"
3607
3608
3609fi
3610
3611HAVE_FILE_TRANSFER=""
3612# Check whether --enable-file-transfer was given.
3613if test "${enable_file_transfer+set}" = set; then :
3614 enableval=$enable_file_transfer;
3615fi
3616
3617if test "x$enable_file_transfer" != "xno"; then :
3618
3619 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
3620
3621
3622fi
3623
3624HAVE_WHITELIST=""
3625# Check whether --enable-whitelist was given.
3626if test "${enable_whitelist+set}" = set; then :
3627 enableval=$enable_whitelist;
3628fi
3629
3630if test "x$enable_whitelist" != "xno"; then :
3631
3632 HAVE_WHITELIST="-DHAVE_WHITELIST"
3633
3634
3635fi
3636
3637HAVE_FATAL_WARNINGS=""
3638# Check whether --enable-fatal_warnings was given.
3639if test "${enable_fatal_warnings+set}" = set; then :
3640 enableval=$enable_fatal_warnings;
3641fi
3642
3643if test "x$enable_fatal_warnings" = "xyes"; then :
3644
3645 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
3646
3647
3648fi
3649
3650
3651# checking pthread library
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
3653$as_echo_n "checking for main in -lpthread... " >&6; }
3654if ${ac_cv_lib_pthread_main+:} false; then :
3655 $as_echo_n "(cached) " >&6
3656else
3657 ac_check_lib_save_LIBS=$LIBS
3658LIBS="-lpthread $LIBS"
3659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3660/* end confdefs.h. */
3661
3662
3663int
3664main ()
3665{
3666return main ();
3667 ;
3668 return 0;
3669}
3670_ACEOF
3671if ac_fn_c_try_link "$LINENO"; then :
3672 ac_cv_lib_pthread_main=yes
3673else
3674 ac_cv_lib_pthread_main=no
3675fi
3676rm -f core conftest.err conftest.$ac_objext \
3677 conftest$ac_exeext conftest.$ac_ext
3678LIBS=$ac_check_lib_save_LIBS
3679fi
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
3681$as_echo "$ac_cv_lib_pthread_main" >&6; }
3682if test "x$ac_cv_lib_pthread_main" = xyes; then :
3683 cat >>confdefs.h <<_ACEOF
3684#define HAVE_LIBPTHREAD 1
3685_ACEOF
3686
3687 LIBS="-lpthread $LIBS"
3688
3689else
3690 as_fn_error $? "*** POSIX thread support not installed ***" "$LINENO" 5
3691fi
3692
3653ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 3693ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
3654if test "x$ac_cv_header_pthread_h" = xyes; then : 3694if test "x$ac_cv_header_pthread_h" = xyes; then :
3655 3695
@@ -4855,6 +4895,7 @@ echo " prefix: $prefix"
4855echo " sysconfdir: $sysconfdir" 4895echo " sysconfdir: $sysconfdir"
4856echo " seccomp: $HAVE_SECCOMP" 4896echo " seccomp: $HAVE_SECCOMP"
4857echo " <linux/seccomp.h>: $HAVE_SECCOMP_H" 4897echo " <linux/seccomp.h>: $HAVE_SECCOMP_H"
4898echo " apparmor: $HAVE_APPARMOR"
4858echo " global config: $HAVE_GLOBALCFG" 4899echo " global config: $HAVE_GLOBALCFG"
4859echo " chroot: $HAVE_CHROOT" 4900echo " chroot: $HAVE_CHROOT"
4860echo " bind: $HAVE_BIND" 4901echo " bind: $HAVE_BIND"
@@ -4866,6 +4907,7 @@ echo " file transfer support: $HAVE_FILE_TRANSFER"
4866echo " fatal warnings: $HAVE_FATAL_WARNINGS" 4907echo " fatal warnings: $HAVE_FATAL_WARNINGS"
4867printf " uid_min: "; grep UID_MIN uids.h 4908printf " uid_min: "; grep UID_MIN uids.h
4868printf " gid_min: "; grep GID_MIN uids.h 4909printf " gid_min: "; grep GID_MIN uids.h
4910printf " EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
4869echo 4911echo
4870 4912
4871 4913