[vlc-devel] [PATCH] Switch detection of smbclient from header to pkgconfig
Rémi Denis-Courmont
remi at remlab.net
Sat Feb 23 17:43:03 CET 2013
Le samedi 23 février 2013 18:26:39, Nicolas Chauvet a écrit :
> ---
> configure.ac | 5 +++--
> modules/access/Modules.am | 2 +-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 65377ac..6c634f2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1874,9 +1874,10 @@ dnl
> AC_ARG_ENABLE(smb,
> [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default
> auto)])]) if test "${enable_smb}" != "no"; then
> - AC_CHECK_HEADERS(libsmbclient.h,
> + PKG_CHECK_MODULES(SMBCLIENT, smbclient,
> [ VLC_ADD_PLUGIN([access_smb])
> - VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
> + VLC_ADD_CFLAGS([access_smb],[$SMBCLIENT_CFLAGS])
> + VLC_ADD_LIBS([access_smb],[$SMBCLIENT_LIBS])],
> [ if test -n "${enable_smb}"; then
> AC_MSG_ERROR([cannot find libsmbclient headers])
> fi ])
> diff --git a/modules/access/Modules.am b/modules/access/Modules.am
> index ff6047e..c06c89b 100644
> --- a/modules/access/Modules.am
> +++ b/modules/access/Modules.am
> @@ -35,7 +35,7 @@ libsdp_plugin_la_LIBADD = $(AM_LIBADD)
> libsdp_plugin_la_DEPENDENCIES =
>
> libaccess_smb_plugin_la_SOURCES = smb.c
> -libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS)
> +libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_access_smb)
> libaccess_smb_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_access_smb)
That's a tad silly. If you (need to) patch the Makefile, you might as well use
the pkg-config variables directly, and get rid of VLC_ADD_*().
> if HAVE_WIN32
> libaccess_smb_plugin_la_LIBADD += -lmpr
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list