2004-08-04 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / binutils / aclocal.m4
CommitLineData
6ece5c52 1dnl aclocal.m4 generated automatically by aclocal 1.4-p6
252b5132 2
1ea788ee 3dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
252b5132
RH
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13sinclude(../bfd/acinclude.m4)
14
ac48eca1
AO
15dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
16dnl The lines below arrange for aclocal not to bring libtool.m4
17dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
18dnl to add a definition of LIBTOOL to Makefile.in.
19ifelse(yes,no,[
20AC_DEFUN([AM_PROG_LIBTOOL],)
21AC_SUBST(LIBTOOL)
22])
23
24dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
25ifelse(yes,no,[
26AC_DEFUN([CY_WITH_NLS],)
27AC_SUBST(INTLLIBS)
28])
29
8c2bc687
NC
30
31
32dnl AM_PROG_LEX
33dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
6ece5c52 34AC_DEFUN([AM_PROG_LEX],
8c2bc687
NC
35[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
36AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
37AC_PROG_LEX
38AC_DECL_YYTEXT])
39
6ece5c52
AM
40# isc-posix.m4 serial 2 (gettext-0.11.2)
41dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
42dnl This file is free software, distributed under the terms of the GNU
43dnl General Public License. As a special exception to the GNU General
44dnl Public License, this file may be distributed as part of a program
45dnl that contains a configuration script generated by Autoconf, under
46dnl the same distribution terms as the rest of that program.
47
48# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
49
1a09a22c
NC
50# This test replaces the one in autoconf.
51# Currently this macro should have the same name as the autoconf macro
52# because gettext's gettext.m4 (distributed in the automake package)
53# still uses it. Otherwise, the use in gettext.m4 makes autoheader
54# give these diagnostics:
55# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
56# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
57
58undefine([AC_ISC_POSIX])
59
60AC_DEFUN([AC_ISC_POSIX],
61 [
62 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
63 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
64 ]
65)
66
252b5132
RH
67# Do all the work for Automake. This macro actually does too much --
68# some checks are only needed if your package does certain things.
69# But this isn't really a big deal.
70
71# serial 1
72
73dnl Usage:
74dnl AM_INIT_AUTOMAKE(package,version, [no-define])
75
1ea788ee 76AC_DEFUN([AM_INIT_AUTOMAKE],
6ece5c52
AM
77[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
78AC_REQUIRE([AC_PROG_INSTALL])
252b5132
RH
79PACKAGE=[$1]
80AC_SUBST(PACKAGE)
81VERSION=[$2]
82AC_SUBST(VERSION)
83dnl test to see if srcdir already configured
84if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
85 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
86fi
87ifelse([$3],,
88AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
89AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
90AC_REQUIRE([AM_SANITY_CHECK])
91AC_REQUIRE([AC_ARG_PROGRAM])
92dnl FIXME This is truly gross.
93missing_dir=`cd $ac_aux_dir && pwd`
6ece5c52 94AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
252b5132 95AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
6ece5c52 96AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
252b5132
RH
97AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
98AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
99AC_REQUIRE([AC_PROG_MAKE_SET])])
100
6ece5c52
AM
101# Copyright 2002 Free Software Foundation, Inc.
102
103# This program is free software; you can redistribute it and/or modify
104# it under the terms of the GNU General Public License as published by
105# the Free Software Foundation; either version 2, or (at your option)
106# any later version.
107
108# This program is distributed in the hope that it will be useful,
109# but WITHOUT ANY WARRANTY; without even the implied warranty of
110# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111# GNU General Public License for more details.
112
113# You should have received a copy of the GNU General Public License
114# along with this program; if not, write to the Free Software
115# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
116
117# AM_AUTOMAKE_VERSION(VERSION)
118# ----------------------------
119# Automake X.Y traces this macro to ensure aclocal.m4 has been
120# generated from the m4 files accompanying Automake X.Y.
121AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
122
123# AM_SET_CURRENT_AUTOMAKE_VERSION
124# -------------------------------
125# Call AM_AUTOMAKE_VERSION so it can be traced.
126# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
127AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
128 [AM_AUTOMAKE_VERSION([1.4-p6])])
129
252b5132
RH
130#
131# Check to make sure that the build environment is sane.
132#
133
1ea788ee 134AC_DEFUN([AM_SANITY_CHECK],
252b5132
RH
135[AC_MSG_CHECKING([whether build environment is sane])
136# Just in case
137sleep 1
138echo timestamp > conftestfile
139# Do `set' in a subshell so we don't clobber the current shell's
140# arguments. Must try -L first in case configure is actually a
141# symlink; some systems play weird games with the mod time of symlinks
142# (eg FreeBSD returns the mod time of the symlink's containing
143# directory).
144if (
145 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
146 if test "[$]*" = "X"; then
147 # -L didn't work.
148 set X `ls -t $srcdir/configure conftestfile`
149 fi
150 if test "[$]*" != "X $srcdir/configure conftestfile" \
151 && test "[$]*" != "X conftestfile $srcdir/configure"; then
152
153 # If neither matched, then we have a broken ls. This can happen
154 # if, for instance, CONFIG_SHELL is bash and it inherits a
155 # broken ls alias from the environment. This has actually
156 # happened. Such a system could not be considered "sane".
157 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
158alias in your environment])
159 fi
160
161 test "[$]2" = conftestfile
162 )
163then
164 # Ok.
165 :
166else
167 AC_MSG_ERROR([newly created file is older than distributed files!
168Check your system clock])
169fi
170rm -f conftest*
171AC_MSG_RESULT(yes)])
172
173dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
174dnl The program must properly implement --version.
1ea788ee 175AC_DEFUN([AM_MISSING_PROG],
252b5132
RH
176[AC_MSG_CHECKING(for working $2)
177# Run test in a subshell; some versions of sh will print an error if
178# an executable is not found, even if stderr is redirected.
179# Redirect stdin to placate older versions of autoconf. Sigh.
180if ($2 --version) < /dev/null > /dev/null 2>&1; then
181 $1=$2
182 AC_MSG_RESULT(found)
183else
184 $1="$3/missing $2"
185 AC_MSG_RESULT(missing)
186fi
187AC_SUBST($1)])
188
252b5132
RH
189# Like AC_CONFIG_HEADER, but automatically create stamp file.
190
1ea788ee 191AC_DEFUN([AM_CONFIG_HEADER],
252b5132
RH
192[AC_PREREQ([2.12])
193AC_CONFIG_HEADER([$1])
194dnl When config.status generates a header, we must update the stamp-h file.
195dnl This file resides in the same directory as the config header
196dnl that is generated. We must strip everything past the first ":",
197dnl and everything past the last "/".
198AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
199ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
200<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
201<<am_indx=1
202for am_file in <<$1>>; do
203 case " <<$>>CONFIG_HEADERS " in
204 *" <<$>>am_file "*<<)>>
205 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
206 ;;
207 esac
208 am_indx=`expr "<<$>>am_indx" + 1`
209done<<>>dnl>>)
210changequote([,]))])
211
252b5132
RH
212# Add --enable-maintainer-mode option to configure.
213# From Jim Meyering
214
215# serial 1
216
1ea788ee 217AC_DEFUN([AM_MAINTAINER_MODE],
252b5132
RH
218[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
219 dnl maintainer-mode is disabled by default
220 AC_ARG_ENABLE(maintainer-mode,
221[ --enable-maintainer-mode enable make rules and dependencies not useful
222 (and sometimes confusing) to the casual installer],
223 USE_MAINTAINER_MODE=$enableval,
224 USE_MAINTAINER_MODE=no)
225 AC_MSG_RESULT($USE_MAINTAINER_MODE)
226 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
227 MAINT=$MAINTAINER_MODE_TRUE
228 AC_SUBST(MAINT)dnl
229]
230)
231
232# Define a conditional.
233
1ea788ee 234AC_DEFUN([AM_CONDITIONAL],
252b5132
RH
235[AC_SUBST($1_TRUE)
236AC_SUBST($1_FALSE)
237if $2; then
238 $1_TRUE=
239 $1_FALSE='#'
240else
241 $1_TRUE='#'
242 $1_FALSE=
243fi])
244
This page took 0.225146 seconds and 4 git commands to generate.