Mercurial > pidgin.yaz
comparison configure.ac @ 13152:4bb701a8736f
[gaim-migrate @ 15515]
gaim_utf8_strftime() will now provide %z itself if your C library doesn't have it. I'm going to use this shortly.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 07 Feb 2006 07:25:45 +0000 |
parents | 4016a35bdd4d |
children | 5d5e9c65fa42 |
comparison
equal
deleted
inserted
replaced
13151:1646cd4f00ad | 13152:4bb701a8736f |
---|---|
106 AC_SYS_LARGEFILE | 106 AC_SYS_LARGEFILE |
107 | 107 |
108 dnl FreeBSD doesn't have libdl, dlopen is provided by libc | 108 dnl FreeBSD doesn't have libdl, dlopen is provided by libc |
109 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) | 109 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) |
110 | 110 |
111 AC_MSG_CHECKING(for the %z format string in strftime()) | |
112 AC_TRY_RUN([ | |
113 #ifdef HAVE_SYS_TIME_H | |
114 #include <sys/time.h> | |
115 #endif | |
116 #include <time.h> | |
117 #include <stdio.h> | |
118 | |
119 int main() | |
120 { | |
121 char buf[6]; | |
122 time_t t = time(NULL); | |
123 | |
124 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5) | |
125 return 1; | |
126 | |
127 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf); | |
128 | |
129 return !((buf[0] == '-' || buf[0] == '+') && | |
130 (buf[1] >= '0' && buf[1] <= '9') && | |
131 (buf[2] >= '0' && buf[2] <= '9') && | |
132 (buf[3] >= '0' && buf[3] <= '9') && | |
133 (buf[4] >= '0' && buf[4] <= '9') | |
134 ); | |
135 } | |
136 ], | |
137 [ | |
138 AC_MSG_RESULT(yes) | |
139 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1], | |
140 [Define to 1 if you have a strftime() that supports the %z format string.]) | |
141 ], | |
142 [ | |
143 AC_MSG_RESULT(no) | |
144 ] | |
145 ) | |
111 | 146 |
112 | 147 |
113 dnl ####################################################################### | 148 dnl ####################################################################### |
114 dnl # Check for Meanwhile headers (for Sametime) | 149 dnl # Check for Meanwhile headers (for Sametime) |
115 dnl ####################################################################### | 150 dnl ####################################################################### |