CFLAGS+= -I${.CURDIR}/../../backend

#
# Almost all (all?) the C programs in this directory
# link with libpq, so we put it here.
#
.if exists(${.CURDIR}/../../libpq/obj/libpq.a)
LIBPQ= ${.CURDIR}/../../libpq/obj/libpq.a
.elif exists(${.CURDIR}/../../libpq/libpq.a)
LIBPQ= ${.CURDIR}/../../libpq/libpq.a
.endif

LDADD= ${LIBPQ}
DPADD= ${LIBPQ}

#
# And where libpq goes, so goes the authentication stuff...
#
.ifdef KRBVERS
LDADD+= ${KRBLIBS}
CFLAGS+= ${KRBFLAGS}
.endif

#
# And all the shell scripts here get stuffed with the default
# values for BINDIR, DATADIR, and POSTGRESDIR
#
SEDSCRIPT= -e "s^_fUnKy_BINDIR_sTuFf_^${BINDIR}^g" \
	-e "s^_fUnKy_DATADIR_sTuFf_^${DATADIR}^g" \
	-e "s^_fUnKy_POSTGRESDIR_sTuFf_^${POSTGRESDIR}^g"
