Skip to content
Snippets Groups Projects
Commit bd5aa005 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

the _REENTRANT flag was not correctly set on Mac OS X, hence the

global mutexes were not active.


git-svn-id: http://root.cern.ch/svn/root/trunk@21008 27541ba8-7e3a-0410-8455-c3a389f83636
parent 2dcd7df1
No related branches found
No related tags found
No related merge requests found
...@@ -422,6 +422,19 @@ freebsd*|linux*) ...@@ -422,6 +422,19 @@ freebsd*|linux*)
fi fi
done done
;; ;;
macosx*)
for f in $features ; do
if test "x$f" = "xthread" ; then
if [ $macosx_minor -ge 5 ]; then
auxcflags="-D_REENTRANT -pthread $auxcflags"
auxlibs="-pthread $auxlibs"
else
auxcflags="-D_REENTRANT $auxcflags"
auxlibs="-lpthread $auxlibs"
fi
fi
done
;;
hpuxacc | hpuxia64acc) hpuxacc | hpuxia64acc)
for f in $features ; do for f in $features ; do
if test "x$f" = "xthread" ; then if test "x$f" = "xthread" ; then
......
...@@ -731,7 +731,7 @@ guess_architecture () { ...@@ -731,7 +731,7 @@ guess_architecture () {
;; ;;
esac esac
if [ "$arch" = "macosx" ]; then if [ "$arch" = "macosx" ]; then
if [ `sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` = 5 ]; then if [ `sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` -ge 5 ]; then
if `sysctl machdep.cpu.extfeatures | grep "64" > /dev/null 2>&1` ; then if `sysctl machdep.cpu.extfeatures | grep "64" > /dev/null 2>&1` ; then
arch=macosx64 arch=macosx64
fi fi
...@@ -1391,11 +1391,24 @@ fi ...@@ -1391,11 +1391,24 @@ fi
# Check for posix thread library # Check for posix thread library
# #
case $platform in case $platform in
macosx|win32) win32)
if test "x$enable_thread" = "x"; then if test "x$enable_thread" = "x"; then
enable_thread="yes" enable_thread="yes"
fi fi
;; ;;
macosx)
if test "x$enable_thread" = "x" || test "x$enable_thread" = "xyes"; then
if [ `sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` -ge 5 ]; then
enable_thread="yes"
threadflag="-D_REENTRANT -pthread"
threadlib="-pthread"
threadlibdir=
else
enable_thread="yes"
threadflag="-D_REENTRANT"
fi
fi
;;
linux|fbsd) linux|fbsd)
if test "x$enable_thread" = "x" || test "x$enable_thread" = "xyes"; then if test "x$enable_thread" = "x" || test "x$enable_thread" = "xyes"; then
enable_thread="yes" enable_thread="yes"
...@@ -1414,7 +1427,7 @@ win32gcc) ...@@ -1414,7 +1427,7 @@ win32gcc)
fi fi
;; ;;
hpuxia64acc) hpuxia64acc)
if test "x$enable_thread" = "x"; then if test "x$enable_thread" = "x" || test "x$enable_thread" = "xyes"; then
enable_thread="yes" enable_thread="yes"
threadflag="-mt" threadflag="-mt"
threadlib="-mt" threadlib="-mt"
...@@ -1615,7 +1628,7 @@ if test ! "x$enable_opengl" = "xno" && test ! "$platform" = "win32" ; then ...@@ -1615,7 +1628,7 @@ if test ! "x$enable_opengl" = "xno" && test ! "$platform" = "win32" ; then
# Mac OS X 10.5.0 problem # Mac OS X 10.5.0 problem
if test "x$platform" = "xmacosx"; then if test "x$platform" = "xmacosx"; then
if [ `sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` = 5 ]; then if [ `sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` -eq 5 ]; then
opengllib="-dylib_file /usr/X11R6/lib/libGL.dylib:/usr/X11R6/lib/libGL.dylib" opengllib="-dylib_file /usr/X11R6/lib/libGL.dylib:/usr/X11R6/lib/libGL.dylib"
fi fi
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment