From: Bart Van Assche Date: Sun, 25 May 2008 15:58:11 +0000 (+0000) Subject: Let the configure script recognize the AR variable, such that the name of the archive... X-Git-Tag: svn/VALGRIND_3_4_0~561 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=387d89df07a666eb636785c2e0daa6d845d36a6d;p=thirdparty%2Fvalgrind.git 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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8123 --- diff --git a/configure.in b/configure.in index 8bb4f4658e..5cbae4466a 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,13 @@ AC_PROG_CPP 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 @@ AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes) 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])])])