configure: for BSDs, enable pthreads by default, but don't force enabled

This commit is contained in:
Matthew Flatt 2014-04-28 13:05:01 -06:00
parent bc871b904e
commit 2ff4802a14
2 changed files with 18 additions and 6 deletions

12
racket/src/configure vendored
View File

@ -4470,17 +4470,17 @@ case "$host_os" in
*freebsd*)
LIBS="$LIBS -rdynamic"
DYN_CFLAGS="-fPIC"
enable_pthread=yes
enable_pthread_by_default=yes
try_kqueue_syscall=yes
;;
openbsd*)
LIBS="$LIBS -Wl,--export-dynamic"
enable_pthread=yes
enable_pthread_by_default=yes
try_kqueue_syscall=yes
;;
dragonfly*)
LIBS="$LIBS -Wl,--export-dynamic"
enable_pthread=yes
enable_pthread_by_default=yes
try_kqueue_syscall=yes
;;
netbsd*)
@ -6256,6 +6256,12 @@ fi
############### pthread ###################
if test "${enable_pthread}" = "" ; then
if test "${enable_pthread_by_default}" = "yes" ; then
enable_pthread=yes
fi
fi
if test "${enable_pthread}" = "yes" ; then
if test "${use_flag_pthread}" = "yes" ; then
PREFLAGS="$PREFLAGS -pthread"

View File

@ -614,17 +614,17 @@ case "$host_os" in
*freebsd*)
LIBS="$LIBS -rdynamic"
DYN_CFLAGS="-fPIC"
enable_pthread=yes
enable_pthread_by_default=yes
try_kqueue_syscall=yes
;;
openbsd*)
LIBS="$LIBS -Wl,--export-dynamic"
enable_pthread=yes
enable_pthread_by_default=yes
try_kqueue_syscall=yes
;;
dragonfly*)
LIBS="$LIBS -Wl,--export-dynamic"
enable_pthread=yes
enable_pthread_by_default=yes
try_kqueue_syscall=yes
;;
netbsd*)
@ -1276,6 +1276,12 @@ fi
############### pthread ###################
if test "${enable_pthread}" = "" ; then
if test "${enable_pthread_by_default}" = "yes" ; then
enable_pthread=yes
fi
fi
if test "${enable_pthread}" = "yes" ; then
if test "${use_flag_pthread}" = "yes" ; then
PREFLAGS="$PREFLAGS -pthread"