Browse files

configure ERLBINDIR relative to ERLDIR

Rather than configuring ERLBINDIR relative to ERL, which doesn't work
when ERL is in a strange location such as /usr/bin/amd64/erl,
configure it relative to ERLDIR.
  • Loading branch information...
1 parent 98f8db9 commit e7e640464c36f1ad616a44ee247d0d056dcbfb62 @jamesleegwu jamesleegwu committed with vinoski Feb 16, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 configure.in
View
5 configure.in
@@ -11,13 +11,10 @@ AC_DEFINE_UNQUOTED(CPU_VENDOR_OS, "$host")
AC_ERLANG_NEED_ERL
AC_PATH_PROG(ERL, erl)
AC_PATH_PROG(ERLC, erlc)
-ERLBINDIR=`dirname "$ERL"` ; ERLBINDIR=`dirname "$ERLBINDIR"`/lib/erlang/bin
AC_SUBST(ERL)
AC_SUBST(ERLC)
-AC_SUBST(ERLBINDIR)
-
AC_ARG_WITH(defaultcharset,
AS_HELP_STRING([--with-defaultcharset=String], [specify default charset, i.e UTF-8]))
@@ -80,13 +77,15 @@ AC_DEFUN([BT_ERL_LIB_VSN],
ERLDIR=`"${ERL}" -noshell -eval 'io:format("~s~n",[[code:root_dir()]]), erlang:halt().' | tail -1`
+ERLBINDIR="${ERLDIR}/bin"
ERL_DLL_LIB="${ERLDIR}/usr/lib/erl_dll.lib"
if test ! -d "$ERLDIR" ; then
AC_MSG_ERROR([Broken Erlang installation, $ERLDIR does not exist!])
fi
AC_SUBST(ERLDIR)
+AC_SUBST(ERLBINDIR)
AC_SUBST(ERL_DLL_LIB)
erts_vsn=`ls "${ERLDIR}" | grep ^erts- | tail -1 | sed 's/erts-//'`

0 comments on commit e7e6404

Please sign in to comment.