https://bugs.openldap.org/show_bug.cgi?id=9672

          Issue ID: 9672
           Summary: Permit static linking with libsasl2
           Product: OpenLDAP
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: ---
         Component: build
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 838
  --> https://bugs.openldap.org/attachment.cgi?id=838&action=edit
pkg-config + libsasl2 = ♥

I want to link slapd statically.  First I link openssl and libsasl2 statically.
 The static libsasl2 bundles all SASL plugins, and linking towards it must be
done (in my case) with -lcrypto.  The check in configure.ac:

```
AC_CHECK_LIB(sasl2, sasl_client_init,
  [ol_link_sasl="-lsasl2"],
  [AC_CHECK_LIB(sasl, sasl_client_init,
    [ol_link_sasl="-lsasl"])])
```

fails, since -lcrypto is not passed during linking with the static -lsasl2 . 
`pkg-config --statit libsasl2 --libs` knows how to link statically with
libsasl2 and it knows, whether libsasl2 is installed.

The applied patch does linking/preprocessing of libsasl2 by utilizing
pkg-config, when available.

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to