[PATCH:libXaw 1/2] convert header checks/ifdefs to autoconf standard AC_CHECK_HEADERS

Alan Coopersmith alan.coopersmith at oracle.com
Sat Nov 20 20:11:12 PST 2010


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac  |   10 +---------
 src/XawI18n.h |    6 +++---
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index d793ea9..83b20b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,15 +90,7 @@ AM_CONDITIONAL(BUILD_XAW7, [test x$build_v7 = xyes])
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADER(wctype.h,
-       	AC_DEFINE([HAS_WCTYPE_H],1,
-			[Define to 1 if you have the <wctype.h> header file.]))
-AC_CHECK_HEADER(wchar.h,
-       	AC_DEFINE([HAS_WCHAR_H],1,
-			[Define to 1 if you have the <wchar.h> header file.]))
-AC_CHECK_HEADER(widec.h, [],
-       	AC_DEFINE([NO_WIDEC_H],1,
-			[Define to 1 if you DO NOT have the <widec.h> header file.]))
+AC_CHECK_HEADERS([wctype.h wchar.h widec.h])
 
 # Checks for functions
 AC_CHECK_FUNCS([iswalnum])
diff --git a/src/XawI18n.h b/src/XawI18n.h
index 09ab51b..d50171c 100644
--- a/src/XawI18n.h
+++ b/src/XawI18n.h
@@ -24,9 +24,9 @@ in this Software without prior written authorization from The Open Group.
 
 ********************************************************/
 
-#ifdef HAS_WCTYPE_H
+#ifdef HAVE_WCTYPE_H
 #include <wctype.h>
-#ifndef NO_WIDEC_H
+#ifdef HAVE_WIDEC_H
 #include <widec.h>
 #define wcslen(c) wslen(c)
 #define wcscpy(d, s)		wscpy(d, s)
@@ -34,7 +34,7 @@ in this Software without prior written authorization from The Open Group.
 #endif
 #endif
 
-#ifdef HAS_WCHAR_H
+#ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
 
-- 
1.7.3.2



More information about the xorg-devel mailing list