From: David Reiss Date: Tue, 24 Aug 2010 20:45:24 +0000 (+0000) Subject: THRIFT-646. erlang: Fix build on machines without Erlang X-Git-Tag: 0.5.0~156 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=31e1b6e98806ffe793421ec9543717c4e6c9188d;p=common%2Fthrift.git 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. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@988720 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/configure.ac b/configure.ac index e5c59c1c..822fd1a1 100644 --- a/configure.ac +++ b/configure.ac @@ -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"])