Certainly use of `$as_unset' is redundant, and explicitly marked <as
another defense> - so that the code works even if it turns that for
some reason original behavior of `AC_CACHE_VALUE' must be retained.
`AC_CACHE_CHECK' uses are so that reverting to original
`AC_CACHE_VALUE' behavior is allowed. Unlike `AC_CHECK_LIB' with
automatically generated cache variable name, names passed to it are
explicit, so name clashes are avoided. After all, the same
configuring of ldap libraries is obviously useful in other projects
(perhaps better write it as an explicit autoconf macro).
The code called "upstream" is that of xemacs as stored in
cvs.xemacs.org.
Builder can override ldap_libs by setting `ldap_libs' variable - in
one of `$CONFIG_SITE' files, or even (when using autoconf 2.5x) in
`configure' arguments.