diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile index 10d8099b3b7d651009be95cc08f76a81b2b7101f..6780b71c694697511135bd84d19ea253fcc3f720 100644 --- a/src/interfaces/libpgtcl/Makefile +++ b/src/interfaces/libpgtcl/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.10 1997/03/17 22:05:08 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.11 1997/03/25 09:19:41 scrappy Exp $ # #------------------------------------------------------------------------- @@ -30,24 +30,26 @@ ifeq ($(CC), gcc) endif +shlib := +install-shlib-dep := + ifeq ($(PORTNAME), linux) ifdef LINUX_ELF ifeq ($(CC), gcc) CFLAGS += -fpic -fPIC endif + shlib := libpgtcl.so.1 + install-shlib-dep := install-shlib + LDFLAGS += -L ../libpq -lpq endif endif +ifeq ($(PORTNAME), i386_solaris) + CFLAGS+= -fPIC +endif + OBJS= pgtcl.o pgtclCmds.o pgtclId.o -ifdef LINUX_ELF - shlib := libpgtcl.so.1 - install-shlib-dep := install-shlib - LDFLAGS += -L ../libpq -lpq -else - shlib := - install-shlib-dep := -endif all: libpgtcl.a $(shlib) diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile index 7707c186a31fe3107b2b2847f47455d17e08334b..f3f0e12dc1fb6aef6efe0288d4de2028a022726f 100644 --- a/src/interfaces/libpq++/Makefile +++ b/src/interfaces/libpq++/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.6 1997/02/13 10:00:23 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.7 1997/03/25 09:20:32 scrappy Exp $ # #------------------------------------------------------------------------- @@ -39,7 +39,17 @@ endif OBJS = pgenv.o pgconnection.o pgtransdb.o pgcursordb.o pglobject.o -all: $(LIBNAME).a install examples +# Shared library stuff +SHLIB := +INSTALL-SHLIB-DEP := +ifeq ($(PORTNAME), i386_solaris) + INSTALL-SHLIB-DEP := install-shlib + SHLIB := libpq++.so.1 + LDFLAGS_SL = -G -z text + CFLAGS += -fPIC +endif + +all: $(LIBNAME).a $(SHLIB) install examples $(LIBNAME).a: $(OBJS) ifdef MK_NO_LORDER @@ -49,14 +59,17 @@ else endif $(RANLIB) $(LIBNAME).a +$(SHLIB): $(OBJS) + $(LD) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(OBJS) + .PHONY: examples examples: $(MAKE) -C examples all .PHONY: beforeinstall-headers install-headers -.PHONY: install install-$(LIBNAME) doc +.PHONY: install beforeinstall-lib install-$(LIBNAME) doc -install: install-headers install-$(LIBNAME) doc +install: install-headers install-$(LIBNAME) $(INSTALL-SHLIB-DEP) doc LIBPGXXDIR = $(LIBNAME) LIBPGXXHEADERDIR = $(HEADERDIR)/$(LIBPGXXDIR) @@ -79,9 +92,18 @@ beforeinstall-headers: @if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi @if [ ! -d $(LIBPGXXHEADERDIR) ]; then mkdir $(LIBPGXXHEADERDIR); fi -install-$(LIBNAME): $(LIBNAME).a +beforeinstall-lib: + @if [ ! -d $(DESTDIR)/$(LIBDIR) ] ; then mkdir $(DESTDIR)/$(LIBDIR); fi + +install-$(LIBNAME): $(LIBNAME).a beforeinstall-lib $(INSTALL) $(INSTL_LIB_OPTS) $(LIBNAME).a $(DESTDIR)$(LIBDIR)/$(LIBNAME).a +install-shlib: $(SHLIBNAME) beforeinstall-lib + $(INSTALL) $(INSTL_SHLIB_OPTS) $(SHLIB) $(DESTDIR)/$(LIBDIR)/$(SHLIB) + rm -f $(DESTDIR)/$(LIBDIR)/libpq++.so + ln -sf $(SHLIB) $(DESTDIR)/$(LIBDIR)/libpq++.so + + doc: $(MAKE) -C man install diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index 973249647d5347819f680b8f6cddb5c2587caf86..8fbdd8098a8186f731af9fdc5d548a6ca7c48059 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.32 1997/03/25 09:08:05 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.33 1997/03/25 09:20:12 scrappy Exp $ # #------------------------------------------------------------------------- @@ -42,6 +42,12 @@ ifeq ($(PORTNAME), BSD44_derived) LDFLAGS_SL = -x -Bshareable -Bforcearchive CFLAGS += -fpic -DPIC endif +ifeq ($(PORTNAME), i386_solaris) + install-shlib-dep := install-shlib + shlib := libpq.so.1 + LDFLAGS_SL = -G -z text + CFLAGS += -fPIC +endif all: libpq.a $(shlib) c.h @@ -71,6 +77,8 @@ pqcomprim.c: ../backend/libpq/pqcomprim.c $(shlib): $(OBJS) $(LD) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(OBJS) + ln -sf $@ libpq.so + c.h: ../include/c.h rm -f c.h diff --git a/src/port/i386_solaris.h b/src/port/i386_solaris.h index aa78ba5f6c122633892b35b95bc00bbbcade542d..0ac1116f06f9fde6a1ba2c91fa0eace54f21d8ac 100644 --- a/src/port/i386_solaris.h +++ b/src/port/i386_solaris.h @@ -4,3 +4,35 @@ # define SYSV_DIRENT # define HAS_TEST_AND_SET typedef unsigned char slock_t; + +#include <sys/isa_defs.h> + +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +#ifndef NAN + +#ifndef __nan_bytes +#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } +#endif /* __nan_bytes */ + +#ifdef __GNUC__ +#define NAN \ + (__extension__ ((union { unsigned char __c[8]; \ + double __d; }) \ + { __nan_bytes }).__d) + +#else /* Not GCC. */ +#define NAN (*(__const double *) __nan) +#endif /* GCC. */ +#endif /* NAN */ + +#ifndef index +#define index strchr +#endif + +#ifndef HAVE_RUSAGE +#define HAVE_RUSAGE 1 +#endif +