"Fossies" - the Fresh Open Source Software Archive

Member "file-5.35/acinclude.m4" (21 Jul 2010, 2019 Bytes) of package /linux/misc/file-5.35.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight
    2 
    3 AC_DEFUN([AC_STRUCT_TIMEZONE_DAYLIGHT],
    4 [AC_REQUIRE([AC_STRUCT_TM])dnl
    5 AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
    6 [AC_TRY_COMPILE([#include <sys/types.h>
    7 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
    8   ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
    9 if test "$ac_cv_struct_tm_zone" = yes; then
   10   AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
   11 fi
   12 
   13 # On SGI, apparently tzname is a #define, but that's ok, AC_CHECK_DECL will
   14 # consider it declared and we won't give our own extern.
   15 AC_CHECK_DECLS([tzname], , , [#include <time.h>])
   16 AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
   17 [AC_TRY_LINK(
   18 [#include <time.h>
   19 #if !HAVE_DECL_TZNAME
   20 extern char *tzname[];
   21 #endif],
   22 [return tzname[0][0];], [ac_cv_var_tzname=yes], [ac_cv_var_tzname=no])])
   23   if test $ac_cv_var_tzname = yes; then
   24     AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME])
   25   fi
   26 
   27 AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
   28 [AC_TRY_COMPILE([#include <sys/types.h>
   29 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
   30   ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
   31 if test "$ac_cv_struct_tm_isdst" = yes; then
   32   AC_DEFINE(HAVE_TM_ISDST,1,[HAVE_TM_ISDST])
   33 fi
   34 
   35 
   36 AC_CHECK_DECLS([daylight], , , [#include <time.h>])
   37 AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
   38 [AC_TRY_LINK(
   39 changequote(<<, >>)dnl
   40 <<#include <time.h>
   41 #if !HAVE_DECL_DAYLIGHT
   42 extern int daylight;
   43 #endif>>,
   44 changequote([, ])dnl
   45 [atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)])
   46   if test $ac_cv_var_daylight = yes; then
   47     AC_DEFINE(HAVE_DAYLIGHT,1,[HAVE_DAYLIGHT])
   48   fi
   49 ])
   50 
   51 AC_DEFUN([AC_STRUCT_OPTION_GETOPT_H],
   52 [AC_CACHE_CHECK([for struct option in getopt], ac_cv_struct_option_getopt_h,
   53 [AC_TRY_COMPILE([#include <getopt.h>], [struct option op; op.name;],
   54   ac_cv_struct_option_getopt_h=yes, ac_cv_struct_option_getopt_h=no)])
   55 if test "$ac_cv_struct_option_getopt_h" = yes; then
   56   AC_DEFINE(HAVE_STRUCT_OPTION,1,[HAVE_STRUCT_OPTION])
   57 fi
   58 ])