[GIT-PULLS] [php-src] PR #23247: Fix GH-23244: sync PHP 8.4 m4 file with 8.5

[email protected] (LamentXU123)
Newsgroups php.git-pulls
Message-ID <wzbFncdvg8JimgKhybWwUXZAqfbVSU6sc6uDRafJax4@main.internal.php.net>
Pull Request: https://github.com/php/php-src/pull/23247
Author: LamentXU123

PHP 8.4 still used the older manual LDAP library detection when `--with-ldap` was passed without an explicit directory, which cause GH-23244 that only occurs on 8.4.
In 8.5 since 3677871, we've implement a better configure logic, here we can directly sync the 8.5 .m4 file to 8.4 to fix the bug (without deprecations that only affects 8.5+).

This cherry-picked:
  367787134761f8c0e90ea2b1dd402b6c5795c687
  Use pkg-config for ext/ldap without a directory (#17441)

  25e8aa5cd22d5d461a5db247cfaedbba6e85e566
  Autotools: Fix ext/ldap shared build (#18673)

  840dc1981f90edca0bbbdace5e19c3118525e75a
  fix ldap.h detection without pkgconfig (#19005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.