Description
Issue Description
I've updated CI images to F36 and noticed that all compile jobs failed.
https://github.com/389ds/389-ds-base/runs/6556076219?check_suite_focus=true
checking for --with-libldap-r...
...
/usr/bin/ld: cannot find -lldap_r
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:5795: libslapd.la] Error 1
make: *** [Makefile:4009: all] Error 2
Error: Process completed with exit code 2.
F36 has openldap-2.6.1, in these jobs rpm build is not used. Only autoreconf -fvi && ./configure is executed.
Looking at the generated configure, OPENLDAP_VERSION doesn't have the correct regex, because square brackets are special characters and should be escaped. Moreover, version comparison logic is inverted, resulting in --with-libldap-r=yes on systems where ldap_r doesn't exist.