summaryrefslogtreecommitdiff
path: root/databases/postgresql/Makefile.readline
blob: 5caab60387de6afbf4bcd5ce7b51ac5b2e567bf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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