* aout-adobe.c (aout_adobe_set_section_contents): Constify location.
[deliverable/binutils-gdb.git] / bfd / aclocal.m4
CommitLineData
6726e1ea 1dnl aclocal.m4 generated automatically by aclocal 1.4-p6
252b5132 2
2c73f9d8 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
6726e1ea
L
13sinclude(../config/accross.m4)
14
252b5132
RH
15dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
16AC_DEFUN(BFD_BINARY_FOPEN,
17[AC_REQUIRE([AC_CANONICAL_SYSTEM])
18case "${host}" in
19changequote(,)dnl
855b0be7 20*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
252b5132
RH
21changequote([,])dnl
22 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
23esac])dnl
24
25dnl Get a default for CC_FOR_BUILD to put into Makefile.
26AC_DEFUN(BFD_CC_FOR_BUILD,
27[# Put a plausible default for CC_FOR_BUILD in Makefile.
28if test -z "$CC_FOR_BUILD"; then
29 if test "x$cross_compiling" = "xno"; then
30 CC_FOR_BUILD='$(CC)'
31 else
32 CC_FOR_BUILD=gcc
33 fi
34fi
35AC_SUBST(CC_FOR_BUILD)
36# Also set EXEEXT_FOR_BUILD.
37if test "x$cross_compiling" = "xno"; then
38 EXEEXT_FOR_BUILD='$(EXEEXT)'
39else
40 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
aab08431
ILT
41 [rm -f conftest*
42 echo 'int main () { return 0; }' > conftest.c
43 bfd_cv_build_exeext=
44 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
45 for file in conftest.*; do
46 case $file in
47 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
48 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
49 esac
50 done
51 rm -f conftest*
52 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
252b5132
RH
53 EXEEXT_FOR_BUILD=""
54 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
55fi
56AC_SUBST(EXEEXT_FOR_BUILD)])dnl
57
58dnl See whether we need a declaration for a function.
59AC_DEFUN(BFD_NEED_DECLARATION,
60[AC_MSG_CHECKING([whether $1 must be declared])
61AC_CACHE_VAL(bfd_cv_decl_needed_$1,
62[AC_TRY_COMPILE([
63#include <stdio.h>
64#ifdef HAVE_STRING_H
65#include <string.h>
66#else
67#ifdef HAVE_STRINGS_H
68#include <strings.h>
69#endif
70#endif
71#ifdef HAVE_STDLIB_H
72#include <stdlib.h>
73#endif
74#ifdef HAVE_UNISTD_H
75#include <unistd.h>
76#endif],
77[char *(*pfn) = (char *(*)) $1],
78bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
79AC_MSG_RESULT($bfd_cv_decl_needed_$1)
80if test $bfd_cv_decl_needed_$1 = yes; then
81 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
82 [Define if $1 is not declared in system header files.])
83fi
84])dnl
85
86dnl Check for existence of a type $1 in sys/procfs.h
87
88AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
89[AC_MSG_CHECKING([for $1 in sys/procfs.h])
90 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
7ee38065
MS
91 [AC_TRY_COMPILE([
92#define _SYSCALL32
93#include <sys/procfs.h>],
252b5132
RH
94 [$1 avar],
95 bfd_cv_have_sys_procfs_type_$1=yes,
96 bfd_cv_have_sys_procfs_type_$1=no
97 )])
98 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
99 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
100 [Define if <sys/procfs.h> has $1.])
101 fi
102 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
103])
104
105
106dnl Check for existence of member $2 in type $1 in sys/procfs.h
107
108AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
109[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
110 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
7ee38065
MS
111 [AC_TRY_COMPILE([
112#define _SYSCALL32
113#include <sys/procfs.h>],
252b5132
RH
114 [$1 avar; void* aref = (void*) &avar.$2],
115 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
116 bfd_cv_have_sys_procfs_type_member_$1_$2=no
117 )])
118 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
119 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
120 [Define if <sys/procfs.h> has $1.$2.])
121 fi
122 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
123])
124
ac48eca1
AO
125sinclude(../libtool.m4)
126dnl The lines below arrange for aclocal not to bring libtool.m4
127dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
128dnl to add a definition of LIBTOOL to Makefile.in.
129ifelse(yes,no,[
130AC_DEFUN([AM_PROG_LIBTOOL],)
131AC_DEFUN([AM_DISABLE_SHARED],)
132AC_SUBST(LIBTOOL)
133])
252b5132 134
ac48eca1
AO
135sinclude(../gettext.m4)
136ifelse(yes,no,[
137AC_DEFUN([CY_WITH_NLS],)
138AC_SUBST(INTLLIBS)
139])
252b5132 140
a703a6ea
AM
141AC_DEFUN([AM_INSTALL_LIBBFD],
142[AC_MSG_CHECKING([whether to install libbfd])
143 AC_ARG_ENABLE(install-libbfd,
9aa4e505 144[ --enable-install-libbfd controls installation of libbfd and related headers],
a703a6ea 145 install_libbfd_p=$enableval,
66e25bab 146 if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
a703a6ea
AM
147 install_libbfd_p=yes
148 else
149 install_libbfd_p=no
150 fi)
151 AC_MSG_RESULT($install_libbfd_p)
152 AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
153 # libbfd.a is a host library containing target dependent code
154 bfdlibdir='$(libdir)'
155 bfdincludedir='$(includedir)'
156 if test "${host}" != "${target}"; then
157 bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
158 bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
159 fi
160 AC_SUBST(bfdlibdir)
161 AC_SUBST(bfdincludedir)
162]
163)
164
165# Define a conditional.
166
167AC_DEFUN([AM_CONDITIONAL],
168[AC_SUBST($1_TRUE)
169AC_SUBST($1_FALSE)
170if $2; then
171 $1_TRUE=
172 $1_FALSE='#'
173else
174 $1_TRUE='#'
175 $1_FALSE=
176fi])
177
6726e1ea
L
178# isc-posix.m4 serial 2 (gettext-0.11.2)
179dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
180dnl This file is free software, distributed under the terms of the GNU
181dnl General Public License. As a special exception to the GNU General
182dnl Public License, this file may be distributed as part of a program
183dnl that contains a configuration script generated by Autoconf, under
184dnl the same distribution terms as the rest of that program.
185
186# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
187
c5d1701e
NC
188# This test replaces the one in autoconf.
189# Currently this macro should have the same name as the autoconf macro
190# because gettext's gettext.m4 (distributed in the automake package)
191# still uses it. Otherwise, the use in gettext.m4 makes autoheader
192# give these diagnostics:
193# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
194# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
195
196undefine([AC_ISC_POSIX])
197
198AC_DEFUN([AC_ISC_POSIX],
199 [
200 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
201 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
202 ]
203)
204
252b5132
RH
205# Do all the work for Automake. This macro actually does too much --
206# some checks are only needed if your package does certain things.
207# But this isn't really a big deal.
208
209# serial 1
210
211dnl Usage:
212dnl AM_INIT_AUTOMAKE(package,version, [no-define])
213
2c73f9d8 214AC_DEFUN([AM_INIT_AUTOMAKE],
6726e1ea
L
215[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
216AC_REQUIRE([AC_PROG_INSTALL])
252b5132
RH
217PACKAGE=[$1]
218AC_SUBST(PACKAGE)
219VERSION=[$2]
220AC_SUBST(VERSION)
221dnl test to see if srcdir already configured
222if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
223 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
224fi
225ifelse([$3],,
226AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
227AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
228AC_REQUIRE([AM_SANITY_CHECK])
229AC_REQUIRE([AC_ARG_PROGRAM])
230dnl FIXME This is truly gross.
231missing_dir=`cd $ac_aux_dir && pwd`
6726e1ea 232AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
252b5132 233AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
6726e1ea 234AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
252b5132
RH
235AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
236AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
237AC_REQUIRE([AC_PROG_MAKE_SET])])
238
6726e1ea
L
239# Copyright 2002 Free Software Foundation, Inc.
240
241# This program is free software; you can redistribute it and/or modify
242# it under the terms of the GNU General Public License as published by
243# the Free Software Foundation; either version 2, or (at your option)
244# any later version.
245
246# This program is distributed in the hope that it will be useful,
247# but WITHOUT ANY WARRANTY; without even the implied warranty of
248# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
249# GNU General Public License for more details.
250
251# You should have received a copy of the GNU General Public License
252# along with this program; if not, write to the Free Software
253# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
254
255# AM_AUTOMAKE_VERSION(VERSION)
256# ----------------------------
257# Automake X.Y traces this macro to ensure aclocal.m4 has been
258# generated from the m4 files accompanying Automake X.Y.
259AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
260
261# AM_SET_CURRENT_AUTOMAKE_VERSION
262# -------------------------------
263# Call AM_AUTOMAKE_VERSION so it can be traced.
264# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
265AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
266 [AM_AUTOMAKE_VERSION([1.4-p6])])
267
252b5132
RH
268#
269# Check to make sure that the build environment is sane.
270#
271
2c73f9d8 272AC_DEFUN([AM_SANITY_CHECK],
252b5132
RH
273[AC_MSG_CHECKING([whether build environment is sane])
274# Just in case
275sleep 1
276echo timestamp > conftestfile
277# Do `set' in a subshell so we don't clobber the current shell's
278# arguments. Must try -L first in case configure is actually a
279# symlink; some systems play weird games with the mod time of symlinks
280# (eg FreeBSD returns the mod time of the symlink's containing
281# directory).
282if (
283 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
284 if test "[$]*" = "X"; then
285 # -L didn't work.
286 set X `ls -t $srcdir/configure conftestfile`
287 fi
288 if test "[$]*" != "X $srcdir/configure conftestfile" \
289 && test "[$]*" != "X conftestfile $srcdir/configure"; then
290
291 # If neither matched, then we have a broken ls. This can happen
292 # if, for instance, CONFIG_SHELL is bash and it inherits a
293 # broken ls alias from the environment. This has actually
294 # happened. Such a system could not be considered "sane".
295 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
296alias in your environment])
297 fi
298
299 test "[$]2" = conftestfile
300 )
301then
302 # Ok.
303 :
304else
305 AC_MSG_ERROR([newly created file is older than distributed files!
306Check your system clock])
307fi
308rm -f conftest*
309AC_MSG_RESULT(yes)])
310
311dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
312dnl The program must properly implement --version.
2c73f9d8 313AC_DEFUN([AM_MISSING_PROG],
252b5132
RH
314[AC_MSG_CHECKING(for working $2)
315# Run test in a subshell; some versions of sh will print an error if
316# an executable is not found, even if stderr is redirected.
317# Redirect stdin to placate older versions of autoconf. Sigh.
318if ($2 --version) < /dev/null > /dev/null 2>&1; then
319 $1=$2
320 AC_MSG_RESULT(found)
321else
322 $1="$3/missing $2"
323 AC_MSG_RESULT(missing)
324fi
325AC_SUBST($1)])
326
252b5132
RH
327# Like AC_CONFIG_HEADER, but automatically create stamp file.
328
2c73f9d8 329AC_DEFUN([AM_CONFIG_HEADER],
252b5132
RH
330[AC_PREREQ([2.12])
331AC_CONFIG_HEADER([$1])
332dnl When config.status generates a header, we must update the stamp-h file.
333dnl This file resides in the same directory as the config header
334dnl that is generated. We must strip everything past the first ":",
335dnl and everything past the last "/".
336AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
337ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
338<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
339<<am_indx=1
340for am_file in <<$1>>; do
341 case " <<$>>CONFIG_HEADERS " in
342 *" <<$>>am_file "*<<)>>
343 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
344 ;;
345 esac
346 am_indx=`expr "<<$>>am_indx" + 1`
347done<<>>dnl>>)
348changequote([,]))])
349
350# Add --enable-maintainer-mode option to configure.
351# From Jim Meyering
352
353# serial 1
354
2c73f9d8 355AC_DEFUN([AM_MAINTAINER_MODE],
252b5132
RH
356[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
357 dnl maintainer-mode is disabled by default
358 AC_ARG_ENABLE(maintainer-mode,
359[ --enable-maintainer-mode enable make rules and dependencies not useful
360 (and sometimes confusing) to the casual installer],
361 USE_MAINTAINER_MODE=$enableval,
362 USE_MAINTAINER_MODE=no)
363 AC_MSG_RESULT($USE_MAINTAINER_MODE)
364 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
365 MAINT=$MAINTAINER_MODE_TRUE
366 AC_SUBST(MAINT)dnl
367]
368)
369
This page took 0.21327 seconds and 4 git commands to generate.