From eb6f5e7f1127783c347e31d8de506d583cc69c59 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 9 Sep 2023 13:54:01 +0300 Subject: Use rxml for XML parsing when building with Rust --- configure.ac | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ed9f44c..656eb7d 100644 --- a/configure.ac +++ b/configure.ac @@ -13,31 +13,30 @@ AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile rexmpp.pc Doxyfile]) AC_PROG_CC AM_PROG_AR + +# Checks for libraries and related parameters. + AC_ARG_WITH([rust], AS_HELP_STRING([--with-rust], [use available Rust implementations of modules])) +AC_ARG_WITH([expat], + AS_HELP_STRING([--with-expat], [use libexpat instead of libxml2])) AS_IF([test "x$with_rust" == "xyes"], [AC_PATH_PROG([RUSTC], [rustc], [notfound]) AS_IF([test "x$RUSTC" == "xnotfound"], [AC_MSG_ERROR([rustc is required])]) AC_PATH_PROG([CARGO], [cargo], [notfound]) AS_IF([test "x$CARGO" == "xnotfound"], [AC_MSG_ERROR([cargo is required])]) - AC_DEFINE([USE_RUST], [1], [Use Rust sources over C ones])]) + AC_DEFINE([USE_RUST], [1], [Use Rust sources over C ones])], + [AS_IF([test "x$with_expat" == "xyes"], + [PKG_CHECK_MODULES([EXPAT], [expat], + [AC_DEFINE([USE_EXPAT], [1], [Use libexpat])])], + [PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], + [AC_DEFINE([USE_LIBXML2], [1], [Use libxml2])])])]) AM_CONDITIONAL([USE_RUST], [test "x$with_rust" == "xyes"]) LT_INIT -# Checks for libraries and related parameters. - -AC_ARG_WITH([expat], - AS_HELP_STRING([--with-expat], [use libexpat instead of libxml2])) - -AS_IF([test "x$with_expat" == "xyes"], - [PKG_CHECK_MODULES([EXPAT], [expat], - [AC_DEFINE([USE_EXPAT], [1], [Use libexpat])])], - [PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], - [AC_DEFINE([USE_LIBXML2], [1], [Use libxml2])])]) - AM_PATH_LIBGCRYPT -- cgit v1.2.3