-dnl ---------------------------------------------------------------------------
-dnl override AC_ARG_ENABLE/WITH to cache the results in .cache file
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([WX_ARG_CACHE_INIT],
- [
- wx_arg_cache_file="configarg.cache"
- echo "loading argument cache $wx_arg_cache_file"
- rm -f ${wx_arg_cache_file}.tmp
- touch ${wx_arg_cache_file}.tmp
- touch ${wx_arg_cache_file}
- ])
-
-AC_DEFUN([WX_ARG_CACHE_FLUSH],
- [
- echo "saving argument cache $wx_arg_cache_file"
- mv ${wx_arg_cache_file}.tmp ${wx_arg_cache_file}
- ])
-
-dnl this macro checks for a three-valued command line --with argument:
-dnl possible arguments are 'yes', 'no', 'sys', or 'builtin'
-dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name)
-AC_DEFUN([WX_ARG_SYS_WITH],
- [
- AC_MSG_CHECKING([for --with-$1])
- no_cache=0
- AC_ARG_WITH($1, [$2],
- [
- if test "$withval" = yes; then
- ac_cv_use_$1='$3=yes'
- elif test "$withval" = no; then
- ac_cv_use_$1='$3=no'
- elif test "$withval" = sys; then
- ac_cv_use_$1='$3=sys'
- elif test "$withval" = builtin; then
- ac_cv_use_$1='$3=builtin'
- else
- AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
- fi
- ],
- [
- LINE=`grep "$3" ${wx_arg_cache_file}`
- if test "x$LINE" != x ; then
- eval "DEFAULT_$LINE"
- else
- no_cache=1
- fi
-
- ac_cv_use_$1='$3='$DEFAULT_$3
- ])
-
- eval "$ac_cv_use_$1"
- if test "$no_cache" != 1; then
- echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
- fi
-
- if test "$$3" = yes; then
- AC_MSG_RESULT(yes)
- elif test "$$3" = no; then
- AC_MSG_RESULT(no)
- elif test "$$3" = sys; then
- AC_MSG_RESULT([system version])
- elif test "$$3" = builtin; then
- AC_MSG_RESULT([builtin version])
- else
- AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
- fi
- ])
-
-dnl this macro checks for a command line argument and caches the result
-dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
-AC_DEFUN([WX_ARG_WITH],
- [
- AC_MSG_CHECKING([for --with-$1])
- no_cache=0
- AC_ARG_WITH($1, [$2],
- [
- if test "$withval" = yes; then
- ac_cv_use_$1='$3=yes'
- else
- ac_cv_use_$1='$3=no'
- fi
- ],
- [
- LINE=`grep "$3" ${wx_arg_cache_file}`
- if test "x$LINE" != x ; then
- eval "DEFAULT_$LINE"
- else
- no_cache=1
- fi
-
- ac_cv_use_$1='$3='$DEFAULT_$3
- ])
-
- eval "$ac_cv_use_$1"
- if test "$no_cache" != 1; then
- echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
- fi
-
- if test "$$3" = yes; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- ])
-
-dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
-dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name, enablestring)
-dnl
-dnl enablestring is a hack and allows to show "checking for --disable-foo"
-dnl message when running configure instead of the default "checking for
-dnl --enable-foo" one whih is useful for the options enabled by default
-AC_DEFUN([WX_ARG_ENABLE],
- [
- enablestring=$4
- AC_MSG_CHECKING([for --${enablestring:-enable}-$1])
- no_cache=0
- AC_ARG_ENABLE($1, [$2],
- [
- if test "$enableval" = yes; then
- ac_cv_use_$1='$3=yes'
- else
- ac_cv_use_$1='$3=no'
- fi
- ],
- [
- LINE=`grep "$3" ${wx_arg_cache_file}`
- if test "x$LINE" != x ; then
- eval "DEFAULT_$LINE"
- else
- no_cache=1
- fi
-
- ac_cv_use_$1='$3='$DEFAULT_$3
- ])
-
- eval "$ac_cv_use_$1"
- if test "$no_cache" != 1; then
- echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
- fi
-
- if test "$$3" = yes; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- ])
-
-
-dnl ===========================================================================
-dnl Linker features test
-dnl ===========================================================================
-
-dnl ---------------------------------------------------------------------------
-dnl WX_VERSIONED_SYMBOLS checks whether the linker can create versioned
-dnl symbols. If it can, sets LDFLAGS_VERSIONING to $CXX flags needed to use
-dnl version script file named versionfile
-dnl
-dnl call WX_VERSIONED_SYMBOLS(versionfile)
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_VERSIONED_SYMBOLS],