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 ## which doesn't work in ash, if /usr/bin/which isn't installed
10 ## type -p doesn't work in ash
11 ## command -v doesn't work in zsh
12 ## command -v "$1" 2>&1
13 ## this test should work in ash, bash, pdksh (ksh), zsh
14 type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}'
18 # Get version string from executable ($1)
19 AC_DEFUN(STEPMAKE_GET_VERSION, [
20 ## "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
23 ## Workaround for broken Debian gcc version string:
24 ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
26 ## Assume, and hunt for, dotted version multiplet.
27 changequote(<<, >>)dnl
28 "$1" --version 2>&1 | grep '[0-9]\.[0-9]' | head -1 | \
29 sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/'
33 # Calculate simplistic numeric version from version string ($1)
34 # As yet, we have no need for something more elaborate.
35 AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
38 if ([$]3) {three = [$]3}
41 {printf "%d\n", [$]1*1000000 + [$]2*1000 + three}'
45 # Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
46 AC_DEFUN(STEPMAKE_ADD_ENTRY, [
47 eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
50 # Check if tested program ($2) was found ($1).
51 # If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
52 # We could abort here if a 'REQUIRED' program is not found
53 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
54 STEPMAKE_CHECK_SEARCH_RESULT($1)
55 if test $? -ne 0; then
56 STEPMAKE_ADD_ENTRY($3, $2)
57 if test "$3" = "REQUIRED"; then
58 command="echo ERROR: $2 not found"
59 # abort configure process here?
61 command="- echo $2 not found"
71 # Return if tested proram ($1) was found (true) or not (false).
72 AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
73 r="`eval echo '$'"$1"`"
74 if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
77 ##STEPMAKE_WARN(cannot find $2. $3)
83 # Check version of program ($1)
84 # If version is smaller than requested ($3),
85 # add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
86 AC_DEFUN(STEPMAKE_CHECK_VERSION, [
87 r="`eval echo '$'"$1"`"
88 AC_MSG_CHECKING([$r version])
89 exe=`STEPMAKE_GET_EXECUTABLE($r)`
90 ver=`STEPMAKE_GET_VERSION($exe)`
91 num=`STEPMAKE_NUMERIC_VERSION($ver)`
92 req=`STEPMAKE_NUMERIC_VERSION($3)`
94 if test "$num" -lt "$req"; then
95 STEPMAKE_ADD_ENTRY($2, ["$r $3 (installed: $ver)"])
99 ### Macros to build configure.in
102 AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
103 STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
104 if test "$BIBTEX2HTML" = "bib2html"; then
105 BIBTEX2HTML_FLAGS='$< $(@)'
107 BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
109 AC_SUBST(BIBTEX2HTML)
110 AC_SUBST(BIBTEX2HTML_FLAGS)
114 AC_DEFUN(STEPMAKE_BISON, [
115 # ugh, automake: we want (and check for) bison
118 STEPMAKE_PROGS(BISON, bison, $1)
120 # urg. should test functionality rather than version.
121 if test "$BISON" = "bison" -a -n "$2"; then
122 STEPMAKE_CHECK_VERSION(BISON, $1, $2)
127 AC_DEFUN(STEPMAKE_COMPILE, [
128 # -O is necessary to get inlining
130 CXXFLAGS=${CXXFLAGS-$CFLAGS}
131 LDFLAGS=${LDFLAGS-""}
137 AC_ARG_ENABLE(checking,
138 [ --enable-checking set runtime checks (assert calls). Default: on],
139 [checking_b=$enableval] )
141 AC_ARG_ENABLE(debugging,
142 [ --enable-debugging compile with debugging info. Default: on],
143 [debug_b=$enableval])
145 AC_ARG_ENABLE(optimising,
146 [ --enable-optimising compile with optimising. Default: on],
147 [optimise_b=$enableval])
149 AC_ARG_ENABLE(profiling,
150 [ --enable-profiling compile with gprof support. Default: off],
151 [profile_b=$enableval])
154 if test "$checking_b" = no; then
157 DEFINES="$DEFINES -DNDEBUG"
160 if test "$optimise_b" = yes; then
161 OPTIMIZE="-O2 -finline-functions"
165 if test $profile_b = yes; then
167 OPTIMIZE="$OPTIMIZE -pg"
170 if test $debug_b = yes; then
171 OPTIMIZE="$OPTIMIZE -g"
176 STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
180 CFLAGS="$CFLAGS $OPTIMIZE"
181 CPPFLAGS=${CPPFLAGS-""}
183 AC_MSG_CHECKING([for IEEE-conformance compiler flags])
184 save_cflags="$CFLAGS"
187 dnl should do compile test?
188 AC_MSG_RESULT(-mieee)
189 CFLAGS="-mieee $CFLAGS"
192 AC_MSG_RESULT([none])
195 AC_SUBST(cross_compiling)
202 AC_SUBST(EXTRA_LIBES)
205 AC_DEFUN(STEPMAKE_CXX, [
208 STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
210 CPPFLAGS="$CPPFLAGS $DEFINES"
211 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
212 LDFLAGS="$LDFLAGS $EXTRA_LIBES"
221 AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
222 AC_CACHE_CHECK([whether explicit instantiation is needed],
223 lily_cv_need_explicit_instantiation,
224 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
225 template <class T> struct foo { static int baz; };
226 template <class T> int foo<T>::baz = 1;
227 ]], [[ return foo<int>::baz; ]])],[lily_cv_need_explicit_instantiation=no],[lily_cv_need_explicit_instantiation=yes]))
228 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
229 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
234 AC_DEFUN(STEPMAKE_DATADIR, [
235 if test "$datadir" = "\${prefix}/share"; then
236 datadir='${prefix}/share'
239 if test "$prefix" = "NONE"; then
240 presome=${ac_default_prefix}
243 build_package_datadir=$ugh_ugh_autoconf250_builddir/share/$package
245 DATADIR=`echo ${datadir} | sed "s!\\\${prefix}!$presome!"`
246 BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
249 AC_SUBST(build_package_datadir)
250 AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
251 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
254 ## ugh: cut & paste programming from datadir.
255 AC_DEFUN(STEPMAKE_LIBDIR, [
257 if test "$libdir" = "\${exec_prefix}/lib"; then
258 libdir='${exec_prefix}/lib'
261 build_package_libdir=$ugh_ugh_autoconf250_builddir/lib/$package
263 LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
264 BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
267 AC_SUBST(build_package_libdir)
268 AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
269 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
273 AC_DEFUN(STEPMAKE_END, [
277 AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
281 if test -n "$OPTIONAL"; then
283 echo "WARNING: Please consider installing optional programs: $OPTIONAL"
286 if test -n "$REQUIRED"; then
288 echo "ERROR: Please install required programs: $REQUIRED"
291 if test -n "$OPTIONAL$REQUIRED"; then
293 echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
294 echo "Remove config.cache before rerunning ./configure"
297 if test -n "$REQUIRED"; then
298 rm -f $srcdir/GNUmakefile
302 # regular in-place build
303 # test for srcdir_build = yes ?
304 if test "$srcdir_build" = "yes"; then
305 rm -f $srcdir/GNUmakefile
306 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
307 chmod 444 $srcdir/GNUmakefile
308 else # --srcdir build
310 cp $srcdir/make/srcdir.make.in GNUmakefile
311 chmod 444 GNUmakefile
316 AC_DEFUN(STEPMAKE_FLEX, [
317 # ugh, automake: we want (and check for) flex
319 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
323 ac_cv_prog_lex_root=lex.yy
324 STEPMAKE_PROGS(FLEX, flex, $1)
328 AC_DEFUN(STEPMAKE_FLEXLEXER, [
329 AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
330 if test $? -ne 0; then
331 warn='FlexLexer.h (flex package)'
332 STEPMAKE_ADD_ENTRY($1, $warn)
337 AC_DEFUN(STEPMAKE_GCC, [
338 if test "$GCC" = "yes"; then
339 STEPMAKE_CHECK_VERSION(CC, $1, $2)
341 warn="$CC (Please install *GNU* cc)"
342 STEPMAKE_ADD_ENTRY($1, $warn)
347 AC_DEFUN(STEPMAKE_GETTEXT, [
349 if test "$prefix" = "NONE"; then
350 presome=${ac_default_prefix}
352 LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
355 AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
356 AC_CHECK_LIB(intl, gettext)
357 AC_CHECK_FUNCS(gettext)
361 AC_DEFUN(STEPMAKE_GUILE, [
362 STEPMAKE_PATH_PROG(GUILE, guile, $1)
366 # STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
368 # This macro runs the guile-config script, installed with Guile,
369 # to find out where Guile's header files and libraries are
370 # installed. It sets two variables, marked for substitution, as
373 # GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
374 # code that uses Guile header files. This is almost
375 # always just a -I flag.
377 # GUILE_LDFLAGS --- flags to pass to the linker to link a
378 # program against Guile. This includes -lguile for
379 # the Guile library itself, any libraries that Guile
380 # itself requires (like -lqthreads), and so on. It may
381 # also include a -L flag to tell the compiler where to
382 # find the libraries.
384 AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
385 exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
386 if test -x $exe; then
387 AC_MSG_CHECKING([guile compile flags])
388 GUILE_CFLAGS="`$guile_config compile`"
389 AC_MSG_RESULT($GUILE_CFLAGS)
390 AC_MSG_CHECKING([guile link flags])
391 GUILE_LDFLAGS="`$guile_config link`"
392 AC_MSG_RESULT($GUILE_LDFLAGS)
394 AC_SUBST(GUILE_CFLAGS)
395 AC_SUBST(GUILE_LDFLAGS)
399 AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
400 ## First, let's just see if we can find Guile at all.
401 AC_MSG_CHECKING([for guile-config])
402 for guile_config in guile-config $target-guile-config $build-guile-config; do
403 AC_MSG_RESULT([$guile_config])
404 if ! $guile_config --version > /dev/null 2>&1 ; then
405 AC_MSG_WARN([cannot execute $guile_config])
406 AC_MSG_CHECKING([if we are cross compiling])
407 GUILE_CONFIG='echo no guile-config'
409 GUILE_CONFIG=$guile_config
413 STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
414 if test $? -ne 0; then
415 STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)')
418 STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
419 # urg. should test functionality rather than version.
420 if test $? -eq 0 -a -n "$2"; then
421 STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
424 AC_SUBST(GUILE_CONFIG)
427 changequote(<<, >>)dnl
428 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
429 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
430 GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
433 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
434 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
435 AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
439 AC_DEFUN(STEPMAKE_GXX, [
440 if test "$GXX" = "yes"; then
441 STEPMAKE_CHECK_VERSION(CXX, $1, $2)
443 warn="$CXX (Please install *GNU* c++)"
444 STEPMAKE_ADD_ENTRY($1, $warn)
449 AC_DEFUN(STEPMAKE_INIT, [
453 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
454 if test x$MY_PATCH_LEVEL != x; then
455 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
458 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
459 changequote(<<, >>)dnl
460 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
461 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
464 # No versioning on directory names of sub-packages
466 stepmake=${datadir}/stepmake
468 if test "$prefix" = "NONE"; then
469 presome=${ac_default_prefix}
471 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
473 # urg, how is this supposed to work?
474 if test "$program_prefix" = "NONE"; then
477 if test "$program_suffix" = "NONE"; then
481 AC_MSG_CHECKING(Package)
482 if test "$PACKAGE" = "STEPMAKE"; then
483 AC_MSG_RESULT(Stepmake package!)
485 AC_MSG_CHECKING(builddir)
487 ugh_ugh_autoconf250_builddir="`pwd`"
489 if test "$srcdir" = "."; then
493 package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
494 package_srcdir="`dirname $srcdir`"
496 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
498 (cd stepmake 2>/dev/null || mkdir stepmake)
499 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
500 # only possible with autoconf < 2.50 -- hardcoded in configure.in
501 # AC_CONFIG_AUX_DIR(bin)
504 AC_MSG_RESULT($PACKAGE)
506 AC_MSG_CHECKING(builddir)
507 ugh_ugh_autoconf250_builddir="`pwd`"
508 if test "$srcdir" = "."; then
513 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
515 AC_MSG_CHECKING(for stepmake)
516 # Check for installed stepmake
517 if test -d $stepmake; then
518 AC_MSG_RESULT($stepmake)
520 stepmake="`cd $srcdir/stepmake; pwd`"
521 AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
524 # only possible with autoconf < 2.50 -- hardcoded in configure.in
525 # AC_CONFIG_AUX_DIR(\
527 # $srcdir/stepmake/bin\
531 AC_SUBST(ugh_ugh_autoconf250_builddir)
535 AC_SUBST(PACKAGE_NAME)
536 # We don't need the upper case variant,
537 # so stick to macros are uppercase convention.
538 # AC_DEFINE_UNQUOTED(package, ["${package}"])
539 # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
540 AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
541 AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
542 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
544 if test -z "$package_depth"; then
547 package_depth="../$package_depth"
550 AC_SUBST(package_depth)
552 AUTOGENERATE="This file was automatically generated by configure"
553 AC_SUBST(AUTOGENERATE)
556 AC_ARG_ENABLE(config,
557 [ --enable-config=CONF put settings in config-CONF.make and config-CONF.h;
558 do \`make conf=CONF' to get output in ./out-CONF],
559 [CONFIGURATION=$enableval])
563 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
564 CONFIGFILE=config$CONFIGSUFFIX
565 AC_SUBST(CONFIGSUFFIX)
568 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
569 STEPMAKE_PROGS(FIND, find, REQUIRED)
571 STEPMAKE_PROGS(TAR, tar, REQUIRED)
573 if test "$(echo 2)" != "2" ||
574 test "x`uname`" = "xHP-UX"; then
575 AC_PATH_PROG(KSH, ksh, /bin/ksh)
576 AC_PATH_PROG(BASH, bash, $KSH)
577 STEPMAKE_WARN(avoiding buggy /bin/sh)
578 AC_PATH_PROG(SHELL, bash, $KSH)
581 AC_PATH_PROG(BASH, bash, $SHELL)
585 STEPMAKE_PATH_PROG(PYTHON, python, REQUIRED)
587 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
588 $MAKE -v 2> /dev/null | grep GNU > /dev/null
589 if test "$?" = 1; then
590 warn='make (Please install *GNU* make)'
591 # STEPMAKE_WARN($warn)
592 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
596 if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then
597 LN=cp # hard link does not work under cygnus-nt
598 LN_S='cp -r' # symbolic link does not work for native nt
604 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
612 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
614 AC_SUBST(program_prefix)
615 AC_SUBST(program_suffix)
620 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
621 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
631 AC_DEFUN(STEPMAKE_KPATHSEA, [
633 AC_ARG_WITH(kpathsea-include,
634 [ --with-kpathsea-include=DIR
635 location of the kpathsea include dir],[
636 if test "$withval" = "yes" -o "$withval" = "no"; then
637 AC_MSG_WARN(Usage: --with-kpathsea-include=includedir)
639 CPPFLAGS="$CPPFLAGS -I${withval}"
643 AC_ARG_WITH(kpathsea-lib,
644 [ --with-kpathsea-lib=DIR location of the kpathsea lib dir],[
645 if test "$withval" = "yes" -o "$withval" = "no"; then
646 AC_MSG_WARN(Usage: --with-kpathsea-lib=libdir)
648 LDFLAGS="$LDFLAGS -L${withval}"
653 #FIXME --with-xxx is meant for specifying a PATH too,
654 # so this should read: --enable-kpathsea,
655 # or --with-kpathsea-include=PATH --with-kpathsea-lib=PATH
656 AC_ARG_WITH(kpathsea,
657 [ --with-kpathsea use kpathsea lib. Default: on],
658 [kpathsea_b=$with_kpathsea])
660 if test "$kpathsea_b" != "no"; then
661 AC_CHECK_HEADERS([kpathsea/kpathsea.h])
662 AC_CHECK_LIB(kpathsea, kpse_find_file)
663 AC_CHECK_FUNCS(kpse_find_file,,kpathsea_b=no)
664 if test "$kpathsea_b" = "no"; then
665 warn='kpathsea (libkpathsea-dev or kpathsea-devel package)
666 Else, please specify the location of your kpathsea using
667 --with-kpathsea-include and --with-kpathsea-lib options. You should
668 install kpathsea; see INSTALL.txt. Rerun ./configure
669 --without-kpathsea only if kpathsea is not available for your
671 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
674 AC_MSG_CHECKING(whether to use kpathsea)
675 if test "$kpathsea_b" != no; then
684 AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA)
688 AC_DEFUN(STEPMAKE_LIB, [
689 STEPMAKE_PROGS(AR, ar, $1)
691 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
695 AC_DEFUN(STEPMAKE_LIBTOOL, [
697 # **Never** try to set library version numbers so that they correspond
698 # to the release number of your package. This is an abuse that only
699 # fosters misunderstanding of the purpose of library versions.
701 REVISION=$PATCH_LEVEL
702 # CURRENT=$MINOR_VERSION
703 CURRENT=`expr $MINOR_VERSION + 1`
704 # AGE=`expr $MAJOR_VERSION + 1`
712 AC_DEFUN(STEPMAKE_LOCALE, [
717 AC_ARG_WITH(localedir,
718 [ --with-localedir=LOCALE use LOCALE as locale dir. Default:
719 PREFIX/share/locale ],
720 localedir=$with_localedir,
721 localedir='${prefix}/share/locale')
724 [ --with-lang=LANG use LANG as language to emit messages],
728 AC_MSG_CHECKING(language)
730 En* | en* | Am* | am* | US* | us*)
732 NL | nl | Du* | du* | Ned* | ned*)
741 if test "$lang" = "unknown" ; then
742 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
748 AC_DEFUN(STEPMAKE_MAKEINFO, [
749 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
750 if test "$MAKEINFO" = "makeinfo"; then
751 AC_MSG_CHECKING(whether makeinfo can split html by @node)
753 makeinfo --html --output=out/split <<EOF
755 \input texinfo @c -*-texinfo-*-
756 @setfilename split.info
760 if test -d out/split; then
761 SPLITTING_MAKEINFO=yes
766 STEPMAKE_WARN(your html documentation will be one large file)
770 AC_SUBST(SPLITTING_MAKEINFO)
775 AC_DEFUN(STEPMAKE_MAN, [
776 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
778 STEPMAKE_PROGS(TROFF, troff, $1)
780 STEPMAKE_PROGS(TBL, tbl, $1)
785 AC_DEFUN(STEPMAKE_MSGFMT, [
786 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
790 # Check for program ($2), set full path result to ($1).
791 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
792 AC_DEFUN(STEPMAKE_PATH_PROG, [
793 AC_CHECK_PROGS($1, $2, no)
794 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
795 if test $? -eq 0; then
797 if test -n "$4"; then
798 STEPMAKE_CHECK_VERSION($1, $3, $4)
804 # Check for program in set of names ($2), set result to ($1) .
805 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
806 # If exists, and a minimal version ($4) is required
807 AC_DEFUN(STEPMAKE_PROGS, [
808 AC_CHECK_PROGS($1, $2, no)
809 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
810 if test $? -eq 0 -a -n "$4"; then
811 STEPMAKE_CHECK_VERSION($1, $3, $4)
816 AC_DEFUN(STEPMAKE_PERL, [
817 STEPMAKE_PATH_PROG(PERL, perl, $1)
821 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
822 AC_CHECK_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],[PYTHON_HEADER=yes])
823 if test -z "$PYTHON_HEADER"; then
824 warn='python.h (python-devel, python-dev or libpython-dev package)'
825 STEPMAKE_ADD_ENTRY($1, $warn)
830 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
831 AC_ARG_ENABLE(tfm-path,
832 [ --enable-tfm-path=PATH set path of tex directories where tfm files live,
833 esp.: cmr10.tfm. Default: use kpsewhich],
834 [tfm_path=$enableval],
838 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, OPTIONAL)
839 AC_MSG_CHECKING(for tfm path)
843 if test "x$tfm_path" = xauto ; then
844 if test "x$KPSEWHICH" != "xno" ; then
845 for i in $TFM_FONTS; do
846 dir=`$KPSEWHICH tfm ${i}10.tfm`
847 TFM_PATH="$TFM_PATH `dirname $dir`"
850 STEPMAKE_WARN(Please specify where cmr10.tfm lives:
851 ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
857 TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
858 AC_MSG_RESULT($TFM_PATH)
863 AC_DEFUN(STEPMAKE_TEXMF, [
864 # urg, never know what names these teTeX guys will think up
866 STEPMAKE_PROGS(METAFONT, mf mfont, $1)
867 STEPMAKE_PROGS(INIMETAFONT, inimf inimfont, $1)
869 AC_MSG_CHECKING(for working metafont mode)
870 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
871 for MFMODE in $modelist; do
872 $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
873 if test -f mfput.tfm; then
877 AC_MSG_RESULT($MFMODE)
885 AC_DEFUN(STEPMAKE_WARN, [