chiark / gitweb /
bus: don't require that if a child object node exists its parent node must too
[elogind.git] / configure.ac
index 156cc96e07a1a5c8694a0311dbe45aa1c354580d..00ee9bb92d78d11639c9918eb49ce0072b1ac86e 100644 (file)
@@ -20,7 +20,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([systemd],
-        [207],
+        [208],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
         [systemd],
         [http://www.freedesktop.org/wiki/Software/systemd])
@@ -101,6 +101,20 @@ if test -z "$GPERF" ; then
         AC_MSG_ERROR([*** gperf not found])
 fi
 
+# ------------------------------------------------------------------------------
+address_sanitizer_cflags=
+address_sanitizer_cppflags=
+address_sanitizer_ldflags=
+AC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
+AS_IF([test "x$enable_address_sanitizer" = "xyes"], [
+            CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
+            AS_IF([test -z "$with_as_cflags"],
+                  [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
+            address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
+            address_sanitizer_cppflags="-DVALGRIND=1"
+            address_sanitizer_ldflags="-Wc,-fsanitize=address"
+      ])
+
 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -pipe \
         -Wall \
@@ -142,13 +156,13 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -fdata-sections \
         -fstack-protector \
         --param=ssp-buffer-size=4])
-AC_SUBST([OUR_CFLAGS], $with_cflags)
+AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags")
 
 AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
                -Wp,-D_FORTIFY_SOURCE=2])],
         [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
-AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
+AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $address_sanitizer_cppflags")
 
 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--as-needed \
@@ -156,7 +170,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--gc-sections \
         -Wl,-z,relro \
         -Wl,-z,now])
-AC_SUBST([OUR_LDFLAGS], $with_ldflags)
+AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags")
 
 # ------------------------------------------------------------------------------
 # we use python to build the man page index, and for systemd-python
@@ -188,6 +202,7 @@ AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [
                   [have_python_devel=no])])
       AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes],
             [AC_MSG_ERROR([*** python-devel support requested but libraries not found])])
+      AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
 ])
 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
 
@@ -509,6 +524,12 @@ else
         fi
 fi
 
+AC_ARG_WITH(smack-run-label,
+AS_HELP_STRING([--with-smack-run-label=STRING],
+        [run systemd --system with a specific SMACK label]),
+        [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
+        [])
+
 if test "x${have_smack}" = xyes ; then
         AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
 fi
@@ -793,7 +814,7 @@ AC_ARG_WITH(telinit,
         AS_HELP_STRING([--with-telinit=PATH],
                 [Path to telinit]),
         [TELINIT="$withval"],
-        [TELINIT="/lib/upstart/telinit"])
+        [TELINIT="/lib/sysvinit/telinit"])
 
 AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
 
@@ -806,7 +827,7 @@ have_myhostname=no
 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
 if test "x$enable_myhostname" != "xno"; then
         AC_HEADER_STDC
-        AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
+        AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
 
         AC_C_CONST
         AC_TYPE_SIZE_T
@@ -1054,6 +1075,7 @@ AC_MSG_RESULT([
         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
         Build Python:            ${PYTHON}
         Installation Python:     ${PYTHON_BINARY}
+        sphinx binary:           ${SPHINX_BUILD}
         firmware path:           ${FIRMWARE_PATH}
         PAM modules dir:         ${with_pamlibdir}
         PAM configuration dir:   ${with_pamconfdir}