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# =========================================================================== 24# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html 25# =========================================================================== 26# 27# SYNOPSIS 28# 29# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) 30# 31# DESCRIPTION 32# 33# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space 34# added in between. 35# 36# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. 37# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains 38# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly 39# FLAG. 40# 41# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. 42# 43# LICENSE 44# 45# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> 46# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> 47# 48# Copying and distribution of this file, with or without modification, are 49# permitted in any medium without royalty provided the copyright notice 50# and this notice are preserved. This file is offered as-is, without any 51# warranty. 52 53#serial 8 54 55AC_DEFUN([AX_APPEND_FLAG], 56[dnl 57AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF 58AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) 59AS_VAR_SET_IF(FLAGS,[ 60 AS_CASE([" AS_VAR_GET(FLAGS) "], 61 [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], 62 [ 63 AS_VAR_APPEND(FLAGS,[" $1"]) 64 AC_RUN_LOG([: FLAGS="$FLAGS"]) 65 ]) 66 ], 67 [ 68 AS_VAR_SET(FLAGS,[$1]) 69 AC_RUN_LOG([: FLAGS="$FLAGS"]) 70 ]) 71AS_VAR_POPDEF([FLAGS])dnl 72])dnl AX_APPEND_FLAG 73 74# =========================================================================== 75# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html 76# =========================================================================== 77# 78# SYNOPSIS 79# 80# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) 81# 82# DESCRIPTION 83# 84# Check whether the given FLAG works with the current language's compiler 85# or gives an error. (Warnings, however, are ignored) 86# 87# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 88# success/failure. 89# 90# If EXTRA-FLAGS is defined, it is added to the current language's default 91# flags (e.g. CFLAGS) when the check is done. The check is thus made with 92# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to 93# force the compiler to issue an error when a bad flag is given. 94# 95# INPUT gives an alternative input source to AC_COMPILE_IFELSE. 96# 97# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this 98# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. 99# 100# LICENSE 101# 102# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> 103# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> 104# 105# Copying and distribution of this file, with or without modification, are 106# permitted in any medium without royalty provided the copyright notice 107# and this notice are preserved. This file is offered as-is, without any 108# warranty. 109 110#serial 6 111 112AC_DEFUN([AX_CHECK_COMPILE_FLAG], 113[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF 114AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl 115AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ 116 ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS 117 _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" 118 AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], 119 [AS_VAR_SET(CACHEVAR,[yes])], 120 [AS_VAR_SET(CACHEVAR,[no])]) 121 _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) 122AS_VAR_IF(CACHEVAR,yes, 123 [m4_default([$2], :)], 124 [m4_default([$3], :)]) 125AS_VAR_POPDEF([CACHEVAR])dnl 126])dnl AX_CHECK_COMPILE_FLAGS 127 128# Increment this whenever this file is changed. 129#serial 2 130 131dnl GLIB_GSETTINGS 132dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether 133dnl the schema should be compiled 134dnl 135 136AC_DEFUN([GLIB_GSETTINGS], 137[ 138 dnl We can't use PKG_PREREQ because that needs 0.29. 139 m4_ifndef([PKG_PROG_PKG_CONFIG], 140 [pkg.m4 version 0.28 or later is required]) 141 142 m4_pattern_allow([AM_V_GEN]) 143 AC_ARG_ENABLE(schemas-compile, 144 AS_HELP_STRING([--disable-schemas-compile], 145 [Disable regeneration of gschemas.compiled on install]), 146 [case ${enableval} in 147 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; 148 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; 149 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; 150 esac]) 151 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) 152 PKG_PROG_PKG_CONFIG([0.16]) 153 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) 154 AS_IF([test x$cross_compiling != xyes], 155 [PKG_CHECK_VAR([GLIB_COMPILE_SCHEMAS], [gio-2.0], [glib_compile_schemas])], 156 [AC_PATH_PROG([GLIB_COMPILE_SCHEMAS], [glib-compile-schemas])]) 157 AC_SUBST(GLIB_COMPILE_SCHEMAS) 158 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then 159 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) 160 else 161 ifelse([$1],,[:],[$1]) 162 fi 163 164 GSETTINGS_RULES=' 165.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas 166 167mostlyclean-am: clean-gsettings-schemas 168 169gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) 170 171%.gschema.valid: %.gschema.xml $(gsettings__enum_file) 172 $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@ 173 174all-am: $(gsettings_SCHEMAS:.xml=.valid) 175uninstall-am: uninstall-gsettings-schemas 176install-data-am: install-gsettings-schemas 177 178.SECONDARY: $(gsettings_SCHEMAS) 179 180install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) 181 @$(NORMAL_INSTALL) 182 if test -n "$^"; then \ 183 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ 184 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ 185 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ 186 fi 187 188uninstall-gsettings-schemas: 189 @$(NORMAL_UNINSTALL) 190 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ 191 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ 192 test -n "$$files" || exit 0; \ 193 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ 194 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files 195 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) 196 197clean-gsettings-schemas: 198 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) 199 200ifdef gsettings_ENUM_NAMESPACE 201$(gsettings__enum_file): $(gsettings_ENUM_FILES) 202 $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@ 203endif 204' 205 _GSETTINGS_SUBST(GSETTINGS_RULES) 206]) 207 208dnl _GSETTINGS_SUBST(VARIABLE) 209dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST 210AC_DEFUN([_GSETTINGS_SUBST], 211[ 212AC_SUBST([$1]) 213m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) 214] 215) 216 217dnl -*- mode: autoconf -*- 218dnl Copyright 2009 Johan Dahlin 219dnl 220dnl This file is free software; the author(s) gives unlimited 221dnl permission to copy and/or distribute it, with or without 222dnl modifications, as long as this notice is preserved. 223dnl 224 225# serial 1 226 227dnl This is a copy of AS_AC_EXPAND 228dnl 229dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org> 230dnl Copying and distribution of this file, with or without modification, 231dnl are permitted in any medium without royalty provided the copyright 232dnl notice and this notice are preserved. 233m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND], 234[ 235 EXP_VAR=[$1] 236 FROM_VAR=[$2] 237 238 dnl first expand prefix and exec_prefix if necessary 239 prefix_save=$prefix 240 exec_prefix_save=$exec_prefix 241 242 dnl if no prefix given, then use /usr/local, the default prefix 243 if test "x$prefix" = "xNONE"; then 244 prefix="$ac_default_prefix" 245 fi 246 dnl if no exec_prefix given, then use prefix 247 if test "x$exec_prefix" = "xNONE"; then 248 exec_prefix=$prefix 249 fi 250 251 full_var="$FROM_VAR" 252 dnl loop until it doesn't change anymore 253 while true; do 254 new_full_var="`eval echo $full_var`" 255 if test "x$new_full_var" = "x$full_var"; then break; fi 256 full_var=$new_full_var 257 done 258 259 dnl clean up 260 full_var=$new_full_var 261 AC_SUBST([$1], "$full_var") 262 263 dnl restore prefix and exec_prefix 264 prefix=$prefix_save 265 exec_prefix=$exec_prefix_save 266]) 267 268m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], 269[ 270 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first 271 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first 272 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first 273 274 dnl enable/disable introspection 275 m4_if([$2], [require], 276 [dnl 277 enable_introspection=yes 278 ],[dnl 279 AC_ARG_ENABLE(introspection, 280 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], 281 [Enable introspection for this build]),, 282 [enable_introspection=auto]) 283 ])dnl 284 285 AC_MSG_CHECKING([for gobject-introspection]) 286 287 dnl presence/version checking 288 AS_CASE([$enable_introspection], 289 [no], [dnl 290 found_introspection="no (disabled, use --enable-introspection to enable)" 291 ],dnl 292 [yes],[dnl 293 PKG_CHECK_EXISTS([gobject-introspection-1.0],, 294 AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) 295 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], 296 found_introspection=yes, 297 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) 298 ],dnl 299 [auto],[dnl 300 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) 301 dnl Canonicalize enable_introspection 302 enable_introspection=$found_introspection 303 ],dnl 304 [dnl 305 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) 306 ])dnl 307 308 AC_MSG_RESULT([$found_introspection]) 309 310 dnl expand datadir/libdir so we can pass them to pkg-config 311 dnl and get paths relative to our target directories 312 _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir") 313 _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir") 314 315 INTROSPECTION_SCANNER= 316 INTROSPECTION_COMPILER= 317 INTROSPECTION_GENERATE= 318 INTROSPECTION_GIRDIR= 319 INTROSPECTION_TYPELIBDIR= 320 if test "x$found_introspection" = "xyes"; then 321 INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` 322 INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` 323 INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` 324 INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0` 325 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)" 326 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` 327 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` 328 INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection 329 fi 330 AC_SUBST(INTROSPECTION_SCANNER) 331 AC_SUBST(INTROSPECTION_COMPILER) 332 AC_SUBST(INTROSPECTION_GENERATE) 333 AC_SUBST(INTROSPECTION_GIRDIR) 334 AC_SUBST(INTROSPECTION_TYPELIBDIR) 335 AC_SUBST(INTROSPECTION_CFLAGS) 336 AC_SUBST(INTROSPECTION_LIBS) 337 AC_SUBST(INTROSPECTION_MAKEFILE) 338 339 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") 340]) 341 342 343dnl Usage: 344dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) 345 346AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], 347[ 348 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) 349]) 350 351dnl Usage: 352dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) 353 354 355AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], 356[ 357 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) 358]) 359 360# MATE_COMPILE_WARNINGS 361# Turn on many useful compiler warnings 362# For now, only works on GCC 363# 364# Copyright (C) 2011 Perberos <perberos@gmail.com> 365# 366# This program is free software: you can redistribute it and/or modify 367# it under the terms of the GNU General Public License as published by 368# the Free Software Foundation, either version 3 of the License, or 369# (at your option) any later version. 370# 371# This program is distributed in the hope that it will be useful, 372# but WITHOUT ANY WARRANTY; without even the implied warranty of 373# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 374# GNU General Public License for more details. 375# 376# You should have received a copy of the GNU General Public License 377# along with this program. If not, see <http://www.gnu.org/licenses/>. 378 379 380AC_DEFUN([MATE_COMPILE_WARNINGS],[ 381 dnl ****************************** 382 dnl More compiler warnings 383 dnl ****************************** 384 385 m4_ifndef([AX_CHECK_COMPILE_FLAG],[ 386 AC_MSG_ERROR([You need to install the autoconf-archive package.]) 387 ]) 388 389 m4_ifndef([AX_APPEND_FLAG],[ 390 AC_MSG_ERROR([You need to install the autoconf-archive package.]) 391 ]) 392 393 AC_ARG_ENABLE(compile-warnings, 394 AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@], 395 [Turn on compiler warnings]),, 396 [enable_compile_warnings="m4_default([$1],[yes])"]) 397 398 AC_LANG_PUSH([C]) 399 400 case "$enable_compile_warnings" in 401 no) 402 warning_flags= 403 ;; 404 minimum) 405 warning_flags="-Wall" 406 ;; 407 yes) 408 warning_flags="-Wall -Wmissing-prototypes" 409 ;; 410 maximum|error) 411 warning_flags="-Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wno-unused-parameter -Wformat-nonliteral -Wmissing-declarations -Wmissing-field-initializers -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Werror=format-security" 412 if test "$enable_compile_warnings" = "error" ; then 413 warning_flags="$warning_flags -Werror" 414 fi 415 ;; 416 *) 417 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) 418 ;; 419 esac 420 421 # Always pass -Werror=unknown-warning-option to get Clang to fail on bad 422 # flags, otherwise they are always appended to the warn_cflags variable, and 423 # Clang warns on them for every compilation unit. 424 # If this is passed to GCC, it will explode, so the flag must be enabled 425 # conditionally. 426 AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ 427 compiler_flags_test="-Werror=unknown-warning-option" 428 ],[ 429 compiler_flags_test="" 430 ]) 431 432 for flag in $warning_flags; do 433 AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [WARN_CFLAGS])], [], [$compiler_flags_test], []) 434 done 435 436 AC_MSG_CHECKING(flags to pass to the C compiler $CC) 437 AC_MSG_RESULT(${WARN_CFLAGS}) 438 439 AC_LANG_POP([C]) 440 AC_SUBST(WARN_CFLAGS) 441]) 442 443dnl For C++, do basically the same thing. 444AC_DEFUN([MATE_CXX_WARNINGS],[ 445 446 m4_ifndef([AX_CHECK_COMPILE_FLAG],[ 447 AC_MSG_ERROR([You need to install the autoconf-archive package.]) 448 ]) 449 450 m4_ifndef([AX_APPEND_FLAG],[ 451 AC_MSG_ERROR([You need to install the autoconf-archive package.]) 452 ]) 453 454 AC_ARG_ENABLE(cxx-warnings, 455 AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes/maximum/error@:>@], 456 [Turn on compiler warnings.]),, 457 [enable_cxx_warnings="m4_default([$1],[yes])"]) 458 459 AC_LANG_PUSH([C++]) 460 461 case "$enable_cxx_warnings" in 462 no) 463 warning_flags= 464 ;; 465 minimum) 466 warning_flags="-Wall" 467 ;; 468 yes) 469 warning_flags="-Wall -Woverloaded-virtual" 470 ;; 471 maximum|error) 472 warning_flags="-Wall -Woverloaded-virtual -Wextra -Wshadow -Wformat-nonliteral -Werror=format-security -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wmissing-declarations -Wredundant-decls" 473 if test "$enable_compile_warnings" = "error" ; then 474 warning_flags="$warning_flags -Werror" 475 fi 476 ;; 477 *) 478 AC_MSG_ERROR(Unknown argument '$enable_cxx_warnings' to --enable-cxx-warnings) 479 ;; 480 esac 481 482 # Always pass -Werror=unknown-warning-option to get Clang to fail on bad 483 # flags, otherwise they are always appended to the warn_cflags variable, and 484 # Clang warns on them for every compilation unit. 485 # If this is passed to GCC, it will explode, so the flag must be enabled 486 # conditionally. 487 AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ 488 compiler_flags_test="-Werror=unknown-warning-option" 489 ],[ 490 compiler_flags_test="" 491 ]) 492 493 for flag in $warning_flags; do 494 AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [WARN_CXXFLAGS])], [], [$compiler_flags_test], []) 495 done 496 497 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) 498 AC_MSG_RESULT(${WARN_CXXFLAGS}) 499 500 AC_LANG_POP([C++]) 501 AC_SUBST(WARN_CXXFLAGS) 502]) 503 504# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 505# serial 11 (pkg-config-0.29.1) 506 507dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 508dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 509dnl 510dnl This program is free software; you can redistribute it and/or modify 511dnl it under the terms of the GNU General Public License as published by 512dnl the Free Software Foundation; either version 2 of the License, or 513dnl (at your option) any later version. 514dnl 515dnl This program is distributed in the hope that it will be useful, but 516dnl WITHOUT ANY WARRANTY; without even the implied warranty of 517dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 518dnl General Public License for more details. 519dnl 520dnl You should have received a copy of the GNU General Public License 521dnl along with this program; if not, write to the Free Software 522dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 523dnl 02111-1307, USA. 524dnl 525dnl As a special exception to the GNU General Public License, if you 526dnl distribute this file as part of a program that contains a 527dnl configuration script generated by Autoconf, you may include it under 528dnl the same distribution terms that you use for the rest of that 529dnl program. 530 531dnl PKG_PREREQ(MIN-VERSION) 532dnl ----------------------- 533dnl Since: 0.29 534dnl 535dnl Verify that the version of the pkg-config macros are at least 536dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 537dnl installed version of pkg-config, this checks the developer's version 538dnl of pkg.m4 when generating configure. 539dnl 540dnl To ensure that this macro is defined, also add: 541dnl m4_ifndef([PKG_PREREQ], 542dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 543dnl 544dnl See the "Since" comment for each macro you use to see what version 545dnl of the macros you require. 546m4_defun([PKG_PREREQ], 547[m4_define([PKG_MACROS_VERSION], [0.29.1]) 548m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 549 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 550])dnl PKG_PREREQ 551 552dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 553dnl ---------------------------------- 554dnl Since: 0.16 555dnl 556dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 557dnl first found in the path. Checks that the version of pkg-config found 558dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 559dnl used since that's the first version where most current features of 560dnl pkg-config existed. 561AC_DEFUN([PKG_PROG_PKG_CONFIG], 562[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 563m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 564m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 565AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 566AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 567AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 568 569if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 570 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 571fi 572if test -n "$PKG_CONFIG"; then 573 _pkg_min_version=m4_default([$1], [0.9.0]) 574 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 575 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 576 AC_MSG_RESULT([yes]) 577 else 578 AC_MSG_RESULT([no]) 579 PKG_CONFIG="" 580 fi 581fi[]dnl 582])dnl PKG_PROG_PKG_CONFIG 583 584dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 585dnl ------------------------------------------------------------------- 586dnl Since: 0.18 587dnl 588dnl Check to see whether a particular set of modules exists. Similar to 589dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 590dnl 591dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 592dnl only at the first occurence in configure.ac, so if the first place 593dnl it's called might be skipped (such as if it is within an "if", you 594dnl have to call PKG_CHECK_EXISTS manually 595AC_DEFUN([PKG_CHECK_EXISTS], 596[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 597if test -n "$PKG_CONFIG" && \ 598 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 599 m4_default([$2], [:]) 600m4_ifvaln([$3], [else 601 $3])dnl 602fi]) 603 604dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 605dnl --------------------------------------------- 606dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 607dnl pkg_failed based on the result. 608m4_define([_PKG_CONFIG], 609[if test -n "$$1"; then 610 pkg_cv_[]$1="$$1" 611 elif test -n "$PKG_CONFIG"; then 612 PKG_CHECK_EXISTS([$3], 613 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 614 test "x$?" != "x0" && pkg_failed=yes ], 615 [pkg_failed=yes]) 616 else 617 pkg_failed=untried 618fi[]dnl 619])dnl _PKG_CONFIG 620 621dnl _PKG_SHORT_ERRORS_SUPPORTED 622dnl --------------------------- 623dnl Internal check to see if pkg-config supports short errors. 624AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 625[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 626if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 627 _pkg_short_errors_supported=yes 628else 629 _pkg_short_errors_supported=no 630fi[]dnl 631])dnl _PKG_SHORT_ERRORS_SUPPORTED 632 633 634dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 635dnl [ACTION-IF-NOT-FOUND]) 636dnl -------------------------------------------------------------- 637dnl Since: 0.4.0 638dnl 639dnl Note that if there is a possibility the first call to 640dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 641dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 642AC_DEFUN([PKG_CHECK_MODULES], 643[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 644AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 645AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 646 647pkg_failed=no 648AC_MSG_CHECKING([for $1]) 649 650_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 651_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 652 653m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 654and $1[]_LIBS to avoid the need to call pkg-config. 655See the pkg-config man page for more details.]) 656 657if test $pkg_failed = yes; then 658 AC_MSG_RESULT([no]) 659 _PKG_SHORT_ERRORS_SUPPORTED 660 if test $_pkg_short_errors_supported = yes; then 661 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 662 else 663 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 664 fi 665 # Put the nasty error message in config.log where it belongs 666 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 667 668 m4_default([$4], [AC_MSG_ERROR( 669[Package requirements ($2) were not met: 670 671$$1_PKG_ERRORS 672 673Consider adjusting the PKG_CONFIG_PATH environment variable if you 674installed software in a non-standard prefix. 675 676_PKG_TEXT])[]dnl 677 ]) 678elif test $pkg_failed = untried; then 679 AC_MSG_RESULT([no]) 680 m4_default([$4], [AC_MSG_FAILURE( 681[The pkg-config script could not be found or is too old. Make sure it 682is in your PATH or set the PKG_CONFIG environment variable to the full 683path to pkg-config. 684 685_PKG_TEXT 686 687To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 688 ]) 689else 690 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 691 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 692 AC_MSG_RESULT([yes]) 693 $3 694fi[]dnl 695])dnl PKG_CHECK_MODULES 696 697 698dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 699dnl [ACTION-IF-NOT-FOUND]) 700dnl --------------------------------------------------------------------- 701dnl Since: 0.29 702dnl 703dnl Checks for existence of MODULES and gathers its build flags with 704dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 705dnl and VARIABLE-PREFIX_LIBS from --libs. 706dnl 707dnl Note that if there is a possibility the first call to 708dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 709dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 710dnl configure.ac. 711AC_DEFUN([PKG_CHECK_MODULES_STATIC], 712[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 713_save_PKG_CONFIG=$PKG_CONFIG 714PKG_CONFIG="$PKG_CONFIG --static" 715PKG_CHECK_MODULES($@) 716PKG_CONFIG=$_save_PKG_CONFIG[]dnl 717])dnl PKG_CHECK_MODULES_STATIC 718 719 720dnl PKG_INSTALLDIR([DIRECTORY]) 721dnl ------------------------- 722dnl Since: 0.27 723dnl 724dnl Substitutes the variable pkgconfigdir as the location where a module 725dnl should install pkg-config .pc files. By default the directory is 726dnl $libdir/pkgconfig, but the default can be changed by passing 727dnl DIRECTORY. The user can override through the --with-pkgconfigdir 728dnl parameter. 729AC_DEFUN([PKG_INSTALLDIR], 730[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 731m4_pushdef([pkg_description], 732 [pkg-config installation directory @<:@]pkg_default[@:>@]) 733AC_ARG_WITH([pkgconfigdir], 734 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 735 [with_pkgconfigdir=]pkg_default) 736AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 737m4_popdef([pkg_default]) 738m4_popdef([pkg_description]) 739])dnl PKG_INSTALLDIR 740 741 742dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 743dnl -------------------------------- 744dnl Since: 0.27 745dnl 746dnl Substitutes the variable noarch_pkgconfigdir as the location where a 747dnl module should install arch-independent pkg-config .pc files. By 748dnl default the directory is $datadir/pkgconfig, but the default can be 749dnl changed by passing DIRECTORY. The user can override through the 750dnl --with-noarch-pkgconfigdir parameter. 751AC_DEFUN([PKG_NOARCH_INSTALLDIR], 752[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 753m4_pushdef([pkg_description], 754 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 755AC_ARG_WITH([noarch-pkgconfigdir], 756 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 757 [with_noarch_pkgconfigdir=]pkg_default) 758AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 759m4_popdef([pkg_default]) 760m4_popdef([pkg_description]) 761])dnl PKG_NOARCH_INSTALLDIR 762 763 764dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 765dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 766dnl ------------------------------------------- 767dnl Since: 0.28 768dnl 769dnl Retrieves the value of the pkg-config variable for the given module. 770AC_DEFUN([PKG_CHECK_VAR], 771[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 772AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 773 774_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 775AS_VAR_COPY([$1], [pkg_cv_][$1]) 776 777AS_VAR_IF([$1], [""], [$5], [$4])dnl 778])dnl PKG_CHECK_VAR 779 780dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 781dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 782dnl [DESCRIPTION], [DEFAULT]) 783dnl ------------------------------------------ 784dnl 785dnl Prepare a "--with-" configure option using the lowercase 786dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 787dnl PKG_CHECK_MODULES in a single macro. 788AC_DEFUN([PKG_WITH_MODULES], 789[ 790m4_pushdef([with_arg], m4_tolower([$1])) 791 792m4_pushdef([description], 793 [m4_default([$5], [build with ]with_arg[ support])]) 794 795m4_pushdef([def_arg], [m4_default([$6], [auto])]) 796m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 797m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 798 799m4_case(def_arg, 800 [yes],[m4_pushdef([with_without], [--without-]with_arg)], 801 [m4_pushdef([with_without],[--with-]with_arg)]) 802 803AC_ARG_WITH(with_arg, 804 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 805 [AS_TR_SH([with_]with_arg)=def_arg]) 806 807AS_CASE([$AS_TR_SH([with_]with_arg)], 808 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 809 [auto],[PKG_CHECK_MODULES([$1],[$2], 810 [m4_n([def_action_if_found]) $3], 811 [m4_n([def_action_if_not_found]) $4])]) 812 813m4_popdef([with_arg]) 814m4_popdef([description]) 815m4_popdef([def_arg]) 816 817])dnl PKG_WITH_MODULES 818 819dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 820dnl [DESCRIPTION], [DEFAULT]) 821dnl ----------------------------------------------- 822dnl 823dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 824dnl check._[VARIABLE-PREFIX] is exported as make variable. 825AC_DEFUN([PKG_HAVE_WITH_MODULES], 826[ 827PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 828 829AM_CONDITIONAL([HAVE_][$1], 830 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 831])dnl PKG_HAVE_WITH_MODULES 832 833dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 834dnl [DESCRIPTION], [DEFAULT]) 835dnl ------------------------------------------------------ 836dnl 837dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 838dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 839dnl and preprocessor variable. 840AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 841[ 842PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 843 844AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 845 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 846])dnl PKG_HAVE_DEFINE_WITH_MODULES 847 848# Copyright (C) 2002-2020 Free Software Foundation, Inc. 849# 850# This file is free software; the Free Software Foundation 851# gives unlimited permission to copy and/or distribute it, 852# with or without modifications, as long as this notice is preserved. 853 854# AM_AUTOMAKE_VERSION(VERSION) 855# ---------------------------- 856# Automake X.Y traces this macro to ensure aclocal.m4 has been 857# generated from the m4 files accompanying Automake X.Y. 858# (This private macro should not be called outside this file.) 859AC_DEFUN([AM_AUTOMAKE_VERSION], 860[am__api_version='1.16' 861dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 862dnl require some minimum version. Point them to the right macro. 863m4_if([$1], [1.16.2], [], 864 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 865]) 866 867# _AM_AUTOCONF_VERSION(VERSION) 868# ----------------------------- 869# aclocal traces this macro to find the Autoconf version. 870# This is a private macro too. Using m4_define simplifies 871# the logic in aclocal, which can simply ignore this definition. 872m4_define([_AM_AUTOCONF_VERSION], []) 873 874# AM_SET_CURRENT_AUTOMAKE_VERSION 875# ------------------------------- 876# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 877# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 878AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 879[AM_AUTOMAKE_VERSION([1.16.2])dnl 880m4_ifndef([AC_AUTOCONF_VERSION], 881 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 882_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 883 884# AM_AUX_DIR_EXPAND -*- Autoconf -*- 885 886# Copyright (C) 2001-2020 Free Software Foundation, Inc. 887# 888# This file is free software; the Free Software Foundation 889# gives unlimited permission to copy and/or distribute it, 890# with or without modifications, as long as this notice is preserved. 891 892# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 893# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 894# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 895# 896# Of course, Automake must honor this variable whenever it calls a 897# tool from the auxiliary directory. The problem is that $srcdir (and 898# therefore $ac_aux_dir as well) can be either absolute or relative, 899# depending on how configure is run. This is pretty annoying, since 900# it makes $ac_aux_dir quite unusable in subdirectories: in the top 901# source directory, any form will work fine, but in subdirectories a 902# relative path needs to be adjusted first. 903# 904# $ac_aux_dir/missing 905# fails when called from a subdirectory if $ac_aux_dir is relative 906# $top_srcdir/$ac_aux_dir/missing 907# fails if $ac_aux_dir is absolute, 908# fails when called from a subdirectory in a VPATH build with 909# a relative $ac_aux_dir 910# 911# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 912# are both prefixed by $srcdir. In an in-source build this is usually 913# harmless because $srcdir is '.', but things will broke when you 914# start a VPATH build or use an absolute $srcdir. 915# 916# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 917# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 918# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 919# and then we would define $MISSING as 920# MISSING="\${SHELL} $am_aux_dir/missing" 921# This will work as long as MISSING is not called from configure, because 922# unfortunately $(top_srcdir) has no meaning in configure. 923# However there are other variables, like CC, which are often used in 924# configure, and could therefore not use this "fixed" $ac_aux_dir. 925# 926# Another solution, used here, is to always expand $ac_aux_dir to an 927# absolute PATH. The drawback is that using absolute paths prevent a 928# configured tree to be moved without reconfiguration. 929 930AC_DEFUN([AM_AUX_DIR_EXPAND], 931[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 932# Expand $ac_aux_dir to an absolute path. 933am_aux_dir=`cd "$ac_aux_dir" && pwd` 934]) 935 936# AM_CONDITIONAL -*- Autoconf -*- 937 938# Copyright (C) 1997-2020 Free Software Foundation, Inc. 939# 940# This file is free software; the Free Software Foundation 941# gives unlimited permission to copy and/or distribute it, 942# with or without modifications, as long as this notice is preserved. 943 944# AM_CONDITIONAL(NAME, SHELL-CONDITION) 945# ------------------------------------- 946# Define a conditional. 947AC_DEFUN([AM_CONDITIONAL], 948[AC_PREREQ([2.52])dnl 949 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 950 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 951AC_SUBST([$1_TRUE])dnl 952AC_SUBST([$1_FALSE])dnl 953_AM_SUBST_NOTMAKE([$1_TRUE])dnl 954_AM_SUBST_NOTMAKE([$1_FALSE])dnl 955m4_define([_AM_COND_VALUE_$1], [$2])dnl 956if $2; then 957 $1_TRUE= 958 $1_FALSE='#' 959else 960 $1_TRUE='#' 961 $1_FALSE= 962fi 963AC_CONFIG_COMMANDS_PRE( 964[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 965 AC_MSG_ERROR([[conditional "$1" was never defined. 966Usually this means the macro was only invoked conditionally.]]) 967fi])]) 968 969# Copyright (C) 1999-2020 Free Software Foundation, Inc. 970# 971# This file is free software; the Free Software Foundation 972# gives unlimited permission to copy and/or distribute it, 973# with or without modifications, as long as this notice is preserved. 974 975 976# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 977# written in clear, in which case automake, when reading aclocal.m4, 978# will think it sees a *use*, and therefore will trigger all it's 979# C support machinery. Also note that it means that autoscan, seeing 980# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 981 982 983# _AM_DEPENDENCIES(NAME) 984# ---------------------- 985# See how the compiler implements dependency checking. 986# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 987# We try a few techniques and use that to set a single cache variable. 988# 989# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 990# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 991# dependency, and given that the user is not expected to run this macro, 992# just rely on AC_PROG_CC. 993AC_DEFUN([_AM_DEPENDENCIES], 994[AC_REQUIRE([AM_SET_DEPDIR])dnl 995AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 996AC_REQUIRE([AM_MAKE_INCLUDE])dnl 997AC_REQUIRE([AM_DEP_TRACK])dnl 998 999m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1000 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1001 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1002 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1003 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1004 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1005 [depcc="$$1" am_compiler_list=]) 1006 1007AC_CACHE_CHECK([dependency style of $depcc], 1008 [am_cv_$1_dependencies_compiler_type], 1009[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1010 # We make a subdir and do the tests there. Otherwise we can end up 1011 # making bogus files that we don't know about and never remove. For 1012 # instance it was reported that on HP-UX the gcc test will end up 1013 # making a dummy file named 'D' -- because '-MD' means "put the output 1014 # in D". 1015 rm -rf conftest.dir 1016 mkdir conftest.dir 1017 # Copy depcomp to subdir because otherwise we won't find it if we're 1018 # using a relative directory. 1019 cp "$am_depcomp" conftest.dir 1020 cd conftest.dir 1021 # We will build objects and dependencies in a subdirectory because 1022 # it helps to detect inapplicable dependency modes. For instance 1023 # both Tru64's cc and ICC support -MD to output dependencies as a 1024 # side effect of compilation, but ICC will put the dependencies in 1025 # the current directory while Tru64 will put them in the object 1026 # directory. 1027 mkdir sub 1028 1029 am_cv_$1_dependencies_compiler_type=none 1030 if test "$am_compiler_list" = ""; then 1031 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1032 fi 1033 am__universal=false 1034 m4_case([$1], [CC], 1035 [case " $depcc " in #( 1036 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1037 esac], 1038 [CXX], 1039 [case " $depcc " in #( 1040 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1041 esac]) 1042 1043 for depmode in $am_compiler_list; do 1044 # Setup a source with many dependencies, because some compilers 1045 # like to wrap large dependency lists on column 80 (with \), and 1046 # we should not choose a depcomp mode which is confused by this. 1047 # 1048 # We need to recreate these files for each test, as the compiler may 1049 # overwrite some of them when testing with obscure command lines. 1050 # This happens at least with the AIX C compiler. 1051 : > sub/conftest.c 1052 for i in 1 2 3 4 5 6; do 1053 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1054 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1055 # Solaris 10 /bin/sh. 1056 echo '/* dummy */' > sub/conftst$i.h 1057 done 1058 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1059 1060 # We check with '-c' and '-o' for the sake of the "dashmstdout" 1061 # mode. It turns out that the SunPro C++ compiler does not properly 1062 # handle '-M -o', and we need to detect this. Also, some Intel 1063 # versions had trouble with output in subdirs. 1064 am__obj=sub/conftest.${OBJEXT-o} 1065 am__minus_obj="-o $am__obj" 1066 case $depmode in 1067 gcc) 1068 # This depmode causes a compiler race in universal mode. 1069 test "$am__universal" = false || continue 1070 ;; 1071 nosideeffect) 1072 # After this tag, mechanisms are not by side-effect, so they'll 1073 # only be used when explicitly requested. 1074 if test "x$enable_dependency_tracking" = xyes; then 1075 continue 1076 else 1077 break 1078 fi 1079 ;; 1080 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1081 # This compiler won't grok '-c -o', but also, the minuso test has 1082 # not run yet. These depmodes are late enough in the game, and 1083 # so weak that their functioning should not be impacted. 1084 am__obj=conftest.${OBJEXT-o} 1085 am__minus_obj= 1086 ;; 1087 none) break ;; 1088 esac 1089 if depmode=$depmode \ 1090 source=sub/conftest.c object=$am__obj \ 1091 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1092 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1093 >/dev/null 2>conftest.err && 1094 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1095 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1096 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1097 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1098 # icc doesn't choke on unknown options, it will just issue warnings 1099 # or remarks (even with -Werror). So we grep stderr for any message 1100 # that says an option was ignored or not supported. 1101 # When given -MP, icc 7.0 and 7.1 complain thusly: 1102 # icc: Command line warning: ignoring option '-M'; no argument required 1103 # The diagnosis changed in icc 8.0: 1104 # icc: Command line remark: option '-MP' not supported 1105 if (grep 'ignoring option' conftest.err || 1106 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1107 am_cv_$1_dependencies_compiler_type=$depmode 1108 break 1109 fi 1110 fi 1111 done 1112 1113 cd .. 1114 rm -rf conftest.dir 1115else 1116 am_cv_$1_dependencies_compiler_type=none 1117fi 1118]) 1119AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1120AM_CONDITIONAL([am__fastdep$1], [ 1121 test "x$enable_dependency_tracking" != xno \ 1122 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1123]) 1124 1125 1126# AM_SET_DEPDIR 1127# ------------- 1128# Choose a directory name for dependency files. 1129# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1130AC_DEFUN([AM_SET_DEPDIR], 1131[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1132AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1133]) 1134 1135 1136# AM_DEP_TRACK 1137# ------------ 1138AC_DEFUN([AM_DEP_TRACK], 1139[AC_ARG_ENABLE([dependency-tracking], [dnl 1140AS_HELP_STRING( 1141 [--enable-dependency-tracking], 1142 [do not reject slow dependency extractors]) 1143AS_HELP_STRING( 1144 [--disable-dependency-tracking], 1145 [speeds up one-time build])]) 1146if test "x$enable_dependency_tracking" != xno; then 1147 am_depcomp="$ac_aux_dir/depcomp" 1148 AMDEPBACKSLASH='\' 1149 am__nodep='_no' 1150fi 1151AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1152AC_SUBST([AMDEPBACKSLASH])dnl 1153_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1154AC_SUBST([am__nodep])dnl 1155_AM_SUBST_NOTMAKE([am__nodep])dnl 1156]) 1157 1158# Generate code to set up dependency tracking. -*- Autoconf -*- 1159 1160# Copyright (C) 1999-2020 Free Software Foundation, Inc. 1161# 1162# This file is free software; the Free Software Foundation 1163# gives unlimited permission to copy and/or distribute it, 1164# with or without modifications, as long as this notice is preserved. 1165 1166# _AM_OUTPUT_DEPENDENCY_COMMANDS 1167# ------------------------------ 1168AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1169[{ 1170 # Older Autoconf quotes --file arguments for eval, but not when files 1171 # are listed without --file. Let's play safe and only enable the eval 1172 # if we detect the quoting. 1173 # TODO: see whether this extra hack can be removed once we start 1174 # requiring Autoconf 2.70 or later. 1175 AS_CASE([$CONFIG_FILES], 1176 [*\'*], [eval set x "$CONFIG_FILES"], 1177 [*], [set x $CONFIG_FILES]) 1178 shift 1179 # Used to flag and report bootstrapping failures. 1180 am_rc=0 1181 for am_mf 1182 do 1183 # Strip MF so we end up with the name of the file. 1184 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 1185 # Check whether this is an Automake generated Makefile which includes 1186 # dependency-tracking related rules and includes. 1187 # Grep'ing the whole file directly is not great: AIX grep has a line 1188 # limit of 2048, but all sed's we know have understand at least 4000. 1189 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 1190 || continue 1191 am_dirpart=`AS_DIRNAME(["$am_mf"])` 1192 am_filepart=`AS_BASENAME(["$am_mf"])` 1193 AM_RUN_LOG([cd "$am_dirpart" \ 1194 && sed -e '/# am--include-marker/d' "$am_filepart" \ 1195 | $MAKE -f - am--depfiles]) || am_rc=$? 1196 done 1197 if test $am_rc -ne 0; then 1198 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 1199 for automatic dependency tracking. If GNU make was not used, consider 1200 re-running the configure script with MAKE="gmake" (or whatever is 1201 necessary). You can also try re-running configure with the 1202 '--disable-dependency-tracking' option to at least be able to build 1203 the package (albeit without support for automatic dependency tracking).]) 1204 fi 1205 AS_UNSET([am_dirpart]) 1206 AS_UNSET([am_filepart]) 1207 AS_UNSET([am_mf]) 1208 AS_UNSET([am_rc]) 1209 rm -f conftest-deps.mk 1210} 1211])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1212 1213 1214# AM_OUTPUT_DEPENDENCY_COMMANDS 1215# ----------------------------- 1216# This macro should only be invoked once -- use via AC_REQUIRE. 1217# 1218# This code is only required when automatic dependency tracking is enabled. 1219# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 1220# order to bootstrap the dependency handling code. 1221AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1222[AC_CONFIG_COMMANDS([depfiles], 1223 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1224 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 1225 1226# Do all the work for Automake. -*- Autoconf -*- 1227 1228# Copyright (C) 1996-2020 Free Software Foundation, Inc. 1229# 1230# This file is free software; the Free Software Foundation 1231# gives unlimited permission to copy and/or distribute it, 1232# with or without modifications, as long as this notice is preserved. 1233 1234# This macro actually does too much. Some checks are only needed if 1235# your package does certain things. But this isn't really a big deal. 1236 1237dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1238m4_define([AC_PROG_CC], 1239m4_defn([AC_PROG_CC]) 1240[_AM_PROG_CC_C_O 1241]) 1242 1243# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1244# AM_INIT_AUTOMAKE([OPTIONS]) 1245# ----------------------------------------------- 1246# The call with PACKAGE and VERSION arguments is the old style 1247# call (pre autoconf-2.50), which is being phased out. PACKAGE 1248# and VERSION should now be passed to AC_INIT and removed from 1249# the call to AM_INIT_AUTOMAKE. 1250# We support both call styles for the transition. After 1251# the next Automake release, Autoconf can make the AC_INIT 1252# arguments mandatory, and then we can depend on a new Autoconf 1253# release and drop the old call support. 1254AC_DEFUN([AM_INIT_AUTOMAKE], 1255[AC_PREREQ([2.65])dnl 1256dnl Autoconf wants to disallow AM_ names. We explicitly allow 1257dnl the ones we care about. 1258m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1259AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1260AC_REQUIRE([AC_PROG_INSTALL])dnl 1261if test "`cd $srcdir && pwd`" != "`pwd`"; then 1262 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1263 # is not polluted with repeated "-I." 1264 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1265 # test to see if srcdir already configured 1266 if test -f $srcdir/config.status; then 1267 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1268 fi 1269fi 1270 1271# test whether we have cygpath 1272if test -z "$CYGPATH_W"; then 1273 if (cygpath --version) >/dev/null 2>/dev/null; then 1274 CYGPATH_W='cygpath -w' 1275 else 1276 CYGPATH_W=echo 1277 fi 1278fi 1279AC_SUBST([CYGPATH_W]) 1280 1281# Define the identity of the package. 1282dnl Distinguish between old-style and new-style calls. 1283m4_ifval([$2], 1284[AC_DIAGNOSE([obsolete], 1285 [$0: two- and three-arguments forms are deprecated.]) 1286m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1287 AC_SUBST([PACKAGE], [$1])dnl 1288 AC_SUBST([VERSION], [$2])], 1289[_AM_SET_OPTIONS([$1])dnl 1290dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1291m4_if( 1292 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1293 [ok:ok],, 1294 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1295 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1296 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1297 1298_AM_IF_OPTION([no-define],, 1299[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1300 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1301 1302# Some tools Automake needs. 1303AC_REQUIRE([AM_SANITY_CHECK])dnl 1304AC_REQUIRE([AC_ARG_PROGRAM])dnl 1305AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1306AM_MISSING_PROG([AUTOCONF], [autoconf]) 1307AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1308AM_MISSING_PROG([AUTOHEADER], [autoheader]) 1309AM_MISSING_PROG([MAKEINFO], [makeinfo]) 1310AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1311AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1312AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1313# For better backward compatibility. To be removed once Automake 1.9.x 1314# dies out for good. For more background, see: 1315# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1316# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1317AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1318# We need awk for the "check" target (and possibly the TAP driver). The 1319# system "awk" is bad on some platforms. 1320AC_REQUIRE([AC_PROG_AWK])dnl 1321AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1322AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1323_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1324 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1325 [_AM_PROG_TAR([v7])])]) 1326_AM_IF_OPTION([no-dependencies],, 1327[AC_PROVIDE_IFELSE([AC_PROG_CC], 1328 [_AM_DEPENDENCIES([CC])], 1329 [m4_define([AC_PROG_CC], 1330 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1331AC_PROVIDE_IFELSE([AC_PROG_CXX], 1332 [_AM_DEPENDENCIES([CXX])], 1333 [m4_define([AC_PROG_CXX], 1334 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1335AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1336 [_AM_DEPENDENCIES([OBJC])], 1337 [m4_define([AC_PROG_OBJC], 1338 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1339AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1340 [_AM_DEPENDENCIES([OBJCXX])], 1341 [m4_define([AC_PROG_OBJCXX], 1342 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1343]) 1344AC_REQUIRE([AM_SILENT_RULES])dnl 1345dnl The testsuite driver may need to know about EXEEXT, so add the 1346dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1347dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1348AC_CONFIG_COMMANDS_PRE(dnl 1349[m4_provide_if([_AM_COMPILER_EXEEXT], 1350 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1351 1352# POSIX will say in a future version that running "rm -f" with no argument 1353# is OK; and we want to be able to make that assumption in our Makefile 1354# recipes. So use an aggressive probe to check that the usage we want is 1355# actually supported "in the wild" to an acceptable degree. 1356# See automake bug#10828. 1357# To make any issue more visible, cause the running configure to be aborted 1358# by default if the 'rm' program in use doesn't match our expectations; the 1359# user can still override this though. 1360if rm -f && rm -fr && rm -rf; then : OK; else 1361 cat >&2 <<'END' 1362Oops! 1363 1364Your 'rm' program seems unable to run without file operands specified 1365on the command line, even when the '-f' option is present. This is contrary 1366to the behaviour of most rm programs out there, and not conforming with 1367the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1368 1369Please tell bug-automake@gnu.org about your system, including the value 1370of your $PATH and any error possibly output before this message. This 1371can help us improve future automake versions. 1372 1373END 1374 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1375 echo 'Configuration will proceed anyway, since you have set the' >&2 1376 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1377 echo >&2 1378 else 1379 cat >&2 <<'END' 1380Aborting the configuration process, to ensure you take notice of the issue. 1381 1382You can download and install GNU coreutils to get an 'rm' implementation 1383that behaves properly: <https://www.gnu.org/software/coreutils/>. 1384 1385If you want to complete the configuration process using your problematic 1386'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1387to "yes", and re-run configure. 1388 1389END 1390 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1391 fi 1392fi 1393dnl The trailing newline in this macro's definition is deliberate, for 1394dnl backward compatibility and to allow trailing 'dnl'-style comments 1395dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1396]) 1397 1398dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1399dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1400dnl mangled by Autoconf and run in a shell conditional statement. 1401m4_define([_AC_COMPILER_EXEEXT], 1402m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1403 1404# When config.status generates a header, we must update the stamp-h file. 1405# This file resides in the same directory as the config header 1406# that is generated. The stamp files are numbered to have different names. 1407 1408# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1409# loop where config.status creates the headers, so we can generate 1410# our stamp files there. 1411AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1412[# Compute $1's index in $config_headers. 1413_am_arg=$1 1414_am_stamp_count=1 1415for _am_header in $config_headers :; do 1416 case $_am_header in 1417 $_am_arg | $_am_arg:* ) 1418 break ;; 1419 * ) 1420 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1421 esac 1422done 1423echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1424 1425# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1426# 1427# This file is free software; the Free Software Foundation 1428# gives unlimited permission to copy and/or distribute it, 1429# with or without modifications, as long as this notice is preserved. 1430 1431# AM_PROG_INSTALL_SH 1432# ------------------ 1433# Define $install_sh. 1434AC_DEFUN([AM_PROG_INSTALL_SH], 1435[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1436if test x"${install_sh+set}" != xset; then 1437 case $am_aux_dir in 1438 *\ * | *\ *) 1439 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1440 *) 1441 install_sh="\${SHELL} $am_aux_dir/install-sh" 1442 esac 1443fi 1444AC_SUBST([install_sh])]) 1445 1446# Copyright (C) 2003-2020 Free Software Foundation, Inc. 1447# 1448# This file is free software; the Free Software Foundation 1449# gives unlimited permission to copy and/or distribute it, 1450# with or without modifications, as long as this notice is preserved. 1451 1452# Check whether the underlying file-system supports filenames 1453# with a leading dot. For instance MS-DOS doesn't. 1454AC_DEFUN([AM_SET_LEADING_DOT], 1455[rm -rf .tst 2>/dev/null 1456mkdir .tst 2>/dev/null 1457if test -d .tst; then 1458 am__leading_dot=. 1459else 1460 am__leading_dot=_ 1461fi 1462rmdir .tst 2>/dev/null 1463AC_SUBST([am__leading_dot])]) 1464 1465# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1466# From Jim Meyering 1467 1468# Copyright (C) 1996-2020 Free Software Foundation, Inc. 1469# 1470# This file is free software; the Free Software Foundation 1471# gives unlimited permission to copy and/or distribute it, 1472# with or without modifications, as long as this notice is preserved. 1473 1474# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1475# ---------------------------------- 1476# Control maintainer-specific portions of Makefiles. 1477# Default is to disable them, unless 'enable' is passed literally. 1478# For symmetry, 'disable' may be passed as well. Anyway, the user 1479# can override the default with the --enable/--disable switch. 1480AC_DEFUN([AM_MAINTAINER_MODE], 1481[m4_case(m4_default([$1], [disable]), 1482 [enable], [m4_define([am_maintainer_other], [disable])], 1483 [disable], [m4_define([am_maintainer_other], [enable])], 1484 [m4_define([am_maintainer_other], [enable]) 1485 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1486AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1487 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1488 AC_ARG_ENABLE([maintainer-mode], 1489 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 1490 am_maintainer_other[ make rules and dependencies not useful 1491 (and sometimes confusing) to the casual installer])], 1492 [USE_MAINTAINER_MODE=$enableval], 1493 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1494 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1495 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1496 MAINT=$MAINTAINER_MODE_TRUE 1497 AC_SUBST([MAINT])dnl 1498] 1499) 1500 1501# Check to see how 'make' treats includes. -*- Autoconf -*- 1502 1503# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1504# 1505# This file is free software; the Free Software Foundation 1506# gives unlimited permission to copy and/or distribute it, 1507# with or without modifications, as long as this notice is preserved. 1508 1509# AM_MAKE_INCLUDE() 1510# ----------------- 1511# Check whether make has an 'include' directive that can support all 1512# the idioms we need for our automatic dependency tracking code. 1513AC_DEFUN([AM_MAKE_INCLUDE], 1514[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 1515cat > confinc.mk << 'END' 1516am__doit: 1517 @echo this is the am__doit target >confinc.out 1518.PHONY: am__doit 1519END 1520am__include="#" 1521am__quote= 1522# BSD make does it like this. 1523echo '.include "confinc.mk" # ignored' > confmf.BSD 1524# Other make implementations (GNU, Solaris 10, AIX) do it like this. 1525echo 'include confinc.mk # ignored' > confmf.GNU 1526_am_result=no 1527for s in GNU BSD; do 1528 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 1529 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 1530 ['0:this is the am__doit target'], 1531 [AS_CASE([$s], 1532 [BSD], [am__include='.include' am__quote='"'], 1533 [am__include='include' am__quote=''])]) 1534 if test "$am__include" != "#"; then 1535 _am_result="yes ($s style)" 1536 break 1537 fi 1538done 1539rm -f confinc.* confmf.* 1540AC_MSG_RESULT([${_am_result}]) 1541AC_SUBST([am__include])]) 1542AC_SUBST([am__quote])]) 1543 1544# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1545 1546# Copyright (C) 1997-2020 Free Software Foundation, Inc. 1547# 1548# This file is free software; the Free Software Foundation 1549# gives unlimited permission to copy and/or distribute it, 1550# with or without modifications, as long as this notice is preserved. 1551 1552# AM_MISSING_PROG(NAME, PROGRAM) 1553# ------------------------------ 1554AC_DEFUN([AM_MISSING_PROG], 1555[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1556$1=${$1-"${am_missing_run}$2"} 1557AC_SUBST($1)]) 1558 1559# AM_MISSING_HAS_RUN 1560# ------------------ 1561# Define MISSING if not defined so far and test if it is modern enough. 1562# If it is, set am_missing_run to use it, otherwise, to nothing. 1563AC_DEFUN([AM_MISSING_HAS_RUN], 1564[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1565AC_REQUIRE_AUX_FILE([missing])dnl 1566if test x"${MISSING+set}" != xset; then 1567 case $am_aux_dir in 1568 *\ * | *\ *) 1569 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1570 *) 1571 MISSING="\${SHELL} $am_aux_dir/missing" ;; 1572 esac 1573fi 1574# Use eval to expand $SHELL 1575if eval "$MISSING --is-lightweight"; then 1576 am_missing_run="$MISSING " 1577else 1578 am_missing_run= 1579 AC_MSG_WARN(['missing' script is too old or missing]) 1580fi 1581]) 1582 1583# Helper functions for option handling. -*- Autoconf -*- 1584 1585# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1586# 1587# This file is free software; the Free Software Foundation 1588# gives unlimited permission to copy and/or distribute it, 1589# with or without modifications, as long as this notice is preserved. 1590 1591# _AM_MANGLE_OPTION(NAME) 1592# ----------------------- 1593AC_DEFUN([_AM_MANGLE_OPTION], 1594[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1595 1596# _AM_SET_OPTION(NAME) 1597# -------------------- 1598# Set option NAME. Presently that only means defining a flag for this option. 1599AC_DEFUN([_AM_SET_OPTION], 1600[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1601 1602# _AM_SET_OPTIONS(OPTIONS) 1603# ------------------------ 1604# OPTIONS is a space-separated list of Automake options. 1605AC_DEFUN([_AM_SET_OPTIONS], 1606[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1607 1608# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1609# ------------------------------------------- 1610# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1611AC_DEFUN([_AM_IF_OPTION], 1612[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1613 1614# Copyright (C) 1999-2020 Free Software Foundation, Inc. 1615# 1616# This file is free software; the Free Software Foundation 1617# gives unlimited permission to copy and/or distribute it, 1618# with or without modifications, as long as this notice is preserved. 1619 1620# _AM_PROG_CC_C_O 1621# --------------- 1622# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1623# to automatically call this. 1624AC_DEFUN([_AM_PROG_CC_C_O], 1625[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1626AC_REQUIRE_AUX_FILE([compile])dnl 1627AC_LANG_PUSH([C])dnl 1628AC_CACHE_CHECK( 1629 [whether $CC understands -c and -o together], 1630 [am_cv_prog_cc_c_o], 1631 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1632 # Make sure it works both with $CC and with simple cc. 1633 # Following AC_PROG_CC_C_O, we do the test twice because some 1634 # compilers refuse to overwrite an existing .o file with -o, 1635 # though they will create one. 1636 am_cv_prog_cc_c_o=yes 1637 for am_i in 1 2; do 1638 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1639 && test -f conftest2.$ac_objext; then 1640 : OK 1641 else 1642 am_cv_prog_cc_c_o=no 1643 break 1644 fi 1645 done 1646 rm -f core conftest* 1647 unset am_i]) 1648if test "$am_cv_prog_cc_c_o" != yes; then 1649 # Losing compiler, so override with the script. 1650 # FIXME: It is wrong to rewrite CC. 1651 # But if we don't then we get into trouble of one sort or another. 1652 # A longer-term fix would be to have automake use am__CC in this case, 1653 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1654 CC="$am_aux_dir/compile $CC" 1655fi 1656AC_LANG_POP([C])]) 1657 1658# For backward compatibility. 1659AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1660 1661# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1662# 1663# This file is free software; the Free Software Foundation 1664# gives unlimited permission to copy and/or distribute it, 1665# with or without modifications, as long as this notice is preserved. 1666 1667# AM_RUN_LOG(COMMAND) 1668# ------------------- 1669# Run COMMAND, save the exit status in ac_status, and log it. 1670# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1671AC_DEFUN([AM_RUN_LOG], 1672[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1673 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1674 ac_status=$? 1675 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1676 (exit $ac_status); }]) 1677 1678# Check to make sure that the build environment is sane. -*- Autoconf -*- 1679 1680# Copyright (C) 1996-2020 Free Software Foundation, Inc. 1681# 1682# This file is free software; the Free Software Foundation 1683# gives unlimited permission to copy and/or distribute it, 1684# with or without modifications, as long as this notice is preserved. 1685 1686# AM_SANITY_CHECK 1687# --------------- 1688AC_DEFUN([AM_SANITY_CHECK], 1689[AC_MSG_CHECKING([whether build environment is sane]) 1690# Reject unsafe characters in $srcdir or the absolute working directory 1691# name. Accept space and tab only in the latter. 1692am_lf=' 1693' 1694case `pwd` in 1695 *[[\\\"\#\$\&\'\`$am_lf]]*) 1696 AC_MSG_ERROR([unsafe absolute working directory name]);; 1697esac 1698case $srcdir in 1699 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1700 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1701esac 1702 1703# Do 'set' in a subshell so we don't clobber the current shell's 1704# arguments. Must try -L first in case configure is actually a 1705# symlink; some systems play weird games with the mod time of symlinks 1706# (eg FreeBSD returns the mod time of the symlink's containing 1707# directory). 1708if ( 1709 am_has_slept=no 1710 for am_try in 1 2; do 1711 echo "timestamp, slept: $am_has_slept" > conftest.file 1712 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1713 if test "$[*]" = "X"; then 1714 # -L didn't work. 1715 set X `ls -t "$srcdir/configure" conftest.file` 1716 fi 1717 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1718 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1719 1720 # If neither matched, then we have a broken ls. This can happen 1721 # if, for instance, CONFIG_SHELL is bash and it inherits a 1722 # broken ls alias from the environment. This has actually 1723 # happened. Such a system could not be considered "sane". 1724 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1725 alias in your environment]) 1726 fi 1727 if test "$[2]" = conftest.file || test $am_try -eq 2; then 1728 break 1729 fi 1730 # Just in case. 1731 sleep 1 1732 am_has_slept=yes 1733 done 1734 test "$[2]" = conftest.file 1735 ) 1736then 1737 # Ok. 1738 : 1739else 1740 AC_MSG_ERROR([newly created file is older than distributed files! 1741Check your system clock]) 1742fi 1743AC_MSG_RESULT([yes]) 1744# If we didn't sleep, we still need to ensure time stamps of config.status and 1745# generated files are strictly newer. 1746am_sleep_pid= 1747if grep 'slept: no' conftest.file >/dev/null 2>&1; then 1748 ( sleep 1 ) & 1749 am_sleep_pid=$! 1750fi 1751AC_CONFIG_COMMANDS_PRE( 1752 [AC_MSG_CHECKING([that generated files are newer than configure]) 1753 if test -n "$am_sleep_pid"; then 1754 # Hide warnings about reused PIDs. 1755 wait $am_sleep_pid 2>/dev/null 1756 fi 1757 AC_MSG_RESULT([done])]) 1758rm -f conftest.file 1759]) 1760 1761# Copyright (C) 2009-2020 Free Software Foundation, Inc. 1762# 1763# This file is free software; the Free Software Foundation 1764# gives unlimited permission to copy and/or distribute it, 1765# with or without modifications, as long as this notice is preserved. 1766 1767# AM_SILENT_RULES([DEFAULT]) 1768# -------------------------- 1769# Enable less verbose build rules; with the default set to DEFAULT 1770# ("yes" being less verbose, "no" or empty being verbose). 1771AC_DEFUN([AM_SILENT_RULES], 1772[AC_ARG_ENABLE([silent-rules], [dnl 1773AS_HELP_STRING( 1774 [--enable-silent-rules], 1775 [less verbose build output (undo: "make V=1")]) 1776AS_HELP_STRING( 1777 [--disable-silent-rules], 1778 [verbose build output (undo: "make V=0")])dnl 1779]) 1780case $enable_silent_rules in @%:@ ((( 1781 yes) AM_DEFAULT_VERBOSITY=0;; 1782 no) AM_DEFAULT_VERBOSITY=1;; 1783 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1784esac 1785dnl 1786dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1787dnl do not support nested variable expansions. 1788dnl See automake bug#9928 and bug#10237. 1789am_make=${MAKE-make} 1790AC_CACHE_CHECK([whether $am_make supports nested variables], 1791 [am_cv_make_support_nested_variables], 1792 [if AS_ECHO([['TRUE=$(BAR$(V)) 1793BAR0=false 1794BAR1=true 1795V=1 1796am__doit: 1797 @$(TRUE) 1798.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1799 am_cv_make_support_nested_variables=yes 1800else 1801 am_cv_make_support_nested_variables=no 1802fi]) 1803if test $am_cv_make_support_nested_variables = yes; then 1804 dnl Using '$V' instead of '$(V)' breaks IRIX make. 1805 AM_V='$(V)' 1806 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1807else 1808 AM_V=$AM_DEFAULT_VERBOSITY 1809 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1810fi 1811AC_SUBST([AM_V])dnl 1812AM_SUBST_NOTMAKE([AM_V])dnl 1813AC_SUBST([AM_DEFAULT_V])dnl 1814AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1815AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1816AM_BACKSLASH='\' 1817AC_SUBST([AM_BACKSLASH])dnl 1818_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1819]) 1820 1821# Copyright (C) 2001-2020 Free Software Foundation, Inc. 1822# 1823# This file is free software; the Free Software Foundation 1824# gives unlimited permission to copy and/or distribute it, 1825# with or without modifications, as long as this notice is preserved. 1826 1827# AM_PROG_INSTALL_STRIP 1828# --------------------- 1829# One issue with vendor 'install' (even GNU) is that you can't 1830# specify the program used to strip binaries. This is especially 1831# annoying in cross-compiling environments, where the build's strip 1832# is unlikely to handle the host's binaries. 1833# Fortunately install-sh will honor a STRIPPROG variable, so we 1834# always use install-sh in "make install-strip", and initialize 1835# STRIPPROG with the value of the STRIP variable (set by the user). 1836AC_DEFUN([AM_PROG_INSTALL_STRIP], 1837[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1838# Installed binaries are usually stripped using 'strip' when the user 1839# run "make install-strip". However 'strip' might not be the right 1840# tool to use in cross-compilation environments, therefore Automake 1841# will honor the 'STRIP' environment variable to overrule this program. 1842dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1843if test "$cross_compiling" != no; then 1844 AC_CHECK_TOOL([STRIP], [strip], :) 1845fi 1846INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1847AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1848 1849# Copyright (C) 2006-2020 Free Software Foundation, Inc. 1850# 1851# This file is free software; the Free Software Foundation 1852# gives unlimited permission to copy and/or distribute it, 1853# with or without modifications, as long as this notice is preserved. 1854 1855# _AM_SUBST_NOTMAKE(VARIABLE) 1856# --------------------------- 1857# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1858# This macro is traced by Automake. 1859AC_DEFUN([_AM_SUBST_NOTMAKE]) 1860 1861# AM_SUBST_NOTMAKE(VARIABLE) 1862# -------------------------- 1863# Public sister of _AM_SUBST_NOTMAKE. 1864AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1865 1866# Check how to create a tarball. -*- Autoconf -*- 1867 1868# Copyright (C) 2004-2020 Free Software Foundation, Inc. 1869# 1870# This file is free software; the Free Software Foundation 1871# gives unlimited permission to copy and/or distribute it, 1872# with or without modifications, as long as this notice is preserved. 1873 1874# _AM_PROG_TAR(FORMAT) 1875# -------------------- 1876# Check how to create a tarball in format FORMAT. 1877# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1878# 1879# Substitute a variable $(am__tar) that is a command 1880# writing to stdout a FORMAT-tarball containing the directory 1881# $tardir. 1882# tardir=directory && $(am__tar) > result.tar 1883# 1884# Substitute a variable $(am__untar) that extract such 1885# a tarball read from stdin. 1886# $(am__untar) < result.tar 1887# 1888AC_DEFUN([_AM_PROG_TAR], 1889[# Always define AMTAR for backward compatibility. Yes, it's still used 1890# in the wild :-( We should find a proper way to deprecate it ... 1891AC_SUBST([AMTAR], ['$${TAR-tar}']) 1892 1893# We'll loop over all known methods to create a tar archive until one works. 1894_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1895 1896m4_if([$1], [v7], 1897 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1898 1899 [m4_case([$1], 1900 [ustar], 1901 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1902 # There is notably a 21 bits limit for the UID and the GID. In fact, 1903 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1904 # and bug#13588). 1905 am_max_uid=2097151 # 2^21 - 1 1906 am_max_gid=$am_max_uid 1907 # The $UID and $GID variables are not portable, so we need to resort 1908 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1909 # below are definitely unexpected, so allow the users to see them 1910 # (that is, avoid stderr redirection). 1911 am_uid=`id -u || echo unknown` 1912 am_gid=`id -g || echo unknown` 1913 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1914 if test $am_uid -le $am_max_uid; then 1915 AC_MSG_RESULT([yes]) 1916 else 1917 AC_MSG_RESULT([no]) 1918 _am_tools=none 1919 fi 1920 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1921 if test $am_gid -le $am_max_gid; then 1922 AC_MSG_RESULT([yes]) 1923 else 1924 AC_MSG_RESULT([no]) 1925 _am_tools=none 1926 fi], 1927 1928 [pax], 1929 [], 1930 1931 [m4_fatal([Unknown tar format])]) 1932 1933 AC_MSG_CHECKING([how to create a $1 tar archive]) 1934 1935 # Go ahead even if we have the value already cached. We do so because we 1936 # need to set the values for the 'am__tar' and 'am__untar' variables. 1937 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1938 1939 for _am_tool in $_am_tools; do 1940 case $_am_tool in 1941 gnutar) 1942 for _am_tar in tar gnutar gtar; do 1943 AM_RUN_LOG([$_am_tar --version]) && break 1944 done 1945 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1946 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1947 am__untar="$_am_tar -xf -" 1948 ;; 1949 plaintar) 1950 # Must skip GNU tar: if it does not support --format= it doesn't create 1951 # ustar tarball either. 1952 (tar --version) >/dev/null 2>&1 && continue 1953 am__tar='tar chf - "$$tardir"' 1954 am__tar_='tar chf - "$tardir"' 1955 am__untar='tar xf -' 1956 ;; 1957 pax) 1958 am__tar='pax -L -x $1 -w "$$tardir"' 1959 am__tar_='pax -L -x $1 -w "$tardir"' 1960 am__untar='pax -r' 1961 ;; 1962 cpio) 1963 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1964 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1965 am__untar='cpio -i -H $1 -d' 1966 ;; 1967 none) 1968 am__tar=false 1969 am__tar_=false 1970 am__untar=false 1971 ;; 1972 esac 1973 1974 # If the value was cached, stop now. We just wanted to have am__tar 1975 # and am__untar set. 1976 test -n "${am_cv_prog_tar_$1}" && break 1977 1978 # tar/untar a dummy directory, and stop if the command works. 1979 rm -rf conftest.dir 1980 mkdir conftest.dir 1981 echo GrepMe > conftest.dir/file 1982 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1983 rm -rf conftest.dir 1984 if test -s conftest.tar; then 1985 AM_RUN_LOG([$am__untar <conftest.tar]) 1986 AM_RUN_LOG([cat conftest.dir/file]) 1987 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1988 fi 1989 done 1990 rm -rf conftest.dir 1991 1992 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1993 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1994 1995AC_SUBST([am__tar]) 1996AC_SUBST([am__untar]) 1997]) # _AM_PROG_TAR 1998 1999m4_include([m4/gettext.m4]) 2000m4_include([m4/gtk-doc.m4]) 2001m4_include([m4/iconv.m4]) 2002m4_include([m4/intlmacosx.m4]) 2003m4_include([m4/lib-ld.m4]) 2004m4_include([m4/lib-link.m4]) 2005m4_include([m4/lib-prefix.m4]) 2006m4_include([m4/libtool.m4]) 2007m4_include([m4/ltoptions.m4]) 2008m4_include([m4/ltsugar.m4]) 2009m4_include([m4/ltversion.m4]) 2010m4_include([m4/lt~obsolete.m4]) 2011m4_include([m4/nls.m4]) 2012m4_include([m4/po.m4]) 2013m4_include([m4/progtest.m4]) 2014