X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Faclocal.m4;h=e4a4cb65b29a19d43f20fb9e740f80994d069fa8;hb=d7017035d83599b886ebe35b52bd74bc7f838797;hp=27dfb0b511786545fbac52cf8655f89f56b79b1b;hpb=c39943f60cffe2084c2f571fa838f0e34f89419b;p=lilypond.git diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 27dfb0b511..e4a4cb65b2 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -32,9 +32,13 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [ ## for compatibility reasons. ## grab the first version number in --version output. - eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '\(^\| \)[0-9][0-9]*\.[0-9]' \ - | head -n 1 \ - | tr ' ' '\n' | sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' | grep '\(^\| \)[0-9][0-9]*\.[0-9]' | head -n 1\`\" + eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | + grep -E '(^| )[0-9][0-9]*\.[0-9]' | + head -n 1 | + tr ' ' '\n' | + sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' | + grep -E '(^| )[0-9][0-9]*\.[0-9]' | + head -n 1\`\" if test -z "$_ver"; then ## If empty, try date [fontforge] @@ -163,8 +167,7 @@ AC_DEFUN(STEPMAKE_BISON, [ fi ]) - -AC_DEFUN(STEPMAKE_COMPILE, [ +AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [ # -O is necessary to get inlining CFLAGS=${CFLAGS-""} CXXFLAGS=${CXXFLAGS-$CFLAGS} @@ -204,8 +207,13 @@ AC_DEFUN(STEPMAKE_COMPILE, [ if test $debug_b = yes; then OPTIMIZE="$OPTIMIZE -g" fi - - AC_PROG_CC +]) + +AC_DEFUN(STEPMAKE_COMPILE, [ + + AC_REQUIRE([STEPMAKE_COMPILE_BEFORE]) + AC_REQUIRE([AC_PROG_CC]) + STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1) LD='$(CC)' AC_SUBST(LD) @@ -401,6 +409,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 @@ -980,7 +989,8 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then # Clean out junk: http://bugs.python.org/issue3290 # Python headers may need some -f* flags, leave them in. - PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/ -\(W\|D\|O\|m\)\(\w\|-\|=\|,\)\+//g'` + # 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_LDFLAGS=`$PYTHON_CONFIG --ldflags` fi