chiark / gitweb /
add devuan build control files
[elogind.git] / configure.ac
index df38297bfdf4c79841e4df290cd08084b891b214..c0ad243d249a6aa0cad67764958913f7c877c222 100644 (file)
@@ -20,7 +20,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([elogind],
-        [234],
+        [234.4],
         [https://github.com/elogind/elogind/issues],
         [elogind],
         [https://github.com/elogind/elogind])
@@ -247,14 +247,20 @@ AS_CASE([$CC], [*clang*],
         ])])
 
 # ------------------------------------------------------------------------------
+have_lto=no
 AC_ARG_ENABLE([lto], [AS_HELP_STRING([--disable-lto], [disable -flto])],
                      [], [enable_lto=yes])
 AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
-        [AS_IF([test "x$enable_lto" = "xyes"],
-               [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [-flto])],
+        [AS_IF([test "x$enable_lto" = "xyes"], [have_lto=yes],
                [AC_MSG_RESULT([disabling -flto as requested])])],
         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
 
+AS_IF([test "x$have_lto" = "xyes"],
+        [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS],
+        [-flto -fuse-linker-plugin])])
+
+AS_CASE([$with_cflags], [*-flto*], [], [have_lto=no])
+
 # ------------------------------------------------------------------------------
 AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
@@ -279,8 +285,9 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--no-undefined \
         -Wl,-z,relro \
         -Wl,-z,now \
-        -pie \
-        -Wl,-fuse-ld=gold])
+        -pie])
+AS_IF([test "x$have_lto" = "xyes"],
+        [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [-Wl,-fuse-ld=gold])])
 
 # ------------------------------------------------------------------------------
 AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
@@ -758,6 +765,12 @@ AC_ARG_WITH([rootlibdir],
         [with_rootlibdir=${libdir}])
 AX_NORMALIZE_PATH([with_rootlibdir])
 
+AC_ARG_WITH([rootlibexecdir],
+        AS_HELP_STRING([--with-rootlibexecdir=DIR], [Root directory for executables necessary for boot]),
+        [],
+        [with_rootlibexecdir=${with_rootprefix}/lib/elogind])
+AX_NORMALIZE_PATH([with_rootlibexecdir])
+
 AC_ARG_WITH([pamlibdir],
         AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
         [],
@@ -841,6 +854,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([pamconfdir], [$with_pamconfdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
+AC_SUBST([rootlibexecdir], [$with_rootlibexecdir])
 AC_SUBST([cgroup_controller], [$with_cgroupctrl])
 
 AC_CONFIG_FILES([
@@ -865,6 +879,7 @@ AC_MSG_RESULT([
         test coverage: . . . . . . . . . . ${have_coverage}
         Split /usr: . . . . . . . . . . .  ${enable_split_usr}
         utmp/wtmp support: . . . . . . . . ${have_utmp}
+        Link time optimization: . . . . .  ${have_lto}
         extra debugging: . . . . . . . . . ${enable_debug}
         cgroup controller: . . . . . . . . ${with_cgroupctrl}
 
@@ -875,6 +890,7 @@ AC_MSG_RESULT([
         includedir: . . . . . . . . . . .  ${includedir}
         lib dir: . . . . . . . . . . . . . ${libdir}
         rootlib dir: . . . . . . . . . . . ${with_rootlibdir}
+        rootlibexec dir: . . . . . . . . . ${with_rootlibexecdir}
         PAM modules dir: . . . . . . . . . ${with_pamlibdir}
         PAM configuration dir: . . . . . . ${with_pamconfdir}
         D-Bus policy dir: . . . . . . . .  ${with_dbuspolicydir}