| 1 |
# generated automatically by aclocal 1.16.5 -*- Autoconf -*- |
| 2 |
|
| 3 |
# Copyright (C) 1996-2021 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 |
|
| 14 |
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) |
| 15 |
m4_ifndef([AC_AUTOCONF_VERSION], |
| 16 |
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| 17 |
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, |
| 18 |
[m4_warning([this file was generated for autoconf 2.71. |
| 19 |
You have another version of autoconf. It may work, but is not guaranteed to. |
| 20 |
If you have problems, you may need to regenerate the build system entirely. |
| 21 |
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
| 22 |
|
| 23 |
# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- |
| 24 |
# |
| 25 |
# Copyright (C) 1999-2008, 2011-2019, 2021-2022 Free Software |
| 26 |
# Foundation, Inc. |
| 27 |
# Written by Thomas Tanner, 1999 |
| 28 |
# |
| 29 |
# This file is free software; the Free Software Foundation gives |
| 30 |
# unlimited permission to copy and/or distribute it, with or without |
| 31 |
# modifications, as long as this notice is preserved. |
| 32 |
|
| 33 |
# serial 21 LTDL_INIT |
| 34 |
|
| 35 |
# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) |
| 36 |
# ------------------------------------------ |
| 37 |
# DIRECTORY contains the libltdl sources. It is okay to call this |
| 38 |
# function multiple times, as long as the same DIRECTORY is always given. |
| 39 |
AC_DEFUN([LT_CONFIG_LTDL_DIR], |
| 40 |
[AC_BEFORE([$0], [LTDL_INIT]) |
| 41 |
_$0($*) |
| 42 |
])# LT_CONFIG_LTDL_DIR |
| 43 |
|
| 44 |
# We break this out into a separate macro, so that we can call it safely |
| 45 |
# internally without being caught accidentally by the sed scan in libtoolize. |
| 46 |
m4_defun([_LT_CONFIG_LTDL_DIR], |
| 47 |
[dnl remove trailing slashes |
| 48 |
m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) |
| 49 |
m4_case(_LTDL_DIR, |
| 50 |
[], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply '.' |
| 51 |
m4_if(_ARG_DIR, [.], |
| 52 |
[], |
| 53 |
[m4_define([_LTDL_DIR], _ARG_DIR) |
| 54 |
_LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], |
| 55 |
[m4_if(_ARG_DIR, _LTDL_DIR, |
| 56 |
[], |
| 57 |
[m4_fatal([multiple libltdl directories: ']_LTDL_DIR[', ']_ARG_DIR['])])]) |
| 58 |
m4_popdef([_ARG_DIR]) |
| 59 |
])# _LT_CONFIG_LTDL_DIR |
| 60 |
|
| 61 |
# Initialise: |
| 62 |
m4_define([_LTDL_DIR], []) |
| 63 |
|
| 64 |
|
| 65 |
# _LT_BUILD_PREFIX |
| 66 |
# ---------------- |
| 67 |
# If Autoconf is new enough, expand to '$(top_build_prefix)', otherwise |
| 68 |
# to '$(top_builddir)/'. |
| 69 |
m4_define([_LT_BUILD_PREFIX], |
| 70 |
[m4_ifdef([AC_AUTOCONF_VERSION], |
| 71 |
[m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), |
| 72 |
[-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], |
| 73 |
[$(top_build_prefix)], |
| 74 |
[$(top_builddir)/])], |
| 75 |
[$(top_build_prefix)])], |
| 76 |
[$(top_builddir)/])[]dnl |
| 77 |
]) |
| 78 |
|
| 79 |
|
| 80 |
# LTDL_CONVENIENCE |
| 81 |
# ---------------- |
| 82 |
# sets LIBLTDL to the link flags for the libltdl convenience library and |
| 83 |
# LTDLINCL to the include flags for the libltdl header and adds |
| 84 |
# --enable-ltdl-convenience to the configure arguments. Note that |
| 85 |
# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with |
| 86 |
# '$(top_build_prefix)' if available, otherwise with '$(top_builddir)/', |
| 87 |
# and LTDLINCL will be prefixed with '$(top_srcdir)/' (note the single |
| 88 |
# quotes!). If your package is not flat and you're not using automake, |
| 89 |
# define top_build_prefix, top_builddir, and top_srcdir appropriately |
| 90 |
# in your Makefiles. |
| 91 |
AC_DEFUN([LTDL_CONVENIENCE], |
| 92 |
[AC_BEFORE([$0], [LTDL_INIT])dnl |
| 93 |
dnl Although the argument is deprecated and no longer documented, |
| 94 |
dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one |
| 95 |
dnl here make sure it is the same as any other declaration of libltdl's |
| 96 |
dnl location! This also ensures lt_ltdl_dir is set when configure.ac is |
| 97 |
dnl not yet using an explicit LT_CONFIG_LTDL_DIR. |
| 98 |
m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl |
| 99 |
_$0() |
| 100 |
])# LTDL_CONVENIENCE |
| 101 |
|
| 102 |
# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, |
| 103 |
# now we have LT_CONFIG_LTDL_DIR: |
| 104 |
AU_DEFUN([AC_LIBLTDL_CONVENIENCE], |
| 105 |
[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) |
| 106 |
_LTDL_CONVENIENCE]) |
| 107 |
|
| 108 |
dnl aclocal-1.4 backwards compatibility: |
| 109 |
dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) |
| 110 |
|
| 111 |
|
| 112 |
# _LTDL_CONVENIENCE |
| 113 |
# ----------------- |
| 114 |
# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). |
| 115 |
m4_defun([_LTDL_CONVENIENCE], |
| 116 |
[case $enable_ltdl_convenience in |
| 117 |
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
| 118 |
"") enable_ltdl_convenience=yes |
| 119 |
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
| 120 |
esac |
| 121 |
LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" |
| 122 |
LTDLDEPS=$LIBLTDL |
| 123 |
LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}" |
| 124 |
|
| 125 |
AC_SUBST([LIBLTDL]) |
| 126 |
AC_SUBST([LTDLDEPS]) |
| 127 |
AC_SUBST([LTDLINCL]) |
| 128 |
|
| 129 |
# For backwards non-gettext consistent compatibility... |
| 130 |
INCLTDL=$LTDLINCL |
| 131 |
AC_SUBST([INCLTDL]) |
| 132 |
])# _LTDL_CONVENIENCE |
| 133 |
|
| 134 |
|
| 135 |
# LTDL_INSTALLABLE |
| 136 |
# ---------------- |
| 137 |
# sets LIBLTDL to the link flags for the libltdl installable library |
| 138 |
# and LTDLINCL to the include flags for the libltdl header and adds |
| 139 |
# --enable-ltdl-install to the configure arguments. Note that |
| 140 |
# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl |
| 141 |
# is not found, LIBLTDL will be prefixed with '$(top_build_prefix)' if |
| 142 |
# available, otherwise with '$(top_builddir)/', and LTDLINCL will be |
| 143 |
# prefixed with '$(top_srcdir)/' (note the single quotes!). If your |
| 144 |
# package is not flat and you're not using automake, define top_build_prefix, |
| 145 |
# top_builddir, and top_srcdir appropriately in your Makefiles. |
| 146 |
# In the future, this macro may have to be called after LT_INIT. |
| 147 |
AC_DEFUN([LTDL_INSTALLABLE], |
| 148 |
[AC_BEFORE([$0], [LTDL_INIT])dnl |
| 149 |
dnl Although the argument is deprecated and no longer documented, |
| 150 |
dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one |
| 151 |
dnl here make sure it is the same as any other declaration of libltdl's |
| 152 |
dnl location! This also ensures lt_ltdl_dir is set when configure.ac is |
| 153 |
dnl not yet using an explicit LT_CONFIG_LTDL_DIR. |
| 154 |
m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl |
| 155 |
_$0() |
| 156 |
])# LTDL_INSTALLABLE |
| 157 |
|
| 158 |
# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, |
| 159 |
# now we have LT_CONFIG_LTDL_DIR: |
| 160 |
AU_DEFUN([AC_LIBLTDL_INSTALLABLE], |
| 161 |
[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) |
| 162 |
_LTDL_INSTALLABLE]) |
| 163 |
|
| 164 |
dnl aclocal-1.4 backwards compatibility: |
| 165 |
dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) |
| 166 |
|
| 167 |
|
| 168 |
# _LTDL_INSTALLABLE |
| 169 |
# ----------------- |
| 170 |
# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). |
| 171 |
m4_defun([_LTDL_INSTALLABLE], |
| 172 |
[if test -f "$prefix/lib/libltdl.la"; then |
| 173 |
lt_save_LDFLAGS=$LDFLAGS |
| 174 |
LDFLAGS="-L$prefix/lib $LDFLAGS" |
| 175 |
AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) |
| 176 |
LDFLAGS=$lt_save_LDFLAGS |
| 177 |
if test yes = "${lt_lib_ltdl-no}"; then |
| 178 |
if test yes != "$enable_ltdl_install"; then |
| 179 |
# Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install |
| 180 |
AC_MSG_WARN([not overwriting libltdl at $prefix, force with '--enable-ltdl-install']) |
| 181 |
enable_ltdl_install=no |
| 182 |
fi |
| 183 |
elif test no = "$enable_ltdl_install"; then |
| 184 |
AC_MSG_WARN([libltdl not installed, but installation disabled]) |
| 185 |
fi |
| 186 |
fi |
| 187 |
|
| 188 |
# If configure.ac declared an installable ltdl, and the user didn't override |
| 189 |
# with --disable-ltdl-install, we will install the shipped libltdl. |
| 190 |
case $enable_ltdl_install in |
| 191 |
no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
| 192 |
LIBLTDL=-lltdl |
| 193 |
LTDLDEPS= |
| 194 |
LTDLINCL= |
| 195 |
;; |
| 196 |
*) enable_ltdl_install=yes |
| 197 |
ac_configure_args="$ac_configure_args --enable-ltdl-install" |
| 198 |
LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" |
| 199 |
LTDLDEPS=$LIBLTDL |
| 200 |
LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}" |
| 201 |
;; |
| 202 |
esac |
| 203 |
|
| 204 |
AC_SUBST([LIBLTDL]) |
| 205 |
AC_SUBST([LTDLDEPS]) |
| 206 |
AC_SUBST([LTDLINCL]) |
| 207 |
|
| 208 |
# For backwards non-gettext consistent compatibility... |
| 209 |
INCLTDL=$LTDLINCL |
| 210 |
AC_SUBST([INCLTDL]) |
| 211 |
])# LTDL_INSTALLABLE |
| 212 |
|
| 213 |
|
| 214 |
# _LTDL_MODE_DISPATCH |
| 215 |
# ------------------- |
| 216 |
m4_define([_LTDL_MODE_DISPATCH], |
| 217 |
[dnl If _LTDL_DIR is '.', then we are configuring libltdl itself: |
| 218 |
m4_if(_LTDL_DIR, [], |
| 219 |
[], |
| 220 |
dnl if _LTDL_MODE was not set already, the default value is 'subproject': |
| 221 |
[m4_case(m4_default(_LTDL_MODE, [subproject]), |
| 222 |
[subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) |
| 223 |
_LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir])], |
| 224 |
[nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir; lt_libobj_prefix=$lt_ltdl_dir/])], |
| 225 |
[recursive], [], |
| 226 |
[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl |
| 227 |
dnl Be careful not to expand twice: |
| 228 |
m4_define([$0], []) |
| 229 |
])# _LTDL_MODE_DISPATCH |
| 230 |
|
| 231 |
|
| 232 |
# _LT_LIBOBJ(MODULE_NAME) |
| 233 |
# ----------------------- |
| 234 |
# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead |
| 235 |
# of into LIBOBJS. |
| 236 |
AC_DEFUN([_LT_LIBOBJ], [ |
| 237 |
m4_pattern_allow([^_LT_LIBOBJS$]) |
| 238 |
_LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" |
| 239 |
])# _LT_LIBOBJS |
| 240 |
|
| 241 |
|
| 242 |
# LTDL_INIT([OPTIONS]) |
| 243 |
# -------------------- |
| 244 |
# Clients of libltdl can use this macro to allow the installer to |
| 245 |
# choose between a shipped copy of the ltdl sources or a preinstalled |
| 246 |
# version of the library. If the shipped ltdl sources are not in a |
| 247 |
# subdirectory named libltdl, the directory name must be given by |
| 248 |
# LT_CONFIG_LTDL_DIR. |
| 249 |
AC_DEFUN([LTDL_INIT], |
| 250 |
[dnl Parse OPTIONS |
| 251 |
_LT_SET_OPTIONS([$0], [$1]) |
| 252 |
|
| 253 |
dnl We need to keep our own list of libobjs separate from our parent project, |
| 254 |
dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while |
| 255 |
dnl we look for our own LIBOBJs. |
| 256 |
m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) |
| 257 |
m4_pushdef([AC_LIBSOURCES]) |
| 258 |
|
| 259 |
dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: |
| 260 |
m4_if(_LTDL_MODE, [], |
| 261 |
[m4_define([_LTDL_MODE], m4_default([$2], [subproject])) |
| 262 |
m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], |
| 263 |
[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) |
| 264 |
|
| 265 |
AC_ARG_WITH([included_ltdl], |
| 266 |
[AS_HELP_STRING([--with-included-ltdl], |
| 267 |
[use the GNU ltdl sources included here])]) |
| 268 |
|
| 269 |
if test yes != "$with_included_ltdl"; then |
| 270 |
# We are not being forced to use the included libltdl sources, so |
| 271 |
# decide whether there is a useful installed version we can use. |
| 272 |
AC_CHECK_HEADER([ltdl.h], |
| 273 |
[AC_CHECK_DECL([lt_dlinterface_register], |
| 274 |
[AC_CHECK_LIB([ltdl], [lt_dladvise_preload], |
| 275 |
[with_included_ltdl=no], |
| 276 |
[with_included_ltdl=yes])], |
| 277 |
[with_included_ltdl=yes], |
| 278 |
[AC_INCLUDES_DEFAULT |
| 279 |
#include <ltdl.h>])], |
| 280 |
[with_included_ltdl=yes], |
| 281 |
[AC_INCLUDES_DEFAULT] |
| 282 |
) |
| 283 |
fi |
| 284 |
|
| 285 |
dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE |
| 286 |
dnl was called yet, then for old times' sake, we assume libltdl is in an |
| 287 |
dnl eponymous directory: |
| 288 |
AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) |
| 289 |
|
| 290 |
AC_ARG_WITH([ltdl_include], |
| 291 |
[AS_HELP_STRING([--with-ltdl-include=DIR], |
| 292 |
[use the ltdl headers installed in DIR])]) |
| 293 |
|
| 294 |
if test -n "$with_ltdl_include"; then |
| 295 |
if test -f "$with_ltdl_include/ltdl.h"; then : |
| 296 |
else |
| 297 |
AC_MSG_ERROR([invalid ltdl include directory: '$with_ltdl_include']) |
| 298 |
fi |
| 299 |
else |
| 300 |
with_ltdl_include=no |
| 301 |
fi |
| 302 |
|
| 303 |
AC_ARG_WITH([ltdl_lib], |
| 304 |
[AS_HELP_STRING([--with-ltdl-lib=DIR], |
| 305 |
[use the libltdl.la installed in DIR])]) |
| 306 |
|
| 307 |
if test -n "$with_ltdl_lib"; then |
| 308 |
if test -f "$with_ltdl_lib/libltdl.la"; then : |
| 309 |
else |
| 310 |
AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib']) |
| 311 |
fi |
| 312 |
else |
| 313 |
with_ltdl_lib=no |
| 314 |
fi |
| 315 |
|
| 316 |
case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in |
| 317 |
,yes,no,no,) |
| 318 |
m4_case(m4_default(_LTDL_TYPE, [convenience]), |
| 319 |
[convenience], [_LTDL_CONVENIENCE], |
| 320 |
[installable], [_LTDL_INSTALLABLE], |
| 321 |
[m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) |
| 322 |
;; |
| 323 |
,no,no,no,) |
| 324 |
# If the included ltdl is not to be used, then use the |
| 325 |
# preinstalled libltdl we found. |
| 326 |
AC_DEFINE([HAVE_LTDL], [1], |
| 327 |
[Define this if a modern libltdl is already installed]) |
| 328 |
LIBLTDL=-lltdl |
| 329 |
LTDLDEPS= |
| 330 |
LTDLINCL= |
| 331 |
;; |
| 332 |
,no*,no,*) |
| 333 |
AC_MSG_ERROR(['--with-ltdl-include' and '--with-ltdl-lib' options must be used together]) |
| 334 |
;; |
| 335 |
*) with_included_ltdl=no |
| 336 |
LIBLTDL="-L$with_ltdl_lib -lltdl" |
| 337 |
LTDLDEPS= |
| 338 |
LTDLINCL=-I$with_ltdl_include |
| 339 |
;; |
| 340 |
esac |
| 341 |
INCLTDL=$LTDLINCL |
| 342 |
|
| 343 |
# Report our decision... |
| 344 |
AC_MSG_CHECKING([where to find libltdl headers]) |
| 345 |
AC_MSG_RESULT([$LTDLINCL]) |
| 346 |
AC_MSG_CHECKING([where to find libltdl library]) |
| 347 |
AC_MSG_RESULT([$LIBLTDL]) |
| 348 |
|
| 349 |
_LTDL_SETUP |
| 350 |
|
| 351 |
dnl restore autoconf definition. |
| 352 |
m4_popdef([AC_LIBOBJ]) |
| 353 |
m4_popdef([AC_LIBSOURCES]) |
| 354 |
|
| 355 |
AC_CONFIG_COMMANDS_PRE([ |
| 356 |
_ltdl_libobjs= |
| 357 |
_ltdl_ltlibobjs= |
| 358 |
if test -n "$_LT_LIBOBJS"; then |
| 359 |
# Remove the extension. |
| 360 |
_lt_sed_drop_objext='s/\.o$//;s/\.obj$//' |
| 361 |
for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | $SED "$_lt_sed_drop_objext" | sort -u`; do |
| 362 |
_ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" |
| 363 |
_ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" |
| 364 |
done |
| 365 |
fi |
| 366 |
AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) |
| 367 |
AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) |
| 368 |
]) |
| 369 |
|
| 370 |
# Only expand once: |
| 371 |
m4_define([LTDL_INIT]) |
| 372 |
])# LTDL_INIT |
| 373 |
|
| 374 |
# Old names: |
| 375 |
AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) |
| 376 |
AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) |
| 377 |
AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) |
| 378 |
dnl aclocal-1.4 backwards compatibility: |
| 379 |
dnl AC_DEFUN([AC_LIB_LTDL], []) |
| 380 |
dnl AC_DEFUN([AC_WITH_LTDL], []) |
| 381 |
dnl AC_DEFUN([LT_WITH_LTDL], []) |
| 382 |
|
| 383 |
|
| 384 |
# _LTDL_SETUP |
| 385 |
# ----------- |
| 386 |
# Perform all the checks necessary for compilation of the ltdl objects |
| 387 |
# -- including compiler checks and header checks. This is a public |
| 388 |
# interface mainly for the benefit of libltdl's own configure.ac, most |
| 389 |
# other users should call LTDL_INIT instead. |
| 390 |
AC_DEFUN([_LTDL_SETUP], |
| 391 |
[AC_REQUIRE([AC_PROG_CC])dnl |
| 392 |
AC_REQUIRE([LT_SYS_MODULE_EXT])dnl |
| 393 |
AC_REQUIRE([LT_SYS_MODULE_PATH])dnl |
| 394 |
AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl |
| 395 |
AC_REQUIRE([LT_LIB_DLLOAD])dnl |
| 396 |
AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl |
| 397 |
AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl |
| 398 |
AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl |
| 399 |
AC_REQUIRE([LT_FUNC_ARGZ])dnl |
| 400 |
|
| 401 |
m4_require([_LT_CHECK_OBJDIR])dnl |
| 402 |
m4_require([_LT_HEADER_DLFCN])dnl |
| 403 |
m4_require([_LT_CHECK_DLPREOPEN])dnl |
| 404 |
m4_require([_LT_DECL_SED])dnl |
| 405 |
|
| 406 |
dnl Don't require this, or it will be expanded earlier than the code |
| 407 |
dnl that sets the variables it relies on: |
| 408 |
_LT_ENABLE_INSTALL |
| 409 |
|
| 410 |
dnl _LTDL_MODE specific code must be called at least once: |
| 411 |
_LTDL_MODE_DISPATCH |
| 412 |
|
| 413 |
# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS |
| 414 |
# the user used. This is so that ltdl.h can pick up the parent projects |
| 415 |
# config.h file, The first file in AC_CONFIG_HEADERS must contain the |
| 416 |
# definitions required by ltdl.c. |
| 417 |
# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). |
| 418 |
AC_CONFIG_COMMANDS_PRE([dnl |
| 419 |
m4_pattern_allow([^LT_CONFIG_H$])dnl |
| 420 |
m4_ifset([AH_HEADER], |
| 421 |
[LT_CONFIG_H=AH_HEADER], |
| 422 |
[m4_ifset([AC_LIST_HEADERS], |
| 423 |
[LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's|^[[ ]]*||;s|[[ :]].*$||'`], |
| 424 |
[])])]) |
| 425 |
AC_SUBST([LT_CONFIG_H]) |
| 426 |
|
| 427 |
AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], |
| 428 |
[], [], [AC_INCLUDES_DEFAULT]) |
| 429 |
|
| 430 |
AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) |
| 431 |
AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) |
| 432 |
|
| 433 |
m4_pattern_allow([LT_LIBEXT])dnl |
| 434 |
AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) |
| 435 |
|
| 436 |
name= |
| 437 |
eval "lt_libprefix=\"$libname_spec\"" |
| 438 |
m4_pattern_allow([LT_LIBPREFIX])dnl |
| 439 |
AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix]) |
| 440 |
|
| 441 |
name=ltdl |
| 442 |
eval "LTDLOPEN=\"$libname_spec\"" |
| 443 |
AC_SUBST([LTDLOPEN]) |
| 444 |
])# _LTDL_SETUP |
| 445 |
|
| 446 |
|
| 447 |
# _LT_ENABLE_INSTALL |
| 448 |
# ------------------ |
| 449 |
m4_define([_LT_ENABLE_INSTALL], |
| 450 |
[AC_ARG_ENABLE([ltdl-install], |
| 451 |
[AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) |
| 452 |
|
| 453 |
case ,$enable_ltdl_install,$enable_ltdl_convenience in |
| 454 |
*yes*) ;; |
| 455 |
*) enable_ltdl_convenience=yes ;; |
| 456 |
esac |
| 457 |
|
| 458 |
m4_ifdef([AM_CONDITIONAL], |
| 459 |
[AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}") |
| 460 |
AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")]) |
| 461 |
])# _LT_ENABLE_INSTALL |
| 462 |
|
| 463 |
|
| 464 |
# LT_SYS_DLOPEN_DEPLIBS |
| 465 |
# --------------------- |
| 466 |
AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], |
| 467 |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 468 |
AC_CACHE_CHECK([whether deplibs are loaded by dlopen], |
| 469 |
[lt_cv_sys_dlopen_deplibs], |
| 470 |
[# PORTME does your system automatically load deplibs for dlopen? |
| 471 |
# or its logical equivalent (e.g. shl_load for HP-UX < 11) |
| 472 |
# For now, we just catch OSes we know something about -- in the |
| 473 |
# future, we'll try test this programmatically. |
| 474 |
lt_cv_sys_dlopen_deplibs=unknown |
| 475 |
case $host_os in |
| 476 |
aix3*|aix4.1.*|aix4.2.*) |
| 477 |
# Unknown whether this is true for these versions of AIX, but |
| 478 |
# we want this 'case' here to explicitly catch those versions. |
| 479 |
lt_cv_sys_dlopen_deplibs=unknown |
| 480 |
;; |
| 481 |
aix[[4-9]]*) |
| 482 |
lt_cv_sys_dlopen_deplibs=yes |
| 483 |
;; |
| 484 |
amigaos*) |
| 485 |
case $host_cpu in |
| 486 |
powerpc) |
| 487 |
lt_cv_sys_dlopen_deplibs=no |
| 488 |
;; |
| 489 |
esac |
| 490 |
;; |
| 491 |
bitrig*) |
| 492 |
lt_cv_sys_dlopen_deplibs=yes |
| 493 |
;; |
| 494 |
darwin*) |
| 495 |
# Assuming the user has installed a libdl from somewhere, this is true |
| 496 |
# If you are looking for one http://www.opendarwin.org/projects/dlcompat |
| 497 |
lt_cv_sys_dlopen_deplibs=yes |
| 498 |
;; |
| 499 |
freebsd* | dragonfly* | midnightbsd*) |
| 500 |
lt_cv_sys_dlopen_deplibs=yes |
| 501 |
;; |
| 502 |
gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu) |
| 503 |
# GNU and its variants, using gnu ld.so (Glibc) |
| 504 |
lt_cv_sys_dlopen_deplibs=yes |
| 505 |
;; |
| 506 |
hpux10*|hpux11*) |
| 507 |
lt_cv_sys_dlopen_deplibs=yes |
| 508 |
;; |
| 509 |
interix*) |
| 510 |
lt_cv_sys_dlopen_deplibs=yes |
| 511 |
;; |
| 512 |
irix[[12345]]*|irix6.[[01]]*) |
| 513 |
# Catch all versions of IRIX before 6.2, and indicate that we don't |
| 514 |
# know how it worked for any of those versions. |
| 515 |
lt_cv_sys_dlopen_deplibs=unknown |
| 516 |
;; |
| 517 |
irix*) |
| 518 |
# The case above catches anything before 6.2, and it's known that |
| 519 |
# at 6.2 and later dlopen does load deplibs. |
| 520 |
lt_cv_sys_dlopen_deplibs=yes |
| 521 |
;; |
| 522 |
netbsd* | netbsdelf*-gnu) |
| 523 |
lt_cv_sys_dlopen_deplibs=yes |
| 524 |
;; |
| 525 |
openbsd*) |
| 526 |
lt_cv_sys_dlopen_deplibs=yes |
| 527 |
;; |
| 528 |
osf[[1234]]*) |
| 529 |
# dlopen did load deplibs (at least at 4.x), but until the 5.x series, |
| 530 |
# it did *not* use an RPATH in a shared library to find objects the |
| 531 |
# library depends on, so we explicitly say 'no'. |
| 532 |
lt_cv_sys_dlopen_deplibs=no |
| 533 |
;; |
| 534 |
osf5.0|osf5.0a|osf5.1) |
| 535 |
# dlopen *does* load deplibs and with the right loader patch applied |
| 536 |
# it even uses RPATH in a shared library to search for shared objects |
| 537 |
# that the library depends on, but there's no easy way to know if that |
| 538 |
# patch is installed. Since this is the case, all we can really |
| 539 |
# say is unknown -- it depends on the patch being installed. If |
| 540 |
# it is, this changes to 'yes'. Without it, it would be 'no'. |
| 541 |
lt_cv_sys_dlopen_deplibs=unknown |
| 542 |
;; |
| 543 |
osf*) |
| 544 |
# the two cases above should catch all versions of osf <= 5.1. Read |
| 545 |
# the comments above for what we know about them. |
| 546 |
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library |
| 547 |
# is used to find them so we can finally say 'yes'. |
| 548 |
lt_cv_sys_dlopen_deplibs=yes |
| 549 |
;; |
| 550 |
qnx*) |
| 551 |
lt_cv_sys_dlopen_deplibs=yes |
| 552 |
;; |
| 553 |
solaris*) |
| 554 |
lt_cv_sys_dlopen_deplibs=yes |
| 555 |
;; |
| 556 |
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
| 557 |
libltdl_cv_sys_dlopen_deplibs=yes |
| 558 |
;; |
| 559 |
esac |
| 560 |
]) |
| 561 |
if test yes != "$lt_cv_sys_dlopen_deplibs"; then |
| 562 |
AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], |
| 563 |
[Define if the OS needs help to load dependent libraries for dlopen().]) |
| 564 |
fi |
| 565 |
])# LT_SYS_DLOPEN_DEPLIBS |
| 566 |
|
| 567 |
# Old name: |
| 568 |
AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) |
| 569 |
dnl aclocal-1.4 backwards compatibility: |
| 570 |
dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) |
| 571 |
|
| 572 |
|
| 573 |
# LT_SYS_MODULE_EXT |
| 574 |
# ----------------- |
| 575 |
AC_DEFUN([LT_SYS_MODULE_EXT], |
| 576 |
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl |
| 577 |
AC_CACHE_CHECK([what extension is used for runtime loadable modules], |
| 578 |
[libltdl_cv_shlibext], |
| 579 |
[ |
| 580 |
module=yes |
| 581 |
eval libltdl_cv_shlibext=$shrext_cmds |
| 582 |
module=no |
| 583 |
eval libltdl_cv_shrext=$shrext_cmds |
| 584 |
]) |
| 585 |
if test -n "$libltdl_cv_shlibext"; then |
| 586 |
m4_pattern_allow([LT_MODULE_EXT])dnl |
| 587 |
AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], |
| 588 |
[Define to the extension used for runtime loadable modules, say, ".so".]) |
| 589 |
fi |
| 590 |
if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then |
| 591 |
m4_pattern_allow([LT_SHARED_EXT])dnl |
| 592 |
AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"], |
| 593 |
[Define to the shared library suffix, say, ".dylib".]) |
| 594 |
fi |
| 595 |
if test -n "$shared_archive_member_spec"; then |
| 596 |
m4_pattern_allow([LT_SHARED_LIB_MEMBER])dnl |
| 597 |
AC_DEFINE_UNQUOTED([LT_SHARED_LIB_MEMBER], ["($shared_archive_member_spec.o)"], |
| 598 |
[Define to the shared archive member specification, say "(shr.o)".]) |
| 599 |
fi |
| 600 |
])# LT_SYS_MODULE_EXT |
| 601 |
|
| 602 |
# Old name: |
| 603 |
AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) |
| 604 |
dnl aclocal-1.4 backwards compatibility: |
| 605 |
dnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) |
| 606 |
|
| 607 |
|
| 608 |
# LT_SYS_MODULE_PATH |
| 609 |
# ------------------ |
| 610 |
AC_DEFUN([LT_SYS_MODULE_PATH], |
| 611 |
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl |
| 612 |
AC_CACHE_CHECK([what variable specifies run-time module search path], |
| 613 |
[lt_cv_module_path_var], [lt_cv_module_path_var=$shlibpath_var]) |
| 614 |
if test -n "$lt_cv_module_path_var"; then |
| 615 |
m4_pattern_allow([LT_MODULE_PATH_VAR])dnl |
| 616 |
AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], |
| 617 |
[Define to the name of the environment variable that determines the run-time module search path.]) |
| 618 |
fi |
| 619 |
])# LT_SYS_MODULE_PATH |
| 620 |
|
| 621 |
# Old name: |
| 622 |
AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) |
| 623 |
dnl aclocal-1.4 backwards compatibility: |
| 624 |
dnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) |
| 625 |
|
| 626 |
|
| 627 |
# LT_SYS_DLSEARCH_PATH |
| 628 |
# -------------------- |
| 629 |
AC_DEFUN([LT_SYS_DLSEARCH_PATH], |
| 630 |
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl |
| 631 |
AC_CACHE_CHECK([for the default library search path], |
| 632 |
[lt_cv_sys_dlsearch_path], |
| 633 |
[lt_cv_sys_dlsearch_path=$sys_lib_dlsearch_path_spec]) |
| 634 |
if test -n "$lt_cv_sys_dlsearch_path"; then |
| 635 |
sys_dlsearch_path= |
| 636 |
for dir in $lt_cv_sys_dlsearch_path; do |
| 637 |
if test -z "$sys_dlsearch_path"; then |
| 638 |
sys_dlsearch_path=$dir |
| 639 |
else |
| 640 |
sys_dlsearch_path=$sys_dlsearch_path$PATH_SEPARATOR$dir |
| 641 |
fi |
| 642 |
done |
| 643 |
m4_pattern_allow([LT_DLSEARCH_PATH])dnl |
| 644 |
AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], |
| 645 |
[Define to the system default library search path.]) |
| 646 |
fi |
| 647 |
])# LT_SYS_DLSEARCH_PATH |
| 648 |
|
| 649 |
# Old name: |
| 650 |
AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) |
| 651 |
dnl aclocal-1.4 backwards compatibility: |
| 652 |
dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) |
| 653 |
|
| 654 |
|
| 655 |
# _LT_CHECK_DLPREOPEN |
| 656 |
# ------------------- |
| 657 |
m4_defun([_LT_CHECK_DLPREOPEN], |
| 658 |
[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
| 659 |
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], |
| 660 |
[libltdl_cv_preloaded_symbols], |
| 661 |
[if test -n "$lt_cv_sys_global_symbol_pipe"; then |
| 662 |
libltdl_cv_preloaded_symbols=yes |
| 663 |
else |
| 664 |
libltdl_cv_preloaded_symbols=no |
| 665 |
fi |
| 666 |
]) |
| 667 |
if test yes = "$libltdl_cv_preloaded_symbols"; then |
| 668 |
AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], |
| 669 |
[Define if libtool can extract symbol lists from object files.]) |
| 670 |
fi |
| 671 |
])# _LT_CHECK_DLPREOPEN |
| 672 |
|
| 673 |
|
| 674 |
# LT_LIB_DLLOAD |
| 675 |
# ------------- |
| 676 |
AC_DEFUN([LT_LIB_DLLOAD], |
| 677 |
[m4_pattern_allow([^LT_DLLOADERS$]) |
| 678 |
LT_DLLOADERS= |
| 679 |
AC_SUBST([LT_DLLOADERS]) |
| 680 |
|
| 681 |
AC_LANG_PUSH([C]) |
| 682 |
lt_dlload_save_LIBS=$LIBS |
| 683 |
|
| 684 |
LIBADD_DLOPEN= |
| 685 |
AC_SEARCH_LIBS([dlopen], [dl], |
| 686 |
[AC_DEFINE([HAVE_LIBDL], [1], |
| 687 |
[Define if you have the libdl library or equivalent.]) |
| 688 |
if test "$ac_cv_search_dlopen" != "none required"; then |
| 689 |
LIBADD_DLOPEN=-ldl |
| 690 |
fi |
| 691 |
libltdl_cv_lib_dl_dlopen=yes |
| 692 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], |
| 693 |
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H |
| 694 |
# include <dlfcn.h> |
| 695 |
#endif |
| 696 |
]], [[dlopen(0, 0);]])], |
| 697 |
[AC_DEFINE([HAVE_LIBDL], [1], |
| 698 |
[Define if you have the libdl library or equivalent.]) |
| 699 |
libltdl_cv_func_dlopen=yes |
| 700 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], |
| 701 |
[AC_CHECK_LIB([svld], [dlopen], |
| 702 |
[AC_DEFINE([HAVE_LIBDL], [1], |
| 703 |
[Define if you have the libdl library or equivalent.]) |
| 704 |
LIBADD_DLOPEN=-lsvld libltdl_cv_func_dlopen=yes |
| 705 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) |
| 706 |
if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen" |
| 707 |
then |
| 708 |
lt_save_LIBS=$LIBS |
| 709 |
LIBS="$LIBS $LIBADD_DLOPEN" |
| 710 |
AC_CHECK_FUNCS([dlerror]) |
| 711 |
LIBS=$lt_save_LIBS |
| 712 |
fi |
| 713 |
AC_SUBST([LIBADD_DLOPEN]) |
| 714 |
|
| 715 |
LIBADD_SHL_LOAD= |
| 716 |
AC_CHECK_FUNC([shl_load], |
| 717 |
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
| 718 |
[Define if you have the shl_load function.]) |
| 719 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], |
| 720 |
[AC_CHECK_LIB([dld], [shl_load], |
| 721 |
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
| 722 |
[Define if you have the shl_load function.]) |
| 723 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" |
| 724 |
LIBADD_SHL_LOAD=-ldld])]) |
| 725 |
AC_SUBST([LIBADD_SHL_LOAD]) |
| 726 |
|
| 727 |
case $host_os in |
| 728 |
darwin[[1567]].*) |
| 729 |
# We only want this for pre-Mac OS X 10.4. |
| 730 |
AC_CHECK_FUNC([_dyld_func_lookup], |
| 731 |
[AC_DEFINE([HAVE_DYLD], [1], |
| 732 |
[Define if you have the _dyld_func_lookup function.]) |
| 733 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) |
| 734 |
;; |
| 735 |
beos*) |
| 736 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" |
| 737 |
;; |
| 738 |
cygwin* | mingw* | pw32*) |
| 739 |
AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]]) |
| 740 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" |
| 741 |
;; |
| 742 |
esac |
| 743 |
|
| 744 |
AC_CHECK_LIB([dld], [dld_link], |
| 745 |
[AC_DEFINE([HAVE_DLD], [1], |
| 746 |
[Define if you have the GNU dld library.]) |
| 747 |
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) |
| 748 |
AC_SUBST([LIBADD_DLD_LINK]) |
| 749 |
|
| 750 |
m4_pattern_allow([^LT_DLPREOPEN$]) |
| 751 |
LT_DLPREOPEN= |
| 752 |
if test -n "$LT_DLLOADERS" |
| 753 |
then |
| 754 |
for lt_loader in $LT_DLLOADERS; do |
| 755 |
LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " |
| 756 |
done |
| 757 |
AC_DEFINE([HAVE_LIBDLLOADER], [1], |
| 758 |
[Define if libdlloader will be built on this platform]) |
| 759 |
fi |
| 760 |
AC_SUBST([LT_DLPREOPEN]) |
| 761 |
|
| 762 |
dnl This isn't used anymore, but set it for backwards compatibility |
| 763 |
LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" |
| 764 |
AC_SUBST([LIBADD_DL]) |
| 765 |
|
| 766 |
LIBS=$lt_dlload_save_LIBS |
| 767 |
AC_LANG_POP |
| 768 |
])# LT_LIB_DLLOAD |
| 769 |
|
| 770 |
# Old name: |
| 771 |
AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) |
| 772 |
dnl aclocal-1.4 backwards compatibility: |
| 773 |
dnl AC_DEFUN([AC_LTDL_DLLIB], []) |
| 774 |
|
| 775 |
|
| 776 |
# LT_SYS_SYMBOL_USCORE |
| 777 |
# -------------------- |
| 778 |
# does the compiler prefix global symbols with an underscore? |
| 779 |
AC_DEFUN([LT_SYS_SYMBOL_USCORE], |
| 780 |
[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
| 781 |
AC_CACHE_CHECK([for _ prefix in compiled symbols], |
| 782 |
[lt_cv_sys_symbol_underscore], |
| 783 |
[lt_cv_sys_symbol_underscore=no |
| 784 |
cat > conftest.$ac_ext <<_LT_EOF |
| 785 |
void nm_test_func(){} |
| 786 |
int main(){nm_test_func;return 0;} |
| 787 |
_LT_EOF |
| 788 |
if AC_TRY_EVAL(ac_compile); then |
| 789 |
# Now try to grab the symbols. |
| 790 |
ac_nlist=conftest.nm |
| 791 |
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then |
| 792 |
# See whether the symbols have a leading underscore. |
| 793 |
if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then |
| 794 |
lt_cv_sys_symbol_underscore=yes |
| 795 |
else |
| 796 |
if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then |
| 797 |
: |
| 798 |
else |
| 799 |
echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD |
| 800 |
fi |
| 801 |
fi |
| 802 |
else |
| 803 |
echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
| 804 |
fi |
| 805 |
else |
| 806 |
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD |
| 807 |
cat conftest.c >&AS_MESSAGE_LOG_FD |
| 808 |
fi |
| 809 |
rm -rf conftest* |
| 810 |
]) |
| 811 |
sys_symbol_underscore=$lt_cv_sys_symbol_underscore |
| 812 |
AC_SUBST([sys_symbol_underscore]) |
| 813 |
])# LT_SYS_SYMBOL_USCORE |
| 814 |
|
| 815 |
# Old name: |
| 816 |
AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) |
| 817 |
dnl aclocal-1.4 backwards compatibility: |
| 818 |
dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) |
| 819 |
|
| 820 |
|
| 821 |
# LT_FUNC_DLSYM_USCORE |
| 822 |
# -------------------- |
| 823 |
AC_DEFUN([LT_FUNC_DLSYM_USCORE], |
| 824 |
[AC_REQUIRE([_LT_COMPILER_PIC])dnl for lt_prog_compiler_wl |
| 825 |
AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl for lt_cv_sys_symbol_underscore |
| 826 |
AC_REQUIRE([LT_SYS_MODULE_EXT])dnl for libltdl_cv_shlibext |
| 827 |
if test yes = "$lt_cv_sys_symbol_underscore"; then |
| 828 |
if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"; then |
| 829 |
AC_CACHE_CHECK([whether we have to add an underscore for dlsym], |
| 830 |
[libltdl_cv_need_uscore], |
| 831 |
[libltdl_cv_need_uscore=unknown |
| 832 |
dlsym_uscore_save_LIBS=$LIBS |
| 833 |
LIBS="$LIBS $LIBADD_DLOPEN" |
| 834 |
libname=conftmod # stay within 8.3 filename limits! |
| 835 |
cat >$libname.$ac_ext <<_LT_EOF |
| 836 |
[#line $LINENO "configure" |
| 837 |
#include "confdefs.h" |
| 838 |
/* When -fvisibility=hidden is used, assume the code has been annotated |
| 839 |
correspondingly for the symbols needed. */ |
| 840 |
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) |
| 841 |
int fnord () __attribute__((visibility("default"))); |
| 842 |
#endif |
| 843 |
int fnord () { return 42; }] |
| 844 |
_LT_EOF |
| 845 |
|
| 846 |
# ltfn_module_cmds module_cmds |
| 847 |
# Execute tilde-delimited MODULE_CMDS with environment primed for |
| 848 |
# $module_cmds or $archive_cmds type content. |
| 849 |
ltfn_module_cmds () |
| 850 |
{( # subshell avoids polluting parent global environment |
| 851 |
module_cmds_save_ifs=$IFS; IFS='~' |
| 852 |
for cmd in @S|@1; do |
| 853 |
IFS=$module_cmds_save_ifs |
| 854 |
libobjs=$libname.$ac_objext; lib=$libname$libltdl_cv_shlibext |
| 855 |
rpath=/not-exists; soname=$libname$libltdl_cv_shlibext; output_objdir=. |
| 856 |
major=; versuffix=; verstring=; deplibs= |
| 857 |
ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag= |
| 858 |
eval $cmd |
| 859 |
done |
| 860 |
IFS=$module_cmds_save_ifs |
| 861 |
)} |
| 862 |
|
| 863 |
# Compile a loadable module using libtool macro expansion results. |
| 864 |
$CC $pic_flag -c $libname.$ac_ext |
| 865 |
ltfn_module_cmds "${module_cmds:-$archive_cmds}" |
| 866 |
|
| 867 |
# Try to fetch fnord with dlsym(). |
| 868 |
libltdl_dlunknown=0; libltdl_dlnouscore=1; libltdl_dluscore=2 |
| 869 |
cat >conftest.$ac_ext <<_LT_EOF |
| 870 |
[#line $LINENO "configure" |
| 871 |
#include "confdefs.h" |
| 872 |
#if HAVE_DLFCN_H |
| 873 |
#include <dlfcn.h> |
| 874 |
#endif |
| 875 |
#include <stdio.h> |
| 876 |
#ifndef RTLD_GLOBAL |
| 877 |
# ifdef DL_GLOBAL |
| 878 |
# define RTLD_GLOBAL DL_GLOBAL |
| 879 |
# else |
| 880 |
# define RTLD_GLOBAL 0 |
| 881 |
# endif |
| 882 |
#endif |
| 883 |
#ifndef RTLD_NOW |
| 884 |
# ifdef DL_NOW |
| 885 |
# define RTLD_NOW DL_NOW |
| 886 |
# else |
| 887 |
# define RTLD_NOW 0 |
| 888 |
# endif |
| 889 |
#endif |
| 890 |
int main () { |
| 891 |
void *handle = dlopen ("`pwd`/$libname$libltdl_cv_shlibext", RTLD_GLOBAL|RTLD_NOW); |
| 892 |
int status = $libltdl_dlunknown; |
| 893 |
if (handle) { |
| 894 |
if (dlsym (handle, "fnord")) |
| 895 |
status = $libltdl_dlnouscore; |
| 896 |
else { |
| 897 |
if (dlsym (handle, "_fnord")) |
| 898 |
status = $libltdl_dluscore; |
| 899 |
else |
| 900 |
puts (dlerror ()); |
| 901 |
} |
| 902 |
dlclose (handle); |
| 903 |
} else |
| 904 |
puts (dlerror ()); |
| 905 |
return status; |
| 906 |
}] |
| 907 |
_LT_EOF |
| 908 |
if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then |
| 909 |
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null |
| 910 |
libltdl_status=$? |
| 911 |
case x$libltdl_status in |
| 912 |
x$libltdl_dlnouscore) libltdl_cv_need_uscore=no ;; |
| 913 |
x$libltdl_dluscore) libltdl_cv_need_uscore=yes ;; |
| 914 |
x*) libltdl_cv_need_uscore=unknown ;; |
| 915 |
esac |
| 916 |
fi |
| 917 |
rm -rf conftest* $libname* |
| 918 |
LIBS=$dlsym_uscore_save_LIBS |
| 919 |
]) |
| 920 |
fi |
| 921 |
fi |
| 922 |
|
| 923 |
if test yes = "$libltdl_cv_need_uscore"; then |
| 924 |
AC_DEFINE([NEED_USCORE], [1], |
| 925 |
[Define if dlsym() requires a leading underscore in symbol names.]) |
| 926 |
fi |
| 927 |
])# LT_FUNC_DLSYM_USCORE |
| 928 |
|
| 929 |
# Old name: |
| 930 |
AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) |
| 931 |
dnl aclocal-1.4 backwards compatibility: |
| 932 |
dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) |
| 933 |
|
| 934 |
# Copyright (C) 2002-2021 Free Software Foundation, Inc. |
| 935 |
# |
| 936 |
# This file is free software; the Free Software Foundation |
| 937 |
# gives unlimited permission to copy and/or distribute it, |
| 938 |
# with or without modifications, as long as this notice is preserved. |
| 939 |
|
| 940 |
# AM_AUTOMAKE_VERSION(VERSION) |
| 941 |
# ---------------------------- |
| 942 |
# Automake X.Y traces this macro to ensure aclocal.m4 has been |
| 943 |
# generated from the m4 files accompanying Automake X.Y. |
| 944 |
# (This private macro should not be called outside this file.) |
| 945 |
AC_DEFUN([AM_AUTOMAKE_VERSION], |
| 946 |
[am__api_version='1.16' |
| 947 |
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
| 948 |
dnl require some minimum version. Point them to the right macro. |
| 949 |
m4_if([$1], [1.16.5], [], |
| 950 |
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
| 951 |
]) |
| 952 |
|
| 953 |
# _AM_AUTOCONF_VERSION(VERSION) |
| 954 |
# ----------------------------- |
| 955 |
# aclocal traces this macro to find the Autoconf version. |
| 956 |
# This is a private macro too. Using m4_define simplifies |
| 957 |
# the logic in aclocal, which can simply ignore this definition. |
| 958 |
m4_define([_AM_AUTOCONF_VERSION], []) |
| 959 |
|
| 960 |
# AM_SET_CURRENT_AUTOMAKE_VERSION |
| 961 |
# ------------------------------- |
| 962 |
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
| 963 |
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
| 964 |
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
| 965 |
[AM_AUTOMAKE_VERSION([1.16.5])dnl |
| 966 |
m4_ifndef([AC_AUTOCONF_VERSION], |
| 967 |
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| 968 |
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
| 969 |
|
| 970 |
# AM_AUX_DIR_EXPAND -*- Autoconf -*- |
| 971 |
|
| 972 |
# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
| 973 |
# |
| 974 |
# This file is free software; the Free Software Foundation |
| 975 |
# gives unlimited permission to copy and/or distribute it, |
| 976 |
# with or without modifications, as long as this notice is preserved. |
| 977 |
|
| 978 |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
| 979 |
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to |
| 980 |
# '$srcdir', '$srcdir/..', or '$srcdir/../..'. |
| 981 |
# |
| 982 |
# Of course, Automake must honor this variable whenever it calls a |
| 983 |
# tool from the auxiliary directory. The problem is that $srcdir (and |
| 984 |
# therefore $ac_aux_dir as well) can be either absolute or relative, |
| 985 |
# depending on how configure is run. This is pretty annoying, since |
| 986 |
# it makes $ac_aux_dir quite unusable in subdirectories: in the top |
| 987 |
# source directory, any form will work fine, but in subdirectories a |
| 988 |
# relative path needs to be adjusted first. |
| 989 |
# |
| 990 |
# $ac_aux_dir/missing |
| 991 |
# fails when called from a subdirectory if $ac_aux_dir is relative |
| 992 |
# $top_srcdir/$ac_aux_dir/missing |
| 993 |
# fails if $ac_aux_dir is absolute, |
| 994 |
# fails when called from a subdirectory in a VPATH build with |
| 995 |
# a relative $ac_aux_dir |
| 996 |
# |
| 997 |
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
| 998 |
# are both prefixed by $srcdir. In an in-source build this is usually |
| 999 |
# harmless because $srcdir is '.', but things will broke when you |
| 1000 |
# start a VPATH build or use an absolute $srcdir. |
| 1001 |
# |
| 1002 |
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
| 1003 |
# iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
| 1004 |
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
| 1005 |
# and then we would define $MISSING as |
| 1006 |
# MISSING="\${SHELL} $am_aux_dir/missing" |
| 1007 |
# This will work as long as MISSING is not called from configure, because |
| 1008 |
# unfortunately $(top_srcdir) has no meaning in configure. |
| 1009 |
# However there are other variables, like CC, which are often used in |
| 1010 |
# configure, and could therefore not use this "fixed" $ac_aux_dir. |
| 1011 |
# |
| 1012 |
# Another solution, used here, is to always expand $ac_aux_dir to an |
| 1013 |
# absolute PATH. The drawback is that using absolute paths prevent a |
| 1014 |
# configured tree to be moved without reconfiguration. |
| 1015 |
|
| 1016 |
AC_DEFUN([AM_AUX_DIR_EXPAND], |
| 1017 |
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl |
| 1018 |
# Expand $ac_aux_dir to an absolute path. |
| 1019 |
am_aux_dir=`cd "$ac_aux_dir" && pwd` |
| 1020 |
]) |
| 1021 |
|
| 1022 |
# AM_COND_IF -*- Autoconf -*- |
| 1023 |
|
| 1024 |
# Copyright (C) 2008-2021 Free Software Foundation, Inc. |
| 1025 |
# |
| 1026 |
# This file is free software; the Free Software Foundation |
| 1027 |
# gives unlimited permission to copy and/or distribute it, |
| 1028 |
# with or without modifications, as long as this notice is preserved. |
| 1029 |
|
| 1030 |
# _AM_COND_IF |
| 1031 |
# _AM_COND_ELSE |
| 1032 |
# _AM_COND_ENDIF |
| 1033 |
# -------------- |
| 1034 |
# These macros are only used for tracing. |
| 1035 |
m4_define([_AM_COND_IF]) |
| 1036 |
m4_define([_AM_COND_ELSE]) |
| 1037 |
m4_define([_AM_COND_ENDIF]) |
| 1038 |
|
| 1039 |
# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) |
| 1040 |
# --------------------------------------- |
| 1041 |
# If the shell condition COND is true, execute IF-TRUE, otherwise execute |
| 1042 |
# IF-FALSE. Allow automake to learn about conditional instantiating macros |
| 1043 |
# (the AC_CONFIG_FOOS). |
| 1044 |
AC_DEFUN([AM_COND_IF], |
| 1045 |
[m4_ifndef([_AM_COND_VALUE_$1], |
| 1046 |
[m4_fatal([$0: no such condition "$1"])])dnl |
| 1047 |
_AM_COND_IF([$1])dnl |
| 1048 |
if test -z "$$1_TRUE"; then : |
| 1049 |
m4_n([$2])[]dnl |
| 1050 |
m4_ifval([$3], |
| 1051 |
[_AM_COND_ELSE([$1])dnl |
| 1052 |
else |
| 1053 |
$3 |
| 1054 |
])dnl |
| 1055 |
_AM_COND_ENDIF([$1])dnl |
| 1056 |
fi[]dnl |
| 1057 |
]) |
| 1058 |
|
| 1059 |
# AM_CONDITIONAL -*- Autoconf -*- |
| 1060 |
|
| 1061 |
# Copyright (C) 1997-2021 Free Software Foundation, Inc. |
| 1062 |
# |
| 1063 |
# This file is free software; the Free Software Foundation |
| 1064 |
# gives unlimited permission to copy and/or distribute it, |
| 1065 |
# with or without modifications, as long as this notice is preserved. |
| 1066 |
|
| 1067 |
# AM_CONDITIONAL(NAME, SHELL-CONDITION) |
| 1068 |
# ------------------------------------- |
| 1069 |
# Define a conditional. |
| 1070 |
AC_DEFUN([AM_CONDITIONAL], |
| 1071 |
[AC_PREREQ([2.52])dnl |
| 1072 |
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
| 1073 |
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
| 1074 |
AC_SUBST([$1_TRUE])dnl |
| 1075 |
AC_SUBST([$1_FALSE])dnl |
| 1076 |
_AM_SUBST_NOTMAKE([$1_TRUE])dnl |
| 1077 |
_AM_SUBST_NOTMAKE([$1_FALSE])dnl |
| 1078 |
m4_define([_AM_COND_VALUE_$1], [$2])dnl |
| 1079 |
if $2; then |
| 1080 |
$1_TRUE= |
| 1081 |
$1_FALSE='#' |
| 1082 |
else |
| 1083 |
$1_TRUE='#' |
| 1084 |
$1_FALSE= |
| 1085 |
fi |
| 1086 |
AC_CONFIG_COMMANDS_PRE( |
| 1087 |
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
| 1088 |
AC_MSG_ERROR([[conditional "$1" was never defined. |
| 1089 |
Usually this means the macro was only invoked conditionally.]]) |
| 1090 |
fi])]) |
| 1091 |
|
| 1092 |
# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
| 1093 |
# |
| 1094 |
# This file is free software; the Free Software Foundation |
| 1095 |
# gives unlimited permission to copy and/or distribute it, |
| 1096 |
# with or without modifications, as long as this notice is preserved. |
| 1097 |
|
| 1098 |
|
| 1099 |
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be |
| 1100 |
# written in clear, in which case automake, when reading aclocal.m4, |
| 1101 |
# will think it sees a *use*, and therefore will trigger all it's |
| 1102 |
# C support machinery. Also note that it means that autoscan, seeing |
| 1103 |
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
| 1104 |
|
| 1105 |
|
| 1106 |
# _AM_DEPENDENCIES(NAME) |
| 1107 |
# ---------------------- |
| 1108 |
# See how the compiler implements dependency checking. |
| 1109 |
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". |
| 1110 |
# We try a few techniques and use that to set a single cache variable. |
| 1111 |
# |
| 1112 |
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
| 1113 |
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
| 1114 |
# dependency, and given that the user is not expected to run this macro, |
| 1115 |
# just rely on AC_PROG_CC. |
| 1116 |
AC_DEFUN([_AM_DEPENDENCIES], |
| 1117 |
[AC_REQUIRE([AM_SET_DEPDIR])dnl |
| 1118 |
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
| 1119 |
AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
| 1120 |
AC_REQUIRE([AM_DEP_TRACK])dnl |
| 1121 |
|
| 1122 |
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], |
| 1123 |
[$1], [CXX], [depcc="$CXX" am_compiler_list=], |
| 1124 |
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
| 1125 |
[$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], |
| 1126 |
[$1], [UPC], [depcc="$UPC" am_compiler_list=], |
| 1127 |
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
| 1128 |
[depcc="$$1" am_compiler_list=]) |
| 1129 |
|
| 1130 |
AC_CACHE_CHECK([dependency style of $depcc], |
| 1131 |
[am_cv_$1_dependencies_compiler_type], |
| 1132 |
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
| 1133 |
# We make a subdir and do the tests there. Otherwise we can end up |
| 1134 |
# making bogus files that we don't know about and never remove. For |
| 1135 |
# instance it was reported that on HP-UX the gcc test will end up |
| 1136 |
# making a dummy file named 'D' -- because '-MD' means "put the output |
| 1137 |
# in D". |
| 1138 |
rm -rf conftest.dir |
| 1139 |
mkdir conftest.dir |
| 1140 |
# Copy depcomp to subdir because otherwise we won't find it if we're |
| 1141 |
# using a relative directory. |
| 1142 |
cp "$am_depcomp" conftest.dir |
| 1143 |
cd conftest.dir |
| 1144 |
# We will build objects and dependencies in a subdirectory because |
| 1145 |
# it helps to detect inapplicable dependency modes. For instance |
| 1146 |
# both Tru64's cc and ICC support -MD to output dependencies as a |
| 1147 |
# side effect of compilation, but ICC will put the dependencies in |
| 1148 |
# the current directory while Tru64 will put them in the object |
| 1149 |
# directory. |
| 1150 |
mkdir sub |
| 1151 |
|
| 1152 |
am_cv_$1_dependencies_compiler_type=none |
| 1153 |
if test "$am_compiler_list" = ""; then |
| 1154 |
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
| 1155 |
fi |
| 1156 |
am__universal=false |
| 1157 |
m4_case([$1], [CC], |
| 1158 |
[case " $depcc " in #( |
| 1159 |
*\ -arch\ *\ -arch\ *) am__universal=true ;; |
| 1160 |
esac], |
| 1161 |
[CXX], |
| 1162 |
[case " $depcc " in #( |
| 1163 |
*\ -arch\ *\ -arch\ *) am__universal=true ;; |
| 1164 |
esac]) |
| 1165 |
|
| 1166 |
for depmode in $am_compiler_list; do |
| 1167 |
# Setup a source with many dependencies, because some compilers |
| 1168 |
# like to wrap large dependency lists on column 80 (with \), and |
| 1169 |
# we should not choose a depcomp mode which is confused by this. |
| 1170 |
# |
| 1171 |
# We need to recreate these files for each test, as the compiler may |
| 1172 |
# overwrite some of them when testing with obscure command lines. |
| 1173 |
# This happens at least with the AIX C compiler. |
| 1174 |
: > sub/conftest.c |
| 1175 |
for i in 1 2 3 4 5 6; do |
| 1176 |
echo '#include "conftst'$i'.h"' >> sub/conftest.c |
| 1177 |
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with |
| 1178 |
# Solaris 10 /bin/sh. |
| 1179 |
echo '/* dummy */' > sub/conftst$i.h |
| 1180 |
done |
| 1181 |
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
| 1182 |
|
| 1183 |
# We check with '-c' and '-o' for the sake of the "dashmstdout" |
| 1184 |
# mode. It turns out that the SunPro C++ compiler does not properly |
| 1185 |
# handle '-M -o', and we need to detect this. Also, some Intel |
| 1186 |
# versions had trouble with output in subdirs. |
| 1187 |
am__obj=sub/conftest.${OBJEXT-o} |
| 1188 |
am__minus_obj="-o $am__obj" |
| 1189 |
case $depmode in |
| 1190 |
gcc) |
| 1191 |
# This depmode causes a compiler race in universal mode. |
| 1192 |
test "$am__universal" = false || continue |
| 1193 |
;; |
| 1194 |
nosideeffect) |
| 1195 |
# After this tag, mechanisms are not by side-effect, so they'll |
| 1196 |
# only be used when explicitly requested. |
| 1197 |
if test "x$enable_dependency_tracking" = xyes; then |
| 1198 |
continue |
| 1199 |
else |
| 1200 |
break |
| 1201 |
fi |
| 1202 |
;; |
| 1203 |
msvc7 | msvc7msys | msvisualcpp | msvcmsys) |
| 1204 |
# This compiler won't grok '-c -o', but also, the minuso test has |
| 1205 |
# not run yet. These depmodes are late enough in the game, and |
| 1206 |
# so weak that their functioning should not be impacted. |
| 1207 |
am__obj=conftest.${OBJEXT-o} |
| 1208 |
am__minus_obj= |
| 1209 |
;; |
| 1210 |
none) break ;; |
| 1211 |
esac |
| 1212 |
if depmode=$depmode \ |
| 1213 |
source=sub/conftest.c object=$am__obj \ |
| 1214 |
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
| 1215 |
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
| 1216 |
>/dev/null 2>conftest.err && |
| 1217 |
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
| 1218 |
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
| 1219 |
grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
| 1220 |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
| 1221 |
# icc doesn't choke on unknown options, it will just issue warnings |
| 1222 |
# or remarks (even with -Werror). So we grep stderr for any message |
| 1223 |
# that says an option was ignored or not supported. |
| 1224 |
# When given -MP, icc 7.0 and 7.1 complain thusly: |
| 1225 |
# icc: Command line warning: ignoring option '-M'; no argument required |
| 1226 |
# The diagnosis changed in icc 8.0: |
| 1227 |
# icc: Command line remark: option '-MP' not supported |
| 1228 |
if (grep 'ignoring option' conftest.err || |
| 1229 |
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
| 1230 |
am_cv_$1_dependencies_compiler_type=$depmode |
| 1231 |
break |
| 1232 |
fi |
| 1233 |
fi |
| 1234 |
done |
| 1235 |
|
| 1236 |
cd .. |
| 1237 |
rm -rf conftest.dir |
| 1238 |
else |
| 1239 |
am_cv_$1_dependencies_compiler_type=none |
| 1240 |
fi |
| 1241 |
]) |
| 1242 |
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
| 1243 |
AM_CONDITIONAL([am__fastdep$1], [ |
| 1244 |
test "x$enable_dependency_tracking" != xno \ |
| 1245 |
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
| 1246 |
]) |
| 1247 |
|
| 1248 |
|
| 1249 |
# AM_SET_DEPDIR |
| 1250 |
# ------------- |
| 1251 |
# Choose a directory name for dependency files. |
| 1252 |
# This macro is AC_REQUIREd in _AM_DEPENDENCIES. |
| 1253 |
AC_DEFUN([AM_SET_DEPDIR], |
| 1254 |
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 1255 |
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
| 1256 |
]) |
| 1257 |
|
| 1258 |
|
| 1259 |
# AM_DEP_TRACK |
| 1260 |
# ------------ |
| 1261 |
AC_DEFUN([AM_DEP_TRACK], |
| 1262 |
[AC_ARG_ENABLE([dependency-tracking], [dnl |
| 1263 |
AS_HELP_STRING( |
| 1264 |
[--enable-dependency-tracking], |
| 1265 |
[do not reject slow dependency extractors]) |
| 1266 |
AS_HELP_STRING( |
| 1267 |
[--disable-dependency-tracking], |
| 1268 |
[speeds up one-time build])]) |
| 1269 |
if test "x$enable_dependency_tracking" != xno; then |
| 1270 |
am_depcomp="$ac_aux_dir/depcomp" |
| 1271 |
AMDEPBACKSLASH='\' |
| 1272 |
am__nodep='_no' |
| 1273 |
fi |
| 1274 |
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
| 1275 |
AC_SUBST([AMDEPBACKSLASH])dnl |
| 1276 |
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
| 1277 |
AC_SUBST([am__nodep])dnl |
| 1278 |
_AM_SUBST_NOTMAKE([am__nodep])dnl |
| 1279 |
]) |
| 1280 |
|
| 1281 |
# Generate code to set up dependency tracking. -*- Autoconf -*- |
| 1282 |
|
| 1283 |
# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
| 1284 |
# |
| 1285 |
# This file is free software; the Free Software Foundation |
| 1286 |
# gives unlimited permission to copy and/or distribute it, |
| 1287 |
# with or without modifications, as long as this notice is preserved. |
| 1288 |
|
| 1289 |
# _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1290 |
# ------------------------------ |
| 1291 |
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1292 |
[{ |
| 1293 |
# Older Autoconf quotes --file arguments for eval, but not when files |
| 1294 |
# are listed without --file. Let's play safe and only enable the eval |
| 1295 |
# if we detect the quoting. |
| 1296 |
# TODO: see whether this extra hack can be removed once we start |
| 1297 |
# requiring Autoconf 2.70 or later. |
| 1298 |
AS_CASE([$CONFIG_FILES], |
| 1299 |
[*\'*], [eval set x "$CONFIG_FILES"], |
| 1300 |
[*], [set x $CONFIG_FILES]) |
| 1301 |
shift |
| 1302 |
# Used to flag and report bootstrapping failures. |
| 1303 |
am_rc=0 |
| 1304 |
for am_mf |
| 1305 |
do |
| 1306 |
# Strip MF so we end up with the name of the file. |
| 1307 |
am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` |
| 1308 |
# Check whether this is an Automake generated Makefile which includes |
| 1309 |
# dependency-tracking related rules and includes. |
| 1310 |
# Grep'ing the whole file directly is not great: AIX grep has a line |
| 1311 |
# limit of 2048, but all sed's we know have understand at least 4000. |
| 1312 |
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ |
| 1313 |
|| continue |
| 1314 |
am_dirpart=`AS_DIRNAME(["$am_mf"])` |
| 1315 |
am_filepart=`AS_BASENAME(["$am_mf"])` |
| 1316 |
AM_RUN_LOG([cd "$am_dirpart" \ |
| 1317 |
&& sed -e '/# am--include-marker/d' "$am_filepart" \ |
| 1318 |
| $MAKE -f - am--depfiles]) || am_rc=$? |
| 1319 |
done |
| 1320 |
if test $am_rc -ne 0; then |
| 1321 |
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments |
| 1322 |
for automatic dependency tracking. If GNU make was not used, consider |
| 1323 |
re-running the configure script with MAKE="gmake" (or whatever is |
| 1324 |
necessary). You can also try re-running configure with the |
| 1325 |
'--disable-dependency-tracking' option to at least be able to build |
| 1326 |
the package (albeit without support for automatic dependency tracking).]) |
| 1327 |
fi |
| 1328 |
AS_UNSET([am_dirpart]) |
| 1329 |
AS_UNSET([am_filepart]) |
| 1330 |
AS_UNSET([am_mf]) |
| 1331 |
AS_UNSET([am_rc]) |
| 1332 |
rm -f conftest-deps.mk |
| 1333 |
} |
| 1334 |
])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1335 |
|
| 1336 |
|
| 1337 |
# AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1338 |
# ----------------------------- |
| 1339 |
# This macro should only be invoked once -- use via AC_REQUIRE. |
| 1340 |
# |
| 1341 |
# This code is only required when automatic dependency tracking is enabled. |
| 1342 |
# This creates each '.Po' and '.Plo' makefile fragment that we'll need in |
| 1343 |
# order to bootstrap the dependency handling code. |
| 1344 |
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1345 |
[AC_CONFIG_COMMANDS([depfiles], |
| 1346 |
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1347 |
[AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) |
| 1348 |
|
| 1349 |
# Do all the work for Automake. -*- Autoconf -*- |
| 1350 |
|
| 1351 |
# Copyright (C) 1996-2021 Free Software Foundation, Inc. |
| 1352 |
# |
| 1353 |
# This file is free software; the Free Software Foundation |
| 1354 |
# gives unlimited permission to copy and/or distribute it, |
| 1355 |
# with or without modifications, as long as this notice is preserved. |
| 1356 |
|
| 1357 |
# This macro actually does too much. Some checks are only needed if |
| 1358 |
# your package does certain things. But this isn't really a big deal. |
| 1359 |
|
| 1360 |
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. |
| 1361 |
m4_define([AC_PROG_CC], |
| 1362 |
m4_defn([AC_PROG_CC]) |
| 1363 |
[_AM_PROG_CC_C_O |
| 1364 |
]) |
| 1365 |
|
| 1366 |
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
| 1367 |
# AM_INIT_AUTOMAKE([OPTIONS]) |
| 1368 |
# ----------------------------------------------- |
| 1369 |
# The call with PACKAGE and VERSION arguments is the old style |
| 1370 |
# call (pre autoconf-2.50), which is being phased out. PACKAGE |
| 1371 |
# and VERSION should now be passed to AC_INIT and removed from |
| 1372 |
# the call to AM_INIT_AUTOMAKE. |
| 1373 |
# We support both call styles for the transition. After |
| 1374 |
# the next Automake release, Autoconf can make the AC_INIT |
| 1375 |
# arguments mandatory, and then we can depend on a new Autoconf |
| 1376 |
# release and drop the old call support. |
| 1377 |
AC_DEFUN([AM_INIT_AUTOMAKE], |
| 1378 |
[AC_PREREQ([2.65])dnl |
| 1379 |
m4_ifdef([_$0_ALREADY_INIT], |
| 1380 |
[m4_fatal([$0 expanded multiple times |
| 1381 |
]m4_defn([_$0_ALREADY_INIT]))], |
| 1382 |
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl |
| 1383 |
dnl Autoconf wants to disallow AM_ names. We explicitly allow |
| 1384 |
dnl the ones we care about. |
| 1385 |
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
| 1386 |
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
| 1387 |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
| 1388 |
if test "`cd $srcdir && pwd`" != "`pwd`"; then |
| 1389 |
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output |
| 1390 |
# is not polluted with repeated "-I." |
| 1391 |
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl |
| 1392 |
# test to see if srcdir already configured |
| 1393 |
if test -f $srcdir/config.status; then |
| 1394 |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 1395 |
fi |
| 1396 |
fi |
| 1397 |
|
| 1398 |
# test whether we have cygpath |
| 1399 |
if test -z "$CYGPATH_W"; then |
| 1400 |
if (cygpath --version) >/dev/null 2>/dev/null; then |
| 1401 |
CYGPATH_W='cygpath -w' |
| 1402 |
else |
| 1403 |
CYGPATH_W=echo |
| 1404 |
fi |
| 1405 |
fi |
| 1406 |
AC_SUBST([CYGPATH_W]) |
| 1407 |
|
| 1408 |
# Define the identity of the package. |
| 1409 |
dnl Distinguish between old-style and new-style calls. |
| 1410 |
m4_ifval([$2], |
| 1411 |
[AC_DIAGNOSE([obsolete], |
| 1412 |
[$0: two- and three-arguments forms are deprecated.]) |
| 1413 |
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
| 1414 |
AC_SUBST([PACKAGE], [$1])dnl |
| 1415 |
AC_SUBST([VERSION], [$2])], |
| 1416 |
[_AM_SET_OPTIONS([$1])dnl |
| 1417 |
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
| 1418 |
m4_if( |
| 1419 |
m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), |
| 1420 |
[ok:ok],, |
| 1421 |
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
| 1422 |
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
| 1423 |
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
| 1424 |
|
| 1425 |
_AM_IF_OPTION([no-define],, |
| 1426 |
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) |
| 1427 |
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl |
| 1428 |
|
| 1429 |
# Some tools Automake needs. |
| 1430 |
AC_REQUIRE([AM_SANITY_CHECK])dnl |
| 1431 |
AC_REQUIRE([AC_ARG_PROGRAM])dnl |
| 1432 |
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) |
| 1433 |
AM_MISSING_PROG([AUTOCONF], [autoconf]) |
| 1434 |
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) |
| 1435 |
AM_MISSING_PROG([AUTOHEADER], [autoheader]) |
| 1436 |
AM_MISSING_PROG([MAKEINFO], [makeinfo]) |
| 1437 |
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 1438 |
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl |
| 1439 |
AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
| 1440 |
# For better backward compatibility. To be removed once Automake 1.9.x |
| 1441 |
# dies out for good. For more background, see: |
| 1442 |
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> |
| 1443 |
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> |
| 1444 |
AC_SUBST([mkdir_p], ['$(MKDIR_P)']) |
| 1445 |
# We need awk for the "check" target (and possibly the TAP driver). The |
| 1446 |
# system "awk" is bad on some platforms. |
| 1447 |
AC_REQUIRE([AC_PROG_AWK])dnl |
| 1448 |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 1449 |
AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 1450 |
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], |
| 1451 |
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
| 1452 |
[_AM_PROG_TAR([v7])])]) |
| 1453 |
_AM_IF_OPTION([no-dependencies],, |
| 1454 |
[AC_PROVIDE_IFELSE([AC_PROG_CC], |
| 1455 |
[_AM_DEPENDENCIES([CC])], |
| 1456 |
[m4_define([AC_PROG_CC], |
| 1457 |
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl |
| 1458 |
AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 1459 |
[_AM_DEPENDENCIES([CXX])], |
| 1460 |
[m4_define([AC_PROG_CXX], |
| 1461 |
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl |
| 1462 |
AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
| 1463 |
[_AM_DEPENDENCIES([OBJC])], |
| 1464 |
[m4_define([AC_PROG_OBJC], |
| 1465 |
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl |
| 1466 |
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], |
| 1467 |
[_AM_DEPENDENCIES([OBJCXX])], |
| 1468 |
[m4_define([AC_PROG_OBJCXX], |
| 1469 |
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl |
| 1470 |
]) |
| 1471 |
# Variables for tags utilities; see am/tags.am |
| 1472 |
if test -z "$CTAGS"; then |
| 1473 |
CTAGS=ctags |
| 1474 |
fi |
| 1475 |
AC_SUBST([CTAGS]) |
| 1476 |
if test -z "$ETAGS"; then |
| 1477 |
ETAGS=etags |
| 1478 |
fi |
| 1479 |
AC_SUBST([ETAGS]) |
| 1480 |
if test -z "$CSCOPE"; then |
| 1481 |
CSCOPE=cscope |
| 1482 |
fi |
| 1483 |
AC_SUBST([CSCOPE]) |
| 1484 |
|
| 1485 |
AC_REQUIRE([AM_SILENT_RULES])dnl |
| 1486 |
dnl The testsuite driver may need to know about EXEEXT, so add the |
| 1487 |
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This |
| 1488 |
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. |
| 1489 |
AC_CONFIG_COMMANDS_PRE(dnl |
| 1490 |
[m4_provide_if([_AM_COMPILER_EXEEXT], |
| 1491 |
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl |
| 1492 |
|
| 1493 |
# POSIX will say in a future version that running "rm -f" with no argument |
| 1494 |
# is OK; and we want to be able to make that assumption in our Makefile |
| 1495 |
# recipes. So use an aggressive probe to check that the usage we want is |
| 1496 |
# actually supported "in the wild" to an acceptable degree. |
| 1497 |
# See automake bug#10828. |
| 1498 |
# To make any issue more visible, cause the running configure to be aborted |
| 1499 |
# by default if the 'rm' program in use doesn't match our expectations; the |
| 1500 |
# user can still override this though. |
| 1501 |
if rm -f && rm -fr && rm -rf; then : OK; else |
| 1502 |
cat >&2 <<'END' |
| 1503 |
Oops! |
| 1504 |
|
| 1505 |
Your 'rm' program seems unable to run without file operands specified |
| 1506 |
on the command line, even when the '-f' option is present. This is contrary |
| 1507 |
to the behaviour of most rm programs out there, and not conforming with |
| 1508 |
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> |
| 1509 |
|
| 1510 |
Please tell [email protected] about your system, including the value |
| 1511 |
of your $PATH and any error possibly output before this message. This |
| 1512 |
can help us improve future automake versions. |
| 1513 |
|
| 1514 |
END |
| 1515 |
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then |
| 1516 |
echo 'Configuration will proceed anyway, since you have set the' >&2 |
| 1517 |
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 |
| 1518 |
echo >&2 |
| 1519 |
else |
| 1520 |
cat >&2 <<'END' |
| 1521 |
Aborting the configuration process, to ensure you take notice of the issue. |
| 1522 |
|
| 1523 |
You can download and install GNU coreutils to get an 'rm' implementation |
| 1524 |
that behaves properly: <https://www.gnu.org/software/coreutils/>. |
| 1525 |
|
| 1526 |
If you want to complete the configuration process using your problematic |
| 1527 |
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM |
| 1528 |
to "yes", and re-run configure. |
| 1529 |
|
| 1530 |
END |
| 1531 |
AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) |
| 1532 |
fi |
| 1533 |
fi |
| 1534 |
dnl The trailing newline in this macro's definition is deliberate, for |
| 1535 |
dnl backward compatibility and to allow trailing 'dnl'-style comments |
| 1536 |
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. |
| 1537 |
]) |
| 1538 |
|
| 1539 |
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
| 1540 |
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
| 1541 |
dnl mangled by Autoconf and run in a shell conditional statement. |
| 1542 |
m4_define([_AC_COMPILER_EXEEXT], |
| 1543 |
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
| 1544 |
|
| 1545 |
# When config.status generates a header, we must update the stamp-h file. |
| 1546 |
# This file resides in the same directory as the config header |
| 1547 |
# that is generated. The stamp files are numbered to have different names. |
| 1548 |
|
| 1549 |
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
| 1550 |
# loop where config.status creates the headers, so we can generate |
| 1551 |
# our stamp files there. |
| 1552 |
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
| 1553 |
[# Compute $1's index in $config_headers. |
| 1554 |
_am_arg=$1 |
| 1555 |
_am_stamp_count=1 |
| 1556 |
for _am_header in $config_headers :; do |
| 1557 |
case $_am_header in |
| 1558 |
$_am_arg | $_am_arg:* ) |
| 1559 |
break ;; |
| 1560 |
* ) |
| 1561 |
_am_stamp_count=`expr $_am_stamp_count + 1` ;; |
| 1562 |
esac |
| 1563 |
done |
| 1564 |
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
| 1565 |
|
| 1566 |
# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
| 1567 |
# |
| 1568 |
# This file is free software; the Free Software Foundation |
| 1569 |
# gives unlimited permission to copy and/or distribute it, |
| 1570 |
# with or without modifications, as long as this notice is preserved. |
| 1571 |
|
| 1572 |
# AM_PROG_INSTALL_SH |
| 1573 |
# ------------------ |
| 1574 |
# Define $install_sh. |
| 1575 |
AC_DEFUN([AM_PROG_INSTALL_SH], |
| 1576 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1577 |
if test x"${install_sh+set}" != xset; then |
| 1578 |
case $am_aux_dir in |
| 1579 |
*\ * | *\ *) |
| 1580 |
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
| 1581 |
*) |
| 1582 |
install_sh="\${SHELL} $am_aux_dir/install-sh" |
| 1583 |
esac |
| 1584 |
fi |
| 1585 |
AC_SUBST([install_sh])]) |
| 1586 |
|
| 1587 |
# Copyright (C) 2003-2021 Free Software Foundation, Inc. |
| 1588 |
# |
| 1589 |
# This file is free software; the Free Software Foundation |
| 1590 |
# gives unlimited permission to copy and/or distribute it, |
| 1591 |
# with or without modifications, as long as this notice is preserved. |
| 1592 |
|
| 1593 |
# Check whether the underlying file-system supports filenames |
| 1594 |
# with a leading dot. For instance MS-DOS doesn't. |
| 1595 |
AC_DEFUN([AM_SET_LEADING_DOT], |
| 1596 |
[rm -rf .tst 2>/dev/null |
| 1597 |
mkdir .tst 2>/dev/null |
| 1598 |
if test -d .tst; then |
| 1599 |
am__leading_dot=. |
| 1600 |
else |
| 1601 |
am__leading_dot=_ |
| 1602 |
fi |
| 1603 |
rmdir .tst 2>/dev/null |
| 1604 |
AC_SUBST([am__leading_dot])]) |
| 1605 |
|
| 1606 |
# Check to see how 'make' treats includes. -*- Autoconf -*- |
| 1607 |
|
| 1608 |
# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
| 1609 |
# |
| 1610 |
# This file is free software; the Free Software Foundation |
| 1611 |
# gives unlimited permission to copy and/or distribute it, |
| 1612 |
# with or without modifications, as long as this notice is preserved. |
| 1613 |
|
| 1614 |
# AM_MAKE_INCLUDE() |
| 1615 |
# ----------------- |
| 1616 |
# Check whether make has an 'include' directive that can support all |
| 1617 |
# the idioms we need for our automatic dependency tracking code. |
| 1618 |
AC_DEFUN([AM_MAKE_INCLUDE], |
| 1619 |
[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) |
| 1620 |
cat > confinc.mk << 'END' |
| 1621 |
am__doit: |
| 1622 |
@echo this is the am__doit target >confinc.out |
| 1623 |
.PHONY: am__doit |
| 1624 |
END |
| 1625 |
am__include="#" |
| 1626 |
am__quote= |
| 1627 |
# BSD make does it like this. |
| 1628 |
echo '.include "confinc.mk" # ignored' > confmf.BSD |
| 1629 |
# Other make implementations (GNU, Solaris 10, AIX) do it like this. |
| 1630 |
echo 'include confinc.mk # ignored' > confmf.GNU |
| 1631 |
_am_result=no |
| 1632 |
for s in GNU BSD; do |
| 1633 |
AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) |
| 1634 |
AS_CASE([$?:`cat confinc.out 2>/dev/null`], |
| 1635 |
['0:this is the am__doit target'], |
| 1636 |
[AS_CASE([$s], |
| 1637 |
[BSD], [am__include='.include' am__quote='"'], |
| 1638 |
[am__include='include' am__quote=''])]) |
| 1639 |
if test "$am__include" != "#"; then |
| 1640 |
_am_result="yes ($s style)" |
| 1641 |
break |
| 1642 |
fi |
| 1643 |
done |
| 1644 |
rm -f confinc.* confmf.* |
| 1645 |
AC_MSG_RESULT([${_am_result}]) |
| 1646 |
AC_SUBST([am__include])]) |
| 1647 |
AC_SUBST([am__quote])]) |
| 1648 |
|
| 1649 |
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
| 1650 |
|
| 1651 |
# Copyright (C) 1997-2021 Free Software Foundation, Inc. |
| 1652 |
# |
| 1653 |
# This file is free software; the Free Software Foundation |
| 1654 |
# gives unlimited permission to copy and/or distribute it, |
| 1655 |
# with or without modifications, as long as this notice is preserved. |
| 1656 |
|
| 1657 |
# AM_MISSING_PROG(NAME, PROGRAM) |
| 1658 |
# ------------------------------ |
| 1659 |
AC_DEFUN([AM_MISSING_PROG], |
| 1660 |
[AC_REQUIRE([AM_MISSING_HAS_RUN]) |
| 1661 |
$1=${$1-"${am_missing_run}$2"} |
| 1662 |
AC_SUBST($1)]) |
| 1663 |
|
| 1664 |
# AM_MISSING_HAS_RUN |
| 1665 |
# ------------------ |
| 1666 |
# Define MISSING if not defined so far and test if it is modern enough. |
| 1667 |
# If it is, set am_missing_run to use it, otherwise, to nothing. |
| 1668 |
AC_DEFUN([AM_MISSING_HAS_RUN], |
| 1669 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1670 |
AC_REQUIRE_AUX_FILE([missing])dnl |
| 1671 |
if test x"${MISSING+set}" != xset; then |
| 1672 |
MISSING="\${SHELL} '$am_aux_dir/missing'" |
| 1673 |
fi |
| 1674 |
# Use eval to expand $SHELL |
| 1675 |
if eval "$MISSING --is-lightweight"; then |
| 1676 |
am_missing_run="$MISSING " |
| 1677 |
else |
| 1678 |
am_missing_run= |
| 1679 |
AC_MSG_WARN(['missing' script is too old or missing]) |
| 1680 |
fi |
| 1681 |
]) |
| 1682 |
|
| 1683 |
# Helper functions for option handling. -*- Autoconf -*- |
| 1684 |
|
| 1685 |
# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
| 1686 |
# |
| 1687 |
# This file is free software; the Free Software Foundation |
| 1688 |
# gives unlimited permission to copy and/or distribute it, |
| 1689 |
# with or without modifications, as long as this notice is preserved. |
| 1690 |
|
| 1691 |
# _AM_MANGLE_OPTION(NAME) |
| 1692 |
# ----------------------- |
| 1693 |
AC_DEFUN([_AM_MANGLE_OPTION], |
| 1694 |
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
| 1695 |
|
| 1696 |
# _AM_SET_OPTION(NAME) |
| 1697 |
# -------------------- |
| 1698 |
# Set option NAME. Presently that only means defining a flag for this option. |
| 1699 |
AC_DEFUN([_AM_SET_OPTION], |
| 1700 |
[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) |
| 1701 |
|
| 1702 |
# _AM_SET_OPTIONS(OPTIONS) |
| 1703 |
# ------------------------ |
| 1704 |
# OPTIONS is a space-separated list of Automake options. |
| 1705 |
AC_DEFUN([_AM_SET_OPTIONS], |
| 1706 |
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
| 1707 |
|
| 1708 |
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
| 1709 |
# ------------------------------------------- |
| 1710 |
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
| 1711 |
AC_DEFUN([_AM_IF_OPTION], |
| 1712 |
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
| 1713 |
|
| 1714 |
# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
| 1715 |
# |
| 1716 |
# This file is free software; the Free Software Foundation |
| 1717 |
# gives unlimited permission to copy and/or distribute it, |
| 1718 |
# with or without modifications, as long as this notice is preserved. |
| 1719 |
|
| 1720 |
# _AM_PROG_CC_C_O |
| 1721 |
# --------------- |
| 1722 |
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC |
| 1723 |
# to automatically call this. |
| 1724 |
AC_DEFUN([_AM_PROG_CC_C_O], |
| 1725 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1726 |
AC_REQUIRE_AUX_FILE([compile])dnl |
| 1727 |
AC_LANG_PUSH([C])dnl |
| 1728 |
AC_CACHE_CHECK( |
| 1729 |
[whether $CC understands -c and -o together], |
| 1730 |
[am_cv_prog_cc_c_o], |
| 1731 |
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) |
| 1732 |
# Make sure it works both with $CC and with simple cc. |
| 1733 |
# Following AC_PROG_CC_C_O, we do the test twice because some |
| 1734 |
# compilers refuse to overwrite an existing .o file with -o, |
| 1735 |
# though they will create one. |
| 1736 |
am_cv_prog_cc_c_o=yes |
| 1737 |
for am_i in 1 2; do |
| 1738 |
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ |
| 1739 |
&& test -f conftest2.$ac_objext; then |
| 1740 |
: OK |
| 1741 |
else |
| 1742 |
am_cv_prog_cc_c_o=no |
| 1743 |
break |
| 1744 |
fi |
| 1745 |
done |
| 1746 |
rm -f core conftest* |
| 1747 |
unset am_i]) |
| 1748 |
if test "$am_cv_prog_cc_c_o" != yes; then |
| 1749 |
# Losing compiler, so override with the script. |
| 1750 |
# FIXME: It is wrong to rewrite CC. |
| 1751 |
# But if we don't then we get into trouble of one sort or another. |
| 1752 |
# A longer-term fix would be to have automake use am__CC in this case, |
| 1753 |
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" |
| 1754 |
CC="$am_aux_dir/compile $CC" |
| 1755 |
fi |
| 1756 |
AC_LANG_POP([C])]) |
| 1757 |
|
| 1758 |
# For backward compatibility. |
| 1759 |
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
| 1760 |
|
| 1761 |
# Copyright (C) 1999-2021 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 |
|
| 1768 |
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 1769 |
# --------------------------------------------------------------------------- |
| 1770 |
# Adds support for distributing Python modules and packages. To |
| 1771 |
# install modules, copy them to $(pythondir), using the python_PYTHON |
| 1772 |
# automake variable. To install a package with the same name as the |
| 1773 |
# automake package, install to $(pkgpythondir), or use the |
| 1774 |
# pkgpython_PYTHON automake variable. |
| 1775 |
# |
| 1776 |
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as |
| 1777 |
# locations to install python extension modules (shared libraries). |
| 1778 |
# Another macro is required to find the appropriate flags to compile |
| 1779 |
# extension modules. |
| 1780 |
# |
| 1781 |
# If your package is configured with a different prefix to python, |
| 1782 |
# users will have to add the install directory to the PYTHONPATH |
| 1783 |
# environment variable, or create a .pth file (see the python |
| 1784 |
# documentation for details). |
| 1785 |
# |
| 1786 |
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will |
| 1787 |
# cause an error if the version of python installed on the system |
| 1788 |
# doesn't meet the requirement. MINIMUM-VERSION should consist of |
| 1789 |
# numbers and dots only. |
| 1790 |
AC_DEFUN([AM_PATH_PYTHON], |
| 1791 |
[ |
| 1792 |
dnl Find a Python interpreter. Python versions prior to 2.0 are not |
| 1793 |
dnl supported. (2.0 was released on October 16, 2000). |
| 1794 |
m4_define_default([_AM_PYTHON_INTERPRETER_LIST], |
| 1795 |
[python python2 python3 dnl |
| 1796 |
python3.11 python3.10 dnl |
| 1797 |
python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl |
| 1798 |
python3.2 python3.1 python3.0 dnl |
| 1799 |
python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl |
| 1800 |
python2.0]) |
| 1801 |
|
| 1802 |
AC_ARG_VAR([PYTHON], [the Python interpreter]) |
| 1803 |
|
| 1804 |
m4_if([$1],[],[ |
| 1805 |
dnl No version check is needed. |
| 1806 |
# Find any Python interpreter. |
| 1807 |
if test -z "$PYTHON"; then |
| 1808 |
AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) |
| 1809 |
fi |
| 1810 |
am_display_PYTHON=python |
| 1811 |
], [ |
| 1812 |
dnl A version check is needed. |
| 1813 |
if test -n "$PYTHON"; then |
| 1814 |
# If the user set $PYTHON, use it and don't search something else. |
| 1815 |
AC_MSG_CHECKING([whether $PYTHON version is >= $1]) |
| 1816 |
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], |
| 1817 |
[AC_MSG_RESULT([yes])], |
| 1818 |
[AC_MSG_RESULT([no]) |
| 1819 |
AC_MSG_ERROR([Python interpreter is too old])]) |
| 1820 |
am_display_PYTHON=$PYTHON |
| 1821 |
else |
| 1822 |
# Otherwise, try each interpreter until we find one that satisfies |
| 1823 |
# VERSION. |
| 1824 |
AC_CACHE_CHECK([for a Python interpreter with version >= $1], |
| 1825 |
[am_cv_pathless_PYTHON],[ |
| 1826 |
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do |
| 1827 |
test "$am_cv_pathless_PYTHON" = none && break |
| 1828 |
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) |
| 1829 |
done]) |
| 1830 |
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. |
| 1831 |
if test "$am_cv_pathless_PYTHON" = none; then |
| 1832 |
PYTHON=: |
| 1833 |
else |
| 1834 |
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) |
| 1835 |
fi |
| 1836 |
am_display_PYTHON=$am_cv_pathless_PYTHON |
| 1837 |
fi |
| 1838 |
]) |
| 1839 |
|
| 1840 |
if test "$PYTHON" = :; then |
| 1841 |
dnl Run any user-specified action, or abort. |
| 1842 |
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) |
| 1843 |
else |
| 1844 |
|
| 1845 |
dnl Query Python for its version number. Although site.py simply uses |
| 1846 |
dnl sys.version[:3], printing that failed with Python 3.10, since the |
| 1847 |
dnl trailing zero was eliminated. So now we output just the major |
| 1848 |
dnl and minor version numbers, as numbers. Apparently the tertiary |
| 1849 |
dnl version is not of interest. |
| 1850 |
dnl |
| 1851 |
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], |
| 1852 |
[am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`]) |
| 1853 |
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) |
| 1854 |
|
| 1855 |
dnl At times, e.g., when building shared libraries, you may want |
| 1856 |
dnl to know which OS platform Python thinks this is. |
| 1857 |
dnl |
| 1858 |
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], |
| 1859 |
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) |
| 1860 |
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) |
| 1861 |
|
| 1862 |
dnl emacs-page |
| 1863 |
dnl If --with-python-sys-prefix is given, use the values of sys.prefix |
| 1864 |
dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX |
| 1865 |
dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and |
| 1866 |
dnl ${exec_prefix} variables. |
| 1867 |
dnl |
| 1868 |
dnl The two are made distinct variables so they can be overridden if |
| 1869 |
dnl need be, although general consensus is that you shouldn't need |
| 1870 |
dnl this separation. |
| 1871 |
dnl |
| 1872 |
dnl Also allow directly setting the prefixes via configure options, |
| 1873 |
dnl overriding any default. |
| 1874 |
dnl |
| 1875 |
if test "x$prefix" = xNONE; then |
| 1876 |
am__usable_prefix=$ac_default_prefix |
| 1877 |
else |
| 1878 |
am__usable_prefix=$prefix |
| 1879 |
fi |
| 1880 |
|
| 1881 |
# Allow user to request using sys.* values from Python, |
| 1882 |
# instead of the GNU $prefix values. |
| 1883 |
AC_ARG_WITH([python-sys-prefix], |
| 1884 |
[AS_HELP_STRING([--with-python-sys-prefix], |
| 1885 |
[use Python's sys.prefix and sys.exec_prefix values])], |
| 1886 |
[am_use_python_sys=:], |
| 1887 |
[am_use_python_sys=false]) |
| 1888 |
|
| 1889 |
# Allow user to override whatever the default Python prefix is. |
| 1890 |
AC_ARG_WITH([python_prefix], |
| 1891 |
[AS_HELP_STRING([--with-python_prefix], |
| 1892 |
[override the default PYTHON_PREFIX])], |
| 1893 |
[am_python_prefix_subst=$withval |
| 1894 |
am_cv_python_prefix=$withval |
| 1895 |
AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix]) |
| 1896 |
AC_MSG_RESULT([$am_cv_python_prefix])], |
| 1897 |
[ |
| 1898 |
if $am_use_python_sys; then |
| 1899 |
# using python sys.prefix value, not GNU |
| 1900 |
AC_CACHE_CHECK([for python default $am_display_PYTHON prefix], |
| 1901 |
[am_cv_python_prefix], |
| 1902 |
[am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`]) |
| 1903 |
|
| 1904 |
dnl If sys.prefix is a subdir of $prefix, replace the literal value of |
| 1905 |
dnl $prefix with a variable reference so it can be overridden. |
| 1906 |
case $am_cv_python_prefix in |
| 1907 |
$am__usable_prefix*) |
| 1908 |
am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` |
| 1909 |
am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` |
| 1910 |
;; |
| 1911 |
*) |
| 1912 |
am_python_prefix_subst=$am_cv_python_prefix |
| 1913 |
;; |
| 1914 |
esac |
| 1915 |
else # using GNU prefix value, not python sys.prefix |
| 1916 |
am_python_prefix_subst='${prefix}' |
| 1917 |
am_python_prefix=$am_python_prefix_subst |
| 1918 |
AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix]) |
| 1919 |
AC_MSG_RESULT([$am_python_prefix]) |
| 1920 |
fi]) |
| 1921 |
# Substituting python_prefix_subst value. |
| 1922 |
AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst]) |
| 1923 |
|
| 1924 |
# emacs-page Now do it all over again for Python exec_prefix, but with yet |
| 1925 |
# another conditional: fall back to regular prefix if that was specified. |
| 1926 |
AC_ARG_WITH([python_exec_prefix], |
| 1927 |
[AS_HELP_STRING([--with-python_exec_prefix], |
| 1928 |
[override the default PYTHON_EXEC_PREFIX])], |
| 1929 |
[am_python_exec_prefix_subst=$withval |
| 1930 |
am_cv_python_exec_prefix=$withval |
| 1931 |
AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix]) |
| 1932 |
AC_MSG_RESULT([$am_cv_python_exec_prefix])], |
| 1933 |
[ |
| 1934 |
# no explicit --with-python_exec_prefix, but if |
| 1935 |
# --with-python_prefix was given, use its value for python_exec_prefix too. |
| 1936 |
AS_IF([test -n "$with_python_prefix"], |
| 1937 |
[am_python_exec_prefix_subst=$with_python_prefix |
| 1938 |
am_cv_python_exec_prefix=$with_python_prefix |
| 1939 |
AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix]) |
| 1940 |
AC_MSG_RESULT([$am_cv_python_exec_prefix])], |
| 1941 |
[ |
| 1942 |
# Set am__usable_exec_prefix whether using GNU or Python values, |
| 1943 |
# since we use that variable for pyexecdir. |
| 1944 |
if test "x$exec_prefix" = xNONE; then |
| 1945 |
am__usable_exec_prefix=$am__usable_prefix |
| 1946 |
else |
| 1947 |
am__usable_exec_prefix=$exec_prefix |
| 1948 |
fi |
| 1949 |
# |
| 1950 |
if $am_use_python_sys; then # using python sys.exec_prefix, not GNU |
| 1951 |
AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix], |
| 1952 |
[am_cv_python_exec_prefix], |
| 1953 |
[am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`]) |
| 1954 |
dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the |
| 1955 |
dnl literal value of $exec_prefix with a variable reference so it can |
| 1956 |
dnl be overridden. |
| 1957 |
case $am_cv_python_exec_prefix in |
| 1958 |
$am__usable_exec_prefix*) |
| 1959 |
am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` |
| 1960 |
am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` |
| 1961 |
;; |
| 1962 |
*) |
| 1963 |
am_python_exec_prefix_subst=$am_cv_python_exec_prefix |
| 1964 |
;; |
| 1965 |
esac |
| 1966 |
else # using GNU $exec_prefix, not python sys.exec_prefix |
| 1967 |
am_python_exec_prefix_subst='${exec_prefix}' |
| 1968 |
am_python_exec_prefix=$am_python_exec_prefix_subst |
| 1969 |
AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix]) |
| 1970 |
AC_MSG_RESULT([$am_python_exec_prefix]) |
| 1971 |
fi])]) |
| 1972 |
# Substituting python_exec_prefix_subst. |
| 1973 |
AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst]) |
| 1974 |
|
| 1975 |
# Factor out some code duplication into this shell variable. |
| 1976 |
am_python_setup_sysconfig="\ |
| 1977 |
import sys |
| 1978 |
# Prefer sysconfig over distutils.sysconfig, for better compatibility |
| 1979 |
# with python 3.x. See automake bug#10227. |
| 1980 |
try: |
| 1981 |
import sysconfig |
| 1982 |
except ImportError: |
| 1983 |
can_use_sysconfig = 0 |
| 1984 |
else: |
| 1985 |
can_use_sysconfig = 1 |
| 1986 |
# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: |
| 1987 |
# <https://github.com/pypa/virtualenv/issues/118> |
| 1988 |
try: |
| 1989 |
from platform import python_implementation |
| 1990 |
if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': |
| 1991 |
can_use_sysconfig = 0 |
| 1992 |
except ImportError: |
| 1993 |
pass" |
| 1994 |
|
| 1995 |
dnl emacs-page Set up 4 directories: |
| 1996 |
|
| 1997 |
dnl 1. pythondir: where to install python scripts. This is the |
| 1998 |
dnl site-packages directory, not the python standard library |
| 1999 |
dnl directory like in previous automake betas. This behavior |
| 2000 |
dnl is more consistent with lispdir.m4 for example. |
| 2001 |
dnl Query distutils for this directory. |
| 2002 |
dnl |
| 2003 |
AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)], |
| 2004 |
[am_cv_python_pythondir], |
| 2005 |
[if test "x$am_cv_python_prefix" = x; then |
| 2006 |
am_py_prefix=$am__usable_prefix |
| 2007 |
else |
| 2008 |
am_py_prefix=$am_cv_python_prefix |
| 2009 |
fi |
| 2010 |
am_cv_python_pythondir=`$PYTHON -c " |
| 2011 |
$am_python_setup_sysconfig |
| 2012 |
if can_use_sysconfig: |
| 2013 |
if hasattr(sysconfig, 'get_default_scheme'): |
| 2014 |
scheme = sysconfig.get_default_scheme() |
| 2015 |
else: |
| 2016 |
scheme = sysconfig._get_default_scheme() |
| 2017 |
if scheme == 'posix_local': |
| 2018 |
# Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/ |
| 2019 |
scheme = 'posix_prefix' |
| 2020 |
sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'}) |
| 2021 |
else: |
| 2022 |
from distutils import sysconfig |
| 2023 |
sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') |
| 2024 |
sys.stdout.write(sitedir)"` |
| 2025 |
# |
| 2026 |
case $am_cv_python_pythondir in |
| 2027 |
$am_py_prefix*) |
| 2028 |
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` |
| 2029 |
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` |
| 2030 |
;; |
| 2031 |
*) |
| 2032 |
case $am_py_prefix in |
| 2033 |
/usr|/System*) ;; |
| 2034 |
*) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" |
| 2035 |
;; |
| 2036 |
esac |
| 2037 |
;; |
| 2038 |
esac |
| 2039 |
]) |
| 2040 |
AC_SUBST([pythondir], [$am_cv_python_pythondir]) |
| 2041 |
|
| 2042 |
dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was |
| 2043 |
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is |
| 2044 |
dnl more consistent with the rest of automake. |
| 2045 |
dnl |
| 2046 |
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) |
| 2047 |
|
| 2048 |
dnl 3. pyexecdir: directory for installing python extension modules |
| 2049 |
dnl (shared libraries). |
| 2050 |
dnl Query distutils for this directory. |
| 2051 |
dnl |
| 2052 |
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)], |
| 2053 |
[am_cv_python_pyexecdir], |
| 2054 |
[if test "x$am_cv_python_exec_prefix" = x; then |
| 2055 |
am_py_exec_prefix=$am__usable_exec_prefix |
| 2056 |
else |
| 2057 |
am_py_exec_prefix=$am_cv_python_exec_prefix |
| 2058 |
fi |
| 2059 |
am_cv_python_pyexecdir=`$PYTHON -c " |
| 2060 |
$am_python_setup_sysconfig |
| 2061 |
if can_use_sysconfig: |
| 2062 |
if hasattr(sysconfig, 'get_default_scheme'): |
| 2063 |
scheme = sysconfig.get_default_scheme() |
| 2064 |
else: |
| 2065 |
scheme = sysconfig._get_default_scheme() |
| 2066 |
if scheme == 'posix_local': |
| 2067 |
# Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/ |
| 2068 |
scheme = 'posix_prefix' |
| 2069 |
sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'}) |
| 2070 |
else: |
| 2071 |
from distutils import sysconfig |
| 2072 |
sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') |
| 2073 |
sys.stdout.write(sitedir)"` |
| 2074 |
# |
| 2075 |
case $am_cv_python_pyexecdir in |
| 2076 |
$am_py_exec_prefix*) |
| 2077 |
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` |
| 2078 |
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` |
| 2079 |
;; |
| 2080 |
*) |
| 2081 |
case $am_py_exec_prefix in |
| 2082 |
/usr|/System*) ;; |
| 2083 |
*) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" |
| 2084 |
;; |
| 2085 |
esac |
| 2086 |
;; |
| 2087 |
esac |
| 2088 |
]) |
| 2089 |
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) |
| 2090 |
|
| 2091 |
dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE) |
| 2092 |
dnl |
| 2093 |
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) |
| 2094 |
|
| 2095 |
dnl Run any user-specified action. |
| 2096 |
$2 |
| 2097 |
fi |
| 2098 |
]) |
| 2099 |
|
| 2100 |
|
| 2101 |
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
| 2102 |
# --------------------------------------------------------------------------- |
| 2103 |
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. |
| 2104 |
# Run ACTION-IF-FALSE otherwise. |
| 2105 |
# This test uses sys.hexversion instead of the string equivalent (first |
| 2106 |
# word of sys.version), in order to cope with versions such as 2.2c1. |
| 2107 |
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). |
| 2108 |
AC_DEFUN([AM_PYTHON_CHECK_VERSION], |
| 2109 |
[prog="import sys |
| 2110 |
# split strings by '.' and convert to numeric. Append some zeros |
| 2111 |
# because we need at least 4 digits for the hex conversion. |
| 2112 |
# map returns an iterator in Python 3.0 and a list in 2.x |
| 2113 |
minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] |
| 2114 |
minverhex = 0 |
| 2115 |
# xrange is not present in Python 3.0 and range returns an iterator |
| 2116 |
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] |
| 2117 |
sys.exit(sys.hexversion < minverhex)" |
| 2118 |
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) |
| 2119 |
|
| 2120 |
# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
| 2121 |
# |
| 2122 |
# This file is free software; the Free Software Foundation |
| 2123 |
# gives unlimited permission to copy and/or distribute it, |
| 2124 |
# with or without modifications, as long as this notice is preserved. |
| 2125 |
|
| 2126 |
# AM_RUN_LOG(COMMAND) |
| 2127 |
# ------------------- |
| 2128 |
# Run COMMAND, save the exit status in ac_status, and log it. |
| 2129 |
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) |
| 2130 |
AC_DEFUN([AM_RUN_LOG], |
| 2131 |
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD |
| 2132 |
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD |
| 2133 |
ac_status=$? |
| 2134 |
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 2135 |
(exit $ac_status); }]) |
| 2136 |
|
| 2137 |
# Check to make sure that the build environment is sane. -*- Autoconf -*- |
| 2138 |
|
| 2139 |
# Copyright (C) 1996-2021 Free Software Foundation, Inc. |
| 2140 |
# |
| 2141 |
# This file is free software; the Free Software Foundation |
| 2142 |
# gives unlimited permission to copy and/or distribute it, |
| 2143 |
# with or without modifications, as long as this notice is preserved. |
| 2144 |
|
| 2145 |
# AM_SANITY_CHECK |
| 2146 |
# --------------- |
| 2147 |
AC_DEFUN([AM_SANITY_CHECK], |
| 2148 |
[AC_MSG_CHECKING([whether build environment is sane]) |
| 2149 |
# Reject unsafe characters in $srcdir or the absolute working directory |
| 2150 |
# name. Accept space and tab only in the latter. |
| 2151 |
am_lf=' |
| 2152 |
' |
| 2153 |
case `pwd` in |
| 2154 |
*[[\\\"\#\$\&\'\`$am_lf]]*) |
| 2155 |
AC_MSG_ERROR([unsafe absolute working directory name]);; |
| 2156 |
esac |
| 2157 |
case $srcdir in |
| 2158 |
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
| 2159 |
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; |
| 2160 |
esac |
| 2161 |
|
| 2162 |
# Do 'set' in a subshell so we don't clobber the current shell's |
| 2163 |
# arguments. Must try -L first in case configure is actually a |
| 2164 |
# symlink; some systems play weird games with the mod time of symlinks |
| 2165 |
# (eg FreeBSD returns the mod time of the symlink's containing |
| 2166 |
# directory). |
| 2167 |
if ( |
| 2168 |
am_has_slept=no |
| 2169 |
for am_try in 1 2; do |
| 2170 |
echo "timestamp, slept: $am_has_slept" > conftest.file |
| 2171 |
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
| 2172 |
if test "$[*]" = "X"; then |
| 2173 |
# -L didn't work. |
| 2174 |
set X `ls -t "$srcdir/configure" conftest.file` |
| 2175 |
fi |
| 2176 |
if test "$[*]" != "X $srcdir/configure conftest.file" \ |
| 2177 |
&& test "$[*]" != "X conftest.file $srcdir/configure"; then |
| 2178 |
|
| 2179 |
# If neither matched, then we have a broken ls. This can happen |
| 2180 |
# if, for instance, CONFIG_SHELL is bash and it inherits a |
| 2181 |
# broken ls alias from the environment. This has actually |
| 2182 |
# happened. Such a system could not be considered "sane". |
| 2183 |
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 2184 |
alias in your environment]) |
| 2185 |
fi |
| 2186 |
if test "$[2]" = conftest.file || test $am_try -eq 2; then |
| 2187 |
break |
| 2188 |
fi |
| 2189 |
# Just in case. |
| 2190 |
sleep 1 |
| 2191 |
am_has_slept=yes |
| 2192 |
done |
| 2193 |
test "$[2]" = conftest.file |
| 2194 |
) |
| 2195 |
then |
| 2196 |
# Ok. |
| 2197 |
: |
| 2198 |
else |
| 2199 |
AC_MSG_ERROR([newly created file is older than distributed files! |
| 2200 |
Check your system clock]) |
| 2201 |
fi |
| 2202 |
AC_MSG_RESULT([yes]) |
| 2203 |
# If we didn't sleep, we still need to ensure time stamps of config.status and |
| 2204 |
# generated files are strictly newer. |
| 2205 |
am_sleep_pid= |
| 2206 |
if grep 'slept: no' conftest.file >/dev/null 2>&1; then |
| 2207 |
( sleep 1 ) & |
| 2208 |
am_sleep_pid=$! |
| 2209 |
fi |
| 2210 |
AC_CONFIG_COMMANDS_PRE( |
| 2211 |
[AC_MSG_CHECKING([that generated files are newer than configure]) |
| 2212 |
if test -n "$am_sleep_pid"; then |
| 2213 |
# Hide warnings about reused PIDs. |
| 2214 |
wait $am_sleep_pid 2>/dev/null |
| 2215 |
fi |
| 2216 |
AC_MSG_RESULT([done])]) |
| 2217 |
rm -f conftest.file |
| 2218 |
]) |
| 2219 |
|
| 2220 |
# Copyright (C) 2009-2021 Free Software Foundation, Inc. |
| 2221 |
# |
| 2222 |
# This file is free software; the Free Software Foundation |
| 2223 |
# gives unlimited permission to copy and/or distribute it, |
| 2224 |
# with or without modifications, as long as this notice is preserved. |
| 2225 |
|
| 2226 |
# AM_SILENT_RULES([DEFAULT]) |
| 2227 |
# -------------------------- |
| 2228 |
# Enable less verbose build rules; with the default set to DEFAULT |
| 2229 |
# ("yes" being less verbose, "no" or empty being verbose). |
| 2230 |
AC_DEFUN([AM_SILENT_RULES], |
| 2231 |
[AC_ARG_ENABLE([silent-rules], [dnl |
| 2232 |
AS_HELP_STRING( |
| 2233 |
[--enable-silent-rules], |
| 2234 |
[less verbose build output (undo: "make V=1")]) |
| 2235 |
AS_HELP_STRING( |
| 2236 |
[--disable-silent-rules], |
| 2237 |
[verbose build output (undo: "make V=0")])dnl |
| 2238 |
]) |
| 2239 |
case $enable_silent_rules in @%:@ ((( |
| 2240 |
yes) AM_DEFAULT_VERBOSITY=0;; |
| 2241 |
no) AM_DEFAULT_VERBOSITY=1;; |
| 2242 |
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; |
| 2243 |
esac |
| 2244 |
dnl |
| 2245 |
dnl A few 'make' implementations (e.g., NonStop OS and NextStep) |
| 2246 |
dnl do not support nested variable expansions. |
| 2247 |
dnl See automake bug#9928 and bug#10237. |
| 2248 |
am_make=${MAKE-make} |
| 2249 |
AC_CACHE_CHECK([whether $am_make supports nested variables], |
| 2250 |
[am_cv_make_support_nested_variables], |
| 2251 |
[if AS_ECHO([['TRUE=$(BAR$(V)) |
| 2252 |
BAR0=false |
| 2253 |
BAR1=true |
| 2254 |
V=1 |
| 2255 |
am__doit: |
| 2256 |
@$(TRUE) |
| 2257 |
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then |
| 2258 |
am_cv_make_support_nested_variables=yes |
| 2259 |
else |
| 2260 |
am_cv_make_support_nested_variables=no |
| 2261 |
fi]) |
| 2262 |
if test $am_cv_make_support_nested_variables = yes; then |
| 2263 |
dnl Using '$V' instead of '$(V)' breaks IRIX make. |
| 2264 |
AM_V='$(V)' |
| 2265 |
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' |
| 2266 |
else |
| 2267 |
AM_V=$AM_DEFAULT_VERBOSITY |
| 2268 |
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY |
| 2269 |
fi |
| 2270 |
AC_SUBST([AM_V])dnl |
| 2271 |
AM_SUBST_NOTMAKE([AM_V])dnl |
| 2272 |
AC_SUBST([AM_DEFAULT_V])dnl |
| 2273 |
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl |
| 2274 |
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl |
| 2275 |
AM_BACKSLASH='\' |
| 2276 |
AC_SUBST([AM_BACKSLASH])dnl |
| 2277 |
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
| 2278 |
]) |
| 2279 |
|
| 2280 |
# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
| 2281 |
# |
| 2282 |
# This file is free software; the Free Software Foundation |
| 2283 |
# gives unlimited permission to copy and/or distribute it, |
| 2284 |
# with or without modifications, as long as this notice is preserved. |
| 2285 |
|
| 2286 |
# AM_PROG_INSTALL_STRIP |
| 2287 |
# --------------------- |
| 2288 |
# One issue with vendor 'install' (even GNU) is that you can't |
| 2289 |
# specify the program used to strip binaries. This is especially |
| 2290 |
# annoying in cross-compiling environments, where the build's strip |
| 2291 |
# is unlikely to handle the host's binaries. |
| 2292 |
# Fortunately install-sh will honor a STRIPPROG variable, so we |
| 2293 |
# always use install-sh in "make install-strip", and initialize |
| 2294 |
# STRIPPROG with the value of the STRIP variable (set by the user). |
| 2295 |
AC_DEFUN([AM_PROG_INSTALL_STRIP], |
| 2296 |
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 2297 |
# Installed binaries are usually stripped using 'strip' when the user |
| 2298 |
# run "make install-strip". However 'strip' might not be the right |
| 2299 |
# tool to use in cross-compilation environments, therefore Automake |
| 2300 |
# will honor the 'STRIP' environment variable to overrule this program. |
| 2301 |
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. |
| 2302 |
if test "$cross_compiling" != no; then |
| 2303 |
AC_CHECK_TOOL([STRIP], [strip], :) |
| 2304 |
fi |
| 2305 |
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
| 2306 |
AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
| 2307 |
|
| 2308 |
# Copyright (C) 2006-2021 Free Software Foundation, Inc. |
| 2309 |
# |
| 2310 |
# This file is free software; the Free Software Foundation |
| 2311 |
# gives unlimited permission to copy and/or distribute it, |
| 2312 |
# with or without modifications, as long as this notice is preserved. |
| 2313 |
|
| 2314 |
# _AM_SUBST_NOTMAKE(VARIABLE) |
| 2315 |
# --------------------------- |
| 2316 |
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
| 2317 |
# This macro is traced by Automake. |
| 2318 |
AC_DEFUN([_AM_SUBST_NOTMAKE]) |
| 2319 |
|
| 2320 |
# AM_SUBST_NOTMAKE(VARIABLE) |
| 2321 |
# -------------------------- |
| 2322 |
# Public sister of _AM_SUBST_NOTMAKE. |
| 2323 |
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
| 2324 |
|
| 2325 |
# Check how to create a tarball. -*- Autoconf -*- |
| 2326 |
|
| 2327 |
# Copyright (C) 2004-2021 Free Software Foundation, Inc. |
| 2328 |
# |
| 2329 |
# This file is free software; the Free Software Foundation |
| 2330 |
# gives unlimited permission to copy and/or distribute it, |
| 2331 |
# with or without modifications, as long as this notice is preserved. |
| 2332 |
|
| 2333 |
# _AM_PROG_TAR(FORMAT) |
| 2334 |
# -------------------- |
| 2335 |
# Check how to create a tarball in format FORMAT. |
| 2336 |
# FORMAT should be one of 'v7', 'ustar', or 'pax'. |
| 2337 |
# |
| 2338 |
# Substitute a variable $(am__tar) that is a command |
| 2339 |
# writing to stdout a FORMAT-tarball containing the directory |
| 2340 |
# $tardir. |
| 2341 |
# tardir=directory && $(am__tar) > result.tar |
| 2342 |
# |
| 2343 |
# Substitute a variable $(am__untar) that extract such |
| 2344 |
# a tarball read from stdin. |
| 2345 |
# $(am__untar) < result.tar |
| 2346 |
# |
| 2347 |
AC_DEFUN([_AM_PROG_TAR], |
| 2348 |
[# Always define AMTAR for backward compatibility. Yes, it's still used |
| 2349 |
# in the wild :-( We should find a proper way to deprecate it ... |
| 2350 |
AC_SUBST([AMTAR], ['$${TAR-tar}']) |
| 2351 |
|
| 2352 |
# We'll loop over all known methods to create a tar archive until one works. |
| 2353 |
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
| 2354 |
|
| 2355 |
m4_if([$1], [v7], |
| 2356 |
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], |
| 2357 |
|
| 2358 |
[m4_case([$1], |
| 2359 |
[ustar], |
| 2360 |
[# The POSIX 1988 'ustar' format is defined with fixed-size fields. |
| 2361 |
# There is notably a 21 bits limit for the UID and the GID. In fact, |
| 2362 |
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 |
| 2363 |
# and bug#13588). |
| 2364 |
am_max_uid=2097151 # 2^21 - 1 |
| 2365 |
am_max_gid=$am_max_uid |
| 2366 |
# The $UID and $GID variables are not portable, so we need to resort |
| 2367 |
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls |
| 2368 |
# below are definitely unexpected, so allow the users to see them |
| 2369 |
# (that is, avoid stderr redirection). |
| 2370 |
am_uid=`id -u || echo unknown` |
| 2371 |
am_gid=`id -g || echo unknown` |
| 2372 |
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) |
| 2373 |
if test $am_uid -le $am_max_uid; then |
| 2374 |
AC_MSG_RESULT([yes]) |
| 2375 |
else |
| 2376 |
AC_MSG_RESULT([no]) |
| 2377 |
_am_tools=none |
| 2378 |
fi |
| 2379 |
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) |
| 2380 |
if test $am_gid -le $am_max_gid; then |
| 2381 |
AC_MSG_RESULT([yes]) |
| 2382 |
else |
| 2383 |
AC_MSG_RESULT([no]) |
| 2384 |
_am_tools=none |
| 2385 |
fi], |
| 2386 |
|
| 2387 |
[pax], |
| 2388 |
[], |
| 2389 |
|
| 2390 |
[m4_fatal([Unknown tar format])]) |
| 2391 |
|
| 2392 |
AC_MSG_CHECKING([how to create a $1 tar archive]) |
| 2393 |
|
| 2394 |
# Go ahead even if we have the value already cached. We do so because we |
| 2395 |
# need to set the values for the 'am__tar' and 'am__untar' variables. |
| 2396 |
_am_tools=${am_cv_prog_tar_$1-$_am_tools} |
| 2397 |
|
| 2398 |
for _am_tool in $_am_tools; do |
| 2399 |
case $_am_tool in |
| 2400 |
gnutar) |
| 2401 |
for _am_tar in tar gnutar gtar; do |
| 2402 |
AM_RUN_LOG([$_am_tar --version]) && break |
| 2403 |
done |
| 2404 |
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
| 2405 |
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
| 2406 |
am__untar="$_am_tar -xf -" |
| 2407 |
;; |
| 2408 |
plaintar) |
| 2409 |
# Must skip GNU tar: if it does not support --format= it doesn't create |
| 2410 |
# ustar tarball either. |
| 2411 |
(tar --version) >/dev/null 2>&1 && continue |
| 2412 |
am__tar='tar chf - "$$tardir"' |
| 2413 |
am__tar_='tar chf - "$tardir"' |
| 2414 |
am__untar='tar xf -' |
| 2415 |
;; |
| 2416 |
pax) |
| 2417 |
am__tar='pax -L -x $1 -w "$$tardir"' |
| 2418 |
am__tar_='pax -L -x $1 -w "$tardir"' |
| 2419 |
am__untar='pax -r' |
| 2420 |
;; |
| 2421 |
cpio) |
| 2422 |
am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
| 2423 |
am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
| 2424 |
am__untar='cpio -i -H $1 -d' |
| 2425 |
;; |
| 2426 |
none) |
| 2427 |
am__tar=false |
| 2428 |
am__tar_=false |
| 2429 |
am__untar=false |
| 2430 |
;; |
| 2431 |
esac |
| 2432 |
|
| 2433 |
# If the value was cached, stop now. We just wanted to have am__tar |
| 2434 |
# and am__untar set. |
| 2435 |
test -n "${am_cv_prog_tar_$1}" && break |
| 2436 |
|
| 2437 |
# tar/untar a dummy directory, and stop if the command works. |
| 2438 |
rm -rf conftest.dir |
| 2439 |
mkdir conftest.dir |
| 2440 |
echo GrepMe > conftest.dir/file |
| 2441 |
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
| 2442 |
rm -rf conftest.dir |
| 2443 |
if test -s conftest.tar; then |
| 2444 |
AM_RUN_LOG([$am__untar <conftest.tar]) |
| 2445 |
AM_RUN_LOG([cat conftest.dir/file]) |
| 2446 |
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
| 2447 |
fi |
| 2448 |
done |
| 2449 |
rm -rf conftest.dir |
| 2450 |
|
| 2451 |
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
| 2452 |
AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
| 2453 |
|
| 2454 |
AC_SUBST([am__tar]) |
| 2455 |
AC_SUBST([am__untar]) |
| 2456 |
]) # _AM_PROG_TAR |
| 2457 |
|
| 2458 |
m4_include([m4/00gnulib.m4]) |
| 2459 |
m4_include([m4/__inline.m4]) |
| 2460 |
m4_include([m4/absolute-header.m4]) |
| 2461 |
m4_include([m4/alloca.m4]) |
| 2462 |
m4_include([m4/assert_h.m4]) |
| 2463 |
m4_include([m4/builtin-expect.m4]) |
| 2464 |
m4_include([m4/c-bool.m4]) |
| 2465 |
m4_include([m4/calloc.m4]) |
| 2466 |
m4_include([m4/canonicalize.m4]) |
| 2467 |
m4_include([m4/clock_time.m4]) |
| 2468 |
m4_include([m4/close.m4]) |
| 2469 |
m4_include([m4/codeset.m4]) |
| 2470 |
m4_include([m4/double-slash-root.m4]) |
| 2471 |
m4_include([m4/dup2.m4]) |
| 2472 |
m4_include([m4/eealloc.m4]) |
| 2473 |
m4_include([m4/errno_h.m4]) |
| 2474 |
m4_include([m4/error.m4]) |
| 2475 |
m4_include([m4/error_h.m4]) |
| 2476 |
m4_include([m4/exponentd.m4]) |
| 2477 |
m4_include([m4/exponentf.m4]) |
| 2478 |
m4_include([m4/exponentl.m4]) |
| 2479 |
m4_include([m4/extensions.m4]) |
| 2480 |
m4_include([m4/extern-inline.m4]) |
| 2481 |
m4_include([m4/fcntl-o.m4]) |
| 2482 |
m4_include([m4/fcntl.m4]) |
| 2483 |
m4_include([m4/fcntl_h.m4]) |
| 2484 |
m4_include([m4/float_h.m4]) |
| 2485 |
m4_include([m4/fpieee.m4]) |
| 2486 |
m4_include([m4/free.m4]) |
| 2487 |
m4_include([m4/frexp.m4]) |
| 2488 |
m4_include([m4/frexpl.m4]) |
| 2489 |
m4_include([m4/fseterr.m4]) |
| 2490 |
m4_include([m4/fstat.m4]) |
| 2491 |
m4_include([m4/getdtablesize.m4]) |
| 2492 |
m4_include([m4/getopt.m4]) |
| 2493 |
m4_include([m4/getprogname.m4]) |
| 2494 |
m4_include([m4/getrandom.m4]) |
| 2495 |
m4_include([m4/gettext.m4]) |
| 2496 |
m4_include([m4/gnulib-common.m4]) |
| 2497 |
m4_include([m4/gnulib-comp.m4]) |
| 2498 |
m4_include([m4/host-cpu-c-abi.m4]) |
| 2499 |
m4_include([m4/iconv.m4]) |
| 2500 |
m4_include([m4/include_next.m4]) |
| 2501 |
m4_include([m4/intlmacosx.m4]) |
| 2502 |
m4_include([m4/intmax_t.m4]) |
| 2503 |
m4_include([m4/inttypes.m4]) |
| 2504 |
m4_include([m4/inttypes_h.m4]) |
| 2505 |
m4_include([m4/isatty.m4]) |
| 2506 |
m4_include([m4/isnand.m4]) |
| 2507 |
m4_include([m4/isnanf.m4]) |
| 2508 |
m4_include([m4/isnanl.m4]) |
| 2509 |
m4_include([m4/largefile.m4]) |
| 2510 |
m4_include([m4/ldexpl.m4]) |
| 2511 |
m4_include([m4/lib-ld.m4]) |
| 2512 |
m4_include([m4/lib-link.m4]) |
| 2513 |
m4_include([m4/lib-prefix.m4]) |
| 2514 |
m4_include([m4/libtool.m4]) |
| 2515 |
m4_include([m4/limits-h.m4]) |
| 2516 |
m4_include([m4/localcharset.m4]) |
| 2517 |
m4_include([m4/locale-fr.m4]) |
| 2518 |
m4_include([m4/locale-ja.m4]) |
| 2519 |
m4_include([m4/locale-zh.m4]) |
| 2520 |
m4_include([m4/locale_h.m4]) |
| 2521 |
m4_include([m4/lstat.m4]) |
| 2522 |
m4_include([m4/ltoptions.m4]) |
| 2523 |
m4_include([m4/ltsugar.m4]) |
| 2524 |
m4_include([m4/ltversion.m4]) |
| 2525 |
m4_include([m4/lt~obsolete.m4]) |
| 2526 |
m4_include([m4/malloc.m4]) |
| 2527 |
m4_include([m4/malloca.m4]) |
| 2528 |
m4_include([m4/manywarnings.m4]) |
| 2529 |
m4_include([m4/math_h.m4]) |
| 2530 |
m4_include([m4/mbrtowc.m4]) |
| 2531 |
m4_include([m4/mbsinit.m4]) |
| 2532 |
m4_include([m4/mbstate_t.m4]) |
| 2533 |
m4_include([m4/memchr.m4]) |
| 2534 |
m4_include([m4/mempcpy.m4]) |
| 2535 |
m4_include([m4/minmax.m4]) |
| 2536 |
m4_include([m4/mkdir.m4]) |
| 2537 |
m4_include([m4/mkstemps.m4]) |
| 2538 |
m4_include([m4/mmap-anon.m4]) |
| 2539 |
m4_include([m4/mode_t.m4]) |
| 2540 |
m4_include([m4/msvc-inval.m4]) |
| 2541 |
m4_include([m4/msvc-nothrow.m4]) |
| 2542 |
m4_include([m4/multiarch.m4]) |
| 2543 |
m4_include([m4/nls.m4]) |
| 2544 |
m4_include([m4/nocrash.m4]) |
| 2545 |
m4_include([m4/off_t.m4]) |
| 2546 |
m4_include([m4/open-cloexec.m4]) |
| 2547 |
m4_include([m4/open-slash.m4]) |
| 2548 |
m4_include([m4/open.m4]) |
| 2549 |
m4_include([m4/pathmax.m4]) |
| 2550 |
m4_include([m4/pipe.m4]) |
| 2551 |
m4_include([m4/po.m4]) |
| 2552 |
m4_include([m4/printf-frexp.m4]) |
| 2553 |
m4_include([m4/printf-frexpl.m4]) |
| 2554 |
m4_include([m4/printf.m4]) |
| 2555 |
m4_include([m4/progtest.m4]) |
| 2556 |
m4_include([m4/quote.m4]) |
| 2557 |
m4_include([m4/quotearg.m4]) |
| 2558 |
m4_include([m4/raise.m4]) |
| 2559 |
m4_include([m4/rawmemchr.m4]) |
| 2560 |
m4_include([m4/readlink.m4]) |
| 2561 |
m4_include([m4/realloc.m4]) |
| 2562 |
m4_include([m4/reallocarray.m4]) |
| 2563 |
m4_include([m4/setlocale_null.m4]) |
| 2564 |
m4_include([m4/sigaction.m4]) |
| 2565 |
m4_include([m4/signal_h.m4]) |
| 2566 |
m4_include([m4/signalblocking.m4]) |
| 2567 |
m4_include([m4/signbit.m4]) |
| 2568 |
m4_include([m4/size_max.m4]) |
| 2569 |
m4_include([m4/ssize_t.m4]) |
| 2570 |
m4_include([m4/stat-time.m4]) |
| 2571 |
m4_include([m4/stat.m4]) |
| 2572 |
m4_include([m4/stdalign.m4]) |
| 2573 |
m4_include([m4/stddef_h.m4]) |
| 2574 |
m4_include([m4/stdint.m4]) |
| 2575 |
m4_include([m4/stdint_h.m4]) |
| 2576 |
m4_include([m4/stdio_h.m4]) |
| 2577 |
m4_include([m4/stdlib_h.m4]) |
| 2578 |
m4_include([m4/strerror.m4]) |
| 2579 |
m4_include([m4/string_h.m4]) |
| 2580 |
m4_include([m4/strndup.m4]) |
| 2581 |
m4_include([m4/strnlen.m4]) |
| 2582 |
m4_include([m4/sys_random_h.m4]) |
| 2583 |
m4_include([m4/sys_socket_h.m4]) |
| 2584 |
m4_include([m4/sys_stat_h.m4]) |
| 2585 |
m4_include([m4/sys_types_h.m4]) |
| 2586 |
m4_include([m4/sys_wait_h.m4]) |
| 2587 |
m4_include([m4/tempname.m4]) |
| 2588 |
m4_include([m4/threadlib.m4]) |
| 2589 |
m4_include([m4/time_h.m4]) |
| 2590 |
m4_include([m4/unistd_h.m4]) |
| 2591 |
m4_include([m4/utime.m4]) |
| 2592 |
m4_include([m4/utime_h.m4]) |
| 2593 |
m4_include([m4/vasnprintf.m4]) |
| 2594 |
m4_include([m4/vasprintf.m4]) |
| 2595 |
m4_include([m4/vfprintf-posix.m4]) |
| 2596 |
m4_include([m4/visibility.m4]) |
| 2597 |
m4_include([m4/vprintf-posix.m4]) |
| 2598 |
m4_include([m4/warn-on-use.m4]) |
| 2599 |
m4_include([m4/warnings.m4]) |
| 2600 |
m4_include([m4/wchar_h.m4]) |
| 2601 |
m4_include([m4/wchar_t.m4]) |
| 2602 |
m4_include([m4/wctype_h.m4]) |
| 2603 |
m4_include([m4/wint_t.m4]) |
| 2604 |
m4_include([m4/xalloc.m4]) |
| 2605 |
m4_include([m4/xsize.m4]) |
| 2606 |
m4_include([m4/zzgnulib.m4]) |