summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2004-03-15 17:55:31 +0000
committerjlam <jlam>2004-03-15 17:55:31 +0000
commit1b9538d403733a79818d400e9bf027a33b48c5a8 (patch)
tree509be414ad14d0a4bec4f95517ee0f55024037b9
parente392db5466cab80b9f048877cf641378728dfef2 (diff)
downloadpkgsrc-1b9538d403733a79818d400e9bf027a33b48c5a8.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.
-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}