* gas/testsuite/dvp/{vif-1.[sd],vif-3.s}: Update, '*' no longer
[deliverable/binutils-gdb.git] / gas / aclocal.m4
CommitLineData
620cdab2
ILT
1dnl aclocal.m4 generated automatically by aclocal 1.2
2
bf111c9f
KR
3dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
4AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
5AC_MSG_CHECKING(whether declaration is required for $1)
6AC_CACHE_VAL(gas_cv_decl_needed_$1,
7AC_TRY_LINK([$4],
8[
9typedef $3;
10$2 x;
11x = ($2) $1;
12], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
13AC_MSG_RESULT($gas_cv_decl_needed_$1)
14test $gas_cv_decl_needed_$1 = no || {
15 ifelse(index($1,[$]),-1,
16 [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
17 [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
18 AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
19}
20])dnl
21dnl
22dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
23dnl enough, but on some of those systems, the assert macro relies on requoting
24dnl working properly!
25dnl GAS_WORKING_ASSERT
26AC_DEFUN(GAS_WORKING_ASSERT,
27[AC_MSG_CHECKING([for working assert macro])
28AC_CACHE_VAL(gas_cv_assert_ok,
29AC_TRY_LINK([#include <assert.h>
30#include <stdio.h>], [
31/* check for requoting problems */
32static int a, b, c, d;
33static char *s;
34assert (!strcmp(s, "foo bar baz quux"));
35/* check for newline handling */
36assert (a == b
37 || c == d);
38], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
39AC_MSG_RESULT($gas_cv_assert_ok)
40test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
41])dnl
e23b25ec 42dnl
293bc1d5
RS
43dnl Since many Bourne shell implementations lack subroutines, use this
44dnl hack to simplify the code in configure.in.
45dnl GAS_UNIQ(listvar)
46AC_DEFUN(GAS_UNIQ,
47[_gas_uniq_list="[$]$1"
48_gas_uniq_newlist=""
49dnl Protect against empty input list.
50for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
51 case [$]_gas_uniq_i in
52 _gas_uniq_dummy) ;;
53 *) case " [$]_gas_uniq_newlist " in
54 *" [$]_gas_uniq_i "*) ;;
55 *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
56 esac ;;
57 esac
58done
59$1=[$]_gas_uniq_newlist
60])dnl
61
620cdab2
ILT
62# Do all the work for Automake. This macro actually does too much --
63# some checks are only needed if your package does certain things.
64# But this isn't really a big deal.
65
66# serial 1
67
68dnl Usage:
69dnl AM_INIT_AUTOMAKE(package,version, [no-define])
70
71AC_DEFUN(AM_INIT_AUTOMAKE,
72[AC_REQUIRE([AM_PROG_INSTALL])
73PACKAGE=[$1]
74AC_SUBST(PACKAGE)
75VERSION=[$2]
76AC_SUBST(VERSION)
77dnl test to see if srcdir already configured
78if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
79 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
80fi
81ifelse([$3],,
82AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
83AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
84AM_SANITY_CHECK
85AC_ARG_PROGRAM
86dnl FIXME This is truly gross.
87missing_dir=`cd $ac_aux_dir && pwd`
88AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
89AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
90AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
91AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
92AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
93AC_PROG_MAKE_SET])
94
95
96# serial 1
97
98AC_DEFUN(AM_PROG_INSTALL,
99[AC_REQUIRE([AC_PROG_INSTALL])
100test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
101AC_SUBST(INSTALL_SCRIPT)dnl
102])
103
104#
105# Check to make sure that the build environment is sane.
106#
107
108AC_DEFUN(AM_SANITY_CHECK,
109[AC_MSG_CHECKING([whether build environment is sane])
110# Just in case
111sleep 1
112echo timestamp > conftestfile
113# Do `set' in a subshell so we don't clobber the current shell's
114# arguments. Must try -L first in case configure is actually a
115# symlink; some systems play weird games with the mod time of symlinks
116# (eg FreeBSD returns the mod time of the symlink's containing
117# directory).
118if (
119 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
120 if test "$@" = "X"; then
121 # -L didn't work.
122 set X `ls -t $srcdir/configure conftestfile`
123 fi
124 test "[$]2" = conftestfile
125 )
126then
127 # Ok.
128 :
129else
130 AC_MSG_ERROR([newly created file is older than distributed files!
131Check your system clock])
132fi
133rm -f conftest*
134AC_MSG_RESULT(yes)])
135
136dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
137dnl The program must properly implement --version.
138AC_DEFUN(AM_MISSING_PROG,
139[AC_MSG_CHECKING(for working $2)
140# Run test in a subshell; some versions of sh will print an error if
141# an executable is not found, even if stderr is redirected.
142# Redirect stdin to placate older versions of autoconf. Sigh.
143if ($2 --version) < /dev/null > /dev/null 2>&1; then
144 $1=$2
145 AC_MSG_RESULT(found)
146else
147 $1="$3/missing $2"
148 AC_MSG_RESULT(missing)
149fi
150AC_SUBST($1)])
151
152
a52052db 153# serial 18 AM_PROG_LIBTOOL
620cdab2
ILT
154AC_DEFUN(AM_PROG_LIBTOOL,
155[AC_REQUIRE([AC_CANONICAL_HOST])
620cdab2 156AC_REQUIRE([AC_PROG_RANLIB])
a52052db 157AC_REQUIRE([AC_PROG_CC])
620cdab2 158AC_REQUIRE([AM_PROG_LD])
a52052db 159AC_REQUIRE([AM_PROG_NM])
620cdab2
ILT
160AC_REQUIRE([AC_PROG_LN_S])
161
162# Always use our own libtool.
163LIBTOOL='$(SHELL) $(top_builddir)/libtool'
164AC_SUBST(LIBTOOL)
165
166dnl CYGNUS LOCAL arguments to enable-shared
167dnl Allow the --disable-shared flag to stop us from building shared libs.
168AC_ARG_ENABLE(shared,
169[ --enable-shared build shared libraries [default=yes]],
170[p=${PACKAGE-bogus-package-name}
171 case "$enableval" in
a52052db
ILT
172 yes) libtool_enable_shared=yes ;;
173 no) libtool_enable_shared=no ;;
620cdab2
ILT
174 # The value of $p (aka $PACKAGE) is assumed to come from AM_INIT_AUTOMAKE.
175 # If it didn't, it'll be `bogus-package-name', thus making this condition
176 # not be used.
a52052db
ILT
177 *$p*) libtool_enable_shared=yes ;;
178 *) libtool_enable_shared=no ;;
620cdab2 179esac])
a52052db 180test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
620cdab2
ILT
181libtool_shared=
182test "$enable_shared" = no && libtool_shared=" --disable-shared"
183dnl END CYGNUS LOCAL
184
185dnl Allow the --disable-static flag to stop us from building static libs.
186AC_ARG_ENABLE(static,
187[ --enable-static build static libraries [default=yes]],
188[if test "$enableval" = no; then
a52052db 189 libtool_enable_static=no
620cdab2 190else
a52052db 191 libtool_enable_static=yes
620cdab2 192fi])
a52052db 193test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
620cdab2
ILT
194libtool_static=
195test "$enable_static" = no && libtool_static=" --disable-static"
196
197libtool_flags="$libtool_shared$libtool_static"
198test "$silent" = yes && libtool_flags="$libtool_flags --silent"
199test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
200test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
201
202# Some flags need to be propagated to the compiler or linker for good
203# libtool support.
204[case "$host" in
205*-*-irix6*)
206 ac_save_CFLAGS="$CFLAGS"
a52052db
ILT
207 flag_passed=no
208 for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do
209 case "$f" in
210 ABI)
211 test -n "$SGI_ABI" && flag_passed=yes
212 if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then
213 # Choose the ABI flag according to GCC's specs.
214 if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then
215 LD="${LD-ld} -32"
216 else
217 LD="${LD-ld} -n32"
218 fi
219 fi
220 ;;
221
222 *)
223 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
224 flag_passed=yes
225 LD="${LD-ld} $f"
226 fi
227 ;;
228 esac
620cdab2
ILT
229 done
230 CFLAGS="$ac_save_CFLAGS"
231 ;;
232
233*-*-sco3.2v5*)
234 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
235 CFLAGS="$CFLAGS -belf"
236 ;;
237esac]
238
239# Actually configure libtool. ac_aux_dir is where install-sh is found.
240CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
a52052db 241LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
620cdab2
ILT
242${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
243$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
244|| AC_MSG_ERROR([libtool configure failed])
245])
246
247# AM_PROG_LD - find the path to the GNU or non-GNU linker
248AC_DEFUN(AM_PROG_LD,
249[AC_ARG_WITH(gnu-ld,
250[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
251test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
a52052db
ILT
252AC_REQUIRE([AC_PROG_CC])
253ac_prog=ld
254if test "$ac_cv_prog_gcc" = yes; then
255 # Check if gcc -print-prog-name=ld gives a path.
256 AC_MSG_CHECKING([for ld used by GCC])
257 ac_prog=`($CC -print-prog-name=ld) 2>&5`
258 case "$ac_prog" in
259 # Accept absolute paths.
260 /*)
261 test -z "$LD" && LD="$ac_prog"
262 ;;
263 "")
264 # If it fails, then pretend we aren't using GCC.
265 ac_prog=ld
266 ;;
267 *)
268 # If it is relative, then search for the first ld in PATH.
269 with_gnu_ld=unknown
270 ;;
271 esac
272elif test "$with_gnu_ld" = yes; then
620cdab2
ILT
273 AC_MSG_CHECKING([for GNU ld])
274else
275 AC_MSG_CHECKING([for non-GNU ld])
276fi
277AC_CACHE_VAL(ac_cv_path_LD,
a52052db 278[if test -z "$LD"; then
620cdab2
ILT
279 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
280 for ac_dir in $PATH; do
281 test -z "$ac_dir" && ac_dir=.
a52052db
ILT
282 if test -f "$ac_dir/$ac_prog"; then
283 ac_cv_path_LD="$ac_dir/$ac_prog"
620cdab2
ILT
284 # Check to see if the program is GNU ld. I'd rather use --version,
285 # but apparently some GNU ld's only accept -v.
286 # Break only if it was the GNU/non-GNU ld that we prefer.
a52052db
ILT
287 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
288 test "$with_gnu_ld" != no && break
620cdab2
ILT
289 else
290 test "$with_gnu_ld" != yes && break
291 fi
292 fi
293 done
294 IFS="$ac_save_ifs"
a52052db 295else
620cdab2 296 ac_cv_path_LD="$LD" # Let the user override the test with a path.
a52052db 297fi])
620cdab2
ILT
298LD="$ac_cv_path_LD"
299if test -n "$LD"; then
300 AC_MSG_RESULT($LD)
301else
302 AC_MSG_RESULT(no)
303fi
304test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
305AC_SUBST(LD)
306AM_PROG_LD_GNU
307])
308
309AC_DEFUN(AM_PROG_LD_GNU,
a52052db 310[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
620cdab2 311[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
a52052db 312if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
620cdab2
ILT
313 ac_cv_prog_gnu_ld=yes
314else
315 ac_cv_prog_gnu_ld=no
316fi])
317])
318
a52052db
ILT
319# AM_PROG_NM - find the path to a BSD-compatible name lister
320AC_DEFUN(AM_PROG_NM,
321[AC_MSG_CHECKING([for BSD-compatible nm])
322AC_CACHE_VAL(ac_cv_path_NM,
323[case "$NM" in
324/*)
325 ac_cv_path_NM="$NM" # Let the user override the test with a path.
326 ;;
327*)
328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
329 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
330 test -z "$ac_dir" && dir=.
331 if test -f $ac_dir/nm; then
332 # Check to see if the nm accepts a BSD-compat flag.
333 # Adding the `sed 1!d' prevents false positives on HP-UX, which says:
334 # nm: unknown option "B" ignored
335 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
336 ac_cv_path_NM="$ac_dir/nm -B"
337 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
338 ac_cv_path_NM="$ac_dir/nm -p"
339 else
340 ac_cv_path_NM="$ac_dir/nm"
341 fi
342 break
343 fi
344 done
345 IFS="$ac_save_ifs"
346 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
347 ;;
348esac])
349NM="$ac_cv_path_NM"
350AC_MSG_RESULT([$NM])
351AC_SUBST(NM)
352])
353
620cdab2
ILT
354# Like AC_CONFIG_HEADER, but automatically create stamp file.
355
356AC_DEFUN(AM_CONFIG_HEADER,
357[AC_PREREQ([2.12])
358AC_CONFIG_HEADER([$1])
359dnl When config.status generates a header, we must update the stamp-h file.
360dnl This file resides in the same directory as the config header
361dnl that is generated. We must strip everything past the first ":",
362dnl and everything past the last "/".
363AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
364ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
365<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
366<<am_indx=1
367for am_file in <<$1>>; do
368 case " <<$>>CONFIG_HEADERS " in
369 *" <<$>>am_file "*<<)>>
370 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
371 ;;
372 esac
373 am_indx=`expr "<<$>>am_indx" + 1`
374done<<>>dnl>>)
375changequote([,]))])
376
377# Add --enable-maintainer-mode option to configure.
378# From Jim Meyering
379
380# serial 1
381
382AC_DEFUN(AM_MAINTAINER_MODE,
383[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
384 dnl maintainer-mode is disabled by default
385 AC_ARG_ENABLE(maintainer-mode,
386[ --enable-maintainer-mode enable make rules and dependencies not useful
387 (and sometimes confusing) to the casual installer],
388 USE_MAINTAINER_MODE=$enableval,
389 USE_MAINTAINER_MODE=no)
390 AC_MSG_RESULT($USE_MAINTAINER_MODE)
391 if test $USE_MAINTAINER_MODE = yes; then
392 MAINT=
393 else
394 MAINT='#M#'
395 fi
396 AC_SUBST(MAINT)dnl
397]
398)
399
293bc1d5
RS
400# Check to see if we're running under Cygwin32, without using
401# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
402# Otherwise set it to "no".
403
620cdab2
ILT
404dnl AM_CYGWIN32()
405AC_DEFUN(AM_CYGWIN32,
293bc1d5 406[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
620cdab2 407[AC_TRY_COMPILE(,[return __CYGWIN32__;],
293bc1d5
RS
408am_cv_cygwin32=yes, am_cv_cygwin32=no)
409rm -f conftest*])
410CYGWIN32=
411test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
620cdab2 412
293bc1d5
RS
413# Check to see if we're running under Win32, without using
414# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
415# Otherwise set it to "".
416
620cdab2 417dnl AM_EXEEXT()
293bc1d5
RS
418dnl This knows we add .exe if we're building in the Cygwin32
419dnl environment. But if we're not, then it compiles a test program
420dnl to see if there is a suffix for executables.
620cdab2
ILT
421AC_DEFUN(AM_EXEEXT,
422[AC_REQUIRE([AM_CYGWIN32])
423AC_REQUIRE([AM_MINGW32])
293bc1d5 424AC_MSG_CHECKING([for executable suffix])
620cdab2
ILT
425AC_CACHE_VAL(am_cv_exeext,[
426if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then
293bc1d5
RS
427am_cv_exeext=.exe
428else
429cat > am_c_test.c << 'EOF'
430int main() {
431/* Nothing needed here */
432}
e23b25ec 433EOF
293bc1d5 434${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
620cdab2 435am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
293bc1d5
RS
436rm -f am_c_test*])
437test x"${am_cv_exeext}" = x && am_cv_exeext=no
e23b25ec 438fi
293bc1d5
RS
439EXEEXT=""
440test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
441AC_MSG_RESULT(${am_cv_exeext})
442AC_SUBST(EXEEXT)])
620cdab2
ILT
443
444# Check to see if we're running under Mingw, without using
445# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
446# Otherwise set it to "no".
447
448dnl AM_MINGW32()
449AC_DEFUN(AM_MINGW32,
450[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
451[AC_TRY_COMPILE(,[return __MINGW32__;],
452am_cv_mingw32=yes, am_cv_mingw32=no)
453rm -f conftest*])
454MINGW32=
455test "$am_cv_mingw32" = yes && MINGW32=yes])
456
This page took 0.168949 seconds and 4 git commands to generate.