diff options
Diffstat (limited to 'lib/wx/configure.in')
-rwxr-xr-x | lib/wx/configure.in | 77 |
1 files changed, 27 insertions, 50 deletions
diff --git a/lib/wx/configure.in b/lib/wx/configure.in index e5dc83b27e..e00d5cba98 100755 --- a/lib/wx/configure.in +++ b/lib/wx/configure.in @@ -67,55 +67,14 @@ AC_PROG_RANLIB AC_PROG_CPP AC_MSG_NOTICE(Building for [$host_os]) -MIXED_CYGWIN=no WXERL_CAN_BUILD_DRIVER=true -AC_MSG_CHECKING(for mixed cygwin and native VC++ environment) -if test "X$CC" = "Xcc.sh" -a "X$host" = "Xwin32" -a "x$GCC" != x"yes"; then - if test -x /usr/bin/cygpath; then - CFLAGS="-Owx" - MIXED_CYGWIN=yes - AC_MSG_RESULT([yes]) - MIXED_CYGWIN_VC=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC" - else - AC_MSG_RESULT([undeterminable]) - AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!) - fi -else - AC_MSG_RESULT([no]) - MIXED_CYGWIN_VC=no -fi -AC_SUBST(MIXED_CYGWIN_VC) - -AC_MSG_CHECKING(for mixed cygwin and native MinGW environment) -if test "X$CC" = "Xcc.sh" -a "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then - if test -x /usr/bin/cygpath; then - CFLAGS="-O2" - MIXED_CYGWIN=yes - AC_MSG_RESULT([yes]) - MIXED_CYGWIN_MINGW=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW" - else - AC_MSG_RESULT([undeterminable]) - AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!) - fi -else - AC_MSG_RESULT([no]) - MIXED_CYGWIN_MINGW=no -fi -AC_SUBST(MIXED_CYGWIN_MINGW) +LM_WINDOWS_ENVIRONMENT -AC_MSG_CHECKING(if we mix cygwin with any native compiler) -if test "X$MIXED_CYGWIN" = "Xyes" ; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) +if test X"$MIXED_CYGWIN_VC" == X"yes" -o X"$MIXED_MSYS_VC" == X"yes"; then + CFLAGS="-Owx" fi -AC_SUBST(MIXED_CYGWIN) - - ## Check that we are in 32 bits mode on darwin ## (wxWidgets require that it currently uses 32-bits Carbon) ## Otherwise skip building wxErlang @@ -348,7 +307,7 @@ dnl if test "$cross_compiling" = "yes"; then echo "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" > ./CONF_INFO WXERL_CAN_BUILD_DRIVER=false -elif test X"$MIXED_CYGWIN_VC" != X"yes" ; then +elif test X"$MIXED_CYGWIN_VC" == X"no" -a X"$MIXED_MSYS_VC" == X"no"; then m4_include(wxwin.m4) AM_OPTIONS_WXCONFIG @@ -418,7 +377,11 @@ define(wx_warn_text,[ else AC_MSG_CHECKING(for wxWidgets in standard locations) - CWXWIN_CONFIG=`cygpath $wx_config_name 2>/dev/null` + if test "x$MIXED_MSYS" = "xyes"; then + CWXWIN_CONFIG=`win2msys_path.sh $wx_config_name 2>/dev/null` + else + CWXWIN_CONFIG=`cygpath $wx_config_name 2>/dev/null` + fi CWXWIN1=`dirname $CWXWIN_CONFIG 2>/dev/null` CWXWIN2=`dirname $CWXWIN1 2>/dev/null` @@ -426,10 +389,24 @@ else PROGRAMFILES=c:/Program Files fi - CWXWIN_PROG=`cygpath -d "$PROGRAMFILES" | cygpath -f - 2>/dev/null` + + if test "x$MIXED_MSYS" = "xyes"; then + CWXWIN_PROG=`win2msys_path.sh "$PROGRAMFILES" 2>/dev/null` + else + CWXWIN_PROG=`cygpath -d "$PROGRAMFILES" | cygpath -f - 2>/dev/null` + fi CWXWIN3=$CWXWIN_PROG/wxWidgets-2.8 CWXWIN4=$CWXWIN_PROG/wxMSW-2.8 CWX_DOCUMENTED="/opt/local/pgm/wxMSW-2.8.* /opt/local/pgm/wxWidgets-2.8.*" + case $ac_cv_sizeof_void_p in + 8) + CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-2.8.* /opt/local64/pgm/wxWidgets-2.8.* $CWX_DOCUMENTED" + ;; + *) + true + ;; + esac + CWXPATH="$CWXWIN1 $CWXWIN2 $CWX_DOCUMENTED $CWXWIN3.* $CWXWIN4.*" for dir in $CWXPATH; do @@ -438,11 +415,11 @@ else WXINCLUDE_PLAIN=$dir/include WXINCLUDE_CONTRIB=$dir/contrib/include WX_CFLAGS="-EHsc -D_UNICODE -DUNICODE -I$WXINCLUDE_MSVC -I$WXINCLUDE_PLAIN -I$WXINCLUDE_CONTRIB -D__WXMSW__" - WX_CXXFLAGS=$WX_CFLAGS + WX_CXXFLAGS="-TP $WX_CFLAGS" WX_LIBDIR=$dir/lib/vc_lib WX_RESCOMP="rc.sh -I$WXINCLUDE_PLAIN -D __WIN32__" RC_FILE_TYPE=res - for lib in $WX_LIBDIR/wxbase*.lib; do + for lib in $WX_LIBDIR/wxbase*.lib $WX_LIBDIR2/wxbase*.lib; do maybe=`echo $lib | egrep 'wxbase[[0-9]]*u\.lib'` if test '!' -z "$maybe"; then corelib_number=`echo $maybe | sed 's,.*\([[0-9]].\)u\.lib,\1,'` @@ -576,7 +553,7 @@ AC_CHECK_HEADERS([wx/stc/stc.h], [], [WXERL_CAN_BUILD_DRIVER=false echo "wxWidgets don't have wxStyledTextControl (stc.h), wx will NOT be useable" > ./CONF_INFO - AC_MSG_WARN([Can not find wx/stc/stc.h]) + AC_MSG_WARN([Can not find wx/stc/stc.h $CXXFLAGS]) ], [#ifdef WIN32 # include <windows.h> |