Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

132 lines (112 sloc) 3.969 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_PATH_PROG(DIALYZER,dialyzer, /usr/bin/dializer, $with_erlang:$with_erlang/bin:$PATH)
AC_PREFIX_PROGRAM(erl)
AC_ERLANG_SUBST_ROOT_DIR()
dnl check for xmerl include path
AC_ERLANG_CHECK_LIB(xmerl)
AC_ERLANG_CHECK_LIB(ssl)
AC_ERLANG_CHECK_LIB(crypto)
AC_ERLANG_CHECK_LIB(public_key)
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"],
[
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [dnl
application:start(crypto),
application:start(asn1),
application:start(public_key),
case application:start(ssl) of
ok -> ok;
Err -> halt(1)
end,
halt(0)])],
[erlang_cv_ssl_runnable=yes
ERLANG_APPLICATIONS="kernel,stdlib,asn1,crypto,public_key,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")
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/tsung_recorder/tsung_recorder.app \
src/tsung/tsung.app \
])
AC_OUTPUT
Jump to Line
Something went wrong with that request. Please try again.