1 dnl aclocal.m4 -*-shell-script-*-
2 dnl WARNING WARNING WARNING
3 dnl do not edit! this is aclocal.m4, generated from /home/hanwen/usr/src/lilypond/stepmake/aclocal.m4
4 dnl aclocal.m4 -*-shell-script-*-
5 dnl StepMake subroutines for configure.in
8 ### mostly interal macros
10 # Get full path of executable ($1)
11 AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [
12 ## which doesn't work in ash, if /usr/bin/which isn't installed
13 ## type -p doesn't work in ash
14 ## command -v doesn't work in zsh
15 ## command -v "$1" 2>&1
16 ## this test should work in ash, bash, pdksh (ksh), zsh
17 type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}'
21 # Get version string from executable ($1)
22 AC_DEFUN(STEPMAKE_GET_VERSION, [
23 ## "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
26 ## Workaround for broken Debian gcc version string:
27 ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
29 ## Assume, and hunt for, dotted version multiplet.
30 changequote(<<, >>)dnl
31 "$1" --version 2>&1 | grep '[0-9]\.[0-9]' | head -1 | \
32 sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/'
36 # Calculate simplistic numeric version from version string ($1)
37 # As yet, we have no need for something more elaborate.
38 AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
41 if ([$]3) {three = [$]3}
44 {printf "%d\n", [$]1*1000000 + [$]2*1000 + three}'
48 # Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
49 AC_DEFUN(STEPMAKE_ADD_ENTRY, [
50 eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
53 # Check if tested program ($2) was found ($1).
54 # If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
55 # We could abort here if a 'REQUIRED' program is not found
56 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
57 STEPMAKE_CHECK_SEARCH_RESULT($1)
58 if test $? -ne 0; then
59 STEPMAKE_ADD_ENTRY($3, $2)
60 if test "$3" = "REQUIRED"; then
61 command="echo ERROR: $2 not found"
62 # abort configure process here?
64 command="- echo $2 not found"
74 # Return if tested proram ($1) was found (true) or not (false).
75 AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
76 r="`eval echo '$'"$1"`"
77 if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
80 ##STEPMAKE_WARN(cannot find $2. $3)
86 # Check version of program ($1)
87 # If version is smaller than requested ($3),
88 # add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
89 AC_DEFUN(STEPMAKE_CHECK_VERSION, [
90 r="`eval echo '$'"$1"`"
91 AC_MSG_CHECKING([$r version])
92 exe=`STEPMAKE_GET_EXECUTABLE($r)`
93 ver=`STEPMAKE_GET_VERSION($exe)`
94 num=`STEPMAKE_NUMERIC_VERSION($ver)`
95 req=`STEPMAKE_NUMERIC_VERSION($3)`
97 if test "$num" -lt "$req"; then
98 STEPMAKE_ADD_ENTRY($2, ["$r $3 (installed: $ver)"])
102 ### Macros to build configure.in
105 AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
106 STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
107 if test "$BIBTEX2HTML" = "bib2html"; then
108 BIBTEX2HTML_FLAGS='$< $(@)'
110 BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
112 AC_SUBST(BIBTEX2HTML)
113 AC_SUBST(BIBTEX2HTML_FLAGS)
117 AC_DEFUN(STEPMAKE_BISON, [
118 # ugh, automake: we want (and check for) bison
121 STEPMAKE_PROGS(BISON, bison, $1)
123 # urg. should test functionality rather than version.
124 if test "$BISON" = "bison" -a -n "$2"; then
125 STEPMAKE_CHECK_VERSION(BISON, $1, $2)
130 AC_DEFUN(STEPMAKE_COMPILE, [
131 # -O is necessary to get inlining
133 CXXFLAGS=${CXXFLAGS-$CFLAGS}
134 LDFLAGS=${LDFLAGS-""}
140 AC_ARG_ENABLE(checking,
141 [ --enable-checking set runtime checks (assert calls). Default: on],
142 [checking_b=$enableval] )
144 AC_ARG_ENABLE(debugging,
145 [ --enable-debugging compile with debugging info. Default: on],
146 [debug_b=$enableval])
148 AC_ARG_ENABLE(optimising,
149 [ --enable-optimising compile with optimising. Default: on],
150 [optimise_b=$enableval])
152 AC_ARG_ENABLE(profiling,
153 [ --enable-profiling compile with gprof support. Default: off],
154 [profile_b=$enableval])
157 if test "$checking_b" = no; then
160 DEFINES="$DEFINES -DNDEBUG"
163 if test "$optimise_b" = yes; then
164 OPTIMIZE="-O2 -finline-functions"
168 if test $profile_b = yes; then
170 OPTIMIZE="$OPTIMIZE -pg"
173 if test $debug_b = yes; then
174 OPTIMIZE="$OPTIMIZE -g"
179 STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
183 CFLAGS="$CFLAGS $OPTIMIZE"
184 CPPFLAGS=${CPPFLAGS-""}
186 AC_MSG_CHECKING([for IEEE-conformance compiler flags])
187 save_cflags="$CFLAGS"
190 dnl should do compile test?
191 AC_MSG_RESULT(-mieee)
192 CFLAGS="-mieee $CFLAGS"
195 AC_MSG_RESULT([none])
198 AC_SUBST(cross_compiling)
205 AC_SUBST(EXTRA_LIBES)
208 AC_DEFUN(STEPMAKE_CXX, [
211 STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
213 CPPFLAGS="$CPPFLAGS $DEFINES"
214 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
215 LDFLAGS="$LDFLAGS $EXTRA_LIBES"
224 AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
225 AC_CACHE_CHECK([whether explicit instantiation is needed],
226 lily_cv_need_explicit_instantiation,
227 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
228 template <class T> struct foo { static int baz; };
229 template <class T> int foo<T>::baz = 1;
230 ]], [[ return foo<int>::baz; ]])],[lily_cv_need_explicit_instantiation=no],[lily_cv_need_explicit_instantiation=yes]))
231 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
232 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
237 AC_DEFUN(STEPMAKE_DATADIR, [
238 if test "$datadir" = "\${prefix}/share"; then
239 datadir='${prefix}/share'
242 if test "$prefix" = "NONE"; then
243 presome=${ac_default_prefix}
246 build_package_datadir=$ugh_ugh_autoconf250_builddir/share/$package
248 DATADIR=`echo ${datadir} | sed "s!\\\${prefix}!$presome!"`
249 BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
252 AC_SUBST(build_package_datadir)
253 AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
254 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
257 ## ugh: cut & paste programming from datadir.
258 AC_DEFUN(STEPMAKE_LIBDIR, [
260 if test "$libdir" = "\${exec_prefix}/lib"; then
261 libdir='${exec_prefix}/lib'
264 build_package_libdir=$ugh_ugh_autoconf250_builddir/lib/$package
266 LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
267 BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
270 AC_SUBST(build_package_libdir)
271 AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
272 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
276 AC_DEFUN(STEPMAKE_END, [
280 AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
284 if test -n "$OPTIONAL"; then
286 echo "WARNING: Please consider installing optional programs: $OPTIONAL"
289 if test -n "$REQUIRED"; then
291 echo "ERROR: Please install required programs: $REQUIRED"
294 if test -n "$OPTIONAL$REQUIRED"; then
296 echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
297 echo "Remove config.cache before rerunning ./configure"
300 if test -n "$REQUIRED"; then
301 rm -f $srcdir/GNUmakefile
305 # regular in-place build
306 # test for srcdir_build = yes ?
307 if test "$srcdir_build" = "yes"; then
308 rm -f $srcdir/GNUmakefile
309 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
310 chmod 444 $srcdir/GNUmakefile
311 else # --srcdir build
313 cp $srcdir/make/srcdir.make.in GNUmakefile
314 chmod 444 GNUmakefile
319 AC_DEFUN(STEPMAKE_FLEX, [
320 # ugh, automake: we want (and check for) flex
322 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
326 ac_cv_prog_lex_root=lex.yy
327 STEPMAKE_PROGS(FLEX, flex, $1)
331 AC_DEFUN(STEPMAKE_FLEXLEXER, [
332 AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
333 if test $? -ne 0; then
334 warn='FlexLexer.h (flex package)'
335 STEPMAKE_ADD_ENTRY($1, $warn)
337 # check for yyFlexLexer.yy_current_buffer,
338 # in 2.5.4 <= flex < 2.5.29
340 AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer],
341 [stepmake_flexlexer_yy_current_buffer],
342 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
344 #include <FlexLexer.h>
345 class yy_flex_lexer: public yyFlexLexer
350 yy_current_buffer = 0;
354 [stepmake_flexlexer_yy_current_buffer=yes],
355 [stepmake_flexlexer_yy_current_buffer=no]))
356 if test $stepmake_flexlexer_yy_current_buffer = yes; then
357 AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.])
363 AC_DEFUN(STEPMAKE_GCC, [
364 if test "$GCC" = "yes"; then
365 STEPMAKE_CHECK_VERSION(CC, $1, $2)
367 warn="$CC (Please install *GNU* cc)"
368 STEPMAKE_ADD_ENTRY($1, $warn)
373 AC_DEFUN(STEPMAKE_GETTEXT, [
375 if test "$prefix" = "NONE"; then
376 presome=${ac_default_prefix}
378 LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
381 AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
382 AC_CHECK_LIB(intl, gettext)
383 AC_CHECK_FUNCS(gettext)
387 AC_DEFUN(STEPMAKE_GUILE, [
388 STEPMAKE_PATH_PROG(GUILE, guile, $1)
392 # STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
394 # This macro runs the guile-config script, installed with Guile,
395 # to find out where Guile's header files and libraries are
396 # installed. It sets two variables, marked for substitution, as
399 # GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
400 # code that uses Guile header files. This is almost
401 # always just a -I flag.
403 # GUILE_LDFLAGS --- flags to pass to the linker to link a
404 # program against Guile. This includes -lguile for
405 # the Guile library itself, any libraries that Guile
406 # itself requires (like -lqthreads), and so on. It may
407 # also include a -L flag to tell the compiler where to
408 # find the libraries.
410 AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
411 exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
412 if test -x $exe; then
413 AC_MSG_CHECKING([guile compile flags])
414 GUILE_CFLAGS="`$guile_config compile`"
415 AC_MSG_RESULT($GUILE_CFLAGS)
416 AC_MSG_CHECKING([guile link flags])
417 GUILE_LDFLAGS="`$guile_config link`"
418 AC_MSG_RESULT($GUILE_LDFLAGS)
420 AC_SUBST(GUILE_CFLAGS)
421 AC_SUBST(GUILE_LDFLAGS)
425 AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
426 ## First, let's just see if we can find Guile at all.
427 AC_MSG_CHECKING([for guile-config])
428 for guile_config in $GUILE_CONFIG guile-config $target-guile-config $build-guile-config; do
429 AC_MSG_RESULT([$guile_config])
430 if ! $guile_config --version > /dev/null 2>&1 ; then
431 AC_MSG_WARN([cannot execute $guile_config])
432 AC_MSG_CHECKING([if we are cross compiling])
433 GUILE_CONFIG='echo no guile-config'
435 GUILE_CONFIG=$guile_config
439 STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
440 if test $? -ne 0; then
441 STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)')
444 STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
445 # urg. should test functionality rather than version.
446 if test $? -eq 0 -a -n "$2"; then
447 STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
450 AC_SUBST(GUILE_CONFIG)
453 changequote(<<, >>)dnl
454 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
455 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
456 GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
459 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
460 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
461 AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
465 AC_DEFUN(STEPMAKE_GXX, [
466 if test "$GXX" = "yes"; then
467 STEPMAKE_CHECK_VERSION(CXX, $1, $2)
469 warn="$CXX (Please install *GNU* c++)"
470 STEPMAKE_ADD_ENTRY($1, $warn)
475 AC_DEFUN(STEPMAKE_INIT, [
479 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
480 if test x$MY_PATCH_LEVEL != x; then
481 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
484 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
485 changequote(<<, >>)dnl
486 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
487 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
490 # No versioning on directory names of sub-packages
492 stepmake=${datadir}/stepmake
494 if test "$prefix" = "NONE"; then
495 presome=${ac_default_prefix}
497 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
499 # urg, how is this supposed to work?
500 if test "$program_prefix" = "NONE"; then
503 if test "$program_suffix" = "NONE"; then
507 AC_MSG_CHECKING(Package)
508 if test "$PACKAGE" = "STEPMAKE"; then
509 AC_MSG_RESULT(Stepmake package!)
511 AC_MSG_CHECKING(builddir)
513 ugh_ugh_autoconf250_builddir="`pwd`"
515 if test "$srcdir" = "."; then
519 package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
520 package_srcdir="`dirname $srcdir`"
522 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
524 (cd stepmake 2>/dev/null || mkdir stepmake)
525 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
526 # only possible with autoconf < 2.50 -- hardcoded in configure.in
527 # AC_CONFIG_AUX_DIR(bin)
530 AC_MSG_RESULT($PACKAGE)
532 AC_MSG_CHECKING(builddir)
533 ugh_ugh_autoconf250_builddir="`pwd`"
534 if test "$srcdir" = "."; then
539 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
541 AC_MSG_CHECKING(for stepmake)
542 # Check for installed stepmake
543 if test -d $stepmake; then
544 AC_MSG_RESULT($stepmake)
546 stepmake="`cd $srcdir/stepmake; pwd`"
547 AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
550 # only possible with autoconf < 2.50 -- hardcoded in configure.in
551 # AC_CONFIG_AUX_DIR(\
553 # $srcdir/stepmake/bin\
557 AC_SUBST(ugh_ugh_autoconf250_builddir)
561 AC_SUBST(PACKAGE_NAME)
562 # We don't need the upper case variant,
563 # so stick to macros are uppercase convention.
564 # AC_DEFINE_UNQUOTED(package, ["${package}"])
565 # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
566 AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
567 AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
568 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
570 if test -z "$package_depth"; then
573 package_depth="../$package_depth"
576 AC_SUBST(package_depth)
578 AUTOGENERATE="This file was automatically generated by configure"
579 AC_SUBST(AUTOGENERATE)
582 AC_ARG_ENABLE(config,
583 [ --enable-config=CONF put settings in config-CONF.make and config-CONF.h;
584 do \`make conf=CONF' to get output in ./out-CONF],
585 [CONFIGURATION=$enableval])
589 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
590 CONFIGFILE=config$CONFIGSUFFIX
591 AC_SUBST(CONFIGSUFFIX)
594 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
595 STEPMAKE_PROGS(FIND, find, REQUIRED)
597 STEPMAKE_PROGS(TAR, tar, REQUIRED)
599 if test "$(echo 2)" != "2" ||
600 test "x`uname`" = "xHP-UX"; then
601 AC_PATH_PROG(KSH, ksh, /bin/ksh)
602 AC_PATH_PROG(BASH, bash, $KSH)
603 STEPMAKE_WARN(avoiding buggy /bin/sh)
604 AC_PATH_PROG(SHELL, bash, $KSH)
607 AC_PATH_PROG(BASH, bash, $SHELL)
611 STEPMAKE_PATH_PROG(PYTHON, python, REQUIRED)
613 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
614 $MAKE -v 2> /dev/null | grep GNU > /dev/null
615 if test "$?" = 1; then
616 warn='make (Please install *GNU* make)'
617 # STEPMAKE_WARN($warn)
618 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
622 if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then
623 LN=cp # hard link does not work under cygnus-nt
624 LN_S='cp -r' # symbolic link does not work for native nt
630 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
638 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
640 AC_SUBST(program_prefix)
641 AC_SUBST(program_suffix)
646 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
647 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
657 AC_DEFUN(STEPMAKE_KPATHSEA, [
659 AC_ARG_WITH(kpathsea-include,
660 [ --with-kpathsea-include=DIR
661 location of the kpathsea include dir],[
662 if test "$withval" = "yes" -o "$withval" = "no"; then
663 AC_MSG_WARN(Usage: --with-kpathsea-include=includedir)
665 CPPFLAGS="$CPPFLAGS -I${withval}"
669 AC_ARG_WITH(kpathsea-lib,
670 [ --with-kpathsea-lib=DIR location of the kpathsea lib dir],[
671 if test "$withval" = "yes" -o "$withval" = "no"; then
672 AC_MSG_WARN(Usage: --with-kpathsea-lib=libdir)
674 LDFLAGS="$LDFLAGS -L${withval}"
679 #FIXME --with-xxx is meant for specifying a PATH too,
680 # so this should read: --enable-kpathsea,
681 # or --with-kpathsea-include=PATH --with-kpathsea-lib=PATH
682 AC_ARG_WITH(kpathsea,
683 [ --with-kpathsea use kpathsea lib. Default: on],
684 [kpathsea_b=$with_kpathsea])
686 if test "$kpathsea_b" != "no"; then
687 AC_CHECK_HEADERS([kpathsea/kpathsea.h])
688 AC_CHECK_LIB(kpathsea, kpse_find_file)
689 AC_CHECK_FUNCS(kpse_find_file,,kpathsea_b=no)
690 if test "$kpathsea_b" = "no"; then
691 warn='kpathsea (libkpathsea-dev or kpathsea-devel package)
692 Else, please specify the location of your kpathsea using
693 --with-kpathsea-include and --with-kpathsea-lib options. You should
694 install kpathsea; see INSTALL.txt. Rerun ./configure
695 --without-kpathsea only if kpathsea is not available for your
697 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
700 AC_MSG_CHECKING(whether to use kpathsea)
701 if test "$kpathsea_b" != no; then
710 AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA)
714 AC_DEFUN(STEPMAKE_LIB, [
715 STEPMAKE_PROGS(AR, ar, $1)
717 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
721 AC_DEFUN(STEPMAKE_LIBTOOL, [
723 # **Never** try to set library version numbers so that they correspond
724 # to the release number of your package. This is an abuse that only
725 # fosters misunderstanding of the purpose of library versions.
727 REVISION=$PATCH_LEVEL
728 # CURRENT=$MINOR_VERSION
729 CURRENT=`expr $MINOR_VERSION + 1`
730 # AGE=`expr $MAJOR_VERSION + 1`
738 AC_DEFUN(STEPMAKE_LOCALE, [
743 AC_ARG_WITH(localedir,
744 [ --with-localedir=LOCALE use LOCALE as locale dir. Default:
745 PREFIX/share/locale ],
746 localedir=$with_localedir,
747 localedir='${prefix}/share/locale')
750 [ --with-lang=LANG use LANG as language to emit messages],
754 AC_MSG_CHECKING(language)
756 En* | en* | Am* | am* | US* | us*)
758 NL | nl | Du* | du* | Ned* | ned*)
767 if test "$lang" = "unknown" ; then
768 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
774 AC_DEFUN(STEPMAKE_MAKEINFO, [
775 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
776 if test "$MAKEINFO" = "makeinfo"; then
777 AC_MSG_CHECKING(whether makeinfo can split html by @node)
779 makeinfo --html --output=out/split <<EOF
781 \input texinfo @c -*-texinfo-*-
782 @setfilename split.info
786 if test -d out/split; then
787 SPLITTING_MAKEINFO=yes
792 STEPMAKE_WARN(your html documentation will be one large file)
796 AC_SUBST(SPLITTING_MAKEINFO)
801 AC_DEFUN(STEPMAKE_MAN, [
802 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
804 STEPMAKE_PROGS(TROFF, troff, $1)
806 STEPMAKE_PROGS(TBL, tbl, $1)
811 AC_DEFUN(STEPMAKE_MSGFMT, [
812 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
816 # Check for program ($2), set full path result to ($1).
817 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
818 AC_DEFUN(STEPMAKE_PATH_PROG, [
819 AC_CHECK_PROGS($1, $2, no)
820 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
821 if test $? -eq 0; then
823 if test -n "$4"; then
824 STEPMAKE_CHECK_VERSION($1, $3, $4)
830 # Check for program in set of names ($2), set result to ($1) .
831 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
832 # If exists, and a minimal version ($4) is required
833 AC_DEFUN(STEPMAKE_PROGS, [
834 AC_CHECK_PROGS($1, $2, no)
835 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
836 if test $? -eq 0 -a -n "$4"; then
837 STEPMAKE_CHECK_VERSION($1, $3, $4)
842 AC_DEFUN(STEPMAKE_PERL, [
843 STEPMAKE_PATH_PROG(PERL, perl, $1)
847 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
848 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])
849 if test -z "$PYTHON_HEADER"; then
850 warn='python.h (python-devel, python-dev or libpython-dev package)'
851 STEPMAKE_ADD_ENTRY($1, $warn)
856 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
857 AC_ARG_ENABLE(tfm-path,
858 [ --enable-tfm-path=PATH set path of tex directories where tfm files live,
859 esp.: cmr10.tfm. Default: use kpsewhich],
860 [tfm_path=$enableval],
864 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, OPTIONAL)
865 AC_MSG_CHECKING(for tfm path)
869 if test "x$tfm_path" = xauto ; then
870 if test "x$KPSEWHICH" != "xno" ; then
871 for i in $TFM_FONTS; do
872 dir=`$KPSEWHICH tfm ${i}10.tfm`
873 TFM_PATH="$TFM_PATH `dirname $dir`"
876 STEPMAKE_WARN(Please specify where cmr10.tfm lives:
877 ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
883 TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
884 AC_MSG_RESULT($TFM_PATH)
889 AC_DEFUN(STEPMAKE_TEXMF, [
890 # urg, never know what names these teTeX guys will think up
892 STEPMAKE_PROGS(METAFONT, mf mfont, $1)
893 STEPMAKE_PROGS(INIMETAFONT, inimf inimfont, $1)
895 AC_MSG_CHECKING(for working metafont mode)
896 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
897 for MFMODE in $modelist; do
898 $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
899 if test -f mfput.tfm; then
903 AC_MSG_RESULT($MFMODE)
911 AC_DEFUN(STEPMAKE_WARN, [