aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/configure.in')
-rwxr-xr-xlib/wx/configure.in68
1 files changed, 39 insertions, 29 deletions
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index 9c55e544a4..3756786831 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)
@@ -195,7 +183,7 @@ AC_SUBST(OBJC_CFLAGS)
case $host_os in
darwin*)
- LDFLAGS="-bundle -flat_namespace -undefined warning -fPIC $LDFLAGS"
+ LDFLAGS="$MAC_MIN -bundle -flat_namespace -undefined warning -fPIC $LDFLAGS"
# Check sizof_void_p as future will hold 64bit MacOS wx
if test $ac_cv_sizeof_void_p = 4; then
LDFLAGS="-m32 $LDFLAGS"
@@ -223,15 +211,20 @@ dnl ----------------------------------------------------------------------
case $host_os in
mingw32)
DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS"
- CFLAGS="-g -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
+ CFLAGS="-g -Wall -O2 $CFLAGS -fomit-frame-pointer -fno-strict-aliasing"
;;
win32)
- DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS"
+ DEBUG_CFLAGS="-g -Wall $CFLAGS -DDEBUG"
CFLAGS="-g -Wall -O2 $CFLAGS"
;;
+ darwin*)
+ DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG"
+ # omit-frame-pointer causes seg faults with 10.9 and clang
+ CFLAGS="-g -Wall -fPIC $CFLAGS -fno-strict-aliasing"
+ ;;
*)
- DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS"
- CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
+ DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG"
+ CFLAGS="-g -Wall -O2 -fPIC $CFLAGS -fomit-frame-pointer -fno-strict-aliasing"
;;
esac
@@ -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)
@@ -413,7 +407,22 @@ define(wx_warn_text,[
fi
else
AC_MSG_CHECKING(for wxWidgets in standard locations)
-
+
+ # Check whether --with-wxdir was given.
+ AC_MSG_NOTICE(OptionCheck: [$with_wxdir $with_wx_prefix])
+
+ if test "${with_wxdir+set}" = set; then :
+ withval=$with_wxdir; CWXWIN0=$withval
+ else
+ # Check whether --with-wx-prefix was given.
+ if test "${with_wx_prefix+set}" = set; then :
+ withval=$with_wx_prefix; CWXWIN0=$withval
+ else
+ echo Setting it empty
+ CWXWIN0=""
+ fi
+ fi
+
if test "x$MIXED_MSYS" = "xyes"; then
CWXWIN_CONFIG=`win2msys_path.sh $wx_config_name 2>/dev/null`
else
@@ -444,9 +453,10 @@ else
;;
esac
- CWXPATH="$CWXWIN1 $CWXWIN2 $CWX_DOCUMENTED $CWXWIN3.* $CWXWIN4.*"
+ CWXPATH="$CWXWIN0 $CWXWIN1 $CWXWIN2 $CWX_DOCUMENTED $CWXWIN3.* $CWXWIN4.*"
for dir in $CWXPATH; do
+ AC_MSG_NOTICE(Checking: [$dir])
if test -f $dir/include/wx/wx.h; then
WXINCLUDE_MSVC=$dir/include/msvc
WXINCLUDE_PLAIN=$dir/include