|
From: <sv...@va...> - 2008-05-25 15:58:06
|
Author: bart
Date: 2008-05-25 16:58:11 +0100 (Sun, 25 May 2008)
New Revision: 8123
Log:
Let the configure script recognize the AR variable, such that the name of the archiver can be specified at configure time. Changed test for TLS-support from AC_RUN_IFELSE to AC_LINK_IFELSE. Both changes are necessary to make cross-compilation possible.
Modified:
trunk/configure.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2008-05-25 11:07:41 UTC (rev 8122)
+++ trunk/configure.in 2008-05-25 15:58:11 UTC (rev 8123)
@@ -60,6 +60,13 @@
AC_PROG_CXX
AC_PROG_RANLIB
+# If no AR variable was specified, look up the name of the archiver. Otherwise
+# do not touch the AR variable.
+if test "x$AR" = "x"; then
+ AC_PATH_PROGS([AR], ["${LD%ld}ar" "ar"], [ar])
+fi
+AC_ARG_VAR([AR],[Archiver command])
+
# Check for the compiler support
if test "${GCC}" != "yes" ; then
AC_MSG_ERROR([Valgrind relies on GCC to be compiled])
@@ -1145,7 +1152,7 @@
AC_CACHE_CHECK([for TLS support], vg_cv_tls,
[AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
[vg_cv_tls=$enableval],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
[[return foo;]])],
[vg_cv_tls=yes],
[vg_cv_tls=no])])])
|