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