From 2ff4802a14b7b03c80d0caee785f5b3699c3a01e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 28 Apr 2014 13:05:01 -0600 Subject: [PATCH] configure: for BSDs, enable pthreads by default, but don't force enabled --- racket/src/configure | 12 +++++++++--- racket/src/racket/configure.ac | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/racket/src/configure b/racket/src/configure index ab1d1f3048..59ea436074 100755 --- a/racket/src/configure +++ b/racket/src/configure @@ -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" diff --git a/racket/src/racket/configure.ac b/racket/src/racket/configure.ac index 07777def6a..a37a060234 100644 --- a/racket/src/racket/configure.ac +++ b/racket/src/racket/configure.ac @@ -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"