1
1
dnl Process this file with autoconf to produce a configure script.
5
dnl Copyright Ericsson AB 1998-2010. All Rights Reserved.
7
dnl The contents of this file are subject to the Erlang Public License,
8
dnl Version 1.1, (the "License"); you may not use this file except in
9
dnl compliance with the License. You should have received a copy of the
10
dnl Erlang Public License along with this software. If not, it can be
11
dnl retrieved online at http://www.erlang.org/.
13
dnl Software distributed under the License is distributed on an "AS IS"
14
dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
dnl the License for the specific language governing rights and limitations
16
dnl under the License.
6
26
default_cache_file=./config.cache
8
28
if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
19
39
cache_file=/dev/null
46
test -f $ERL_TOP/erts/emulator/beam/beam_emu.c || {
47
AC_MSG_ERROR([Invalid \$ERL_TOP])
51
AC_MSG_ERROR([\$ERL_TOP needs to be absolute]);;
22
54
dnl How to set srcdir absolute is taken from the GNU Emacs distribution
23
55
#### Make srcdir absolute, if it isn't already. It's important to
24
56
#### avoid running the path through pwd unnecessary, since pwd can
100
if test X$cross_compiling = Xyes; then
105
AC_SUBST(CROSS_COMPILING)
108
AC_ARG_ENABLE(bootstrap-only,
109
[ --enable-bootstrap-only enable bootstrap only configuration],
110
[ if test "X$enableval" = "Xyes"; then
118
AC_SUBST(BOOTSTRAP_ONLY)
120
if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then
121
AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system])
69
124
dnl Checks for programs.
128
AC_CHECK_TOOL(LD, [ld])
75
131
# We need GNU make, complain if we can't find it
126
# Get erts version from erts/vsn.mk
182
# Get erts version and otp release from erts/vsn.mk
128
[ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`]
184
AC_MSG_CHECKING([ERTS version])
185
[ERTS=erts-`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
186
AC_MSG_RESULT([$ERTS])
189
AC_MSG_CHECKING([OTP release])
190
[OTP=OTP-`sed -n "s/^SYSTEM_VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
191
AC_MSG_RESULT([$OTP])
132
194
AC_ARG_ENABLE(threads,
133
195
[ --enable-threads enable async thread support
147
209
AC_ARG_ENABLE(hipe,
148
210
[ --enable-hipe enable hipe support
149
211
--disable-hipe disable hipe support])
214
[ --with-javac=JAVAC specify Java compiler to use
215
--with-javac use a Java compiler if found (default)
216
--without-javac don't use any Java compiler])
151
218
AC_ARG_ENABLE(megaco_flex_scanner_lineno,
152
219
[ --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno
169
236
[ --enable-shared-zlib enable using shared zlib library
170
237
--disable-shared-zlib disable shared zlib, compile own zlib source (default)])
173
# Set Erlang man page directory
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')
239
dnl This functionality has been lost along the way... :(
240
dnl It could perhaps be nice to reintroduce some day; therefore,
241
dnl it is not removed just commented out.
244
dnl # Set Erlang man page directory
246
dnl AC_ARG_ENABLE(erlang-mandir,
247
dnl [ --disable-erlang-mandir do not install Erlang man pages in a private directory],
248
dnl [ case "$enableval" in
249
dnl no) erl_mandir=$mandir ;;
250
dnl *) erl_mandir='$(erlang_libdir)/man' ;;
251
dnl esac ], erl_mandir='$(erlang_libdir)/man')
252
dnl AC_SUBST(erl_mandir)
183
254
AC_ARG_ENABLE(darwin-universal,
184
255
[ --enable-darwin-universal build universal binaries on darwin i386],
206
277
],enable_m64_build=no)
279
AC_ARG_ENABLE(m32-build,
280
[ --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc],
281
[ case "$enableval" in
282
no) enable_m32_build=no ;;
284
if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes;
286
AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ;
288
enable_m32_build=yes ;;
290
],enable_m32_build=no)
208
292
dnl OK, we might have darwin switches off different kinds, lets
209
293
dnl check it all before continuing.
210
294
TMPSYS=`uname -s`-`uname -m`