Update years in copyright notice for the GDB files.
[deliverable/binutils-gdb.git] / sim / bfin / aclocal.m4
CommitLineData
2232061b 1# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
ef016f83
MF
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2232061b
MF
4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5# Inc.
ef016f83
MF
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
16# serial 1 (pkg-config-0.24)
17#
18# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
19#
20# This program is free software; you can redistribute it and/or modify
21# it under the terms of the GNU General Public License as published by
048a61aa 22# the Free Software Foundation; either version 2 of the License, or
ef016f83
MF
23# (at your option) any later version.
24#
25# This program is distributed in the hope that it will be useful, but
26# WITHOUT ANY WARRANTY; without even the implied warranty of
27# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28# General Public License for more details.
29#
30# You should have received a copy of the GNU General Public License
51b318de 31# along with this program; if not, see <http://www.gnu.org/licenses/>.
ef016f83
MF
32#
33# As a special exception to the GNU General Public License, if you
34# distribute this file as part of a program that contains a
35# configuration script generated by Autoconf, you may include it under
36# the same distribution terms that you use for the rest of that program.
37
38# PKG_PROG_PKG_CONFIG([MIN-VERSION])
39# ----------------------------------
40AC_DEFUN([PKG_PROG_PKG_CONFIG],
41[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9c082ca8
MF
42m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
43m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
ef016f83
MF
44AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
45AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
46AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
47
48if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
49 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
50fi
51if test -n "$PKG_CONFIG"; then
52 _pkg_min_version=m4_default([$1], [0.9.0])
53 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
54 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
55 AC_MSG_RESULT([yes])
56 else
57 AC_MSG_RESULT([no])
58 PKG_CONFIG=""
59 fi
60fi[]dnl
61])# PKG_PROG_PKG_CONFIG
62
63# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
64#
65# Check to see whether a particular set of modules exists. Similar
66# to PKG_CHECK_MODULES(), but does not set variables or print errors.
67#
68# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
69# only at the first occurence in configure.ac, so if the first place
70# it's called might be skipped (such as if it is within an "if", you
71# have to call PKG_CHECK_EXISTS manually
72# --------------------------------------------------------------
73AC_DEFUN([PKG_CHECK_EXISTS],
74[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
75if test -n "$PKG_CONFIG" && \
76 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
77 m4_default([$2], [:])
78m4_ifvaln([$3], [else
79 $3])dnl
80fi])
81
82# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
83# ---------------------------------------------
84m4_define([_PKG_CONFIG],
85[if test -n "$$1"; then
86 pkg_cv_[]$1="$$1"
87 elif test -n "$PKG_CONFIG"; then
88 PKG_CHECK_EXISTS([$3],
9c082ca8
MF
89 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
90 test "x$?" != "x0" && pkg_failed=yes ],
ef016f83
MF
91 [pkg_failed=yes])
92 else
93 pkg_failed=untried
94fi[]dnl
95])# _PKG_CONFIG
96
97# _PKG_SHORT_ERRORS_SUPPORTED
98# -----------------------------
99AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
100[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
101if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
102 _pkg_short_errors_supported=yes
103else
104 _pkg_short_errors_supported=no
105fi[]dnl
106])# _PKG_SHORT_ERRORS_SUPPORTED
107
108
109# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
110# [ACTION-IF-NOT-FOUND])
111#
112#
113# Note that if there is a possibility the first call to
114# PKG_CHECK_MODULES might not happen, you should be sure to include an
115# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
116#
117#
118# --------------------------------------------------------------
119AC_DEFUN([PKG_CHECK_MODULES],
120[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
121AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
122AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
123
124pkg_failed=no
125AC_MSG_CHECKING([for $1])
126
127_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
128_PKG_CONFIG([$1][_LIBS], [libs], [$2])
129
130m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
131and $1[]_LIBS to avoid the need to call pkg-config.
132See the pkg-config man page for more details.])
133
134if test $pkg_failed = yes; then
135 AC_MSG_RESULT([no])
136 _PKG_SHORT_ERRORS_SUPPORTED
137 if test $_pkg_short_errors_supported = yes; then
9c082ca8 138 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
ef016f83 139 else
9c082ca8 140 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
ef016f83
MF
141 fi
142 # Put the nasty error message in config.log where it belongs
143 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
144
145 m4_default([$4], [AC_MSG_ERROR(
146[Package requirements ($2) were not met:
147
148$$1_PKG_ERRORS
149
150Consider adjusting the PKG_CONFIG_PATH environment variable if you
151installed software in a non-standard prefix.
152
153_PKG_TEXT])[]dnl
154 ])
155elif test $pkg_failed = untried; then
156 AC_MSG_RESULT([no])
157 m4_default([$4], [AC_MSG_FAILURE(
158[The pkg-config script could not be found or is too old. Make sure it
159is in your PATH or set the PKG_CONFIG environment variable to the full
160path to pkg-config.
161
162_PKG_TEXT
163
9c082ca8 164To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
ef016f83
MF
165 ])
166else
167 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
168 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
169 AC_MSG_RESULT([yes])
170 $3
171fi[]dnl
172])# PKG_CHECK_MODULES
173
db2e4d67
MF
174# AM_CONDITIONAL -*- Autoconf -*-
175
176# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
177# Free Software Foundation, Inc.
178#
179# This file is free software; the Free Software Foundation
180# gives unlimited permission to copy and/or distribute it,
181# with or without modifications, as long as this notice is preserved.
182
183# serial 9
184
185# AM_CONDITIONAL(NAME, SHELL-CONDITION)
186# -------------------------------------
187# Define a conditional.
188AC_DEFUN([AM_CONDITIONAL],
189[AC_PREREQ(2.52)dnl
190 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
191 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
192AC_SUBST([$1_TRUE])dnl
193AC_SUBST([$1_FALSE])dnl
194_AM_SUBST_NOTMAKE([$1_TRUE])dnl
195_AM_SUBST_NOTMAKE([$1_FALSE])dnl
196m4_define([_AM_COND_VALUE_$1], [$2])dnl
197if $2; then
198 $1_TRUE=
199 $1_FALSE='#'
200else
201 $1_TRUE='#'
202 $1_FALSE=
203fi
204AC_CONFIG_COMMANDS_PRE(
205[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
206 AC_MSG_ERROR([[conditional "$1" was never defined.
207Usually this means the macro was only invoked conditionally.]])
208fi])])
209
210# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
211#
212# This file is free software; the Free Software Foundation
213# gives unlimited permission to copy and/or distribute it,
214# with or without modifications, as long as this notice is preserved.
215
216# serial 2
217
218# Check whether the underlying file-system supports filenames
219# with a leading dot. For instance MS-DOS doesn't.
220AC_DEFUN([AM_SET_LEADING_DOT],
221[rm -rf .tst 2>/dev/null
222mkdir .tst 2>/dev/null
223if test -d .tst; then
224 am__leading_dot=.
225else
226 am__leading_dot=_
227fi
228rmdir .tst 2>/dev/null
229AC_SUBST([am__leading_dot])])
230
2232061b 231# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
db2e4d67
MF
232#
233# This file is free software; the Free Software Foundation
234# gives unlimited permission to copy and/or distribute it,
235# with or without modifications, as long as this notice is preserved.
236
2232061b 237# serial 3
db2e4d67
MF
238
239# _AM_SUBST_NOTMAKE(VARIABLE)
240# ---------------------------
241# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
242# This macro is traced by Automake.
243AC_DEFUN([_AM_SUBST_NOTMAKE])
244
245# AM_SUBST_NOTMAKE(VARIABLE)
2232061b 246# --------------------------
db2e4d67
MF
247# Public sister of _AM_SUBST_NOTMAKE.
248AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
249
This page took 0.142923 seconds and 4 git commands to generate.