|
a/configure.ac |
|
b/configure.ac |
|
... |
|
... |
34 |
dnl AC_CHECK_LIB([upnp], [UpnpInit], [], AC_MSG_ERROR([libupnp not found]))
|
34 |
dnl AC_CHECK_LIB([upnp], [UpnpInit], [], AC_MSG_ERROR([libupnp not found]))
|
35 |
dnl AC_CHECK_LIB([curl], [curl_easy_init], [],AC_MSG_ERROR([libcurl not found]))
|
35 |
dnl AC_CHECK_LIB([curl], [curl_easy_init], [],AC_MSG_ERROR([libcurl not found]))
|
36 |
dnl AC_CHECK_LIB([expat], [XML_ParserCreate], [],AC_MSG_ERROR([libexpat not found]))
|
36 |
dnl AC_CHECK_LIB([expat], [XML_ParserCreate], [],AC_MSG_ERROR([libexpat not found]))
|
37 |
|
37 |
|
38 |
PKG_CHECK_MODULES([upnpp], [libupnpp], [], [AC_MSG_ERROR([libupnpp])])
|
38 |
PKG_CHECK_MODULES([upnpp], [libupnpp], [], [AC_MSG_ERROR([libupnpp])])
|
39 |
AC_CHECK_LIB([mpdclient], [mpd_connection_new], [],
|
39 |
PKG_CHECK_MODULES([libmpdclient], [libmpdclient], [],
|
40 |
AC_MSG_ERROR([libmpdclient not found]))
|
40 |
[AC_MSG_ERROR([libmpdclient not found])])
|
41 |
SCCTL_LIBS="$LIBS $upnpp_LIBS"
|
41 |
SCCTL_LIBS="$LIBS $upnpp_LIBS $libmpdclient_LIBS"
|
42 |
|
42 |
|
43 |
AC_CHECK_LIB([microhttpd], [MHD_queue_response], [], AC_MSG_ERROR([libmicrohttpd not found]))
|
43 |
PKG_CHECK_MODULES([libmicrohttpd], [libmicrohttpd], [],
|
44 |
|
44 |
[AC_MSG_ERROR([libmicrohttpd not found])])
|
45 |
AC_LANG_PUSH([C++])
|
|
|
46 |
|
45 |
|
47 |
AC_CHECK_HEADERS(json/json.h jsoncpp/json/json.h)
|
46 |
AC_CHECK_HEADERS(json/json.h jsoncpp/json/json.h)
|
48 |
LIBS="$LIBS -ljsoncpp"
|
47 |
PKG_CHECK_MODULES([jsoncpp], [jsoncpp], [], [AC_MSG_ERROR([jsoncpp not found])])
|
49 |
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
|
50 |
[[#ifdef HAVE_JSONCPP_JSON_JSON_H
|
|
|
51 |
#include <jsoncpp/json/json.h>
|
|
|
52 |
#else
|
|
|
53 |
#include <json/json.h>
|
|
|
54 |
#endif]], [Json::Features dummy])],
|
|
|
55 |
[HAVE_JSONCPP=1],
|
|
|
56 |
[AC_MSG_ERROR([libjsoncpp not found.])])
|
|
|
57 |
AC_LANG_POP
|
|
|
58 |
|
48 |
|
59 |
UPMPDCLI_LIBS="$LIBS $upnpp_LIBS"
|
49 |
UPMPDCLI_LIBS="$LIBS $upnpp_LIBS $libmpdclient_LIBS $libmicrohttpd_LIBS $jsoncpp_LIBS"
|
60 |
echo "UPMPDCLI_LIBS=$UPMPDCLI_LIBS"
|
50 |
echo "UPMPDCLI_LIBS=$UPMPDCLI_LIBS"
|
61 |
|
51 |
|
62 |
LIBS=""
|
52 |
LIBS=""
|
63 |
|
53 |
|
64 |
AC_SUBST(UPMPDCLI_LIBS)
|
54 |
AC_SUBST(UPMPDCLI_LIBS)
|