aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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 'lib')
-rw-r--r--lib/Makefile16
-rw-r--r--lib/asn1/c_src/Makefile124
-rw-r--r--lib/asn1/c_src/Makefile.in139
-rw-r--r--lib/configure.in37
-rw-r--r--lib/configure.in.src61
-rw-r--r--lib/crypto/c_src/Makefile.in28
-rw-r--r--lib/erl_interface/configure.in164
-rw-r--r--lib/erl_interface/src/Makefile.in12
-rw-r--r--lib/erl_interface/src/auxdir/config.h.in277
-rw-r--r--lib/hipe/rtl/Makefile15
-rw-r--r--lib/megaco/configure.in113
-rw-r--r--lib/megaco/src/flex/Makefile.in80
-rw-r--r--lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src13
l---------lib/odbc/aclocal.m41
-rw-r--r--lib/odbc/c_src/Makefile.in22
-rw-r--r--lib/odbc/configure.in160
-rw-r--r--lib/runtime_tools/c_src/Makefile.in31
-rw-r--r--lib/ssl/c_src/Makefile.in22
-rw-r--r--lib/wx/c_src/Makefile.in23
-rwxr-xr-xlib/wx/configure.in21
20 files changed, 512 insertions, 847 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 66062068b2..f5ffc6f166 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
include $(ERL_TOP)/make/target.mk
@@ -51,7 +51,7 @@ else
# --------------
#
ERTS_SUB_DIRECTORIES = stdlib sasl kernel compiler
- OTHER_SUB_DIRECTORIES = tools
+ OTHER_SUB_DIRECTORIES = tools test_server
ifdef BUILD_ALL
ifeq ($(findstring win32,$(TARGET)),win32) # BUILD_ALL on win32
OTHER_SUB_DIRECTORIES += \
@@ -60,7 +60,7 @@ else
public_key ssl toolbar tv observer debugger reltool odbc runtime_tools \
cosTransactions cosEvent cosTime cosNotification cosProperty \
cosFileTransfer cosEventDomain et megaco webtool \
- xmerl edoc eunit ssh inviso typer docbuilder erl_docgen test_server common_test percept
+ xmerl edoc eunit ssh inviso typer docbuilder erl_docgen common_test percept
# dialyzer
OTHER_SUB_DIRECTORIES += hipe
else # BUILD_ALL on unix
@@ -70,7 +70,7 @@ else
pman public_key ssl toolbar tv observer odbc \
runtime_tools cosTransactions cosEvent cosTime cosNotification \
cosProperty cosFileTransfer cosEventDomain et megaco webtool \
- xmerl edoc eunit ssh inviso typer docbuilder erl_docgen test_server common_test percept
+ xmerl edoc eunit ssh inviso typer docbuilder erl_docgen common_test percept
# dialyzer
OTHER_SUB_DIRECTORIES += hipe $(TSP_APP)
endif
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
index 53da8fd035..906c513fad 100644
--- a/lib/asn1/c_src/Makefile
+++ b/lib/asn1/c_src/Makefile
@@ -1,20 +1,132 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2002-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
#
-include $(ERL_TOP)/make/run_make.mk
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
+
+CC = $(DED_CC)
+LD = $(DED_LD)
+LIBS = $(DED_LIBS)
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../vsn.mk
+VSN=$(ASN1_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/asn1-$(VSN)
+
+
+# ----------------------------------------------------
+# FLAGS misc
+# ----------------------------------------------------
+ifeq ($(TYPE),debug)
+TYPEMARKER = .debug
+else
+TYPEMARKER =
+endif
+
+EI_LIBDIR = $(ERL_TOP)/lib/erl_interface/obj$(TYPEMARKER)/$(TARGET)
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+EI_INCLUDES = -I$(ERL_TOP)/lib/erl_interface/include
+CFLAGS = $(DED_INCLUDES) $(EI_INCLUDES) $(DED_CFLAGS)
+LDFLAGS += $(DED_LDFLAGS)
+
+LD_INCL_EI = -L$(EI_LIBDIR)
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+C_FILES = asn1_erl_driver.c
+
+
+ifeq ($(TARGET),win32)
+LD_EI = -lei_md
+SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.dll
+OBJ_FILES = $(OBJDIR)/asn1_erl_drv.o
+CLIB_FLAGS =
+LN=cp
+else
+LD_EI = -lei
+OBJ_FILES = $(OBJDIR)/asn1_erl_drv.o
+ifeq ($(findstring vxworks,$(TARGET)),vxworks)
+SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.eld
+CLIB_FLAGS =
+else
+SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.so
+CLIB_FLAGS = -lc
+endif
+LN= ln -s
+endif
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+opt: $(OBJDIR) $(LIBDIR) $(SHARED_OBJ_FILES)
+
+debug: opt
+
+clean:
+ rm -f core *~
+ rm -f $(LIBDIR)/*
+ rm -f $(OBJDIR)/*
+
+docs:
+
+# ----------------------------------------------------
+# Special Build Targets
+# ----------------------------------------------------
+
+
+$(OBJ_FILES): $(C_FILES)
+ $(CC) -c $(CFLAGS) -o $(OBJ_FILES) $(C_FILES)
+
+$(SHARED_OBJ_FILES): $(OBJ_FILES)
+ $(LD) $(LDFLAGS) $(LD_INCL_EI) -o $(SHARED_OBJ_FILES) $(OBJ_FILES) $(LD_EI) $(CLIB_FLAGS) $(LIBS)
+
+$(LIBDIR):
+ -mkdir -p $(LIBDIR)
+
+$(OBJDIR):
+ -mkdir -p $(OBJDIR)
+
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
+ $(INSTALL_DATA) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
+ $(INSTALL_DIR) $(RELSYSDIR)/c_src
+ $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/c_src
+
+release_docs_spec:
+
diff --git a/lib/asn1/c_src/Makefile.in b/lib/asn1/c_src/Makefile.in
deleted file mode 100644
index b4a0cddba1..0000000000
--- a/lib/asn1/c_src/Makefile.in
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-#
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-ERLANG_OSTYPE = @ERLANG_OSTYPE@
-
-CC = @CC@
-
-LD = @DED_LD@
-LIBS = @LIBS@
-
-LIBDIR = $(ERL_TOP)/lib/asn1/priv/lib/$(TARGET)
-OBJDIR = $(ERL_TOP)/lib/asn1/priv/obj/$(TARGET)
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include ../vsn.mk
-VSN=$(ASN1_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/asn1-$(VSN)
-
-
-# ----------------------------------------------------
-# FLAGS misc
-# ----------------------------------------------------
-ifeq ($(TYPE),debug)
-TYPEMARKER = .debug
-else
-TYPEMARKER =
-endif
-
-EI_LIBDIR = $(ERL_TOP)/lib/erl_interface/obj$(TYPEMARKER)/$(TARGET)
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-EI_INCLUDES = -I$(ERL_TOP)/lib/erl_interface/include
-DRIVER_INCLUDES = -I$(ERL_TOP)/erts/emulator/beam \
- -I$(ERL_TOP)/erts/emulator/sys/$(ERLANG_OSTYPE)
-CFLAGS = $(DRIVER_INCLUDES) $(EI_INCLUDES) @DED_CFLAGS@
-LDFLAGS += @DED_LDFLAGS@
-
-LD_INCL_EI = -L$(EI_LIBDIR)
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-
-C_FILES = asn1_erl_driver.c
-
-
-ifeq ($(TARGET),win32)
-LD_EI = -lei_md
-SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.dll
-OBJ_FILES = $(OBJDIR)/asn1_erl_drv.o
-CLIB_FLAGS =
-LN=cp
-else
-LD_EI = -lei
-OBJ_FILES = $(OBJDIR)/asn1_erl_drv.o
-ifeq ($(findstring vxworks,$(TARGET)),vxworks)
-SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.eld
-CLIB_FLAGS =
-else
-SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.so
-CLIB_FLAGS = -lc
-endif
-LN= ln -s
-endif
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-opt: $(OBJDIR) $(LIBDIR) $(SHARED_OBJ_FILES)
-
-debug: opt
-
-clean:
- rm -f core *~
- rm -f $(LIBDIR)/*
- rm -f $(OBJDIR)/*
-
-docs:
-
-# ----------------------------------------------------
-# Special Build Targets
-# ----------------------------------------------------
-
-
-$(OBJ_FILES): $(C_FILES) $(OBJDIR)
- $(CC) -c $(CFLAGS) -o $(OBJ_FILES) $(C_FILES)
-
-$(SHARED_OBJ_FILES): $(OBJ_FILES) $(LIBDIR)
- $(LD) $(LDFLAGS) $(LD_INCL_EI) -o $(SHARED_OBJ_FILES) $(OBJ_FILES) $(LD_EI) $(CLIB_FLAGS) $(LIBS)
-
-$(LIBDIR):
- -mkdir -p $(LIBDIR)
-
-$(OBJDIR):
- -mkdir -p $(OBJDIR)
-
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_spec: opt
- $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
- $(INSTALL_DATA) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
- $(INSTALL_DIR) $(RELSYSDIR)/c_src
- $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/c_src
-
-release_docs_spec:
-
diff --git a/lib/configure.in b/lib/configure.in
deleted file mode 100644
index 7732556c46..0000000000
--- a/lib/configure.in
+++ /dev/null
@@ -1,37 +0,0 @@
-dnl Turn of caching
-define([AC_CACHE_LOAD], )dnl
-define([AC_CACHE_SAVE], )dnl
-
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT
-
-dnl
-dnl This is just to run configure in all applications that need it.
-dnl
-
-if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then
- AC_MSG_ERROR(You need to set the environment variable ERL_TOP!)
-fi
-erl_top=${ERL_TOP}
-AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf)
-
-dnl Version 2.55 of autoconf generate code that assume a
-dnl sub directory isn't a link. Internally at Ericsson
-dnl some OTP application directories are soft links.
-dnl An added "/." solves this problem.
-dnl
-dnl The arguments to AC_CONFIG_SUBDIRS should be literals
-dnl but a bug in autoconf 2.13 breaks conditional use
-dnl of multiple AC_CONFIG_SUBDIRS so we do it the "wrong"
-dnl way to force correct code.
-
-appdirs=""
-for d in * ; do
- if test -f "$d/configure" ; then
- appdirs="$appdirs $d/."
- fi
-done
-
-AC_CONFIG_SUBDIRS($appdirs)
-
-AC_OUTPUT
diff --git a/lib/configure.in.src b/lib/configure.in.src
new file mode 100644
index 0000000000..792a7f932a
--- /dev/null
+++ b/lib/configure.in.src
@@ -0,0 +1,61 @@
+dnl
+dnl %CopyrightBegin%
+dnl
+dnl Copyright Ericsson AB 1999-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%
+dnl
+
+dnl Turn of caching
+define([AC_CACHE_LOAD], )dnl
+define([AC_CACHE_SAVE], )dnl
+
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT
+
+dnl
+dnl This is just to run configure in all applications that need it.
+dnl
+
+if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then
+ AC_MSG_ERROR(You need to set the environment variable ERL_TOP!)
+fi
+erl_top=${ERL_TOP}
+AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf)
+
+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)
+
+# Multiple versions of autoconf generates code that
+# don't work on all platforms (e.g. SunOS 5.8) if
+# sub directories are soft links. Internally at Ericsson
+# some OTP application directories are soft links.
+# An added "/." solves this problem.
+
+@BOOTSTRAP_CONFIGURE_APPS@
+
+if test $bootstrap_only = no; then
+
+@NON_BOOTSTRAP_CONFIGURE_APPS@
+
+fi
+
+AC_OUTPUT
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
index 29263d7ac7..c62ebde27b 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
@@ -81,20 +81,12 @@ ifeq ($(HOST_OS),)
HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
endif
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
-LD_R_FLAG=@DED_LD_FLAG_RUNTIME_LIBRARY_PATH@
-ifeq ($(strip $(LD_R_FLAG)),)
-LD_R_OPT =
-else
-ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
-LD_R_OPT = $(LD_R_FLAG)$(SSL_LIBDIR)
-else
-LD_R_OPT =
-endif
-endif
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
-CRYPTO_LINK_LIB=-L$(SSL_LIBDIR) -lcrypto
+SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
+CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -lcrypto
else
+SSL_DED_LD_RUNTIME_LIBRARY_PATH=
CRYPTO_LINK_LIB=$(SSL_LIBDIR)/libcrypto.a
endif
@@ -116,11 +108,11 @@ $(OBJDIR)/%.o: %.c
$(LIBDIR)/crypto_drv.so: $(OBJS)
$(INSTALL_DIR) $(LIBDIR)
- $(LD) $(LDFLAGS) $(LD_R_OPT) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB)
+ $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB)
$(LIBDIR)/crypto_drv.dll: $(OBJS)
$(INSTALL_DIR) $(LIBDIR)
- $(LD) $(LDFLAGS) -o $@ -L$(SSL_LIBDIR) $(OBJS) -llibeay32
+ $(LD) $(LDFLAGS) -o $@ $(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) $(OBJS) -llibeay32
clean:
rm -f $(DYN_DRIVER) $(OBJS)
diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in
index 2f5b5673bb..7728cb97be 100644
--- a/lib/erl_interface/configure.in
+++ b/lib/erl_interface/configure.in
@@ -1,19 +1,19 @@
# -*- Autoconf -*-
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2000-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2000-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
# Process this file with autoconf to produce a configure script.
@@ -65,18 +65,12 @@ fi
TARGET=$host
AC_SUBST(TARGET)
-AC_CONFIG_HEADER([src/$host/config.h:src/auxdir/config.h.in])
+AC_CONFIG_HEADER([src/$host/config.h:config.h.in])
dnl ----------------------------------------------------------------------
dnl Optional features
dnl ----------------------------------------------------------------------
-AC_ARG_WITH(xcomp-conf,
-[ --with-xcompconf=PATH path to cross compilation configuration])
-if test "x$with_xcompconf" != "xno" -a "x$with_xcompconf" != "x" ; then
- . $with_xcompconf
-fi
-
# Use --disable-threads to force building single threaded libs even
# if pthreads exists (for test purposes).
AC_ARG_ENABLE(threads,
@@ -95,9 +89,8 @@ AC_PROG_CC
AC_PROG_CPP
dnl AC_PROG_LIBTOOL
AC_PROG_RANLIB
-if test "x$LD" = "x"; then
- AC_CHECK_TOOL([LD],[ld],[ld])
-fi
+AC_CHECK_PROG(LD, ld.sh)
+AC_CHECK_TOOL(LD, ld, '$(CC)')
AC_SUBST(LD)
AC_CHECK_SIZEOF(short)
@@ -110,8 +103,8 @@ if test $ac_cv_sizeof_void_p = 8; then
CFLAGS="$CFLAGS -DEI_64BIT"
fi
-AC_CHECK_PROG(AR, ar, ar, false)
-if test "$ac_cv_prog_AR" = false; then
+AC_CHECK_TOOL(AR, ar, false)
+if test "$AR" = false; then
AC_MSG_ERROR([No 'ar' command found in PATH])
fi
@@ -164,7 +157,7 @@ AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>],
[socklen_t mylen;],
[AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_SOCKLEN_T)],
+ AC_DEFINE(HAVE_SOCKLEN_T, [], [Define if you have the `socklen_t' type])],
[AC_MSG_RESULT(no)])
# Checks for library functions.
@@ -209,7 +202,7 @@ if test "x$with_gmp" = "xyes" ;then
AC_CHECK_HEADER($dir/include/gmp.h, ac_cv_gmp=yes, ac_cv_gmp=no)
if test $ac_cv_gmp = yes ; then
CFLAGS="$CFLAGS -I$dir/include -L$dir/lib"
- AC_DEFINE(HAVE_GMP_H)
+ AC_DEFINE(HAVE_GMP_H, [], [Define if you have "gmp.h"])
break
fi
done
@@ -226,7 +219,7 @@ elif test "x$with_gmp" != "xno" -a -n "$with_gmp" ;then
fi
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -I$with_gmp/include -L$with_gmp/lib"
- AC_DEFINE(HAVE_GMP_H)
+ AC_DEFINE(HAVE_GMP_H, [], [Define if you have "gmp.h"])
AC_CHECK_LIB(gmp, __gmpz_export)
# FIXME return ERROR if no lib
fi
@@ -279,110 +272,43 @@ AC_SUBST(MIXED_CYGWIN)
dnl
dnl Threads
dnl
-found_threads=no
THR_LIBS=
THR_DEFS=
-EI_THREADS="false"
AC_SUBST(THR_LIBS)
AC_SUBST(THR_DEFS)
AC_SUBST(EI_THREADS)
case "$threads_disabled" in
- no)
- AC_MSG_CHECKING([for native win32 threads])
- if test "X$host_os" = "Xwin32"; then
- THR_DEFS="-DWIN32_THREADS"
- found_threads=yes
- EI_THREADS="true"
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([for __declspec(thread) usability])
- if test "X$GCC" = "Xyes"; then
- AC_MSG_RESULT([no])
- else
- THR_DEFS="$THR_DEFS -DUSE_DECLSPEC_THREAD"
- AC_MSG_RESULT([yes])
- fi
+ no)
+ LM_CHECK_THR_LIB
+
+ case "$THR_LIB_NAME" in
+ "")
+ EI_THREADS="false"
+ ;;
+ win32_threads)
+ EI_THREADS="true"
+ AC_MSG_CHECKING([for __declspec(thread) usability])
+ if test "X$GCC" = "Xyes"; then
+ AC_MSG_RESULT([no])
else
- AC_MSG_RESULT(no)
-
- dnl Check for POSIX threads
-
- pthread_lib=""
- AC_CHECK_LIB(pthread,
- pthread_create,
- [found_threads=yes
- EI_THREADS="true"
- THR_LIBS="-lpthread"
- THR_DEFS="-D_REENTRANT -D_THREAD_SAFE -DPOSIX_THREADS"
- pthread_lib=pthread])
-
- # FreeBSD has pthreads in special c library, c_r
- if test $found_threads = no; then
- AC_CHECK_LIB(c_r,
- pthread_create,
- [found_threads=yes
- EI_THREADS="true"
- THR_LIBS="-lc_r"
- THR_DEFS="-D_REENTRANT -D_THREAD_SAFE -DPOSIX_THREADS"
- pthread_lib=c_r])
- fi
-
- if test "x$pthread_lib" != "x"; then
- AC_CHECK_LIB($pthread_lib,pthread_atfork,AC_DEFINE(HAVE_PTHREAD_ATFORK))
- AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H))
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, AC_DEFINE(HAVE_MIT_PTHREAD_H))
- case $host_os in
- solaris*)
- THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS";;
- linux*)
- dnl NPTL test stolen from $ERL_TOP/erts/aclocal.m4
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- case `getconf GNU_LIBPTHREAD_VERSION 2>/dev/null` in
- nptl*) nptl=yes;;
- NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- AC_MSG_RESULT($nptl)
- if test $nptl = yes; then
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h, need_nptl_incldir=yes)
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH:/usr/local/include:/usr/include"
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
-
- ;;
- *)
- ;;
- esac
- fi
+ THR_DEFS="$THR_DEFS -DUSE_DECLSPEC_THREAD"
+ AC_MSG_RESULT([yes])
fi
;;
- yes)
- # Threads disabled
- ;;
+ pthread)
+ EI_THREADS="true"
+ ;;
+ *)
+ EI_THREADS="true"
+ AC_MSG_WARN([Unexpected thread library: $THR_LIB_NAME])
+ ;;
+ esac
+ ;;
+ yes)
+ # Threads disabled
+ EI_THREADS="false"
+ ;;
esac
# ---------------------------------------------------------------------------
@@ -413,12 +339,10 @@ fi
# FIXME We want to use libtool but until then....
# ---------------------------------------------------------------------------
-AC_SUBST(DED_CFLAGS)
-dnl AC_SUBST(DED_LD)
-dnl AC_SUBST(DED_LDFLAGS)
+AC_SUBST(LIB_CFLAGS)
if test "X$host" = "Xwin32"; then
- DED_CFLAGS="$CFLAGS"
+ LIB_CFLAGS="$CFLAGS"
else
case $host_os in
darwin*)
@@ -427,9 +351,9 @@ else
esac
if test "x$GCC" = xyes; then
- DED_CFLAGS="$CFLAGS -fPIC"
+ LIB_CFLAGS="$CFLAGS -fPIC"
else
- DED_CFLAGS="$CFLAGS"
+ LIB_CFLAGS="$CFLAGS"
fi
fi
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
index b8ee5c83c7..ec094789ce 100644
--- a/lib/erl_interface/src/Makefile.in
+++ b/lib/erl_interface/src/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1997-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -106,7 +106,7 @@ WARNFLAGS = @WFLAGS@
endif
ifneq ($(findstring ose,$(TARGET)),ose)
-CFLAGS = @DED_CFLAGS@ $(WARNFLAGS) $(INCFLAGS) $(TYPE_FLAGS)
+CFLAGS = @LIB_CFLAGS@ $(WARNFLAGS) $(INCFLAGS) $(TYPE_FLAGS)
else
CFLAGS = @CFLAGS@ $(INCFLAGS)
endif
diff --git a/lib/erl_interface/src/auxdir/config.h.in b/lib/erl_interface/src/auxdir/config.h.in
deleted file mode 100644
index 523c766993..0000000000
--- a/lib/erl_interface/src/auxdir/config.h.in
+++ /dev/null
@@ -1,277 +0,0 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#undef HAVE_CLOCK_GETTIME
-
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
- don't. */
-#undef HAVE_DECL_STRERROR_R
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Define to 1 if you have the `dup2' function. */
-#undef HAVE_DUP2
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if you have the `gethostbyaddr' function. */
-#undef HAVE_GETHOSTBYADDR
-
-/* Define to 1 if you have the `gethostbyname' function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* Define to 1 if you have the `gethostbyname_r' function. */
-#undef HAVE_GETHOSTBYNAME_R
-
-/* Define to 1 if you have the `gethostname' function. */
-#undef HAVE_GETHOSTNAME
-
-/* Define to 1 if you have the `gethrtime' function. */
-#undef HAVE_GETHRTIME
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have the <gmp.h> header file. */
-#undef HAVE_GMP_H
-
-/* Define to 1 if you have the `inet_ntoa' function. */
-#undef HAVE_INET_NTOA
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `gmp' library (-lgmp). */
-#undef HAVE_LIBGMP
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the `memchr' function. */
-#undef HAVE_MEMCHR
-
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <pthread/mit/pthread.h> header file. */
-#undef HAVE_MIT_PTHREAD_H
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
-
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
- and to 0 otherwise. */
-#undef HAVE_REALLOC
-
-/* Define if you have the res_gethostbyname function. */
-#undef HAVE_RES_GETHOSTBYNAME
-
-/* Define to 1 if you have the `select' function. */
-#undef HAVE_SELECT
-
-/* Define to 1 if you have the `socket' function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the `strerror_r' function. */
-#undef HAVE_STRERROR_R
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strrchr' function. */
-#undef HAVE_STRRCHR
-
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the `uname' function. */
-#undef HAVE_UNAME
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vfork' function. */
-#undef HAVE_VFORK
-
-/* Define to 1 if you have the <vfork.h> header file. */
-#undef HAVE_VFORK_H
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to 1 if `fork' works. */
-#undef HAVE_WORKING_FORK
-
-/* Define to 1 if `vfork' works. */
-#undef HAVE_WORKING_VFORK
-
-/* Define if you have the writev function. */
-#undef HAVE_WRITEV
-
-/* Define if you have the socklen_t datatype */
-#undef HAVE_SOCKLEN_T
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to the type of arg 1 for `select'. */
-#undef SELECT_TYPE_ARG1
-
-/* Define to the type of args 2, 3 and 4 for `select'. */
-#undef SELECT_TYPE_ARG234
-
-/* Define to the type of arg 5 for `select'. */
-#undef SELECT_TYPE_ARG5
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-#undef STACK_DIRECTION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if strerror_r returns char *. */
-#undef STRERROR_R_CHAR_P
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef gid_t
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Define to rpl_realloc if the replacement function should be used. */
-#undef realloc
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef uid_t
-
-/* Define as `fork' if `vfork' does not work. */
-#undef vfork
-
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
- code using `volatile' can become incorrect without. Disable with care. */
-#undef volatile
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
index beab8da547..55d20af8af 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2001-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2001-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -113,8 +113,11 @@ HIPE_MKLITERALS=$(ERL_TOP)/bin/$(TARGET)/hipe_mkliterals
hipe_literals.hrl: $(HIPE_MKLITERALS)
$(HIPE_MKLITERALS) -e > hipe_literals.hrl
+# Need to generate hipe.hrl from one and only one target in one and only
+# one makefile; otherwise, clearmake will force rebuilds of hipe over and
+# over again.
../main/hipe.hrl: ../vsn.mk ../main/hipe.hrl.src
- sed -e "s;%VSN%;$(HIPE_VSN);" ../main/hipe.hrl.src > ../main/hipe.hrl
+ (cd ../main && $(MAKE) hipe.hrl)
$(EBIN)/hipe_rtl.beam: hipe_rtl.hrl ../main/hipe.hrl
$(EBIN)/hipe_rtl_arch.beam: hipe_rtl.hrl hipe_literals.hrl
diff --git a/lib/megaco/configure.in b/lib/megaco/configure.in
index 297d618369..8f94a4efcf 100644
--- a/lib/megaco/configure.in
+++ b/lib/megaco/configure.in
@@ -1,20 +1,20 @@
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
dnl
dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 2001-2009. All Rights Reserved.
-dnl
+dnl
+dnl Copyright Ericsson AB 2001-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
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
dnl %CopyrightEnd%
dnl
@@ -145,12 +145,14 @@ AC_ARG_ENABLE(megaco_flex_scanner_lineno,
AC_SUBST(ENABLE_MEGACO_FLEX_SCANNER_LINENO)
+dnl This is the os flavour, should be unix, vxworks or win32
+if test "X$host" = "Xwin32"; then
+ ERLANG_OSTYPE=win32
+else
+ ERLANG_OSTYPE=unix
+fi
-dnl
-dnl C compiler (related) defs
-dnl
-
-AC_PROG_CC
+AC_SUBST(ERLANG_OSTYPE)
dnl Magic test for clearcase.
if test -d ../../system; then
@@ -158,33 +160,55 @@ if test -d ../../system; then
else
OTP_EXTRA_FLAGS=
fi
+AC_SUBST(OTP_EXTRA_FLAGS)
+
+dnl
+dnl If ${ERL_TOP}/make/otp_ded.mk.in exists and contains DED_MK_VSN > 0,
+dnl every thing releted to compiling Dynamic Erlang Drivers can be found
+dnl in $(ERL_TOP)/make/$(TARGET)/ded.mk at compile time. If not, try to
+dnl figure these things out.
+dnl
+
+AC_MSG_CHECKING([for usable Dynamic Erlang Driver configuration])
+[
+ ded_mk_in="${ERL_TOP}/make/otp_ded.mk.in"
+ ded_mk_vsn=
+ test -r "$ded_mk_in" &&
+ ded_mk_vsn=`sed -n "s/^DED_MK_VSN[ ]*=[ ]*\(.*\)/\1/p" < "$ded_mk_in"`
+ test "$ded_mk_vsn" != "" || ded_mk_vsn=0
+]
+
+if test $ded_mk_vsn -gt 0; then
+
+HAVE_USABLE_OTP_DED_MK=yes
+AC_MSG_RESULT([yes])
+CC=false
+AC_SUBST(CC)
+DED_LD=false
+AC_SUBST(DED_LD)
+
+else dnl --- begin no usable otp_ded.mk.in ---
+
+HAVE_USABLE_OTP_DED_MK=no
+AC_MSG_RESULT([no])
dnl
-dnl The ErlDrvEntry struct changed in R13 (another field)
+dnl C compiler (related) defs
dnl
-AC_CHECK_MEMBERS([struct ErlDrvEntry.stop_select],
- [
- CFLAGS="$CFLAGS -DMEGACO_DRV_ENTRY_HAS_STOP_SELECT"
- ],
- [],
- [
- #include "erl_driver.h"
- ])
+AC_PROG_CC
dnl
dnl Flags to the C compiler
dnl
-dnl make sure we find config.h
-CFLAGS="$CFLAGS -I${ERL_TOP}/erts/$host -I${ERL_TOP}/erts/include/$host $OTP_EXTRA_FLAGS"
if test "X$host" = "Xwin32"; then
DED_CFLAGS="$CFLAGS"
else
case $host_os in
darwin*)
- CFLAGS="$CFLAGS -no-cpp-precomp"
+ CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
;;
esac
@@ -196,22 +220,10 @@ else
fi
dnl emulator includes needed
-DED_INCLUDE="-I${ERL_TOP}/erts/emulator/beam -I${ERL_TOP}/erts/include -I${ERL_TOP}/erts/include/$host"
-
-DED_CFLAGS="$DED_INCLUDE $DED_CFLAGS"
-
-
+DED_INCLUDES="-I${ERL_TOP}/erts/emulator/beam -I${ERL_TOP}/erts/include -I${ERL_TOP}/erts/include/$host -I${ERL_TOP}/erts/include/internal -I${ERL_TOP}/erts/include/internal/$host -I${ERL_TOP}/erts/emulator/sys/$ERLANG_OSTYPE"
-AC_SUBST(DED_CFLAGS)
-
-
-AC_CHECK_PROGS(DED_LD, [ld.sh ld], no_ld)
-if test "$DED_LD" = no_ld; then
- AC_MSG_ERROR([ld is required to build the flex scanner!])
-fi
+DED_THR_DEFS="-D_THREAD_SAFE -D_REENTRANT"
-
-AC_MSG_CHECKING(for linker flags for loadable drivers)
case $host_os in
win32)
DED_LDFLAGS="-dll"
@@ -230,33 +242,36 @@ case $host_os in
# Mach-O linker, a shared lib and a loadable
# object file is not the same thing.
DED_LDFLAGS="-bundle -flat_namespace -undefined suppress"
- DED_CFLAGS="$DED_CFLAGS -fno-common"
+ DED_LD="$CC"
;;
*)
# assume GNU linker and ELF
DED_LDFLAGS="-shared"
;;
esac
+
+AC_CHECK_PROGS(DED_LD, [$LD ld.sh])
+AC_CHECK_TOOL(DED_LD, ld, no_ld)
+if test "$DED_LD" = no_ld; then
+ AC_MSG_ERROR([ld is required to build the flex scanner!])
+fi
+
+AC_MSG_CHECKING(for linker flags for loadable drivers)
DED_LDFLAGS="$LDFLAGS $DED_LDFLAGS"
AC_MSG_RESULT([$DED_LDFLAGS])
-AC_SUBST(DED_LDFLAGS)
+fi dnl --- end no usable otp_ded.mk.in ---
+
+AC_SUBST(HAVE_USABLE_OTP_DED_MK)
+AC_SUBST(DED_CFLAGS)
+AC_SUBST(DED_INCLUDES)
+AC_SUBST(DED_THR_DEFS)
+AC_SUBST(DED_LDFLAGS)
AC_CHECK_PROG(PERL, perl, perl, no_perl)
if test "$PERL" = no_perl; then
AC_MSG_ERROR([Perl is required to build the flex scanner!])
fi
-
-dnl This is the os flavour, should be unix, vxworks or win32
-if test "X$host" = "Xwin32"; then
- ERLANG_OSTYPE=win32
-else
- ERLANG_OSTYPE=unix
-fi
-
-AC_SUBST(ERLANG_OSTYPE)
-
-
AC_OUTPUT(src/flex/$host/Makefile:src/flex/Makefile.in)
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
index 782d6a4807..6ce9b34617 100644
--- a/lib/megaco/src/flex/Makefile.in
+++ b/lib/megaco/src/flex/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2001-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2001-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
include $(ERL_TOP)/make/target.mk
@@ -23,13 +23,30 @@ MEGACO_INCLUDEDIR = ../../include
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
# ----------------------------------------------------
# Application version
# ----------------------------------------------------
include ../../vsn.mk
VSN=$(MEGACO_VSN)
+# ----------------------------------------------------
+# Dynamic Erlang Driver
+# ----------------------------------------------------
+HAVE_USABLE_OTP_DED_MK = @HAVE_USABLE_OTP_DED_MK@
+
+ifeq ($(HAVE_USABLE_OTP_DED_MK),yes)
+# otp_ded.mk will be used on R13B04 and later
+include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
+else
+# megacos configure provide the info instead
+DED_CC = @CC@
+DED__NOWARN_NOTHR_CFLAGS = @DED_CFLAGS@
+DED_THR_DEFS = @DED_THR_DEFS@
+DED_LD = @DED_LD@
+DED_LDFLAGS = @DED_LDFLAGS@
+DED_INCLUDES = @DED_INCLUDES@
+DED_EXT = so
+endif
# ----------------------------------------------------
# The following variables differ on different systems, we set
@@ -39,16 +56,16 @@ VSN=$(MEGACO_VSN)
FLEX_VSN = $(shell flex --version)
-TMP_CFLAGS = @DED_CFLAGS@
+TMP_CFLAGS = $(DED__NOWARN_NOTHR_CFLAGS) @OTP_EXTRA_FLAGS@
ifeq ($(TYPE),valgrind)
CFLAGS = $(subst -O2, , $(TMP_CFLAGS)) -DVALGRIND
else
CFLAGS = $(TMP_CFLAGS)
endif
-CC = @CC@
-CFLAGS_MT = $(CFLAGS) -D_THREAD_SAFE -D_REENTRANT
-LD = @DED_LD@
-LDFLAGS = @DED_LDFLAGS@
+CC = $(DED_CC)
+CFLAGS_MT = $(CFLAGS) $(DED_THR_DEFS)
+LD = $(DED_LD)
+LDFLAGS = $(DED_LDFLAGS)
LEX = @LEX@
LEXLIB = @LEXLIB@
PERL = @PERL@
@@ -87,18 +104,13 @@ ENABLE_MEGACO_FLEX_SCANNER_LINENO = @ENABLE_MEGACO_FLEX_SCANNER_LINENO@
endif
endif
-
-SYSINCLUDE = -I$(ERL_TOP)/erts/emulator/beam \
- -I$(ERL_TOP)/erts/emulator/sys/$(ERLANG_OSTYPE)
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
- SYSINCLUDE += -I$(ERL_TOP)/erts/etc/vxworks
+ DED_INCLUDES += -I$(ERL_TOP)/erts/etc/vxworks
endif
-DRIVER_INCLUDES = $(SYSINCLUDE)
-
PRIVDIR = ../../priv
LIBDIR = $(PRIVDIR)/lib/$(TARGET)
-
+OBJDIR = $(PRIVDIR)/obj/$(TARGET)
# ----------------------------------------------------
# Release directory specification
@@ -138,8 +150,8 @@ ifeq ($(findstring vxworks,$(TARGET)),vxworks)
FLEX_SCANNER_SO =
SOLIBS = $(FLEX_SCANNER_SO)
else
-FLEX_SCANNER_SO = $(LIBDIR)/$(STD_DRV).so
-FLEX_SCANNER_MT_SO = $(LIBDIR)/$(MT_DRV).so
+FLEX_SCANNER_SO = $(LIBDIR)/$(STD_DRV).$(DED_EXT)
+FLEX_SCANNER_MT_SO = $(LIBDIR)/$(MT_DRV).$(DED_EXT)
SOLIBS = $(FLEX_SCANNER_SO) $(FLEX_SCANNER_MT_SO)
endif
endif
@@ -175,7 +187,7 @@ else
CFLAGS += -DMFS_FLEX_DEBUG=0
endif
-CFLAGS += $(DRIVER_INCLUDES) $(DRV_FLAGS) -funroll-loops -Wall
+CFLAGS += $(DED_INCLUDES) -I$(ERL_TOP)/erts/$(TARGET) $(DRV_FLAGS) -funroll-loops -Wall
#ifneq ($(FLEX_VSN),)
#CFLAGS += -DFLEX_VERSION="$(FLEX_VSN)"
@@ -379,18 +391,30 @@ $(STD_DRV).c: $(STD_DRV).flex
$(MT_DRV).c: $(MT_DRV).flex
$(LEX) $(MT_LEX_FLAGS) -P$* -o$@ $<
-solibs: $(LIBDIR) $(SOLIBS)
+solibs: $(LIBDIR) $(OBJDIR) $(SOLIBS)
+
+$(OBJDIR)/$(STD_DRV).o: $(STD_DRV).c
+ @echo "compiling std driver:"
+ $(CC) -c $(STD_DRV_NAME) $(CFLAGS) -o $@ $<
+
+$(OBJDIR)/$(MT_DRV).o: $(MT_DRV).c
+ @echo "compiling multi-threaded driver:"
+ $(CC) -c $(MT_DRV_NAME) $(CFLAGS_MT) -o $@ $<
+
# No need to link with -lfl as we have also defined %option noyywrap -
# and having -lfl doesn't work under Darwin for some reason. - Sean
-$(LIBDIR)/$(STD_DRV).so: $(STD_DRV).c
- @echo "std driver:"
- $(CC) $(STD_DRV_NAME) $(CFLAGS) $(LDFLAGS) -o $(LIBDIR)/$(STD_DRV).so $<
+$(LIBDIR)/$(STD_DRV).$(DED_EXT): $(OBJDIR)/$(STD_DRV).o
+ @echo "linking std driver:"
+ $(LD) $(LDFLAGS) -o $@ $<
-$(LIBDIR)/$(MT_DRV).so: $(MT_DRV).c
- @echo "multi-threaded driver:"
- $(CC) $(MT_DRV_NAME) $(CFLAGS_MT) $(LDFLAGS) -o $(LIBDIR)/$(MT_DRV).so $<
+$(LIBDIR)/$(MT_DRV).$(DED_EXT): $(OBJDIR)/$(MT_DRV).o
+ @echo "linking multi-threaded driver:"
+ $(LD) $(LDFLAGS) -o $@ $<
$(LIBDIR):
-mkdir -p $(LIBDIR)
+$(OBJDIR):
+ -mkdir -p $(OBJDIR)
+
diff --git a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
index b96a69415d..9b4f717201 100644
--- a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
+++ b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2001-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2001-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*
* ----------------------------------------------------------------------
@@ -354,9 +354,6 @@ static ErlDrvEntry mfs_entry = {
MEGACO_DRIVER_FLAGS, /* driver_flags, used for port lock indication */
NULL, /* handle2, emulator internal use */
NULL /* process_exit, Called when a process monitor fires */
-#if defined(MEGACO_DRV_ENTRY_HAS_STOP_SELECT)
- ,NULL /* stop_select, Called to close an event object */
-#endif
};
diff --git a/lib/odbc/aclocal.m4 b/lib/odbc/aclocal.m4
new file mode 120000
index 0000000000..151fd5ea5a
--- /dev/null
+++ b/lib/odbc/aclocal.m4
@@ -0,0 +1 @@
+../../erts/aclocal.m4 \ No newline at end of file
diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
index 6a9a174417..ed3eeb1d42 100644
--- a/lib/odbc/c_src/Makefile.in
+++ b/lib/odbc/c_src/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -78,11 +78,11 @@ ODBC_INCLUDE = @ODBC_INCLUDE@
# FLAGS
# ----------------------------------------------------
CC = @CC@
-CFLAGS = $(TYPEFLAGS) @CFLAGS@
+CFLAGS = $(TYPEFLAGS) @CFLAGS@ @THR_DEFS@ @DEFS@
EI_LDFLAGS = -L$(EI_ROOT)/obj$(TYPEMARKER)/$(TARGET)
-LD = @DED_LD@
+LD = @LD@
LDFLAGS = $(ODBC_LIB) $(EI_LDFLAGS)
-LIBS = @LIBS@ $(EI_LIB)
+LIBS = @LIBS@ @THR_LIBS@ $(EI_LIB)
INCLUDES = -I. $(ODBC_INCLUDE) $(EI_INCLUDE)
TARGET_FLAGS = @TARGET_FLAGS@
@@ -106,17 +106,17 @@ docs:
# ----------------------------------------------------
ifdef UNIX_TARGET
-$(UNIX_TARGET): $(BIN_DIR) $(OBJ_DIR)/odbcserver.o
+$(UNIX_TARGET): $(OBJ_DIR)/odbcserver.o
$(CC) $(CFLAGS) -o $@ $(OBJ_DIR)/odbcserver.o $(LDFLAGS) $(LIBS)
endif
ifdef WIN32_TARGET
-$(WIN32_TARGET): $(BIN_DIR) $(OBJ_DIR)/odbcserver.o
+$(WIN32_TARGET): $(OBJ_DIR)/odbcserver.o
$(LD) $(LDFLAGS) -o $@ $(OBJ_DIR)/odbcserver.o $(ENTRY_OBJ) \
$(LIBS) $(ENTRY_LDFLAGS)
endif
-$(OBJ_DIR)/odbcserver.o: $(OBJ_DIR) odbcserver.c
+$(OBJ_DIR)/odbcserver.o: odbcserver.c
$(CC) $(CFLAGS) $(INCLUDES) $(TARGET_FLAGS) -o $@ -c odbcserver.c
create_dirs:
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index 77b576ee88..24e286c290 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -25,6 +25,15 @@ else
host_os=win32
fi
+if test "$with_odbc" = "no"; then
+
+ rm -f "$ERL_TOP/lib/odbc/SKIP"
+ echo "odbc disabled by user." > "$ERL_TOP/lib/odbc/SKIP"
+
+else dnl "$with_odbc" != "no"
+
+ERL_XCOMP_SYSROOT_INIT
+
dnl Checks for programs.
AC_PROG_CC
@@ -48,8 +57,11 @@ fi
AC_SUBST(MIXED_CYGWIN_VC)
AC_PROG_MAKE_SET
-AC_CHECK_PROGS(DED_LD, [ld.sh ld], '$(CC)')
-AC_SUBST(DED_LD)
+
+AC_CHECK_PROG(LD, ld.sh)
+AC_CHECK_TOOL(LD, ld, '$(CC)')
+
+AC_SUBST(LD)
# Sockets
#--------------------------------------------------------------------
@@ -83,50 +95,6 @@ AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
dnl Checks for header files.
AC_HEADER_STDC
-case $have_pthread_lib-$host_os in
- yes-linux*)
- dnl NPTL test stolen from $ERL_TOP/erts/aclocal.m4
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- case `getconf GNU_LIBPTHREAD_VERSION 2>/dev/null` in
- nptl*) nptl=yes;;
- NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- AC_MSG_RESULT($nptl)
- if test $nptl = yes; then
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h, need_nptl_incldir=yes)
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH:/usr/local/include:/usr/include"
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- CFLAGS="$CFLAGS -isystem $nptl_incldir"
- dnl CPPFLAGS is for configure internal use
- CPPFLAGS="$CPPFLAGS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
- ;;
- *)
- ;;
-esac
AC_CHECK_HEADERS([fcntl.h netdb.h stdlib.h string.h sys/socket.h])
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -137,20 +105,18 @@ dnl Checks for library functions.
AC_CHECK_FUNCS([memset socket])
# ODBC
-/bin/rm -f $ERL_TOP/lib/odbc/SKIP
+/bin/rm -f "$ERL_TOP/lib/odbc/SKIP"
-have_pthread_lib=no
-have_odbc_lib=no
-
+LM_CHECK_THR_LIB
+AC_SUBST(THR_DEFS)
+AC_SUBST(THR_LIBS)
+
+odbc_lib_link_success=no
AC_SUBST(TARGET_FLAGS)
case $host_os in
darwin*)
TARGET_FLAGS="-DUNIX"
- AC_CHECK_LIB(pthread, pthread_create,
- [AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have the pthread library (-lpthread).])
- LIBS="$LIBS -lpthread"
- have_pthread_lib=yes])
- if test ! -d "$with_odbc"; then
+ if test ! -d "$with_odbc" || test "$with_odbc" = "yes" ; then
ODBC_LIB= -L"/usr/lib"
ODBC_INCLUDE="-I/usr/lib/include"
else
@@ -158,7 +124,7 @@ AC_SUBST(TARGET_FLAGS)
ODBC_INCLUDE="-I$with_odbc/include"
fi
- AC_CHECK_LIB(iodbc, SQLAllocHandle,[ODBC_LIB="$ODBC_LIB -liodbc" odbc_lib_link_sucess=yes])
+ AC_CHECK_LIB(iodbc, SQLAllocHandle,[ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes])
;;
win32|cygwin)
TARGET_FLAGS="-DWIN32"
@@ -170,48 +136,64 @@ AC_SUBST(TARGET_FLAGS)
ODBC_LIB=-L"$with_odbc/lib"
ODBC_INCLUDE="-I$with_odbc/include"
fi
- AC_CHECK_LIB(odbc32, main, [ODBC_LIB="$ODBC_LIB -lodbc32" odbc_lib_link_sucess=yes])
+ AC_CHECK_LIB(odbc32, main, [ODBC_LIB="$ODBC_LIB -lodbc32"; odbc_lib_link_success=yes])
;;
*)
- TARGET_FLAGS="-DUNIX"
- AC_CHECK_LIB(pthread, pthread_create,
- [AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have the pthread library (-lpthread).])
- LIBS="$LIBS -lpthread"
- have_pthread_lib=yes])
- if test ! -d "$with_odbc"; then
- AC_MSG_CHECKING([for odbc in standard locations])
- for dir in /usr/local/odbc /usr/local /usr/odbc \
- /usr /opt/local/pgm/odbc /usr/local/pgm/odbc
- do
- if test -f "$dir/include/sql.h"; then
- is_odbc_std_location=yes
- ODBC_LIB=-L"$dir/lib"
- ODBC_INCLUDE="-I$dir/include"
- break
- fi
- done
- if test "x$is_odbc_std_location" != "xyes"; then
- AC_MSG_RESULT(no)
- AC_MSG_WARN([No odbc library found skipping odbc])
- echo "No odbc library found" > $ERL_TOP/lib/odbc/SKIP
- else
- AC_MSG_RESULT($ODBC_LIB)
- AC_CHECK_LIB(odbc, SQLAllocHandle,[ODBC_LIB="$ODBC_LIB -lodbc" odbc_lib_link_sucess=yes])
- fi
- else
- ODBC_LIB=-L"$with_odbc/lib"
- ODBC_INCLUDE="-I$with_odbc/include"
- AC_CHECK_LIB(odbc, SQLAllocHandle,[ODBC_LIB="$ODBC_LIB -lodbc" odbc_lib_link_sucess=yes])
- fi
+ TARGET_FLAGS="-DUNIX"
+ case "$erl_xcomp_without_sysroot-$with_odbc" in
+ yes-yes | yes- )
+ msg="Dont know where to search for odbc (setting erl_xcomp_sysroot will help)"
+ AC_MSG_WARN([$msg])
+ echo "$msg" > "$ERL_TOP/lib/odbc/SKIP"
+ odbc_lib_link_success=wont_try
+ ;;
+ no- )
+ AC_CHECK_SIZEOF(void *)
+ AC_MSG_CHECKING([for odbc in standard locations])
+ for rdir in /usr/local/odbc /usr/local /usr/odbc \
+ /usr /opt/local/pgm/odbc /usr/local/pgm/odbc; do
+ test -f "$erl_xcomp_isysroot$rdir/include/sql.h" || continue
+ is_odbc_std_location=yes
+ libdir="$erl_xcomp_sysroot$rdir/lib"
+ if test "$ac_cv_sizeof_void_p" = "8"; then
+ dnl "/." in test is important (dir symlinks)
+ if test -d "${libdir}64/."; then
+ libdir="${libdir}64"
+ elif test -d "${libdir}/64/."; then
+ libdir="${libdir}/64"
+ fi
+ fi
+ ODBC_LIB="-L$libdir"
+ ODBC_INCLUDE="-I$erl_xcomp_isysroot$rdir/include"
+ break
+ done
+ if test "x$is_odbc_std_location" != "xyes"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([No odbc library found skipping odbc])
+ echo "No odbc library found" > "$ERL_TOP/lib/odbc/SKIP"
+ else
+ AC_MSG_RESULT($ODBC_LIB)
+ AC_CHECK_LIB(odbc, SQLAllocHandle,[ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes])
+ fi
+ ;;
+
+ no-*)
+ ODBC_LIB=-L"$with_odbc/lib"
+ ODBC_INCLUDE="-I$with_odbc/include"
+ AC_CHECK_LIB(odbc, SQLAllocHandle,[ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes])
+ ;;
+ esac
;;
esac
-if test "x$odbc_lib_link_sucess" != "xyes"; then
+if test $odbc_lib_link_success = no; then
AC_MSG_WARN(["ODBC library - link check failed"])
echo "ODBC library - link check failed" > $ERL_TOP/lib/odbc/SKIP
fi
-
+
AC_SUBST(ODBC_LIB)
AC_SUBST(ODBC_INCLUDE)
+fi dnl "$with_odbc" != "no"
+
AC_OUTPUT(c_src/$host/Makefile:c_src/Makefile.in)
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
index 05b5598e51..840de39f07 100644
--- a/lib/runtime_tools/c_src/Makefile.in
+++ b/lib/runtime_tools/c_src/Makefile.in
@@ -1,23 +1,24 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
+include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
# ----------------------------------------------------
# Application version
@@ -30,20 +31,14 @@ VSN=$(RUNTIME_TOOLS_VSN)
# reasonable defaults, if something different is needed it should
# be set for that system only.
# ----------------------------------------------------
-CC = @CC@
-CFLAGS = @DED_CFLAGS@
-LD = @DED_LD@
+CC = $(DED_CC)
+CFLAGS = $(DED_CFLAGS)
+LD = $(DED_LD)
SHELL = /bin/sh
-LIBS = @LIBS@
-LDFLAGS += @DED_LDFLAGS@
-ERLANG_OSTYPE = @ERLANG_OSTYPE@
-
-SYSINCLUDE = -I$(ERL_TOP)/erts/emulator/beam \
- -I$(ERL_TOP)/erts/emulator/sys/$(ERLANG_OSTYPE) \
- -I$(ERL_TOP)/erts/include/internal \
- -I$(ERL_TOP)/erts/include/internal/$(ERLANG_OSTYPE) \
- -I$(ERL_TOP)/erts/include \
- -I$(ERL_TOP)/erts/include/$(ERLANG_OSTYPE)
+LIBS = $(DED_LIBS)
+LDFLAGS += $(DED_LDFLAGS)
+
+SYSINCLUDE = $(DED_SYS_INCLUDE)
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
SYSINCLUDE += -I$(ERL_TOP)/erts/etc/vxworks
endif
diff --git a/lib/ssl/c_src/Makefile.in b/lib/ssl/c_src/Makefile.in
index bd1b2f9375..49a209f2eb 100644
--- a/lib/ssl/c_src/Makefile.in
+++ b/lib/ssl/c_src/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -106,6 +106,7 @@ SSL_MAKEFILE =
endif
CC_R_FLAG=@CFLAG_RUNTIME_LIBRARY_PATH@
+
ifeq ($(findstring @,$(CC_R_FLAG)),@)
# Old erts configure used which hasn't replaced @CFLAG_RUNTIME_LIBRARY_PATH@;
# we try our best here instead...
@@ -127,6 +128,12 @@ else
CC_R_OPT = $(CC_R_FLAG)$(SSL_LIBDIR)
endif
+SSL_CC_RUNTIME_LIBRARY_PATH=@SSL_CC_RUNTIME_LIBRARY_PATH@
+# Sigh...
+ifeq ($(findstring @,$(SSL_CC_RUNTIME_LIBRARY_PATH)),@)
+SSL_CC_RUNTIME_LIBRARY_PATH = $(CC_R_OPT)
+endif
+
SSL_LINK_LIB=-L$(SSL_LIBDIR) -lssl -lcrypto
else
# not dynamic crypto lib (default from R11B-5)
@@ -134,6 +141,7 @@ NEED_KERBEROS=@SSL_LINK_WITH_KERBEROS@
NEED_ZLIB=@SSL_LINK_WITH_ZLIB@
SSL_MAKEFILE =
CC_R_OPT =
+SSL_CC_RUNTIME_LIBRARY_PATH=
SSL_LINK_LIB = $(SSL_LIBDIR)/libssl.a $(SSL_LIBDIR)/libcrypto.a
ifeq ($(NEED_KERBEROS),yes)
SSL_LINK_LIB += @STATIC_KERBEROS_LIBS@
@@ -163,11 +171,11 @@ $(OBJDIR)/%$(obj): %.c
# Unix
$(BINDIR)/ssl_esock: $(OBJS)
- $(CC) $(CC_R_OPT) $(PLAIN_CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(SSL_LINK_LIB)
+ $(CC) $(PLAIN_CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(SSL_CC_RUNTIME_LIBRARY_PATH) $(SSL_LINK_LIB)
# Win32/Cygwin
$(BINDIR)/ssl_esock.exe: $(OBJS)
- $(LD) -L$(SSL_LIBDIR) -o $@ $^ -lwsock32 -llibeay32 -lssleay32
+ $(LD) $(SSL_CC_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -o $@ $^ -lwsock32 -llibeay32 -lssleay32
# Unix only, and only when linking statically
$(SSL_MAKEFILE):
diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
index 2f04b1dbf6..5a0b4ce8ef 100644
--- a/lib/wx/c_src/Makefile.in
+++ b/lib/wx/c_src/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2008-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2008-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -47,14 +47,11 @@ ERL_DIR = @ERLANG_ROOT_DIR@
ERL_INCS = -I$(ERL_DIR)/usr/include
else
-ERLANG_OSTYPE = @WXERL_SYS_TYPE@
-
-ERL_INCS= -I$(ERL_TOP)/erts/emulator/beam \
- -I$(ERL_TOP)/erts/emulator/sys/$(ERLANG_OSTYPE) \
- -I$(ERL_TOP)/erts/include/internal \
- -I$(ERL_TOP)/erts/include/internal/$(ERLANG_OSTYPE) \
- -I$(ERL_TOP)/erts/include \
- -I$(ERL_TOP)/erts/include/$(ERLANG_OSTYPE)
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
+
+ERL_INCS= $(DED_INCLUDES)
endif
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index 2b47f86baa..855c0c975e 100755
--- a/lib/wx/configure.in
+++ b/lib/wx/configure.in
@@ -1,20 +1,20 @@
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 2008-2009. All Rights Reserved.
-dnl
+dnl
+dnl Copyright Ericsson AB 2008-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
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
dnl %CopyrightEnd%
AC_INIT()
@@ -244,7 +244,10 @@ AC_SUBST(ERLANG_ROOT_DIR)
dnl
dnl Check for wxwidgets
dnl
-if test X"$MIXED_CYGWIN_VC" != X"yes" ; then
+if test "$cross_compiling" = "yes"; then
+ echo "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" > ./CONF_INFO
+ WXERL_CAN_BUILD_DRIVER=false
+elif test X"$MIXED_CYGWIN_VC" != X"yes" ; then
m4_include(wxwin.m4)
AM_OPTIONS_WXCONFIG
@@ -306,7 +309,7 @@ define(wx_warn_text,[
if test X"$WX_BUILDING_INSIDE_ERLSRC" != X"true" ; then
AC_MSG_ERROR([wx_warn_text])
else
- echo "wxWidgets not found, wx will NOT be useable" > ./CONF_INFO
+ echo "wxWidgets not found, wx will NOT be usable" > ./CONF_INFO
WXERL_CAN_BUILD_DRIVER=false
AC_MSG_WARN([wx_warn_text])
fi
@@ -378,6 +381,8 @@ else
AC_SUBST(WX_RESCOMP)
fi
+if test "$WXERL_CAN_BUILD_DRIVER" != "false"; then
+
AC_SUBST(WX_HAVE_STATIC_LIBS)
AC_SUBST(RC_FILE_TYPE)
@@ -544,6 +549,8 @@ if test X"$CAN_LINK_WX" != X"yes" ; then
AC_MSG_WARN([Can not link wx program are all developer packages installed?])
fi
+fi dnl - if test "$WXERL_CAN_BUILD_DRIVER" != "false"
+
AC_SUBST(WXERL_CAN_BUILD_DRIVER)
#############################################################################