]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/aclocal.m4
Fix build with Autoconf 2.64
[lilypond.git] / stepmake / aclocal.m4
index a3ecf3f9a472223e619447d75fefa4fb23d5eff8..3786968be37961ffde0fdf15a9a6aa21b4dd50ab 100644 (file)
@@ -205,7 +205,6 @@ AC_DEFUN(STEPMAKE_COMPILE, [
        OPTIMIZE="$OPTIMIZE -g"
     fi
  
-    AC_PROG_CC
     STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
     LD='$(CC)'
     AC_SUBST(LD)
@@ -317,7 +316,31 @@ AC_DEFUN(STEPMAKE_LIBDIR, [
 ])
 
 
+AC_DEFUN(STEPMAKE_PREFIX_EXPAND_FIXUP, [
+    # undo expanding of explicit --infodir=/usr/share
+    # to ease install-time override with prefix=...
+    strip=`echo $includedir | eval sed s@^$prefix@@`
+    if test "$includedir" = "`eval echo $prefix$strip`"; then
+           includedir='${prefix}'$strip''
+    fi
+    strip=`echo $libdir | eval sed s@^$exec_prefix@@`
+    if test "$libdir" = "`eval echo $exec_prefix$strip`"; then
+           libdir='${exec_prefix}'$strip''
+    fi
+    strip=`echo $infodir | eval sed s@^$datarootdir@@`
+    if test "$infodir" = "`eval echo $datarootdir$strip`"; then
+           infodir='${datarootdir}'$strip''
+    fi
+    strip=`echo $mandir | eval sed s@^$datarootdir@@`
+    if test "$mandir" = "`eval echo $datarootdir$strip`"; then
+           mandir='${datarootdir}'$strip''
+    fi
+])
+
+
 AC_DEFUN(STEPMAKE_END, [
+    STEPMAKE_PREFIX_EXPAND_FIXUP
+
     AC_SUBST(OPTIONAL)
     AC_SUBST(REQUIRED)
     
@@ -377,6 +400,7 @@ EOF
 print 'depth=' + ('../' * ( $d-1 ) )
 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
 print 'include \$(configure-srcdir)/$mf'
+print 'MODULE_INCLUDES += \$(src-dir)/\$(outbase)'
 EOF
            done
            for mf in `cd $srcdir ; find -maxdepth $d -mindepth $d -name '*.make' | grep -v config.make `; do