diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2021-11-16 09:49:49 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2021-11-25 11:32:07 -0300 |
commit | 36058bc54a059cd63bd4ce94b680f5f8c1441c92 (patch) | |
tree | 00dec7d656b03bf455e827b2468cb4e252354f49 /configure | |
parent | configure*: Add missing quotes to arguments (diff) | |
download | firejail-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-x | configure | 46 |
1 files changed, 22 insertions, 24 deletions
@@ -651,12 +651,12 @@ HAVE_DBUSPROXY | |||
651 | EXTRA_LDFLAGS | 651 | EXTRA_LDFLAGS |
652 | EXTRA_CFLAGS | 652 | EXTRA_CFLAGS |
653 | HAVE_SELINUX | 653 | HAVE_SELINUX |
654 | HAVE_APPARMOR | ||
655 | AA_LIBS | 654 | AA_LIBS |
656 | AA_CFLAGS | 655 | AA_CFLAGS |
657 | PKG_CONFIG_LIBDIR | 656 | PKG_CONFIG_LIBDIR |
658 | PKG_CONFIG_PATH | 657 | PKG_CONFIG_PATH |
659 | PKG_CONFIG | 658 | PKG_CONFIG |
659 | HAVE_APPARMOR | ||
660 | RANLIB | 660 | RANLIB |
661 | INSTALL_DATA | 661 | INSTALL_DATA |
662 | INSTALL_SCRIPT | 662 | INSTALL_SCRIPT |
@@ -3303,6 +3303,7 @@ fi | |||
3303 | fi | 3303 | fi |
3304 | 3304 | ||
3305 | HAVE_APPARMOR="" | 3305 | HAVE_APPARMOR="" |
3306 | |||
3306 | # Check whether --enable-apparmor was given. | 3307 | # Check whether --enable-apparmor was given. |
3307 | if test "${enable_apparmor+set}" = set; then : | 3308 | if 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" |
3524 | fi | 3525 | fi |
3525 | 3526 | ||
3526 | |||
3527 | fi | 3527 | fi |
3528 | 3528 | ||
3529 | HAVE_SELINUX="" | 3529 | HAVE_SELINUX="" |
3530 | |||
3530 | # Check whether --enable-selinux was given. | 3531 | # Check whether --enable-selinux was given. |
3531 | if test "${enable_selinux+set}" = set; then : | 3532 | if 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 | |||
3541 | fi | 3541 | fi |
3542 | 3542 | ||
3543 | 3543 | ||
@@ -3545,6 +3545,7 @@ fi | |||
3545 | 3545 | ||
3546 | 3546 | ||
3547 | HAVE_DBUSPROXY="" | 3547 | HAVE_DBUSPROXY="" |
3548 | |||
3548 | # Check whether --enable-dbusproxy was given. | 3549 | # Check whether --enable-dbusproxy was given. |
3549 | if test "${enable_dbusproxy+set}" = set; then : | 3550 | if 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 | |||
3558 | fi | 3558 | fi |
3559 | 3559 | ||
3560 | # overlayfs features temporarily disabled pending fixes | 3560 | # overlayfs features temporarily disabled pending fixes |
3561 | HAVE_OVERLAYFS="" | 3561 | HAVE_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 | ||
3571 | HAVE_OUTPUT="" | 3569 | HAVE_OUTPUT="" |
3570 | |||
3572 | # Check whether --enable-output was given. | 3571 | # Check whether --enable-output was given. |
3573 | if test "${enable_output+set}" = set; then : | 3572 | if 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 | |||
3582 | fi | 3580 | fi |
3583 | 3581 | ||
3584 | HAVE_USERTMPFS="" | 3582 | HAVE_USERTMPFS="" |
3583 | |||
3585 | # Check whether --enable-usertmpfs was given. | 3584 | # Check whether --enable-usertmpfs was given. |
3586 | if test "${enable_usertmpfs+set}" = set; then : | 3585 | if 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 | |||
3595 | fi | 3593 | fi |
3596 | 3594 | ||
3597 | HAVE_MAN="no" | 3595 | HAVE_MAN="no" |
3596 | |||
3598 | # Check whether --enable-man was given. | 3597 | # Check whether --enable-man was given. |
3599 | if test "${enable_man+set}" = set; then : | 3598 | if test "${enable_man+set}" = set; then : |
3600 | enableval=$enable_man; | 3599 | enableval=$enable_man; |
@@ -3603,7 +3602,6 @@ fi | |||
3603 | if test "x$enable_man" != "xno"; then : | 3602 | if 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. |
3608 | set dummy gawk; ac_word=$2 | 3606 | set 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 | |||
3649 | fi | 3647 | fi |
3650 | 3648 | ||
3651 | HAVE_FIRETUNNEL="" | 3649 | HAVE_FIRETUNNEL="" |
3650 | |||
3652 | # Check whether --enable-firetunnel was given. | 3651 | # Check whether --enable-firetunnel was given. |
3653 | if test "${enable_firetunnel+set}" = set; then : | 3652 | if 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 | |||
3662 | fi | 3660 | fi |
3663 | 3661 | ||
3664 | HAVE_PRIVATEHOME="" | 3662 | HAVE_PRIVATEHOME="" |
3663 | |||
3665 | # Check whether --enable-private-home was given. | 3664 | # Check whether --enable-private-home was given. |
3666 | if test "${enable_private_home+set}" = set; then : | 3665 | if 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 | |||
3675 | fi | 3673 | fi |
3676 | 3674 | ||
3677 | HAVE_CHROOT="" | 3675 | HAVE_CHROOT="" |
3676 | |||
3678 | # Check whether --enable-chroot was given. | 3677 | # Check whether --enable-chroot was given. |
3679 | if test "${enable_chroot+set}" = set; then : | 3678 | if 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 | |||
3688 | fi | 3686 | fi |
3689 | 3687 | ||
3690 | HAVE_GLOBALCFG="" | 3688 | HAVE_GLOBALCFG="" |
3689 | |||
3691 | # Check whether --enable-globalcfg was given. | 3690 | # Check whether --enable-globalcfg was given. |
3692 | if test "${enable_globalcfg+set}" = set; then : | 3691 | if 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 | |||
3701 | fi | 3699 | fi |
3702 | 3700 | ||
3703 | HAVE_NETWORK="" | 3701 | HAVE_NETWORK="" |
3702 | |||
3704 | # Check whether --enable-network was given. | 3703 | # Check whether --enable-network was given. |
3705 | if test "${enable_network+set}" = set; then : | 3704 | if 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 | |||
3714 | fi | 3712 | fi |
3715 | 3713 | ||
3716 | HAVE_USERNS="" | 3714 | HAVE_USERNS="" |
3715 | |||
3717 | # Check whether --enable-userns was given. | 3716 | # Check whether --enable-userns was given. |
3718 | if test "${enable_userns+set}" = set; then : | 3717 | if 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 | |||
3727 | fi | 3725 | fi |
3728 | 3726 | ||
3729 | HAVE_X11="" | 3727 | HAVE_X11="" |
3728 | |||
3730 | # Check whether --enable-x11 was given. | 3729 | # Check whether --enable-x11 was given. |
3731 | if test "${enable_x11+set}" = set; then : | 3730 | if 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 | |||
3740 | fi | 3738 | fi |
3741 | 3739 | ||
3742 | HAVE_FILE_TRANSFER="" | 3740 | HAVE_FILE_TRANSFER="" |
3741 | |||
3743 | # Check whether --enable-file-transfer was given. | 3742 | # Check whether --enable-file-transfer was given. |
3744 | if test "${enable_file_transfer+set}" = set; then : | 3743 | if 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 | |||
3753 | fi | 3751 | fi |
3754 | 3752 | ||
3755 | HAVE_SUID="" | 3753 | HAVE_SUID="" |
3754 | |||
3756 | # Check whether --enable-suid was given. | 3755 | # Check whether --enable-suid was given. |
3757 | if test "${enable_suid+set}" = set; then : | 3756 | if test "${enable_suid+set}" = set; then : |
3758 | enableval=$enable_suid; | 3757 | enableval=$enable_suid; |
@@ -3765,8 +3764,8 @@ else | |||
3765 | 3764 | ||
3766 | fi | 3765 | fi |
3767 | 3766 | ||
3768 | |||
3769 | HAVE_FATAL_WARNINGS="" | 3767 | HAVE_FATAL_WARNINGS="" |
3768 | |||
3770 | # Check whether --enable-fatal_warnings was given. | 3769 | # Check whether --enable-fatal_warnings was given. |
3771 | if test "${enable_fatal_warnings+set}" = set; then : | 3770 | if 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 | |||
3780 | fi | 3778 | fi |
3781 | 3779 | ||
3782 | BUSYBOX_WORKAROUND="no" | 3780 | BUSYBOX_WORKAROUND="no" |
3781 | |||
3783 | # Check whether --enable-busybox-workaround was given. | 3782 | # Check whether --enable-busybox-workaround was given. |
3784 | if test "${enable_busybox_workaround+set}" = set; then : | 3783 | if 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 | |||
3793 | fi | 3791 | fi |
3794 | 3792 | ||
3795 | 3793 | ||
3796 | HAVE_GCOV="" | 3794 | HAVE_GCOV="" |
3795 | |||
3797 | # Check whether --enable-gcov was given. | 3796 | # Check whether --enable-gcov was given. |
3798 | if test "${enable_gcov+set}" = set; then : | 3797 | if 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 | |||
3808 | fi | 3806 | fi |
3809 | 3807 | ||
3810 | HAVE_CONTRIB_INSTALL="yes" | 3808 | HAVE_CONTRIB_INSTALL="yes" |
3809 | |||
3811 | # Check whether --enable-contrib-install was given. | 3810 | # Check whether --enable-contrib-install was given. |
3812 | if test "${enable_contrib_install+set}" = set; then : | 3811 | if test "${enable_contrib_install+set}" = set; then : |
3813 | enableval=$enable_contrib_install; | 3812 | enableval=$enable_contrib_install; |
@@ -3820,8 +3819,8 @@ else | |||
3820 | 3819 | ||
3821 | fi | 3820 | fi |
3822 | 3821 | ||
3823 | |||
3824 | HAVE_FORCE_NONEWPRIVS="" | 3822 | HAVE_FORCE_NONEWPRIVS="" |
3823 | |||
3825 | # Check whether --enable-force-nonewprivs was given. | 3824 | # Check whether --enable-force-nonewprivs was given. |
3826 | if test "${enable_force_nonewprivs+set}" = set; then : | 3825 | if 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 | |||
3835 | fi | 3833 | fi |
3836 | 3834 | ||
3837 | HAVE_LTS="" | 3835 | HAVE_LTS="" |
3836 | |||
3838 | # Check whether --enable-lts was given. | 3837 | # Check whether --enable-lts was given. |
3839 | if test "${enable_lts+set}" = set; then : | 3838 | if 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 | ||