From 2eb22fd223cd56a2dd90eda1499dadbcbfa5fad5 Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Tue, 21 Apr 2015 20:11:40 +0100 Subject: [PATCH] Set CFLAGS and LDFLAGS to build python modules Issue 4347 Set CFLAGS and LDFLAGS to build python modules cygwin and mingw need LDFLAGS for building python modules --- aclocal.m4 | 2 ++ config.make.in | 2 ++ python/GNUmakefile | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 74cf3bcb2c..7ed3151246 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1128,6 +1128,8 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ warn="Python.h (python-devel, python-dev or libpython-dev package)" STEPMAKE_ADD_ENTRY($1, $warn) fi + AC_SUBST(PYTHON_CFLAGS) + AC_SUBST(PYTHON_LDFLAGS) ]) diff --git a/config.make.in b/config.make.in index ee7aaf8277..d5bf2b87b8 100644 --- a/config.make.in +++ b/config.make.in @@ -14,6 +14,7 @@ package-depth = @package_depth@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ GUILE_CFLAGS = @GUILE_CFLAGS@ PANGO_FT2_CFLAGS = @PANGO_FT2_CFLAGS@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ CONFIG_CPPFLAGS = @CPPFLAGS@ CONFIG_DEFINES = @DEFINES@ @@ -25,6 +26,7 @@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GUILE_LIBS = @GUILE_LDFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ PANGO_FT2_LIBS = @PANGO_FT2_LIBS@ +PYTHON_LIBS = @PYTHON_LDFLAGS@ CXXABI_LIBS = @CXXABI_LIBS@ CONFIG_LIBS = @LIBS@ @EXTRA_LIBS@ $(GUILE_LIBS) $(PANGO_FT2_LIBS) $(FONTCONFIG_LIBS) $(FREETYPE2_LIBS) diff --git a/python/GNUmakefile b/python/GNUmakefile index 87fa766089..19af006386 100644 --- a/python/GNUmakefile +++ b/python/GNUmakefile @@ -6,7 +6,8 @@ STEPMAKE_TEMPLATES=c python-module install-out po include $(depth)/make/stepmake.make -CFLAGS += -DPy_BUILD_CORE -Wall +CFLAGS += -DPy_BUILD_CORE -Wall $(PYTHON_CFLAGS) +LDFLAGS += $(PYTHON_LIBS) # unset al guile stuff from configure CONFIG_LDFLAGS= -- 2.39.2