[cpp-log4shib] 13/17: Shorten pthreads detection logic

Scott Cantor cantor.2 at osu.edu
Mon Jun 25 10:18:24 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-log4shib.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-log4shib.git;a=commit;h=384a1d4cfcc39f63da63c1fd72d7b12166e671cf

commit 384a1d4cfcc39f63da63c1fd72d7b12166e671cf
Author: Ferenc Wágner <wferi at debian.org>
AuthorDate: Mon Jun 25 10:35:57 2018 +0200

    Shorten pthreads detection logic
---
 configure.ac | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 06b8504..a7f4bfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,19 +97,14 @@ AC_CHECK_FUNCS([syslog gettimeofday ftime localtime_r gmtime_r])
 AC_SEARCH_LIBS([socket],[socket],,[AC_MSG_ERROR([cannot find socket() function])])
 AC_SEARCH_LIBS([gethostbyname],[nsl],,[AC_MSG_ERROR([cannot find gethostbyname() function])])
 
-# checks for pthreads
-AX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
-if test $enable_threads != "pthread"; then
-    AC_MSG_ERROR([unable to find pthreads, currently this is required])
-else
-    AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
-    AC_DEFINE(HAVE_THREADING,1,[define if threading is enabled])
+AX_PTHREAD(
+   [AC_DEFINE(HAVE_THREADING,1,[define if threading is enabled])
     AC_DEFINE(USE_PTHREADS,1,[define if pthread library is available])
     AC_DEFINE(_PTHREADS,1,[define for STL if pthread library is used])
     AM_CFLAGS="$PTHREAD_CFLAGS $AM_CFLAGS"
     AM_CXXFLAGS="$PTHREAD_CFLAGS $AM_CXXFLAGS"
-    CC="$PTHREAD_CC"
-fi
+    CC="$PTHREAD_CC"],
+   [AC_MSG_ERROR([unable to find pthreads, currently this is required])])
 
 AC_SUBST([AM_CFLAGS])
 AC_SUBST([AM_CXXFLAGS])

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list