Annotation of parser3/aclocal.m4, revision 1.2
1.1 paf 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:
14: # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
15: # the libltdl convenience library and INCLTDL to the include flags for
16: # the libltdl header and adds --enable-ltdl-convenience to the
17: # configure arguments. Note that LIBLTDL and INCLTDL are not
18: # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
19: # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
20: # with '${top_builddir}/' and INCLTDL will be prefixed with
21: # '${top_srcdir}/' (note the single quotes!). If your package is not
22: # flat and you're not using automake, define top_builddir and
23: # top_srcdir appropriately in the Makefiles.
24: AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1.2 ! paf 25: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.a
1.1 paf 26: INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
27: ])
28:
29: # Do all the work for Automake. This macro actually does too much --
30: # some checks are only needed if your package does certain things.
31: # But this isn't really a big deal.
32:
33: # serial 1
34:
35: dnl Usage:
36: dnl AM_INIT_AUTOMAKE(package,version, [no-define])
37:
38: AC_DEFUN(AM_INIT_AUTOMAKE,
39: [AC_REQUIRE([AC_PROG_INSTALL])
40: PACKAGE=[$1]
41: AC_SUBST(PACKAGE)
42: VERSION=[$2]
43: AC_SUBST(VERSION)
44: dnl test to see if srcdir already configured
45: if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
46: AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
47: fi
48: ifelse([$3],,
49: AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
50: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
51: AC_REQUIRE([AM_SANITY_CHECK])
52: AC_REQUIRE([AC_ARG_PROGRAM])
53: dnl FIXME This is truly gross.
54: missing_dir=`cd $ac_aux_dir && pwd`
55: AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
56: AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
57: AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
58: AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
59: AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
60: AC_REQUIRE([AC_PROG_MAKE_SET])])
61:
62: #
63: # Check to make sure that the build environment is sane.
64: #
65:
66: AC_DEFUN(AM_SANITY_CHECK,
67: [AC_MSG_CHECKING([whether build environment is sane])
68: # Just in case
69: sleep 1
70: echo timestamp > conftestfile
71: # Do `set' in a subshell so we don't clobber the current shell's
72: # arguments. Must try -L first in case configure is actually a
73: # symlink; some systems play weird games with the mod time of symlinks
74: # (eg FreeBSD returns the mod time of the symlink's containing
75: # directory).
76: if (
77: set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
78: if test "[$]*" = "X"; then
79: # -L didn't work.
80: set X `ls -t $srcdir/configure conftestfile`
81: fi
82: if test "[$]*" != "X $srcdir/configure conftestfile" \
83: && test "[$]*" != "X conftestfile $srcdir/configure"; then
84:
85: # If neither matched, then we have a broken ls. This can happen
86: # if, for instance, CONFIG_SHELL is bash and it inherits a
87: # broken ls alias from the environment. This has actually
88: # happened. Such a system could not be considered "sane".
89: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
90: alias in your environment])
91: fi
92:
93: test "[$]2" = conftestfile
94: )
95: then
96: # Ok.
97: :
98: else
99: AC_MSG_ERROR([newly created file is older than distributed files!
100: Check your system clock])
101: fi
102: rm -f conftest*
103: AC_MSG_RESULT(yes)])
104:
105: dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
106: dnl The program must properly implement --version.
107: AC_DEFUN(AM_MISSING_PROG,
108: [AC_MSG_CHECKING(for working $2)
109: # Run test in a subshell; some versions of sh will print an error if
110: # an executable is not found, even if stderr is redirected.
111: # Redirect stdin to placate older versions of autoconf. Sigh.
112: if ($2 --version) < /dev/null > /dev/null 2>&1; then
113: $1=$2
114: AC_MSG_RESULT(found)
115: else
116: $1="$3/missing $2"
117: AC_MSG_RESULT(missing)
118: fi
119: AC_SUBST($1)])
120:
121: # Define a conditional.
122:
123: AC_DEFUN(AM_CONDITIONAL,
124: [AC_SUBST($1_TRUE)
125: AC_SUBST($1_FALSE)
126: if $2; then
127: $1_TRUE=
128: $1_FALSE='#'
129: else
130: $1_TRUE='#'
131: $1_FALSE=
132: fi])
133:
134: # Like AC_CONFIG_HEADER, but automatically create stamp file.
135:
136: AC_DEFUN(AM_CONFIG_HEADER,
137: [AC_PREREQ([2.12])
138: AC_CONFIG_HEADER([$1])
139: dnl When config.status generates a header, we must update the stamp-h file.
140: dnl This file resides in the same directory as the config header
141: dnl that is generated. We must strip everything past the first ":",
142: dnl and everything past the last "/".
143: AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
144: ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
145: <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
146: <<am_indx=1
147: for am_file in <<$1>>; do
148: case " <<$>>CONFIG_HEADERS " in
149: *" <<$>>am_file "*<<)>>
150: echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
151: ;;
152: esac
153: am_indx=`expr "<<$>>am_indx" + 1`
154: done<<>>dnl>>)
155: changequote([,]))])
156:
E-mail: