diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3becf37a..d29c132b 100644 --- a/configure.ac +++ b/configure.ac @@ -148,6 +148,21 @@ AC_ARG_WITH(perl, fi, want_perl=static) +AC_ARG_WITH(otr, +[ --with-otr[=yes|no|static] Build with OTR support - also specifies + if it should be built into the main irssi + binary (static) or as a module (default)], + if test x$withval = xyes; then + want_otr=module + elif test x$withval = xstatic; then + want_otr=static + elif test x$withval = xmodule; then + want_otr=module + else + want_otr=no + fi, + want_otr=no) + AC_ARG_ENABLE(true-color, [ --enable-true-color Build with true color support in terminal], if test x$enableval = xno ; then @@ -527,6 +542,48 @@ if test "x$want_capsicum" = "xyes"; then ]) fi +dnl ** +dnl ** OTR checks +dnl ** + +have_otr=no +if test "x$want_otr" != "xno"; then + AM_PATH_LIBGCRYPT(1:1.2.0, [], [AC_ERROR(libgcrypt 1.2.0 or newer is required.)]) + AM_PATH_LIBOTR(4.1.0, [], [AC_ERROR([libotr 4.1.0 or newer is required.])]) + + OTR_CFLAGS="$LIBOTR_CFLAGS $LIBGCRYPT_CFLAGS" + OTR_LDFLAGS="$LIBOTR_LIBS $LIBGCRYPT_LIBS" + + AC_SUBST(otr_module_lib) + AC_SUBST(otr_static_lib) + + if test "x$want_otr" != "xno"; then + if test "x$want_otr" = "xstatic"; then + otr_module_lib= + otr_static_lib=libotr_core_static.la + + OTR_LINK_LIBS="../otr/libotr_core_static.la" + OTR_LINK_FLAGS="$OTR_LDFLAGS" + + AC_DEFINE(HAVE_STATIC_OTR) + else + otr_module_lib=libotr_core.la + otr_static_lib= + fi + fi + + AC_SUBST(otr_module_lib) + AC_SUBST(otr_static_lib) + + AC_SUBST(OTR_CFLAGS) + AC_SUBST(OTR_LDFLAGS) + + AC_SUBST(OTR_LINK_LIBS) + AC_SUBST(OTR_LINK_FLAGS) + + have_otr=yes +fi + dnl ** check what we want to build AM_CONDITIONAL(BUILD_TEXTUI, test "$want_textui" = "yes") AM_CONDITIONAL(BUILD_IRSSIBOT, test "$want_irssibot" = "yes") @@ -535,6 +592,7 @@ AM_CONDITIONAL(BUILD_IRSSIPROXY, test "$want_irssiproxy" = "yes") AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no") AM_CONDITIONAL(HAVE_CAPSICUM, test "x$want_capsicum" = "xyes") AM_CONDITIONAL(USE_GREGEX, test "x$want_gregex" = "xyes") +AM_CONDITIONAL(HAVE_OTR, test "x$have_otr" != "xno") # move LIBS to PROG_LIBS so they're not tried to be used when linking eg. perl libraries PROG_LIBS=$LIBS @@ -629,6 +687,7 @@ fi AH_TEMPLATE(HAVE_GMODULE) AH_TEMPLATE(HAVE_SOCKS_H, [misc..]) AH_TEMPLATE(HAVE_STATIC_PERL) +AH_TEMPLATE(HAVE_STATIC_OTR) AH_TEMPLATE(PRIuUOFF_T, [printf()-format for uoff_t, eg. "u" or "lu" or "llu"]) AH_TEMPLATE(UOFF_T_INT, [What type should be used for uoff_t]) AH_TEMPLATE(UOFF_T_LONG) @@ -662,6 +721,7 @@ src/perl/common/Makefile.PL src/perl/irc/Makefile.PL src/perl/ui/Makefile.PL src/perl/textui/Makefile.PL +src/otr/Makefile scripts/Makefile scripts/examples/Makefile tests/Makefile @@ -756,5 +816,14 @@ echo "Building with true color support.. : $want_truecolor" echo "Building with GRegex ............. : $want_gregex" echo "Building with Capsicum ........... : $want_capsicum" +if test "x$want_otr" = "xstatic"; then + echo "Building with OTR support ........ : static (in irssi binary)" +elif test "x$want_otr" = "xmodule"; then + echo "Building with OTR support ........ : module" +else + echo "Building with OTR support ........ : no" +fi + + echo echo "If there are any problems, read the INSTALL file." |