diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index 917c8e08ca4695c39872e5c1a4d6602395f15925..5d82088a95a6ac4c3f59a3801ed1697223612282 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -115,7 +115,7 @@ ifneq ($(findstring :,$(XMLSTARLET)$(BASH)),:)
 	@if [ -f .moduleinfo ] ; then \
 		declare -A DISABLED_MODS ;\
 		for x in $(MENUSELECT_$(MENUSELECT_CATEGORY)) ; do DISABLED_MODS[$${x}]=1 ; done ;\
-		EXTERNAL_MODS=$$(xmlstarlet sel -t -m "/category/member[support_level = 'external']" -v "@name" -n .moduleinfo) ;\
+		EXTERNAL_MODS=$$($(XMLSTARLET) sel -t -m "/category/member[support_level = 'external']" -v "@name" -n .moduleinfo) ;\
 		for x in $${EXTERNAL_MODS} ; do \
 			if [ -z "$${DISABLED_MODS[$${x}]}" ] ; then \
 				$(ASTTOPDIR)/build_tools/download_externals $${x} ;\
diff --git a/configure b/configure
index 749b2fc680f81fff72fe31abb01dbc0bd8cbc64d..988f7580844c273f608bd1c161691e3f260f39cd 100755
--- a/configure
+++ b/configure
@@ -7604,8 +7604,10 @@ $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "xmlstarlet", so it can be a program name with args.
-set dummy xmlstarlet; ac_word=$2
+for ac_prog in xmlstarlet xml
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_XMLSTARLET+:} false; then :
@@ -7631,7 +7633,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_XMLSTARLET" && ac_cv_path_XMLSTARLET=":"
   ;;
 esac
 fi
@@ -7645,6 +7646,10 @@ $as_echo "no" >&6; }
 fi
 
 
+  test -n "$XMLSTARLET" && break
+done
+test -n "$XMLSTARLET" || XMLSTARLET=":"
+
 # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
diff --git a/configure.ac b/configure.ac
index f68338b2d96080d665add06e9484b4e19164d2db..64ecbfab3e2848e60bdce169390ead6113a5ca00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -281,7 +281,7 @@ AC_PATH_PROG([RUBBER], [rubber], :)
 AC_PATH_PROG([CATDVI], [catdvi], :)
 AC_PATH_PROG([KPATHSEA], [kpsewhich], :)
 AC_PATH_PROG([XMLLINT], [xmllint], :)
-AC_PATH_PROG([XMLSTARLET], [xmlstarlet], :)
+AC_PATH_PROGS([XMLSTARLET], [xmlstarlet xml], :)
 AC_PATH_PROG([BASH], [bash], :)
 AC_PATH_PROG([GIT], [git], :)
 AC_PATH_PROG([ALEMBIC], [alembic], :)