Mercurial > pidgin
diff configure.ac @ 3161:1fde0667976e
[gaim-migrate @ 3177]
Now EVERYBODY can compile! Whee!
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Sun, 21 Apr 2002 22:08:41 +0000 |
| parents | 3fd77e1a6fa1 |
| children | cdfaf2e1b4f0 |
line wrap: on
line diff
--- a/configure.ac Sun Apr 21 19:05:29 2002 +0000 +++ b/configure.ac Sun Apr 21 22:08:41 2002 +0000 @@ -256,6 +256,35 @@ AC_SUBST(XSS_LIBS) +dnl Shamelessly stolen from gnome-pim +dnl This determines, if struct tm containes tm_gmtoff field +dnl or we should use extern long int timezone. +dnl Actually this should go into acinclude.m4 +AC_DEFUN(GC_TIMEZONE, +[AC_REQUIRE([AC_STRUCT_TM])dnl +AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, +[AC_TRY_COMPILE([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], + ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) +if test "$ac_cv_struct_tm_gmtoff" = yes; then + AC_DEFINE(HAVE_TM_GMTOFF) +else + AC_CACHE_CHECK(for timezone, ac_cv_var_timezone, +[AC_TRY_LINK( +changequote(<<, >>)dnl +<<#include <time.h> +extern long int timezone;>>, +changequote([, ])dnl +[long int l = timezone;], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)]) + if test $ac_cv_var_timezone = yes; then + AC_DEFINE(HAVE_TIMEZONE) + fi +fi +]) + +GC_TIMEZONE + + dnl This was taken straight from X-Chat. dnl X-Chat is the greatest application ever, not only
