]> git.donarmstrong.com Git - lilypond.git/blobdiff - configure.in
(LY_DEFINE): store name before destroying face.
[lilypond.git] / configure.in
index 34d9437082a41783bf2169d28f629656b434a2ae..a4910f113011e8454a631feb56679b75cb2239e0 100644 (file)
@@ -35,10 +35,10 @@ AC_ARG_ENABLE(gui,
 
 
 NCSB_DIR=unknown
-AC_ARG_ENABLE(ncsb,
-[  --enable-ncsb-dir      set the path where Century Schoolbook fonts can be found.
+AC_ARG_WITH(ncsb-dir,
+[  --with-ncsb-dir=DIR     location of Century Schoolbook fonts
                             Default: detect with locate(1)],
-    [NCSB_DIR=$enableval])
+    [NCSB_DIR=$withval])
 
 
 reloc_b=no
@@ -49,7 +49,7 @@ AC_ARG_ENABLE(relocation,
 FRAMEWORKDIR=".."
 AC_ARG_WITH(framework-dir,
     [  --with-framework-dir=DIR
-       relative the optional framework directory],[
+                          relative location of framework],[
        if test "$withval" = "yes" -o "$withval" = "no"; then
            AC_MSG_WARN(Usage: --with-framework-dir=../lib/FRAMEWORK/DIR)
        else
@@ -119,14 +119,18 @@ fi
 
 AC_MSG_CHECKING([New Century Schoolbook PFB files])
 if test "$NCSB_DIR" = "unknown"; then
-  which locate >& /dev/null
+  # use `type' command rather than external program `which'
+  type locate >& /dev/null
   if test "$?" = "0"; then
-      ## sort to give precedence to /usr/  
-      NCSB_DIR=`locate c059033l.pfb | sort -r | head -1`
-      if test "$NCSB_DIR" = "";  then
+      for d in `locate c059033l.pfb `; do
+         if test -f `dirname "$d"`/c059033l.afm ; then
+             NCSB_DIR=`dirname "$d"`
+             break 
+         fi
+      done
+      if test "$NCSB_DIR" = "unknown";  then
          AC_MSG_WARN(Could not find c059033l.pfb. Use --enable-ncsb-path to set path)
       fi
-      NCSB_DIR=`dirname "$NCSB_DIR"`
   else
      AC_MSG_WARN(Could not find locate(1). Use --enable-ncsb-path to set path to c059033l.pfb)
   fi