summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@cs.umn.edu>1999-03-14 03:27:33 +0000
committerRaja R Harinath <harinath@src.gnome.org>1999-03-14 03:27:33 +0000
commit044fd2db4700cf34d4a2b06424be0bbe2dce5b78 (patch)
tree6e76f507c027c021932cc48b7272cd1d437fce8f /configure.in
parenta3c5d33f26891f02bfcfc78f024f3b87a31753d1 (diff)
downloadgtk+-044fd2db4700cf34d4a2b06424be0bbe2dce5b78.tar.gz
Move widechar tests from `glib' to here, since those were meant only for
1999-03-13 Raja R Harinath <harinath@cs.umn.edu> * 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.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in55
1 files changed, 29 insertions, 26 deletions
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 <wchar.h>], 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 <wchar.h>], 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 <wctype.h>], 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 <wctype.h>], 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 <stdlib.h>],[
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
@@ -497,15 +486,14 @@ AC_TRY_LINK([#include <stdlib.h>],[
# 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([