summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-15 17:55:31 +0000
committerjlam <jlam@pkgsrc.org>2004-03-15 17:55:31 +0000
commit62bd2cd6724267f7103724a6f762b098167bd34a (patch)
tree509be414ad14d0a4bec4f95517ee0f55024037b9 /mk
parentf63d66e56a64208937c79d618d8d0244925f9d5b (diff)
downloadpkgsrc-62bd2cd6724267f7103724a6f762b098167bd34a.tar.gz
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.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk15
1 files changed, 10 insertions, 5 deletions
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}