head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2012.09.10.19.19.32;	author beat;	state Exp;
branches;
next	;


desc
@@


1.1
log
@SVN rev 304053 on 2012-09-10 19:19:32Z by beat

- Move libxul 1.9.2 to www/libxul19
- Update www/libxul to 10.0.7
- Update all dependent ports to use www/libxul19 (no functional changes)
- Bump PORTREVISION on ports where libxul is a run dependency as the
  resulting package will change.

Submitted by:	Jan Beich <jbeich@@tormail.org>
With hat:	gecko
@
text
@commit 4075972
Author: Mike Hommey <mh+mozilla@@glandium.org>
Date:   Thu Feb 23 11:00:46 2012 +0100

    Bug 728968 - Detect clock_gettime when it's not in -lrt. r=khuey
---
 configure.in | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git configure.in configure.in
index 3ba7e2f..3d0614c 100644
--- configure.in
+++ configure.in
@@@@ -3728,20 +3728,23 @@@@ AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat6
 AC_CHECK_FUNCS(flockfile getpagesize)
 AC_CHECK_FUNCS(localtime_r strtok_r)
 
-dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt
-_SAVE_LDFLAGS=$LDFLAGS
-LDFLAGS="$LDFLAGS -lrt"
-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt,
-               ac_cv_have_clock_monotonic,
-               [AC_TRY_LINK([#include <time.h>],
-                            [ struct timespec ts;
-                              clock_gettime(CLOCK_MONOTONIC, &ts); ],
-                            ac_cv_have_clock_monotonic=yes,
-                            ac_cv_have_clock_monotonic=no)])
-LDFLAGS=$_SAVE_LDFLAGS
-if test "$ac_cv_have_clock_monotonic" = "yes"; then
+dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
+               ac_cv_clock_monotonic,
+               [for libs in "" -lrt; do
+                    _SAVE_LDFLAGS="$LDFLAGS"
+                    LDFLAGS="$LDFLAGS $libs"
+                    AC_TRY_LINK([#include <time.h>],
+                                 [ struct timespec ts;
+                                   clock_gettime(CLOCK_MONOTONIC, &ts); ],
+                                 ac_cv_clock_monotonic=$libs
+                                 break,
+                                 ac_cv_clock_monotonic=no)
+                    LDFLAGS="$_SAVE_LDFLAGS"
+                done])
+if test "$ac_cv_clock_monotonic" != "no"; then
     HAVE_CLOCK_MONOTONIC=1
-    REALTIME_LIBS=-lrt
+    REALTIME_LIBS=$ac_cv_clock_monotonic
     AC_DEFINE(HAVE_CLOCK_MONOTONIC)
     AC_SUBST(HAVE_CLOCK_MONOTONIC)
     AC_SUBST(REALTIME_LIBS)
@
