summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2023-09-09 13:54:01 +0300
committerdefanor <defanor@uberspace.net>2023-09-09 13:54:01 +0300
commiteb6f5e7f1127783c347e31d8de506d583cc69c59 (patch)
treee3585e106c6b1d6ffabd7bf1fdfa62c851ae0369 /configure.ac
parentaaae19eb8462c784daab0cf9afddc934fdbd1b75 (diff)
Use rxml for XML parsing when building with Rust
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 11 insertions, 12 deletions
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