summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-05-22 05:57:04 +0000
committerjlam <jlam@pkgsrc.org>2001-05-22 05:57:04 +0000
commita01649af1c0fa4618909ac0122b8061d2703d8e3 (patch)
tree4c420c021ab405233d342efefb81c4f1fe581846
parent0edbf1d6f0e852dbbc203c7d3788c2a7bbfa1afa (diff)
downloadpkgsrc-a01649af1c0fa4618909ac0122b8061d2703d8e3.tar.gz
Use READLINE_REQD for required version of GNU readline, and use
USE_GNU_READLINE to force the use of GNU readline over editline's readline emulation.
-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