pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel Standardize how we search for libraries in built...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5d0f40d63731
branches: trunk
changeset: 484296:5d0f40d63731
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Nov 26 23:16:35 2004 +0000
description:
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:
devel/dlcompat/builtin.mk | 19 ++++++++++++-------
devel/gettext-lib/builtin.mk | 23 ++++++++++++++---------
devel/ncurses/builtin.mk | 21 +++++++++++++--------
3 files changed, 39 insertions(+), 24 deletions(-)
diffs (135 lines):
diff -r 112fd7492545 -r 5d0f40d63731 devel/dlcompat/builtin.mk
--- a/devel/dlcompat/builtin.mk Fri Nov 26 23:13:36 2004 +0000
+++ b/devel/dlcompat/builtin.mk Fri Nov 26 23:16:35 2004 +0000
@@ -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 -r 112fd7492545 -r 5d0f40d63731 devel/gettext-lib/builtin.mk
--- a/devel/gettext-lib/builtin.mk Fri Nov 26 23:13:36 2004 +0000
+++ b/devel/gettext-lib/builtin.mk Fri Nov 26 23:16:35 2004 +0000
@@ -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 @@
# 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 @@
# 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 -r 112fd7492545 -r 5d0f40d63731 devel/ncurses/builtin.mk
--- a/devel/ncurses/builtin.mk Fri Nov 26 23:13:36 2004 +0000
+++ b/devel/ncurses/builtin.mk Fri Nov 26 23:16:35 2004 +0000
@@ -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 @@
.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
Home |
Main Index |
Thread Index |
Old Index