]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/aclocal.m4
Make distributed tarball from Git file list
[lilypond.git] / stepmake / aclocal.m4
index 8045c3ef0a4f3bb3b4b254deaadfba543a16a016..682b6b1bd15e22504106c520493900346a541f34 100644 (file)
@@ -287,12 +287,16 @@ AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
 ])
 
 AC_DEFUN(STEPMAKE_GXXCODEGENBUG, [
-    AC_MSG_CHECKING([options for known g++ tail call bug])
+    AC_MSG_CHECKING([options for known g++ bugs])
     case "$GXX:$CXX_VERSION" in
-       yes:400600?)
-           AC_MSG_RESULT([-fno-optimize-sibling-calls])
+       yes:400600[[0-2]])
+           AC_MSG_RESULT([-fno-optimize-sibling-calls (tail call bug)])
            CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
            ;;
+       yes:400700?)
+           AC_MSG_RESULT([-fno-tree-vrp (comparison bug)])
+           CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
+           ;;
        *) AC_MSG_RESULT([none])
     esac
     AC_SUBST(CXXFLAGS)
@@ -417,9 +421,22 @@ EOF
            exit 2
        fi
 
-       for d in 2 3 4 ; do
+       abssrcdir="`cd $srcdir; pwd`"
+       absbuilddir="`pwd`"
+       for d in 2 3 4 5 ; do
            for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name GNUmakefile`; do
-               mkdir -p $(dirname $mf)
+               case "$abssrcdir" in
+                   "$absbuilddir"/*)
+# source is below build directory, always copy
+                       ;;
+                   *)
+                       case "$abssrcdir/${mf#./}" in
+                           "$absbuilddir"/*)
+# find descended into build directory, don't copy
+                               continue
+                       esac
+               esac
+               mkdir -p ${mf%/*}
                cat <<EOF | $PYTHON -  > $mf
 print 'depth=' + ('../' * ( $d-1 ) )
 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
@@ -428,7 +445,18 @@ 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
-               mkdir -p $(dirname $mf)
+               case "$abssrcdir" in
+                   "$absbuilddir"/*)
+# source is below build directory, always copy
+                       ;;
+                   *)
+                       case "$abssrcdir/${mf#./}" in
+                           "$absbuilddir"/*)
+# find descended into build directory, don't copy
+                               continue
+                       esac
+               esac
+               mkdir -p ${mf%/*}
                cat <<EOF | $PYTHON -  > $mf
 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
 print 'include \$(configure-srcdir)/$mf'
@@ -436,12 +464,13 @@ EOF
            done
        done
 
-       
+       rm -f GNUmakefile
        cat <<EOF > GNUmakefile
 depth = .
 include config\$(if \$(conf),-\$(conf),).make
 include \$(configure-srcdir)/GNUmakefile.in
 EOF
+       chmod 444 GNUmakefile
        AC_SUBST(VPATH)
     fi
 ])
@@ -534,7 +563,7 @@ AC_DEFUN(STEPMAKE_GETTEXT, [
 
 
 AC_DEFUN(STEPMAKE_GUILE, [
-    STEPMAKE_PATH_PROG(GUILE, guile, $1)
+    STEPMAKE_PATH_PROG(GUILE, guile guile1, $1)
 ])
 
 
@@ -576,7 +605,7 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
     test -n "$target_alias" && target_guile_config=$target_alias-guile-config
     test -n "$host_alias" && host_guile_config=$host_alias-guile-config
     AC_MSG_CHECKING([for guile-config])
-    for guile_config in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config; do
+    for guile_config in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config guile1-config; do
        AC_MSG_RESULT([$guile_config])
        if ! $guile_config --version > /dev/null 2>&1 ; then
            AC_MSG_WARN([cannot execute $guile_config])
@@ -589,7 +618,7 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
     done
     STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
     if test $? -ne 0; then
-        STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)')
+        STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package) or guile1-config (guile1-devel package)')
     fi 
 
     STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
@@ -927,7 +956,7 @@ AC_DEFUN(STEPMAKE_PATH_PROG, [
     AC_CHECK_PROGS($1, $2, no)
     STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
     if test $? -eq 0; then
-       AC_PATH_PROG($1, $2)
+       AC_PATH_PROGS($1, $2)
        if test -n "$4"; then
            STEPMAKE_CHECK_VERSION($1, $3, $4)
        fi
@@ -1006,7 +1035,11 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
         # Clean out junk: http://bugs.python.org/issue3290
        # Python headers may need some -f* flags, leave them in.
        # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
-       PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
+        #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
+        # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
+        # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
+        # Tentative fix to require a non alphanumeric character before the initial hyphen of the BRE or the hyphen being the first character in the string.
+        PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
        PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
     fi