]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gprof/aclocal.m4
Add German translation
[thirdparty/binutils-gdb.git] / gprof / aclocal.m4
CommitLineData
66477e87 1dnl aclocal.m4 generated automatically by aclocal 1.4-p5
252b5132 2
66477e87 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
ac48eca1
AO
13sinclude(../libtool.m4)
14dnl The lines below arrange for aclocal not to bring libtool.m4
15dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
16dnl to add a definition of LIBTOOL to Makefile.in.
17ifelse(yes,no,[
18AC_DEFUN([AM_PROG_LIBTOOL],)
19AC_SUBST(LIBTOOL)
20])
21
22sinclude(../gettext.m4)
23ifelse(yes,no,[
24AC_DEFUN([CY_WITH_NLS],)
25AC_SUBST(INTLLIBS)
26])
27
093872ec
NC
28#serial 1
29# This test replaces the one in autoconf.
30# Currently this macro should have the same name as the autoconf macro
31# because gettext's gettext.m4 (distributed in the automake package)
32# still uses it. Otherwise, the use in gettext.m4 makes autoheader
33# give these diagnostics:
34# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
35# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
36
37undefine([AC_ISC_POSIX])
38
39AC_DEFUN([AC_ISC_POSIX],
40 [
41 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
42 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
43 ]
44)
45
252b5132
RH
46# Do all the work for Automake. This macro actually does too much --
47# some checks are only needed if your package does certain things.
48# But this isn't really a big deal.
49
50# serial 1
51
52dnl Usage:
53dnl AM_INIT_AUTOMAKE(package,version, [no-define])
54
66477e87 55AC_DEFUN([AM_INIT_AUTOMAKE],
252b5132
RH
56[AC_REQUIRE([AC_PROG_INSTALL])
57PACKAGE=[$1]
58AC_SUBST(PACKAGE)
59VERSION=[$2]
60AC_SUBST(VERSION)
61dnl test to see if srcdir already configured
62if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
63 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
64fi
65ifelse([$3],,
66AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
67AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
68AC_REQUIRE([AM_SANITY_CHECK])
69AC_REQUIRE([AC_ARG_PROGRAM])
70dnl FIXME This is truly gross.
71missing_dir=`cd $ac_aux_dir && pwd`
72AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
73AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
74AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
75AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
76AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
77AC_REQUIRE([AC_PROG_MAKE_SET])])
78
79#
80# Check to make sure that the build environment is sane.
81#
82
66477e87 83AC_DEFUN([AM_SANITY_CHECK],
252b5132
RH
84[AC_MSG_CHECKING([whether build environment is sane])
85# Just in case
86sleep 1
87echo timestamp > conftestfile
88# Do `set' in a subshell so we don't clobber the current shell's
89# arguments. Must try -L first in case configure is actually a
90# symlink; some systems play weird games with the mod time of symlinks
91# (eg FreeBSD returns the mod time of the symlink's containing
92# directory).
93if (
94 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
95 if test "[$]*" = "X"; then
96 # -L didn't work.
97 set X `ls -t $srcdir/configure conftestfile`
98 fi
99 if test "[$]*" != "X $srcdir/configure conftestfile" \
100 && test "[$]*" != "X conftestfile $srcdir/configure"; then
101
102 # If neither matched, then we have a broken ls. This can happen
103 # if, for instance, CONFIG_SHELL is bash and it inherits a
104 # broken ls alias from the environment. This has actually
105 # happened. Such a system could not be considered "sane".
106 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
107alias in your environment])
108 fi
109
110 test "[$]2" = conftestfile
111 )
112then
113 # Ok.
114 :
115else
116 AC_MSG_ERROR([newly created file is older than distributed files!
117Check your system clock])
118fi
119rm -f conftest*
120AC_MSG_RESULT(yes)])
121
122dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
123dnl The program must properly implement --version.
66477e87 124AC_DEFUN([AM_MISSING_PROG],
252b5132
RH
125[AC_MSG_CHECKING(for working $2)
126# Run test in a subshell; some versions of sh will print an error if
127# an executable is not found, even if stderr is redirected.
128# Redirect stdin to placate older versions of autoconf. Sigh.
129if ($2 --version) < /dev/null > /dev/null 2>&1; then
130 $1=$2
131 AC_MSG_RESULT(found)
132else
133 $1="$3/missing $2"
134 AC_MSG_RESULT(missing)
135fi
136AC_SUBST($1)])
137
252b5132
RH
138# Like AC_CONFIG_HEADER, but automatically create stamp file.
139
66477e87 140AC_DEFUN([AM_CONFIG_HEADER],
252b5132
RH
141[AC_PREREQ([2.12])
142AC_CONFIG_HEADER([$1])
143dnl When config.status generates a header, we must update the stamp-h file.
144dnl This file resides in the same directory as the config header
145dnl that is generated. We must strip everything past the first ":",
146dnl and everything past the last "/".
147AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
148ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
149<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
150<<am_indx=1
151for am_file in <<$1>>; do
152 case " <<$>>CONFIG_HEADERS " in
153 *" <<$>>am_file "*<<)>>
154 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
155 ;;
156 esac
157 am_indx=`expr "<<$>>am_indx" + 1`
158done<<>>dnl>>)
159changequote([,]))])
160
252b5132
RH
161# Add --enable-maintainer-mode option to configure.
162# From Jim Meyering
163
164# serial 1
165
66477e87 166AC_DEFUN([AM_MAINTAINER_MODE],
252b5132
RH
167[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
168 dnl maintainer-mode is disabled by default
169 AC_ARG_ENABLE(maintainer-mode,
170[ --enable-maintainer-mode enable make rules and dependencies not useful
171 (and sometimes confusing) to the casual installer],
172 USE_MAINTAINER_MODE=$enableval,
173 USE_MAINTAINER_MODE=no)
174 AC_MSG_RESULT($USE_MAINTAINER_MODE)
175 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
176 MAINT=$MAINTAINER_MODE_TRUE
177 AC_SUBST(MAINT)dnl
178]
179)
180
181# Define a conditional.
182
66477e87 183AC_DEFUN([AM_CONDITIONAL],
252b5132
RH
184[AC_SUBST($1_TRUE)
185AC_SUBST($1_FALSE)
186if $2; then
187 $1_TRUE=
188 $1_FALSE='#'
189else
190 $1_TRUE='#'
191 $1_FALSE=
192fi])
193