finch/libgnt/configure.ac

changeset 38049
fc2035c409e4
parent 37937
5d43db030efb
equal deleted inserted replaced
38048:a3aaf7cef832 38049:fc2035c409e4
65 65
66 dnl we don't use autobreak on cygwin!! 66 dnl we don't use autobreak on cygwin!!
67 dnl AC_CYGWIN 67 dnl AC_CYGWIN
68 68
69 dnl Checks for header files. 69 dnl Checks for header files.
70 AC_HEADER_STDC
71 AC_HEADER_SYS_WAIT 70 AC_HEADER_SYS_WAIT
72 AC_CHECK_HEADERS(fcntl.h unistd.h locale.h signal.h stdint.h) 71 AC_CHECK_HEADERS(unistd.h)
73 72
74 dnl Checks for typedefs, structures, and compiler characteristics. 73 dnl Checks for typedefs, structures, and compiler characteristics.
75 AC_C_CONST
76 AC_STRUCT_TM
77 74
78 AC_C_BIGENDIAN 75 AC_C_BIGENDIAN
79 76
80 dnl Checks for library functions. 77 dnl Checks for library functions.
81 AC_TYPE_SIGNAL 78 AC_CHECK_FUNCS(strdup)
82 AC_FUNC_STRFTIME
83 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
84 79
85 dnl to prevent the g_stat()/g_unlink() crash, 80 dnl to prevent the g_stat()/g_unlink() crash,
86 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac 81 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
87 AC_SYS_LARGEFILE 82 AC_SYS_LARGEFILE
88 83
89 AC_MSG_CHECKING(for the %z format string in strftime())
90 AC_TRY_RUN([
91 #include <time.h>
92 #include <stdio.h>
93
94 int main()
95 {
96 char buf[6];
97 time_t t = time(NULL);
98
99 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
100 return 1;
101
102 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
103
104 return !((buf[0] == '-' || buf[0] == '+') &&
105 (buf[1] >= '0' && buf[1] <= '9') &&
106 (buf[2] >= '0' && buf[2] <= '9') &&
107 (buf[3] >= '0' && buf[3] <= '9') &&
108 (buf[4] >= '0' && buf[4] <= '9')
109 );
110 }
111 ],
112 [
113 AC_MSG_RESULT(yes)
114 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
115 [Define to 1 if you have a strftime() that supports the %z format string.])
116 ],
117 [
118 AC_MSG_RESULT(no)
119 ],
120 [
121 # Fallback for Cross Compiling...
122 # This will enable the compatibility code.
123 AC_MSG_RESULT(no)
124 ]
125 )
126
127
128 AC_CHECK_HEADER(sys/utsname.h)
129 AC_CHECK_FUNC(uname)
130
131 if test "x$enable_debug" = "xyes" ; then 84 if test "x$enable_debug" = "xyes" ; then
132 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) 85 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
133 enable_fatal_asserts="yes"
134 fi
135
136 if test "x$enable_fatal_asserts" = "xyes" ; then
137 AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
138 fi 86 fi
139 87
140 if test "x$enable_deprecated" = "xno"; then 88 if test "x$enable_deprecated" = "xno"; then
141 DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" 89 DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
142 fi 90 fi
229 AC_SUBST(GLIB_LIBS) 177 AC_SUBST(GLIB_LIBS)
230 178
231 179
232 AC_MSG_CHECKING(for me pot o' gold) 180 AC_MSG_CHECKING(for me pot o' gold)
233 AC_MSG_RESULT(no) 181 AC_MSG_RESULT(no)
234 AC_CHECK_FUNCS(gethostid lrand48) 182 AC_CHECK_HEADERS(sys/wait.h)
235 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
236 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
237 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
238 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
239 AC_CHECK_HEADERS(termios.h)
240 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) 183 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
241 #AC_VAR_TIMEZONE_EXTERNALS 184 #AC_VAR_TIMEZONE_EXTERNALS
242 185
243 GNT_CFLAGS= 186 GNT_CFLAGS=
244 GNT_LIBS= 187 GNT_LIBS=

mercurial