Skip to content

Configure option --with-gssapi=path does not work anymore without pkg-config #8289

@mkauf

Description

@mkauf

I did this

I have used the "configure" option --with-gssapi=path to specify the MIT Kerberos to use for GSS API.

This does not work anymore, because pull request #7916 has introduced a bug: When the option --with-gssapi=path is used, the configure script tries to use pkg-config anyway. If pkg-config is not available, or if pkg-config does not find the necessary information, it is assumed that the GSS library's name is "gssapi". But the correct name (in my case) is "gssapi_krb5".

The configure script prints a (seemingly) unrelated error:

checking OpenSSL linking with -ldl... no
checking OpenSSL linking with -ldl and -lpthread... no
configure: OPT_OPENSSL: yes
configure: OPENSSL_ENABLED: 
configure: error: --with-openssl was given but OpenSSL could not be detected

From config.log:

configure:25314: checking OpenSSL linking with -ldl and -lpthread
[...]
ld: cannot find -lgssapi

I think that pkg-config should only be used if --with-gssapi is specified without a path, but it should not be used if a path is present. Probably the tool krb5-config should be used in this case to detect the GSS library's name.

I expected the following

configure should not abort with an error

curl/libcurl version

curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/1.1.1m zlib/1.2.11
Release-Date: 2022-01-05
Protocols: ftp ftps http https 
Features: alt-svc GSS-API HSTS HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets

operating system

CentOS Linux release 7.9.2009 (Core)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions