aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-03-31 11:31:07 +0000
committerErlang/OTP <[email protected]>2010-03-31 11:31:07 +0000
commit88f67c0c3869806d2ec4cec625c47a78fd770156 (patch)
treea20a53f7bf502ea3f304124ac3e37e8e2f7ed119
parentc5d3624d7c9b31ca127792cf15eefc66c1972269 (diff)
downloadotp-88f67c0c3869806d2ec4cec625c47a78fd770156.tar.gz
otp-88f67c0c3869806d2ec4cec625c47a78fd770156.tar.bz2
otp-88f67c0c3869806d2ec4cec625c47a78fd770156.zip
OTP-8484 Fix minor cross compilation issues
The use of mmap() was unnecessarily disabled when cross compiling. The configure arguments --with-ssl, and --with-odbc refused to accept libraries outside of $erl_xcomp_sysroot when cross compiling for no good reason. The configure argument --with-odbc didn't handle the value yes correct. The configure arguments --with-odbc, and --without-odbc have also been added to the configure help. (Thanks to Steve Vinoski for reporting these issues)
-rw-r--r--erts/configure.in10
-rw-r--r--lib/odbc/configure.in31
2 files changed, 28 insertions, 13 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 6823133936..6278af3a2e 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1693,7 +1693,7 @@ AC_CHECK_FUNCS([getnameinfo getipnodebyname getipnodebyaddr gethostbyname2])
AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \
pread pwrite writev memmove strerror strerror_r strncasecmp \
- gethrtime localtime_r gmtime_r mremap memcpy mallopt \
+ gethrtime localtime_r gmtime_r mmap mremap memcpy mallopt \
sbrk _sbrk __sbrk brk _brk __brk \
flockfile fstat strlcpy strlcat setsid posix2time setlocale nl_langinfo poll])
if test "X$host" = "Xwin32"; then
@@ -1725,7 +1725,6 @@ if test $disable_vfork = true; then
fi
AC_FUNC_VPRINTF
-AC_FUNC_MMAP
dnl The AC_DEFINEs are necessary for autoheader to work. :-(
dnl for gzio
@@ -3729,13 +3728,6 @@ dnl so it is - be adoptable
fi
;;
*)
- if test "$cross_compiling" = "yes"; then
- case "$with_ssl" in
- "$erl_xcomp_sysroot"*) ;;
- *) AC_MSG_ERROR([Invalid path to option --with-ssl=PATH (not a subdirectory to cross system root)]);;
- esac
- fi
-
# Option given with PATH to package
if test ! -d "$with_ssl" ; then
AC_MSG_ERROR(Invalid path to option --with-ssl=PATH)
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index 24e286c290..94e8a214d4 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -1,3 +1,21 @@
+dnl
+dnl %CopyrightBegin%
+dnl
+dnl Copyright Ericsson AB 2005-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 define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
@@ -25,6 +43,11 @@ else
host_os=win32
fi
+AC_ARG_WITH(odbc,
+[ --with-odbc=PATH specify location of ODBC include and lib
+ --with-odbc use ODBC (default)
+ --without-odbc don't use ODBC])
+
if test "$with_odbc" = "no"; then
rm -f "$ERL_TOP/lib/odbc/SKIP"
@@ -116,7 +139,7 @@ AC_SUBST(TARGET_FLAGS)
case $host_os in
darwin*)
TARGET_FLAGS="-DUNIX"
- if test ! -d "$with_odbc" || test "$with_odbc" = "yes" ; then
+ if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then
ODBC_LIB= -L"/usr/lib"
ODBC_INCLUDE="-I/usr/lib/include"
else
@@ -129,7 +152,7 @@ AC_SUBST(TARGET_FLAGS)
win32|cygwin)
TARGET_FLAGS="-DWIN32"
AC_CHECK_LIB(ws2_32, main)
- if test ! -d "$with_odbc"; then
+ if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then
ODBC_LIB=""
ODBC_INCLUDE=""
else
@@ -147,7 +170,7 @@ AC_SUBST(TARGET_FLAGS)
echo "$msg" > "$ERL_TOP/lib/odbc/SKIP"
odbc_lib_link_success=wont_try
;;
- no- )
+ no-yes | no- )
AC_CHECK_SIZEOF(void *)
AC_MSG_CHECKING([for odbc in standard locations])
for rdir in /usr/local/odbc /usr/local /usr/odbc \
@@ -177,7 +200,7 @@ AC_SUBST(TARGET_FLAGS)
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])