16
16
m4_define([VERSION_RELEASE], 2)
17
m4_define([VERSION_MAJOR_REV], 5)
18
m4_define([VERSION_MINOR_REV], 2)
17
m4_define([VERSION_MAJOR_REV], 6)
18
m4_define([VERSION_MINOR_REV], 0)
19
19
m4_define([VERSION_PATCH], 0)
283
283
FFR_FEATURE([resign],
284
284
[support for one-step re-signing])
286
FFR_FEATURE([select_canonicalization],
287
[allow sender to select canonicalization])
289
286
FFR_FEATURE([selector_header], [special header to choose signing key])
291
288
FFR_FEATURE([sender_macro], [macro to determine sender])
290
FFR_FEATURE([socketdb], [arbitrary socket data sets])
293
292
FFR_FEATURE([stats], [stats recording and reporting])
294
293
AM_CONDITIONAL([STATS], [test x"$enable_stats" = x"yes"])
295
294
FFR_FEATURE([statsext], [extended stats recording and reporting])
300
299
FFR_FEATURE([vbr], [Vouch-By-Reference support])
301
300
AM_CONDITIONAL([VBR], [test x"$enable_vbr" = x"yes"])
303
LIB_FFR_FEATURE([xtags], [extension signature tags])
304
AM_CONDITIONAL([XTAGS], [test x"$enable_xtags" = x"yes"])
306
302
if test x"$enable_statsext" = x"yes" -a x"$enable_stats" != x"yes"
308
304
AC_MSG_ERROR([--enable-statsext requires --enable-stats])
311
if test x"$enable_atps" = x"yes" -a x"$enable_xtags" != x"yes"
313
AC_MSG_ERROR([--enable-atps requires --enable-xtags])
316
307
FFR_FEATURE([default_sender], [default sender address])
318
309
# sendmail command
1109
1098
AC_SUBST(LIBLDNS_LIBDIRS)
1110
1099
AC_SUBST(LIBLDNS_LIBS)
1101
# unbound may also need libevent
1102
AC_ARG_WITH([libevent],
1103
AS_HELP_STRING([--with-libevent],
1104
[location of libevent includes and library]),
1105
[libeventpath="$withval"], [libeventpath="no"])
1110
if test x"$libevent" = x"yes"
1114
libeventdirs="/usr /usr/local"
1115
for d in $libeventdirs
1117
unset ac_cv_search_libevent_rr_new
1118
saved_LDFLAGS="$LDFLAGS"
1119
LDFLAGS="-L$d/lib $LDFLAGS"
1120
AC_SEARCH_LIBS([event_enable_debug_mode], [event], libevent_found="yes")
1121
LDFLAGS="$saved_LDFLAGS"
1123
if test x"$libevent_found" = x"yes"
1125
LIBEVENT_LIBDIRS="-L$d/lib"
1126
LIBEVENT_LIBS="-levent"
1130
if test x"$LIBEVENT_LIBS" = x""
1132
AC_MSG_ERROR([libevent not found])
1134
elif test x"$libeventpath" != x"no"
1137
saved_LDFLAGS="$LDFLAGS"
1138
LDFLAGS="-L$d/lib $LDFLAGS"
1139
AC_SEARCH_LIBS([event_enable_debug_mode], [event], libevent_found="yes")
1140
LDFLAGS="$saved_LDFLAGS"
1142
if test x"$libevent_found" = x"yes"
1144
LIBEVENT_LIBDIRS="-L$d/lib"
1145
LIBEVENT_LIBS="-levent"
1148
AC_MSG_ERROR(libevent not found in $d)
1152
AC_SUBST(LIBEVENT_LIBDIRS)
1153
AC_SUBST(LIBEVENT_LIBS)
1601
1644
AC_SUBST(SASL_CPPFLAGS)
1650
AS_HELP_STRING([--with-mdb],
1651
[location of OpenLDAP MDB includes and library]),
1652
[mdbpath="$withval"], [mdbpath="no"])
1658
if test x"$mdbpath" != x"no" -a x"$mdb_found" = x"no"
1660
saved_ldflags="$LDFLAGS"
1661
saved_cflags="$CFLAGS"
1663
if test x"$mdbpath" != x"auto" -a x"$mdbpath" != x"yes"
1665
if test -f $mdbpath/include/mdb.h
1667
LDFLAGS="-L$mdbpath/lib"
1668
AC_CHECK_LIB(mdb, mdb_env_open,
1671
LIBMDB_CPPFLAGS="-I$mdbpath/include"
1672
LIBMDB_LIBS="-L$mdbpath/lib -lmdb"
1675
AC_MSG_ERROR([mdb not valid at $mdbpath])
1679
AC_MSG_ERROR([mdb not found at $mdbpath])
1682
mdbdirs="/usr /usr/local"
1685
if test -f $d/include/mdb.h
1688
AC_CHECK_LIB(mdb, mdb_env_open,
1692
LIBMDB_CPPFLAGS="-I$mdbpath/include"
1693
LIBMDB_LIBS="-L$mdbpath/lib -lmdb"
1699
if test x"$mdb_found" != x"yes"
1701
AC_MSG_ERROR([mdb not found])
1704
LDFLAGS="$saved_ldflags"
1705
CFLAGS="$saved_cflags"
1707
if test x"$mdb_found" = x"yes"
1709
AC_DEFINE([USE_MDB], 1, [OpenLDAP MDB support for datasets enabled])
1711
AM_CONDITIONAL(USE_MDB, test x"$mdb_found" = x"yes")
1712
AC_SUBST(LIBMDB_CPPFLAGS)
1713
AC_SUBST(LIBMDB_LIBS)
1604
1717
# libcurl, required by reputation
1606
1719
AC_ARG_WITH([libcurl],
1684
# libxml2, required by reputation
1797
# libjansson, required by reputation
1800
AC_ARG_WITH([libjansson],
1801
AS_HELP_STRING([--with-libjansson],
1802
[location of jansson includes and library]),
1803
[janssonpath="$withval"], [janssonpath="auto"])
1805
LIBJANSSON_CPPFLAGS=""
1806
LIBJANSSON_LDFLAGS=""
1809
if test x"$enable_reputation" != x"yes" -a \
1810
x"$janssonpath" = x"auto"
1816
if test \( x"$janssonpath" = x"auto" -o x"$janssonpath" = x"yes" \) -a \
1817
x"$PKG_CONFIG" != x""
1819
PKG_CHECK_MODULES([LIBJANSSON], [libjansson >= 2.2.1],
1822
LIBJANSSON_CPPFLAGS="$LIBJANSSON_CFLAGS"
1823
LIBJANSSON_LIBS="$LIBJANSSON_LIBS"
1827
AC_MSG_WARN([pkg-config for libjansson not found, trying manual
1832
if test x"$janssonpath" != x"no" -a x"$jansson_found" = x"no"
1834
AC_MSG_CHECKING([for libjansson])
1835
if test x"$janssonpath" != x"auto" -a x"$janssonpath" != x"yes"
1837
if test -f $janssonpath/include/jansson.h
1839
AC_MSG_RESULT($janssonpath)
1841
LIBJANSSON_CPPFLAGS="-I$janssonpath/include"
1842
LIBJANSSON_LDFLAGS="-L$janssonpath/lib"
1843
LIBJANSSON_LIBS="-ljansson"
1845
AC_MSG_ERROR(not found at $janssonpath)
1848
janssondirs="/usr /usr/local"
1849
for d in $janssondirs
1851
if test -f $d/include/jansson.h
1856
LIBJANSSON_CPPFLAGS="-I$janssonpath/include"
1857
LIBJANSSON_LDFLAGS="-L$janssonpath/lib"
1858
LIBJANSSON_LIBS="-ljansson"
1863
if test x"$jansson_found" != x"yes"
1868
AC_SUBST(LIBJANSSON_CPPFLAGS)
1869
AC_SUBST(LIBJANSSON_LDFLAGS)
1870
AC_SUBST(LIBJANSSON_LIBS)
1686
1876
AC_ARG_WITH([libxml2],
1687
1877
AS_HELP_STRING([--with-libxml2],
1688
1878
[location of XML2 includes and library]),
1756
1952
AC_SUBST(LIBXML2_LIBS)
1758
1954
if test x"$enable_reputation" = x"yes" -a \
1759
x"$xml2_found" != x"yes"
1761
AC_MSG_ERROR([reputation requires libxml2])
1955
\( x"$xml2_found" != x"yes" -a \
1956
x"$jansson_found" != x"yes" \)
1958
AC_MSG_ERROR([reputation requires libxml2 or libjansson])
1961
if test x"$xml2_found" == x"yes" -a x"$jansson_found" == x"yes"
1963
AC_MSG_ERROR([cannot use both libxml2 and libjansson])
1966
if test x"$xml2_found" == x"yes"
1968
AC_DEFINE(USE_XML2, 1, [use libxml2 to parse REPUTE replies])
1970
if test x"$jansson_found" == x"yes"
1972
AC_DEFINE(USE_JANSSON, 1, [use libjansson to parse REPUTE replies])
1801
2012
bdbrequested="yes"
2016
if test x"$enable_reputation" = x"yes" -a x"$mdb_found" = x"no"
1804
2021
AM_CONDITIONAL(USE_DB_OPENDKIM,
1805
2022
test x"$enable_popauth" = x"yes" -o \
1806
x"$enable_reputation" = x"yes" -o \
1807
x"$enable_reputation_cache" = x"yes" -o \
2023
x"$rep_needs_bdb" = x"yes" -o \
2024
x"$enable_ldap_caching" = x"yes" -o \
1808
2025
x"$bdbrequested" = x"yes")
1809
2026
AM_CONDITIONAL(USE_DB_LIBOPENDKIM, test x"$enable_query_cache" = x"yes")
1865
2082
AC_MSG_RESULT([$bdb_incdir])
1869
AC_MSG_CHECKING([for BerkeleyDB library lib$bdb_lib.a])
1870
if test x"$bdb_libdir" = x""
1874
if test -f $d/lib/lib$bdb_lib.a
1877
AC_MSG_RESULT($bdb_libdir)
1883
if test x"$bdb_libdir" = x""
1885
AC_MSG_RESULT([not found])
1887
elif ! test -f $bdb_libdir/lib$bdb_lib.a
1889
AC_MSG_ERROR([not found in $bdb_libdir])
1891
AC_MSG_RESULT([$bdb_libdir/lib$bdb_lib.a])
1895
# If no matching library, see if we can find one. Note that
1896
# this can cause compilation problems if for example a db.h
2085
# See if we can find a library by looking for db_create(), then
2086
# db_open(), then dbopen().
2088
# This can cause compilation problems if for example a db.h
1897
2089
# and a libdb are found that aren't the same version, but it's
1898
2090
# worth a shot in general.
1899
if test x"$libdbfound" = x"no"
1901
AC_SEARCH_LIBS([db_create], [db], [libdbfound="yes"])
1903
if test x"$libdbfound" = x"no"
1905
AC_SEARCH_LIBS([dbopen], [db], [libdbfound="yes"])
1907
if test x"$libdbfound" = x"no"
1909
AC_MSG_CHECKING([for libdb])
2091
if test x"$bdb_libdir" = x""
1910
2093
for d in $bdbdirs
1912
if test -f $d/lib/lib$bdb_lib.a
1915
AC_MSG_RESULT($bdb_libdir)
2095
saved_LDFLAGS="$LDFLAGS"
2096
saved_CPPFLAGS="$CPPFLAGS"
2098
LDFLAGS="$LDFLAGS -L$d/lib"
2099
CPPFLAGS="$CPPFLAGS -I$bdb_incdir"
2101
if test x"$libdbfound" = x"no"
2103
AC_SEARCH_LIBS([db_create], $bdb_lib,
2107
if test x"$libdbfound" = x"no"
2109
AC_SEARCH_LIBS([db_open], $bdb_lib,
2113
if test x"$libdbfound" = x"no"
2115
AC_SEARCH_LIBS([dbopen], $bdb_lib,
2120
LDFLAGS="$saved_LDFLAGS"
2121
CPPFLAGS="$saved_CPPFLAGS"
2125
saved_LDFLAGS="$LDFLAGS"
2126
saved_CPPFLAGS="$CPPFLAGS"
2128
LDFLAGS="$LDFLAGS -L$bdb_libdir"
2129
CPPFLAGS="$CPPFLAGS -I$bdb_incdir"
2131
if test x"$libdbfound" = x"no"
2133
AC_SEARCH_LIBS([db_create], $bdb_lib,
2136
if test x"$libdbfound" = x"no"
2138
AC_SEARCH_LIBS([db_open], $bdb_lib,
2141
if test x"$libdbfound" = x"no"
2143
AC_SEARCH_LIBS([dbopen], $bdb_lib,
2147
LDFLAGS="$saved_LDFLAGS"
2148
CPPFLAGS="$saved_CPPFLAGS"
1922
2152
if test x"$libdbfound" = x"no"
1924
AC_MSG_ERROR([cannot find db_create or dbopen])
2154
AC_MSG_ERROR([cannot find db_create, db_open or dbopen])
1927
2157
if test x"$bdb_incdir" != x""
1952
2182
if test x"$unboundpath" != x"no" -a x"$bdbrequired" = x"yes"
1954
2184
saved_LDFLAGS="$LDFLAGS"
1955
saved_CFLAGS="$CFLAGS"
2185
saved_CPPFLAGS="$CPPFLAGS"
1956
2186
LDFLAGS="$LDFLAGS $LIBDB_LIBDIRS $LIBUNBOUND_LIBDIRS"
1957
CFLAGS="$CFLAGS $LIBDB_INCDIRS $LIBUNBOUND_INCDIRS"
1958
AC_CHECK_LIB([db],[log_file],
1959
AC_CHECK_LIB([unbound],[log_file],
2187
CPPFLAGS="$CPPFLAGS $LIBDB_INCDIRS $LIBUNBOUND_INCDIRS"
2188
AC_CHECK_LIB([db], [log_file],
2189
AC_CHECK_LIB([unbound], [log_file],
1960
2190
AC_MSG_ERROR([Cannot enable feature requiring BerkeleyDB with libunbound - both have log_file defined. Please use newer BerkeleyDB version])
1963
2193
LDFLAGS="$saved_LDFLAGS"
1964
CFLAGS="$saved_CFLAGS"
2194
CPPFLAGS="$saved_CPPFLAGS"
1966
2196
AC_SUBST(LIBDB_INCDIRS)
1967
2197
AC_SUBST(LIBDB_LIBDIRS)
2036
2266
AC_SUBST([DOMAIN])
2269
AS_HELP_STRING([--with-erlang],
2270
[location of Erlang includes and library]),
2271
[erlpath="$withval"], [erlpath="no"])
2278
if test \( x"$erlpath" = x"yes" -o x"$erlpath" = x"auto" \)
2280
AC_MSG_CHECKING([for Erlang])
2281
b=`erl -noshell -eval 'io:format("~s~n", [[code:lib_dir()]]).' -s erlang halt`
2282
erlbase=`ls -d $b/erl_interface-* | tail -n1`
2283
AC_MSG_RESULT($erlbase)
2284
LIBERL_INCDIRS="-I$erlbase/include"
2285
LIBERL_LIBDIRS="-L$erlbase/lib"
2286
LIBERL_LIBS="-pthread -lerl_interface -lei"
2287
AC_DEFINE([USE_ERLANG], 1, [support for erlang access])
2291
if test x"$erlpath" != x"yes" -a x"$erlpath" != x"auto" -a x"$erlpath" != x"no"
2293
AC_MSG_CHECKING([for Erlang])
2294
if test -f $erlpath/include/ei.h
2296
AC_MSG_RESULT($erlpath)
2297
LIBERL_INCDIRS="-I$erlpath/include"
2298
LIBERL_LIBDIRS="-L$erlpath/lib"
2299
LIBERL_LIBS="-pthread -lerl_interface -lei"
2302
AC_MSG_ERROR(not found at $erlpath)
2306
if test x"$erl_found" = x"yes"
2308
saved_CPPFLAGS="$CPPFLAGS"
2309
CPPFLAGS="$LIBERL_INCDIRS"
2310
AC_DEFINE([USE_ERLANG], 1, [support for Erlang access])
2311
AC_SUBST([LIBERL_MANNOTICE], "")
2313
AC_SUBST([LIBERL_MANNOTICE], "(Not enabled for this installation.)")
2316
AM_CONDITIONAL(ERLANG, test x"$erl_found" = x"yes")
2317
AC_SUBST(LIBERL_INCDIRS)
2318
AC_SUBST(LIBERL_LIBDIRS)
2319
AC_SUBST(LIBERL_LIBS)
2039
2322
# final command line tweaks