You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@locus.apache.org on 2000/06/23 20:02:33 UTC
cvs commit: apache-2.0/src/lib/apr threads.m4 configure.in
stoddard 00/06/23 11:02:32
Modified: src/lib/apr threads.m4 configure.in
Log:
gcc issues warnings when parsing AIX 4.3.3's pthread.h
which causes autoconf to incorrectly conclude that
pthreads is not available. Turn off warnings for this check
if we're using gcc.
Submitted by: Victor Orlikowski
Reviewed by: Bill Stoddard
Revision Changes Path
1.11 +15 -0 apache-2.0/src/lib/apr/threads.m4
Index: threads.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threads.m4,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- threads.m4 2000/06/11 11:48:02 1.10
+++ threads.m4 2000/06/23 18:02:29 1.11
@@ -34,6 +34,21 @@
fi
])dnl
+dnl gcc issues warnings when parsing AIX 4.3.3's pthread.h
+dnl which causes autoconf to incorrectly conclude that
+dnl pthreads is not available.
+dnl Turn off warnings if we're using gcc.
+AC_DEFUN(CHECK_PTHREADS_H, [
+ if test "$GCC" = "yes"; then
+ SAVE_FL="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -w"
+ AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
+ CPPFLAGS="$SAVE_FL"
+ else
+ AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
+ fi
+])dnl
+
AC_DEFUN(APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS, [
AC_CACHE_CHECK(whether pthread_getspecific takes two arguments, ac_cv_pthread_getspecific_two_args,[
AC_TRY_COMPILE([
1.118 +4 -5 apache-2.0/src/lib/apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- configure.in 2000/06/23 16:00:44 1.117
+++ configure.in 2000/06/23 18:02:29 1.118
@@ -422,9 +422,8 @@
[ AC_ARG_ENABLE(threads,
[ --enable-threads Enable threading support in APR.],
[ ac_cv_enable_threads=$enableval] ,
- [ AC_CHECK_HEADERS(pthread.h,
- [ ac_cv_enable_threads="pthread" ] ,
- [ ac_cv_enable_threads="no" ] ) ] ) ] )
+ [ CHECK_PTHREADS_H([ ac_cv_enable_threads="pthread" ] ,
+ [ ac_cv_enable_threads="no" ] ) ] ) ] )
if test "$ac_cv_enable_threads" = "no"; then
echo "Don't enable threads"
@@ -436,7 +435,7 @@
# We have specified pthreads for our threading library, just make sure
# that we have everything we need
PTHREADS_CHECK
- AC_CHECK_HEADERS(pthread.h, [
+ CHECK_PTHREADS_H([
threads="1"
pthreadh="1"
AC_DEFINE(USE_THREADS) ], [
@@ -450,7 +449,7 @@
# them. In this case, just look for pthreads. In the future, we can check
# for other threading libraries as well.
PTHREADS_CHECK
- AC_CHECK_HEADERS(pthread.h, [
+ CHECK_PTHREADS_H([
threads="1"
pthreadh="1"
AC_DEFINE(USE_THREADS) ], [