/pidgin/main: fe98e3815bc4: Use AC_CHECK_MEMBER instead of homeg...

Elliott Sales de Andrade <[email protected]> Tue, 23 Aug 2016 19:45:07 -0400
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: fe98e3815bc41646d801225fcedd7756c6666833
Author:	 Elliott Sales de Andrade <[email protected]>
Date:	 2016-08-21 03:32 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/fe98e3815bc4

Description:

Use AC_CHECK_MEMBER instead of homegrown check.

diffstat:

 configure.ac |  14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diffs (24 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2119,16 +2119,10 @@ AC_CHECK_HEADERS(sys/sysctl.h, [], [],
 AC_CHECK_HEADERS(sys/socket.h)
 AC_VAR_TIMEZONE_EXTERNALS
 
-AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-                #include <time.h>
-        ]], [[
-                struct tm tm;
-                tm.tm_gmtoff = 1;
-        ]])], [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, 1, [Define if you have a tm_gmtoff member in struct tm])
-fi
+AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+	[AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])],
+	[],
+	[[#include <time.h>]])
 
 dnl #######################################################################
 dnl # Disable pixmap installation

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits