aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Reiner Herrmann <reiner@reiner-h.de>2022-12-01 23:26:28 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-01 23:26:28 +0100
commitd6b0d40a1941a62875dab7f45afd4271b07bc217 (patch)
tree714151e9350dc61c0b0e823c5fdae3a86837a3e4
parentfirefox-common-addons: fix whitelisting in ${RUNUSER} (#5497) (diff)
parentconfigure*: quote and line-wrap AC_CHECK_HEADER line (diff)
downloadfirejail-d6b0d40a1941a62875dab7f45afd4271b07bc217.tar.gz
firejail-d6b0d40a1941a62875dab7f45afd4271b07bc217.tar.zst
firejail-d6b0d40a1941a62875dab7f45afd4271b07bc217.zip
Merge pull request #5488 from kmk3/configure-fix-format-misc
build: fix formatting and misc in configure
-rwxr-xr-xconfigure39
-rw-r--r--configure.ac68
2 files changed, 57 insertions, 50 deletions
diff --git a/configure b/configure
index f3bd77169..4c9ed1a36 100755
--- a/configure
+++ b/configure
@@ -2914,7 +2914,9 @@ fi
2914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mindirect_branch_thunk" >&5 2914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mindirect_branch_thunk" >&5
2915$as_echo "$ax_cv_check_cflags___mindirect_branch_thunk" >&6; } 2915$as_echo "$ax_cv_check_cflags___mindirect_branch_thunk" >&6; }
2916if test "x$ax_cv_check_cflags___mindirect_branch_thunk" = xyes; then : 2916if test "x$ax_cv_check_cflags___mindirect_branch_thunk" = xyes; then :
2917 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk" 2917
2918 HAVE_SPECTRE="yes"
2919 EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"
2918 2920
2919else 2921else
2920 : 2922 :
@@ -2950,7 +2952,9 @@ fi
2950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mretpoline" >&5 2952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mretpoline" >&5
2951$as_echo "$ax_cv_check_cflags___mretpoline" >&6; } 2953$as_echo "$ax_cv_check_cflags___mretpoline" >&6; }
2952if test "x$ax_cv_check_cflags___mretpoline" = xyes; then : 2954if test "x$ax_cv_check_cflags___mretpoline" = xyes; then :
2953 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline" 2955
2956 HAVE_SPECTRE="yes"
2957 EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"
2954 2958
2955else 2959else
2956 : 2960 :
@@ -2986,7 +2990,9 @@ fi
2986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_clash_protection" >&5 2990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_clash_protection" >&5
2987$as_echo "$ax_cv_check_cflags___fstack_clash_protection" >&6; } 2991$as_echo "$ax_cv_check_cflags___fstack_clash_protection" >&6; }
2988if test "x$ax_cv_check_cflags___fstack_clash_protection" = xyes; then : 2992if test "x$ax_cv_check_cflags___fstack_clash_protection" = xyes; then :
2989 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection" 2993
2994 HAVE_SPECTRE="yes"
2995 EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"
2990 2996
2991else 2997else
2992 : 2998 :
@@ -3022,7 +3028,9 @@ fi
3022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_protector_strong" >&5 3028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_protector_strong" >&5
3023$as_echo "$ax_cv_check_cflags___fstack_protector_strong" >&6; } 3029$as_echo "$ax_cv_check_cflags___fstack_protector_strong" >&6; }
3024if test "x$ax_cv_check_cflags___fstack_protector_strong" = xyes; then : 3030if test "x$ax_cv_check_cflags___fstack_protector_strong" = xyes; then :
3025 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong" 3031
3032 HAVE_SPECTRE="yes"
3033 EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong"
3026 3034
3027else 3035else
3028 : 3036 :
@@ -3048,7 +3056,8 @@ else
3048fi 3056fi
3049 3057
3050if test "x$enable_sanitizer" != "xno" ; then : 3058if test "x$enable_sanitizer" != "xno" ; then :
3051 as_CACHEVAR=`$as_echo "ax_cv_check_cflags__-fsanitize=$enable_sanitizer" | $as_tr_sh` 3059
3060 as_CACHEVAR=`$as_echo "ax_cv_check_cflags__-fsanitize=$enable_sanitizer" | $as_tr_sh`
3052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=$enable_sanitizer" >&5 3061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=$enable_sanitizer" >&5
3053$as_echo_n "checking whether C compiler accepts -fsanitize=$enable_sanitizer... " >&6; } 3062$as_echo_n "checking whether C compiler accepts -fsanitize=$enable_sanitizer... " >&6; }
3054if eval \${$as_CACHEVAR+:} false; then : 3063if eval \${$as_CACHEVAR+:} false; then :
@@ -3086,9 +3095,9 @@ if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
3086 3095
3087else 3096else
3088 as_fn_error $? "sanitizer not supported: $enable_sanitizer" "$LINENO" 5 3097 as_fn_error $? "sanitizer not supported: $enable_sanitizer" "$LINENO" 5
3089
3090fi 3098fi
3091 3099
3100
3092fi 3101fi
3093 3102
3094HAVE_IDS="" 3103HAVE_IDS=""
@@ -3323,7 +3332,10 @@ else
3323 AA_LIBS=$pkg_cv_AA_LIBS 3332 AA_LIBS=$pkg_cv_AA_LIBS
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3325$as_echo "yes" >&6; } 3334$as_echo "yes" >&6; }
3326 EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS" 3335
3336 EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS"
3337 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"
3338
3327fi 3339fi
3328 3340
3329fi 3341fi
@@ -3345,7 +3357,6 @@ fi
3345 3357
3346 3358
3347 3359
3348
3349HAVE_DBUSPROXY="" 3360HAVE_DBUSPROXY=""
3350 3361
3351# Check whether --enable-dbusproxy was given. 3362# Check whether --enable-dbusproxy was given.
@@ -3591,7 +3602,6 @@ if test "x$enable_busybox_workaround" = "xyes"; then :
3591 3602
3592fi 3603fi
3593 3604
3594
3595HAVE_GCOV="" 3605HAVE_GCOV=""
3596 3606
3597# Check whether --enable-gcov was given. 3607# Check whether --enable-gcov was given.
@@ -3615,7 +3625,7 @@ fi
3615 3625
3616if test "x$enable_contrib_install" = "xno"; then : 3626if test "x$enable_contrib_install" = "xno"; then :
3617 3627
3618 HAVE_CONTRIB_INSTALL="no" 3628 HAVE_CONTRIB_INSTALL="no"
3619 3629
3620fi 3630fi
3621 3631
@@ -3641,7 +3651,7 @@ fi
3641 3651
3642if test "x$enable_only_syscfg_profiles" = "xyes"; then : 3652if test "x$enable_only_syscfg_profiles" = "xyes"; then :
3643 3653
3644 HAVE_ONLY_SYSCFG_PROFILES="-DHAVE_ONLY_SYSCFG_PROFILES" 3654 HAVE_ONLY_SYSCFG_PROFILES="-DHAVE_ONLY_SYSCFG_PROFILES"
3645 3655
3646fi 3656fi
3647 3657
@@ -3670,7 +3680,7 @@ if test "x$enable_lts" = "xyes"; then :
3670 HAVE_FILE_TRANSFER="" 3680 HAVE_FILE_TRANSFER=""
3671 HAVE_SUID="-DHAVE_SUID" 3681 HAVE_SUID="-DHAVE_SUID"
3672 BUSYBOX_WORKAROUND="no" 3682 BUSYBOX_WORKAROUND="no"
3673 HAVE_CONTRIB_INSTALL="no", 3683 HAVE_CONTRIB_INSTALL="no"
3674 3684
3675fi 3685fi
3676 3686
@@ -5284,13 +5294,10 @@ EOF
5284 5294
5285if test "$HAVE_LTS" = -DHAVE_LTS; then 5295if test "$HAVE_LTS" = -DHAVE_LTS; then
5286 cat <<\EOF 5296 cat <<\EOF
5287
5288
5289********************************************************* 5297*********************************************************
5290* Warning: Long-term support (LTS) was enabled! * 5298* Warning: Long-term support (LTS) was enabled! *
5291* Most compile-time options have bean rewritten! * 5299* Most compile-time options have been rewritten! *
5292********************************************************* 5300*********************************************************
5293 5301
5294
5295EOF 5302EOF
5296fi 5303fi
diff --git a/configure.ac b/configure.ac
index 8a488ff43..e418b72bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,22 +21,22 @@ AC_CONFIG_MACRO_DIR([m4])
21AC_PROG_CC 21AC_PROG_CC
22 22
23HAVE_SPECTRE="no" 23HAVE_SPECTRE="no"
24AX_CHECK_COMPILE_FLAG( 24AX_CHECK_COMPILE_FLAG([-mindirect-branch=thunk], [
25 [-mindirect-branch=thunk], 25 HAVE_SPECTRE="yes"
26 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"] 26 EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"
27) 27])
28AX_CHECK_COMPILE_FLAG( 28AX_CHECK_COMPILE_FLAG([-mretpoline], [
29 [-mretpoline], 29 HAVE_SPECTRE="yes"
30 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"] 30 EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"
31) 31])
32AX_CHECK_COMPILE_FLAG( 32AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [
33 [-fstack-clash-protection], 33 HAVE_SPECTRE="yes"
34 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"] 34 EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"
35) 35])
36AX_CHECK_COMPILE_FLAG( 36AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [
37 [-fstack-protector-strong], 37 HAVE_SPECTRE="yes"
38 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong"] 38 EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong"
39) 39])
40 40
41AC_ARG_ENABLE([analyzer], 41AC_ARG_ENABLE([analyzer],
42 [AS_HELP_STRING([--enable-analyzer], [enable GCC static analyzer])]) 42 [AS_HELP_STRING([--enable-analyzer], [enable GCC static analyzer])])
@@ -45,14 +45,16 @@ AS_IF([test "x$enable_analyzer" = "xyes"], [
45]) 45])
46 46
47AC_ARG_ENABLE([sanitizer], 47AC_ARG_ENABLE([sanitizer],
48 [AS_HELP_STRING([--enable-sanitizer=@<:@address | memory | undefined@:>@], [enable a compiler-based sanitizer (debug)])], 48 [AS_HELP_STRING([--enable-sanitizer=@<:@address | memory | undefined@:>@],
49 [], [enable_sanitizer=no]) 49 [enable a compiler-based sanitizer (debug)])],
50AS_IF([test "x$enable_sanitizer" != "xno" ], 50 [],
51 [AX_CHECK_COMPILE_FLAG([-fsanitize=$enable_sanitizer], [ 51 [enable_sanitizer=no])
52AS_IF([test "x$enable_sanitizer" != "xno" ], [
53 AX_CHECK_COMPILE_FLAG([-fsanitize=$enable_sanitizer], [
52 EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=$enable_sanitizer -fno-omit-frame-pointer" 54 EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=$enable_sanitizer -fno-omit-frame-pointer"
53 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=$enable_sanitizer" 55 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=$enable_sanitizer"
54 ], [AC_MSG_ERROR([sanitizer not supported: $enable_sanitizer])] 56 ], [AC_MSG_ERROR([sanitizer not supported: $enable_sanitizer])])
55)]) 57])
56 58
57HAVE_IDS="" 59HAVE_IDS=""
58AC_SUBST([HAVE_IDS]) 60AC_SUBST([HAVE_IDS])
@@ -68,8 +70,10 @@ AC_ARG_ENABLE([apparmor],
68 [AS_HELP_STRING([--enable-apparmor], [enable apparmor])]) 70 [AS_HELP_STRING([--enable-apparmor], [enable apparmor])])
69AS_IF([test "x$enable_apparmor" = "xyes"], [ 71AS_IF([test "x$enable_apparmor" = "xyes"], [
70 HAVE_APPARMOR="-DHAVE_APPARMOR" 72 HAVE_APPARMOR="-DHAVE_APPARMOR"
71 PKG_CHECK_MODULES([AA], [libapparmor], 73 PKG_CHECK_MODULES([AA], [libapparmor], [
72 [EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"]) 74 EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS"
75 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"
76 ])
73]) 77])
74 78
75HAVE_SELINUX="" 79HAVE_SELINUX=""
@@ -84,7 +88,6 @@ AS_IF([test "x$enable_selinux" = "xyes"], [
84AC_SUBST([EXTRA_CFLAGS]) 88AC_SUBST([EXTRA_CFLAGS])
85AC_SUBST([EXTRA_LDFLAGS]) 89AC_SUBST([EXTRA_LDFLAGS])
86 90
87
88HAVE_DBUSPROXY="" 91HAVE_DBUSPROXY=""
89AC_SUBST([HAVE_DBUSPROXY]) 92AC_SUBST([HAVE_DBUSPROXY])
90AC_ARG_ENABLE([dbusproxy], 93AC_ARG_ENABLE([dbusproxy],
@@ -217,7 +220,6 @@ AS_IF([test "x$enable_busybox_workaround" = "xyes"], [
217 BUSYBOX_WORKAROUND="yes" 220 BUSYBOX_WORKAROUND="yes"
218]) 221])
219 222
220
221HAVE_GCOV="" 223HAVE_GCOV=""
222AC_SUBST([HAVE_GCOV]) 224AC_SUBST([HAVE_GCOV])
223AC_ARG_ENABLE([gcov], 225AC_ARG_ENABLE([gcov],
@@ -232,7 +234,7 @@ AC_SUBST([HAVE_CONTRIB_INSTALL])
232AC_ARG_ENABLE([contrib-install], 234AC_ARG_ENABLE([contrib-install],
233 [AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])]) 235 [AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])])
234AS_IF([test "x$enable_contrib_install" = "xno"], [ 236AS_IF([test "x$enable_contrib_install" = "xno"], [
235 HAVE_CONTRIB_INSTALL="no" 237 HAVE_CONTRIB_INSTALL="no"
236]) 238])
237 239
238HAVE_FORCE_NONEWPRIVS="" 240HAVE_FORCE_NONEWPRIVS=""
@@ -248,7 +250,7 @@ AC_SUBST([HAVE_ONLY_SYSCFG_PROFILES])
248AC_ARG_ENABLE([only-syscfg-profiles], 250AC_ARG_ENABLE([only-syscfg-profiles],
249 [AS_HELP_STRING([--enable-only-syscfg-profiles], [disable profiles in $HOME/.config/firejail])]) 251 [AS_HELP_STRING([--enable-only-syscfg-profiles], [disable profiles in $HOME/.config/firejail])])
250AS_IF([test "x$enable_only_syscfg_profiles" = "xyes"], [ 252AS_IF([test "x$enable_only_syscfg_profiles" = "xyes"], [
251 HAVE_ONLY_SYSCFG_PROFILES="-DHAVE_ONLY_SYSCFG_PROFILES" 253 HAVE_ONLY_SYSCFG_PROFILES="-DHAVE_ONLY_SYSCFG_PROFILES"
252]) 254])
253 255
254HAVE_LTS="" 256HAVE_LTS=""
@@ -272,10 +274,11 @@ AS_IF([test "x$enable_lts" = "xyes"], [
272 HAVE_FILE_TRANSFER="" 274 HAVE_FILE_TRANSFER=""
273 HAVE_SUID="-DHAVE_SUID" 275 HAVE_SUID="-DHAVE_SUID"
274 BUSYBOX_WORKAROUND="no" 276 BUSYBOX_WORKAROUND="no"
275 HAVE_CONTRIB_INSTALL="no", 277 HAVE_CONTRIB_INSTALL="no"
276]) 278])
277 279
278AC_CHECK_HEADER([linux/seccomp.h], [], AC_MSG_ERROR([*** SECCOMP support is not installed (/usr/include/linux/seccomp.h missing) ***])) 280AC_CHECK_HEADER([linux/seccomp.h], [],
281 [AC_MSG_ERROR([*** SECCOMP support is not installed (/usr/include/linux/seccomp.h missing) ***])])
279 282
280# set sysconfdir 283# set sysconfdir
281if test "$prefix" = /usr; then 284if test "$prefix" = /usr; then
@@ -324,13 +327,10 @@ EOF
324 327
325if test "$HAVE_LTS" = -DHAVE_LTS; then 328if test "$HAVE_LTS" = -DHAVE_LTS; then
326 cat <<\EOF 329 cat <<\EOF
327
328
329********************************************************* 330*********************************************************
330* Warning: Long-term support (LTS) was enabled! * 331* Warning: Long-term support (LTS) was enabled! *
331* Most compile-time options have bean rewritten! * 332* Most compile-time options have been rewritten! *
332********************************************************* 333*********************************************************
333 334
334
335EOF 335EOF
336fi 336fi