1 dnl aclocal.m4 generated automatically by aclocal 1.3
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in 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.
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.
14 AC_DEFUN(AC_JUNK_ARGS, [
17 AC_DEFUN(AC_LILY_WARN, [
22 dnl should cache result.
23 dnl should look in $prefix first.
24 dnl should probably assume TDS
26 AC_DEFUN(AC_TEX_PREFIX, [
29 AC_MSG_CHECKING(TeX/MF root dir directory)
31 find_root_prefix="$prefix"
34 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
36 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
37 find_texprefix="$find_root_prefix$postfix"
38 if test -d $find_texprefix; then
39 find_texpostfix=$postfix
44 if test "x$find_texpostfix" = x; then
45 find_texpostfix='/lib/texmf/tex'
46 AC_LILY_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
49 find_texprefix="$find_root_prefix/$find_texpostfix"
51 # only assign if variablename not empty
52 if test x != "x[$]$1"; then
53 $1='${prefix}'/"$find_texpostfix"
55 AC_MSG_RESULT($find_texprefix)
60 # find a directory inside a prefix,
61 # $1 the prefix (expanded version)
62 # $2 variable to assign
63 # $3 the directory name
65 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
67 AC_MSG_CHECKING($4 directory)
69 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
72 if test "x$find_dirdir" = x; then
74 AC_LILY_WARN(Cannot determine $4 subdirectory. Please set from command-line)
78 AC_MSG_RESULT($1/$find_dirdir)
81 AC_DEFUN(AC_TEX_SUBDIR, [
82 dnl AC_REQUIRE([AC_TEX_PREFIX])
83 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
87 AC_DEFUN(AC_MF_SUBDIR, [
88 dnl AC_REQUIRE([AC_TEX_PREFIX])
89 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
93 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
96 AC_LILY_WARN(can't find $2. $3)
100 # Do all the work for Automake. This macro actually does too much --
101 # some checks are only needed if your package does certain things.
102 # But this isn't really a big deal.
107 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
109 AC_DEFUN(AM_INIT_AUTOMAKE,
110 [AC_REQUIRE([AM_PROG_INSTALL])
115 dnl test to see if srcdir already configured
116 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
117 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
120 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
121 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
122 AC_REQUIRE([AM_SANITY_CHECK])
123 AC_REQUIRE([AC_ARG_PROGRAM])
124 dnl FIXME This is truly gross.
125 missing_dir=`cd $ac_aux_dir && pwd`
126 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
127 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
128 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
129 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
130 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
131 AC_REQUIRE([AC_PROG_MAKE_SET])])
136 AC_DEFUN(AM_PROG_INSTALL,
137 [AC_REQUIRE([AC_PROG_INSTALL])
138 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
139 AC_SUBST(INSTALL_SCRIPT)dnl
143 # Check to make sure that the build environment is sane.
146 AC_DEFUN(AM_SANITY_CHECK,
147 [AC_MSG_CHECKING([whether build environment is sane])
150 echo timestamp > conftestfile
151 # Do `set' in a subshell so we don't clobber the current shell's
152 # arguments. Must try -L first in case configure is actually a
153 # symlink; some systems play weird games with the mod time of symlinks
154 # (eg FreeBSD returns the mod time of the symlink's containing
157 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
158 if test "[$]*" = "X"; then
160 set X `ls -t $srcdir/configure conftestfile`
162 if test "[$]*" != "X $srcdir/configure conftestfile" \
163 && test "[$]*" != "X conftestfile $srcdir/configure"; then
165 # If neither matched, then we have a broken ls. This can happen
166 # if, for instance, CONFIG_SHELL is bash and it inherits a
167 # broken ls alias from the environment. This has actually
168 # happened. Such a system could not be considered "sane".
169 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
170 alias in your environment])
173 test "[$]2" = conftestfile
179 AC_MSG_ERROR([newly created file is older than distributed files!
180 Check your system clock])
185 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
186 dnl The program must properly implement --version.
187 AC_DEFUN(AM_MISSING_PROG,
188 [AC_MSG_CHECKING(for working $2)
189 # Run test in a subshell; some versions of sh will print an error if
190 # an executable is not found, even if stderr is redirected.
191 # Redirect stdin to placate older versions of autoconf. Sigh.
192 if ($2 --version) < /dev/null > /dev/null 2>&1; then
197 AC_MSG_RESULT(missing)
202 # serial 24 AM_PROG_LIBTOOL
203 AC_DEFUN(AM_PROG_LIBTOOL,
204 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
205 AC_REQUIRE([AM_ENABLE_STATIC])dnl
206 AC_REQUIRE([AC_CANONICAL_HOST])dnl
207 AC_REQUIRE([AC_PROG_RANLIB])dnl
208 AC_REQUIRE([AC_PROG_CC])dnl
209 AC_REQUIRE([AM_PROG_LD])dnl
210 AC_REQUIRE([AM_PROG_NM])dnl
211 AC_REQUIRE([AC_PROG_LN_S])dnl
213 # Always use our own libtool.
214 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
217 # Check for any special flags to pass to ltconfig.
219 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
220 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
221 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
222 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
223 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
225 # Some flags need to be propagated to the compiler or linker for good
229 # Find out which ABI we are using.
230 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
231 if AC_TRY_EVAL(ac_compile); then
232 case "`/usr/bin/file conftest.o`" in
248 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
249 CFLAGS="$CFLAGS -belf"
253 # Actually configure libtool. ac_aux_dir is where install-sh is found.
254 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
255 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
256 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
257 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
258 || AC_MSG_ERROR([libtool configure failed])
261 # AM_ENABLE_SHARED - implement the --enable-shared flag
262 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
263 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
265 AC_DEFUN(AM_ENABLE_SHARED,
266 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
267 AC_ARG_ENABLE(shared,
268 changequote(<<, >>)dnl
269 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
271 [ --enable-shared=PKGS only build shared libraries if the current package
272 appears as an element in the PKGS list],
273 [p=${PACKAGE-default}
275 yes) enable_shared=yes ;;
276 no) enable_shared=no ;;
279 # Look at the argument we got. We use all the common list separators.
280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
281 for pkg in $enableval; do
282 if test "X$pkg" = "X$p"; then
289 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
292 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
293 AC_DEFUN(AM_DISABLE_SHARED,
294 [AM_ENABLE_SHARED(no)])
296 # AM_DISABLE_STATIC - set the default static flag to --disable-static
297 AC_DEFUN(AM_DISABLE_STATIC,
298 [AM_ENABLE_STATIC(no)])
300 # AM_ENABLE_STATIC - implement the --enable-static flag
301 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
302 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
304 AC_DEFUN(AM_ENABLE_STATIC,
305 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
306 AC_ARG_ENABLE(static,
307 changequote(<<, >>)dnl
308 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
310 [ --enable-static=PKGS only build shared libraries if the current package
311 appears as an element in the PKGS list],
312 [p=${PACKAGE-default}
314 yes) enable_static=yes ;;
315 no) enable_static=no ;;
318 # Look at the argument we got. We use all the common list separators.
319 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
320 for pkg in $enableval; do
321 if test "X$pkg" = "X$p"; then
328 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
332 # AM_PROG_LD - find the path to the GNU or non-GNU linker
335 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
336 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
337 AC_REQUIRE([AC_PROG_CC])
339 if test "$ac_cv_prog_gcc" = yes; then
340 # Check if gcc -print-prog-name=ld gives a path.
341 AC_MSG_CHECKING([for ld used by GCC])
342 ac_prog=`($CC -print-prog-name=ld) 2>&5`
344 # Accept absolute paths.
346 test -z "$LD" && LD="$ac_prog"
349 # If it fails, then pretend we aren't using GCC.
353 # If it is relative, then search for the first ld in PATH.
357 elif test "$with_gnu_ld" = yes; then
358 AC_MSG_CHECKING([for GNU ld])
360 AC_MSG_CHECKING([for non-GNU ld])
362 AC_CACHE_VAL(ac_cv_path_LD,
363 [if test -z "$LD"; then
364 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
365 for ac_dir in $PATH; do
366 test -z "$ac_dir" && ac_dir=.
367 if test -f "$ac_dir/$ac_prog"; then
368 ac_cv_path_LD="$ac_dir/$ac_prog"
369 # Check to see if the program is GNU ld. I'd rather use --version,
370 # but apparently some GNU ld's only accept -v.
371 # Break only if it was the GNU/non-GNU ld that we prefer.
372 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
373 test "$with_gnu_ld" != no && break
375 test "$with_gnu_ld" != yes && break
381 ac_cv_path_LD="$LD" # Let the user override the test with a path.
384 if test -n "$LD"; then
389 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
394 AC_DEFUN(AM_PROG_LD_GNU,
395 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
396 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
397 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
398 ac_cv_prog_gnu_ld=yes
404 # AM_PROG_NM - find the path to a BSD-compatible name lister
406 [AC_MSG_CHECKING([for BSD-compatible nm])
407 AC_CACHE_VAL(ac_cv_path_NM,
410 ac_cv_path_NM="$NM" # Let the user override the test with a path.
413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
414 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
415 test -z "$ac_dir" && ac_dir=.
416 if test -f $ac_dir/nm; then
417 # Check to see if the nm accepts a BSD-compat flag.
418 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
419 # nm: unknown option "B" ignored
420 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
421 ac_cv_path_NM="$ac_dir/nm -B"
422 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
423 ac_cv_path_NM="$ac_dir/nm -p"
425 ac_cv_path_NM="$ac_dir/nm"
431 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
441 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
442 AC_DEFUN(AM_PROG_LEX,
443 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
444 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
448 # Like AC_CONFIG_HEADER, but automatically create stamp file.
450 AC_DEFUN(AM_CONFIG_HEADER,
452 AC_CONFIG_HEADER([$1])
453 dnl When config.status generates a header, we must update the stamp-h file.
454 dnl This file resides in the same directory as the config header
455 dnl that is generated. We must strip everything past the first ":",
456 dnl and everything past the last "/".
457 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
458 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
459 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
461 for am_file in <<$1>>; do
462 case " <<$>>CONFIG_HEADERS " in
463 *" <<$>>am_file "*<<)>>
464 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
467 am_indx=`expr "<<$>>am_indx" + 1`