From fa82cddfd29801344bfe205eb73d38df0a1acf22 Mon Sep 17 00:00:00 2001 From: Bruce Momjian <bruce@momjian.us> Date: Tue, 2 Nov 2004 05:44:45 +0000 Subject: [PATCH] Move pthread.h test up to use PTHREAD_CFLAGS. Kris Jurka --- configure | 11 ++++++----- configure.in | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure b/configure index df55dd27c32..7e0a563444d 100755 --- a/configure +++ b/configure @@ -13848,6 +13848,12 @@ For details, compile and run src/bin/pg_thread_test. { (exit 1); exit 1; }; } fi +# Check for *_r functions +_CFLAGS="$CFLAGS" +_LIBS="$LIBS" +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +LIBS="$LIBS $PTHREAD_LIBS" + if test "${ac_cv_header_pthread_h+set}" = set; then echo "$as_me:$LINENO: checking for pthread.h" >&5 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 @@ -13959,11 +13965,6 @@ fi -# Check for *_r functions -_CFLAGS="$CFLAGS" -_LIBS="$LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -LIBS="$LIBS $PTHREAD_LIBS" diff --git a/configure.in b/configure.in index 340f23a345b..14af5ae0279 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.383 2004/10/25 00:11:04 pgsql Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.384 2004/11/02 05:44:45 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -1009,13 +1009,14 @@ For details, compile and run src/bin/pg_thread_test. ]) fi -AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --enable-thread-safety])]) - # Check for *_r functions _CFLAGS="$CFLAGS" _LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" + +AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --enable-thread-safety])]) + AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r]) # Do test here with the proper thread flags -- GitLab