mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
2453f290ec
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
31 lines
796 B
Bash
31 lines
796 B
Bash
# -*- shell-script -*-
|
|
# This file is part of the HDF5 build script. It is processed shortly
|
|
# after configure starts and defines, among other things, flags for
|
|
# the various compile modes.
|
|
#
|
|
# See BlankForm in this directory for details.
|
|
|
|
# The default compiler is `gcc'
|
|
if test "X-" = "X-$CC"; then
|
|
CC=gcc
|
|
CC_BASENAME=gcc
|
|
fi
|
|
|
|
# Architecture-specific flags
|
|
ARCH=
|
|
|
|
# Omit frame pointer for optimized code?
|
|
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
|