comparison configure.ac @ 10072:0b0bf1fd1ed7

use gettimeofday module from gnulib
author John W. Eaton <jwe@octave.org>
date Thu, 07 Jan 2010 16:43:48 -0500
parents 0cabc95f0833
children dcde57cb5778
comparison
equal deleted inserted replaced
10071:e42b1bbd1052 10072:0b0bf1fd1ed7
1431 ### Checks for functions and variables. 1431 ### Checks for functions and variables.
1432 1432
1433 AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name \ 1433 AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name \
1434 chmod dup2 endgrent endpwent execvp expm1 expm1f fcntl fork getcwd \ 1434 chmod dup2 endgrent endpwent execvp expm1 expm1f fcntl fork getcwd \
1435 getegid geteuid getgid getgrent getgrgid getgrnam getpgrp getpid \ 1435 getegid geteuid getgid getgrent getgrgid getgrnam getpgrp getpid \
1436 getppid getpwent getpwuid gettimeofday getuid getwd _kbhit kill \ 1436 getppid getpwent getpwuid getuid getwd _kbhit kill \
1437 lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf \ 1437 lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf \
1438 memmove mkstemp on_exit pipe poll putenv raise readlink \ 1438 memmove mkstemp on_exit pipe poll putenv raise readlink \
1439 realpath rename resolvepath rindex rmdir roundl select setgrent setlocale \ 1439 realpath rename resolvepath rindex rmdir roundl select setgrent setlocale \
1440 setpwent setvbuf sigaction siglongjmp sigpending sigprocmask sigsuspend \ 1440 setpwent setvbuf sigaction siglongjmp sigpending sigprocmask sigsuspend \
1441 snprintf strcasecmp strdup strerror stricmp strncasecmp \ 1441 snprintf strcasecmp strdup strerror stricmp strncasecmp \
1577 AC_SUBST(RDYNAMIC_FLAG) 1577 AC_SUBST(RDYNAMIC_FLAG)
1578 AC_SUBST(ENABLE_DYNAMIC_LINKING) 1578 AC_SUBST(ENABLE_DYNAMIC_LINKING)
1579 AC_SUBST(LIBOCTINTERP) 1579 AC_SUBST(LIBOCTINTERP)
1580 AC_SUBST(LIBOCTAVE) 1580 AC_SUBST(LIBOCTAVE)
1581 AC_SUBST(LIBCRUFT) 1581 AC_SUBST(LIBCRUFT)
1582
1583 ### There is more than one possible prototype for gettimeofday. See
1584 ### which one (if any) appears in sys/time.h. These tests are from
1585 ### Emacs 19.
1586
1587 AC_MSG_CHECKING([for struct timeval])
1588 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
1589 #include <sys/time.h>
1590 #include <time.h>
1591 #else
1592 #ifdef HAVE_SYS_TIME_H
1593 #include <sys/time.h>
1594 #else
1595 #include <time.h>
1596 #endif
1597 #endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
1598 [AC_MSG_RESULT(yes)
1599 HAVE_TIMEVAL=yes
1600 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])],
1601 [AC_MSG_RESULT(no)
1602 HAVE_TIMEVAL=no])
1603
1604 if test "x$HAVE_TIMEVAL" = xyes; then
1605 AC_MSG_CHECKING([whether gettimeofday can't accept two arguments])
1606 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
1607 #include <sys/time.h>
1608 #include <time.h>
1609 #else
1610 #ifdef HAVE_SYS_TIME_H
1611 #include <sys/time.h>
1612 #else
1613 #include <time.h>
1614 #endif
1615 #endif]], [[struct timeval time;
1616 struct timezone dummy;
1617 gettimeofday (&time, &dummy);]])],
1618 [AC_MSG_RESULT(no)],
1619 [AC_MSG_RESULT(yes)
1620 AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
1621 [Define if your system has a single-arg prototype for gettimeofday.])])
1622 fi
1623 1582
1624 dnl Maybe <cmath> defines the IEEE functions we need. 1583 dnl Maybe <cmath> defines the IEEE functions we need.
1625 1584
1626 OCTAVE_CMATH_FUNC(isnan) 1585 OCTAVE_CMATH_FUNC(isnan)
1627 OCTAVE_CMATH_FUNC(isinf) 1586 OCTAVE_CMATH_FUNC(isinf)