+2001-04-25
+
+ * ac/sv-check-type.m4: new autoconf macro.
+ * configure.in: fixed wint_t typedef detection (did not work
+ with gcc-2.96).
+
2001-04-25
* acconfig.h: added USE_GTKGDK_XIM definition for autoheader.
--- /dev/null
+dnl sv_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES])
+dnl
+dnl Like AC_CHECK_TYPE, but in addition to `sys/types.h', `stdlib.h' and
+dnl `stddef.h' checks files included by INCLUDES, which should be a
+dnl series of #include statements. If TYPE is not defined, define it
+dnl to DEFAULT.
+dnl
+AC_DEFUN(sv_CHECK_TYPE,
+[AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(sv_cv_type_$1,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+$3
+], [
+#undef $1
+int a = sizeof($1);
+], sv_cv_type_$1=yes, sv_cv_type_$1=no)])dnl
+AC_MSG_RESULT($sv_cv_type_$1)
+if test $sv_cv_type_$1 = no; then
+ AC_DEFINE($1, $2)
+fi
+])
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h sys/param.h)
+AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h sys/param.h \
+ wchar.h wctype.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
-AC_CHECK_TYPE(wint_t, unsigned int)
+sv_CHECK_TYPE(wint_t, unsigned int,
+[
+#if (HAVE_WCHAR_H && HAVE_WCTYPE_H)
+#include <wchar.h>
+#endif
+])
dnl Checks for library functions.
AC_FUNC_ALLOCA
-AC_CHECK_HEADERS(wchar.h wctype.h)
AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr \
wcsstr wcswcs iswalnum iswspace towlower \
wcslen wcscpy wcsncpy \