1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
14 AC_DEFUN(BFD_BINARY_FOPEN,
15 [AC_REQUIRE([AC_CANONICAL_SYSTEM])
18 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
20 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
23 dnl Get a default for CC_FOR_BUILD to put into Makefile.
24 AC_DEFUN(BFD_CC_FOR_BUILD,
25 [# Put a plausible default for CC_FOR_BUILD in Makefile.
26 if test -z "$CC_FOR_BUILD"; then
27 if test "x$cross_compiling" = "xno"; then
33 AC_SUBST(CC_FOR_BUILD)
34 # Also set EXEEXT_FOR_BUILD.
35 if test "x$cross_compiling" = "xno"; then
36 EXEEXT_FOR_BUILD='$(EXEEXT)'
38 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
40 echo 'int main () { return 0; }' > conftest.c
42 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
43 for file in conftest.*; do
45 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
46 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
50 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
52 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
54 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
56 dnl See whether we need a declaration for a function.
57 AC_DEFUN(BFD_NEED_DECLARATION,
58 [AC_MSG_CHECKING([whether $1 must be declared])
59 AC_CACHE_VAL(bfd_cv_decl_needed_$1,
75 [char *(*pfn) = (char *(*)) $1],
76 bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
77 AC_MSG_RESULT($bfd_cv_decl_needed_$1)
78 if test $bfd_cv_decl_needed_$1 = yes; then
79 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
80 [Define if $1 is not declared in system header files.])
84 dnl Check for existence of a type $1 in sys/procfs.h
86 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
87 [AC_MSG_CHECKING([for $1 in sys/procfs.h])
88 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
91 #include <sys/procfs.h>],
93 bfd_cv_have_sys_procfs_type_$1=yes,
94 bfd_cv_have_sys_procfs_type_$1=no
96 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
97 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
98 [Define if <sys/procfs.h> has $1.])
100 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
104 dnl Check for existence of member $2 in type $1 in sys/procfs.h
106 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
107 [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
108 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
111 #include <sys/procfs.h>],
112 [$1 avar; void* aref = (void*) &avar.$2],
113 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
114 bfd_cv_have_sys_procfs_type_member_$1_$2=no
116 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
117 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
118 [Define if <sys/procfs.h> has $1.$2.])
120 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
123 sinclude(../libtool.m4)
124 dnl The lines below arrange for aclocal not to bring libtool.m4
125 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
126 dnl to add a definition of LIBTOOL to Makefile.in.
128 AC_DEFUN([AM_PROG_LIBTOOL],)
129 AC_DEFUN([AM_DISABLE_SHARED],)
133 sinclude(../gettext.m4)
135 AC_DEFUN([CY_WITH_NLS],)
139 AC_DEFUN([AM_INSTALL_LIBBFD],
140 [AC_MSG_CHECKING([whether to install libbfd])
141 AC_ARG_ENABLE(install-libbfd,
142 [ --enable-install-libbfd controls installation of libbfd and related headers],
143 install_libbfd_p=$enableval,
144 if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
149 AC_MSG_RESULT($install_libbfd_p)
150 AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
151 # libbfd.a is a host library containing target dependent code
152 bfdlibdir='$(libdir)'
153 bfdincludedir='$(includedir)'
154 if test "${host}" != "${target}"; then
155 bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
156 bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
159 AC_SUBST(bfdincludedir)
163 # Define a conditional.
165 AC_DEFUN([AM_CONDITIONAL],
176 # Do all the work for Automake. This macro actually does too much --
177 # some checks are only needed if your package does certain things.
178 # But this isn't really a big deal.
183 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
185 AC_DEFUN([AM_INIT_AUTOMAKE],
186 [AC_REQUIRE([AC_PROG_INSTALL])
191 dnl test to see if srcdir already configured
192 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
193 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
196 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
197 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
198 AC_REQUIRE([AM_SANITY_CHECK])
199 AC_REQUIRE([AC_ARG_PROGRAM])
200 dnl FIXME This is truly gross.
201 missing_dir=`cd $ac_aux_dir && pwd`
202 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
203 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
204 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
205 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
206 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
207 AC_REQUIRE([AC_PROG_MAKE_SET])])
210 # Check to make sure that the build environment is sane.
213 AC_DEFUN([AM_SANITY_CHECK],
214 [AC_MSG_CHECKING([whether build environment is sane])
217 echo timestamp > conftestfile
218 # Do `set' in a subshell so we don't clobber the current shell's
219 # arguments. Must try -L first in case configure is actually a
220 # symlink; some systems play weird games with the mod time of symlinks
221 # (eg FreeBSD returns the mod time of the symlink's containing
224 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
225 if test "[$]*" = "X"; then
227 set X `ls -t $srcdir/configure conftestfile`
229 if test "[$]*" != "X $srcdir/configure conftestfile" \
230 && test "[$]*" != "X conftestfile $srcdir/configure"; then
232 # If neither matched, then we have a broken ls. This can happen
233 # if, for instance, CONFIG_SHELL is bash and it inherits a
234 # broken ls alias from the environment. This has actually
235 # happened. Such a system could not be considered "sane".
236 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
237 alias in your environment])
240 test "[$]2" = conftestfile
246 AC_MSG_ERROR([newly created file is older than distributed files!
247 Check your system clock])
252 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
253 dnl The program must properly implement --version.
254 AC_DEFUN([AM_MISSING_PROG],
255 [AC_MSG_CHECKING(for working $2)
256 # Run test in a subshell; some versions of sh will print an error if
257 # an executable is not found, even if stderr is redirected.
258 # Redirect stdin to placate older versions of autoconf. Sigh.
259 if ($2 --version) < /dev/null > /dev/null 2>&1; then
264 AC_MSG_RESULT(missing)
268 # Like AC_CONFIG_HEADER, but automatically create stamp file.
270 AC_DEFUN([AM_CONFIG_HEADER],
272 AC_CONFIG_HEADER([$1])
273 dnl When config.status generates a header, we must update the stamp-h file.
274 dnl This file resides in the same directory as the config header
275 dnl that is generated. We must strip everything past the first ":",
276 dnl and everything past the last "/".
277 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
278 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
279 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
281 for am_file in <<$1>>; do
282 case " <<$>>CONFIG_HEADERS " in
283 *" <<$>>am_file "*<<)>>
284 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
287 am_indx=`expr "<<$>>am_indx" + 1`
291 # Add --enable-maintainer-mode option to configure.
296 AC_DEFUN([AM_MAINTAINER_MODE],
297 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
298 dnl maintainer-mode is disabled by default
299 AC_ARG_ENABLE(maintainer-mode,
300 [ --enable-maintainer-mode enable make rules and dependencies not useful
301 (and sometimes confusing) to the casual installer],
302 USE_MAINTAINER_MODE=$enableval,
303 USE_MAINTAINER_MODE=no)
304 AC_MSG_RESULT($USE_MAINTAINER_MODE)
305 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
306 MAINT=$MAINTAINER_MODE_TRUE