1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
4 dnl Free Software Foundation, Inc.
5 dnl This file is free software; the Free Software Foundation
6 dnl gives unlimited permission to copy and/or distribute it,
7 dnl with or without modifications, as long as this notice is preserved.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 dnl PARTICULAR PURPOSE.
14 dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
15 AC_DEFUN(BFD_BINARY_FOPEN,
16 [AC_REQUIRE([AC_CANONICAL_SYSTEM])
19 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
21 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
24 dnl Get a default for CC_FOR_BUILD to put into Makefile.
25 AC_DEFUN(BFD_CC_FOR_BUILD,
26 [# Put a plausible default for CC_FOR_BUILD in Makefile.
27 if test -z "$CC_FOR_BUILD"; then
28 if test "x$cross_compiling" = "xno"; then
34 AC_SUBST(CC_FOR_BUILD)
35 # Also set EXEEXT_FOR_BUILD.
36 if test "x$cross_compiling" = "xno"; then
37 EXEEXT_FOR_BUILD='$(EXEEXT)'
39 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
41 echo 'int main () { return 0; }' > conftest.c
43 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
44 for file in conftest.*; do
46 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
47 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
51 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
53 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
55 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
57 dnl See whether we need a declaration for a function.
58 AC_DEFUN(BFD_NEED_DECLARATION,
59 [AC_MSG_CHECKING([whether $1 must be declared])
60 AC_CACHE_VAL(bfd_cv_decl_needed_$1,
76 [char *(*pfn) = (char *(*)) $1],
77 bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
78 AC_MSG_RESULT($bfd_cv_decl_needed_$1)
79 if test $bfd_cv_decl_needed_$1 = yes; then
80 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
81 [Define if $1 is not declared in system header files.])
85 dnl Check for existence of a type $1 in sys/procfs.h
87 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
88 [AC_MSG_CHECKING([for $1 in sys/procfs.h])
89 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
92 #include <sys/procfs.h>],
94 bfd_cv_have_sys_procfs_type_$1=yes,
95 bfd_cv_have_sys_procfs_type_$1=no
97 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
98 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
99 [Define if <sys/procfs.h> has $1.])
101 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
105 dnl Check for existence of member $2 in type $1 in sys/procfs.h
107 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
108 [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
109 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
112 #include <sys/procfs.h>],
113 [$1 avar; void* aref = (void*) &avar.$2],
114 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
115 bfd_cv_have_sys_procfs_type_member_$1_$2=no
117 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
118 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
119 [Define if <sys/procfs.h> has $1.$2.])
121 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
124 sinclude(../libtool.m4)
125 dnl The lines below arrange for aclocal not to bring libtool.m4
126 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
127 dnl to add a definition of LIBTOOL to Makefile.in.
129 AC_DEFUN([AM_PROG_LIBTOOL],)
130 AC_DEFUN([AM_DISABLE_SHARED],)
134 sinclude(../gettext.m4)
136 AC_DEFUN([CY_WITH_NLS],)
141 # This test replaces the one in autoconf.
142 # Currently this macro should have the same name as the autoconf macro
143 # because gettext's gettext.m4 (distributed in the automake package)
144 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
145 # give these diagnostics:
146 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
147 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
149 undefine([AC_ISC_POSIX])
151 AC_DEFUN(AC_ISC_POSIX,
153 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
154 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
158 # Do all the work for Automake. This macro actually does too much --
159 # some checks are only needed if your package does certain things.
160 # But this isn't really a big deal.
165 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
167 AC_DEFUN(AM_INIT_AUTOMAKE,
168 [AC_REQUIRE([AC_PROG_INSTALL])
173 dnl test to see if srcdir already configured
174 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
175 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
178 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
179 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
180 AC_REQUIRE([AM_SANITY_CHECK])
181 AC_REQUIRE([AC_ARG_PROGRAM])
182 dnl FIXME This is truly gross.
183 missing_dir=`cd $ac_aux_dir && pwd`
184 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
185 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
186 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
187 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
188 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
189 AC_REQUIRE([AC_PROG_MAKE_SET])])
192 # Check to make sure that the build environment is sane.
195 AC_DEFUN(AM_SANITY_CHECK,
196 [AC_MSG_CHECKING([whether build environment is sane])
199 echo timestamp > conftestfile
200 # Do `set' in a subshell so we don't clobber the current shell's
201 # arguments. Must try -L first in case configure is actually a
202 # symlink; some systems play weird games with the mod time of symlinks
203 # (eg FreeBSD returns the mod time of the symlink's containing
206 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
207 if test "[$]*" = "X"; then
209 set X `ls -t $srcdir/configure conftestfile`
211 if test "[$]*" != "X $srcdir/configure conftestfile" \
212 && test "[$]*" != "X conftestfile $srcdir/configure"; then
214 # If neither matched, then we have a broken ls. This can happen
215 # if, for instance, CONFIG_SHELL is bash and it inherits a
216 # broken ls alias from the environment. This has actually
217 # happened. Such a system could not be considered "sane".
218 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
219 alias in your environment])
222 test "[$]2" = conftestfile
228 AC_MSG_ERROR([newly created file is older than distributed files!
229 Check your system clock])
234 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
235 dnl The program must properly implement --version.
236 AC_DEFUN(AM_MISSING_PROG,
237 [AC_MSG_CHECKING(for working $2)
238 # Run test in a subshell; some versions of sh will print an error if
239 # an executable is not found, even if stderr is redirected.
240 # Redirect stdin to placate older versions of autoconf. Sigh.
241 if ($2 --version) < /dev/null > /dev/null 2>&1; then
246 AC_MSG_RESULT(missing)
250 # Like AC_CONFIG_HEADER, but automatically create stamp file.
252 AC_DEFUN(AM_CONFIG_HEADER,
254 AC_CONFIG_HEADER([$1])
255 dnl When config.status generates a header, we must update the stamp-h file.
256 dnl This file resides in the same directory as the config header
257 dnl that is generated. We must strip everything past the first ":",
258 dnl and everything past the last "/".
259 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
260 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
261 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
263 for am_file in <<$1>>; do
264 case " <<$>>CONFIG_HEADERS " in
265 *" <<$>>am_file "*<<)>>
266 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
269 am_indx=`expr "<<$>>am_indx" + 1`
273 # Add --enable-maintainer-mode option to configure.
278 AC_DEFUN(AM_MAINTAINER_MODE,
279 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
280 dnl maintainer-mode is disabled by default
281 AC_ARG_ENABLE(maintainer-mode,
282 [ --enable-maintainer-mode enable make rules and dependencies not useful
283 (and sometimes confusing) to the casual installer],
284 USE_MAINTAINER_MODE=$enableval,
285 USE_MAINTAINER_MODE=no)
286 AC_MSG_RESULT($USE_MAINTAINER_MODE)
287 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
288 MAINT=$MAINTAINER_MODE_TRUE
293 # Define a conditional.
295 AC_DEFUN(AM_CONDITIONAL,