summaryrefslogtreecommitdiff
path: root/databases/postgresql/Makefile.readline
diff options
context:
space:
mode:
Diffstat (limited to 'databases/postgresql/Makefile.readline')
-rw-r--r--databases/postgresql/Makefile.readline31
1 files changed, 31 insertions, 0 deletions
diff --git a/databases/postgresql/Makefile.readline b/databases/postgresql/Makefile.readline
new file mode 100644
index 00000000000..5caab60387d
--- /dev/null
+++ b/databases/postgresql/Makefile.readline
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile.readline,v 1.1 2001/05/14 14:52:36 jlam Exp $
+#
+# This Makefile fragment is included by PostgreSQL packages built from the
+# main sources of the PostgreSQL distribution that use readline()
+# functionality.
+
+CONFIGURE_ARGS+= --enable-readline
+
+.if exists(/usr/include/readline.h)
+READLINE_H= /usr/include/readline.h
+HISTORY_H= /usr/include/history.h
+CONFIGURE_ENV+= pgac_cv_check_readline="-ledit -ltermcap"
+.elif exists(/usr/include/readline/readline.h)
+READLINE_H= /usr/include/readline/readline.h
+HISTORY_H= /usr/include/readline/history.h
+CONFIGURE_ENV+= pgac_cv_check_readline="-ledit -ltermcap"
+.else
+READLINE_H= ${LOCALBASE}/readline/readline.h
+HISTORY_H= ${LOCALBASE}/readline/history.h
+DEPENDS+= readline>=4.0:../../devel/readline
+.endif
+
+# This target links the readline and history headers into
+# ${WRKINCDIR}/include, which is searched first by the C preprocessor.
+#
+link-readline-headers:
+ ${MKDIR} -p ${WRKINCDIR}/readline
+ ${RM} -f ${WRKINCDIR}/readline/readline.h
+ ${RM} -f ${WRKINCDIR}/readline/history.h
+ ${LN} -sf ${READLINE_H} ${WRKINCDIR}/readline
+ ${LN} -sf ${HISTORY_H} ${WRKINCDIR}/readline