19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall############################################################################## 29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- 39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc. 59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Written by Thomas Tanner, 1999 69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This file is free software; the Free Software Foundation gives 89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# unlimited permission to copy and/or distribute it, with or without 99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# modifications, as long as this notice is preserved. 109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# serial 17 LTDL_INIT 129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) 149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------------------ 159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# DIRECTORY contains the libltdl sources. It is okay to call this 169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# function multiple times, as long as the same DIRECTORY is always given. 179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_CONFIG_LTDL_DIR], 189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_BEFORE([$0], [LTDL_INIT]) 199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_$0($*) 209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_CONFIG_LTDL_DIR 219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# We break this out into a separate macro, so that we can call it safely 239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# internally without being caught accidentally by the sed scan in libtoolize. 249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CONFIG_LTDL_DIR], 259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[dnl remove trailing slashes 269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) 279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_case(_LTDL_DIR, 289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.' 299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_if(_ARG_DIR, [.], 309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [], 319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_define([_LTDL_DIR], _ARG_DIR) 329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], 339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_if(_ARG_DIR, _LTDL_DIR, 349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [], 359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])]) 369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_popdef([_ARG_DIR]) 379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CONFIG_LTDL_DIR 389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Initialise: 409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LTDL_DIR], []) 419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_BUILD_PREFIX 449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------- 459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise 469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to `${top_builddir}/'. 479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_BUILD_PREFIX], 489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifdef([AC_AUTOCONF_VERSION], 499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), 509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], 519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [${top_build_prefix}], 529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [${top_builddir}/])], 539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [${top_build_prefix}])], 549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [${top_builddir}/])[]dnl 559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall]) 569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LTDL_CONVENIENCE 599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------- 609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# sets LIBLTDL to the link flags for the libltdl convenience library and 619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LTDLINCL to the include flags for the libltdl header and adds 629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --enable-ltdl-convenience to the configure arguments. Note that 639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with 649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# '${top_build_prefix}' if available, otherwise with '${top_builddir}/', 659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single 669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# quotes!). If your package is not flat and you're not using automake, 679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# define top_build_prefix, top_builddir, and top_srcdir appropriately 689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# in your Makefiles. 699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LTDL_CONVENIENCE], 709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_BEFORE([$0], [LTDL_INIT])dnl 719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Although the argument is deprecated and no longer documented, 729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one 739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl here make sure it is the same as any other declaration of libltdl's 749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl location! This also ensures lt_ltdl_dir is set when configure.ac is 759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl not yet using an explicit LT_CONFIG_LTDL_DIR. 769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl 779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_$0() 789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LTDL_CONVENIENCE 799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, 819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# now we have LT_CONFIG_LTDL_DIR: 829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBLTDL_CONVENIENCE], 839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) 849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTDL_CONVENIENCE]) 859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) 889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LTDL_CONVENIENCE 919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------- 929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). 939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LTDL_CONVENIENCE], 949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[case $enable_ltdl_convenience in 959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall "") enable_ltdl_convenience=yes 979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac 999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" 1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTDLDEPS=$LIBLTDL 1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" 1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBLTDL]) 1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LTDLDEPS]) 1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LTDLINCL]) 1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# For backwards non-gettext consistent compatibility... 1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallINCLTDL="$LTDLINCL" 1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([INCLTDL]) 1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LTDL_CONVENIENCE 1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LTDL_INSTALLABLE 1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------- 1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# sets LIBLTDL to the link flags for the libltdl installable library 1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and LTDLINCL to the include flags for the libltdl header and adds 1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --enable-ltdl-install to the configure arguments. Note that 1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl 1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if 1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# available, otherwise with '${top_builddir}/', and LTDLINCL will be 1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# prefixed with '${top_srcdir}/' (note the single quotes!). If your 1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# package is not flat and you're not using automake, define top_build_prefix, 1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# top_builddir, and top_srcdir appropriately in your Makefiles. 1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# In the future, this macro may have to be called after LT_INIT. 1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LTDL_INSTALLABLE], 1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_BEFORE([$0], [LTDL_INIT])dnl 1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Although the argument is deprecated and no longer documented, 1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one 1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl here make sure it is the same as any other declaration of libltdl's 1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl location! This also ensures lt_ltdl_dir is set when configure.ac is 1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl not yet using an explicit LT_CONFIG_LTDL_DIR. 1329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl 1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_$0() 1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LTDL_INSTALLABLE 1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, 1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# now we have LT_CONFIG_LTDL_DIR: 1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBLTDL_INSTALLABLE], 1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) 1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTDL_INSTALLABLE]) 1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) 1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LTDL_INSTALLABLE 1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------- 1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). 1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LTDL_INSTALLABLE], 1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[if test -f $prefix/lib/libltdl.la; then 1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_save_LDFLAGS="$LDFLAGS" 1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LDFLAGS="-L$prefix/lib $LDFLAGS" 1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) 1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LDFLAGS="$lt_save_LDFLAGS" 1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test x"${lt_lib_ltdl-no}" = xyes; then 1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test x"$enable_ltdl_install" != xyes; then 1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install 1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install']) 1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall enable_ltdl_install=no 1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall elif test x"$enable_ltdl_install" = xno; then 1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_MSG_WARN([libltdl not installed, but installation disabled]) 1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If configure.ac declared an installable ltdl, and the user didn't override 1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# with --disable-ltdl-install, we will install the shipped libltdl. 1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $enable_ltdl_install in 1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBLTDL="-lltdl" 1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLDEPS= 1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLINCL= 1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *) enable_ltdl_install=yes 1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ac_configure_args="$ac_configure_args --enable-ltdl-install" 1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" 1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLDEPS=$LIBLTDL 1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" 1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac 1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBLTDL]) 1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LTDLDEPS]) 1849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LTDLINCL]) 1859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# For backwards non-gettext consistent compatibility... 1879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallINCLTDL="$LTDLINCL" 1889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([INCLTDL]) 1899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LTDL_INSTALLABLE 1909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LTDL_MODE_DISPATCH 1939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------- 1949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LTDL_MODE_DISPATCH], 1959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself: 1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if(_LTDL_DIR, [], 1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [], 1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall dnl if _LTDL_MODE was not set already, the default value is `subproject': 1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_case(m4_default(_LTDL_MODE, [subproject]), 2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) 2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])], 2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])], 2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [recursive], [], 2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl 2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Be careful not to expand twice: 2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([$0], []) 2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LTDL_MODE_DISPATCH 2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LIBOBJ(MODULE_NAME) 2119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------- 2129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead 2139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# of into LIBOBJS. 2149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([_LT_LIBOBJ], [ 2159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_pattern_allow([^_LT_LIBOBJS$]) 2169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" 2179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LIBOBJS 2189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LTDL_INIT([OPTIONS]) 2219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------- 2229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Clients of libltdl can use this macro to allow the installer to 2239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# choose between a shipped copy of the ltdl sources or a preinstalled 2249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# version of the library. If the shipped ltdl sources are not in a 2259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# subdirectory named libltdl, the directory name must be given by 2269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_CONFIG_LTDL_DIR. 2279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LTDL_INIT], 2289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[dnl Parse OPTIONS 2299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_SET_OPTIONS([$0], [$1]) 2309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl We need to keep our own list of libobjs separate from our parent project, 2329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl and the easiest way to do that is redefine the AC_LIBOBJs macro while 2339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl we look for our own LIBOBJs. 2349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) 2359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pushdef([AC_LIBSOURCES]) 2369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl If not otherwise defined, default to the 1.5.x compatible subproject mode: 2389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if(_LTDL_MODE, [], 2399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) 2409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], 2419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) 2429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_WITH([included_ltdl], 2449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AS_HELP_STRING([--with-included-ltdl], 2459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [use the GNU ltdl sources included here])]) 2469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "x$with_included_ltdl" != xyes; then 2489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # We are not being forced to use the included libltdl sources, so 2499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # decide whether there is a useful installed version we can use. 2509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_CHECK_HEADER([ltdl.h], 2519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_CHECK_DECL([lt_dlinterface_register], 2529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], 2539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [with_included_ltdl=no], 2549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [with_included_ltdl=yes])], 2559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [with_included_ltdl=yes], 2569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_INCLUDES_DEFAULT 2579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall #include <ltdl.h>])], 2589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [with_included_ltdl=yes], 2599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_INCLUDES_DEFAULT] 2609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ) 2619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 2629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE 2649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl was called yet, then for old times' sake, we assume libltdl is in an 2659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl eponymous directory: 2669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) 2679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_WITH([ltdl_include], 2699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AS_HELP_STRING([--with-ltdl-include=DIR], 2709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [use the ltdl headers installed in DIR])]) 2719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$with_ltdl_include"; then 2739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test -f "$with_ltdl_include/ltdl.h"; then : 2749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 2759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include']) 2769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 2779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse 2789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall with_ltdl_include=no 2799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 2809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_WITH([ltdl_lib], 2829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AS_HELP_STRING([--with-ltdl-lib=DIR], 2839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [use the libltdl.la installed in DIR])]) 2849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$with_ltdl_lib"; then 2869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test -f "$with_ltdl_lib/libltdl.la"; then : 2879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 2889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib']) 2899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 2909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse 2919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall with_ltdl_lib=no 2929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 2939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in 2959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ,yes,no,no,) 2969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_case(m4_default(_LTDL_TYPE, [convenience]), 2979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [convenience], [_LTDL_CONVENIENCE], 2989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [installable], [_LTDL_INSTALLABLE], 2999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) 3009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 3019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ,no,no,no,) 3029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # If the included ltdl is not to be used, then use the 3039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # preinstalled libltdl we found. 3049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE([HAVE_LTDL], [1], 3059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define this if a modern libltdl is already installed]) 3069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBLTDL=-lltdl 3079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLDEPS= 3089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLINCL= 3099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 3109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ,no*,no,*) 3119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together]) 3129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 3139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *) with_included_ltdl=no 3149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBLTDL="-L$with_ltdl_lib -lltdl" 3159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLDEPS= 3169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LTDLINCL="-I$with_ltdl_include" 3179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 3189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac 3199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallINCLTDL="$LTDLINCL" 3209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Report our decision... 3229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([where to find libltdl headers]) 3239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$LTDLINCL]) 3249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([where to find libltdl library]) 3259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$LIBLTDL]) 3269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTDL_SETUP 3289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl restore autoconf definition. 3309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_popdef([AC_LIBOBJ]) 3319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_popdef([AC_LIBSOURCES]) 3329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CONFIG_COMMANDS_PRE([ 3349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _ltdl_libobjs= 3359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _ltdl_ltlibobjs= 3369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test -n "$_LT_LIBOBJS"; then 3379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Remove the extension. 3389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' 3399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do 3409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" 3419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" 3429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall done 3439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 3449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) 3459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) 3469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall]) 3479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Only expand once: 3499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([LTDL_INIT]) 3509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LTDL_INIT 3519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names: 3539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) 3549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) 3559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) 3569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 3579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIB_LTDL], []) 3589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_WITH_LTDL], []) 3599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([LT_WITH_LTDL], []) 3609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LTDL_SETUP 3639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------- 3649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Perform all the checks necessary for compilation of the ltdl objects 3659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -- including compiler checks and header checks. This is a public 3669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# interface mainly for the benefit of libltdl's own configure.ac, most 3679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# other users should call LTDL_INIT instead. 3689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([_LTDL_SETUP], 3699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_PROG_CC])dnl 3709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_SYS_MODULE_EXT])dnl 3719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_SYS_MODULE_PATH])dnl 3729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl 3739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_LIB_DLLOAD])dnl 3749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl 3759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl 3769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl 3779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([gl_FUNC_ARGZ])dnl 3789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CHECK_OBJDIR])dnl 3809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_HEADER_DLFCN])dnl 3819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CHECK_DLPREOPEN])dnl 3829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl 3839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Don't require this, or it will be expanded earlier than the code 3859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl that sets the variables it relies on: 3869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_ENABLE_INSTALL 3879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl _LTDL_MODE specific code must be called at least once: 3899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTDL_MODE_DISPATCH 3909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS 3929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the user used. This is so that ltdl.h can pick up the parent projects 3939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# config.h file, The first file in AC_CONFIG_HEADERS must contain the 3949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# definitions required by ltdl.c. 3959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). 3969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CONFIG_COMMANDS_PRE([dnl 3979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pattern_allow([^LT_CONFIG_H$])dnl 3989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifset([AH_HEADER], 3999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [LT_CONFIG_H=AH_HEADER], 4009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [m4_ifset([AC_LIST_HEADERS], 4019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`], 4029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [])])]) 4039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LT_CONFIG_H]) 4049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], 4069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [], [], [AC_INCLUDES_DEFAULT]) 4079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) 4099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) 4109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) 4129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallname=ltdl 4149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` 4159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LTDLOPEN]) 4169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LTDL_SETUP 4179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_ENABLE_INSTALL 4209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------ 4219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_ENABLE_INSTALL], 4229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_ARG_ENABLE([ltdl-install], 4239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) 4249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase ,${enable_ltdl_install},${enable_ltdl_convenience} in 4269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *yes*) ;; 4279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *) enable_ltdl_convenience=yes ;; 4289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac 4299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifdef([AM_CONDITIONAL], 4319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) 4329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)]) 4339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_ENABLE_INSTALL 4349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SYS_DLOPEN_DEPLIBS 4379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------- 4389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], 4399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([whether deplibs are loaded by dlopen], 4419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [lt_cv_sys_dlopen_deplibs], 4429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [# PORTME does your system automatically load deplibs for dlopen? 4439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # or its logical equivalent (e.g. shl_load for HP-UX < 11) 4449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # For now, we just catch OSes we know something about -- in the 4459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # future, we'll try test this programmatically. 4469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=unknown 4479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall case $host_os in 4489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall aix3*|aix4.1.*|aix4.2.*) 4499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Unknown whether this is true for these versions of AIX, but 4509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # we want this `case' here to explicitly catch those versions. 4519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=unknown 4529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall aix[[4-9]]*) 4549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall amigaos*) 4579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall case $host_cpu in 4589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall powerpc) 4599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=no 4609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall esac 4629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall darwin*) 4649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Assuming the user has installed a libdl from somewhere, this is true 4659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # If you are looking for one http://www.opendarwin.org/projects/dlcompat 4669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall freebsd* | dragonfly*) 4699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall gnu* | linux* | k*bsd*-gnu) 4729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # GNU and its variants, using gnu ld.so (Glibc) 4739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall hpux10*|hpux11*) 4769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall interix*) 4799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall irix[[12345]]*|irix6.[[01]]*) 4829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Catch all versions of IRIX before 6.2, and indicate that we don't 4839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # know how it worked for any of those versions. 4849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=unknown 4859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall irix*) 4879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # The case above catches anything before 6.2, and it's known that 4889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # at 6.2 and later dlopen does load deplibs. 4899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall netbsd*) 4929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall openbsd*) 4959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 4969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 4979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall osf[[1234]]*) 4989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # dlopen did load deplibs (at least at 4.x), but until the 5.x series, 4999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # it did *not* use an RPATH in a shared library to find objects the 5009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # library depends on, so we explicitly say `no'. 5019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=no 5029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 5039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall osf5.0|osf5.0a|osf5.1) 5049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # dlopen *does* load deplibs and with the right loader patch applied 5059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # it even uses RPATH in a shared library to search for shared objects 5069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # that the library depends on, but there's no easy way to know if that 5079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # patch is installed. Since this is the case, all we can really 5089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # say is unknown -- it depends on the patch being installed. If 5099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # it is, this changes to `yes'. Without it, it would be `no'. 5109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=unknown 5119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 5129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall osf*) 5139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # the two cases above should catch all versions of osf <= 5.1. Read 5149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # the comments above for what we know about them. 5159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # At > 5.1, deplibs are loaded *and* any RPATH in a shared library 5169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # is used to find them so we can finally say `yes'. 5179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 5189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 5199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall qnx*) 5209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 5219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 5229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall solaris*) 5239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_dlopen_deplibs=yes 5249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 5259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall libltdl_cv_sys_dlopen_deplibs=yes 5279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 5289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall esac 5299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ]) 5309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$lt_cv_sys_dlopen_deplibs" != yes; then 5319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], 5329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if the OS needs help to load dependent libraries for dlopen().]) 5339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 5349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_SYS_DLOPEN_DEPLIBS 5359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 5379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) 5389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 5399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) 5409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SYS_MODULE_EXT 5439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------- 5449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SYS_MODULE_EXT], 5459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl 5469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([which extension is used for runtime loadable modules], 5479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [libltdl_cv_shlibext], 5489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[ 5499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmodule=yes 5509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halleval libltdl_cv_shlibext=$shrext_cmds 5519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ]) 5529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$libltdl_cv_shlibext"; then 5539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_pattern_allow([LT_MODULE_EXT])dnl 5549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], 5559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define to the extension used for runtime loadable modules, say, ".so".]) 5569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 5579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_SYS_MODULE_EXT 5589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 5609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) 5619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 5629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) 5639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SYS_MODULE_PATH 5669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------ 5679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SYS_MODULE_PATH], 5689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl 5699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([which variable specifies run-time module search path], 5709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"]) 5719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$lt_cv_module_path_var"; then 5729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_pattern_allow([LT_MODULE_PATH_VAR])dnl 5739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], 5749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define to the name of the environment variable that determines the run-time module search path.]) 5759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 5769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_SYS_MODULE_PATH 5779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 5799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) 5809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 5819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) 5829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 5849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SYS_DLSEARCH_PATH 5859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------- 5869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SYS_DLSEARCH_PATH], 5879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl 5889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([for the default library search path], 5899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [lt_cv_sys_dlsearch_path], 5909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"]) 5919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$lt_cv_sys_dlsearch_path"; then 5929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall sys_dlsearch_path= 5939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall for dir in $lt_cv_sys_dlsearch_path; do 5949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test -z "$sys_dlsearch_path"; then 5959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall sys_dlsearch_path="$dir" 5969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 5979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" 5989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 5999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall done 6009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall m4_pattern_allow([LT_DLSEARCH_PATH])dnl 6019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], 6029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define to the system default library search path.]) 6039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 6049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_SYS_DLSEARCH_PATH 6059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 6079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) 6089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 6099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) 6109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CHECK_DLPREOPEN 6139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------- 6149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CHECK_DLPREOPEN], 6159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], 6179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [libltdl_cv_preloaded_symbols], 6189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [if test -n "$lt_cv_sys_global_symbol_pipe"; then 6199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall libltdl_cv_preloaded_symbols=yes 6209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 6219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall libltdl_cv_preloaded_symbols=no 6229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 6239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ]) 6249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test x"$libltdl_cv_preloaded_symbols" = xyes; then 6259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], 6269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if libtool can extract symbol lists from object files.]) 6279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 6289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CHECK_DLPREOPEN 6299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_LIB_DLLOAD 6329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------- 6339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_LIB_DLLOAD], 6349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_pattern_allow([^LT_DLLOADERS$]) 6359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_DLLOADERS= 6369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LT_DLLOADERS]) 6379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_PUSH([C]) 6399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBADD_DLOPEN= 6419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SEARCH_LIBS([dlopen], [dl], 6429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_LIBDL], [1], 6439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the libdl library or equivalent.]) 6449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test "$ac_cv_search_dlopen" != "none required" ; then 6459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBADD_DLOPEN="-ldl" 6469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 6479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall libltdl_cv_lib_dl_dlopen="yes" 6489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], 6499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H 6509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# include <dlfcn.h> 6519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 6529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ]], [[dlopen(0, 0);]])], 6539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_LIBDL], [1], 6549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the libdl library or equivalent.]) 6559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall libltdl_cv_func_dlopen="yes" 6569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], 6579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_CHECK_LIB([svld], [dlopen], 6589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_LIBDL], [1], 6599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the libdl library or equivalent.]) 6609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" 6619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) 6629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes 6639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallthen 6649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_save_LIBS="$LIBS" 6659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBS="$LIBS $LIBADD_DLOPEN" 6669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_CHECK_FUNCS([dlerror]) 6679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBS="$lt_save_LIBS" 6689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 6699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBADD_DLOPEN]) 6709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBADD_SHL_LOAD= 6729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_FUNC([shl_load], 6739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_SHL_LOAD], [1], 6749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the shl_load function.]) 6759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], 6769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_CHECK_LIB([dld], [shl_load], 6779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_SHL_LOAD], [1], 6789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the shl_load function.]) 6799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" 6809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBADD_SHL_LOAD="-ldld"])]) 6819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBADD_SHL_LOAD]) 6829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 6839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in 6849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldarwin[[1567]].*) 6859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# We only want this for pre-Mac OS X 10.4. 6869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_CHECK_FUNC([_dyld_func_lookup], 6879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_DYLD], [1], 6889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the _dyld_func_lookup function.]) 6899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) 6909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 6919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallbeos*) 6929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" 6939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 6949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcygwin* | mingw* | os2* | pw32*) 6959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]]) 6969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" 6979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 6989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac 6999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_LIB([dld], [dld_link], 7019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [AC_DEFINE([HAVE_DLD], [1], 7029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if you have the GNU dld library.]) 7039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) 7049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBADD_DLD_LINK]) 7059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pattern_allow([^LT_DLPREOPEN$]) 7079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_DLPREOPEN= 7089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$LT_DLLOADERS" 7099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallthen 7109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall for lt_loader in $LT_DLLOADERS; do 7119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " 7129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall done 7139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE([HAVE_LIBDLLOADER], [1], 7149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if libdlloader will be built on this platform]) 7159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 7169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LT_DLPREOPEN]) 7179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl This isn't used anymore, but set it for backwards compatibility 7199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" 7209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBADD_DL]) 7219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_POP 7239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_LIB_DLLOAD 7249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 7269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) 7279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 7289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_DLLIB], []) 7299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SYS_SYMBOL_USCORE 7329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------- 7339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# does the compiler prefix global symbols with an underscore? 7349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SYS_SYMBOL_USCORE], 7359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 7369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([for _ prefix in compiled symbols], 7379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [lt_cv_sys_symbol_underscore], 7389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [lt_cv_sys_symbol_underscore=no 7399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall cat > conftest.$ac_ext <<_LT_EOF 7409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid nm_test_func(){} 7419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint main(){nm_test_func;return 0;} 7429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF 7439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if AC_TRY_EVAL(ac_compile); then 7449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Now try to grab the symbols. 7459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ac_nlist=conftest.nm 7469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then 7479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # See whether the symbols have a leading underscore. 7489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then 7499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall lt_cv_sys_symbol_underscore=yes 7509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 7519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then 7529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall : 7539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 7549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD 7559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 7569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 7579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 7589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 7609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall else 7619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD 7629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall cat conftest.c >&AS_MESSAGE_LOG_FD 7639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 7649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall rm -rf conftest* 7659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ]) 7669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall sys_symbol_underscore=$lt_cv_sys_symbol_underscore 7679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_SUBST([sys_symbol_underscore]) 7689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_SYS_SYMBOL_USCORE 7699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 7719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) 7729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 7739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) 7749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_FUNC_DLSYM_USCORE 7779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------- 7789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_FUNC_DLSYM_USCORE], 7799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl 7809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test x"$lt_cv_sys_symbol_underscore" = xyes; then 7819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if test x"$libltdl_cv_func_dlopen" = xyes || 7829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then 7839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_CACHE_CHECK([whether we have to add an underscore for dlsym], 7849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [libltdl_cv_need_uscore], 7859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [libltdl_cv_need_uscore=unknown 7869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall save_LIBS="$LIBS" 7879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBS="$LIBS $LIBADD_DLOPEN" 7889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _LT_TRY_DLOPEN_SELF( 7899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], 7909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [], [libltdl_cv_need_uscore=cross]) 7919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall LIBS="$save_LIBS" 7929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ]) 7939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall fi 7949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 7959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 7969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test x"$libltdl_cv_need_uscore" = xyes; then 7979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall AC_DEFINE([NEED_USCORE], [1], 7989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall [Define if dlsym() requires a leading underscore in symbol names.]) 7999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi 8009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_FUNC_DLSYM_USCORE 8019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 8029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name: 8039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) 8049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility: 8059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) 8069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 807