commit: r563 - libspreadutil/trunk
[email protected] Wed, 27 Mar 2013 23:30:00 -0400
| Newsgroups | gmane.network.spread.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: jonathan Date: 2013-03-27 23:30:00 -0400 (Wed, 27 Mar 2013) New Revision: 563 Modified: libspreadutil/trunk/Changelog libspreadutil/trunk/configure libspreadutil/trunk/configure.in Log: Change configure test for CLOCK_MONOTONIC to runtime test Modified: libspreadutil/trunk/Changelog =================================================================== --- libspreadutil/trunk/Changelog 2013-03-28 03:20:35 UTC (rev 562) +++ libspreadutil/trunk/Changelog 2013-03-28 03:30:00 UTC (rev 563) @@ -1,3 +1,7 @@ +Wed Mar 27 23:27:08 2013 Jonathan Stanton <[email protected]> + + * configure.in: Change test for clock_gettime(CLOCK_MONOTONIC) to runtime test from compile test. + Wed Mar 27 22:51:12 2013 Jonathan Stanton <[email protected]> * arch.h, src/events.c, src/alarm.c: Windows portability fixes provided by Juan Pizzorno. Modified: libspreadutil/trunk/configure =================================================================== --- libspreadutil/trunk/configure 2013-03-28 03:20:35 UTC (rev 562) +++ libspreadutil/trunk/configure 2013-03-28 03:30:00 UTC (rev 563) @@ -5933,50 +5933,60 @@ $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <time.h> -int -main () -{ - struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); - ; - return 0; -} + int main() { struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_clock_gettime_monotonic="yes" else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_clock_gettime_monotonic="no" +( exit $ac_status ) + ac_cv_clock_gettime_monotonic="no" fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:$LINENO: result: $ac_cv_clock_gettime_monotonic" >&5 $as_echo "$ac_cv_clock_gettime_monotonic" >&6; } Modified: libspreadutil/trunk/configure.in =================================================================== --- libspreadutil/trunk/configure.in 2013-03-28 03:20:35 UTC (rev 562) +++ libspreadutil/trunk/configure.in 2013-03-28 03:30:00 UTC (rev 563) @@ -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" ] )