Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 119 lines (102 sloc) 3.519 kb
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
1 dnl DNA define([AC_CACHE_LOAD], )dnl
2 AC_CACHE_LOAD
1ffd1ec @nniclausse add configure scripts to detect erlang installation directory and comman...
nniclausse authored
3
c4378c6 @nniclausse update mailing list.
nniclausse authored
4 AC_INIT([tsung], m4_normalize(m4_include([vsn.mk])),[tsung-users@process-one.net])
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
5 AC_PREREQ(2.59c)
6 AC_COPYRIGHT(Copyright (C) 2008 Nicolas Niclausse)
5345a3b @nniclausse rename idx-tsunami to tsung step 3
nniclausse authored
7 AC_CONFIG_SRCDIR(src/tsung/tsung.erl)
13dfdfd @nniclausse update configure & Makefile
nniclausse authored
8 dnl AM_INIT_AUTOMAKE()
9
10 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],[vsn.mk])
11 AC_SUBST([CONFIGURE_DEPENDENCIES],[vsn.mk])
1ffd1ec @nniclausse add configure scripts to detect erlang installation directory and comman...
nniclausse authored
12
bc45901 @nniclausse improved configure: add --with-erlang option and xmerl PATH detection (c...
nniclausse authored
13 AC_PATH_PROG(SED, sed)
14
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
15 AC_LANG(Erlang)
bc45901 @nniclausse improved configure: add --with-erlang option and xmerl PATH detection (c...
nniclausse authored
16 AC_ARG_WITH(erlang, [ --with-erlang=PREFIX path to erlc and erl ])
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
17 AC_ERLANG_PATH_ERLC(erlc, $with_erlang:$with_erlang/bin:$PATH)
18 AC_ERLANG_PATH_ERL(erl, $with_erlang:$with_erlang/bin:$PATH)
1ffd1ec @nniclausse add configure scripts to detect erlang installation directory and comman...
nniclausse authored
19
55e9c60 @nniclausse no longer install beam files in erlang root dir. Use configure setup ins...
nniclausse authored
20 AC_PREFIX_PROGRAM(erl)
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
21 AC_ERLANG_SUBST_ROOT_DIR()
1ffd1ec @nniclausse add configure scripts to detect erlang installation directory and comman...
nniclausse authored
22
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
23 AC_MSG_CHECKING(for Erlang/OTP '-hybrid' option)
94ec7aa @nniclausse hybrid and shared must work with smp
nniclausse authored
24 if ! $ERL -noshell -hybrid -smp 2 -s init stop 2> /dev/null; then
9faae4b @mremond * Make sure SVN properties are correctly set.
mremond authored
25 AC_MSG_RESULT(no)
26 else
27 AC_MSG_RESULT(yes)
28 ERL_OPTS="-hybrid $ERL_OPTS"
29 fi
30
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
31 dnl check for xmerl include path
32 AC_ERLANG_CHECK_LIB(xmerl)
33 AC_ERLANG_CHECK_LIB(ssl)
34 AC_ERLANG_CHECK_LIB(crypto)
35
36 dnl check if ssl is working
37 AC_CACHE_CHECK([if Erlang/OTP SSL application is running fine],
38 [erlang_cv_ssl_runnable],
39 [erlang_cv_ssl_runnable=no
40 AC_RUN_IFELSE(
41 [AC_LANG_PROGRAM([], [dnl
42 case application:start(ssl) of
43 ok -> ok;
44 Err -> halt(1)
45 end,
46 halt(0)])],
47 [erlang_cv_ssl_runnable=yes
48 ERLANG_APPLICATIONS="kernel,stdlib,ssl"],
49 [ERLANG_APPLICATIONS="kernel,stdlib"
50 AC_MSG_RESULT(WARNING: ssl application is not working properly !!!)])
51 ])
52
53 dnl check if crypto is working
54 AC_CACHE_CHECK([if Erlang/OTP crypto application is running fine],
55 [erlang_cv_crypto_runnable],
56 [erlang_cv_crypto_runnable=no
57 AC_RUN_IFELSE(
58 [AC_LANG_PROGRAM([], [dnl
59 case application:start(crypto) of
60 ok ->
61 case catch crypto:md5("toto") of
62 <<247,29,190,82,98,138,63,131,167,122,180,148,129,117,37, 198>> -> ok;
63 _ ->
64 halt(1)
65 end;
66 Err ->
67 erlang:display([Err]),
68 halt(1)
69 end,
70 halt(0) ])],
71 [ erlang_cv_crypto_runnable=yes
72 ERLANG_APPLICATIONS="$ERLANG_APPLICATIONS,crypto" ],
73 [ AC_MSG_RESULT([WARNING: crypto application is not working properly !!!])]) ])
74
75 dnl check if orelse is allowed in guards
76 AC_CACHE_CHECK([if orelse is allowed in guards],
77 [erlang_cv_orelse],
78 [erlang_cv_orelse=no
79 AC_RUN_IFELSE(
80 [AC_LANG_PROGRAM([], [dnl
81 case 3 of
82 A when A > 3 orelse A < 2 -> ok;
83 _ -> bad
84 end,
85 halt(0)])],
86 [erlang_cv_orelse=yes],
87 [AC_MSG_RESULT(WARNING: orelse/andalso not allowed in guards: XPATH parsing will be disabled !!!)])
88 ])
89
90
91 AC_SUBST(erlang_cv_orelse)
bc45901 @nniclausse improved configure: add --with-erlang option and xmerl PATH detection (c...
nniclausse authored
92 AC_SUBST(ERL_OPTS)
6c54808 @nniclausse check for ssl and crypto app at compile time (TSUN-63)
nniclausse authored
93 AC_SUBST(ERLANG_APPLICATIONS)
5345a3b @nniclausse rename idx-tsunami to tsung step 3
nniclausse authored
94 AC_SUBST(DTD,[tsung-1.0.dtd])
95 AC_SUBST(TEMPLATES_SUBDIR,[tsung/templates])
1ffd1ec @nniclausse add configure scripts to detect erlang installation directory and comman...
nniclausse authored
96
97 AC_PROG_MAKE_SET
98 AC_PROG_INSTALL
99
e567459 @nniclausse - update makefile/configure scripts for tsung-plotter (TSUN-89)
nniclausse authored
100 AS_AC_EXPAND(EXPANDED_LIBDIR, "$libdir/tsung")
101 AC_MSG_NOTICE(Storing library files in $EXPANDED_LIBDIR)
102 AS_AC_EXPAND(EXPANDED_SHAREDIR, "$datadir/tsung")
103 AC_MSG_NOTICE(Storing data files in $EXPANDED_SHAREDIR)
104
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
105 AC_CONFIG_FILES([\
106 Makefile \
107 tsung.spec \
108 tsung.sh \
109 examples/*.xml \
110 src/tsung_stats.pl \
e567459 @nniclausse - update makefile/configure scripts for tsung-plotter (TSUN-89)
nniclausse authored
111 src/tsung-plotter/tsplot.py \
54a7fac @nniclausse - use autoconf erlang builtin support in configure.in
nniclausse authored
112 src/log2tsung.pl \
113 src/tsung_controller/tsung_controller.app.src \
114 src/tsung_recorder/tsung_recorder.app.src \
115 src/tsung/tsung.app.src \
116 ])
13dfdfd @nniclausse update configure & Makefile
nniclausse authored
117
118 AC_OUTPUT
Something went wrong with that request. Please try again.