diff configure.in @ 1989:a2b009c65e02 HEAD

Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux. Removed a few ANSI-C header checks. Added strings.h check and include it automatically if it's found, for strcasecmp().
author Timo Sirainen <tss@iki.fi>
date Mon, 10 May 2004 03:40:42 +0300
parents 6303ef092c5b
children 049502ef137e
line wrap: on
line diff
--- a/configure.in	Mon May 10 02:52:13 2004 +0300
+++ b/configure.in	Mon May 10 03:40:42 2004 +0300
@@ -1,7 +1,7 @@
 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
 
@@ -14,7 +14,7 @@
 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)
 
@@ -262,14 +262,21 @@
   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