diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-06-03 15:15:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 15:15:10 +0200 |
commit | 0071bbb4be5b1cbcbf0777930d9a87a724b82b53 (patch) | |
tree | 89edde1cb507390b88af42f5e222940c3bfeb10d | |
parent | 140ac99c0c9ff2e505d436ffe6733f9fca53f5ce (diff) | |
parent | 42eb9ba63df4f9df5019e865ecba3a074fc2060f (diff) | |
download | profani-tty-0071bbb4be5b1cbcbf0777930d9a87a724b82b53.tar.gz |
Merge pull request #1349 from profanity-im/autotools
configure.ac: add additional check for libstrophe
-rw-r--r-- | configure.ac | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index c5b4339c..1fb69ce3 100644 --- a/configure.ac +++ b/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"], |