[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] autoconf: improve python-dev checking
# HG changeset patch # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> # Date 1330008154 -3600 # Node ID 5b9591013560903e04c1e294819857748ff75f01 # Parent 1b68427875f7ffe3025ea13c7f6e8cf71ce54769 autoconf: improve python-dev checking Avoid printing a warning if a ldflag different than -L* or -l* is found, and temporary append all ldflags returned from python-config to LDFLAGS to perform the python tests. Also use --cflags instead of --includes, and append all returned options to CPPFLAGS temporary to perform the python tests. In case anyone is curious, we are using CPPFLAGS instead of CFLAGS because the AC_CHECK_HEADER preprocessor check ignores CFLAGS. Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> diff -r 1b68427875f7 -r 5b9591013560 tools/configure --- a/tools/configure Thu Mar 15 15:20:37 2012 +0000 +++ b/tools/configure Thu Feb 23 15:42:34 2012 +0100 @@ -6144,23 +6144,16 @@ else fi ac_previous_cppflags=$CPPFLAGS -CPPFLAGS="$CFLAGS `$PYTHON-config --includes`" +CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`" ac_previous_ldflags=$LDFLAGS for flag in `$PYTHON-config --ldflags` do case $flag in - -L*) - LDFLAGS="$LDLFAGS $flag" - ;; -lpython*) python_lib=`echo $flag | sed 's/^-l//'` ;; - -l*) - # Ignore other libraries, we are only interested in testing python-dev - ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strange ldflag found in $PYTHON-config output: $flag" >&5 -$as_echo "$as_me: WARNING: Strange ldflag found in $PYTHON-config output: $flag" >&2;} + LDFLAGS="$LDLFAGS $flag" ;; esac done diff -r 1b68427875f7 -r 5b9591013560 tools/m4/python_devel.m4 --- a/tools/m4/python_devel.m4 Thu Mar 15 15:20:37 2012 +0000 +++ b/tools/m4/python_devel.m4 Thu Feb 23 15:42:34 2012 +0100 @@ -1,21 +1,15 @@ AC_DEFUN([AX_CHECK_PYTHON_DEVEL], [ ac_previous_cppflags=$CPPFLAGS -CPPFLAGS="$CFLAGS `$PYTHON-config --includes`" +CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`" ac_previous_ldflags=$LDFLAGS for flag in `$PYTHON-config --ldflags` do case $flag in - -L*) - LDFLAGS="$LDLFAGS $flag" - ;; -lpython*) python_lib=`echo $flag | sed 's/^-l//'` ;; - -l*) - # Ignore other libraries, we are only interested in testing python-dev - ;; *) - AC_MSG_WARN([Strange ldflag found in $PYTHON-config output: $flag]) + LDFLAGS="$LDLFAGS $flag" ;; esac done _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |