bccb2fb
diff -up afflib-3.0.4/configure.ac.WCtype afflib-3.0.4/configure.ac
bccb2fb
--- afflib-3.0.4/configure.ac.WCtype	2007-12-28 15:23:53.000000000 +0100
bccb2fb
+++ afflib-3.0.4/configure.ac	2007-12-28 15:25:59.000000000 +0100
bccb2fb
@@ -115,6 +115,18 @@ AC_CHECK_FUNCS([ftruncate memset mkdir p
bccb2fb
 # Special features that can be enabled or disabled
bccb2fb
 AC_ARG_ENABLE([noopt], AC_HELP_STRING([--enable-noopt],[Drop -O C flags]))
bccb2fb
 
bccb2fb
+AS_IF([test "x$ac_afflib_enable_wide_character_type" != xno ],
bccb2fb
+	[AC_DEFINE([HAVE_WIDE_CHARACTER_TYPE],[1],[Defines if wide character type should be used])
bccb2fb
+		AC_CHECK_FUNCS([btowc fgetws mbsinit mbsrtowcs swprintf wmain wmemchr wmemcmp wmemcpy wmemrchr wctob wcschr wcscmp wcscpy wcsdup wcslen wcsncmp wcsncpy wcsrchr wcsrtombs wcstol wcstoul])
bccb2fb
+		AC_CHECK_HEADERS([wchar.h],
bccb2fb
+			[AC_DEFINE([HAVE_WCHAR_H],[1],[Define to 1 if you have the <wchar.h> header file.])
bccb2fb
+			AC_SUBST([HAVE_WCHAR_H],[1])],
bccb2fb
+			[AC_SUBST([HAVE_WCHAR_H],[0])])
bccb2fb
+
bccb2fb
+		AC_SUBST([HAVE_WIDE_CHARACTER_TYPE],[1])],
bccb2fb
+	[AC_SUBST([HAVE_WIDE_CHARACTER_TYPE],[0])
bccb2fb
+	AC_SUBST([HAVE_WCHAR_H],[0])])
bccb2fb
+
bccb2fb
 ################################################################
bccb2fb
 ## LIBEWF support
bccb2fb
 AC_ARG_ENABLE([libewf],