diff options
author | Dan Gudmundsson <dgud@erlang.org> | 2013-11-26 17:27:05 +0100 |
---|---|---|
committer | Dan Gudmundsson <dgud@erlang.org> | 2013-11-27 17:34:38 +0100 |
commit | 2b27f9ca85a68f44ddab06b386ee25c4e055e353 (patch) | |
tree | 3de773cce1b41bc1544e518e8b29e92b1a0a860d /lib/wx | |
parent | 4a9055ebb2f5fc69205a1082bbc813839c0e3138 (diff) | |
download | otp-2b27f9ca85a68f44ddab06b386ee25c4e055e353.tar.gz otp-2b27f9ca85a68f44ddab06b386ee25c4e055e353.tar.bz2 otp-2b27f9ca85a68f44ddab06b386ee25c4e055e353.zip |
wx: Fix compiler options for xcode 5.0
We need to pick up the macosxmin version wxWidgets was compiled with
Diffstat (limited to 'lib/wx')
-rwxr-xr-x | lib/wx/configure.in | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/lib/wx/configure.in b/lib/wx/configure.in index c65e45ca0d..12b4de6fe6 100755 --- a/lib/wx/configure.in +++ b/lib/wx/configure.in @@ -71,30 +71,14 @@ WXERL_CAN_BUILD_DRIVER=true LM_WINDOWS_ENVIRONMENT +USER_CFLAGS=$CFLAGS + if test X"$MIXED_CYGWIN_VC" = X"yes" -o X"$MIXED_MSYS_VC" = X"yes"; then CFLAGS="-Owx" fi -## Check that we are in 32 bits mode on darwin -## (wxWidgets require that it currently uses 32-bits Carbon) -## Otherwise skip building wxErlang AC_CHECK_SIZEOF(void *) -# case $ac_cv_sizeof_void_p-$host_os in -# 8-darwin*) -# if test X"$WX_BUILDING_INSIDE_ERLSRC" != X"true" ; then -# AC_MSG_ERROR([Can not use 64bits wxWidgets on Darwin]) -# else -# echo "Can not combine 64bits erlang with wxWidgets on MacOSX, wx will not be useable" > ./CONF_INFO -# WXERL_CAN_BUILD_DRIVER=false -# AC_MSG_WARN([Can not combine 64bits erlang with wxWidgets on MacOSX, wx will not be useable]) -# fi -# WXERL_CAN_BUILD_DRIVER=false -# ;; -# *) -# ;; -# esac - PTHR_CFLAGS="-D_THREAD_SAFE -D_REENTRANT" OBJC_CC=$CC @@ -103,8 +87,12 @@ CXXFLAGS="" dnl NOTE: CPPFLAGS will be included in CFLAGS at the end case $host_os in darwin*) + AC_MSG_CHECKING([Checking wxWidgets for min version:]) + WX_CC=`wx-config --cc` + MAC_MIN=`echo "$WX_CC" | sed 's/^[[^ ]]*\ *//'` + AC_MSG_RESULT([$MAC_MIN]) + AC_MSG_CHECKING([if compiler accepts -ObjC]) - saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -ObjC" AC_TRY_COMPILE([],[;], accept_objc_flag=true, accept_objc_flag=false) if test "X$accept_objc_flag" = "Xtrue"; then @@ -171,7 +159,7 @@ case $host_os in OBJC_CFLAGS="-ObjC" fi fi - CFLAGS="$saved_CFLAGS -Wno-deprecated-declarations" + CFLAGS="$USER_CFLAGS $MAC_MIN -Wno-deprecated-declarations" CPPFLAGS="$CPPFLAGS -D_MACOSX $PTHR_CFLAGS" ;; mingw32) @@ -229,6 +217,11 @@ case $host_os in DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS" CFLAGS="-g -Wall -O2 $CFLAGS" ;; + darwin*) + DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS" + # Disable -02 crashes with xcode 5.0.2 (clang-500.2.79) + CFLAGS="-g -Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS" + ;; *) DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS" CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS" @@ -283,11 +276,12 @@ fi AC_SUBST(GL_LIBS) +DEBUG_CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS $CPPFLAGS" +DEBUG_CFLAGS="$DEBUG_CFLAGS $CPPFLAGS $C_ONLY_FLAGS" + CXXFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS" CFLAGS="$CFLAGS $CPPFLAGS $C_ONLY_FLAGS" -DEBUG_CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS $CPPFLAGS" -DEBUG_CFLAGS="$DEBUG_CFLAGS $CPPFLAGS $C_ONLY_FLAGS" AC_SUBST(DEBUG_CFLAGS) AC_SUBST(DEBUG_CXXFLAGS) |