BIND 10 trac2661, updated. dd447189c8e307c305415a34894c48972cea5a2c [2661] protect the output of 'python-config | sed' with [], with more comments.
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Feb 8 16:22:44 UTC 2013
The branch, trac2661 has been updated
via dd447189c8e307c305415a34894c48972cea5a2c (commit)
from 1ec905f87eaebf01ae956b1ec5ac05afbfae9836 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dd447189c8e307c305415a34894c48972cea5a2c
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Feb 8 08:21:01 2013 -0800
[2661] protect the output of 'python-config | sed' with [], with more comments.
without [] the output it seems possible that the output is empty for some
environments. also clarified that we can ignore the cases where -L isn't
contained at all.
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index fad1e20..df0fd69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -298,12 +298,16 @@ AC_SUBST(COMMON_PYTHON_PATH)
if test -x ${PYTHON}-config; then
PYTHON_INCLUDES=`${PYTHON}-config --includes`
- # make a copy of python-config --ldflags, removing any spaces and tabs
+ # Add any '-L..." flags to PYTHON_LDFLAGS. We first 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'`
+ # insert a space, which would confuse the code below).
+ # Notes: if -L isn't contained at all we can simply skip this process,
+ # so we only go through the flag if it's contained; also, protecting
+ # the output with [] seems necessary for environment to avoid getting
+ # an empty output accidentally.
+ 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
PYTHON_LDFLAGS="$PYTHON_LDFLAGS ${flag}"
More information about the bind10-changes
mailing list