From 62bd2cd6724267f7103724a6f762b098167bd34a Mon Sep 17 00:00:00 2001 From: jlam Date: Mon, 15 Mar 2004 17:55:31 +0000 Subject: Add -L${X11BASE}/lib for the benefit of any *-config scripts on use-xpkgwedge systems. Not needed when building within pkgsrc, but useful if you want to link outside 3rd-party software against pkgsrc-controlled libraries. --- mk/buildlink3/bsd.buildlink3.mk | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mk') diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index c8dbd82852c..30abfc94416 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.119 2004/03/14 20:27:17 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.120 2004/03/15 17:55:31 jlam Exp $ # # An example package buildlink3.mk file: # @@ -471,12 +471,17 @@ BUILDLINK_LDFLAGS+= ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_} . endif .endfor # -# Add the X11 library directory to the runtime library search path if -# the package uses X11. +# Add the X11 library directory to the library search paths if the package +# uses X11. # -.if defined(USE_X11) && (${_USE_RPATH} == "yes") && \ - empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${X11BASE}/lib) +.if defined(USE_X11) +. if empty(BUILDLINK_LDFLAGS:M-L${X11BASE}/lib) +BUILDLINK_LDFLAGS+= -L${X11BASE}/lib +. endif +. if (${_USE_RPATH} == "yes") && \ + empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${X11BASE}/lib) BUILDLINK_LDFLAGS+= ${_COMPILER_LD_FLAG}${RPATH_FLAG}${X11BASE}/lib +. endif .endif .for _flag_ in ${BUILDLINK_CFLAGS} -- cgit v1.2.3