source: trunk/third/sawfish/configure @ 17371

Revision 17371, 129.1 KB checked in by ghudson, 23 years ago (diff)
Merge with sawfish 1.0.1.
  • Property svn:executable set to *
Line 
1#! /bin/sh
2
3# From configure.in Revision: 1.1.1.4
4
5
6
7
8
9
10# Configure paths for IMLIB
11# Frank Belew     98-8-31
12# stolen from Manish Singh
13# Shamelessly stolen from Owen Taylor
14
15
16
17# Check for gdk-imlib
18
19
20# Configure paths for GTK+
21# Owen Taylor     97-11-3
22
23
24
25# Guess values for system-dependent variables and create Makefiles.
26# Generated automatically using autoconf version 2.13
27# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
28#
29# This configure script is free software; the Free Software Foundation
30# gives unlimited permission to copy, distribute and modify it.
31
32# Defaults:
33ac_help=
34ac_default_prefix=/usr/local
35# Any additions from configure.in:
36ac_help="$ac_help
37  --with-x                use the X Window System"
38ac_help="$ac_help
39  --with-rep-prefix=PFX   Prefix where rep is installed (optional)"
40ac_help="$ac_help
41  --with-gdk-pixbuf       Use gdk-pixbuf for image management
42  --without-gdk-pixbuf    Use Imlib1 instead"
43ac_help="$ac_help
44  --with-imlib-prefix=PFX   Prefix where IMLIB is installed (optional)"
45ac_help="$ac_help
46  --with-imlib-exec-prefix=PFX Exec prefix where IMLIB is installed (optional)"
47ac_help="$ac_help
48  --disable-imlibtest       Do not try to compile and run a test IMLIB program"
49ac_help="$ac_help
50  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
51ac_help="$ac_help
52  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
53ac_help="$ac_help
54  --disable-gtktest       Do not try to compile and run a test GTK program"
55ac_help="$ac_help
56  --with-audiofile        Use libaudiofile for sound manipulation
57  --without-audiofile"
58ac_help="$ac_help
59  --with-esd              Use the Enlightened Sound Daemon
60  --without-esd"
61ac_help="$ac_help
62  --enable-capplet        Build the sawfish GNOME capplet [default]
63  --disable-capplet       Don't built the capplet"
64ac_help="$ac_help
65  --enable-themer         Build the sawfish-themer program [default]
66  --disable-themer        Don't build the themer"
67ac_help="$ac_help
68  --enable-gnome-widgets  Use GNOME widgets in places [default]
69  --disable-gnome-widgets Don't use GNOME widgets"
70ac_help="$ac_help
71  --with-gnome-prefix=DIR Root of GNOME installation"
72ac_help="$ac_help
73  --enable-linguas=LANGS... Install language catalogs for language codes LANGS"
74
75# Initialize some variables set by options.
76# The variables have the same names as the options, with
77# dashes changed to underlines.
78build=NONE
79cache_file=./config.cache
80exec_prefix=NONE
81host=NONE
82no_create=
83nonopt=NONE
84no_recursion=
85prefix=NONE
86program_prefix=NONE
87program_suffix=NONE
88program_transform_name=s,x,x,
89silent=
90site=
91srcdir=
92target=NONE
93verbose=
94x_includes=NONE
95x_libraries=NONE
96bindir='${exec_prefix}/bin'
97sbindir='${exec_prefix}/sbin'
98libexecdir='${exec_prefix}/libexec'
99datadir='${prefix}/share'
100sysconfdir='${prefix}/etc'
101sharedstatedir='${prefix}/com'
102localstatedir='${prefix}/var'
103libdir='${exec_prefix}/lib'
104includedir='${prefix}/include'
105oldincludedir='/usr/include'
106infodir='${prefix}/info'
107mandir='${prefix}/man'
108
109# Initialize some other variables.
110subdirs=
111MFLAGS= MAKEFLAGS=
112SHELL=${CONFIG_SHELL-/bin/sh}
113# Maximum number of lines to put in a shell here document.
114ac_max_here_lines=12
115
116ac_prev=
117for ac_option
118do
119
120  # If the previous option needs an argument, assign it.
121  if test -n "$ac_prev"; then
122    eval "$ac_prev=\$ac_option"
123    ac_prev=
124    continue
125  fi
126
127  case "$ac_option" in
128  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
129  *) ac_optarg= ;;
130  esac
131
132  # Accept the important Cygnus configure options, so we can diagnose typos.
133
134  case "$ac_option" in
135
136  -bindir | --bindir | --bindi | --bind | --bin | --bi)
137    ac_prev=bindir ;;
138  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
139    bindir="$ac_optarg" ;;
140
141  -build | --build | --buil | --bui | --bu)
142    ac_prev=build ;;
143  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
144    build="$ac_optarg" ;;
145
146  -cache-file | --cache-file | --cache-fil | --cache-fi \
147  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
148    ac_prev=cache_file ;;
149  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
150  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
151    cache_file="$ac_optarg" ;;
152
153  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
154    ac_prev=datadir ;;
155  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
156  | --da=*)
157    datadir="$ac_optarg" ;;
158
159  -disable-* | --disable-*)
160    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
161    # Reject names that are not valid shell variable names.
162    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
163      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
164    fi
165    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
166    eval "enable_${ac_feature}=no" ;;
167
168  -enable-* | --enable-*)
169    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
170    # Reject names that are not valid shell variable names.
171    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
172      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
173    fi
174    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
175    case "$ac_option" in
176      *=*) ;;
177      *) ac_optarg=yes ;;
178    esac
179    eval "enable_${ac_feature}='$ac_optarg'" ;;
180
181  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
182  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
183  | --exec | --exe | --ex)
184    ac_prev=exec_prefix ;;
185  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
186  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
187  | --exec=* | --exe=* | --ex=*)
188    exec_prefix="$ac_optarg" ;;
189
190  -gas | --gas | --ga | --g)
191    # Obsolete; use --with-gas.
192    with_gas=yes ;;
193
194  -help | --help | --hel | --he)
195    # Omit some internal or obsolete options to make the list less imposing.
196    # This message is too long to be a string in the A/UX 3.1 sh.
197    cat << EOF
198Usage: configure [options] [host]
199Options: [defaults in brackets after descriptions]
200Configuration:
201  --cache-file=FILE       cache test results in FILE
202  --help                  print this message
203  --no-create             do not create output files
204  --quiet, --silent       do not print \`checking...' messages
205  --version               print the version of autoconf that created configure
206Directory and file names:
207  --prefix=PREFIX         install architecture-independent files in PREFIX
208                          [$ac_default_prefix]
209  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
210                          [same as prefix]
211  --bindir=DIR            user executables in DIR [EPREFIX/bin]
212  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
213  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
214  --datadir=DIR           read-only architecture-independent data in DIR
215                          [PREFIX/share]
216  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
217  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
218                          [PREFIX/com]
219  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
220  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
221  --includedir=DIR        C header files in DIR [PREFIX/include]
222  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
223  --infodir=DIR           info documentation in DIR [PREFIX/info]
224  --mandir=DIR            man documentation in DIR [PREFIX/man]
225  --srcdir=DIR            find the sources in DIR [configure dir or ..]
226  --program-prefix=PREFIX prepend PREFIX to installed program names
227  --program-suffix=SUFFIX append SUFFIX to installed program names
228  --program-transform-name=PROGRAM
229                          run sed PROGRAM on installed program names
230EOF
231    cat << EOF
232Host type:
233  --build=BUILD           configure for building on BUILD [BUILD=HOST]
234  --host=HOST             configure for HOST [guessed]
235  --target=TARGET         configure for TARGET [TARGET=HOST]
236Features and packages:
237  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
238  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
239  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
240  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
241  --x-includes=DIR        X include files are in DIR
242  --x-libraries=DIR       X library files are in DIR
243EOF
244    if test -n "$ac_help"; then
245      echo "--enable and --with options recognized:$ac_help"
246    fi
247    exit 0 ;;
248
249  -host | --host | --hos | --ho)
250    ac_prev=host ;;
251  -host=* | --host=* | --hos=* | --ho=*)
252    host="$ac_optarg" ;;
253
254  -includedir | --includedir | --includedi | --included | --include \
255  | --includ | --inclu | --incl | --inc)
256    ac_prev=includedir ;;
257  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
258  | --includ=* | --inclu=* | --incl=* | --inc=*)
259    includedir="$ac_optarg" ;;
260
261  -infodir | --infodir | --infodi | --infod | --info | --inf)
262    ac_prev=infodir ;;
263  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264    infodir="$ac_optarg" ;;
265
266  -libdir | --libdir | --libdi | --libd)
267    ac_prev=libdir ;;
268  -libdir=* | --libdir=* | --libdi=* | --libd=*)
269    libdir="$ac_optarg" ;;
270
271  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
272  | --libexe | --libex | --libe)
273    ac_prev=libexecdir ;;
274  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
275  | --libexe=* | --libex=* | --libe=*)
276    libexecdir="$ac_optarg" ;;
277
278  -localstatedir | --localstatedir | --localstatedi | --localstated \
279  | --localstate | --localstat | --localsta | --localst \
280  | --locals | --local | --loca | --loc | --lo)
281    ac_prev=localstatedir ;;
282  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
283  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
284  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
285    localstatedir="$ac_optarg" ;;
286
287  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
288    ac_prev=mandir ;;
289  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
290    mandir="$ac_optarg" ;;
291
292  -nfp | --nfp | --nf)
293    # Obsolete; use --without-fp.
294    with_fp=no ;;
295
296  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
297  | --no-cr | --no-c)
298    no_create=yes ;;
299
300  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
301  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
302    no_recursion=yes ;;
303
304  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
305  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
306  | --oldin | --oldi | --old | --ol | --o)
307    ac_prev=oldincludedir ;;
308  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
309  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
310  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
311    oldincludedir="$ac_optarg" ;;
312
313  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
314    ac_prev=prefix ;;
315  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
316    prefix="$ac_optarg" ;;
317
318  -program-prefix | --program-prefix | --program-prefi | --program-pref \
319  | --program-pre | --program-pr | --program-p)
320    ac_prev=program_prefix ;;
321  -program-prefix=* | --program-prefix=* | --program-prefi=* \
322  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
323    program_prefix="$ac_optarg" ;;
324
325  -program-suffix | --program-suffix | --program-suffi | --program-suff \
326  | --program-suf | --program-su | --program-s)
327    ac_prev=program_suffix ;;
328  -program-suffix=* | --program-suffix=* | --program-suffi=* \
329  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
330    program_suffix="$ac_optarg" ;;
331
332  -program-transform-name | --program-transform-name \
333  | --program-transform-nam | --program-transform-na \
334  | --program-transform-n | --program-transform- \
335  | --program-transform | --program-transfor \
336  | --program-transfo | --program-transf \
337  | --program-trans | --program-tran \
338  | --progr-tra | --program-tr | --program-t)
339    ac_prev=program_transform_name ;;
340  -program-transform-name=* | --program-transform-name=* \
341  | --program-transform-nam=* | --program-transform-na=* \
342  | --program-transform-n=* | --program-transform-=* \
343  | --program-transform=* | --program-transfor=* \
344  | --program-transfo=* | --program-transf=* \
345  | --program-trans=* | --program-tran=* \
346  | --progr-tra=* | --program-tr=* | --program-t=*)
347    program_transform_name="$ac_optarg" ;;
348
349  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
350  | -silent | --silent | --silen | --sile | --sil)
351    silent=yes ;;
352
353  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
354    ac_prev=sbindir ;;
355  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
356  | --sbi=* | --sb=*)
357    sbindir="$ac_optarg" ;;
358
359  -sharedstatedir | --sharedstatedir | --sharedstatedi \
360  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
361  | --sharedst | --shareds | --shared | --share | --shar \
362  | --sha | --sh)
363    ac_prev=sharedstatedir ;;
364  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
365  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
366  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
367  | --sha=* | --sh=*)
368    sharedstatedir="$ac_optarg" ;;
369
370  -site | --site | --sit)
371    ac_prev=site ;;
372  -site=* | --site=* | --sit=*)
373    site="$ac_optarg" ;;
374
375  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
376    ac_prev=srcdir ;;
377  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
378    srcdir="$ac_optarg" ;;
379
380  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
381  | --syscon | --sysco | --sysc | --sys | --sy)
382    ac_prev=sysconfdir ;;
383  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
384  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
385    sysconfdir="$ac_optarg" ;;
386
387  -target | --target | --targe | --targ | --tar | --ta | --t)
388    ac_prev=target ;;
389  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
390    target="$ac_optarg" ;;
391
392  -v | -verbose | --verbose | --verbos | --verbo | --verb)
393    verbose=yes ;;
394
395  -version | --version | --versio | --versi | --vers)
396    echo "configure generated by autoconf version 2.13"
397    exit 0 ;;
398
399  -with-* | --with-*)
400    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
401    # Reject names that are not valid shell variable names.
402    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
403      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
404    fi
405    ac_package=`echo $ac_package| sed 's/-/_/g'`
406    case "$ac_option" in
407      *=*) ;;
408      *) ac_optarg=yes ;;
409    esac
410    eval "with_${ac_package}='$ac_optarg'" ;;
411
412  -without-* | --without-*)
413    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
414    # Reject names that are not valid shell variable names.
415    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
416      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
417    fi
418    ac_package=`echo $ac_package| sed 's/-/_/g'`
419    eval "with_${ac_package}=no" ;;
420
421  --x)
422    # Obsolete; use --with-x.
423    with_x=yes ;;
424
425  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
426  | --x-incl | --x-inc | --x-in | --x-i)
427    ac_prev=x_includes ;;
428  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
429  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
430    x_includes="$ac_optarg" ;;
431
432  -x-libraries | --x-libraries | --x-librarie | --x-librari \
433  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
434    ac_prev=x_libraries ;;
435  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
436  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
437    x_libraries="$ac_optarg" ;;
438
439  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
440    ;;
441
442  *)
443    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
444      echo "configure: warning: $ac_option: invalid host type" 1>&2
445    fi
446    if test "x$nonopt" != xNONE; then
447      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
448    fi
449    nonopt="$ac_option"
450    ;;
451
452  esac
453done
454
455if test -n "$ac_prev"; then
456  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
457fi
458
459trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
460
461# File descriptor usage:
462# 0 standard input
463# 1 file creation
464# 2 errors and warnings
465# 3 some systems may open it to /dev/tty
466# 4 used on the Kubota Titan
467# 6 checking for... messages and results
468# 5 compiler messages saved in config.log
469if test "$silent" = yes; then
470  exec 6>/dev/null
471else
472  exec 6>&1
473fi
474exec 5>./config.log
475
476echo "\
477This file contains any messages produced by compilers while
478running configure, to aid debugging if configure makes a mistake.
479" 1>&5
480
481# Strip out --no-create and --no-recursion so they do not pile up.
482# Also quote any args containing shell metacharacters.
483ac_configure_args=
484for ac_arg
485do
486  case "$ac_arg" in
487  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
488  | --no-cr | --no-c) ;;
489  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
491  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
492  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
493  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
494  esac
495done
496
497# NLS nuisances.
498# Only set these to C if already set.  These must not be set unconditionally
499# because not all systems understand e.g. LANG=C (notably SCO).
500# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
501# Non-C LC_CTYPE values break the ctype check.
502if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
503if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
504if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
505if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
506
507# confdefs.h avoids OS command line length limits that DEFS can exceed.
508rm -rf conftest* confdefs.h
509# AIX cpp loses on an empty file, so make sure it contains at least a newline.
510echo > confdefs.h
511
512# A filename unique to this package, relative to the directory that
513# configure is in, which we can look for to find out if srcdir is correct.
514ac_unique_file=src/sawmill.h
515
516# Find the source files, if location was not specified.
517if test -z "$srcdir"; then
518  ac_srcdir_defaulted=yes
519  # Try the directory containing this script, then its parent.
520  ac_prog=$0
521  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
522  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
523  srcdir=$ac_confdir
524  if test ! -r $srcdir/$ac_unique_file; then
525    srcdir=..
526  fi
527else
528  ac_srcdir_defaulted=no
529fi
530if test ! -r $srcdir/$ac_unique_file; then
531  if test "$ac_srcdir_defaulted" = yes; then
532    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
533  else
534    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
535  fi
536fi
537srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
538
539# Prefer explicitly selected file to automatically selected ones.
540if test -z "$CONFIG_SITE"; then
541  if test "x$prefix" != xNONE; then
542    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
543  else
544    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
545  fi
546fi
547for ac_site_file in $CONFIG_SITE; do
548  if test -r "$ac_site_file"; then
549    echo "loading site script $ac_site_file"
550    . "$ac_site_file"
551  fi
552done
553
554if test -r "$cache_file"; then
555  echo "loading cache $cache_file"
556  . $cache_file
557else
558  echo "creating cache $cache_file"
559  > $cache_file
560fi
561
562ac_ext=c
563# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
564ac_cpp='$CPP $CPPFLAGS'
565ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
566ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
567cross_compiling=$ac_cv_prog_cc_cross
568
569ac_exeext=
570ac_objext=o
571if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
572  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
573  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
574    ac_n= ac_c='
575' ac_t='        '
576  else
577    ac_n=-n ac_c= ac_t=
578  fi
579else
580  ac_n= ac_c='\c' ac_t=
581fi
582
583
584
585ac_aux_dir=
586for ac_dir in etc $srcdir/etc; do
587  if test -f $ac_dir/install-sh; then
588    ac_aux_dir=$ac_dir
589    ac_install_sh="$ac_aux_dir/install-sh -c"
590    break
591  elif test -f $ac_dir/install.sh; then
592    ac_aux_dir=$ac_dir
593    ac_install_sh="$ac_aux_dir/install.sh -c"
594    break
595  fi
596done
597if test -z "$ac_aux_dir"; then
598  { echo "configure: error: can not find install-sh or install.sh in etc $srcdir/etc" 1>&2; exit 1; }
599fi
600ac_config_guess=$ac_aux_dir/config.guess
601ac_config_sub=$ac_aux_dir/config.sub
602ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
603
604
605version="1.0.1"
606
607output_files="src/Makefile lisp/Makefile scripts/Makefile themes/Makefile\
608 lisp/sawfish/ui/Makefile lisp/sawfish/gtk/Makefile sounds/Makefile\
609 man/Makefile po/Makefile Makedefs Makefile sawfish.spec"
610
611SUBDIRS="src lisp scripts themes sounds man po"
612
613
614add_subdir () {
615  sub=$1; shift
616  SUBDIRS="$SUBDIRS $sub"
617  output_files="$output_files $sub/Makefile"
618  for ext in $*; do
619    output_files="$output_files $sub/$ext"
620  done
621  unset sub
622}
623
624
625# Make sure we can run config.sub.
626if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
627else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
628fi
629
630echo $ac_n "checking host system type""... $ac_c" 1>&6
631echo "configure:632: checking host system type" >&5
632
633host_alias=$host
634case "$host_alias" in
635NONE)
636  case $nonopt in
637  NONE)
638    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
639    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
640    fi ;;
641  *) host_alias=$nonopt ;;
642  esac ;;
643esac
644
645host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
646host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
647host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
648host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
649echo "$ac_t""$host" 1>&6
650
651
652case "${prefix}" in
653  */)
654    prefix=`echo ${prefix} | sed -e 's/^\(.*\)\/$/\1/'`
655    ;;
656esac
657
658sawfishdir='${datadir}/sawfish'
659lispdir='${sawfishdir}/${version}/lisp'
660localedir='${datadir}/locale'
661sawfishexecdir='${libexecdir}/sawfish/${version}/${host_type}'
662
663# Extract the first word of "gcc", so it can be a program name with args.
664set dummy gcc; ac_word=$2
665echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
666echo "configure:667: checking for $ac_word" >&5
667if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
668  echo $ac_n "(cached) $ac_c" 1>&6
669else
670  if test -n "$CC"; then
671  ac_cv_prog_CC="$CC" # Let the user override the test.
672else
673  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
674  ac_dummy="$PATH"
675  for ac_dir in $ac_dummy; do
676    test -z "$ac_dir" && ac_dir=.
677    if test -f $ac_dir/$ac_word; then
678      ac_cv_prog_CC="gcc"
679      break
680    fi
681  done
682  IFS="$ac_save_ifs"
683fi
684fi
685CC="$ac_cv_prog_CC"
686if test -n "$CC"; then
687  echo "$ac_t""$CC" 1>&6
688else
689  echo "$ac_t""no" 1>&6
690fi
691
692if test -z "$CC"; then
693  # Extract the first word of "cc", so it can be a program name with args.
694set dummy cc; ac_word=$2
695echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
696echo "configure:697: checking for $ac_word" >&5
697if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
698  echo $ac_n "(cached) $ac_c" 1>&6
699else
700  if test -n "$CC"; then
701  ac_cv_prog_CC="$CC" # Let the user override the test.
702else
703  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
704  ac_prog_rejected=no
705  ac_dummy="$PATH"
706  for ac_dir in $ac_dummy; do
707    test -z "$ac_dir" && ac_dir=.
708    if test -f $ac_dir/$ac_word; then
709      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
710        ac_prog_rejected=yes
711        continue
712      fi
713      ac_cv_prog_CC="cc"
714      break
715    fi
716  done
717  IFS="$ac_save_ifs"
718if test $ac_prog_rejected = yes; then
719  # We found a bogon in the path, so make sure we never use it.
720  set dummy $ac_cv_prog_CC
721  shift
722  if test $# -gt 0; then
723    # We chose a different compiler from the bogus one.
724    # However, it has the same basename, so the bogon will be chosen
725    # first if we set CC to just the basename; use the full file name.
726    shift
727    set dummy "$ac_dir/$ac_word" "$@"
728    shift
729    ac_cv_prog_CC="$@"
730  fi
731fi
732fi
733fi
734CC="$ac_cv_prog_CC"
735if test -n "$CC"; then
736  echo "$ac_t""$CC" 1>&6
737else
738  echo "$ac_t""no" 1>&6
739fi
740
741  if test -z "$CC"; then
742    case "`uname -s`" in
743    *win32* | *WIN32*)
744      # Extract the first word of "cl", so it can be a program name with args.
745set dummy cl; ac_word=$2
746echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
747echo "configure:748: checking for $ac_word" >&5
748if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
749  echo $ac_n "(cached) $ac_c" 1>&6
750else
751  if test -n "$CC"; then
752  ac_cv_prog_CC="$CC" # Let the user override the test.
753else
754  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
755  ac_dummy="$PATH"
756  for ac_dir in $ac_dummy; do
757    test -z "$ac_dir" && ac_dir=.
758    if test -f $ac_dir/$ac_word; then
759      ac_cv_prog_CC="cl"
760      break
761    fi
762  done
763  IFS="$ac_save_ifs"
764fi
765fi
766CC="$ac_cv_prog_CC"
767if test -n "$CC"; then
768  echo "$ac_t""$CC" 1>&6
769else
770  echo "$ac_t""no" 1>&6
771fi
772 ;;
773    esac
774  fi
775  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
776fi
777
778echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
779echo "configure:780: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
780
781ac_ext=c
782# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
783ac_cpp='$CPP $CPPFLAGS'
784ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
785ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
786cross_compiling=$ac_cv_prog_cc_cross
787
788cat > conftest.$ac_ext << EOF
789
790#line 791 "configure"
791#include "confdefs.h"
792
793main(){return(0);}
794EOF
795if { (eval echo configure:796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
796  ac_cv_prog_cc_works=yes
797  # If we can't run a trivial program, we are probably using a cross compiler.
798  if (./conftest; exit) 2>/dev/null; then
799    ac_cv_prog_cc_cross=no
800  else
801    ac_cv_prog_cc_cross=yes
802  fi
803else
804  echo "configure: failed program was:" >&5
805  cat conftest.$ac_ext >&5
806  ac_cv_prog_cc_works=no
807fi
808rm -fr conftest*
809ac_ext=c
810# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
811ac_cpp='$CPP $CPPFLAGS'
812ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
813ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
814cross_compiling=$ac_cv_prog_cc_cross
815
816echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
817if test $ac_cv_prog_cc_works = no; then
818  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
819fi
820echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
821echo "configure:822: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
822echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
823cross_compiling=$ac_cv_prog_cc_cross
824
825echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
826echo "configure:827: checking whether we are using GNU C" >&5
827if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
828  echo $ac_n "(cached) $ac_c" 1>&6
829else
830  cat > conftest.c <<EOF
831#ifdef __GNUC__
832  yes;
833#endif
834EOF
835if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
836  ac_cv_prog_gcc=yes
837else
838  ac_cv_prog_gcc=no
839fi
840fi
841
842echo "$ac_t""$ac_cv_prog_gcc" 1>&6
843
844if test $ac_cv_prog_gcc = yes; then
845  GCC=yes
846else
847  GCC=
848fi
849
850ac_test_CFLAGS="${CFLAGS+set}"
851ac_save_CFLAGS="$CFLAGS"
852CFLAGS=
853echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
854echo "configure:855: checking whether ${CC-cc} accepts -g" >&5
855if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
856  echo $ac_n "(cached) $ac_c" 1>&6
857else
858  echo 'void f(){}' > conftest.c
859if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
860  ac_cv_prog_cc_g=yes
861else
862  ac_cv_prog_cc_g=no
863fi
864rm -f conftest*
865
866fi
867
868echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
869if test "$ac_test_CFLAGS" = set; then
870  CFLAGS="$ac_save_CFLAGS"
871elif test $ac_cv_prog_cc_g = yes; then
872  if test "$GCC" = yes; then
873    CFLAGS="-g -O2"
874  else
875    CFLAGS="-g"
876  fi
877else
878  if test "$GCC" = yes; then
879    CFLAGS="-O2"
880  else
881    CFLAGS=
882  fi
883fi
884
885echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
886echo "configure:887: checking how to run the C preprocessor" >&5
887# On Suns, sometimes $CPP names a directory.
888if test -n "$CPP" && test -d "$CPP"; then
889  CPP=
890fi
891if test -z "$CPP"; then
892if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
893  echo $ac_n "(cached) $ac_c" 1>&6
894else
895    # This must be in double quotes, not single quotes, because CPP may get
896  # substituted into the Makefile and "${CC-cc}" will confuse make.
897  CPP="${CC-cc} -E"
898  # On the NeXT, cc -E runs the code through the compiler's parser,
899  # not just through cpp.
900  cat > conftest.$ac_ext <<EOF
901#line 902 "configure"
902#include "confdefs.h"
903#include <assert.h>
904Syntax Error
905EOF
906ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
907{ (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
908ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
909if test -z "$ac_err"; then
910  :
911else
912  echo "$ac_err" >&5
913  echo "configure: failed program was:" >&5
914  cat conftest.$ac_ext >&5
915  rm -rf conftest*
916  CPP="${CC-cc} -E -traditional-cpp"
917  cat > conftest.$ac_ext <<EOF
918#line 919 "configure"
919#include "confdefs.h"
920#include <assert.h>
921Syntax Error
922EOF
923ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
924{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
925ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
926if test -z "$ac_err"; then
927  :
928else
929  echo "$ac_err" >&5
930  echo "configure: failed program was:" >&5
931  cat conftest.$ac_ext >&5
932  rm -rf conftest*
933  CPP="${CC-cc} -nologo -E"
934  cat > conftest.$ac_ext <<EOF
935#line 936 "configure"
936#include "confdefs.h"
937#include <assert.h>
938Syntax Error
939EOF
940ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
941{ (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
942ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
943if test -z "$ac_err"; then
944  :
945else
946  echo "$ac_err" >&5
947  echo "configure: failed program was:" >&5
948  cat conftest.$ac_ext >&5
949  rm -rf conftest*
950  CPP=/lib/cpp
951fi
952rm -f conftest*
953fi
954rm -f conftest*
955fi
956rm -f conftest*
957  ac_cv_prog_CPP="$CPP"
958fi
959  CPP="$ac_cv_prog_CPP"
960else
961  ac_cv_prog_CPP="$CPP"
962fi
963echo "$ac_t""$CPP" 1>&6
964
965# Find a good install program.  We prefer a C program (faster),
966# so one script is as good as another.  But avoid the broken or
967# incompatible versions:
968# SysV /etc/install, /usr/sbin/install
969# SunOS /usr/etc/install
970# IRIX /sbin/install
971# AIX /bin/install
972# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
973# AFS /usr/afsws/bin/install, which mishandles nonexistent args
974# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
975# ./install, which can be erroneously created by make from ./install.sh.
976echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
977echo "configure:978: checking for a BSD compatible install" >&5
978if test -z "$INSTALL"; then
979if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
980  echo $ac_n "(cached) $ac_c" 1>&6
981else
982    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
983  for ac_dir in $PATH; do
984    # Account for people who put trailing slashes in PATH elements.
985    case "$ac_dir/" in
986    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
987    *)
988      # OSF1 and SCO ODT 3.0 have their own names for install.
989      # Don't use installbsd from OSF since it installs stuff as root
990      # by default.
991      for ac_prog in ginstall scoinst install; do
992        if test -f $ac_dir/$ac_prog; then
993          if test $ac_prog = install &&
994            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
995            # AIX install.  It has an incompatible calling convention.
996            :
997          else
998            ac_cv_path_install="$ac_dir/$ac_prog -c"
999            break 2
1000          fi
1001        fi
1002      done
1003      ;;
1004    esac
1005  done
1006  IFS="$ac_save_IFS"
1007
1008fi
1009  if test "${ac_cv_path_install+set}" = set; then
1010    INSTALL="$ac_cv_path_install"
1011  else
1012    # As a last resort, use the slow shell script.  We don't cache a
1013    # path for INSTALL within a source directory, because that will
1014    # break other packages using the cache if that directory is
1015    # removed, or if the path is relative.
1016    INSTALL="$ac_install_sh"
1017  fi
1018fi
1019echo "$ac_t""$INSTALL" 1>&6
1020
1021# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1022# It thinks the first close brace ends the variable substitution.
1023test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1024
1025test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1026
1027test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1028
1029echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1030echo "configure:1031: checking whether ln -s works" >&5
1031if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1032  echo $ac_n "(cached) $ac_c" 1>&6
1033else
1034  rm -f conftestdata
1035if ln -s X conftestdata 2>/dev/null
1036then
1037  rm -f conftestdata
1038  ac_cv_prog_LN_S="ln -s"
1039else
1040  ac_cv_prog_LN_S=ln
1041fi
1042fi
1043LN_S="$ac_cv_prog_LN_S"
1044if test "$ac_cv_prog_LN_S" = "ln -s"; then
1045  echo "$ac_t""yes" 1>&6
1046else
1047  echo "$ac_t""no" 1>&6
1048fi
1049
1050echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1051echo "configure:1052: checking whether ${MAKE-make} sets \${MAKE}" >&5
1052set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1053if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1054  echo $ac_n "(cached) $ac_c" 1>&6
1055else
1056  cat > conftestmake <<\EOF
1057all:
1058        @echo 'ac_maketemp="${MAKE}"'
1059EOF
1060# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1061eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1062if test -n "$ac_maketemp"; then
1063  eval ac_cv_prog_make_${ac_make}_set=yes
1064else
1065  eval ac_cv_prog_make_${ac_make}_set=no
1066fi
1067rm -f conftestmake
1068fi
1069if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1070  echo "$ac_t""yes" 1>&6
1071  SET_MAKE=
1072else
1073  echo "$ac_t""no" 1>&6
1074  SET_MAKE="MAKE=${MAKE-make}"
1075fi
1076
1077if test $ac_cv_prog_gcc = yes; then
1078    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1079echo "configure:1080: checking whether ${CC-cc} needs -traditional" >&5
1080if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1081  echo $ac_n "(cached) $ac_c" 1>&6
1082else
1083    ac_pattern="Autoconf.*'x'"
1084  cat > conftest.$ac_ext <<EOF
1085#line 1086 "configure"
1086#include "confdefs.h"
1087#include <sgtty.h>
1088Autoconf TIOCGETP
1089EOF
1090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1091  egrep "$ac_pattern" >/dev/null 2>&1; then
1092  rm -rf conftest*
1093  ac_cv_prog_gcc_traditional=yes
1094else
1095  rm -rf conftest*
1096  ac_cv_prog_gcc_traditional=no
1097fi
1098rm -f conftest*
1099
1100
1101  if test $ac_cv_prog_gcc_traditional = no; then
1102    cat > conftest.$ac_ext <<EOF
1103#line 1104 "configure"
1104#include "confdefs.h"
1105#include <termio.h>
1106Autoconf TCGETA
1107EOF
1108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1109  egrep "$ac_pattern" >/dev/null 2>&1; then
1110  rm -rf conftest*
1111  ac_cv_prog_gcc_traditional=yes
1112fi
1113rm -f conftest*
1114
1115  fi
1116fi
1117
1118echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1119  if test $ac_cv_prog_gcc_traditional = yes; then
1120    CC="$CC -traditional"
1121  fi
1122fi
1123
1124
1125if test "$INSTALL" = "$ac_install_sh"; then
1126    INSTALL='\${top_srcdir}/etc/install-sh -c'
1127fi
1128
1129echo $ac_n "checking for xdr_void in -lnsl""... $ac_c" 1>&6
1130echo "configure:1131: checking for xdr_void in -lnsl" >&5
1131ac_lib_var=`echo nsl'_'xdr_void | sed 'y%./+-%__p_%'`
1132if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1133  echo $ac_n "(cached) $ac_c" 1>&6
1134else
1135  ac_save_LIBS="$LIBS"
1136LIBS="-lnsl  $LIBS"
1137cat > conftest.$ac_ext <<EOF
1138#line 1139 "configure"
1139#include "confdefs.h"
1140/* Override any gcc2 internal prototype to avoid an error.  */
1141/* We use char because int might match the return type of a gcc2
1142    builtin and then its argument prototype would still apply.  */
1143char xdr_void();
1144
1145int main() {
1146xdr_void()
1147; return 0; }
1148EOF
1149if { (eval echo configure:1150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1150  rm -rf conftest*
1151  eval "ac_cv_lib_$ac_lib_var=yes"
1152else
1153  echo "configure: failed program was:" >&5
1154  cat conftest.$ac_ext >&5
1155  rm -rf conftest*
1156  eval "ac_cv_lib_$ac_lib_var=no"
1157fi
1158rm -f conftest*
1159LIBS="$ac_save_LIBS"
1160
1161fi
1162if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1163  echo "$ac_t""yes" 1>&6
1164    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1165    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1166  cat >> confdefs.h <<EOF
1167#define $ac_tr_lib 1
1168EOF
1169
1170  LIBS="-lnsl $LIBS"
1171
1172else
1173  echo "$ac_t""no" 1>&6
1174fi
1175
1176echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
1177echo "configure:1178: checking for bind in -lsocket" >&5
1178ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
1179if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1180  echo $ac_n "(cached) $ac_c" 1>&6
1181else
1182  ac_save_LIBS="$LIBS"
1183LIBS="-lsocket  $LIBS"
1184cat > conftest.$ac_ext <<EOF
1185#line 1186 "configure"
1186#include "confdefs.h"
1187/* Override any gcc2 internal prototype to avoid an error.  */
1188/* We use char because int might match the return type of a gcc2
1189    builtin and then its argument prototype would still apply.  */
1190char bind();
1191
1192int main() {
1193bind()
1194; return 0; }
1195EOF
1196if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1197  rm -rf conftest*
1198  eval "ac_cv_lib_$ac_lib_var=yes"
1199else
1200  echo "configure: failed program was:" >&5
1201  cat conftest.$ac_ext >&5
1202  rm -rf conftest*
1203  eval "ac_cv_lib_$ac_lib_var=no"
1204fi
1205rm -f conftest*
1206LIBS="$ac_save_LIBS"
1207
1208fi
1209if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1210  echo "$ac_t""yes" 1>&6
1211    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1212    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1213  cat >> confdefs.h <<EOF
1214#define $ac_tr_lib 1
1215EOF
1216
1217  LIBS="-lsocket $LIBS"
1218
1219else
1220  echo "$ac_t""no" 1>&6
1221fi
1222
1223
1224# If we find X, set shell vars x_includes and x_libraries to the
1225# paths, otherwise set no_x=yes.
1226# Uses ac_ vars as temps to allow command line to override cache and checks.
1227# --without-x overrides everything else, but does not touch the cache.
1228echo $ac_n "checking for X""... $ac_c" 1>&6
1229echo "configure:1230: checking for X" >&5
1230
1231# Check whether --with-x or --without-x was given.
1232if test "${with_x+set}" = set; then
1233  withval="$with_x"
1234  :
1235fi
1236
1237# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1238if test "x$with_x" = xno; then
1239  # The user explicitly disabled X.
1240  have_x=disabled
1241else
1242  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1243    # Both variables are already set.
1244    have_x=yes
1245  else
1246if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1247  echo $ac_n "(cached) $ac_c" 1>&6
1248else
1249  # One or both of the vars are not set, and there is no cached value.
1250ac_x_includes=NO ac_x_libraries=NO
1251rm -fr conftestdir
1252if mkdir conftestdir; then
1253  cd conftestdir
1254  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1255  cat > Imakefile <<'EOF'
1256acfindx:
1257        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1258EOF
1259  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1260    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1261    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1262    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1263    for ac_extension in a so sl; do
1264      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1265        test -f $ac_im_libdir/libX11.$ac_extension; then
1266        ac_im_usrlibdir=$ac_im_libdir; break
1267      fi
1268    done
1269    # Screen out bogus values from the imake configuration.  They are
1270    # bogus both because they are the default anyway, and because
1271    # using them would break gcc on systems where it needs fixed includes.
1272    case "$ac_im_incroot" in
1273        /usr/include) ;;
1274        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1275    esac
1276    case "$ac_im_usrlibdir" in
1277        /usr/lib | /lib) ;;
1278        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1279    esac
1280  fi
1281  cd ..
1282  rm -fr conftestdir
1283fi
1284
1285if test "$ac_x_includes" = NO; then
1286  # Guess where to find include files, by looking for this one X11 .h file.
1287  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1288
1289  # First, try using that file with no special directory specified.
1290cat > conftest.$ac_ext <<EOF
1291#line 1292 "configure"
1292#include "confdefs.h"
1293#include <$x_direct_test_include>
1294EOF
1295ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1296{ (eval echo configure:1297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1297ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1298if test -z "$ac_err"; then
1299  rm -rf conftest*
1300  # We can compile using X headers with no special include directory.
1301ac_x_includes=
1302else
1303  echo "$ac_err" >&5
1304  echo "configure: failed program was:" >&5
1305  cat conftest.$ac_ext >&5
1306  rm -rf conftest*
1307  # Look for the header file in a standard set of common directories.
1308# Check X11 before X11Rn because it is often a symlink to the current release.
1309  for ac_dir in               \
1310    /usr/X11/include          \
1311    /usr/X11R6/include        \
1312    /usr/X11R5/include        \
1313    /usr/X11R4/include        \
1314                              \
1315    /usr/include/X11          \
1316    /usr/include/X11R6        \
1317    /usr/include/X11R5        \
1318    /usr/include/X11R4        \
1319                              \
1320    /usr/local/X11/include    \
1321    /usr/local/X11R6/include  \
1322    /usr/local/X11R5/include  \
1323    /usr/local/X11R4/include  \
1324                              \
1325    /usr/local/include/X11    \
1326    /usr/local/include/X11R6  \
1327    /usr/local/include/X11R5  \
1328    /usr/local/include/X11R4  \
1329                              \
1330    /usr/X386/include         \
1331    /usr/x386/include         \
1332    /usr/XFree86/include/X11  \
1333                              \
1334    /usr/include              \
1335    /usr/local/include        \
1336    /usr/unsupported/include  \
1337    /usr/athena/include       \
1338    /usr/local/x11r5/include  \
1339    /usr/lpp/Xamples/include  \
1340                              \
1341    /usr/openwin/include      \
1342    /usr/openwin/share/include \
1343    ; \
1344  do
1345    if test -r "$ac_dir/$x_direct_test_include"; then
1346      ac_x_includes=$ac_dir
1347      break
1348    fi
1349  done
1350fi
1351rm -f conftest*
1352fi # $ac_x_includes = NO
1353
1354if test "$ac_x_libraries" = NO; then
1355  # Check for the libraries.
1356
1357  test -z "$x_direct_test_library" && x_direct_test_library=Xt
1358  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1359
1360  # See if we find them without any special options.
1361  # Don't add to $LIBS permanently.
1362  ac_save_LIBS="$LIBS"
1363  LIBS="-l$x_direct_test_library $LIBS"
1364cat > conftest.$ac_ext <<EOF
1365#line 1366 "configure"
1366#include "confdefs.h"
1367
1368int main() {
1369${x_direct_test_function}()
1370; return 0; }
1371EOF
1372if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1373  rm -rf conftest*
1374  LIBS="$ac_save_LIBS"
1375# We can link X programs with no special library path.
1376ac_x_libraries=
1377else
1378  echo "configure: failed program was:" >&5
1379  cat conftest.$ac_ext >&5
1380  rm -rf conftest*
1381  LIBS="$ac_save_LIBS"
1382# First see if replacing the include by lib works.
1383# Check X11 before X11Rn because it is often a symlink to the current release.
1384for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1385    /usr/X11/lib          \
1386    /usr/X11R6/lib        \
1387    /usr/X11R5/lib        \
1388    /usr/X11R4/lib        \
1389                          \
1390    /usr/lib/X11          \
1391    /usr/lib/X11R6        \
1392    /usr/lib/X11R5        \
1393    /usr/lib/X11R4        \
1394                          \
1395    /usr/local/X11/lib    \
1396    /usr/local/X11R6/lib  \
1397    /usr/local/X11R5/lib  \
1398    /usr/local/X11R4/lib  \
1399                          \
1400    /usr/local/lib/X11    \
1401    /usr/local/lib/X11R6  \
1402    /usr/local/lib/X11R5  \
1403    /usr/local/lib/X11R4  \
1404                          \
1405    /usr/X386/lib         \
1406    /usr/x386/lib         \
1407    /usr/XFree86/lib/X11  \
1408                          \
1409    /usr/lib              \
1410    /usr/local/lib        \
1411    /usr/unsupported/lib  \
1412    /usr/athena/lib       \
1413    /usr/local/x11r5/lib  \
1414    /usr/lpp/Xamples/lib  \
1415    /lib/usr/lib/X11      \
1416                          \
1417    /usr/openwin/lib      \
1418    /usr/openwin/share/lib \
1419    ; \
1420do
1421  for ac_extension in a so sl; do
1422    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1423      ac_x_libraries=$ac_dir
1424      break 2
1425    fi
1426  done
1427done
1428fi
1429rm -f conftest*
1430fi # $ac_x_libraries = NO
1431
1432if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1433  # Didn't find X anywhere.  Cache the known absence of X.
1434  ac_cv_have_x="have_x=no"
1435else
1436  # Record where we found X for the cache.
1437  ac_cv_have_x="have_x=yes \
1438                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1439fi
1440fi
1441  fi
1442  eval "$ac_cv_have_x"
1443fi # $with_x != no
1444
1445if test "$have_x" != yes; then
1446  echo "$ac_t""$have_x" 1>&6
1447  no_x=yes
1448else
1449  # If each of the values was on the command line, it overrides each guess.
1450  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1451  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1452  # Update the cache value to reflect the command line values.
1453  ac_cv_have_x="have_x=yes \
1454                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1455  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1456fi
1457
1458if test "$no_x" = yes; then
1459  # Not all programs may use this symbol, but it does not hurt to define it.
1460  cat >> confdefs.h <<\EOF
1461#define X_DISPLAY_MISSING 1
1462EOF
1463
1464  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1465else
1466  if test -n "$x_includes"; then
1467    X_CFLAGS="$X_CFLAGS -I$x_includes"
1468  fi
1469
1470  # It would also be nice to do this for all -L options, not just this one.
1471  if test -n "$x_libraries"; then
1472    X_LIBS="$X_LIBS -L$x_libraries"
1473    # For Solaris; some versions of Sun CC require a space after -R and
1474    # others require no space.  Words are not sufficient . . . .
1475    case "`(uname -sr) 2>/dev/null`" in
1476    "SunOS 5"*)
1477      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1478echo "configure:1479: checking whether -R must be followed by a space" >&5
1479      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1480      cat > conftest.$ac_ext <<EOF
1481#line 1482 "configure"
1482#include "confdefs.h"
1483
1484int main() {
1485
1486; return 0; }
1487EOF
1488if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1489  rm -rf conftest*
1490  ac_R_nospace=yes
1491else
1492  echo "configure: failed program was:" >&5
1493  cat conftest.$ac_ext >&5
1494  rm -rf conftest*
1495  ac_R_nospace=no
1496fi
1497rm -f conftest*
1498      if test $ac_R_nospace = yes; then
1499        echo "$ac_t""no" 1>&6
1500        X_LIBS="$X_LIBS -R$x_libraries"
1501      else
1502        LIBS="$ac_xsave_LIBS -R $x_libraries"
1503        cat > conftest.$ac_ext <<EOF
1504#line 1505 "configure"
1505#include "confdefs.h"
1506
1507int main() {
1508
1509; return 0; }
1510EOF
1511if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1512  rm -rf conftest*
1513  ac_R_space=yes
1514else
1515  echo "configure: failed program was:" >&5
1516  cat conftest.$ac_ext >&5
1517  rm -rf conftest*
1518  ac_R_space=no
1519fi
1520rm -f conftest*
1521        if test $ac_R_space = yes; then
1522          echo "$ac_t""yes" 1>&6
1523          X_LIBS="$X_LIBS -R $x_libraries"
1524        else
1525          echo "$ac_t""neither works" 1>&6
1526        fi
1527      fi
1528      LIBS="$ac_xsave_LIBS"
1529    esac
1530  fi
1531
1532  # Check for system-dependent libraries X programs must link with.
1533  # Do this before checking for the system-independent R6 libraries
1534  # (-lICE), since we may need -lsocket or whatever for X linking.
1535
1536  if test "$ISC" = yes; then
1537    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1538  else
1539    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1540    # libraries were built with DECnet support.  And karl@cs.umb.edu says
1541    # the Alpha needs dnet_stub (dnet does not exist).
1542    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1543echo "configure:1544: checking for dnet_ntoa in -ldnet" >&5
1544ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1545if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1546  echo $ac_n "(cached) $ac_c" 1>&6
1547else
1548  ac_save_LIBS="$LIBS"
1549LIBS="-ldnet  $LIBS"
1550cat > conftest.$ac_ext <<EOF
1551#line 1552 "configure"
1552#include "confdefs.h"
1553/* Override any gcc2 internal prototype to avoid an error.  */
1554/* We use char because int might match the return type of a gcc2
1555    builtin and then its argument prototype would still apply.  */
1556char dnet_ntoa();
1557
1558int main() {
1559dnet_ntoa()
1560; return 0; }
1561EOF
1562if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1563  rm -rf conftest*
1564  eval "ac_cv_lib_$ac_lib_var=yes"
1565else
1566  echo "configure: failed program was:" >&5
1567  cat conftest.$ac_ext >&5
1568  rm -rf conftest*
1569  eval "ac_cv_lib_$ac_lib_var=no"
1570fi
1571rm -f conftest*
1572LIBS="$ac_save_LIBS"
1573
1574fi
1575if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1576  echo "$ac_t""yes" 1>&6
1577  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1578else
1579  echo "$ac_t""no" 1>&6
1580fi
1581
1582    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1583      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1584echo "configure:1585: checking for dnet_ntoa in -ldnet_stub" >&5
1585ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1586if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1587  echo $ac_n "(cached) $ac_c" 1>&6
1588else
1589  ac_save_LIBS="$LIBS"
1590LIBS="-ldnet_stub  $LIBS"
1591cat > conftest.$ac_ext <<EOF
1592#line 1593 "configure"
1593#include "confdefs.h"
1594/* Override any gcc2 internal prototype to avoid an error.  */
1595/* We use char because int might match the return type of a gcc2
1596    builtin and then its argument prototype would still apply.  */
1597char dnet_ntoa();
1598
1599int main() {
1600dnet_ntoa()
1601; return 0; }
1602EOF
1603if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1604  rm -rf conftest*
1605  eval "ac_cv_lib_$ac_lib_var=yes"
1606else
1607  echo "configure: failed program was:" >&5
1608  cat conftest.$ac_ext >&5
1609  rm -rf conftest*
1610  eval "ac_cv_lib_$ac_lib_var=no"
1611fi
1612rm -f conftest*
1613LIBS="$ac_save_LIBS"
1614
1615fi
1616if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1617  echo "$ac_t""yes" 1>&6
1618  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1619else
1620  echo "$ac_t""no" 1>&6
1621fi
1622
1623    fi
1624
1625    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1626    # to get the SysV transport functions.
1627    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1628    # needs -lnsl.
1629    # The nsl library prevents programs from opening the X display
1630    # on Irix 5.2, according to dickey@clark.net.
1631    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1632echo "configure:1633: checking for gethostbyname" >&5
1633if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1634  echo $ac_n "(cached) $ac_c" 1>&6
1635else
1636  cat > conftest.$ac_ext <<EOF
1637#line 1638 "configure"
1638#include "confdefs.h"
1639/* System header to define __stub macros and hopefully few prototypes,
1640    which can conflict with char gethostbyname(); below.  */
1641#include <assert.h>
1642/* Override any gcc2 internal prototype to avoid an error.  */
1643/* We use char because int might match the return type of a gcc2
1644    builtin and then its argument prototype would still apply.  */
1645char gethostbyname();
1646
1647int main() {
1648
1649/* The GNU C library defines this for functions which it implements
1650    to always fail with ENOSYS.  Some functions are actually named
1651    something starting with __ and the normal name is an alias.  */
1652#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1653choke me
1654#else
1655gethostbyname();
1656#endif
1657
1658; return 0; }
1659EOF
1660if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1661  rm -rf conftest*
1662  eval "ac_cv_func_gethostbyname=yes"
1663else
1664  echo "configure: failed program was:" >&5
1665  cat conftest.$ac_ext >&5
1666  rm -rf conftest*
1667  eval "ac_cv_func_gethostbyname=no"
1668fi
1669rm -f conftest*
1670fi
1671
1672if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1673  echo "$ac_t""yes" 1>&6
1674  :
1675else
1676  echo "$ac_t""no" 1>&6
1677fi
1678
1679    if test $ac_cv_func_gethostbyname = no; then
1680      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1681echo "configure:1682: checking for gethostbyname in -lnsl" >&5
1682ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1683if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1684  echo $ac_n "(cached) $ac_c" 1>&6
1685else
1686  ac_save_LIBS="$LIBS"
1687LIBS="-lnsl  $LIBS"
1688cat > conftest.$ac_ext <<EOF
1689#line 1690 "configure"
1690#include "confdefs.h"
1691/* Override any gcc2 internal prototype to avoid an error.  */
1692/* We use char because int might match the return type of a gcc2
1693    builtin and then its argument prototype would still apply.  */
1694char gethostbyname();
1695
1696int main() {
1697gethostbyname()
1698; return 0; }
1699EOF
1700if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1701  rm -rf conftest*
1702  eval "ac_cv_lib_$ac_lib_var=yes"
1703else
1704  echo "configure: failed program was:" >&5
1705  cat conftest.$ac_ext >&5
1706  rm -rf conftest*
1707  eval "ac_cv_lib_$ac_lib_var=no"
1708fi
1709rm -f conftest*
1710LIBS="$ac_save_LIBS"
1711
1712fi
1713if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1714  echo "$ac_t""yes" 1>&6
1715  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1716else
1717  echo "$ac_t""no" 1>&6
1718fi
1719
1720    fi
1721
1722    # lieder@skyler.mavd.honeywell.com says without -lsocket,
1723    # socket/setsockopt and other routines are undefined under SCO ODT
1724    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
1725    # on later versions), says simon@lia.di.epfl.ch: it contains
1726    # gethostby* variants that don't use the nameserver (or something).
1727    # -lsocket must be given before -lnsl if both are needed.
1728    # We assume that if connect needs -lnsl, so does gethostbyname.
1729    echo $ac_n "checking for connect""... $ac_c" 1>&6
1730echo "configure:1731: checking for connect" >&5
1731if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1732  echo $ac_n "(cached) $ac_c" 1>&6
1733else
1734  cat > conftest.$ac_ext <<EOF
1735#line 1736 "configure"
1736#include "confdefs.h"
1737/* System header to define __stub macros and hopefully few prototypes,
1738    which can conflict with char connect(); below.  */
1739#include <assert.h>
1740/* Override any gcc2 internal prototype to avoid an error.  */
1741/* We use char because int might match the return type of a gcc2
1742    builtin and then its argument prototype would still apply.  */
1743char connect();
1744
1745int main() {
1746
1747/* The GNU C library defines this for functions which it implements
1748    to always fail with ENOSYS.  Some functions are actually named
1749    something starting with __ and the normal name is an alias.  */
1750#if defined (__stub_connect) || defined (__stub___connect)
1751choke me
1752#else
1753connect();
1754#endif
1755
1756; return 0; }
1757EOF
1758if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1759  rm -rf conftest*
1760  eval "ac_cv_func_connect=yes"
1761else
1762  echo "configure: failed program was:" >&5
1763  cat conftest.$ac_ext >&5
1764  rm -rf conftest*
1765  eval "ac_cv_func_connect=no"
1766fi
1767rm -f conftest*
1768fi
1769
1770if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1771  echo "$ac_t""yes" 1>&6
1772  :
1773else
1774  echo "$ac_t""no" 1>&6
1775fi
1776
1777    if test $ac_cv_func_connect = no; then
1778      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1779echo "configure:1780: checking for connect in -lsocket" >&5
1780ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1781if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1782  echo $ac_n "(cached) $ac_c" 1>&6
1783else
1784  ac_save_LIBS="$LIBS"
1785LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1786cat > conftest.$ac_ext <<EOF
1787#line 1788 "configure"
1788#include "confdefs.h"
1789/* Override any gcc2 internal prototype to avoid an error.  */
1790/* We use char because int might match the return type of a gcc2
1791    builtin and then its argument prototype would still apply.  */
1792char connect();
1793
1794int main() {
1795connect()
1796; return 0; }
1797EOF
1798if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1799  rm -rf conftest*
1800  eval "ac_cv_lib_$ac_lib_var=yes"
1801else
1802  echo "configure: failed program was:" >&5
1803  cat conftest.$ac_ext >&5
1804  rm -rf conftest*
1805  eval "ac_cv_lib_$ac_lib_var=no"
1806fi
1807rm -f conftest*
1808LIBS="$ac_save_LIBS"
1809
1810fi
1811if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1812  echo "$ac_t""yes" 1>&6
1813  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
1814else
1815  echo "$ac_t""no" 1>&6
1816fi
1817
1818    fi
1819
1820    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1821    echo $ac_n "checking for remove""... $ac_c" 1>&6
1822echo "configure:1823: checking for remove" >&5
1823if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1824  echo $ac_n "(cached) $ac_c" 1>&6
1825else
1826  cat > conftest.$ac_ext <<EOF
1827#line 1828 "configure"
1828#include "confdefs.h"
1829/* System header to define __stub macros and hopefully few prototypes,
1830    which can conflict with char remove(); below.  */
1831#include <assert.h>
1832/* Override any gcc2 internal prototype to avoid an error.  */
1833/* We use char because int might match the return type of a gcc2
1834    builtin and then its argument prototype would still apply.  */
1835char remove();
1836
1837int main() {
1838
1839/* The GNU C library defines this for functions which it implements
1840    to always fail with ENOSYS.  Some functions are actually named
1841    something starting with __ and the normal name is an alias.  */
1842#if defined (__stub_remove) || defined (__stub___remove)
1843choke me
1844#else
1845remove();
1846#endif
1847
1848; return 0; }
1849EOF
1850if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1851  rm -rf conftest*
1852  eval "ac_cv_func_remove=yes"
1853else
1854  echo "configure: failed program was:" >&5
1855  cat conftest.$ac_ext >&5
1856  rm -rf conftest*
1857  eval "ac_cv_func_remove=no"
1858fi
1859rm -f conftest*
1860fi
1861
1862if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
1863  echo "$ac_t""yes" 1>&6
1864  :
1865else
1866  echo "$ac_t""no" 1>&6
1867fi
1868
1869    if test $ac_cv_func_remove = no; then
1870      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1871echo "configure:1872: checking for remove in -lposix" >&5
1872ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1873if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1874  echo $ac_n "(cached) $ac_c" 1>&6
1875else
1876  ac_save_LIBS="$LIBS"
1877LIBS="-lposix  $LIBS"
1878cat > conftest.$ac_ext <<EOF
1879#line 1880 "configure"
1880#include "confdefs.h"
1881/* Override any gcc2 internal prototype to avoid an error.  */
1882/* We use char because int might match the return type of a gcc2
1883    builtin and then its argument prototype would still apply.  */
1884char remove();
1885
1886int main() {
1887remove()
1888; return 0; }
1889EOF
1890if { (eval echo configure:1891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1891  rm -rf conftest*
1892  eval "ac_cv_lib_$ac_lib_var=yes"
1893else
1894  echo "configure: failed program was:" >&5
1895  cat conftest.$ac_ext >&5
1896  rm -rf conftest*
1897  eval "ac_cv_lib_$ac_lib_var=no"
1898fi
1899rm -f conftest*
1900LIBS="$ac_save_LIBS"
1901
1902fi
1903if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1904  echo "$ac_t""yes" 1>&6
1905  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
1906else
1907  echo "$ac_t""no" 1>&6
1908fi
1909
1910    fi
1911
1912    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1913    echo $ac_n "checking for shmat""... $ac_c" 1>&6
1914echo "configure:1915: checking for shmat" >&5
1915if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1916  echo $ac_n "(cached) $ac_c" 1>&6
1917else
1918  cat > conftest.$ac_ext <<EOF
1919#line 1920 "configure"
1920#include "confdefs.h"
1921/* System header to define __stub macros and hopefully few prototypes,
1922    which can conflict with char shmat(); below.  */
1923#include <assert.h>
1924/* Override any gcc2 internal prototype to avoid an error.  */
1925/* We use char because int might match the return type of a gcc2
1926    builtin and then its argument prototype would still apply.  */
1927char shmat();
1928
1929int main() {
1930
1931/* The GNU C library defines this for functions which it implements
1932    to always fail with ENOSYS.  Some functions are actually named
1933    something starting with __ and the normal name is an alias.  */
1934#if defined (__stub_shmat) || defined (__stub___shmat)
1935choke me
1936#else
1937shmat();
1938#endif
1939
1940; return 0; }
1941EOF
1942if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1943  rm -rf conftest*
1944  eval "ac_cv_func_shmat=yes"
1945else
1946  echo "configure: failed program was:" >&5
1947  cat conftest.$ac_ext >&5
1948  rm -rf conftest*
1949  eval "ac_cv_func_shmat=no"
1950fi
1951rm -f conftest*
1952fi
1953
1954if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
1955  echo "$ac_t""yes" 1>&6
1956  :
1957else
1958  echo "$ac_t""no" 1>&6
1959fi
1960
1961    if test $ac_cv_func_shmat = no; then
1962      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1963echo "configure:1964: checking for shmat in -lipc" >&5
1964ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1965if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1966  echo $ac_n "(cached) $ac_c" 1>&6
1967else
1968  ac_save_LIBS="$LIBS"
1969LIBS="-lipc  $LIBS"
1970cat > conftest.$ac_ext <<EOF
1971#line 1972 "configure"
1972#include "confdefs.h"
1973/* Override any gcc2 internal prototype to avoid an error.  */
1974/* We use char because int might match the return type of a gcc2
1975    builtin and then its argument prototype would still apply.  */
1976char shmat();
1977
1978int main() {
1979shmat()
1980; return 0; }
1981EOF
1982if { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1983  rm -rf conftest*
1984  eval "ac_cv_lib_$ac_lib_var=yes"
1985else
1986  echo "configure: failed program was:" >&5
1987  cat conftest.$ac_ext >&5
1988  rm -rf conftest*
1989  eval "ac_cv_lib_$ac_lib_var=no"
1990fi
1991rm -f conftest*
1992LIBS="$ac_save_LIBS"
1993
1994fi
1995if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1996  echo "$ac_t""yes" 1>&6
1997  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
1998else
1999  echo "$ac_t""no" 1>&6
2000fi
2001
2002    fi
2003  fi
2004
2005  # Check for libraries that X11R6 Xt/Xaw programs need.
2006  ac_save_LDFLAGS="$LDFLAGS"
2007  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2008  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2009  # check for ICE first), but we must link in the order -lSM -lICE or
2010  # we get undefined symbols.  So assume we have SM if we have ICE.
2011  # These have to be linked with before -lX11, unlike the other
2012  # libraries we check for below, so use a different variable.
2013  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2014  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2015echo "configure:2016: checking for IceConnectionNumber in -lICE" >&5
2016ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2017if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2018  echo $ac_n "(cached) $ac_c" 1>&6
2019else
2020  ac_save_LIBS="$LIBS"
2021LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2022cat > conftest.$ac_ext <<EOF
2023#line 2024 "configure"
2024#include "confdefs.h"
2025/* Override any gcc2 internal prototype to avoid an error.  */
2026/* We use char because int might match the return type of a gcc2
2027    builtin and then its argument prototype would still apply.  */
2028char IceConnectionNumber();
2029
2030int main() {
2031IceConnectionNumber()
2032; return 0; }
2033EOF
2034if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2035  rm -rf conftest*
2036  eval "ac_cv_lib_$ac_lib_var=yes"
2037else
2038  echo "configure: failed program was:" >&5
2039  cat conftest.$ac_ext >&5
2040  rm -rf conftest*
2041  eval "ac_cv_lib_$ac_lib_var=no"
2042fi
2043rm -f conftest*
2044LIBS="$ac_save_LIBS"
2045
2046fi
2047if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2048  echo "$ac_t""yes" 1>&6
2049  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2050else
2051  echo "$ac_t""no" 1>&6
2052fi
2053
2054  LDFLAGS="$ac_save_LDFLAGS"
2055
2056fi
2057
2058echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2059echo "configure:2060: checking for ANSI C header files" >&5
2060if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2061  echo $ac_n "(cached) $ac_c" 1>&6
2062else
2063  cat > conftest.$ac_ext <<EOF
2064#line 2065 "configure"
2065#include "confdefs.h"
2066#include <stdlib.h>
2067#include <stdarg.h>
2068#include <string.h>
2069#include <float.h>
2070EOF
2071ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2072{ (eval echo configure:2073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2073ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2074if test -z "$ac_err"; then
2075  rm -rf conftest*
2076  ac_cv_header_stdc=yes
2077else
2078  echo "$ac_err" >&5
2079  echo "configure: failed program was:" >&5
2080  cat conftest.$ac_ext >&5
2081  rm -rf conftest*
2082  ac_cv_header_stdc=no
2083fi
2084rm -f conftest*
2085
2086if test $ac_cv_header_stdc = yes; then
2087  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2088cat > conftest.$ac_ext <<EOF
2089#line 2090 "configure"
2090#include "confdefs.h"
2091#include <string.h>
2092EOF
2093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2094  egrep "memchr" >/dev/null 2>&1; then
2095  :
2096else
2097  rm -rf conftest*
2098  ac_cv_header_stdc=no
2099fi
2100rm -f conftest*
2101
2102fi
2103
2104if test $ac_cv_header_stdc = yes; then
2105  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2106cat > conftest.$ac_ext <<EOF
2107#line 2108 "configure"
2108#include "confdefs.h"
2109#include <stdlib.h>
2110EOF
2111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2112  egrep "free" >/dev/null 2>&1; then
2113  :
2114else
2115  rm -rf conftest*
2116  ac_cv_header_stdc=no
2117fi
2118rm -f conftest*
2119
2120fi
2121
2122if test $ac_cv_header_stdc = yes; then
2123  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2124if test "$cross_compiling" = yes; then
2125  :
2126else
2127  cat > conftest.$ac_ext <<EOF
2128#line 2129 "configure"
2129#include "confdefs.h"
2130#include <ctype.h>
2131#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2132#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2133#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2134int main () { int i; for (i = 0; i < 256; i++)
2135if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2136exit (0); }
2137
2138EOF
2139if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2140then
2141  :
2142else
2143  echo "configure: failed program was:" >&5
2144  cat conftest.$ac_ext >&5
2145  rm -fr conftest*
2146  ac_cv_header_stdc=no
2147fi
2148rm -fr conftest*
2149fi
2150
2151fi
2152fi
2153
2154echo "$ac_t""$ac_cv_header_stdc" 1>&6
2155if test $ac_cv_header_stdc = yes; then
2156  cat >> confdefs.h <<\EOF
2157#define STDC_HEADERS 1
2158EOF
2159
2160fi
2161
2162echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2163echo "configure:2164: checking whether time.h and sys/time.h may both be included" >&5
2164if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2165  echo $ac_n "(cached) $ac_c" 1>&6
2166else
2167  cat > conftest.$ac_ext <<EOF
2168#line 2169 "configure"
2169#include "confdefs.h"
2170#include <sys/types.h>
2171#include <sys/time.h>
2172#include <time.h>
2173int main() {
2174struct tm *tp;
2175; return 0; }
2176EOF
2177if { (eval echo configure:2178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2178  rm -rf conftest*
2179  ac_cv_header_time=yes
2180else
2181  echo "configure: failed program was:" >&5
2182  cat conftest.$ac_ext >&5
2183  rm -rf conftest*
2184  ac_cv_header_time=no
2185fi
2186rm -f conftest*
2187fi
2188
2189echo "$ac_t""$ac_cv_header_time" 1>&6
2190if test $ac_cv_header_time = yes; then
2191  cat >> confdefs.h <<\EOF
2192#define TIME_WITH_SYS_TIME 1
2193EOF
2194
2195fi
2196
2197echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2198echo "configure:2199: checking for sys/wait.h that is POSIX.1 compatible" >&5
2199if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2200  echo $ac_n "(cached) $ac_c" 1>&6
2201else
2202  cat > conftest.$ac_ext <<EOF
2203#line 2204 "configure"
2204#include "confdefs.h"
2205#include <sys/types.h>
2206#include <sys/wait.h>
2207#ifndef WEXITSTATUS
2208#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2209#endif
2210#ifndef WIFEXITED
2211#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2212#endif
2213int main() {
2214int s;
2215wait (&s);
2216s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2217; return 0; }
2218EOF
2219if { (eval echo configure:2220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2220  rm -rf conftest*
2221  ac_cv_header_sys_wait_h=yes
2222else
2223  echo "configure: failed program was:" >&5
2224  cat conftest.$ac_ext >&5
2225  rm -rf conftest*
2226  ac_cv_header_sys_wait_h=no
2227fi
2228rm -f conftest*
2229fi
2230
2231echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2232if test $ac_cv_header_sys_wait_h = yes; then
2233  cat >> confdefs.h <<\EOF
2234#define HAVE_SYS_WAIT_H 1
2235EOF
2236
2237fi
2238
2239for ac_hdr in fcntl.h sys/time.h sys/utsname.h unistd.h memory.h
2240do
2241ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2242echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2243echo "configure:2244: checking for $ac_hdr" >&5
2244if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2245  echo $ac_n "(cached) $ac_c" 1>&6
2246else
2247  cat > conftest.$ac_ext <<EOF
2248#line 2249 "configure"
2249#include "confdefs.h"
2250#include <$ac_hdr>
2251EOF
2252ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2253{ (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2254ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2255if test -z "$ac_err"; then
2256  rm -rf conftest*
2257  eval "ac_cv_header_$ac_safe=yes"
2258else
2259  echo "$ac_err" >&5
2260  echo "configure: failed program was:" >&5
2261  cat conftest.$ac_ext >&5
2262  rm -rf conftest*
2263  eval "ac_cv_header_$ac_safe=no"
2264fi
2265rm -f conftest*
2266fi
2267if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2268  echo "$ac_t""yes" 1>&6
2269    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2270  cat >> confdefs.h <<EOF
2271#define $ac_tr_hdr 1
2272EOF
2273 
2274else
2275  echo "$ac_t""no" 1>&6
2276fi
2277done
2278
2279
2280_cppflags="${CPPFLAGS}"
2281CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
2282
2283for ac_hdr in X11/SM/SMlib.h X11/extensions/Xdbe.h
2284do
2285ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2286echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2287echo "configure:2288: checking for $ac_hdr" >&5
2288if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2289  echo $ac_n "(cached) $ac_c" 1>&6
2290else
2291  cat > conftest.$ac_ext <<EOF
2292#line 2293 "configure"
2293#include "confdefs.h"
2294#include <$ac_hdr>
2295EOF
2296ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2297{ (eval echo configure:2298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2298ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2299if test -z "$ac_err"; then
2300  rm -rf conftest*
2301  eval "ac_cv_header_$ac_safe=yes"
2302else
2303  echo "$ac_err" >&5
2304  echo "configure: failed program was:" >&5
2305  cat conftest.$ac_ext >&5
2306  rm -rf conftest*
2307  eval "ac_cv_header_$ac_safe=no"
2308fi
2309rm -f conftest*
2310fi
2311if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2312  echo "$ac_t""yes" 1>&6
2313    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2314  cat >> confdefs.h <<EOF
2315#define $ac_tr_hdr 1
2316EOF
2317 
2318else
2319  echo "$ac_t""no" 1>&6
2320fi
2321done
2322
2323
2324XINERAMA_LIBS=""
2325
2326echo $ac_n "checking for XineramaQueryScreens in -lXinerama""... $ac_c" 1>&6
2327echo "configure:2328: checking for XineramaQueryScreens in -lXinerama" >&5
2328ac_lib_var=`echo Xinerama'_'XineramaQueryScreens | sed 'y%./+-%__p_%'`
2329if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2330  echo $ac_n "(cached) $ac_c" 1>&6
2331else
2332  ac_save_LIBS="$LIBS"
2333LIBS="-lXinerama $X_LIBS -lX11 -lXext $LIBS"
2334cat > conftest.$ac_ext <<EOF
2335#line 2336 "configure"
2336#include "confdefs.h"
2337/* Override any gcc2 internal prototype to avoid an error.  */
2338/* We use char because int might match the return type of a gcc2
2339    builtin and then its argument prototype would still apply.  */
2340char XineramaQueryScreens();
2341
2342int main() {
2343XineramaQueryScreens()
2344; return 0; }
2345EOF
2346if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2347  rm -rf conftest*
2348  eval "ac_cv_lib_$ac_lib_var=yes"
2349else
2350  echo "configure: failed program was:" >&5
2351  cat conftest.$ac_ext >&5
2352  rm -rf conftest*
2353  eval "ac_cv_lib_$ac_lib_var=no"
2354fi
2355rm -f conftest*
2356LIBS="$ac_save_LIBS"
2357
2358fi
2359if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2360  echo "$ac_t""yes" 1>&6
2361  XINERAMA_LIBS="-lXinerama"
2362              for ac_hdr in X11/extensions/Xinerama.h
2363do
2364ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2365echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2366echo "configure:2367: checking for $ac_hdr" >&5
2367if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2368  echo $ac_n "(cached) $ac_c" 1>&6
2369else
2370  cat > conftest.$ac_ext <<EOF
2371#line 2372 "configure"
2372#include "confdefs.h"
2373#include <$ac_hdr>
2374EOF
2375ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2376{ (eval echo configure:2377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2377ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2378if test -z "$ac_err"; then
2379  rm -rf conftest*
2380  eval "ac_cv_header_$ac_safe=yes"
2381else
2382  echo "$ac_err" >&5
2383  echo "configure: failed program was:" >&5
2384  cat conftest.$ac_ext >&5
2385  rm -rf conftest*
2386  eval "ac_cv_header_$ac_safe=no"
2387fi
2388rm -f conftest*
2389fi
2390if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2391  echo "$ac_t""yes" 1>&6
2392    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2393  cat >> confdefs.h <<EOF
2394#define $ac_tr_hdr 1
2395EOF
2396 
2397else
2398  echo "$ac_t""no" 1>&6
2399fi
2400done
2401
2402else
2403  echo "$ac_t""no" 1>&6
2404fi
2405
2406
2407CPPFLAGS="${_cppflags}"
2408
2409  # Check whether --with-rep_prefix or --without-rep_prefix was given.
2410if test "${with_rep_prefix+set}" = set; then
2411  withval="$with_rep_prefix"
2412  rep_prefix="$withval"
2413else
2414  rep_prefix=""
2415fi
2416
2417  if test "x$rep_prefix" = "x"; then
2418    rep_config="rep-config"
2419  else
2420    rep_config="${rep_prefix}/bin/rep-config"
2421  fi
2422  min_rep_version=0.14
2423  echo $ac_n "checking for rep - version >= $min_rep_version""... $ac_c" 1>&6
2424echo "configure:2425: checking for rep - version >= $min_rep_version" >&5
2425  rep_version=`$rep_config --version`
2426  if test $? -eq 0; then
2427    rep_major=`echo $rep_version \
2428        | sed -e 's/\([0-9]*\)\..*/\1/'`
2429    rep_minor=`echo $rep_version \
2430        | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
2431    min_rep_major=`echo $min_rep_version \
2432        | sed -e 's/\([0-9]*\)\..*/\1/'`
2433    min_rep_minor=`echo $min_rep_version \
2434        | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
2435    if test '(' $rep_major -gt $min_rep_major ')' \
2436        -o '(' $rep_major -eq $min_rep_major \
2437               -a $rep_minor -ge $min_rep_minor ')';
2438    then
2439      REP_VERSION="${rep_version}"
2440      REP_CFLAGS="`$rep_config --cflags`"
2441      REP_LIBS="`$rep_config --libs`"
2442      REP_EXECDIR="`$rep_config --execdir`"
2443     
2444     
2445     
2446     
2447      echo "$ac_t""version ${rep_version}" 1>&6
2448    else
2449      { echo "configure: error: version ${rep_version}; require $min_rep_version" 1>&2; exit 1; }
2450    fi
2451  else
2452    { echo "configure: error: can't find librep; is it installed?" 1>&2; exit 1; }
2453  fi
2454
2455    echo $ac_n "checking for GNU msgfmt""... $ac_c" 1>&6
2456echo "configure:2457: checking for GNU msgfmt" >&5
2457  REP_MSGFMT=
2458  for p in `echo "$PATH" | sed -e 's/:/ /g'`; do
2459    if test -x $p/msgfmt; then
2460      if $p/msgfmt --version 2>&1 | grep GNU >/dev/null; then
2461        REP_MSGFMT=$p/msgfmt
2462      fi
2463    fi
2464  done
2465  if test x$REP_MSGFMT != x; then
2466    echo "$ac_t""$REP_MSGFMT" 1>&6
2467  else
2468    echo "$ac_t""unavailable" 1>&6
2469    REP_MSGFMT=true
2470  fi
2471 
2472
2473
2474rep_gtk_function=gtk-main-iteration-do
2475rep_gtk_version=0.14
2476
2477echo $ac_n "checking for correct rep-gtk version""... $ac_c" 1>&6
2478echo "configure:2479: checking for correct rep-gtk version" >&5
2479cat >conftest <<EOF
2480(condition-case nil
2481    (progn
2482      (require 'gui.gtk.gtk)
2483      $rep_gtk_function
2484      (throw 'quit 0))
2485  (error
2486    (throw 'quit 1)))
2487EOF
2488if REP_GTK_DONT_INITIALIZE=1 rep ./conftest 2>&5; then
2489  echo "$ac_t""yes" 1>&6
2490else
2491  echo "$ac_t""no" 1>&6
2492  { echo "configure: error: You need rep-gtk version ${rep_gtk_version}+" 1>&2; exit 1; }
2493fi
2494rm -f conftest
2495
2496if test "${no_x}" != "yes"; then
2497  cat >> confdefs.h <<\EOF
2498#define HAVE_X11 1
2499EOF
2500
2501else
2502  { echo "configure: error: You need X11 for sawfish" 1>&2; exit 1; }
2503fi
2504
2505# Check whether --with-gdk-pixbuf or --without-gdk-pixbuf was given.
2506if test "${with_gdk_pixbuf+set}" = set; then
2507  withval="$with_gdk_pixbuf"
2508  :
2509else
2510  with_gdk_pixbuf=no
2511fi
2512
2513if test "$with_gdk_pixbuf" != "no"; then
2514  echo $ac_n "checking for gdk_pixbuf (xlib version)""... $ac_c" 1>&6
2515echo "configure:2516: checking for gdk_pixbuf (xlib version)" >&5
2516        if gnome-config gdk_pixbuf_xlib --cflags >/dev/null 2>&1; then
2517    GDK_PIXBUF_VERSION=`gnome-config gdk_pixbuf_xlib --modversion`
2518    echo "$ac_t""$GDK_PIXBUF_VERSION" 1>&6
2519    GDK_PIXBUF_CFLAGS=`gnome-config gdk_pixbuf_xlib --cflags`
2520    GDK_PIXBUF_LIBS=`gnome-config gdk_pixbuf_xlib --libs`
2521   
2522   
2523   
2524    cat >> confdefs.h <<\EOF
2525#define HAVE_GDK_PIXBUF 1
2526EOF
2527
2528    cat >> confdefs.h <<\EOF
2529#define NEED_PIXMAP_CACHE 1
2530EOF
2531
2532    IMAGE_LIBS='${GDK_PIXBUF_LIBS}'
2533    IMAGE_CFLAGS='${GDK_PIXBUF_CFLAGS}'
2534    with_gdk_pixbuf=yes
2535  else
2536    echo "$ac_t""no" 1>&6
2537    if test "$with_gdk_pixbuf" = "yes"; then
2538      { echo "configure: error: can't locate gdk-pixbuf-xlib library" 1>&2; exit 1; }
2539    else
2540      with_gdk_pixbuf=no
2541    fi
2542  fi
2543fi
2544if test "$with_gdk_pixbuf" = "no"; then
2545  # Check whether --with-imlib-prefix or --without-imlib-prefix was given.
2546if test "${with_imlib_prefix+set}" = set; then
2547  withval="$with_imlib_prefix"
2548  imlib_prefix="$withval"
2549else
2550  imlib_prefix=""
2551fi
2552
2553# Check whether --with-imlib-exec-prefix or --without-imlib-exec-prefix was given.
2554if test "${with_imlib_exec_prefix+set}" = set; then
2555  withval="$with_imlib_exec_prefix"
2556  imlib_exec_prefix="$withval"
2557else
2558  imlib_exec_prefix=""
2559fi
2560
2561# Check whether --enable-imlibtest or --disable-imlibtest was given.
2562if test "${enable_imlibtest+set}" = set; then
2563  enableval="$enable_imlibtest"
2564  :
2565else
2566  enable_imlibtest=yes
2567fi
2568
2569
2570  if test x$imlib_exec_prefix != x ; then
2571     imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
2572     if test x${IMLIB_CONFIG+set} != xset ; then
2573        IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config
2574     fi
2575  fi
2576  if test x$imlib_prefix != x ; then
2577     imlib_args="$imlib_args --prefix=$imlib_prefix"
2578     if test x${IMLIB_CONFIG+set} != xset ; then
2579        IMLIB_CONFIG=$imlib_prefix/bin/imlib-config
2580     fi
2581  fi
2582
2583  # Extract the first word of "imlib-config", so it can be a program name with args.
2584set dummy imlib-config; ac_word=$2
2585echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2586echo "configure:2587: checking for $ac_word" >&5
2587if eval "test \"`echo '$''{'ac_cv_path_IMLIB_CONFIG'+set}'`\" = set"; then
2588  echo $ac_n "(cached) $ac_c" 1>&6
2589else
2590  case "$IMLIB_CONFIG" in
2591  /*)
2592  ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a path.
2593  ;;
2594  ?:/*)                 
2595  ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a dos path.
2596  ;;
2597  *)
2598  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2599  ac_dummy="$PATH"
2600  for ac_dir in $ac_dummy; do
2601    test -z "$ac_dir" && ac_dir=.
2602    if test -f $ac_dir/$ac_word; then
2603      ac_cv_path_IMLIB_CONFIG="$ac_dir/$ac_word"
2604      break
2605    fi
2606  done
2607  IFS="$ac_save_ifs"
2608  test -z "$ac_cv_path_IMLIB_CONFIG" && ac_cv_path_IMLIB_CONFIG="no"
2609  ;;
2610esac
2611fi
2612IMLIB_CONFIG="$ac_cv_path_IMLIB_CONFIG"
2613if test -n "$IMLIB_CONFIG"; then
2614  echo "$ac_t""$IMLIB_CONFIG" 1>&6
2615else
2616  echo "$ac_t""no" 1>&6
2617fi
2618
2619  min_imlib_version=1.8.2
2620  echo $ac_n "checking for IMLIB - version >= $min_imlib_version""... $ac_c" 1>&6
2621echo "configure:2622: checking for IMLIB - version >= $min_imlib_version" >&5
2622  no_imlib=""
2623  if test "$IMLIB_CONFIG" = "no" ; then
2624    no_imlib=yes
2625  else
2626    IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags`
2627    IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs`
2628
2629    imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \
2630           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2631    imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \
2632           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2633    imlib_micro_version=`$IMLIB_CONFIG $imlib_args --version | \
2634           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2635    if test "x$enable_imlibtest" = "xyes" ; then
2636      ac_save_CFLAGS="$CFLAGS"
2637      ac_save_LIBS="$LIBS"
2638      CFLAGS="$CFLAGS $IMLIB_CFLAGS"
2639      LIBS="$LIBS $IMLIB_LIBS"
2640      rm -f conf.imlibtest
2641      if test "$cross_compiling" = yes; then
2642  echo $ac_n "cross compiling; assumed OK... $ac_c"
2643else
2644  cat > conftest.$ac_ext <<EOF
2645#line 2646 "configure"
2646#include "confdefs.h"
2647
2648#include <stdio.h>
2649#include <stdlib.h>
2650#include <string.h>
2651#include <Imlib.h>
2652
2653char*
2654my_strdup (char *str)
2655{
2656  char *new_str;
2657 
2658  if (str)
2659    {
2660      new_str = malloc ((strlen (str) + 1) * sizeof(char));
2661      strcpy (new_str, str);
2662    }
2663  else
2664    new_str = NULL;
2665 
2666  return new_str;
2667}
2668
2669int main ()
2670{
2671  int major, minor, micro;
2672  char *tmp_version;
2673
2674  system ("touch conf.imlibtest");
2675
2676  /* HP/UX 9 (%@#!) writes to sscanf strings */
2677  tmp_version = my_strdup("$min_imlib_version");
2678  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
2679     printf("%s, bad version string\n", "$min_imlib_version");
2680     exit(1);
2681   }
2682
2683    if (($imlib_major_version > major) ||
2684        (($imlib_major_version == major) && ($imlib_minor_version > minor)) ||
2685        (($imlib_major_version == major) && ($imlib_minor_version == minor) &&
2686        ($imlib_micro_version >= micro)))
2687    {
2688      return 0;
2689    }
2690  else
2691    {
2692      printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version);
2693      printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor);
2694      printf("*** best to upgrade to the required version.\n");
2695      printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n");
2696      printf("*** to point to the correct copy of imlib-config, and remove the file\n");
2697      printf("*** config.cache before re-running configure\n");
2698      return 1;
2699    }
2700}
2701
2702
2703EOF
2704if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2705then
2706  :
2707else
2708  echo "configure: failed program was:" >&5
2709  cat conftest.$ac_ext >&5
2710  rm -fr conftest*
2711  no_imlib=yes
2712fi
2713rm -fr conftest*
2714fi
2715
2716       CFLAGS="$ac_save_CFLAGS"
2717       LIBS="$ac_save_LIBS"
2718     fi
2719  fi
2720  if test "x$no_imlib" = x ; then
2721     echo "$ac_t""yes" 1>&6
2722     :     
2723  else
2724     echo "$ac_t""no" 1>&6
2725     if test "$IMLIB_CONFIG" = "no" ; then
2726       echo "*** The imlib-config script installed by IMLIB could not be found"
2727       echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
2728       echo "*** your path, or set the IMLIB_CONFIG environment variable to the"
2729       echo "*** full path to imlib-config."
2730     else
2731       if test -f conf.imlibtest ; then
2732        :
2733       else
2734          echo "*** Could not run IMLIB test program, checking why..."
2735          CFLAGS="$CFLAGS $IMLIB_CFLAGS"
2736          LIBS="$LIBS $IMLIB_LIBS"
2737          cat > conftest.$ac_ext <<EOF
2738#line 2739 "configure"
2739#include "confdefs.h"
2740
2741#include <stdio.h>
2742#include <Imlib.h>
2743
2744int main() {
2745 return 0;
2746; return 0; }
2747EOF
2748if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2749  rm -rf conftest*
2750   echo "*** The test program compiled, but did not run. This usually means"
2751          echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
2752          echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
2753          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2754          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
2755          echo "*** is required on your system"
2756          echo "***"
2757          echo "*** If you have an old version installed, it is best to remove it, although"
2758          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2759else
2760  echo "configure: failed program was:" >&5
2761  cat conftest.$ac_ext >&5
2762  rm -rf conftest*
2763   echo "*** The test program failed to compile or link. See the file config.log for the"
2764          echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
2765          echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
2766          echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG"
2767fi
2768rm -f conftest*
2769          CFLAGS="$ac_save_CFLAGS"
2770          LIBS="$ac_save_LIBS"
2771       fi
2772     fi
2773     IMLIB_CFLAGS=""
2774     IMLIB_LIBS=""
2775     :
2776  fi
2777 
2778 
2779  rm -f conf.imlibtest
2780
2781  if $IMLIB_CONFIG --libs | grep " -lpng" >/dev/null 2>&1; then true; else
2782    { echo "configure: error: imlib must be built with support for png images" 1>&2; exit 1; }
2783  fi
2784  cat >> confdefs.h <<\EOF
2785#define HAVE_IMLIB 1
2786EOF
2787
2788  IMAGE_LIBS='${IMLIB_LIBS}'
2789  IMAGE_CFLAGS='${IMLIB_CFLAGS}'
2790fi
2791
2792
2793
2794# Check whether --with-gtk-prefix or --without-gtk-prefix was given.
2795if test "${with_gtk_prefix+set}" = set; then
2796  withval="$with_gtk_prefix"
2797  gtk_config_prefix="$withval"
2798else
2799  gtk_config_prefix=""
2800fi
2801
2802# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
2803if test "${with_gtk_exec_prefix+set}" = set; then
2804  withval="$with_gtk_exec_prefix"
2805  gtk_config_exec_prefix="$withval"
2806else
2807  gtk_config_exec_prefix=""
2808fi
2809
2810# Check whether --enable-gtktest or --disable-gtktest was given.
2811if test "${enable_gtktest+set}" = set; then
2812  enableval="$enable_gtktest"
2813  :
2814else
2815  enable_gtktest=yes
2816fi
2817
2818
2819  for module in .
2820  do
2821      case "$module" in
2822         gthread)
2823             gtk_config_args="$gtk_config_args gthread"
2824         ;;
2825      esac
2826  done
2827
2828  if test x$gtk_config_exec_prefix != x ; then
2829     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
2830     if test x${GTK_CONFIG+set} != xset ; then
2831        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
2832     fi
2833  fi
2834  if test x$gtk_config_prefix != x ; then
2835     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
2836     if test x${GTK_CONFIG+set} != xset ; then
2837        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
2838     fi
2839  fi
2840
2841  # Extract the first word of "gtk-config", so it can be a program name with args.
2842set dummy gtk-config; ac_word=$2
2843echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2844echo "configure:2845: checking for $ac_word" >&5
2845if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
2846  echo $ac_n "(cached) $ac_c" 1>&6
2847else
2848  case "$GTK_CONFIG" in
2849  /*)
2850  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
2851  ;;
2852  ?:/*)                 
2853  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
2854  ;;
2855  *)
2856  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2857  ac_dummy="$PATH"
2858  for ac_dir in $ac_dummy; do
2859    test -z "$ac_dir" && ac_dir=.
2860    if test -f $ac_dir/$ac_word; then
2861      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
2862      break
2863    fi
2864  done
2865  IFS="$ac_save_ifs"
2866  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
2867  ;;
2868esac
2869fi
2870GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
2871if test -n "$GTK_CONFIG"; then
2872  echo "$ac_t""$GTK_CONFIG" 1>&6
2873else
2874  echo "$ac_t""no" 1>&6
2875fi
2876
2877  min_gtk_version=1.2.0
2878  echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
2879echo "configure:2880: checking for GTK - version >= $min_gtk_version" >&5
2880  no_gtk=""
2881  if test "$GTK_CONFIG" = "no" ; then
2882    no_gtk=yes
2883  else
2884    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
2885    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
2886    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
2887           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2888    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
2889           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2890    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
2891           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2892    if test "x$enable_gtktest" = "xyes" ; then
2893      ac_save_CFLAGS="$CFLAGS"
2894      ac_save_LIBS="$LIBS"
2895      CFLAGS="$CFLAGS $GTK_CFLAGS"
2896      LIBS="$GTK_LIBS $LIBS"
2897      rm -f conf.gtktest
2898      if test "$cross_compiling" = yes; then
2899  echo $ac_n "cross compiling; assumed OK... $ac_c"
2900else
2901  cat > conftest.$ac_ext <<EOF
2902#line 2903 "configure"
2903#include "confdefs.h"
2904
2905#include <gtk/gtk.h>
2906#include <stdio.h>
2907#include <stdlib.h>
2908
2909int
2910main ()
2911{
2912  int major, minor, micro;
2913  char *tmp_version;
2914
2915  system ("touch conf.gtktest");
2916
2917  /* HP/UX 9 (%@#!) writes to sscanf strings */
2918  tmp_version = g_strdup("$min_gtk_version");
2919  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
2920     printf("%s, bad version string\n", "$min_gtk_version");
2921     exit(1);
2922   }
2923
2924  if ((gtk_major_version != $gtk_config_major_version) ||
2925      (gtk_minor_version != $gtk_config_minor_version) ||
2926      (gtk_micro_version != $gtk_config_micro_version))
2927    {
2928      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
2929             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
2930             gtk_major_version, gtk_minor_version, gtk_micro_version);
2931      printf ("*** was found! If gtk-config was correct, then it is best\n");
2932      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
2933      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2934      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2935      printf("*** required on your system.\n");
2936      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
2937      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
2938      printf("*** before re-running configure\n");
2939    }
2940#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
2941  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
2942           (gtk_minor_version != GTK_MINOR_VERSION) ||
2943           (gtk_micro_version != GTK_MICRO_VERSION))
2944    {
2945      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
2946             GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
2947      printf("*** library (version %d.%d.%d)\n",
2948             gtk_major_version, gtk_minor_version, gtk_micro_version);
2949    }
2950#endif /* defined (GTK_MAJOR_VERSION) ... */
2951  else
2952    {
2953      if ((gtk_major_version > major) ||
2954        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
2955        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
2956      {
2957        return 0;
2958       }
2959     else
2960      {
2961        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
2962               gtk_major_version, gtk_minor_version, gtk_micro_version);
2963        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
2964               major, minor, micro);
2965        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
2966        printf("***\n");
2967        printf("*** If you have already installed a sufficiently new version, this error\n");
2968        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
2969        printf("*** being found. The easiest way to fix this is to remove the old version\n");
2970        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
2971        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
2972        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2973        printf("*** so that the correct libraries are found at run-time))\n");
2974      }
2975    }
2976  return 1;
2977}
2978
2979EOF
2980if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2981then
2982  :
2983else
2984  echo "configure: failed program was:" >&5
2985  cat conftest.$ac_ext >&5
2986  rm -fr conftest*
2987  no_gtk=yes
2988fi
2989rm -fr conftest*
2990fi
2991
2992       CFLAGS="$ac_save_CFLAGS"
2993       LIBS="$ac_save_LIBS"
2994     fi
2995  fi
2996  if test "x$no_gtk" = x ; then
2997     echo "$ac_t""yes" 1>&6
2998     :     
2999  else
3000     echo "$ac_t""no" 1>&6
3001     if test "$GTK_CONFIG" = "no" ; then
3002       echo "*** The gtk-config script installed by GTK could not be found"
3003       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
3004       echo "*** your path, or set the GTK_CONFIG environment variable to the"
3005       echo "*** full path to gtk-config."
3006     else
3007       if test -f conf.gtktest ; then
3008        :
3009       else
3010          echo "*** Could not run GTK test program, checking why..."
3011          CFLAGS="$CFLAGS $GTK_CFLAGS"
3012          LIBS="$LIBS $GTK_LIBS"
3013          cat > conftest.$ac_ext <<EOF
3014#line 3015 "configure"
3015#include "confdefs.h"
3016
3017#include <gtk/gtk.h>
3018#include <stdio.h>
3019
3020int main() {
3021 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
3022; return 0; }
3023EOF
3024if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3025  rm -rf conftest*
3026   echo "*** The test program compiled, but did not run. This usually means"
3027          echo "*** that the run-time linker is not finding GTK or finding the wrong"
3028          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
3029          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
3030          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
3031          echo "*** is required on your system"
3032          echo "***"
3033          echo "*** If you have an old version installed, it is best to remove it, although"
3034          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
3035          echo "***"
3036          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
3037          echo "*** came with the system with the command"
3038          echo "***"
3039          echo "***    rpm --erase --nodeps gtk gtk-devel"
3040else
3041  echo "configure: failed program was:" >&5
3042  cat conftest.$ac_ext >&5
3043  rm -rf conftest*
3044   echo "*** The test program failed to compile or link. See the file config.log for the"
3045          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
3046          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
3047          echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
3048fi
3049rm -f conftest*
3050          CFLAGS="$ac_save_CFLAGS"
3051          LIBS="$ac_save_LIBS"
3052       fi
3053     fi
3054     GTK_CFLAGS=""
3055     GTK_LIBS=""
3056     :
3057  fi
3058 
3059 
3060  rm -f conf.gtktest
3061
3062
3063# Check whether --with-audiofile or --without-audiofile was given.
3064if test "${with_audiofile+set}" = set; then
3065  withval="$with_audiofile"
3066  :
3067else
3068  with_audiofile=yes
3069fi
3070
3071if test "$with_audiofile" = "yes"; then
3072  echo $ac_n "checking for audiofile library""... $ac_c" 1>&6
3073echo "configure:3074: checking for audiofile library" >&5
3074  AUDIOFILE_VERSION="`audiofile-config --version`"
3075  if test $? -eq 0; then
3076    AUDIOFILE_LIBS="`audiofile-config --libs`"
3077    AUDIOFILE_CFLAGS="`audiofile-config --cflags`"
3078    echo "$ac_t""$AUDIOFILE_VERSION" 1>&6
3079   
3080   
3081    cat >> confdefs.h <<\EOF
3082#define HAVE_LIBAUDIOFILE 1
3083EOF
3084
3085  else
3086    echo "$ac_t""no" 1>&6
3087  fi
3088fi
3089
3090# Check whether --with-esd or --without-esd was given.
3091if test "${with_esd+set}" = set; then
3092  withval="$with_esd"
3093  :
3094else
3095  with_esd=yes
3096fi
3097
3098if test "$with_esd" = "yes"; then
3099  echo $ac_n "checking for enlightened sound daemon""... $ac_c" 1>&6
3100echo "configure:3101: checking for enlightened sound daemon" >&5
3101  ESD_VERSION="`esd-config --version`"
3102  if test $? -eq 0; then
3103    ESD_LIBS="`esd-config --libs`"
3104    ESD_CFLAGS="`esd-config --cflags`"
3105    echo "$ac_t""$ESD_VERSION" 1>&6
3106   
3107   
3108    cat >> confdefs.h <<\EOF
3109#define HAVE_ESD 1
3110EOF
3111
3112  else
3113    echo "$ac_t""no" 1>&6
3114  fi
3115fi
3116
3117# Check whether --enable-capplet or --disable-capplet was given.
3118if test "${enable_capplet+set}" = set; then
3119  enableval="$enable_capplet"
3120  :
3121else
3122  enable_capplet=yes
3123fi
3124
3125
3126if test "$enable_capplet" = "yes"; then
3127  echo $ac_n "checking for GNOME control center config""... $ac_c" 1>&6
3128echo "configure:3129: checking for GNOME control center config" >&5
3129  GNOME_CC_CFLAGS="`(gnome-config --cflags capplet) 2>/dev/null`"
3130  GNOME_CC_LIBS="`(gnome-config --libs capplet) 2>/dev/null`"
3131  if test $? -ne 0; then
3132    echo "$ac_t""no" 1>&6
3133    echo "configure: warning: Can't run "gnome-config capplet", not building capplet" 1>&2
3134  else
3135    echo "$ac_t""yes" 1>&6
3136   
3137   
3138    add_subdir "capplet"
3139  fi
3140fi
3141
3142# Check whether --enable-themer or --disable-themer was given.
3143if test "${enable_themer+set}" = set; then
3144  enableval="$enable_themer"
3145  :
3146else
3147  enable_themer=yes
3148fi
3149
3150
3151if test "$enable_themer" = yes; then
3152    echo $ac_n "checking for rep-gtk libglade wrapper""... $ac_c" 1>&6
3153echo "configure:3154: checking for rep-gtk libglade wrapper" >&5
3154  if REP_GTK_DONT_INITIALIZE=1 rep --batch -l libglade 2>&5; then
3155    echo "$ac_t""yes" 1>&6
3156    add_subdir "themer"
3157  else
3158    echo "$ac_t""no" 1>&6
3159    echo "configure: warning: Can't load rep's libglade wrapper, not building themer" 1>&2
3160  fi
3161fi
3162
3163# Check whether --enable-gnome-widgets or --disable-gnome-widgets was given.
3164if test "${enable_gnome_widgets+set}" = set; then
3165  enableval="$enable_gnome_widgets"
3166  :
3167else
3168  enable_gnome_widgets=maybe
3169fi
3170
3171
3172if test "$enable_gnome_widgets" != "no"; then
3173  echo $ac_n "checking for rep-gtk GNOME wrappers""... $ac_c" 1>&6
3174echo "configure:3175: checking for rep-gtk GNOME wrappers" >&5
3175  if REP_GTK_DONT_INITIALIZE=1 rep --batch -l gnomeui -l gdk-pixbuf -l gnome-canvas-pixbuf 2>&5; then
3176    echo "$ac_t""yes" 1>&6
3177    REP_GTK_GNOME=yes
3178  else
3179    echo "$ac_t""no" 1>&6
3180    REP_GTK_GNOME=no
3181    echo "configure: warning: Can't load rep's gnome wrappers" 1>&2
3182  fi
3183else
3184  REP_GTK_GNOME=no
3185fi
3186
3187
3188doug_lea_malloc=yes
3189echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3190echo "configure:3191: checking for malloc_get_state" >&5
3191if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3192  echo $ac_n "(cached) $ac_c" 1>&6
3193else
3194  cat > conftest.$ac_ext <<EOF
3195#line 3196 "configure"
3196#include "confdefs.h"
3197/* System header to define __stub macros and hopefully few prototypes,
3198    which can conflict with char malloc_get_state(); below.  */
3199#include <assert.h>
3200/* Override any gcc2 internal prototype to avoid an error.  */
3201/* We use char because int might match the return type of a gcc2
3202    builtin and then its argument prototype would still apply.  */
3203char malloc_get_state();
3204
3205int main() {
3206
3207/* The GNU C library defines this for functions which it implements
3208    to always fail with ENOSYS.  Some functions are actually named
3209    something starting with __ and the normal name is an alias.  */
3210#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3211choke me
3212#else
3213malloc_get_state();
3214#endif
3215
3216; return 0; }
3217EOF
3218if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3219  rm -rf conftest*
3220  eval "ac_cv_func_malloc_get_state=yes"
3221else
3222  echo "configure: failed program was:" >&5
3223  cat conftest.$ac_ext >&5
3224  rm -rf conftest*
3225  eval "ac_cv_func_malloc_get_state=no"
3226fi
3227rm -f conftest*
3228fi
3229
3230if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3231  echo "$ac_t""yes" 1>&6
3232  :
3233else
3234  echo "$ac_t""no" 1>&6
3235doug_lea_malloc=no
3236fi
3237
3238echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3239echo "configure:3240: checking for malloc_set_state" >&5
3240if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3241  echo $ac_n "(cached) $ac_c" 1>&6
3242else
3243  cat > conftest.$ac_ext <<EOF
3244#line 3245 "configure"
3245#include "confdefs.h"
3246/* System header to define __stub macros and hopefully few prototypes,
3247    which can conflict with char malloc_set_state(); below.  */
3248#include <assert.h>
3249/* Override any gcc2 internal prototype to avoid an error.  */
3250/* We use char because int might match the return type of a gcc2
3251    builtin and then its argument prototype would still apply.  */
3252char malloc_set_state();
3253
3254int main() {
3255
3256/* The GNU C library defines this for functions which it implements
3257    to always fail with ENOSYS.  Some functions are actually named
3258    something starting with __ and the normal name is an alias.  */
3259#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3260choke me
3261#else
3262malloc_set_state();
3263#endif
3264
3265; return 0; }
3266EOF
3267if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3268  rm -rf conftest*
3269  eval "ac_cv_func_malloc_set_state=yes"
3270else
3271  echo "configure: failed program was:" >&5
3272  cat conftest.$ac_ext >&5
3273  rm -rf conftest*
3274  eval "ac_cv_func_malloc_set_state=no"
3275fi
3276rm -f conftest*
3277fi
3278
3279if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3280  echo "$ac_t""yes" 1>&6
3281  :
3282else
3283  echo "$ac_t""no" 1>&6
3284doug_lea_malloc=no
3285fi
3286
3287if test "$doug_lea_malloc" = "no"; then
3288  case ${host} in
3289    *-dec-osf*|*-sparc-sun*)
3290                  cat >> confdefs.h <<\EOF
3291#define LIBC_MALLOC 1
3292EOF
3293
3294      ;;
3295    *)
3296      LIBOBJS="${LIBOBJS} dlmalloc.o"
3297      cat >> confdefs.h <<\EOF
3298#define DOUG_LEA_MALLOC 1
3299EOF
3300
3301      ;;
3302  esac
3303else
3304  cat >> confdefs.h <<\EOF
3305#define DOUG_LEA_MALLOC 1
3306EOF
3307
3308  cat >> confdefs.h <<\EOF
3309#define LIBC_MALLOC 1
3310EOF
3311
3312fi
3313
3314# Check whether --with-gnome_prefix or --without-gnome_prefix was given.
3315if test "${with_gnome_prefix+set}" = set; then
3316  withval="$with_gnome_prefix"
3317  :
3318else
3319   with_gnome_prefix=""
3320fi
3321
3322echo $ac_n "checking for GNOME prefix""... $ac_c" 1>&6
3323echo "configure:3324: checking for GNOME prefix" >&5
3324if test "x$with_gnome_prefix" = "x"; then
3325  with_gnome_prefix=`(gnome-config --prefix) 2>/dev/null`
3326  if test $? -ne 0; then
3327    with_gnome_prefix='${prefix}'
3328  fi
3329fi
3330echo "$ac_t""$with_gnome_prefix" 1>&6
3331GNOMEDIR=$with_gnome_prefix
3332
3333
3334echo $ac_n "checking for working const""... $ac_c" 1>&6
3335echo "configure:3336: checking for working const" >&5
3336if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3337  echo $ac_n "(cached) $ac_c" 1>&6
3338else
3339  cat > conftest.$ac_ext <<EOF
3340#line 3341 "configure"
3341#include "confdefs.h"
3342
3343int main() {
3344
3345/* Ultrix mips cc rejects this.  */
3346typedef int charset[2]; const charset x;
3347/* SunOS 4.1.1 cc rejects this.  */
3348char const *const *ccp;
3349char **p;
3350/* NEC SVR4.0.2 mips cc rejects this.  */
3351struct point {int x, y;};
3352static struct point const zero = {0,0};
3353/* AIX XL C 1.02.0.0 rejects this.
3354   It does not let you subtract one const X* pointer from another in an arm
3355   of an if-expression whose if-part is not a constant expression */
3356const char *g = "string";
3357ccp = &g + (g ? g-g : 0);
3358/* HPUX 7.0 cc rejects these. */
3359++ccp;
3360p = (char**) ccp;
3361ccp = (char const *const *) p;
3362{ /* SCO 3.2v4 cc rejects this.  */
3363  char *t;
3364  char const *s = 0 ? (char *) 0 : (char const *) 0;
3365
3366  *t++ = 0;
3367}
3368{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3369  int x[] = {25, 17};
3370  const int *foo = &x[0];
3371  ++foo;
3372}
3373{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3374  typedef const int *iptr;
3375  iptr p = 0;
3376  ++p;
3377}
3378{ /* AIX XL C 1.02.0.0 rejects this saying
3379     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3380  struct s { int j; const int *ap[3]; };
3381  struct s *b; b->j = 5;
3382}
3383{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3384  const int foo = 10;
3385}
3386
3387; return 0; }
3388EOF
3389if { (eval echo configure:3390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3390  rm -rf conftest*
3391  ac_cv_c_const=yes
3392else
3393  echo "configure: failed program was:" >&5
3394  cat conftest.$ac_ext >&5
3395  rm -rf conftest*
3396  ac_cv_c_const=no
3397fi
3398rm -f conftest*
3399fi
3400
3401echo "$ac_t""$ac_cv_c_const" 1>&6
3402if test $ac_cv_c_const = no; then
3403  cat >> confdefs.h <<\EOF
3404#define const
3405EOF
3406
3407fi
3408
3409echo $ac_n "checking for inline""... $ac_c" 1>&6
3410echo "configure:3411: checking for inline" >&5
3411if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3412  echo $ac_n "(cached) $ac_c" 1>&6
3413else
3414  ac_cv_c_inline=no
3415for ac_kw in inline __inline__ __inline; do
3416  cat > conftest.$ac_ext <<EOF
3417#line 3418 "configure"
3418#include "confdefs.h"
3419
3420int main() {
3421} $ac_kw foo() {
3422; return 0; }
3423EOF
3424if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3425  rm -rf conftest*
3426  ac_cv_c_inline=$ac_kw; break
3427else
3428  echo "configure: failed program was:" >&5
3429  cat conftest.$ac_ext >&5
3430fi
3431rm -f conftest*
3432done
3433
3434fi
3435
3436echo "$ac_t""$ac_cv_c_inline" 1>&6
3437case "$ac_cv_c_inline" in
3438  inline | yes) ;;
3439  no) cat >> confdefs.h <<\EOF
3440#define inline
3441EOF
3442 ;;
3443  *)  cat >> confdefs.h <<EOF
3444#define inline $ac_cv_c_inline
3445EOF
3446 ;;
3447esac
3448
3449echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3450echo "configure:3451: checking whether byte ordering is bigendian" >&5
3451if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3452  echo $ac_n "(cached) $ac_c" 1>&6
3453else
3454  ac_cv_c_bigendian=unknown
3455# See if sys/param.h defines the BYTE_ORDER macro.
3456cat > conftest.$ac_ext <<EOF
3457#line 3458 "configure"
3458#include "confdefs.h"
3459#include <sys/types.h>
3460#include <sys/param.h>
3461int main() {
3462
3463#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3464 bogus endian macros
3465#endif
3466; return 0; }
3467EOF
3468if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3469  rm -rf conftest*
3470  # It does; now see whether it defined to BIG_ENDIAN or not.
3471cat > conftest.$ac_ext <<EOF
3472#line 3473 "configure"
3473#include "confdefs.h"
3474#include <sys/types.h>
3475#include <sys/param.h>
3476int main() {
3477
3478#if BYTE_ORDER != BIG_ENDIAN
3479 not big endian
3480#endif
3481; return 0; }
3482EOF
3483if { (eval echo configure:3484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3484  rm -rf conftest*
3485  ac_cv_c_bigendian=yes
3486else
3487  echo "configure: failed program was:" >&5
3488  cat conftest.$ac_ext >&5
3489  rm -rf conftest*
3490  ac_cv_c_bigendian=no
3491fi
3492rm -f conftest*
3493else
3494  echo "configure: failed program was:" >&5
3495  cat conftest.$ac_ext >&5
3496fi
3497rm -f conftest*
3498if test $ac_cv_c_bigendian = unknown; then
3499if test "$cross_compiling" = yes; then
3500    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3501else
3502  cat > conftest.$ac_ext <<EOF
3503#line 3504 "configure"
3504#include "confdefs.h"
3505main () {
3506  /* Are we little or big endian?  From Harbison&Steele.  */
3507  union
3508  {
3509    long l;
3510    char c[sizeof (long)];
3511  } u;
3512  u.l = 1;
3513  exit (u.c[sizeof (long) - 1] == 1);
3514}
3515EOF
3516if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3517then
3518  ac_cv_c_bigendian=no
3519else
3520  echo "configure: failed program was:" >&5
3521  cat conftest.$ac_ext >&5
3522  rm -fr conftest*
3523  ac_cv_c_bigendian=yes
3524fi
3525rm -fr conftest*
3526fi
3527
3528fi
3529fi
3530
3531echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3532if test $ac_cv_c_bigendian = yes; then
3533  cat >> confdefs.h <<\EOF
3534#define WORDS_BIGENDIAN 1
3535EOF
3536
3537fi
3538
3539echo $ac_n "checking for size_t""... $ac_c" 1>&6
3540echo "configure:3541: checking for size_t" >&5
3541if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3542  echo $ac_n "(cached) $ac_c" 1>&6
3543else
3544  cat > conftest.$ac_ext <<EOF
3545#line 3546 "configure"
3546#include "confdefs.h"
3547#include <sys/types.h>
3548#if STDC_HEADERS
3549#include <stdlib.h>
3550#include <stddef.h>
3551#endif
3552EOF
3553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3554  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3555  rm -rf conftest*
3556  ac_cv_type_size_t=yes
3557else
3558  rm -rf conftest*
3559  ac_cv_type_size_t=no
3560fi
3561rm -f conftest*
3562
3563fi
3564echo "$ac_t""$ac_cv_type_size_t" 1>&6
3565if test $ac_cv_type_size_t = no; then
3566  cat >> confdefs.h <<\EOF
3567#define size_t unsigned
3568EOF
3569
3570fi
3571
3572
3573# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3574# for constant arguments.  Useless!
3575echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3576echo "configure:3577: checking for working alloca.h" >&5
3577if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3578  echo $ac_n "(cached) $ac_c" 1>&6
3579else
3580  cat > conftest.$ac_ext <<EOF
3581#line 3582 "configure"
3582#include "confdefs.h"
3583#include <alloca.h>
3584int main() {
3585char *p = alloca(2 * sizeof(int));
3586; return 0; }
3587EOF
3588if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3589  rm -rf conftest*
3590  ac_cv_header_alloca_h=yes
3591else
3592  echo "configure: failed program was:" >&5
3593  cat conftest.$ac_ext >&5
3594  rm -rf conftest*
3595  ac_cv_header_alloca_h=no
3596fi
3597rm -f conftest*
3598fi
3599
3600echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3601if test $ac_cv_header_alloca_h = yes; then
3602  cat >> confdefs.h <<\EOF
3603#define HAVE_ALLOCA_H 1
3604EOF
3605
3606fi
3607
3608echo $ac_n "checking for alloca""... $ac_c" 1>&6
3609echo "configure:3610: checking for alloca" >&5
3610if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3611  echo $ac_n "(cached) $ac_c" 1>&6
3612else
3613  cat > conftest.$ac_ext <<EOF
3614#line 3615 "configure"
3615#include "confdefs.h"
3616
3617#ifdef __GNUC__
3618# define alloca __builtin_alloca
3619#else
3620# ifdef _MSC_VER
3621#  include <malloc.h>
3622#  define alloca _alloca
3623# else
3624#  if HAVE_ALLOCA_H
3625#   include <alloca.h>
3626#  else
3627#   ifdef _AIX
3628 #pragma alloca
3629#   else
3630#    ifndef alloca /* predefined by HP cc +Olibcalls */
3631char *alloca ();
3632#    endif
3633#   endif
3634#  endif
3635# endif
3636#endif
3637
3638int main() {
3639char *p = (char *) alloca(1);
3640; return 0; }
3641EOF
3642if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3643  rm -rf conftest*
3644  ac_cv_func_alloca_works=yes
3645else
3646  echo "configure: failed program was:" >&5
3647  cat conftest.$ac_ext >&5
3648  rm -rf conftest*
3649  ac_cv_func_alloca_works=no
3650fi
3651rm -f conftest*
3652fi
3653
3654echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3655if test $ac_cv_func_alloca_works = yes; then
3656  cat >> confdefs.h <<\EOF
3657#define HAVE_ALLOCA 1
3658EOF
3659
3660fi
3661
3662if test $ac_cv_func_alloca_works = no; then
3663  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3664  # that cause trouble.  Some versions do not even contain alloca or
3665  # contain a buggy version.  If you still want to use their alloca,
3666  # use ar to extract alloca.o from them instead of compiling alloca.c.
3667  ALLOCA=alloca.${ac_objext}
3668  cat >> confdefs.h <<\EOF
3669#define C_ALLOCA 1
3670EOF
3671
3672
3673echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3674echo "configure:3675: checking whether alloca needs Cray hooks" >&5
3675if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3676  echo $ac_n "(cached) $ac_c" 1>&6
3677else
3678  cat > conftest.$ac_ext <<EOF
3679#line 3680 "configure"
3680#include "confdefs.h"
3681#if defined(CRAY) && ! defined(CRAY2)
3682webecray
3683#else
3684wenotbecray
3685#endif
3686
3687EOF
3688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3689  egrep "webecray" >/dev/null 2>&1; then
3690  rm -rf conftest*
3691  ac_cv_os_cray=yes
3692else
3693  rm -rf conftest*
3694  ac_cv_os_cray=no
3695fi
3696rm -f conftest*
3697
3698fi
3699
3700echo "$ac_t""$ac_cv_os_cray" 1>&6
3701if test $ac_cv_os_cray = yes; then
3702for ac_func in _getb67 GETB67 getb67; do
3703  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3704echo "configure:3705: checking for $ac_func" >&5
3705if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3706  echo $ac_n "(cached) $ac_c" 1>&6
3707else
3708  cat > conftest.$ac_ext <<EOF
3709#line 3710 "configure"
3710#include "confdefs.h"
3711/* System header to define __stub macros and hopefully few prototypes,
3712    which can conflict with char $ac_func(); below.  */
3713#include <assert.h>
3714/* Override any gcc2 internal prototype to avoid an error.  */
3715/* We use char because int might match the return type of a gcc2
3716    builtin and then its argument prototype would still apply.  */
3717char $ac_func();
3718
3719int main() {
3720
3721/* The GNU C library defines this for functions which it implements
3722    to always fail with ENOSYS.  Some functions are actually named
3723    something starting with __ and the normal name is an alias.  */
3724#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3725choke me
3726#else
3727$ac_func();
3728#endif
3729
3730; return 0; }
3731EOF
3732if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3733  rm -rf conftest*
3734  eval "ac_cv_func_$ac_func=yes"
3735else
3736  echo "configure: failed program was:" >&5
3737  cat conftest.$ac_ext >&5
3738  rm -rf conftest*
3739  eval "ac_cv_func_$ac_func=no"
3740fi
3741rm -f conftest*
3742fi
3743
3744if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3745  echo "$ac_t""yes" 1>&6
3746  cat >> confdefs.h <<EOF
3747#define CRAY_STACKSEG_END $ac_func
3748EOF
3749
3750  break
3751else
3752  echo "$ac_t""no" 1>&6
3753fi
3754
3755done
3756fi
3757
3758echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3759echo "configure:3760: checking stack direction for C alloca" >&5
3760if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3761  echo $ac_n "(cached) $ac_c" 1>&6
3762else
3763  if test "$cross_compiling" = yes; then
3764  ac_cv_c_stack_direction=0
3765else
3766  cat > conftest.$ac_ext <<EOF
3767#line 3768 "configure"
3768#include "confdefs.h"
3769find_stack_direction ()
3770{
3771  static char *addr = 0;
3772  auto char dummy;
3773  if (addr == 0)
3774    {
3775      addr = &dummy;
3776      return find_stack_direction ();
3777    }
3778  else
3779    return (&dummy > addr) ? 1 : -1;
3780}
3781main ()
3782{
3783  exit (find_stack_direction() < 0);
3784}
3785EOF
3786if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3787then
3788  ac_cv_c_stack_direction=1
3789else
3790  echo "configure: failed program was:" >&5
3791  cat conftest.$ac_ext >&5
3792  rm -fr conftest*
3793  ac_cv_c_stack_direction=-1
3794fi
3795rm -fr conftest*
3796fi
3797
3798fi
3799
3800echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3801cat >> confdefs.h <<EOF
3802#define STACK_DIRECTION $ac_cv_c_stack_direction
3803EOF
3804
3805fi
3806
3807echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3808echo "configure:3809: checking for vprintf" >&5
3809if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3810  echo $ac_n "(cached) $ac_c" 1>&6
3811else
3812  cat > conftest.$ac_ext <<EOF
3813#line 3814 "configure"
3814#include "confdefs.h"
3815/* System header to define __stub macros and hopefully few prototypes,
3816    which can conflict with char vprintf(); below.  */
3817#include <assert.h>
3818/* Override any gcc2 internal prototype to avoid an error.  */
3819/* We use char because int might match the return type of a gcc2
3820    builtin and then its argument prototype would still apply.  */
3821char vprintf();
3822
3823int main() {
3824
3825/* The GNU C library defines this for functions which it implements
3826    to always fail with ENOSYS.  Some functions are actually named
3827    something starting with __ and the normal name is an alias.  */
3828#if defined (__stub_vprintf) || defined (__stub___vprintf)
3829choke me
3830#else
3831vprintf();
3832#endif
3833
3834; return 0; }
3835EOF
3836if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3837  rm -rf conftest*
3838  eval "ac_cv_func_vprintf=yes"
3839else
3840  echo "configure: failed program was:" >&5
3841  cat conftest.$ac_ext >&5
3842  rm -rf conftest*
3843  eval "ac_cv_func_vprintf=no"
3844fi
3845rm -f conftest*
3846fi
3847
3848if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3849  echo "$ac_t""yes" 1>&6
3850  cat >> confdefs.h <<\EOF
3851#define HAVE_VPRINTF 1
3852EOF
3853
3854else
3855  echo "$ac_t""no" 1>&6
3856fi
3857
3858if test "$ac_cv_func_vprintf" != yes; then
3859echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3860echo "configure:3861: checking for _doprnt" >&5
3861if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3862  echo $ac_n "(cached) $ac_c" 1>&6
3863else
3864  cat > conftest.$ac_ext <<EOF
3865#line 3866 "configure"
3866#include "confdefs.h"
3867/* System header to define __stub macros and hopefully few prototypes,
3868    which can conflict with char _doprnt(); below.  */
3869#include <assert.h>
3870/* Override any gcc2 internal prototype to avoid an error.  */
3871/* We use char because int might match the return type of a gcc2
3872    builtin and then its argument prototype would still apply.  */
3873char _doprnt();
3874
3875int main() {
3876
3877/* The GNU C library defines this for functions which it implements
3878    to always fail with ENOSYS.  Some functions are actually named
3879    something starting with __ and the normal name is an alias.  */
3880#if defined (__stub__doprnt) || defined (__stub____doprnt)
3881choke me
3882#else
3883_doprnt();
3884#endif
3885
3886; return 0; }
3887EOF
3888if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3889  rm -rf conftest*
3890  eval "ac_cv_func__doprnt=yes"
3891else
3892  echo "configure: failed program was:" >&5
3893  cat conftest.$ac_ext >&5
3894  rm -rf conftest*
3895  eval "ac_cv_func__doprnt=no"
3896fi
3897rm -f conftest*
3898fi
3899
3900if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3901  echo "$ac_t""yes" 1>&6
3902  cat >> confdefs.h <<\EOF
3903#define HAVE_DOPRNT 1
3904EOF
3905
3906else
3907  echo "$ac_t""no" 1>&6
3908fi
3909
3910fi
3911
3912for ac_func in gethostname socket snprintf getpagesize
3913do
3914echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3915echo "configure:3916: checking for $ac_func" >&5
3916if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3917  echo $ac_n "(cached) $ac_c" 1>&6
3918else
3919  cat > conftest.$ac_ext <<EOF
3920#line 3921 "configure"
3921#include "confdefs.h"
3922/* System header to define __stub macros and hopefully few prototypes,
3923    which can conflict with char $ac_func(); below.  */
3924#include <assert.h>
3925/* Override any gcc2 internal prototype to avoid an error.  */
3926/* We use char because int might match the return type of a gcc2
3927    builtin and then its argument prototype would still apply.  */
3928char $ac_func();
3929
3930int main() {
3931
3932/* The GNU C library defines this for functions which it implements
3933    to always fail with ENOSYS.  Some functions are actually named
3934    something starting with __ and the normal name is an alias.  */
3935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3936choke me
3937#else
3938$ac_func();
3939#endif
3940
3941; return 0; }
3942EOF
3943if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3944  rm -rf conftest*
3945  eval "ac_cv_func_$ac_func=yes"
3946else
3947  echo "configure: failed program was:" >&5
3948  cat conftest.$ac_ext >&5
3949  rm -rf conftest*
3950  eval "ac_cv_func_$ac_func=no"
3951fi
3952rm -f conftest*
3953fi
3954
3955if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3956  echo "$ac_t""yes" 1>&6
3957    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3958  cat >> confdefs.h <<EOF
3959#define $ac_tr_func 1
3960EOF
3961 
3962else
3963  echo "$ac_t""no" 1>&6
3964fi
3965done
3966
3967
3968
3969if test "x${GCC}" = "xyes"; then
3970  MAKEDEP='$(CC) -MM'
3971else
3972  case ${host} in
3973    *-dec-osf*)
3974            MAKEDEP='$(CC) -M'
3975      ;;
3976    *-sun-solaris*)
3977            MAKEDEP='/usr/ccs/lib/cpp -M'
3978      ;;
3979    *)
3980            MAKEDEP='true'
3981      ;;
3982  esac
3983fi
3984
3985
3986if test "x${GCC}" = "xyes" -a "x$CFLAGS" = "x-g -O2"; then
3987  CFLAGS="${CFLAGS} -Wall -Wmissing-prototypes -Wno-implicit-int"
3988fi
3989
3990echo $ac_n "checking for languages to install""... $ac_c" 1>&6
3991echo "configure:3992: checking for languages to install" >&5
3992# Check whether --enable-linguas or --disable-linguas was given.
3993if test "${enable_linguas+set}" = set; then
3994  enableval="$enable_linguas"
3995   LINGUAS="$enableval"
3996else
3997   LINGUAS=""
3998fi
3999
4000if test "x$LINGUAS" = x; then
4001 
4002  LINGUAS="`echo $srcdir/po/*.po | sed -e 's/[^ ]*\/po\/\([^ ]*\)\.po/\1/g'`"
4003 
4004fi
4005if test $REP_MSGFMT = true; then
4006  LINGUAS=""
4007fi
4008echo "$ac_t""$LINGUAS" 1>&6
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027trap '' 1 2 15
4028cat > confcache <<\EOF
4029# This file is a shell script that caches the results of configure
4030# tests run on this system so they can be shared between configure
4031# scripts and configure runs.  It is not useful on other systems.
4032# If it contains results you don't want to keep, you may remove or edit it.
4033#
4034# By default, configure uses ./config.cache as the cache file,
4035# creating it if it does not exist already.  You can give configure
4036# the --cache-file=FILE option to use a different cache file; that is
4037# what configure does when it calls configure scripts in
4038# subdirectories, so they share the cache.
4039# Giving --cache-file=/dev/null disables caching, for debugging configure.
4040# config.status only pays attention to the cache file if you give it the
4041# --recheck option to rerun configure.
4042#
4043EOF
4044# The following way of writing the cache mishandles newlines in values,
4045# but we know of no workaround that is simple, portable, and efficient.
4046# So, don't put newlines in cache variables' values.
4047# Ultrix sh set writes to stderr and can't be redirected directly,
4048# and sets the high bit in the cache file unless we assign to the vars.
4049(set) 2>&1 |
4050  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4051  *ac_space=\ *)
4052    # `set' does not quote correctly, so add quotes (double-quote substitution
4053    # turns \\\\ into \\, and sed turns \\ into \).
4054    sed -n \
4055      -e "s/'/'\\\\''/g" \
4056      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4057    ;;
4058  *)
4059    # `set' quotes correctly as required by POSIX, so do not add quotes.
4060    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4061    ;;
4062  esac >> confcache
4063if cmp -s $cache_file confcache; then
4064  :
4065else
4066  if test -w $cache_file; then
4067    echo "updating cache $cache_file"
4068    cat confcache > $cache_file
4069  else
4070    echo "not updating unwritable cache $cache_file"
4071  fi
4072fi
4073rm -f confcache
4074
4075trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4076
4077test "x$prefix" = xNONE && prefix=$ac_default_prefix
4078# Let make expand exec_prefix.
4079test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4080
4081# Any assignment to VPATH causes Sun make to only execute
4082# the first set of double-colon rules, so remove it if not needed.
4083# If there is a colon in the path, we need to keep it.
4084if test "x$srcdir" = x.; then
4085  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4086fi
4087
4088trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4089
4090DEFS=-DHAVE_CONFIG_H
4091
4092# Without the "./", some shells look in PATH for config.status.
4093: ${CONFIG_STATUS=./config.status}
4094
4095echo creating $CONFIG_STATUS
4096rm -f $CONFIG_STATUS
4097cat > $CONFIG_STATUS <<EOF
4098#! /bin/sh
4099# Generated automatically by configure.
4100# Run this file to recreate the current configuration.
4101# This directory was configured as follows,
4102# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4103#
4104# $0 $ac_configure_args
4105#
4106# Compiler output produced by configure, useful for debugging
4107# configure, is in ./config.log if it exists.
4108
4109ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4110for ac_option
4111do
4112  case "\$ac_option" in
4113  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4114    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4115    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4116  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4117    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4118    exit 0 ;;
4119  -help | --help | --hel | --he | --h)
4120    echo "\$ac_cs_usage"; exit 0 ;;
4121  *) echo "\$ac_cs_usage"; exit 1 ;;
4122  esac
4123done
4124
4125ac_given_srcdir=$srcdir
4126ac_given_INSTALL="$INSTALL"
4127
4128trap 'rm -fr `echo "${output_files} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4129EOF
4130cat >> $CONFIG_STATUS <<EOF
4131
4132# Protect against being on the right side of a sed subst in config.status.
4133sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4134 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4135$ac_vpsub
4136$extrasub
4137s%@SHELL@%$SHELL%g
4138s%@CFLAGS@%$CFLAGS%g
4139s%@CPPFLAGS@%$CPPFLAGS%g
4140s%@CXXFLAGS@%$CXXFLAGS%g
4141s%@FFLAGS@%$FFLAGS%g
4142s%@DEFS@%$DEFS%g
4143s%@LDFLAGS@%$LDFLAGS%g
4144s%@LIBS@%$LIBS%g
4145s%@exec_prefix@%$exec_prefix%g
4146s%@prefix@%$prefix%g
4147s%@program_transform_name@%$program_transform_name%g
4148s%@bindir@%$bindir%g
4149s%@sbindir@%$sbindir%g
4150s%@libexecdir@%$libexecdir%g
4151s%@datadir@%$datadir%g
4152s%@sysconfdir@%$sysconfdir%g
4153s%@sharedstatedir@%$sharedstatedir%g
4154s%@localstatedir@%$localstatedir%g
4155s%@libdir@%$libdir%g
4156s%@includedir@%$includedir%g
4157s%@oldincludedir@%$oldincludedir%g
4158s%@infodir@%$infodir%g
4159s%@mandir@%$mandir%g
4160s%@SUBDIRS@%$SUBDIRS%g
4161s%@host@%$host%g
4162s%@host_alias@%$host_alias%g
4163s%@host_cpu@%$host_cpu%g
4164s%@host_vendor@%$host_vendor%g
4165s%@host_os@%$host_os%g
4166s%@CC@%$CC%g
4167s%@CPP@%$CPP%g
4168s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4169s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4170s%@INSTALL_DATA@%$INSTALL_DATA%g
4171s%@LN_S@%$LN_S%g
4172s%@SET_MAKE@%$SET_MAKE%g
4173s%@X_CFLAGS@%$X_CFLAGS%g
4174s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4175s%@X_LIBS@%$X_LIBS%g
4176s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4177s%@XINERAMA_LIBS@%$XINERAMA_LIBS%g
4178s%@REP_VERSION@%$REP_VERSION%g
4179s%@REP_CFLAGS@%$REP_CFLAGS%g
4180s%@REP_LIBS@%$REP_LIBS%g
4181s%@REP_EXECDIR@%$REP_EXECDIR%g
4182s%@REP_MSGFMT@%$REP_MSGFMT%g
4183s%@GDK_PIXBUF_VERSION@%$GDK_PIXBUF_VERSION%g
4184s%@GDK_PIXBUF_CFLAGS@%$GDK_PIXBUF_CFLAGS%g
4185s%@GDK_PIXBUF_LIBS@%$GDK_PIXBUF_LIBS%g
4186s%@IMLIB_CONFIG@%$IMLIB_CONFIG%g
4187s%@IMLIB_CFLAGS@%$IMLIB_CFLAGS%g
4188s%@IMLIB_LIBS@%$IMLIB_LIBS%g
4189s%@IMAGE_LIBS@%$IMAGE_LIBS%g
4190s%@IMAGE_CFLAGS@%$IMAGE_CFLAGS%g
4191s%@GTK_CONFIG@%$GTK_CONFIG%g
4192s%@GTK_CFLAGS@%$GTK_CFLAGS%g
4193s%@GTK_LIBS@%$GTK_LIBS%g
4194s%@AUDIOFILE_LIBS@%$AUDIOFILE_LIBS%g
4195s%@AUDIOFILE_CFLAGS@%$AUDIOFILE_CFLAGS%g
4196s%@ESD_LIBS@%$ESD_LIBS%g
4197s%@ESD_CFLAGS@%$ESD_CFLAGS%g
4198s%@GNOME_CC_CFLAGS@%$GNOME_CC_CFLAGS%g
4199s%@GNOME_CC_LIBS@%$GNOME_CC_LIBS%g
4200s%@REP_GTK_GNOME@%$REP_GTK_GNOME%g
4201s%@GNOMEDIR@%$GNOMEDIR%g
4202s%@ALLOCA@%$ALLOCA%g
4203s%@MAKEDEP@%$MAKEDEP%g
4204s%@LINGUAS@%$LINGUAS%g
4205s%@version@%$version%g
4206s%@sawfishdir@%$sawfishdir%g
4207s%@sawfishexecdir@%$sawfishexecdir%g
4208s%@lispdir@%$lispdir%g
4209s%@localedir@%$localedir%g
4210s%@HAVE_X11@%$HAVE_X11%g
4211s%@LIBOBJS@%$LIBOBJS%g
4212
4213CEOF
4214EOF
4215
4216cat >> $CONFIG_STATUS <<\EOF
4217
4218# Split the substitutions into bite-sized pieces for seds with
4219# small command number limits, like on Digital OSF/1 and HP-UX.
4220ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4221ac_file=1 # Number of current file.
4222ac_beg=1 # First line for current file.
4223ac_end=$ac_max_sed_cmds # Line after last line for current file.
4224ac_more_lines=:
4225ac_sed_cmds=""
4226while $ac_more_lines; do
4227  if test $ac_beg -gt 1; then
4228    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4229  else
4230    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4231  fi
4232  if test ! -s conftest.s$ac_file; then
4233    ac_more_lines=false
4234    rm -f conftest.s$ac_file
4235  else
4236    if test -z "$ac_sed_cmds"; then
4237      ac_sed_cmds="sed -f conftest.s$ac_file"
4238    else
4239      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4240    fi
4241    ac_file=`expr $ac_file + 1`
4242    ac_beg=$ac_end
4243    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4244  fi
4245done
4246if test -z "$ac_sed_cmds"; then
4247  ac_sed_cmds=cat
4248fi
4249EOF
4250
4251cat >> $CONFIG_STATUS <<EOF
4252
4253CONFIG_FILES=\${CONFIG_FILES-"${output_files}"}
4254EOF
4255cat >> $CONFIG_STATUS <<\EOF
4256for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4257  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4258  case "$ac_file" in
4259  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4260       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4261  *) ac_file_in="${ac_file}.in" ;;
4262  esac
4263
4264  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4265
4266  # Remove last slash and all that follows it.  Not all systems have dirname.
4267  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4268  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4269    # The file is in a subdirectory.
4270    test ! -d "$ac_dir" && mkdir "$ac_dir"
4271    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4272    # A "../" for each directory in $ac_dir_suffix.
4273    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4274  else
4275    ac_dir_suffix= ac_dots=
4276  fi
4277
4278  case "$ac_given_srcdir" in
4279  .)  srcdir=.
4280      if test -z "$ac_dots"; then top_srcdir=.
4281      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4282  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4283  *) # Relative path.
4284    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4285    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4286  esac
4287
4288  case "$ac_given_INSTALL" in
4289  [/$]*) INSTALL="$ac_given_INSTALL" ;;
4290  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4291  esac
4292
4293  echo creating "$ac_file"
4294  rm -f "$ac_file"
4295  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4296  case "$ac_file" in
4297  *Makefile*) ac_comsub="1i\\
4298# $configure_input" ;;
4299  *) ac_comsub= ;;
4300  esac
4301
4302  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4303  sed -e "$ac_comsub
4304s%@configure_input@%$configure_input%g
4305s%@srcdir@%$srcdir%g
4306s%@top_srcdir@%$top_srcdir%g
4307s%@INSTALL@%$INSTALL%g
4308" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4309fi; done
4310rm -f conftest.s*
4311
4312# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4313# NAME is the cpp macro being defined and VALUE is the value it is being given.
4314#
4315# ac_d sets the value in "#define NAME VALUE" lines.
4316ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4317ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4318ac_dC='\3'
4319ac_dD='%g'
4320# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4321ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4322ac_uB='\([      ]\)%\1#\2define\3'
4323ac_uC=' '
4324ac_uD='\4%g'
4325# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4326ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4327ac_eB='$%\1#\2define\3'
4328ac_eC=' '
4329ac_eD='%g'
4330
4331if test "${CONFIG_HEADERS+set}" != set; then
4332EOF
4333cat >> $CONFIG_STATUS <<EOF
4334  CONFIG_HEADERS="config.h"
4335EOF
4336cat >> $CONFIG_STATUS <<\EOF
4337fi
4338for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4339  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4340  case "$ac_file" in
4341  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4342       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4343  *) ac_file_in="${ac_file}.in" ;;
4344  esac
4345
4346  echo creating $ac_file
4347
4348  rm -f conftest.frag conftest.in conftest.out
4349  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4350  cat $ac_file_inputs > conftest.in
4351
4352EOF
4353
4354# Transform confdefs.h into a sed script conftest.vals that substitutes
4355# the proper values into config.h.in to produce config.h.  And first:
4356# Protect against being on the right side of a sed subst in config.status.
4357# Protect against being in an unquoted here document in config.status.
4358rm -f conftest.vals
4359cat > conftest.hdr <<\EOF
4360s/[\\&%]/\\&/g
4361s%[\\$`]%\\&%g
4362s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4363s%ac_d%ac_u%gp
4364s%ac_u%ac_e%gp
4365EOF
4366sed -n -f conftest.hdr confdefs.h > conftest.vals
4367rm -f conftest.hdr
4368
4369# This sed command replaces #undef with comments.  This is necessary, for
4370# example, in the case of _POSIX_SOURCE, which is predefined and required
4371# on some systems where configure will not decide to define it.
4372cat >> conftest.vals <<\EOF
4373s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4374EOF
4375
4376# Break up conftest.vals because some shells have a limit on
4377# the size of here documents, and old seds have small limits too.
4378
4379rm -f conftest.tail
4380while :
4381do
4382  ac_lines=`grep -c . conftest.vals`
4383  # grep -c gives empty output for an empty file on some AIX systems.
4384  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4385  # Write a limited-size here document to conftest.frag.
4386  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4387  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4388  echo 'CEOF
4389  sed -f conftest.frag conftest.in > conftest.out
4390  rm -f conftest.in
4391  mv conftest.out conftest.in
4392' >> $CONFIG_STATUS
4393  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4394  rm -f conftest.vals
4395  mv conftest.tail conftest.vals
4396done
4397rm -f conftest.vals
4398
4399cat >> $CONFIG_STATUS <<\EOF
4400  rm -f conftest.frag conftest.h
4401  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4402  cat conftest.in >> conftest.h
4403  rm -f conftest.in
4404  if cmp -s $ac_file conftest.h 2>/dev/null; then
4405    echo "$ac_file is unchanged"
4406    rm -f conftest.h
4407  else
4408    # Remove last slash and all that follows it.  Not all systems have dirname.
4409      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4410      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4411      # The file is in a subdirectory.
4412      test ! -d "$ac_dir" && mkdir "$ac_dir"
4413    fi
4414    rm -f $ac_file
4415    mv conftest.h $ac_file
4416  fi
4417fi; done
4418
4419EOF
4420cat >> $CONFIG_STATUS <<EOF
4421
4422EOF
4423cat >> $CONFIG_STATUS <<\EOF
4424
4425exit 0
4426EOF
4427chmod +x $CONFIG_STATUS
4428rm -fr confdefs* $ac_clean_files
4429test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4430
4431
4432tem=`make --version -f /dev/null 2>&1 | grep GNU`
4433if test "x$tem" = "x"; then
4434  echo "configure: warning: You need to use GNU Make when compiling sawfish" 1>&2
4435fi
4436
Note: See TracBrowser for help on using the repository browser.