fi
-dnl ********************************* KK ***********************
SQUID_CC_GUESS_VARIANT
SQUID_CC_GUESS_OPTIONS
fi
AC_MSG_RESULT([${squid_disk_module_candidates_output:-none}])
+SQUID_CHECK_EXISTING_MODULES([$srcdir/src/DiskIO],[squid_disk_module_candidates])
AC_DEFINE_UNQUOTED([USE_DISKIO],[$squid_opt_enable_diskio],
[DiskIO modules are expected to be available.])
+
+dnl ****************** KK HERE *********************
dnl Some autoconf.h defines we might enable later...
AC_DEFINE(USE_DISKIO_AIO, 0, [Whether POSIX AIO support is needed. Automatic])
AC_DEFINE(USE_DISKIO_DISKTHREADS, 0, [Whether pthreads support is needed. Automatic])
AIOLIB=
dnl Setup the module paths etc.
-FOUND_DISKIO_AIO=
-FOUND_DISKIO_BLOCKING=
-FOUND_DISKIO_DISKDAEMON=
-FOUND_DISKIO_DISKTHREADS=
DISK_LIBS=
DISK_OS_LIBS=
DISK_MODULES=
fi
case "$module" in
DiskDaemon)
- if test "$FOUND_DISKIO_DISKDAEMON" = "yes" ; then
- AC_MSG_ERROR([DiskIO DiskDaemon module listed twice.])
- fi
- FOUND_DISKIO_DISKDAEMON="yes"
AC_MSG_NOTICE([Enabling DiskDaemon DiskIO module])
DISK_LIBS="$DISK_LIBS libDiskDaemon.a"
DISK_MODULES="$DISK_MODULES DiskDaemon"
DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/DiskDaemon/DiskDaemonDiskIOModule.o"
;;
DiskThreads)
- if test "$FOUND_DISKIO_DISKTHREADS" = "yes" ; then
- AC_MSG_ERROR([DiskIO DiskThreads module listed twice.])
- fi
- FOUND_DISKIO_DISKTHREADS="yes"
use_diskthreads="yes"
LIBPTHREADS=
SAVE_SQUID_CFLAGS="$SQUID_CFLAGS"
;;
AIO)
- if test "$FOUND_DISKIO_AIO" = "yes" ; then
- AC_MSG_ERROR([DiskIO AIO module listed twice.])
- fi
- FOUND_DISKIO_AIO="yes"
dnl Check for POSIX AIO availability
use_aio="yes"
AIOLIB=
;;
Blocking)
- if test "$FOUND_DISKIO_BLOCKING" = "yes" ; then
- AC_MSG_ERROR([DiskIO Blocking module listed twice.])
- fi
- FOUND_DISKIO_BLOCKING="yes"
AC_MSG_NOTICE([Enabling Blocking DiskIO module])
DISK_LIBS="$DISK_LIBS libBlocking.a"
DISK_MODULES="$DISK_MODULES Blocking"
dnl Check what Storage formats are wanted.
dnl This version will error out with a message saying why if a required DiskIO is missing.
-squid_opt_enable_diskio=auto
+squid_opt_enable_storeio=auto
AC_ARG_ENABLE([storeio],
AS_HELP_STRING([--enable-storeio="list of modules"],
[Build support for the list of store I/O modules.
for details on how to build your custom store module]),
[ case $enableval in
yes)
- squid_opt_enable_diskio=auto
+ squid_opt_enable_storeio=auto
;;
no)
- squid_opt_enable_diskio=no
+ squid_opt_enable_storeio=no
;;
*)
- squid_opt_enable_diskio=yes
+ squid_opt_enable_storeio=yes
squid_storeio_module_candidates="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
;;
esac
])
-if test "$squid_opt_enable_diskio" = "auto"; then
- squid_opt_enable_diskio=yes
+if test "$squid_opt_enable_storeio" = "auto"; then
+ squid_opt_enable_storeio=yes
AC_MSG_CHECKING([for available StoreIO modules])
SQUID_LOOK_FOR_MODULES([$srcdir/src/fs],[squid_storeio_module_candidates])
AC_MSG_RESULT([$squid_storeio_module_candidates])
fi
-if test -n "$squid_disk_module_candidates"; then
- dnl ensure that all modules a) exist and b) only include once.
- squid_disk_module_candidates_FULL=$squid_disk_module_candidates
- squid_disk_module_candidates=
- for module in $squid_disk_module_candidates_FULL; do
- have_mod=`echo "$squid_disk_module_candidates" | grep "$module"`
- if test "$have_mod" != ""; then
- AC_MSG_NOTICE([Removing duplicate $module from storeio])
- elif test -d $srcdir/src/fs/$module; then
- squid_disk_module_candidates="$squid_disk_module_candidates $module"
- else
- AC_MSG_ERROR(storeio $module does not exist)
- fi
- done
- for module in $squid_disk_module_candidates_FULL; do
- case "$module" in
- coss)
- echo "WARNING: COSS Support is not stable yet in Squid-3. Please do not use."
- sleep 10
- ;;
- esac
- done
- AC_MSG_NOTICE([Store modules built: $squid_disk_module_candidates])
-fi
-for fs in $squid_disk_module_candidates none; do
+SQUID_CLEANUP_MODULES_LIST([squid_storeio_module_candidates])
+SQUID_CHECK_EXISTING_MODULES([$srcdir/src/fs],[squid_storeio_module_candidates])
+AC_MSG_NOTICE([Store modules built: $squid_storeio_module_candidates])
+
+for fs in $squid_storeio_module_candidates none; do
case "$fs" in
diskd)
- if ! test "$FOUND_DISKIO_BLOCKING" = "yes" && ! test "$FOUND_DISKIO_DISKDAEMON" = "yes" ; then
+ if test "$squid_disk_module_candidates_Blocking" != "yes" -a "$squid_disk_module_candidates_DiskDaemon" != "yes" ; then
AC_MSG_ERROR([Storage diskd module requires DiskIO modules: Blocking or DiskDaemon])
fi
- NEED_UFS="true"
+ squid_storeio_module_candidates="$squid_storeio_module_candidates ufs"
;;
aufs)
- if ! test "$FOUND_DISKIO_BLOCKING" = "yes" && ! test "$FOUND_DISKIO_DISKTHREADS" = "yes" ; then
+ if test "$squid_disk_module_candidates_Blocking" != "yes" -a "$squid_disk_module_candidates_DiskThreads" != "yes" ; then
AC_MSG_ERROR([Storage diskd module requires DiskIO modules: Blocking or DiskThreads])
fi
- NEED_UFS="true"
+ squid_storeio_module_candidates="$squid_storeio_module_candidates ufs"
;;
coss)
- if ! test "$FOUND_DISKIO_AIO" = "yes"; then
+ AC_MSG_WARN([COSS Support is not stable yet in Squid-3. Please do not use.\a])
+ sleep 10
+ if ! test "$squid_disk_module_candidates_AIO" = "yes"; then
AC_MSG_ERROR([COSS requires POSIX AIO which is not available.])
fi
dnl
esac
done
-if test -z "$UFS_FOUND" && test -n "$NEED_UFS"; then
+SQUID_CLEANUP_MODULES_LIST([squid_storeio_module_candidates])
+
+if test -n "$NEED_UFS"; then
AC_MSG_NOTICE([Adding UFS, as it contains core logic for diskd and aufs])
- squid_disk_module_candidates="$squid_disk_module_candidates ufs"
+ squid_storeio_module_candidates="$squid_storeio_module_candidates ufs"
dnl
dnl Automake om MinGW needs explicit exe extension
dnl for STORE_TESTS substition
AH_TEMPLATE(HAVE_FS_COSS, "Define to 1 if coss filesystem module is build")
-dnl got final squid_disk_module_candidates, build library lists
+dnl got final squid_storeio_module_candidates, build library lists
dnl This list will not be needed when each fs library has its own Makefile
STORE_LIBS_TO_BUILD=
dnl File system libraries to link executables with.
dnl These are the same as STORE_LIBS_TO_BUILD, but with a path
STORE_LIBS_TO_ADD=
-for fs in $squid_disk_module_candidates; do
+for fs in $squid_storeio_module_candidates; do
STORE_LIBS_TO_BUILD="$STORE_LIBS_TO_BUILD lib${fs}.la"
STORE_LIBS_TO_ADD="$STORE_LIBS_TO_ADD fs/lib${fs}.la"
HAVE_FS_TYPE=HAVE_FS_`echo $fs | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`