pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Add -L${X11BASE}/lib for the benefit of ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/379b2a48fcfb
branches:  trunk
changeset: 471021:379b2a48fcfb
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Mar 15 17:55:31 2004 +0000

description:
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:

 mk/buildlink3/bsd.buildlink3.mk |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r d2de7a9dd480 -r 379b2a48fcfb mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Mon Mar 15 17:38:10 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Mon Mar 15 17:55:31 2004 +0000
@@ -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 @@
 .  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}



Home | Main Index | Thread Index | Old Index