Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

121 lines (103 sloc) 3.548 kb
dnl DNA define([AC_CACHE_LOAD], )dnl
AC_INIT([tsung], m4_normalize(m4_include([vsn.mk])),[tsung-users@process-one.net])
AC_PREREQ(2.59c)
AC_COPYRIGHT(Copyright (C) 2008 Nicolas Niclausse)
AC_CONFIG_SRCDIR(src/tsung/tsung.erl)
dnl AM_INIT_AUTOMAKE()
AC_CACHE_LOAD
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],[vsn.mk])
AC_SUBST([CONFIGURE_DEPENDENCIES],[vsn.mk])
AC_PATH_PROG(SED, sed)
AC_LANG(Erlang)
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_ERL(erl, $with_erlang:$with_erlang/bin:$PATH)
AC_PREFIX_PROGRAM(erl)
AC_ERLANG_SUBST_ROOT_DIR()
AC_MSG_CHECKING(for Erlang/OTP '-hybrid' option)
if ! $ERL -noshell -hybrid -smp 2 -s init stop 2> /dev/null; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
ERL_OPTS="-hybrid $ERL_OPTS"
fi
dnl check for xmerl include path
AC_ERLANG_CHECK_LIB(xmerl)
AC_ERLANG_CHECK_LIB(ssl)
AC_ERLANG_CHECK_LIB(crypto)
dnl check if ssl is working
AC_CACHE_CHECK([if Erlang/OTP SSL application is running fine],
[erlang_cv_ssl_runnable],
[erlang_cv_ssl_runnable=no
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [dnl
case application:start(ssl) of
ok -> ok;
Err -> halt(1)
end,
halt(0)])],
[erlang_cv_ssl_runnable=yes
ERLANG_APPLICATIONS="kernel,stdlib,ssl"],
[ERLANG_APPLICATIONS="kernel,stdlib"
AC_MSG_RESULT(WARNING: ssl application is not working properly !!!)])
])
dnl check if crypto is working
AC_CACHE_CHECK([if Erlang/OTP crypto application is running fine],
[erlang_cv_crypto_runnable],
[erlang_cv_crypto_runnable=no
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [dnl
case application:start(crypto) of
ok ->
case catch crypto:md5("toto") of
<<247,29,190,82,98,138,63,131,167,122,180,148,129,117,37, 198>> -> ok;
_ ->
halt(1)
end;
Err ->
erlang:display([Err]),
halt(1)
end,
halt(0) ])],
[ erlang_cv_crypto_runnable=yes
ERLANG_APPLICATIONS="$ERLANG_APPLICATIONS,crypto" ],
[ AC_MSG_RESULT([WARNING: crypto application is not working properly !!!])]) ])
dnl check if orelse is allowed in guards
AC_CACHE_CHECK([if orelse is allowed in guards],
[erlang_cv_orelse],
[erlang_cv_orelse=no
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [dnl
case 3 of
A when A > 3 orelse A < 2 -> ok;
_ -> bad
end,
halt(0)])],
[erlang_cv_orelse=yes],
[AC_MSG_RESULT(WARNING: orelse/andalso not allowed in guards: XPATH parsing will be disabled !!!)])
])
AC_SUBST(erlang_cv_orelse)
AC_SUBST(ERL_OPTS)
AC_SUBST(ERLANG_APPLICATIONS)
AC_SUBST(DTD,[tsung-1.0.dtd])
AC_SUBST(TEMPLATES_SUBDIR,[tsung/templates])
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AS_AC_EXPAND(EXPANDED_LIBDIR, "$libdir/tsung")
AC_MSG_NOTICE(Storing library files in $EXPANDED_LIBDIR)
AS_AC_EXPAND(EXPANDED_SHAREDIR, "$datadir/tsung")
AC_MSG_NOTICE(Storing data files in $EXPANDED_SHAREDIR)
AC_CONFIG_FILES([\
Makefile \
tsung.spec \
tsung.sh \
tsung-recorder.sh \
examples/*.xml \
src/tsung_stats.pl \
src/tsung-plotter/tsplot.py \
src/log2tsung.pl \
src/tsung_controller/tsung_controller.app.src \
src/tsung_recorder/tsung_recorder.app.src \
src/tsung/tsung.app.src \
])
AC_OUTPUT
Jump to Line
Something went wrong with that request. Please try again.