AC_DEFUN([LIBGFOR_GETTIMEOFDAY], [
AC_CHECK_FUNCS(gettimeofday)
if test "$ac_cv_func_gettimeofday" = yes; then
AC_CACHE_CHECK([for struct timezone], gfor_cv_struct_timezone,
[AC_TRY_COMPILE([ [struct timezone tz;],
gfor_cv_struct_timezone=yes, gfor_cv_struct_timezone=no)])
if test $gfor_cv_struct_timezone = yes; then
AC_TRY_RUN([
main ()
{
struct timeval time;
struct timezone dummy;
if (gettimeofday (&time, &dummy))
exit (1);
else
exit (0);
}],
[gfor_have_struct_timezone=yes], [gfor_have_struct_timezone=no],
[gfor_have_struct_timezone=yes])
if test $gfor_have_struct_timezone = yes; then
AC_DEFINE(HAVE_TIMEZONE, 1, [Do we have struct timezone])
fi
fi
AC_REQUIRE([AC_HEADER_TIME])
AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
emacs_cv_gettimeofday_two_arguments,
AC_TRY_LINK([
],
[
struct timeval time;
struct timezone dummy;
gettimeofday (&time, DUMMY);],
emacs_cv_gettimeofday_two_arguments=yes,
emacs_cv_gettimeofday_two_arguments=no))
if test $emacs_cv_gettimeofday_two_arguments = no; then
AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT, 1,
[Does gettimeofday take a single argument])
fi
fi])
sinclude(../libtool.m4)
ifelse(,,,[AC_SUBST(LIBTOOL)
AC_DEFUN([AM_PROG_LIBTOOL])
AC_DEFUN([AC_LIBTOOL_DLOPEN])
AC_DEFUN([AC_PROG_LD])
])