mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Merge pull request #1349 from profanity-im/autotools
configure.ac: add additional check for libstrophe
This commit is contained in:
commit
0071bbb4be
20
configure.ac
20
configure.ac
@ -130,11 +130,27 @@ AS_IF([test "x$PTHREAD_CC" != x], [ CC="$PTHREAD_CC" ])
|
||||
|
||||
### Check for libmesode, fall back to libstrophe
|
||||
PKG_CHECK_MODULES([libmesode], [libmesode >= 0.9.2],
|
||||
[LIBS="$libmesode_LIBS $LIBS" CFLAGS="$CFLAGS $libmesode_CFLAGS" AC_DEFINE([HAVE_LIBMESODE], [1], [libmesode])],
|
||||
[LIBS="$libmesode_LIBS $LIBS" CFLAGS="$CFLAGS $libmesode_CFLAGS" XMPP_LIB="libmesode" AC_DEFINE([HAVE_LIBMESODE], [1], [libmesode])],
|
||||
[PKG_CHECK_MODULES([libstrophe], [libstrophe >= 0.9.2],
|
||||
[LIBS="$libstrophe_LIBS $LIBS" CFLAGS="$CFLAGS $libstrophe_CFLAGS" AC_DEFINE([HAVE_LIBSTROPHE], [1], [libstrophe])],
|
||||
[LIBS="$libstrophe_LIBS $LIBS" CFLAGS="$CFLAGS $libstrophe_CFLAGS" XMPP_LIB="libstrophe" AC_DEFINE([HAVE_LIBSTROPHE], [1], [libstrophe])],
|
||||
[AC_MSG_ERROR([Neither libmesode or libstrophe in version >= 0.9.2 found, either is required for profanity])])])
|
||||
|
||||
AC_MSG_CHECKING([whether ${XMPP_LIB} works])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
#ifdef HAVE_LIBMESODE
|
||||
#include <mesode.h>
|
||||
#else
|
||||
#include <strophe.h>
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
xmpp_initialize();
|
||||
return 0;
|
||||
}
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_ERROR([${XMPP_LIB} is broken, check config.log for details])])
|
||||
|
||||
### Check for ncurses library
|
||||
PKG_CHECK_MODULES([ncursesw], [ncursesw],
|
||||
[NCURSES_CFLAGS="$ncursesw_CFLAGS"; NCURSES_LIBS="$ncursesw_LIBS"; NCURSES="ncursesw"],
|
||||
|
Loading…
Reference in New Issue
Block a user