Fixed confugure.ac

This commit is contained in:
Alexey Romanov
2010-10-14 09:27:10 +04:00
parent 42bffde039
commit 2daeea25e8
2 changed files with 82 additions and 0 deletions

81
configure vendored
View File

@@ -607,6 +607,8 @@ ERLANG_LIB_VER_kernel
ERLANG_LIB_DIR_kernel ERLANG_LIB_DIR_kernel
ERLANG_LIB_VER_erl_interface ERLANG_LIB_VER_erl_interface
ERLANG_LIB_DIR_erl_interface ERLANG_LIB_DIR_erl_interface
ERLANG_LIB_VER_erts
ERLANG_LIB_DIR_erts
ERLANG_LIB_DIR ERLANG_LIB_DIR
ERLANG_ROOT_DIR ERLANG_ROOT_DIR
ERL ERL
@@ -3875,6 +3877,85 @@ $as_echo "$ac_cv_erlang_lib_dir" >&6; }
ERLANG_LIB_DIR=$ac_cv_erlang_lib_dir ERLANG_LIB_DIR=$ac_cv_erlang_lib_dir
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Erlang/OTP 'erts' library subdirectory" >&5
$as_echo_n "checking for Erlang/OTP 'erts' library subdirectory... " >&6; }
if test "${ac_cv_erlang_lib_dir_erts+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_ext=erl
ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5'
ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5 ; echo "#!/bin/sh" > conftest$ac_exeext ; $as_echo "\"$ERL\" -run conftest start -run init stop -noshell" >> conftest$ac_exeext ; chmod +x conftest$ac_exeext'
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else
cat > conftest.$ac_ext <<_ACEOF
-module(conftest).
-export([start/0]).
start() ->
ReturnValue = case code:lib_dir("erts") of
{error, bad_name} ->
file:write_file("conftest.out", "not found\n"),
1;
LibDir ->
file:write_file("conftest.out", LibDir),
0
end,
halt(ReturnValue)
.
_ACEOF
if ac_fn_erl_try_run "$LINENO"; then :
ac_cv_erlang_lib_dir_erts=`cat conftest.out`
rm -f conftest.out
else
if test ! -f conftest.out; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "test Erlang program execution failed
See \`config.log' for more details." "$LINENO" 5; }
else
ac_cv_erlang_lib_dir_erts="not found"
rm -f conftest.out
fi
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_erlang_lib_dir_erts" >&5
$as_echo "$ac_cv_erlang_lib_dir_erts" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Erlang/OTP 'erts' library version" >&5
$as_echo_n "checking for Erlang/OTP 'erts' library version... " >&6; }
if test "${ac_cv_erlang_lib_ver_erts+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$ac_cv_erlang_lib_dir_erts" = "not found"; then :
ac_cv_erlang_lib_ver_erts="not found"
else
ac_cv_erlang_lib_ver_erts=`$as_echo "$ac_cv_erlang_lib_dir_erts" | sed -n -e 's,^.*-\([^/-]*\)$,\1,p'`
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_erlang_lib_ver_erts" >&5
$as_echo "$ac_cv_erlang_lib_ver_erts" >&6; }
ERLANG_LIB_DIR_erts=$ac_cv_erlang_lib_dir_erts
ERLANG_LIB_VER_erts=$ac_cv_erlang_lib_ver_erts
if test "$ac_cv_erlang_lib_dir_erts" = "not found"; then :
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Erlang/OTP 'erl_interface' library subdirectory" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Erlang/OTP 'erl_interface' library subdirectory" >&5
$as_echo_n "checking for Erlang/OTP 'erl_interface' library subdirectory... " >&6; } $as_echo_n "checking for Erlang/OTP 'erl_interface' library subdirectory... " >&6; }
if test "${ac_cv_erlang_lib_dir_erl_interface+set}" = set; then : if test "${ac_cv_erlang_lib_dir_erl_interface+set}" = set; then :

View File

@@ -33,6 +33,7 @@ AC_CHECK_FUNCS([bzero strstr])
AC_ERLANG_NEED_ERLC AC_ERLANG_NEED_ERLC
AC_ERLANG_SUBST_ROOT_DIR AC_ERLANG_SUBST_ROOT_DIR
AC_ERLANG_SUBST_LIB_DIR AC_ERLANG_SUBST_LIB_DIR
AC_ERLANG_CHECK_LIB(erts)
AC_ERLANG_CHECK_LIB(erl_interface) AC_ERLANG_CHECK_LIB(erl_interface)
AC_ERLANG_CHECK_LIB(kernel) AC_ERLANG_CHECK_LIB(kernel)
AC_ERLANG_CHECK_LIB(stdlib) AC_ERLANG_CHECK_LIB(stdlib)