From d27ae9fd62c3ecaaf92bb71d82a1d8602738357f Mon Sep 17 00:00:00 2001 From: darcy Date: Thu, 24 Feb 2000 22:41:01 +0000 Subject: Python builds it's public Makefile so that the module gets linked with ld on a.out systems and cc on ELF systems so we need to check and only add the -Wl flag if on a.out systems. --- databases/py-postgresql/Makefile | 10 +++++++--- databases/py-postgresql/files/Setup.in | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'databases') diff --git a/databases/py-postgresql/Makefile b/databases/py-postgresql/Makefile index d9fbc0f1ba9..7b30373b7b7 100644 --- a/databases/py-postgresql/Makefile +++ b/databases/py-postgresql/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 1999/12/02 01:47:06 darcy Exp $ +# $NetBSD: Makefile,v 1.3 2000/02/24 22:41:01 darcy Exp $ DISTNAME= PyGreSQL-2.4 PKGNAME= py-postgresql-2.4 @@ -24,8 +24,12 @@ PGUSER?= pgsql PGPREFIX= ${LOCALBASE}/${PGUSER} # PostgreSQL home directory do-configure: - ${SED} -e "s,@PGPREFIX@,${PGPREFIX},g" \ - ${FILESDIR}/Setup.in > ${WRKSRC}/Setup.in + if echo __ELF__ | ${CC} -E - | grep -q __ELF__; \ + then ${SED} -e "s+@PGPREFIX@+${PGPREFIX}+g;s+@WLFLAG@++g" \ + ${FILESDIR}/Setup.in > ${WRKSRC}/Setup.in; \ + else ${SED} -e "s+@PGPREFIX@+${PGPREFIX}+g;s+@WLFLAG@+-Wl,+" \ + ${FILESDIR}/Setup.in > ${WRKSRC}/Setup.in; \ + fi ${CP} ${PYTHON_LIBDIR}/config/Makefile.pre.in ${WRKSRC} cd ${WRKSRC}; ${MAKE} -f Makefile.pre.in boot diff --git a/databases/py-postgresql/files/Setup.in b/databases/py-postgresql/files/Setup.in index 2f16fe799a4..5567e12d283 100644 --- a/databases/py-postgresql/files/Setup.in +++ b/databases/py-postgresql/files/Setup.in @@ -1,4 +1,4 @@ -# $NetBSD: Setup.in,v 1.2 2000/01/06 03:18:47 darcy Exp $ +# $NetBSD: Setup.in,v 1.3 2000/02/24 22:41:02 darcy Exp $ # *shared* -_pg pgmodule.c -I@PGPREFIX@/include -Wl,-R@PGPREFIX@/lib -L@PGPREFIX@/lib -lpq -lcrypt -DNO_DIRECT +_pg pgmodule.c -I@PGPREFIX@/include @WLFLAG@-R@PGPREFIX@/lib -L@PGPREFIX@/lib -lpq -lcrypt -DNO_DIRECT -- cgit v1.2.3