Detect POSIX threads at configure time and use them for OpenSSL.
[radsecproxy.git] / lib / configure.ac
index bab02ed..7d8bd5f 100644 (file)
@@ -17,6 +17,8 @@ AC_CHECK_LIB([confuse], [cfg_init],,
     AC_MSG_ERROR([required library libconfuse not found]))
 AC_CHECK_LIB([event_core], [event_get_version],,
     AC_MSG_ERROR([required library libevent_core not found]))
     AC_MSG_ERROR([required library libconfuse not found]))
 AC_CHECK_LIB([event_core], [event_get_version],,
     AC_MSG_ERROR([required library libevent_core not found]))
+AH_TEMPLATE([HAVE_PTHREADS], [POSIX threads are available on this system])
+AC_SEARCH_LIBS([pthread_create], [pthread], AC_DEFINE([HAVE_PTHREADS]))
 
 # Enable-knobs.
 ## Enable TLS (RadSec), default on.
 
 # Enable-knobs.
 ## Enable TLS (RadSec), default on.
@@ -47,7 +49,7 @@ AM_CONDITIONAL([RS_ENABLE_TLS_PSK], [test "${enable_tls_psk+set}" = set])
 # Checks for header files.
 AC_CHECK_HEADERS(
     [sys/time.h time.h netdb.h netinet/in.h stdint.h stdlib.h strings.h string.h \
 # Checks for header files.
 AC_CHECK_HEADERS(
     [sys/time.h time.h netdb.h netinet/in.h stdint.h stdlib.h strings.h string.h \
-     sys/socket.h unistd.h syslog.h sys/select.h fcntl.h arpa/inet.h])
+     sys/socket.h unistd.h syslog.h sys/select.h fcntl.h arpa/inet.h pthread.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_SIZE_T
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_SIZE_T