mirror of
https://github.com/darlinghq/darling-dbuskit.git
synced 2024-11-23 12:19:40 +00:00
6537103a9e
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@40503 72102866-910b-0410-8b05-ffd578937521
620 lines
24 KiB
Plaintext
620 lines
24 KiB
Plaintext
# generated automatically by aclocal 1.15 -*- Autoconf -*-
|
|
|
|
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
|
|
|
# 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.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE.
|
|
|
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
|
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
|
dnl serial 11 (pkg-config-0.29)
|
|
dnl
|
|
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
|
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
|
dnl
|
|
dnl This program is free software; you can redistribute it and/or modify
|
|
dnl it under the terms of the GNU General Public License as published by
|
|
dnl the Free Software Foundation; either version 2 of the License, or
|
|
dnl (at your option) any later version.
|
|
dnl
|
|
dnl This program is distributed in the hope that it will be useful, but
|
|
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
dnl General Public License for more details.
|
|
dnl
|
|
dnl You should have received a copy of the GNU General Public License
|
|
dnl along with this program; if not, write to the Free Software
|
|
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
dnl 02111-1307, USA.
|
|
dnl
|
|
dnl As a special exception to the GNU General Public License, if you
|
|
dnl distribute this file as part of a program that contains a
|
|
dnl configuration script generated by Autoconf, you may include it under
|
|
dnl the same distribution terms that you use for the rest of that
|
|
dnl program.
|
|
|
|
dnl PKG_PREREQ(MIN-VERSION)
|
|
dnl -----------------------
|
|
dnl Since: 0.29
|
|
dnl
|
|
dnl Verify that the version of the pkg-config macros are at least
|
|
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
|
dnl installed version of pkg-config, this checks the developer's version
|
|
dnl of pkg.m4 when generating configure.
|
|
dnl
|
|
dnl To ensure that this macro is defined, also add:
|
|
dnl m4_ifndef([PKG_PREREQ],
|
|
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
|
dnl
|
|
dnl See the "Since" comment for each macro you use to see what version
|
|
dnl of the macros you require.
|
|
m4_defun([PKG_PREREQ],
|
|
[m4_define([PKG_MACROS_VERSION], [0.29])
|
|
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
|
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
|
])dnl PKG_PREREQ
|
|
|
|
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
|
dnl ----------------------------------
|
|
dnl Since: 0.16
|
|
dnl
|
|
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
|
dnl first found in the path. Checks that the version of pkg-config found
|
|
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
|
dnl used since that's the first version where most current features of
|
|
dnl pkg-config existed.
|
|
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
|
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
|
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
|
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
|
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
|
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
|
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
|
|
|
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
|
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
|
fi
|
|
if test -n "$PKG_CONFIG"; then
|
|
_pkg_min_version=m4_default([$1], [0.9.0])
|
|
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
|
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
AC_MSG_RESULT([yes])
|
|
else
|
|
AC_MSG_RESULT([no])
|
|
PKG_CONFIG=""
|
|
fi
|
|
fi[]dnl
|
|
])dnl PKG_PROG_PKG_CONFIG
|
|
|
|
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
dnl -------------------------------------------------------------------
|
|
dnl Since: 0.18
|
|
dnl
|
|
dnl Check to see whether a particular set of modules exists. Similar to
|
|
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
|
dnl
|
|
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
dnl only at the first occurence in configure.ac, so if the first place
|
|
dnl it's called might be skipped (such as if it is within an "if", you
|
|
dnl have to call PKG_CHECK_EXISTS manually
|
|
AC_DEFUN([PKG_CHECK_EXISTS],
|
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
if test -n "$PKG_CONFIG" && \
|
|
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
|
m4_default([$2], [:])
|
|
m4_ifvaln([$3], [else
|
|
$3])dnl
|
|
fi])
|
|
|
|
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
|
dnl ---------------------------------------------
|
|
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
|
dnl pkg_failed based on the result.
|
|
m4_define([_PKG_CONFIG],
|
|
[if test -n "$$1"; then
|
|
pkg_cv_[]$1="$$1"
|
|
elif test -n "$PKG_CONFIG"; then
|
|
PKG_CHECK_EXISTS([$3],
|
|
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
|
test "x$?" != "x0" && pkg_failed=yes ],
|
|
[pkg_failed=yes])
|
|
else
|
|
pkg_failed=untried
|
|
fi[]dnl
|
|
])dnl _PKG_CONFIG
|
|
|
|
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
|
dnl ---------------------------
|
|
dnl Internal check to see if pkg-config supports short errors.
|
|
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
_pkg_short_errors_supported=yes
|
|
else
|
|
_pkg_short_errors_supported=no
|
|
fi[]dnl
|
|
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
|
|
|
|
|
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
|
dnl [ACTION-IF-NOT-FOUND])
|
|
dnl --------------------------------------------------------------
|
|
dnl Since: 0.4.0
|
|
dnl
|
|
dnl Note that if there is a possibility the first call to
|
|
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
|
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
|
AC_DEFUN([PKG_CHECK_MODULES],
|
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
|
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
|
|
|
pkg_failed=no
|
|
AC_MSG_CHECKING([for $1])
|
|
|
|
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
|
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
|
|
|
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
|
and $1[]_LIBS to avoid the need to call pkg-config.
|
|
See the pkg-config man page for more details.])
|
|
|
|
if test $pkg_failed = yes; then
|
|
AC_MSG_RESULT([no])
|
|
_PKG_SHORT_ERRORS_SUPPORTED
|
|
if test $_pkg_short_errors_supported = yes; then
|
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
|
else
|
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
|
fi
|
|
# Put the nasty error message in config.log where it belongs
|
|
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
|
|
|
m4_default([$4], [AC_MSG_ERROR(
|
|
[Package requirements ($2) were not met:
|
|
|
|
$$1_PKG_ERRORS
|
|
|
|
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
|
installed software in a non-standard prefix.
|
|
|
|
_PKG_TEXT])[]dnl
|
|
])
|
|
elif test $pkg_failed = untried; then
|
|
AC_MSG_RESULT([no])
|
|
m4_default([$4], [AC_MSG_FAILURE(
|
|
[The pkg-config script could not be found or is too old. Make sure it
|
|
is in your PATH or set the PKG_CONFIG environment variable to the full
|
|
path to pkg-config.
|
|
|
|
_PKG_TEXT
|
|
|
|
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
|
])
|
|
else
|
|
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
|
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
|
AC_MSG_RESULT([yes])
|
|
$3
|
|
fi[]dnl
|
|
])dnl PKG_CHECK_MODULES
|
|
|
|
|
|
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
|
dnl [ACTION-IF-NOT-FOUND])
|
|
dnl ---------------------------------------------------------------------
|
|
dnl Since: 0.29
|
|
dnl
|
|
dnl Checks for existence of MODULES and gathers its build flags with
|
|
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
|
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
|
dnl
|
|
dnl Note that if there is a possibility the first call to
|
|
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
|
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
|
dnl configure.ac.
|
|
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
_save_PKG_CONFIG=$PKG_CONFIG
|
|
PKG_CONFIG="$PKG_CONFIG --static"
|
|
PKG_CHECK_MODULES($@)
|
|
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
|
])dnl PKG_CHECK_MODULES_STATIC
|
|
|
|
|
|
dnl PKG_INSTALLDIR([DIRECTORY])
|
|
dnl -------------------------
|
|
dnl Since: 0.27
|
|
dnl
|
|
dnl Substitutes the variable pkgconfigdir as the location where a module
|
|
dnl should install pkg-config .pc files. By default the directory is
|
|
dnl $libdir/pkgconfig, but the default can be changed by passing
|
|
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
|
dnl parameter.
|
|
AC_DEFUN([PKG_INSTALLDIR],
|
|
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
|
m4_pushdef([pkg_description],
|
|
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
|
AC_ARG_WITH([pkgconfigdir],
|
|
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
|
[with_pkgconfigdir=]pkg_default)
|
|
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
|
m4_popdef([pkg_default])
|
|
m4_popdef([pkg_description])
|
|
])dnl PKG_INSTALLDIR
|
|
|
|
|
|
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
|
dnl --------------------------------
|
|
dnl Since: 0.27
|
|
dnl
|
|
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
|
dnl module should install arch-independent pkg-config .pc files. By
|
|
dnl default the directory is $datadir/pkgconfig, but the default can be
|
|
dnl changed by passing DIRECTORY. The user can override through the
|
|
dnl --with-noarch-pkgconfigdir parameter.
|
|
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
|
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
|
m4_pushdef([pkg_description],
|
|
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
|
AC_ARG_WITH([noarch-pkgconfigdir],
|
|
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
|
[with_noarch_pkgconfigdir=]pkg_default)
|
|
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
|
m4_popdef([pkg_default])
|
|
m4_popdef([pkg_description])
|
|
])dnl PKG_NOARCH_INSTALLDIR
|
|
|
|
|
|
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
|
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
dnl -------------------------------------------
|
|
dnl Since: 0.28
|
|
dnl
|
|
dnl Retrieves the value of the pkg-config variable for the given module.
|
|
AC_DEFUN([PKG_CHECK_VAR],
|
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
|
|
|
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
|
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
|
|
|
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
|
])dnl PKG_CHECK_VAR
|
|
|
|
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
|
#
|
|
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
|
# Foundation, Inc.
|
|
# Written by Scott James Remnant, 2004.
|
|
#
|
|
# 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 5 lt~obsolete.m4
|
|
|
|
# These exist entirely to fool aclocal when bootstrapping libtool.
|
|
#
|
|
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
|
# which have later been changed to m4_define as they aren't part of the
|
|
# exported API, or moved to Autoconf or Automake where they belong.
|
|
#
|
|
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
|
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
|
# using a macro with the same name in our local m4/libtool.m4 it'll
|
|
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
|
# and doesn't know about Autoconf macros at all.)
|
|
#
|
|
# So we provide this file, which has a silly filename so it's always
|
|
# included after everything else. This provides aclocal with the
|
|
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
|
# because those macros already exist, or will be overwritten later.
|
|
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
|
#
|
|
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
|
# Yes, that means every name once taken will need to remain here until
|
|
# we give up compatibility with versions before 1.7, at which point
|
|
# we need to keep only those names which we still refer to.
|
|
|
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
|
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
|
|
|
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
|
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
|
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
|
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
|
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
|
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
|
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
|
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
|
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
|
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
|
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
|
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
|
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
|
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
|
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
|
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
|
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
|
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
|
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
|
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
|
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
|
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
|
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
|
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
|
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
|
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
|
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
|
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
|
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
|
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
|
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
|
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
|
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
|
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
|
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
|
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
|
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
|
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
|
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
|
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
|
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
|
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
|
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
|
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
|
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
|
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
|
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
|
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
|
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
|
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
|
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
|
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
|
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
|
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
|
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
|
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
|
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
|
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
|
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
|
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
|
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|
|
|
# ===========================================================================
|
|
# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
|
|
# ===========================================================================
|
|
#
|
|
# SYNOPSIS
|
|
#
|
|
# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
|
|
#
|
|
# DESCRIPTION
|
|
#
|
|
# This macro checks if the compiler supports one of GCC's function
|
|
# attributes; many other compilers also provide function attributes with
|
|
# the same syntax. Compiler warnings are used to detect supported
|
|
# attributes as unsupported ones are ignored by default so quieting
|
|
# warnings when using this macro will yield false positives.
|
|
#
|
|
# The ATTRIBUTE parameter holds the name of the attribute to be checked.
|
|
#
|
|
# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
|
|
#
|
|
# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
|
|
# variable.
|
|
#
|
|
# The macro currently supports the following function attributes:
|
|
#
|
|
# alias
|
|
# aligned
|
|
# alloc_size
|
|
# always_inline
|
|
# artificial
|
|
# cold
|
|
# const
|
|
# constructor
|
|
# constructor_priority for constructor attribute with priority
|
|
# deprecated
|
|
# destructor
|
|
# dllexport
|
|
# dllimport
|
|
# error
|
|
# externally_visible
|
|
# flatten
|
|
# format
|
|
# format_arg
|
|
# gnu_inline
|
|
# hot
|
|
# ifunc
|
|
# leaf
|
|
# malloc
|
|
# noclone
|
|
# noinline
|
|
# nonnull
|
|
# noreturn
|
|
# nothrow
|
|
# optimize
|
|
# pure
|
|
# unused
|
|
# used
|
|
# visibility
|
|
# warning
|
|
# warn_unused_result
|
|
# weak
|
|
# weakref
|
|
#
|
|
# Unsuppored function attributes will be tested with a prototype returning
|
|
# an int and not accepting any arguments and the result of the check might
|
|
# be wrong or meaningless so use with care.
|
|
#
|
|
# LICENSE
|
|
#
|
|
# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
#
|
|
# Copying and distribution of this file, with or without modification, are
|
|
# permitted in any medium without royalty provided the copyright notice
|
|
# and this notice are preserved. This file is offered as-is, without any
|
|
# warranty.
|
|
|
|
#serial 3
|
|
|
|
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
|
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
|
|
|
AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
|
m4_case([$1],
|
|
[alias], [
|
|
int foo( void ) { return 0; }
|
|
int bar( void ) __attribute__(($1("foo")));
|
|
],
|
|
[aligned], [
|
|
int foo( void ) __attribute__(($1(32)));
|
|
],
|
|
[alloc_size], [
|
|
void *foo(int a) __attribute__(($1(1)));
|
|
],
|
|
[always_inline], [
|
|
inline __attribute__(($1)) int foo( void ) { return 0; }
|
|
],
|
|
[artificial], [
|
|
inline __attribute__(($1)) int foo( void ) { return 0; }
|
|
],
|
|
[cold], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[const], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[constructor_priority], [
|
|
int foo( void ) __attribute__((__constructor__(65535/2)));
|
|
],
|
|
[constructor], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[deprecated], [
|
|
int foo( void ) __attribute__(($1("")));
|
|
],
|
|
[destructor], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[dllexport], [
|
|
__attribute__(($1)) int foo( void ) { return 0; }
|
|
],
|
|
[dllimport], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[error], [
|
|
int foo( void ) __attribute__(($1("")));
|
|
],
|
|
[externally_visible], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[flatten], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[format], [
|
|
int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
|
|
],
|
|
[format_arg], [
|
|
char *foo(const char *p) __attribute__(($1(1)));
|
|
],
|
|
[gnu_inline], [
|
|
inline __attribute__(($1)) int foo( void ) { return 0; }
|
|
],
|
|
[hot], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[ifunc], [
|
|
int my_foo( void ) { return 0; }
|
|
static int (*resolve_foo(void))(void) { return my_foo; }
|
|
int foo( void ) __attribute__(($1("resolve_foo")));
|
|
],
|
|
[leaf], [
|
|
__attribute__(($1)) int foo( void ) { return 0; }
|
|
],
|
|
[malloc], [
|
|
void *foo( void ) __attribute__(($1));
|
|
],
|
|
[noclone], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[noinline], [
|
|
__attribute__(($1)) int foo( void ) { return 0; }
|
|
],
|
|
[nonnull], [
|
|
int foo(char *p) __attribute__(($1(1)));
|
|
],
|
|
[noreturn], [
|
|
void foo( void ) __attribute__(($1));
|
|
],
|
|
[nothrow], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[optimize], [
|
|
__attribute__(($1(3))) int foo( void ) { return 0; }
|
|
],
|
|
[pure], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[unused], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[used], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[visibility], [
|
|
int foo_def( void ) __attribute__(($1("default")));
|
|
int foo_hid( void ) __attribute__(($1("hidden")));
|
|
int foo_int( void ) __attribute__(($1("internal")));
|
|
int foo_pro( void ) __attribute__(($1("protected")));
|
|
],
|
|
[warning], [
|
|
int foo( void ) __attribute__(($1("")));
|
|
],
|
|
[warn_unused_result], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[weak], [
|
|
int foo( void ) __attribute__(($1));
|
|
],
|
|
[weakref], [
|
|
static int foo( void ) { return 0; }
|
|
static int bar( void ) __attribute__(($1("foo")));
|
|
],
|
|
[
|
|
m4_warn([syntax], [Unsupported attribute $1, the test may fail])
|
|
int foo( void ) __attribute__(($1));
|
|
]
|
|
)], [])
|
|
],
|
|
dnl GCC doesn't exit with an error if an unknown attribute is
|
|
dnl provided but only outputs a warning, so accept the attribute
|
|
dnl only if no warning were issued.
|
|
[AS_IF([test -s conftest.err],
|
|
[AS_VAR_SET([ac_var], [no])],
|
|
[AS_VAR_SET([ac_var], [yes])])],
|
|
[AS_VAR_SET([ac_var], [no])])
|
|
])
|
|
|
|
AS_IF([test yes = AS_VAR_GET([ac_var])],
|
|
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
|
|
[Define to 1 if the system has the `$1' function attribute])], [])
|
|
|
|
AS_VAR_POPDEF([ac_var])
|
|
])
|
|
|
|
m4_include([m4/libtool.m4])
|
|
m4_include([m4/ltoptions.m4])
|
|
m4_include([m4/ltsugar.m4])
|
|
m4_include([m4/ltversion.m4])
|
|
m4_include([m4/lt~obsolete.m4])
|