AC_INIT(src)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(dovecot, 1.0-test6)
+AM_INIT_AUTOMAKE(dovecot, 1.0-test7)
AM_MAINTAINER_MODE
AM_PROG_LIBTOOL
AM_ICONV
-AC_CHECK_HEADERS(string.h stdlib.h stdint.h unistd.h dirent.h)
+AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h)
AC_CHECK_HEADERS(sys/uio.h sys/sysmacros.h sys/resource.h linux/mman.h)
AC_CHECK_HEADERS(sys/select.h)
AC_DEFINE(IOLOOP_NOTIFY_NONE,, No special notify support)
])
+dnl * GLIBC?
+AC_TRY_COMPILE([
+ #include <stdlib.h>
+ #ifdef __GLIBC__
+ we have glibc
+ #endif
+],,, [
+ AC_DEFINE(PREAD_WRAPPERS,, Define if pread/pwrite needs _XOPEN_SOURCE 500)
+])
+
dnl * OS specific options
case "$host_os" in
hpux*)
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
;;
- linux*)
- AC_DEFINE(PREAD_WRAPPERS,, Define if pread/pwrite needs _XOPEN_SOURCE 500)
- ;;
*)
;;
esac
/* default system includes - keep these at minimum.. */
#include <string.h> /* strcmp() etc. */
+#ifdef HAVE_STRINGS_H
+# include <strings.h> /* strcasecmp() etc. */
+#endif
#include <stdarg.h> /* va_list is used everywhere */
#include <limits.h> /* INT_MAX, etc. */
#include <errno.h> /* error checking is good */