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.
This commit is contained in:
darcy 2000-02-24 22:41:01 +00:00
parent 995bfedd7f
commit d27ae9fd62
2 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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