look for headers in include/samba-* for --with-libsmbclient
This allows to specify a samba install directory via --with-libsmbclient where the header is located under include/samba-4.0/libsmbclient.h
I think we should rather rely on pkg-config output, which is the proper way to get build option for a library (and which is now used more in new PHP version, especially in 7.4 with the new PKG_CHECK_MODULES macro)
@remicollet I agree but now I think this solves the issue too and works with PHP7.0-7.3.
Do you find this to still be required @bachp ? Where are you experiencing it? I run Fedora 33 and the header is under include/samba-4.0/ and it has been found fine without this path. Are you talking about specific cases when people install Samba somewhere else?
@eduardok I encountered the issue while packaging for NixOS. There software is is always installed to an isolated non standard location. So all assumtions about library locations don't work there.
@eduardok specifically with the nix package manager (used by NixOS) this header file will be located under a very strange location. For example, one location the libsmbclient headers are installed into on my machine is /nix/store/9i3gs34m1rl2mslmzc5v7nlfnrqy7xbs-samba-4.13.3-dev/include/samba-4.0. This works for most packages because pkg-config reports this or because when building software nix (the package manager which can compile software) can pass flags like --with-libsmbclient specifying a location. Unfortunately it looks like config.m4 is making a few too many assumptions here. It's there any additional information we can provide?
Your software is very useful and we would love to ship it with NixOS! 😃