SQUID_CC_GUESS_OPTIONS
-REGEXLIB='' # -lregex
-# LIBREGEX='' # libregex.a
+REGEXLIB='' # -lregex
+# LIBREGEX='' # libregex.a
dnl find out the exe extension for this platform. If it's not empty, use it for CGI's as well.
AC_EXEEXT
AC_OBJEXT
if test -z "$EXEEXT"; then
- CGIEXT=".cgi"
+ CGIEXT=".cgi"
else
- # automake automatically adds .exe when installing binaries
- CGIEXT=""
+ # automake automatically adds .exe when installing binaries
+ CGIEXT=""
fi
AC_SUBST(CGIEXT)
AM_CONDITIONAL(USE_IPC_WIN32,[test "$squid_host_os" = "mingw"])
if test $squid_host_os = "mingw"; then
- AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none)
- CFLAGS="$CFLAGS -mthreads"
- CXXFLAGS="$CXXFLAGS -mthreads"
- if test "$ac_cv_path_WIN32_PSAPI" = "none"; then
- AC_MSG_NOTICE([PSAPI.DLL is recommended to run Squid on Windows NT Platform])
- AC_MSG_NOTICE([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
- MINGW_LIBS="-lmingwex"
- AC_SUBST(MINGW_LIBS)
+ AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none)
+ CFLAGS="$CFLAGS -mthreads"
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ if test "$ac_cv_path_WIN32_PSAPI" = "none"; then
+ AC_MSG_NOTICE([PSAPI.DLL is recommended to run Squid on Windows NT Platform])
+ AC_MSG_NOTICE([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
+ MINGW_LIBS="-lmingwex"
+ AC_SUBST(MINGW_LIBS)
fi
if test -z "$CACHE_HTTP_PORT"; then
- CACHE_HTTP_PORT="3128"
+ CACHE_HTTP_PORT="3128"
fi
if test -z "$CACHE_ICP_PORT"; then
- CACHE_ICP_PORT="3130"
+ CACHE_ICP_PORT="3130"
fi
dnl Substitutions
AC_SUBST(DEFAULT_PIDFILE)
if test "$GCC" = "yes"; then
- GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
- GCCVER2=`echo $GCCVER | awk '{print $1 * 100}'`
- case "$host" in
- i386-*-freebsd*)
- if test $GCCVER2 -lt 300 ; then
- AC_MSG_FAILURE([GCC $GCCVER causes a coredump on $host. Try a more recent GCC version])
- fi
- ;;
- esac
- unset GCCVER
- unset GCCVER2
+ GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
+ GCCVER2=`echo $GCCVER | awk '{print $1 * 100}'`
+ case "$host" in
+ i386-*-freebsd*)
+ if test $GCCVER2 -lt 300 ; then
+ AC_MSG_FAILURE([GCC $GCCVER causes a coredump on $host. Try a more recent GCC version])
+ fi
+ ;;
+ esac
+ unset GCCVER
+ unset GCCVER2
fi
dnl Set Default CFLAGS
if test -z "$PRESET_CFLAGS"; then
- if test "$GCC" = "yes"; then
- case "$host" in
- *-sun-sunos*)
- # sunos has too many warnings for this to be useful
- # motorola too
- ;;
- *m88k*)
- # Motorola cc/ld does not like -02 but is ok on -O
- CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]/-O/'`
- ;;
- *)
- CFLAGS="$squid_cv_cc_option_wall $CFLAGS"
- ;;
- esac
- else
- case "$host" in
- *mips-sgi-irix6.*)
- # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
- CFLAGS="$squid_cv_cc_option_optimize -OPT:Olimit=0:space=OFF \
- -woff 1009,1014,1110,1116,1183,1185,1188,1204,1230,1233,1355 \
- -Wl,-woff,85,-woff,84,-woff,134 \
- -nostdinc -I/usr/include -D_BSD_SIGNALS $CFLAGS"
- CXXFLAGS="$squid_cv_cc_option_optimize -OPT:Olimit=0:space=OFF \
- -woff 1009,1014,1110,1116,1183,1185,1188,1204,1230,1233,1355 \
- -Wl,-woff,85,-woff,84,-woff,134 \
- -nostdinc -I/usr/include -D_BSD_SIGNALS $CXXFLAGS"
- ;;
- alpha-dec-osf4.*)
- # Mogul says DEC compilers take both -g and -O2
- CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
- CFLAGS="$squid_cv_cc_option_optimize $CFLAGS"
- ;;
- *)
- ;;
- esac
- fi
+ if test "$GCC" = "yes"; then
+ case "$host" in
+ *-sun-sunos*)
+ # sunos has too many warnings for this to be useful
+ # motorola too
+ ;;
+ *m88k*)
+ # Motorola cc/ld does not like -02 but is ok on -O
+ CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]/-O/'`
+ ;;
+ *)
+ CFLAGS="$squid_cv_cc_option_wall $CFLAGS"
+ ;;
+ esac
+ else
+ case "$host" in
+ *mips-sgi-irix6.*)
+ # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
+ CFLAGS="$squid_cv_cc_option_optimize -OPT:Olimit=0:space=OFF \
+ -woff 1009,1014,1110,1116,1183,1185,1188,1204,1230,1233,1355 \
+ -Wl,-woff,85,-woff,84,-woff,134 \
+ -nostdinc -I/usr/include -D_BSD_SIGNALS $CFLAGS"
+ CXXFLAGS="$squid_cv_cc_option_optimize -OPT:Olimit=0:space=OFF \
+ -woff 1009,1014,1110,1116,1183,1185,1188,1204,1230,1233,1355 \
+ -Wl,-woff,85,-woff,84,-woff,134 \
+ -nostdinc -I/usr/include -D_BSD_SIGNALS $CXXFLAGS"
+ ;;
+ alpha-dec-osf4.*)
+ # Mogul says DEC compilers take both -g and -O2
+ CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
+ CFLAGS="$squid_cv_cc_option_optimize $CFLAGS"
+ ;;
+ *)
+ ;;
+ esac
+ fi
fi
dnl set squid required flags
if test "$GCC" = "yes"; then
-dnl Guido Serassio (serassio@squid-cache.org) 20070811
-dnl Using the latest MinGW (gcc 3.4.5 + mingw-runtime 3.13) cannot build with
-dnl -Werror -Wmissing-prototypes -Wmissing-declarations
-dnl TODO: check if the problem will be present in any other newer MinGW release.
- case "$host_os" in
- mingw|mingw32)
- SQUID_CFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wcomments"
- ;;
- *)
- SQUID_CFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
- ;;
- esac
- SQUID_CXXFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wcomments"
+ if test "$squid_host_os" = "mingw" ; then
+ # Guido Serassio (serassio@squid-cache.org) 20070811
+ # Using the latest MinGW (gcc 3.4.5 + mingw-runtime 3.13) cannot build with
+ # -Werror -Wmissing-prototypes -Wmissing-declarations
+ # TODO: check if the problem will be present in any other newer MinGW release.
+ SQUID_CFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wcomments"
+ else
+ SQUID_CFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
+ fi
+ SQUID_CXXFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wcomments"
else
- SQUID_CFLAGS=
- SQUID_CXXFLAGS=
+ # initialize to empty
+ SQUID_CFLAGS=
+ SQUID_CXXFLAGS=
fi
if test "$squid_opt_enable_werror" = "no"
# Enable Large file support
#
-squid_opt_buildmodel=""
-squid_opt_enable_large_files=no
-
+squid_opt_enable_large_files="no"
AC_ARG_WITH(large-files,
AS_HELP_STRING([--with-large-files],[Enable support for large files (logs etc).]),
-[ if test "x$withval" = "xyes"; then
- squid_opt_enable_large_files=yes
+[ if test "$withval" = "yes"; then
+ squid_opt_enable_large_files="yes"
fi
])
# UNIX Build environment
# AS_HELP_STRING is not suited here because it doesn't allow to specify newlines
+squid_opt_buildmodel=""
AC_ARG_WITH(build-environment,
[ --with-build-environment=model
The build environment to use. Normally one of
LIBS="`getconf ${squid_opt_buildmodel}_LIBS` $LIBS"
LDFLAGS="`getconf ${squid_opt_buildmodel}_LDFLAGS` $LDFLAGS"
if "$squid_host_os" = "solaris" ; then
-
-# On Solaris getconf returns for CFLAGS -xarch=generic64, -Xa and -Usun options, and
-# for LDFLAGS -xarch=generic64, but:
-# "-Xa" is supported only by Sun cc, so we need to remove it when using gcc
-# For gcc "-xarch=generic64" must be replaced with "-m64"
-# The 'sun' define is needed by ipfilter includes, so we must remove "-Usun"
- if test "$GCC" = "yes"; then
- AC_MSG_NOTICE([Removing -Xa for gcc/g++ on $host])
- CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`"
- CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`"
- AC_MSG_NOTICE([Replacing -xarch=generic64 with -m64 for gcc/g++ on $host])
- CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
- CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
- LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`"
- fi
- AC_MSG_NOTICE([Removing -Usun on $host])
+ if test "$GCC" = "yes"; then
+ # On Solaris getconf returns for CFLAGS -xarch=generic64, -Xa and -Usun options, and
+ # for LDFLAGS -xarch=generic64, but:
+ # "-Xa" is supported only by Sun cc, so we need to remove it when using gcc
+ # For gcc "-xarch=generic64" must be replaced with "-m64"
+ # The 'sun' define is needed by ipfilter includes, so we must remove "-Usun"
+ AC_MSG_NOTICE([Removing -Xa for gcc/g++ on $host])
+ CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`"
+ AC_MSG_NOTICE([Replacing -xarch=generic64 with -m64 for gcc/g++ on $host])
+ CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
+ LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`"
+ fi
+ AC_MSG_NOTICE([Removing -Usun on $host])
CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`"
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Usun//'`"
fi