]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Let the configure script recognize the AR variable, such that the name of the archive...
authorBart Van Assche <bvanassche@acm.org>
Sun, 25 May 2008 15:58:11 +0000 (15:58 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 25 May 2008 15:58:11 +0000 (15:58 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8123

configure.in

index 8bb4f4658ef4aaf8cd49449c388593afef2e1507..5cbae4466adab1e350cd9c251ab70f76ef5c550f 100644 (file)
@@ -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])])])