]> Pileus Git - ~andy/gtk/blob - configure.in
some Make 3.79 $(strip ) versions are broken and require an empty arg,
[~andy/gtk] / configure.in
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(gdk/gdktypes.h)
3
4 # In the following, there are a the following variants
5 # of GLib cflags and libs variables
6 #
7 # GLIB_CFLAGS:  cflags for compiling libraries and example progs
8 # GLIB_LIBS:    libraries for linking example programs
9 # GLIB_DEPLIBS: libraries for linking libraries against
10 # glib_cflags:  cflags to store in gtk-config
11 # glib_libs:    libs to store in gtk-config
12 # glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
13 # glib_thread_libs:   libs to store in gtk-config for gtk-config gthread
14
15 # Save this value here, since automake will set cflags later
16 cflags_set=${CFLAGS+set}
17
18 dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
19 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
20 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
21 #
22 # Making releases:
23 #   GTK_MICRO_VERSION += 1;
24 #   GTK_INTERFACE_AGE += 1;
25 #   GTK_BINARY_AGE += 1;
26 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
27 # if backwards compatibility has been broken,
28 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
29 #
30 GTK_MAJOR_VERSION=1
31 GTK_MINOR_VERSION=3
32 GTK_MICRO_VERSION=0
33 GTK_INTERFACE_AGE=0
34 GTK_BINARY_AGE=0
35 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
36 dnl
37 AC_DIVERT_POP()dnl
38
39 AC_SUBST(GTK_MAJOR_VERSION)
40 AC_SUBST(GTK_MINOR_VERSION)
41 AC_SUBST(GTK_MICRO_VERSION)
42 AC_SUBST(GTK_INTERFACE_AGE)
43 AC_SUBST(GTK_BINARY_AGE)
44 AC_SUBST(GTK_VERSION)
45
46 # libtool versioning
47 LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
48 LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
49 LT_REVISION=$GTK_INTERFACE_AGE
50 LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
51 AC_SUBST(LT_RELEASE)
52 AC_SUBST(LT_CURRENT)
53 AC_SUBST(LT_REVISION)
54 AC_SUBST(LT_AGE)
55
56 # For automake.
57 VERSION=$GTK_VERSION
58 PACKAGE=gtk+
59
60 # Save this value here, since automake will set cflags later
61 cflags_set=${CFLAGS+set}
62
63 dnl Initialize automake stuff
64 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
65
66 # Specify a configuration file
67 AM_CONFIG_HEADER(config.h)
68
69 dnl Initialize libtool
70 AM_PROG_LIBTOOL
71
72 dnl Initialize maintainer mode
73 AM_MAINTAINER_MODE
74
75 AC_CANONICAL_HOST
76
77 dnl figure debugging default, prior to $ac_help setup
78 dnl
79 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
80 if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
81         debug_default=yes
82 else
83         debug_default=minimum
84 fi
85 AC_DIVERT_POP()dnl
86
87 dnl declare --enable-* args and collect ac_help strings
88 AC_ARG_ENABLE(debug, [  --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
89 AC_ARG_ENABLE(shm, [  --enable-shm            support shared memory if available [default=yes]],
90                    echo $enable_shm, enable_shm="yes")
91 AC_ARG_ENABLE(ansi, [  --enable-ansi           turn on strict ansi [default=no]],
92                     , enable_ansi=no)
93 AC_ARG_WITH(glib, [  --with-glib=DIR         Use uninstalled copy of glib])
94 AC_ARG_ENABLE(xim, [  --enable-xim            support XIM [default=yes]],
95                         , enable_xim="yes")
96 AC_ARG_ENABLE(xim_inst, [  --disable-xim-inst      does not use xim instantiate callback],
97                         , enable_xim_inst="maybe")
98 AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
99 AC_ARG_WITH(locale, [  --with-locale=LOCALE    locale name you want to use ])
100
101 AC_ARG_WITH(xinput, [  --with-xinput=[no/gxi/xfree] support XInput ])
102
103 if test "x$enable_debug" = "xyes"; then
104   test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
105   GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
106 else
107   if test "x$enable_debug" = "xno"; then
108     GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
109   else
110     GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
111   fi
112 fi
113
114 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
115
116 # Build time sanity check...
117 AM_SANITY_CHECK
118
119 # Checks for programs.
120 AC_PROG_CC
121 AC_ISC_POSIX
122 AM_PROG_CC_STDC
123 AC_PROG_INSTALL
124 AC_PROG_MAKE_SET
125
126 changequote(,)dnl
127 if test "x$GCC" = "xyes"; then
128   case " $CFLAGS " in
129   *[\ \ ]-Wall[\ \      ]*) ;;
130   *) CFLAGS="$CFLAGS -Wall" ;;
131   esac
132
133   if test "x$enable_ansi" = "xyes"; then
134     case " $CFLAGS " in
135     *[\ \       ]-ansi[\ \      ]*) ;;
136     *) CFLAGS="$CFLAGS -ansi" ;;
137     esac
138
139     case " $CFLAGS " in
140     *[\ \       ]-pedantic[\ \  ]*) ;;
141     *) CFLAGS="$CFLAGS -pedantic" ;;
142     esac
143   fi
144 fi
145 changequote([,])dnl
146
147 # Honor aclocal flags
148 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
149
150 # define a MAINT-like variable REBUILD which is set if Perl
151 # and awk are found, so autogenerated sources can be rebuilt
152
153 AC_PROG_AWK
154 AC_CHECK_PROGS(PERL, perl5 perl)
155
156 # We would like indent, but don't require it.
157 AC_CHECK_PROG(INDENT, indent, indent)
158
159 REBUILD=\#
160 if test "x$enable_rebuilds" = "xyes" && \
161      test -n "$PERL" && \
162      $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
163      test -n "$AWK" ; then
164   REBUILD=
165 fi
166 AC_SUBST(REBUILD)
167
168 AC_CHECK_FUNCS(lstat)
169
170 AC_MSG_CHECKING(whether make is GNU Make)
171 STRIP_BEGIN=
172 STRIP_END=
173 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
174         STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
175         STRIP_END=')'
176         AC_MSG_RESULT(yes)
177 else
178         AC_MSG_RESULT(no)
179 fi
180 STRIP_DUMMY=
181 AC_SUBST(STRIP_DUMMY)
182 AC_SUBST(STRIP_BEGIN)
183 AC_SUBST(STRIP_END)
184
185 # i18n stuff
186 ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl hr hu it ja ko lt nl no pl pt pt_BR ro ru sk sl sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
187 AM_GTK_GNU_GETTEXT
188 LIBS="$LIBS $INTLLIBS"
189
190 # AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
191 # this is the directory where the *.{mo,gmo} files are installed
192 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
193 AC_SUBST(gtklocaledir)
194
195 dnl The DU4 header files don't provide library prototypes unless 
196 dnl -std1 is given to the native cc.
197 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
198
199 gtk_save_LIBS=$LIBS
200 LIBS="$LIBS -lm"
201 AC_TRY_RUN([#include <math.h>
202              int main (void) { return (log(1) != log(1.)); }],
203      AC_MSG_RESULT(none needed),
204      gtk_save_CFLAGS=$CFLAGS
205      CFLAGS="$CFLAGS -std1"
206      AC_TRY_RUN([#include <math.h>
207                  int main (void) { return (log(1) != log(1.)); }],
208          AC_MSG_RESULT(-std1),
209          AC_MSG_RESULT()
210          CFLAGS=$gtk_save_CFLAGS
211          AC_MSG_WARN(
212                 [No ANSI prototypes found in library. (-std1 didn't work.)]),
213          true
214      ),
215      AC_MSG_RESULT(none needed)
216 )
217 LIBS=$gtk_save_LIBS
218
219 MATH_LIB=-lm
220 GTK_LIBS_EXTRA=
221 AC_MSG_CHECKING(for the BeOS)
222 case $host in
223   *-*-beos*)
224     AC_MSG_RESULT(yes)
225     GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
226     MATH_LIB=
227   ;;
228   *)
229     AC_MSG_RESULT(no)
230   ;;
231 esac
232 AC_SUBST(MATH_LIB)
233 AC_SUBST(GTK_LIBS_EXTRA)
234
235 dnl NeXTStep cc seems to need this
236 AC_MSG_CHECKING([for extra flags for POSIX compliance])
237 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
238   AC_MSG_RESULT(none needed),
239   gtk_save_CFLAGS=$CFLAGS
240   CFLAGS="$CFLAGS -posix"
241   AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
242     AC_MSG_RESULT(-posix),
243     AC_MSG_RESULT()
244     CFLAGS=$gtk_save_CFLAGS
245     AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
246
247 if test x$with_glib = xyes ; then
248   AC_MSG_ERROR([
249 *** Directory must be specified for --with-glib])
250 fi
251
252 if test x$with_glib = x ; then 
253   # Look for separately installed glib
254
255   AM_PATH_GLIB(1.3.0,,
256     AC_MSG_ERROR([
257 *** GLIB 1.3.0 or better is required. The latest version of GLIB
258 *** is always available from ftp://ftp.gtk.org/.]),
259     gobject gmodule gthread)
260
261   # we do not want to make all gtk progs to link to thread libraries.
262   glib_cflags=`$GLIB_CONFIG glib gobject gmodule --cflags`
263   glib_thread_cflags="$GLIB_CFLAGS"
264   glib_libs=`$GLIB_CONFIG glib gobject gmodule --libs`
265   glib_thread_libs="$GLIB_LIBS"
266   GLIB_LIBS="$glib_libs"
267   GLIB_DEPLIBS="$glib_libs"
268 else
269   # Use uninstalled glib (assume they got the version right)
270
271   GLIB_CONFIG=$with_glib/glib-config
272   if test -x $GLIB_CONFIG ; then 
273     :
274   else
275     AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
276   fi
277
278   # For use in gtk-config
279   glib_cflags=`$GLIB_CONFIG --cflags gobject gmodule`
280   glib_thread_cflags=`$GLIB_CONFIG --cflags gobject gmodule gthread`
281   glib_libs=`$GLIB_CONFIG --libs gobject gmodule`
282   glib_thread_libs=`$GLIB_CONFIG --libs gobject gmodule gthread`
283
284   glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
285
286   # canonicalize relative paths
287   case $with_glib in 
288     /*)
289       glib_dir=$with_glib
290       ;;
291     *)
292       glib_dir="\$(top_builddir)/$with_glib"
293       ;;
294   esac
295
296   GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
297   GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgobject.la $glib_dir/gmodule/libgmodule.la"
298   GLIB_DEPLIBS=
299
300   AC_SUBST(GLIB_CFLAGS)
301   AC_SUBST(GLIB_LIBS)
302 fi
303
304 AC_SUBST(glib_cflags)
305 AC_SUBST(glib_libs)
306 AC_SUBST(glib_thread_cflags)
307 AC_SUBST(glib_thread_libs)
308 AC_SUBST(GLIB_DEPLIBS)
309
310 AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
311 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
312 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
313
314 # Find the X11 include and library directories
315 AC_PATH_X
316 AC_PATH_XTRA
317
318 if test "x$x_includes" = "x"; then
319   x_includes="/usr/include"
320 fi
321
322 saved_cflags="$CFLAGS"
323 saved_ldflags="$LDFLAGS"
324
325 CFLAGS="$CFLAGS $X_CFLAGS"
326 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
327
328 if test "x$no_x" = "xyes"; then 
329   AC_MSG_ERROR([
330 *** X libraries or include files not found. Check 'config.log' for 
331 *** more details.])
332 fi
333
334 # Checks for libraries.
335 # Check for the X11 library
336 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", 
337   AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
338   $X_EXTRA_LIBS)
339
340 if test "x$enable_shm" = "xyes"; then
341   # Check for the Xext library (needed for XShm extention)
342   AC_CHECK_LIB(Xext, XShmAttach, 
343       x_libs="-lXext $x_libs", 
344       # On AIX, it is in XextSam instead, but we still need -lXext
345       AC_CHECK_LIB(XextSam, XShmAttach, 
346           x_libs="-lXextSam -lXext $x_libs", 
347           no_xext_lib=yes, $x_libs),
348       $x_libs)
349 fi
350
351 # Check for shaped window extension
352
353 AC_CHECK_LIB(Xext, XShapeCombineMask,
354       if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
355            x_libs="-lXext $x_libs"
356       fi
357       AC_DEFINE(HAVE_SHAPE_EXT),
358       ,
359       $x_libs)
360
361 # Check for XConvertCase (X11R6 specific)
362
363 AC_CHECK_LIB(X11, XConvertCase,
364       AC_DEFINE(HAVE_XCONVERTCASE),
365       ,
366       $x_libs)
367
368 # Check for XIM support.
369
370 AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
371             : ,
372             enable_xim_inst="no",
373             $x_libs)
374
375 # On Solaris, calling XRegisterIMInstantiateCallback seems to
376 # cause an immediate segfault, so we disable it, unless
377 # the user specifically forces it to be on.
378
379 if test x$enable_xim_inst = xmaybe ; then
380   case host in
381         *-*-solaris*)
382             enable_xim_inst="no"
383             ;;
384         *)
385             enable_xim_inst="yes"
386             ;;
387   esac
388 fi
389
390 if test "x$enable_xim" = "xyes"; then
391   GTK_XIM_FLAGS="-DUSE_XIM"
392   if test "x$enable_xim_inst" = "xyes"; then
393     AC_DEFINE(USE_X11R6_XIM)
394   fi
395 fi
396
397 x_cflags="$X_CFLAGS"
398 x_ldflags="$X_LDFLAGS $X_LIBS"
399
400 # set up things for XInput
401
402 if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
403   AC_DEFINE(XINPUT_GXI)
404   xinput_progs=gxid
405   x_libs="-lXi $x_libs"
406 elif test "x$with_xinput" = "xxfree"; then
407   AC_DEFINE(XINPUT_XFREE)
408   x_libs="-lXi $x_libs"
409 else
410   AC_DEFINE(XINPUT_NONE)
411 fi
412
413 AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
414 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
415
416 CFLAGS="$saved_cflags"
417 LDFLAGS="$saved_ldflags"
418
419 AC_SUBST(x_cflags)
420 AC_SUBST(x_includes)
421 AC_SUBST(x_ldflags)
422 AC_SUBST(x_libs)
423 AC_SUBST(xinput_progs)
424
425 if test "x$enable_shm" = "xyes"; then
426   # Check for shared memory
427   AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
428   AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
429
430   # Check for the X shared memory extension header file
431   AC_MSG_CHECKING(X11/extensions/XShm.h)
432   if test "x$no_xext_lib" = "xyes"; then
433     AC_MSG_RESULT(no)
434     no_xshm=yes
435   else
436     if test -f "$x_includes/X11/extensions/XShm.h"; then
437       AC_MSG_RESULT(yes)
438       AC_DEFINE(HAVE_XSHM_H)
439     else
440       AC_MSG_RESULT(no)
441       no_xshm=yes
442     fi
443   fi
444 fi
445
446 # Check if X_LOCALE definition is necessary
447
448 AC_MSG_CHECKING(need -DX_LOCALE)
449
450 AC_TRY_RUN([
451 #include <stdio.h>
452 #include <locale.h>
453
454 int
455 main ()
456 {
457   return setlocale (LC_ALL, "${with_locale}") == NULL;
458 }],
459 need_x_locale=no,
460 need_x_locale=yes,
461 need_x_locale=no)
462 AC_MSG_RESULT($need_x_locale)
463
464 if test $need_x_locale = yes; then
465   GTK_LOCALE_FLAGS="-DX_LOCALE"
466 fi
467
468 # Checks for header files.
469 AC_HEADER_STDC
470
471 # Checks for typedefs, structures, and compiler characteristics.
472 AC_C_CONST
473
474 # Checks for library functions.
475 AC_TYPE_SIGNAL
476 AC_FUNC_MMAP
477
478 # Check if <sys/select.h> needs to be included for fd_set
479 AC_MSG_CHECKING([for fd_set])
480 AC_TRY_COMPILE([#include <sys/types.h>],
481         [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
482 if test $gtk_ok = yes; then
483     AC_MSG_RESULT([yes, found in sys/types.h])
484 else
485     AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
486     if test $gtk_ok = yes; then
487         AC_DEFINE(HAVE_SYS_SELECT_H)
488         AC_MSG_RESULT([yes, found in sys/select.h])
489     else
490         AC_DEFINE(NO_FD_SET)
491         AC_MSG_RESULT(no)
492     fi
493 fi
494
495 # `widechar' tests for gdki18n.h
496 AC_MSG_CHECKING(for wchar.h)
497 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
498 if test $gdk_wchar_h = yes; then
499    AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
500 fi
501 AC_MSG_RESULT($gdk_wchar_h)
502
503 # Check for wctype.h (for iswalnum)
504 AC_MSG_CHECKING(for wctype.h)
505 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
506 if test $gdk_wctype_h = yes; then
507    AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
508 fi
509 AC_MSG_RESULT($gdk_wctype_h)
510
511 # in Solaris 2.5, `iswalnum' is in -lw
512 GDK_WLIBS=
513 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
514
515 oLIBS="$LIBS"
516 LIBS="$LIBS $GDK_WLIBS"
517 # The following is necessary for Linux libc-5.4.38
518 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
519 AC_TRY_LINK([#include <stdlib.h>],[
520 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
521 #  ifdef HAVE_WCTYPE_H
522 #    include <wctype.h>
523 #  else
524 #    ifdef HAVE_WCHAR_H
525 #      include <wchar.h>
526 #    endif
527 #  endif
528 #else
529 #  define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
530 #endif
531 iswalnum((wchar_t) 0);
532 ], gdk_working_wctype=yes, gdk_working_wctype=no)
533 LIBS="$oLIBS"
534
535 if test $gdk_working_wctype = no; then
536    AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
537    GDK_WLIBS=
538 fi
539 AC_MSG_RESULT($gdk_working_wctype)
540 AC_SUBST(GDK_WLIBS)
541
542 AC_SUBST(GTK_DEBUG_FLAGS)
543 AC_SUBST(GTK_XIM_FLAGS)
544 AC_SUBST(GTK_LOCALE_FLAGS)
545
546 AC_OUTPUT_COMMANDS([
547
548 ## Generate `gdk/gdkconfig.h' in two cases
549 ## 1. `config.status' is run either explicitly, or via configure.
550 ##     Esp. not when it is run in `Makefile' to generate makefiles and
551 ##     config.h
552 ## 2. CONFIG_OTHER is set explicitly
553 ##
554 ## Case 1 is difficult.  We know that `automake' sets one of
555 ## CONFIG_FILES or CONFIG_HEADERS to empty.  This heuristic works
556 ## only when AM_CONFIG_HEADER is set, however.
557
558 if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
559   # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
560   CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
561 fi
562 case "$CONFIG_OTHER" in
563 *gdk/gdkconfig.h*)
564         echo creating gdk/gdkconfig.h
565         outfile=gdkconfig.h-tmp
566         cat > $outfile <<\_______EOF
567 /* gdkconfig.h
568  *
569  * This is a generated file.  Please modify `configure.in'
570  */
571
572 #ifndef GDKCONFIG_H
573 #define GDKCONFIG_H
574
575 #ifdef __cplusplus
576 extern "C" {
577 #endif /* __cplusplus */
578
579 _______EOF
580
581         cat >>$outfile <<_______EOF
582 $gdk_windowing
583 $gdk_wc
584 _______EOF
585
586         cat >>$outfile <<_______EOF
587
588 #ifdef __cplusplus
589 }
590 #endif /* __cplusplus */
591
592 #endif /* GDKCONFIG_H */
593 _______EOF
594
595
596         if cmp -s $outfile gdk/gdkconfig.h; then
597           echo gdk/gdkconfig.h is unchanged
598           rm -f $outfile
599         else
600           mv $outfile gdk/gdkconfig.h
601         fi ;;
602 esac
603 ],[
604 # Currently we always use X11 on those systems where we run configure...
605 gdk_windowing='
606 #define GDK_WINDOWING_X11'
607 if test x$gdk_wchar_h = xyes; then
608   gdk_wc='
609 #define GDK_HAVE_WCHAR_H 1'
610 fi
611 if test x$gdk_wctype_h = xyes; then
612   gdk_wc="\$gdk_wc
613 #define GDK_HAVE_WCTYPE_H 1"
614 fi
615 if test x$gdk_working_wctype = xno; then
616   gdk_wc="\$gdk_wc
617 #define GDK_HAVE_BROKEN_WCTYPE 1"
618 fi
619
620
621 ])
622
623 AC_OUTPUT([
624 gtk+.spec
625 docs/gtk-config.1
626 Makefile
627 gtk-config
628 po/Makefile.in
629 docs/Makefile
630 gdk/Makefile
631 gdk/x11/Makefile
632 gdk/win32/Makefile
633 gtk/Makefile
634 gtk/gtkfeatures.h
635 gtk/gtkcompat.h
636 ], [chmod +x gtk-config])