--- acinclude.m4.old
+++ acinclude.m4
@@ -83,8 +83,8 @@ AC_REQUIRE([AC_SYS_LARGEFILE])
 if test "x$GCC" = "xyes"; then
     CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe"
     if test "x$HAVE_DARWIN" = "xyes"; then
-        CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
-        LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
+        CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
+        LDFLAGS="$LDFLAGS"
     else
         CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
     fi
@@ -101,7 +101,7 @@ if test "x$HAVE_DARWIN" = "xyes"; then
     AC_PROG_OBJCXX
     AC_PROG_OBJCXXCPP
 
-    OBJCXXFLAGS="$OBJCXXFLAGS -stdlib=libc++ -std=c++11"
+    OBJCXXFLAGS="$OBJCXXFLAGS -std=c++11"
 fi
 
 dnl Enable "-Wl,-z,defs" only on Linux