1 | dnl aclocal.m4 generated automatically by aclocal 1.4
|
---|
2 |
|
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999 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 | AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
---|
14 | [changequote(<<, >>)dnl
|
---|
15 | dnl The name to #define.
|
---|
16 | define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
---|
17 | dnl The cache variable name.
|
---|
18 | define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
---|
19 | changequote([, ])dnl
|
---|
20 | AC_MSG_CHECKING(size of $1)
|
---|
21 | AC_CACHE_VAL(AC_CV_NAME,
|
---|
22 | [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
---|
23 | AC_TRY_COMPILE([#include "confdefs.h"
|
---|
24 | #include <sys/types.h>
|
---|
25 | $2
|
---|
26 | ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
---|
27 | if test x$AC_CV_NAME != x ; then break; fi
|
---|
28 | done
|
---|
29 | ])
|
---|
30 | if test x$AC_CV_NAME = x ; then
|
---|
31 | AC_MSG_ERROR([cannot determine a size for $1])
|
---|
32 | fi
|
---|
33 | AC_MSG_RESULT($AC_CV_NAME)
|
---|
34 | AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
---|
35 | undefine([AC_TYPE_NAME])dnl
|
---|
36 | undefine([AC_CV_NAME])dnl
|
---|
37 | ])
|
---|
38 |
|
---|
39 | AC_DEFUN(LIBGCJ_CONFIGURE,
|
---|
40 | [
|
---|
41 | dnl Default to --enable-multilib
|
---|
42 | AC_ARG_ENABLE(multilib,
|
---|
43 | [ --enable-multilib build many library versions (default)],
|
---|
44 | [case "${enableval}" in
|
---|
45 | yes) multilib=yes ;;
|
---|
46 | no) multilib=no ;;
|
---|
47 | *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
---|
48 | esac], [multilib=yes])dnl
|
---|
49 |
|
---|
50 | dnl We may get other options which we don't document:
|
---|
51 | dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
---|
52 |
|
---|
53 | # When building with srcdir == objdir, links to the source files will
|
---|
54 | # be created in directories within the target_subdir. We have to
|
---|
55 | # adjust toplevel_srcdir accordingly, so that configure finds
|
---|
56 | # install-sh and other auxiliary files that live in the top-level
|
---|
57 | # source directory.
|
---|
58 | if test "${srcdir}" = "."; then
|
---|
59 | if test -z "${with_target_subdir}"; then
|
---|
60 | toprel=".."
|
---|
61 | else
|
---|
62 | if test "${with_target_subdir}" != "."; then
|
---|
63 | toprel="${with_multisrctop}../.."
|
---|
64 | else
|
---|
65 | toprel="${with_multisrctop}.."
|
---|
66 | fi
|
---|
67 | fi
|
---|
68 | else
|
---|
69 | toprel=".."
|
---|
70 | fi
|
---|
71 |
|
---|
72 | libgcj_basedir=$srcdir/$toprel/$1/libjava
|
---|
73 | AC_SUBST(libgcj_basedir)
|
---|
74 |
|
---|
75 | AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
|
---|
76 | if :; then :; else
|
---|
77 | # This overrides the previous occurrence for automake, but not for
|
---|
78 | # autoconf, which is exactly what we want.
|
---|
79 | AC_CONFIG_AUX_DIR(..)
|
---|
80 | fi
|
---|
81 |
|
---|
82 | # This works around an automake problem.
|
---|
83 | mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
|
---|
84 | AC_SUBST(mkinstalldirs)
|
---|
85 |
|
---|
86 | AC_CANONICAL_SYSTEM
|
---|
87 |
|
---|
88 | dnl This shouldn't be needed, as long as top-level dependencies are
|
---|
89 | dnl defined correctly and shared-library paths are set up so that
|
---|
90 | dnl execution tests succeed. FIXME.
|
---|
91 | define([AC_PROG_CC_WORKS],[])
|
---|
92 | define([AC_PROG_CXX_WORKS],[])
|
---|
93 |
|
---|
94 | AC_PROG_CC
|
---|
95 |
|
---|
96 | # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
|
---|
97 | # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
|
---|
98 | # different definition of CXX than other directories, since we don't
|
---|
99 | # depend on libstdc++-v3 having already been built.
|
---|
100 | AC_DEFUN(LIB_AC_PROG_CXX,
|
---|
101 | [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
|
---|
102 | dnl Fool anybody using AC_PROG_CXX.
|
---|
103 | AC_PROVIDE([AC_PROG_CXX])
|
---|
104 | # Use glibjava_CXX so that we do not cause CXX to be cached with the
|
---|
105 | # flags that come in CXX while configuring libjava. They're different
|
---|
106 | # from those used for all other target libraries. If CXX is set in
|
---|
107 | # the environment, respect that here.
|
---|
108 | glibjava_CXX=$CXX
|
---|
109 | AC_CHECK_PROGS(glibjava_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
|
---|
110 | AC_SUBST(CXX)
|
---|
111 | CXX=$glibjava_CXX
|
---|
112 | test -z "$glibjava_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
|
---|
113 |
|
---|
114 | AC_PROG_CXX_GNU
|
---|
115 |
|
---|
116 | if test $ac_cv_prog_gxx = yes; then
|
---|
117 | GXX=yes
|
---|
118 | dnl Check whether -g works, even if CXXFLAGS is set, in case the package
|
---|
119 | dnl plays around with CXXFLAGS (such as to build both debugging and
|
---|
120 | dnl normal versions of a library), tasteless as that idea is.
|
---|
121 | ac_test_CXXFLAGS="${CXXFLAGS+set}"
|
---|
122 | ac_save_CXXFLAGS="$CXXFLAGS"
|
---|
123 | CXXFLAGS=
|
---|
124 | AC_PROG_CXX_G
|
---|
125 | if test "$ac_test_CXXFLAGS" = set; then
|
---|
126 | CXXFLAGS="$ac_save_CXXFLAGS"
|
---|
127 | elif test $ac_cv_prog_cxx_g = yes; then
|
---|
128 | CXXFLAGS="-g -O2"
|
---|
129 | else
|
---|
130 | CXXFLAGS="-O2"
|
---|
131 | fi
|
---|
132 | else
|
---|
133 | GXX=
|
---|
134 | test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
|
---|
135 | fi
|
---|
136 | ])
|
---|
137 |
|
---|
138 | LIB_AC_PROG_CXX
|
---|
139 |
|
---|
140 | dnl version is pulled out to make it a bit easier to change using sed.
|
---|
141 | version=0.0.7
|
---|
142 | dnl Still use "libjava" here to placate dejagnu.
|
---|
143 | AM_INIT_AUTOMAKE(libjava, $version)
|
---|
144 |
|
---|
145 | # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
---|
146 | # run it explicitly here, it will be run implicitly before
|
---|
147 | # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
|
---|
148 | # be run before AC_CANONICAL_HOST.
|
---|
149 | AC_CANONICAL_BUILD
|
---|
150 |
|
---|
151 | AC_CHECK_TOOL(AS, as)
|
---|
152 | AC_CHECK_TOOL(AR, ar)
|
---|
153 | AC_CHECK_TOOL(RANLIB, ranlib, :)
|
---|
154 |
|
---|
155 | AC_PROG_INSTALL
|
---|
156 |
|
---|
157 | AM_MAINTAINER_MODE
|
---|
158 |
|
---|
159 | AC_EXEEXT
|
---|
160 |
|
---|
161 | # configure.host sets the following important variables
|
---|
162 | # libgcj_cflags - host specific C compiler flags
|
---|
163 | # libgcj_cxxflags - host specific C++ compiler flags
|
---|
164 | # libgcj_javaflags - host specific Java compiler flags
|
---|
165 |
|
---|
166 | libgcj_cflags=
|
---|
167 | libgcj_cxxflags=
|
---|
168 | libgcj_javaflags=
|
---|
169 |
|
---|
170 | . [$]{srcdir}/configure.host
|
---|
171 |
|
---|
172 | LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
|
---|
173 | LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
|
---|
174 | LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"
|
---|
175 | AC_SUBST(LIBGCJ_CFLAGS)
|
---|
176 | AC_SUBST(LIBGCJ_CXXFLAGS)
|
---|
177 | AC_SUBST(LIBGCJ_JAVAFLAGS)
|
---|
178 | ])dnl
|
---|
179 |
|
---|
180 | sinclude(../libtool.m4)
|
---|
181 | dnl The lines below arrange for aclocal not to bring libtool.m4
|
---|
182 | dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
|
---|
183 | dnl to add a definition of LIBTOOL to Makefile.in.
|
---|
184 | ifelse(yes,no,[
|
---|
185 | AC_DEFUN([AM_PROG_LIBTOOL],)
|
---|
186 | AC_DEFUN([AC_LIBTOOL_DLOPEN],)
|
---|
187 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
|
---|
188 | AC_DEFUN([LT_AC_PROG_GCJ],)
|
---|
189 | AC_SUBST(GCJ)
|
---|
190 | AC_SUBST(LIBTOOL)
|
---|
191 | ])
|
---|
192 |
|
---|
193 | #serial AM2
|
---|
194 |
|
---|
195 | dnl From Bruno Haible.
|
---|
196 |
|
---|
197 | AC_DEFUN([AM_ICONV],
|
---|
198 | [
|
---|
199 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
---|
200 | dnl those with the standalone portable GNU libiconv installed).
|
---|
201 |
|
---|
202 | am_cv_lib_iconv_ldpath=
|
---|
203 | AC_ARG_WITH([libiconv-prefix],
|
---|
204 | [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
---|
205 | for dir in `echo "$withval" | tr : ' '`; do
|
---|
206 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
---|
207 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
|
---|
208 | done
|
---|
209 | ])
|
---|
210 |
|
---|
211 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
---|
212 | am_cv_func_iconv="no, consider installing GNU libiconv"
|
---|
213 | am_cv_lib_iconv=no
|
---|
214 | AC_TRY_LINK([#include <stdlib.h>
|
---|
215 | #include <iconv.h>],
|
---|
216 | [iconv_t cd = iconv_open("","");
|
---|
217 | iconv(cd,NULL,NULL,NULL,NULL);
|
---|
218 | iconv_close(cd);],
|
---|
219 | am_cv_func_iconv=yes)
|
---|
220 | if test "$am_cv_func_iconv" != yes; then
|
---|
221 | am_save_LIBS="$LIBS"
|
---|
222 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
|
---|
223 | AC_TRY_LINK([#include <stdlib.h>
|
---|
224 | #include <iconv.h>],
|
---|
225 | [iconv_t cd = iconv_open("","");
|
---|
226 | iconv(cd,NULL,NULL,NULL,NULL);
|
---|
227 | iconv_close(cd);],
|
---|
228 | am_cv_lib_iconv=yes
|
---|
229 | am_cv_func_iconv=yes)
|
---|
230 | LIBS="$am_save_LIBS"
|
---|
231 | fi
|
---|
232 | ])
|
---|
233 | if test "$am_cv_func_iconv" = yes; then
|
---|
234 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
---|
235 | AC_MSG_CHECKING([for iconv declaration])
|
---|
236 | AC_CACHE_VAL(am_cv_proto_iconv, [
|
---|
237 | AC_TRY_COMPILE([
|
---|
238 | #include <stdlib.h>
|
---|
239 | #include <iconv.h>
|
---|
240 | extern
|
---|
241 | #ifdef __cplusplus
|
---|
242 | "C"
|
---|
243 | #endif
|
---|
244 | #if defined(__STDC__) || defined(__cplusplus)
|
---|
245 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
---|
246 | #else
|
---|
247 | size_t iconv();
|
---|
248 | #endif
|
---|
249 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
---|
250 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
---|
251 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
---|
252 | AC_MSG_RESULT([$]{ac_t:-
|
---|
253 | }[$]am_cv_proto_iconv)
|
---|
254 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
---|
255 | [Define as const if the declaration of iconv() needs const.])
|
---|
256 | fi
|
---|
257 | LIBICONV=
|
---|
258 | if test "$am_cv_lib_iconv" = yes; then
|
---|
259 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
|
---|
260 | fi
|
---|
261 | AC_SUBST(LIBICONV)
|
---|
262 | ])
|
---|
263 |
|
---|
264 | # Check whether LC_MESSAGES is available in <locale.h>.
|
---|
265 | # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
---|
266 | #
|
---|
267 | # This file can be copied and used freely without restrictions. It can
|
---|
268 | # be used in projects which are not available under the GNU General Public
|
---|
269 | # License or the GNU Library General Public License but which still want
|
---|
270 | # to provide support for the GNU gettext functionality.
|
---|
271 | # Please note that the actual code of the GNU gettext library is covered
|
---|
272 | # by the GNU Library General Public License, and the rest of the GNU
|
---|
273 | # gettext package package is covered by the GNU General Public License.
|
---|
274 | # They are *not* in the public domain.
|
---|
275 |
|
---|
276 | # serial 2
|
---|
277 |
|
---|
278 | AC_DEFUN([AM_LC_MESSAGES],
|
---|
279 | [if test $ac_cv_header_locale_h = yes; then
|
---|
280 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
---|
281 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
---|
282 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
---|
283 | if test $am_cv_val_LC_MESSAGES = yes; then
|
---|
284 | AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
---|
285 | [Define if your <locale.h> file defines LC_MESSAGES.])
|
---|
286 | fi
|
---|
287 | fi])
|
---|
288 |
|
---|
289 | AC_DEFUN([CHECK_FOR_BROKEN_MINGW_LD],
|
---|
290 | [
|
---|
291 | AC_MSG_CHECKING(whether 'ld' is at least 2.13)
|
---|
292 | LD_PROG=`$CC --print-prog-name=ld`
|
---|
293 | LD_VERSION=`$LD_PROG --version`
|
---|
294 | LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
|
---|
295 | LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
|
---|
296 | if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
|
---|
297 | LD_OK="ok"
|
---|
298 | else
|
---|
299 | if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
|
---|
300 | LD_OK="ok"
|
---|
301 | fi
|
---|
302 | fi
|
---|
303 | if test "x$LD_OK" != x; then
|
---|
304 | AC_MSG_RESULT([yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
|
---|
305 | else
|
---|
306 | AC_MSG_RESULT([no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
|
---|
307 | AC_MSG_WARN([ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack...])
|
---|
308 | AC_DEFINE(JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS, 1,
|
---|
309 | [Indicate that linker is not able to 8-byte align static data])
|
---|
310 | fi[]dnl
|
---|
311 | ])# CHECK_FOR_BROKEN_MINGW_LD
|
---|
312 |
|
---|
313 | # Do all the work for Automake. This macro actually does too much --
|
---|
314 | # some checks are only needed if your package does certain things.
|
---|
315 | # But this isn't really a big deal.
|
---|
316 |
|
---|
317 | # serial 1
|
---|
318 |
|
---|
319 | dnl Usage:
|
---|
320 | dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
---|
321 |
|
---|
322 | AC_DEFUN(AM_INIT_AUTOMAKE,
|
---|
323 | [AC_REQUIRE([AC_PROG_INSTALL])
|
---|
324 | PACKAGE=[$1]
|
---|
325 | AC_SUBST(PACKAGE)
|
---|
326 | VERSION=[$2]
|
---|
327 | AC_SUBST(VERSION)
|
---|
328 | dnl test to see if srcdir already configured
|
---|
329 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
---|
330 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
---|
331 | fi
|
---|
332 | ifelse([$3],,
|
---|
333 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
---|
334 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
---|
335 | AC_REQUIRE([AM_SANITY_CHECK])
|
---|
336 | AC_REQUIRE([AC_ARG_PROGRAM])
|
---|
337 | dnl FIXME This is truly gross.
|
---|
338 | missing_dir=`cd $ac_aux_dir && pwd`
|
---|
339 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
---|
340 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
---|
341 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
---|
342 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
---|
343 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
---|
344 | AC_REQUIRE([AC_PROG_MAKE_SET])])
|
---|
345 |
|
---|
346 | #
|
---|
347 | # Check to make sure that the build environment is sane.
|
---|
348 | #
|
---|
349 |
|
---|
350 | AC_DEFUN(AM_SANITY_CHECK,
|
---|
351 | [AC_MSG_CHECKING([whether build environment is sane])
|
---|
352 | # Just in case
|
---|
353 | sleep 1
|
---|
354 | echo timestamp > conftestfile
|
---|
355 | # Do `set' in a subshell so we don't clobber the current shell's
|
---|
356 | # arguments. Must try -L first in case configure is actually a
|
---|
357 | # symlink; some systems play weird games with the mod time of symlinks
|
---|
358 | # (eg FreeBSD returns the mod time of the symlink's containing
|
---|
359 | # directory).
|
---|
360 | if (
|
---|
361 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
---|
362 | if test "[$]*" = "X"; then
|
---|
363 | # -L didn't work.
|
---|
364 | set X `ls -t $srcdir/configure conftestfile`
|
---|
365 | fi
|
---|
366 | if test "[$]*" != "X $srcdir/configure conftestfile" \
|
---|
367 | && test "[$]*" != "X conftestfile $srcdir/configure"; then
|
---|
368 |
|
---|
369 | # If neither matched, then we have a broken ls. This can happen
|
---|
370 | # if, for instance, CONFIG_SHELL is bash and it inherits a
|
---|
371 | # broken ls alias from the environment. This has actually
|
---|
372 | # happened. Such a system could not be considered "sane".
|
---|
373 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
---|
374 | alias in your environment])
|
---|
375 | fi
|
---|
376 |
|
---|
377 | test "[$]2" = conftestfile
|
---|
378 | )
|
---|
379 | then
|
---|
380 | # Ok.
|
---|
381 | :
|
---|
382 | else
|
---|
383 | AC_MSG_ERROR([newly created file is older than distributed files!
|
---|
384 | Check your system clock])
|
---|
385 | fi
|
---|
386 | rm -f conftest*
|
---|
387 | AC_MSG_RESULT(yes)])
|
---|
388 |
|
---|
389 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
---|
390 | dnl The program must properly implement --version.
|
---|
391 | AC_DEFUN(AM_MISSING_PROG,
|
---|
392 | [AC_MSG_CHECKING(for working $2)
|
---|
393 | # Run test in a subshell; some versions of sh will print an error if
|
---|
394 | # an executable is not found, even if stderr is redirected.
|
---|
395 | # Redirect stdin to placate older versions of autoconf. Sigh.
|
---|
396 | if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
---|
397 | $1=$2
|
---|
398 | AC_MSG_RESULT(found)
|
---|
399 | else
|
---|
400 | $1="$3/missing $2"
|
---|
401 | AC_MSG_RESULT(missing)
|
---|
402 | fi
|
---|
403 | AC_SUBST($1)])
|
---|
404 |
|
---|
405 | # Add --enable-maintainer-mode option to configure.
|
---|
406 | # From Jim Meyering
|
---|
407 |
|
---|
408 | # serial 1
|
---|
409 |
|
---|
410 | AC_DEFUN(AM_MAINTAINER_MODE,
|
---|
411 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
---|
412 | dnl maintainer-mode is disabled by default
|
---|
413 | AC_ARG_ENABLE(maintainer-mode,
|
---|
414 | [ --enable-maintainer-mode enable make rules and dependencies not useful
|
---|
415 | (and sometimes confusing) to the casual installer],
|
---|
416 | USE_MAINTAINER_MODE=$enableval,
|
---|
417 | USE_MAINTAINER_MODE=no)
|
---|
418 | AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
---|
419 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
|
---|
420 | MAINT=$MAINTAINER_MODE_TRUE
|
---|
421 | AC_SUBST(MAINT)dnl
|
---|
422 | ]
|
---|
423 | )
|
---|
424 |
|
---|
425 | # Define a conditional.
|
---|
426 |
|
---|
427 | AC_DEFUN(AM_CONDITIONAL,
|
---|
428 | [AC_SUBST($1_TRUE)
|
---|
429 | AC_SUBST($1_FALSE)
|
---|
430 | if $2; then
|
---|
431 | $1_TRUE=
|
---|
432 | $1_FALSE='#'
|
---|
433 | else
|
---|
434 | $1_TRUE='#'
|
---|
435 | $1_FALSE=
|
---|
436 | fi])
|
---|
437 |
|
---|
438 | # Like AC_CONFIG_HEADER, but automatically create stamp file.
|
---|
439 |
|
---|
440 | AC_DEFUN(AM_CONFIG_HEADER,
|
---|
441 | [AC_PREREQ([2.12])
|
---|
442 | AC_CONFIG_HEADER([$1])
|
---|
443 | dnl When config.status generates a header, we must update the stamp-h file.
|
---|
444 | dnl This file resides in the same directory as the config header
|
---|
445 | dnl that is generated. We must strip everything past the first ":",
|
---|
446 | dnl and everything past the last "/".
|
---|
447 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
---|
448 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
---|
449 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
---|
450 | <<am_indx=1
|
---|
451 | for am_file in <<$1>>; do
|
---|
452 | case " <<$>>CONFIG_HEADERS " in
|
---|
453 | *" <<$>>am_file "*<<)>>
|
---|
454 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
---|
455 | ;;
|
---|
456 | esac
|
---|
457 | am_indx=`expr "<<$>>am_indx" + 1`
|
---|
458 | done<<>>dnl>>)
|
---|
459 | changequote([,]))])
|
---|
460 |
|
---|