Menu

#42 configure ignores SMBCLIENT_LIBS-variable

v1.0 (example)
open
nobody
None
5
2019-03-01
2018-01-30
Mikhail T.
No

The configure-script's test for -lsmbclient ignores the SMBCLIENT_LIBS variable. For example, on my machine Samba's libraries are under /opt/lib/samba4. Yet, running:

env SMBCLIENT_LIBS="-L/opt/lib/samba4" ./configure

yields:

...
checking for FUSE... yes
checking for GLIB... yes
checking for LIBSECRET... yes
checking for SMBCLIENT... yes
checking for smbc_setOptionUseCCache in -lsmbclient... no
Error!!! libsmbclient >= 3.5 required.

Because the value of the environment variable is not placed on the test-linker's command-line. The work-around is to add the flag to the LDFLAGS instead.

Discussion

  • Mikhail Kshevetskiy

    You should use pkg-config for this task.

    Try something like
    PKG_CONFIG_PATH=/opt/lib/samba4/lib/pkgconfig:$PKG_CONFIG_PATH ./configure

     
  • Mikhail T.

    Mikhail T. - 2018-02-01

    There is no /opt/lib/samba4/lib/pkgconfig on my system, but invoking pkgconf --libs smbclient outputs the correct information without any special hacks.

    At any rate, the SMBCLIENT_LIBS should work to overwrite whatever pkgconf outputs, should not it? And it does not -- not quite...

     
  • Mikhail Kshevetskiy

    hm, you have no smbclient.pc file et all?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.