mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
autotools: Avoid copy-paste in configure.ac
This commit is contained in:
parent
d7ec339e3e
commit
1dba341da8
21
configure.ac
21
configure.ac
@ -189,7 +189,7 @@ fi
|
|||||||
AM_CONDITIONAL([BUILD_OTR], [false])
|
AM_CONDITIONAL([BUILD_OTR], [false])
|
||||||
AM_CONDITIONAL([BUILD_OTR3], [false])
|
AM_CONDITIONAL([BUILD_OTR3], [false])
|
||||||
AM_CONDITIONAL([BUILD_OTR4], [false])
|
AM_CONDITIONAL([BUILD_OTR4], [false])
|
||||||
if test "x$enable_otr" = xyes; then
|
if test "x$enable_otr" != xno; then
|
||||||
AC_SEARCH_LIBS([otrl_init], [otr],
|
AC_SEARCH_LIBS([otrl_init], [otr],
|
||||||
[AC_COMPILE_IFELSE(
|
[AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([[
|
[AC_LANG_PROGRAM([[
|
||||||
@ -203,22 +203,9 @@ if test "x$enable_otr" = xyes; then
|
|||||||
]])],
|
]])],
|
||||||
[AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR4], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])],
|
[AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR4], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])],
|
||||||
[AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR3], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])])],
|
[AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR3], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])])],
|
||||||
[AC_MSG_ERROR([libotr is required for otr encryption support])])
|
[AS_IF([test "x$enable_otr" = xyes],
|
||||||
elif test "x$enable_otr" = x; then
|
[AC_MSG_ERROR([libotr is required for otr encryption support])],
|
||||||
AC_SEARCH_LIBS([otrl_init], [otr],
|
[AC_MSG_NOTICE([libotr not found, otr encryption support not enabled])])])
|
||||||
[AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([[
|
|
||||||
#include <libotr/version.h>
|
|
||||||
]],[[
|
|
||||||
#if OTRL_VERSION_MAJOR == 4
|
|
||||||
// OK
|
|
||||||
#else
|
|
||||||
# assume version 3
|
|
||||||
#endif
|
|
||||||
]])],
|
|
||||||
[AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR4], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])],
|
|
||||||
[AM_CONDITIONAL([BUILD_OTR], [true]) AM_CONDITIONAL([BUILD_OTR3], [true]) AC_DEFINE([HAVE_LIBOTR], [1], [Have libotr])])],
|
|
||||||
[AC_MSG_NOTICE([libotr not found, otr encryption support not enabled])])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AS_IF([test "x$with_themes" = xno],
|
AS_IF([test "x$with_themes" = xno],
|
||||||
|
Loading…
Reference in New Issue
Block a user