summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-09-22 14:41:46 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-09-22 14:41:46 +0100
commitfa13b2838fd32854a4b2c6a5fff47e17a72294fb (patch)
treeab4253d4984bcccb99b63a939e4274e0738f6838 /configure.ac
parent8324d2fcf00d5f3d6bc0f10ae61bbfd7c1961d93 (diff)
downloadlibguestfs-fa13b2838fd32854a4b2c6a5fff47e17a72294fb.tar.gz
libguestfs-fa13b2838fd32854a4b2c6a5fff47e17a72294fb.tar.xz
libguestfs-fa13b2838fd32854a4b2c6a5fff47e17a72294fb.zip
erlang: Use the official autoconf macros.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 5 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index 83f25c96..c5b7bd00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -887,42 +887,21 @@ AS_IF([test "x$enable_php" != "xno"],
AM_CONDITIONAL([HAVE_PHP], [test "x$PHP" != "xno" && test "x$PHPIZE" != "xno"])
dnl Erlang
-ERLC=no
-ERL_INTERFACEDIR=no
AC_ARG_ENABLE([erlang],
AS_HELP_STRING([--disable-erlang], [Disable Erlang language bindings]),
[],
[enable_erlang=yes])
AS_IF([test "x$enable_erlang" != "xno"],
[
- ERLC=
- AC_CHECK_PROG([ERLC],[erlc],[erlc],[no])
+ AC_ERLANG_PATH_ERLC([no])
if test "x$ERLC" != "xno"; then
- dnl Look for erl_interface directory in various places.
- AC_MSG_CHECKING([for erl_interface])
-
- for d in \
- $libdir /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
- do
- dir=`ls -1d $d/erlang/lib/erl_interface-* 2>/dev/null`
- if test "x$dir" != "x" && test -d "$dir"; then
- AC_MSG_RESULT([$dir])
- ERL_INTERFACEDIR=$dir
- break
- fi
- done
-
- if test "x$ERL_INTERFACEDIR" = "xno"; then
- AC_MSG_RESULT([not found])
- fi
+ AC_ERLANG_CHECK_LIB([erl_interface], [],
+ [AC_MSG_FAILURE([Erlang erl_interface library not installed. Use --disable-erlang to disable.])])
+ AC_ERLANG_SUBST_LIB_DIR
fi
-
- AC_SUBST([ERLC])
- AC_SUBST([ERL_INTERFACEDIR])
])
-AM_CONDITIONAL([HAVE_ERLANG],
- [test "x$ERLC" != "xno" && test "x$ERL_INTERFACEDIR" != "xno"])
+AM_CONDITIONAL([HAVE_ERLANG], [test "x$ERLC" != "xno"])
dnl Check for Perl modules needed by Perl virt tools (virt-df, etc.)
AS_IF([test "x$PERL" != "xno"],