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
28 AC_DEFUN(AC_TEX_PREFIX, [
31 AC_MSG_CHECKING(TeX/MF root dir directory)
33 find_root_prefix="$prefix"
36 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
38 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
39 find_texprefix="$find_root_prefix$postfix"
40 if test -d $find_texprefix; then
41 find_texpostfix=$postfix
46 if test "x$find_texpostfix" = x; then
47 find_texpostfix='/lib/texmf/tex'
48 AC_LILY_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
51 find_texprefix="$find_root_prefix/$find_texpostfix"
53 # only assign if variablename not empty
54 if test x != "x[$]$1"; then
55 $1='${prefix}'/"$find_texpostfix"
57 AC_MSG_RESULT($find_texprefix)
62 # find a directory inside a prefix,
63 # $1 the prefix (expanded version)
64 # $2 variable to assign
65 # $3 the directory name
67 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
69 AC_MSG_CHECKING($4 directory)
71 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
74 if test "x$find_dirdir" = x; then
76 AC_LILY_WARN(Cannot determine $4 subdirectory. Please set from command-line)
80 AC_MSG_RESULT($1/$find_dirdir)
83 # ugh. this is hopeless
84 AC_DEFUN(AC_KPSE_TEX_DIR, [
85 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
86 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
88 if test -w "$kpse_syspaths";
90 dir=`echo $kpse_syspaths | head -1`
92 dir=`echo $kpse_paths | grep -v '!'| head -1`
94 if test "$prefix" = "NONE"; then
95 local_prefix=$ac_default_prefix
96 local_prefix_quote='${prefix}'
100 local_prefix_quote=$prefix
102 echo $local_prefix_quote = $local_prefix
104 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
107 AC_DEFUN(AC_TEX_SUBDIR, [
108 dnl AC_REQUIRE([AC_TEX_PREFIX])
109 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
113 AC_DEFUN(AC_MF_SUBDIR, [
114 dnl AC_REQUIRE([AC_TEX_PREFIX])
115 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
119 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
122 AC_LILY_WARN(can't find $2. $3)
126 # Do all the work for Automake. This macro actually does too much --
127 # some checks are only needed if your package does certain things.
128 # But this isn't really a big deal.
133 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
135 AC_DEFUN(AM_INIT_AUTOMAKE,
136 [AC_REQUIRE([AM_PROG_INSTALL])
141 dnl test to see if srcdir already configured
142 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
143 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
146 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
147 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
148 AC_REQUIRE([AM_SANITY_CHECK])
149 AC_REQUIRE([AC_ARG_PROGRAM])
150 dnl FIXME This is truly gross.
151 missing_dir=`cd $ac_aux_dir && pwd`
152 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
153 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
154 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
155 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
156 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
157 AC_REQUIRE([AC_PROG_MAKE_SET])])
162 AC_DEFUN(AM_PROG_INSTALL,
163 [AC_REQUIRE([AC_PROG_INSTALL])
164 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
165 AC_SUBST(INSTALL_SCRIPT)dnl
169 # Check to make sure that the build environment is sane.
172 AC_DEFUN(AM_SANITY_CHECK,
173 [AC_MSG_CHECKING([whether build environment is sane])
176 echo timestamp > conftestfile
177 # Do `set' in a subshell so we don't clobber the current shell's
178 # arguments. Must try -L first in case configure is actually a
179 # symlink; some systems play weird games with the mod time of symlinks
180 # (eg FreeBSD returns the mod time of the symlink's containing
183 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
184 if test "[$]*" = "X"; then
186 set X `ls -t $srcdir/configure conftestfile`
188 if test "[$]*" != "X $srcdir/configure conftestfile" \
189 && test "[$]*" != "X conftestfile $srcdir/configure"; then
191 # If neither matched, then we have a broken ls. This can happen
192 # if, for instance, CONFIG_SHELL is bash and it inherits a
193 # broken ls alias from the environment. This has actually
194 # happened. Such a system could not be considered "sane".
195 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
196 alias in your environment])
199 test "[$]2" = conftestfile
205 AC_MSG_ERROR([newly created file is older than distributed files!
206 Check your system clock])
211 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
212 dnl The program must properly implement --version.
213 AC_DEFUN(AM_MISSING_PROG,
214 [AC_MSG_CHECKING(for working $2)
215 # Run test in a subshell; some versions of sh will print an error if
216 # an executable is not found, even if stderr is redirected.
217 # Redirect stdin to placate older versions of autoconf. Sigh.
218 if ($2 --version) < /dev/null > /dev/null 2>&1; then
223 AC_MSG_RESULT(missing)
228 # serial 24 AM_PROG_LIBTOOL
229 AC_DEFUN(AM_PROG_LIBTOOL,
230 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
231 AC_REQUIRE([AM_ENABLE_STATIC])dnl
232 AC_REQUIRE([AC_CANONICAL_HOST])dnl
233 AC_REQUIRE([AC_PROG_RANLIB])dnl
234 AC_REQUIRE([AC_PROG_CC])dnl
235 AC_REQUIRE([AM_PROG_LD])dnl
236 AC_REQUIRE([AM_PROG_NM])dnl
237 AC_REQUIRE([AC_PROG_LN_S])dnl
239 # Always use our own libtool.
240 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
243 # Check for any special flags to pass to ltconfig.
245 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
246 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
247 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
248 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
249 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
251 # Some flags need to be propagated to the compiler or linker for good
255 # Find out which ABI we are using.
256 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
257 if AC_TRY_EVAL(ac_compile); then
258 case "`/usr/bin/file conftest.o`" in
274 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
275 CFLAGS="$CFLAGS -belf"
279 # Actually configure libtool. ac_aux_dir is where install-sh is found.
280 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
281 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
282 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
283 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
284 || AC_MSG_ERROR([libtool configure failed])
287 # AM_ENABLE_SHARED - implement the --enable-shared flag
288 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
289 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
291 AC_DEFUN(AM_ENABLE_SHARED,
292 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
293 AC_ARG_ENABLE(shared,
294 changequote(<<, >>)dnl
295 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
297 [ --enable-shared=PKGS only build shared libraries if the current package
298 appears as an element in the PKGS list],
299 [p=${PACKAGE-default}
301 yes) enable_shared=yes ;;
302 no) enable_shared=no ;;
305 # Look at the argument we got. We use all the common list separators.
306 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
307 for pkg in $enableval; do
308 if test "X$pkg" = "X$p"; then
315 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
318 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
319 AC_DEFUN(AM_DISABLE_SHARED,
320 [AM_ENABLE_SHARED(no)])
322 # AM_DISABLE_STATIC - set the default static flag to --disable-static
323 AC_DEFUN(AM_DISABLE_STATIC,
324 [AM_ENABLE_STATIC(no)])
326 # AM_ENABLE_STATIC - implement the --enable-static flag
327 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
328 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
330 AC_DEFUN(AM_ENABLE_STATIC,
331 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
332 AC_ARG_ENABLE(static,
333 changequote(<<, >>)dnl
334 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
336 [ --enable-static=PKGS only build shared libraries if the current package
337 appears as an element in the PKGS list],
338 [p=${PACKAGE-default}
340 yes) enable_static=yes ;;
341 no) enable_static=no ;;
344 # Look at the argument we got. We use all the common list separators.
345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
346 for pkg in $enableval; do
347 if test "X$pkg" = "X$p"; then
354 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
358 # AM_PROG_LD - find the path to the GNU or non-GNU linker
361 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
362 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
363 AC_REQUIRE([AC_PROG_CC])
365 if test "$ac_cv_prog_gcc" = yes; then
366 # Check if gcc -print-prog-name=ld gives a path.
367 AC_MSG_CHECKING([for ld used by GCC])
368 ac_prog=`($CC -print-prog-name=ld) 2>&5`
370 # Accept absolute paths.
372 test -z "$LD" && LD="$ac_prog"
375 # If it fails, then pretend we aren't using GCC.
379 # If it is relative, then search for the first ld in PATH.
383 elif test "$with_gnu_ld" = yes; then
384 AC_MSG_CHECKING([for GNU ld])
386 AC_MSG_CHECKING([for non-GNU ld])
388 AC_CACHE_VAL(ac_cv_path_LD,
389 [if test -z "$LD"; then
390 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
391 for ac_dir in $PATH; do
392 test -z "$ac_dir" && ac_dir=.
393 if test -f "$ac_dir/$ac_prog"; then
394 ac_cv_path_LD="$ac_dir/$ac_prog"
395 # Check to see if the program is GNU ld. I'd rather use --version,
396 # but apparently some GNU ld's only accept -v.
397 # Break only if it was the GNU/non-GNU ld that we prefer.
398 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
399 test "$with_gnu_ld" != no && break
401 test "$with_gnu_ld" != yes && break
407 ac_cv_path_LD="$LD" # Let the user override the test with a path.
410 if test -n "$LD"; then
415 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
420 AC_DEFUN(AM_PROG_LD_GNU,
421 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
422 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
423 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
424 ac_cv_prog_gnu_ld=yes
430 # AM_PROG_NM - find the path to a BSD-compatible name lister
432 [AC_MSG_CHECKING([for BSD-compatible nm])
433 AC_CACHE_VAL(ac_cv_path_NM,
436 ac_cv_path_NM="$NM" # Let the user override the test with a path.
439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
440 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
441 test -z "$ac_dir" && ac_dir=.
442 if test -f $ac_dir/nm; then
443 # Check to see if the nm accepts a BSD-compat flag.
444 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
445 # nm: unknown option "B" ignored
446 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
447 ac_cv_path_NM="$ac_dir/nm -B"
448 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
449 ac_cv_path_NM="$ac_dir/nm -p"
451 ac_cv_path_NM="$ac_dir/nm"
457 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
467 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
468 AC_DEFUN(AM_PROG_LEX,
469 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
470 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
474 # Like AC_CONFIG_HEADER, but automatically create stamp file.
476 AC_DEFUN(AM_CONFIG_HEADER,
478 AC_CONFIG_HEADER([$1])
479 dnl When config.status generates a header, we must update the stamp-h file.
480 dnl This file resides in the same directory as the config header
481 dnl that is generated. We must strip everything past the first ":",
482 dnl and everything past the last "/".
483 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
484 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
485 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
487 for am_file in <<$1>>; do
488 case " <<$>>CONFIG_HEADERS " in
489 *" <<$>>am_file "*<<)>>
490 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
493 am_indx=`expr "<<$>>am_indx" + 1`