From cdfd62ae886a265006b10c178545104f8cafbefa Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 6 Nov 2008 13:51:24 +0100 Subject: [PATCH] Always use python-config first if available. Fixes native GUB-3 builds. --- stepmake/aclocal.m4 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index b113c80856..e556dae0e1 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -1029,7 +1029,14 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ fi ]) - if test "$cross_compiling" = "no" -a -z "$PYTHON_CFLAGS"; then + AC_CHECK_PROGS(PYTHON_CONFIG, python-config, no) + + if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then + PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags` + PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags` + fi + + if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then changequote(<<, >>)#dnl # alternatively, for python >= 2.0 # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())' @@ -1038,11 +1045,6 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ changequote([, ])#dnl fi - if test "$cross_compiling" = "yes" -a -z "$PYTHON_CFLAGS"; then - PYTHON_CFLAGS=`python-config --cflags` - PYTHON_LDFLAGS=`python-config --ldflags` - fi - if test -z "$PYTHON_HEADER"; then CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS" AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes]) -- 2.39.2