1# generated automatically by aclocal 1.16.2 -*- Autoconf -*- 2 3# Copyright (C) 1996-2020 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 24# serial 12 (pkg-config-0.29.2) 25 26dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 27dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 28dnl 29dnl This program is free software; you can redistribute it and/or modify 30dnl it under the terms of the GNU General Public License as published by 31dnl the Free Software Foundation; either version 2 of the License, or 32dnl (at your option) any later version. 33dnl 34dnl This program is distributed in the hope that it will be useful, but 35dnl WITHOUT ANY WARRANTY; without even the implied warranty of 36dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 37dnl General Public License for more details. 38dnl 39dnl You should have received a copy of the GNU General Public License 40dnl along with this program; if not, write to the Free Software 41dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 42dnl 02111-1307, USA. 43dnl 44dnl As a special exception to the GNU General Public License, if you 45dnl distribute this file as part of a program that contains a 46dnl configuration script generated by Autoconf, you may include it under 47dnl the same distribution terms that you use for the rest of that 48dnl program. 49 50dnl PKG_PREREQ(MIN-VERSION) 51dnl ----------------------- 52dnl Since: 0.29 53dnl 54dnl Verify that the version of the pkg-config macros are at least 55dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 56dnl installed version of pkg-config, this checks the developer's version 57dnl of pkg.m4 when generating configure. 58dnl 59dnl To ensure that this macro is defined, also add: 60dnl m4_ifndef([PKG_PREREQ], 61dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 62dnl 63dnl See the "Since" comment for each macro you use to see what version 64dnl of the macros you require. 65m4_defun([PKG_PREREQ], 66[m4_define([PKG_MACROS_VERSION], [0.29.2]) 67m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 68 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 69])dnl PKG_PREREQ 70 71dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 72dnl ---------------------------------- 73dnl Since: 0.16 74dnl 75dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 76dnl first found in the path. Checks that the version of pkg-config found 77dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 78dnl used since that's the first version where most current features of 79dnl pkg-config existed. 80AC_DEFUN([PKG_PROG_PKG_CONFIG], 81[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 82m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 83m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 84AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 85AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 87 88if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 89 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 90fi 91if test -n "$PKG_CONFIG"; then 92 _pkg_min_version=m4_default([$1], [0.9.0]) 93 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 94 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 95 AC_MSG_RESULT([yes]) 96 else 97 AC_MSG_RESULT([no]) 98 PKG_CONFIG="" 99 fi 100fi[]dnl 101])dnl PKG_PROG_PKG_CONFIG 102 103dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 104dnl ------------------------------------------------------------------- 105dnl Since: 0.18 106dnl 107dnl Check to see whether a particular set of modules exists. Similar to 108dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 109dnl 110dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 111dnl only at the first occurence in configure.ac, so if the first place 112dnl it's called might be skipped (such as if it is within an "if", you 113dnl have to call PKG_CHECK_EXISTS manually 114AC_DEFUN([PKG_CHECK_EXISTS], 115[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 116if test -n "$PKG_CONFIG" && \ 117 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 118 m4_default([$2], [:]) 119m4_ifvaln([$3], [else 120 $3])dnl 121fi]) 122 123dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 124dnl --------------------------------------------- 125dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 126dnl pkg_failed based on the result. 127m4_define([_PKG_CONFIG], 128[if test -n "$$1"; then 129 pkg_cv_[]$1="$$1" 130 elif test -n "$PKG_CONFIG"; then 131 PKG_CHECK_EXISTS([$3], 132 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 133 test "x$?" != "x0" && pkg_failed=yes ], 134 [pkg_failed=yes]) 135 else 136 pkg_failed=untried 137fi[]dnl 138])dnl _PKG_CONFIG 139 140dnl _PKG_SHORT_ERRORS_SUPPORTED 141dnl --------------------------- 142dnl Internal check to see if pkg-config supports short errors. 143AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 144[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 145if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 146 _pkg_short_errors_supported=yes 147else 148 _pkg_short_errors_supported=no 149fi[]dnl 150])dnl _PKG_SHORT_ERRORS_SUPPORTED 151 152 153dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 154dnl [ACTION-IF-NOT-FOUND]) 155dnl -------------------------------------------------------------- 156dnl Since: 0.4.0 157dnl 158dnl Note that if there is a possibility the first call to 159dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 160dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 161AC_DEFUN([PKG_CHECK_MODULES], 162[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 163AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 164AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 165 166pkg_failed=no 167AC_MSG_CHECKING([for $2]) 168 169_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 170_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 171 172m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 173and $1[]_LIBS to avoid the need to call pkg-config. 174See the pkg-config man page for more details.]) 175 176if test $pkg_failed = yes; then 177 AC_MSG_RESULT([no]) 178 _PKG_SHORT_ERRORS_SUPPORTED 179 if test $_pkg_short_errors_supported = yes; then 180 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 181 else 182 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 183 fi 184 # Put the nasty error message in config.log where it belongs 185 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 186 187 m4_default([$4], [AC_MSG_ERROR( 188[Package requirements ($2) were not met: 189 190$$1_PKG_ERRORS 191 192Consider adjusting the PKG_CONFIG_PATH environment variable if you 193installed software in a non-standard prefix. 194 195_PKG_TEXT])[]dnl 196 ]) 197elif test $pkg_failed = untried; then 198 AC_MSG_RESULT([no]) 199 m4_default([$4], [AC_MSG_FAILURE( 200[The pkg-config script could not be found or is too old. Make sure it 201is in your PATH or set the PKG_CONFIG environment variable to the full 202path to pkg-config. 203 204_PKG_TEXT 205 206To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 207 ]) 208else 209 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 210 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 211 AC_MSG_RESULT([yes]) 212 $3 213fi[]dnl 214])dnl PKG_CHECK_MODULES 215 216 217dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 218dnl [ACTION-IF-NOT-FOUND]) 219dnl --------------------------------------------------------------------- 220dnl Since: 0.29 221dnl 222dnl Checks for existence of MODULES and gathers its build flags with 223dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 224dnl and VARIABLE-PREFIX_LIBS from --libs. 225dnl 226dnl Note that if there is a possibility the first call to 227dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 228dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 229dnl configure.ac. 230AC_DEFUN([PKG_CHECK_MODULES_STATIC], 231[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 232_save_PKG_CONFIG=$PKG_CONFIG 233PKG_CONFIG="$PKG_CONFIG --static" 234PKG_CHECK_MODULES($@) 235PKG_CONFIG=$_save_PKG_CONFIG[]dnl 236])dnl PKG_CHECK_MODULES_STATIC 237 238 239dnl PKG_INSTALLDIR([DIRECTORY]) 240dnl ------------------------- 241dnl Since: 0.27 242dnl 243dnl Substitutes the variable pkgconfigdir as the location where a module 244dnl should install pkg-config .pc files. By default the directory is 245dnl $libdir/pkgconfig, but the default can be changed by passing 246dnl DIRECTORY. The user can override through the --with-pkgconfigdir 247dnl parameter. 248AC_DEFUN([PKG_INSTALLDIR], 249[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 250m4_pushdef([pkg_description], 251 [pkg-config installation directory @<:@]pkg_default[@:>@]) 252AC_ARG_WITH([pkgconfigdir], 253 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 254 [with_pkgconfigdir=]pkg_default) 255AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 256m4_popdef([pkg_default]) 257m4_popdef([pkg_description]) 258])dnl PKG_INSTALLDIR 259 260 261dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 262dnl -------------------------------- 263dnl Since: 0.27 264dnl 265dnl Substitutes the variable noarch_pkgconfigdir as the location where a 266dnl module should install arch-independent pkg-config .pc files. By 267dnl default the directory is $datadir/pkgconfig, but the default can be 268dnl changed by passing DIRECTORY. The user can override through the 269dnl --with-noarch-pkgconfigdir parameter. 270AC_DEFUN([PKG_NOARCH_INSTALLDIR], 271[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 272m4_pushdef([pkg_description], 273 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 274AC_ARG_WITH([noarch-pkgconfigdir], 275 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 276 [with_noarch_pkgconfigdir=]pkg_default) 277AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 278m4_popdef([pkg_default]) 279m4_popdef([pkg_description]) 280])dnl PKG_NOARCH_INSTALLDIR 281 282 283dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 284dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 285dnl ------------------------------------------- 286dnl Since: 0.28 287dnl 288dnl Retrieves the value of the pkg-config variable for the given module. 289AC_DEFUN([PKG_CHECK_VAR], 290[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 291AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 292 293_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 294AS_VAR_COPY([$1], [pkg_cv_][$1]) 295 296AS_VAR_IF([$1], [""], [$5], [$4])dnl 297])dnl PKG_CHECK_VAR 298 299dnl --------------------------------------------------------------------------- 300dnl Author: wxWidgets development team, 301dnl Francesco Montorsi, 302dnl Bob McCown (Mac-testing) 303dnl Creation date: 24/11/2001 304dnl --------------------------------------------------------------------------- 305 306dnl =========================================================================== 307dnl Table of Contents of this macro file: 308dnl ------------------------------------- 309dnl 310dnl SECTION A: wxWidgets main macros 311dnl - WX_CONFIG_OPTIONS 312dnl - WX_CONFIG_CHECK 313dnl - WXRC_CHECK 314dnl - WX_STANDARD_OPTIONS 315dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS 316dnl - WX_DETECT_STANDARD_OPTION_VALUES 317dnl 318dnl SECTION B: wxWidgets-related utilities 319dnl - WX_LIKE_LIBNAME 320dnl - WX_ARG_ENABLE_YESNOAUTO 321dnl - WX_ARG_WITH_YESNOAUTO 322dnl 323dnl SECTION C: messages to the user 324dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG 325dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN 326dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END 327dnl - WX_BOOLOPT_SUMMARY 328dnl 329dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra 330dnl debug output on stdout from these macros. 331dnl =========================================================================== 332 333 334dnl --------------------------------------------------------------------------- 335dnl Macros for wxWidgets detection. Typically used in configure.in as: 336dnl 337dnl AC_ARG_ENABLE(...) 338dnl AC_ARG_WITH(...) 339dnl ... 340dnl WX_CONFIG_OPTIONS 341dnl ... 342dnl ... 343dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1]) 344dnl if test "$wxWin" != 1; then 345dnl AC_MSG_ERROR([ 346dnl wxWidgets must be installed on your system 347dnl but wx-config script couldn't be found. 348dnl 349dnl Please check that wx-config is in path, the directory 350dnl where wxWidgets libraries are installed (returned by 351dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or 352dnl equivalent variable and wxWidgets version is 2.3.4 or above. 353dnl ]) 354dnl fi 355dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" 356dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" 357dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 358dnl 359dnl LIBS="$LIBS $WX_LIBS" 360dnl 361dnl If you want to support standard --enable-debug/unicode/shared options, you 362dnl may do the following: 363dnl 364dnl ... 365dnl AC_CANONICAL_SYSTEM 366dnl 367dnl # define configure options 368dnl WX_CONFIG_OPTIONS 369dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared]) 370dnl 371dnl # basic configure checks 372dnl ... 373dnl 374dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE 375dnl WX_DEBUG=$DEBUG 376dnl WX_UNICODE=$UNICODE 377dnl 378dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS 379dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS]) 380dnl WX_DETECT_STANDARD_OPTION_VALUES 381dnl 382dnl # write the output files 383dnl AC_CONFIG_FILES([Makefile ...]) 384dnl AC_OUTPUT 385dnl 386dnl # optional: just to show a message to the user 387dnl WX_STANDARD_OPTIONS_SUMMARY_MSG 388dnl 389dnl --------------------------------------------------------------------------- 390 391 392dnl --------------------------------------------------------------------------- 393dnl WX_CONFIG_OPTIONS 394dnl 395dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and 396dnl --wx-config command line options 397dnl --------------------------------------------------------------------------- 398 399AC_DEFUN([WX_CONFIG_OPTIONS], 400[ 401 AC_ARG_WITH(wxdir, 402 [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], 403 [ wx_config_name="$withval/wx-config" 404 wx_config_args="--inplace"]) 405 AC_ARG_WITH(wx-config, 406 [ --with-wx-config=CONFIG wx-config script to use (optional)], 407 wx_config_name="$withval" ) 408 AC_ARG_WITH(wx-prefix, 409 [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], 410 wx_config_prefix="$withval", wx_config_prefix="") 411 AC_ARG_WITH(wx-exec-prefix, 412 [ --with-wx-exec-prefix=PREFIX 413 Exec prefix where wxWidgets is installed (optional)], 414 wx_config_exec_prefix="$withval", wx_config_exec_prefix="") 415]) 416 417dnl Helper macro for checking if wx version is at least $1.$2.$3, set's 418dnl wx_ver_ok=yes if it is: 419AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], 420[ 421 wx_ver_ok="" 422 if test "x$WX_VERSION" != x ; then 423 if test $wx_config_major_version -gt $1; then 424 wx_ver_ok=yes 425 else 426 if test $wx_config_major_version -eq $1; then 427 if test $wx_config_minor_version -gt $2; then 428 wx_ver_ok=yes 429 else 430 if test $wx_config_minor_version -eq $2; then 431 if test $wx_config_micro_version -ge $3; then 432 wx_ver_ok=yes 433 fi 434 fi 435 fi 436 fi 437 fi 438 fi 439]) 440 441dnl --------------------------------------------------------------------------- 442dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND 443dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) 444dnl 445dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC 446dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME 447dnl environment variable to override the default name of the wx-config script 448dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this 449dnl case the macro won't even waste time on tests for its existence. 450dnl 451dnl Optional WX-LIBS argument contains comma- or space-separated list of 452dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS 453dnl and WX_LIBS_STATIC will contain flags to link with all of the core 454dnl wxWidgets libraries. 455dnl 456dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config 457dnl invocation command in present. It can be used to fine-tune lookup of 458dnl best wxWidgets build available. 459dnl 460dnl Example use: 461dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] 462dnl [--unicode --debug]) 463dnl --------------------------------------------------------------------------- 464 465dnl 466dnl Get the cflags and libraries from the wx-config script 467dnl 468AC_DEFUN([WX_CONFIG_CHECK], 469[ 470 dnl do we have wx-config name: it can be wx-config or wxd-config or ... 471 if test x${WX_CONFIG_NAME+set} != xset ; then 472 WX_CONFIG_NAME=wx-config 473 fi 474 475 if test "x$wx_config_name" != x ; then 476 WX_CONFIG_NAME="$wx_config_name" 477 fi 478 479 dnl deal with optional prefixes 480 if test x$wx_config_exec_prefix != x ; then 481 wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" 482 WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" 483 fi 484 if test x$wx_config_prefix != x ; then 485 wx_config_args="$wx_config_args --prefix=$wx_config_prefix" 486 WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" 487 fi 488 if test "$cross_compiling" = "yes"; then 489 wx_config_args="$wx_config_args --host=$host_alias" 490 fi 491 492 dnl don't search the PATH if WX_CONFIG_NAME is absolute filename 493 if test -x "$WX_CONFIG_NAME" ; then 494 AC_MSG_CHECKING(for wx-config) 495 WX_CONFIG_PATH="$WX_CONFIG_NAME" 496 AC_MSG_RESULT($WX_CONFIG_PATH) 497 else 498 AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") 499 fi 500 501 if test "$WX_CONFIG_PATH" != "no" ; then 502 WX_VERSION="" 503 504 min_wx_version=ifelse([$1], ,2.2.1,$1) 505 if test -z "$5" ; then 506 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) 507 else 508 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) 509 fi 510 511 dnl don't add the libraries ($4) to this variable as this would result in 512 dnl an error when it's used with --version below 513 WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" 514 515 WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` 516 wx_config_major_version=`echo $WX_VERSION | \ 517 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 518 wx_config_minor_version=`echo $WX_VERSION | \ 519 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 520 wx_config_micro_version=`echo $WX_VERSION | \ 521 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 522 523 wx_requested_major_version=`echo $min_wx_version | \ 524 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 525 wx_requested_minor_version=`echo $min_wx_version | \ 526 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 527 wx_requested_micro_version=`echo $min_wx_version | \ 528 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 529 530 _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], 531 [$wx_requested_minor_version], 532 [$wx_requested_micro_version]) 533 534 if test -n "$wx_ver_ok"; then 535 AC_MSG_RESULT(yes (version $WX_VERSION)) 536 WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4` 537 538 dnl is this even still appropriate? --static is a real option now 539 dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is 540 dnl what the user actually wants, making this redundant at best. 541 dnl For now keep it in case anyone actually used it in the past. 542 AC_MSG_CHECKING([for wxWidgets static library]) 543 WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` 544 if test "x$WX_LIBS_STATIC" = "x"; then 545 AC_MSG_RESULT(no) 546 else 547 AC_MSG_RESULT(yes) 548 fi 549 550 dnl starting with version 2.2.6 wx-config has --cppflags argument 551 wx_has_cppflags="" 552 if test $wx_config_major_version -gt 2; then 553 wx_has_cppflags=yes 554 else 555 if test $wx_config_major_version -eq 2; then 556 if test $wx_config_minor_version -gt 2; then 557 wx_has_cppflags=yes 558 else 559 if test $wx_config_minor_version -eq 2; then 560 if test $wx_config_micro_version -ge 6; then 561 wx_has_cppflags=yes 562 fi 563 fi 564 fi 565 fi 566 fi 567 568 dnl starting with version 2.7.0 wx-config has --rescomp option 569 wx_has_rescomp="" 570 if test $wx_config_major_version -gt 2; then 571 wx_has_rescomp=yes 572 else 573 if test $wx_config_major_version -eq 2; then 574 if test $wx_config_minor_version -ge 7; then 575 wx_has_rescomp=yes 576 fi 577 fi 578 fi 579 if test "x$wx_has_rescomp" = x ; then 580 dnl cannot give any useful info for resource compiler 581 WX_RESCOMP= 582 else 583 WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` 584 fi 585 586 if test "x$wx_has_cppflags" = x ; then 587 dnl no choice but to define all flags like CFLAGS 588 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` 589 WX_CPPFLAGS=$WX_CFLAGS 590 WX_CXXFLAGS=$WX_CFLAGS 591 592 WX_CFLAGS_ONLY=$WX_CFLAGS 593 WX_CXXFLAGS_ONLY=$WX_CFLAGS 594 else 595 dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS 596 WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4` 597 WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4` 598 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` 599 600 WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` 601 WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` 602 fi 603 604 ifelse([$2], , :, [$2]) 605 606 else 607 608 if test "x$WX_VERSION" = x; then 609 dnl no wx-config at all 610 AC_MSG_RESULT(no) 611 else 612 AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) 613 fi 614 615 WX_CFLAGS="" 616 WX_CPPFLAGS="" 617 WX_CXXFLAGS="" 618 WX_LIBS="" 619 WX_LIBS_STATIC="" 620 WX_RESCOMP="" 621 622 if test ! -z "$5"; then 623 624 wx_error_message=" 625 The configuration you asked for $PACKAGE_NAME requires a wxWidgets 626 build with the following settings: 627 $5 628 but such build is not available. 629 630 To see the wxWidgets builds available on this system, please use 631 'wx-config --list' command. To use the default build, returned by 632 'wx-config --selected-config', use the options with their 'auto' 633 default values." 634 635 fi 636 637 wx_error_message=" 638 The requested wxWidgets build couldn't be found. 639 $wx_error_message 640 641 If you still get this error, then check that 'wx-config' is 642 in path, the directory where wxWidgets libraries are installed 643 (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH 644 or equivalent variable and wxWidgets version is $1 or above." 645 646 ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) 647 648 fi 649 else 650 651 WX_CFLAGS="" 652 WX_CPPFLAGS="" 653 WX_CXXFLAGS="" 654 WX_LIBS="" 655 WX_LIBS_STATIC="" 656 WX_RESCOMP="" 657 658 ifelse([$3], , :, [$3]) 659 660 fi 661 662 AC_SUBST(WX_CPPFLAGS) 663 AC_SUBST(WX_CFLAGS) 664 AC_SUBST(WX_CXXFLAGS) 665 AC_SUBST(WX_CFLAGS_ONLY) 666 AC_SUBST(WX_CXXFLAGS_ONLY) 667 AC_SUBST(WX_LIBS) 668 AC_SUBST(WX_LIBS_STATIC) 669 AC_SUBST(WX_VERSION) 670 AC_SUBST(WX_RESCOMP) 671 672 dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols 673 dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness): 674 WX_VERSION_MAJOR="$wx_config_major_version" 675 WX_VERSION_MINOR="$wx_config_minor_version" 676 WX_VERSION_MICRO="$wx_config_micro_version" 677 AC_SUBST(WX_VERSION_MAJOR) 678 AC_SUBST(WX_VERSION_MINOR) 679 AC_SUBST(WX_VERSION_MICRO) 680]) 681 682dnl --------------------------------------------------------------------------- 683dnl Get information on the wxrc program for making C++, Python and xrs 684dnl resource files. 685dnl 686dnl AC_ARG_ENABLE(...) 687dnl AC_ARG_WITH(...) 688dnl ... 689dnl WX_CONFIG_OPTIONS 690dnl ... 691dnl WX_CONFIG_CHECK(2.6.0, wxWin=1) 692dnl if test "$wxWin" != 1; then 693dnl AC_MSG_ERROR([ 694dnl wxWidgets must be installed on your system 695dnl but wx-config script couldn't be found. 696dnl 697dnl Please check that wx-config is in path, the directory 698dnl where wxWidgets libraries are installed (returned by 699dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or 700dnl equivalent variable and wxWidgets version is 2.6.0 or above. 701dnl ]) 702dnl fi 703dnl 704dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) 705dnl if test "x$HAVE_WXRC" != x1; then 706dnl AC_MSG_ERROR([ 707dnl The wxrc program was not installed or not found. 708dnl 709dnl Please check the wxWidgets installation. 710dnl ]) 711dnl fi 712dnl 713dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" 714dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" 715dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 716dnl 717dnl LDFLAGS="$LDFLAGS $WX_LIBS" 718dnl --------------------------------------------------------------------------- 719 720dnl --------------------------------------------------------------------------- 721dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 722dnl 723dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS 724dnl resources. The variable WXRC will be set and substituted in the configure 725dnl script and Makefiles. 726dnl 727dnl Example use: 728dnl WXRC_CHECK([wxrc=1], [wxrc=0]) 729dnl --------------------------------------------------------------------------- 730 731dnl 732dnl wxrc program from the wx-config script 733dnl 734AC_DEFUN([WXRC_CHECK], 735[ 736 AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) 737 738 if test "x$WX_CONFIG_NAME" = x; then 739 AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) 740 else 741 742 AC_MSG_CHECKING([for wxrc]) 743 744 if test "x$WXRC" = x ; then 745 dnl wx-config --utility is a new addition to wxWidgets: 746 _WX_PRIVATE_CHECK_VERSION(2,5,3) 747 if test -n "$wx_ver_ok"; then 748 WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` 749 fi 750 fi 751 752 if test "x$WXRC" = x ; then 753 AC_MSG_RESULT([not found]) 754 ifelse([$2], , :, [$2]) 755 else 756 AC_MSG_RESULT([$WXRC]) 757 ifelse([$1], , :, [$1]) 758 fi 759 760 AC_SUBST(WXRC) 761 fi 762]) 763 764dnl --------------------------------------------------------------------------- 765dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) 766dnl 767dnl Sets the "output-var" variable to the name of a library named with same 768dnl wxWidgets rule. 769dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets 770dnl the $lib variable to: 771dnl 'mine_gtk2ud_test-2.8' 772dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 773dnl --------------------------------------------------------------------------- 774AC_DEFUN([WX_LIKE_LIBNAME], 775 [ 776 wx_temp="$2""_""$WX_PORT" 777 778 dnl add the [u][d] string 779 if test "$WX_UNICODE" = "1"; then 780 wx_temp="$wx_temp""u" 781 fi 782 if test "$WX_DEBUG" = "1"; then 783 wx_temp="$wx_temp""d" 784 fi 785 786 dnl complete the name of the lib 787 wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR" 788 789 dnl save it in the user's variable 790 $1=$wx_temp 791 ]) 792 793dnl --------------------------------------------------------------------------- 794dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO 795dnl 796dnl Two little custom macros which define the ENABLE/WITH configure arguments. 797dnl Macro arguments: 798dnl $1 = the name of the --enable / --with feature 799dnl $2 = the name of the variable associated 800dnl $3 = the description of that feature 801dnl $4 = the default value for that feature 802dnl $5 = additional action to do in case option is given with "yes" value 803dnl --------------------------------------------------------------------------- 804AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO], 805 [AC_ARG_ENABLE($1, 806 AC_HELP_STRING([--enable-$1], [$3 (default is $4)]), 807 [], [enableval="$4"]) 808 809 dnl Show a message to the user about this option 810 AC_MSG_CHECKING([for the --enable-$1 option]) 811 if test "$enableval" = "yes" ; then 812 AC_MSG_RESULT([yes]) 813 $2=1 814 $5 815 elif test "$enableval" = "no" ; then 816 AC_MSG_RESULT([no]) 817 $2=0 818 elif test "$enableval" = "auto" ; then 819 AC_MSG_RESULT([will be automatically detected]) 820 $2="auto" 821 else 822 AC_MSG_ERROR([ 823 Unrecognized option value (allowed values: yes, no, auto) 824 ]) 825 fi 826 ]) 827 828AC_DEFUN([WX_ARG_WITH_YESNOAUTO], 829 [AC_ARG_WITH($1, 830 AC_HELP_STRING([--with-$1], [$3 (default is $4)]), 831 [], [withval="$4"]) 832 833 dnl Show a message to the user about this option 834 AC_MSG_CHECKING([for the --with-$1 option]) 835 if test "$withval" = "yes" ; then 836 AC_MSG_RESULT([yes]) 837 $2=1 838 $5 839 dnl NB: by default we don't allow --with-$1=no option 840 dnl since it does not make much sense ! 841 elif test "$6" = "1" -a "$withval" = "no" ; then 842 AC_MSG_RESULT([no]) 843 $2=0 844 elif test "$withval" = "auto" ; then 845 AC_MSG_RESULT([will be automatically detected]) 846 $2="auto" 847 else 848 AC_MSG_ERROR([ 849 Unrecognized option value (allowed values: yes, auto) 850 ]) 851 fi 852 ]) 853 854 855dnl --------------------------------------------------------------------------- 856dnl WX_STANDARD_OPTIONS([options-to-add]) 857dnl 858dnl Adds to the configure script one or more of the following options: 859dnl --enable-[debug|unicode|shared|wxshared|wxdebug] 860dnl --with-[gtk|msw|motif|x11|mac|dfb] 861dnl --with-wxversion 862dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, 863dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. 864dnl 865dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the 866dnl --enable-unicode option (in boolean format) while the second indicates 867dnl if wxWidgets was built in Unicode mode (and still is in boolean format). 868dnl --------------------------------------------------------------------------- 869AC_DEFUN([WX_STANDARD_OPTIONS], 870 [ 871 872 dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if 873 dnl the $1 argument contains respectively the debug,unicode or shared options. 874 875 dnl be careful here not to set debug flag if only "wxdebug" was specified 876 ifelse(regexp([$1], [\bdebug]), [-1],, 877 [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])]) 878 879 ifelse(index([$1], [unicode]), [-1],, 880 [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])]) 881 882 ifelse(regexp([$1], [\bshared]), [-1],, 883 [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])]) 884 885 dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option 886 dnl which must be able to accept the auto|gtk1|gtk2|msw|... values 887 ifelse(index([$1], [toolkit]), [-1],, 888 [ 889 AC_ARG_WITH([toolkit], 890 AC_HELP_STRING([--with-toolkit], 891 [Build against a specific wxWidgets toolkit (default is auto)]), 892 [], [withval="auto"]) 893 894 dnl Show a message to the user about this option 895 AC_MSG_CHECKING([for the --with-toolkit option]) 896 if test "$withval" = "auto" ; then 897 AC_MSG_RESULT([will be automatically detected]) 898 TOOLKIT="auto" 899 else 900 TOOLKIT="$withval" 901 902 dnl PORT must be one of the allowed values 903 if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ 904 "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ 905 "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \ 906 "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then 907 AC_MSG_ERROR([ 908 Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11) 909 ]) 910 fi 911 912 AC_MSG_RESULT([$TOOLKIT]) 913 fi 914 ]) 915 916 dnl ****** IMPORTANT ******* 917 dnl Unlike for the UNICODE setting, you can build your program in 918 dnl shared mode against a static build of wxWidgets. Thus we have the 919 dnl following option which allows these mixtures. E.g. 920 dnl 921 dnl ./configure --disable-shared --with-wxshared 922 dnl 923 dnl will build your library in static mode against the first available 924 dnl shared build of wxWidgets. 925 dnl 926 dnl Note that's not possible to do the viceversa: 927 dnl 928 dnl ./configure --enable-shared --without-wxshared 929 dnl 930 dnl Doing so you would try to build your library in shared mode against a static 931 dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) ! 932 dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES 933 dnl (where we know what 'auto' should be expanded to). 934 dnl 935 dnl If you try to build something in ANSI mode against a UNICODE build 936 dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets, 937 dnl then at best you'll get ton of linking errors ! 938 dnl ************************ 939 940 ifelse(index([$1], [wxshared]), [-1],, 941 [ 942 WX_ARG_WITH_YESNOAUTO( 943 [wxshared], [WX_SHARED], 944 [Force building against a shared build of wxWidgets, even if --disable-shared is given], 945 [auto], [], [1]) 946 ]) 947 948 dnl Just like for SHARED and WX_SHARED it may happen that some adventurous 949 dnl peoples will want to mix a wxWidgets release build with a debug build of 950 dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables. 951 ifelse(index([$1], [wxdebug]), [-1],, 952 [ 953 WX_ARG_WITH_YESNOAUTO( 954 [wxdebug], [WX_DEBUG], 955 [Force building against a debug build of wxWidgets, even if --disable-debug is given], 956 [auto], [], [1]) 957 ]) 958 959 dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option 960 dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values 961 ifelse(index([$1], [wxversion]), [-1],, 962 [ 963 AC_ARG_WITH([wxversion], 964 AC_HELP_STRING([--with-wxversion], 965 [Build against a specific version of wxWidgets (default is auto)]), 966 [], [withval="auto"]) 967 968 dnl Show a message to the user about this option 969 AC_MSG_CHECKING([for the --with-wxversion option]) 970 if test "$withval" = "auto" ; then 971 AC_MSG_RESULT([will be automatically detected]) 972 WX_RELEASE="auto" 973 else 974 975 wx_requested_major_version=`echo $withval | \ 976 sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'` 977 wx_requested_minor_version=`echo $withval | \ 978 sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'` 979 980 dnl both vars above must be exactly 1 digit 981 if test "${#wx_requested_major_version}" != "1" -o \ 982 "${#wx_requested_minor_version}" != "1" ; then 983 AC_MSG_ERROR([ 984 Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0) 985 ]) 986 fi 987 988 WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version" 989 AC_MSG_RESULT([$WX_RELEASE]) 990 fi 991 ]) 992 993 if test "$WX_DEBUG_CONFIGURE" = "1"; then 994 echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG" 995 echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE" 996 echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED" 997 echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT" 998 echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE" 999 fi 1000 ]) 1001 1002 1003dnl --------------------------------------------------------------------------- 1004dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS 1005dnl 1006dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values 1007dnl which are different from "auto". 1008dnl Thus this macro needs to be called only once all options have been set. 1009dnl --------------------------------------------------------------------------- 1010AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], 1011 [ 1012 if test "$WX_SHARED" = "1" ; then 1013 WXCONFIG_FLAGS="--static=no " 1014 elif test "$WX_SHARED" = "0" ; then 1015 WXCONFIG_FLAGS="--static=yes " 1016 fi 1017 1018 if test "$WX_DEBUG" = "1" ; then 1019 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes " 1020 elif test "$WX_DEBUG" = "0" ; then 1021 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no " 1022 fi 1023 1024 dnl The user should have set WX_UNICODE=UNICODE 1025 if test "$WX_UNICODE" = "1" ; then 1026 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes " 1027 elif test "$WX_UNICODE" = "0" ; then 1028 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " 1029 fi 1030 1031 if test "$TOOLKIT" != "auto" ; then 1032 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " 1033 fi 1034 1035 if test "$WX_RELEASE" != "auto" ; then 1036 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " 1037 fi 1038 1039 dnl strip out the last space of the string 1040 WXCONFIG_FLAGS=${WXCONFIG_FLAGS% } 1041 1042 if test "$WX_DEBUG_CONFIGURE" = "1"; then 1043 echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS" 1044 fi 1045 ]) 1046 1047 1048dnl --------------------------------------------------------------------------- 1049dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] 1050dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 1051dnl 1052dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets 1053dnl additional CPP flags and put the result of the search in WX_$RESULTVAR 1054dnl also adding the "yes" or "no" message result to MSG. 1055dnl --------------------------------------------------------------------------- 1056AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], 1057 [ 1058 if test "$$1" = "auto" ; then 1059 1060 dnl The user does not have particular preferences for this option; 1061 dnl so we will detect the wxWidgets relative build setting and use it 1062 AC_MSG_CHECKING([$3]) 1063 1064 dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 1065 dnl string or to 0 otherwise. 1066 dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it 1067 dnl doesn't work; we use 'expr STRING : REGEXP' instead 1068 WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") 1069 1070 if test "$WX_$1" != "0"; then 1071 WX_$1=1 1072 AC_MSG_RESULT([yes]) 1073 ifelse([$4], , :, [$4]) 1074 else 1075 WX_$1=0 1076 AC_MSG_RESULT([no]) 1077 ifelse([$5], , :, [$5]) 1078 fi 1079 else 1080 1081 dnl Use the setting given by the user 1082 WX_$1=$$1 1083 fi 1084 ]) 1085 1086dnl --------------------------------------------------------------------------- 1087dnl WX_DETECT_STANDARD_OPTION_VALUES 1088dnl 1089dnl Detects the values of the following variables: 1090dnl 1) WX_RELEASE 1091dnl 2) WX_UNICODE 1092dnl 3) WX_DEBUG 1093dnl 4) WX_SHARED (and also WX_STATIC) 1094dnl 5) WX_PORT 1095dnl from the previously selected wxWidgets build; this macro in fact must be 1096dnl called *after* calling the WX_CONFIG_CHECK macro. 1097dnl 1098dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set 1099dnl by WX_CONFIG_CHECK macro 1100dnl --------------------------------------------------------------------------- 1101AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], 1102 [ 1103 dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits, 1104 dnl while WX_RELEASE only the major.minor ones. 1105 WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR" 1106 if test $WX_RELEASE -lt 26 ; then 1107 1108 AC_MSG_ERROR([ 1109 Cannot detect the wxWidgets configuration for the selected wxWidgets build 1110 since its version is $WX_VERSION < 2.6.0; please install a newer 1111 version of wxWidgets. 1112 ]) 1113 fi 1114 1115 dnl The wx-config we are using understands the "--selected_config" 1116 dnl option which returns an easy-parseable string ! 1117 WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config) 1118 1119 if test "$WX_DEBUG_CONFIGURE" = "1"; then 1120 echo "[[dbg]] Using wx-config --selected-config" 1121 echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" 1122 fi 1123 1124 1125 dnl we could test directly for WX_SHARED with a line like: 1126 dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], 1127 dnl [if wxWidgets was built in SHARED mode]) 1128 dnl but wx-config --selected-config DOES NOT outputs the 'shared' 1129 dnl word when wx was built in shared mode; it rather outputs the 1130 dnl 'static' word when built in static mode. 1131 if test $WX_SHARED = "1"; then 1132 STATIC=0 1133 elif test $WX_SHARED = "0"; then 1134 STATIC=1 1135 elif test $WX_SHARED = "auto"; then 1136 STATIC="auto" 1137 fi 1138 1139 dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables 1140 _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode], 1141 [if wxWidgets was built with UNICODE enabled]) 1142 _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug], 1143 [if wxWidgets was built in DEBUG mode]) 1144 _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static], 1145 [if wxWidgets was built in STATIC mode]) 1146 1147 dnl init WX_SHARED from WX_STATIC 1148 if test "$WX_STATIC" != "0"; then 1149 WX_SHARED=0 1150 else 1151 WX_SHARED=1 1152 fi 1153 1154 AC_SUBST(WX_UNICODE) 1155 AC_SUBST(WX_DEBUG) 1156 AC_SUBST(WX_SHARED) 1157 1158 dnl detect the WX_PORT to use 1159 if test "$TOOLKIT" = "auto" ; then 1160 1161 dnl The user does not have particular preferences for this option; 1162 dnl so we will detect the wxWidgets relative build setting and use it 1163 AC_MSG_CHECKING([which wxWidgets toolkit was selected]) 1164 1165 WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") 1166 WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") 1167 WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") 1168 WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") 1169 WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") 1170 WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") 1171 WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") 1172 WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") 1173 1174 WX_PORT="unknown" 1175 if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi 1176 if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi 1177 if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi 1178 if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi 1179 if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi 1180 if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi 1181 if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi 1182 if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi 1183 1184 dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac 1185 dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) 1186 WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") 1187 if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi 1188 1189 dnl check at least one of the WX_*PORT has been set ! 1190 1191 if test "$WX_PORT" = "unknown" ; then 1192 AC_MSG_ERROR([ 1193 Cannot detect the currently installed wxWidgets port ! 1194 Please check your 'wx-config --cxxflags'... 1195 ]) 1196 fi 1197 1198 AC_MSG_RESULT([$WX_PORT]) 1199 else 1200 1201 dnl Use the setting given by the user 1202 if test -z "$TOOLKIT" ; then 1203 WX_PORT=$TOOLKIT 1204 else 1205 dnl try with PORT 1206 WX_PORT=$PORT 1207 fi 1208 fi 1209 1210 AC_SUBST(WX_PORT) 1211 1212 if test "$WX_DEBUG_CONFIGURE" = "1"; then 1213 echo "[[dbg]] Values of all WX_* options after final detection:" 1214 echo "[[dbg]] WX_DEBUG: $WX_DEBUG" 1215 echo "[[dbg]] WX_UNICODE: $WX_UNICODE" 1216 echo "[[dbg]] WX_SHARED: $WX_SHARED" 1217 echo "[[dbg]] WX_RELEASE: $WX_RELEASE" 1218 echo "[[dbg]] WX_PORT: $WX_PORT" 1219 fi 1220 1221 dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when 1222 dnl the user gives the options: 1223 dnl ./configure --enable-shared --without-wxshared 1224 dnl or just do 1225 dnl ./configure --enable-shared 1226 dnl but there is only a static build of wxWidgets available. 1227 if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then 1228 AC_MSG_ERROR([ 1229 Cannot build shared library against a static build of wxWidgets ! 1230 This error happens because the wxWidgets build which was selected 1231 has been detected as static while you asked to build $PACKAGE_NAME 1232 as shared library and this is not possible. 1233 Use the '--disable-shared' option to build $PACKAGE_NAME 1234 as static library or '--with-wxshared' to use wxWidgets as shared library. 1235 ]) 1236 fi 1237 1238 dnl now we can finally update the DEBUG,UNICODE,SHARED options 1239 dnl to their final values if they were set to 'auto' 1240 if test "$DEBUG" = "auto"; then 1241 DEBUG=$WX_DEBUG 1242 fi 1243 if test "$UNICODE" = "auto"; then 1244 UNICODE=$WX_UNICODE 1245 fi 1246 if test "$SHARED" = "auto"; then 1247 SHARED=$WX_SHARED 1248 fi 1249 if test "$TOOLKIT" = "auto"; then 1250 TOOLKIT=$WX_PORT 1251 fi 1252 1253 dnl in case the user needs a BUILD=debug/release var... 1254 if test "$DEBUG" = "1"; then 1255 BUILD="debug" 1256 elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then 1257 BUILD="release" 1258 fi 1259 1260 dnl respect the DEBUG variable adding the optimize/debug flags 1261 dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we 1262 dnl don't need to set them, too 1263 if test "$DEBUG" = "1"; then 1264 CXXFLAGS="$CXXFLAGS -g -O0" 1265 CFLAGS="$CFLAGS -g -O0" 1266 else 1267 CXXFLAGS="$CXXFLAGS -O2" 1268 CFLAGS="$CFLAGS -O2" 1269 fi 1270 ]) 1271 1272dnl --------------------------------------------------------------------------- 1273dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], 1274dnl [what to print when var is 1], 1275dnl [what to print when var is 0]) 1276dnl 1277dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0. 1278dnl This macro mainly exists just to make configure.ac scripts more readable. 1279dnl 1280dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments 1281dnl if you want that m4 avoid to throw away the spaces prefixed to the 1282dnl argument value. 1283dnl --------------------------------------------------------------------------- 1284AC_DEFUN([WX_BOOLOPT_SUMMARY], 1285 [ 1286 if test "x$$1" = "x1" ; then 1287 echo $2 1288 elif test "x$$1" = "x0" ; then 1289 echo $3 1290 else 1291 echo "$1 is $$1" 1292 fi 1293 ]) 1294 1295dnl --------------------------------------------------------------------------- 1296dnl WX_STANDARD_OPTIONS_SUMMARY_MSG 1297dnl 1298dnl Shows a summary message to the user about the WX_* variable contents. 1299dnl This macro is used typically at the end of the configure script. 1300dnl --------------------------------------------------------------------------- 1301AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], 1302 [ 1303 echo 1304 echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION" 1305 echo " has the following settings:" 1306 WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"]) 1307 WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) 1308 WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"]) 1309 echo " - VERSION: $WX_VERSION" 1310 echo " - PORT: $WX_PORT" 1311 ]) 1312 1313 1314dnl --------------------------------------------------------------------------- 1315dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END 1316dnl 1317dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info 1318dnl about the configuration of the package which used the wxpresets. 1319dnl 1320dnl Typical usage: 1321dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN 1322dnl echo " - Package setting 1: $SETTING1" 1323dnl echo " - Package setting 2: $SETTING1" 1324dnl ... 1325dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END 1326dnl 1327dnl --------------------------------------------------------------------------- 1328AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN], 1329 [ 1330 echo 1331 echo " ----------------------------------------------------------------" 1332 echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed." 1333 echo " Summary of main configuration settings for $PACKAGE_NAME:" 1334 WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"]) 1335 WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) 1336 WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"]) 1337 ]) 1338 1339AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END], 1340 [ 1341 WX_STANDARD_OPTIONS_SUMMARY_MSG 1342 echo 1343 echo " Now, just run make." 1344 echo " ----------------------------------------------------------------" 1345 echo 1346 ]) 1347 1348 1349dnl --------------------------------------------------------------------------- 1350dnl Deprecated macro wrappers 1351dnl --------------------------------------------------------------------------- 1352 1353AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) 1354AC_DEFUN([AM_PATH_WXCONFIG], [ 1355 WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) 1356]) 1357AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) 1358 1359# Copyright (C) 2002-2020 Free Software Foundation, Inc. 1360# 1361# This file is free software; the Free Software Foundation 1362# gives unlimited permission to copy and/or distribute it, 1363# with or without modifications, as long as this notice is preserved. 1364 1365# AM_AUTOMAKE_VERSION(VERSION) 1366# ---------------------------- 1367# Automake X.Y traces this macro to ensure aclocal.m4 has been 1368# generated from the m4 files accompanying Automake X.Y. 1369# (This private macro should not be called outside this file.) 1370AC_DEFUN([AM_AUTOMAKE_VERSION], 1371[am__api_version='1.16' 1372dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1373dnl require some minimum version. Point them to the right macro. 1374m4_if([$1], [1.16.2], [], 1375 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1376]) 1377 1378# _AM_AUTOCONF_VERSION(VERSION) 1379# ----------------------------- 1380# aclocal traces this macro to find the Autoconf version. 1381# This is a private macro too. Using m4_define simplifies 1382# the logic in aclocal, which can simply ignore this definition. 1383m4_define([_AM_AUTOCONF_VERSION], []) 1384 1385# AM_SET_CURRENT_AUTOMAKE_VERSION 1386# ------------------------------- 1387# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1388# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1389AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1390[AM_AUTOMAKE_VERSION([1.16.2])dnl 1391m4_ifndef([AC_AUTOCONF_VERSION], 1392 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1393_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1394 1395# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1396 1397# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1398# 1399# This file is free software; the Free Software Foundation 1400# gives unlimited permission to copy and/or distribute it, 1401# with or without modifications, as long as this notice is preserved. 1402 1403# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1404# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1405# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1406# 1407# Of course, Automake must honor this variable whenever it calls a 1408# tool from the auxiliary directory. The problem is that $srcdir (and 1409# therefore $ac_aux_dir as well) can be either absolute or relative, 1410# depending on how configure is run. This is pretty annoying, since 1411# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1412# source directory, any form will work fine, but in subdirectories a 1413# relative path needs to be adjusted first. 1414# 1415# $ac_aux_dir/missing 1416# fails when called from a subdirectory if $ac_aux_dir is relative 1417# $top_srcdir/$ac_aux_dir/missing 1418# fails if $ac_aux_dir is absolute, 1419# fails when called from a subdirectory in a VPATH build with 1420# a relative $ac_aux_dir 1421# 1422# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1423# are both prefixed by $srcdir. In an in-source build this is usually 1424# harmless because $srcdir is '.', but things will broke when you 1425# start a VPATH build or use an absolute $srcdir. 1426# 1427# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1428# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1429# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1430# and then we would define $MISSING as 1431# MISSING="\${SHELL} $am_aux_dir/missing" 1432# This will work as long as MISSING is not called from configure, because 1433# unfortunately $(top_srcdir) has no meaning in configure. 1434# However there are other variables, like CC, which are often used in 1435# configure, and could therefore not use this "fixed" $ac_aux_dir. 1436# 1437# Another solution, used here, is to always expand $ac_aux_dir to an 1438# absolute PATH. The drawback is that using absolute paths prevent a 1439# configured tree to be moved without reconfiguration. 1440 1441AC_DEFUN([AM_AUX_DIR_EXPAND], 1442[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1443# Expand $ac_aux_dir to an absolute path. 1444am_aux_dir=`cd "$ac_aux_dir" && pwd` 1445]) 1446 1447# AM_CONDITIONAL -*- Autoconf -*- 1448 1449# Copyright (C) 1997-2020 Free Software Foundation, Inc. 1450# 1451# This file is free software; the Free Software Foundation 1452# gives unlimited permission to copy and/or distribute it, 1453# with or without modifications, as long as this notice is preserved. 1454 1455# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1456# ------------------------------------- 1457# Define a conditional. 1458AC_DEFUN([AM_CONDITIONAL], 1459[AC_PREREQ([2.52])dnl 1460 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1461 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1462AC_SUBST([$1_TRUE])dnl 1463AC_SUBST([$1_FALSE])dnl 1464_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1465_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1466m4_define([_AM_COND_VALUE_$1], [$2])dnl 1467if $2; then 1468 $1_TRUE= 1469 $1_FALSE='#' 1470else 1471 $1_TRUE='#' 1472 $1_FALSE= 1473fi 1474AC_CONFIG_COMMANDS_PRE( 1475[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1476 AC_MSG_ERROR([[conditional "$1" was never defined. 1477Usually this means the macro was only invoked conditionally.]]) 1478fi])]) 1479 1480# Copyright (C) 1999-2020 Free Software Foundation, Inc. 1481# 1482# This file is free software; the Free Software Foundation 1483# gives unlimited permission to copy and/or distribute it, 1484# with or without modifications, as long as this notice is preserved. 1485 1486 1487# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1488# written in clear, in which case automake, when reading aclocal.m4, 1489# will think it sees a *use*, and therefore will trigger all it's 1490# C support machinery. Also note that it means that autoscan, seeing 1491# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1492 1493 1494# _AM_DEPENDENCIES(NAME) 1495# ---------------------- 1496# See how the compiler implements dependency checking. 1497# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1498# We try a few techniques and use that to set a single cache variable. 1499# 1500# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1501# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1502# dependency, and given that the user is not expected to run this macro, 1503# just rely on AC_PROG_CC. 1504AC_DEFUN([_AM_DEPENDENCIES], 1505[AC_REQUIRE([AM_SET_DEPDIR])dnl 1506AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1507AC_REQUIRE([AM_MAKE_INCLUDE])dnl 1508AC_REQUIRE([AM_DEP_TRACK])dnl 1509 1510m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1511 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1512 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1513 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1514 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1515 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1516 [depcc="$$1" am_compiler_list=]) 1517 1518AC_CACHE_CHECK([dependency style of $depcc], 1519 [am_cv_$1_dependencies_compiler_type], 1520[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1521 # We make a subdir and do the tests there. Otherwise we can end up 1522 # making bogus files that we don't know about and never remove. For 1523 # instance it was reported that on HP-UX the gcc test will end up 1524 # making a dummy file named 'D' -- because '-MD' means "put the output 1525 # in D". 1526 rm -rf conftest.dir 1527 mkdir conftest.dir 1528 # Copy depcomp to subdir because otherwise we won't find it if we're 1529 # using a relative directory. 1530 cp "$am_depcomp" conftest.dir 1531 cd conftest.dir 1532 # We will build objects and dependencies in a subdirectory because 1533 # it helps to detect inapplicable dependency modes. For instance 1534 # both Tru64's cc and ICC support -MD to output dependencies as a 1535 # side effect of compilation, but ICC will put the dependencies in 1536 # the current directory while Tru64 will put them in the object 1537 # directory. 1538 mkdir sub 1539 1540 am_cv_$1_dependencies_compiler_type=none 1541 if test "$am_compiler_list" = ""; then 1542 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1543 fi 1544 am__universal=false 1545 m4_case([$1], [CC], 1546 [case " $depcc " in #( 1547 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1548 esac], 1549 [CXX], 1550 [case " $depcc " in #( 1551 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1552 esac]) 1553 1554 for depmode in $am_compiler_list; do 1555 # Setup a source with many dependencies, because some compilers 1556 # like to wrap large dependency lists on column 80 (with \), and 1557 # we should not choose a depcomp mode which is confused by this. 1558 # 1559 # We need to recreate these files for each test, as the compiler may 1560 # overwrite some of them when testing with obscure command lines. 1561 # This happens at least with the AIX C compiler. 1562 : > sub/conftest.c 1563 for i in 1 2 3 4 5 6; do 1564 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1565 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1566 # Solaris 10 /bin/sh. 1567 echo '/* dummy */' > sub/conftst$i.h 1568 done 1569 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1570 1571 # We check with '-c' and '-o' for the sake of the "dashmstdout" 1572 # mode. It turns out that the SunPro C++ compiler does not properly 1573 # handle '-M -o', and we need to detect this. Also, some Intel 1574 # versions had trouble with output in subdirs. 1575 am__obj=sub/conftest.${OBJEXT-o} 1576 am__minus_obj="-o $am__obj" 1577 case $depmode in 1578 gcc) 1579 # This depmode causes a compiler race in universal mode. 1580 test "$am__universal" = false || continue 1581 ;; 1582 nosideeffect) 1583 # After this tag, mechanisms are not by side-effect, so they'll 1584 # only be used when explicitly requested. 1585 if test "x$enable_dependency_tracking" = xyes; then 1586 continue 1587 else 1588 break 1589 fi 1590 ;; 1591 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1592 # This compiler won't grok '-c -o', but also, the minuso test has 1593 # not run yet. These depmodes are late enough in the game, and 1594 # so weak that their functioning should not be impacted. 1595 am__obj=conftest.${OBJEXT-o} 1596 am__minus_obj= 1597 ;; 1598 none) break ;; 1599 esac 1600 if depmode=$depmode \ 1601 source=sub/conftest.c object=$am__obj \ 1602 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1603 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1604 >/dev/null 2>conftest.err && 1605 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1606 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1607 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1608 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1609 # icc doesn't choke on unknown options, it will just issue warnings 1610 # or remarks (even with -Werror). So we grep stderr for any message 1611 # that says an option was ignored or not supported. 1612 # When given -MP, icc 7.0 and 7.1 complain thusly: 1613 # icc: Command line warning: ignoring option '-M'; no argument required 1614 # The diagnosis changed in icc 8.0: 1615 # icc: Command line remark: option '-MP' not supported 1616 if (grep 'ignoring option' conftest.err || 1617 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1618 am_cv_$1_dependencies_compiler_type=$depmode 1619 break 1620 fi 1621 fi 1622 done 1623 1624 cd .. 1625 rm -rf conftest.dir 1626else 1627 am_cv_$1_dependencies_compiler_type=none 1628fi 1629]) 1630AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1631AM_CONDITIONAL([am__fastdep$1], [ 1632 test "x$enable_dependency_tracking" != xno \ 1633 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1634]) 1635 1636 1637# AM_SET_DEPDIR 1638# ------------- 1639# Choose a directory name for dependency files. 1640# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1641AC_DEFUN([AM_SET_DEPDIR], 1642[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1643AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1644]) 1645 1646 1647# AM_DEP_TRACK 1648# ------------ 1649AC_DEFUN([AM_DEP_TRACK], 1650[AC_ARG_ENABLE([dependency-tracking], [dnl 1651AS_HELP_STRING( 1652 [--enable-dependency-tracking], 1653 [do not reject slow dependency extractors]) 1654AS_HELP_STRING( 1655 [--disable-dependency-tracking], 1656 [speeds up one-time build])]) 1657if test "x$enable_dependency_tracking" != xno; then 1658 am_depcomp="$ac_aux_dir/depcomp" 1659 AMDEPBACKSLASH='\' 1660 am__nodep='_no' 1661fi 1662AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1663AC_SUBST([AMDEPBACKSLASH])dnl 1664_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1665AC_SUBST([am__nodep])dnl 1666_AM_SUBST_NOTMAKE([am__nodep])dnl 1667]) 1668 1669# Generate code to set up dependency tracking. -*- Autoconf -*- 1670 1671# Copyright (C) 1999-2020 Free Software Foundation, Inc. 1672# 1673# This file is free software; the Free Software Foundation 1674# gives unlimited permission to copy and/or distribute it, 1675# with or without modifications, as long as this notice is preserved. 1676 1677# _AM_OUTPUT_DEPENDENCY_COMMANDS 1678# ------------------------------ 1679AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1680[{ 1681 # Older Autoconf quotes --file arguments for eval, but not when files 1682 # are listed without --file. Let's play safe and only enable the eval 1683 # if we detect the quoting. 1684 # TODO: see whether this extra hack can be removed once we start 1685 # requiring Autoconf 2.70 or later. 1686 AS_CASE([$CONFIG_FILES], 1687 [*\'*], [eval set x "$CONFIG_FILES"], 1688 [*], [set x $CONFIG_FILES]) 1689 shift 1690 # Used to flag and report bootstrapping failures. 1691 am_rc=0 1692 for am_mf 1693 do 1694 # Strip MF so we end up with the name of the file. 1695 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 1696 # Check whether this is an Automake generated Makefile which includes 1697 # dependency-tracking related rules and includes. 1698 # Grep'ing the whole file directly is not great: AIX grep has a line 1699 # limit of 2048, but all sed's we know have understand at least 4000. 1700 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 1701 || continue 1702 am_dirpart=`AS_DIRNAME(["$am_mf"])` 1703 am_filepart=`AS_BASENAME(["$am_mf"])` 1704 AM_RUN_LOG([cd "$am_dirpart" \ 1705 && sed -e '/# am--include-marker/d' "$am_filepart" \ 1706 | $MAKE -f - am--depfiles]) || am_rc=$? 1707 done 1708 if test $am_rc -ne 0; then 1709 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 1710 for automatic dependency tracking. If GNU make was not used, consider 1711 re-running the configure script with MAKE="gmake" (or whatever is 1712 necessary). You can also try re-running configure with the 1713 '--disable-dependency-tracking' option to at least be able to build 1714 the package (albeit without support for automatic dependency tracking).]) 1715 fi 1716 AS_UNSET([am_dirpart]) 1717 AS_UNSET([am_filepart]) 1718 AS_UNSET([am_mf]) 1719 AS_UNSET([am_rc]) 1720 rm -f conftest-deps.mk 1721} 1722])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1723 1724 1725# AM_OUTPUT_DEPENDENCY_COMMANDS 1726# ----------------------------- 1727# This macro should only be invoked once -- use via AC_REQUIRE. 1728# 1729# This code is only required when automatic dependency tracking is enabled. 1730# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 1731# order to bootstrap the dependency handling code. 1732AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1733[AC_CONFIG_COMMANDS([depfiles], 1734 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1735 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 1736 1737# Do all the work for Automake. -*- Autoconf -*- 1738 1739# Copyright (C) 1996-2020 Free Software Foundation, Inc. 1740# 1741# This file is free software; the Free Software Foundation 1742# gives unlimited permission to copy and/or distribute it, 1743# with or without modifications, as long as this notice is preserved. 1744 1745# This macro actually does too much. Some checks are only needed if 1746# your package does certain things. But this isn't really a big deal. 1747 1748dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1749m4_define([AC_PROG_CC], 1750m4_defn([AC_PROG_CC]) 1751[_AM_PROG_CC_C_O 1752]) 1753 1754# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1755# AM_INIT_AUTOMAKE([OPTIONS]) 1756# ----------------------------------------------- 1757# The call with PACKAGE and VERSION arguments is the old style 1758# call (pre autoconf-2.50), which is being phased out. PACKAGE 1759# and VERSION should now be passed to AC_INIT and removed from 1760# the call to AM_INIT_AUTOMAKE. 1761# We support both call styles for the transition. After 1762# the next Automake release, Autoconf can make the AC_INIT 1763# arguments mandatory, and then we can depend on a new Autoconf 1764# release and drop the old call support. 1765AC_DEFUN([AM_INIT_AUTOMAKE], 1766[AC_PREREQ([2.65])dnl 1767dnl Autoconf wants to disallow AM_ names. We explicitly allow 1768dnl the ones we care about. 1769m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1770AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1771AC_REQUIRE([AC_PROG_INSTALL])dnl 1772if test "`cd $srcdir && pwd`" != "`pwd`"; then 1773 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1774 # is not polluted with repeated "-I." 1775 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1776 # test to see if srcdir already configured 1777 if test -f $srcdir/config.status; then 1778 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1779 fi 1780fi 1781 1782# test whether we have cygpath 1783if test -z "$CYGPATH_W"; then 1784 if (cygpath --version) >/dev/null 2>/dev/null; then 1785 CYGPATH_W='cygpath -w' 1786 else 1787 CYGPATH_W=echo 1788 fi 1789fi 1790AC_SUBST([CYGPATH_W]) 1791 1792# Define the identity of the package. 1793dnl Distinguish between old-style and new-style calls. 1794m4_ifval([$2], 1795[AC_DIAGNOSE([obsolete], 1796 [$0: two- and three-arguments forms are deprecated.]) 1797m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1798 AC_SUBST([PACKAGE], [$1])dnl 1799 AC_SUBST([VERSION], [$2])], 1800[_AM_SET_OPTIONS([$1])dnl 1801dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1802m4_if( 1803 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1804 [ok:ok],, 1805 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1806 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1807 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1808 1809_AM_IF_OPTION([no-define],, 1810[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1811 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1812 1813# Some tools Automake needs. 1814AC_REQUIRE([AM_SANITY_CHECK])dnl 1815AC_REQUIRE([AC_ARG_PROGRAM])dnl 1816AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1817AM_MISSING_PROG([AUTOCONF], [autoconf]) 1818AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1819AM_MISSING_PROG([AUTOHEADER], [autoheader]) 1820AM_MISSING_PROG([MAKEINFO], [makeinfo]) 1821AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1822AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1823AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1824# For better backward compatibility. To be removed once Automake 1.9.x 1825# dies out for good. For more background, see: 1826# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1827# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1828AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1829# We need awk for the "check" target (and possibly the TAP driver). The 1830# system "awk" is bad on some platforms. 1831AC_REQUIRE([AC_PROG_AWK])dnl 1832AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1833AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1834_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1835 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1836 [_AM_PROG_TAR([v7])])]) 1837_AM_IF_OPTION([no-dependencies],, 1838[AC_PROVIDE_IFELSE([AC_PROG_CC], 1839 [_AM_DEPENDENCIES([CC])], 1840 [m4_define([AC_PROG_CC], 1841 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1842AC_PROVIDE_IFELSE([AC_PROG_CXX], 1843 [_AM_DEPENDENCIES([CXX])], 1844 [m4_define([AC_PROG_CXX], 1845 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1846AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1847 [_AM_DEPENDENCIES([OBJC])], 1848 [m4_define([AC_PROG_OBJC], 1849 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1850AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1851 [_AM_DEPENDENCIES([OBJCXX])], 1852 [m4_define([AC_PROG_OBJCXX], 1853 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1854]) 1855AC_REQUIRE([AM_SILENT_RULES])dnl 1856dnl The testsuite driver may need to know about EXEEXT, so add the 1857dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1858dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1859AC_CONFIG_COMMANDS_PRE(dnl 1860[m4_provide_if([_AM_COMPILER_EXEEXT], 1861 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1862 1863# POSIX will say in a future version that running "rm -f" with no argument 1864# is OK; and we want to be able to make that assumption in our Makefile 1865# recipes. So use an aggressive probe to check that the usage we want is 1866# actually supported "in the wild" to an acceptable degree. 1867# See automake bug#10828. 1868# To make any issue more visible, cause the running configure to be aborted 1869# by default if the 'rm' program in use doesn't match our expectations; the 1870# user can still override this though. 1871if rm -f && rm -fr && rm -rf; then : OK; else 1872 cat >&2 <<'END' 1873Oops! 1874 1875Your 'rm' program seems unable to run without file operands specified 1876on the command line, even when the '-f' option is present. This is contrary 1877to the behaviour of most rm programs out there, and not conforming with 1878the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1879 1880Please tell bug-automake@gnu.org about your system, including the value 1881of your $PATH and any error possibly output before this message. This 1882can help us improve future automake versions. 1883 1884END 1885 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1886 echo 'Configuration will proceed anyway, since you have set the' >&2 1887 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1888 echo >&2 1889 else 1890 cat >&2 <<'END' 1891Aborting the configuration process, to ensure you take notice of the issue. 1892 1893You can download and install GNU coreutils to get an 'rm' implementation 1894that behaves properly: <https://www.gnu.org/software/coreutils/>. 1895 1896If you want to complete the configuration process using your problematic 1897'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1898to "yes", and re-run configure. 1899 1900END 1901 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1902 fi 1903fi 1904dnl The trailing newline in this macro's definition is deliberate, for 1905dnl backward compatibility and to allow trailing 'dnl'-style comments 1906dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1907]) 1908 1909dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1910dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1911dnl mangled by Autoconf and run in a shell conditional statement. 1912m4_define([_AC_COMPILER_EXEEXT], 1913m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1914 1915# When config.status generates a header, we must update the stamp-h file. 1916# This file resides in the same directory as the config header 1917# that is generated. The stamp files are numbered to have different names. 1918 1919# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1920# loop where config.status creates the headers, so we can generate 1921# our stamp files there. 1922AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1923[# Compute $1's index in $config_headers. 1924_am_arg=$1 1925_am_stamp_count=1 1926for _am_header in $config_headers :; do 1927 case $_am_header in 1928 $_am_arg | $_am_arg:* ) 1929 break ;; 1930 * ) 1931 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1932 esac 1933done 1934echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1935 1936# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1937# 1938# This file is free software; the Free Software Foundation 1939# gives unlimited permission to copy and/or distribute it, 1940# with or without modifications, as long as this notice is preserved. 1941 1942# AM_PROG_INSTALL_SH 1943# ------------------ 1944# Define $install_sh. 1945AC_DEFUN([AM_PROG_INSTALL_SH], 1946[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1947if test x"${install_sh+set}" != xset; then 1948 case $am_aux_dir in 1949 *\ * | *\ *) 1950 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1951 *) 1952 install_sh="\${SHELL} $am_aux_dir/install-sh" 1953 esac 1954fi 1955AC_SUBST([install_sh])]) 1956 1957# Copyright (C) 2003-2020 Free Software Foundation, Inc. 1958# 1959# This file is free software; the Free Software Foundation 1960# gives unlimited permission to copy and/or distribute it, 1961# with or without modifications, as long as this notice is preserved. 1962 1963# Check whether the underlying file-system supports filenames 1964# with a leading dot. For instance MS-DOS doesn't. 1965AC_DEFUN([AM_SET_LEADING_DOT], 1966[rm -rf .tst 2>/dev/null 1967mkdir .tst 2>/dev/null 1968if test -d .tst; then 1969 am__leading_dot=. 1970else 1971 am__leading_dot=_ 1972fi 1973rmdir .tst 2>/dev/null 1974AC_SUBST([am__leading_dot])]) 1975 1976# Check to see how 'make' treats includes. -*- Autoconf -*- 1977 1978# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1979# 1980# This file is free software; the Free Software Foundation 1981# gives unlimited permission to copy and/or distribute it, 1982# with or without modifications, as long as this notice is preserved. 1983 1984# AM_MAKE_INCLUDE() 1985# ----------------- 1986# Check whether make has an 'include' directive that can support all 1987# the idioms we need for our automatic dependency tracking code. 1988AC_DEFUN([AM_MAKE_INCLUDE], 1989[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 1990cat > confinc.mk << 'END' 1991am__doit: 1992 @echo this is the am__doit target >confinc.out 1993.PHONY: am__doit 1994END 1995am__include="#" 1996am__quote= 1997# BSD make does it like this. 1998echo '.include "confinc.mk" # ignored' > confmf.BSD 1999# Other make implementations (GNU, Solaris 10, AIX) do it like this. 2000echo 'include confinc.mk # ignored' > confmf.GNU 2001_am_result=no 2002for s in GNU BSD; do 2003 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 2004 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 2005 ['0:this is the am__doit target'], 2006 [AS_CASE([$s], 2007 [BSD], [am__include='.include' am__quote='"'], 2008 [am__include='include' am__quote=''])]) 2009 if test "$am__include" != "#"; then 2010 _am_result="yes ($s style)" 2011 break 2012 fi 2013done 2014rm -f confinc.* confmf.* 2015AC_MSG_RESULT([${_am_result}]) 2016AC_SUBST([am__include])]) 2017AC_SUBST([am__quote])]) 2018 2019# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 2020 2021# Copyright (C) 1997-2020 Free Software Foundation, Inc. 2022# 2023# This file is free software; the Free Software Foundation 2024# gives unlimited permission to copy and/or distribute it, 2025# with or without modifications, as long as this notice is preserved. 2026 2027# AM_MISSING_PROG(NAME, PROGRAM) 2028# ------------------------------ 2029AC_DEFUN([AM_MISSING_PROG], 2030[AC_REQUIRE([AM_MISSING_HAS_RUN]) 2031$1=${$1-"${am_missing_run}$2"} 2032AC_SUBST($1)]) 2033 2034# AM_MISSING_HAS_RUN 2035# ------------------ 2036# Define MISSING if not defined so far and test if it is modern enough. 2037# If it is, set am_missing_run to use it, otherwise, to nothing. 2038AC_DEFUN([AM_MISSING_HAS_RUN], 2039[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2040AC_REQUIRE_AUX_FILE([missing])dnl 2041if test x"${MISSING+set}" != xset; then 2042 case $am_aux_dir in 2043 *\ * | *\ *) 2044 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 2045 *) 2046 MISSING="\${SHELL} $am_aux_dir/missing" ;; 2047 esac 2048fi 2049# Use eval to expand $SHELL 2050if eval "$MISSING --is-lightweight"; then 2051 am_missing_run="$MISSING " 2052else 2053 am_missing_run= 2054 AC_MSG_WARN(['missing' script is too old or missing]) 2055fi 2056]) 2057 2058# Helper functions for option handling. -*- Autoconf -*- 2059 2060# Copyright (C) 2001-2020 Free Software Foundation, Inc. 2061# 2062# This file is free software; the Free Software Foundation 2063# gives unlimited permission to copy and/or distribute it, 2064# with or without modifications, as long as this notice is preserved. 2065 2066# _AM_MANGLE_OPTION(NAME) 2067# ----------------------- 2068AC_DEFUN([_AM_MANGLE_OPTION], 2069[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 2070 2071# _AM_SET_OPTION(NAME) 2072# -------------------- 2073# Set option NAME. Presently that only means defining a flag for this option. 2074AC_DEFUN([_AM_SET_OPTION], 2075[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 2076 2077# _AM_SET_OPTIONS(OPTIONS) 2078# ------------------------ 2079# OPTIONS is a space-separated list of Automake options. 2080AC_DEFUN([_AM_SET_OPTIONS], 2081[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2082 2083# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2084# ------------------------------------------- 2085# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2086AC_DEFUN([_AM_IF_OPTION], 2087[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2088 2089# Copyright (C) 1999-2020 Free Software Foundation, Inc. 2090# 2091# This file is free software; the Free Software Foundation 2092# gives unlimited permission to copy and/or distribute it, 2093# with or without modifications, as long as this notice is preserved. 2094 2095# _AM_PROG_CC_C_O 2096# --------------- 2097# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 2098# to automatically call this. 2099AC_DEFUN([_AM_PROG_CC_C_O], 2100[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2101AC_REQUIRE_AUX_FILE([compile])dnl 2102AC_LANG_PUSH([C])dnl 2103AC_CACHE_CHECK( 2104 [whether $CC understands -c and -o together], 2105 [am_cv_prog_cc_c_o], 2106 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 2107 # Make sure it works both with $CC and with simple cc. 2108 # Following AC_PROG_CC_C_O, we do the test twice because some 2109 # compilers refuse to overwrite an existing .o file with -o, 2110 # though they will create one. 2111 am_cv_prog_cc_c_o=yes 2112 for am_i in 1 2; do 2113 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 2114 && test -f conftest2.$ac_objext; then 2115 : OK 2116 else 2117 am_cv_prog_cc_c_o=no 2118 break 2119 fi 2120 done 2121 rm -f core conftest* 2122 unset am_i]) 2123if test "$am_cv_prog_cc_c_o" != yes; then 2124 # Losing compiler, so override with the script. 2125 # FIXME: It is wrong to rewrite CC. 2126 # But if we don't then we get into trouble of one sort or another. 2127 # A longer-term fix would be to have automake use am__CC in this case, 2128 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 2129 CC="$am_aux_dir/compile $CC" 2130fi 2131AC_LANG_POP([C])]) 2132 2133# For backward compatibility. 2134AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 2135 2136# Copyright (C) 2001-2020 Free Software Foundation, Inc. 2137# 2138# This file is free software; the Free Software Foundation 2139# gives unlimited permission to copy and/or distribute it, 2140# with or without modifications, as long as this notice is preserved. 2141 2142# AM_RUN_LOG(COMMAND) 2143# ------------------- 2144# Run COMMAND, save the exit status in ac_status, and log it. 2145# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 2146AC_DEFUN([AM_RUN_LOG], 2147[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 2148 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 2149 ac_status=$? 2150 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2151 (exit $ac_status); }]) 2152 2153# Check to make sure that the build environment is sane. -*- Autoconf -*- 2154 2155# Copyright (C) 1996-2020 Free Software Foundation, Inc. 2156# 2157# This file is free software; the Free Software Foundation 2158# gives unlimited permission to copy and/or distribute it, 2159# with or without modifications, as long as this notice is preserved. 2160 2161# AM_SANITY_CHECK 2162# --------------- 2163AC_DEFUN([AM_SANITY_CHECK], 2164[AC_MSG_CHECKING([whether build environment is sane]) 2165# Reject unsafe characters in $srcdir or the absolute working directory 2166# name. Accept space and tab only in the latter. 2167am_lf=' 2168' 2169case `pwd` in 2170 *[[\\\"\#\$\&\'\`$am_lf]]*) 2171 AC_MSG_ERROR([unsafe absolute working directory name]);; 2172esac 2173case $srcdir in 2174 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 2175 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 2176esac 2177 2178# Do 'set' in a subshell so we don't clobber the current shell's 2179# arguments. Must try -L first in case configure is actually a 2180# symlink; some systems play weird games with the mod time of symlinks 2181# (eg FreeBSD returns the mod time of the symlink's containing 2182# directory). 2183if ( 2184 am_has_slept=no 2185 for am_try in 1 2; do 2186 echo "timestamp, slept: $am_has_slept" > conftest.file 2187 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 2188 if test "$[*]" = "X"; then 2189 # -L didn't work. 2190 set X `ls -t "$srcdir/configure" conftest.file` 2191 fi 2192 if test "$[*]" != "X $srcdir/configure conftest.file" \ 2193 && test "$[*]" != "X conftest.file $srcdir/configure"; then 2194 2195 # If neither matched, then we have a broken ls. This can happen 2196 # if, for instance, CONFIG_SHELL is bash and it inherits a 2197 # broken ls alias from the environment. This has actually 2198 # happened. Such a system could not be considered "sane". 2199 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2200 alias in your environment]) 2201 fi 2202 if test "$[2]" = conftest.file || test $am_try -eq 2; then 2203 break 2204 fi 2205 # Just in case. 2206 sleep 1 2207 am_has_slept=yes 2208 done 2209 test "$[2]" = conftest.file 2210 ) 2211then 2212 # Ok. 2213 : 2214else 2215 AC_MSG_ERROR([newly created file is older than distributed files! 2216Check your system clock]) 2217fi 2218AC_MSG_RESULT([yes]) 2219# If we didn't sleep, we still need to ensure time stamps of config.status and 2220# generated files are strictly newer. 2221am_sleep_pid= 2222if grep 'slept: no' conftest.file >/dev/null 2>&1; then 2223 ( sleep 1 ) & 2224 am_sleep_pid=$! 2225fi 2226AC_CONFIG_COMMANDS_PRE( 2227 [AC_MSG_CHECKING([that generated files are newer than configure]) 2228 if test -n "$am_sleep_pid"; then 2229 # Hide warnings about reused PIDs. 2230 wait $am_sleep_pid 2>/dev/null 2231 fi 2232 AC_MSG_RESULT([done])]) 2233rm -f conftest.file 2234]) 2235 2236# Copyright (C) 2009-2020 Free Software Foundation, Inc. 2237# 2238# This file is free software; the Free Software Foundation 2239# gives unlimited permission to copy and/or distribute it, 2240# with or without modifications, as long as this notice is preserved. 2241 2242# AM_SILENT_RULES([DEFAULT]) 2243# -------------------------- 2244# Enable less verbose build rules; with the default set to DEFAULT 2245# ("yes" being less verbose, "no" or empty being verbose). 2246AC_DEFUN([AM_SILENT_RULES], 2247[AC_ARG_ENABLE([silent-rules], [dnl 2248AS_HELP_STRING( 2249 [--enable-silent-rules], 2250 [less verbose build output (undo: "make V=1")]) 2251AS_HELP_STRING( 2252 [--disable-silent-rules], 2253 [verbose build output (undo: "make V=0")])dnl 2254]) 2255case $enable_silent_rules in @%:@ ((( 2256 yes) AM_DEFAULT_VERBOSITY=0;; 2257 no) AM_DEFAULT_VERBOSITY=1;; 2258 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 2259esac 2260dnl 2261dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 2262dnl do not support nested variable expansions. 2263dnl See automake bug#9928 and bug#10237. 2264am_make=${MAKE-make} 2265AC_CACHE_CHECK([whether $am_make supports nested variables], 2266 [am_cv_make_support_nested_variables], 2267 [if AS_ECHO([['TRUE=$(BAR$(V)) 2268BAR0=false 2269BAR1=true 2270V=1 2271am__doit: 2272 @$(TRUE) 2273.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 2274 am_cv_make_support_nested_variables=yes 2275else 2276 am_cv_make_support_nested_variables=no 2277fi]) 2278if test $am_cv_make_support_nested_variables = yes; then 2279 dnl Using '$V' instead of '$(V)' breaks IRIX make. 2280 AM_V='$(V)' 2281 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 2282else 2283 AM_V=$AM_DEFAULT_VERBOSITY 2284 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 2285fi 2286AC_SUBST([AM_V])dnl 2287AM_SUBST_NOTMAKE([AM_V])dnl 2288AC_SUBST([AM_DEFAULT_V])dnl 2289AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 2290AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 2291AM_BACKSLASH='\' 2292AC_SUBST([AM_BACKSLASH])dnl 2293_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 2294]) 2295 2296# Copyright (C) 2001-2020 Free Software Foundation, Inc. 2297# 2298# This file is free software; the Free Software Foundation 2299# gives unlimited permission to copy and/or distribute it, 2300# with or without modifications, as long as this notice is preserved. 2301 2302# AM_PROG_INSTALL_STRIP 2303# --------------------- 2304# One issue with vendor 'install' (even GNU) is that you can't 2305# specify the program used to strip binaries. This is especially 2306# annoying in cross-compiling environments, where the build's strip 2307# is unlikely to handle the host's binaries. 2308# Fortunately install-sh will honor a STRIPPROG variable, so we 2309# always use install-sh in "make install-strip", and initialize 2310# STRIPPROG with the value of the STRIP variable (set by the user). 2311AC_DEFUN([AM_PROG_INSTALL_STRIP], 2312[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 2313# Installed binaries are usually stripped using 'strip' when the user 2314# run "make install-strip". However 'strip' might not be the right 2315# tool to use in cross-compilation environments, therefore Automake 2316# will honor the 'STRIP' environment variable to overrule this program. 2317dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 2318if test "$cross_compiling" != no; then 2319 AC_CHECK_TOOL([STRIP], [strip], :) 2320fi 2321INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 2322AC_SUBST([INSTALL_STRIP_PROGRAM])]) 2323 2324# Copyright (C) 2006-2020 Free Software Foundation, Inc. 2325# 2326# This file is free software; the Free Software Foundation 2327# gives unlimited permission to copy and/or distribute it, 2328# with or without modifications, as long as this notice is preserved. 2329 2330# _AM_SUBST_NOTMAKE(VARIABLE) 2331# --------------------------- 2332# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 2333# This macro is traced by Automake. 2334AC_DEFUN([_AM_SUBST_NOTMAKE]) 2335 2336# AM_SUBST_NOTMAKE(VARIABLE) 2337# -------------------------- 2338# Public sister of _AM_SUBST_NOTMAKE. 2339AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 2340 2341m4_include([m4/libtool.m4]) 2342m4_include([m4/ltoptions.m4]) 2343m4_include([m4/ltsugar.m4]) 2344m4_include([m4/ltversion.m4]) 2345m4_include([m4/lt~obsolete.m4]) 2346