summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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