Skip to content

HTTPS clone URL

Subversion checkout URL

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