1 |
578 |
markom |
dnl aclocal.m4 generated automatically by aclocal 1.3b
|
2 |
|
|
|
3 |
|
|
dnl Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
4 |
|
|
dnl This file is free software; the Free Software Foundation
|
5 |
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
6 |
|
|
dnl with or without modifications, as long as this notice is preserved.
|
7 |
|
|
|
8 |
|
|
dnl This program is distributed in the hope that it will be useful,
|
9 |
|
|
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
10 |
|
|
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
11 |
|
|
dnl PARTICULAR PURPOSE.
|
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 |
|
|
|
19 |
|
|
dnl Usage:
|
20 |
|
|
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
21 |
|
|
|
22 |
|
|
AC_DEFUN(AM_INIT_AUTOMAKE,
|
23 |
|
|
[AC_REQUIRE([AM_PROG_INSTALL])
|
24 |
|
|
PACKAGE=[$1]
|
25 |
|
|
AC_SUBST(PACKAGE)
|
26 |
|
|
VERSION=[$2]
|
27 |
|
|
AC_SUBST(VERSION)
|
28 |
|
|
dnl test to see if srcdir already configured
|
29 |
|
|
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
30 |
|
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
31 |
|
|
fi
|
32 |
|
|
ifelse([$3],,
|
33 |
|
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
34 |
|
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
|
35 |
|
|
AC_REQUIRE([AM_SANITY_CHECK])
|
36 |
|
|
AC_REQUIRE([AC_ARG_PROGRAM])
|
37 |
|
|
dnl FIXME This is truly gross.
|
38 |
|
|
missing_dir=`cd $ac_aux_dir && pwd`
|
39 |
|
|
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
40 |
|
|
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
41 |
|
|
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
42 |
|
|
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
43 |
|
|
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
44 |
|
|
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
# serial 1
|
48 |
|
|
|
49 |
|
|
AC_DEFUN(AM_PROG_INSTALL,
|
50 |
|
|
[AC_REQUIRE([AC_PROG_INSTALL])
|
51 |
|
|
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
52 |
|
|
AC_SUBST(INSTALL_SCRIPT)dnl
|
53 |
|
|
])
|
54 |
|
|
|
55 |
|
|
#
|
56 |
|
|
# Check to make sure that the build environment is sane.
|
57 |
|
|
#
|
58 |
|
|
|
59 |
|
|
AC_DEFUN(AM_SANITY_CHECK,
|
60 |
|
|
[AC_MSG_CHECKING([whether build environment is sane])
|
61 |
|
|
# Just in case
|
62 |
|
|
sleep 1
|
63 |
|
|
echo 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).
|
69 |
|
|
if (
|
70 |
|
|
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
71 |
|
|
if test "[$]*" = "X"; then
|
72 |
|
|
# -L didn't work.
|
73 |
|
|
set X `ls -t $srcdir/configure conftestfile`
|
74 |
|
|
fi
|
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
|
83 |
|
|
alias in your environment])
|
84 |
|
|
fi
|
85 |
|
|
|
86 |
|
|
test "[$]2" = conftestfile
|
87 |
|
|
)
|
88 |
|
|
then
|
89 |
|
|
# Ok.
|
90 |
|
|
:
|
91 |
|
|
else
|
92 |
|
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
93 |
|
|
Check your system clock])
|
94 |
|
|
fi
|
95 |
|
|
rm -f conftest*
|
96 |
|
|
AC_MSG_RESULT(yes)])
|
97 |
|
|
|
98 |
|
|
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
99 |
|
|
dnl The program must properly implement --version.
|
100 |
|
|
AC_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.
|
104 |
|
|
# Redirect stdin to placate older versions of autoconf. Sigh.
|
105 |
|
|
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
106 |
|
|
$1=$2
|
107 |
|
|
AC_MSG_RESULT(found)
|
108 |
|
|
else
|
109 |
|
|
$1="$3/missing $2"
|
110 |
|
|
AC_MSG_RESULT(missing)
|
111 |
|
|
fi
|
112 |
|
|
AC_SUBST($1)])
|
113 |
|
|
|
114 |
|
|
# Add --enable-maintainer-mode option to configure.
|
115 |
|
|
# From Jim Meyering
|
116 |
|
|
|
117 |
|
|
# serial 1
|
118 |
|
|
|
119 |
|
|
AC_DEFUN(AM_MAINTAINER_MODE,
|
120 |
|
|
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
121 |
|
|
dnl maintainer-mode is disabled by default
|
122 |
|
|
AC_ARG_ENABLE(maintainer-mode,
|
123 |
|
|
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
124 |
|
|
(and sometimes confusing) to the casual installer],
|
125 |
|
|
USE_MAINTAINER_MODE=$enableval,
|
126 |
|
|
USE_MAINTAINER_MODE=no)
|
127 |
|
|
AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
128 |
|
|
if test $USE_MAINTAINER_MODE = yes; then
|
129 |
|
|
MAINT=
|
130 |
|
|
else
|
131 |
|
|
MAINT='#M#'
|
132 |
|
|
fi
|
133 |
|
|
AC_SUBST(MAINT)dnl
|
134 |
|
|
]
|
135 |
|
|
)
|
136 |
|
|
|
137 |
|
|
# Check to see if we're running under Win32, without using
|
138 |
|
|
# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
|
139 |
|
|
# Otherwise set it to "".
|
140 |
|
|
|
141 |
|
|
dnl AM_EXEEXT()
|
142 |
|
|
dnl This knows we add .exe if we're building in the Cygwin
|
143 |
|
|
dnl environment. But if we're not, then it compiles a test program
|
144 |
|
|
dnl to see if there is a suffix for executables.
|
145 |
|
|
AC_DEFUN(AM_EXEEXT,
|
146 |
|
|
[AC_REQUIRE([AM_CYGWIN])
|
147 |
|
|
AC_REQUIRE([AM_MINGW32])
|
148 |
|
|
AC_MSG_CHECKING([for executable suffix])
|
149 |
|
|
AC_CACHE_VAL(am_cv_exeext,
|
150 |
|
|
[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
|
151 |
|
|
am_cv_exeext=.exe
|
152 |
|
|
else
|
153 |
|
|
cat > am_c_test.c << 'EOF'
|
154 |
|
|
int main() {
|
155 |
|
|
/* Nothing needed here */
|
156 |
|
|
}
|
157 |
|
|
EOF
|
158 |
|
|
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
|
159 |
|
|
am_cv_exeext=
|
160 |
|
|
for file in am_c_test.*; do
|
161 |
|
|
case $file in
|
162 |
|
|
*.c) ;;
|
163 |
|
|
*.o) ;;
|
164 |
|
|
*) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
|
165 |
|
|
esac
|
166 |
|
|
done
|
167 |
|
|
rm -f am_c_test*])
|
168 |
|
|
test x"${am_cv_exeext}" = x && am_cv_exeext=no
|
169 |
|
|
fi
|
170 |
|
|
EXEEXT=""
|
171 |
|
|
test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
|
172 |
|
|
AC_MSG_RESULT(${am_cv_exeext})
|
173 |
|
|
AC_SUBST(EXEEXT)])
|
174 |
|
|
|
175 |
|
|
# Check to see if we're running under Cygwin, without using
|
176 |
|
|
# AC_CANONICAL_*. If so, set output variable CYGWIN to "yes".
|
177 |
|
|
# Otherwise set it to "no".
|
178 |
|
|
|
179 |
|
|
dnl AM_CYGWIN()
|
180 |
|
|
AC_DEFUN(AM_CYGWIN,
|
181 |
|
|
[AC_CACHE_CHECK(for Cygwin environment, am_cv_cygwin,
|
182 |
|
|
[AC_TRY_COMPILE(,[return __CYGWIN32__;],
|
183 |
|
|
am_cv_cygwin=yes, am_cv_cygwin=no)
|
184 |
|
|
rm -f conftest*])
|
185 |
|
|
CYGWIN=
|
186 |
|
|
test "$am_cv_cygwin" = yes && CYGWIN=yes])
|
187 |
|
|
|
188 |
|
|
|
189 |
|
|
|
190 |
|
|
# Check to see if we're running under Mingw, without using
|
191 |
|
|
# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
|
192 |
|
|
# Otherwise set it to "no".
|
193 |
|
|
|
194 |
|
|
dnl AM_MINGW32()
|
195 |
|
|
AC_DEFUN(AM_MINGW32,
|
196 |
|
|
[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
|
197 |
|
|
[AC_TRY_COMPILE(,[return __MINGW32__;],
|
198 |
|
|
am_cv_mingw32=yes, am_cv_mingw32=no)
|
199 |
|
|
rm -f conftest*])
|
200 |
|
|
MINGW32=
|
201 |
|
|
test "$am_cv_mingw32" = yes && MINGW32=yes])
|
202 |
|
|
|