# mail/mimedefang: ld cannot find LDAP



## ondra_knezour (Apr 22, 2012)

I have sendmail from base compiled with LDAP and SASL support. During configure script run is determined, that libsm is linked against LDAP

```
configure:6090: checking whether libsm requires -lldap
configure:6097: result: yes
```
but build fails, because

```
/usr/bin/ld: cannot find -lldap
```

This flaw is easily resolved with following pseudodiff in work/mimedefang/Makefile

```
-LDFLAGS=
+LDFLAGS=-L/usr/local/lib
```

As I am not an expert porter/Makefile guru, I would like to ask what is the right way to deal with such problem.


----------

