Fixed up the test for the c_r library. Also, added the -D_REENTRANT
define _always_.
This commit is contained in:
parent
7fe567da94
commit
284def7321
28
configure.ac
28
configure.ac
@ -1,4 +1,4 @@
|
|||||||
dnl $Id: configure.ac,v 2.20 2002-04-18 18:48:57 rjkaes Exp $
|
dnl $Id: configure.ac,v 2.21 2002-04-25 19:00:03 rjkaes Exp $
|
||||||
|
|
||||||
dnl Devlopers, please strive to achieve this order:
|
dnl Devlopers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -14,7 +14,7 @@ dnl 8. System services
|
|||||||
dnl
|
dnl
|
||||||
dnl Read the Autoconf manual for details.
|
dnl Read the Autoconf manual for details.
|
||||||
|
|
||||||
AC_INIT([tinyproxy], [1.5.0rc4], [rjkaes@users.sourceforge.net])
|
AC_INIT([tinyproxy], [1.5.0rc5], [rjkaes@users.sourceforge.net])
|
||||||
AC_CONFIG_SRCDIR([src/tinyproxy.c])
|
AC_CONFIG_SRCDIR([src/tinyproxy.c])
|
||||||
AC_PREREQ(2.52)
|
AC_PREREQ(2.52)
|
||||||
|
|
||||||
@ -155,7 +155,9 @@ AC_PROG_LN_S
|
|||||||
AM_PROG_LEX
|
AM_PROG_LEX
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
|
|
||||||
CFLAGS="$cflags_save"
|
dnl Restore the CFLAGS and add the -D_REENTRANT define since threading is
|
||||||
|
dnl in use.
|
||||||
|
CFLAGS="$cflags_save -D_REENTRANT"
|
||||||
|
|
||||||
dnl Make sure YACC is actually bison
|
dnl Make sure YACC is actually bison
|
||||||
if test x"$YACC" != x"bison -y"; then
|
if test x"$YACC" != x"bison -y"; then
|
||||||
@ -166,24 +168,12 @@ dnl
|
|||||||
dnl Checks for libraries
|
dnl Checks for libraries
|
||||||
dnl
|
dnl
|
||||||
AC_CHECK_LIB(pthread, pthread_create)
|
AC_CHECK_LIB(pthread, pthread_create)
|
||||||
if test x"$ac_cv_lib_pthread_pthread_create" = x"yes"; then
|
if test x"$ac_cv_lib_pthread_pthread_create" != x"yes"; then
|
||||||
CFLAGS="-D_REENTRANT $CFLAGS"
|
|
||||||
else
|
|
||||||
AC_CHECK_LIB(pthreads, pthread_create)
|
AC_CHECK_LIB(pthreads, pthread_create)
|
||||||
if test x"$ac_cv_lib_pthreads_pthread_create" = x"yes"; then
|
if test x"$ac_cv_lib_pthreads_pthread_create" != x"yes"; then
|
||||||
CFLAGS="-D_REENTRANT $CFLAGS"
|
|
||||||
else
|
|
||||||
AC_CHECK_LIB(c_r, pthread_create,
|
AC_CHECK_LIB(c_r, pthread_create,
|
||||||
USE_PTHREAD=1 PTHREAD_LDFLAGS="-lc_r")
|
[CFLAGS="-pthread $CFLAGS"],
|
||||||
if test x"$ac_cv_lib_c_r_pthread_create" = x"yes"; then
|
[AC_MSG_ERROR([You must have a POSIX compliant threading library installed])])
|
||||||
CFLAGS="-pthread -D_REENTRANT $CFLAGS"
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([You must have a POSIX compliant threading library installed])
|
|
||||||
fi
|
|
||||||
case "$target" in
|
|
||||||
*-freebsd*) ;;
|
|
||||||
*) LIBS="$LIBS -lc_r";;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user