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