]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
refactored module check for replacement policies.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 7 Dec 2009 09:52:25 +0000 (10:52 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 7 Dec 2009 09:52:25 +0000 (10:52 +0100)
configure.in

index 710494bcb9d0e68c8280e243158d41bd88c92ae1..e5079fd1f18732e0478f139139b7a45597426437 100644 (file)
@@ -794,7 +794,8 @@ dnl 'lru' removal policy is currently hard-coded by name for tests
 dnl so we must set it as default.
 REPL_POLICIES="lru"
 AC_ARG_ENABLE(removal-policies,
-  AS_HELP_STRING([--enable-removal-policies="list of policies"],[Build support for the list of removal policies.
+  AS_HELP_STRING([--enable-removal-policies="list of policies"],
+                 [Build support for the list of removal policies.
                   The default is only to build the "lru" module.
                   See src/repl for a list of available modules, or
                   Programmers Guide section 9.9 for details on how
@@ -816,13 +817,7 @@ AC_ARG_ENABLE(removal-policies,
   esac
 ])
 if test -n "$REPL_POLICIES"; then
-    for module in $REPL_POLICIES; do
-       if test -d $srcdir/src/repl/$module; then
-           :
-       else
-           AC_MSG_ERROR(Removal policy $module does not exist)
-       fi
-    done
+    SQUID_CHECK_EXISTING_MODULES([$srcdir/src/repl],[REPL_POLICIES])
     AC_MSG_NOTICE([Removal policies built: $REPL_POLICIES])
     REPL_OBJS="repl/lib`echo $REPL_POLICIES|sed -e 's% %.a repl/lib%g'`.a"
     REPL_LIBS="`echo $REPL_OBJS|sed -e 's%repl/%%g'`"