[Spread-cvs] commit: r549 - in trunk: . libspread-util

jschultz at spread.org jschultz at spread.org
Wed Mar 13 11:11:33 EDT 2013


Author: jschultz
Date: 2013-03-13 11:11:33 -0400 (Wed, 13 Mar 2013)
New Revision: 549

Modified:
   trunk/configure.in
   trunk/libspread-util/configure.in
Log:
Change configure scripts to actually test clock_gettime(CLOCK_MONOTONIC) rather than just compile.


Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2013-03-12 20:23:23 UTC (rev 548)
+++ trunk/configure.in	2013-03-13 15:11:33 UTC (rev 549)
@@ -115,9 +115,9 @@
 
 # Check for clock_gettime(CLOCK_MONOTONIC, ...)
 AC_CACHE_CHECK([for clock_gettime(CLOCK_MONOTONIC)], ac_cv_clock_gettime_monotonic, [
-	AC_TRY_COMPILE(
-		[ #include <time.h> ],
-		[ struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); ],
+	AC_TRY_RUN(
+		[ #include <time.h> 
+		  int main() { struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t); } ],
 		[ ac_cv_clock_gettime_monotonic="yes" ],
 		[ ac_cv_clock_gettime_monotonic="no" ]
 	)

Modified: trunk/libspread-util/configure.in
===================================================================
--- trunk/libspread-util/configure.in	2013-03-12 20:23:23 UTC (rev 548)
+++ trunk/libspread-util/configure.in	2013-03-13 15:11:33 UTC (rev 549)
@@ -110,9 +110,9 @@
 
 # Check for clock_gettime(CLOCK_MONOTONIC, ...)
 AC_CACHE_CHECK([for clock_gettime(CLOCK_MONOTONIC)], ac_cv_clock_gettime_monotonic, [
-	AC_TRY_COMPILE(
-		[ #include <time.h> ],
-		[ struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); ],
+	AC_TRY_RUN(
+		[ #include <time.h>
+		  int main() { struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t); } ],
 		[ ac_cv_clock_gettime_monotonic="yes" ],
 		[ ac_cv_clock_gettime_monotonic="no" ]
 	)




More information about the Spread-cvs mailing list