]> git.ipfire.org Git - thirdparty/gcc.git/blame - zlib/aclocal.m4
configure.in: Update to autoconf 2.59; clean up slightly.
[thirdparty/gcc.git] / zlib / aclocal.m4
CommitLineData
dfac8a13
TT
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
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
a8aea176 13sinclude(../config/no-executables.m4)
0fd91e0a
AO
14sinclude(../libtool.m4)
15dnl The lines below arrange for aclocal not to bring libtool.m4
16dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
17dnl to add a definition of LIBTOOL to Makefile.in.
18ifelse(yes,no,[
19AC_DEFUN([AM_PROG_LIBTOOL],)
20AC_SUBST(LIBTOOL)
21])
22
dfac8a13
TT
23# Do all the work for Automake. This macro actually does too much --
24# some checks are only needed if your package does certain things.
25# But this isn't really a big deal.
26
27# serial 1
28
29dnl Usage:
30dnl AM_INIT_AUTOMAKE(package,version, [no-define])
31
32AC_DEFUN(AM_INIT_AUTOMAKE,
33[AC_REQUIRE([AC_PROG_INSTALL])
34PACKAGE=[$1]
35AC_SUBST(PACKAGE)
36VERSION=[$2]
37AC_SUBST(VERSION)
38dnl test to see if srcdir already configured
39if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
40 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
41fi
42ifelse([$3],,
43AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
44AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
45AC_REQUIRE([AM_SANITY_CHECK])
46AC_REQUIRE([AC_ARG_PROGRAM])
47dnl FIXME This is truly gross.
48missing_dir=`cd $ac_aux_dir && pwd`
49AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
50AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
51AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
52AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
53AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
54AC_REQUIRE([AC_PROG_MAKE_SET])])
55
56#
57# Check to make sure that the build environment is sane.
58#
59
60AC_DEFUN(AM_SANITY_CHECK,
61[AC_MSG_CHECKING([whether build environment is sane])
62# Just in case
63sleep 1
64echo timestamp > conftestfile
65# Do `set' in a subshell so we don't clobber the current shell's
66# arguments. Must try -L first in case configure is actually a
67# symlink; some systems play weird games with the mod time of symlinks
68# (eg FreeBSD returns the mod time of the symlink's containing
69# directory).
70if (
71 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
72 if test "[$]*" = "X"; then
73 # -L didn't work.
74 set X `ls -t $srcdir/configure conftestfile`
75 fi
76 if test "[$]*" != "X $srcdir/configure conftestfile" \
77 && test "[$]*" != "X conftestfile $srcdir/configure"; then
78
79 # If neither matched, then we have a broken ls. This can happen
80 # if, for instance, CONFIG_SHELL is bash and it inherits a
81 # broken ls alias from the environment. This has actually
82 # happened. Such a system could not be considered "sane".
83 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
84alias in your environment])
85 fi
86
87 test "[$]2" = conftestfile
88 )
89then
90 # Ok.
91 :
92else
93 AC_MSG_ERROR([newly created file is older than distributed files!
94Check your system clock])
95fi
96rm -f conftest*
97AC_MSG_RESULT(yes)])
98
99dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
100dnl The program must properly implement --version.
101AC_DEFUN(AM_MISSING_PROG,
102[AC_MSG_CHECKING(for working $2)
103# Run test in a subshell; some versions of sh will print an error if
104# an executable is not found, even if stderr is redirected.
105# Redirect stdin to placate older versions of autoconf. Sigh.
106if ($2 --version) < /dev/null > /dev/null 2>&1; then
107 $1=$2
108 AC_MSG_RESULT(found)
109else
110 $1="$3/missing $2"
111 AC_MSG_RESULT(missing)
112fi
113AC_SUBST($1)])
114
115# Add --enable-maintainer-mode option to configure.
116# From Jim Meyering
117
118# serial 1
119
120AC_DEFUN(AM_MAINTAINER_MODE,
121[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
122 dnl maintainer-mode is disabled by default
123 AC_ARG_ENABLE(maintainer-mode,
124[ --enable-maintainer-mode enable make rules and dependencies not useful
125 (and sometimes confusing) to the casual installer],
126 USE_MAINTAINER_MODE=$enableval,
127 USE_MAINTAINER_MODE=no)
128 AC_MSG_RESULT($USE_MAINTAINER_MODE)
129 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
130 MAINT=$MAINTAINER_MODE_TRUE
131 AC_SUBST(MAINT)dnl
132]
133)
134
135# Define a conditional.
136
137AC_DEFUN(AM_CONDITIONAL,
138[AC_SUBST($1_TRUE)
139AC_SUBST($1_FALSE)
140if $2; then
141 $1_TRUE=
142 $1_FALSE='#'
143else
144 $1_TRUE='#'
145 $1_FALSE=
146fi])
147