diff options
author | Pavel Šimerda <psimerda@redhat.com> | 2012-11-15 07:48:51 +0100 |
---|---|---|
committer | Pavel Šimerda <psimerda@redhat.com> | 2012-11-15 10:40:50 +0100 |
commit | 2750b0759f1250ccfb37389fb88b13bb1151ff0e (patch) | |
tree | ec4e818f54a6791b6dbcc5847d9171cf48cf7a0b /configure.ac | |
parent | 86f857325ec7128413678bd0b3ee84ca9d3b84a8 (diff) | |
download | NetworkManager-2750b0759f1250ccfb37389fb88b13bb1151ff0e.tar.gz |
build: don't write systemd unit file outside of prefix
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 45490be85a..1faa4ccf2c 100644 --- a/configure.ac +++ b/configure.ac @@ -258,14 +258,17 @@ fi AC_SUBST(UDEV_BASE_DIR) # systemd unit support -AC_ARG_WITH([systemdsystemunitdir], - AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), - [], - [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) -if test "x$with_systemdsystemunitdir" != xno; then +AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], + [Directory for systemd service files])) +# default location +AS_IF([test -z "$with_systemdsystemunitdir" && $PKG_CONFIG systemd], + with_systemdsystemunitdir="\$(prefix)/lib/systemd/system") +AS_IF([test -z "$with_systemdsystemunitdir"], with_systemdsystemunitdir=no) +# add conditional and subst +AM_CONDITIONAL(HAVE_SYSTEMD, [test "$with_systemdsystemunitdir" != no]) +if test "$with_systemdsystemunitdir" != no; then AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) fi -AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|ck|none], [Build NetworkManager with specific session tracking support])) if test "z$with_session_tracking" = "z"; then @@ -767,6 +770,12 @@ AC_OUTPUT # Print build configuration echo +echo "System paths:" +echo " prefix: $prefix" +echo " exec_prefix: $exec_prefix" +echo " systemdunitdir: $with_systemdsystemunitdir" +echo + echo Configuration plugins: echo " ifcfg-rh: ${enable_ifcfg_rh}" echo " ifcfg-suse: ${enable_ifcfg_suse}" @@ -792,12 +801,6 @@ else echo dhcpcd support: no fi -if test -n "${with_systemdsystemunitdir}"; then - echo systemd unit support: ${with_systemdsystemunitdir} -else - echo systemd unit support: no -fi - if test "${enable_polkit}" = "yes"; then if test "${enable_modify_system}"; then echo "PolicyKit support: yes (permissive modify.system)" |