diff options
| author | Peter Eisentraut | 2015-05-02 01:38:21 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2015-05-02 01:38:21 +0000 |
| commit | d664a10f9623fd2198b257e513bce849d439a773 (patch) | |
| tree | 122918562558012874096a6dc041f186df4252cd /src/pl/plpython | |
| parent | 77477e745be534c5925cf7cb8b9c6a7698c575a3 (diff) | |
Move interpreter shared library detection to configure
For building PL/Perl, PL/Python, and PL/Tcl, we need a shared library of
libperl, libpython, and libtcl, respectively. Previously, this was
checked in the makefiles, skipping the PL build with a warning if no
shared library was available. Now this is checked in configure, with an
error if no shared library is available.
The previous situation arose because in the olden days, the configure
options --with-perl, --with-python, and --with-tcl controlled whether
frontend interfaces for those languages would be built. The procedural
languages were added later, and shared libraries were often not
available in the beginning. So it was decided skip the builds of the
procedural languages in those cases. The frontend interfaces have since
been removed from the tree, and shared libraries are now available most
of the time, so that setup makes much less sense now.
Also, the new setup allows contrib modules and pgxs users to rely on the
respective PLs being available based on configure flags.
Diffstat (limited to 'src/pl/plpython')
| -rw-r--r-- | src/pl/plpython/Makefile | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile index de97cbb780b..8b1d8908e68 100644 --- a/src/pl/plpython/Makefile +++ b/src/pl/plpython/Makefile @@ -5,24 +5,6 @@ top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -# We need libpython as a shared library. In Python >=2.5, configure -# asks Python directly. But because this has been broken in Debian -# for a long time (http://bugs.debian.org/695979), and to support -# older Python versions, we see if there is a file that is named like -# a shared library as a fallback. -ifeq (1,$(python_enable_shared)) -shared_libpython = yes -else -ifeq ($(PORTNAME), darwin) -# OS X does supply a .dylib even though Py_ENABLE_SHARED does not get set -shared_libpython = yes -else -ifneq (,$(wildcard $(python_libdir)/libpython*$(DLSUFFIX)*)) -shared_libpython = yes -endif -endif -endif - # Windows needs to convert backslashed paths to normal slashes, # and we have to remove -lpython from the link since we are building our own ifeq ($(PORTNAME), win32) @@ -31,8 +13,6 @@ python_includespec := $(subst \,/,$(python_includespec)) override python_libspec = endif -# If we don't have a shared library, we have to skip it. -ifeq ($(shared_libpython),yes) override CPPFLAGS := -I. -I$(srcdir) $(python_includespec) $(CPPFLAGS) @@ -159,18 +139,6 @@ ifeq ($(PORTNAME), win32) rm -f python${pytverstr}.def endif -else # can't build - -all: - @echo ""; \ - echo "*** Cannot build PL/Python because libpython is not a shared library." ; \ - echo "*** You might have to rebuild your Python installation. Refer to"; \ - echo "*** the documentation for details."; \ - echo "" - -endif # can't build - -# distprep and maintainer-clean rules should be run even if we can't build. # Force this dependency to be known even without dependency info built: plpy_plpymodule.o: spiexceptions.h |
