[pecl-authentication-krb5] master: config.m4: also add KRB5_LIBS to LDFLAGS for the extension link (#14)

From: Date: Tue, 09 Jun 2026 08:46:48 +0000
Subject: [pecl-authentication-krb5] master: config.m4: also add KRB5_LIBS to LDFLAGS for the extension link (#14)
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-28569@lists.php.net to get a copy of this message
Author: David Härdeman (Alphix) Committer: GitHub (web-flow) Pusher: mbechler Date: 2026-06-09T10:46:45+02:00 Commit: https://github.com/php/pecl-authentication-krb5/commit/96fd7768e5bc0adc5dd7dc7f3236d0270afe1f02 Raw diff: https://github.com/php/pecl-authentication-krb5/commit/96fd7768e5bc0adc5dd7dc7f3236d0270afe1f02.diff config.m4: also add KRB5_LIBS to LDFLAGS for the extension link (#14) 4a2f6d0 switched from krb5-config to pkg-config and used --libs-only-L and --libs-only-l to split flags cleanly: -L paths into KRB5_LDFLAGS, -l libraries into KRB5_LIBS. KRB5_LIBS was then added only to LIBS so that AC_CHECK_FUNCS sees the libraries after the test object (safe with --as-needed). However, the PHP shared extension link command uses $(LDFLAGS) but not $(LIBS). Before the refactor, krb5-config --libs returned both -L and -l flags together into KRB5_LDFLAGS, so they all reached $(LDFLAGS) and the extension linked correctly. After the split, the -l flags landed only in LIBS and were silently dropped from the extension link, leaving GSS_C_NT_HOSTBASED_SERVICE and other GSSAPI symbols undefined at load time. Fix by adding KRB5_LIBS to LDFLAGS as well as LIBS. LIBS retains the -l flags for AC_CHECK_FUNCS (after the test object, --as-needed safe); LDFLAGS gains them back for the extension link, restoring the behaviour that krb5-config provided before 4a2f6d0. Changed paths: M config.m4 Diff: diff --git a/config.m4 b/config.m4 index d7a27a6..2c686df 100644 --- a/config.m4 +++ b/config.m4 @@ -85,7 +85,7 @@ if test "$PHP_KRB5" != "no" -o "$PHP_KRB5KADM" != "no"; then fi CFLAGS="-Wall ${CFLAGS} ${KRB5_CFLAGS}" - LDFLAGS="${LDFLAGS} ${KRB5_LDFLAGS}" + LDFLAGS="${LDFLAGS} ${KRB5_LDFLAGS} ${KRB5_LIBS}" LIBS="${LIBS} ${KRB5_LIBS}" AC_CHECK_FUNCS(krb5_free_string)

« previous php.pecl.cvs (#28569) next »