Edit

kc3-lang/automake/m4/mktime.m4

Branch :

  • Show log

    Commit

  • Author : Tom Tromey
    Date : 1996-10-10 22:26:34
    Hash : c353c2ba
    Message : Various bug fixes

  • m4/mktime.m4
  • dnl From Jim Meyering.
    dnl FIXME: this should migrate into libit.
    
    AC_DEFUN(AM_FUNC_MKTIME,
    [AC_REQUIRE([AC_HEADER_TIME])dnl
     AC_CHECK_HEADERS(sys/time.h)
     AC_CACHE_CHECK([for working mktime], am_cv_func_working_mktime,
      [AC_TRY_RUN([/* Test program from Tony Leneis (tony@plaza.ds.adp.com).  */
    #if TIME_WITH_SYS_TIME
    # include <sys/time.h>
    # include <time.h>
    #else
    # if HAVE_SYS_TIME_H
    #  include <sys/time.h>
    # else
    #  include <time.h>
    # endif
    #endif
    int
    main ()
    {
      time_t today = time (0);
      struct tm *local = localtime (&today);
      exit (mktime (local) != today);
    }
    	      ],
    	     am_cv_func_working_mktime=yes, am_cv_func_working_mktime=no,
    	     dnl When crosscompiling, assume mktime is missing or broken.
    	     am_cv_func_working_mktime=no)
      ])
      if test $am_cv_func_working_mktime = no; then
        LIBOBJS="$LIBOBJS mktime.o"
      fi
    ])