]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/aclocal.m4
release: 1.2.7
[lilypond.git] / stepmake / aclocal.m4
index 1ae2d849de1b2d028950894e8284bc0894565797..03d82fc7c73e9187be393b5152c90a77f3eade37 100644 (file)
@@ -146,7 +146,7 @@ AC_DEFUN(AC_STEPMAKE_GXX, [
     # ugh autoconf
     # urg, egcs: how to check for egcs >= 1.1?
     changequote(<<, >>)dnl
-    if $CXX --version | grep '2\.8' > /dev/null ||
+    if $CXX --version | egrep '2\.[89]' > /dev/null ||
        $CXX --version | grep 'egcs' > /dev/null
     changequote([, ])dnl
     then
@@ -157,19 +157,9 @@ AC_DEFUN(AC_STEPMAKE_GXX, [
 ])
 
 AC_DEFUN(AC_STEPMAKE_GUILE, [
-    # on some systems, -lguile succeeds for guile-1.3
-    # others need readline, dl (or even more)
-    # urg, must check for different functions in libguile
-    # to force new check iso reading from cache
-
-    # gh_scm2doubles,gh_doubles2scm are new in 1.3
     GUILE_FLAGS
-    AC_CHECK_LIB(guile, gh_scm2doubles,
-      [LIBS="`echo $GUILE_LDFLAGS | sed -e 's/-L[[/-_a-zA-Z0-9]]\+ //g'` $LIBS"
-      AC_DEFINE(HAVE_LIBGUILE)], , $GUILE_LDFLAGS dnl
-    )
-    if test "$ac_cv_lib_guile_gh_scm2doubles" != yes ; then
-       AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
+    if guile-config --version 2>&1 | grep -q 'version 1\.[012]'; then
+       AC_STEPMAKE_WARN(Guile version 1.3 or better needed)
     fi
 ])
 
@@ -277,14 +267,15 @@ dnl    fi
     AC_CHECK_PROGS(TAR, tar, error)
 
     if test "x`uname`" = "xHP-UX"; then
+       AC_PATH_PROG(BASH, bash, /bin/sh)
        AC_STEPMAKE_WARN(avoiding buggy /bin/sh)
-       AC_CHECK_PROGS(SHELL, bash, /bin/ksh)
+       AC_PATH_PROG(SHELL, bash, /bin/ksh)
     else
+       AC_PATH_PROG(BASH, bash, /bin/sh)
        SHELL=/bin/sh
        AC_SUBST(SHELL)
     fi
 
-    AC_CHECK_PROGS(BASH, bash, /bin/sh)
 
     AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
     AC_SUBST(PYTHON)
@@ -517,11 +508,11 @@ AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
     [TFMDIR=$enableval],
     [TFMDIR=auto] )
 
-    AC_MSG_CHECKING(TeX TFM directory)
+    AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no)
+    AC_MSG_CHECKING(for TeX TFM directory)
     if test "x$TFMDIR" = xauto ; then
        if test "x$TEX_TFMDIR" = "x" ; then
-           if kpsewhich --version > /dev/null 2>&1 ; then
-               TEX_TFMDIR=`kpsewhich tfm cmr10.tfm`
+           if test "x$KPSEWHICH" != "xno" ; then
                CMR10=`kpsewhich tfm cmr10.tfm`
                TEX_TFMDIR=`dirname $CMR10`
            else
@@ -546,6 +537,7 @@ AC_DEFUN(AC_STEPMAKE_TEXMF, [
     AC_CHECK_PROGS(METAPOST, mp, no)
     if test "x$METAPOST" = "xno"; then
        AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
+
        METAPOST=$MPOST
     fi
 
@@ -561,8 +553,20 @@ AC_DEFUN(AC_STEPMAKE_TEXMF, [
        INIMETAPOST=$INIMPOST
     fi
 
+    AC_MSG_CHECKING(for working metafont mode)
+    modelist='ljfour lj4 lj3 lj2 ljet laserjet'
+    for MFMODE in $modelist; do
+       $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
+       if test -f mfput.tfm; then
+           break;
+       fi
+    done
+    rm -f mfput.*
+    AC_MSG_RESULT($MFMODE)
+
     AC_SUBST(METAFONT)
     AC_SUBST(METAPOST)
+    AC_SUBST(MFMODE)
     AC_SUBST(INIMETAFONT)
     AC_SUBST(INIMETAPOST)
 ])
@@ -1064,37 +1068,3 @@ main ()
   AC_SUBST(GTK___CFLAGS)
   AC_SUBST(GTK___LIBS)
 ])
-
-dnl   GUILE_FLAGS --- set flags for compiling and linking with Guile
-dnl
-dnl   This macro runs the `guile-config' script, installed with Guile,
-dnl   to find out where Guile's header files and libraries are
-dnl   installed.  It sets two variables, marked for substitution, as
-dnl   by AC_SUBST.
-dnl   
-dnl     GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
-dnl             code that uses Guile header files.  This is almost
-dnl             always just a -I flag.
-dnl   
-dnl     GUILE_LDFLAGS --- flags to pass to the linker to link a
-dnl             program against Guile.  This includes `-lguile' for
-dnl             the Guile library itself, any libraries that Guile
-dnl             itself requires (like -lqthreads), and so on.  It may
-dnl             also include a -L flag to tell the compiler where to
-dnl             find the libraries.
-
-AC_DEFUN([GUILE_FLAGS],[
-## The GUILE_FLAGS macro.
-  ## First, let's just see if we can find Guile at all.
-  AC_MSG_CHECKING(for Guile)
-  guile-config link > /dev/null || {
-    echo "configure: cannot find guile-config; is Guile installed?" 1>&2
-    exit 1
-  }
-  GUILE_CFLAGS="`guile-config compile`"
-  GUILE_LDFLAGS="`guile-config link`"
-  AC_SUBST(GUILE_CFLAGS)
-  AC_SUBST(GUILE_LDFLAGS)
-  AC_MSG_RESULT(yes)
-])
-