diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2002-01-02 18:34:58 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2002-01-02 18:34:58 (GMT) |
commit | ecf54db74e319b3c445135b4c492a75397055f53 (patch) | |
tree | 17e69bf054ff7da46f3176d8e4cbc052c3386a43 /config/freebsd | |
parent | 8b6859c228b69e2fb8c084e3737f096759a079d1 (diff) | |
download | hdf5-ecf54db74e319b3c445135b4c492a75397055f53.zip hdf5-ecf54db74e319b3c445135b4c492a75397055f53.tar.gz hdf5-ecf54db74e319b3c445135b4c492a75397055f53.tar.bz2 |
[svn-r4764] 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, both positive test and negative test (just --enable-threadsafe
failed because linux needs -lpthread).
Sleipnir (verified static-exec must be used.)
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 |