1 dnl aclocal.m4 -*-shell-script-*-
2 dnl StepMake subroutines for configure.in
5 ### mostly interal macros
7 # Get full path of executable ($1)
8 AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [
9 type -p "$1" 2>&1 | awk '{print $NF}'
13 # Get version string from executable ($1)
14 AC_DEFUN(STEPMAKE_GET_VERSION, [
15 "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
18 # Calculate numeric version from version string ($1)
19 AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
22 if ([$]3) {last = [$]3}
25 {printf "%s%s%s\n",[$]1*100, [$]2*10,last}'
29 # Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
30 AC_DEFUN(STEPMAKE_ADD_ENTRY, [
31 eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
34 # Check if tested program ($2) was found ($1).
35 # If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
36 # We could abort here if a 'REQUIRED' program is not found
37 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
38 STEPMAKE_CHECK_SEARCH_RESULT($1)
39 if test $? -ne 0; then
40 STEPMAKE_ADD_ENTRY($3, $2)
41 if test "$3" = "REQUIRED"; then
42 command="echo ERROR: $2 not found"
43 # abort configure process here?
45 command="- echo $2 not found"
55 # Return if tested proram ($1) was found (true) or not (false).
56 AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
57 r="`eval echo '$'"$1"`"
58 if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
59 ##STEPMAKE_WARN(cannot find $2. $3)
67 # Check version of program ($1)
68 # If version is smaller than requested ($3),
69 # add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
70 AC_DEFUN(STEPMAKE_CHECK_VERSION, [
71 r="`eval echo '$'"$1"`"
72 AC_MSG_CHECKING("$r version")
73 exe=`STEPMAKE_GET_EXECUTABLE($r)`
74 ver=`STEPMAKE_GET_VERSION($exe)`
75 num=`STEPMAKE_NUMERIC_VERSION($ver)`
76 req=`STEPMAKE_NUMERIC_VERSION($3)`
78 if test "$num" -lt "$req"; then
79 STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)")
83 ### Macros to build configure.in
86 AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
87 STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
88 if test "$BIBTEX2HTML" = "bib2html"; then
89 BIBTEX2HTML_FLAGS='$< $(@)'
91 BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
94 AC_SUBST(BIBTEX2HTML_FLAGS)
98 AC_DEFUN(STEPMAKE_BISON, [
99 # ugh, automake: we want (and check for) bison
102 STEPMAKE_PROGS(BISON, bison, $1)
104 # urg. should test functionality rather than version.
105 if test "$BISON" = "bison" -a -n "$2"; then
106 STEPMAKE_CHECK_VERSION(BISON, $1, $2)
112 AC_DEFUN(STEPMAKE_COMPILE, [
113 # -O is necessary to get inlining
115 CXXFLAGS=${CXXFLAGS-$CFLAGS}
116 LDFLAGS=${LDFLAGS-""}
122 AC_ARG_ENABLE(checking,
123 [ --enable-checking set runtime checks (assert calls). Default: on],
124 [checking_b=$enableval] )
126 AC_ARG_ENABLE(debugging,
127 [ --enable-debugging compile with debugging info. Default: on],
128 [debug_b=$enableval])
130 AC_ARG_ENABLE(optimising,
131 [ --enable-optimising compile with optimising. Default: on],
132 [optimise_b=$enableval])
134 AC_ARG_ENABLE(profiling,
135 [ --enable-profiling compile with gprof support. Default: off],
136 [profile_b=$enableval])
139 if test "$checking_b" = no; then
142 DEFINES="$DEFINES -DNDEBUG"
145 if test "$optimise_b" = yes; then
146 OPTIMIZE="-O2 -finline-functions"
150 if test $profile_b = yes; then
152 OPTIMIZE="$OPTIMIZE -pg"
155 if test $debug_b = yes; then
156 OPTIMIZE="$OPTIMIZE -g"
161 STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
165 CFLAGS="$CFLAGS $OPTIMIZE"
166 CPPFLAGS=${CPPFLAGS-""}
168 AC_MSG_CHECKING([for IEEE-conformance compiler flags])
169 save_cflags="$CFLAGS"
172 dnl should do compile test?
173 AC_MSG_RESULT(-mieee)
174 CFLAGS="-mieee $CFLAGS"
177 AC_MSG_RESULT([none])
180 AC_SUBST(cross_compiling)
187 AC_SUBST(EXTRA_LIBES)
190 AC_DEFUN(STEPMAKE_CXX, [
193 STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
195 AC_CHECK_HEADER(FlexLexer.h, true,
196 STEPMAKE_WARN(cannot find flex header. Please install Flex headers correctly))
198 CPPFLAGS="$CPPFLAGS $DEFINES"
199 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
200 LDFLAGS="$LDFLAGS $EXTRA_LIBES"
209 AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
210 AC_CACHE_CHECK([whether explicit instantiation is needed],
211 lily_cv_need_explicit_instantiation,
213 template <class T> struct foo { static int baz; };
214 template <class T> int foo<T>::baz = 1;
215 ], [ return foo<int>::baz; ],
216 lily_cv_need_explicit_instantiation=no,
217 lily_cv_need_explicit_instantiation=yes))
218 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
219 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
224 AC_DEFUN(STEPMAKE_DATADIR, [
225 if test "$datadir" = "\${prefix}/share"; then
226 datadir='${prefix}/share/'$package
228 DIR_DATADIR=${datadir}
230 if test "$prefix" = "NONE"; then
231 presome=${ac_default_prefix}
233 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
236 AC_SUBST(DIR_DATADIR)
238 dnl yeah, so fuck me gently with a cactus: this doesnt belong here
239 dnl Please take the person responsible for inventing shell-scripts out
240 dnl and shoot him. On behalf of the sane world, thank you.
241 dnl DIR_SHAREDSTATEDIR="foobar"
242 dnl AC_SUBST(DIR_SHAREDSTATEDIR)
244 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
248 AC_DEFUN(STEPMAKE_END, [
252 AC_OUTPUT($CONFIGFILE.make:config.make.in)
255 if test -n "$OPTIONAL"; then
257 echo "WARNING: Please consider installing optional programs: $OPTIONAL"
260 if test -n "$REQUIRED"; then
262 echo "ERROR: Please install required programs: $REQUIRED"
265 if test -n "$OPTIONAL$REQUIRED"; then
267 echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
268 echo "Remove config.cache before rerunning ./configure"
271 if test -n "$REQUIRED"; then
272 rm -f $srcdir/GNUmakefile
276 # regular in-place build
277 # test for srcdir_build = yes ?
278 if test "$builddir" = "."; then
279 rm -f $srcdir/GNUmakefile
280 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
281 chmod 444 $srcdir/GNUmakefile
282 else # --srcdir build
284 cp $srcdir/make/srcdir.make.in GNUmakefile
285 chmod 444 GNUmakefile
290 AC_DEFUN(STEPMAKE_FLEX, [
291 # ugh, automake: we want (and check for) flex
293 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
297 ac_cv_prog_lex_root=lex.yy
298 STEPMAKE_PROGS(FLEX, flex, $1)
303 AC_DEFUN(STEPMAKE_GETTEXT, [
304 DIR_LOCALEDIR=${localedir}
306 if test "$prefix" = "NONE"; then
307 presome=${ac_default_prefix}
309 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
311 AC_SUBST(DIR_LOCALEDIR)
312 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
314 AC_CHECK_LIB(intl, gettext)
315 AC_CHECK_FUNCS(gettext)
319 AC_DEFUN(STEPMAKE_GUILE, [
320 STEPMAKE_PATH_PROG(GUILE, guile, $1)
324 # STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
326 # This macro runs the guile-config script, installed with Guile,
327 # to find out where Guile's header files and libraries are
328 # installed. It sets two variables, marked for substitution, as
331 # GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
332 # code that uses Guile header files. This is almost
333 # always just a -I flag.
335 # GUILE_LDFLAGS --- flags to pass to the linker to link a
336 # program against Guile. This includes -lguile for
337 # the Guile library itself, any libraries that Guile
338 # itself requires (like -lqthreads), and so on. It may
339 # also include a -L flag to tell the compiler where to
340 # find the libraries.
342 AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
343 exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
344 if test -x $exe; then
345 AC_MSG_CHECKING("guile compile flags")
346 GUILE_CFLAGS="`$guile_config compile`"
347 AC_MSG_RESULT($GUILE_CFLAGS)
348 AC_MSG_CHECKING("guile link flags")
349 GUILE_LDFLAGS="`$guile_config link`"
350 AC_MSG_RESULT($GUILE_LDFLAGS)
352 AC_SUBST(GUILE_CFLAGS)
353 AC_SUBST(GUILE_LDFLAGS)
357 AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
358 ## First, let's just see if we can find Guile at all.
359 AC_MSG_CHECKING("for guile-config")
360 for guile_config in guile-config $target-guile-config $build-guile-config; do
361 AC_MSG_RESULT("$guile_config")
362 if ! $guile_config --version > /dev/null 2>&1 ; then
363 AC_MSG_WARN("cannot execute $guile_config")
364 AC_MSG_CHECKING("if we are cross compiling")
365 GUILE_CONFIG='echo no guile-config'
367 GUILE_CONFIG=$guile_config
371 STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
372 #if expr "$GUILE_CONFIG" : '.*\(echo\)' >/dev/null; then
373 if test $? -ne 0; then
374 STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)')
377 STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
378 # urg. should test functionality rather than version.
379 if test $? -eq 0 -a -n "$2"; then
380 STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
383 AC_SUBST(GUILE_CONFIG)
386 changequote(<<, >>)dnl
387 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
388 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
391 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
392 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
396 AC_DEFUN(STEPMAKE_GXX, [
397 AC_MSG_CHECKING("g++ version")
398 cxx_version=`$CXX --version`
399 AC_MSG_RESULT("$cxx_version")
400 changequote(<<, >>)dnl
401 # urg, egcs: how to check for egcs >= 1.1?
402 if expr "$cxx_version" : '.*2\.[89]' > /dev/null ||
403 expr "$cxx_version" : '.*egcs' > /dev/null ||
404 expr "$cxx_version" : '3\.[0-9]' > /dev/null
409 STEPMAKE_WARN(cannot find g++ 2.8, 2.9, 3.x or egcs 1.1)
410 STEPMAKE_ADD_ENTRY($1, 'g++ >= 2.95 (gcc package)')
416 AC_DEFUN(STEPMAKE_INIT, [
419 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
420 if test x$MY_PATCH_LEVEL != x; then
421 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
424 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
425 changequote(<<, >>)dnl
426 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
427 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
430 # No versioning on directory names of sub-packages
432 stepmake=${datadir}/stepmake
434 if test "$prefix" = "NONE"; then
435 presome=${ac_default_prefix}
437 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
439 # urg, how is this supposed to work?
440 if test "$program_prefix" = "NONE"; then
443 if test "$program_suffix" = "NONE"; then
447 AC_MSG_CHECKING(Package)
448 if test "x$PACKAGE" = "xSTEPMAKE"; then
449 AC_MSG_RESULT(Stepmake package!)
451 AC_MSG_CHECKING(builddir)
452 if test "$srcdir" = "."; then
455 absolute_builddir="`pwd`"
456 package_absolute_builddir="`dirname $absolute_builddir`"
457 package_srcdir="`dirname $srcdir`"
458 builddir="`dirname $package_srcdir`/`basename $package_absolute_builddir`/`basename $absolute_builddir`"
460 AC_MSG_RESULT($builddir)
462 (cd stepmake 2>/dev/null || mkdir stepmake)
463 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
464 AC_CONFIG_AUX_DIR(bin)
467 AC_MSG_RESULT($PACKAGE)
469 AC_MSG_CHECKING(builddir)
470 if test "$srcdir" = "."; then
474 absolute_builddir="`pwd`"
475 # builddir="`dirname $srcdir`/`basename $absolute_builddir`"
476 builddir="`bash $srcdir/buildscripts/walk.sh \"$srcdir\"`"
479 AC_MSG_RESULT($builddir)
480 if expr "$srcdir" : '/' > /dev/null 2>&1; then
482 STEPMAKE_WARN(Absolute --srcdir specified: $srcdir)
485 AC_MSG_CHECKING(for stepmake)
486 # Check for installed stepmake
487 if test -d $stepmake; then
488 AC_MSG_RESULT($stepmake)
490 if test "$absolute_srcdir" != "yes"; then
491 stepmake='$(depth)'/$srcdir/stepmake
493 stepmake=$srcdir/stepmake
495 AC_MSG_RESULT($srcdir/stepmake ($datadir/stepmake not found))
499 $HOME/usr/local/share/stepmake/bin\
500 $HOME/usr/local/lib/stepmake/bin\
501 $HOME/usr/share/stepmake/bin\
502 $HOME/usr/lib/stepmake/bin\
503 /usr/local/share/stepmake/bin\
504 /usr/local/lib/stepmake/bin\
505 /usr/share/stepmake/bin\
506 /usr/lib/stepmake/bin\
508 $srcdir/stepmake/bin\
516 AC_SUBST(PACKAGE_NAME)
517 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
518 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
520 if test "$package_depth" = "" ; then
523 package_depth="../$package_depth"
526 AC_SUBST(package_depth)
528 AUTOGENERATE="This file was automatically generated by configure"
529 AC_SUBST(AUTOGENERATE)
532 AC_ARG_ENABLE(config,
533 [ --enable-config=CONF put settings in config-CONF.make and config-CONF.h;
534 do \`make conf=CONF' to get output in ./out-CONF],
535 [CONFIGURATION=$enableval])
539 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
540 CONFIGFILE=config$CONFIGSUFFIX
541 AC_SUBST(CONFIGSUFFIX)
544 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
545 STEPMAKE_PROGS(FIND, find, REQUIRED)
547 STEPMAKE_PROGS(TAR, tar, REQUIRED)
549 if test "x`uname`" = "xHP-UX"; then
550 AC_PATH_PROG(BASH, bash, /bin/sh)
551 STEPMAKE_WARN(avoiding buggy /bin/sh)
552 AC_PATH_PROG(SHELL, bash, /bin/ksh)
554 AC_PATH_PROG(BASH, bash, /bin/sh)
559 STEPMAKE_PATH_PROG(PYTHON, python, REQUIRED)
561 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
562 $MAKE -v 2> /dev/null | grep GNU > /dev/null
563 if test "$?" = 1; then
564 warn='make (Please install *GNU* make)'
566 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
570 if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then
571 LN=cp # hard link does not work under cygnus-nt
572 LN_S='cp -r' # symbolic link does not work for native nt
578 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
586 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
588 AC_SUBST(program_prefix)
589 AC_SUBST(program_suffix)
594 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
595 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
603 AC_DEFUN(STEPMAKE_KPATHSEA, [
606 #FIXME --with-xxx is meant for specifying a PATH too,
607 # so this should read: --enable-kpathsea,
608 # or --with-kpathsea-include=PATH --with-kpathsea-lib=PATH
609 AC_ARG_WITH(kpathsea,
610 [ --with-kpathsea use kpathsea lib. Default: on],
611 [kpathsea_b=$with_kpathsea])
613 if test "$kpathsea_b" != "no"; then
614 AC_HAVE_HEADERS(kpathsea/kpathsea.h)
615 AC_CHECK_LIB(kpathsea, kpse_find_file)
616 AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea functions. You should install kpathsea; see INSTALL.txt. Rerun ./configure --without-kpathsea only if kpathsea is not available for your platform.))
618 AC_MSG_CHECKING(whether to use kpathsea)
619 if test "$kpathsea_b" != no; then
628 AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA)
632 AC_DEFUN(STEPMAKE_LIB, [
633 STEPMAKE_PROGS(AR, ar, $1)
635 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
639 AC_DEFUN(STEPMAKE_LIBTOOL, [
641 # **Never** try to set library version numbers so that they correspond
642 # to the release number of your package. This is an abuse that only
643 # fosters misunderstanding of the purpose of library versions.
645 REVISION=$PATCH_LEVEL
646 # CURRENT=$MINOR_VERSION
647 CURRENT=`expr $MINOR_VERSION + 1`
648 # AGE=$(expr $MAJOR_VERSION + 1)
656 AC_DEFUN(STEPMAKE_LOCALE, [
661 AC_ARG_WITH(localedir,
662 [ --with-localedir=LOCALE use LOCALE as locale dir. Default:
663 PREFIX/share/locale ],
664 localedir=$with_localedir,
665 localedir='${prefix}/share/locale')
668 [ --with-lang=LANG use LANG as language to emit messages],
672 AC_MSG_CHECKING(language)
674 En* | en* | Am* | am* | US* | us*)
676 NL | nl | Du* | du* | Ned* | ned*)
685 if test "$lang" = "unknown" ; then
686 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
692 AC_DEFUN(STEPMAKE_MAKEINFO, [
693 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
694 if test "$MAKEINFO" = "makeinfo"; then
695 AC_MSG_CHECKING(whether makeinfo can split html by @node)
697 makeinfo --html --output=out/split <<EOF
699 \input texinfo @c -*-texinfo-*-
700 @setfilename split.info
704 if test -d out/split; then
705 SPLITTING_MAKEINFO=yes
710 STEPMAKE_WARN(your html documentation will be one large file)
714 AC_SUBST(SPLITTING_MAKEINFO)
719 AC_DEFUN(STEPMAKE_MAN, [
720 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
722 STEPMAKE_PROGS(TROFF, troff, $1)
724 STEPMAKE_PROGS(TBL, tbl, $1)
729 AC_DEFUN(STEPMAKE_MSGFMT, [
730 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
734 # Check for program ($2), set full path result to ($1).
735 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
736 AC_DEFUN(STEPMAKE_PATH_PROG, [
737 AC_CHECK_PROGS($1, $2, no)
738 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
739 if test $? -eq 0; then
741 if test -n "$4"; then
742 STEPMAKE_CHECK_VERSION($1, $3, $4)
748 # Check for program in set of names ($2), set result to ($1) .
749 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
750 # If exists, and a minimal version ($4) is required
751 AC_DEFUN(STEPMAKE_PROGS, [
752 AC_CHECK_PROGS($1, $2, no)
753 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
754 if test $? -eq 0 -a -n "$4"; then
755 STEPMAKE_CHECK_VERSION($1, $3, $4)
760 AC_DEFUN(STEPMAKE_PERL, [
761 STEPMAKE_PATH_PROG(PERL, perl, $1)
765 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
766 AC_HAVE_HEADERS(python2.2/Python.h python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h)
767 if test $? -ne 0; then
768 STEPMAKE_ADD_ENTRY($1, 'python.h (python-devel, python-dev or libpython-dev package)')
773 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
774 AC_ARG_ENABLE(tfm-path,
775 [ --enable-tfm-path=PATH set path of tex directories where tfm files live,
776 esp.: cmr10.tfm. Default: use kpsewhich],
777 [tfm_path=$enableval],
781 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, OPTIONAL)
782 AC_MSG_CHECKING(for tfm path)
786 if test "x$tfm_path" = xauto ; then
787 if test "x$KPSEWHICH" != "xno" ; then
788 for i in $TFM_FONTS; do
789 dir=`$KPSEWHICH tfm ${i}10.tfm`
790 TFM_PATH="$TFM_PATH `dirname $dir`"
793 STEPMAKE_WARN(Please specify where cmr10.tfm lives:
794 ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
800 TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
801 AC_MSG_RESULT($TFM_PATH)
806 AC_DEFUN(STEPMAKE_TEXMF, [
807 # urg, never know what names these teTeX guys will think up
809 STEPMAKE_PROGS(METAFONT, mf mfont, $1)
810 STEPMAKE_PROGS(INIMETAFONT, inimf inimfont, $1)
812 AC_MSG_CHECKING(for working metafont mode)
813 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
814 for MFMODE in $modelist; do
815 $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
816 if test -f mfput.tfm; then
820 AC_MSG_RESULT($MFMODE)
828 AC_DEFUN(STEPMAKE_WARN, [