summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam>2004-11-26 23:16:35 +0000
committerjlam <jlam>2004-11-26 23:16:35 +0000
commit04a47effdf50fc7c813eb3aac766cfc24694c5c4 (patch)
treec191761e56da1a8b1b18d652c65ecad3e41024b9 /devel
parent6df92dc7926707872ca37ed7bc78361343b2e7d6 (diff)
downloadpkgsrc-04a47effdf50fc7c813eb3aac766cfc24694c5c4.tar.gz
Standardize how we search for libraries in builtin.mk files. We define
_BLNK_LIB_FOUND.<lib> to "yes" or "no" depending on whether -l<lib> is found in the base system.
Diffstat (limited to 'devel')
-rw-r--r--devel/dlcompat/builtin.mk19
-rw-r--r--devel/gettext-lib/builtin.mk23
-rw-r--r--devel/ncurses/builtin.mk21
3 files changed, 39 insertions, 24 deletions
diff --git a/devel/dlcompat/builtin.mk b/devel/dlcompat/builtin.mk
index c3d9bae2aa2..7011210996e 100644
--- a/devel/dlcompat/builtin.mk
+++ b/devel/dlcompat/builtin.mk
@@ -1,20 +1,25 @@
-# $NetBSD: builtin.mk,v 1.1 2004/07/18 09:35:08 schmonz Exp $
+# $NetBSD: builtin.mk,v 1.2 2004/11/26 23:16:35 jlam Exp $
-.if !defined(_BLNK_LIBDL_FOUND)
-_BLNK_LIBDL_FOUND!= \
- if [ "`${ECHO} /usr/lib/libdl.*`" = "/usr/lib/libdl.*" ]; then \
+.for _lib_ in dl
+. if !defined(_BLNK_LIB_FOUND.${_lib_})
+_BLNK_LIB_FOUND.${_lib_}!= \
+ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" = "/usr/lib/lib${_lib_}.*"; then \
+ ${ECHO} "no"; \
+ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \
${ECHO} "no"; \
else \
${ECHO} "yes"; \
fi
-BUILDLINK_VARS+= _BLNK_LIBDL_FOUND
-.endif
+BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_}
+. endif
+.endfor
+.undef _lib_
_DL_H= /usr/include/dlfcn.h
.if !defined(IS_BUILTIN.dlcompat)
IS_BUILTIN.dlcompat= no
-. if !empty(_BLNK_LIBDL_FOUND:M[yY][eE][sS])
+. if !empty(_BLNK_LIB_FOUND.dl:M[yY][eE][sS])
IS_BUILTIN.dlcompat= yes
. elif exists(${_DL_H})
IS_BUILTIN.dlcompat= yes
diff --git a/devel/gettext-lib/builtin.mk b/devel/gettext-lib/builtin.mk
index e96fb222cbf..511838dbf34 100644
--- a/devel/gettext-lib/builtin.mk
+++ b/devel/gettext-lib/builtin.mk
@@ -1,20 +1,25 @@
-# $NetBSD: builtin.mk,v 1.13 2004/11/21 02:40:15 jlam Exp $
+# $NetBSD: builtin.mk,v 1.14 2004/11/26 23:16:35 jlam Exp $
-.if !defined(_BLNK_LIBINTL_FOUND)
-_BLNK_LIBINTL_FOUND!= \
- if [ "`${ECHO} /usr/lib/libintl.*`" = "/usr/lib/libintl.*" ]; then \
+.for _lib_ in intl
+. if !defined(_BLNK_LIB_FOUND.${_lib_})
+_BLNK_LIB_FOUND.${_lib_}!= \
+ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" = "/usr/lib/lib${_lib_}.*"; then \
+ ${ECHO} "no"; \
+ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \
${ECHO} "no"; \
else \
${ECHO} "yes"; \
fi
-BUILDLINK_VARS+= _BLNK_LIBINTL_FOUND
-.endif
+BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_}
+. endif
+.endfor
+.undef _lib_
_LIBINTL_H= /usr/include/libintl.h
.if !defined(IS_BUILTIN.gettext)
IS_BUILTIN.gettext= no
-. if exists(${_LIBINTL_H}) && !empty(_BLNK_LIBINTL_FOUND:M[yY][eE][sS])
+. if exists(${_LIBINTL_H}) && !empty(_BLNK_LIB_FOUND.intl:M[yY][eE][sS])
IS_BUILTIN.gettext!= \
if ${GREP} -q "\#define[ ]*__USE_GNU_GETTEXT" ${_LIBINTL_H}; then \
${ECHO} "yes"; \
@@ -112,7 +117,7 @@ CHECK_BUILTIN.gettext?= no
# If we are using the builtin gettext implementation...
######################################################################
.if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
-. if ${_BLNK_LIBINTL_FOUND} == "yes"
+. if ${_BLNK_LIB_FOUND.intl} == "yes"
_BLNK_LIBINTL= -lintl
. else
_BLNK_LIBINTL= # empty
@@ -186,7 +191,7 @@ CONFIGURE_ENV+= INTLLIBS="${BUILDLINK_LDADD.gettext}"
# so that it will detect "GNU gettext" in the existing libintl.
#
.if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
-. if !empty(_BLNK_LIBINTL_FOUND:M[yY][eE][sS])
+. if !empty(_BLNK_LIB_FOUND.intl:M[yY][eE][sS])
CONFIGURE_ENV+= gt_cv_func_gnugettext_libintl="yes"
CONFIGURE_ENV+= gt_cv_func_gnugettext1_libintl="yes"
. if defined(_GETTEXT_NGETTEXT) && !empty(_GETTEXT_NGETTEXT:M[yY][eE][sS])
diff --git a/devel/ncurses/builtin.mk b/devel/ncurses/builtin.mk
index 6b9edd8adb9..2abce9070d9 100644
--- a/devel/ncurses/builtin.mk
+++ b/devel/ncurses/builtin.mk
@@ -1,20 +1,25 @@
-# $NetBSD: builtin.mk,v 1.4 2004/10/13 20:10:31 tv Exp $
+# $NetBSD: builtin.mk,v 1.5 2004/11/26 23:16:35 jlam Exp $
-.if !defined(_BLNK_LIBNCURSES_FOUND)
-_BLNK_LIBNCURSES_FOUND!= \
- if [ "`${ECHO} /usr/lib/libncurses.*`" = "/usr/lib/libncurses.*" ]; then \
+.for _lib_ in ncurses
+. if !defined(_BLNK_LIB_FOUND.${_lib_})
+_BLNK_LIB_FOUND.${_lib_}!= \
+ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" = "/usr/lib/lib${_lib_}.*"; then \
+ ${ECHO} "no"; \
+ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \
${ECHO} "no"; \
else \
${ECHO} "yes"; \
fi
-BUILDLINK_VARS+= _BLNK_LIBNCURSES_FOUND
-.endif
+BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_}
+. endif
+.endfor
+.undef _lib_
_NCURSES_H= /usr/include/curses.h
.if !defined(IS_BUILTIN.ncurses)
IS_BUILTIN.ncurses= no
-. if !empty(_BLNK_LIBNCURSES_FOUND:M[yY][eE][sS])
+. if !empty(_BLNK_LIB_FOUND.ncurses:M[yY][eE][sS])
IS_BUILTIN.ncurses= yes
. elif exists(${_NCURSES_H})
IS_BUILTIN.ncurses!= \
@@ -100,7 +105,7 @@ CHECK_BUILTIN.ncurses?= no
.if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
. include "../../mk/bsd.prefs.mk"
-. if !empty(_BLNK_LIBNCURSES_FOUND:M[nN][oO]) || ${OPSYS} == "Interix"
+. if !empty(_BLNK_LIB_FOUND.ncurses:M[nN][oO]) || ${OPSYS} == "Interix"
BUILDLINK_TRANSFORM.ncurses+= -e "s|/curses\.h|/ncurses.h|g"
BUILDLINK_TRANSFORM+= l:ncurses:curses
. endif