aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-19 22:45:22 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-19 22:45:22 +0200
commit3f7e23cf08560facf861e1773390d4f5b67d39cc (patch)
treecbda6701328877a776f350f5e4ff10d1b68eac44
parent42479fe6351a0d5f8c233c157010a66fed43cc70 (diff)
Make using pthread optional
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index a13a64c..cc938dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,11 @@ AC_ARG_WITH([selinux],
[Build with SELinux label file support])],
[want_selinux="${withval}"], [want_selinux="maybe"])
+AC_ARG_WITH([pthread],
+ [AS_HELP_STRING([--without-pthread],
+ [Build without pthread based block compressor])],
+ [want_pthread="${withval}"], [want_pthread="yes"])
+
##### search for dependencies #####
AM_CONDITIONAL([WITH_GZIP], [true])
@@ -133,9 +138,11 @@ yes) AM_COND_IF([WITH_SELINUX], [], [AC_MSG_ERROR([cannot find selinux])]) ;;
no) AM_CONDITIONAL([WITH_SELINUX], [false]) ;;
esac
-have_pthread="no"
-AX_PTHREAD([have_pthread="yes"], [])
-AM_CONDITIONAL([HAVE_PTHREAD], [test "x$have_pthread" != "xno"])
+AM_CONDITIONAL([HAVE_PTHREAD], [false])
+if test "x$want_pthread" = "xyes"; then
+ AX_PTHREAD([AM_CONDITIONAL([HAVE_PTHREAD], [true])],
+ [AC_MSG_ERROR([cannot find pthread])])
+fi
##### additional checks #####
AX_COMPILE_CHECK_SIZEOF(time_t)