AC_PATH_PROG(CHMOD, chmod, $FALSE)
AC_PATH_PROG(TR, tr, $FALSE)
AC_PATH_PROG(RM, rm, $FALSE)
+AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false)
dnl Libtool 2.2.6 requires: rm -f
RM="$RM -f"
esac
AC_SUBST(AR_R)
-AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false)
dnl Make the squid top srcdir available to sub-packages as --with-squid=PATH
ac_configure_args="$ac_configure_args --with-squid=$ac_abs_confdir"
SquidInline="yes"
AC_ARG_ENABLE(optimizations,
- AS_HELP_STRING([--disable-optimizations],[Don't compile Squid with compiler optimizations enabled.
+ AS_HELP_STRING([--disable-optimizations],
+ [Don't compile Squid with compiler optimizations enabled.
Optimization is good for production builds, but not
good for debugging. During development, use
--disable-optimizations to reduce compilation times
fi
])
+AH_TEMPLATE(_USE_INLINE_,[Include inline methods into header file])
AC_ARG_ENABLE(inline,
AS_HELP_STRING([--disable-inline],[Don't compile trivial methods as inline. Squid
is coded with much of the code able to be inlined.
if test "$SquidInline" = "yes" ; then
AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods])
- AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file])
+ AC_DEFINE(_USE_INLINE_, 1 , [Include inline methods into header file])
else
AC_MSG_NOTICE([Inlining optimization disabled])
- AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
+ AC_DEFINE(_SQUID_INLINE_,[], [Keyword used by squid for inlining methods])
fi
AH_TEMPLATE(CBDATA_DEBUG,[Enable for cbdata debug information])
AH_TEMPLATE(USE_DISKIO_AIO, [Whether POSIX AIO support is needed. Automatic])
AH_TEMPLATE(USE_DISKIO_DISKTHREADS, [Whether pthreads support is needed. Automatic])
USE_AIOPS_WIN32=0
-use_aio=
-use_diskthreads=
+squid_opt_use_aio=
+squid_opt_use_diskthreads=
AIOLIB=
dnl Setup the module paths etc.
DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/DiskDaemon/DiskDaemonDiskIOModule.o"
;;
DiskThreads)
- use_diskthreads="yes"
+ squid_opt_use_diskthreads="yes"
LIBPTHREADS=
SAVE_SQUID_CFLAGS="$SQUID_CFLAGS"
SAVE_SQUID_CXXFLAGS="$SQUID_CXXFLAGS"
if test "$GCC" = "yes" ; then
SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT -pthreads"
SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT -pthreads"
- AC_CHECK_LIB(pthread, main,[LIBPTHREADS="-lpthread"],
+ AC_CHECK_LIB(pthread, pthread_create ,[LIBPTHREADS="-lpthread"],
[ AC_MSG_NOTICE(pthread library required but cannot be found.)
- use_diskthreads="no"
+ squid_opt_use_diskthreads="no"
])
else
dnl test for -lpthread first. libc version is a stub apparently on Solaris.
SQUID_CXXFLAGS="$SAVE_SQUID_CXXFLAGS -D_REENTRANT -lpthread -mt"
AC_CHECK_LIB(pthread, main,[LIBPTHREADS="-lpthread"],
[ AC_MSG_NOTICE(pthread library required but cannot be found.)
- use_diskthreads="no"
+ squid_opt_use_diskthreads="no"
])
])
fi
SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT"
AC_CHECK_LIB(pthread, main,[LIBPTHREADS="-lpthread"],
[ AC_MSG_NOTICE(pthread library required but cannot be found.)
- use_diskthreads="no"
+ squid_opt_use_diskthreads="no"
])
;;
esac
else
AC_MSG_NOTICE([Native pthreads support manually disabled.])
- use_diskthreads="no"
+ squid_opt_use_diskthreads="no"
fi
- if test "$use_diskthreads" = "yes" ; then
+ if test "$squid_opt_use_diskthreads" = "yes" ; then
AC_DEFINE(USE_DISKIO_DISKTHREADS, 1, [Whether pthreads support is needed. Automatic])
AC_MSG_NOTICE([Enabling DiskThreads DiskIO module])
DISK_LIBS="$DISK_LIBS libDiskThreads.a"
AIO)
dnl Check for POSIX AIO availability
- use_aio="yes"
+ squid_opt_use_aio="yes"
AIOLIB=
AC_ARG_WITH(aio, AS_HELP_STRING([--without-aio],[Do not use POSIX AIO. Default: auto-detect]))
if test "$with_aio" != "no"; then
dnl Enable AIO if the library and headers are found
if test "$AIOLIB" != "" && test "$have_aio_header" = "yes"; then
AC_MSG_NOTICE([Native POSIX AIO support detected.])
- use_aio="yes"
+ squid_opt_use_aio="yes"
else
dnl Windows does things differently. We provide wrappers.
dnl TODO: Windows really needs its own DiskIO module or its Overlaped IO
case "$host_os" in
mingw|mingw32)
- use_aio="yes"
+ squid_opt_use_aio="yes"
AC_MSG_NOTICE([Windows being built. Maybe-enable POSIX AIO.])
;;
*)
AC_MSG_NOTICE([Native POSIX AIO support not detected. AIO automatically disabled.])
- use_aio="no"
+ squid_opt_use_aio="no"
;;
esac
fi
else
AC_MSG_NOTICE([POSIX AIO support manually disabled.])
- use_aio="no"
+ squid_opt_use_aio="no"
fi
dnl Use the POSIX AIO pieces if we actually need them.
- if test "$use_aio" = "yes" ; then
+ if test "$squid_opt_use_aio" = "yes" ; then
AC_DEFINE(USE_DISKIO_AIO, 1, [Whether POSIX AIO support is needed. Automatic])
DISK_MODULES="$DISK_MODULES AIO"
DISK_LIBS="$DISK_LIBS libAIO.a"