THRIFT-646. erlang: Misc build cleanups
- Use AC_ERLANG_PATH_ERLC to find erlc, instead of the generic
AC_PATH_PROG.
- Also check for erl, just in case it is used internally by checks.
- Use AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR instead of manual hackery to
find the location where Erlang libraries should be installed. (This
doesn't use the discovered version of Erlang, though. See
http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00003.html .)
- Minor style changes in Makefile.am
- Remove some hacks we were using in the old makefile that were
necessary because we were not using automake.
- Remove ebin in a "maintainer-clean-local" rule to avoid shadowing the
default "maintainer-clean" rule which handles MAINTAINERCLEANFILES.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@945744 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index 21ab733..223c179 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,9 +98,11 @@
AX_THRIFT_LIB(erlang, [Erlang], yes)
if test "$with_erlang" = "yes"; then
- AC_PATH_PROG([ERLC], [erlc])
+ AC_ERLANG_PATH_ERL
+ AC_ERLANG_PATH_ERLC
+ AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
fi
-AM_CONDITIONAL(WITH_ERLANG, [test -n "$ERLC"])
+AM_CONDITIONAL(WITH_ERLANG, [test -n "$ERL" -a -n "$ERLC"])
AX_THRIFT_LIB(py, [Python], yes)
if test "$with_py" = "yes"; then