[thrift] Erlang build tweaks

Summary: fix the Makefile to use BSD-friendly find(1) and enable conditional building of the Erlang binding.  Contributed by Dan Sully (daniel@electricrain.com).

Reviewed By: eletuchy

Test Plan: builds


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665549 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index 704719d..16e053c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,13 @@
 AM_CONDITIONAL([ENABLE_JAVA],
                [test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])
 
+AX_THRIFT_LIB(erlang, [Erlang], yes)
+if test "$with_erlang" = "yes";  then
+  AC_PATH_PROG([ERLC], [erlc])
+fi
+
+AM_CONDITIONAL(ENABLE_ERLANG, [test -n "$ERLC"])
+
 AC_C_CONST
 AC_C_INLINE
 AC_C_VOLATILE