Parcourir la source

[2661] deal with space after -L in python-config output; it helps some solaris.

JINMEI Tatuya il y a 12 ans
Parent
commit
1ec905f87e
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      configure.ac

+ 5 - 1
configure.ac

@@ -298,7 +298,11 @@ AC_SUBST(COMMON_PYTHON_PATH)
 if test -x ${PYTHON}-config; then
 	PYTHON_INCLUDES=`${PYTHON}-config --includes`
 
-	for flag in `${PYTHON}-config --ldflags`; do
+	# make a copy of python-config --ldflags, removing any spaces and tabs
+	# between "-L" and its argument (some instances of python-config
+	# insert a space, which would confuse the code below)
+	python_config_ldflags=`${PYTHON}-config --ldflags | sed -ne 's/\([ \t]*-L\)[ ]*\([^ \t]*[ \t]*\)/\1\2/pg'`
+	for flag in $python_config_ldflags; do
 		# add any '-L..." flags to PYTHON_LDFLAGS
 		flag=`echo $flag | sed -ne 's/^\(\-L.*\)$/\1/p'`
 		if test "X${flag}" != X; then