Re: What's with this lib suffix?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Thomas Hallgren <thomas(at)tada(dot)se>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: What's with this lib suffix?
Date: 2006-02-25 15:17:20
Message-ID: 20060225151720.GA4756@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Hallgren wrote:

> In that case, I'd appreciate some advice on how to use the pgxs package
> to compile a 'plug-in'. Looks to me it's only designed to compile
> 'shared libraries'.

You can just use the Makefile.shlib rules normally and then rename the
file during installation. PL/pgSQL does things this way:

# In order to use Makefile.shlib, we allow it to build a static
# library libplpgsql.a, which we just ignore, as well as a shared
# library that it will insist on naming $(shlib). We don't want to
# call it that when installed, however, so we ignore the install-shlib
# rule and do this instead:

install: installdirs all
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)
else
@echo "*****"; \
echo "* PL/pgSQL was not installed due to lack of shared library support."; \
echo "*****"
endif

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-02-25 15:43:46 Re: What's with this lib suffix?
Previous Message Martijn van Oosterhout 2006-02-25 15:00:26 Re: Resurrecting some old patches