Merge branch 'autoconf-fixes'
Correction to m4 macros used in programs and libraries using wxWidgets.
This commit is contained in:
61
wxwin.m4
61
wxwin.m4
@@ -519,7 +519,7 @@ AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],
|
|||||||
$2=0
|
$2=0
|
||||||
elif test "$enableval" = "auto" ; then
|
elif test "$enableval" = "auto" ; then
|
||||||
AC_MSG_RESULT([will be automatically detected])
|
AC_MSG_RESULT([will be automatically detected])
|
||||||
$2="auto"
|
$2=""
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
Unrecognized option value (allowed values: yes, no, auto)
|
Unrecognized option value (allowed values: yes, no, auto)
|
||||||
@@ -545,7 +545,7 @@ AC_DEFUN([WX_ARG_WITH_YESNOAUTO],
|
|||||||
$2=0
|
$2=0
|
||||||
elif test "$withval" = "auto" ; then
|
elif test "$withval" = "auto" ; then
|
||||||
AC_MSG_RESULT([will be automatically detected])
|
AC_MSG_RESULT([will be automatically detected])
|
||||||
$2="auto"
|
$2=""
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
Unrecognized option value (allowed values: yes, auto)
|
Unrecognized option value (allowed values: yes, auto)
|
||||||
@@ -597,17 +597,17 @@ AC_DEFUN([WX_STANDARD_OPTIONS],
|
|||||||
AC_MSG_CHECKING([for the --with-toolkit option])
|
AC_MSG_CHECKING([for the --with-toolkit option])
|
||||||
if test "$withval" = "auto" ; then
|
if test "$withval" = "auto" ; then
|
||||||
AC_MSG_RESULT([will be automatically detected])
|
AC_MSG_RESULT([will be automatically detected])
|
||||||
TOOLKIT="auto"
|
TOOLKIT=""
|
||||||
else
|
else
|
||||||
TOOLKIT="$withval"
|
TOOLKIT="$withval"
|
||||||
|
|
||||||
dnl PORT must be one of the allowed values
|
dnl PORT must be one of the allowed values
|
||||||
if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \
|
if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a "$TOOLKIT" != "gtk3" -a \
|
||||||
"$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \
|
"$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \
|
||||||
"$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \
|
"$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \
|
||||||
"$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then
|
"$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11)
|
Unrecognized option value (allowed values: auto, gtk1, gtk2, gtk3, msw, motif, osx_carbon, osx_cocoa, dfb, x11)
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -671,7 +671,7 @@ AC_DEFUN([WX_STANDARD_OPTIONS],
|
|||||||
AC_MSG_CHECKING([for the --with-wxversion option])
|
AC_MSG_CHECKING([for the --with-wxversion option])
|
||||||
if test "$withval" = "auto" ; then
|
if test "$withval" = "auto" ; then
|
||||||
AC_MSG_RESULT([will be automatically detected])
|
AC_MSG_RESULT([will be automatically detected])
|
||||||
WX_RELEASE="auto"
|
WX_RELEASE=""
|
||||||
else
|
else
|
||||||
|
|
||||||
wx_requested_major_version=`echo $withval | \
|
wx_requested_major_version=`echo $withval | \
|
||||||
@@ -706,7 +706,7 @@ dnl ---------------------------------------------------------------------------
|
|||||||
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
|
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
|
||||||
dnl
|
dnl
|
||||||
dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values
|
dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values
|
||||||
dnl which are different from "auto".
|
dnl which were specified.
|
||||||
dnl Thus this macro needs to be called only once all options have been set.
|
dnl Thus this macro needs to be called only once all options have been set.
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
|
AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
|
||||||
@@ -730,11 +730,11 @@ AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
|
|||||||
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
|
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$TOOLKIT" != "auto" ; then
|
if test -n "$TOOLKIT" ; then
|
||||||
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
|
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$WX_RELEASE" != "auto" ; then
|
if test -n "$WX_RELEASE" ; then
|
||||||
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
|
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -748,16 +748,16 @@ AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
|
|||||||
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
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
|
||||||
dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets
|
dnl Sets WX_$RESULTVAR to the value of $RESULTVAR if it's defined. Otherwise,
|
||||||
dnl additional CPP flags and put the result of the search in WX_$RESULTVAR
|
dnl auto-detect the value by checking for the presence of STRING in
|
||||||
dnl also adding the "yes" or "no" message result to MSG.
|
dnl $WX_SELECTEDCONFIG (which is supposed to be set by caller) and set
|
||||||
|
dnl WX_$RESULTVAR to either 0 or 1, also outputting "yes" or "no" after MSG.
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
|
AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
|
||||||
[
|
[
|
||||||
if test "$$1" = "auto" ; then
|
if test -z "$$1" ; then
|
||||||
|
|
||||||
dnl The user does not have particular preferences for this option;
|
dnl The user does not have particular preferences for this option;
|
||||||
dnl so we will detect the wxWidgets relative build setting and use it
|
dnl so we will detect the wxWidgets relative build setting and use it
|
||||||
@@ -772,11 +772,9 @@ AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
|
|||||||
if test "$WX_$1" != "0"; then
|
if test "$WX_$1" != "0"; then
|
||||||
WX_$1=1
|
WX_$1=1
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
ifelse([$4], , :, [$4])
|
|
||||||
else
|
else
|
||||||
WX_$1=0
|
WX_$1=0
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
ifelse([$5], , :, [$5])
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -823,19 +821,16 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
|
|||||||
echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
|
echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl we could test directly for WX_SHARED with a line like:
|
dnl we could test directly for WX_SHARED with a line like:
|
||||||
dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared],
|
dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared],
|
||||||
dnl [if wxWidgets was built in SHARED mode])
|
dnl [if wxWidgets was built in SHARED mode])
|
||||||
dnl but wx-config --selected-config DOES NOT outputs the 'shared'
|
dnl but wx-config --selected-config DOES NOT outputs the 'shared'
|
||||||
dnl word when wx was built in shared mode; it rather outputs the
|
dnl word when wx was built in shared mode; it rather outputs the
|
||||||
dnl 'static' word when built in static mode.
|
dnl 'static' word when built in static mode.
|
||||||
if test $WX_SHARED = "1"; then
|
if test "$WX_SHARED" = "1"; then
|
||||||
STATIC=0
|
STATIC=0
|
||||||
elif test $WX_SHARED = "0"; then
|
elif test "$WX_SHARED" = "0"; then
|
||||||
STATIC=1
|
STATIC=1
|
||||||
elif test $WX_SHARED = "auto"; then
|
|
||||||
STATIC="auto"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables
|
dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables
|
||||||
@@ -858,7 +853,7 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
|
|||||||
AC_SUBST(WX_SHARED)
|
AC_SUBST(WX_SHARED)
|
||||||
|
|
||||||
dnl detect the WX_PORT to use
|
dnl detect the WX_PORT to use
|
||||||
if test "$TOOLKIT" = "auto" ; then
|
if test -z "$TOOLKIT" ; then
|
||||||
|
|
||||||
dnl The user does not have particular preferences for this option;
|
dnl The user does not have particular preferences for this option;
|
||||||
dnl so we will detect the wxWidgets relative build setting and use it
|
dnl so we will detect the wxWidgets relative build setting and use it
|
||||||
@@ -866,6 +861,7 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
|
|||||||
|
|
||||||
WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
|
WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
|
||||||
WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
|
WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
|
||||||
|
WX_GTKPORT3=$(expr "$WX_SELECTEDCONFIG" : ".*gtk3.*")
|
||||||
WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
|
WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
|
||||||
WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
|
WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
|
||||||
WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")
|
WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")
|
||||||
@@ -876,6 +872,7 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
|
|||||||
WX_PORT="unknown"
|
WX_PORT="unknown"
|
||||||
if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
|
if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
|
||||||
if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
|
if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
|
||||||
|
if test "$WX_GTKPORT3" != "0"; then WX_PORT="gtk3"; fi
|
||||||
if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
|
if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
|
||||||
if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
|
if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
|
||||||
if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi
|
if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi
|
||||||
@@ -899,14 +896,8 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
|
|||||||
|
|
||||||
AC_MSG_RESULT([$WX_PORT])
|
AC_MSG_RESULT([$WX_PORT])
|
||||||
else
|
else
|
||||||
|
|
||||||
dnl Use the setting given by the user
|
dnl Use the setting given by the user
|
||||||
if test -z "$TOOLKIT" ; then
|
WX_PORT=$TOOLKIT
|
||||||
WX_PORT=$TOOLKIT
|
|
||||||
else
|
|
||||||
dnl try with PORT
|
|
||||||
WX_PORT=$PORT
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(WX_PORT)
|
AC_SUBST(WX_PORT)
|
||||||
@@ -938,17 +929,17 @@ AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl now we can finally update the DEBUG,UNICODE,SHARED options
|
dnl now we can finally update the DEBUG,UNICODE,SHARED options
|
||||||
dnl to their final values if they were set to 'auto'
|
dnl to their final values if they were not already set
|
||||||
if test "$DEBUG" = "auto"; then
|
if test -z "$DEBUG" ; then
|
||||||
DEBUG=$WX_DEBUG
|
DEBUG=$WX_DEBUG
|
||||||
fi
|
fi
|
||||||
if test "$UNICODE" = "auto"; then
|
if test -z "$UNICODE" ; then
|
||||||
UNICODE=$WX_UNICODE
|
UNICODE=$WX_UNICODE
|
||||||
fi
|
fi
|
||||||
if test "$SHARED" = "auto"; then
|
if test -z "$SHARED" ; then
|
||||||
SHARED=$WX_SHARED
|
SHARED=$WX_SHARED
|
||||||
fi
|
fi
|
||||||
if test "$TOOLKIT" = "auto"; then
|
if test -z "$TOOLKIT" ; then
|
||||||
TOOLKIT=$WX_PORT
|
TOOLKIT=$WX_PORT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user