Skip to content

Commit

Permalink
use --with-erlang PATH to search for dialyzer binary
Browse files Browse the repository at this point in the history
  • Loading branch information
nniclausse committed Sep 5, 2012
1 parent 3c5d4c3 commit 6d61fa6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile.in
Expand Up @@ -8,7 +8,7 @@ ERLC=@ERLC@
SED=@SED@ SED=@SED@
ERL_OPTS=@ERL_OPTS@ ERL_OPTS=@ERL_OPTS@
# FIXME # FIXME
DIALYZER=dialyzer DIALYZER=@DIALYZER@


ERLDIR=@ERLANG_ROOT_DIR@ ERLDIR=@ERLANG_ROOT_DIR@
export ERLDIR export ERLDIR
Expand Down Expand Up @@ -189,8 +189,10 @@ edoc:
$(ERL) -noshell -eval "edoc:application($(RECORDER_APPLICATION), \ $(ERL) -noshell -eval "edoc:application($(RECORDER_APPLICATION), \
\"./$(ESRC)/$(RECORDER_APPLICATION)\", [$(DOC_OPTS)])" -s init stop \"./$(ESRC)/$(RECORDER_APPLICATION)\", [$(DOC_OPTS)])" -s init stop


# TODO: remove -Wno_behaviours, but only if R15B became a requirement.
# see http://erlang.org/pipermail/erlang-questions/2012-January/063608.html
dialyzer: dialyzer:
$(DIALYZER) -r ebin -I ./include/ $(DIALYZER) -r ebin -I ./include/ -Wno_undefined_callbacks


all: clean tsung all: clean tsung


Expand Down
44 changes: 44 additions & 0 deletions configure
Expand Up @@ -590,6 +590,7 @@ ERLANG_LIB_VER_xmerl
ERLANG_LIB_DIR_xmerl ERLANG_LIB_DIR_xmerl
ERLANG_ROOT_DIR ERLANG_ROOT_DIR
ac_prefix_program ac_prefix_program
DIALYZER
ERL ERL
ERLCFLAGS ERLCFLAGS
ERLC ERLC
Expand Down Expand Up @@ -2031,6 +2032,49 @@ fi
fi fi
# Extract the first word of "dialyzer", so it can be a program name with args.
set dummy dialyzer; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DIALYZER+:} false; then :
$as_echo_n "(cached) " >&6
else
case $DIALYZER in
[\\/]* | ?:[\\/]*)
ac_cv_path_DIALYZER="$DIALYZER" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$with_erlang:$with_erlang/bin:$PATH"
for as_dir in $as_dummy
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_DIALYZER="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_DIALYZER" && ac_cv_path_DIALYZER="/usr/bin/dializer"
;;
esac
fi
DIALYZER=$ac_cv_path_DIALYZER
if test -n "$DIALYZER"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIALYZER" >&5
$as_echo "$DIALYZER" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$prefix" = xNONE; then if test "x$prefix" = xNONE; then
$as_echo_n "checking for prefix by " >&6 $as_echo_n "checking for prefix by " >&6
# Extract the first word of "erl", so it can be a program name with args. # Extract the first word of "erl", so it can be a program name with args.
Expand Down
2 changes: 2 additions & 0 deletions configure.in
Expand Up @@ -18,6 +18,8 @@ AC_ARG_WITH(erlang, [ --with-erlang=PREFIX path to erlc and erl ])
AC_ERLANG_PATH_ERLC(erlc, $with_erlang:$with_erlang/bin:$PATH) AC_ERLANG_PATH_ERLC(erlc, $with_erlang:$with_erlang/bin:$PATH)
AC_ERLANG_PATH_ERL(erl, $with_erlang:$with_erlang/bin:$PATH) AC_ERLANG_PATH_ERL(erl, $with_erlang:$with_erlang/bin:$PATH)


AC_PATH_PROG(DIALYZER,dialyzer, /usr/bin/dializer, $with_erlang:$with_erlang/bin:$PATH)

AC_PREFIX_PROGRAM(erl) AC_PREFIX_PROGRAM(erl)
AC_ERLANG_SUBST_ROOT_DIR() AC_ERLANG_SUBST_ROOT_DIR()


Expand Down

0 comments on commit 6d61fa6

Please sign in to comment.