Update testcase to compile with latest DVP-AS
[deliverable/binutils-gdb.git] / gprof / aclocal.m4
CommitLineData
86884cd1
ILT
1dnl aclocal.m4 generated automatically by aclocal 1.2e
2
3dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4dnl This Makefile.in 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.
2f1fec47
ILT
12
13# Do all the work for Automake. This macro actually does too much --
14# some checks are only needed if your package does certain things.
15# But this isn't really a big deal.
16
17# serial 1
18
19dnl Usage:
20dnl AM_INIT_AUTOMAKE(package,version, [no-define])
21
22AC_DEFUN(AM_INIT_AUTOMAKE,
23[AC_REQUIRE([AM_PROG_INSTALL])
24PACKAGE=[$1]
25AC_SUBST(PACKAGE)
26VERSION=[$2]
27AC_SUBST(VERSION)
50fb7977
ILT
28dnl test to see if srcdir already configured
29if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
31fi
2f1fec47
ILT
32ifelse([$3],,
33AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
34AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
86884cd1
ILT
35AC_REQUIRE([AM_SANITY_CHECK])
36AC_REQUIRE([AC_ARG_PROGRAM])
2f1fec47
ILT
37dnl FIXME This is truly gross.
38missing_dir=`cd $ac_aux_dir && pwd`
39AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
86884cd1 44AC_REQUIRE([AC_PROG_MAKE_SET])])
2f1fec47
ILT
45
46
47# serial 1
48
49AC_DEFUN(AM_PROG_INSTALL,
50[AC_REQUIRE([AC_PROG_INSTALL])
51test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
52AC_SUBST(INSTALL_SCRIPT)dnl
53])
54
55#
56# Check to make sure that the build environment is sane.
57#
58
59AC_DEFUN(AM_SANITY_CHECK,
60[AC_MSG_CHECKING([whether build environment is sane])
61# Just in case
62sleep 1
63echo timestamp > conftestfile
64# Do `set' in a subshell so we don't clobber the current shell's
65# arguments. Must try -L first in case configure is actually a
66# symlink; some systems play weird games with the mod time of symlinks
67# (eg FreeBSD returns the mod time of the symlink's containing
68# directory).
69if (
70 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
86884cd1 71 if test "[$]*" = "X"; then
2f1fec47
ILT
72 # -L didn't work.
73 set X `ls -t $srcdir/configure conftestfile`
74 fi
86884cd1
ILT
75 if test "[$]*" != "X $srcdir/configure conftestfile" \
76 && test "[$]*" != "X conftestfile $srcdir/configure"; then
77
78 # If neither matched, then we have a broken ls. This can happen
79 # if, for instance, CONFIG_SHELL is bash and it inherits a
80 # broken ls alias from the environment. This has actually
81 # happened. Such a system could not be considered "sane".
82 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
83alias in your environment])
84 fi
85
2f1fec47
ILT
86 test "[$]2" = conftestfile
87 )
88then
89 # Ok.
90 :
91else
92 AC_MSG_ERROR([newly created file is older than distributed files!
93Check your system clock])
94fi
95rm -f conftest*
96AC_MSG_RESULT(yes)])
97
98dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
99dnl The program must properly implement --version.
100AC_DEFUN(AM_MISSING_PROG,
101[AC_MSG_CHECKING(for working $2)
102# Run test in a subshell; some versions of sh will print an error if
103# an executable is not found, even if stderr is redirected.
50fb7977
ILT
104# Redirect stdin to placate older versions of autoconf. Sigh.
105if ($2 --version) < /dev/null > /dev/null 2>&1; then
2f1fec47
ILT
106 $1=$2
107 AC_MSG_RESULT(found)
108else
109 $1="$3/missing $2"
110 AC_MSG_RESULT(missing)
111fi
112AC_SUBST($1)])
113
274e44ae 114
86884cd1 115# serial 24 AM_PROG_LIBTOOL
274e44ae 116AC_DEFUN(AM_PROG_LIBTOOL,
86884cd1
ILT
117[AC_REQUIRE([AM_ENABLE_SHARED])dnl
118AC_REQUIRE([AM_ENABLE_STATIC])dnl
119AC_REQUIRE([AC_CANONICAL_HOST])dnl
120AC_REQUIRE([AC_PROG_RANLIB])dnl
121AC_REQUIRE([AC_PROG_CC])dnl
122AC_REQUIRE([AM_PROG_LD])dnl
123AC_REQUIRE([AM_PROG_NM])dnl
124AC_REQUIRE([AC_PROG_LN_S])dnl
125dnl
274e44ae 126# Always use our own libtool.
c3de2a19 127LIBTOOL='$(SHELL) $(top_builddir)/libtool'
86884cd1 128AC_SUBST(LIBTOOL)dnl
274e44ae 129
86884cd1
ILT
130# Check for any special flags to pass to ltconfig.
131libtool_flags=
132test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
133test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
274e44ae
ILT
134test "$silent" = yes && libtool_flags="$libtool_flags --silent"
135test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
136test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
137
138# Some flags need to be propagated to the compiler or linker for good
139# libtool support.
641146fe 140case "$host" in
86884cd1 141*-*-irix6*)
641146fe
ILT
142 # Find out which ABI we are using.
143 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
144 if AC_TRY_EVAL(ac_compile); then
145 case "`/usr/bin/file conftest.o`" in
146 *32-bit*)
147 LD="${LD-ld} -32"
fa1a1b32 148 ;;
641146fe
ILT
149 *N32*)
150 LD="${LD-ld} -n32"
151 ;;
152 *64-bit*)
153 LD="${LD-ld} -64"
fa1a1b32
ILT
154 ;;
155 esac
641146fe
ILT
156 fi
157 rm -rf conftest*
274e44ae
ILT
158 ;;
159
160*-*-sco3.2v5*)
161 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
162 CFLAGS="$CFLAGS -belf"
163 ;;
641146fe 164esac
274e44ae
ILT
165
166# Actually configure libtool. ac_aux_dir is where install-sh is found.
167CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
fa1a1b32 168LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
274e44ae
ILT
169${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
170$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
171|| AC_MSG_ERROR([libtool configure failed])
172])
173
86884cd1
ILT
174# AM_ENABLE_SHARED - implement the --enable-shared flag
175# Usage: AM_ENABLE_SHARED[(DEFAULT)]
176# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
177# `yes'.
178AC_DEFUN(AM_ENABLE_SHARED,
179[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
180AC_ARG_ENABLE(shared,
181changequote(<<, >>)dnl
182<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
183changequote([, ])dnl
184[ --enable-shared=PKGS only build shared libraries if the current package
185 appears as an element in the PKGS list],
186[p=${PACKAGE-default}
187case "$enableval" in
188yes) enable_shared=yes ;;
189no) enable_shared=no ;;
190*)
191 enable_shared=no
192 # Look at the argument we got. We use all the common list separators.
193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
194 for pkg in $enableval; do
195 if test "X$pkg" = "X$p"; then
196 enable_shared=yes
197 fi
198 done
199 IFS="$ac_save_ifs"
200 ;;
201esac],
202enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
203])
204
205# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
206AC_DEFUN(AM_DISABLE_SHARED,
207[AM_ENABLE_SHARED(no)])
208
209# AM_DISABLE_STATIC - set the default static flag to --disable-static
210AC_DEFUN(AM_DISABLE_STATIC,
211[AM_ENABLE_STATIC(no)])
212
213# AM_ENABLE_STATIC - implement the --enable-static flag
214# Usage: AM_ENABLE_STATIC[(DEFAULT)]
215# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
216# `yes'.
217AC_DEFUN(AM_ENABLE_STATIC,
218[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
219AC_ARG_ENABLE(static,
220changequote(<<, >>)dnl
221<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
222changequote([, ])dnl
223[ --enable-static=PKGS only build shared libraries if the current package
224 appears as an element in the PKGS list],
225[p=${PACKAGE-default}
226case "$enableval" in
227yes) enable_static=yes ;;
228no) enable_static=no ;;
229*)
230 enable_static=no
231 # Look at the argument we got. We use all the common list separators.
232 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
233 for pkg in $enableval; do
234 if test "X$pkg" = "X$p"; then
235 enable_static=yes
236 fi
237 done
238 IFS="$ac_save_ifs"
239 ;;
240esac],
241enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
242])
243
244
274e44ae
ILT
245# AM_PROG_LD - find the path to the GNU or non-GNU linker
246AC_DEFUN(AM_PROG_LD,
247[AC_ARG_WITH(gnu-ld,
248[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
249test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
fa1a1b32
ILT
250AC_REQUIRE([AC_PROG_CC])
251ac_prog=ld
252if test "$ac_cv_prog_gcc" = yes; then
253 # Check if gcc -print-prog-name=ld gives a path.
254 AC_MSG_CHECKING([for ld used by GCC])
255 ac_prog=`($CC -print-prog-name=ld) 2>&5`
256 case "$ac_prog" in
257 # Accept absolute paths.
86884cd1
ILT
258changequote(,)dnl
259 /* | [A-Za-z]:\\*)
260changequote([,])dnl
fa1a1b32
ILT
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
274e44ae
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,
fa1a1b32 278[if test -z "$LD"; then
274e44ae
ILT
279 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
280 for ac_dir in $PATH; do
281 test -z "$ac_dir" && ac_dir=.
fa1a1b32
ILT
282 if test -f "$ac_dir/$ac_prog"; then
283 ac_cv_path_LD="$ac_dir/$ac_prog"
274e44ae
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.
fa1a1b32
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
274e44ae
ILT
289 else
290 test "$with_gnu_ld" != yes && break
291 fi
292 fi
293 done
294 IFS="$ac_save_ifs"
fa1a1b32 295else
42a62317 296 ac_cv_path_LD="$LD" # Let the user override the test with a path.
fa1a1b32 297fi])
274e44ae
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,
fa1a1b32 310[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
274e44ae 311[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
fa1a1b32 312if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
274e44ae
ILT
313 ac_cv_prog_gnu_ld=yes
314else
315 ac_cv_prog_gnu_ld=no
316fi])
317])
318
fa1a1b32
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
86884cd1
ILT
324changequote(,)dnl
325/* | [A-Za-z]:\\*)
326changequote([,])dnl
fa1a1b32
ILT
327 ac_cv_path_NM="$NM" # Let the user override the test with a path.
328 ;;
329*)
330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
331 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
86884cd1 332 test -z "$ac_dir" && ac_dir=.
fa1a1b32
ILT
333 if test -f $ac_dir/nm; then
334 # Check to see if the nm accepts a BSD-compat flag.
86884cd1 335 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
fa1a1b32 336 # nm: unknown option "B" ignored
86884cd1 337 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
fa1a1b32 338 ac_cv_path_NM="$ac_dir/nm -B"
86884cd1 339 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
fa1a1b32
ILT
340 ac_cv_path_NM="$ac_dir/nm -p"
341 else
342 ac_cv_path_NM="$ac_dir/nm"
343 fi
344 break
345 fi
346 done
347 IFS="$ac_save_ifs"
348 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
349 ;;
350esac])
351NM="$ac_cv_path_NM"
352AC_MSG_RESULT([$NM])
353AC_SUBST(NM)
354])
355
274e44ae
ILT
356# Like AC_CONFIG_HEADER, but automatically create stamp file.
357
358AC_DEFUN(AM_CONFIG_HEADER,
359[AC_PREREQ([2.12])
360AC_CONFIG_HEADER([$1])
361dnl When config.status generates a header, we must update the stamp-h file.
362dnl This file resides in the same directory as the config header
363dnl that is generated. We must strip everything past the first ":",
364dnl and everything past the last "/".
365AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
366ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
367<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
368<<am_indx=1
369for am_file in <<$1>>; do
370 case " <<$>>CONFIG_HEADERS " in
371 *" <<$>>am_file "*<<)>>
372 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
373 ;;
374 esac
375 am_indx=`expr "<<$>>am_indx" + 1`
376done<<>>dnl>>)
377changequote([,]))])
378
2f1fec47
ILT
379# Add --enable-maintainer-mode option to configure.
380# From Jim Meyering
381
382# serial 1
383
384AC_DEFUN(AM_MAINTAINER_MODE,
385[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
386 dnl maintainer-mode is disabled by default
387 AC_ARG_ENABLE(maintainer-mode,
388[ --enable-maintainer-mode enable make rules and dependencies not useful
389 (and sometimes confusing) to the casual installer],
390 USE_MAINTAINER_MODE=$enableval,
391 USE_MAINTAINER_MODE=no)
392 AC_MSG_RESULT($USE_MAINTAINER_MODE)
393 if test $USE_MAINTAINER_MODE = yes; then
394 MAINT=
395 else
396 MAINT='#M#'
397 fi
398 AC_SUBST(MAINT)dnl
399]
400)
401
402# Check to see if we're running under Cygwin32, without using
274e44ae
ILT
403# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
404# Otherwise set it to "no".
2f1fec47
ILT
405
406dnl AM_CYGWIN32()
407AC_DEFUN(AM_CYGWIN32,
50fb7977 408[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
c3de2a19 409[AC_TRY_COMPILE(,[return __CYGWIN32__;],
274e44ae
ILT
410am_cv_cygwin32=yes, am_cv_cygwin32=no)
411rm -f conftest*])
412CYGWIN32=
413test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
414
415# Check to see if we're running under Win32, without using
416# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
417# Otherwise set it to "".
418
419dnl AM_EXEEXT()
420dnl This knows we add .exe if we're building in the Cygwin32
421dnl environment. But if we're not, then it compiles a test program
422dnl to see if there is a suffix for executables.
423AC_DEFUN(AM_EXEEXT,
424[AC_REQUIRE([AM_CYGWIN32])
c3de2a19 425AC_REQUIRE([AM_MINGW32])
274e44ae 426AC_MSG_CHECKING([for executable suffix])
86884cd1
ILT
427AC_CACHE_VAL(am_cv_exeext,
428[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
274e44ae 429am_cv_exeext=.exe
50fb7977 430else
274e44ae
ILT
431cat > am_c_test.c << 'EOF'
432int main() {
433/* Nothing needed here */
434}
435EOF
436${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
437am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
438rm -f am_c_test*])
439test x"${am_cv_exeext}" = x && am_cv_exeext=no
50fb7977 440fi
274e44ae
ILT
441EXEEXT=""
442test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
443AC_MSG_RESULT(${am_cv_exeext})
2f1fec47
ILT
444AC_SUBST(EXEEXT)])
445
c3de2a19
ILT
446# Check to see if we're running under Mingw, without using
447# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
448# Otherwise set it to "no".
449
450dnl AM_MINGW32()
451AC_DEFUN(AM_MINGW32,
452[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
453[AC_TRY_COMPILE(,[return __MINGW32__;],
454am_cv_mingw32=yes, am_cv_mingw32=no)
455rm -f conftest*])
456MINGW32=
457test "$am_cv_mingw32" = yes && MINGW32=yes])
458
This page took 0.065251 seconds and 4 git commands to generate.