m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
dnl
dnl
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
fi
as_save_PATH="$PATH"
if test "x$prefix" != xNONE; then
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
fi
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
PATH="$as_save_PATH"
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl
dnl
dnl
rm -f conf.sdltest
AC_TRY_RUN([
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
int main(int argc, char *argv[])
{ return 0; }
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_CONFIG_OPTIONS],
[
AC_ARG_WITH(wxdir,
[ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH],
[ wx_config_name="$withval/wx-config"
wx_config_args="--inplace"])
AC_ARG_WITH(wx-config,
[ --with-wx-config=CONFIG wx-config script to use (optional)],
wx_config_name="$withval" )
AC_ARG_WITH(wx-prefix,
[ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)],
wx_config_prefix="$withval", wx_config_prefix="")
AC_ARG_WITH(wx-exec-prefix,
[ --with-wx-exec-prefix=PREFIX
Exec prefix where wxWidgets is installed (optional)],
wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
])
dnl
dnl
AC_DEFUN([_WX_PRIVATE_CHECK_VERSION],
[
wx_ver_ok=""
if test "x$WX_VERSION" != x ; then
if test $wx_config_major_version -gt $1; then
wx_ver_ok=yes
else
if test $wx_config_major_version -eq $1; then
if test $wx_config_minor_version -gt $2; then
wx_ver_ok=yes
else
if test $wx_config_minor_version -eq $2; then
if test $wx_config_micro_version -ge $3; then
wx_ver_ok=yes
fi
fi
fi
fi
fi
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_CONFIG_CHECK],
[
dnl
if test x${WX_CONFIG_NAME+set} != xset ; then
WX_CONFIG_NAME=wx-config
fi
if test "x$wx_config_name" != x ; then
WX_CONFIG_NAME="$wx_config_name"
fi
dnl
if test x$wx_config_exec_prefix != x ; then
wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
fi
if test x$wx_config_prefix != x ; then
wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
fi
if test "$cross_compiling" = "yes"; then
wx_config_args="$wx_config_args --host=$host_alias"
fi
dnl
if test -x "$WX_CONFIG_NAME" ; then
AC_MSG_CHECKING(for wx-config)
WX_CONFIG_PATH="$WX_CONFIG_NAME"
AC_MSG_RESULT($WX_CONFIG_PATH)
else
AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH")
fi
if test "$WX_CONFIG_PATH" != "no" ; then
WX_VERSION=""
min_wx_version=ifelse([$1], ,2.2.1,$1)
if test -z "$5" ; then
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version])
else
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
fi
dnl
dnl
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5"
WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
wx_config_major_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
wx_config_minor_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
wx_config_micro_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
wx_requested_major_version=`echo $min_wx_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
wx_requested_minor_version=`echo $min_wx_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
wx_requested_micro_version=`echo $min_wx_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
_WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version],
[$wx_requested_minor_version],
[$wx_requested_micro_version])
if test -n "$wx_ver_ok"; then
AC_MSG_RESULT(yes (version $WX_VERSION))
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4`
dnl
dnl
dnl
dnl
AC_MSG_CHECKING([for wxWidgets static library])
WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null`
if test "x$WX_LIBS_STATIC" = "x"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
dnl
wx_has_cppflags=""
if test $wx_config_major_version -gt 2; then
wx_has_cppflags=yes
else
if test $wx_config_major_version -eq 2; then
if test $wx_config_minor_version -gt 2; then
wx_has_cppflags=yes
else
if test $wx_config_minor_version -eq 2; then
if test $wx_config_micro_version -ge 6; then
wx_has_cppflags=yes
fi
fi
fi
fi
fi
dnl
wx_has_rescomp=""
if test $wx_config_major_version -gt 2; then
wx_has_rescomp=yes
else
if test $wx_config_major_version -eq 2; then
if test $wx_config_minor_version -ge 7; then
wx_has_rescomp=yes
fi
fi
fi
if test "x$wx_has_rescomp" = x ; then
dnl
WX_RESCOMP=
else
WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp`
fi
if test "x$wx_has_cppflags" = x ; then
dnl
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
WX_CPPFLAGS=$WX_CFLAGS
WX_CXXFLAGS=$WX_CFLAGS
WX_CFLAGS_ONLY=$WX_CFLAGS
WX_CXXFLAGS_ONLY=$WX_CFLAGS
else
dnl
WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4`
WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4`
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
fi
ifelse([$2], , :, [$2])
else
if test "x$WX_VERSION" = x; then
dnl
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(no (version $WX_VERSION is not new enough))
fi
WX_CFLAGS=""
WX_CPPFLAGS=""
WX_CXXFLAGS=""
WX_LIBS=""
WX_LIBS_STATIC=""
WX_RESCOMP=""
if test ! -z "$5"; then
wx_error_message="
The configuration you asked for $PACKAGE_NAME requires a wxWidgets
build with the following settings:
$5
but such build is not available.
To see the wxWidgets builds available on this system, please use
'wx-config --list' command. To use the default build, returned by
'wx-config --selected-config', use the options with their 'auto'
default values."
fi
wx_error_message="
The requested wxWidgets build couldn't be found.
$wx_error_message
If you still get this error, then check that 'wx-config' is
in path, the directory where wxWidgets libraries are installed
(returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH
or equivalent variable and wxWidgets version is $1 or above."
ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3])
fi
else
WX_CFLAGS=""
WX_CPPFLAGS=""
WX_CXXFLAGS=""
WX_LIBS=""
WX_LIBS_STATIC=""
WX_RESCOMP=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(WX_CPPFLAGS)
AC_SUBST(WX_CFLAGS)
AC_SUBST(WX_CXXFLAGS)
AC_SUBST(WX_CFLAGS_ONLY)
AC_SUBST(WX_CXXFLAGS_ONLY)
AC_SUBST(WX_LIBS)
AC_SUBST(WX_LIBS_STATIC)
AC_SUBST(WX_VERSION)
AC_SUBST(WX_RESCOMP)
dnl
dnl
WX_VERSION_MAJOR="$wx_config_major_version"
WX_VERSION_MINOR="$wx_config_minor_version"
WX_VERSION_MICRO="$wx_config_micro_version"
AC_SUBST(WX_VERSION_MAJOR)
AC_SUBST(WX_VERSION_MINOR)
AC_SUBST(WX_VERSION_MICRO)
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
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_PRIVATE_CHECK_VERSION(2,5,3)
if test -n "$wx_ver_ok"; then
WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc`
fi
fi
if test "x$WXRC" = x ; then
AC_MSG_RESULT([not found])
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT([$WXRC])
ifelse([$1], , :, [$1])
fi
AC_SUBST(WXRC)
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_LIKE_LIBNAME],
[
wx_temp="$2""_""$WX_PORT"
dnl
if test "$WX_UNICODE" = "1"; then
wx_temp="$wx_temp""u"
fi
if test "$WX_DEBUG" = "1"; then
wx_temp="$wx_temp""d"
fi
dnl
wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR"
dnl
$1=$wx_temp
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],
[AC_ARG_ENABLE($1,
AC_HELP_STRING([--enable-$1], [$3 (default is $4)]),
[], [enableval="$4"])
dnl
AC_MSG_CHECKING([for the --enable-$1 option])
if test "$enableval" = "yes" ; then
AC_MSG_RESULT([yes])
$2=1
$5
elif test "$enableval" = "no" ; then
AC_MSG_RESULT([no])
$2=0
elif test "$enableval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected])
$2="auto"
else
AC_MSG_ERROR([
Unrecognized option value (allowed values: yes, no, auto)
])
fi
])
AC_DEFUN([WX_ARG_WITH_YESNOAUTO],
[AC_ARG_WITH($1,
AC_HELP_STRING([--with-$1], [$3 (default is $4)]),
[], [withval="$4"])
dnl
AC_MSG_CHECKING([for the --with-$1 option])
if test "$withval" = "yes" ; then
AC_MSG_RESULT([yes])
$2=1
$5
dnl
dnl
elif test "$6" = "1" -a "$withval" = "no" ; then
AC_MSG_RESULT([no])
$2=0
elif test "$withval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected])
$2="auto"
else
AC_MSG_ERROR([
Unrecognized option value (allowed values: yes, auto)
])
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_STANDARD_OPTIONS],
[
dnl
dnl
dnl
ifelse(regexp([$1], [\bdebug]), [-1],,
[WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])])
ifelse(index([$1], [unicode]), [-1],,
[WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])])
ifelse(regexp([$1], [\bshared]), [-1],,
[WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])])
dnl
dnl
ifelse(index([$1], [toolkit]), [-1],,
[
AC_ARG_WITH([toolkit],
AC_HELP_STRING([--with-toolkit],
[Build against a specific wxWidgets toolkit (default is auto)]),
[], [withval="auto"])
dnl
AC_MSG_CHECKING([for the --with-toolkit option])
if test "$withval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected])
TOOLKIT="auto"
else
TOOLKIT="$withval"
dnl
if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \
"$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \
"$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, osx_carbon, osx_cocoa, dfb, x11)
])
fi
AC_MSG_RESULT([$TOOLKIT])
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
ifelse(index([$1], [wxshared]), [-1],,
[
WX_ARG_WITH_YESNOAUTO(
[wxshared], [WX_SHARED],
[Force building against a shared build of wxWidgets, even if --disable-shared is given],
[auto], [], [1])
])
dnl
dnl
dnl
ifelse(index([$1], [wxdebug]), [-1],,
[
WX_ARG_WITH_YESNOAUTO(
[wxdebug], [WX_DEBUG],
[Force building against a debug build of wxWidgets, even if --disable-debug is given],
[auto], [], [1])
])
dnl
dnl
ifelse(index([$1], [wxversion]), [-1],,
[
AC_ARG_WITH([wxversion],
AC_HELP_STRING([--with-wxversion],
[Build against a specific version of wxWidgets (default is auto)]),
[], [withval="auto"])
dnl
AC_MSG_CHECKING([for the --with-wxversion option])
if test "$withval" = "auto" ; then
AC_MSG_RESULT([will be automatically detected])
WX_RELEASE="auto"
else
wx_requested_major_version=`echo $withval | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
wx_requested_minor_version=`echo $withval | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
dnl
if test "${#wx_requested_major_version}" != "1" -o \
"${#wx_requested_minor_version}" != "1" ; then
AC_MSG_ERROR([
Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0)
])
fi
WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version"
AC_MSG_RESULT([$WX_RELEASE])
fi
])
if test "$WX_DEBUG_CONFIGURE" = "1"; then
echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG"
echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE"
echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED"
echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT"
echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE"
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
[
if test "$WX_SHARED" = "1" ; then
WXCONFIG_FLAGS="--static=no "
elif test "$WX_SHARED" = "0" ; then
WXCONFIG_FLAGS="--static=yes "
fi
if test "$WX_DEBUG" = "1" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes "
elif test "$WX_DEBUG" = "0" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no "
fi
dnl
if test "$WX_UNICODE" = "1" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes "
elif test "$WX_UNICODE" = "0" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
fi
if test "$TOOLKIT" != "auto" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
fi
if test "$WX_RELEASE" != "auto" ; then
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
fi
dnl
WXCONFIG_FLAGS=${WXCONFIG_FLAGS% }
if test "$WX_DEBUG_CONFIGURE" = "1"; then
echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS"
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
[
if test "$$1" = "auto" ; then
dnl
dnl
AC_MSG_CHECKING([$3])
dnl
dnl
dnl
dnl
WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*")
if test "$WX_$1" != "0"; then
WX_$1=1
AC_MSG_RESULT([yes])
ifelse([$4], , :, [$4])
else
WX_$1=0
AC_MSG_RESULT([no])
ifelse([$5], , :, [$5])
fi
else
dnl
WX_$1=$$1
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
[
dnl
dnl
WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR"
if test $WX_RELEASE -lt 26 ; then
AC_MSG_ERROR([
Cannot detect the wxWidgets configuration for the selected wxWidgets build
since its version is $WX_VERSION < 2.6.0; please install a newer
version of wxWidgets.
])
fi
dnl
dnl
WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config)
if test "$WX_DEBUG_CONFIGURE" = "1"; then
echo "[[dbg]] Using wx-config --selected-config"
echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
fi
dnl
dnl
dnl
dnl
dnl
dnl
if test $WX_SHARED = "1"; then
STATIC=0
elif test $WX_SHARED = "0"; then
STATIC=1
elif test $WX_SHARED = "auto"; then
STATIC="auto"
fi
dnl
_WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode],
[if wxWidgets was built with UNICODE enabled])
_WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug],
[if wxWidgets was built in DEBUG mode])
_WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static],
[if wxWidgets was built in STATIC mode])
dnl
if test "$WX_STATIC" != "0"; then
WX_SHARED=0
else
WX_SHARED=1
fi
AC_SUBST(WX_UNICODE)
AC_SUBST(WX_DEBUG)
AC_SUBST(WX_SHARED)
dnl
if test "$TOOLKIT" = "auto" ; then
dnl
dnl
AC_MSG_CHECKING([which wxWidgets toolkit was selected])
WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")
WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*")
WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*")
WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*")
WX_PORT="unknown"
if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
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_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_DFBPORT" != "0"; then WX_PORT="dfb"; fi
dnl
dnl
WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*")
if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi
dnl
if test "$WX_PORT" = "unknown" ; then
AC_MSG_ERROR([
Cannot detect the currently installed wxWidgets port !
Please check your 'wx-config --cxxflags'...
])
fi
AC_MSG_RESULT([$WX_PORT])
else
dnl
if test -z "$TOOLKIT" ; then
WX_PORT=$TOOLKIT
else
dnl
WX_PORT=$PORT
fi
fi
AC_SUBST(WX_PORT)
if test "$WX_DEBUG_CONFIGURE" = "1"; then
echo "[[dbg]] Values of all WX_* options after final detection:"
echo "[[dbg]] WX_DEBUG: $WX_DEBUG"
echo "[[dbg]] WX_UNICODE: $WX_UNICODE"
echo "[[dbg]] WX_SHARED: $WX_SHARED"
echo "[[dbg]] WX_RELEASE: $WX_RELEASE"
echo "[[dbg]] WX_PORT: $WX_PORT"
fi
dnl
dnl
dnl
dnl
dnl
dnl
if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then
AC_MSG_ERROR([
Cannot build shared library against a static build of wxWidgets !
This error happens because the wxWidgets build which was selected
has been detected as static while you asked to build $PACKAGE_NAME
as shared library and this is not possible.
Use the '--disable-shared' option to build $PACKAGE_NAME
as static library or '--with-wxshared' to use wxWidgets as shared library.
])
fi
dnl
dnl
if test "$DEBUG" = "auto"; then
DEBUG=$WX_DEBUG
fi
if test "$UNICODE" = "auto"; then
UNICODE=$WX_UNICODE
fi
if test "$SHARED" = "auto"; then
SHARED=$WX_SHARED
fi
if test "$TOOLKIT" = "auto"; then
TOOLKIT=$WX_PORT
fi
dnl
if test "$DEBUG" = "1"; then
BUILD="debug"
elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then
BUILD="release"
fi
dnl
dnl
dnl
if test "$DEBUG" = "1"; then
CXXFLAGS="$CXXFLAGS -g -O0"
CFLAGS="$CFLAGS -g -O0"
else
CXXFLAGS="$CXXFLAGS -O2"
CFLAGS="$CFLAGS -O2"
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_BOOLOPT_SUMMARY],
[
if test "x$$1" = "x1" ; then
echo $2
elif test "x$$1" = "x0" ; then
echo $3
else
echo "$1 is $$1"
fi
])
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG],
[
echo
echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION"
echo " has the following settings:"
WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"])
WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"])
WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"])
echo " - VERSION: $WX_VERSION"
echo " - PORT: $WX_PORT"
])
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
dnl
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN],
[
echo
echo " ----------------------------------------------------------------"
echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."
echo " Summary of main configuration settings for $PACKAGE_NAME:"
WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"])
WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"])
WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"])
])
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END],
[
WX_STANDARD_OPTIONS_SUMMARY_MSG
echo
echo " Now, just run make."
echo " ----------------------------------------------------------------"
echo
])
dnl
dnl
dnl
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])])
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
dnl
dnl
m4_if([$1], [1.12.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
m4_define([_AM_AUTOCONF_VERSION], [])
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.12.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl
AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='
else
$1_TRUE='
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
[$1], [CXX], [depcc="$CXX" am_compiler_list=],
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
[$1], [UPC], [depcc="$UPC" am_compiler_list=],
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
rm -rf conftest.dir
mkdir conftest.dir
cp "$am_depcomp" conftest.dir
cd conftest.dir
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '
echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
test "$am__universal" = false || continue
;;
nosideeffect)
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE([dependency-tracking], [dnl
AS_HELP_STRING(
[--enable-dependency-tracking],
[do not reject slow dependency extractors])
AS_HELP_STRING(
[--disable-dependency-tracking],
[speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
mf=`echo "$mf" | sed -e 's/:.*$//'`
if sed -n 's,^
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
echo '
done
done
}
])
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.62])dnl
dnl
dnl
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
dnl
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
[$0: two- and three-arguments forms are deprecated. For more info, see:
http://www.gnu.org/software/automake/manual/automake.html
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl
m4_if(
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
AM_MISSING_PROG([AUTOCONF], [autoconf])
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
AM_MISSING_PROG([AUTOHEADER], [autoheader])
AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES([CC])],
[m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES([CXX])],
[m4_define([AC_PROG_CXX],
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
dnl
dnl
m4_ifdef([AC_PROG_OBJCXX],
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl
dnl
dnl
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl
dnl
dnl
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST([install_sh])])
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
echo "include confinc" > confmf
case `$am_make -s -f confmf 2> /dev/null` in
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
fi
])
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
am_lf='
'
case `pwd` in
*[[\\\"\
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
if test "$[2]" = conftest.file || test $am_try -eq 2; then
break
fi
sleep 1
am_has_slept=yes
done
test "$[2]" = conftest.file
)
then
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT([yes])
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
am_sleep_pid=$!
fi
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
wait $am_sleep_pid 2>/dev/null
fi
AC_MSG_RESULT([done])])
rm -f conftest.file
])
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
dnl
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
AC_DEFUN([_AM_PROG_TAR],
[
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
test -n "${am_cv_prog_tar_$1}" && break
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
])