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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
AC_INIT([table-mysql], [1.2.1], [bugs@opensmtpd.org])
AC_CONFIG_AUX_DIR(etc)
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_CONFIG_LIBOBJ_DIR(openbsd-compat)
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
pkglibexecdir="$libexecdir/opensmtpd"
AS_CASE(["$host"],
[*-*-openbsd*], [
pkglibexecdir="$libexecdir/smtpd"
])
AC_SUBST([pkglibexecdir])
AC_REPLACE_FUNCS([ \
asprintf \
getprogname \
err \
strlcat \
strlcpy \
strsep \
strtonum \
])
AC_SEARCH_LIBS([mysql_init], [mariadb], [], [
AS_IF([command -v mysql_config >/dev/null], [
AC_MSG_RESULT([autodetect with mysql_config])
CFLAGS="$CFLAGS $(mysql_config --cflags)"
LDFLAGS="$LDFLAGS $(mysql_config --libs)"
], [
AC_MSG_ERROR([requires MariaDB client library])
])
])
CFLAGS="$CFLAGS -I$srcdir/openbsd-compat"
AC_CHECK_HEADER([sys/tree.h], [], [
CFLAGS="$CFLAGS -I$srcdir/openbsd-compat/tree"
])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
openbsd-compat/Makefile
])
AC_OUTPUT
|