]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/aclocal.m4
Configure: clean up flags from `python-config --cflags'.
[lilypond.git] / stepmake / aclocal.m4
index cdb6dc3cfb138758414390a38a94380337e7a99a..e4a4cb65b29a19d43f20fb9e740f80994d069fa8 100644 (file)
@@ -989,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