source: trunk/third/gtk/configure @ 17071

Revision 17071, 206.0 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17070, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14#
15# Making releases:
16#   GTK_MICRO_VERSION += 1;
17#   GTK_INTERFACE_AGE += 1;
18#   GTK_BINARY_AGE += 1;
19# if any functions have been added, set GTK_INTERFACE_AGE to 0.
20# if backwards compatibility has been broken,
21# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
22#
23GTK_MAJOR_VERSION=1
24GTK_MINOR_VERSION=2
25GTK_MICRO_VERSION=10
26GTK_INTERFACE_AGE=1
27GTK_BINARY_AGE=10
28GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
29ac_help="$ac_help
30  --enable-shared[=PKGS]  build shared libraries [default=yes]"
31ac_help="$ac_help
32  --enable-static[=PKGS]  build static libraries [default=yes]"
33ac_help="$ac_help
34  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
35ac_help="$ac_help
36  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
37ac_help="$ac_help
38  --disable-libtool-lock  avoid locking (might break parallel builds)"
39ac_help="$ac_help
40  --enable-maintainer-mode enable make rules and dependencies not useful
41                          (and sometimes confusing) to the casual installer"
42if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
43        debug_default=yes
44else
45        debug_default=minimum
46fi
47ac_help="$ac_help
48  --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]"
49ac_help="$ac_help
50  --enable-shm            support shared memory if available [default=yes]"
51ac_help="$ac_help
52  --enable-ansi           turn on strict ansi [default=no]"
53ac_help="$ac_help
54  --with-glib=DIR         Use uninstalled copy of glib"
55ac_help="$ac_help
56  --enable-xim            support XIM [default=yes]"
57ac_help="$ac_help
58  --disable-xim-inst      does not use xim instantiate callback"
59ac_help="$ac_help
60  --disable-rebuilds      disable all source autogeneration rules"
61ac_help="$ac_help
62  --with-locale=LOCALE    locale name you want to use "
63ac_help="$ac_help
64  --with-xinput=[no/gxi/xfree] support XInput "
65ac_help="$ac_help
66  --with-native-locale=[yes/no] Use native locale support [default=no]"
67ac_help="$ac_help
68  --disable-nls           do not use Native Language Support"
69ac_help="$ac_help
70  --with-catgets          use catgets functions if available"
71ac_help="$ac_help
72  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)"
73ac_help="$ac_help
74  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)"
75ac_help="$ac_help
76  --disable-glibtest       Do not try to compile and run a test GLIB program"
77ac_help="$ac_help
78  --with-x                use the X Window System"
79
80# Initialize some variables set by options.
81# The variables have the same names as the options, with
82# dashes changed to underlines.
83build=NONE
84cache_file=./config.cache
85exec_prefix=NONE
86host=NONE
87no_create=
88nonopt=NONE
89no_recursion=
90prefix=NONE
91program_prefix=NONE
92program_suffix=NONE
93program_transform_name=s,x,x,
94silent=
95site=
96srcdir=
97target=NONE
98verbose=
99x_includes=NONE
100x_libraries=NONE
101bindir='${exec_prefix}/bin'
102sbindir='${exec_prefix}/sbin'
103libexecdir='${exec_prefix}/libexec'
104datadir='${prefix}/share'
105sysconfdir='${prefix}/etc'
106sharedstatedir='${prefix}/com'
107localstatedir='${prefix}/var'
108libdir='${exec_prefix}/lib'
109includedir='${prefix}/include'
110oldincludedir='/usr/include'
111infodir='${prefix}/info'
112mandir='${prefix}/man'
113
114# Initialize some other variables.
115subdirs=
116MFLAGS= MAKEFLAGS=
117SHELL=${CONFIG_SHELL-/bin/sh}
118# Maximum number of lines to put in a shell here document.
119ac_max_here_lines=12
120
121ac_prev=
122for ac_option
123do
124
125  # If the previous option needs an argument, assign it.
126  if test -n "$ac_prev"; then
127    eval "$ac_prev=\$ac_option"
128    ac_prev=
129    continue
130  fi
131
132  case "$ac_option" in
133  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
134  *) ac_optarg= ;;
135  esac
136
137  # Accept the important Cygnus configure options, so we can diagnose typos.
138
139  case "$ac_option" in
140
141  -bindir | --bindir | --bindi | --bind | --bin | --bi)
142    ac_prev=bindir ;;
143  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
144    bindir="$ac_optarg" ;;
145
146  -build | --build | --buil | --bui | --bu)
147    ac_prev=build ;;
148  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
149    build="$ac_optarg" ;;
150
151  -cache-file | --cache-file | --cache-fil | --cache-fi \
152  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
153    ac_prev=cache_file ;;
154  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
155  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
156    cache_file="$ac_optarg" ;;
157
158  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
159    ac_prev=datadir ;;
160  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
161  | --da=*)
162    datadir="$ac_optarg" ;;
163
164  -disable-* | --disable-*)
165    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
166    # Reject names that are not valid shell variable names.
167    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
168      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169    fi
170    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171    eval "enable_${ac_feature}=no" ;;
172
173  -enable-* | --enable-*)
174    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
175    # Reject names that are not valid shell variable names.
176    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
177      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
178    fi
179    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
180    case "$ac_option" in
181      *=*) ;;
182      *) ac_optarg=yes ;;
183    esac
184    eval "enable_${ac_feature}='$ac_optarg'" ;;
185
186  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
187  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
188  | --exec | --exe | --ex)
189    ac_prev=exec_prefix ;;
190  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
191  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
192  | --exec=* | --exe=* | --ex=*)
193    exec_prefix="$ac_optarg" ;;
194
195  -gas | --gas | --ga | --g)
196    # Obsolete; use --with-gas.
197    with_gas=yes ;;
198
199  -help | --help | --hel | --he)
200    # Omit some internal or obsolete options to make the list less imposing.
201    # This message is too long to be a string in the A/UX 3.1 sh.
202    cat << EOF
203Usage: configure [options] [host]
204Options: [defaults in brackets after descriptions]
205Configuration:
206  --cache-file=FILE       cache test results in FILE
207  --help                  print this message
208  --no-create             do not create output files
209  --quiet, --silent       do not print \`checking...' messages
210  --version               print the version of autoconf that created configure
211Directory and file names:
212  --prefix=PREFIX         install architecture-independent files in PREFIX
213                          [$ac_default_prefix]
214  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
215                          [same as prefix]
216  --bindir=DIR            user executables in DIR [EPREFIX/bin]
217  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
218  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
219  --datadir=DIR           read-only architecture-independent data in DIR
220                          [PREFIX/share]
221  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
222  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
223                          [PREFIX/com]
224  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
225  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
226  --includedir=DIR        C header files in DIR [PREFIX/include]
227  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
228  --infodir=DIR           info documentation in DIR [PREFIX/info]
229  --mandir=DIR            man documentation in DIR [PREFIX/man]
230  --srcdir=DIR            find the sources in DIR [configure dir or ..]
231  --program-prefix=PREFIX prepend PREFIX to installed program names
232  --program-suffix=SUFFIX append SUFFIX to installed program names
233  --program-transform-name=PROGRAM
234                          run sed PROGRAM on installed program names
235EOF
236    cat << EOF
237Host type:
238  --build=BUILD           configure for building on BUILD [BUILD=HOST]
239  --host=HOST             configure for HOST [guessed]
240  --target=TARGET         configure for TARGET [TARGET=HOST]
241Features and packages:
242  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
243  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
244  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
245  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
246  --x-includes=DIR        X include files are in DIR
247  --x-libraries=DIR       X library files are in DIR
248EOF
249    if test -n "$ac_help"; then
250      echo "--enable and --with options recognized:$ac_help"
251    fi
252    exit 0 ;;
253
254  -host | --host | --hos | --ho)
255    ac_prev=host ;;
256  -host=* | --host=* | --hos=* | --ho=*)
257    host="$ac_optarg" ;;
258
259  -includedir | --includedir | --includedi | --included | --include \
260  | --includ | --inclu | --incl | --inc)
261    ac_prev=includedir ;;
262  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
263  | --includ=* | --inclu=* | --incl=* | --inc=*)
264    includedir="$ac_optarg" ;;
265
266  -infodir | --infodir | --infodi | --infod | --info | --inf)
267    ac_prev=infodir ;;
268  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
269    infodir="$ac_optarg" ;;
270
271  -libdir | --libdir | --libdi | --libd)
272    ac_prev=libdir ;;
273  -libdir=* | --libdir=* | --libdi=* | --libd=*)
274    libdir="$ac_optarg" ;;
275
276  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
277  | --libexe | --libex | --libe)
278    ac_prev=libexecdir ;;
279  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
280  | --libexe=* | --libex=* | --libe=*)
281    libexecdir="$ac_optarg" ;;
282
283  -localstatedir | --localstatedir | --localstatedi | --localstated \
284  | --localstate | --localstat | --localsta | --localst \
285  | --locals | --local | --loca | --loc | --lo)
286    ac_prev=localstatedir ;;
287  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
288  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
289  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
290    localstatedir="$ac_optarg" ;;
291
292  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
293    ac_prev=mandir ;;
294  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
295    mandir="$ac_optarg" ;;
296
297  -nfp | --nfp | --nf)
298    # Obsolete; use --without-fp.
299    with_fp=no ;;
300
301  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
302  | --no-cr | --no-c)
303    no_create=yes ;;
304
305  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
306  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
307    no_recursion=yes ;;
308
309  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
310  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
311  | --oldin | --oldi | --old | --ol | --o)
312    ac_prev=oldincludedir ;;
313  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
314  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
315  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
316    oldincludedir="$ac_optarg" ;;
317
318  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
319    ac_prev=prefix ;;
320  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
321    prefix="$ac_optarg" ;;
322
323  -program-prefix | --program-prefix | --program-prefi | --program-pref \
324  | --program-pre | --program-pr | --program-p)
325    ac_prev=program_prefix ;;
326  -program-prefix=* | --program-prefix=* | --program-prefi=* \
327  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
328    program_prefix="$ac_optarg" ;;
329
330  -program-suffix | --program-suffix | --program-suffi | --program-suff \
331  | --program-suf | --program-su | --program-s)
332    ac_prev=program_suffix ;;
333  -program-suffix=* | --program-suffix=* | --program-suffi=* \
334  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
335    program_suffix="$ac_optarg" ;;
336
337  -program-transform-name | --program-transform-name \
338  | --program-transform-nam | --program-transform-na \
339  | --program-transform-n | --program-transform- \
340  | --program-transform | --program-transfor \
341  | --program-transfo | --program-transf \
342  | --program-trans | --program-tran \
343  | --progr-tra | --program-tr | --program-t)
344    ac_prev=program_transform_name ;;
345  -program-transform-name=* | --program-transform-name=* \
346  | --program-transform-nam=* | --program-transform-na=* \
347  | --program-transform-n=* | --program-transform-=* \
348  | --program-transform=* | --program-transfor=* \
349  | --program-transfo=* | --program-transf=* \
350  | --program-trans=* | --program-tran=* \
351  | --progr-tra=* | --program-tr=* | --program-t=*)
352    program_transform_name="$ac_optarg" ;;
353
354  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
355  | -silent | --silent | --silen | --sile | --sil)
356    silent=yes ;;
357
358  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
359    ac_prev=sbindir ;;
360  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
361  | --sbi=* | --sb=*)
362    sbindir="$ac_optarg" ;;
363
364  -sharedstatedir | --sharedstatedir | --sharedstatedi \
365  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
366  | --sharedst | --shareds | --shared | --share | --shar \
367  | --sha | --sh)
368    ac_prev=sharedstatedir ;;
369  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
370  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
371  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
372  | --sha=* | --sh=*)
373    sharedstatedir="$ac_optarg" ;;
374
375  -site | --site | --sit)
376    ac_prev=site ;;
377  -site=* | --site=* | --sit=*)
378    site="$ac_optarg" ;;
379
380  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
381    ac_prev=srcdir ;;
382  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
383    srcdir="$ac_optarg" ;;
384
385  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
386  | --syscon | --sysco | --sysc | --sys | --sy)
387    ac_prev=sysconfdir ;;
388  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
389  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
390    sysconfdir="$ac_optarg" ;;
391
392  -target | --target | --targe | --targ | --tar | --ta | --t)
393    ac_prev=target ;;
394  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
395    target="$ac_optarg" ;;
396
397  -v | -verbose | --verbose | --verbos | --verbo | --verb)
398    verbose=yes ;;
399
400  -version | --version | --versio | --versi | --vers)
401    echo "configure generated by autoconf version 2.13"
402    exit 0 ;;
403
404  -with-* | --with-*)
405    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
406    # Reject names that are not valid shell variable names.
407    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
408      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409    fi
410    ac_package=`echo $ac_package| sed 's/-/_/g'`
411    case "$ac_option" in
412      *=*) ;;
413      *) ac_optarg=yes ;;
414    esac
415    eval "with_${ac_package}='$ac_optarg'" ;;
416
417  -without-* | --without-*)
418    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
419    # Reject names that are not valid shell variable names.
420    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
421      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
422    fi
423    ac_package=`echo $ac_package| sed 's/-/_/g'`
424    eval "with_${ac_package}=no" ;;
425
426  --x)
427    # Obsolete; use --with-x.
428    with_x=yes ;;
429
430  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
431  | --x-incl | --x-inc | --x-in | --x-i)
432    ac_prev=x_includes ;;
433  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
434  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
435    x_includes="$ac_optarg" ;;
436
437  -x-libraries | --x-libraries | --x-librarie | --x-librari \
438  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
439    ac_prev=x_libraries ;;
440  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
441  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
442    x_libraries="$ac_optarg" ;;
443
444  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
445    ;;
446
447  *)
448    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
449      echo "configure: warning: $ac_option: invalid host type" 1>&2
450    fi
451    if test "x$nonopt" != xNONE; then
452      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
453    fi
454    nonopt="$ac_option"
455    ;;
456
457  esac
458done
459
460if test -n "$ac_prev"; then
461  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
462fi
463
464trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
465
466# File descriptor usage:
467# 0 standard input
468# 1 file creation
469# 2 errors and warnings
470# 3 some systems may open it to /dev/tty
471# 4 used on the Kubota Titan
472# 6 checking for... messages and results
473# 5 compiler messages saved in config.log
474if test "$silent" = yes; then
475  exec 6>/dev/null
476else
477  exec 6>&1
478fi
479exec 5>./config.log
480
481echo "\
482This file contains any messages produced by compilers while
483running configure, to aid debugging if configure makes a mistake.
484" 1>&5
485
486# Strip out --no-create and --no-recursion so they do not pile up.
487# Also quote any args containing shell metacharacters.
488ac_configure_args=
489for ac_arg
490do
491  case "$ac_arg" in
492  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
493  | --no-cr | --no-c) ;;
494  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
496  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
497  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
498  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
499  esac
500done
501
502# NLS nuisances.
503# Only set these to C if already set.  These must not be set unconditionally
504# because not all systems understand e.g. LANG=C (notably SCO).
505# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
506# Non-C LC_CTYPE values break the ctype check.
507if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
508if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
509if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
510if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
511
512# confdefs.h avoids OS command line length limits that DEFS can exceed.
513rm -rf conftest* confdefs.h
514# AIX cpp loses on an empty file, so make sure it contains at least a newline.
515echo > confdefs.h
516
517# A filename unique to this package, relative to the directory that
518# configure is in, which we can look for to find out if srcdir is correct.
519ac_unique_file=gdk/gdktypes.h
520
521# Find the source files, if location was not specified.
522if test -z "$srcdir"; then
523  ac_srcdir_defaulted=yes
524  # Try the directory containing this script, then its parent.
525  ac_prog=$0
526  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
527  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
528  srcdir=$ac_confdir
529  if test ! -r $srcdir/$ac_unique_file; then
530    srcdir=..
531  fi
532else
533  ac_srcdir_defaulted=no
534fi
535if test ! -r $srcdir/$ac_unique_file; then
536  if test "$ac_srcdir_defaulted" = yes; then
537    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
538  else
539    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
540  fi
541fi
542srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
543
544# Prefer explicitly selected file to automatically selected ones.
545if test -z "$CONFIG_SITE"; then
546  if test "x$prefix" != xNONE; then
547    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
548  else
549    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
550  fi
551fi
552for ac_site_file in $CONFIG_SITE; do
553  if test -r "$ac_site_file"; then
554    echo "loading site script $ac_site_file"
555    . "$ac_site_file"
556  fi
557done
558
559if test -r "$cache_file"; then
560  echo "loading cache $cache_file"
561  . $cache_file
562else
563  echo "creating cache $cache_file"
564  > $cache_file
565fi
566
567ac_ext=c
568# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
569ac_cpp='$CPP $CPPFLAGS'
570ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
571ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
572cross_compiling=$ac_cv_prog_cc_cross
573
574ac_exeext=
575ac_objext=o
576if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
577  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
578  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
579    ac_n= ac_c='
580' ac_t='        '
581  else
582    ac_n=-n ac_c= ac_t=
583  fi
584else
585  ac_n= ac_c='\c' ac_t=
586fi
587
588
589
590# In the following, there are a the following variants
591# of GLib cflags and libs variables
592#
593# GLIB_CFLAGS:  cflags for compiling libraries and example progs
594# GLIB_LIBS:    libraries for linking example programs
595# GLIB_DEPLIBS: libraries for linking libraries against
596# glib_cflags:  cflags to store in gtk-config
597# glib_libs:    libs to store in gtk-config
598# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
599# glib_thread_libs:   libs to store in gtk-config for gtk-config gthread
600
601# Save this value here, since automake will set cflags later
602cflags_set=${CFLAGS+set}
603
604
605
606
607
608
609
610
611
612# libtool versioning
613LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
614LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
615LT_REVISION=$GTK_INTERFACE_AGE
616LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
617
618
619
620
621
622# For automake.
623VERSION=$GTK_VERSION
624PACKAGE=gtk+
625
626# Save this value here, since automake will set cflags later
627cflags_set=${CFLAGS+set}
628
629ac_aux_dir=
630for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
631  if test -f $ac_dir/install-sh; then
632    ac_aux_dir=$ac_dir
633    ac_install_sh="$ac_aux_dir/install-sh -c"
634    break
635  elif test -f $ac_dir/install.sh; then
636    ac_aux_dir=$ac_dir
637    ac_install_sh="$ac_aux_dir/install.sh -c"
638    break
639  fi
640done
641if test -z "$ac_aux_dir"; then
642  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
643fi
644ac_config_guess=$ac_aux_dir/config.guess
645ac_config_sub=$ac_aux_dir/config.sub
646ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
647
648# Find a good install program.  We prefer a C program (faster),
649# so one script is as good as another.  But avoid the broken or
650# incompatible versions:
651# SysV /etc/install, /usr/sbin/install
652# SunOS /usr/etc/install
653# IRIX /sbin/install
654# AIX /bin/install
655# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
656# AFS /usr/afsws/bin/install, which mishandles nonexistent args
657# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
658# ./install, which can be erroneously created by make from ./install.sh.
659echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
660echo "configure:661: checking for a BSD compatible install" >&5
661if test -z "$INSTALL"; then
662if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
663  echo $ac_n "(cached) $ac_c" 1>&6
664else
665    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
666  for ac_dir in $PATH; do
667    # Account for people who put trailing slashes in PATH elements.
668    case "$ac_dir/" in
669    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
670    *)
671      # OSF1 and SCO ODT 3.0 have their own names for install.
672      # Don't use installbsd from OSF since it installs stuff as root
673      # by default.
674      for ac_prog in ginstall scoinst install; do
675        if test -f $ac_dir/$ac_prog; then
676          if test $ac_prog = install &&
677            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
678            # AIX install.  It has an incompatible calling convention.
679            :
680          else
681            ac_cv_path_install="$ac_dir/$ac_prog -c"
682            break 2
683          fi
684        fi
685      done
686      ;;
687    esac
688  done
689  IFS="$ac_save_IFS"
690
691fi
692  if test "${ac_cv_path_install+set}" = set; then
693    INSTALL="$ac_cv_path_install"
694  else
695    # As a last resort, use the slow shell script.  We don't cache a
696    # path for INSTALL within a source directory, because that will
697    # break other packages using the cache if that directory is
698    # removed, or if the path is relative.
699    INSTALL="$ac_install_sh"
700  fi
701fi
702echo "$ac_t""$INSTALL" 1>&6
703
704# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
705# It thinks the first close brace ends the variable substitution.
706test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
707
708test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
709
710test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
711
712echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
713echo "configure:714: checking whether build environment is sane" >&5
714# Just in case
715sleep 1
716echo timestamp > conftestfile
717# Do `set' in a subshell so we don't clobber the current shell's
718# arguments.  Must try -L first in case configure is actually a
719# symlink; some systems play weird games with the mod time of symlinks
720# (eg FreeBSD returns the mod time of the symlink's containing
721# directory).
722if (
723   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
724   if test "$*" = "X"; then
725      # -L didn't work.
726      set X `ls -t $srcdir/configure conftestfile`
727   fi
728   if test "$*" != "X $srcdir/configure conftestfile" \
729      && test "$*" != "X conftestfile $srcdir/configure"; then
730
731      # If neither matched, then we have a broken ls.  This can happen
732      # if, for instance, CONFIG_SHELL is bash and it inherits a
733      # broken ls alias from the environment.  This has actually
734      # happened.  Such a system could not be considered "sane".
735      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
736alias in your environment" 1>&2; exit 1; }
737   fi
738
739   test "$2" = conftestfile
740   )
741then
742   # Ok.
743   :
744else
745   { echo "configure: error: newly created file is older than distributed files!
746Check your system clock" 1>&2; exit 1; }
747fi
748rm -f conftest*
749echo "$ac_t""yes" 1>&6
750if test "$program_transform_name" = s,x,x,; then
751  program_transform_name=
752else
753  # Double any \ or $.  echo might interpret backslashes.
754  cat <<\EOF_SED > conftestsed
755s,\\,\\\\,g; s,\$,$$,g
756EOF_SED
757  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
758  rm -f conftestsed
759fi
760test "$program_prefix" != NONE &&
761  program_transform_name="s,^,${program_prefix},; $program_transform_name"
762# Use a double $ so make ignores it.
763test "$program_suffix" != NONE &&
764  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
765
766# sed with no file args requires a program.
767test "$program_transform_name" = "" && program_transform_name="s,x,x,"
768
769echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
770echo "configure:771: checking whether ${MAKE-make} sets \${MAKE}" >&5
771set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
772if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
773  echo $ac_n "(cached) $ac_c" 1>&6
774else
775  cat > conftestmake <<\EOF
776all:
777        @echo 'ac_maketemp="${MAKE}"'
778EOF
779# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
780eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
781if test -n "$ac_maketemp"; then
782  eval ac_cv_prog_make_${ac_make}_set=yes
783else
784  eval ac_cv_prog_make_${ac_make}_set=no
785fi
786rm -f conftestmake
787fi
788if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
789  echo "$ac_t""yes" 1>&6
790  SET_MAKE=
791else
792  echo "$ac_t""no" 1>&6
793  SET_MAKE="MAKE=${MAKE-make}"
794fi
795
796
797PACKAGE=$PACKAGE
798
799VERSION=$VERSION
800
801if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
802  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
803fi
804
805
806
807missing_dir=`cd $ac_aux_dir && pwd`
808echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
809echo "configure:810: checking for working aclocal" >&5
810# Run test in a subshell; some versions of sh will print an error if
811# an executable is not found, even if stderr is redirected.
812# Redirect stdin to placate older versions of autoconf.  Sigh.
813if (aclocal --version) < /dev/null > /dev/null 2>&1; then
814   ACLOCAL=aclocal
815   echo "$ac_t""found" 1>&6
816else
817   ACLOCAL="$missing_dir/missing aclocal"
818   echo "$ac_t""missing" 1>&6
819fi
820
821echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
822echo "configure:823: checking for working autoconf" >&5
823# Run test in a subshell; some versions of sh will print an error if
824# an executable is not found, even if stderr is redirected.
825# Redirect stdin to placate older versions of autoconf.  Sigh.
826if (autoconf --version) < /dev/null > /dev/null 2>&1; then
827   AUTOCONF=autoconf
828   echo "$ac_t""found" 1>&6
829else
830   AUTOCONF="$missing_dir/missing autoconf"
831   echo "$ac_t""missing" 1>&6
832fi
833
834echo $ac_n "checking for working automake""... $ac_c" 1>&6
835echo "configure:836: checking for working automake" >&5
836# Run test in a subshell; some versions of sh will print an error if
837# an executable is not found, even if stderr is redirected.
838# Redirect stdin to placate older versions of autoconf.  Sigh.
839if (automake --version) < /dev/null > /dev/null 2>&1; then
840   AUTOMAKE=automake
841   echo "$ac_t""found" 1>&6
842else
843   AUTOMAKE="$missing_dir/missing automake"
844   echo "$ac_t""missing" 1>&6
845fi
846
847echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
848echo "configure:849: checking for working autoheader" >&5
849# Run test in a subshell; some versions of sh will print an error if
850# an executable is not found, even if stderr is redirected.
851# Redirect stdin to placate older versions of autoconf.  Sigh.
852if (autoheader --version) < /dev/null > /dev/null 2>&1; then
853   AUTOHEADER=autoheader
854   echo "$ac_t""found" 1>&6
855else
856   AUTOHEADER="$missing_dir/missing autoheader"
857   echo "$ac_t""missing" 1>&6
858fi
859
860echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
861echo "configure:862: checking for working makeinfo" >&5
862# Run test in a subshell; some versions of sh will print an error if
863# an executable is not found, even if stderr is redirected.
864# Redirect stdin to placate older versions of autoconf.  Sigh.
865if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
866   MAKEINFO=makeinfo
867   echo "$ac_t""found" 1>&6
868else
869   MAKEINFO="$missing_dir/missing makeinfo"
870   echo "$ac_t""missing" 1>&6
871fi
872
873
874
875# Specify a configuration file
876
877
878
879
880# Check whether --enable-shared or --disable-shared was given.
881if test "${enable_shared+set}" = set; then
882  enableval="$enable_shared"
883  p=${PACKAGE-default}
884case "$enableval" in
885yes) enable_shared=yes ;;
886no) enable_shared=no ;;
887*)
888  enable_shared=no
889  # Look at the argument we got.  We use all the common list separators.
890  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
891  for pkg in $enableval; do
892    if test "X$pkg" = "X$p"; then
893      enable_shared=yes
894    fi
895  done
896  IFS="$ac_save_ifs"
897  ;;
898esac
899else
900  enable_shared=yes
901fi
902
903# Check whether --enable-static or --disable-static was given.
904if test "${enable_static+set}" = set; then
905  enableval="$enable_static"
906  p=${PACKAGE-default}
907case "$enableval" in
908yes) enable_static=yes ;;
909no) enable_static=no ;;
910*)
911  enable_static=no
912  # Look at the argument we got.  We use all the common list separators.
913  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
914  for pkg in $enableval; do
915    if test "X$pkg" = "X$p"; then
916      enable_static=yes
917    fi
918  done
919  IFS="$ac_save_ifs"
920  ;;
921esac
922else
923  enable_static=yes
924fi
925
926# Check whether --enable-fast-install or --disable-fast-install was given.
927if test "${enable_fast_install+set}" = set; then
928  enableval="$enable_fast_install"
929  p=${PACKAGE-default}
930case "$enableval" in
931yes) enable_fast_install=yes ;;
932no) enable_fast_install=no ;;
933*)
934  enable_fast_install=no
935  # Look at the argument we got.  We use all the common list separators.
936  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
937  for pkg in $enableval; do
938    if test "X$pkg" = "X$p"; then
939      enable_fast_install=yes
940    fi
941  done
942  IFS="$ac_save_ifs"
943  ;;
944esac
945else
946  enable_fast_install=yes
947fi
948
949
950# Make sure we can run config.sub.
951if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
952else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
953fi
954
955echo $ac_n "checking host system type""... $ac_c" 1>&6
956echo "configure:957: checking host system type" >&5
957
958host_alias=$host
959case "$host_alias" in
960NONE)
961  case $nonopt in
962  NONE)
963    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
964    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
965    fi ;;
966  *) host_alias=$nonopt ;;
967  esac ;;
968esac
969
970host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
971host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
972host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
973host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
974echo "$ac_t""$host" 1>&6
975
976echo $ac_n "checking build system type""... $ac_c" 1>&6
977echo "configure:978: checking build system type" >&5
978
979build_alias=$build
980case "$build_alias" in
981NONE)
982  case $nonopt in
983  NONE) build_alias=$host_alias ;;
984  *) build_alias=$nonopt ;;
985  esac ;;
986esac
987
988build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
989build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
990build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
991build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
992echo "$ac_t""$build" 1>&6
993
994# Extract the first word of "ranlib", so it can be a program name with args.
995set dummy ranlib; ac_word=$2
996echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
997echo "configure:998: checking for $ac_word" >&5
998if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
999  echo $ac_n "(cached) $ac_c" 1>&6
1000else
1001  if test -n "$RANLIB"; then
1002  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1003else
1004  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1005  ac_dummy="$PATH"
1006  for ac_dir in $ac_dummy; do
1007    test -z "$ac_dir" && ac_dir=.
1008    if test -f $ac_dir/$ac_word; then
1009      ac_cv_prog_RANLIB="ranlib"
1010      break
1011    fi
1012  done
1013  IFS="$ac_save_ifs"
1014  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1015fi
1016fi
1017RANLIB="$ac_cv_prog_RANLIB"
1018if test -n "$RANLIB"; then
1019  echo "$ac_t""$RANLIB" 1>&6
1020else
1021  echo "$ac_t""no" 1>&6
1022fi
1023
1024# Extract the first word of "gcc", so it can be a program name with args.
1025set dummy gcc; ac_word=$2
1026echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1027echo "configure:1028: checking for $ac_word" >&5
1028if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1029  echo $ac_n "(cached) $ac_c" 1>&6
1030else
1031  if test -n "$CC"; then
1032  ac_cv_prog_CC="$CC" # Let the user override the test.
1033else
1034  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1035  ac_dummy="$PATH"
1036  for ac_dir in $ac_dummy; do
1037    test -z "$ac_dir" && ac_dir=.
1038    if test -f $ac_dir/$ac_word; then
1039      ac_cv_prog_CC="gcc"
1040      break
1041    fi
1042  done
1043  IFS="$ac_save_ifs"
1044fi
1045fi
1046CC="$ac_cv_prog_CC"
1047if test -n "$CC"; then
1048  echo "$ac_t""$CC" 1>&6
1049else
1050  echo "$ac_t""no" 1>&6
1051fi
1052
1053if test -z "$CC"; then
1054  # Extract the first word of "cc", so it can be a program name with args.
1055set dummy cc; ac_word=$2
1056echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1057echo "configure:1058: checking for $ac_word" >&5
1058if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1059  echo $ac_n "(cached) $ac_c" 1>&6
1060else
1061  if test -n "$CC"; then
1062  ac_cv_prog_CC="$CC" # Let the user override the test.
1063else
1064  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1065  ac_prog_rejected=no
1066  ac_dummy="$PATH"
1067  for ac_dir in $ac_dummy; do
1068    test -z "$ac_dir" && ac_dir=.
1069    if test -f $ac_dir/$ac_word; then
1070      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1071        ac_prog_rejected=yes
1072        continue
1073      fi
1074      ac_cv_prog_CC="cc"
1075      break
1076    fi
1077  done
1078  IFS="$ac_save_ifs"
1079if test $ac_prog_rejected = yes; then
1080  # We found a bogon in the path, so make sure we never use it.
1081  set dummy $ac_cv_prog_CC
1082  shift
1083  if test $# -gt 0; then
1084    # We chose a different compiler from the bogus one.
1085    # However, it has the same basename, so the bogon will be chosen
1086    # first if we set CC to just the basename; use the full file name.
1087    shift
1088    set dummy "$ac_dir/$ac_word" "$@"
1089    shift
1090    ac_cv_prog_CC="$@"
1091  fi
1092fi
1093fi
1094fi
1095CC="$ac_cv_prog_CC"
1096if test -n "$CC"; then
1097  echo "$ac_t""$CC" 1>&6
1098else
1099  echo "$ac_t""no" 1>&6
1100fi
1101
1102  if test -z "$CC"; then
1103    case "`uname -s`" in
1104    *win32* | *WIN32*)
1105      # Extract the first word of "cl", so it can be a program name with args.
1106set dummy cl; ac_word=$2
1107echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1108echo "configure:1109: checking for $ac_word" >&5
1109if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1110  echo $ac_n "(cached) $ac_c" 1>&6
1111else
1112  if test -n "$CC"; then
1113  ac_cv_prog_CC="$CC" # Let the user override the test.
1114else
1115  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1116  ac_dummy="$PATH"
1117  for ac_dir in $ac_dummy; do
1118    test -z "$ac_dir" && ac_dir=.
1119    if test -f $ac_dir/$ac_word; then
1120      ac_cv_prog_CC="cl"
1121      break
1122    fi
1123  done
1124  IFS="$ac_save_ifs"
1125fi
1126fi
1127CC="$ac_cv_prog_CC"
1128if test -n "$CC"; then
1129  echo "$ac_t""$CC" 1>&6
1130else
1131  echo "$ac_t""no" 1>&6
1132fi
1133 ;;
1134    esac
1135  fi
1136  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1137fi
1138
1139echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1140echo "configure:1141: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1141
1142ac_ext=c
1143# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1144ac_cpp='$CPP $CPPFLAGS'
1145ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1146ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1147cross_compiling=$ac_cv_prog_cc_cross
1148
1149cat > conftest.$ac_ext << EOF
1150
1151#line 1152 "configure"
1152#include "confdefs.h"
1153
1154main(){return(0);}
1155EOF
1156if { (eval echo configure:1157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1157  ac_cv_prog_cc_works=yes
1158  # If we can't run a trivial program, we are probably using a cross compiler.
1159  if (./conftest; exit) 2>/dev/null; then
1160    ac_cv_prog_cc_cross=no
1161  else
1162    ac_cv_prog_cc_cross=yes
1163  fi
1164else
1165  echo "configure: failed program was:" >&5
1166  cat conftest.$ac_ext >&5
1167  ac_cv_prog_cc_works=no
1168fi
1169rm -fr conftest*
1170ac_ext=c
1171# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1172ac_cpp='$CPP $CPPFLAGS'
1173ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1174ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1175cross_compiling=$ac_cv_prog_cc_cross
1176
1177echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1178if test $ac_cv_prog_cc_works = no; then
1179  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1180fi
1181echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1182echo "configure:1183: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1183echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1184cross_compiling=$ac_cv_prog_cc_cross
1185
1186echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1187echo "configure:1188: checking whether we are using GNU C" >&5
1188if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1189  echo $ac_n "(cached) $ac_c" 1>&6
1190else
1191  cat > conftest.c <<EOF
1192#ifdef __GNUC__
1193  yes;
1194#endif
1195EOF
1196if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1197  ac_cv_prog_gcc=yes
1198else
1199  ac_cv_prog_gcc=no
1200fi
1201fi
1202
1203echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1204
1205if test $ac_cv_prog_gcc = yes; then
1206  GCC=yes
1207else
1208  GCC=
1209fi
1210
1211ac_test_CFLAGS="${CFLAGS+set}"
1212ac_save_CFLAGS="$CFLAGS"
1213CFLAGS=
1214echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1215echo "configure:1216: checking whether ${CC-cc} accepts -g" >&5
1216if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1217  echo $ac_n "(cached) $ac_c" 1>&6
1218else
1219  echo 'void f(){}' > conftest.c
1220if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1221  ac_cv_prog_cc_g=yes
1222else
1223  ac_cv_prog_cc_g=no
1224fi
1225rm -f conftest*
1226
1227fi
1228
1229echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1230if test "$ac_test_CFLAGS" = set; then
1231  CFLAGS="$ac_save_CFLAGS"
1232elif test $ac_cv_prog_cc_g = yes; then
1233  if test "$GCC" = yes; then
1234    CFLAGS="-g -O2"
1235  else
1236    CFLAGS="-g"
1237  fi
1238else
1239  if test "$GCC" = yes; then
1240    CFLAGS="-O2"
1241  else
1242    CFLAGS=
1243  fi
1244fi
1245
1246# Check whether --with-gnu-ld or --without-gnu-ld was given.
1247if test "${with_gnu_ld+set}" = set; then
1248  withval="$with_gnu_ld"
1249  test "$withval" = no || with_gnu_ld=yes
1250else
1251  with_gnu_ld=no
1252fi
1253
1254ac_prog=ld
1255if test "$ac_cv_prog_gcc" = yes; then
1256  # Check if gcc -print-prog-name=ld gives a path.
1257  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1258echo "configure:1259: checking for ld used by GCC" >&5
1259  ac_prog=`($CC -print-prog-name=ld) 2>&5`
1260  case "$ac_prog" in
1261    # Accept absolute paths.
1262    [\\/]* | [A-Za-z]:[\\/]*)
1263      re_direlt='/[^/][^/]*/\.\./'
1264      # Canonicalize the path of ld
1265      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1266      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1267        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1268      done
1269      test -z "$LD" && LD="$ac_prog"
1270      ;;
1271  "")
1272    # If it fails, then pretend we aren't using GCC.
1273    ac_prog=ld
1274    ;;
1275  *)
1276    # If it is relative, then search for the first ld in PATH.
1277    with_gnu_ld=unknown
1278    ;;
1279  esac
1280elif test "$with_gnu_ld" = yes; then
1281  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1282echo "configure:1283: checking for GNU ld" >&5
1283else
1284  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1285echo "configure:1286: checking for non-GNU ld" >&5
1286fi
1287if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1288  echo $ac_n "(cached) $ac_c" 1>&6
1289else
1290  if test -z "$LD"; then
1291  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1292  for ac_dir in $PATH; do
1293    test -z "$ac_dir" && ac_dir=.
1294    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1295      ac_cv_path_LD="$ac_dir/$ac_prog"
1296      # Check to see if the program is GNU ld.  I'd rather use --version,
1297      # but apparently some GNU ld's only accept -v.
1298      # Break only if it was the GNU/non-GNU ld that we prefer.
1299      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1300        test "$with_gnu_ld" != no && break
1301      else
1302        test "$with_gnu_ld" != yes && break
1303      fi
1304    fi
1305  done
1306  IFS="$ac_save_ifs"
1307else
1308  ac_cv_path_LD="$LD" # Let the user override the test with a path.
1309fi
1310fi
1311
1312LD="$ac_cv_path_LD"
1313if test -n "$LD"; then
1314  echo "$ac_t""$LD" 1>&6
1315else
1316  echo "$ac_t""no" 1>&6
1317fi
1318test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1319echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1320echo "configure:1321: checking if the linker ($LD) is GNU ld" >&5
1321if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1322  echo $ac_n "(cached) $ac_c" 1>&6
1323else
1324  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1325if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1326  ac_cv_prog_gnu_ld=yes
1327else
1328  ac_cv_prog_gnu_ld=no
1329fi
1330fi
1331
1332echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1333
1334
1335echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1336echo "configure:1337: checking for BSD-compatible nm" >&5
1337if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1338  echo $ac_n "(cached) $ac_c" 1>&6
1339else
1340  if test -n "$NM"; then
1341  # Let the user override the test.
1342  ac_cv_path_NM="$NM"
1343else
1344  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1345  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1346    test -z "$ac_dir" && ac_dir=.
1347    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1348      # Check to see if the nm accepts a BSD-compat flag.
1349      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1350      #   nm: unknown option "B" ignored
1351      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1352        ac_cv_path_NM="$ac_dir/nm -B"
1353        break
1354      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1355        ac_cv_path_NM="$ac_dir/nm -p"
1356        break
1357      else
1358        ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1359        continue # so that we can try to find one that supports BSD flags
1360      fi
1361    fi
1362  done
1363  IFS="$ac_save_ifs"
1364  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1365fi
1366fi
1367
1368NM="$ac_cv_path_NM"
1369echo "$ac_t""$NM" 1>&6
1370
1371echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1372echo "configure:1373: checking whether ln -s works" >&5
1373if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1374  echo $ac_n "(cached) $ac_c" 1>&6
1375else
1376  rm -f conftestdata
1377if ln -s X conftestdata 2>/dev/null
1378then
1379  rm -f conftestdata
1380  ac_cv_prog_LN_S="ln -s"
1381else
1382  ac_cv_prog_LN_S=ln
1383fi
1384fi
1385LN_S="$ac_cv_prog_LN_S"
1386if test "$ac_cv_prog_LN_S" = "ln -s"; then
1387  echo "$ac_t""yes" 1>&6
1388else
1389  echo "$ac_t""no" 1>&6
1390fi
1391
1392
1393case "$target" in
1394NONE) lt_target="$host" ;;
1395*) lt_target="$target" ;;
1396esac
1397
1398# Check for any special flags to pass to ltconfig.
1399libtool_flags="--cache-file=$cache_file"
1400test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1401test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1402test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1403test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1404test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1405
1406
1407# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1408if test "${enable_libtool_lock+set}" = set; then
1409  enableval="$enable_libtool_lock"
1410  :
1411fi
1412
1413test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1414test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1415
1416# Some flags need to be propagated to the compiler or linker for good
1417# libtool support.
1418case "$lt_target" in
1419*-*-irix6*)
1420  # Find out which ABI we are using.
1421  echo '#line 1422 "configure"' > conftest.$ac_ext
1422  if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1423    case "`/usr/bin/file conftest.o`" in
1424    *32-bit*)
1425      LD="${LD-ld} -32"
1426      ;;
1427    *N32*)
1428      LD="${LD-ld} -n32"
1429      ;;
1430    *64-bit*)
1431      LD="${LD-ld} -64"
1432      ;;
1433    esac
1434  fi
1435  rm -rf conftest*
1436  ;;
1437
1438*-*-sco3.2v5*)
1439  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1440  SAVE_CFLAGS="$CFLAGS"
1441  CFLAGS="$CFLAGS -belf"
1442  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1443echo "configure:1444: checking whether the C compiler needs -belf" >&5
1444if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1445  echo $ac_n "(cached) $ac_c" 1>&6
1446else
1447  cat > conftest.$ac_ext <<EOF
1448#line 1449 "configure"
1449#include "confdefs.h"
1450
1451int main() {
1452
1453; return 0; }
1454EOF
1455if { (eval echo configure:1456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1456  rm -rf conftest*
1457  lt_cv_cc_needs_belf=yes
1458else
1459  echo "configure: failed program was:" >&5
1460  cat conftest.$ac_ext >&5
1461  rm -rf conftest*
1462  lt_cv_cc_needs_belf=no
1463fi
1464rm -f conftest*
1465fi
1466
1467echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1468  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1469    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1470    CFLAGS="$SAVE_CFLAGS"
1471  fi
1472  ;;
1473
1474
1475esac
1476
1477
1478# Save cache, so that ltconfig can load it
1479cat > confcache <<\EOF
1480# This file is a shell script that caches the results of configure
1481# tests run on this system so they can be shared between configure
1482# scripts and configure runs.  It is not useful on other systems.
1483# If it contains results you don't want to keep, you may remove or edit it.
1484#
1485# By default, configure uses ./config.cache as the cache file,
1486# creating it if it does not exist already.  You can give configure
1487# the --cache-file=FILE option to use a different cache file; that is
1488# what configure does when it calls configure scripts in
1489# subdirectories, so they share the cache.
1490# Giving --cache-file=/dev/null disables caching, for debugging configure.
1491# config.status only pays attention to the cache file if you give it the
1492# --recheck option to rerun configure.
1493#
1494EOF
1495# The following way of writing the cache mishandles newlines in values,
1496# but we know of no workaround that is simple, portable, and efficient.
1497# So, don't put newlines in cache variables' values.
1498# Ultrix sh set writes to stderr and can't be redirected directly,
1499# and sets the high bit in the cache file unless we assign to the vars.
1500(set) 2>&1 |
1501  case `(ac_space=' '; set | grep ac_space) 2>&1` in
1502  *ac_space=\ *)
1503    # `set' does not quote correctly, so add quotes (double-quote substitution
1504    # turns \\\\ into \\, and sed turns \\ into \).
1505    sed -n \
1506      -e "s/'/'\\\\''/g" \
1507      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1508    ;;
1509  *)
1510    # `set' quotes correctly as required by POSIX, so do not add quotes.
1511    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1512    ;;
1513  esac >> confcache
1514if cmp -s $cache_file confcache; then
1515  :
1516else
1517  if test -w $cache_file; then
1518    echo "updating cache $cache_file"
1519    cat confcache > $cache_file
1520  else
1521    echo "not updating unwritable cache $cache_file"
1522  fi
1523fi
1524rm -f confcache
1525
1526
1527# Actually configure libtool.  ac_aux_dir is where install-sh is found.
1528CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1529LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1530LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1531DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1532${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1533$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1534|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1535
1536# Reload cache, that may have been modified by ltconfig
1537if test -r "$cache_file"; then
1538  echo "loading cache $cache_file"
1539  . $cache_file
1540else
1541  echo "creating cache $cache_file"
1542  > $cache_file
1543fi
1544
1545
1546# This can be used to rebuild libtool when needed
1547LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1548
1549# Always use our own libtool.
1550LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1551
1552# Redirect the config.log output again, so that the ltconfig log is not
1553# clobbered by the next message.
1554exec 5>>./config.log
1555
1556
1557echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1558echo "configure:1559: checking whether to enable maintainer-specific portions of Makefiles" >&5
1559    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1560if test "${enable_maintainer_mode+set}" = set; then
1561  enableval="$enable_maintainer_mode"
1562  USE_MAINTAINER_MODE=$enableval
1563else
1564  USE_MAINTAINER_MODE=no
1565fi
1566
1567  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1568 
1569
1570if test $USE_MAINTAINER_MODE = yes; then
1571  MAINTAINER_MODE_TRUE=
1572  MAINTAINER_MODE_FALSE='#'
1573else
1574  MAINTAINER_MODE_TRUE='#'
1575  MAINTAINER_MODE_FALSE=
1576fi
1577  MAINT=$MAINTAINER_MODE_TRUE
1578 
1579
1580
1581
1582# Make sure we can run config.sub.
1583if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1584else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1585fi
1586
1587echo $ac_n "checking host system type""... $ac_c" 1>&6
1588echo "configure:1589: checking host system type" >&5
1589
1590host_alias=$host
1591case "$host_alias" in
1592NONE)
1593  case $nonopt in
1594  NONE)
1595    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1596    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1597    fi ;;
1598  *) host_alias=$nonopt ;;
1599  esac ;;
1600esac
1601
1602host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1603host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1604host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1605host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1606echo "$ac_t""$host" 1>&6
1607
1608
1609
1610# Check whether --enable-debug or --disable-debug was given.
1611if test "${enable_debug+set}" = set; then
1612  enableval="$enable_debug"
1613  :
1614else
1615  enable_debug=$debug_default
1616fi
1617
1618# Check whether --enable-shm or --disable-shm was given.
1619if test "${enable_shm+set}" = set; then
1620  enableval="$enable_shm"
1621  echo $enable_shm
1622else
1623  enable_shm="yes"
1624fi
1625
1626# Check whether --enable-ansi or --disable-ansi was given.
1627if test "${enable_ansi+set}" = set; then
1628  enableval="$enable_ansi"
1629  :
1630else
1631  enable_ansi=no
1632fi
1633
1634# Check whether --with-glib or --without-glib was given.
1635if test "${with_glib+set}" = set; then
1636  withval="$with_glib"
1637  :
1638fi
1639
1640# Check whether --enable-xim or --disable-xim was given.
1641if test "${enable_xim+set}" = set; then
1642  enableval="$enable_xim"
1643  :
1644else
1645  enable_xim="yes"
1646fi
1647
1648# Check whether --enable-xim_inst or --disable-xim_inst was given.
1649if test "${enable_xim_inst+set}" = set; then
1650  enableval="$enable_xim_inst"
1651  :
1652else
1653  enable_xim_inst="maybe"
1654fi
1655
1656# Check whether --enable-rebuilds or --disable-rebuilds was given.
1657if test "${enable_rebuilds+set}" = set; then
1658  enableval="$enable_rebuilds"
1659  :
1660else
1661  enable_rebuilds=yes
1662fi
1663
1664# Check whether --with-locale or --without-locale was given.
1665if test "${with_locale+set}" = set; then
1666  withval="$with_locale"
1667  :
1668fi
1669
1670
1671# Check whether --with-xinput or --without-xinput was given.
1672if test "${with_xinput+set}" = set; then
1673  withval="$with_xinput"
1674  :
1675fi
1676
1677# Check whether --with-native_locale or --without-native_locale was given.
1678if test "${with_native_locale+set}" = set; then
1679  withval="$with_native_locale"
1680  :
1681else
1682  with_native_locale=no
1683fi
1684
1685
1686if test "x$enable_debug" = "xyes"; then
1687  test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
1688  GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
1689else
1690  if test "x$enable_debug" = "xno"; then
1691    GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
1692  else
1693    GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
1694  fi
1695fi
1696
1697cat >> confdefs.h <<EOF
1698#define GTK_COMPILED_WITH_DEBUGGING "${enable_debug}"
1699EOF
1700
1701
1702# Build time sanity check...
1703echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1704echo "configure:1705: checking whether build environment is sane" >&5
1705# Just in case
1706sleep 1
1707echo timestamp > conftestfile
1708# Do `set' in a subshell so we don't clobber the current shell's
1709# arguments.  Must try -L first in case configure is actually a
1710# symlink; some systems play weird games with the mod time of symlinks
1711# (eg FreeBSD returns the mod time of the symlink's containing
1712# directory).
1713if (
1714   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1715   if test "$*" = "X"; then
1716      # -L didn't work.
1717      set X `ls -t $srcdir/configure conftestfile`
1718   fi
1719   if test "$*" != "X $srcdir/configure conftestfile" \
1720      && test "$*" != "X conftestfile $srcdir/configure"; then
1721
1722      # If neither matched, then we have a broken ls.  This can happen
1723      # if, for instance, CONFIG_SHELL is bash and it inherits a
1724      # broken ls alias from the environment.  This has actually
1725      # happened.  Such a system could not be considered "sane".
1726      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1727alias in your environment" 1>&2; exit 1; }
1728   fi
1729
1730   test "$2" = conftestfile
1731   )
1732then
1733   # Ok.
1734   :
1735else
1736   { echo "configure: error: newly created file is older than distributed files!
1737Check your system clock" 1>&2; exit 1; }
1738fi
1739rm -f conftest*
1740echo "$ac_t""yes" 1>&6
1741
1742# Checks for programs.
1743# Extract the first word of "gcc", so it can be a program name with args.
1744set dummy gcc; ac_word=$2
1745echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1746echo "configure:1747: checking for $ac_word" >&5
1747if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1748  echo $ac_n "(cached) $ac_c" 1>&6
1749else
1750  if test -n "$CC"; then
1751  ac_cv_prog_CC="$CC" # Let the user override the test.
1752else
1753  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1754  ac_dummy="$PATH"
1755  for ac_dir in $ac_dummy; do
1756    test -z "$ac_dir" && ac_dir=.
1757    if test -f $ac_dir/$ac_word; then
1758      ac_cv_prog_CC="gcc"
1759      break
1760    fi
1761  done
1762  IFS="$ac_save_ifs"
1763fi
1764fi
1765CC="$ac_cv_prog_CC"
1766if test -n "$CC"; then
1767  echo "$ac_t""$CC" 1>&6
1768else
1769  echo "$ac_t""no" 1>&6
1770fi
1771
1772if test -z "$CC"; then
1773  # Extract the first word of "cc", so it can be a program name with args.
1774set dummy cc; ac_word=$2
1775echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1776echo "configure:1777: checking for $ac_word" >&5
1777if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1778  echo $ac_n "(cached) $ac_c" 1>&6
1779else
1780  if test -n "$CC"; then
1781  ac_cv_prog_CC="$CC" # Let the user override the test.
1782else
1783  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1784  ac_prog_rejected=no
1785  ac_dummy="$PATH"
1786  for ac_dir in $ac_dummy; do
1787    test -z "$ac_dir" && ac_dir=.
1788    if test -f $ac_dir/$ac_word; then
1789      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1790        ac_prog_rejected=yes
1791        continue
1792      fi
1793      ac_cv_prog_CC="cc"
1794      break
1795    fi
1796  done
1797  IFS="$ac_save_ifs"
1798if test $ac_prog_rejected = yes; then
1799  # We found a bogon in the path, so make sure we never use it.
1800  set dummy $ac_cv_prog_CC
1801  shift
1802  if test $# -gt 0; then
1803    # We chose a different compiler from the bogus one.
1804    # However, it has the same basename, so the bogon will be chosen
1805    # first if we set CC to just the basename; use the full file name.
1806    shift
1807    set dummy "$ac_dir/$ac_word" "$@"
1808    shift
1809    ac_cv_prog_CC="$@"
1810  fi
1811fi
1812fi
1813fi
1814CC="$ac_cv_prog_CC"
1815if test -n "$CC"; then
1816  echo "$ac_t""$CC" 1>&6
1817else
1818  echo "$ac_t""no" 1>&6
1819fi
1820
1821  if test -z "$CC"; then
1822    case "`uname -s`" in
1823    *win32* | *WIN32*)
1824      # Extract the first word of "cl", so it can be a program name with args.
1825set dummy cl; ac_word=$2
1826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1827echo "configure:1828: checking for $ac_word" >&5
1828if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1829  echo $ac_n "(cached) $ac_c" 1>&6
1830else
1831  if test -n "$CC"; then
1832  ac_cv_prog_CC="$CC" # Let the user override the test.
1833else
1834  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1835  ac_dummy="$PATH"
1836  for ac_dir in $ac_dummy; do
1837    test -z "$ac_dir" && ac_dir=.
1838    if test -f $ac_dir/$ac_word; then
1839      ac_cv_prog_CC="cl"
1840      break
1841    fi
1842  done
1843  IFS="$ac_save_ifs"
1844fi
1845fi
1846CC="$ac_cv_prog_CC"
1847if test -n "$CC"; then
1848  echo "$ac_t""$CC" 1>&6
1849else
1850  echo "$ac_t""no" 1>&6
1851fi
1852 ;;
1853    esac
1854  fi
1855  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1856fi
1857
1858echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1859echo "configure:1860: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1860
1861ac_ext=c
1862# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1863ac_cpp='$CPP $CPPFLAGS'
1864ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1865ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1866cross_compiling=$ac_cv_prog_cc_cross
1867
1868cat > conftest.$ac_ext << EOF
1869
1870#line 1871 "configure"
1871#include "confdefs.h"
1872
1873main(){return(0);}
1874EOF
1875if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1876  ac_cv_prog_cc_works=yes
1877  # If we can't run a trivial program, we are probably using a cross compiler.
1878  if (./conftest; exit) 2>/dev/null; then
1879    ac_cv_prog_cc_cross=no
1880  else
1881    ac_cv_prog_cc_cross=yes
1882  fi
1883else
1884  echo "configure: failed program was:" >&5
1885  cat conftest.$ac_ext >&5
1886  ac_cv_prog_cc_works=no
1887fi
1888rm -fr conftest*
1889ac_ext=c
1890# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1891ac_cpp='$CPP $CPPFLAGS'
1892ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1893ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1894cross_compiling=$ac_cv_prog_cc_cross
1895
1896echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1897if test $ac_cv_prog_cc_works = no; then
1898  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1899fi
1900echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1901echo "configure:1902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1902echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1903cross_compiling=$ac_cv_prog_cc_cross
1904
1905echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1906echo "configure:1907: checking whether we are using GNU C" >&5
1907if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1908  echo $ac_n "(cached) $ac_c" 1>&6
1909else
1910  cat > conftest.c <<EOF
1911#ifdef __GNUC__
1912  yes;
1913#endif
1914EOF
1915if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1916  ac_cv_prog_gcc=yes
1917else
1918  ac_cv_prog_gcc=no
1919fi
1920fi
1921
1922echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1923
1924if test $ac_cv_prog_gcc = yes; then
1925  GCC=yes
1926else
1927  GCC=
1928fi
1929
1930ac_test_CFLAGS="${CFLAGS+set}"
1931ac_save_CFLAGS="$CFLAGS"
1932CFLAGS=
1933echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1934echo "configure:1935: checking whether ${CC-cc} accepts -g" >&5
1935if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1936  echo $ac_n "(cached) $ac_c" 1>&6
1937else
1938  echo 'void f(){}' > conftest.c
1939if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1940  ac_cv_prog_cc_g=yes
1941else
1942  ac_cv_prog_cc_g=no
1943fi
1944rm -f conftest*
1945
1946fi
1947
1948echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1949if test "$ac_test_CFLAGS" = set; then
1950  CFLAGS="$ac_save_CFLAGS"
1951elif test $ac_cv_prog_cc_g = yes; then
1952  if test "$GCC" = yes; then
1953    CFLAGS="-g -O2"
1954  else
1955    CFLAGS="-g"
1956  fi
1957else
1958  if test "$GCC" = yes; then
1959    CFLAGS="-O2"
1960  else
1961    CFLAGS=
1962  fi
1963fi
1964
1965echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1966echo "configure:1967: checking for POSIXized ISC" >&5
1967if test -d /etc/conf/kconfig.d &&
1968  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1969then
1970  echo "$ac_t""yes" 1>&6
1971  ISC=yes # If later tests want to check for ISC.
1972  cat >> confdefs.h <<\EOF
1973#define _POSIX_SOURCE 1
1974EOF
1975
1976  if test "$GCC" = yes; then
1977    CC="$CC -posix"
1978  else
1979    CC="$CC -Xp"
1980  fi
1981else
1982  echo "$ac_t""no" 1>&6
1983  ISC=
1984fi
1985
1986
1987
1988
1989echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1990echo "configure:1991: checking for ${CC-cc} option to accept ANSI C" >&5
1991if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1992  echo $ac_n "(cached) $ac_c" 1>&6
1993else
1994  am_cv_prog_cc_stdc=no
1995ac_save_CC="$CC"
1996# Don't try gcc -ansi; that turns off useful extensions and
1997# breaks some systems' header files.
1998# AIX                   -qlanglvl=ansi
1999# Ultrix and OSF/1      -std1
2000# HP-UX                 -Aa -D_HPUX_SOURCE
2001# SVR4                  -Xc -D__EXTENSIONS__
2002for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2003do
2004  CC="$ac_save_CC $ac_arg"
2005  cat > conftest.$ac_ext <<EOF
2006#line 2007 "configure"
2007#include "confdefs.h"
2008#include <stdarg.h>
2009#include <stdio.h>
2010#include <sys/types.h>
2011#include <sys/stat.h>
2012/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2013struct buf { int x; };
2014FILE * (*rcsopen) (struct buf *, struct stat *, int);
2015static char *e (p, i)
2016     char **p;
2017     int i;
2018{
2019  return p[i];
2020}
2021static char *f (char * (*g) (char **, int), char **p, ...)
2022{
2023  char *s;
2024  va_list v;
2025  va_start (v,p);
2026  s = g (p, va_arg (v,int));
2027  va_end (v);
2028  return s;
2029}
2030int test (int i, double x);
2031struct s1 {int (*f) (int a);};
2032struct s2 {int (*f) (double a);};
2033int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2034int argc;
2035char **argv;
2036
2037int main() {
2038
2039return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2040
2041; return 0; }
2042EOF
2043if { (eval echo configure:2044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2044  rm -rf conftest*
2045  am_cv_prog_cc_stdc="$ac_arg"; break
2046else
2047  echo "configure: failed program was:" >&5
2048  cat conftest.$ac_ext >&5
2049fi
2050rm -f conftest*
2051done
2052CC="$ac_save_CC"
2053
2054fi
2055
2056if test -z "$am_cv_prog_cc_stdc"; then
2057  echo "$ac_t""none needed" 1>&6
2058else
2059  echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2060fi
2061case "x$am_cv_prog_cc_stdc" in
2062  x|xno) ;;
2063  *) CC="$CC $am_cv_prog_cc_stdc" ;;
2064esac
2065
2066# Find a good install program.  We prefer a C program (faster),
2067# so one script is as good as another.  But avoid the broken or
2068# incompatible versions:
2069# SysV /etc/install, /usr/sbin/install
2070# SunOS /usr/etc/install
2071# IRIX /sbin/install
2072# AIX /bin/install
2073# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2074# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2075# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2076# ./install, which can be erroneously created by make from ./install.sh.
2077echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2078echo "configure:2079: checking for a BSD compatible install" >&5
2079if test -z "$INSTALL"; then
2080if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2081  echo $ac_n "(cached) $ac_c" 1>&6
2082else
2083    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2084  for ac_dir in $PATH; do
2085    # Account for people who put trailing slashes in PATH elements.
2086    case "$ac_dir/" in
2087    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2088    *)
2089      # OSF1 and SCO ODT 3.0 have their own names for install.
2090      # Don't use installbsd from OSF since it installs stuff as root
2091      # by default.
2092      for ac_prog in ginstall scoinst install; do
2093        if test -f $ac_dir/$ac_prog; then
2094          if test $ac_prog = install &&
2095            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2096            # AIX install.  It has an incompatible calling convention.
2097            :
2098          else
2099            ac_cv_path_install="$ac_dir/$ac_prog -c"
2100            break 2
2101          fi
2102        fi
2103      done
2104      ;;
2105    esac
2106  done
2107  IFS="$ac_save_IFS"
2108
2109fi
2110  if test "${ac_cv_path_install+set}" = set; then
2111    INSTALL="$ac_cv_path_install"
2112  else
2113    # As a last resort, use the slow shell script.  We don't cache a
2114    # path for INSTALL within a source directory, because that will
2115    # break other packages using the cache if that directory is
2116    # removed, or if the path is relative.
2117    INSTALL="$ac_install_sh"
2118  fi
2119fi
2120echo "$ac_t""$INSTALL" 1>&6
2121
2122# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2123# It thinks the first close brace ends the variable substitution.
2124test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2125
2126test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2127
2128test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2129
2130echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2131echo "configure:2132: checking whether ${MAKE-make} sets \${MAKE}" >&5
2132set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2133if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2134  echo $ac_n "(cached) $ac_c" 1>&6
2135else
2136  cat > conftestmake <<\EOF
2137all:
2138        @echo 'ac_maketemp="${MAKE}"'
2139EOF
2140# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2141eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2142if test -n "$ac_maketemp"; then
2143  eval ac_cv_prog_make_${ac_make}_set=yes
2144else
2145  eval ac_cv_prog_make_${ac_make}_set=no
2146fi
2147rm -f conftestmake
2148fi
2149if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2150  echo "$ac_t""yes" 1>&6
2151  SET_MAKE=
2152else
2153  echo "$ac_t""no" 1>&6
2154  SET_MAKE="MAKE=${MAKE-make}"
2155fi
2156
2157
2158if test "x$GCC" = "xyes"; then
2159  case " $CFLAGS " in
2160  *[\ \ ]-Wall[\ \      ]*) ;;
2161  *) CFLAGS="$CFLAGS -Wall" ;;
2162  esac
2163
2164  if test "x$enable_ansi" = "xyes"; then
2165    case " $CFLAGS " in
2166    *[\ \       ]-ansi[\ \      ]*) ;;
2167    *) CFLAGS="$CFLAGS -ansi" ;;
2168    esac
2169
2170    case " $CFLAGS " in
2171    *[\ \       ]-pedantic[\ \  ]*) ;;
2172    *) CFLAGS="$CFLAGS -pedantic" ;;
2173    esac
2174  fi
2175fi
2176
2177# Honor aclocal flags
2178ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
2179
2180# define a MAINT-like variable REBUILD which is set if Perl
2181# and awk are found, so autogenerated sources can be rebuilt
2182
2183for ac_prog in gawk mawk nawk awk
2184do
2185# Extract the first word of "$ac_prog", so it can be a program name with args.
2186set dummy $ac_prog; ac_word=$2
2187echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2188echo "configure:2189: checking for $ac_word" >&5
2189if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2190  echo $ac_n "(cached) $ac_c" 1>&6
2191else
2192  if test -n "$AWK"; then
2193  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2194else
2195  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2196  ac_dummy="$PATH"
2197  for ac_dir in $ac_dummy; do
2198    test -z "$ac_dir" && ac_dir=.
2199    if test -f $ac_dir/$ac_word; then
2200      ac_cv_prog_AWK="$ac_prog"
2201      break
2202    fi
2203  done
2204  IFS="$ac_save_ifs"
2205fi
2206fi
2207AWK="$ac_cv_prog_AWK"
2208if test -n "$AWK"; then
2209  echo "$ac_t""$AWK" 1>&6
2210else
2211  echo "$ac_t""no" 1>&6
2212fi
2213
2214test -n "$AWK" && break
2215done
2216
2217for ac_prog in perl5 perl
2218do
2219# Extract the first word of "$ac_prog", so it can be a program name with args.
2220set dummy $ac_prog; ac_word=$2
2221echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2222echo "configure:2223: checking for $ac_word" >&5
2223if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
2224  echo $ac_n "(cached) $ac_c" 1>&6
2225else
2226  if test -n "$PERL"; then
2227  ac_cv_prog_PERL="$PERL" # Let the user override the test.
2228else
2229  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2230  ac_dummy="$PATH"
2231  for ac_dir in $ac_dummy; do
2232    test -z "$ac_dir" && ac_dir=.
2233    if test -f $ac_dir/$ac_word; then
2234      ac_cv_prog_PERL="$ac_prog"
2235      break
2236    fi
2237  done
2238  IFS="$ac_save_ifs"
2239fi
2240fi
2241PERL="$ac_cv_prog_PERL"
2242if test -n "$PERL"; then
2243  echo "$ac_t""$PERL" 1>&6
2244else
2245  echo "$ac_t""no" 1>&6
2246fi
2247
2248test -n "$PERL" && break
2249done
2250
2251
2252# We would like indent, but don't require it.
2253# Extract the first word of "indent", so it can be a program name with args.
2254set dummy indent; ac_word=$2
2255echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2256echo "configure:2257: checking for $ac_word" >&5
2257if eval "test \"`echo '$''{'ac_cv_prog_INDENT'+set}'`\" = set"; then
2258  echo $ac_n "(cached) $ac_c" 1>&6
2259else
2260  if test -n "$INDENT"; then
2261  ac_cv_prog_INDENT="$INDENT" # Let the user override the test.
2262else
2263  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2264  ac_dummy="$PATH"
2265  for ac_dir in $ac_dummy; do
2266    test -z "$ac_dir" && ac_dir=.
2267    if test -f $ac_dir/$ac_word; then
2268      ac_cv_prog_INDENT="indent"
2269      break
2270    fi
2271  done
2272  IFS="$ac_save_ifs"
2273fi
2274fi
2275INDENT="$ac_cv_prog_INDENT"
2276if test -n "$INDENT"; then
2277  echo "$ac_t""$INDENT" 1>&6
2278else
2279  echo "$ac_t""no" 1>&6
2280fi
2281
2282
2283REBUILD=\#
2284if test "x$enable_rebuilds" = "xyes" && \
2285     test -n "$PERL" && \
2286     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
2287     test -n "$AWK" ; then
2288  REBUILD=
2289fi
2290
2291
2292echo $ac_n "checking whether make is GNU Make""... $ac_c" 1>&6
2293echo "configure:2294: checking whether make is GNU Make" >&5
2294STRIP_BEGIN=
2295STRIP_END=
2296if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
2297        STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
2298        STRIP_END=')'
2299        echo "$ac_t""yes" 1>&6
2300else
2301        echo "$ac_t""no" 1>&6
2302fi
2303STRIP_DUMMY=
2304
2305
2306
2307
2308# i18n stuff
2309ALL_LINGUAS="az ca cs da de el es et eu fi fr ga gl hr hu it ja ko lt nl no nn pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_CN.GB2312 zh_TW.Big5"
2310echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2311echo "configure:2312: checking how to run the C preprocessor" >&5
2312# On Suns, sometimes $CPP names a directory.
2313if test -n "$CPP" && test -d "$CPP"; then
2314  CPP=
2315fi
2316if test -z "$CPP"; then
2317if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2318  echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320    # This must be in double quotes, not single quotes, because CPP may get
2321  # substituted into the Makefile and "${CC-cc}" will confuse make.
2322  CPP="${CC-cc} -E"
2323  # On the NeXT, cc -E runs the code through the compiler's parser,
2324  # not just through cpp.
2325  cat > conftest.$ac_ext <<EOF
2326#line 2327 "configure"
2327#include "confdefs.h"
2328#include <assert.h>
2329Syntax Error
2330EOF
2331ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2332{ (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2333ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2334if test -z "$ac_err"; then
2335  :
2336else
2337  echo "$ac_err" >&5
2338  echo "configure: failed program was:" >&5
2339  cat conftest.$ac_ext >&5
2340  rm -rf conftest*
2341  CPP="${CC-cc} -E -traditional-cpp"
2342  cat > conftest.$ac_ext <<EOF
2343#line 2344 "configure"
2344#include "confdefs.h"
2345#include <assert.h>
2346Syntax Error
2347EOF
2348ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2349{ (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2350ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2351if test -z "$ac_err"; then
2352  :
2353else
2354  echo "$ac_err" >&5
2355  echo "configure: failed program was:" >&5
2356  cat conftest.$ac_ext >&5
2357  rm -rf conftest*
2358  CPP="${CC-cc} -nologo -E"
2359  cat > conftest.$ac_ext <<EOF
2360#line 2361 "configure"
2361#include "confdefs.h"
2362#include <assert.h>
2363Syntax Error
2364EOF
2365ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2366{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2367ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2368if test -z "$ac_err"; then
2369  :
2370else
2371  echo "$ac_err" >&5
2372  echo "configure: failed program was:" >&5
2373  cat conftest.$ac_ext >&5
2374  rm -rf conftest*
2375  CPP=/lib/cpp
2376fi
2377rm -f conftest*
2378fi
2379rm -f conftest*
2380fi
2381rm -f conftest*
2382  ac_cv_prog_CPP="$CPP"
2383fi
2384  CPP="$ac_cv_prog_CPP"
2385else
2386  ac_cv_prog_CPP="$CPP"
2387fi
2388echo "$ac_t""$CPP" 1>&6
2389
2390echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2391echo "configure:2392: checking for ANSI C header files" >&5
2392if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2393  echo $ac_n "(cached) $ac_c" 1>&6
2394else
2395  cat > conftest.$ac_ext <<EOF
2396#line 2397 "configure"
2397#include "confdefs.h"
2398#include <stdlib.h>
2399#include <stdarg.h>
2400#include <string.h>
2401#include <float.h>
2402EOF
2403ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2404{ (eval echo configure:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2405ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2406if test -z "$ac_err"; then
2407  rm -rf conftest*
2408  ac_cv_header_stdc=yes
2409else
2410  echo "$ac_err" >&5
2411  echo "configure: failed program was:" >&5
2412  cat conftest.$ac_ext >&5
2413  rm -rf conftest*
2414  ac_cv_header_stdc=no
2415fi
2416rm -f conftest*
2417
2418if test $ac_cv_header_stdc = yes; then
2419  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2420cat > conftest.$ac_ext <<EOF
2421#line 2422 "configure"
2422#include "confdefs.h"
2423#include <string.h>
2424EOF
2425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2426  egrep "memchr" >/dev/null 2>&1; then
2427  :
2428else
2429  rm -rf conftest*
2430  ac_cv_header_stdc=no
2431fi
2432rm -f conftest*
2433
2434fi
2435
2436if test $ac_cv_header_stdc = yes; then
2437  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2438cat > conftest.$ac_ext <<EOF
2439#line 2440 "configure"
2440#include "confdefs.h"
2441#include <stdlib.h>
2442EOF
2443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2444  egrep "free" >/dev/null 2>&1; then
2445  :
2446else
2447  rm -rf conftest*
2448  ac_cv_header_stdc=no
2449fi
2450rm -f conftest*
2451
2452fi
2453
2454if test $ac_cv_header_stdc = yes; then
2455  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2456if test "$cross_compiling" = yes; then
2457  :
2458else
2459  cat > conftest.$ac_ext <<EOF
2460#line 2461 "configure"
2461#include "confdefs.h"
2462#include <ctype.h>
2463#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2464#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2465#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2466int main () { int i; for (i = 0; i < 256; i++)
2467if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2468exit (0); }
2469
2470EOF
2471if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2472then
2473  :
2474else
2475  echo "configure: failed program was:" >&5
2476  cat conftest.$ac_ext >&5
2477  rm -fr conftest*
2478  ac_cv_header_stdc=no
2479fi
2480rm -fr conftest*
2481fi
2482
2483fi
2484fi
2485
2486echo "$ac_t""$ac_cv_header_stdc" 1>&6
2487if test $ac_cv_header_stdc = yes; then
2488  cat >> confdefs.h <<\EOF
2489#define STDC_HEADERS 1
2490EOF
2491
2492fi
2493
2494echo $ac_n "checking for working const""... $ac_c" 1>&6
2495echo "configure:2496: checking for working const" >&5
2496if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2497  echo $ac_n "(cached) $ac_c" 1>&6
2498else
2499  cat > conftest.$ac_ext <<EOF
2500#line 2501 "configure"
2501#include "confdefs.h"
2502
2503int main() {
2504
2505/* Ultrix mips cc rejects this.  */
2506typedef int charset[2]; const charset x;
2507/* SunOS 4.1.1 cc rejects this.  */
2508char const *const *ccp;
2509char **p;
2510/* NEC SVR4.0.2 mips cc rejects this.  */
2511struct point {int x, y;};
2512static struct point const zero = {0,0};
2513/* AIX XL C 1.02.0.0 rejects this.
2514   It does not let you subtract one const X* pointer from another in an arm
2515   of an if-expression whose if-part is not a constant expression */
2516const char *g = "string";
2517ccp = &g + (g ? g-g : 0);
2518/* HPUX 7.0 cc rejects these. */
2519++ccp;
2520p = (char**) ccp;
2521ccp = (char const *const *) p;
2522{ /* SCO 3.2v4 cc rejects this.  */
2523  char *t;
2524  char const *s = 0 ? (char *) 0 : (char const *) 0;
2525
2526  *t++ = 0;
2527}
2528{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2529  int x[] = {25, 17};
2530  const int *foo = &x[0];
2531  ++foo;
2532}
2533{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2534  typedef const int *iptr;
2535  iptr p = 0;
2536  ++p;
2537}
2538{ /* AIX XL C 1.02.0.0 rejects this saying
2539     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2540  struct s { int j; const int *ap[3]; };
2541  struct s *b; b->j = 5;
2542}
2543{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2544  const int foo = 10;
2545}
2546
2547; return 0; }
2548EOF
2549if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2550  rm -rf conftest*
2551  ac_cv_c_const=yes
2552else
2553  echo "configure: failed program was:" >&5
2554  cat conftest.$ac_ext >&5
2555  rm -rf conftest*
2556  ac_cv_c_const=no
2557fi
2558rm -f conftest*
2559fi
2560
2561echo "$ac_t""$ac_cv_c_const" 1>&6
2562if test $ac_cv_c_const = no; then
2563  cat >> confdefs.h <<\EOF
2564#define const
2565EOF
2566
2567fi
2568
2569echo $ac_n "checking for inline""... $ac_c" 1>&6
2570echo "configure:2571: checking for inline" >&5
2571if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2572  echo $ac_n "(cached) $ac_c" 1>&6
2573else
2574  ac_cv_c_inline=no
2575for ac_kw in inline __inline__ __inline; do
2576  cat > conftest.$ac_ext <<EOF
2577#line 2578 "configure"
2578#include "confdefs.h"
2579
2580int main() {
2581} $ac_kw foo() {
2582; return 0; }
2583EOF
2584if { (eval echo configure:2585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2585  rm -rf conftest*
2586  ac_cv_c_inline=$ac_kw; break
2587else
2588  echo "configure: failed program was:" >&5
2589  cat conftest.$ac_ext >&5
2590fi
2591rm -f conftest*
2592done
2593
2594fi
2595
2596echo "$ac_t""$ac_cv_c_inline" 1>&6
2597case "$ac_cv_c_inline" in
2598  inline | yes) ;;
2599  no) cat >> confdefs.h <<\EOF
2600#define inline
2601EOF
2602 ;;
2603  *)  cat >> confdefs.h <<EOF
2604#define inline $ac_cv_c_inline
2605EOF
2606 ;;
2607esac
2608
2609echo $ac_n "checking for off_t""... $ac_c" 1>&6
2610echo "configure:2611: checking for off_t" >&5
2611if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2612  echo $ac_n "(cached) $ac_c" 1>&6
2613else
2614  cat > conftest.$ac_ext <<EOF
2615#line 2616 "configure"
2616#include "confdefs.h"
2617#include <sys/types.h>
2618#if STDC_HEADERS
2619#include <stdlib.h>
2620#include <stddef.h>
2621#endif
2622EOF
2623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2624  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2625  rm -rf conftest*
2626  ac_cv_type_off_t=yes
2627else
2628  rm -rf conftest*
2629  ac_cv_type_off_t=no
2630fi
2631rm -f conftest*
2632
2633fi
2634echo "$ac_t""$ac_cv_type_off_t" 1>&6
2635if test $ac_cv_type_off_t = no; then
2636  cat >> confdefs.h <<\EOF
2637#define off_t long
2638EOF
2639
2640fi
2641
2642echo $ac_n "checking for size_t""... $ac_c" 1>&6
2643echo "configure:2644: checking for size_t" >&5
2644if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2645  echo $ac_n "(cached) $ac_c" 1>&6
2646else
2647  cat > conftest.$ac_ext <<EOF
2648#line 2649 "configure"
2649#include "confdefs.h"
2650#include <sys/types.h>
2651#if STDC_HEADERS
2652#include <stdlib.h>
2653#include <stddef.h>
2654#endif
2655EOF
2656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2657  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2658  rm -rf conftest*
2659  ac_cv_type_size_t=yes
2660else
2661  rm -rf conftest*
2662  ac_cv_type_size_t=no
2663fi
2664rm -f conftest*
2665
2666fi
2667echo "$ac_t""$ac_cv_type_size_t" 1>&6
2668if test $ac_cv_type_size_t = no; then
2669  cat >> confdefs.h <<\EOF
2670#define size_t unsigned
2671EOF
2672
2673fi
2674
2675# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2676# for constant arguments.  Useless!
2677echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2678echo "configure:2679: checking for working alloca.h" >&5
2679if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2680  echo $ac_n "(cached) $ac_c" 1>&6
2681else
2682  cat > conftest.$ac_ext <<EOF
2683#line 2684 "configure"
2684#include "confdefs.h"
2685#include <alloca.h>
2686int main() {
2687char *p = alloca(2 * sizeof(int));
2688; return 0; }
2689EOF
2690if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2691  rm -rf conftest*
2692  ac_cv_header_alloca_h=yes
2693else
2694  echo "configure: failed program was:" >&5
2695  cat conftest.$ac_ext >&5
2696  rm -rf conftest*
2697  ac_cv_header_alloca_h=no
2698fi
2699rm -f conftest*
2700fi
2701
2702echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2703if test $ac_cv_header_alloca_h = yes; then
2704  cat >> confdefs.h <<\EOF
2705#define HAVE_ALLOCA_H 1
2706EOF
2707
2708fi
2709
2710echo $ac_n "checking for alloca""... $ac_c" 1>&6
2711echo "configure:2712: checking for alloca" >&5
2712if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2713  echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715  cat > conftest.$ac_ext <<EOF
2716#line 2717 "configure"
2717#include "confdefs.h"
2718
2719#ifdef __GNUC__
2720# define alloca __builtin_alloca
2721#else
2722# ifdef _MSC_VER
2723#  include <malloc.h>
2724#  define alloca _alloca
2725# else
2726#  if HAVE_ALLOCA_H
2727#   include <alloca.h>
2728#  else
2729#   ifdef _AIX
2730 #pragma alloca
2731#   else
2732#    ifndef alloca /* predefined by HP cc +Olibcalls */
2733char *alloca ();
2734#    endif
2735#   endif
2736#  endif
2737# endif
2738#endif
2739
2740int main() {
2741char *p = (char *) alloca(1);
2742; return 0; }
2743EOF
2744if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2745  rm -rf conftest*
2746  ac_cv_func_alloca_works=yes
2747else
2748  echo "configure: failed program was:" >&5
2749  cat conftest.$ac_ext >&5
2750  rm -rf conftest*
2751  ac_cv_func_alloca_works=no
2752fi
2753rm -f conftest*
2754fi
2755
2756echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2757if test $ac_cv_func_alloca_works = yes; then
2758  cat >> confdefs.h <<\EOF
2759#define HAVE_ALLOCA 1
2760EOF
2761
2762fi
2763
2764if test $ac_cv_func_alloca_works = no; then
2765  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2766  # that cause trouble.  Some versions do not even contain alloca or
2767  # contain a buggy version.  If you still want to use their alloca,
2768  # use ar to extract alloca.o from them instead of compiling alloca.c.
2769  ALLOCA=alloca.${ac_objext}
2770  cat >> confdefs.h <<\EOF
2771#define C_ALLOCA 1
2772EOF
2773
2774
2775echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2776echo "configure:2777: checking whether alloca needs Cray hooks" >&5
2777if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2778  echo $ac_n "(cached) $ac_c" 1>&6
2779else
2780  cat > conftest.$ac_ext <<EOF
2781#line 2782 "configure"
2782#include "confdefs.h"
2783#if defined(CRAY) && ! defined(CRAY2)
2784webecray
2785#else
2786wenotbecray
2787#endif
2788
2789EOF
2790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2791  egrep "webecray" >/dev/null 2>&1; then
2792  rm -rf conftest*
2793  ac_cv_os_cray=yes
2794else
2795  rm -rf conftest*
2796  ac_cv_os_cray=no
2797fi
2798rm -f conftest*
2799
2800fi
2801
2802echo "$ac_t""$ac_cv_os_cray" 1>&6
2803if test $ac_cv_os_cray = yes; then
2804for ac_func in _getb67 GETB67 getb67; do
2805  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2806echo "configure:2807: checking for $ac_func" >&5
2807if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2808  echo $ac_n "(cached) $ac_c" 1>&6
2809else
2810  cat > conftest.$ac_ext <<EOF
2811#line 2812 "configure"
2812#include "confdefs.h"
2813/* System header to define __stub macros and hopefully few prototypes,
2814    which can conflict with char $ac_func(); below.  */
2815#include <assert.h>
2816/* Override any gcc2 internal prototype to avoid an error.  */
2817/* We use char because int might match the return type of a gcc2
2818    builtin and then its argument prototype would still apply.  */
2819char $ac_func();
2820
2821int main() {
2822
2823/* The GNU C library defines this for functions which it implements
2824    to always fail with ENOSYS.  Some functions are actually named
2825    something starting with __ and the normal name is an alias.  */
2826#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2827choke me
2828#else
2829$ac_func();
2830#endif
2831
2832; return 0; }
2833EOF
2834if { (eval echo configure:2835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2835  rm -rf conftest*
2836  eval "ac_cv_func_$ac_func=yes"
2837else
2838  echo "configure: failed program was:" >&5
2839  cat conftest.$ac_ext >&5
2840  rm -rf conftest*
2841  eval "ac_cv_func_$ac_func=no"
2842fi
2843rm -f conftest*
2844fi
2845
2846if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2847  echo "$ac_t""yes" 1>&6
2848  cat >> confdefs.h <<EOF
2849#define CRAY_STACKSEG_END $ac_func
2850EOF
2851
2852  break
2853else
2854  echo "$ac_t""no" 1>&6
2855fi
2856
2857done
2858fi
2859
2860echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2861echo "configure:2862: checking stack direction for C alloca" >&5
2862if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2863  echo $ac_n "(cached) $ac_c" 1>&6
2864else
2865  if test "$cross_compiling" = yes; then
2866  ac_cv_c_stack_direction=0
2867else
2868  cat > conftest.$ac_ext <<EOF
2869#line 2870 "configure"
2870#include "confdefs.h"
2871find_stack_direction ()
2872{
2873  static char *addr = 0;
2874  auto char dummy;
2875  if (addr == 0)
2876    {
2877      addr = &dummy;
2878      return find_stack_direction ();
2879    }
2880  else
2881    return (&dummy > addr) ? 1 : -1;
2882}
2883main ()
2884{
2885  exit (find_stack_direction() < 0);
2886}
2887EOF
2888if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2889then
2890  ac_cv_c_stack_direction=1
2891else
2892  echo "configure: failed program was:" >&5
2893  cat conftest.$ac_ext >&5
2894  rm -fr conftest*
2895  ac_cv_c_stack_direction=-1
2896fi
2897rm -fr conftest*
2898fi
2899
2900fi
2901
2902echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2903cat >> confdefs.h <<EOF
2904#define STACK_DIRECTION $ac_cv_c_stack_direction
2905EOF
2906
2907fi
2908
2909for ac_hdr in unistd.h
2910do
2911ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2912echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2913echo "configure:2914: checking for $ac_hdr" >&5
2914if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2915  echo $ac_n "(cached) $ac_c" 1>&6
2916else
2917  cat > conftest.$ac_ext <<EOF
2918#line 2919 "configure"
2919#include "confdefs.h"
2920#include <$ac_hdr>
2921EOF
2922ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2923{ (eval echo configure:2924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2924ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2925if test -z "$ac_err"; then
2926  rm -rf conftest*
2927  eval "ac_cv_header_$ac_safe=yes"
2928else
2929  echo "$ac_err" >&5
2930  echo "configure: failed program was:" >&5
2931  cat conftest.$ac_ext >&5
2932  rm -rf conftest*
2933  eval "ac_cv_header_$ac_safe=no"
2934fi
2935rm -f conftest*
2936fi
2937if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2938  echo "$ac_t""yes" 1>&6
2939    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2940  cat >> confdefs.h <<EOF
2941#define $ac_tr_hdr 1
2942EOF
2943 
2944else
2945  echo "$ac_t""no" 1>&6
2946fi
2947done
2948
2949for ac_func in getpagesize
2950do
2951echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2952echo "configure:2953: checking for $ac_func" >&5
2953if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2954  echo $ac_n "(cached) $ac_c" 1>&6
2955else
2956  cat > conftest.$ac_ext <<EOF
2957#line 2958 "configure"
2958#include "confdefs.h"
2959/* System header to define __stub macros and hopefully few prototypes,
2960    which can conflict with char $ac_func(); below.  */
2961#include <assert.h>
2962/* Override any gcc2 internal prototype to avoid an error.  */
2963/* We use char because int might match the return type of a gcc2
2964    builtin and then its argument prototype would still apply.  */
2965char $ac_func();
2966
2967int main() {
2968
2969/* The GNU C library defines this for functions which it implements
2970    to always fail with ENOSYS.  Some functions are actually named
2971    something starting with __ and the normal name is an alias.  */
2972#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2973choke me
2974#else
2975$ac_func();
2976#endif
2977
2978; return 0; }
2979EOF
2980if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2981  rm -rf conftest*
2982  eval "ac_cv_func_$ac_func=yes"
2983else
2984  echo "configure: failed program was:" >&5
2985  cat conftest.$ac_ext >&5
2986  rm -rf conftest*
2987  eval "ac_cv_func_$ac_func=no"
2988fi
2989rm -f conftest*
2990fi
2991
2992if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2993  echo "$ac_t""yes" 1>&6
2994    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2995  cat >> confdefs.h <<EOF
2996#define $ac_tr_func 1
2997EOF
2998 
2999else
3000  echo "$ac_t""no" 1>&6
3001fi
3002done
3003
3004echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3005echo "configure:3006: checking for working mmap" >&5
3006if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3007  echo $ac_n "(cached) $ac_c" 1>&6
3008else
3009  if test "$cross_compiling" = yes; then
3010  ac_cv_func_mmap_fixed_mapped=no
3011else
3012  cat > conftest.$ac_ext <<EOF
3013#line 3014 "configure"
3014#include "confdefs.h"
3015
3016/* Thanks to Mike Haertel and Jim Avera for this test.
3017   Here is a matrix of mmap possibilities:
3018        mmap private not fixed
3019        mmap private fixed at somewhere currently unmapped
3020        mmap private fixed at somewhere already mapped
3021        mmap shared not fixed
3022        mmap shared fixed at somewhere currently unmapped
3023        mmap shared fixed at somewhere already mapped
3024   For private mappings, we should verify that changes cannot be read()
3025   back from the file, nor mmap's back from the file at a different
3026   address.  (There have been systems where private was not correctly
3027   implemented like the infamous i386 svr4.0, and systems where the
3028   VM page cache was not coherent with the filesystem buffer cache
3029   like early versions of FreeBSD and possibly contemporary NetBSD.)
3030   For shared mappings, we should conversely verify that changes get
3031   propogated back to all the places they're supposed to be.
3032
3033   Grep wants private fixed already mapped.
3034   The main things grep needs to know about mmap are:
3035   * does it exist and is it safe to write into the mmap'd area
3036   * how to use it (BSD variants)  */
3037#include <sys/types.h>
3038#include <fcntl.h>
3039#include <sys/mman.h>
3040
3041/* This mess was copied from the GNU getpagesize.h.  */
3042#ifndef HAVE_GETPAGESIZE
3043# ifdef HAVE_UNISTD_H
3044#  include <unistd.h>
3045# endif
3046
3047/* Assume that all systems that can run configure have sys/param.h.  */
3048# ifndef HAVE_SYS_PARAM_H
3049#  define HAVE_SYS_PARAM_H 1
3050# endif
3051
3052# ifdef _SC_PAGESIZE
3053#  define getpagesize() sysconf(_SC_PAGESIZE)
3054# else /* no _SC_PAGESIZE */
3055#  ifdef HAVE_SYS_PARAM_H
3056#   include <sys/param.h>
3057#   ifdef EXEC_PAGESIZE
3058#    define getpagesize() EXEC_PAGESIZE
3059#   else /* no EXEC_PAGESIZE */
3060#    ifdef NBPG
3061#     define getpagesize() NBPG * CLSIZE
3062#     ifndef CLSIZE
3063#      define CLSIZE 1
3064#     endif /* no CLSIZE */
3065#    else /* no NBPG */
3066#     ifdef NBPC
3067#      define getpagesize() NBPC
3068#     else /* no NBPC */
3069#      ifdef PAGESIZE
3070#       define getpagesize() PAGESIZE
3071#      endif /* PAGESIZE */
3072#     endif /* no NBPC */
3073#    endif /* no NBPG */
3074#   endif /* no EXEC_PAGESIZE */
3075#  else /* no HAVE_SYS_PARAM_H */
3076#   define getpagesize() 8192   /* punt totally */
3077#  endif /* no HAVE_SYS_PARAM_H */
3078# endif /* no _SC_PAGESIZE */
3079
3080#endif /* no HAVE_GETPAGESIZE */
3081
3082#ifdef __cplusplus
3083extern "C" { void *malloc(unsigned); }
3084#else
3085char *malloc();
3086#endif
3087
3088int
3089main()
3090{
3091        char *data, *data2, *data3;
3092        int i, pagesize;
3093        int fd;
3094
3095        pagesize = getpagesize();
3096
3097        /*
3098         * First, make a file with some known garbage in it.
3099         */
3100        data = malloc(pagesize);
3101        if (!data)
3102                exit(1);
3103        for (i = 0; i < pagesize; ++i)
3104                *(data + i) = rand();
3105        umask(0);
3106        fd = creat("conftestmmap", 0600);
3107        if (fd < 0)
3108                exit(1);
3109        if (write(fd, data, pagesize) != pagesize)
3110                exit(1);
3111        close(fd);
3112
3113        /*
3114         * Next, try to mmap the file at a fixed address which
3115         * already has something else allocated at it.  If we can,
3116         * also make sure that we see the same garbage.
3117         */
3118        fd = open("conftestmmap", O_RDWR);
3119        if (fd < 0)
3120                exit(1);
3121        data2 = malloc(2 * pagesize);
3122        if (!data2)
3123                exit(1);
3124        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3125        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3126            MAP_PRIVATE | MAP_FIXED, fd, 0L))
3127                exit(1);
3128        for (i = 0; i < pagesize; ++i)
3129                if (*(data + i) != *(data2 + i))
3130                        exit(1);
3131
3132        /*
3133         * Finally, make sure that changes to the mapped area
3134         * do not percolate back to the file as seen by read().
3135         * (This is a bug on some variants of i386 svr4.0.)
3136         */
3137        for (i = 0; i < pagesize; ++i)
3138                *(data2 + i) = *(data2 + i) + 1;
3139        data3 = malloc(pagesize);
3140        if (!data3)
3141                exit(1);
3142        if (read(fd, data3, pagesize) != pagesize)
3143                exit(1);
3144        for (i = 0; i < pagesize; ++i)
3145                if (*(data + i) != *(data3 + i))
3146                        exit(1);
3147        close(fd);
3148        unlink("conftestmmap");
3149        exit(0);
3150}
3151
3152EOF
3153if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3154then
3155  ac_cv_func_mmap_fixed_mapped=yes
3156else
3157  echo "configure: failed program was:" >&5
3158  cat conftest.$ac_ext >&5
3159  rm -fr conftest*
3160  ac_cv_func_mmap_fixed_mapped=no
3161fi
3162rm -fr conftest*
3163fi
3164
3165fi
3166
3167echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3168if test $ac_cv_func_mmap_fixed_mapped = yes; then
3169  cat >> confdefs.h <<\EOF
3170#define HAVE_MMAP 1
3171EOF
3172
3173fi
3174
3175                             
3176   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3177unistd.h sys/param.h
3178do
3179ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3180echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3181echo "configure:3182: checking for $ac_hdr" >&5
3182if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3183  echo $ac_n "(cached) $ac_c" 1>&6
3184else
3185  cat > conftest.$ac_ext <<EOF
3186#line 3187 "configure"
3187#include "confdefs.h"
3188#include <$ac_hdr>
3189EOF
3190ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3191{ (eval echo configure:3192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3192ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3193if test -z "$ac_err"; then
3194  rm -rf conftest*
3195  eval "ac_cv_header_$ac_safe=yes"
3196else
3197  echo "$ac_err" >&5
3198  echo "configure: failed program was:" >&5
3199  cat conftest.$ac_ext >&5
3200  rm -rf conftest*
3201  eval "ac_cv_header_$ac_safe=no"
3202fi
3203rm -f conftest*
3204fi
3205if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3206  echo "$ac_t""yes" 1>&6
3207    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3208  cat >> confdefs.h <<EOF
3209#define $ac_tr_hdr 1
3210EOF
3211 
3212else
3213  echo "$ac_t""no" 1>&6
3214fi
3215done
3216
3217   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3218strdup __argz_count __argz_stringify __argz_next
3219do
3220echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3221echo "configure:3222: checking for $ac_func" >&5
3222if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3223  echo $ac_n "(cached) $ac_c" 1>&6
3224else
3225  cat > conftest.$ac_ext <<EOF
3226#line 3227 "configure"
3227#include "confdefs.h"
3228/* System header to define __stub macros and hopefully few prototypes,
3229    which can conflict with char $ac_func(); below.  */
3230#include <assert.h>
3231/* Override any gcc2 internal prototype to avoid an error.  */
3232/* We use char because int might match the return type of a gcc2
3233    builtin and then its argument prototype would still apply.  */
3234char $ac_func();
3235
3236int main() {
3237
3238/* The GNU C library defines this for functions which it implements
3239    to always fail with ENOSYS.  Some functions are actually named
3240    something starting with __ and the normal name is an alias.  */
3241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3242choke me
3243#else
3244$ac_func();
3245#endif
3246
3247; return 0; }
3248EOF
3249if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3250  rm -rf conftest*
3251  eval "ac_cv_func_$ac_func=yes"
3252else
3253  echo "configure: failed program was:" >&5
3254  cat conftest.$ac_ext >&5
3255  rm -rf conftest*
3256  eval "ac_cv_func_$ac_func=no"
3257fi
3258rm -f conftest*
3259fi
3260
3261if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3262  echo "$ac_t""yes" 1>&6
3263    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3264  cat >> confdefs.h <<EOF
3265#define $ac_tr_func 1
3266EOF
3267 
3268else
3269  echo "$ac_t""no" 1>&6
3270fi
3271done
3272
3273
3274   if test "${ac_cv_func_stpcpy+set}" != "set"; then
3275     for ac_func in stpcpy
3276do
3277echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3278echo "configure:3279: checking for $ac_func" >&5
3279if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3280  echo $ac_n "(cached) $ac_c" 1>&6
3281else
3282  cat > conftest.$ac_ext <<EOF
3283#line 3284 "configure"
3284#include "confdefs.h"
3285/* System header to define __stub macros and hopefully few prototypes,
3286    which can conflict with char $ac_func(); below.  */
3287#include <assert.h>
3288/* Override any gcc2 internal prototype to avoid an error.  */
3289/* We use char because int might match the return type of a gcc2
3290    builtin and then its argument prototype would still apply.  */
3291char $ac_func();
3292
3293int main() {
3294
3295/* The GNU C library defines this for functions which it implements
3296    to always fail with ENOSYS.  Some functions are actually named
3297    something starting with __ and the normal name is an alias.  */
3298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3299choke me
3300#else
3301$ac_func();
3302#endif
3303
3304; return 0; }
3305EOF
3306if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3307  rm -rf conftest*
3308  eval "ac_cv_func_$ac_func=yes"
3309else
3310  echo "configure: failed program was:" >&5
3311  cat conftest.$ac_ext >&5
3312  rm -rf conftest*
3313  eval "ac_cv_func_$ac_func=no"
3314fi
3315rm -f conftest*
3316fi
3317
3318if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3319  echo "$ac_t""yes" 1>&6
3320    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3321  cat >> confdefs.h <<EOF
3322#define $ac_tr_func 1
3323EOF
3324 
3325else
3326  echo "$ac_t""no" 1>&6
3327fi
3328done
3329
3330   fi
3331   if test "${ac_cv_func_stpcpy}" = "yes"; then
3332     cat >> confdefs.h <<\EOF
3333#define HAVE_STPCPY 1
3334EOF
3335
3336   fi
3337
3338   if test $ac_cv_header_locale_h = yes; then
3339    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3340echo "configure:3341: checking for LC_MESSAGES" >&5
3341if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3342  echo $ac_n "(cached) $ac_c" 1>&6
3343else
3344  cat > conftest.$ac_ext <<EOF
3345#line 3346 "configure"
3346#include "confdefs.h"
3347#include <locale.h>
3348int main() {
3349return LC_MESSAGES
3350; return 0; }
3351EOF
3352if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3353  rm -rf conftest*
3354  am_cv_val_LC_MESSAGES=yes
3355else
3356  echo "configure: failed program was:" >&5
3357  cat conftest.$ac_ext >&5
3358  rm -rf conftest*
3359  am_cv_val_LC_MESSAGES=no
3360fi
3361rm -f conftest*
3362fi
3363
3364echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3365    if test $am_cv_val_LC_MESSAGES = yes; then
3366      cat >> confdefs.h <<\EOF
3367#define HAVE_LC_MESSAGES 1
3368EOF
3369
3370    fi
3371  fi
3372   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3373echo "configure:3374: checking whether NLS is requested" >&5
3374        # Check whether --enable-nls or --disable-nls was given.
3375if test "${enable_nls+set}" = set; then
3376  enableval="$enable_nls"
3377  USE_NLS=$enableval
3378else
3379  USE_NLS=yes
3380fi
3381
3382    echo "$ac_t""$USE_NLS" 1>&6
3383   
3384
3385    USE_INCLUDED_LIBINTL=no
3386
3387        if test "$USE_NLS" = "yes"; then
3388#      AC_DEFINE(ENABLE_NLS)
3389#      AC_MSG_CHECKING([whether included gettext is requested])
3390#      AC_ARG_WITH(included-gettext,
3391#        [  --with-included-gettext use the GNU gettext library included here],
3392#        nls_cv_force_use_gnu_gettext=$withval,
3393#        nls_cv_force_use_gnu_gettext=no)
3394#      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
3395      nls_cv_force_use_gnu_gettext="no"
3396
3397      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3398      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3399                                        nls_cv_header_intl=
3400        nls_cv_header_libgt=
3401        CATOBJEXT=NONE
3402
3403        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3404echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3405echo "configure:3406: checking for libintl.h" >&5
3406if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3407  echo $ac_n "(cached) $ac_c" 1>&6
3408else
3409  cat > conftest.$ac_ext <<EOF
3410#line 3411 "configure"
3411#include "confdefs.h"
3412#include <libintl.h>
3413EOF
3414ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3415{ (eval echo configure:3416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3416ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3417if test -z "$ac_err"; then
3418  rm -rf conftest*
3419  eval "ac_cv_header_$ac_safe=yes"
3420else
3421  echo "$ac_err" >&5
3422  echo "configure: failed program was:" >&5
3423  cat conftest.$ac_ext >&5
3424  rm -rf conftest*
3425  eval "ac_cv_header_$ac_safe=no"
3426fi
3427rm -f conftest*
3428fi
3429if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3430  echo "$ac_t""yes" 1>&6
3431  echo $ac_n "checking for dgettext in libc""... $ac_c" 1>&6
3432echo "configure:3433: checking for dgettext in libc" >&5
3433if eval "test \"`echo '$''{'gt_cv_func_dgettext_libc'+set}'`\" = set"; then
3434  echo $ac_n "(cached) $ac_c" 1>&6
3435else
3436  cat > conftest.$ac_ext <<EOF
3437#line 3438 "configure"
3438#include "confdefs.h"
3439#include <libintl.h>
3440int main() {
3441return (int) dgettext ("","")
3442; return 0; }
3443EOF
3444if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3445  rm -rf conftest*
3446  gt_cv_func_dgettext_libc=yes
3447else
3448  echo "configure: failed program was:" >&5
3449  cat conftest.$ac_ext >&5
3450  rm -rf conftest*
3451  gt_cv_func_dgettext_libc=no
3452fi
3453rm -f conftest*
3454fi
3455
3456echo "$ac_t""$gt_cv_func_dgettext_libc" 1>&6
3457
3458           if test "$gt_cv_func_dgettext_libc" != "yes"; then
3459             echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3460echo "configure:3461: checking for bindtextdomain in -lintl" >&5
3461ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3462if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3463  echo $ac_n "(cached) $ac_c" 1>&6
3464else
3465  ac_save_LIBS="$LIBS"
3466LIBS="-lintl  $LIBS"
3467cat > conftest.$ac_ext <<EOF
3468#line 3469 "configure"
3469#include "confdefs.h"
3470/* Override any gcc2 internal prototype to avoid an error.  */
3471/* We use char because int might match the return type of a gcc2
3472    builtin and then its argument prototype would still apply.  */
3473char bindtextdomain();
3474
3475int main() {
3476bindtextdomain()
3477; return 0; }
3478EOF
3479if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3480  rm -rf conftest*
3481  eval "ac_cv_lib_$ac_lib_var=yes"
3482else
3483  echo "configure: failed program was:" >&5
3484  cat conftest.$ac_ext >&5
3485  rm -rf conftest*
3486  eval "ac_cv_lib_$ac_lib_var=no"
3487fi
3488rm -f conftest*
3489LIBS="$ac_save_LIBS"
3490
3491fi
3492if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3493  echo "$ac_t""yes" 1>&6
3494  echo $ac_n "checking for dgettext in libintl""... $ac_c" 1>&6
3495echo "configure:3496: checking for dgettext in libintl" >&5
3496if eval "test \"`echo '$''{'gt_cv_func_dgettext_libintl'+set}'`\" = set"; then
3497  echo $ac_n "(cached) $ac_c" 1>&6
3498else
3499  echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
3500echo "configure:3501: checking for dgettext in -lintl" >&5
3501ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
3502if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3503  echo $ac_n "(cached) $ac_c" 1>&6
3504else
3505  ac_save_LIBS="$LIBS"
3506LIBS="-lintl  $LIBS"
3507cat > conftest.$ac_ext <<EOF
3508#line 3509 "configure"
3509#include "confdefs.h"
3510/* Override any gcc2 internal prototype to avoid an error.  */
3511/* We use char because int might match the return type of a gcc2
3512    builtin and then its argument prototype would still apply.  */
3513char dgettext();
3514
3515int main() {
3516dgettext()
3517; return 0; }
3518EOF
3519if { (eval echo configure:3520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3520  rm -rf conftest*
3521  eval "ac_cv_lib_$ac_lib_var=yes"
3522else
3523  echo "configure: failed program was:" >&5
3524  cat conftest.$ac_ext >&5
3525  rm -rf conftest*
3526  eval "ac_cv_lib_$ac_lib_var=no"
3527fi
3528rm -f conftest*
3529LIBS="$ac_save_LIBS"
3530
3531fi
3532if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3533  echo "$ac_t""yes" 1>&6
3534  gt_cv_func_dgettext_libintl=yes
3535else
3536  echo "$ac_t""no" 1>&6
3537gt_cv_func_dgettext_libintl=no
3538fi
3539
3540fi
3541
3542echo "$ac_t""$gt_cv_func_dgettext_libintl" 1>&6
3543else
3544  echo "$ac_t""no" 1>&6
3545fi
3546
3547           fi
3548
3549           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
3550             LIBS="$LIBS -lintl";
3551           fi
3552
3553           if test "$gt_cv_func_dgettext_libc" = "yes" \
3554              || test "$gt_cv_func_dgettext_libintl" = "yes"; then
3555              cat >> confdefs.h <<\EOF
3556#define HAVE_GETTEXT 1
3557EOF
3558
3559              # Extract the first word of "msgfmt", so it can be a program name with args.
3560set dummy msgfmt; ac_word=$2
3561echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3562echo "configure:3563: checking for $ac_word" >&5
3563if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3564  echo $ac_n "(cached) $ac_c" 1>&6
3565else
3566  case "$MSGFMT" in
3567  /*)
3568  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3569  ;;
3570  *)
3571  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3572  for ac_dir in $PATH; do
3573    test -z "$ac_dir" && ac_dir=.
3574    if test -f $ac_dir/$ac_word; then
3575      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3576        ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3577        break
3578      fi
3579    fi
3580  done
3581  IFS="$ac_save_ifs"
3582  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3583  ;;
3584esac
3585fi
3586MSGFMT="$ac_cv_path_MSGFMT"
3587if test -n "$MSGFMT"; then
3588  echo "$ac_t""$MSGFMT" 1>&6
3589else
3590  echo "$ac_t""no" 1>&6
3591fi
3592              if test "$MSGFMT" != "no"; then
3593                for ac_func in dcgettext
3594do
3595echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3596echo "configure:3597: checking for $ac_func" >&5
3597if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3598  echo $ac_n "(cached) $ac_c" 1>&6
3599else
3600  cat > conftest.$ac_ext <<EOF
3601#line 3602 "configure"
3602#include "confdefs.h"
3603/* System header to define __stub macros and hopefully few prototypes,
3604    which can conflict with char $ac_func(); below.  */
3605#include <assert.h>
3606/* Override any gcc2 internal prototype to avoid an error.  */
3607/* We use char because int might match the return type of a gcc2
3608    builtin and then its argument prototype would still apply.  */
3609char $ac_func();
3610
3611int main() {
3612
3613/* The GNU C library defines this for functions which it implements
3614    to always fail with ENOSYS.  Some functions are actually named
3615    something starting with __ and the normal name is an alias.  */
3616#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3617choke me
3618#else
3619$ac_func();
3620#endif
3621
3622; return 0; }
3623EOF
3624if { (eval echo configure:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3625  rm -rf conftest*
3626  eval "ac_cv_func_$ac_func=yes"
3627else
3628  echo "configure: failed program was:" >&5
3629  cat conftest.$ac_ext >&5
3630  rm -rf conftest*
3631  eval "ac_cv_func_$ac_func=no"
3632fi
3633rm -f conftest*
3634fi
3635
3636if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3637  echo "$ac_t""yes" 1>&6
3638    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3639  cat >> confdefs.h <<EOF
3640#define $ac_tr_func 1
3641EOF
3642 
3643else
3644  echo "$ac_t""no" 1>&6
3645fi
3646done
3647
3648                # Extract the first word of "gmsgfmt", so it can be a program name with args.
3649set dummy gmsgfmt; ac_word=$2
3650echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3651echo "configure:3652: checking for $ac_word" >&5
3652if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3653  echo $ac_n "(cached) $ac_c" 1>&6
3654else
3655  case "$GMSGFMT" in
3656  /*)
3657  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3658  ;;
3659  ?:/*)                 
3660  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3661  ;;
3662  *)
3663  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3664  ac_dummy="$PATH"
3665  for ac_dir in $ac_dummy; do
3666    test -z "$ac_dir" && ac_dir=.
3667    if test -f $ac_dir/$ac_word; then
3668      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3669      break
3670    fi
3671  done
3672  IFS="$ac_save_ifs"
3673  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3674  ;;
3675esac
3676fi
3677GMSGFMT="$ac_cv_path_GMSGFMT"
3678if test -n "$GMSGFMT"; then
3679  echo "$ac_t""$GMSGFMT" 1>&6
3680else
3681  echo "$ac_t""no" 1>&6
3682fi
3683
3684                # Extract the first word of "xgettext", so it can be a program name with args.
3685set dummy xgettext; ac_word=$2
3686echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3687echo "configure:3688: checking for $ac_word" >&5
3688if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3689  echo $ac_n "(cached) $ac_c" 1>&6
3690else
3691  case "$XGETTEXT" in
3692  /*)
3693  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3694  ;;
3695  *)
3696  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3697  for ac_dir in $PATH; do
3698    test -z "$ac_dir" && ac_dir=.
3699    if test -f $ac_dir/$ac_word; then
3700      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3701        ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3702        break
3703      fi
3704    fi
3705  done
3706  IFS="$ac_save_ifs"
3707  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3708  ;;
3709esac
3710fi
3711XGETTEXT="$ac_cv_path_XGETTEXT"
3712if test -n "$XGETTEXT"; then
3713  echo "$ac_t""$XGETTEXT" 1>&6
3714else
3715  echo "$ac_t""no" 1>&6
3716fi
3717
3718                cat > conftest.$ac_ext <<EOF
3719#line 3720 "configure"
3720#include "confdefs.h"
3721
3722int main() {
3723extern int _nl_msg_cat_cntr;
3724                               return _nl_msg_cat_cntr
3725; return 0; }
3726EOF
3727if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3728  rm -rf conftest*
3729  CATOBJEXT=.gmo
3730                   DATADIRNAME=share
3731else
3732  echo "configure: failed program was:" >&5
3733  cat conftest.$ac_ext >&5
3734  rm -rf conftest*
3735  CATOBJEXT=.mo
3736                   DATADIRNAME=lib
3737fi
3738rm -f conftest*
3739                INSTOBJEXT=.mo
3740              fi
3741            fi
3742
3743            # Added by Martin Baulig 12/15/98 for libc5 systems
3744            if test "$gt_cv_func_dgettext_libc" != "yes" \
3745               && test "$gt_cv_func_dgettext_libintl" = "yes"; then
3746               INTLLIBS=-lintl
3747               LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3748            fi
3749       
3750else
3751  echo "$ac_t""no" 1>&6
3752fi
3753
3754
3755        if test "$CATOBJEXT" = "NONE"; then
3756          echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
3757echo "configure:3758: checking whether catgets can be used" >&5
3758          # Check whether --with-catgets or --without-catgets was given.
3759if test "${with_catgets+set}" = set; then
3760  withval="$with_catgets"
3761  nls_cv_use_catgets=$withval
3762else
3763  nls_cv_use_catgets=no
3764fi
3765
3766          echo "$ac_t""$nls_cv_use_catgets" 1>&6
3767
3768          if test "$nls_cv_use_catgets" = "yes"; then
3769                    echo $ac_n "checking for main in -li""... $ac_c" 1>&6
3770echo "configure:3771: checking for main in -li" >&5
3771ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
3772if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3773  echo $ac_n "(cached) $ac_c" 1>&6
3774else
3775  ac_save_LIBS="$LIBS"
3776LIBS="-li  $LIBS"
3777cat > conftest.$ac_ext <<EOF
3778#line 3779 "configure"
3779#include "confdefs.h"
3780
3781int main() {
3782main()
3783; return 0; }
3784EOF
3785if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3786  rm -rf conftest*
3787  eval "ac_cv_lib_$ac_lib_var=yes"
3788else
3789  echo "configure: failed program was:" >&5
3790  cat conftest.$ac_ext >&5
3791  rm -rf conftest*
3792  eval "ac_cv_lib_$ac_lib_var=no"
3793fi
3794rm -f conftest*
3795LIBS="$ac_save_LIBS"
3796
3797fi
3798if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3799  echo "$ac_t""yes" 1>&6
3800    ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3801    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3802  cat >> confdefs.h <<EOF
3803#define $ac_tr_lib 1
3804EOF
3805
3806  LIBS="-li $LIBS"
3807
3808else
3809  echo "$ac_t""no" 1>&6
3810fi
3811
3812            echo $ac_n "checking for catgets""... $ac_c" 1>&6
3813echo "configure:3814: checking for catgets" >&5
3814if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
3815  echo $ac_n "(cached) $ac_c" 1>&6
3816else
3817  cat > conftest.$ac_ext <<EOF
3818#line 3819 "configure"
3819#include "confdefs.h"
3820/* System header to define __stub macros and hopefully few prototypes,
3821    which can conflict with char catgets(); below.  */
3822#include <assert.h>
3823/* Override any gcc2 internal prototype to avoid an error.  */
3824/* We use char because int might match the return type of a gcc2
3825    builtin and then its argument prototype would still apply.  */
3826char catgets();
3827
3828int main() {
3829
3830/* The GNU C library defines this for functions which it implements
3831    to always fail with ENOSYS.  Some functions are actually named
3832    something starting with __ and the normal name is an alias.  */
3833#if defined (__stub_catgets) || defined (__stub___catgets)
3834choke me
3835#else
3836catgets();
3837#endif
3838
3839; return 0; }
3840EOF
3841if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3842  rm -rf conftest*
3843  eval "ac_cv_func_catgets=yes"
3844else
3845  echo "configure: failed program was:" >&5
3846  cat conftest.$ac_ext >&5
3847  rm -rf conftest*
3848  eval "ac_cv_func_catgets=no"
3849fi
3850rm -f conftest*
3851fi
3852
3853if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
3854  echo "$ac_t""yes" 1>&6
3855  cat >> confdefs.h <<\EOF
3856#define HAVE_CATGETS 1
3857EOF
3858
3859               INTLOBJS="\$(CATOBJS)"
3860               # Extract the first word of "gencat", so it can be a program name with args.
3861set dummy gencat; ac_word=$2
3862echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3863echo "configure:3864: checking for $ac_word" >&5
3864if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
3865  echo $ac_n "(cached) $ac_c" 1>&6
3866else
3867  case "$GENCAT" in
3868  /*)
3869  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
3870  ;;
3871  ?:/*)                 
3872  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
3873  ;;
3874  *)
3875  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3876  ac_dummy="$PATH"
3877  for ac_dir in $ac_dummy; do
3878    test -z "$ac_dir" && ac_dir=.
3879    if test -f $ac_dir/$ac_word; then
3880      ac_cv_path_GENCAT="$ac_dir/$ac_word"
3881      break
3882    fi
3883  done
3884  IFS="$ac_save_ifs"
3885  test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
3886  ;;
3887esac
3888fi
3889GENCAT="$ac_cv_path_GENCAT"
3890if test -n "$GENCAT"; then
3891  echo "$ac_t""$GENCAT" 1>&6
3892else
3893  echo "$ac_t""no" 1>&6
3894fi
3895#              if test "$GENCAT" != "no"; then
3896#                AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
3897#                if test "$GMSGFMT" = "no"; then
3898#                  AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
3899#                   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
3900#                fi
3901#                AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
3902#                  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3903#                USE_INCLUDED_LIBINTL=yes
3904#                CATOBJEXT=.cat
3905#                INSTOBJEXT=.cat
3906#                DATADIRNAME=lib
3907#                INTLDEPS='$(top_builddir)/intl/libintl.a'
3908#                INTLLIBS=$INTLDEPS
3909#                LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3910#                nls_cv_header_intl=intl/libintl.h
3911#                nls_cv_header_libgt=intl/libgettext.h
3912#              fi
3913           
3914else
3915  echo "$ac_t""no" 1>&6
3916fi
3917
3918          fi
3919        fi
3920
3921        if test "$CATOBJEXT" = "NONE"; then
3922                          nls_cv_use_gnu_gettext=yes
3923        fi
3924      fi
3925
3926      if test "$nls_cv_use_gnu_gettext" != "yes"; then
3927        cat >> confdefs.h <<\EOF
3928#define ENABLE_NLS 1
3929EOF
3930
3931      else
3932         # Unset this variable since we use the non-zero value as a flag.
3933         CATOBJEXT=
3934#        dnl Mark actions used to generate GNU NLS library.
3935#        INTLOBJS="\$(GETTOBJS)"
3936#        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
3937#         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
3938#        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3939#        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
3940#         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3941#        AC_SUBST(MSGFMT)
3942#       USE_INCLUDED_LIBINTL=yes
3943#        CATOBJEXT=.gmo
3944#        INSTOBJEXT=.mo
3945#        DATADIRNAME=share
3946#       INTLDEPS='$(top_builddir)/intl/libintl.a'
3947#       INTLLIBS=$INTLDEPS
3948#       LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3949#        nls_cv_header_intl=intl/libintl.h
3950#        nls_cv_header_libgt=intl/libgettext.h
3951      fi
3952
3953            if test "$XGETTEXT" != ":"; then
3954                        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3955          : ;
3956        else
3957          echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
3958          XGETTEXT=":"
3959        fi
3960      fi
3961
3962      # We need to process the po/ directory.
3963      POSUB=po
3964    else
3965      DATADIRNAME=share
3966      nls_cv_header_intl=intl/libintl.h
3967      nls_cv_header_libgt=intl/libgettext.h
3968    fi
3969   
3970   
3971
3972
3973#    # If this is used in GNU gettext we have to set USE_NLS to `yes'
3974#    # because some of the sources are only built for this goal.
3975#    if test "$PACKAGE" = gettext; then
3976#      USE_NLS=yes
3977#      USE_INCLUDED_LIBINTL=yes
3978#    fi
3979
3980                for lang in $ALL_LINGUAS; do
3981      GMOFILES="$GMOFILES $lang.gmo"
3982      POFILES="$POFILES $lang.po"
3983    done
3984
3985       
3986   
3987   
3988   
3989   
3990   
3991   
3992   
3993   
3994   
3995   
3996 
3997
3998   if test "x$CATOBJEXT" != "x"; then
3999     if test "x$ALL_LINGUAS" = "x"; then
4000       LINGUAS=
4001     else
4002       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4003echo "configure:4004: checking for catalogs to be installed" >&5
4004       NEW_LINGUAS=
4005       for lang in ${LINGUAS=$ALL_LINGUAS}; do
4006         case "$ALL_LINGUAS" in
4007          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4008         esac
4009       done
4010       LINGUAS=$NEW_LINGUAS
4011       echo "$ac_t""$LINGUAS" 1>&6
4012     fi
4013
4014          if test -n "$LINGUAS"; then
4015       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4016     fi
4017   fi
4018
4019            if test $ac_cv_header_locale_h = yes; then
4020     INCLUDE_LOCALE_H="#include <locale.h>"
4021   else
4022     INCLUDE_LOCALE_H="\
4023/* The system does not provide the header <locale.h>.  Take care yourself.  */"
4024   fi
4025   
4026
4027            test -d intl || mkdir intl
4028   if test "$CATOBJEXT" = ".cat"; then
4029     ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4030echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4031echo "configure:4032: checking for linux/version.h" >&5
4032if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4033  echo $ac_n "(cached) $ac_c" 1>&6
4034else
4035  cat > conftest.$ac_ext <<EOF
4036#line 4037 "configure"
4037#include "confdefs.h"
4038#include <linux/version.h>
4039EOF
4040ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4041{ (eval echo configure:4042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4042ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4043if test -z "$ac_err"; then
4044  rm -rf conftest*
4045  eval "ac_cv_header_$ac_safe=yes"
4046else
4047  echo "$ac_err" >&5
4048  echo "configure: failed program was:" >&5
4049  cat conftest.$ac_ext >&5
4050  rm -rf conftest*
4051  eval "ac_cv_header_$ac_safe=no"
4052fi
4053rm -f conftest*
4054fi
4055if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4056  echo "$ac_t""yes" 1>&6
4057  msgformat=linux
4058else
4059  echo "$ac_t""no" 1>&6
4060msgformat=xopen
4061fi
4062
4063
4064               sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
4065   fi
4066      sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4067     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
4068
4069            if test "$PACKAGE" = "gettext"; then
4070     GT_NO="#NO#"
4071     GT_YES=
4072   else
4073     GT_NO=
4074     GT_YES="#YES#"
4075   fi
4076   
4077   
4078
4079            MKINSTALLDIRS=
4080   if test -n "$ac_aux_dir"; then
4081     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4082   fi
4083   if test -z "$MKINSTALLDIRS"; then
4084     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4085   fi
4086   
4087
4088      l=
4089   
4090
4091         test -d po || mkdir po
4092   if test "x$srcdir" != "x."; then
4093     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4094       posrcprefix="$srcdir/"
4095     else
4096       posrcprefix="../$srcdir/"
4097     fi
4098   else
4099     posrcprefix="../"
4100   fi
4101   rm -f po/POTFILES
4102   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4103        < $srcdir/po/POTFILES.in > po/POTFILES
4104 
4105LIBS="$LIBS $INTLLIBS"
4106
4107# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
4108# this is the directory where the *.{mo,gmo} files are installed
4109gtklocaledir='${prefix}/${DATADIRNAME}/locale'
4110
4111
4112echo $ac_n "checking for extra flags to get ANSI library prototypes""... $ac_c" 1>&6
4113echo "configure:4114: checking for extra flags to get ANSI library prototypes" >&5
4114
4115gtk_save_LIBS=$LIBS
4116LIBS="$LIBS -lm"
4117if test "$cross_compiling" = yes; then
4118  echo "$ac_t""none needed" 1>&6
4119
4120else
4121  cat > conftest.$ac_ext <<EOF
4122#line 4123 "configure"
4123#include "confdefs.h"
4124#include <math.h>
4125             int main (void) { return (log(1) != log(1.)); }
4126EOF
4127if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4128then
4129  echo "$ac_t""none needed" 1>&6
4130else
4131  echo "configure: failed program was:" >&5
4132  cat conftest.$ac_ext >&5
4133  rm -fr conftest*
4134  gtk_save_CFLAGS=$CFLAGS
4135     CFLAGS="$CFLAGS -std1"
4136     if test "$cross_compiling" = yes; then
4137  true
4138     
4139else
4140  cat > conftest.$ac_ext <<EOF
4141#line 4142 "configure"
4142#include "confdefs.h"
4143#include <math.h>
4144                 int main (void) { return (log(1) != log(1.)); }
4145EOF
4146if { (eval echo configure:4147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4147then
4148  echo "$ac_t""-std1" 1>&6
4149else
4150  echo "configure: failed program was:" >&5
4151  cat conftest.$ac_ext >&5
4152  rm -fr conftest*
4153  echo "$ac_t""" 1>&6
4154         CFLAGS=$gtk_save_CFLAGS
4155         echo "configure: warning: No ANSI prototypes found in library. (-std1 didn't work.)" 1>&2
4156fi
4157rm -fr conftest*
4158fi
4159
4160fi
4161rm -fr conftest*
4162fi
4163
4164LIBS=$gtk_save_LIBS
4165
4166echo $ac_n "checking for extra flags for POSIX compliance""... $ac_c" 1>&6
4167echo "configure:4168: checking for extra flags for POSIX compliance" >&5
4168cat > conftest.$ac_ext <<EOF
4169#line 4170 "configure"
4170#include "confdefs.h"
4171#include <dirent.h>
4172int main() {
4173DIR *dir;
4174; return 0; }
4175EOF
4176if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4177  rm -rf conftest*
4178  echo "$ac_t""none needed" 1>&6
4179else
4180  echo "configure: failed program was:" >&5
4181  cat conftest.$ac_ext >&5
4182  rm -rf conftest*
4183  gtk_save_CFLAGS=$CFLAGS
4184  CFLAGS="$CFLAGS -posix"
4185  cat > conftest.$ac_ext <<EOF
4186#line 4187 "configure"
4187#include "confdefs.h"
4188#include <dirent.h>
4189int main() {
4190DIR *dir;
4191; return 0; }
4192EOF
4193if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4194  rm -rf conftest*
4195  echo "$ac_t""-posix" 1>&6
4196else
4197  echo "configure: failed program was:" >&5
4198  cat conftest.$ac_ext >&5
4199  rm -rf conftest*
4200  echo "$ac_t""" 1>&6
4201    CFLAGS=$gtk_save_CFLAGS
4202    echo "configure: warning: Could not determine POSIX flag. (-posix didn't work.)" 1>&2
4203fi
4204rm -f conftest*
4205fi
4206rm -f conftest*
4207
4208if test x$with_glib = xyes ; then
4209  { echo "configure: error:
4210*** Directory must be specified for --with-glib" 1>&2; exit 1; }
4211fi
4212
4213if test x$with_glib = x ; then
4214  # Look for separately installed glib
4215
4216  # Check whether --with-glib-prefix or --without-glib-prefix was given.
4217if test "${with_glib_prefix+set}" = set; then
4218  withval="$with_glib_prefix"
4219  glib_config_prefix="$withval"
4220else
4221  glib_config_prefix=""
4222fi
4223
4224# Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
4225if test "${with_glib_exec_prefix+set}" = set; then
4226  withval="$with_glib_exec_prefix"
4227  glib_config_exec_prefix="$withval"
4228else
4229  glib_config_exec_prefix=""
4230fi
4231
4232# Check whether --enable-glibtest or --disable-glibtest was given.
4233if test "${enable_glibtest+set}" = set; then
4234  enableval="$enable_glibtest"
4235  :
4236else
4237  enable_glibtest=yes
4238fi
4239
4240
4241  if test x$glib_config_exec_prefix != x ; then
4242     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
4243     if test x${GLIB_CONFIG+set} != xset ; then
4244        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
4245     fi
4246  fi
4247  if test x$glib_config_prefix != x ; then
4248     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
4249     if test x${GLIB_CONFIG+set} != xset ; then
4250        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
4251     fi
4252  fi
4253
4254  for module in . gmodule gthread
4255  do
4256      case "$module" in
4257         gmodule)
4258             glib_config_args="$glib_config_args gmodule"
4259         ;;
4260         gthread)
4261             glib_config_args="$glib_config_args gthread"
4262         ;;
4263      esac
4264  done
4265
4266  # Extract the first word of "glib-config", so it can be a program name with args.
4267set dummy glib-config; ac_word=$2
4268echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4269echo "configure:4270: checking for $ac_word" >&5
4270if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
4271  echo $ac_n "(cached) $ac_c" 1>&6
4272else
4273  case "$GLIB_CONFIG" in
4274  /*)
4275  ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
4276  ;;
4277  ?:/*)                 
4278  ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
4279  ;;
4280  *)
4281  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4282  ac_dummy="$PATH"
4283  for ac_dir in $ac_dummy; do
4284    test -z "$ac_dir" && ac_dir=.
4285    if test -f $ac_dir/$ac_word; then
4286      ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word"
4287      break
4288    fi
4289  done
4290  IFS="$ac_save_ifs"
4291  test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
4292  ;;
4293esac
4294fi
4295GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
4296if test -n "$GLIB_CONFIG"; then
4297  echo "$ac_t""$GLIB_CONFIG" 1>&6
4298else
4299  echo "$ac_t""no" 1>&6
4300fi
4301
4302  min_glib_version=1.2.8
4303  echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
4304echo "configure:4305: checking for GLIB - version >= $min_glib_version" >&5
4305  no_glib=""
4306  if test "$GLIB_CONFIG" = "no" ; then
4307    no_glib=yes
4308  else
4309    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
4310    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
4311    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
4312           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
4313    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
4314           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
4315    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
4316           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
4317    if test "x$enable_glibtest" = "xyes" ; then
4318      ac_save_CFLAGS="$CFLAGS"
4319      ac_save_LIBS="$LIBS"
4320      CFLAGS="$CFLAGS $GLIB_CFLAGS"
4321      LIBS="$GLIB_LIBS $LIBS"
4322      rm -f conf.glibtest
4323      if test "$cross_compiling" = yes; then
4324  echo $ac_n "cross compiling; assumed OK... $ac_c"
4325else
4326  cat > conftest.$ac_ext <<EOF
4327#line 4328 "configure"
4328#include "confdefs.h"
4329
4330#include <glib.h>
4331#include <stdio.h>
4332#include <stdlib.h>
4333
4334int
4335main ()
4336{
4337  int major, minor, micro;
4338  char *tmp_version;
4339
4340  system ("touch conf.glibtest");
4341
4342  /* HP/UX 9 (%@#!) writes to sscanf strings */
4343  tmp_version = g_strdup("$min_glib_version");
4344  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4345     printf("%s, bad version string\n", "$min_glib_version");
4346     exit(1);
4347   }
4348
4349  if ((glib_major_version != $glib_config_major_version) ||
4350      (glib_minor_version != $glib_config_minor_version) ||
4351      (glib_micro_version != $glib_config_micro_version))
4352    {
4353      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
4354             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
4355             glib_major_version, glib_minor_version, glib_micro_version);
4356      printf ("*** was found! If glib-config was correct, then it is best\n");
4357      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
4358      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
4359      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
4360      printf("*** required on your system.\n");
4361      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
4362      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
4363      printf("*** before re-running configure\n");
4364    }
4365  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
4366           (glib_minor_version != GLIB_MINOR_VERSION) ||
4367           (glib_micro_version != GLIB_MICRO_VERSION))
4368    {
4369      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
4370             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
4371      printf("*** library (version %d.%d.%d)\n",
4372             glib_major_version, glib_minor_version, glib_micro_version);
4373    }
4374  else
4375    {
4376      if ((glib_major_version > major) ||
4377        ((glib_major_version == major) && (glib_minor_version > minor)) ||
4378        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
4379      {
4380        return 0;
4381       }
4382     else
4383      {
4384        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
4385               glib_major_version, glib_minor_version, glib_micro_version);
4386        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
4387               major, minor, micro);
4388        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
4389        printf("***\n");
4390        printf("*** If you have already installed a sufficiently new version, this error\n");
4391        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
4392        printf("*** being found. The easiest way to fix this is to remove the old version\n");
4393        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
4394        printf("*** correct copy of glib-config. (In this case, you will have to\n");
4395        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
4396        printf("*** so that the correct libraries are found at run-time))\n");
4397      }
4398    }
4399  return 1;
4400}
4401
4402EOF
4403if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4404then
4405  :
4406else
4407  echo "configure: failed program was:" >&5
4408  cat conftest.$ac_ext >&5
4409  rm -fr conftest*
4410  no_glib=yes
4411fi
4412rm -fr conftest*
4413fi
4414
4415       CFLAGS="$ac_save_CFLAGS"
4416       LIBS="$ac_save_LIBS"
4417     fi
4418  fi
4419  if test "x$no_glib" = x ; then
4420     echo "$ac_t""yes" 1>&6
4421     :     
4422  else
4423     echo "$ac_t""no" 1>&6
4424     if test "$GLIB_CONFIG" = "no" ; then
4425       echo "*** The glib-config script installed by GLIB could not be found"
4426       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
4427       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
4428       echo "*** full path to glib-config."
4429     else
4430       if test -f conf.glibtest ; then
4431        :
4432       else
4433          echo "*** Could not run GLIB test program, checking why..."
4434          CFLAGS="$CFLAGS $GLIB_CFLAGS"
4435          LIBS="$LIBS $GLIB_LIBS"
4436          cat > conftest.$ac_ext <<EOF
4437#line 4438 "configure"
4438#include "confdefs.h"
4439
4440#include <glib.h>
4441#include <stdio.h>
4442
4443int main() {
4444 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
4445; return 0; }
4446EOF
4447if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4448  rm -rf conftest*
4449   echo "*** The test program compiled, but did not run. This usually means"
4450          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
4451          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
4452          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4453          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
4454          echo "*** is required on your system"
4455          echo "***"
4456          echo "*** If you have an old version installed, it is best to remove it, although"
4457          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
4458          echo "***"
4459          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
4460          echo "*** came with the system with the command"
4461          echo "***"
4462          echo "***    rpm --erase --nodeps gtk gtk-devel"
4463else
4464  echo "configure: failed program was:" >&5
4465  cat conftest.$ac_ext >&5
4466  rm -rf conftest*
4467   echo "*** The test program failed to compile or link. See the file config.log for the"
4468          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
4469          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
4470          echo "*** may want to edit the glib-config script: $GLIB_CONFIG"
4471fi
4472rm -f conftest*
4473          CFLAGS="$ac_save_CFLAGS"
4474          LIBS="$ac_save_LIBS"
4475       fi
4476     fi
4477     GLIB_CFLAGS=""
4478     GLIB_LIBS=""
4479     { echo "configure: error:
4480*** GLIB 1.2.8 or better is required. The latest version of GLIB
4481*** is always available from ftp://ftp.gtk.org/." 1>&2; exit 1; }
4482  fi
4483 
4484 
4485  rm -f conf.glibtest
4486
4487
4488  # we do not want to make all gtk progs to link to thread libraries.
4489  glib_cflags=`$GLIB_CONFIG glib gmodule --cflags`
4490  glib_thread_cflags="$GLIB_CFLAGS"
4491  glib_libs=`$GLIB_CONFIG glib gmodule --libs`
4492  glib_thread_libs="$GLIB_LIBS"
4493  GLIB_LIBS="$glib_libs"
4494  GLIB_DEPLIBS="$glib_libs"
4495else
4496  # Use uninstalled glib (assume they got the version right)
4497
4498  GLIB_CONFIG=$with_glib/glib-config
4499  if test -x $GLIB_CONFIG ; then
4500    :
4501  else
4502    { echo "configure: error: GLIB directory ($with_glib) not present or not configured" 1>&2; exit 1; }
4503  fi
4504
4505  # For use in gtk-config
4506  glib_cflags=`$GLIB_CONFIG --cflags gmodule`
4507  glib_thread_cflags=`$GLIB_CONFIG --cflags gmodule gthread`
4508  glib_libs=`$GLIB_CONFIG --libs gmodule`
4509  glib_thread_libs=`$GLIB_CONFIG --libs gmodule gthread`
4510
4511  glib_release=`$GLIB_CONFIG --version | sed 's%\\.[0-9]*$%%'`
4512
4513  # canonicalize relative paths
4514  case $with_glib in
4515    /*)
4516      glib_dir=$with_glib
4517      ;;
4518    *)
4519      glib_dir="\$(top_builddir)/$with_glib"
4520      ;;
4521  esac
4522
4523  GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
4524  GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgmodule.la"
4525  GLIB_DEPLIBS=
4526
4527 
4528 
4529fi
4530
4531
4532
4533
4534
4535
4536
4537# Find the X11 include and library directories
4538# If we find X, set shell vars x_includes and x_libraries to the
4539# paths, otherwise set no_x=yes.
4540# Uses ac_ vars as temps to allow command line to override cache and checks.
4541# --without-x overrides everything else, but does not touch the cache.
4542echo $ac_n "checking for X""... $ac_c" 1>&6
4543echo "configure:4544: checking for X" >&5
4544
4545# Check whether --with-x or --without-x was given.
4546if test "${with_x+set}" = set; then
4547  withval="$with_x"
4548  :
4549fi
4550
4551# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4552if test "x$with_x" = xno; then
4553  # The user explicitly disabled X.
4554  have_x=disabled
4555else
4556  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4557    # Both variables are already set.
4558    have_x=yes
4559  else
4560if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4561  echo $ac_n "(cached) $ac_c" 1>&6
4562else
4563  # One or both of the vars are not set, and there is no cached value.
4564ac_x_includes=NO ac_x_libraries=NO
4565rm -fr conftestdir
4566if mkdir conftestdir; then
4567  cd conftestdir
4568  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4569  cat > Imakefile <<'EOF'
4570acfindx:
4571        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4572EOF
4573  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4574    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4575    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4576    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4577    for ac_extension in a so sl; do
4578      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4579        test -f $ac_im_libdir/libX11.$ac_extension; then
4580        ac_im_usrlibdir=$ac_im_libdir; break
4581      fi
4582    done
4583    # Screen out bogus values from the imake configuration.  They are
4584    # bogus both because they are the default anyway, and because
4585    # using them would break gcc on systems where it needs fixed includes.
4586    case "$ac_im_incroot" in
4587        /usr/include) ;;
4588        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4589    esac
4590    case "$ac_im_usrlibdir" in
4591        /usr/lib | /lib) ;;
4592        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4593    esac
4594  fi
4595  cd ..
4596  rm -fr conftestdir
4597fi
4598
4599if test "$ac_x_includes" = NO; then
4600  # Guess where to find include files, by looking for this one X11 .h file.
4601  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4602
4603  # First, try using that file with no special directory specified.
4604cat > conftest.$ac_ext <<EOF
4605#line 4606 "configure"
4606#include "confdefs.h"
4607#include <$x_direct_test_include>
4608EOF
4609ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4610{ (eval echo configure:4611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4611ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4612if test -z "$ac_err"; then
4613  rm -rf conftest*
4614  # We can compile using X headers with no special include directory.
4615ac_x_includes=
4616else
4617  echo "$ac_err" >&5
4618  echo "configure: failed program was:" >&5
4619  cat conftest.$ac_ext >&5
4620  rm -rf conftest*
4621  # Look for the header file in a standard set of common directories.
4622# Check X11 before X11Rn because it is often a symlink to the current release.
4623  for ac_dir in               \
4624    /usr/X11/include          \
4625    /usr/X11R6/include        \
4626    /usr/X11R5/include        \
4627    /usr/X11R4/include        \
4628                              \
4629    /usr/include/X11          \
4630    /usr/include/X11R6        \
4631    /usr/include/X11R5        \
4632    /usr/include/X11R4        \
4633                              \
4634    /usr/local/X11/include    \
4635    /usr/local/X11R6/include  \
4636    /usr/local/X11R5/include  \
4637    /usr/local/X11R4/include  \
4638                              \
4639    /usr/local/include/X11    \
4640    /usr/local/include/X11R6  \
4641    /usr/local/include/X11R5  \
4642    /usr/local/include/X11R4  \
4643                              \
4644    /usr/X386/include         \
4645    /usr/x386/include         \
4646    /usr/XFree86/include/X11  \
4647                              \
4648    /usr/include              \
4649    /usr/local/include        \
4650    /usr/unsupported/include  \
4651    /usr/athena/include       \
4652    /usr/local/x11r5/include  \
4653    /usr/lpp/Xamples/include  \
4654                              \
4655    /usr/openwin/include      \
4656    /usr/openwin/share/include \
4657    ; \
4658  do
4659    if test -r "$ac_dir/$x_direct_test_include"; then
4660      ac_x_includes=$ac_dir
4661      break
4662    fi
4663  done
4664fi
4665rm -f conftest*
4666fi # $ac_x_includes = NO
4667
4668if test "$ac_x_libraries" = NO; then
4669  # Check for the libraries.
4670
4671  test -z "$x_direct_test_library" && x_direct_test_library=Xt
4672  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4673
4674  # See if we find them without any special options.
4675  # Don't add to $LIBS permanently.
4676  ac_save_LIBS="$LIBS"
4677  LIBS="-l$x_direct_test_library $LIBS"
4678cat > conftest.$ac_ext <<EOF
4679#line 4680 "configure"
4680#include "confdefs.h"
4681
4682int main() {
4683${x_direct_test_function}()
4684; return 0; }
4685EOF
4686if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4687  rm -rf conftest*
4688  LIBS="$ac_save_LIBS"
4689# We can link X programs with no special library path.
4690ac_x_libraries=
4691else
4692  echo "configure: failed program was:" >&5
4693  cat conftest.$ac_ext >&5
4694  rm -rf conftest*
4695  LIBS="$ac_save_LIBS"
4696# First see if replacing the include by lib works.
4697# Check X11 before X11Rn because it is often a symlink to the current release.
4698for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4699    /usr/X11/lib          \
4700    /usr/X11R6/lib        \
4701    /usr/X11R5/lib        \
4702    /usr/X11R4/lib        \
4703                          \
4704    /usr/lib/X11          \
4705    /usr/lib/X11R6        \
4706    /usr/lib/X11R5        \
4707    /usr/lib/X11R4        \
4708                          \
4709    /usr/local/X11/lib    \
4710    /usr/local/X11R6/lib  \
4711    /usr/local/X11R5/lib  \
4712    /usr/local/X11R4/lib  \
4713                          \
4714    /usr/local/lib/X11    \
4715    /usr/local/lib/X11R6  \
4716    /usr/local/lib/X11R5  \
4717    /usr/local/lib/X11R4  \
4718                          \
4719    /usr/X386/lib         \
4720    /usr/x386/lib         \
4721    /usr/XFree86/lib/X11  \
4722                          \
4723    /usr/lib              \
4724    /usr/local/lib        \
4725    /usr/unsupported/lib  \
4726    /usr/athena/lib       \
4727    /usr/local/x11r5/lib  \
4728    /usr/lpp/Xamples/lib  \
4729    /lib/usr/lib/X11      \
4730                          \
4731    /usr/openwin/lib      \
4732    /usr/openwin/share/lib \
4733    ; \
4734do
4735  for ac_extension in a so sl; do
4736    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4737      ac_x_libraries=$ac_dir
4738      break 2
4739    fi
4740  done
4741done
4742fi
4743rm -f conftest*
4744fi # $ac_x_libraries = NO
4745
4746if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4747  # Didn't find X anywhere.  Cache the known absence of X.
4748  ac_cv_have_x="have_x=no"
4749else
4750  # Record where we found X for the cache.
4751  ac_cv_have_x="have_x=yes \
4752                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4753fi
4754fi
4755  fi
4756  eval "$ac_cv_have_x"
4757fi # $with_x != no
4758
4759if test "$have_x" != yes; then
4760  echo "$ac_t""$have_x" 1>&6
4761  no_x=yes
4762else
4763  # If each of the values was on the command line, it overrides each guess.
4764  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4765  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4766  # Update the cache value to reflect the command line values.
4767  ac_cv_have_x="have_x=yes \
4768                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4769  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4770fi
4771
4772if test "$no_x" = yes; then
4773  # Not all programs may use this symbol, but it does not hurt to define it.
4774  cat >> confdefs.h <<\EOF
4775#define X_DISPLAY_MISSING 1
4776EOF
4777
4778  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4779else
4780  if test -n "$x_includes"; then
4781    X_CFLAGS="$X_CFLAGS -I$x_includes"
4782  fi
4783
4784  # It would also be nice to do this for all -L options, not just this one.
4785  if test -n "$x_libraries"; then
4786    X_LIBS="$X_LIBS -L$x_libraries"
4787    # For Solaris; some versions of Sun CC require a space after -R and
4788    # others require no space.  Words are not sufficient . . . .
4789    case "`(uname -sr) 2>/dev/null`" in
4790    "SunOS 5"*)
4791      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4792echo "configure:4793: checking whether -R must be followed by a space" >&5
4793      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4794      cat > conftest.$ac_ext <<EOF
4795#line 4796 "configure"
4796#include "confdefs.h"
4797
4798int main() {
4799
4800; return 0; }
4801EOF
4802if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4803  rm -rf conftest*
4804  ac_R_nospace=yes
4805else
4806  echo "configure: failed program was:" >&5
4807  cat conftest.$ac_ext >&5
4808  rm -rf conftest*
4809  ac_R_nospace=no
4810fi
4811rm -f conftest*
4812      if test $ac_R_nospace = yes; then
4813        echo "$ac_t""no" 1>&6
4814        X_LIBS="$X_LIBS -R$x_libraries"
4815      else
4816        LIBS="$ac_xsave_LIBS -R $x_libraries"
4817        cat > conftest.$ac_ext <<EOF
4818#line 4819 "configure"
4819#include "confdefs.h"
4820
4821int main() {
4822
4823; return 0; }
4824EOF
4825if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4826  rm -rf conftest*
4827  ac_R_space=yes
4828else
4829  echo "configure: failed program was:" >&5
4830  cat conftest.$ac_ext >&5
4831  rm -rf conftest*
4832  ac_R_space=no
4833fi
4834rm -f conftest*
4835        if test $ac_R_space = yes; then
4836          echo "$ac_t""yes" 1>&6
4837          X_LIBS="$X_LIBS -R $x_libraries"
4838        else
4839          echo "$ac_t""neither works" 1>&6
4840        fi
4841      fi
4842      LIBS="$ac_xsave_LIBS"
4843    esac
4844  fi
4845
4846  # Check for system-dependent libraries X programs must link with.
4847  # Do this before checking for the system-independent R6 libraries
4848  # (-lICE), since we may need -lsocket or whatever for X linking.
4849
4850  if test "$ISC" = yes; then
4851    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4852  else
4853    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4854    # libraries were built with DECnet support.  And karl@cs.umb.edu says
4855    # the Alpha needs dnet_stub (dnet does not exist).
4856    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4857echo "configure:4858: checking for dnet_ntoa in -ldnet" >&5
4858ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4860  echo $ac_n "(cached) $ac_c" 1>&6
4861else
4862  ac_save_LIBS="$LIBS"
4863LIBS="-ldnet  $LIBS"
4864cat > conftest.$ac_ext <<EOF
4865#line 4866 "configure"
4866#include "confdefs.h"
4867/* Override any gcc2 internal prototype to avoid an error.  */
4868/* We use char because int might match the return type of a gcc2
4869    builtin and then its argument prototype would still apply.  */
4870char dnet_ntoa();
4871
4872int main() {
4873dnet_ntoa()
4874; return 0; }
4875EOF
4876if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4877  rm -rf conftest*
4878  eval "ac_cv_lib_$ac_lib_var=yes"
4879else
4880  echo "configure: failed program was:" >&5
4881  cat conftest.$ac_ext >&5
4882  rm -rf conftest*
4883  eval "ac_cv_lib_$ac_lib_var=no"
4884fi
4885rm -f conftest*
4886LIBS="$ac_save_LIBS"
4887
4888fi
4889if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4890  echo "$ac_t""yes" 1>&6
4891  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4892else
4893  echo "$ac_t""no" 1>&6
4894fi
4895
4896    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4897      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4898echo "configure:4899: checking for dnet_ntoa in -ldnet_stub" >&5
4899ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4900if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4901  echo $ac_n "(cached) $ac_c" 1>&6
4902else
4903  ac_save_LIBS="$LIBS"
4904LIBS="-ldnet_stub  $LIBS"
4905cat > conftest.$ac_ext <<EOF
4906#line 4907 "configure"
4907#include "confdefs.h"
4908/* Override any gcc2 internal prototype to avoid an error.  */
4909/* We use char because int might match the return type of a gcc2
4910    builtin and then its argument prototype would still apply.  */
4911char dnet_ntoa();
4912
4913int main() {
4914dnet_ntoa()
4915; return 0; }
4916EOF
4917if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4918  rm -rf conftest*
4919  eval "ac_cv_lib_$ac_lib_var=yes"
4920else
4921  echo "configure: failed program was:" >&5
4922  cat conftest.$ac_ext >&5
4923  rm -rf conftest*
4924  eval "ac_cv_lib_$ac_lib_var=no"
4925fi
4926rm -f conftest*
4927LIBS="$ac_save_LIBS"
4928
4929fi
4930if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4931  echo "$ac_t""yes" 1>&6
4932  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4933else
4934  echo "$ac_t""no" 1>&6
4935fi
4936
4937    fi
4938
4939    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4940    # to get the SysV transport functions.
4941    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4942    # needs -lnsl.
4943    # The nsl library prevents programs from opening the X display
4944    # on Irix 5.2, according to dickey@clark.net.
4945    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4946echo "configure:4947: checking for gethostbyname" >&5
4947if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4948  echo $ac_n "(cached) $ac_c" 1>&6
4949else
4950  cat > conftest.$ac_ext <<EOF
4951#line 4952 "configure"
4952#include "confdefs.h"
4953/* System header to define __stub macros and hopefully few prototypes,
4954    which can conflict with char gethostbyname(); below.  */
4955#include <assert.h>
4956/* Override any gcc2 internal prototype to avoid an error.  */
4957/* We use char because int might match the return type of a gcc2
4958    builtin and then its argument prototype would still apply.  */
4959char gethostbyname();
4960
4961int main() {
4962
4963/* The GNU C library defines this for functions which it implements
4964    to always fail with ENOSYS.  Some functions are actually named
4965    something starting with __ and the normal name is an alias.  */
4966#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4967choke me
4968#else
4969gethostbyname();
4970#endif
4971
4972; return 0; }
4973EOF
4974if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4975  rm -rf conftest*
4976  eval "ac_cv_func_gethostbyname=yes"
4977else
4978  echo "configure: failed program was:" >&5
4979  cat conftest.$ac_ext >&5
4980  rm -rf conftest*
4981  eval "ac_cv_func_gethostbyname=no"
4982fi
4983rm -f conftest*
4984fi
4985
4986if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4987  echo "$ac_t""yes" 1>&6
4988  :
4989else
4990  echo "$ac_t""no" 1>&6
4991fi
4992
4993    if test $ac_cv_func_gethostbyname = no; then
4994      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4995echo "configure:4996: checking for gethostbyname in -lnsl" >&5
4996ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4997if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4998  echo $ac_n "(cached) $ac_c" 1>&6
4999else
5000  ac_save_LIBS="$LIBS"
5001LIBS="-lnsl  $LIBS"
5002cat > conftest.$ac_ext <<EOF
5003#line 5004 "configure"
5004#include "confdefs.h"
5005/* Override any gcc2 internal prototype to avoid an error.  */
5006/* We use char because int might match the return type of a gcc2
5007    builtin and then its argument prototype would still apply.  */
5008char gethostbyname();
5009
5010int main() {
5011gethostbyname()
5012; return 0; }
5013EOF
5014if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5015  rm -rf conftest*
5016  eval "ac_cv_lib_$ac_lib_var=yes"
5017else
5018  echo "configure: failed program was:" >&5
5019  cat conftest.$ac_ext >&5
5020  rm -rf conftest*
5021  eval "ac_cv_lib_$ac_lib_var=no"
5022fi
5023rm -f conftest*
5024LIBS="$ac_save_LIBS"
5025
5026fi
5027if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5028  echo "$ac_t""yes" 1>&6
5029  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5030else
5031  echo "$ac_t""no" 1>&6
5032fi
5033
5034    fi
5035
5036    # lieder@skyler.mavd.honeywell.com says without -lsocket,
5037    # socket/setsockopt and other routines are undefined under SCO ODT
5038    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5039    # on later versions), says simon@lia.di.epfl.ch: it contains
5040    # gethostby* variants that don't use the nameserver (or something).
5041    # -lsocket must be given before -lnsl if both are needed.
5042    # We assume that if connect needs -lnsl, so does gethostbyname.
5043    echo $ac_n "checking for connect""... $ac_c" 1>&6
5044echo "configure:5045: checking for connect" >&5
5045if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5046  echo $ac_n "(cached) $ac_c" 1>&6
5047else
5048  cat > conftest.$ac_ext <<EOF
5049#line 5050 "configure"
5050#include "confdefs.h"
5051/* System header to define __stub macros and hopefully few prototypes,
5052    which can conflict with char connect(); below.  */
5053#include <assert.h>
5054/* Override any gcc2 internal prototype to avoid an error.  */
5055/* We use char because int might match the return type of a gcc2
5056    builtin and then its argument prototype would still apply.  */
5057char connect();
5058
5059int main() {
5060
5061/* The GNU C library defines this for functions which it implements
5062    to always fail with ENOSYS.  Some functions are actually named
5063    something starting with __ and the normal name is an alias.  */
5064#if defined (__stub_connect) || defined (__stub___connect)
5065choke me
5066#else
5067connect();
5068#endif
5069
5070; return 0; }
5071EOF
5072if { (eval echo configure:5073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5073  rm -rf conftest*
5074  eval "ac_cv_func_connect=yes"
5075else
5076  echo "configure: failed program was:" >&5
5077  cat conftest.$ac_ext >&5
5078  rm -rf conftest*
5079  eval "ac_cv_func_connect=no"
5080fi
5081rm -f conftest*
5082fi
5083
5084if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5085  echo "$ac_t""yes" 1>&6
5086  :
5087else
5088  echo "$ac_t""no" 1>&6
5089fi
5090
5091    if test $ac_cv_func_connect = no; then
5092      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5093echo "configure:5094: checking for connect in -lsocket" >&5
5094ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5095if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5096  echo $ac_n "(cached) $ac_c" 1>&6
5097else
5098  ac_save_LIBS="$LIBS"
5099LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5100cat > conftest.$ac_ext <<EOF
5101#line 5102 "configure"
5102#include "confdefs.h"
5103/* Override any gcc2 internal prototype to avoid an error.  */
5104/* We use char because int might match the return type of a gcc2
5105    builtin and then its argument prototype would still apply.  */
5106char connect();
5107
5108int main() {
5109connect()
5110; return 0; }
5111EOF
5112if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5113  rm -rf conftest*
5114  eval "ac_cv_lib_$ac_lib_var=yes"
5115else
5116  echo "configure: failed program was:" >&5
5117  cat conftest.$ac_ext >&5
5118  rm -rf conftest*
5119  eval "ac_cv_lib_$ac_lib_var=no"
5120fi
5121rm -f conftest*
5122LIBS="$ac_save_LIBS"
5123
5124fi
5125if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5126  echo "$ac_t""yes" 1>&6
5127  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5128else
5129  echo "$ac_t""no" 1>&6
5130fi
5131
5132    fi
5133
5134    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5135    echo $ac_n "checking for remove""... $ac_c" 1>&6
5136echo "configure:5137: checking for remove" >&5
5137if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5138  echo $ac_n "(cached) $ac_c" 1>&6
5139else
5140  cat > conftest.$ac_ext <<EOF
5141#line 5142 "configure"
5142#include "confdefs.h"
5143/* System header to define __stub macros and hopefully few prototypes,
5144    which can conflict with char remove(); below.  */
5145#include <assert.h>
5146/* Override any gcc2 internal prototype to avoid an error.  */
5147/* We use char because int might match the return type of a gcc2
5148    builtin and then its argument prototype would still apply.  */
5149char remove();
5150
5151int main() {
5152
5153/* The GNU C library defines this for functions which it implements
5154    to always fail with ENOSYS.  Some functions are actually named
5155    something starting with __ and the normal name is an alias.  */
5156#if defined (__stub_remove) || defined (__stub___remove)
5157choke me
5158#else
5159remove();
5160#endif
5161
5162; return 0; }
5163EOF
5164if { (eval echo configure:5165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165  rm -rf conftest*
5166  eval "ac_cv_func_remove=yes"
5167else
5168  echo "configure: failed program was:" >&5
5169  cat conftest.$ac_ext >&5
5170  rm -rf conftest*
5171  eval "ac_cv_func_remove=no"
5172fi
5173rm -f conftest*
5174fi
5175
5176if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5177  echo "$ac_t""yes" 1>&6
5178  :
5179else
5180  echo "$ac_t""no" 1>&6
5181fi
5182
5183    if test $ac_cv_func_remove = no; then
5184      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5185echo "configure:5186: checking for remove in -lposix" >&5
5186ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5187if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5188  echo $ac_n "(cached) $ac_c" 1>&6
5189else
5190  ac_save_LIBS="$LIBS"
5191LIBS="-lposix  $LIBS"
5192cat > conftest.$ac_ext <<EOF
5193#line 5194 "configure"
5194#include "confdefs.h"
5195/* Override any gcc2 internal prototype to avoid an error.  */
5196/* We use char because int might match the return type of a gcc2
5197    builtin and then its argument prototype would still apply.  */
5198char remove();
5199
5200int main() {
5201remove()
5202; return 0; }
5203EOF
5204if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5205  rm -rf conftest*
5206  eval "ac_cv_lib_$ac_lib_var=yes"
5207else
5208  echo "configure: failed program was:" >&5
5209  cat conftest.$ac_ext >&5
5210  rm -rf conftest*
5211  eval "ac_cv_lib_$ac_lib_var=no"
5212fi
5213rm -f conftest*
5214LIBS="$ac_save_LIBS"
5215
5216fi
5217if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5218  echo "$ac_t""yes" 1>&6
5219  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5220else
5221  echo "$ac_t""no" 1>&6
5222fi
5223
5224    fi
5225
5226    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5227    echo $ac_n "checking for shmat""... $ac_c" 1>&6
5228echo "configure:5229: checking for shmat" >&5
5229if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5230  echo $ac_n "(cached) $ac_c" 1>&6
5231else
5232  cat > conftest.$ac_ext <<EOF
5233#line 5234 "configure"
5234#include "confdefs.h"
5235/* System header to define __stub macros and hopefully few prototypes,
5236    which can conflict with char shmat(); below.  */
5237#include <assert.h>
5238/* Override any gcc2 internal prototype to avoid an error.  */
5239/* We use char because int might match the return type of a gcc2
5240    builtin and then its argument prototype would still apply.  */
5241char shmat();
5242
5243int main() {
5244
5245/* The GNU C library defines this for functions which it implements
5246    to always fail with ENOSYS.  Some functions are actually named
5247    something starting with __ and the normal name is an alias.  */
5248#if defined (__stub_shmat) || defined (__stub___shmat)
5249choke me
5250#else
5251shmat();
5252#endif
5253
5254; return 0; }
5255EOF
5256if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5257  rm -rf conftest*
5258  eval "ac_cv_func_shmat=yes"
5259else
5260  echo "configure: failed program was:" >&5
5261  cat conftest.$ac_ext >&5
5262  rm -rf conftest*
5263  eval "ac_cv_func_shmat=no"
5264fi
5265rm -f conftest*
5266fi
5267
5268if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5269  echo "$ac_t""yes" 1>&6
5270  :
5271else
5272  echo "$ac_t""no" 1>&6
5273fi
5274
5275    if test $ac_cv_func_shmat = no; then
5276      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5277echo "configure:5278: checking for shmat in -lipc" >&5
5278ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5279if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5280  echo $ac_n "(cached) $ac_c" 1>&6
5281else
5282  ac_save_LIBS="$LIBS"
5283LIBS="-lipc  $LIBS"
5284cat > conftest.$ac_ext <<EOF
5285#line 5286 "configure"
5286#include "confdefs.h"
5287/* Override any gcc2 internal prototype to avoid an error.  */
5288/* We use char because int might match the return type of a gcc2
5289    builtin and then its argument prototype would still apply.  */
5290char shmat();
5291
5292int main() {
5293shmat()
5294; return 0; }
5295EOF
5296if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5297  rm -rf conftest*
5298  eval "ac_cv_lib_$ac_lib_var=yes"
5299else
5300  echo "configure: failed program was:" >&5
5301  cat conftest.$ac_ext >&5
5302  rm -rf conftest*
5303  eval "ac_cv_lib_$ac_lib_var=no"
5304fi
5305rm -f conftest*
5306LIBS="$ac_save_LIBS"
5307
5308fi
5309if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5310  echo "$ac_t""yes" 1>&6
5311  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5312else
5313  echo "$ac_t""no" 1>&6
5314fi
5315
5316    fi
5317  fi
5318
5319  # Check for libraries that X11R6 Xt/Xaw programs need.
5320  ac_save_LDFLAGS="$LDFLAGS"
5321  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5322  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5323  # check for ICE first), but we must link in the order -lSM -lICE or
5324  # we get undefined symbols.  So assume we have SM if we have ICE.
5325  # These have to be linked with before -lX11, unlike the other
5326  # libraries we check for below, so use a different variable.
5327  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5328  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5329echo "configure:5330: checking for IceConnectionNumber in -lICE" >&5
5330ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5331if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5332  echo $ac_n "(cached) $ac_c" 1>&6
5333else
5334  ac_save_LIBS="$LIBS"
5335LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5336cat > conftest.$ac_ext <<EOF
5337#line 5338 "configure"
5338#include "confdefs.h"
5339/* Override any gcc2 internal prototype to avoid an error.  */
5340/* We use char because int might match the return type of a gcc2
5341    builtin and then its argument prototype would still apply.  */
5342char IceConnectionNumber();
5343
5344int main() {
5345IceConnectionNumber()
5346; return 0; }
5347EOF
5348if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5349  rm -rf conftest*
5350  eval "ac_cv_lib_$ac_lib_var=yes"
5351else
5352  echo "configure: failed program was:" >&5
5353  cat conftest.$ac_ext >&5
5354  rm -rf conftest*
5355  eval "ac_cv_lib_$ac_lib_var=no"
5356fi
5357rm -f conftest*
5358LIBS="$ac_save_LIBS"
5359
5360fi
5361if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5362  echo "$ac_t""yes" 1>&6
5363  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5364else
5365  echo "$ac_t""no" 1>&6
5366fi
5367
5368  LDFLAGS="$ac_save_LDFLAGS"
5369
5370fi
5371
5372
5373if test "x$x_includes" = "x"; then
5374  x_includes="/usr/include"
5375fi
5376
5377saved_cflags="$CFLAGS"
5378saved_ldflags="$LDFLAGS"
5379
5380CFLAGS="$CFLAGS $X_CFLAGS"
5381LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
5382
5383if test "x$no_x" = "xyes"; then
5384  { echo "configure: error:
5385*** X libraries or include files not found. Check 'config.log' for
5386*** more details." 1>&2; exit 1; }
5387fi
5388
5389# Checks for libraries.
5390# Check for the X11 library
5391echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5392echo "configure:5393: checking for XOpenDisplay in -lX11" >&5
5393ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5394if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5395  echo $ac_n "(cached) $ac_c" 1>&6
5396else
5397  ac_save_LIBS="$LIBS"
5398LIBS="-lX11 $X_EXTRA_LIBS $LIBS"
5399cat > conftest.$ac_ext <<EOF
5400#line 5401 "configure"
5401#include "confdefs.h"
5402/* Override any gcc2 internal prototype to avoid an error.  */
5403/* We use char because int might match the return type of a gcc2
5404    builtin and then its argument prototype would still apply.  */
5405char XOpenDisplay();
5406
5407int main() {
5408XOpenDisplay()
5409; return 0; }
5410EOF
5411if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5412  rm -rf conftest*
5413  eval "ac_cv_lib_$ac_lib_var=yes"
5414else
5415  echo "configure: failed program was:" >&5
5416  cat conftest.$ac_ext >&5
5417  rm -rf conftest*
5418  eval "ac_cv_lib_$ac_lib_var=no"
5419fi
5420rm -f conftest*
5421LIBS="$ac_save_LIBS"
5422
5423fi
5424if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5425  echo "$ac_t""yes" 1>&6
5426  x_libs="-lX11 $X_EXTRA_LIBS"
5427else
5428  echo "$ac_t""no" 1>&6
5429{ echo "configure: error: *** libX11 not found. Check 'config.log' for more details." 1>&2; exit 1; }
5430fi
5431
5432
5433if test "x$enable_shm" = "xyes"; then
5434  # Check for the Xext library (needed for XShm extention)
5435  echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6
5436echo "configure:5437: checking for XShmAttach in -lXext" >&5
5437ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'`
5438if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5439  echo $ac_n "(cached) $ac_c" 1>&6
5440else
5441  ac_save_LIBS="$LIBS"
5442LIBS="-lXext $x_libs $LIBS"
5443cat > conftest.$ac_ext <<EOF
5444#line 5445 "configure"
5445#include "confdefs.h"
5446/* Override any gcc2 internal prototype to avoid an error.  */
5447/* We use char because int might match the return type of a gcc2
5448    builtin and then its argument prototype would still apply.  */
5449char XShmAttach();
5450
5451int main() {
5452XShmAttach()
5453; return 0; }
5454EOF
5455if { (eval echo configure:5456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5456  rm -rf conftest*
5457  eval "ac_cv_lib_$ac_lib_var=yes"
5458else
5459  echo "configure: failed program was:" >&5
5460  cat conftest.$ac_ext >&5
5461  rm -rf conftest*
5462  eval "ac_cv_lib_$ac_lib_var=no"
5463fi
5464rm -f conftest*
5465LIBS="$ac_save_LIBS"
5466
5467fi
5468if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5469  echo "$ac_t""yes" 1>&6
5470  x_libs="-lXext $x_libs"
5471else
5472  echo "$ac_t""no" 1>&6
5473# On AIX, it is in XextSam instead, but we still need -lXext
5474      echo $ac_n "checking for XShmAttach in -lXextSam""... $ac_c" 1>&6
5475echo "configure:5476: checking for XShmAttach in -lXextSam" >&5
5476ac_lib_var=`echo XextSam'_'XShmAttach | sed 'y%./+-%__p_%'`
5477if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5478  echo $ac_n "(cached) $ac_c" 1>&6
5479else
5480  ac_save_LIBS="$LIBS"
5481LIBS="-lXextSam $x_libs $LIBS"
5482cat > conftest.$ac_ext <<EOF
5483#line 5484 "configure"
5484#include "confdefs.h"
5485/* Override any gcc2 internal prototype to avoid an error.  */
5486/* We use char because int might match the return type of a gcc2
5487    builtin and then its argument prototype would still apply.  */
5488char XShmAttach();
5489
5490int main() {
5491XShmAttach()
5492; return 0; }
5493EOF
5494if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495  rm -rf conftest*
5496  eval "ac_cv_lib_$ac_lib_var=yes"
5497else
5498  echo "configure: failed program was:" >&5
5499  cat conftest.$ac_ext >&5
5500  rm -rf conftest*
5501  eval "ac_cv_lib_$ac_lib_var=no"
5502fi
5503rm -f conftest*
5504LIBS="$ac_save_LIBS"
5505
5506fi
5507if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5508  echo "$ac_t""yes" 1>&6
5509  x_libs="-lXextSam -lXext $x_libs"
5510else
5511  echo "$ac_t""no" 1>&6
5512no_xext_lib=yes
5513fi
5514
5515fi
5516
5517fi
5518
5519# Check for shaped window extension
5520
5521echo $ac_n "checking for XShapeCombineMask in -lXext""... $ac_c" 1>&6
5522echo "configure:5523: checking for XShapeCombineMask in -lXext" >&5
5523ac_lib_var=`echo Xext'_'XShapeCombineMask | sed 'y%./+-%__p_%'`
5524if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5525  echo $ac_n "(cached) $ac_c" 1>&6
5526else
5527  ac_save_LIBS="$LIBS"
5528LIBS="-lXext $x_libs $LIBS"
5529cat > conftest.$ac_ext <<EOF
5530#line 5531 "configure"
5531#include "confdefs.h"
5532/* Override any gcc2 internal prototype to avoid an error.  */
5533/* We use char because int might match the return type of a gcc2
5534    builtin and then its argument prototype would still apply.  */
5535char XShapeCombineMask();
5536
5537int main() {
5538XShapeCombineMask()
5539; return 0; }
5540EOF
5541if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5542  rm -rf conftest*
5543  eval "ac_cv_lib_$ac_lib_var=yes"
5544else
5545  echo "configure: failed program was:" >&5
5546  cat conftest.$ac_ext >&5
5547  rm -rf conftest*
5548  eval "ac_cv_lib_$ac_lib_var=no"
5549fi
5550rm -f conftest*
5551LIBS="$ac_save_LIBS"
5552
5553fi
5554if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5555  echo "$ac_t""yes" 1>&6
5556  if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
5557           x_libs="-lXext $x_libs"
5558      fi
5559      cat >> confdefs.h <<\EOF
5560#define HAVE_SHAPE_EXT 1
5561EOF
5562
5563else
5564  echo "$ac_t""no" 1>&6
5565fi
5566
5567
5568# Check for XConvertCase (X11R6 specific)
5569
5570echo $ac_n "checking for XConvertCase in -lX11""... $ac_c" 1>&6
5571echo "configure:5572: checking for XConvertCase in -lX11" >&5
5572ac_lib_var=`echo X11'_'XConvertCase | sed 'y%./+-%__p_%'`
5573if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5574  echo $ac_n "(cached) $ac_c" 1>&6
5575else
5576  ac_save_LIBS="$LIBS"
5577LIBS="-lX11 $x_libs $LIBS"
5578cat > conftest.$ac_ext <<EOF
5579#line 5580 "configure"
5580#include "confdefs.h"
5581/* Override any gcc2 internal prototype to avoid an error.  */
5582/* We use char because int might match the return type of a gcc2
5583    builtin and then its argument prototype would still apply.  */
5584char XConvertCase();
5585
5586int main() {
5587XConvertCase()
5588; return 0; }
5589EOF
5590if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5591  rm -rf conftest*
5592  eval "ac_cv_lib_$ac_lib_var=yes"
5593else
5594  echo "configure: failed program was:" >&5
5595  cat conftest.$ac_ext >&5
5596  rm -rf conftest*
5597  eval "ac_cv_lib_$ac_lib_var=no"
5598fi
5599rm -f conftest*
5600LIBS="$ac_save_LIBS"
5601
5602fi
5603if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5604  echo "$ac_t""yes" 1>&6
5605  cat >> confdefs.h <<\EOF
5606#define HAVE_XCONVERTCASE 1
5607EOF
5608
5609else
5610  echo "$ac_t""no" 1>&6
5611fi
5612
5613
5614# Check for XIM support.
5615
5616echo $ac_n "checking for XUnregisterIMInstantiateCallback in -lX11""... $ac_c" 1>&6
5617echo "configure:5618: checking for XUnregisterIMInstantiateCallback in -lX11" >&5
5618ac_lib_var=`echo X11'_'XUnregisterIMInstantiateCallback | sed 'y%./+-%__p_%'`
5619if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5620  echo $ac_n "(cached) $ac_c" 1>&6
5621else
5622  ac_save_LIBS="$LIBS"
5623LIBS="-lX11 $x_libs $LIBS"
5624cat > conftest.$ac_ext <<EOF
5625#line 5626 "configure"
5626#include "confdefs.h"
5627/* Override any gcc2 internal prototype to avoid an error.  */
5628/* We use char because int might match the return type of a gcc2
5629    builtin and then its argument prototype would still apply.  */
5630char XUnregisterIMInstantiateCallback();
5631
5632int main() {
5633XUnregisterIMInstantiateCallback()
5634; return 0; }
5635EOF
5636if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637  rm -rf conftest*
5638  eval "ac_cv_lib_$ac_lib_var=yes"
5639else
5640  echo "configure: failed program was:" >&5
5641  cat conftest.$ac_ext >&5
5642  rm -rf conftest*
5643  eval "ac_cv_lib_$ac_lib_var=no"
5644fi
5645rm -f conftest*
5646LIBS="$ac_save_LIBS"
5647
5648fi
5649if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5650  echo "$ac_t""yes" 1>&6
5651  :
5652else
5653  echo "$ac_t""no" 1>&6
5654enable_xim_inst="no"
5655fi
5656
5657
5658# On Solaris, calling XRegisterIMInstantiateCallback seems to
5659# cause an immediate segfault, so we disable it, unless
5660# the user specifically forces it to be on.
5661
5662if test x$enable_xim_inst = xmaybe ; then
5663  case host in
5664        *-*-solaris*)
5665            enable_xim_inst="no"
5666            ;;
5667        *)
5668            enable_xim_inst="yes"
5669            ;;
5670  esac
5671fi
5672
5673if test "x$enable_xim" = "xyes"; then
5674  GTK_XIM_FLAGS="-DUSE_XIM"
5675  if test "x$enable_xim_inst" = "xyes"; then
5676    cat >> confdefs.h <<\EOF
5677#define USE_X11R6_XIM 1
5678EOF
5679
5680  fi
5681fi
5682
5683x_cflags="$X_CFLAGS"
5684x_ldflags="$X_LDFLAGS $X_LIBS"
5685
5686# set up things for XInput
5687
5688if test "x$with_xinput" = "xgxi"; then
5689  echo "configure: warning:
5690*** The generic XInput support has not been tested for several years
5691*** and is not known to work with any currently available X servers" 1>&2
5692  cat >> confdefs.h <<\EOF
5693#define XINPUT_GXI 1
5694EOF
5695
5696  xinput_progs=gxid
5697  x_libs="-lXi $x_libs"
5698elif test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
5699  cat >> confdefs.h <<\EOF
5700#define XINPUT_XFREE 1
5701EOF
5702
5703  x_libs="-lXi $x_libs"
5704else
5705  cat >> confdefs.h <<\EOF
5706#define XINPUT_NONE 1
5707EOF
5708
5709fi
5710
5711CFLAGS="$saved_cflags"
5712LDFLAGS="$saved_ldflags"
5713
5714
5715
5716
5717
5718
5719
5720if test "x$enable_shm" = "xyes"; then
5721  # Check for shared memory
5722  ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
5723echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
5724echo "configure:5725: checking for sys/ipc.h" >&5
5725if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5726  echo $ac_n "(cached) $ac_c" 1>&6
5727else
5728  cat > conftest.$ac_ext <<EOF
5729#line 5730 "configure"
5730#include "confdefs.h"
5731#include <sys/ipc.h>
5732EOF
5733ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5734{ (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5735ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5736if test -z "$ac_err"; then
5737  rm -rf conftest*
5738  eval "ac_cv_header_$ac_safe=yes"
5739else
5740  echo "$ac_err" >&5
5741  echo "configure: failed program was:" >&5
5742  cat conftest.$ac_ext >&5
5743  rm -rf conftest*
5744  eval "ac_cv_header_$ac_safe=no"
5745fi
5746rm -f conftest*
5747fi
5748if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5749  echo "$ac_t""yes" 1>&6
5750  cat >> confdefs.h <<\EOF
5751#define HAVE_IPC_H 1
5752EOF
5753
5754else
5755  echo "$ac_t""no" 1>&6
5756no_sys_ipc=yes
5757fi
5758
5759  ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
5760echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
5761echo "configure:5762: checking for sys/shm.h" >&5
5762if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5763  echo $ac_n "(cached) $ac_c" 1>&6
5764else
5765  cat > conftest.$ac_ext <<EOF
5766#line 5767 "configure"
5767#include "confdefs.h"
5768#include <sys/shm.h>
5769EOF
5770ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5771{ (eval echo configure:5772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5772ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5773if test -z "$ac_err"; then
5774  rm -rf conftest*
5775  eval "ac_cv_header_$ac_safe=yes"
5776else
5777  echo "$ac_err" >&5
5778  echo "configure: failed program was:" >&5
5779  cat conftest.$ac_ext >&5
5780  rm -rf conftest*
5781  eval "ac_cv_header_$ac_safe=no"
5782fi
5783rm -f conftest*
5784fi
5785if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5786  echo "$ac_t""yes" 1>&6
5787  cat >> confdefs.h <<\EOF
5788#define HAVE_SHM_H 1
5789EOF
5790
5791else
5792  echo "$ac_t""no" 1>&6
5793no_sys_shm=yes
5794fi
5795
5796
5797  # Check for the X shared memory extension header file
5798  echo $ac_n "checking X11/extensions/XShm.h""... $ac_c" 1>&6
5799echo "configure:5800: checking X11/extensions/XShm.h" >&5
5800  if test "x$no_xext_lib" = "xyes"; then
5801    echo "$ac_t""no" 1>&6
5802    no_xshm=yes
5803  else
5804    if test -f "$x_includes/X11/extensions/XShm.h"; then
5805      echo "$ac_t""yes" 1>&6
5806      cat >> confdefs.h <<\EOF
5807#define HAVE_XSHM_H 1
5808EOF
5809
5810    else
5811      echo "$ac_t""no" 1>&6
5812      no_xshm=yes
5813    fi
5814  fi
5815fi
5816
5817# Check if X_LOCALE definition is necessary
5818
5819echo $ac_n "checking need -DX_LOCALE""... $ac_c" 1>&6
5820echo "configure:5821: checking need -DX_LOCALE" >&5
5821
5822if test "$cross_compiling" = yes; then
5823  need_x_locale=no
5824else
5825  cat > conftest.$ac_ext <<EOF
5826#line 5827 "configure"
5827#include "confdefs.h"
5828
5829#include <stdio.h>
5830#include <locale.h>
5831
5832int
5833main ()
5834{
5835  return setlocale (LC_ALL, "${with_locale}") == NULL;
5836}
5837EOF
5838if { (eval echo configure:5839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5839then
5840  need_x_locale=no
5841else
5842  echo "configure: failed program was:" >&5
5843  cat conftest.$ac_ext >&5
5844  rm -fr conftest*
5845  need_x_locale=yes
5846fi
5847rm -fr conftest*
5848fi
5849
5850echo "$ac_t""$need_x_locale" 1>&6
5851
5852use_native_locale=no
5853if test $need_x_locale = yes; then
5854  GTK_LOCALE_FLAGS="-DX_LOCALE"
5855else
5856  if test x$with_native_locale = xyes ; then
5857    echo $ac_n "checking functioning locale support""... $ac_c" 1>&6
5858echo "configure:5859: checking functioning locale support" >&5
5859 
5860    cat > conftest.$ac_ext <<EOF
5861#line 5862 "configure"
5862#include "confdefs.h"
5863#include <stdlib.h>
5864int main() {
5865
5866          char c;
5867          if (MB_CUR_MAX == 1) {
5868              wctomb(&c, 42);
5869          }
5870   
5871; return 0; }
5872EOF
5873if { (eval echo configure:5874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5874  rm -rf conftest*
5875  use_native_locale=yes
5876else
5877  echo "configure: failed program was:" >&5
5878  cat conftest.$ac_ext >&5
5879fi
5880rm -f conftest*
5881
5882    echo "$ac_t""$use_native_locale" 1>&6
5883  fi
5884fi
5885
5886if test x$use_native_locale = xyes ; then
5887  echo $ac_n "checking if sizeof(wchar_t) == 4""... $ac_c" 1>&6
5888echo "configure:5889: checking if sizeof(wchar_t) == 4" >&5
5889
5890  if test "$cross_compiling" = yes; then
5891  :
5892else
5893  cat > conftest.$ac_ext <<EOF
5894#line 5895 "configure"
5895#include "confdefs.h"
5896
5897  #include <stdlib.h>
5898
5899  int
5900  main ()
5901  {
5902    return (sizeof(wchar_t) == 4) ? 0 : 1;
5903  }
5904EOF
5905if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5906then
5907  :
5908else
5909  echo "configure: failed program was:" >&5
5910  cat conftest.$ac_ext >&5
5911  rm -fr conftest*
5912  use_native_locale=no
5913fi
5914rm -fr conftest*
5915fi
5916
5917  echo "$ac_t""$use_native_locale" 1>&6
5918fi
5919
5920if test $use_native_locale = yes ; then
5921  cat >> confdefs.h <<\EOF
5922#define USE_NATIVE_LOCALE 1
5923EOF
5924
5925fi
5926
5927# Checks for header files.
5928echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5929echo "configure:5930: checking for ANSI C header files" >&5
5930if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5931  echo $ac_n "(cached) $ac_c" 1>&6
5932else
5933  cat > conftest.$ac_ext <<EOF
5934#line 5935 "configure"
5935#include "confdefs.h"
5936#include <stdlib.h>
5937#include <stdarg.h>
5938#include <string.h>
5939#include <float.h>
5940EOF
5941ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5942{ (eval echo configure:5943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5943ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5944if test -z "$ac_err"; then
5945  rm -rf conftest*
5946  ac_cv_header_stdc=yes
5947else
5948  echo "$ac_err" >&5
5949  echo "configure: failed program was:" >&5
5950  cat conftest.$ac_ext >&5
5951  rm -rf conftest*
5952  ac_cv_header_stdc=no
5953fi
5954rm -f conftest*
5955
5956if test $ac_cv_header_stdc = yes; then
5957  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5958cat > conftest.$ac_ext <<EOF
5959#line 5960 "configure"
5960#include "confdefs.h"
5961#include <string.h>
5962EOF
5963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5964  egrep "memchr" >/dev/null 2>&1; then
5965  :
5966else
5967  rm -rf conftest*
5968  ac_cv_header_stdc=no
5969fi
5970rm -f conftest*
5971
5972fi
5973
5974if test $ac_cv_header_stdc = yes; then
5975  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5976cat > conftest.$ac_ext <<EOF
5977#line 5978 "configure"
5978#include "confdefs.h"
5979#include <stdlib.h>
5980EOF
5981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5982  egrep "free" >/dev/null 2>&1; then
5983  :
5984else
5985  rm -rf conftest*
5986  ac_cv_header_stdc=no
5987fi
5988rm -f conftest*
5989
5990fi
5991
5992if test $ac_cv_header_stdc = yes; then
5993  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5994if test "$cross_compiling" = yes; then
5995  :
5996else
5997  cat > conftest.$ac_ext <<EOF
5998#line 5999 "configure"
5999#include "confdefs.h"
6000#include <ctype.h>
6001#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6002#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6003#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6004int main () { int i; for (i = 0; i < 256; i++)
6005if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6006exit (0); }
6007
6008EOF
6009if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6010then
6011  :
6012else
6013  echo "configure: failed program was:" >&5
6014  cat conftest.$ac_ext >&5
6015  rm -fr conftest*
6016  ac_cv_header_stdc=no
6017fi
6018rm -fr conftest*
6019fi
6020
6021fi
6022fi
6023
6024echo "$ac_t""$ac_cv_header_stdc" 1>&6
6025if test $ac_cv_header_stdc = yes; then
6026  cat >> confdefs.h <<\EOF
6027#define STDC_HEADERS 1
6028EOF
6029
6030fi
6031
6032
6033# Checks for typedefs, structures, and compiler characteristics.
6034echo $ac_n "checking for working const""... $ac_c" 1>&6
6035echo "configure:6036: checking for working const" >&5
6036if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6037  echo $ac_n "(cached) $ac_c" 1>&6
6038else
6039  cat > conftest.$ac_ext <<EOF
6040#line 6041 "configure"
6041#include "confdefs.h"
6042
6043int main() {
6044
6045/* Ultrix mips cc rejects this.  */
6046typedef int charset[2]; const charset x;
6047/* SunOS 4.1.1 cc rejects this.  */
6048char const *const *ccp;
6049char **p;
6050/* NEC SVR4.0.2 mips cc rejects this.  */
6051struct point {int x, y;};
6052static struct point const zero = {0,0};
6053/* AIX XL C 1.02.0.0 rejects this.
6054   It does not let you subtract one const X* pointer from another in an arm
6055   of an if-expression whose if-part is not a constant expression */
6056const char *g = "string";
6057ccp = &g + (g ? g-g : 0);
6058/* HPUX 7.0 cc rejects these. */
6059++ccp;
6060p = (char**) ccp;
6061ccp = (char const *const *) p;
6062{ /* SCO 3.2v4 cc rejects this.  */
6063  char *t;
6064  char const *s = 0 ? (char *) 0 : (char const *) 0;
6065
6066  *t++ = 0;
6067}
6068{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6069  int x[] = {25, 17};
6070  const int *foo = &x[0];
6071  ++foo;
6072}
6073{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6074  typedef const int *iptr;
6075  iptr p = 0;
6076  ++p;
6077}
6078{ /* AIX XL C 1.02.0.0 rejects this saying
6079     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6080  struct s { int j; const int *ap[3]; };
6081  struct s *b; b->j = 5;
6082}
6083{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6084  const int foo = 10;
6085}
6086
6087; return 0; }
6088EOF
6089if { (eval echo configure:6090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6090  rm -rf conftest*
6091  ac_cv_c_const=yes
6092else
6093  echo "configure: failed program was:" >&5
6094  cat conftest.$ac_ext >&5
6095  rm -rf conftest*
6096  ac_cv_c_const=no
6097fi
6098rm -f conftest*
6099fi
6100
6101echo "$ac_t""$ac_cv_c_const" 1>&6
6102if test $ac_cv_c_const = no; then
6103  cat >> confdefs.h <<\EOF
6104#define const
6105EOF
6106
6107fi
6108
6109
6110# Checks for library functions.
6111echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6112echo "configure:6113: checking return type of signal handlers" >&5
6113if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6114  echo $ac_n "(cached) $ac_c" 1>&6
6115else
6116  cat > conftest.$ac_ext <<EOF
6117#line 6118 "configure"
6118#include "confdefs.h"
6119#include <sys/types.h>
6120#include <signal.h>
6121#ifdef signal
6122#undef signal
6123#endif
6124#ifdef __cplusplus
6125extern "C" void (*signal (int, void (*)(int)))(int);
6126#else
6127void (*signal ()) ();
6128#endif
6129
6130int main() {
6131int i;
6132; return 0; }
6133EOF
6134if { (eval echo configure:6135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6135  rm -rf conftest*
6136  ac_cv_type_signal=void
6137else
6138  echo "configure: failed program was:" >&5
6139  cat conftest.$ac_ext >&5
6140  rm -rf conftest*
6141  ac_cv_type_signal=int
6142fi
6143rm -f conftest*
6144fi
6145
6146echo "$ac_t""$ac_cv_type_signal" 1>&6
6147cat >> confdefs.h <<EOF
6148#define RETSIGTYPE $ac_cv_type_signal
6149EOF
6150
6151
6152for ac_hdr in unistd.h
6153do
6154ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6155echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6156echo "configure:6157: checking for $ac_hdr" >&5
6157if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6158  echo $ac_n "(cached) $ac_c" 1>&6
6159else
6160  cat > conftest.$ac_ext <<EOF
6161#line 6162 "configure"
6162#include "confdefs.h"
6163#include <$ac_hdr>
6164EOF
6165ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6166{ (eval echo configure:6167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6167ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6168if test -z "$ac_err"; then
6169  rm -rf conftest*
6170  eval "ac_cv_header_$ac_safe=yes"
6171else
6172  echo "$ac_err" >&5
6173  echo "configure: failed program was:" >&5
6174  cat conftest.$ac_ext >&5
6175  rm -rf conftest*
6176  eval "ac_cv_header_$ac_safe=no"
6177fi
6178rm -f conftest*
6179fi
6180if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6181  echo "$ac_t""yes" 1>&6
6182    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6183  cat >> confdefs.h <<EOF
6184#define $ac_tr_hdr 1
6185EOF
6186 
6187else
6188  echo "$ac_t""no" 1>&6
6189fi
6190done
6191
6192for ac_func in getpagesize
6193do
6194echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6195echo "configure:6196: checking for $ac_func" >&5
6196if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6197  echo $ac_n "(cached) $ac_c" 1>&6
6198else
6199  cat > conftest.$ac_ext <<EOF
6200#line 6201 "configure"
6201#include "confdefs.h"
6202/* System header to define __stub macros and hopefully few prototypes,
6203    which can conflict with char $ac_func(); below.  */
6204#include <assert.h>
6205/* Override any gcc2 internal prototype to avoid an error.  */
6206/* We use char because int might match the return type of a gcc2
6207    builtin and then its argument prototype would still apply.  */
6208char $ac_func();
6209
6210int main() {
6211
6212/* The GNU C library defines this for functions which it implements
6213    to always fail with ENOSYS.  Some functions are actually named
6214    something starting with __ and the normal name is an alias.  */
6215#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6216choke me
6217#else
6218$ac_func();
6219#endif
6220
6221; return 0; }
6222EOF
6223if { (eval echo configure:6224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6224  rm -rf conftest*
6225  eval "ac_cv_func_$ac_func=yes"
6226else
6227  echo "configure: failed program was:" >&5
6228  cat conftest.$ac_ext >&5
6229  rm -rf conftest*
6230  eval "ac_cv_func_$ac_func=no"
6231fi
6232rm -f conftest*
6233fi
6234
6235if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6236  echo "$ac_t""yes" 1>&6
6237    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6238  cat >> confdefs.h <<EOF
6239#define $ac_tr_func 1
6240EOF
6241 
6242else
6243  echo "$ac_t""no" 1>&6
6244fi
6245done
6246
6247echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6248echo "configure:6249: checking for working mmap" >&5
6249if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6250  echo $ac_n "(cached) $ac_c" 1>&6
6251else
6252  if test "$cross_compiling" = yes; then
6253  ac_cv_func_mmap_fixed_mapped=no
6254else
6255  cat > conftest.$ac_ext <<EOF
6256#line 6257 "configure"
6257#include "confdefs.h"
6258
6259/* Thanks to Mike Haertel and Jim Avera for this test.
6260   Here is a matrix of mmap possibilities:
6261        mmap private not fixed
6262        mmap private fixed at somewhere currently unmapped
6263        mmap private fixed at somewhere already mapped
6264        mmap shared not fixed
6265        mmap shared fixed at somewhere currently unmapped
6266        mmap shared fixed at somewhere already mapped
6267   For private mappings, we should verify that changes cannot be read()
6268   back from the file, nor mmap's back from the file at a different
6269   address.  (There have been systems where private was not correctly
6270   implemented like the infamous i386 svr4.0, and systems where the
6271   VM page cache was not coherent with the filesystem buffer cache
6272   like early versions of FreeBSD and possibly contemporary NetBSD.)
6273   For shared mappings, we should conversely verify that changes get
6274   propogated back to all the places they're supposed to be.
6275
6276   Grep wants private fixed already mapped.
6277   The main things grep needs to know about mmap are:
6278   * does it exist and is it safe to write into the mmap'd area
6279   * how to use it (BSD variants)  */
6280#include <sys/types.h>
6281#include <fcntl.h>
6282#include <sys/mman.h>
6283
6284/* This mess was copied from the GNU getpagesize.h.  */
6285#ifndef HAVE_GETPAGESIZE
6286# ifdef HAVE_UNISTD_H
6287#  include <unistd.h>
6288# endif
6289
6290/* Assume that all systems that can run configure have sys/param.h.  */
6291# ifndef HAVE_SYS_PARAM_H
6292#  define HAVE_SYS_PARAM_H 1
6293# endif
6294
6295# ifdef _SC_PAGESIZE
6296#  define getpagesize() sysconf(_SC_PAGESIZE)
6297# else /* no _SC_PAGESIZE */
6298#  ifdef HAVE_SYS_PARAM_H
6299#   include <sys/param.h>
6300#   ifdef EXEC_PAGESIZE
6301#    define getpagesize() EXEC_PAGESIZE
6302#   else /* no EXEC_PAGESIZE */
6303#    ifdef NBPG
6304#     define getpagesize() NBPG * CLSIZE
6305#     ifndef CLSIZE
6306#      define CLSIZE 1
6307#     endif /* no CLSIZE */
6308#    else /* no NBPG */
6309#     ifdef NBPC
6310#      define getpagesize() NBPC
6311#     else /* no NBPC */
6312#      ifdef PAGESIZE
6313#       define getpagesize() PAGESIZE
6314#      endif /* PAGESIZE */
6315#     endif /* no NBPC */
6316#    endif /* no NBPG */
6317#   endif /* no EXEC_PAGESIZE */
6318#  else /* no HAVE_SYS_PARAM_H */
6319#   define getpagesize() 8192   /* punt totally */
6320#  endif /* no HAVE_SYS_PARAM_H */
6321# endif /* no _SC_PAGESIZE */
6322
6323#endif /* no HAVE_GETPAGESIZE */
6324
6325#ifdef __cplusplus
6326extern "C" { void *malloc(unsigned); }
6327#else
6328char *malloc();
6329#endif
6330
6331int
6332main()
6333{
6334        char *data, *data2, *data3;
6335        int i, pagesize;
6336        int fd;
6337
6338        pagesize = getpagesize();
6339
6340        /*
6341         * First, make a file with some known garbage in it.
6342         */
6343        data = malloc(pagesize);
6344        if (!data)
6345                exit(1);
6346        for (i = 0; i < pagesize; ++i)
6347                *(data + i) = rand();
6348        umask(0);
6349        fd = creat("conftestmmap", 0600);
6350        if (fd < 0)
6351                exit(1);
6352        if (write(fd, data, pagesize) != pagesize)
6353                exit(1);
6354        close(fd);
6355
6356        /*
6357         * Next, try to mmap the file at a fixed address which
6358         * already has something else allocated at it.  If we can,
6359         * also make sure that we see the same garbage.
6360         */
6361        fd = open("conftestmmap", O_RDWR);
6362        if (fd < 0)
6363                exit(1);
6364        data2 = malloc(2 * pagesize);
6365        if (!data2)
6366                exit(1);
6367        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6368        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6369            MAP_PRIVATE | MAP_FIXED, fd, 0L))
6370                exit(1);
6371        for (i = 0; i < pagesize; ++i)
6372                if (*(data + i) != *(data2 + i))
6373                        exit(1);
6374
6375        /*
6376         * Finally, make sure that changes to the mapped area
6377         * do not percolate back to the file as seen by read().
6378         * (This is a bug on some variants of i386 svr4.0.)
6379         */
6380        for (i = 0; i < pagesize; ++i)
6381                *(data2 + i) = *(data2 + i) + 1;
6382        data3 = malloc(pagesize);
6383        if (!data3)
6384                exit(1);
6385        if (read(fd, data3, pagesize) != pagesize)
6386                exit(1);
6387        for (i = 0; i < pagesize; ++i)
6388                if (*(data + i) != *(data3 + i))
6389                        exit(1);
6390        close(fd);
6391        unlink("conftestmmap");
6392        exit(0);
6393}
6394
6395EOF
6396if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6397then
6398  ac_cv_func_mmap_fixed_mapped=yes
6399else
6400  echo "configure: failed program was:" >&5
6401  cat conftest.$ac_ext >&5
6402  rm -fr conftest*
6403  ac_cv_func_mmap_fixed_mapped=no
6404fi
6405rm -fr conftest*
6406fi
6407
6408fi
6409
6410echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6411if test $ac_cv_func_mmap_fixed_mapped = yes; then
6412  cat >> confdefs.h <<\EOF
6413#define HAVE_MMAP 1
6414EOF
6415
6416fi
6417
6418
6419for ac_func in getresuid
6420do
6421echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6422echo "configure:6423: checking for $ac_func" >&5
6423if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6424  echo $ac_n "(cached) $ac_c" 1>&6
6425else
6426  cat > conftest.$ac_ext <<EOF
6427#line 6428 "configure"
6428#include "confdefs.h"
6429/* System header to define __stub macros and hopefully few prototypes,
6430    which can conflict with char $ac_func(); below.  */
6431#include <assert.h>
6432/* Override any gcc2 internal prototype to avoid an error.  */
6433/* We use char because int might match the return type of a gcc2
6434    builtin and then its argument prototype would still apply.  */
6435char $ac_func();
6436
6437int main() {
6438
6439/* The GNU C library defines this for functions which it implements
6440    to always fail with ENOSYS.  Some functions are actually named
6441    something starting with __ and the normal name is an alias.  */
6442#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6443choke me
6444#else
6445$ac_func();
6446#endif
6447
6448; return 0; }
6449EOF
6450if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6451  rm -rf conftest*
6452  eval "ac_cv_func_$ac_func=yes"
6453else
6454  echo "configure: failed program was:" >&5
6455  cat conftest.$ac_ext >&5
6456  rm -rf conftest*
6457  eval "ac_cv_func_$ac_func=no"
6458fi
6459rm -f conftest*
6460fi
6461
6462if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6463  echo "$ac_t""yes" 1>&6
6464    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6465  cat >> confdefs.h <<EOF
6466#define $ac_tr_func 1
6467EOF
6468 
6469else
6470  echo "$ac_t""no" 1>&6
6471fi
6472done
6473
6474echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6475echo "configure:6476: checking for uid_t in sys/types.h" >&5
6476if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6477  echo $ac_n "(cached) $ac_c" 1>&6
6478else
6479  cat > conftest.$ac_ext <<EOF
6480#line 6481 "configure"
6481#include "confdefs.h"
6482#include <sys/types.h>
6483EOF
6484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6485  egrep "uid_t" >/dev/null 2>&1; then
6486  rm -rf conftest*
6487  ac_cv_type_uid_t=yes
6488else
6489  rm -rf conftest*
6490  ac_cv_type_uid_t=no
6491fi
6492rm -f conftest*
6493
6494fi
6495
6496echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6497if test $ac_cv_type_uid_t = no; then
6498  cat >> confdefs.h <<\EOF
6499#define uid_t int
6500EOF
6501
6502  cat >> confdefs.h <<\EOF
6503#define gid_t int
6504EOF
6505
6506fi
6507
6508
6509# Check if <sys/select.h> needs to be included for fd_set
6510echo $ac_n "checking for fd_set""... $ac_c" 1>&6
6511echo "configure:6512: checking for fd_set" >&5
6512cat > conftest.$ac_ext <<EOF
6513#line 6514 "configure"
6514#include "confdefs.h"
6515#include <sys/types.h>
6516int main() {
6517fd_set readMask, writeMask;
6518; return 0; }
6519EOF
6520if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6521  rm -rf conftest*
6522  gtk_ok=yes
6523else
6524  echo "configure: failed program was:" >&5
6525  cat conftest.$ac_ext >&5
6526  rm -rf conftest*
6527  gtk_ok=no
6528fi
6529rm -f conftest*
6530if test $gtk_ok = yes; then
6531    echo "$ac_t""yes, found in sys/types.h" 1>&6
6532else
6533    cat > conftest.$ac_ext <<EOF
6534#line 6535 "configure"
6535#include "confdefs.h"
6536#include <sys/select.h>
6537EOF
6538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6539  egrep "fd_mask" >/dev/null 2>&1; then
6540  rm -rf conftest*
6541  gtk_ok=yes
6542fi
6543rm -f conftest*
6544
6545    if test $gtk_ok = yes; then
6546        cat >> confdefs.h <<\EOF
6547#define HAVE_SYS_SELECT_H 1
6548EOF
6549
6550        echo "$ac_t""yes, found in sys/select.h" 1>&6
6551    else
6552        cat >> confdefs.h <<\EOF
6553#define NO_FD_SET 1
6554EOF
6555
6556        echo "$ac_t""no" 1>&6
6557    fi
6558fi
6559
6560# Duplicate `widechar' tests from `glib'.
6561# Check for wchar.h
6562echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
6563echo "configure:6564: checking for wchar.h" >&5
6564cat > conftest.$ac_ext <<EOF
6565#line 6566 "configure"
6566#include "confdefs.h"
6567#include <wchar.h>
6568EOF
6569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6570{ (eval echo configure:6571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6571ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6572if test -z "$ac_err"; then
6573  rm -rf conftest*
6574  gtk_ok=yes
6575else
6576  echo "$ac_err" >&5
6577  echo "configure: failed program was:" >&5
6578  cat conftest.$ac_ext >&5
6579  rm -rf conftest*
6580  gtk_ok=no
6581fi
6582rm -f conftest*
6583if test $gtk_ok = yes; then
6584   cat >> confdefs.h <<\EOF
6585#define HAVE_WCHAR_H 1
6586EOF
6587
6588fi
6589echo "$ac_t""$gtk_ok" 1>&6
6590
6591# Check for wctype.h (for iswalnum)
6592echo $ac_n "checking for wctype.h""... $ac_c" 1>&6
6593echo "configure:6594: checking for wctype.h" >&5
6594cat > conftest.$ac_ext <<EOF
6595#line 6596 "configure"
6596#include "confdefs.h"
6597#include <wctype.h>
6598EOF
6599ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6600{ (eval echo configure:6601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6601ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6602if test -z "$ac_err"; then
6603  rm -rf conftest*
6604  gtk_ok=yes
6605else
6606  echo "$ac_err" >&5
6607  echo "configure: failed program was:" >&5
6608  cat conftest.$ac_ext >&5
6609  rm -rf conftest*
6610  gtk_ok=no
6611fi
6612rm -f conftest*
6613if test $gtk_ok = yes; then
6614   cat >> confdefs.h <<\EOF
6615#define HAVE_WCTYPE_H 1
6616EOF
6617
6618fi
6619echo "$ac_t""$gtk_ok" 1>&6
6620
6621# in Solaris 2.5, `iswalnum' is in -lw
6622GDK_WLIBS=
6623echo $ac_n "checking for iswalnum""... $ac_c" 1>&6
6624echo "configure:6625: checking for iswalnum" >&5
6625if eval "test \"`echo '$''{'ac_cv_func_iswalnum'+set}'`\" = set"; then
6626  echo $ac_n "(cached) $ac_c" 1>&6
6627else
6628  cat > conftest.$ac_ext <<EOF
6629#line 6630 "configure"
6630#include "confdefs.h"
6631/* System header to define __stub macros and hopefully few prototypes,
6632    which can conflict with char iswalnum(); below.  */
6633#include <assert.h>
6634/* Override any gcc2 internal prototype to avoid an error.  */
6635/* We use char because int might match the return type of a gcc2
6636    builtin and then its argument prototype would still apply.  */
6637char iswalnum();
6638
6639int main() {
6640
6641/* The GNU C library defines this for functions which it implements
6642    to always fail with ENOSYS.  Some functions are actually named
6643    something starting with __ and the normal name is an alias.  */
6644#if defined (__stub_iswalnum) || defined (__stub___iswalnum)
6645choke me
6646#else
6647iswalnum();
6648#endif
6649
6650; return 0; }
6651EOF
6652if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6653  rm -rf conftest*
6654  eval "ac_cv_func_iswalnum=yes"
6655else
6656  echo "configure: failed program was:" >&5
6657  cat conftest.$ac_ext >&5
6658  rm -rf conftest*
6659  eval "ac_cv_func_iswalnum=no"
6660fi
6661rm -f conftest*
6662fi
6663
6664if eval "test \"`echo '$ac_cv_func_'iswalnum`\" = yes"; then
6665  echo "$ac_t""yes" 1>&6
6666  :
6667else
6668  echo "$ac_t""no" 1>&6
6669echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6
6670echo "configure:6671: checking for iswalnum in -lw" >&5
6671ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'`
6672if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6673  echo $ac_n "(cached) $ac_c" 1>&6
6674else
6675  ac_save_LIBS="$LIBS"
6676LIBS="-lw  $LIBS"
6677cat > conftest.$ac_ext <<EOF
6678#line 6679 "configure"
6679#include "confdefs.h"
6680/* Override any gcc2 internal prototype to avoid an error.  */
6681/* We use char because int might match the return type of a gcc2
6682    builtin and then its argument prototype would still apply.  */
6683char iswalnum();
6684
6685int main() {
6686iswalnum()
6687; return 0; }
6688EOF
6689if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6690  rm -rf conftest*
6691  eval "ac_cv_lib_$ac_lib_var=yes"
6692else
6693  echo "configure: failed program was:" >&5
6694  cat conftest.$ac_ext >&5
6695  rm -rf conftest*
6696  eval "ac_cv_lib_$ac_lib_var=no"
6697fi
6698rm -f conftest*
6699LIBS="$ac_save_LIBS"
6700
6701fi
6702if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6703  echo "$ac_t""yes" 1>&6
6704  GDK_WLIBS=-lw
6705else
6706  echo "$ac_t""no" 1>&6
6707fi
6708
6709fi
6710
6711
6712# The following is necessary for Linux libc-5.4.38
6713oLIBS="$LIBS"
6714LIBS="$LIBS $GDK_WLIBS"
6715echo $ac_n "checking if iswalnum() and friends are properly defined""... $ac_c" 1>&6
6716echo "configure:6717: checking if iswalnum() and friends are properly defined" >&5
6717cat > conftest.$ac_ext <<EOF
6718#line 6719 "configure"
6719#include "confdefs.h"
6720#include <stdlib.h>
6721int main() {
6722
6723#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
6724#  ifdef HAVE_WCTYPE_H
6725#    include <wctype.h>
6726#  else
6727#    ifdef HAVE_WCHAR_H
6728#      include <wchar.h>
6729#    endif
6730#  endif
6731#else
6732#  define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
6733#endif
6734iswalnum((wchar_t) 0);
6735
6736; return 0; }
6737EOF
6738if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6739  rm -rf conftest*
6740  gtk_ok=yes
6741else
6742  echo "configure: failed program was:" >&5
6743  cat conftest.$ac_ext >&5
6744  rm -rf conftest*
6745  gtk_ok=no
6746fi
6747rm -f conftest*
6748LIBS="$oLIBS"
6749
6750if test $gtk_ok = no; then
6751   cat >> confdefs.h <<\EOF
6752#define HAVE_BROKEN_WCTYPE 1
6753EOF
6754
6755   GDK_WLIBS=
6756fi
6757echo "$ac_t""$gtk_ok" 1>&6
6758
6759
6760
6761
6762
6763
6764trap '' 1 2 15
6765cat > confcache <<\EOF
6766# This file is a shell script that caches the results of configure
6767# tests run on this system so they can be shared between configure
6768# scripts and configure runs.  It is not useful on other systems.
6769# If it contains results you don't want to keep, you may remove or edit it.
6770#
6771# By default, configure uses ./config.cache as the cache file,
6772# creating it if it does not exist already.  You can give configure
6773# the --cache-file=FILE option to use a different cache file; that is
6774# what configure does when it calls configure scripts in
6775# subdirectories, so they share the cache.
6776# Giving --cache-file=/dev/null disables caching, for debugging configure.
6777# config.status only pays attention to the cache file if you give it the
6778# --recheck option to rerun configure.
6779#
6780EOF
6781# The following way of writing the cache mishandles newlines in values,
6782# but we know of no workaround that is simple, portable, and efficient.
6783# So, don't put newlines in cache variables' values.
6784# Ultrix sh set writes to stderr and can't be redirected directly,
6785# and sets the high bit in the cache file unless we assign to the vars.
6786(set) 2>&1 |
6787  case `(ac_space=' '; set | grep ac_space) 2>&1` in
6788  *ac_space=\ *)
6789    # `set' does not quote correctly, so add quotes (double-quote substitution
6790    # turns \\\\ into \\, and sed turns \\ into \).
6791    sed -n \
6792      -e "s/'/'\\\\''/g" \
6793      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6794    ;;
6795  *)
6796    # `set' quotes correctly as required by POSIX, so do not add quotes.
6797    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6798    ;;
6799  esac >> confcache
6800if cmp -s $cache_file confcache; then
6801  :
6802else
6803  if test -w $cache_file; then
6804    echo "updating cache $cache_file"
6805    cat confcache > $cache_file
6806  else
6807    echo "not updating unwritable cache $cache_file"
6808  fi
6809fi
6810rm -f confcache
6811
6812trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6813
6814test "x$prefix" = xNONE && prefix=$ac_default_prefix
6815# Let make expand exec_prefix.
6816test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6817
6818# Any assignment to VPATH causes Sun make to only execute
6819# the first set of double-colon rules, so remove it if not needed.
6820# If there is a colon in the path, we need to keep it.
6821if test "x$srcdir" = x.; then
6822  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6823fi
6824
6825trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6826
6827DEFS=-DHAVE_CONFIG_H
6828
6829# Without the "./", some shells look in PATH for config.status.
6830: ${CONFIG_STATUS=./config.status}
6831
6832echo creating $CONFIG_STATUS
6833rm -f $CONFIG_STATUS
6834cat > $CONFIG_STATUS <<EOF
6835#! /bin/sh
6836# Generated automatically by configure.
6837# Run this file to recreate the current configuration.
6838# This directory was configured as follows,
6839# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6840#
6841# $0 $ac_configure_args
6842#
6843# Compiler output produced by configure, useful for debugging
6844# configure, is in ./config.log if it exists.
6845
6846ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6847for ac_option
6848do
6849  case "\$ac_option" in
6850  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6851    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6852    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6853  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6854    echo "$CONFIG_STATUS generated by autoconf version 2.13"
6855    exit 0 ;;
6856  -help | --help | --hel | --he | --h)
6857    echo "\$ac_cs_usage"; exit 0 ;;
6858  *) echo "\$ac_cs_usage"; exit 1 ;;
6859  esac
6860done
6861
6862ac_given_srcdir=$srcdir
6863ac_given_INSTALL="$INSTALL"
6864
6865trap 'rm -fr `echo "
6866gtk+.spec
6867docs/gtk-config.1
6868Makefile
6869gtk-config
6870po/Makefile.in
6871docs/Makefile
6872gdk/Makefile
6873gtk/Makefile
6874gtk/gtkfeatures.h
6875gdk.pc
6876gtk+.pc
6877 config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6878EOF
6879cat >> $CONFIG_STATUS <<EOF
6880
6881# Protect against being on the right side of a sed subst in config.status.
6882sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6883 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6884$ac_vpsub
6885$extrasub
6886s%@SHELL@%$SHELL%g
6887s%@CFLAGS@%$CFLAGS%g
6888s%@CPPFLAGS@%$CPPFLAGS%g
6889s%@CXXFLAGS@%$CXXFLAGS%g
6890s%@FFLAGS@%$FFLAGS%g
6891s%@DEFS@%$DEFS%g
6892s%@LDFLAGS@%$LDFLAGS%g
6893s%@LIBS@%$LIBS%g
6894s%@exec_prefix@%$exec_prefix%g
6895s%@prefix@%$prefix%g
6896s%@program_transform_name@%$program_transform_name%g
6897s%@bindir@%$bindir%g
6898s%@sbindir@%$sbindir%g
6899s%@libexecdir@%$libexecdir%g
6900s%@datadir@%$datadir%g
6901s%@sysconfdir@%$sysconfdir%g
6902s%@sharedstatedir@%$sharedstatedir%g
6903s%@localstatedir@%$localstatedir%g
6904s%@libdir@%$libdir%g
6905s%@includedir@%$includedir%g
6906s%@oldincludedir@%$oldincludedir%g
6907s%@infodir@%$infodir%g
6908s%@mandir@%$mandir%g
6909s%@GTK_MAJOR_VERSION@%$GTK_MAJOR_VERSION%g
6910s%@GTK_MINOR_VERSION@%$GTK_MINOR_VERSION%g
6911s%@GTK_MICRO_VERSION@%$GTK_MICRO_VERSION%g
6912s%@GTK_INTERFACE_AGE@%$GTK_INTERFACE_AGE%g
6913s%@GTK_BINARY_AGE@%$GTK_BINARY_AGE%g
6914s%@GTK_VERSION@%$GTK_VERSION%g
6915s%@LT_RELEASE@%$LT_RELEASE%g
6916s%@LT_CURRENT@%$LT_CURRENT%g
6917s%@LT_REVISION@%$LT_REVISION%g
6918s%@LT_AGE@%$LT_AGE%g
6919s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6920s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6921s%@INSTALL_DATA@%$INSTALL_DATA%g
6922s%@PACKAGE@%$PACKAGE%g
6923s%@VERSION@%$VERSION%g
6924s%@ACLOCAL@%$ACLOCAL%g
6925s%@AUTOCONF@%$AUTOCONF%g
6926s%@AUTOMAKE@%$AUTOMAKE%g
6927s%@AUTOHEADER@%$AUTOHEADER%g
6928s%@MAKEINFO@%$MAKEINFO%g
6929s%@SET_MAKE@%$SET_MAKE%g
6930s%@host@%$host%g
6931s%@host_alias@%$host_alias%g
6932s%@host_cpu@%$host_cpu%g
6933s%@host_vendor@%$host_vendor%g
6934s%@host_os@%$host_os%g
6935s%@build@%$build%g
6936s%@build_alias@%$build_alias%g
6937s%@build_cpu@%$build_cpu%g
6938s%@build_vendor@%$build_vendor%g
6939s%@build_os@%$build_os%g
6940s%@RANLIB@%$RANLIB%g
6941s%@CC@%$CC%g
6942s%@LN_S@%$LN_S%g
6943s%@LIBTOOL@%$LIBTOOL%g
6944s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6945s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6946s%@MAINT@%$MAINT%g
6947s%@AWK@%$AWK%g
6948s%@PERL@%$PERL%g
6949s%@INDENT@%$INDENT%g
6950s%@REBUILD@%$REBUILD%g
6951s%@STRIP_DUMMY@%$STRIP_DUMMY%g
6952s%@STRIP_BEGIN@%$STRIP_BEGIN%g
6953s%@STRIP_END@%$STRIP_END%g
6954s%@CPP@%$CPP%g
6955s%@ALLOCA@%$ALLOCA%g
6956s%@USE_NLS@%$USE_NLS%g
6957s%@MSGFMT@%$MSGFMT%g
6958s%@GMSGFMT@%$GMSGFMT%g
6959s%@XGETTEXT@%$XGETTEXT%g
6960s%@GENCAT@%$GENCAT%g
6961s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6962s%@CATALOGS@%$CATALOGS%g
6963s%@CATOBJEXT@%$CATOBJEXT%g
6964s%@DATADIRNAME@%$DATADIRNAME%g
6965s%@GMOFILES@%$GMOFILES%g
6966s%@INSTOBJEXT@%$INSTOBJEXT%g
6967s%@INTLDEPS@%$INTLDEPS%g
6968s%@INTLLIBS@%$INTLLIBS%g
6969s%@INTLOBJS@%$INTLOBJS%g
6970s%@POFILES@%$POFILES%g
6971s%@POSUB@%$POSUB%g
6972s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6973s%@GT_NO@%$GT_NO%g
6974s%@GT_YES@%$GT_YES%g
6975s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6976s%@l@%$l%g
6977s%@gtklocaledir@%$gtklocaledir%g
6978s%@GLIB_CONFIG@%$GLIB_CONFIG%g
6979s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
6980s%@GLIB_LIBS@%$GLIB_LIBS%g
6981s%@glib_cflags@%$glib_cflags%g
6982s%@glib_libs@%$glib_libs%g
6983s%@glib_thread_cflags@%$glib_thread_cflags%g
6984s%@glib_thread_libs@%$glib_thread_libs%g
6985s%@GLIB_DEPLIBS@%$GLIB_DEPLIBS%g
6986s%@X_CFLAGS@%$X_CFLAGS%g
6987s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6988s%@X_LIBS@%$X_LIBS%g
6989s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6990s%@x_cflags@%$x_cflags%g
6991s%@x_includes@%$x_includes%g
6992s%@x_ldflags@%$x_ldflags%g
6993s%@x_libs@%$x_libs%g
6994s%@xinput_progs@%$xinput_progs%g
6995s%@GDK_WLIBS@%$GDK_WLIBS%g
6996s%@GTK_DEBUG_FLAGS@%$GTK_DEBUG_FLAGS%g
6997s%@GTK_XIM_FLAGS@%$GTK_XIM_FLAGS%g
6998s%@GTK_LOCALE_FLAGS@%$GTK_LOCALE_FLAGS%g
6999
7000CEOF
7001EOF
7002
7003cat >> $CONFIG_STATUS <<\EOF
7004
7005# Split the substitutions into bite-sized pieces for seds with
7006# small command number limits, like on Digital OSF/1 and HP-UX.
7007ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7008ac_file=1 # Number of current file.
7009ac_beg=1 # First line for current file.
7010ac_end=$ac_max_sed_cmds # Line after last line for current file.
7011ac_more_lines=:
7012ac_sed_cmds=""
7013while $ac_more_lines; do
7014  if test $ac_beg -gt 1; then
7015    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7016  else
7017    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7018  fi
7019  if test ! -s conftest.s$ac_file; then
7020    ac_more_lines=false
7021    rm -f conftest.s$ac_file
7022  else
7023    if test -z "$ac_sed_cmds"; then
7024      ac_sed_cmds="sed -f conftest.s$ac_file"
7025    else
7026      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7027    fi
7028    ac_file=`expr $ac_file + 1`
7029    ac_beg=$ac_end
7030    ac_end=`expr $ac_end + $ac_max_sed_cmds`
7031  fi
7032done
7033if test -z "$ac_sed_cmds"; then
7034  ac_sed_cmds=cat
7035fi
7036EOF
7037
7038cat >> $CONFIG_STATUS <<EOF
7039
7040CONFIG_FILES=\${CONFIG_FILES-"gtk+.spec
7041docs/gtk-config.1
7042Makefile
7043gtk-config
7044po/Makefile.in
7045docs/Makefile
7046gdk/Makefile
7047gtk/Makefile
7048gtk/gtkfeatures.h
7049gdk.pc
7050gtk+.pc
7051"}
7052EOF
7053cat >> $CONFIG_STATUS <<\EOF
7054for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7055  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7056  case "$ac_file" in
7057  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7058       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7059  *) ac_file_in="${ac_file}.in" ;;
7060  esac
7061
7062  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7063
7064  # Remove last slash and all that follows it.  Not all systems have dirname.
7065  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7066  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7067    # The file is in a subdirectory.
7068    test ! -d "$ac_dir" && mkdir "$ac_dir"
7069    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7070    # A "../" for each directory in $ac_dir_suffix.
7071    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7072  else
7073    ac_dir_suffix= ac_dots=
7074  fi
7075
7076  case "$ac_given_srcdir" in
7077  .)  srcdir=.
7078      if test -z "$ac_dots"; then top_srcdir=.
7079      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7080  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7081  *) # Relative path.
7082    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7083    top_srcdir="$ac_dots$ac_given_srcdir" ;;
7084  esac
7085
7086  case "$ac_given_INSTALL" in
7087  [/$]*) INSTALL="$ac_given_INSTALL" ;;
7088  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7089  esac
7090
7091  echo creating "$ac_file"
7092  rm -f "$ac_file"
7093  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7094  case "$ac_file" in
7095  *Makefile*) ac_comsub="1i\\
7096# $configure_input" ;;
7097  *) ac_comsub= ;;
7098  esac
7099
7100  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7101  sed -e "$ac_comsub
7102s%@configure_input@%$configure_input%g
7103s%@srcdir@%$srcdir%g
7104s%@top_srcdir@%$top_srcdir%g
7105s%@INSTALL@%$INSTALL%g
7106" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7107fi; done
7108rm -f conftest.s*
7109
7110# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7111# NAME is the cpp macro being defined and VALUE is the value it is being given.
7112#
7113# ac_d sets the value in "#define NAME VALUE" lines.
7114ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7115ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7116ac_dC='\3'
7117ac_dD='%g'
7118# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7119ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7120ac_uB='\([      ]\)%\1#\2define\3'
7121ac_uC=' '
7122ac_uD='\4%g'
7123# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7124ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7125ac_eB='$%\1#\2define\3'
7126ac_eC=' '
7127ac_eD='%g'
7128
7129if test "${CONFIG_HEADERS+set}" != set; then
7130EOF
7131cat >> $CONFIG_STATUS <<EOF
7132  CONFIG_HEADERS="config.h"
7133EOF
7134cat >> $CONFIG_STATUS <<\EOF
7135fi
7136for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7137  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7138  case "$ac_file" in
7139  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7140       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7141  *) ac_file_in="${ac_file}.in" ;;
7142  esac
7143
7144  echo creating $ac_file
7145
7146  rm -f conftest.frag conftest.in conftest.out
7147  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7148  cat $ac_file_inputs > conftest.in
7149
7150EOF
7151
7152# Transform confdefs.h into a sed script conftest.vals that substitutes
7153# the proper values into config.h.in to produce config.h.  And first:
7154# Protect against being on the right side of a sed subst in config.status.
7155# Protect against being in an unquoted here document in config.status.
7156rm -f conftest.vals
7157cat > conftest.hdr <<\EOF
7158s/[\\&%]/\\&/g
7159s%[\\$`]%\\&%g
7160s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7161s%ac_d%ac_u%gp
7162s%ac_u%ac_e%gp
7163EOF
7164sed -n -f conftest.hdr confdefs.h > conftest.vals
7165rm -f conftest.hdr
7166
7167# This sed command replaces #undef with comments.  This is necessary, for
7168# example, in the case of _POSIX_SOURCE, which is predefined and required
7169# on some systems where configure will not decide to define it.
7170cat >> conftest.vals <<\EOF
7171s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7172EOF
7173
7174# Break up conftest.vals because some shells have a limit on
7175# the size of here documents, and old seds have small limits too.
7176
7177rm -f conftest.tail
7178while :
7179do
7180  ac_lines=`grep -c . conftest.vals`
7181  # grep -c gives empty output for an empty file on some AIX systems.
7182  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7183  # Write a limited-size here document to conftest.frag.
7184  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7185  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7186  echo 'CEOF
7187  sed -f conftest.frag conftest.in > conftest.out
7188  rm -f conftest.in
7189  mv conftest.out conftest.in
7190' >> $CONFIG_STATUS
7191  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7192  rm -f conftest.vals
7193  mv conftest.tail conftest.vals
7194done
7195rm -f conftest.vals
7196
7197cat >> $CONFIG_STATUS <<\EOF
7198  rm -f conftest.frag conftest.h
7199  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7200  cat conftest.in >> conftest.h
7201  rm -f conftest.in
7202  if cmp -s $ac_file conftest.h 2>/dev/null; then
7203    echo "$ac_file is unchanged"
7204    rm -f conftest.h
7205  else
7206    # Remove last slash and all that follows it.  Not all systems have dirname.
7207      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7208      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7209      # The file is in a subdirectory.
7210      test ! -d "$ac_dir" && mkdir "$ac_dir"
7211    fi
7212    rm -f $ac_file
7213    mv conftest.h $ac_file
7214  fi
7215fi; done
7216
7217EOF
7218
7219cat >> $CONFIG_STATUS <<EOF
7220ac_sources="$nls_cv_header_libgt"
7221ac_dests="$nls_cv_header_intl"
7222EOF
7223
7224cat >> $CONFIG_STATUS <<\EOF
7225srcdir=$ac_given_srcdir
7226while test -n "$ac_sources"; do
7227  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7228  set $ac_sources; ac_source=$1; shift; ac_sources=$*
7229
7230  echo "linking $srcdir/$ac_source to $ac_dest"
7231
7232  if test ! -r $srcdir/$ac_source; then
7233    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7234  fi
7235  rm -f $ac_dest
7236
7237  # Make relative symlinks.
7238  # Remove last slash and all that follows it.  Not all systems have dirname.
7239  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7240  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7241    # The dest file is in a subdirectory.
7242    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7243    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7244    # A "../" for each directory in $ac_dest_dir_suffix.
7245    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7246  else
7247    ac_dest_dir_suffix= ac_dots=
7248  fi
7249
7250  case "$srcdir" in
7251  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7252  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7253  esac
7254
7255  # Make a symlink if possible; otherwise try a hard link.
7256  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7257    ln $srcdir/$ac_source $ac_dest; then :
7258  else
7259    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7260  fi
7261done
7262EOF
7263cat >> $CONFIG_STATUS <<EOF
7264
7265
7266
7267EOF
7268cat >> $CONFIG_STATUS <<\EOF
7269test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
7270case "$CONFIG_FILES" in *po/Makefile.in*)
7271        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7272      esac
7273chmod +x gtk-config
7274exit 0
7275EOF
7276chmod +x $CONFIG_STATUS
7277rm -fr confdefs* $ac_clean_files
7278test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7279
Note: See TracBrowser for help on using the repository browser.