aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2021-11-16 09:49:49 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2021-11-25 11:32:07 -0300
commit36058bc54a059cd63bd4ce94b680f5f8c1441c92 (patch)
tree00dec7d656b03bf455e827b2468cb4e252354f49 /configure
parentconfigure*: Add missing quotes to arguments (diff)
downloadfirejail-36058bc54a059cd63bd4ce94b680f5f8c1441c92.tar.gz
firejail-36058bc54a059cd63bd4ce94b680f5f8c1441c92.tar.zst
firejail-36058bc54a059cd63bd4ce94b680f5f8c1441c92.zip
configure*: Move AC_SUBST calls to more obvious places
These macros should always be called regardless of the intended value of each variable, as even if e.g.: no --enable-apparmor flag is given, the configure script still has to substitute `@HAVE_APPARMOR@` with blank in the relevant files. Something similar is already being done for HAVE_OVERLAYFS since commit fb9f2a5fb ("disabled overlayfs, fixes pending; added video channels to README* files", 2021-02-06). Note that each AC_SUBST is not immediately converted into search/replace code when generating the configure script. It appears that the variables are handled only after parsing all of configure.ac (or until a specific command is found), as all arguments passed to every AC_SUBST call are defined at once on the `ac_subst_vars` list. The actual substitutions are also done all at once (while iterating through the list) and that happens much later in the script (see both occurrences of `ac_subs_vars` on the current script).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 22 insertions, 24 deletions
diff --git a/configure b/configure
index 0aa278e94..ab11aa020 100755
--- a/configure
+++ b/configure
@@ -651,12 +651,12 @@ HAVE_DBUSPROXY
651EXTRA_LDFLAGS 651EXTRA_LDFLAGS
652EXTRA_CFLAGS 652EXTRA_CFLAGS
653HAVE_SELINUX 653HAVE_SELINUX
654HAVE_APPARMOR
655AA_LIBS 654AA_LIBS
656AA_CFLAGS 655AA_CFLAGS
657PKG_CONFIG_LIBDIR 656PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH 657PKG_CONFIG_PATH
659PKG_CONFIG 658PKG_CONFIG
659HAVE_APPARMOR
660RANLIB 660RANLIB
661INSTALL_DATA 661INSTALL_DATA
662INSTALL_SCRIPT 662INSTALL_SCRIPT
@@ -3303,6 +3303,7 @@ fi
3303fi 3303fi
3304 3304
3305HAVE_APPARMOR="" 3305HAVE_APPARMOR=""
3306
3306# Check whether --enable-apparmor was given. 3307# Check whether --enable-apparmor was given.
3307if test "${enable_apparmor+set}" = set; then : 3308if test "${enable_apparmor+set}" = set; then :
3308 enableval=$enable_apparmor; 3309 enableval=$enable_apparmor;
@@ -3523,10 +3524,10 @@ $as_echo "yes" >&6; }
3523 EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS" 3524 EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"
3524fi 3525fi
3525 3526
3526
3527fi 3527fi
3528 3528
3529HAVE_SELINUX="" 3529HAVE_SELINUX=""
3530
3530# Check whether --enable-selinux was given. 3531# Check whether --enable-selinux was given.
3531if test "${enable_selinux+set}" = set; then : 3532if test "${enable_selinux+set}" = set; then :
3532 enableval=$enable_selinux; 3533 enableval=$enable_selinux;
@@ -3537,7 +3538,6 @@ if test "x$enable_selinux" = "xyes"; then :
3537 HAVE_SELINUX="-DHAVE_SELINUX" 3538 HAVE_SELINUX="-DHAVE_SELINUX"
3538 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lselinux" 3539 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lselinux"
3539 3540
3540
3541fi 3541fi
3542 3542
3543 3543
@@ -3545,6 +3545,7 @@ fi
3545 3545
3546 3546
3547HAVE_DBUSPROXY="" 3547HAVE_DBUSPROXY=""
3548
3548# Check whether --enable-dbusproxy was given. 3549# Check whether --enable-dbusproxy was given.
3549if test "${enable_dbusproxy+set}" = set; then : 3550if test "${enable_dbusproxy+set}" = set; then :
3550 enableval=$enable_dbusproxy; 3551 enableval=$enable_dbusproxy;
@@ -3554,21 +3555,19 @@ if test "x$enable_dbusproxy" != "xno"; then :
3554 3555
3555 HAVE_DBUSPROXY="-DHAVE_DBUSPROXY" 3556 HAVE_DBUSPROXY="-DHAVE_DBUSPROXY"
3556 3557
3557
3558fi 3558fi
3559 3559
3560# overlayfs features temporarily disabled pending fixes 3560# overlayfs features temporarily disabled pending fixes
3561HAVE_OVERLAYFS="" 3561HAVE_OVERLAYFS=""
3562 3562
3563#
3564#AC_ARG_ENABLE([overlayfs], 3563#AC_ARG_ENABLE([overlayfs],
3565# [AS_HELP_STRING([--disable-overlayfs], [disable overlayfs])]) 3564# [AS_HELP_STRING([--disable-overlayfs], [disable overlayfs])])
3566#AS_IF([test "x$enable_overlayfs" != "xno"], [ 3565#AS_IF([test "x$enable_overlayfs" != "xno"], [
3567# HAVE_OVERLAYFS="-DHAVE_OVERLAYFS" 3566# HAVE_OVERLAYFS="-DHAVE_OVERLAYFS"
3568# AC_SUBST([HAVE_OVERLAYFS])
3569#]) 3567#])
3570 3568
3571HAVE_OUTPUT="" 3569HAVE_OUTPUT=""
3570
3572# Check whether --enable-output was given. 3571# Check whether --enable-output was given.
3573if test "${enable_output+set}" = set; then : 3572if test "${enable_output+set}" = set; then :
3574 enableval=$enable_output; 3573 enableval=$enable_output;
@@ -3578,10 +3577,10 @@ if test "x$enable_output" != "xno"; then :
3578 3577
3579 HAVE_OUTPUT="-DHAVE_OUTPUT" 3578 HAVE_OUTPUT="-DHAVE_OUTPUT"
3580 3579
3581
3582fi 3580fi
3583 3581
3584HAVE_USERTMPFS="" 3582HAVE_USERTMPFS=""
3583
3585# Check whether --enable-usertmpfs was given. 3584# Check whether --enable-usertmpfs was given.
3586if test "${enable_usertmpfs+set}" = set; then : 3585if test "${enable_usertmpfs+set}" = set; then :
3587 enableval=$enable_usertmpfs; 3586 enableval=$enable_usertmpfs;
@@ -3591,10 +3590,10 @@ if test "x$enable_usertmpfs" != "xno"; then :
3591 3590
3592 HAVE_USERTMPFS="-DHAVE_USERTMPFS" 3591 HAVE_USERTMPFS="-DHAVE_USERTMPFS"
3593 3592
3594
3595fi 3593fi
3596 3594
3597HAVE_MAN="no" 3595HAVE_MAN="no"
3596
3598# Check whether --enable-man was given. 3597# Check whether --enable-man was given.
3599if test "${enable_man+set}" = set; then : 3598if test "${enable_man+set}" = set; then :
3600 enableval=$enable_man; 3599 enableval=$enable_man;
@@ -3603,7 +3602,6 @@ fi
3603if test "x$enable_man" != "xno"; then : 3602if test "x$enable_man" != "xno"; then :
3604 3603
3605 HAVE_MAN="-DHAVE_MAN" 3604 HAVE_MAN="-DHAVE_MAN"
3606
3607 # Extract the first word of "gawk", so it can be a program name with args. 3605 # Extract the first word of "gawk", so it can be a program name with args.
3608set dummy gawk; ac_word=$2 3606set dummy gawk; ac_word=$2
3609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -3649,6 +3647,7 @@ fi
3649fi 3647fi
3650 3648
3651HAVE_FIRETUNNEL="" 3649HAVE_FIRETUNNEL=""
3650
3652# Check whether --enable-firetunnel was given. 3651# Check whether --enable-firetunnel was given.
3653if test "${enable_firetunnel+set}" = set; then : 3652if test "${enable_firetunnel+set}" = set; then :
3654 enableval=$enable_firetunnel; 3653 enableval=$enable_firetunnel;
@@ -3658,10 +3657,10 @@ if test "x$enable_firetunnel" != "xno"; then :
3658 3657
3659 HAVE_FIRETUNNEL="-DHAVE_FIRETUNNEL" 3658 HAVE_FIRETUNNEL="-DHAVE_FIRETUNNEL"
3660 3659
3661
3662fi 3660fi
3663 3661
3664HAVE_PRIVATEHOME="" 3662HAVE_PRIVATEHOME=""
3663
3665# Check whether --enable-private-home was given. 3664# Check whether --enable-private-home was given.
3666if test "${enable_private_home+set}" = set; then : 3665if test "${enable_private_home+set}" = set; then :
3667 enableval=$enable_private_home; 3666 enableval=$enable_private_home;
@@ -3671,10 +3670,10 @@ if test "x$enable_private_home" != "xno"; then :
3671 3670
3672 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME" 3671 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME"
3673 3672
3674
3675fi 3673fi
3676 3674
3677HAVE_CHROOT="" 3675HAVE_CHROOT=""
3676
3678# Check whether --enable-chroot was given. 3677# Check whether --enable-chroot was given.
3679if test "${enable_chroot+set}" = set; then : 3678if test "${enable_chroot+set}" = set; then :
3680 enableval=$enable_chroot; 3679 enableval=$enable_chroot;
@@ -3684,10 +3683,10 @@ if test "x$enable_chroot" != "xno"; then :
3684 3683
3685 HAVE_CHROOT="-DHAVE_CHROOT" 3684 HAVE_CHROOT="-DHAVE_CHROOT"
3686 3685
3687
3688fi 3686fi
3689 3687
3690HAVE_GLOBALCFG="" 3688HAVE_GLOBALCFG=""
3689
3691# Check whether --enable-globalcfg was given. 3690# Check whether --enable-globalcfg was given.
3692if test "${enable_globalcfg+set}" = set; then : 3691if test "${enable_globalcfg+set}" = set; then :
3693 enableval=$enable_globalcfg; 3692 enableval=$enable_globalcfg;
@@ -3697,10 +3696,10 @@ if test "x$enable_globalcfg" != "xno"; then :
3697 3696
3698 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG" 3697 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
3699 3698
3700
3701fi 3699fi
3702 3700
3703HAVE_NETWORK="" 3701HAVE_NETWORK=""
3702
3704# Check whether --enable-network was given. 3703# Check whether --enable-network was given.
3705if test "${enable_network+set}" = set; then : 3704if test "${enable_network+set}" = set; then :
3706 enableval=$enable_network; 3705 enableval=$enable_network;
@@ -3710,10 +3709,10 @@ if test "x$enable_network" != "xno"; then :
3710 3709
3711 HAVE_NETWORK="-DHAVE_NETWORK" 3710 HAVE_NETWORK="-DHAVE_NETWORK"
3712 3711
3713
3714fi 3712fi
3715 3713
3716HAVE_USERNS="" 3714HAVE_USERNS=""
3715
3717# Check whether --enable-userns was given. 3716# Check whether --enable-userns was given.
3718if test "${enable_userns+set}" = set; then : 3717if test "${enable_userns+set}" = set; then :
3719 enableval=$enable_userns; 3718 enableval=$enable_userns;
@@ -3723,10 +3722,10 @@ if test "x$enable_userns" != "xno"; then :
3723 3722
3724 HAVE_USERNS="-DHAVE_USERNS" 3723 HAVE_USERNS="-DHAVE_USERNS"
3725 3724
3726
3727fi 3725fi
3728 3726
3729HAVE_X11="" 3727HAVE_X11=""
3728
3730# Check whether --enable-x11 was given. 3729# Check whether --enable-x11 was given.
3731if test "${enable_x11+set}" = set; then : 3730if test "${enable_x11+set}" = set; then :
3732 enableval=$enable_x11; 3731 enableval=$enable_x11;
@@ -3736,10 +3735,10 @@ if test "x$enable_x11" != "xno"; then :
3736 3735
3737 HAVE_X11="-DHAVE_X11" 3736 HAVE_X11="-DHAVE_X11"
3738 3737
3739
3740fi 3738fi
3741 3739
3742HAVE_FILE_TRANSFER="" 3740HAVE_FILE_TRANSFER=""
3741
3743# Check whether --enable-file-transfer was given. 3742# Check whether --enable-file-transfer was given.
3744if test "${enable_file_transfer+set}" = set; then : 3743if test "${enable_file_transfer+set}" = set; then :
3745 enableval=$enable_file_transfer; 3744 enableval=$enable_file_transfer;
@@ -3749,10 +3748,10 @@ if test "x$enable_file_transfer" != "xno"; then :
3749 3748
3750 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER" 3749 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
3751 3750
3752
3753fi 3751fi
3754 3752
3755HAVE_SUID="" 3753HAVE_SUID=""
3754
3756# Check whether --enable-suid was given. 3755# Check whether --enable-suid was given.
3757if test "${enable_suid+set}" = set; then : 3756if test "${enable_suid+set}" = set; then :
3758 enableval=$enable_suid; 3757 enableval=$enable_suid;
@@ -3765,8 +3764,8 @@ else
3765 3764
3766fi 3765fi
3767 3766
3768
3769HAVE_FATAL_WARNINGS="" 3767HAVE_FATAL_WARNINGS=""
3768
3770# Check whether --enable-fatal_warnings was given. 3769# Check whether --enable-fatal_warnings was given.
3771if test "${enable_fatal_warnings+set}" = set; then : 3770if test "${enable_fatal_warnings+set}" = set; then :
3772 enableval=$enable_fatal_warnings; 3771 enableval=$enable_fatal_warnings;
@@ -3776,10 +3775,10 @@ if test "x$enable_fatal_warnings" = "xyes"; then :
3776 3775
3777 HAVE_FATAL_WARNINGS="-W -Wall -Werror" 3776 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
3778 3777
3779
3780fi 3778fi
3781 3779
3782BUSYBOX_WORKAROUND="no" 3780BUSYBOX_WORKAROUND="no"
3781
3783# Check whether --enable-busybox-workaround was given. 3782# Check whether --enable-busybox-workaround was given.
3784if test "${enable_busybox_workaround+set}" = set; then : 3783if test "${enable_busybox_workaround+set}" = set; then :
3785 enableval=$enable_busybox_workaround; 3784 enableval=$enable_busybox_workaround;
@@ -3789,11 +3788,11 @@ if test "x$enable_busybox_workaround" = "xyes"; then :
3789 3788
3790 BUSYBOX_WORKAROUND="yes" 3789 BUSYBOX_WORKAROUND="yes"
3791 3790
3792
3793fi 3791fi
3794 3792
3795 3793
3796HAVE_GCOV="" 3794HAVE_GCOV=""
3795
3797# Check whether --enable-gcov was given. 3796# Check whether --enable-gcov was given.
3798if test "${enable_gcov+set}" = set; then : 3797if test "${enable_gcov+set}" = set; then :
3799 enableval=$enable_gcov; 3798 enableval=$enable_gcov;
@@ -3804,10 +3803,10 @@ if test "x$enable_gcov" = "xyes"; then :
3804 HAVE_GCOV="--coverage -DHAVE_GCOV" 3803 HAVE_GCOV="--coverage -DHAVE_GCOV"
3805 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgcov --coverage" 3804 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgcov --coverage"
3806 3805
3807
3808fi 3806fi
3809 3807
3810HAVE_CONTRIB_INSTALL="yes" 3808HAVE_CONTRIB_INSTALL="yes"
3809
3811# Check whether --enable-contrib-install was given. 3810# Check whether --enable-contrib-install was given.
3812if test "${enable_contrib_install+set}" = set; then : 3811if test "${enable_contrib_install+set}" = set; then :
3813 enableval=$enable_contrib_install; 3812 enableval=$enable_contrib_install;
@@ -3820,8 +3819,8 @@ else
3820 3819
3821fi 3820fi
3822 3821
3823
3824HAVE_FORCE_NONEWPRIVS="" 3822HAVE_FORCE_NONEWPRIVS=""
3823
3825# Check whether --enable-force-nonewprivs was given. 3824# Check whether --enable-force-nonewprivs was given.
3826if test "${enable_force_nonewprivs+set}" = set; then : 3825if test "${enable_force_nonewprivs+set}" = set; then :
3827 enableval=$enable_force_nonewprivs; 3826 enableval=$enable_force_nonewprivs;
@@ -3831,10 +3830,10 @@ if test "x$enable_force_nonewprivs" = "xyes"; then :
3831 3830
3832 HAVE_FORCE_NONEWPRIVS="-DHAVE_FORCE_NONEWPRIVS" 3831 HAVE_FORCE_NONEWPRIVS="-DHAVE_FORCE_NONEWPRIVS"
3833 3832
3834
3835fi 3833fi
3836 3834
3837HAVE_LTS="" 3835HAVE_LTS=""
3836
3838# Check whether --enable-lts was given. 3837# Check whether --enable-lts was given.
3839if test "${enable_lts+set}" = set; then : 3838if test "${enable_lts+set}" = set; then :
3840 enableval=$enable_lts; 3839 enableval=$enable_lts;
@@ -3844,7 +3843,6 @@ if test "x$enable_lts" = "xyes"; then :
3844 3843
3845 HAVE_LTS="-DHAVE_LTS" 3844 HAVE_LTS="-DHAVE_LTS"
3846 3845
3847
3848 HAVE_DBUSPROXY="" 3846 HAVE_DBUSPROXY=""
3849 3847
3850 3848