summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarvin Greenberg <public.marvin@gmail.com>2014-02-12 14:16:43 -0500
committerMarvin Greenberg <public.marvin@gmail.com>2014-02-12 14:16:43 -0500
commitd35af986468da6f61d5a660f13b260810323fb55 (patch)
treee1f3d4b47c7e8f2ae0322039c6f1c0ca77e6eb60 /configure.ac
parentfd85d12a2cd5dc31e6f9a0d0a29bfd61bd8865f4 (diff)
downloadswig-d35af986468da6f61d5a660f13b260810323fb55.tar.gz
Change to only add -stdlib on OSX versions that have libc++
Use better test for clang
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index d05eb1802..aead05c21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -352,10 +352,14 @@ if test x"$enable_cpp11_testing" = xyes; then
fi
fi
-# On darwin before Mavericks when using clang, need to ensure using
-# libc++ for tests and examples to run under mono
+# On darwin 10.7,10.8,10.9 using clang++, need to ensure using
+# libc++ for tests and examples to run under mono. May affect
+# other language targets as well - problem is an OSX incompatibility
+# between libraries depending on libstdc++ and libc++.
+CLANGXX=
+$CXX -v 2>&1 | grep -i clang >/dev/null && CLANGXX=yes
case $host in
- *-*-darwin*) if test "$CXX" = "clang++";
+ *-*-darwin11* | *-*-darwin12* |*-*-darwin13* ) if test "$CLANGXX" = "yes";
then PLATCXXFLAGS="$PLATCXXFLAGS -stdlib=libc++"
fi;;
*) ;;