]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix libdiskio build with auto-disabled modules
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 29 Jul 2015 03:29:17 +0000 (20:29 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 29 Jul 2015 03:29:17 +0000 (20:29 -0700)
The squid_disk_module_candidates_* autoconf variable for disabled
disk I/O modules needs to be explicitly set to 'no' to perform the
disabling. Do this for all modules that were not doing so when module
dependencies were broken or absent.

Also, convert the IpcIo module from a hard ERROR, to a soft auto-disable
when SHM support is not present.

configure.ac

index 06a7a041cd6d3d4d957af3ff174d1e1ff0dd61b7..53e95dccbe5e181af81a95ec493e20f91ab72845 100644 (file)
@@ -592,6 +592,7 @@ for module in $squid_disk_module_candidates none; do
         esac
       else
         AC_MSG_NOTICE([AIO DiskIO Module disabled. Missing POSIX AIO support.])
+        squid_disk_module_candidates_AIO=no
       fi
       ;;
 
@@ -606,6 +607,7 @@ for module in $squid_disk_module_candidates none; do
       case "$squid_host_os" in
         mingw)
           AC_MSG_NOTICE(["DiskDaemon not supported on MinGW"])
+          squid_disk_module_candidates_DiskDaemon=no
           ;;
         *)
           AC_MSG_NOTICE([Enabling DiskDaemon DiskIO module])
@@ -692,17 +694,20 @@ for module in $squid_disk_module_candidates none; do
         else
           AC_MSG_NOTICE([Native pthreads support disabled. DiskThreads module automaticaly disabled.])
           SQUID_STATE_ROLLBACK([diskthreads_state])
+          squid_disk_module_candidates_DiskThreads=no
         fi
       ;;
 
     IpcIo)
       AC_MSG_NOTICE([Enabling IpcIo DiskIO module])
       if test "x$ac_cv_search_shm_open" = "xno" ; then
-        AC_MSG_ERROR([DiskIO IpcIo module requires shared memory support])
+        AC_MSG_NOTICE([DiskIO IpcIo module requires shared memory support])
+        squid_disk_module_candidates_IpcIo=no
+      else
+        DISK_MODULES="$DISK_MODULES IpcIo"
+        DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/IpcIo/IpcIoDiskIOModule.o"
+        AC_DEFINE([HAVE_DISKIO_MODULE_IPCIO],1,[IpcIo Disk I/O module is built])
       fi
-      DISK_MODULES="$DISK_MODULES IpcIo"
-      DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/IpcIo/IpcIoDiskIOModule.o"
-      AC_DEFINE([HAVE_DISKIO_MODULE_IPCIO],1,[IpcIo Disk I/O module is built])
       ;;
 
     Mmapped)
@@ -710,6 +715,7 @@ for module in $squid_disk_module_candidates none; do
       dnl  OR support windows mmap functions
       if test "x$squid_host_os" = "xmingw" ; then
         AC_MSG_NOTICE([Mmapped DiskIO is not available on Mingw])
+        squid_disk_module_candidates_Mmapped=no
       else
         AC_MSG_NOTICE([Enabling Mmapped DiskIO module])
         DISK_MODULES="$DISK_MODULES Mmapped"