Sun Dec 14 16:34:24 2008 UTC ()
Add /usr/lib${LIBABISUFFIX} to the search path


(jmcneill)
diff -r1.3 -r1.4 pkgsrc/mk/buildlink3/find-libs.mk

cvs diff -r1.3 -r1.4 pkgsrc/mk/buildlink3/find-libs.mk (switch to unified diff)

--- pkgsrc/mk/buildlink3/find-libs.mk 2005/07/15 18:27:55 1.3
+++ pkgsrc/mk/buildlink3/find-libs.mk 2008/12/14 16:34:24 1.4
@@ -1,74 +1,76 @@ @@ -1,74 +1,76 @@
1# $NetBSD: find-libs.mk,v 1.3 2005/07/15 18:27:55 jlam Exp $ 1# $NetBSD: find-libs.mk,v 1.4 2008/12/14 16:34:24 jmcneill Exp $
2# 2#
3# Copyright (c) 2005 The NetBSD Foundation, Inc. 3# Copyright (c) 2005 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
15# notice, this list of conditions and the following disclaimer in the 15# notice, this list of conditions and the following disclaimer in the
16# documentation and/or other materials provided with the distribution. 16# documentation and/or other materials provided with the distribution.
17# 3. All advertising materials mentioning features or use of this software 17# 3. All advertising materials mentioning features or use of this software
18# must display the following acknowledgement: 18# must display the following acknowledgement:
19# This product includes software developed by the NetBSD 19# This product includes software developed by the NetBSD
20# Foundation, Inc. and its contributors. 20# Foundation, Inc. and its contributors.
21# 4. Neither the name of The NetBSD Foundation nor the names of its 21# 4. Neither the name of The NetBSD Foundation nor the names of its
22# contributors may be used to endorse or promote products derived 22# contributors may be used to endorse or promote products derived
23# from this software without specific prior written permission. 23# from this software without specific prior written permission.
24# 24#
25# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 25# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 26# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 27# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 28# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35# POSSIBILITY OF SUCH DAMAGE. 35# POSSIBILITY OF SUCH DAMAGE.
36# 36#
37 37
38# 38#
39# This is a "subroutine" that can be included to detect the presence of 39# This is a "subroutine" that can be included to detect the presence of
40# libraries in the base system. 40# libraries in the base system.
41# 41#
42# The input variable is BUILDLINK_FIND_LIBS, which is a list of library 42# The input variable is BUILDLINK_FIND_LIBS, which is a list of library
43# names, e.g. ncurses, iconv, etc., that will be sought in the base 43# names, e.g. ncurses, iconv, etc., that will be sought in the base
44# system. BUILTIN_LIB_FOUND.<lib> is set to "yes" or "no" depending 44# system. BUILTIN_LIB_FOUND.<lib> is set to "yes" or "no" depending
45# on the result of the search. 45# on the result of the search.
46# 46#
47# An example use is: 47# An example use is:
48# 48#
49# BUILDLINK_FIND_LIBS:= intl iconv 49# BUILDLINK_FIND_LIBS:= intl iconv
50# .include "../../mk/buildlink3/find-libs.mk" 50# .include "../../mk/buildlink3/find-libs.mk"
51# # ${BUILTIN_LIB_FOUND.intl} and ${BUILTIN_LIB_FOUND.iconv} are now 51# # ${BUILTIN_LIB_FOUND.intl} and ${BUILTIN_LIB_FOUND.iconv} are now
52# # either "yes" or "no". 52# # either "yes" or "no".
53# 53#
54 54
55.if empty(USE_TOOLS:Mecho) 55.if empty(USE_TOOLS:Mecho)
56USE_TOOLS+= echo 56USE_TOOLS+= echo
57.endif 57.endif
58.if empty(USE_TOOLS:Mtest) 58.if empty(USE_TOOLS:Mtest)
59USE_TOOLS+= test 59USE_TOOLS+= test
60.endif 60.endif
61 61
62.for _lib_ in ${BUILTIN_FIND_LIBS} 62.for _lib_ in ${BUILTIN_FIND_LIBS}
63. if !defined(BUILTIN_LIB_FOUND.${_lib_}) 63. if !defined(BUILTIN_LIB_FOUND.${_lib_})
64BUILTIN_LIB_FOUND.${_lib_}!= \ 64BUILTIN_LIB_FOUND.${_lib_}!= \
65 if ${TEST} "`${ECHO} /usr/lib${ABI}/lib${_lib_}.*`" != "/usr/lib${ABI}/lib${_lib_}.*"; then \ 65 if ${TEST} "`${ECHO} /usr/lib${ABI}/lib${_lib_}.*`" != "/usr/lib${ABI}/lib${_lib_}.*"; then \
66 ${ECHO} yes; \ 66 ${ECHO} yes; \
67 elif ${TEST} "`${ECHO} /lib${ABI}/lib${_lib_}.*`" != "/lib${ABI}/lib${_lib_}.*"; then \ 67 elif ${TEST} "`${ECHO} /lib${ABI}/lib${_lib_}.*`" != "/lib${ABI}/lib${_lib_}.*"; then \
68 ${ECHO} yes; \ 68 ${ECHO} yes; \
 69 elif ${TEST} "`${ECHO} /usr/lib${LIBABISUFFIX}/lib${_lib}.*`" != "/usr/lib${LIBABISUFFIX}/lib${_lib_}.*"; then \
 70 ${ECHO} yes; \
69 else \ 71 else \
70 ${ECHO} no; \ 72 ${ECHO} no; \
71 fi 73 fi
72. endif 74. endif
73MAKEVARS+= BUILTIN_LIB_FOUND.${_lib_} 75MAKEVARS+= BUILTIN_LIB_FOUND.${_lib_}
74.endfor 76.endfor