summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2019-06-05 09:17:38 -0700
committerLee Duncan <lduncan@suse.com>2019-06-05 09:17:38 -0700
commit655b636528ebf0934d79dc952a6af86047f45af3 (patch)
tree03d70f66fea54cd1e7f78d5eac7ac8a1573f8f28
parentf71581bd641dc26d330cb8b97e5ec272dd08f811 (diff)
downloadopen-iscsi-655b636528ebf0934d79dc952a6af86047f45af3.tar.gz
Handle systemd disablement correctly in iscsiuio
Commit c1870ae6dddb7bc2dbdc750df68edbbe1a80763f added systemd support to iscsiuio, but it was not integrated with the autoconf script there, so this commit rectifies that. Now one can build without systemd support, from the top, using: $ make OPTFLAGS="... -DNO_SYSTEMD ... which now works for both iscsid and iscsiuio.
-rw-r--r--Makefile5
-rw-r--r--iscsiuio/configure.ac8
2 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9a33774..6cd8790 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,9 @@ endif
# export systemd disablement if set
ifneq ($(NO_SYSTEMD),)
export NO_SYSTEMD
+WITHOUT_ARG = --without-systemd
+else
+WITHOUT_ARG =
endif
# Random comments:
@@ -70,7 +73,7 @@ user: iscsiuio/Makefile
@echo "Read README file for detailed information."
iscsiuio/Makefile: iscsiuio/configure iscsiuio/Makefile.in
- cd iscsiuio; ./configure
+ cd iscsiuio; ./configure $(WITHOUT_ARG)
iscsiuio/configure iscsiuio/Makefile.in: iscsiuio/configure.ac iscsiuio/Makefile.am
cd iscsiuio; autoreconf --install
diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac
index ae23078..096573b 100644
--- a/iscsiuio/configure.ac
+++ b/iscsiuio/configure.ac
@@ -63,6 +63,14 @@ AC_ARG_ENABLE(debug,
CFLAGS="${CFLAGS} -g -O0"
fi])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
+## check for systemd support, default on
+AC_ARG_WITH([systemd],
+ AS_HELP_STRING([--without-systemd], [Build without systemd]),
+ [case "${withval}" in
+ yes) LDFLAGS="`pkg-config --libs libsystemd`" ;;
+ no) CFLAGS="${CFLAGS} -DNO_SYSTEMD" ;;
+ *) AC_MSG_ERROR([bad value $withval for --with-systemd]) ;;
+ esac],[LDFLAGS="`pkg-config --libs libsystemd`"])
AC_CONFIG_COMMANDS([default],[[
if [ -n "$SOURCE_DATE_EPOCH" ] ; then