summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-01-02 19:05:30 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-01-02 19:05:30 (GMT)
commit2453f290ecff579cc17907c250eeb697a7792e8b (patch)
treee6a014ca9d5d6137a62ccddf707dd6419b4f0245
parentdc886d2d4f12f5f87ee7590d1605707be3c129a6 (diff)
downloadhdf5-2453f290ecff579cc17907c250eeb697a7792e8b.zip
hdf5-2453f290ecff579cc17907c250eeb697a7792e8b.tar.gz
hdf5-2453f290ecff579cc17907c250eeb697a7792e8b.tar.bz2
[svn-r4765] Purpose:
Bug fix. Description: FreeBSD would fail the threadsafe feature if static-exec is not on. Solution: Force enable-static-exec on if enable-threadsafe is on. Also moved the chunk of FreeBSD specific code for Pthread setup from configure.in to config/freebsd. Also changed enable-threadsafe to check on linking pthread program. That takes care of platforms (e.g. freebsd) that has pthread support builtin the default C library. Now one can just use "enable-threadsafe" if the compiler has pthread support by default. Platforms tested: eirene, Sleipnir
-rw-r--r--config/freebsd9
-rwxr-xr-xconfigure267
-rw-r--r--configure.in21
3 files changed, 151 insertions, 146 deletions
diff --git a/config/freebsd b/config/freebsd
index 8608a85..0b91659 100644
--- a/config/freebsd
+++ b/config/freebsd
@@ -19,3 +19,12 @@ NOFP=${NOFP:=-fomit-frame-pointer}
# Figure out compiler flags
. $srcdir/config/gnu-flags
+
+# Special setup to use pthread support if enable-threadsafe is on.
+# Works with static executable only.
+if test "X-" != "X-$enable_threadsafe"; then
+ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
+ LDFLAGS="$LDFLAGS -pthread"
+ LIBS="$LIBS -lcipher"
+ enable_static_exec=yes
+fi
diff --git a/configure b/configure
index 7e85a82..f11d7f7 100755
--- a/configure
+++ b/configure
@@ -7528,9 +7528,8 @@ else
fi
done
- if test `uname` != "FreeBSD"; then
- echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:7534: checking for pthread_create in -lpthread" >&5
+ echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
+echo "configure:7533: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7538,7 +7537,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7542 "configure"
+#line 7541 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7549,7 +7548,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:7553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7577,15 +7576,10 @@ else
unset PTHREAD
fi
- else
- CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
- LDFLAGS="$LDFLAGS -pthread"
- LIBS="$LIBS -lcipher"
- fi
;;
no)
echo $ac_n "checking for pthread""... $ac_c" 1>&6
-echo "configure:7589: checking for pthread" >&5
+echo "configure:7583: checking for pthread" >&5
echo "$ac_t""suppressed" 1>&6
unset PTHREAD
;;
@@ -7610,17 +7604,17 @@ echo "configure:7589: checking for pthread" >&5
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7614: checking for $ac_hdr" >&5
+echo "configure:7608: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7619 "configure"
+#line 7613 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7652,17 +7646,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7656: checking for $ac_hdr" >&5
+echo "configure:7650: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7661 "configure"
+#line 7655 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7695,7 +7689,7 @@ done
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$pthread_lib"
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:7699: checking for pthread_create in -lpthread" >&5
+echo "configure:7693: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7703,7 +7697,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7707 "configure"
+#line 7701 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7714,7 +7708,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:7718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7744,7 +7738,7 @@ fi
else
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:7748: checking for pthread_create in -lpthread" >&5
+echo "configure:7742: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7752,7 +7746,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7756 "configure"
+#line 7750 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7763,7 +7757,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7796,7 +7790,7 @@ fi
esac
echo $ac_n "checking for thread safe support""... $ac_c" 1>&6
-echo "configure:7800: checking for thread safe support" >&5
+echo "configure:7794: checking for thread safe support" >&5
# Check whether --enable-threadsafe or --disable-threadsafe was given.
if test "${enable_threadsafe+set}" = set; then
enableval="$enable_threadsafe"
@@ -7809,13 +7803,24 @@ case "X-$THREADSAFE" in
echo "$ac_t""no" 1>&6
;;
X-yes)
- if test -n "$PTHREAD"; then
- echo "$ac_t""yes" 1>&6
- THREADSAFE=yes
- else
- echo "$ac_t""error" 1>&6
- { echo "configure: error: needed pthread library not available" 1>&2; exit 1; }
- fi
+ cat > conftest.$ac_ext <<EOF
+#line 7808 "configure"
+#include "confdefs.h"
+
+int main() {
+pthread_create()
+; return 0; }
+EOF
+if { (eval echo configure:7815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6; THREADSAFE=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ { echo "configure: error: needed pthread library not available" 1>&2; exit 1; }
+fi
+rm -f conftest*
;;
*)
echo "$ac_t""error" 1>&6
@@ -7831,7 +7836,7 @@ EOF
fi
echo $ac_n "checking whether HDF5 v1.4 compatibility functions enabled""... $ac_c" 1>&6
-echo "configure:7835: checking whether HDF5 v1.4 compatibility functions enabled" >&5
+echo "configure:7840: checking whether HDF5 v1.4 compatibility functions enabled" >&5
# Check whether --enable-hdf5v1_4 or --disable-hdf5v1_4 was given.
if test "${enable_hdf5v1_4+set}" = set; then
enableval="$enable_hdf5v1_4"
@@ -7850,7 +7855,7 @@ else
fi
echo $ac_n "checking for Stream Virtual File Driver support""... $ac_c" 1>&6
-echo "configure:7854: checking for Stream Virtual File Driver support" >&5
+echo "configure:7859: checking for Stream Virtual File Driver support" >&5
# Check whether --enable-stream-vfd or --disable-stream-vfd was given.
if test "${enable_stream_vfd+set}" = set; then
enableval="$enable_stream_vfd"
@@ -7864,17 +7869,17 @@ if test "$STREAM_VFD" = "yes"; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7868: checking for $ac_hdr" >&5
+echo "configure:7873: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7873 "configure"
+#line 7878 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7906,9 +7911,9 @@ EOF
echo $ac_n "checking if socklen_t is defined""... $ac_c" 1>&6
-echo "configure:7910: checking if socklen_t is defined" >&5
+echo "configure:7915: checking if socklen_t is defined" >&5
cat > conftest.$ac_ext <<EOF
-#line 7912 "configure"
+#line 7917 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7927,7 +7932,7 @@ int main() {
socklen_t foo; return 0;
; return 0; }
EOF
-if { (eval echo configure:7931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_SOCKLEN_T 1
@@ -7947,9 +7952,9 @@ fi
echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
-echo "configure:7951: checking for tm_gmtoff in struct tm" >&5
+echo "configure:7956: checking for tm_gmtoff in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 7953 "configure"
+#line 7958 "configure"
#include "confdefs.h"
#include <sys/time.h>
@@ -7958,7 +7963,7 @@ int main() {
struct tm tm; tm.tm_gmtoff=0;
; return 0; }
EOF
-if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TM_GMTOFF 1
@@ -7974,9 +7979,9 @@ fi
rm -f conftest*
echo $ac_n "checking for __tm_gmtoff in struct tm""... $ac_c" 1>&6
-echo "configure:7978: checking for __tm_gmtoff in struct tm" >&5
+echo "configure:7983: checking for __tm_gmtoff in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 7980 "configure"
+#line 7985 "configure"
#include "confdefs.h"
#include <sys/time.h>
@@ -7985,7 +7990,7 @@ int main() {
struct tm tm; tm.__tm_gmtoff=0;
; return 0; }
EOF
-if { (eval echo configure:7989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE___TM_GMTOFF 1
@@ -8001,9 +8006,9 @@ fi
rm -f conftest*
echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
-echo "configure:8005: checking for global timezone variable" >&5
+echo "configure:8010: checking for global timezone variable" >&5
cat > conftest.$ac_ext <<EOF
-#line 8007 "configure"
+#line 8012 "configure"
#include "confdefs.h"
#include <sys/time.h>
@@ -8012,7 +8017,7 @@ int main() {
timezone=0;
; return 0; }
EOF
-if { (eval echo configure:8016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIMEZONE 1
@@ -8028,12 +8033,12 @@ fi
rm -f conftest*
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:8032: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:8037: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8037 "configure"
+#line 8042 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -8041,7 +8046,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:8045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -8062,12 +8067,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:8066: checking for tm_zone in struct tm" >&5
+echo "configure:8071: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8071 "configure"
+#line 8076 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -8075,7 +8080,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:8079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -8095,12 +8100,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:8099: checking for tzname" >&5
+echo "configure:8104: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8104 "configure"
+#line 8109 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -8110,7 +8115,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -8132,9 +8137,9 @@ EOF
fi
echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
-echo "configure:8136: checking for struct timezone" >&5
+echo "configure:8141: checking for struct timezone" >&5
cat > conftest.$ac_ext <<EOF
-#line 8138 "configure"
+#line 8143 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -8144,7 +8149,7 @@ int main() {
struct timezone tz; tz.tz_minuteswest=0;
; return 0; }
EOF
-if { (eval echo configure:8148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_TIMEZONE 1
@@ -8160,9 +8165,9 @@ fi
rm -f conftest*
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:8164: checking for st_blocks in struct stat" >&5
+echo "configure:8169: checking for st_blocks in struct stat" >&5
cat > conftest.$ac_ext <<EOF
-#line 8166 "configure"
+#line 8171 "configure"
#include "confdefs.h"
#include <sys/stat.h>
@@ -8170,7 +8175,7 @@ int main() {
struct stat sb; sb.st_blocks=0;
; return 0; }
EOF
-if { (eval echo configure:8174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STAT_ST_BLOCKS 1
@@ -8188,12 +8193,12 @@ rm -f conftest*
for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8192: checking for $ac_func" >&5
+echo "configure:8197: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8197 "configure"
+#line 8202 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -8216,7 +8221,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:8220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -8243,12 +8248,12 @@ done
for ac_func in _scrsize ioctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8247: checking for $ac_func" >&5
+echo "configure:8252: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8252 "configure"
+#line 8257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -8271,7 +8276,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:8275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -8297,16 +8302,16 @@ done
echo $ac_n "checking for struct videoconfig""... $ac_c" 1>&6
-echo "configure:8301: checking for struct videoconfig" >&5
+echo "configure:8306: checking for struct videoconfig" >&5
cat > conftest.$ac_ext <<EOF
-#line 8303 "configure"
+#line 8308 "configure"
#include "confdefs.h"
int main() {
struct videoconfig w; w.numtextcols=0;
; return 0; }
EOF
-if { (eval echo configure:8310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_VIDEOCONFIG 1
@@ -8322,16 +8327,16 @@ fi
rm -f conftest*
echo $ac_n "checking for struct text_info""... $ac_c" 1>&6
-echo "configure:8326: checking for struct text_info" >&5
+echo "configure:8331: checking for struct text_info" >&5
cat > conftest.$ac_ext <<EOF
-#line 8328 "configure"
+#line 8333 "configure"
#include "confdefs.h"
int main() {
struct text_info w; w.screenwidth=0;
; return 0; }
EOF
-if { (eval echo configure:8335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_TEXT_INFO 1
@@ -8347,16 +8352,16 @@ fi
rm -f conftest*
echo $ac_n "checking for TIOCGWINSZ""... $ac_c" 1>&6
-echo "configure:8351: checking for TIOCGWINSZ" >&5
+echo "configure:8356: checking for TIOCGWINSZ" >&5
cat > conftest.$ac_ext <<EOF
-#line 8353 "configure"
+#line 8358 "configure"
#include "confdefs.h"
#include <sys/ioctl.h>
int main() {
int w=TIOCGWINSZ;
; return 0; }
EOF
-if { (eval echo configure:8360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIOCGWINSZ 1
@@ -8372,16 +8377,16 @@ fi
rm -f conftest*
echo $ac_n "checking for TIOCGGETD""... $ac_c" 1>&6
-echo "configure:8376: checking for TIOCGGETD" >&5
+echo "configure:8381: checking for TIOCGGETD" >&5
cat > conftest.$ac_ext <<EOF
-#line 8378 "configure"
+#line 8383 "configure"
#include "confdefs.h"
#include <sys/ioctl.h>
int main() {
int w=TIOCGETD;
; return 0; }
EOF
-if { (eval echo configure:8385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIOCGETD 1
@@ -8400,12 +8405,12 @@ rm -f conftest*
for ac_func in compress2 difftime fork gethostname getpwuid getrusage
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8404: checking for $ac_func" >&5
+echo "configure:8409: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8409 "configure"
+#line 8414 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -8428,7 +8433,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -8455,12 +8460,12 @@ done
for ac_func in gettimeofday BSDgettimeofday longjmp setsysinfo sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8459: checking for $ac_func" >&5
+echo "configure:8464: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8464 "configure"
+#line 8469 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -8483,7 +8488,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -8510,12 +8515,12 @@ done
for ac_func in signal snprintf vsnprintf strdup system waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8514: checking for $ac_func" >&5
+echo "configure:8519: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8519 "configure"
+#line 8524 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -8538,7 +8543,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:8542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -8564,12 +8569,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:8568: checking for working const" >&5
+echo "configure:8573: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8573 "configure"
+#line 8578 "configure"
#include "confdefs.h"
int main() {
@@ -8618,7 +8623,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:8622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -8639,21 +8644,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:8643: checking for inline" >&5
+echo "configure:8648: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 8650 "configure"
+#line 8655 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:8657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -8680,16 +8685,16 @@ esac
echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6
-echo "configure:8684: checking for __attribute__ extension" >&5
+echo "configure:8689: checking for __attribute__ extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 8686 "configure"
+#line 8691 "configure"
#include "confdefs.h"
int main() {
int __attribute__((unused)) x
; return 0; }
EOF
-if { (eval echo configure:8693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_ATTRIBUTE 1
@@ -8705,16 +8710,16 @@ fi
rm -f conftest*
echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6
-echo "configure:8709: checking for __FUNCTION__ extension" >&5
+echo "configure:8714: checking for __FUNCTION__ extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 8711 "configure"
+#line 8716 "configure"
#include "confdefs.h"
int main() {
(void)__FUNCTION__
; return 0; }
EOF
-if { (eval echo configure:8718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_FUNCTION 1
@@ -8730,7 +8735,7 @@ fi
rm -f conftest*
echo $ac_n "checking how to print long long""... $ac_c" 1>&6
-echo "configure:8734: checking how to print long long" >&5
+echo "configure:8739: checking how to print long long" >&5
if eval "test \"`echo '$''{'hdf5_cv_printf_ll'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8742,7 +8747,7 @@ for hdf5_cv_printf_ll in l L q ll unknown; do
continue
else
cat > conftest.$ac_ext <<EOF
-#line 8746 "configure"
+#line 8751 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -8758,7 +8763,7 @@ int main(void)
}
EOF
-if { (eval echo configure:8762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
break
else
@@ -8779,7 +8784,7 @@ EOF
echo $ac_n "checking for debug flags""... $ac_c" 1>&6
-echo "configure:8783: checking for debug flags" >&5
+echo "configure:8788: checking for debug flags" >&5
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
@@ -8817,7 +8822,7 @@ if test -n "$DEBUG_PKG"; then
fi
echo $ac_n "checking for API tracing""... $ac_c" 1>&6
-echo "configure:8821: checking for API tracing" >&5;
+echo "configure:8826: checking for API tracing" >&5;
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
enableval="$enable_trace"
@@ -8893,7 +8898,7 @@ case "$CC_BASENAME" in
mpicc)
PARALLEL=mpicc
echo $ac_n "checking for mpirun""... $ac_c" 1>&6
-echo "configure:8897: checking for mpirun" >&5
+echo "configure:8902: checking for mpirun" >&5
cmd=`echo $CC | cut -f1 -d' '`
if (echo $cmd | grep / >/dev/null); then
@@ -8921,7 +8926,7 @@ echo "configure:8897: checking for mpirun" >&5
hcc)
PARALLEL=hcc
echo $ac_n "checking for mpirun_lam or mpirun""... $ac_c" 1>&6
-echo "configure:8925: checking for mpirun_lam or mpirun" >&5
+echo "configure:8930: checking for mpirun_lam or mpirun" >&5
cmd=`echo $CC | cut -f1 -d' '`
if (echo $cmd | grep / >/dev/null); then
@@ -8966,7 +8971,7 @@ fi
echo $ac_n "checking for parallel support files""... $ac_c" 1>&6
-echo "configure:8970: checking for parallel support files" >&5
+echo "configure:8975: checking for parallel support files" >&5
case "X-$enable_parallel" in
X-|X-no|X-none)
echo "$ac_t""skipped" 1>&6
@@ -8977,21 +8982,21 @@ case "X-$enable_parallel" in
PARALLEL=yes
cat > conftest.$ac_ext <<EOF
-#line 8981 "configure"
+#line 8986 "configure"
#include "confdefs.h"
int main() {
MPI_Init()
; return 0; }
EOF
-if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo $ac_n "checking for MPI_Init in -lmpi""... $ac_c" 1>&6
-echo "configure:8995: checking for MPI_Init in -lmpi" >&5
+echo "configure:9000: checking for MPI_Init in -lmpi" >&5
ac_lib_var=`echo mpi'_'MPI_Init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -8999,7 +9004,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmpi $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9003 "configure"
+#line 9008 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -9010,7 +9015,7 @@ int main() {
MPI_Init()
; return 0; }
EOF
-if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -9043,21 +9048,21 @@ rm -f conftest*
if test "X$PARALLEL" = "Xyes"; then
cat > conftest.$ac_ext <<EOF
-#line 9047 "configure"
+#line 9052 "configure"
#include "confdefs.h"
int main() {
MPI_File_open()
; return 0; }
EOF
-if { (eval echo configure:9054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo $ac_n "checking for MPI_File_open in -lmpio""... $ac_c" 1>&6
-echo "configure:9061: checking for MPI_File_open in -lmpio" >&5
+echo "configure:9066: checking for MPI_File_open in -lmpio" >&5
ac_lib_var=`echo mpio'_'MPI_File_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -9065,7 +9070,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmpio $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9069 "configure"
+#line 9074 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -9076,7 +9081,7 @@ int main() {
MPI_File_open()
; return 0; }
EOF
-if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -9119,7 +9124,7 @@ rm -f conftest*
PARALLEL=mpich
echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6
-echo "configure:9123: checking for MPI_Init in -lmpich" >&5
+echo "configure:9128: checking for MPI_Init in -lmpich" >&5
ac_lib_var=`echo mpich'_'MPI_Init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -9127,7 +9132,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmpich $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9131 "configure"
+#line 9136 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -9138,7 +9143,7 @@ int main() {
MPI_Init()
; return 0; }
EOF
-if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -9185,23 +9190,23 @@ EOF
echo $ac_n "checking prefix for running on one processor""... $ac_c" 1>&6
-echo "configure:9189: checking prefix for running on one processor" >&5
+echo "configure:9194: checking prefix for running on one processor" >&5
echo "$ac_t""$RUNSERIAL" 1>&6
echo $ac_n "checking prefix for running in parallel""... $ac_c" 1>&6
-echo "configure:9192: checking prefix for running in parallel" >&5
+echo "configure:9197: checking prefix for running in parallel" >&5
echo "$ac_t""$RUNPARALLEL" 1>&6
echo $ac_n "checking whether a simple MPI-IO program can be linked""... $ac_c" 1>&6
-echo "configure:9196: checking whether a simple MPI-IO program can be linked" >&5
+echo "configure:9201: checking whether a simple MPI-IO program can be linked" >&5
cat > conftest.$ac_ext <<EOF
-#line 9198 "configure"
+#line 9203 "configure"
#include "confdefs.h"
int main() {
MPI_Init();MPI_File_open();
; return 0; }
EOF
-if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -9225,12 +9230,12 @@ rm -f conftest*
fi
echo $ac_n "checking whether a MPI_Get_count works correctly""... $ac_c" 1>&6
-echo "configure:9229: checking whether a MPI_Get_count works correctly" >&5
+echo "configure:9234: checking whether a MPI_Get_count works correctly" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""no" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9234 "configure"
+#line 9239 "configure"
#include "confdefs.h"
#include <mpi.h>
@@ -9251,7 +9256,7 @@ int main(int argc, char **argv)
}
EOF
-if { (eval echo configure:9255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""no" 1>&6
else
diff --git a/configure.in b/configure.in
index b0dabd0..90628ab 100644
--- a/configure.in
+++ b/configure.in
@@ -965,13 +965,7 @@ AC_ARG_WITH(pthread,
case "$withval" in
yes)
AC_CHECK_HEADERS(pthread.h)
- if test `uname` != "FreeBSD"; then
- AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
- else
- CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
- LDFLAGS="$LDFLAGS -pthread"
- LIBS="$LIBS -lcipher"
- fi
+ AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
;;
no)
AC_MSG_CHECKING(for pthread)
@@ -1012,7 +1006,7 @@ case "$withval" in
esac
dnl ----------------------------------------------------------------------
-dnl Enable thread-safe version of library. It requires pthread on.
+dnl Enable thread-safe version of library. It requires Pthreads support.
dnl
AC_MSG_CHECKING(for thread safe support)
AC_ARG_ENABLE(threadsafe,
@@ -1024,13 +1018,10 @@ case "X-$THREADSAFE" in
AC_MSG_RESULT(no)
;;
X-yes)
- if test -n "$PTHREAD"; then
- AC_MSG_RESULT(yes)
- THREADSAFE=yes
- else
- AC_MSG_RESULT(error)
- AC_MSG_ERROR(needed pthread library not available)
- fi
+ dnl Check that we can link a simple Pthread program.
+ AC_TRY_LINK(,pthread_create(),
+ AC_MSG_RESULT(yes); THREADSAFE=yes,
+ AC_MSG_ERROR(needed pthread library not available))
;;
*)
AC_MSG_RESULT(error)