diff options
author | 2022-12-01 23:26:28 +0100 | |
---|---|---|
committer | 2022-12-01 23:26:28 +0100 | |
commit | d6b0d40a1941a62875dab7f45afd4271b07bc217 (patch) | |
tree | 714151e9350dc61c0b0e823c5fdae3a86837a3e4 | |
parent | firefox-common-addons: fix whitelisting in ${RUNUSER} (#5497) (diff) | |
parent | configure*: quote and line-wrap AC_CHECK_HEADER line (diff) | |
download | firejail-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-x | configure | 39 | ||||
-rw-r--r-- | configure.ac | 68 |
2 files changed, 57 insertions, 50 deletions
@@ -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; } |
2916 | if test "x$ax_cv_check_cflags___mindirect_branch_thunk" = xyes; then : | 2916 | if 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 | ||
2919 | else | 2921 | else |
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; } |
2952 | if test "x$ax_cv_check_cflags___mretpoline" = xyes; then : | 2954 | if 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 | ||
2955 | else | 2959 | else |
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; } |
2988 | if test "x$ax_cv_check_cflags___fstack_clash_protection" = xyes; then : | 2992 | if 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 | ||
2991 | else | 2997 | else |
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; } |
3024 | if test "x$ax_cv_check_cflags___fstack_protector_strong" = xyes; then : | 3030 | if 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 | ||
3027 | else | 3035 | else |
3028 | : | 3036 | : |
@@ -3048,7 +3056,8 @@ else | |||
3048 | fi | 3056 | fi |
3049 | 3057 | ||
3050 | if test "x$enable_sanitizer" != "xno" ; then : | 3058 | if 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; } |
3054 | if eval \${$as_CACHEVAR+:} false; then : | 3063 | if eval \${$as_CACHEVAR+:} false; then : |
@@ -3086,9 +3095,9 @@ if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : | |||
3086 | 3095 | ||
3087 | else | 3096 | else |
3088 | as_fn_error $? "sanitizer not supported: $enable_sanitizer" "$LINENO" 5 | 3097 | as_fn_error $? "sanitizer not supported: $enable_sanitizer" "$LINENO" 5 |
3089 | |||
3090 | fi | 3098 | fi |
3091 | 3099 | ||
3100 | |||
3092 | fi | 3101 | fi |
3093 | 3102 | ||
3094 | HAVE_IDS="" | 3103 | HAVE_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 | |||
3327 | fi | 3339 | fi |
3328 | 3340 | ||
3329 | fi | 3341 | fi |
@@ -3345,7 +3357,6 @@ fi | |||
3345 | 3357 | ||
3346 | 3358 | ||
3347 | 3359 | ||
3348 | |||
3349 | HAVE_DBUSPROXY="" | 3360 | HAVE_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 | ||
3592 | fi | 3603 | fi |
3593 | 3604 | ||
3594 | |||
3595 | HAVE_GCOV="" | 3605 | HAVE_GCOV="" |
3596 | 3606 | ||
3597 | # Check whether --enable-gcov was given. | 3607 | # Check whether --enable-gcov was given. |
@@ -3615,7 +3625,7 @@ fi | |||
3615 | 3625 | ||
3616 | if test "x$enable_contrib_install" = "xno"; then : | 3626 | if test "x$enable_contrib_install" = "xno"; then : |
3617 | 3627 | ||
3618 | HAVE_CONTRIB_INSTALL="no" | 3628 | HAVE_CONTRIB_INSTALL="no" |
3619 | 3629 | ||
3620 | fi | 3630 | fi |
3621 | 3631 | ||
@@ -3641,7 +3651,7 @@ fi | |||
3641 | 3651 | ||
3642 | if test "x$enable_only_syscfg_profiles" = "xyes"; then : | 3652 | if 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 | ||
3646 | fi | 3656 | fi |
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 | ||
3675 | fi | 3685 | fi |
3676 | 3686 | ||
@@ -5284,13 +5294,10 @@ EOF | |||
5284 | 5294 | ||
5285 | if test "$HAVE_LTS" = -DHAVE_LTS; then | 5295 | if 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 | |||
5295 | EOF | 5302 | EOF |
5296 | fi | 5303 | fi |
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]) | |||
21 | AC_PROG_CC | 21 | AC_PROG_CC |
22 | 22 | ||
23 | HAVE_SPECTRE="no" | 23 | HAVE_SPECTRE="no" |
24 | AX_CHECK_COMPILE_FLAG( | 24 | AX_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 | ]) |
28 | AX_CHECK_COMPILE_FLAG( | 28 | AX_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 | ]) |
32 | AX_CHECK_COMPILE_FLAG( | 32 | AX_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 | ]) |
36 | AX_CHECK_COMPILE_FLAG( | 36 | AX_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 | ||
41 | AC_ARG_ENABLE([analyzer], | 41 | AC_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 | ||
47 | AC_ARG_ENABLE([sanitizer], | 47 | AC_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)])], |
50 | AS_IF([test "x$enable_sanitizer" != "xno" ], | 50 | [], |
51 | [AX_CHECK_COMPILE_FLAG([-fsanitize=$enable_sanitizer], [ | 51 | [enable_sanitizer=no]) |
52 | AS_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 | ||
57 | HAVE_IDS="" | 59 | HAVE_IDS="" |
58 | AC_SUBST([HAVE_IDS]) | 60 | AC_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])]) |
69 | AS_IF([test "x$enable_apparmor" = "xyes"], [ | 71 | AS_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 | ||
75 | HAVE_SELINUX="" | 79 | HAVE_SELINUX="" |
@@ -84,7 +88,6 @@ AS_IF([test "x$enable_selinux" = "xyes"], [ | |||
84 | AC_SUBST([EXTRA_CFLAGS]) | 88 | AC_SUBST([EXTRA_CFLAGS]) |
85 | AC_SUBST([EXTRA_LDFLAGS]) | 89 | AC_SUBST([EXTRA_LDFLAGS]) |
86 | 90 | ||
87 | |||
88 | HAVE_DBUSPROXY="" | 91 | HAVE_DBUSPROXY="" |
89 | AC_SUBST([HAVE_DBUSPROXY]) | 92 | AC_SUBST([HAVE_DBUSPROXY]) |
90 | AC_ARG_ENABLE([dbusproxy], | 93 | AC_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 | |||
221 | HAVE_GCOV="" | 223 | HAVE_GCOV="" |
222 | AC_SUBST([HAVE_GCOV]) | 224 | AC_SUBST([HAVE_GCOV]) |
223 | AC_ARG_ENABLE([gcov], | 225 | AC_ARG_ENABLE([gcov], |
@@ -232,7 +234,7 @@ AC_SUBST([HAVE_CONTRIB_INSTALL]) | |||
232 | AC_ARG_ENABLE([contrib-install], | 234 | AC_ARG_ENABLE([contrib-install], |
233 | [AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])]) | 235 | [AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])]) |
234 | AS_IF([test "x$enable_contrib_install" = "xno"], [ | 236 | AS_IF([test "x$enable_contrib_install" = "xno"], [ |
235 | HAVE_CONTRIB_INSTALL="no" | 237 | HAVE_CONTRIB_INSTALL="no" |
236 | ]) | 238 | ]) |
237 | 239 | ||
238 | HAVE_FORCE_NONEWPRIVS="" | 240 | HAVE_FORCE_NONEWPRIVS="" |
@@ -248,7 +250,7 @@ AC_SUBST([HAVE_ONLY_SYSCFG_PROFILES]) | |||
248 | AC_ARG_ENABLE([only-syscfg-profiles], | 250 | AC_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])]) |
250 | AS_IF([test "x$enable_only_syscfg_profiles" = "xyes"], [ | 252 | AS_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 | ||
254 | HAVE_LTS="" | 256 | HAVE_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 | ||
278 | AC_CHECK_HEADER([linux/seccomp.h], [], AC_MSG_ERROR([*** SECCOMP support is not installed (/usr/include/linux/seccomp.h missing) ***])) | 280 | AC_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 |
281 | if test "$prefix" = /usr; then | 284 | if test "$prefix" = /usr; then |
@@ -324,13 +327,10 @@ EOF | |||
324 | 327 | ||
325 | if test "$HAVE_LTS" = -DHAVE_LTS; then | 328 | if 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 | |||
335 | EOF | 335 | EOF |
336 | fi | 336 | fi |