diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-11-30 03:34:14 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-12-03 07:53:07 -0300 |
commit | 35332bd99808335b79c01845b3dabf0d3e21fee1 (patch) | |
tree | 332a1c9719cb77e0044a2e9b1e31c635752d163e /configure.ac | |
parent | build: actually set LDFLAGS and LIBS in makefiles (diff) | |
download | firejail-35332bd99808335b79c01845b3dabf0d3e21fee1.tar.gz firejail-35332bd99808335b79c01845b3dabf0d3e21fee1.tar.zst firejail-35332bd99808335b79c01845b3dabf0d3e21fee1.zip |
build: move library flags from EXTRA_LDFLAGS to LIBS
LIBS is the variable that Autoconf uses to put library flags. From the
manual of GNU Autoconf (version 2.69):
> -- Variable: LDFLAGS
>
> [...]
>
> This variable's contents should contain options like '-s' and '-L'
> that affect only the behavior of the linker. Please see the
> explanation of 'CFLAGS' for what you can do if an option also
> affects other phases of the compiler.
>
> Don't use this variable to pass library names ('-l') to the linker;
> use 'LIBS' instead.
>
> -- Variable: LIBS
>
> '-l' options to pass to the linker. The default value is empty,
> but some Autoconf macros may prepend extra libraries to this
> variable if those libraries are found and provide necessary
> functions, see *note Libraries::. 'configure' uses this variable
> when linking programs to test for C, C++, Objective C, Objective
> C++, Fortran, and Go features.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 416d79682..556019232 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -72,7 +72,7 @@ AS_IF([test "x$enable_apparmor" = "xyes"], [ | |||
72 | HAVE_APPARMOR="-DHAVE_APPARMOR" | 72 | HAVE_APPARMOR="-DHAVE_APPARMOR" |
73 | PKG_CHECK_MODULES([AA], [libapparmor], [ | 73 | PKG_CHECK_MODULES([AA], [libapparmor], [ |
74 | EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" | 74 | EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" |
75 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS" | 75 | LIBS="$LIBS $AA_LIBS" |
76 | ]) | 76 | ]) |
77 | ]) | 77 | ]) |
78 | 78 | ||
@@ -82,7 +82,7 @@ AC_ARG_ENABLE([selinux], | |||
82 | [AS_HELP_STRING([--enable-selinux], [SELinux labeling support])]) | 82 | [AS_HELP_STRING([--enable-selinux], [SELinux labeling support])]) |
83 | AS_IF([test "x$enable_selinux" = "xyes"], [ | 83 | AS_IF([test "x$enable_selinux" = "xyes"], [ |
84 | HAVE_SELINUX="-DHAVE_SELINUX" | 84 | HAVE_SELINUX="-DHAVE_SELINUX" |
85 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lselinux" | 85 | LIBS="$LIBS -lselinux" |
86 | ]) | 86 | ]) |
87 | 87 | ||
88 | AC_SUBST([EXTRA_CFLAGS]) | 88 | AC_SUBST([EXTRA_CFLAGS]) |
@@ -226,7 +226,8 @@ AC_ARG_ENABLE([gcov], | |||
226 | [AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])]) | 226 | [AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])]) |
227 | AS_IF([test "x$enable_gcov" = "xyes"], [ | 227 | AS_IF([test "x$enable_gcov" = "xyes"], [ |
228 | HAVE_GCOV="--coverage -DHAVE_GCOV" | 228 | HAVE_GCOV="--coverage -DHAVE_GCOV" |
229 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgcov --coverage" | 229 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS --coverage" |
230 | LIBS="$LIBS -lgcov" | ||
230 | ]) | 231 | ]) |
231 | 232 | ||
232 | HAVE_CONTRIB_INSTALL="yes" | 233 | HAVE_CONTRIB_INSTALL="yes" |