diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2021-05-22 18:17:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 18:17:58 +0000 |
commit | e8a972a5f60190da77a6e16c289ea4c8fb6ae72e (patch) | |
tree | f95323b54ed48d56e02a39f7f448408b5661717a /configure.ac | |
parent | support trailing comments on profile lines (diff) | |
parent | configure*: fix build with non-bash /bin/sh (diff) | |
download | firejail-e8a972a5f60190da77a6e16c289ea4c8fb6ae72e.tar.gz firejail-e8a972a5f60190da77a6e16c289ea4c8fb6ae72e.tar.zst firejail-e8a972a5f60190da77a6e16c289ea4c8fb6ae72e.zip |
Merge pull request #4293 from kmk3/configure-fix-portability
configure*: fix build with non-bash /bin/sh
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 036b62484..606f4ef7e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -24,25 +24,25 @@ AC_PROG_RANLIB | |||
24 | HAVE_SPECTRE="no" | 24 | HAVE_SPECTRE="no" |
25 | AX_CHECK_COMPILE_FLAG( | 25 | AX_CHECK_COMPILE_FLAG( |
26 | [-mindirect-branch=thunk], | 26 | [-mindirect-branch=thunk], |
27 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -mindirect-branch=thunk"] | 27 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"] |
28 | ) | 28 | ) |
29 | AX_CHECK_COMPILE_FLAG( | 29 | AX_CHECK_COMPILE_FLAG( |
30 | [-mretpoline], | 30 | [-mretpoline], |
31 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -mretpoline"] | 31 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"] |
32 | ) | 32 | ) |
33 | AX_CHECK_COMPILE_FLAG( | 33 | AX_CHECK_COMPILE_FLAG( |
34 | [-fstack-clash-protection], | 34 | [-fstack-clash-protection], |
35 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -fstack-clash-protection"] | 35 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"] |
36 | ) | 36 | ) |
37 | AX_CHECK_COMPILE_FLAG( | 37 | AX_CHECK_COMPILE_FLAG( |
38 | [-fstack-protector-strong], | 38 | [-fstack-protector-strong], |
39 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -fstack-protector-strong"] | 39 | [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong"] |
40 | ) | 40 | ) |
41 | 41 | ||
42 | AC_ARG_ENABLE([analyzer], | 42 | AC_ARG_ENABLE([analyzer], |
43 | AS_HELP_STRING([--enable-analyzer], [enable GCC 10 static analyzer])) | 43 | AS_HELP_STRING([--enable-analyzer], [enable GCC 10 static analyzer])) |
44 | AS_IF([test "x$enable_analyzer" = "xyes"], [ | 44 | AS_IF([test "x$enable_analyzer" = "xyes"], [ |
45 | EXTRA_CFLAGS+=" -fanalyzer" | 45 | EXTRA_CFLAGS="$EXTRA_CFLAGS -fanalyzer" |
46 | ]) | 46 | ]) |
47 | 47 | ||
48 | HAVE_APPARMOR="" | 48 | HAVE_APPARMOR="" |
@@ -50,7 +50,8 @@ AC_ARG_ENABLE([apparmor], | |||
50 | AS_HELP_STRING([--enable-apparmor], [enable apparmor])) | 50 | AS_HELP_STRING([--enable-apparmor], [enable apparmor])) |
51 | AS_IF([test "x$enable_apparmor" = "xyes"], [ | 51 | AS_IF([test "x$enable_apparmor" = "xyes"], [ |
52 | HAVE_APPARMOR="-DHAVE_APPARMOR" | 52 | HAVE_APPARMOR="-DHAVE_APPARMOR" |
53 | PKG_CHECK_MODULES([AA], libapparmor, [EXTRA_CFLAGS+=" $AA_CFLAGS" && EXTRA_LDFLAGS+=" $AA_LIBS"]) | 53 | PKG_CHECK_MODULES([AA], libapparmor, |
54 | [EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"]) | ||
54 | AC_SUBST(HAVE_APPARMOR) | 55 | AC_SUBST(HAVE_APPARMOR) |
55 | ]) | 56 | ]) |
56 | 57 | ||
@@ -59,7 +60,7 @@ AC_ARG_ENABLE([selinux], | |||
59 | AS_HELP_STRING([--enable-selinux], [SELinux labeling support])) | 60 | AS_HELP_STRING([--enable-selinux], [SELinux labeling support])) |
60 | AS_IF([test "x$enable_selinux" = "xyes"], [ | 61 | AS_IF([test "x$enable_selinux" = "xyes"], [ |
61 | HAVE_SELINUX="-DHAVE_SELINUX" | 62 | HAVE_SELINUX="-DHAVE_SELINUX" |
62 | EXTRA_LDFLAGS+=" -lselinux " | 63 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lselinux " |
63 | AC_SUBST(HAVE_SELINUX) | 64 | AC_SUBST(HAVE_SELINUX) |
64 | ]) | 65 | ]) |
65 | 66 | ||
@@ -215,7 +216,7 @@ AC_ARG_ENABLE([gcov], | |||
215 | AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])) | 216 | AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])) |
216 | AS_IF([test "x$enable_gcov" = "xyes"], [ | 217 | AS_IF([test "x$enable_gcov" = "xyes"], [ |
217 | HAVE_GCOV="--coverage -DHAVE_GCOV " | 218 | HAVE_GCOV="--coverage -DHAVE_GCOV " |
218 | EXTRA_LDFLAGS+=" -lgcov --coverage " | 219 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgcov --coverage " |
219 | AC_SUBST(HAVE_GCOV) | 220 | AC_SUBST(HAVE_GCOV) |
220 | ]) | 221 | ]) |
221 | 222 | ||