diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2002-01-02 19:05:30 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2002-01-02 19:05:30 (GMT) |
commit | 2453f290ecff579cc17907c250eeb697a7792e8b (patch) | |
tree | e6a014ca9d5d6137a62ccddf707dd6419b4f0245 /config/freebsd | |
parent | dc886d2d4f12f5f87ee7590d1605707be3c129a6 (diff) | |
download | hdf5-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
Diffstat (limited to 'config/freebsd')
-rw-r--r-- | config/freebsd | 9 |
1 files changed, 9 insertions, 0 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 |