1 dnl aclocal.m4 generated automatically by aclocal 1.2
4 AC_DEFUN(AC_JUNK_ARGS, [
7 AC_DEFUN(AC_LILY_WARN, [
12 dnl should cache result.
13 dnl should look in $prefix first.
14 dnl should probably assume TDS
16 AC_DEFUN(AC_TEX_PREFIX, [
19 AC_MSG_CHECKING(TeX/MF root dir directory)
21 find_root_prefix="$prefix"
24 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
26 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
27 find_texprefix="$find_root_prefix$postfix"
28 if test -d $find_texprefix; then
29 find_texpostfix=$postfix
34 if test "x$find_texpostfix" = x; then
35 find_texpostfix='/lib/texmf/tex'
36 AC_LILY_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
39 find_texprefix="$find_root_prefix/$find_texpostfix"
41 # only assign if variablename not empty
42 if test x != "x[$]$1"; then
43 $1='${prefix}'/"$find_texpostfix"
45 AC_MSG_RESULT($find_texprefix)
50 # find a directory inside a prefix,
51 # $1 the prefix (expanded version)
52 # $2 variable to assign
53 # $3 the directory name
55 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
57 AC_MSG_CHECKING($4 directory)
59 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
62 if test "x$find_dirdir" = x; then
64 AC_LILY_WARN(Cannot determine $4 subdirectory. Please set from command-line)
68 AC_MSG_RESULT($1/$find_dirdir)
71 AC_DEFUN(AC_TEX_SUBDIR, [
72 dnl AC_REQUIRE([AC_TEX_PREFIX])
73 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
77 AC_DEFUN(AC_MF_SUBDIR, [
78 dnl AC_REQUIRE([AC_TEX_PREFIX])
79 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
83 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
86 AC_LILY_WARN(can't find $2. $3)
90 # Do all the work for Automake. This macro actually does too much --
91 # some checks are only needed if your package does certain things.
92 # But this isn't really a big deal.
97 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
99 AC_DEFUN(AM_INIT_AUTOMAKE,
100 [AC_REQUIRE([AM_PROG_INSTALL])
105 dnl test to see if srcdir already configured
106 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
107 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
110 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
111 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
114 dnl FIXME This is truly gross.
115 missing_dir=`cd $ac_aux_dir && pwd`
116 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
117 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
118 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
119 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
120 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
126 AC_DEFUN(AM_PROG_INSTALL,
127 [AC_REQUIRE([AC_PROG_INSTALL])
128 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
129 AC_SUBST(INSTALL_SCRIPT)dnl
133 # Check to make sure that the build environment is sane.
136 AC_DEFUN(AM_SANITY_CHECK,
137 [AC_MSG_CHECKING([whether build environment is sane])
140 echo timestamp > conftestfile
141 # Do `set' in a subshell so we don't clobber the current shell's
142 # arguments. Must try -L first in case configure is actually a
143 # symlink; some systems play weird games with the mod time of symlinks
144 # (eg FreeBSD returns the mod time of the symlink's containing
147 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
148 if test "$@" = "X"; then
150 set X `ls -t $srcdir/configure conftestfile`
152 test "[$]2" = conftestfile
158 AC_MSG_ERROR([newly created file is older than distributed files!
159 Check your system clock])
164 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
165 dnl The program must properly implement --version.
166 AC_DEFUN(AM_MISSING_PROG,
167 [AC_MSG_CHECKING(for working $2)
168 # Run test in a subshell; some versions of sh will print an error if
169 # an executable is not found, even if stderr is redirected.
170 # Redirect stdin to placate older versions of autoconf. Sigh.
171 if ($2 --version) < /dev/null > /dev/null 2>&1; then
176 AC_MSG_RESULT(missing)
181 # serial 24 AM_PROG_LIBTOOL
182 AC_DEFUN(AM_PROG_LIBTOOL,
183 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
184 AC_REQUIRE([AM_ENABLE_STATIC])dnl
185 AC_REQUIRE([AC_CANONICAL_HOST])dnl
186 AC_REQUIRE([AC_PROG_RANLIB])dnl
187 AC_REQUIRE([AC_PROG_CC])dnl
188 AC_REQUIRE([AM_PROG_LD])dnl
189 AC_REQUIRE([AM_PROG_NM])dnl
190 AC_REQUIRE([AC_PROG_LN_S])dnl
192 # Always use our own libtool.
193 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
196 # Check for any special flags to pass to ltconfig.
198 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
199 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
200 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
201 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
202 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
204 # Some flags need to be propagated to the compiler or linker for good
208 # Find out which ABI we are using.
209 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
210 if AC_TRY_EVAL(ac_compile); then
211 case "`/usr/bin/file conftest.o`" in
227 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
228 CFLAGS="$CFLAGS -belf"
232 # Actually configure libtool. ac_aux_dir is where install-sh is found.
233 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
234 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
235 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
236 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
237 || AC_MSG_ERROR([libtool configure failed])
240 # AM_ENABLE_SHARED - implement the --enable-shared flag
241 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
242 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
244 AC_DEFUN(AM_ENABLE_SHARED,
245 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
246 AC_ARG_ENABLE(shared,
247 changequote(<<, >>)dnl
248 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
250 [ --enable-shared=PKGS only build shared libraries if the current package
251 appears as an element in the PKGS list],
252 [p=${PACKAGE-default}
254 yes) enable_shared=yes ;;
255 no) enable_shared=no ;;
258 # Look at the argument we got. We use all the common list separators.
259 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
260 for pkg in $enableval; do
261 if test "X$pkg" = "X$p"; then
268 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
271 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
272 AC_DEFUN(AM_DISABLE_SHARED,
273 [AM_ENABLE_SHARED(no)])
275 # AM_DISABLE_STATIC - set the default static flag to --disable-static
276 AC_DEFUN(AM_DISABLE_STATIC,
277 [AM_ENABLE_STATIC(no)])
279 # AM_ENABLE_STATIC - implement the --enable-static flag
280 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
281 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
283 AC_DEFUN(AM_ENABLE_STATIC,
284 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
285 AC_ARG_ENABLE(static,
286 changequote(<<, >>)dnl
287 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
289 [ --enable-static=PKGS only build shared libraries if the current package
290 appears as an element in the PKGS list],
291 [p=${PACKAGE-default}
293 yes) enable_static=yes ;;
294 no) enable_static=no ;;
297 # Look at the argument we got. We use all the common list separators.
298 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
299 for pkg in $enableval; do
300 if test "X$pkg" = "X$p"; then
307 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
311 # AM_PROG_LD - find the path to the GNU or non-GNU linker
314 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
315 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
316 AC_REQUIRE([AC_PROG_CC])
318 if test "$ac_cv_prog_gcc" = yes; then
319 # Check if gcc -print-prog-name=ld gives a path.
320 AC_MSG_CHECKING([for ld used by GCC])
321 ac_prog=`($CC -print-prog-name=ld) 2>&5`
323 # Accept absolute paths.
325 test -z "$LD" && LD="$ac_prog"
328 # If it fails, then pretend we aren't using GCC.
332 # If it is relative, then search for the first ld in PATH.
336 elif test "$with_gnu_ld" = yes; then
337 AC_MSG_CHECKING([for GNU ld])
339 AC_MSG_CHECKING([for non-GNU ld])
341 AC_CACHE_VAL(ac_cv_path_LD,
342 [if test -z "$LD"; then
343 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
344 for ac_dir in $PATH; do
345 test -z "$ac_dir" && ac_dir=.
346 if test -f "$ac_dir/$ac_prog"; then
347 ac_cv_path_LD="$ac_dir/$ac_prog"
348 # Check to see if the program is GNU ld. I'd rather use --version,
349 # but apparently some GNU ld's only accept -v.
350 # Break only if it was the GNU/non-GNU ld that we prefer.
351 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
352 test "$with_gnu_ld" != no && break
354 test "$with_gnu_ld" != yes && break
360 ac_cv_path_LD="$LD" # Let the user override the test with a path.
363 if test -n "$LD"; then
368 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
373 AC_DEFUN(AM_PROG_LD_GNU,
374 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
375 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
376 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
377 ac_cv_prog_gnu_ld=yes
383 # AM_PROG_NM - find the path to a BSD-compatible name lister
385 [AC_MSG_CHECKING([for BSD-compatible nm])
386 AC_CACHE_VAL(ac_cv_path_NM,
389 ac_cv_path_NM="$NM" # Let the user override the test with a path.
392 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
393 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
394 test -z "$ac_dir" && ac_dir=.
395 if test -f $ac_dir/nm; then
396 # Check to see if the nm accepts a BSD-compat flag.
397 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
398 # nm: unknown option "B" ignored
399 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
400 ac_cv_path_NM="$ac_dir/nm -B"
401 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
402 ac_cv_path_NM="$ac_dir/nm -p"
404 ac_cv_path_NM="$ac_dir/nm"
410 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
418 # Like AC_CONFIG_HEADER, but automatically create stamp file.
420 AC_DEFUN(AM_CONFIG_HEADER,
422 AC_CONFIG_HEADER([$1])
423 dnl When config.status generates a header, we must update the stamp-h file.
424 dnl This file resides in the same directory as the config header
425 dnl that is generated. We must strip everything past the first ":",
426 dnl and everything past the last "/".
427 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
428 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
429 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
431 for am_file in <<$1>>; do
432 case " <<$>>CONFIG_HEADERS " in
433 *" <<$>>am_file "*<<)>>
434 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
437 am_indx=`expr "<<$>>am_indx" + 1`