aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-02-03 12:56:25 +0000
committerErlang/OTP <[email protected]>2010-02-03 19:04:55 +0100
commit1b78e85c9b6097f0d1940793e5fed4e08c0794f9 (patch)
tree10ede523234396673be3a77a8d5dbdee20dee696 /configure.in
parent639e0b2ac0fb85335511efcf79327d1f4dfacbc3 (diff)
downloadotp-1b78e85c9b6097f0d1940793e5fed4e08c0794f9.tar.gz
otp-1b78e85c9b6097f0d1940793e5fed4e08c0794f9.tar.bz2
otp-1b78e85c9b6097f0d1940793e5fed4e08c0794f9.zip
OTP-8323 Cross compilation improvements and other build system
improvements. Most notable: Lots of cross compilation improvements. The old cross compilation support was more or less non-existing as well as broken. Please, note that the cross compilation support should still be considered as experimental. Also note that old cross compilation configurations cannot be used without modifications. For more information on cross compiling Erlang/OTP see the $ERL_TOP/xcomp/README file. Support for staged install using <url href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">D ESTDIR</url>. The old broken INSTALL_PREFIX has also been fixed. For more information see the $ERL_TOP/README file. Documentation of the release target of the top Makefile. For more information see the $ERL_TOP/README file. make install now by default creates relative symbolic links instead of absolute ones. For more information see the $ERL_TOP/README file. $ERL_TOP/configure --help=recursive now works and prints help for all applications with configure scripts. Doing make install, or make release directly after make all no longer triggers miscellaneous rebuilds. Existing bootstrap system is now used when doing make install, or make release without a preceding make all. The crypto and ssl applications use the same runtime library path when dynamically linking against libssl.so and libcrypto.so. The runtime library search path has also been extended. The configure scripts of erl_interface and odbc now search for thread libraries and thread library quirks the same way as erts do. The configure script of the odbc application now also looks for odbc libraries in lib64 and lib/64 directories when building on a 64-bit system. The config.h.in file in the erl_interface application is now automatically generated in instead of statically updated which reduces the risk of configure tests without any effect.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in79
1 files changed, 73 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 7ddffd85ad..19ef304a1a 100644
--- a/configure.in
+++ b/configure.in
@@ -1,8 +1,28 @@
dnl Process this file with autoconf to produce a configure script.
+
+dnl %CopyrightBegin%
+dnl
+dnl Copyright Ericsson AB 1998-2010. All Rights Reserved.
+dnl
+dnl The contents of this file are subject to the Erlang Public License,
+dnl Version 1.1, (the "License"); you may not use this file except in
+dnl compliance with the License. You should have received a copy of the
+dnl Erlang Public License along with this software. If not, it can be
+dnl retrieved online at http://www.erlang.org/.
+dnl
+dnl Software distributed under the License is distributed on an "AS IS"
+dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+dnl the License for the specific language governing rights and limitations
+dnl under the License.
+dnl
+dnl %CopyrightEnd%
+
AC_PREREQ(2.8)dnl
AC_INIT()
+LM_PRECIOUS_VARS
+
default_cache_file=./config.cache
if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
@@ -19,6 +39,18 @@ if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
cache_file=/dev/null
fi
+case "X$ERL_TOP" in
+ X)
+ ;;
+ X/*)
+ test -f $ERL_TOP/erts/emulator/beam/beam_emu.c || {
+ AC_MSG_ERROR([Invalid \$ERL_TOP])
+ }
+ srcdir="$ERL_TOP";;
+ *)
+ AC_MSG_ERROR([\$ERL_TOP needs to be absolute]);;
+esac
+
dnl How to set srcdir absolute is taken from the GNU Emacs distribution
#### Make srcdir absolute, if it isn't already. It's important to
#### avoid running the path through pwd unnecessary, since pwd can
@@ -43,7 +75,7 @@ esac
#
# Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP.
#
-ERL_TOP=${srcdir}
+test "X$ERL_TOP" != "X" || ERL_TOP="$srcdir"
AC_SUBST(ERL_TOP)
dnl
@@ -65,11 +97,35 @@ fi
TARGET=$host
AC_SUBST(TARGET)
+if test X$cross_compiling = Xyes; then
+ CROSS_COMPILING=yes
+else
+ CROSS_COMPILING=no
+fi
+AC_SUBST(CROSS_COMPILING)
+
+
+AC_ARG_ENABLE(bootstrap-only,
+[ --enable-bootstrap-only enable bootstrap only configuration],
+[ if test "X$enableval" = "Xyes"; then
+ BOOTSTRAP_ONLY=yes
+ else
+ BOOTSTRAP_ONLY=no
+ fi
+],
+BOOTSTRAP_ONLY=no)
+
+AC_SUBST(BOOTSTRAP_ONLY)
+
+if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then
+ AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system])
+fi
dnl Checks for programs.
AC_PROG_CC
-
+AC_PROG_CXX
+AC_CHECK_TOOL(LD, [ld])
#
# We need GNU make, complain if we can't find it
@@ -123,11 +179,17 @@ AC_PROG_LN_S
AC_PROG_RANLIB
#
-# Get erts version from erts/vsn.mk
+# Get erts version and otp release from erts/vsn.mk
#
-[ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`]
+AC_MSG_CHECKING([ERTS version])
+[ERTS=erts-`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
+AC_MSG_RESULT([$ERTS])
AC_SUBST(ERTS)
+AC_MSG_CHECKING([OTP release])
+[OTP=OTP-`sed -n "s/^SYSTEM_VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
+AC_MSG_RESULT([$OTP])
+AC_SUBST(OTP)
AC_ARG_ENABLE(threads,
[ --enable-threads enable async thread support
@@ -147,6 +209,11 @@ AC_ARG_ENABLE(kernel-poll,
AC_ARG_ENABLE(hipe,
[ --enable-hipe enable hipe support
--disable-hipe disable hipe support])
+
+AC_ARG_WITH(javac,
+[ --with-javac=JAVAC specify Java compiler to use
+ --with-javac use a Java compiler if found (default)
+ --without-javac don't use any Java compiler])
AC_ARG_ENABLE(megaco_flex_scanner_lineno,
[ --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno
@@ -176,8 +243,8 @@ AC_ARG_ENABLE(erlang-mandir,
[ --disable-erlang-mandir do not install Erlang man pages in a private directory],
[ case "$enableval" in
no) erl_mandir=$mandir ;;
- *) erl_mandir='$(ERLANG_ILIBDIR)/man' ;;
- esac ], erl_mandir='$(ERLANG_ILIBDIR)/man')
+ *) erl_mandir='$(erlang_libdir)/man' ;;
+ esac ], erl_mandir='$(erlang_libdir)/man')
AC_SUBST(erl_mandir)
AC_ARG_ENABLE(darwin-universal,