Bug 776561 - Avoid OS_LIBS containing -lrt when there is no config.cache. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 08:54:59 +0200
changeset 106885 ea718abec95cb6ccddd54532ec264ef37eeb4342
parent 106884 2ef51674316aadfe26a46877b16794f758bf4b6d
child 106886 47b9642f6f1b45eb3596922ed0ea95904e85f937
push id1490
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 18:29:50 +0000
treeherdermozilla-beta@f335e7dacdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs776561
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 776561 - Avoid OS_LIBS containing -lrt when there is no config.cache. r=khuey
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3246,16 +3246,17 @@ AC_CACHE_CHECK(for clock_gettime(CLOCK_M
                ac_cv_clock_monotonic,
                [for libs in "" -lrt; do
                     _SAVE_LIBS="$LIBS"
                     LIBS="$LIBS $libs"
                     AC_TRY_LINK([#include <time.h>],
                                  [ struct timespec ts;
                                    clock_gettime(CLOCK_MONOTONIC, &ts); ],
                                  ac_cv_clock_monotonic=$libs
+                                 LIBS="$_SAVE_LIBS"
                                  break,
                                  ac_cv_clock_monotonic=no)
                     LIBS="$_SAVE_LIBS"
                 done])
 if test "$ac_cv_clock_monotonic" != "no"; then
     HAVE_CLOCK_MONOTONIC=1
     REALTIME_LIBS=$ac_cv_clock_monotonic
     AC_DEFINE(HAVE_CLOCK_MONOTONIC)