Index: configure.in =================================================================== RCS file: /cvsroot/squid/squid3/configure.in,v retrieving revision 1.45 diff -u -p -r1.45 configure.in --- configure.in 19 Aug 2003 02:12:46 -0000 1.45 +++ configure.in 31 Aug 2003 09:37:48 -0000 @@ -51,7 +51,7 @@ AC_SUBST(CGIEXT) dnl this should be expanded to a list of platform sensible support requirements. dnl (adding an option like --enable-cygwin-support doesn't make sense :]) - R Collins 2001 case "$host_os" in -cygwin|cygwin32) +mingw|mingw32|cygwin|cygwin32) AM_CONDITIONAL(ENABLE_WIN32SPECIFIC, true) ;; *) @@ -1433,6 +1433,14 @@ dnl Check for headers AC_HEADER_DIRENT AC_HEADER_STDC +dnl Override crypt.h and getopt.h detect on MinGW becasue are provided with source code +case "$host_os" in +mingw|mingw32) + ac_cv_header_crypt_h='yes' + ac_cv_header_getopt_h='yes' + ;; +esac + AC_CHECK_HEADERS( \ arpa/inet.h \ arpa/nameser.h \ @@ -1564,13 +1572,25 @@ AC_CHECK_MEMBERS([struct mallinfo.mxfast #include #endif]) -AC_CHECK_TYPE(struct rusage,AC_DEFINE(HAVE_STRUCT_RUSAGE,1,[The system provides struct rusage]),,[ +dnl Override rusage() and getopt() detect on MinGW becasue are emulated in source code +case "$host_os" in + mingw|mingw32) + AC_DEFINE(HAVE_STRUCT_RUSAGE) + ac_cv_func_getrusage='yes' + echo "Using own rusage." + AC_LIBOBJ(getopt) + echo "Using own getopt." + ;; + *) + AC_CHECK_TYPE(struct rusage,AC_DEFINE(HAVE_STRUCT_RUSAGE,1,[The system provides struct rusage]),,[ #if HAVE_SYS_TIME_H #include #endif #if HAVE_SYS_RESOURCE_H #include #endif]) + ;; +esac AC_CHECK_MEMBERS([struct iphdr.ip_hl],,,[ #if HAVE_SYS_TYPES_H @@ -1924,6 +1944,14 @@ if test -z "$ac_cv_func_poll"; then esac fi +dnl Override crypt() and statfs() detect on MinGW becasue are emulated in source code +case "$host_os" in +mingw|mingw32) + ac_cv_func_crypt='yes' + ac_cv_func_statfs='yes' + ;; +esac + dnl Check for library functions AC_CHECK_FUNCS(\ backtrace_symbols_fd \ @@ -2404,12 +2432,19 @@ if test "$INET_NTOA_RESULT" = "1.2.3.4" AC_MSG_RESULT("yes") else AC_MSG_RESULT("no") - echo "Will use our own inet_ntoa()." - AC_LIBOBJ(inet_ntoa) + case "$host_os" in + mingw|mingw32) + echo "Using Win32 resolver instead." + ;; + *) + echo "Will use our own inet_ntoa()." + AC_LIBOBJ(inet_ntoa) # echo "WARNING: This looks bad, and probably prevents Squid from working." # echo " If you're on IRIX and using GCC 2.8, you probably need" # echo " to use the IRIX C compiler instead." # sleep 10 + ;; + esac fi if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then