dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.374 2005/04/25 12:03:34 serassio Exp $
+dnl $Id: configure.in,v 1.375 2005/06/03 12:59:06 serassio Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE(squid, 3.0-PRE3-CVS)
AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.374 $)dnl
+AC_REVISION($Revision: 1.375 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
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)
;;
*)
;;
esac
+case "$host_os" in
+mingw|mingw32)
+ AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none)
+ CFLAGS="$CFLAGS -mthreads"
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ if test "$ac_cv_path_WIN32_PSAPI" = "none"; then
+ echo "PSAPI.DLL is recommended to run Squid on Windows NT Platform"
+ echo "Please see PSAPI.DLL section on doc/win32-relnotes.html."
+ else
+ AC_DEFINE(HAVE_WIN32_PSAPI,1,[Define if you have PSAPI.DLL on Windows systems])
+ LIBS="$LIBS -lpsapi"
+ fi
+ ;;
+esac
+
if test -z "$CACHE_HTTP_PORT"; then
CACHE_HTTP_PORT="3128"
fi
echo "SSL gatewaying using OpenSSL enabled"
AC_DEFINE(USE_SSL,1,[Define this to include code for SSL encryption.])
AM_CONDITIONAL(ENABLE_SSL, true)
- SSLLIB='-lssl -lcrypto'
+ case "$host_os" in
+ mingw|mingw32)
+ dnl Native Windows port of OpenSSL needs -lgdi32
+ SSLLIB='-lssl -lcrypto -lgdi32'
+ ;;
+ *)
+ SSLLIB='-lssl -lcrypto'
+ ;;
+ esac
USE_OPENSSL=1
fi
])
dnl Check for needed libraries
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(socket, main)
+case "$host_os" in
+ mingw|mingw32)
+ AC_MSG_CHECKING(for winsock)
+ save_LIBS="$LIBS"
+ for curlib in ws2_32 wsock32; do
+ LIBS="$LIBS -l$curlib"
+ AC_TRY_LINK([
+ char __attribute__((stdcall)) socket(int,int,int);
+ char __attribute__((stdcall)) select(int,int,int,int,int);
+ char __attribute__((stdcall)) closesocket(int);
+ char __attribute__((stdcall)) gethostname(int,int);
+ ],
+ [
+ socket(1,2,3);
+ select(1,2,3,4,5);
+ closesocket(1);
+ gethostname(1,2);
+ ],
+ have_winsock=yes, have_winsock=no)
+
+ if test $have_winsock = yes; then
+ ac_cv_func_select='yes'
+ if test $curlib = ws2_32; then
+ have_winsock=winsock2
+ fi
+ break
+ fi
+ LIBS="$save_LIBS"
+ done
+ AC_MSG_RESULT($have_winsock)
+ ;;
+esac
dnl Ripped from the Samba sources
AC_CACHE_CHECK([for unix domain sockets],squid_cv_unixsocket, [
SQUID_MAXFD=`cat conftestval`,
SQUID_MAXFD=256,
SQUID_MAXFD=256)
+ dnl Microsoft MSVCRT.DLL supports 2048 maximum FDs
+ case "$host_os" in
+ mingw|mingw32)
+ SQUID_MAXFD="2048"
+ ;;
+ esac
AC_MSG_RESULT($SQUID_MAXFD)
fi
AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD,[Maximum number of open filedescriptors])
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
- 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
+ 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