summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-12-07 00:42:59 +0000
committerBrett Cannon <bcannon@gmail.com>2004-12-07 00:42:59 +0000
commitb0eb2b440f4d3e35fccf5b32632eade3645d321e (patch)
tree6538f59b959b1f1cf43fb314bf6d159026e26718 /Makefile.pre.in
parenta1fb05cfcf545d01bddd5df9567018203f288a25 (diff)
downloadcpython-b0eb2b440f4d3e35fccf5b32632eade3645d321e.tar.gz
setup.py now uses the library directories specified in LDFLAGS (``-L``
directories) and the include directories specified in CPPFLAGS (``-I`` directories) for compiling the extension modules. This has led to the core being compiled with the values in the shell's CPPFLAGS. It has also removed the need for special casing to use Fink and DarwinPorts under darwin since the needed directories can now be specified in LDFLAGS and CPPFLAGS (e.g., DarwinPorts users can now do ``LDFLAGS=-L/opt/local/lib; CPPFLAGS=-I/opt/local/include; ./configure`` for everything to work properly). Parsing the values in the environment variables is done with getopt. While optparse would have been a nicer solution it cannot be used because of dependency issues at execution time; optparse uses gettext which uses struct which will not have been compiled when the code is imported. If optparse ever makes its importation of gettext optional by catching ImportError and setting _() to an identity function then it can be used.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d1ea4e2700..16cb0fa03a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -56,7 +56,10 @@ MAKESETUP= $(srcdir)/Modules/makesetup
OPT= @OPT@
BASECFLAGS= @BASECFLAGS@
CFLAGS= $(BASECFLAGS) $(OPT)
-CPPFLAGS= -I. -I$(srcdir)/Include
+# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
+# be able to build extension modules using the directories specified in the
+# environment variables
+CPPFLAGS= -I. -I$(srcdir)/Include @CPPFLAGS@
LDFLAGS= @LDFLAGS@
LDLAST= @LDLAST@
SGI_ABI= @SGI_ABI@