summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 12 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 69fa0a71d71..b824cf92178 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,18 @@ else
CFLAGS="${CFLAGS} -g -O2"
fi
+case $host_os in
+ darwin*)
+ if ! test "`/usr/bin/sw_vers | grep ProductVersion: | cut -f 2 | cut -d. -f2`" -ge 7; then
+ AC_MSG_ERROR([You need at least OS X 10.7 (Lion) to build Glusterfs])
+ fi
+ # OSX version lesser than 9 has llvm/clang optimization issues which leads to various segfaults
+ if test "`/usr/bin/sw_vers | grep ProductVersion: | cut -f 2 | cut -d. -f2`" -lt 9; then
+ CFLAGS="${CFLAGS} -g -O0 -DDEBUG"
+ fi
+ ;;
+esac
+
AC_ARG_WITH(pkgconfigdir,
[ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
[pkgconfigdir=$withval],
@@ -313,14 +325,6 @@ AC_CHECK_HEADERS([linux/falloc.h])
AC_CHECK_HEADERS([libintl.h])
-case $host_os in
- darwin*)
- if ! test "`/usr/bin/sw_vers | grep ProductVersion: | cut -f 2 | cut -d. -f2`" -ge 7; then
- AC_MSG_ERROR([You need at least OS X 10.7 (Lion) to build Glusterfs])
- fi
- ;;
-esac
-
dnl Mac OS X does not have spinlocks
AC_CHECK_FUNC([pthread_spin_init], [have_spinlock=yes])
if test "x${have_spinlock}" = "xyes"; then