sim: rename tconfig.in to tconfig.h
[deliverable/binutils-gdb.git] / sim / bfin / aclocal.m4
CommitLineData
ae7d0cac 1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
ef016f83
MF
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
ae7d0cac 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
ef016f83
MF
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
15# serial 1 (pkg-config-0.24)
16#
17# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
18#
19# This program is free software; you can redistribute it and/or modify
20# it under the terms of the GNU General Public License as published by
048a61aa 21# the Free Software Foundation; either version 2 of the License, or
ef016f83
MF
22# (at your option) any later version.
23#
24# This program is distributed in the hope that it will be useful, but
25# WITHOUT ANY WARRANTY; without even the implied warranty of
26# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27# General Public License for more details.
28#
29# You should have received a copy of the GNU General Public License
1517bd27
MF
30# along with this program; if not, write to the Free Software
31# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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
1517bd27
MF
174
175# PKG_INSTALLDIR(DIRECTORY)
176# -------------------------
177# Substitutes the variable pkgconfigdir as the location where a module
178# should install pkg-config .pc files. By default the directory is
179# $libdir/pkgconfig, but the default can be changed by passing
180# DIRECTORY. The user can override through the --with-pkgconfigdir
181# parameter.
182AC_DEFUN([PKG_INSTALLDIR],
183[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
184m4_pushdef([pkg_description],
185 [pkg-config installation directory @<:@]pkg_default[@:>@])
186AC_ARG_WITH([pkgconfigdir],
187 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
188 [with_pkgconfigdir=]pkg_default)
189AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
190m4_popdef([pkg_default])
191m4_popdef([pkg_description])
192]) dnl PKG_INSTALLDIR
193
194
195# PKG_NOARCH_INSTALLDIR(DIRECTORY)
196# -------------------------
197# Substitutes the variable noarch_pkgconfigdir as the location where a
198# module should install arch-independent pkg-config .pc files. By
199# default the directory is $datadir/pkgconfig, but the default can be
200# changed by passing DIRECTORY. The user can override through the
201# --with-noarch-pkgconfigdir parameter.
202AC_DEFUN([PKG_NOARCH_INSTALLDIR],
203[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
204m4_pushdef([pkg_description],
205 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
206AC_ARG_WITH([noarch-pkgconfigdir],
207 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
208 [with_noarch_pkgconfigdir=]pkg_default)
209AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
210m4_popdef([pkg_default])
211m4_popdef([pkg_description])
212]) dnl PKG_NOARCH_INSTALLDIR
213
214
215# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
216# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
217# -------------------------------------------
218# Retrieves the value of the pkg-config variable for the given module.
219AC_DEFUN([PKG_CHECK_VAR],
220[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
221AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
222
223_PKG_CONFIG([$1], [variable="][$3]["], [$2])
224AS_VAR_COPY([$1], [pkg_cv_][$1])
225
226AS_VAR_IF([$1], [""], [$5], [$4])dnl
227])# PKG_CHECK_VAR
228
db2e4d67
MF
229# AM_CONDITIONAL -*- Autoconf -*-
230
231# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
232# Free Software Foundation, Inc.
233#
234# This file is free software; the Free Software Foundation
235# gives unlimited permission to copy and/or distribute it,
236# with or without modifications, as long as this notice is preserved.
237
238# serial 9
239
240# AM_CONDITIONAL(NAME, SHELL-CONDITION)
241# -------------------------------------
242# Define a conditional.
243AC_DEFUN([AM_CONDITIONAL],
244[AC_PREREQ(2.52)dnl
245 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
246 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
247AC_SUBST([$1_TRUE])dnl
248AC_SUBST([$1_FALSE])dnl
249_AM_SUBST_NOTMAKE([$1_TRUE])dnl
250_AM_SUBST_NOTMAKE([$1_FALSE])dnl
251m4_define([_AM_COND_VALUE_$1], [$2])dnl
252if $2; then
253 $1_TRUE=
254 $1_FALSE='#'
255else
256 $1_TRUE='#'
257 $1_FALSE=
258fi
259AC_CONFIG_COMMANDS_PRE(
260[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
261 AC_MSG_ERROR([[conditional "$1" was never defined.
262Usually this means the macro was only invoked conditionally.]])
263fi])])
264
265# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
266#
267# This file is free software; the Free Software Foundation
268# gives unlimited permission to copy and/or distribute it,
269# with or without modifications, as long as this notice is preserved.
270
271# serial 2
272
273# Check whether the underlying file-system supports filenames
274# with a leading dot. For instance MS-DOS doesn't.
275AC_DEFUN([AM_SET_LEADING_DOT],
276[rm -rf .tst 2>/dev/null
277mkdir .tst 2>/dev/null
278if test -d .tst; then
279 am__leading_dot=.
280else
281 am__leading_dot=_
282fi
283rmdir .tst 2>/dev/null
284AC_SUBST([am__leading_dot])])
285
31e6ad7d
MF
286# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
287# From Jim Meyering
288
ae7d0cac
MF
289# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
290# Free Software Foundation, Inc.
31e6ad7d
MF
291#
292# This file is free software; the Free Software Foundation
293# gives unlimited permission to copy and/or distribute it,
294# with or without modifications, as long as this notice is preserved.
295
296# serial 5
297
298# AM_MAINTAINER_MODE([DEFAULT-MODE])
299# ----------------------------------
300# Control maintainer-specific portions of Makefiles.
301# Default is to disable them, unless `enable' is passed literally.
302# For symmetry, `disable' may be passed as well. Anyway, the user
303# can override the default with the --enable/--disable switch.
304AC_DEFUN([AM_MAINTAINER_MODE],
305[m4_case(m4_default([$1], [disable]),
306 [enable], [m4_define([am_maintainer_other], [disable])],
307 [disable], [m4_define([am_maintainer_other], [enable])],
308 [m4_define([am_maintainer_other], [enable])
309 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
ae7d0cac 310AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
31e6ad7d
MF
311 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
312 AC_ARG_ENABLE([maintainer-mode],
313[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
314 (and sometimes confusing) to the casual installer],
315 [USE_MAINTAINER_MODE=$enableval],
316 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
317 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
318 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
319 MAINT=$MAINTAINER_MODE_TRUE
320 AC_SUBST([MAINT])dnl
321]
322)
323
324AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
325
ae7d0cac 326# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
db2e4d67
MF
327#
328# This file is free software; the Free Software Foundation
329# gives unlimited permission to copy and/or distribute it,
330# with or without modifications, as long as this notice is preserved.
331
ae7d0cac 332# serial 2
db2e4d67
MF
333
334# _AM_SUBST_NOTMAKE(VARIABLE)
335# ---------------------------
336# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
337# This macro is traced by Automake.
338AC_DEFUN([_AM_SUBST_NOTMAKE])
339
340# AM_SUBST_NOTMAKE(VARIABLE)
ae7d0cac 341# ---------------------------
db2e4d67
MF
342# Public sister of _AM_SUBST_NOTMAKE.
343AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
344
This page took 0.192671 seconds and 4 git commands to generate.