diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 952dec3b8..460c93d50 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -3,12 +3,37 @@ AC_INIT(firejail, 0.9.53, netblue30@yahoo.com, , http://firejail.wordpress.com) | |||
3 | AC_CONFIG_SRCDIR([src/firejail/main.c]) | 3 | AC_CONFIG_SRCDIR([src/firejail/main.c]) |
4 | #AC_CONFIG_HEADERS([config.h]) | 4 | #AC_CONFIG_HEADERS([config.h]) |
5 | 5 | ||
6 | |||
7 | AC_PROG_CC | 6 | AC_PROG_CC |
8 | #AC_PROG_CXX | 7 | #AC_PROG_CXX |
9 | AC_PROG_INSTALL | 8 | AC_PROG_INSTALL |
10 | AC_PROG_RANLIB | 9 | AC_PROG_RANLIB |
11 | 10 | ||
11 | HAVE_SPECTRE="no" | ||
12 | AC_MSG_CHECKING(for Spectre mitigation support in gcc or clang compiler) | ||
13 | AS_IF([test "$CC" = "gcc"], [ | ||
14 | HAVE_SPECTRE="yes" | ||
15 | $CC -mindirect-branch=thunk -c dummy.c || HAVE_SPECTRE="no" | ||
16 | rm -f dummy.o | ||
17 | AS_IF([test "$HAVE_SPECTRE" = "yes"], [ | ||
18 | EXTRA_CFLAGS+=" -mindirect-branch=thunk " | ||
19 | ]) | ||
20 | ]) | ||
21 | AS_IF([test "$CC" = "clang"], [ | ||
22 | HAVE_SPECTRE="yes" | ||
23 | $CC -mretpoline -c dummy.c || HAVE_SPECTRE="no" | ||
24 | rm -f dummy.o | ||
25 | AS_IF([test "$HAVE_SPECTRE" = "yes"], [ | ||
26 | EXTRA_CFLAGS+=" -mretpoline " | ||
27 | ]) | ||
28 | ]) | ||
29 | AS_IF([test "$HAVE_SPECTRE" = "yes"], [ | ||
30 | AC_MSG_RESULT(yes) | ||
31 | ]) | ||
32 | AS_IF([test "$HAVE_SPECTRE" = "no"], [ | ||
33 | AC_MSG_RESULT(... not available) | ||
34 | ]) | ||
35 | AC_SUBST([EXTRA_CFLAGS]) | ||
36 | |||
12 | HAVE_APPARMOR="" | 37 | HAVE_APPARMOR="" |
13 | AC_ARG_ENABLE([apparmor], | 38 | AC_ARG_ENABLE([apparmor], |
14 | AS_HELP_STRING([--enable-apparmor], [enable apparmor])) | 39 | AS_HELP_STRING([--enable-apparmor], [enable apparmor])) |
@@ -17,13 +42,12 @@ AS_IF([test "x$enable_apparmor" = "xyes"], [ | |||
17 | AC_SUBST(HAVE_APPARMOR) | 42 | AC_SUBST(HAVE_APPARMOR) |
18 | ]) | 43 | ]) |
19 | 44 | ||
20 | |||
21 | AS_IF([test "x$enable_apparmor" = "xyes"], [ | 45 | AS_IF([test "x$enable_apparmor" = "xyes"], [ |
22 | AC_CHECK_HEADER(sys/apparmor.h, , [AC_MSG_ERROR( | 46 | AC_CHECK_HEADER(sys/apparmor.h, , [AC_MSG_ERROR( |
23 | [Couldn't find sys/apparmor.h... please install apparmor user space library and development files] )]) | 47 | [Couldn't find sys/apparmor.h... please install apparmor user space library and development files] )]) |
24 | ]) | 48 | ]) |
25 | AS_IF([test "x$enable_apparmor" = "xyes"], [ | 49 | AS_IF([test "x$enable_apparmor" = "xyes"], [ |
26 | EXTRA_LDFLAGS+="-lapparmor " | 50 | EXTRA_LDFLAGS+=" -lapparmor " |
27 | ]) | 51 | ]) |
28 | AC_SUBST([EXTRA_LDFLAGS]) | 52 | AC_SUBST([EXTRA_LDFLAGS]) |
29 | 53 | ||
@@ -142,7 +166,7 @@ AC_ARG_ENABLE([gcov], | |||
142 | AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])) | 166 | AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])) |
143 | AS_IF([test "x$enable_gcov" = "xyes"], [ | 167 | AS_IF([test "x$enable_gcov" = "xyes"], [ |
144 | HAVE_GCOV="--coverage -DHAVE_GCOV " | 168 | HAVE_GCOV="--coverage -DHAVE_GCOV " |
145 | EXTRA_LDFLAGS+="-lgcov --coverage " | 169 | EXTRA_LDFLAGS+=" -lgcov --coverage " |
146 | AC_SUBST(HAVE_GCOV) | 170 | AC_SUBST(HAVE_GCOV) |
147 | ]) | 171 | ]) |
148 | 172 | ||
@@ -175,7 +199,7 @@ if test "$prefix" = /usr; then | |||
175 | sysconfdir="/etc" | 199 | sysconfdir="/etc" |
176 | fi | 200 | fi |
177 | 201 | ||
178 | AC_OUTPUT(Makefile src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \ | 202 | AC_OUTPUT(Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \ |
179 | src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile \ | 203 | src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile \ |
180 | src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile) | 204 | src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile) |
181 | 205 | ||
@@ -198,7 +222,9 @@ echo " file transfer support: $HAVE_FILE_TRANSFER" | |||
198 | echo " overlayfs support: $HAVE_OVERLAYFS" | 222 | echo " overlayfs support: $HAVE_OVERLAYFS" |
199 | echo " git install support: $HAVE_GIT_INSTALL" | 223 | echo " git install support: $HAVE_GIT_INSTALL" |
200 | echo " busybox workaround: $BUSYBOX_WORKAROUND" | 224 | echo " busybox workaround: $BUSYBOX_WORKAROUND" |
225 | echo " Spectre compiler patch: $HAVE_SPECTRE" | ||
201 | echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" | 226 | echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" |
227 | echo " EXTRA_CFLAGS: $EXTRA_CFLAGS" | ||
202 | echo " fatal warnings: $HAVE_FATAL_WARNINGS" | 228 | echo " fatal warnings: $HAVE_FATAL_WARNINGS" |
203 | echo " Gcov instrumentation: $HAVE_GCOV" | 229 | echo " Gcov instrumentation: $HAVE_GCOV" |
204 | echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" | 230 | echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" |