X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/da401a155138ef0affde38d3a040b68d078d1dad..52391b538640f320acb25a66b673042c51567f61:/configure.ac diff --git a/configure.ac b/configure.ac index 35118f34..df70c7ab 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AS_IF([test x"$with_cyrus_sasl" != x -a x"$with_cyrus_sasl" != x"no"],[ dnl Do you want client-side support for encryption with TLS? AC_ARG_WITH([tls], AS_HELP_STRING([--with-tls], [Enable TLS support])) -AS_IF([test x"$with_tls" != x -a x"$with_tls" != x"no"],[ +AS_IF([test x"$with_tls" != x"no"],[ AC_DEFINE([TLS_SUPPORT], [1], [Support TLS for session encryption.])dnl tls_support=yes],[tls_support=no]) @@ -153,6 +153,12 @@ if test -n "$auto_cflags"; then test "$nmh_cv_has_wextra" = "yes" && CFLAGS="${CFLAGS:+$CFLAGS }-Wextra" fi +dnl FreeBSD needs a bit of magic to bring getline() into scope. +dnl We do this here rather than in (say) h/mh.h because this macro must +dnl be defined before is pulled in. +AS_IF([test `uname` = FreeBSD], + [CPPFLAGS="$CPPFLAGS -D_WITH_GETLINE"]) + dnl -------------- dnl CUSTOMIZE LINK dnl -------------- @@ -341,7 +347,7 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1, dnl --------------- dnl CHECK FUNCTIONS dnl --------------- -AC_CHECK_FUNCS([wcwidth mbtowc getutxent arc4random]) +AC_CHECK_FUNCS([wcwidth mbtowc getutxent arc4random mkstemps]) dnl Check for multibyte character set support AS_IF([test "x$ac_cv_header_wchar_h" = "xyes" -a \ @@ -404,7 +410,7 @@ if test "$nmh_ndbm" = "autodetect"; then dnl first so we don't accidentally link in a pointless but harmless dnl library in one of the later ndbm.h+libfoo tests: NMH_CHECK_NDBM(ndbm.h,,, - dnl Berkeley DBv2 emulating ndbm: header in db.h: + dnl Berkeley DBv2 emulating ndbm: header in db.h, e.g., 32-bit Cygwin: NMH_CHECK_NDBM(db.h,db,, dnl Berkeley DBv1 emulating ndbm: NMH_CHECK_NDBM(ndbm.h,db,, @@ -418,8 +424,11 @@ if test "$nmh_ndbm" = "autodetect"; then NMH_CHECK_NDBM(gdbm/ndbm.h,gdbm,, NMH_CHECK_NDBM(gdbm/ndbm.h,gdbm_compat -lgdbm,, NMH_CHECK_NDBM(ndbm.h,gdbm,, - NMH_CHECK_NDBM(ndbm.h,gdbm_compat -lgdbm)))))))))) - + dnl 64-bit Cygwin: + NMH_CHECK_NDBM(ndbm.h,gdbm_compat -lgdbm,, + dnl On Linux, libgdbm_compat.so loads libgdbm.so as well, so it doesn't + dnl need to be explicit: + NMH_CHECK_NDBM(gdbm-ndbm.h,gdbm_compat))))))))))) fi else dnl We don't really need to check that the user-specified values work, @@ -487,14 +496,14 @@ dnl ---------------- dnl CHECK FLEX FIXUP dnl ---------------- dnl Use LFLAGS make variable setting to work around bugs in flex -dnl 2.5.36 that cause signed/unsigned mismatch, +dnl 2.5.36-37 that cause signed/unsigned mismatch, dnl http://sourceforge.net/p/flex/bugs/140/ AS_IF([test "$LEX" = flex], [AS_CASE([`$LEX -V`], [flex\ 2.5.35], [LFLAGS=\ -'; sed -e "s/ int n;/ size_t n;/" $@ >$@.tmp && mv -f $@.tmp $@; true'], - [flex\ 2.5.36], [LFLAGS=\ -'; sed -s "s/\( \)int i;/\1yy_size_t i;/" $@ >$.tmp && mv -f $@.tmp $@; true']) +'; sed "s/ int n;/ size_t n;/" $@ >$@.tmp && mv -f $@.tmp $@'], + [flex\ 2.5.3[[67]]], [LFLAGS=\ +'; sed "s/\( \)int i;/\1yy_size_t i;/" $@ >$@.tmp && mv -f $@.tmp $@']) AC_SUBST([LFLAGS])]) dnl ----------------