⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ltdl.m4

📁 MPI stands for the Message Passing Interface. Written by the MPI Forum (a large committee comprising
💻 M4
📖 第 1 页 / 共 2 页
字号:
# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-##   Copyright (C) 1999-2006, 2007 Free Software Foundation, Inc.#   Written by Thomas Tanner, 1999## This file is free software; the Free Software Foundation gives# unlimited permission to copy and/or distribute it, with or without# modifications, as long as this notice is preserved.# serial 12 LTDL_INIT# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])# ------------------------------------------# DIRECTORY contains the libltdl sources.  It is okay to call this# function multiple times, as long as the same DIRECTORY is always given.AC_DEFUN([LT_CONFIG_LTDL_DIR],[AC_BEFORE([$0], [LT_WITH_LTDL])_$0($*)])# LT_CONFIG_LTDL_DIR# We break this out into a separate macro, so that we can call it safely# internally without being caught accidentally by the sed scan in libtoolize.m4_defun([_LT_CONFIG_LTDL_DIR],[dnl remove trailing slashesm4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))m4_case(_LTDL_DIR,	[], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'	     m4_if(_ARG_DIR, [.],	             [],		 [m4_define([_LTDL_DIR], _ARG_DIR)	          _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],    [m4_if(_ARG_DIR, _LTDL_DIR,	    [],	[m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])m4_popdef([_ARG_DIR])dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:m4_if(_LTDL_MODE, [],	[m4_define([_LTDL_MODE], m4_default([$2], [subproject]))	m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],		[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])])# LT_CONFIG_LTDL_DIR# Initialise:m4_define([_LTDL_DIR], [])m4_define([_LTDL_MODE], [])# LTDL_CONVENIENCE# ----------------# sets LIBLTDL to the link flags for the libltdl convenience library and# LTDLINCL to the include flags for the libltdl header and adds# --enable-ltdl-convenience to the configure arguments.  Note that# AC_CONFIG_SUBDIRS is not called here.  LIBLTDL will be prefixed with# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'# (note the single quotes!).  If your package is not flat and you're not# using automake, define top_builddir and top_srcdir appropriately in# your Makefiles.AC_DEFUN([LTDL_CONVENIENCE],[AC_BEFORE([$0], [LT_WITH_LTDL])dnldnl Although the argument is deprecated and no longer documented,dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have onednl here make sure it is the same as any other declaration of libltdl'sdnl location!  This also ensures lt_ltdl_dir is set when configure.ac isdnl not yet using an explicit LT_CONFIG_LTDL_DIR.m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnlcase $enable_ltdl_convenience in  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;  "") enable_ltdl_convenience=yes      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;  esacLIBLTDL='${top_builddir}'"${lt_ltdl_dir+/$lt_ltdl_dir}/libltdlc.la"LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"AC_SUBST([LIBLTDL])AC_SUBST([LTDLINCL])# For backwards non-gettext consistent compatibility...INCLTDL="$LTDLINCL"AC_SUBST([INCLTDL])])# LTDL_CONVENIENCE# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,# now we have LT_CONFIG_LTDL_DIR:AU_DEFUN([AC_LIBLTDL_CONVENIENCE],[_LT_CONFIG_LTDL_DIR([$1])LTDL_CONVENIENCE])dnl aclocal-1.4 backwards compatibility:dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])# LTDL_INSTALLABLE# ----------------# sets LIBLTDL to the link flags for the libltdl installable library# and LTDLINCL to the include flags for the libltdl header and adds# --enable-ltdl-install to the configure arguments.  Note that# AC_CONFIG_SUBDIRS is not called from here.  If an installed libltdl# is not found, LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single# quotes!).  If your package is not flat and you're not using automake,# define top_builddir and top_srcdir appropriately in your Makefiles.# In the future, this macro may have to be called after LT_INIT.AC_DEFUN([LTDL_INSTALLABLE],[AC_BEFORE([$0], [LT_WITH_LTDL])dnldnl Although the argument is deprecated and no longer documented,dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have onednl here make sure it is the same as any other declaration of libltdl'sdnl location!  This also ensures lt_ltdl_dir is set when configure.ac isdnl not yet using an explicit LT_CONFIG_LTDL_DIR.m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnlAC_CHECK_LIB([ltdl], [lt_dlinit],  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],  [if test x"$enable_ltdl_install" = xno; then     AC_MSG_WARN([libltdl not installed, but installation disabled])   else     enable_ltdl_install=yes   fi  ])if test x"$enable_ltdl_install" = x"yes"; then  ac_configure_args="$ac_configure_args --enable-ltdl-install"  LIBLTDL='${top_builddir}'"${lt_ltdl_dir+/$lt_ltdl_dir}/libltdl.la"  LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"else  ac_configure_args="$ac_configure_args --enable-ltdl-install=no"  LIBLTDL="-lltdl"  LTDLINCL=fiAC_SUBST([LIBLTDL])AC_SUBST([LTDLINCL])# For backwards non-gettext consistent compatibility...INCLTDL="$LTDLINCL"AC_SUBST([INCLTDL])])# LTDL_INSTALLABLE# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,# now we have LT_CONFIG_LTDL_DIR:AU_DEFUN([AC_LIBLTDL_INSTALLABLE],[_LT_CONFIG_LTDL_DIR([$1])LTDL_INSTALLABLE])dnl aclocal-1.4 backwards compatibility:dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])# _LTDL_MODE_DISPATCH# -------------------m4_define([_LTDL_MODE_DISPATCH],[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:m4_if(_LTDL_DIR, [],	[],    dnl if _LTDL_MODE was not set already, the default value is `subproject':    [m4_case(m4_default(_LTDL_MODE, [subproject]),	  [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)			  _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],	  [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],	  [recursive], [],	[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnldnl Be careful not to expand twice:m4_define([$0], [])])# _LTDL_MODE_DISPATCH# LT_WITH_LTDL# ------------# Clients of libltdl can use this macro to allow the installer to# choose between a shipped copy of the ltdl sources or a preinstalled# version of the library.  If the shipped ltdl sources are not in a# subdirectory named libltdl, the directory name must be given by# LT_CONFIG_LTDL_DIR.AC_DEFUN([LT_WITH_LTDL],[dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLEdnl was called yet, then for old times' sake, we assume libltdl is in andnl eponymous directory:AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])AC_ARG_WITH([included_ltdl],    [AS_HELP_STRING([--with-included-ltdl],                    [use the GNU ltdl sources included here])])if test "x$with_included_ltdl" != xyes; then  # We are not being forced to use the included libltdl sources, so  # decide whether there is a useful installed version we can use.  AC_CHECK_HEADER([ltdl.h],      [AC_CHECK_DECL([lt_dlinterface_register],	   [AC_CHECK_LIB([ltdl], [lt_dlinterface_register],	       [with_included_ltdl=no],	       [with_included_ltdl=yes])],	   [with_included_ltdl=yes],	   [AC_INCLUDES_DEFAULT	    #include <ltdl.h>])],      [with_included_ltdl=yes],      [AC_INCLUDES_DEFAULT]  )fiif test "x$enable_ltdl_install" != xyes; then  # If the user did not specify an installable libltdl, then default  # to a convenience lib.  LTDL_CONVENIENCEfiif test "x$with_included_ltdl" = xno; then  # If the included ltdl is not to be used, then use the  # preinstalled libltdl we found.  AC_DEFINE([HAVE_LTDL], [1],    [Define this if a modern libltdl is already installed])  LIBLTDL=-lltdl  LTDLINCL=  INCLTDL=fi# Report our decision...AC_MSG_CHECKING([whether to use included libltdl])AC_MSG_RESULT([$with_included_ltdl])dnl Be certain that LTDL_INIT is invoked if we are configuring libltdldnl from here:m4_if(_LTDL_MODE, [subproject],	[_LTDL_MODE_DISPATCH],    [AC_PROVIDE_IFELSE([LTDL_INIT],	    [],	[LTDL_INIT	AC_DEFUN([LTDL_INIT], [])])])])# LT_WITH_LTDL# Old name:AU_ALIAS([AC_WITH_LTDL], [LT_WITH_LTDL])dnl aclocal-1.4 backwards compatibility:dnl AC_DEFUN([AC_WITH_LTDL], [])# LTDL_INIT# ---------# Perform all the checks necessary for compilation of the ltdl objects#  -- including compiler checks and header checks.  This is a public# interface  mainly for the benefit of libltdl's own configure.ac, most# other users should call LT_WITH_LTDL instead.AC_DEFUN([LTDL_INIT],[AC_REQUIRE([AC_PROG_CC])dnlAC_REQUIRE([LT_SYS_MODULE_EXT])dnlAC_REQUIRE([LT_SYS_MODULE_PATH])dnlAC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnlAC_REQUIRE([LT_LIB_DLLOAD])dnlAC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnlAC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnlAC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnlAC_REQUIRE([gl_FUNC_ARGZ])dnlm4_require([_LT_CHECK_OBJDIR])dnlm4_require([_LT_HEADER_DLFCN])dnlm4_require([_LT_CHECK_DLPREOPEN])dnlm4_require([_LT_DECL_SED])dnldnl Don't require this, or it will be expanded earlier than the codednl that sets the variables it relies on:_LT_ENABLE_INSTALLdnl Although deprecated and no longer documented, alpha releases ofdnl libtool used to define an LTDL_INIT to take a DIRECTORY orgument.dnl If LT_CONFIG_LTDL_DIR was called already, but LTDL_INIT was given adnl DIRECTORY argument, check it is the same as previous invocations.  Ifdnl it still hasn't been called, then do it now, defaulting to `libltdl'dnl if no DIRECTORY argument was passed.m4_provide_if([_LT_CONFIG_LTDL_DIR],	[m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])],    [_LT_CONFIG_LTDL_DIR(m4_default([$1], [libltdl]))])dnldnl _LTDL_MODE specific code must be evaluated at least once:_LTDL_MODE_DISPATCH# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS# the user used.  This is so that ltdl.h can pick up the parent projects# config.h file, The first file in AC_CONFIG_HEADERS must contain the# definitions required by ltdl.c.# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).AC_CONFIG_COMMANDS_PRE([dnlm4_pattern_allow([^LT_CONFIG_H$])dnlm4_ifset([AH_HEADER],    [LT_CONFIG_H=AH_HEADER],    [m4_ifset([AC_LIST_HEADERS],	    [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ :]].*$,,'`],	[])])])AC_SUBST([LT_CONFIG_H])AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],	[], [], [AC_INCLUDES_DEFAULT])AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])name=ltdlLTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`AC_SUBST([LTDLOPEN])])# LTDL_INIT# Old name:AU_ALIAS([AC_LIB_LTDL], [LTDL_INIT])dnl aclocal-1.4 backwards compatibility:dnl AC_DEFUN([AC_LIB_LTDL], [])# _LT_ENABLE_INSTALL# ------------------m4_define([_LT_ENABLE_INSTALL],[AC_ARG_ENABLE([ltdl-install],    [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])# _LT_ENABLE_INSTALL# LT_SYS_DLOPEN_DEPLIBS# ---------------------AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],[AC_REQUIRE([AC_CANONICAL_HOST])dnlAC_CACHE_CHECK([whether deplibs are loaded by dlopen],  [lt_cv_sys_dlopen_deplibs],  [# PORTME does your system automatically load deplibs for dlopen?  # or its logical equivalent (e.g. shl_load for HP-UX < 11)  # For now, we just catch OSes we know something about -- in the  # future, we'll try test this programmatically.  lt_cv_sys_dlopen_deplibs=unknown  case $host_os in  aix3*|aix4.1.*|aix4.2.*)    # Unknown whether this is true for these versions of AIX, but    # we want this `case' here to explicitly catch those versions.    lt_cv_sys_dlopen_deplibs=unknown    ;;  aix[[45]]*)    lt_cv_sys_dlopen_deplibs=yes    ;;  darwin*)    # Assuming the user has installed a libdl from somewhere, this is true    # If you are looking for one http://www.opendarwin.org/projects/dlcompat    lt_cv_sys_dlopen_deplibs=yes

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -