Skip to content

Commit

Permalink
Add a variable to help with cross-compilation
Browse files Browse the repository at this point in the history
This adds a LDAP_HAVE_CONNCB_CROSS variable that will be used instead
of the runtime check for a broken connection callbacks in ldap
library. Set it to yes to assume that connection callbacks are
working.

This allows the project to be configured successfully when
cross-compiling.
  • Loading branch information
krnowak committed Dec 4, 2024
1 parent 7b855ab commit 7aac435
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/external/ldap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ AC_CHECK_FUNCS([ldap_control_create ldap_init_fd \
ldap_parse_derefresponse_control \
ldap_derefresponse_free \
ldap_is_ldapc_url])
AC_ARG_VAR([LDAP_HAVE_CONNCB_CROSS], [A hint about working LDAP connection callbacks for cross-compilation cases])
AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
Expand All @@ -80,7 +81,9 @@ AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg],
[AC_DEFINE([HAVE_LDAP_CONNCB], [1],
[Define if LDAP connection callbacks are available])],
[AC_MSG_WARN([Found broken callback implementation])],
[])],
[AS_IF([test "x$LDAP_HAVE_CONNCB_CROSS" = xyes],
[AC_DEFINE([HAVE_LDAP_CONNCB], [1],
[Define if LDAP connection callbacks are available])])])],
[], [[#include <ldap.h>]])

AC_CHECK_TYPE([LDAPDerefRes],
Expand Down

0 comments on commit 7aac435

Please sign in to comment.