Author: dreiss
Date: Tue Aug 24 20:45:24 2010
New Revision: 988720

URL: http://svn.apache.org/viewvc?rev=988720&view=rev
Log:
THRIFT-646. erlang: Fix build on machines without Erlang

AC_ERLANG_SUBST_LIB_DIR aborts configure if erlc cannot be found.  Just
skip that and all of the other install stuff if we don't have Erlang.

Modified:
    incubator/thrift/trunk/configure.ac

Modified: incubator/thrift/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/configure.ac?rev=988720&r1=988719&r2=988720&view=diff
==============================================================================
--- incubator/thrift/trunk/configure.ac (original)
+++ incubator/thrift/trunk/configure.ac Tue Aug 24 20:45:24 2010
@@ -106,10 +106,12 @@ AX_THRIFT_LIB(erlang, [Erlang], yes)
 if test "$with_erlang" = "yes";  then
   AC_ERLANG_PATH_ERL
   AC_ERLANG_PATH_ERLC
-  AC_ERLANG_SUBST_LIB_DIR
-  # Install into the detected Erlang directory instead of $libdir/erlang/lib
-  ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR"
-  AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+  if test -n "$ERLC" ; then
+    AC_ERLANG_SUBST_LIB_DIR
+    # Install into the detected Erlang directory instead of $libdir/erlang/lib
+    ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR"
+    AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+  fi
 fi
 AM_CONDITIONAL(WITH_ERLANG, [test -n "$ERL" -a -n "$ERLC"])
 


Reply via email to