X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0edfe8f7e30a14a73fe7803b061d5a5b3e41df47..6d2190fcb4ba8c0a297a90ac233e88ad0c5cd13f:/wxwin.m4 diff --git a/wxwin.m4 b/wxwin.m4 index b2434a21b3..f8e5b704a2 100644 --- a/wxwin.m4 +++ b/wxwin.m4 @@ -3,7 +3,6 @@ dnl Author: wxWidgets development team, dnl Francesco Montorsi, dnl Bob McCown (Mac-testing) dnl Creation date: 24/11/2001 -dnl RCS-ID: $Id$ dnl --------------------------------------------------------------------------- dnl =========================================================================== @@ -152,9 +151,9 @@ dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this dnl case the macro won't even waste time on tests for its existence. dnl dnl Optional WX-LIBS argument contains comma- or space-separated list of -dnl wxWidgets libraries to link against (it may include contrib libraries). If -dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to -dnl link with all of the core wxWidgets libraries. +dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS +dnl and WX_LIBS_STATIC will contain flags to link with all of the core +dnl wxWidgets libraries. dnl dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config dnl invocation command in present. It can be used to fine-tune lookup of @@ -408,7 +407,7 @@ dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) dnl if test "x$HAVE_WXRC" != x1; then dnl AC_MSG_ERROR([ dnl The wxrc program was not installed or not found. -dnl +dnl dnl Please check the wxWidgets installation. dnl ]) dnl fi @@ -437,13 +436,13 @@ dnl AC_DEFUN([WXRC_CHECK], [ AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) - + if test "x$WX_CONFIG_NAME" = x; then AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) else - + AC_MSG_CHECKING([for wxrc]) - + if test "x$WXRC" = x ; then dnl wx-config --utility is a new addition to wxWidgets: _WX_PRIVATE_CHECK_VERSION(2,5,3) @@ -459,7 +458,7 @@ AC_DEFUN([WXRC_CHECK], AC_MSG_RESULT([$WXRC]) ifelse([$1], , :, [$1]) fi - + AC_SUBST(WXRC) fi ]) @@ -467,11 +466,11 @@ AC_DEFUN([WXRC_CHECK], dnl --------------------------------------------------------------------------- dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) dnl -dnl Sets the "output-var" variable to the name of a library named with same +dnl Sets the "output-var" variable to the name of a library named with same dnl wxWidgets rule. -dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets +dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets dnl the $lib variable to: -dnl 'mine_gtk2ud_test-2.8' +dnl 'mine_gtk2ud_test-2.8' dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 dnl --------------------------------------------------------------------------- AC_DEFUN([WX_LIKE_LIBNAME], @@ -560,7 +559,7 @@ dnl WX_STANDARD_OPTIONS([options-to-add]) dnl dnl Adds to the configure script one or more of the following options: dnl --enable-[debug|unicode|shared|wxshared|wxdebug] -dnl --with-[gtk|msw|motif|x11|mac|mgl|dfb] +dnl --with-[gtk|msw|motif|x11|mac|dfb] dnl --with-wxversion dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. @@ -605,10 +604,10 @@ AC_DEFUN([WX_STANDARD_OPTIONS], dnl PORT must be one of the allowed values if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ - "$TOOLKIT" != "x11" -a "$TOOLKIT" != "mac" -a \ - "$TOOLKIT" != "mgl" -a "$TOOLKIT" != "dfb" ; then + "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \ + "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then AC_MSG_ERROR([ - Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, x11, mac, mgl, dfb) + Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11) ]) fi @@ -749,7 +748,7 @@ AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], dnl --------------------------------------------------------------------------- -dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] +dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets @@ -764,9 +763,9 @@ AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], dnl so we will detect the wxWidgets relative build setting and use it AC_MSG_CHECKING([$3]) - dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 + dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 dnl string or to 0 otherwise. - dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it + dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it dnl doesn't work; we use 'expr STRING : REGEXP' instead WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") @@ -869,9 +868,9 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") - WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") + WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") + WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") - WX_MGLPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mgl.*") WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") WX_PORT="unknown" @@ -879,11 +878,16 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi - if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi + if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi + if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi - if test "$WX_MGLPORT" != "0"; then WX_PORT="mgl"; fi if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi + dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac + dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) + WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") + if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi + dnl check at least one of the WX_*PORT has been set ! if test "$WX_PORT" = "unknown" ; then @@ -951,7 +955,7 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], dnl in case the user needs a BUILD=debug/release var... if test "$DEBUG" = "1"; then BUILD="debug" - elif test "$DEBUG" = ""; then + elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then BUILD="release" fi @@ -1012,7 +1016,7 @@ AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], dnl --------------------------------------------------------------------------- dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END dnl -dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info +dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info dnl about the configuration of the package which used the wxpresets. dnl dnl Typical usage: @@ -1052,5 +1056,4 @@ AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) AC_DEFUN([AM_PATH_WXCONFIG], [ WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) ]) - - +AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])])