Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 298 lines (259 sloc) 8.668 kb
84adefa The R13B03 release.
Erlang/OTP authored
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.8)dnl
3
4 AC_INIT()
5
6 default_cache_file=./config.cache
7
8 if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
9 # The no_recursion variable is not documented, but the only
10 # action we take on it is disabling caching which is safe!
11 if test "x$cache_file" != "x$default_cache_file"; then
12 echo "Ignoring the --cache-file argument since it can cause the system to be erroneously configured"
13 fi
14 echo "Disabling caching"
15 if test -f $cache_file; then
16 echo "Removing cache file $cache_file"
17 rm -f $cache_file
18 fi
19 cache_file=/dev/null
20 fi
21
22 dnl How to set srcdir absolute is taken from the GNU Emacs distribution
23 #### Make srcdir absolute, if it isn't already. It's important to
24 #### avoid running the path through pwd unnecessary, since pwd can
25 #### give you automounter prefixes, which can go away.
26 case "${srcdir}" in
27 /* ) ;;
28 . )
29 ## We may be able to use the $PWD environment variable to make this
30 ## absolute. But sometimes PWD is inaccurate.
31 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
32 CDPATH=
33 if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ;
34 then
35 srcdir="$PWD"
36 else
37 srcdir="`(cd ${srcdir}; pwd)`"
38 fi
39 ;;
40 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
41 esac
42
43 #
44 # Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP.
45 #
46 ERL_TOP=${srcdir}
47 AC_SUBST(ERL_TOP)
48
49 dnl
50 dnl Aux programs are found in erts/autoconf
51 dnl
52 AC_CONFIG_AUX_DIR(${srcdir}/erts/autoconf)
53
54 dnl
55 dnl Figure out what we are running on. And in violation of autoconf
56 dnl style assume that $host is also what we are building for. I would
57 dnl like to get cross compiling working, since we actually have
58 dnl systems we cross compile for!
59 dnl
60
61 if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then
62 AC_CANONICAL_HOST
63 fi
64
65 TARGET=$host
66 AC_SUBST(TARGET)
67
68
69 dnl Checks for programs.
70
71 AC_PROG_CC
72
73
74 #
75 # We need GNU make, complain if we can't find it
76 #
77 AC_MSG_CHECKING(for GNU make)
78 # If there is a Makefile created we don't want make to start making, run
79 # in a subdirectory and -f /dev/null
80 MAKE_PROG=x
81 if test X"$CLEARCASE_MAKE_COMPAT" = X"gnu" -a X"$CLEARCASE_ROOT" != X"" ; then
82 eval clearmake -version 2>&1 | grep clearmake > /dev/null 2>&1
83 case $? in
84 0) MAKE_PROG="clearmake -V";;
85 *);;
86 esac
87 fi
88 if test X"$MAKE_PROG" = X"x"; then
89 mkdir conftestmake
90 if test -d conftestmake; then
91 cd conftestmake
92 for m in make gmake ggmake; do
93 eval $m --version -f /dev/null 2>&1 | grep GNU > /dev/null 2>&1
94 case $? in
95 0) MAKE_PROG=$m ; break ;;
96 *) ;;
97 esac
98 done
99 cd ..
100 else
101 AC_MSG_ERROR(could not create subdirectory)
102 fi
103 fi
104 rm -rf conftestmake
105 case $MAKE_PROG in
106 x) AC_MSG_RESULT(no)
107 AC_MSG_ERROR(GNU make is required!)
108 ;;
109 *) AC_MSG_RESULT(yes ($MAKE_PROG))
110 AC_SUBST(MAKE_PROG)
111 ;;
112 esac
113
114 AC_PROG_INSTALL
115 if test X"${INSTALL}" = "X${ac_aux_dir}/install-sh -c" && test -f /usr/ucb/install ; then
116 case $host_os in
117 osf*) ;;
118 *) INSTALL="/usr/ucb/install -c" ;;
119 esac
120 fi
121
122 AC_PROG_LN_S
123 AC_PROG_RANLIB
124
125 #
126 # Get erts version from erts/vsn.mk
127 #
128 [ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`]
129 AC_SUBST(ERTS)
130
131
132 AC_ARG_ENABLE(threads,
133 [ --enable-threads enable async thread support
134 --disable-threads disable async thread support])
135
136 AC_ARG_ENABLE(smp-support,
137 [ --enable-smp-support enable smp support
138 --disable-smp-support disable smp support])
139
140 AC_ARG_WITH(termcap,
141 [ --with-termcap use termcap (default)
142 --without-termcap do not use any termcap libraries (ncurses,curses,termcap,termlib)])
143
144 AC_ARG_ENABLE(kernel-poll,
145 [ --enable-kernel-poll enable kernel poll support])
146
147 AC_ARG_ENABLE(hipe,
148 [ --enable-hipe enable hipe support
149 --disable-hipe disable hipe support])
150
151 AC_ARG_ENABLE(megaco_flex_scanner_lineno,
152 [ --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno
153 --disable-megaco-flex-scanner-lineno disable megaco flex scanner lineno])
154
155 AC_ARG_ENABLE(megaco_reentrant_flex_scanner,
156 [ --enable-megaco-reentrant-flex-scanner enable reentrans megaco flex scanner
157 --disable-megaco-reentrant-flex-scanner disable reentrans megaco flex scanner])
158
159 AC_ARG_WITH(ssl,
160 [ --with-ssl=PATH specify location of OpenSSL include and lib
161 --with-ssl use SSL (default)
162 --without-ssl don't use SSL])
163
164 AC_ARG_ENABLE(dynamic-ssl-lib,
165 [ --enable-dynamic-ssl-lib force using dynamic openssl libraries
166 --disable-dynamic-ssl-lib disable using dynamic openssl libraries])
167
168 AC_ARG_ENABLE(shared-zlib,
169 [ --enable-shared-zlib enable using shared zlib library
170 --disable-shared-zlib disable shared zlib, compile own zlib source (default)])
171
172 #
173 # Set Erlang man page directory
174 #
175 AC_ARG_ENABLE(erlang-mandir,
176 [ --disable-erlang-mandir do not install Erlang man pages in a private directory],
177 [ case "$enableval" in
178 no) erl_mandir=$mandir ;;
179 *) erl_mandir='$(ERLANG_ILIBDIR)/man' ;;
180 esac ], erl_mandir='$(ERLANG_ILIBDIR)/man')
181 AC_SUBST(erl_mandir)
182
183 AC_ARG_ENABLE(darwin-universal,
184 [ --enable-darwin-universal build universal binaries on darwin i386],
185 [ case "$enableval" in
186 no) enable_darwin_universal=no ;;
187 *) enable_darwin_univeral=yes ;;
188 esac
189 ],enable_darwin_universal=no)
190
191
192 AC_ARG_ENABLE(darwin-64bit,
193 [ --enable-darwin-64bit build 64bit binaries on darwin],
194 [ case "$enableval" in
195 no) enable_darwin_64bit=no ;;
196 *) enable_darwin_64bit=yes ;;
197 esac
198 ],enable_darwin_64bit=no)
199
200 AC_ARG_ENABLE(m64-build,
201 [ --enable-m64-build build 64bit binaries using the -m64 flag to (g)cc],
202 [ case "$enableval" in
203 no) enable_m64_build=no ;;
204 *) enable_m64_build=yes ;;
205 esac
206 ],enable_m64_build=no)
207
208 dnl OK, we might have darwin switches off different kinds, lets
209 dnl check it all before continuing.
210 TMPSYS=`uname -s`-`uname -m`
211 if test X${enable_darwin_universal} = Xyes; then
212 if test X${enable_darwin_64bit} = Xyes; then
213 AC_MSG_ERROR([--enable-darwin-universal and --enable-darwin-64bit mutually exclusive])
214 fi
215 enable_hipe=no
216 CFLAGS="-arch i386 -arch ppc $CFLAGS"
217 export CFLAGS
218 LDFLAGS="-arch i386 -arch ppc $LDFLAGS"
219 export LDFLAGS
220 fi
221 if test X${enable_darwin_64bit} = Xyes; then
222 case "$TMPSYS" in
223 Darwin-i386|Darwin-x86_64)
224 ;;
225 Darwin*)
226 AC_MSG_ERROR([--enable-darwin-64bit only supported on x86 hosts])
227 ;;
228 *)
229 AC_MSG_ERROR([--enable-darwin-64bit only supported on Darwin])
230 ;;
231 esac
232 enable_hipe=no
233 CFLAGS="-m64 $CFLAGS"
234 export CFLAGS
235 LDFLAGS="-m64 $LDFLAGS"
236 export LDFLAGS
237 elif test X"$TMPSYS" '=' X"Darwin-i386"; then
238 CFLAGS="-m32 $CFLAGS"
239 export CFLAGS
240 LDFLAGS="-m32 $LDFLAGS"
241 export LDFLAGS
242 fi
243
244 if test X${enable_m64_build} = Xyes; then
245 enable_hipe=no
246 CFLAGS="-m64 $CFLAGS"
247 export CFLAGS
248 LDFLAGS="-m64 $LDFLAGS"
249 export LDFLAGS
250 fi
251
252 export ERL_TOP
253 AC_CONFIG_SUBDIRS(lib erts)
254
255 AC_OUTPUT(Makefile)
256
257 pattern="lib/*/SKIP"
258 files=`echo $pattern`
259 if test "$files" != "$pattern"; then
260 echo '*********************************************************************'
261 echo '********************** APPLICATIONS DISABLED **********************'
262 echo '*********************************************************************'
263 echo
264 for skipfile in $files; do
265 app=`dirname $skipfile`; app=`basename $app`
266 printf "%-15s: " $app; cat $skipfile
267 done
268 echo
269 echo '*********************************************************************'
270 fi
271 pattern="lib/*/CONF_INFO"
272 files=`echo $pattern`
273 if test "$files" != "$pattern"; then
274 echo '*********************************************************************'
275 echo '********************** APPLICATIONS INFORMATION *******************'
276 echo '*********************************************************************'
277 echo
278 for infofile in $files; do
279 app=`dirname $infofile`; app=`basename $app`
280 printf "%-15s: " $app; cat $infofile
281 done
282 echo
283 echo '*********************************************************************'
284 fi
285 if test -f "erts/doc/CONF_INFO"; then
286 echo '*********************************************************************'
287 echo '********************** DOCUMENTATION INFORMATION ******************'
288 echo '*********************************************************************'
289 echo
290 printf "%-15s: \n" documentation;
291 for cmd in `cat erts/doc/CONF_INFO`; do
292 echo " $cmd is missing."
293 done
294 echo ' The documentation can not be built.'
295 echo
296 echo '*********************************************************************'
297 fi
Something went wrong with that request. Please try again.