THRIFT-646. erlang: Fix build on machines without Erlang
authorDavid Reiss <dreiss@apache.org>
Tue, 24 Aug 2010 20:45:24 +0000 (20:45 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 24 Aug 2010 20:45:24 +0000 (20:45 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@988720 13f79535-47bb-0310-9956-ffa450edef68

configure.ac

index e5c59c1..822fd1a 100644 (file)
@@ -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"])