1.1 --- a/acinclude/ltdl.m4 Thu Oct 18 11:55:16 2018 +0300
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,806 +0,0 @@
1.4 -##############################################################################
1.5 -# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
1.6 -#
1.7 -# Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
1.8 -# Written by Thomas Tanner, 1999
1.9 -#
1.10 -# This file is free software; the Free Software Foundation gives
1.11 -# unlimited permission to copy and/or distribute it, with or without
1.12 -# modifications, as long as this notice is preserved.
1.13 -
1.14 -# serial 17 LTDL_INIT
1.15 -
1.16 -# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
1.17 -# ------------------------------------------
1.18 -# DIRECTORY contains the libltdl sources. It is okay to call this
1.19 -# function multiple times, as long as the same DIRECTORY is always given.
1.20 -AC_DEFUN([LT_CONFIG_LTDL_DIR],
1.21 -[AC_BEFORE([$0], [LTDL_INIT])
1.22 -_$0($*)
1.23 -])# LT_CONFIG_LTDL_DIR
1.24 -
1.25 -# We break this out into a separate macro, so that we can call it safely
1.26 -# internally without being caught accidentally by the sed scan in libtoolize.
1.27 -m4_defun([_LT_CONFIG_LTDL_DIR],
1.28 -[dnl remove trailing slashes
1.29 -m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
1.30 -m4_case(_LTDL_DIR,
1.31 - [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
1.32 - m4_if(_ARG_DIR, [.],
1.33 - [],
1.34 - [m4_define([_LTDL_DIR], _ARG_DIR)
1.35 - _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
1.36 - [m4_if(_ARG_DIR, _LTDL_DIR,
1.37 - [],
1.38 - [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
1.39 -m4_popdef([_ARG_DIR])
1.40 -])# _LT_CONFIG_LTDL_DIR
1.41 -
1.42 -# Initialise:
1.43 -m4_define([_LTDL_DIR], [])
1.44 -
1.45 -
1.46 -# _LT_BUILD_PREFIX
1.47 -# ----------------
1.48 -# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
1.49 -# to `${top_builddir}/'.
1.50 -m4_define([_LT_BUILD_PREFIX],
1.51 -[m4_ifdef([AC_AUTOCONF_VERSION],
1.52 - [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
1.53 - [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
1.54 - [${top_build_prefix}],
1.55 - [${top_builddir}/])],
1.56 - [${top_build_prefix}])],
1.57 - [${top_builddir}/])[]dnl
1.58 -])
1.59 -
1.60 -
1.61 -# LTDL_CONVENIENCE
1.62 -# ----------------
1.63 -# sets LIBLTDL to the link flags for the libltdl convenience library and
1.64 -# LTDLINCL to the include flags for the libltdl header and adds
1.65 -# --enable-ltdl-convenience to the configure arguments. Note that
1.66 -# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
1.67 -# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
1.68 -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
1.69 -# quotes!). If your package is not flat and you're not using automake,
1.70 -# define top_build_prefix, top_builddir, and top_srcdir appropriately
1.71 -# in your Makefiles.
1.72 -AC_DEFUN([LTDL_CONVENIENCE],
1.73 -[AC_BEFORE([$0], [LTDL_INIT])dnl
1.74 -dnl Although the argument is deprecated and no longer documented,
1.75 -dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
1.76 -dnl here make sure it is the same as any other declaration of libltdl's
1.77 -dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
1.78 -dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
1.79 -m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
1.80 -_$0()
1.81 -])# LTDL_CONVENIENCE
1.82 -
1.83 -# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
1.84 -# now we have LT_CONFIG_LTDL_DIR:
1.85 -AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
1.86 -[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
1.87 -_LTDL_CONVENIENCE])
1.88 -
1.89 -dnl aclocal-1.4 backwards compatibility:
1.90 -dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
1.91 -
1.92 -
1.93 -# _LTDL_CONVENIENCE
1.94 -# -----------------
1.95 -# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
1.96 -m4_defun([_LTDL_CONVENIENCE],
1.97 -[case $enable_ltdl_convenience in
1.98 - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
1.99 - "") enable_ltdl_convenience=yes
1.100 - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1.101 -esac
1.102 -LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
1.103 -LTDLDEPS=$LIBLTDL
1.104 -LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
1.105 -
1.106 -AC_SUBST([LIBLTDL])
1.107 -AC_SUBST([LTDLDEPS])
1.108 -AC_SUBST([LTDLINCL])
1.109 -
1.110 -# For backwards non-gettext consistent compatibility...
1.111 -INCLTDL="$LTDLINCL"
1.112 -AC_SUBST([INCLTDL])
1.113 -])# _LTDL_CONVENIENCE
1.114 -
1.115 -
1.116 -# LTDL_INSTALLABLE
1.117 -# ----------------
1.118 -# sets LIBLTDL to the link flags for the libltdl installable library
1.119 -# and LTDLINCL to the include flags for the libltdl header and adds
1.120 -# --enable-ltdl-install to the configure arguments. Note that
1.121 -# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
1.122 -# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
1.123 -# available, otherwise with '${top_builddir}/', and LTDLINCL will be
1.124 -# prefixed with '${top_srcdir}/' (note the single quotes!). If your
1.125 -# package is not flat and you're not using automake, define top_build_prefix,
1.126 -# top_builddir, and top_srcdir appropriately in your Makefiles.
1.127 -# In the future, this macro may have to be called after LT_INIT.
1.128 -AC_DEFUN([LTDL_INSTALLABLE],
1.129 -[AC_BEFORE([$0], [LTDL_INIT])dnl
1.130 -dnl Although the argument is deprecated and no longer documented,
1.131 -dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
1.132 -dnl here make sure it is the same as any other declaration of libltdl's
1.133 -dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
1.134 -dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
1.135 -m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
1.136 -_$0()
1.137 -])# LTDL_INSTALLABLE
1.138 -
1.139 -# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
1.140 -# now we have LT_CONFIG_LTDL_DIR:
1.141 -AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
1.142 -[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
1.143 -_LTDL_INSTALLABLE])
1.144 -
1.145 -dnl aclocal-1.4 backwards compatibility:
1.146 -dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
1.147 -
1.148 -
1.149 -# _LTDL_INSTALLABLE
1.150 -# -----------------
1.151 -# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
1.152 -m4_defun([_LTDL_INSTALLABLE],
1.153 -[if test -f $prefix/lib/libltdl.la; then
1.154 - lt_save_LDFLAGS="$LDFLAGS"
1.155 - LDFLAGS="-L$prefix/lib $LDFLAGS"
1.156 - AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
1.157 - LDFLAGS="$lt_save_LDFLAGS"
1.158 - if test x"${lt_lib_ltdl-no}" = xyes; then
1.159 - if test x"$enable_ltdl_install" != xyes; then
1.160 - # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
1.161 - AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
1.162 - enable_ltdl_install=no
1.163 - fi
1.164 - elif test x"$enable_ltdl_install" = xno; then
1.165 - AC_MSG_WARN([libltdl not installed, but installation disabled])
1.166 - fi
1.167 -fi
1.168 -
1.169 -# If configure.ac declared an installable ltdl, and the user didn't override
1.170 -# with --disable-ltdl-install, we will install the shipped libltdl.
1.171 -case $enable_ltdl_install in
1.172 - no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
1.173 - LIBLTDL="-lltdl"
1.174 - LTDLDEPS=
1.175 - LTDLINCL=
1.176 - ;;
1.177 - *) enable_ltdl_install=yes
1.178 - ac_configure_args="$ac_configure_args --enable-ltdl-install"
1.179 - LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
1.180 - LTDLDEPS=$LIBLTDL
1.181 - LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
1.182 - ;;
1.183 -esac
1.184 -
1.185 -AC_SUBST([LIBLTDL])
1.186 -AC_SUBST([LTDLDEPS])
1.187 -AC_SUBST([LTDLINCL])
1.188 -
1.189 -# For backwards non-gettext consistent compatibility...
1.190 -INCLTDL="$LTDLINCL"
1.191 -AC_SUBST([INCLTDL])
1.192 -])# LTDL_INSTALLABLE
1.193 -
1.194 -
1.195 -# _LTDL_MODE_DISPATCH
1.196 -# -------------------
1.197 -m4_define([_LTDL_MODE_DISPATCH],
1.198 -[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
1.199 -m4_if(_LTDL_DIR, [],
1.200 - [],
1.201 - dnl if _LTDL_MODE was not set already, the default value is `subproject':
1.202 - [m4_case(m4_default(_LTDL_MODE, [subproject]),
1.203 - [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
1.204 - _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
1.205 - [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
1.206 - [recursive], [],
1.207 - [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
1.208 -dnl Be careful not to expand twice:
1.209 -m4_define([$0], [])
1.210 -])# _LTDL_MODE_DISPATCH
1.211 -
1.212 -
1.213 -# _LT_LIBOBJ(MODULE_NAME)
1.214 -# -----------------------
1.215 -# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
1.216 -# of into LIBOBJS.
1.217 -AC_DEFUN([_LT_LIBOBJ], [
1.218 - m4_pattern_allow([^_LT_LIBOBJS$])
1.219 - _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
1.220 -])# _LT_LIBOBJS
1.221 -
1.222 -
1.223 -# LTDL_INIT([OPTIONS])
1.224 -# --------------------
1.225 -# Clients of libltdl can use this macro to allow the installer to
1.226 -# choose between a shipped copy of the ltdl sources or a preinstalled
1.227 -# version of the library. If the shipped ltdl sources are not in a
1.228 -# subdirectory named libltdl, the directory name must be given by
1.229 -# LT_CONFIG_LTDL_DIR.
1.230 -AC_DEFUN([LTDL_INIT],
1.231 -[dnl Parse OPTIONS
1.232 -_LT_SET_OPTIONS([$0], [$1])
1.233 -
1.234 -dnl We need to keep our own list of libobjs separate from our parent project,
1.235 -dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
1.236 -dnl we look for our own LIBOBJs.
1.237 -m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
1.238 -m4_pushdef([AC_LIBSOURCES])
1.239 -
1.240 -dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
1.241 -m4_if(_LTDL_MODE, [],
1.242 - [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
1.243 - m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
1.244 - [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
1.245 -
1.246 -AC_ARG_WITH([included_ltdl],
1.247 - [AS_HELP_STRING([--with-included-ltdl],
1.248 - [use the GNU ltdl sources included here])])
1.249 -
1.250 -if test "x$with_included_ltdl" != xyes; then
1.251 - # We are not being forced to use the included libltdl sources, so
1.252 - # decide whether there is a useful installed version we can use.
1.253 - AC_CHECK_HEADER([ltdl.h],
1.254 - [AC_CHECK_DECL([lt_dlinterface_register],
1.255 - [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
1.256 - [with_included_ltdl=no],
1.257 - [with_included_ltdl=yes])],
1.258 - [with_included_ltdl=yes],
1.259 - [AC_INCLUDES_DEFAULT
1.260 - #include <ltdl.h>])],
1.261 - [with_included_ltdl=yes],
1.262 - [AC_INCLUDES_DEFAULT]
1.263 - )
1.264 -fi
1.265 -
1.266 -dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
1.267 -dnl was called yet, then for old times' sake, we assume libltdl is in an
1.268 -dnl eponymous directory:
1.269 -AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
1.270 -
1.271 -AC_ARG_WITH([ltdl_include],
1.272 - [AS_HELP_STRING([--with-ltdl-include=DIR],
1.273 - [use the ltdl headers installed in DIR])])
1.274 -
1.275 -if test -n "$with_ltdl_include"; then
1.276 - if test -f "$with_ltdl_include/ltdl.h"; then :
1.277 - else
1.278 - AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
1.279 - fi
1.280 -else
1.281 - with_ltdl_include=no
1.282 -fi
1.283 -
1.284 -AC_ARG_WITH([ltdl_lib],
1.285 - [AS_HELP_STRING([--with-ltdl-lib=DIR],
1.286 - [use the libltdl.la installed in DIR])])
1.287 -
1.288 -if test -n "$with_ltdl_lib"; then
1.289 - if test -f "$with_ltdl_lib/libltdl.la"; then :
1.290 - else
1.291 - AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
1.292 - fi
1.293 -else
1.294 - with_ltdl_lib=no
1.295 -fi
1.296 -
1.297 -case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
1.298 - ,yes,no,no,)
1.299 - m4_case(m4_default(_LTDL_TYPE, [convenience]),
1.300 - [convenience], [_LTDL_CONVENIENCE],
1.301 - [installable], [_LTDL_INSTALLABLE],
1.302 - [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
1.303 - ;;
1.304 - ,no,no,no,)
1.305 - # If the included ltdl is not to be used, then use the
1.306 - # preinstalled libltdl we found.
1.307 - AC_DEFINE([HAVE_LTDL], [1],
1.308 - [Define this if a modern libltdl is already installed])
1.309 - LIBLTDL=-lltdl
1.310 - LTDLDEPS=
1.311 - LTDLINCL=
1.312 - ;;
1.313 - ,no*,no,*)
1.314 - AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
1.315 - ;;
1.316 - *) with_included_ltdl=no
1.317 - LIBLTDL="-L$with_ltdl_lib -lltdl"
1.318 - LTDLDEPS=
1.319 - LTDLINCL="-I$with_ltdl_include"
1.320 - ;;
1.321 -esac
1.322 -INCLTDL="$LTDLINCL"
1.323 -
1.324 -# Report our decision...
1.325 -AC_MSG_CHECKING([where to find libltdl headers])
1.326 -AC_MSG_RESULT([$LTDLINCL])
1.327 -AC_MSG_CHECKING([where to find libltdl library])
1.328 -AC_MSG_RESULT([$LIBLTDL])
1.329 -
1.330 -_LTDL_SETUP
1.331 -
1.332 -dnl restore autoconf definition.
1.333 -m4_popdef([AC_LIBOBJ])
1.334 -m4_popdef([AC_LIBSOURCES])
1.335 -
1.336 -AC_CONFIG_COMMANDS_PRE([
1.337 - _ltdl_libobjs=
1.338 - _ltdl_ltlibobjs=
1.339 - if test -n "$_LT_LIBOBJS"; then
1.340 - # Remove the extension.
1.341 - _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
1.342 - for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
1.343 - _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
1.344 - _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
1.345 - done
1.346 - fi
1.347 - AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
1.348 - AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
1.349 -])
1.350 -
1.351 -# Only expand once:
1.352 -m4_define([LTDL_INIT])
1.353 -])# LTDL_INIT
1.354 -
1.355 -# Old names:
1.356 -AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
1.357 -AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
1.358 -AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
1.359 -dnl aclocal-1.4 backwards compatibility:
1.360 -dnl AC_DEFUN([AC_LIB_LTDL], [])
1.361 -dnl AC_DEFUN([AC_WITH_LTDL], [])
1.362 -dnl AC_DEFUN([LT_WITH_LTDL], [])
1.363 -
1.364 -
1.365 -# _LTDL_SETUP
1.366 -# -----------
1.367 -# Perform all the checks necessary for compilation of the ltdl objects
1.368 -# -- including compiler checks and header checks. This is a public
1.369 -# interface mainly for the benefit of libltdl's own configure.ac, most
1.370 -# other users should call LTDL_INIT instead.
1.371 -AC_DEFUN([_LTDL_SETUP],
1.372 -[AC_REQUIRE([AC_PROG_CC])dnl
1.373 -AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
1.374 -AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
1.375 -AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
1.376 -AC_REQUIRE([LT_LIB_DLLOAD])dnl
1.377 -AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
1.378 -AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
1.379 -AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
1.380 -AC_REQUIRE([gl_FUNC_ARGZ])dnl
1.381 -
1.382 -m4_require([_LT_CHECK_OBJDIR])dnl
1.383 -m4_require([_LT_HEADER_DLFCN])dnl
1.384 -m4_require([_LT_CHECK_DLPREOPEN])dnl
1.385 -m4_require([_LT_DECL_SED])dnl
1.386 -
1.387 -dnl Don't require this, or it will be expanded earlier than the code
1.388 -dnl that sets the variables it relies on:
1.389 -_LT_ENABLE_INSTALL
1.390 -
1.391 -dnl _LTDL_MODE specific code must be called at least once:
1.392 -_LTDL_MODE_DISPATCH
1.393 -
1.394 -# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
1.395 -# the user used. This is so that ltdl.h can pick up the parent projects
1.396 -# config.h file, The first file in AC_CONFIG_HEADERS must contain the
1.397 -# definitions required by ltdl.c.
1.398 -# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
1.399 -AC_CONFIG_COMMANDS_PRE([dnl
1.400 -m4_pattern_allow([^LT_CONFIG_H$])dnl
1.401 -m4_ifset([AH_HEADER],
1.402 - [LT_CONFIG_H=AH_HEADER],
1.403 - [m4_ifset([AC_LIST_HEADERS],
1.404 - [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
1.405 - [])])])
1.406 -AC_SUBST([LT_CONFIG_H])
1.407 -
1.408 -AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
1.409 - [], [], [AC_INCLUDES_DEFAULT])
1.410 -
1.411 -AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
1.412 -AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
1.413 -
1.414 -AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
1.415 -
1.416 -name=ltdl
1.417 -LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
1.418 -AC_SUBST([LTDLOPEN])
1.419 -])# _LTDL_SETUP
1.420 -
1.421 -
1.422 -# _LT_ENABLE_INSTALL
1.423 -# ------------------
1.424 -m4_define([_LT_ENABLE_INSTALL],
1.425 -[AC_ARG_ENABLE([ltdl-install],
1.426 - [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
1.427 -
1.428 -case ,${enable_ltdl_install},${enable_ltdl_convenience} in
1.429 - *yes*) ;;
1.430 - *) enable_ltdl_convenience=yes ;;
1.431 -esac
1.432 -
1.433 -m4_ifdef([AM_CONDITIONAL],
1.434 -[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
1.435 - AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
1.436 -])# _LT_ENABLE_INSTALL
1.437 -
1.438 -
1.439 -# LT_SYS_DLOPEN_DEPLIBS
1.440 -# ---------------------
1.441 -AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
1.442 -[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1.443 -AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
1.444 - [lt_cv_sys_dlopen_deplibs],
1.445 - [# PORTME does your system automatically load deplibs for dlopen?
1.446 - # or its logical equivalent (e.g. shl_load for HP-UX < 11)
1.447 - # For now, we just catch OSes we know something about -- in the
1.448 - # future, we'll try test this programmatically.
1.449 - lt_cv_sys_dlopen_deplibs=unknown
1.450 - case $host_os in
1.451 - aix3*|aix4.1.*|aix4.2.*)
1.452 - # Unknown whether this is true for these versions of AIX, but
1.453 - # we want this `case' here to explicitly catch those versions.
1.454 - lt_cv_sys_dlopen_deplibs=unknown
1.455 - ;;
1.456 - aix[[4-9]]*)
1.457 - lt_cv_sys_dlopen_deplibs=yes
1.458 - ;;
1.459 - amigaos*)
1.460 - case $host_cpu in
1.461 - powerpc)
1.462 - lt_cv_sys_dlopen_deplibs=no
1.463 - ;;
1.464 - esac
1.465 - ;;
1.466 - darwin*)
1.467 - # Assuming the user has installed a libdl from somewhere, this is true
1.468 - # If you are looking for one http://www.opendarwin.org/projects/dlcompat
1.469 - lt_cv_sys_dlopen_deplibs=yes
1.470 - ;;
1.471 - freebsd* | dragonfly*)
1.472 - lt_cv_sys_dlopen_deplibs=yes
1.473 - ;;
1.474 - gnu* | linux* | k*bsd*-gnu)
1.475 - # GNU and its variants, using gnu ld.so (Glibc)
1.476 - lt_cv_sys_dlopen_deplibs=yes
1.477 - ;;
1.478 - hpux10*|hpux11*)
1.479 - lt_cv_sys_dlopen_deplibs=yes
1.480 - ;;
1.481 - interix*)
1.482 - lt_cv_sys_dlopen_deplibs=yes
1.483 - ;;
1.484 - irix[[12345]]*|irix6.[[01]]*)
1.485 - # Catch all versions of IRIX before 6.2, and indicate that we don't
1.486 - # know how it worked for any of those versions.
1.487 - lt_cv_sys_dlopen_deplibs=unknown
1.488 - ;;
1.489 - irix*)
1.490 - # The case above catches anything before 6.2, and it's known that
1.491 - # at 6.2 and later dlopen does load deplibs.
1.492 - lt_cv_sys_dlopen_deplibs=yes
1.493 - ;;
1.494 - netbsd*)
1.495 - lt_cv_sys_dlopen_deplibs=yes
1.496 - ;;
1.497 - openbsd*)
1.498 - lt_cv_sys_dlopen_deplibs=yes
1.499 - ;;
1.500 - osf[[1234]]*)
1.501 - # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
1.502 - # it did *not* use an RPATH in a shared library to find objects the
1.503 - # library depends on, so we explicitly say `no'.
1.504 - lt_cv_sys_dlopen_deplibs=no
1.505 - ;;
1.506 - osf5.0|osf5.0a|osf5.1)
1.507 - # dlopen *does* load deplibs and with the right loader patch applied
1.508 - # it even uses RPATH in a shared library to search for shared objects
1.509 - # that the library depends on, but there's no easy way to know if that
1.510 - # patch is installed. Since this is the case, all we can really
1.511 - # say is unknown -- it depends on the patch being installed. If
1.512 - # it is, this changes to `yes'. Without it, it would be `no'.
1.513 - lt_cv_sys_dlopen_deplibs=unknown
1.514 - ;;
1.515 - osf*)
1.516 - # the two cases above should catch all versions of osf <= 5.1. Read
1.517 - # the comments above for what we know about them.
1.518 - # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
1.519 - # is used to find them so we can finally say `yes'.
1.520 - lt_cv_sys_dlopen_deplibs=yes
1.521 - ;;
1.522 - qnx*)
1.523 - lt_cv_sys_dlopen_deplibs=yes
1.524 - ;;
1.525 - solaris*)
1.526 - lt_cv_sys_dlopen_deplibs=yes
1.527 - ;;
1.528 - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1.529 - libltdl_cv_sys_dlopen_deplibs=yes
1.530 - ;;
1.531 - esac
1.532 - ])
1.533 -if test "$lt_cv_sys_dlopen_deplibs" != yes; then
1.534 - AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
1.535 - [Define if the OS needs help to load dependent libraries for dlopen().])
1.536 -fi
1.537 -])# LT_SYS_DLOPEN_DEPLIBS
1.538 -
1.539 -# Old name:
1.540 -AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
1.541 -dnl aclocal-1.4 backwards compatibility:
1.542 -dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
1.543 -
1.544 -
1.545 -# LT_SYS_MODULE_EXT
1.546 -# -----------------
1.547 -AC_DEFUN([LT_SYS_MODULE_EXT],
1.548 -[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
1.549 -AC_CACHE_CHECK([which extension is used for runtime loadable modules],
1.550 - [libltdl_cv_shlibext],
1.551 -[
1.552 -module=yes
1.553 -eval libltdl_cv_shlibext=$shrext_cmds
1.554 - ])
1.555 -if test -n "$libltdl_cv_shlibext"; then
1.556 - m4_pattern_allow([LT_MODULE_EXT])dnl
1.557 - AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
1.558 - [Define to the extension used for runtime loadable modules, say, ".so".])
1.559 -fi
1.560 -])# LT_SYS_MODULE_EXT
1.561 -
1.562 -# Old name:
1.563 -AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
1.564 -dnl aclocal-1.4 backwards compatibility:
1.565 -dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
1.566 -
1.567 -
1.568 -# LT_SYS_MODULE_PATH
1.569 -# ------------------
1.570 -AC_DEFUN([LT_SYS_MODULE_PATH],
1.571 -[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
1.572 -AC_CACHE_CHECK([which variable specifies run-time module search path],
1.573 - [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
1.574 -if test -n "$lt_cv_module_path_var"; then
1.575 - m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
1.576 - AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
1.577 - [Define to the name of the environment variable that determines the run-time module search path.])
1.578 -fi
1.579 -])# LT_SYS_MODULE_PATH
1.580 -
1.581 -# Old name:
1.582 -AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
1.583 -dnl aclocal-1.4 backwards compatibility:
1.584 -dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
1.585 -
1.586 -
1.587 -# LT_SYS_DLSEARCH_PATH
1.588 -# --------------------
1.589 -AC_DEFUN([LT_SYS_DLSEARCH_PATH],
1.590 -[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
1.591 -AC_CACHE_CHECK([for the default library search path],
1.592 - [lt_cv_sys_dlsearch_path],
1.593 - [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
1.594 -if test -n "$lt_cv_sys_dlsearch_path"; then
1.595 - sys_dlsearch_path=
1.596 - for dir in $lt_cv_sys_dlsearch_path; do
1.597 - if test -z "$sys_dlsearch_path"; then
1.598 - sys_dlsearch_path="$dir"
1.599 - else
1.600 - sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
1.601 - fi
1.602 - done
1.603 - m4_pattern_allow([LT_DLSEARCH_PATH])dnl
1.604 - AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
1.605 - [Define to the system default library search path.])
1.606 -fi
1.607 -])# LT_SYS_DLSEARCH_PATH
1.608 -
1.609 -# Old name:
1.610 -AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
1.611 -dnl aclocal-1.4 backwards compatibility:
1.612 -dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
1.613 -
1.614 -
1.615 -# _LT_CHECK_DLPREOPEN
1.616 -# -------------------
1.617 -m4_defun([_LT_CHECK_DLPREOPEN],
1.618 -[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1.619 -AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
1.620 - [libltdl_cv_preloaded_symbols],
1.621 - [if test -n "$lt_cv_sys_global_symbol_pipe"; then
1.622 - libltdl_cv_preloaded_symbols=yes
1.623 - else
1.624 - libltdl_cv_preloaded_symbols=no
1.625 - fi
1.626 - ])
1.627 -if test x"$libltdl_cv_preloaded_symbols" = xyes; then
1.628 - AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
1.629 - [Define if libtool can extract symbol lists from object files.])
1.630 -fi
1.631 -])# _LT_CHECK_DLPREOPEN
1.632 -
1.633 -
1.634 -# LT_LIB_DLLOAD
1.635 -# -------------
1.636 -AC_DEFUN([LT_LIB_DLLOAD],
1.637 -[m4_pattern_allow([^LT_DLLOADERS$])
1.638 -LT_DLLOADERS=
1.639 -AC_SUBST([LT_DLLOADERS])
1.640 -
1.641 -AC_LANG_PUSH([C])
1.642 -
1.643 -LIBADD_DLOPEN=
1.644 -AC_SEARCH_LIBS([dlopen], [dl],
1.645 - [AC_DEFINE([HAVE_LIBDL], [1],
1.646 - [Define if you have the libdl library or equivalent.])
1.647 - if test "$ac_cv_search_dlopen" != "none required" ; then
1.648 - LIBADD_DLOPEN="-ldl"
1.649 - fi
1.650 - libltdl_cv_lib_dl_dlopen="yes"
1.651 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
1.652 - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
1.653 -# include <dlfcn.h>
1.654 -#endif
1.655 - ]], [[dlopen(0, 0);]])],
1.656 - [AC_DEFINE([HAVE_LIBDL], [1],
1.657 - [Define if you have the libdl library or equivalent.])
1.658 - libltdl_cv_func_dlopen="yes"
1.659 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
1.660 - [AC_CHECK_LIB([svld], [dlopen],
1.661 - [AC_DEFINE([HAVE_LIBDL], [1],
1.662 - [Define if you have the libdl library or equivalent.])
1.663 - LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
1.664 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
1.665 -if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
1.666 -then
1.667 - lt_save_LIBS="$LIBS"
1.668 - LIBS="$LIBS $LIBADD_DLOPEN"
1.669 - AC_CHECK_FUNCS([dlerror])
1.670 - LIBS="$lt_save_LIBS"
1.671 -fi
1.672 -AC_SUBST([LIBADD_DLOPEN])
1.673 -
1.674 -LIBADD_SHL_LOAD=
1.675 -AC_CHECK_FUNC([shl_load],
1.676 - [AC_DEFINE([HAVE_SHL_LOAD], [1],
1.677 - [Define if you have the shl_load function.])
1.678 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
1.679 - [AC_CHECK_LIB([dld], [shl_load],
1.680 - [AC_DEFINE([HAVE_SHL_LOAD], [1],
1.681 - [Define if you have the shl_load function.])
1.682 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
1.683 - LIBADD_SHL_LOAD="-ldld"])])
1.684 -AC_SUBST([LIBADD_SHL_LOAD])
1.685 -
1.686 -case $host_os in
1.687 -darwin[[1567]].*)
1.688 -# We only want this for pre-Mac OS X 10.4.
1.689 - AC_CHECK_FUNC([_dyld_func_lookup],
1.690 - [AC_DEFINE([HAVE_DYLD], [1],
1.691 - [Define if you have the _dyld_func_lookup function.])
1.692 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
1.693 - ;;
1.694 -beos*)
1.695 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
1.696 - ;;
1.697 -cygwin* | mingw* | os2* | pw32*)
1.698 - AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
1.699 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
1.700 - ;;
1.701 -esac
1.702 -
1.703 -AC_CHECK_LIB([dld], [dld_link],
1.704 - [AC_DEFINE([HAVE_DLD], [1],
1.705 - [Define if you have the GNU dld library.])
1.706 - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
1.707 -AC_SUBST([LIBADD_DLD_LINK])
1.708 -
1.709 -m4_pattern_allow([^LT_DLPREOPEN$])
1.710 -LT_DLPREOPEN=
1.711 -if test -n "$LT_DLLOADERS"
1.712 -then
1.713 - for lt_loader in $LT_DLLOADERS; do
1.714 - LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
1.715 - done
1.716 - AC_DEFINE([HAVE_LIBDLLOADER], [1],
1.717 - [Define if libdlloader will be built on this platform])
1.718 -fi
1.719 -AC_SUBST([LT_DLPREOPEN])
1.720 -
1.721 -dnl This isn't used anymore, but set it for backwards compatibility
1.722 -LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
1.723 -AC_SUBST([LIBADD_DL])
1.724 -
1.725 -AC_LANG_POP
1.726 -])# LT_LIB_DLLOAD
1.727 -
1.728 -# Old name:
1.729 -AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
1.730 -dnl aclocal-1.4 backwards compatibility:
1.731 -dnl AC_DEFUN([AC_LTDL_DLLIB], [])
1.732 -
1.733 -
1.734 -# LT_SYS_SYMBOL_USCORE
1.735 -# --------------------
1.736 -# does the compiler prefix global symbols with an underscore?
1.737 -AC_DEFUN([LT_SYS_SYMBOL_USCORE],
1.738 -[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1.739 -AC_CACHE_CHECK([for _ prefix in compiled symbols],
1.740 - [lt_cv_sys_symbol_underscore],
1.741 - [lt_cv_sys_symbol_underscore=no
1.742 - cat > conftest.$ac_ext <<_LT_EOF
1.743 -void nm_test_func(){}
1.744 -int main(){nm_test_func;return 0;}
1.745 -_LT_EOF
1.746 - if AC_TRY_EVAL(ac_compile); then
1.747 - # Now try to grab the symbols.
1.748 - ac_nlist=conftest.nm
1.749 - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
1.750 - # See whether the symbols have a leading underscore.
1.751 - if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
1.752 - lt_cv_sys_symbol_underscore=yes
1.753 - else
1.754 - if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
1.755 - :
1.756 - else
1.757 - echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
1.758 - fi
1.759 - fi
1.760 - else
1.761 - echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
1.762 - fi
1.763 - else
1.764 - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
1.765 - cat conftest.c >&AS_MESSAGE_LOG_FD
1.766 - fi
1.767 - rm -rf conftest*
1.768 - ])
1.769 - sys_symbol_underscore=$lt_cv_sys_symbol_underscore
1.770 - AC_SUBST([sys_symbol_underscore])
1.771 -])# LT_SYS_SYMBOL_USCORE
1.772 -
1.773 -# Old name:
1.774 -AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
1.775 -dnl aclocal-1.4 backwards compatibility:
1.776 -dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
1.777 -
1.778 -
1.779 -# LT_FUNC_DLSYM_USCORE
1.780 -# --------------------
1.781 -AC_DEFUN([LT_FUNC_DLSYM_USCORE],
1.782 -[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
1.783 -if test x"$lt_cv_sys_symbol_underscore" = xyes; then
1.784 - if test x"$libltdl_cv_func_dlopen" = xyes ||
1.785 - test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
1.786 - AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
1.787 - [libltdl_cv_need_uscore],
1.788 - [libltdl_cv_need_uscore=unknown
1.789 - save_LIBS="$LIBS"
1.790 - LIBS="$LIBS $LIBADD_DLOPEN"
1.791 - _LT_TRY_DLOPEN_SELF(
1.792 - [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
1.793 - [], [libltdl_cv_need_uscore=cross])
1.794 - LIBS="$save_LIBS"
1.795 - ])
1.796 - fi
1.797 -fi
1.798 -
1.799 -if test x"$libltdl_cv_need_uscore" = xyes; then
1.800 - AC_DEFINE([NEED_USCORE], [1],
1.801 - [Define if dlsym() requires a leading underscore in symbol names.])
1.802 -fi
1.803 -])# LT_FUNC_DLSYM_USCORE
1.804 -
1.805 -# Old name:
1.806 -AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
1.807 -dnl aclocal-1.4 backwards compatibility:
1.808 -dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
1.809 -