summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
Diffstat (limited to 'devel')
-rw-r--r--devel/readline/Makefile.readline27
1 files changed, 20 insertions, 7 deletions
diff --git a/devel/readline/Makefile.readline b/devel/readline/Makefile.readline
index fb809c0d22d..5865048c298 100644
--- a/devel/readline/Makefile.readline
+++ b/devel/readline/Makefile.readline
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.readline,v 1.2 2001/05/16 05:05:48 jlam Exp $
+# $NetBSD: Makefile.readline,v 1.3 2001/05/22 05:57:04 jlam Exp $
#
# This Makefile fragment is included by packages that use readline().
#
@@ -9,17 +9,29 @@
#
# To use this Makefile fragment, simply:
#
-# (1) Include this Makefile fragment in the package Makefile,
-# (2) Optionally define WRKINCDIR and WRKLIBDIR,
-# (3) Add link-readline-headers and link-readline-libs to the prerequisite
+# (1) Optionally define USE_GNU_READLINE to force use of GNU readline.
+# (2) Optionally define READLINE_REQD to the version of GNU readline desired.
+# (3) Include this Makefile fragment in the package Makefile,
+# (4) Optionally define WRKINCDIR and WRKLIBDIR,
+# (5) Add link-readline-headers and link-readline-libs to the prerequisite
# targets for pre-configure,
-# (4) Add ${WRKINCDIR} to the front of the C preprocessor's header search
+# (6) Add ${WRKINCDIR} to the front of the C preprocessor's header search
# path, and
-# (5) Add ${WRKLIBDIR} to the front of the linker's library search path.
+# (7) Add ${WRKLIBDIR} to the front of the linker's library search path.
#
# NOTE: You may need to do some more work to get libedit recognized over
# libreadline, especially by GNU configure scripts.
+READLINE_REQD?= 2.2
+
+.if defined(USE_GNU_READLINE)
+READLINE_INCDIR= ${LOCALBASE}/include/readline
+LIBREADLINE= ${LOCALBASE}/lib/libreadline.a
+LIBREADLINE+= ${LOCALBASE}/lib/libreadline.so*
+LIBHISTORY= ${LOCALBASE}/lib/libhistory.a
+LIBHISTORY+= ${LOCALBASE}/lib/libhistory.so*
+DEPENDS+= readline>=${READLINE_REQD}:../../devel/readline
+.else
.if exists(/usr/include/readline.h)
READLINE_H= /usr/include/readline.h
HISTORY_H= /usr/include/history.h
@@ -41,7 +53,8 @@ LIBREADLINE= ${LOCALBASE}/lib/libreadline.a
LIBREADLINE+= ${LOCALBASE}/lib/libreadline.so*
LIBHISTORY= ${LOCALBASE}/lib/libhistory.a
LIBHISTORY+= ${LOCALBASE}/lib/libhistory.so*
-DEPENDS+= readline>=2.2:../../devel/readline
+DEPENDS+= readline>=${READLINE_REQD}:../../devel/readline
+.endif
.endif
WRKINCDIR?= ${WRKDIR}/include