From 044fd2db4700cf34d4a2b06424be0bbe2dce5b78 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Sun, 14 Mar 1999 03:27:33 +0000 Subject: Move widechar tests from `glib' to here, since those were meant only for 1999-03-13 Raja R Harinath * configure.in (gdk_wc): Move widechar tests from `glib' to here, since those were meant only for gdki18n.h. * gdk/gdki18n.h: Include gdkconfig.h and use GDK_* instead of G_* for widechar tests. * gtk/Makefile.am (INCLUDES): Add -I../gdk for gdkconfig.h. --- configure.in | 55 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index b7abc39934..e59e19e7bc 100644 --- a/configure.in +++ b/configure.in @@ -449,40 +449,29 @@ else fi fi -# Duplicate `widechar' tests from `glib'. -# Check for wchar.h -if test x = y; then - # will not be executed - # hack so as not to update `acconfig.h' - AC_CHECK_HEADERS(wchar.h wctype.h) - AC_CHECK_FUNCS(broken_wctype) -fi - +# `widechar' tests for gdki18n.h AC_MSG_CHECKING(for wchar.h) -AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) -if test $gtk_ok = yes; then - ac_kludge=HAVE_WCHAR_H - AC_DEFINE($ac_kludge) +AC_TRY_CPP([#include ], gdk_wchar_h=yes, gdk_wchar_h=no) +if test $gdk_wchar_h = yes; then + AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file]) fi -AC_MSG_RESULT($gtk_ok) +AC_MSG_RESULT($gdk_wchar_h) # Check for wctype.h (for iswalnum) - AC_MSG_CHECKING(for wctype.h) -AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) -if test $gtk_ok = yes; then - ac_kludge=HAVE_WCTYPE_H - AC_DEFINE($ac_kludge) +AC_TRY_CPP([#include ], gdk_wctype_h=yes, gdk_wctype_h=no) +if test $gdk_wctype_h = yes; then + AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file]) fi -AC_MSG_RESULT($gtk_ok) +AC_MSG_RESULT($gdk_wctype_h) # in Solaris 2.5, `iswalnum' is in -lw GDK_WLIBS= AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)]) -# The following is necessary for Linux libc-5.4.38 oLIBS="$LIBS" LIBS="$LIBS $GDK_WLIBS" +# The following is necessary for Linux libc-5.4.38 AC_MSG_CHECKING(if iswalnum() and friends are properly defined) AC_TRY_LINK([#include ],[ #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) @@ -497,15 +486,14 @@ AC_TRY_LINK([#include ],[ # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) #endif iswalnum((wchar_t) 0); -], gtk_ok=yes, gtk_ok=no) +], gdk_working_wctype=yes, gdk_working_wctype=no) LIBS="$oLIBS" -if test $gtk_ok = no; then - ac_kludge=HAVE_BROKEN_WCTYPE - AC_DEFINE($ac_kludge) +if test $gdk_working_wctype = no; then + AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken]) GDK_WLIBS= fi -AC_MSG_RESULT($gtk_ok) +AC_MSG_RESULT($gdk_working_wctype) AC_SUBST(GDK_WLIBS) AC_SUBST(GTK_DEBUG_FLAGS) @@ -549,6 +537,7 @@ _______EOF cat >>$outfile <<_______EOF $gdk_windowing +$gdk_wc _______EOF cat >>$outfile <<_______EOF @@ -572,6 +561,20 @@ esac # Currently we always use X11 on those systems where we run configure... gdk_windowing=' #define GDK_WINDOWING GDK_WINDOWING_X11' +if test x$gdk_wchar_h = xyes; then + gdk_wc=' +#define GDK_HAVE_WCHAR_H 1' +fi +if test x$gdk_wctype_h = xyes; then + gdk_wc="\$gdk_wc +#define GDK_HAVE_WCTYPE_H 1" +fi +if test x$gdk_working_wctype = xno; then + gdk_wc="\$gdk_wc +#define GDK_HAVE_BROKEN_WCTYPE 1" +fi + + ]) AC_OUTPUT([ -- cgit v1.2.1