From 1dfbb145818a4bd6cfdad8130183c1553232e37b Mon Sep 17 00:00:00 2001 From: Keaton Mowery Date: Thu, 21 Jan 2010 17:19:21 -0800 Subject: [PATCH] Configure: clean up flags from `python-config --cflags'. 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 --- stepmake/aclocal.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index cdb6dc3cfb..e4a4cb65b2 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -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 -- 2.39.5