comparison configure.ac @ 2174:ce312cad5ecd

Use correct OpenSSL thread safety macros on OS X (closes #209) Create an Autoconf test to determine if pthread_t is a pointer or scalar type, and use the appropriate CRYPTO_THREADID_set macro based on the result.
author Benjamin Barenblat <bbaren at mit.edu>
date Sun, 20 Sep 2015 17:46:07 -0400
parents 7187068f56f5
children 4f4ae5c92434
comparison
equal deleted inserted replaced
2173:010ce27228f1 2174:ce312cad5ecd
110 if test [$CLANG = "yes"]; then 110 if test [$CLANG = "yes"]; then
111 PTHREAD_CFLAGS="" 111 PTHREAD_CFLAGS=""
112 PTHREAD_LIBS="" 112 PTHREAD_LIBS=""
113 fi 113 fi
114 114
115 # Check if pthread_t is a scalar or pointer type so we can use the correct
116 # OpenSSL functions on it.
117 AC_MSG_CHECKING([if pthread_t is a pointer type])
118 AC_COMPILE_IFELSE(
119 [AC_LANG_PROGRAM(
120 [[
121 #include <pthread.h>
122 ]],
123 [[
124 pthread_t a;
125 *a;
126 ]])],
127 AC_DEFINE([PTHREAD_T_IS_POINTER], [1], [Define if pthread_t is a pointer.])
128 AC_MSG_RESULT(yes),
129 AC_MSG_RESULT(no))
130
115 AC_SUBST(CC) 131 AC_SUBST(CC)
116 AC_SUBST(BIN) 132 AC_SUBST(BIN)
117 AC_SUBST(LIB) 133 AC_SUBST(LIB)
118 AC_SUBST(SRCLIB) 134 AC_SUBST(SRCLIB)
119 AC_SUBST(INCLUDE) 135 AC_SUBST(INCLUDE)