]> git.donarmstrong.com Git - lilypond.git/commitdiff
Configure: clean up flags from `python-config --cflags'.
authorKeaton Mowery <kmowery@gmail.com>
Fri, 22 Jan 2010 01:19:21 +0000 (17:19 -0800)
committerPatrick McCarty <pnorcks@gmail.com>
Fri, 22 Jan 2010 01:36:47 +0000 (17:36 -0800)
The sed command used to strip the unnecessary flags from the command
`python-config --cflags' was not working.

This commit (slightly amended from the original) fixes the issue.

Signed-off-by: Patrick McCarty <pnorcks@gmail.com>
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