Reformatted.
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996, 2005 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 use_regex_malloc='yes'
252 with_esd_sound='no'
253 native_sound_lib=''
254 with_gtk='no'
255 with_gnome='no'
256 use_assertions="yes"
257 with_toolbars=""
258 with_tty=""
259 use_union_type="no"
260 with_dnet=""
261 pdump=''
262 with_dragndrop="no"
263 with_ipv6_cname="no"
264
265
266
267
268 arguments="$@"
269
270 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
271 quoted_arguments=
272 for i in "$@"; do
273    case "$i" in
274    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275    | --no-cr | --no-c) ;;
276    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
278    *)
279    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
280    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
281    esac
282 done
283
284 while test $# != 0; do
285   arg="$1"; shift
286   case "$arg" in
287     --no-create|--no-recursion) ;;
288         -* )
289             case "$arg" in
290         -*=*)
291           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
292           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
293           valomitted=no
294         ;;
295                                                                           -*)
296                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
297           val="yes" valomitted=yes
298         ;;
299       esac
300
301             optname="$opt"
302       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
303
304             case "${valomitted}-${opt}" in yes-without_* )
305         opt=`echo $opt | sed 's/without/with/'`
306         valomitted="no" val="no" ;;
307       esac
308
309             case "$opt" in
310
311         with_site_lisp  | \
312         with_prefix     | \
313         with_site_modules | \
314         with_x          | \
315         with_x11        | \
316         with_gtk        | \
317         with_gnome      | \
318         with_msw        | \
319         with_gcc        | \
320         dynamic         | \
321         with_ncurses    | \
322         with_dnet       | \
323         with_socks      | \
324         with_dragndrop  | \
325         with_cde        | \
326         with_offix      | \
327         with_gpm        | \
328         with_xpm        | \
329         with_xface      | \
330         with_gif        | \
331         with_jpeg       | \
332         with_png        | \
333         with_tiff       | \
334         with_wmcommand  | \
335         with_xmu        | \
336         with_purify     | \
337         with_quantify   | \
338         with_toolbars   | \
339         with_tty        | \
340         with_xfs        | \
341         with_i18n3      | \
342         with_mule       | \
343         with_utf_2000   | \
344         with_chise      | \
345         with_text_coding| \
346         with_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_concord    | \
354         with_ldap       | \
355         with_postgresql | \
356         with_pop        | \
357         with_kerberos   | \
358         with_hesiod     | \
359         with_dnet       | \
360         with_infodock   | \
361         with_netinstall | \
362         with_ipv6_cname | \
363         external_widget | \
364         verbose         | \
365         extra_verbose   | \
366         usage_tracking  | \
367         use_union_type  | \
368         pdump           | \
369         debug           | \
370         use_assertions  | \
371         use_regex_malloc | \
372         memory_usage_stats | \
373         with_clash_detection | \
374         with_modules    | \
375         quick_build )
376                   case "$val" in
377             y | ye | yes )      val=yes ;;
378             n | no )            val=no  ;;
379             * ) (echo "$progname: Usage error:"
380 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
381 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
382           esac
383           eval "$opt=\"$val\"" ;;
384
385
386                         srcdir          | \
387         compiler        | \
388         cflags          | \
389         cpp             | \
390         cppflags        | \
391         libs            | \
392         ldflags         | \
393         cache_file      | \
394         native_sound_lib| \
395         site_lisp       | \
396         x_includes      | \
397         x_libraries     | \
398         site_includes   | \
399         site_libraries  | \
400         site_prefixes   | \
401         site_runtime_libraries )
402                   if test "$valomitted" = "yes" ; then
403                     if test "$#" = 0 ; then
404               (echo "$progname: Usage error:"
405 echo " " "The \`--$optname' option requires a value."
406 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
407             fi
408             val="$1"; shift
409           fi
410           eval "$opt=\"$val\""
411         ;;
412
413                 rel_alloc | \
414         with_dlmalloc | \
415         with_debug_malloc  | use_debug_malloc | \
416         with_system_malloc | use_system_malloc )
417           case "$val" in
418             y | ye | yes )      val=yes ;;
419             n | no )            val=no  ;;
420             d | de | def | defa | defau | defaul | default ) val=default ;;
421             * ) (echo "$progname: Usage error:"
422 echo " " "The \`--$optname' option requires one of these values:
423   \`yes', \`no', or \`default'."
424 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
425           esac
426           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
427           eval "$opt=\"$val\""
428         ;;
429
430                 "with_database" )
431           with_database_berkdb=no
432           with_database_dbm=no
433           with_database_gdbm=no
434           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
435             case "$x" in
436               no ) ;;
437               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
438               d | db | dbm )                               with_database_dbm=yes    ;;
439               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
440               * ) (echo "$progname: Usage error:"
441 echo " " "The \`--$optname' option value
442   must be either \`no' or a comma-separated list
443   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
444 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
445             esac
446           done
447           if test "$with_database_dbm"  = "yes" -a \
448                   "$with_database_gdbm" = "yes"; then
449           (echo "$progname: Usage error:"
450 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
451   with the \`--$optname' option."
452 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
453           fi
454         ;;
455
456                 "with_sound" )
457                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
458             case "$x" in
459                       n | no | non | none ) new_sdefault=no ;;
460               a | al | all | both ) new_sdefault=yes ;;
461
462               native )       with_native_sound=yes ;;
463               nonative )     with_native_sound=no ;;
464
465               nas )          with_nas_sound=yes ;;
466               nonas )        with_nas_sound=no ;;
467
468               esd )          with_esd_sound=yes ;;
469               noesd )        with_esd_sound=no ;;
470
471               * ) bogus_sound=yes ;;
472             esac
473             if test "$bogus_sound" -o \
474                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
475                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
476                 (echo "$progname: Usage error:"
477 echo " " "Valid types for the \`--$optname' option are:
478   $types.
479 Option \`all' or \`none' must be first in the list.
480 The default is to autodetect native and NAS sound support."
481 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
482             elif test -n "$new_sdefault" ; then
483                 with_native_sound=$new_sdefault
484                 with_nas_sound=$new_sdefault
485                 with_esd_sound=$new_sdefault
486                 new_sdefault=   # reset this
487             fi
488             sound_notfirst=true
489           done
490         ;;
491
492                         "with_athena" )
493           case "$val" in
494             xa | xaw )                    val=xaw    ;;
495             3 | 3d | xaw3d )              val=3d     ;;
496                         ne | nex | next | naxtaw)     val=next   ;;
497                         9 | 95 | xaw95 )              val=95     ;;
498             xp | xpm | xawxpm )           val=xpm    ;;
499             * ) (echo "$progname: Usage error:"
500 echo " " "The \`--$optname' option must have one of these values:
501   \`xaw', \`3d', \`next', \`95', or \`xpm'."
502 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
503           esac
504           eval "$opt=\"$val\""
505         ;;
506
507                 "with_xim" )
508           case "$val" in
509             y | ye | yes )                val=yes   ;;
510             n | no | non | none )         val=no    ;;
511             x | xl | xli | xlib )         val=xlib  ;;
512             m | mo | mot | moti | motif ) val=motif ;;
513             * ) (echo "$progname: Usage error:"
514 echo " " "The \`--$optname' option must have one of these values:
515   \`motif', \`xlib', \`yes', or \`no'."
516 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
517           esac
518           eval "$opt=\"$val\""
519         ;;
520
521                 "mail_locking" )
522           case "$val" in
523             lockf )     val=lockf ;;
524             flock )     val=flock ;;
525             file | dot ) val=file  ;;
526             locking )   val=locking  ;;
527             * ) (echo "$progname: Usage error:"
528 echo " " "The \`--$optname' option must have one of these values:
529   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
530 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
531           esac
532           eval "$opt=\"$val\""
533         ;;
534
535                 "error_checking" )
536                           
537           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
538             case "$x" in
539                       n | no | non | none ) new_default=no ;;
540               a | al | all )        new_default=yes ;;
541
542               extents )       error_check_extents=yes ;;
543               noextents )     error_check_extents=no ;;
544
545               typecheck )     error_check_typecheck=yes ;;
546               notypecheck )   error_check_typecheck=no ;;
547
548               bufpos )        error_check_bufpos=yes ;;
549               nobufpos )      error_check_bufpos=no ;;
550
551               gc )            error_check_gc=yes ;;
552               nogc )          error_check_gc=no ;;
553
554               malloc )        error_check_malloc=yes ;;
555               nomalloc )      error_check_malloc=no ;;
556
557               byte_code )     error_check_byte_code=yes ;;
558               nobyte_code )   error_check_byte_code=no ;;
559
560               glyphs )     error_check_glyphs=yes ;;
561               noglyphs )   error_check_glyphs=no ;;
562
563               * ) bogus_error_check=yes ;;
564             esac
565             if test "$bogus_error_check" -o \
566                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
567                 if test "$error_check_default" = yes ; then
568                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
569                 else
570                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
571                 fi
572                 (echo "$progname: Usage error:"
573 echo " " "Valid types for the \`--$optname' option are:
574   $types."
575 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
576             elif test -n "$new_default" ; then
577                 error_check_extents=$new_default
578                 error_check_typecheck=$new_default
579                 error_check_bufpos=$new_default
580                 error_check_gc=$new_default
581                 error_check_malloc=$new_default
582                 error_check_byte_code=$new_default
583                 error_check_glyphs=$new_default
584                 new_default=    # reset this
585             fi
586             echeck_notfirst=true
587           done
588         ;;
589
590                                 
591                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
592         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
593         archlibdir | docdir | package_path | moduledir )
594                    if test "$valomitted" = "yes"; then
595              if test "$#" = 0; then
596                  (echo "$progname: Usage error:"
597 echo " " "The \`--$optname' option requires a value."
598 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
599              fi
600              val="$1"; shift
601            fi
602            eval "$opt=\"$val\""
603
604                            case "$opt" in
605                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
606     Defining EXEC_PREFIX_USER_DEFINED
607 EOF
608 cat >> confdefs.h <<\EOF
609 #define EXEC_PREFIX_USER_DEFINED 1
610 EOF
611 }
612  ;;
613              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
614     Defining LISPDIR_USER_DEFINED
615 EOF
616 cat >> confdefs.h <<\EOF
617 #define LISPDIR_USER_DEFINED 1
618 EOF
619 }
620  ;;
621              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
622     Defining SITELISPDIR_USER_DEFINED
623 EOF
624 cat >> confdefs.h <<\EOF
625 #define SITELISPDIR_USER_DEFINED 1
626 EOF
627 }
628  ;;
629              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
630     Defining MODULEDIR_USER_DEFINED
631 EOF
632 cat >> confdefs.h <<\EOF
633 #define MODULEDIR_USER_DEFINED 1
634 EOF
635 }
636  ;;
637              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
638     Defining ETCDIR_USER_DEFINED
639 EOF
640 cat >> confdefs.h <<\EOF
641 #define ETCDIR_USER_DEFINED 1
642 EOF
643 }
644  ;;
645              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
646     Defining INFODIR_USER_DEFINED
647 EOF
648 cat >> confdefs.h <<\EOF
649 #define INFODIR_USER_DEFINED 1
650 EOF
651 }
652  ;;
653              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
654     Defining INFOPATH_USER_DEFINED
655 EOF
656 cat >> confdefs.h <<\EOF
657 #define INFOPATH_USER_DEFINED 1
658 EOF
659 }
660  ;;
661              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining PACKAGE_PATH_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define PACKAGE_PATH_USER_DEFINED 1
666 EOF
667 }
668  ;;
669              datadir )
670                 { test "$extra_verbose" = "yes" && cat << \EOF
671     Defining INFODIR_USER_DEFINED
672 EOF
673 cat >> confdefs.h <<\EOF
674 #define INFODIR_USER_DEFINED 1
675 EOF
676 }
677
678                 { test "$extra_verbose" = "yes" && cat << \EOF
679     Defining LISPDIR_USER_DEFINED
680 EOF
681 cat >> confdefs.h <<\EOF
682 #define LISPDIR_USER_DEFINED 1
683 EOF
684 }
685
686                 { test "$extra_verbose" = "yes" && cat << \EOF
687     Defining MODULEDIR_USER_DEFINED
688 EOF
689 cat >> confdefs.h <<\EOF
690 #define MODULEDIR_USER_DEFINED 1
691 EOF
692 }
693
694                 { test "$extra_verbose" = "yes" && cat << \EOF
695     Defining ETCDIR_USER_DEFINED
696 EOF
697 cat >> confdefs.h <<\EOF
698 #define ETCDIR_USER_DEFINED 1
699 EOF
700 }
701
702                 { test "$extra_verbose" = "yes" && cat << \EOF
703     Defining DOCDIR_USER_DEFINED
704 EOF
705 cat >> confdefs.h <<\EOF
706 #define DOCDIR_USER_DEFINED 1
707 EOF
708 }
709
710                 { test "$extra_verbose" = "yes" && cat << \EOF
711     Defining ARCHLIBDIR_USER_DEFINED
712 EOF
713 cat >> confdefs.h <<\EOF
714 #define ARCHLIBDIR_USER_DEFINED 1
715 EOF
716 }
717  ;;
718              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
719     Defining DOCDIR_USER_DEFINED
720 EOF
721 cat >> confdefs.h <<\EOF
722 #define DOCDIR_USER_DEFINED 1
723 EOF
724 }
725  ;;
726              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
727     Defining ARCHLIBDIR_USER_DEFINED
728 EOF
729 cat >> confdefs.h <<\EOF
730 #define ARCHLIBDIR_USER_DEFINED 1
731 EOF
732 }
733  ;;
734            esac
735         ;;
736
737                 "no_create" ) ;;
738
739                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
740
741                 "with_menubars"   | \
742         "with_scrollbars" | \
743         "with_dialogs"    | \
744         "with_widgets" )
745           case "$val" in
746             l | lu | luc | luci | lucid )               val=lucid  ;;
747             mo | mot | moti | motif )                   val=motif  ;;
748             a | at | ath | athe | athen | athena )      val=athena ;;
749             n | no | non | none )                       val=no     ;;
750             y | ye | yes )                              val=yes    ;;
751                         "")                                             val=yes    ;;
752             g | gt | gtk )                              val=gtk    ;;
753             ms | msw )                                  val=msw    ;;
754             * ) (echo "$progname: Usage error:"
755 echo " " "The \`--$optname' option must have one of these values:
756   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
757 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
758           esac
759           eval "$opt=\"$val\""
760         ;;
761
762                 "use_minimal_tagbits" | \
763         "use_indexed_lrecord_implementation" | \
764         "run_in_place"  | \
765         "const_is_losing" | \
766         "with_gnu_make" )
767           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
768         ;;
769
770                 * ) (echo "$progname: Usage error:"
771 echo " " "Unrecognized option: $arg"
772 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
773
774       esac
775     ;;
776
777         *-*-*) configuration="$arg" ;;
778
779         *) (echo "$progname: Usage error:"
780 echo " " "Unrecognized argument: $arg"
781 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
782
783   esac
784 done
785
786
787 test -n "$cpp"      && CPP="$cpp"
788 test -n "$cppflags" && CPPFLAGS="$cppflags"
789 test -n "$libs"     && LIBS="$libs"
790 test -n "$ldflags"  && LDFLAGS="$ldflags"
791
792 eval set x "$quoted_arguments"; shift
793
794 test "$extra_verbose" = "yes" && verbose=yes
795
796 test -n "$with_x" && with_x11="$with_x"
797
798 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
799   test "$with_system_malloc" = "default" && with_system_malloc=yes
800 fi
801
802
803
804 if test "$with_cde $with_tooltalk" = "yes no"; then
805   (echo "$progname: Usage error:"
806 echo " " "--with-cde requires --with-tooltalk"
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808 elif test "$with_tooltalk" = "no" ; then with_cde=no
809 elif test "$with_cde" = "yes"; then with_tooltalk=yes
810 fi
811
812
813 case "$srcdir" in
814
815     "" )
816     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
817       if test -f "$dir/src/lisp.h" -a \
818               -f "$dir/lisp/version.el" ; then
819         srcdir="$dir"
820         break
821       fi
822     done
823     if test -z "$srcdir" ; then
824       (echo "$progname: Usage error:"
825 echo " " "Neither the current directory nor its parent seem to
826   contain the XEmacs sources.  If you do not want to build XEmacs in its
827   source tree, you should run \`$progname' in the directory in which
828   you wish to build XEmacs, using the \`--srcdir' option to say where the
829   sources may be found."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831     fi
832   ;;
833
834     * )
835     if test ! -f "$srcdir/src/lisp.h" -o \
836             ! -f "$srcdir/lisp/version.el" ; then
837       (echo "$progname: Usage error:"
838 echo " " "The directory specified with the \`--srcdir' option,
839   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
840   either run the \`$progname' script at the top of the XEmacs source
841   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
842 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
843     fi
844   ;;
845 esac
846
847 if test -z "$configuration"; then
848     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
849   if test -z "$configuration"; then
850     (echo "$progname: Usage error:"
851 echo " " "XEmacs has not been ported to this host type.
852 Try explicitly specifying the CONFIGURATION when rerunning configure."
853 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
854   fi
855 fi
856
857 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
858 echo "configure:859: checking whether ln -s works" >&5
859
860 rm -f conftestdata
861 if ln -s X conftestdata 2>/dev/null
862 then
863   rm -f conftestdata
864   ac_cv_prog_LN_S="ln -s"
865 else
866   ac_cv_prog_LN_S=ln
867 fi
868 LN_S="$ac_cv_prog_LN_S"
869 if test "$ac_cv_prog_LN_S" = "ln -s"; then
870   echo "$ac_t""yes" 1>&6
871 else
872   echo "$ac_t""no" 1>&6
873 fi
874
875
876 for dir in lisp etc man info tests; do
877   if test ! -d "$dir" ; then
878     echo Making symbolic link to "$srcdir/$dir"
879     ${LN_S} "$srcdir/$dir" "$dir"
880   fi
881 done
882
883
884 absolute_pwd="`pwd`";
885 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
886 then blddir="$PWD"
887 else blddir="$absolute_pwd"; if test -d "/net"; then
888   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
889   blddir=`echo "$blddir" | \
890    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
891 fi
892 fi
893
894
895 case "$srcdir" in
896   /* ) ;;
897   .  ) srcdir="$blddir" ;;
898   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
899   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
900   srcdir=`echo "$srcdir" | \
901    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
902 fi ;;
903 esac
904
905 if test `pwd` != `sh -c cd $srcdir && pwd`  \
906    && test -f "$srcdir/src/config.h"; then
907   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
908    echo "   as a build directory right now; it has been configured in its own"
909    echo "   right.  To configure in another directory as well, you MUST"
910    echo "   use GNU make.  If you do not have GNU make, then you must"
911    echo "   now do \`make distclean' in $srcdir,"
912    echo "   and then run $progname again.") >&2
913   extrasub='/^VPATH[     ]*=/c\
914 vpath %.c $(srcdir)\
915 vpath %.h $(srcdir)\
916 vpath %.y $(srcdir)\
917 vpath %.l $(srcdir)\
918 vpath %.s $(srcdir)\
919 vpath %.in $(srcdir)'
920 fi
921
922 . "$srcdir/version.sh" || exit 1;
923 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
924 : "${extra_verbose=$beta}"
925 version="${emacs_major_version}.${emacs_minor_version}"
926 { test "$extra_verbose" = "yes" && cat << EOF
927     Defining EMACS_MAJOR_VERSION = $emacs_major_version
928 EOF
929 cat >> confdefs.h <<EOF
930 #define EMACS_MAJOR_VERSION $emacs_major_version
931 EOF
932 }
933
934 { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_MINOR_VERSION = $emacs_minor_version
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_MINOR_VERSION $emacs_minor_version
939 EOF
940 }
941
942 if test -n "$emacs_beta_version" ; then
943   if test "$beta" = "yes"; then
944         version="${version}-b${emacs_beta_version}"
945         { test "$extra_verbose" = "yes" && cat << EOF
946     Defining EMACS_BETA_VERSION = $emacs_beta_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define EMACS_BETA_VERSION $emacs_beta_version
950 EOF
951 }
952
953   else
954         version="${version}.${emacs_beta_version}"
955         { test "$extra_verbose" = "yes" && cat << EOF
956     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
957 EOF
958 cat >> confdefs.h <<EOF
959 #define EMACS_PATCH_LEVEL $emacs_beta_version
960 EOF
961 }
962
963   fi
964 fi
965 { test "$extra_verbose" = "yes" && cat << EOF
966     Defining XEMACS_CODENAME = "$xemacs_codename"
967 EOF
968 cat >> confdefs.h <<EOF
969 #define XEMACS_CODENAME "$xemacs_codename"
970 EOF
971 }
972
973 { test "$extra_verbose" = "yes" && cat << EOF
974     Defining EMACS_VERSION = "$version"
975 EOF
976 cat >> confdefs.h <<EOF
977 #define EMACS_VERSION "$version"
978 EOF
979 }
980
981
982 if test "$with_infodock" = "yes"; then
983   if test ! -f ../../ID-INSTALL; then
984     echo "Cannot build InfoDock without InfoDock sources"
985     with_infodock=no
986   fi
987 fi
988
989 if test "$with_infodock" = "yes"; then
990       { test "$extra_verbose" = "yes" && cat << EOF
991     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
992 EOF
993 cat >> confdefs.h <<EOF
994 #define INFODOCK_MAJOR_VERSION $infodock_major_version
995 EOF
996 }
997
998   { test "$extra_verbose" = "yes" && cat << EOF
999     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
1000 EOF
1001 cat >> confdefs.h <<EOF
1002 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1003 EOF
1004 }
1005
1006   { test "$extra_verbose" = "yes" && cat << EOF
1007     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1008 EOF
1009 cat >> confdefs.h <<EOF
1010 #define INFODOCK_BUILD_VERSION $infodock_build_version
1011 EOF
1012 }
1013
1014   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1015   PROGNAME=infodock
1016   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1017 else
1018   PROGNAME=xemacs
1019 fi
1020
1021 { test "$extra_verbose" = "yes" && cat << EOF
1022     Defining EMACS_PROGNAME = "$PROGNAME"
1023 EOF
1024 cat >> confdefs.h <<EOF
1025 #define EMACS_PROGNAME "$PROGNAME"
1026 EOF
1027 }
1028
1029
1030 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1031 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_EXTENTS
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_EXTENTS 1
1036 EOF
1037 }
1038
1039 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_TYPECHECK
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_TYPECHECK 1
1044 EOF
1045 }
1046
1047 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1048     Defining ERROR_CHECK_BUFPOS
1049 EOF
1050 cat >> confdefs.h <<\EOF
1051 #define ERROR_CHECK_BUFPOS 1
1052 EOF
1053 }
1054
1055 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining ERROR_CHECK_GC
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define ERROR_CHECK_GC 1
1060 EOF
1061 }
1062
1063 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1064     Defining ERROR_CHECK_MALLOC
1065 EOF
1066 cat >> confdefs.h <<\EOF
1067 #define ERROR_CHECK_MALLOC 1
1068 EOF
1069 }
1070
1071 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1072     Defining ERROR_CHECK_BYTE_CODE
1073 EOF
1074 cat >> confdefs.h <<\EOF
1075 #define ERROR_CHECK_BYTE_CODE 1
1076 EOF
1077 }
1078
1079 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1080     Defining ERROR_CHECK_GLYPHS
1081 EOF
1082 cat >> confdefs.h <<\EOF
1083 #define ERROR_CHECK_GLYPHS 1
1084 EOF
1085 }
1086
1087 if test "${debug:=$beta}" = "yes"; then
1088   use_assertions=yes memory_usage_stats=yes
1089   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1090    echo "    xemacs will be linked with \"debug.o\""
1091  fi
1092   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1093    echo "    xemacs will be linked with \"tests.o\""
1094  fi
1095   { test "$extra_verbose" = "yes" && cat << \EOF
1096     Defining DEBUG_XEMACS
1097 EOF
1098 cat >> confdefs.h <<\EOF
1099 #define DEBUG_XEMACS 1
1100 EOF
1101 }
1102
1103 fi
1104 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1105     Defining USE_ASSERTIONS
1106 EOF
1107 cat >> confdefs.h <<\EOF
1108 #define USE_ASSERTIONS 1
1109 EOF
1110 }
1111
1112 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1113     Defining MEMORY_USAGE_STATS
1114 EOF
1115 cat >> confdefs.h <<\EOF
1116 #define MEMORY_USAGE_STATS 1
1117 EOF
1118 }
1119
1120
1121
1122 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1123 echo "configure:1124: checking "host system type"" >&5
1124 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1125 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1126 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1127 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1128 echo "$ac_t""$configuration" 1>&6
1129
1130
1131
1132
1133
1134 machine='' opsys=''
1135
1136 case "$canonical" in
1137   sparc-*-*        ) machine=sparc ;;
1138   alpha*-*-*       ) machine=alpha ;;
1139   vax-*-*          ) machine=vax ;;
1140   mips-dec-*       ) machine=pmax ;;
1141   mips-sgi-irix6*  ) machine=iris6d ;;
1142   mips-sgi-*       ) machine=iris4d ;;
1143   mips*-linux      ) machine=mips ;;
1144   romp-ibm-*       ) machine=ibmrt ;;
1145   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1146   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1147   powerpc*-*       ) machine=powerpc ;;
1148   hppa-*-*         ) machine=hp800 ;;
1149   m88k-dg-*        ) machine=aviion ;;
1150   m68*-sony-*      ) machine=news ;;
1151   mips-sony-*      ) machine=news-risc ;;
1152   clipper-*        ) machine=clipper ;;
1153   arm*             ) machine=arm ;;
1154   ns32k-*          ) machine=ns32000 ;;
1155 esac
1156
1157 case "$canonical" in
1158   *-*-linux*    ) opsys=linux ;;
1159   *-*-netbsd*   ) opsys=netbsd ;;
1160   *-*-openbsd*  ) opsys=openbsd ;;
1161   *-*-nextstep* ) opsys=nextstep ;;
1162   *-*-vms       ) opsys=vms ;;
1163
1164     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1165   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1166   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1167   *-dec-osf3*                ) opsys=decosf3-1 ;;
1168   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1169
1170     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1171   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1172   *-*-ultrix* )         opsys=ultrix4-3 ;;
1173
1174     *-*-aix3.1*     ) opsys=aix3-1   ;;
1175   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1176   *-*-aix3*       ) opsys=aix3-2   ;;
1177   *-*-aix4.0*     ) opsys=aix4     ;;
1178   *-*-aix4.1*     ) opsys=aix4-1   ;;
1179   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1180
1181     *-gnu* )                    opsys=gnu    ;;
1182   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1183   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1184   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1185   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1186   *-*-aos*   )                  opsys=bsd4-3 ;;
1187   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1188   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1189   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1190   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1191   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1192   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1193         if test -z "$NON_GNU_CPP" ; then
1194           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1195             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1196           done
1197         fi
1198         opsys=usg5-4-2 ;;
1199     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1200     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1201 esac
1202
1203 case "$canonical" in
1204
1205     *-*-netbsd* )
1206     case "$canonical" in
1207       i[3-9]86-*-netbsd*) machine=intel386 ;;
1208       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1209                                             machine=hp9000s300 ;;
1210       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1211       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1212     esac
1213   ;;
1214
1215     *-*-openbsd* )
1216     case "${canonical}" in
1217       i386-*-openbsd*)          machine=intel386 ;;
1218       m68k-*-openbsd*)          machine=hp9000s300 ;;
1219       mipsel-*-openbsd*)        machine=pmax ;;
1220      esac
1221    ;;
1222
1223     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1224   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1225
1226     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1227   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1228
1229     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1230
1231     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1232
1233     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1234
1235     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1236
1237     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1238
1239     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1240   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1241   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1242
1243   
1244     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1245
1246     *-convex-bsd* | *-convex-convexos* )
1247     machine=convex opsys=bsd4-3
1248     NON_GNU_CPP="cc -E -P"
1249   ;;
1250
1251     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1252
1253     *-*-darwin*)
1254     opsys=darwin
1255     RANLIB="ranlib -c"     ;;
1256
1257     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1258   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1259   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1260   m88k-dg-dgux*                           ) opsys=dgux     ;;
1261
1262     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1263   m88k-motorola-sysv4* )
1264                     machine=delta88k opsys=usg5-4-2
1265   ;;
1266   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1267
1268     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1269   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1270
1271     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1272
1273     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1274   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1275   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1276
1277       m88k-harris-cxux* )
1278         case "`uname -r`" in
1279        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1280        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1281     esac
1282     NON_GNU_CPP="/lib/cpp"
1283   ;;
1284     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1285     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1286
1287     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1288
1289     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1290
1291     *-hp-hpux* )
1292         case "$canonical" in
1293       m68*  ) machine=hp9000s300 ;;
1294       hppa* ) machine=hp800      ;;
1295     esac
1296
1297     case "$canonical" in
1298       *-hp-hpux7*  )  opsys=hpux   ;;
1299       *-hp-hpux8*  )  opsys=hpux8  ;;
1300       *-hp-hpux9*  )  opsys=hpux9  ;;
1301       *-hp-hpux10* )  opsys=hpux10 ;;
1302       *-hp-hpux11* )  opsys=hpux11 ;;
1303       *            )  opsys=hpux   ;;
1304     esac
1305
1306         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1307    echo "    xemacs will be linked with \"strcat.o\""
1308  fi ;; esac
1309
1310     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1311         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1312     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1313
1314     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1315   ;;
1316
1317     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1318   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1319
1320     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1321   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1322   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1323   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1324   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1325   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1326
1327     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1328   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1329
1330     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1331
1332     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1333
1334     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1335
1336     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1337
1338       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1339
1340     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1341
1342     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1343
1344     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1345
1346     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1347
1348         mips-mips-usg* ) machine=mips4 ;;
1349   mips-mips-riscos4 )
1350     machine=mips4
1351     NON_GNU_CC="cc -systype bsd43"
1352     NON_GNU_CPP="cc -systype bsd43 -E"
1353     case "$canonical" in
1354       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1355       mips-mips-riscos5* ) opsys=riscos5 ;;
1356     esac
1357   ;;
1358   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1359   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1360
1361     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1362
1363     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1364
1365     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1366   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1367
1368     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1369
1370     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1371
1372     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1373
1374     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1375
1376     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1377   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1378
1379     mips-siemens-sysv* | mips-sni-sysv*)
1380     machine=mips-siemens opsys=usg5-4
1381     NON_GNU_CC=/usr/ccs/bin/cc
1382     NON_GNU_CPP=/usr/ccs/lib/cpp
1383   ;;
1384
1385     mips-nec-sysv*)
1386     machine=mips-nec
1387     NON_GNU_CC=/usr/ccs/bin/cc
1388     NON_GNU_CPP=/usr/ccs/lib/cpp
1389   ;;
1390
1391       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1392   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1393     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1394   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1395   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1396   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1397   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1398   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1399   mips-sgi-irix*      ) opsys=irix5-0 ;;
1400
1401     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1402   *-sony-news* ) opsys=newsos5 ;;
1403
1404     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1405
1406     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1407         case "$canonical" in
1408       m68*-sunos1* )             machine=sun1     ;;
1409       m68*-sunos2* )             machine=sun2     ;;
1410       m68* )                     machine=sun3     ;;
1411       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1412       i*86-*-* )                 machine=intel386 ;;
1413       rs6000* )                  machine=rs6000   ;;
1414     esac
1415
1416         case "$canonical" in *-sunos5*)
1417       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1418     esac
1419
1420                     case "$canonical" in
1421       *-sunos4* )
1422         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1423         : ;;
1424       *-solaris2* )
1425         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1426         RANLIB=':' ;;
1427     esac
1428
1429     case "$canonical" in
1430       *-solaris* )
1431         opsys=sol2
1432         os_release_major=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1/'`
1433         os_release_minor=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/'`
1434         case "$os_release_minor" in [0-9])
1435           os_release_minor="0${os_release_minor}";;
1436         esac
1437         os_release="${os_release_major}${os_release_minor}"
1438         { test "$extra_verbose" = "yes" && cat << EOF
1439     Defining OS_RELEASE = $os_release
1440 EOF
1441 cat >> confdefs.h <<EOF
1442 #define OS_RELEASE $os_release
1443 EOF
1444 }
1445  ;;
1446
1447             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1448       *-sunos4.0*         ) opsys=sunos4-0      ;;
1449       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1450       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1451       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1452       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1453       *-mach*             ) opsys=mach-bsd4-3   ;;
1454       *                   ) opsys=bsd4-2        ;;
1455     esac
1456
1457     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1458
1459         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1460   ;;
1461
1462     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1463
1464     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1465   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1466
1467     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1468
1469     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1470
1471     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1472       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1473
1474     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1475
1476     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1477
1478     vax-dec-* )
1479     case "$canonical" in
1480       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1481       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1482       *-mach* )                         opsys=mach-bsd4-3 ;;
1483     esac
1484   ;;
1485
1486     ns16k-whitechapel-* ) machine=mg1 ;;
1487
1488     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1489
1490     i[3-9]86-*-* )
1491     machine=intel386
1492     case "$canonical" in
1493       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1494       *-isc2.2* )               opsys=isc2-2 ;;
1495       *-isc4.0* )               opsys=isc4-0 ;;
1496       *-isc4.* )                opsys=isc4-1
1497                                 GCC_TEST_OPTIONS=-posix
1498                                 NON_GCC_TEST_OPTIONS=-Xp
1499                                 ;;
1500       *-isc* )                  opsys=isc3-0 ;;
1501       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1502       *-esix* )                 opsys=esix ;;
1503       *-mach* )                 opsys=mach-bsd4-3 ;;
1504       *-xenix* )                opsys=xenix ;;
1505       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1506       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1507       *-bsdi4* )                opsys=bsdos4 ;;
1508       *-bsdi3* )                opsys=bsdos3 ;;
1509       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1510       *-bsdi2* )                opsys=bsdos2 ;;
1511       *-sco3.2v5* )             opsys=sco5 ;;
1512       *-sysv5* )                opsys=sco7 ;;
1513       *-386bsd* )               opsys=386bsd ;;
1514       *-freebsd* )              opsys=freebsd ;;
1515       *-nextstep* )             opsys=nextstep ;;
1516       *-pc-cygwin* )            opsys=cygwin32 ;;
1517       *-pc-mingw* )             opsys=mingw32 ;
1518                                 test -z "$with_tty" && with_tty="no";;
1519           esac
1520   ;;
1521
1522     m68k-*-linux* ) machine=m68k opsys=linux ;;
1523
1524 esac
1525
1526 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1527
1528 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1529
1530 if test -r "${srcdir}/src/m/${machine}.h"; then
1531   machfile="m/${machine}.h"
1532   { test "$extra_verbose" = "yes" && cat << EOF
1533     Defining config_machfile = "$machfile"
1534 EOF
1535 cat >> confdefs.h <<EOF
1536 #define config_machfile "$machfile"
1537 EOF
1538 }
1539
1540 else
1541   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1542   echo "Using configure-time autodetection only."
1543 fi
1544
1545 if test -r "${srcdir}/src/s/${opsys}.h"; then
1546   opsysfile="s/${opsys}.h"
1547   { test "$extra_verbose" = "yes" && cat << EOF
1548     Defining config_opsysfile = "$opsysfile"
1549 EOF
1550 cat >> confdefs.h <<EOF
1551 #define config_opsysfile "$opsysfile"
1552 EOF
1553 }
1554
1555 else
1556   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1557   echo "Using configure-time autodetection only."
1558 fi
1559
1560
1561 if test -z "$pdump"; then
1562   case "$opsys" in
1563     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        cygwin* ) pdump=yes ;;        *)        pdump=no ;;
1564   esac
1565 fi
1566
1567 if test -z "$dynamic"; then
1568   case "$opsys" in
1569     hpux* | sunos4* ) dynamic=no ;;
1570     *) dynamic=yes ;;
1571   esac
1572 fi
1573 if test "$dynamic" = "yes"; then
1574   case "$opsys" in
1575     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1576     decosf* ) ld_call_shared="-call_shared" ;;
1577     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1578     Defining DLSYM_NEEDS_UNDERSCORE
1579 EOF
1580 cat >> confdefs.h <<\EOF
1581 #define DLSYM_NEEDS_UNDERSCORE 1
1582 EOF
1583 }
1584  ;;
1585   esac
1586 else   case "$opsys" in
1587     sol2 )
1588       echo "Static linking is not supported on Solaris 2."
1589       echo "Rerun configure without specifying --dynamic=no."
1590       exit 1 ;;
1591     linux   ) ld_call_shared="-Bstatic" ;;
1592     decosf* ) ld_call_shared="-non_shared" ;;
1593   esac
1594 fi
1595
1596 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1597
1598 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1599 { test "$extra_verbose" = "yes" && cat << EOF
1600     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1601 EOF
1602 cat >> confdefs.h <<EOF
1603 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1604 EOF
1605 }
1606
1607
1608
1609 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1610 if test "$with_workshop $with_tooltalk" = "yes no"; then
1611   (echo "$progname: Usage error:"
1612 echo " " "--with-workshop requires --with-tooltalk"
1613 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1614 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1615 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1616 fi
1617
1618 if test "$with_workshop" = "yes"; then
1619   { test "$extra_verbose" = "yes" && cat << \EOF
1620     Defining SUNPRO
1621 EOF
1622 cat >> confdefs.h <<\EOF
1623 #define SUNPRO 1
1624 EOF
1625 }
1626
1627   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1628    echo "    xemacs will be linked with \"sunpro.o\""
1629  fi
1630 fi
1631
1632 if test "$with_clash_detection" != "no"; then
1633   { test "$extra_verbose" = "yes" && cat << \EOF
1634     Defining CLASH_DETECTION
1635 EOF
1636 cat >> confdefs.h <<\EOF
1637 #define CLASH_DETECTION 1
1638 EOF
1639 }
1640
1641   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1642    echo "    xemacs will be linked with \"filelock.o\""
1643  fi
1644 fi
1645
1646 test -n "$compiler" && CC="$compiler"
1647 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1648 fi
1649
1650 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1651 if test "${CFLAGS-unset}" != unset
1652   then cflags_specified=yes;
1653   else cflags_specified=no;
1654 fi
1655
1656 xe_save_CFLAGS="$CFLAGS"
1657
1658 # Extract the first word of "gcc", so it can be a program name with args.
1659 set dummy gcc; ac_word=$2
1660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1661 echo "configure:1662: checking for $ac_word" >&5
1662
1663 if test -n "$CC"; then
1664   ac_cv_prog_CC="$CC" # Let the user override the test.
1665 else
1666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1667   ac_dummy="$PATH"
1668   for ac_dir in $ac_dummy; do
1669     test -z "$ac_dir" && ac_dir=.
1670     if test -f $ac_dir/$ac_word; then
1671       ac_cv_prog_CC="gcc"
1672       break
1673     fi
1674   done
1675   IFS="$ac_save_ifs"
1676 fi
1677 CC="$ac_cv_prog_CC"
1678 if test -n "$CC"; then
1679   echo "$ac_t""$CC" 1>&6
1680 else
1681   echo "$ac_t""no" 1>&6
1682 fi
1683
1684 if test -z "$CC"; then
1685   # Extract the first word of "cc", so it can be a program name with args.
1686 set dummy cc; ac_word=$2
1687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1688 echo "configure:1689: checking for $ac_word" >&5
1689
1690 if test -n "$CC"; then
1691   ac_cv_prog_CC="$CC" # Let the user override the test.
1692 else
1693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1694   ac_prog_rejected=no
1695   ac_dummy="$PATH"
1696   for ac_dir in $ac_dummy; do
1697     test -z "$ac_dir" && ac_dir=.
1698     if test -f $ac_dir/$ac_word; then
1699       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1700         ac_prog_rejected=yes
1701         continue
1702       fi
1703       ac_cv_prog_CC="cc"
1704       break
1705     fi
1706   done
1707   IFS="$ac_save_ifs"
1708 if test $ac_prog_rejected = yes; then
1709   # We found a bogon in the path, so make sure we never use it.
1710   set dummy $ac_cv_prog_CC
1711   shift
1712   if test $# -gt 0; then
1713     # We chose a different compiler from the bogus one.
1714     # However, it has the same basename, so the bogon will be chosen
1715     # first if we set CC to just the basename; use the full file name.
1716     shift
1717     set dummy "$ac_dir/$ac_word" "$@"
1718     shift
1719     ac_cv_prog_CC="$@"
1720   fi
1721 fi
1722 fi
1723 CC="$ac_cv_prog_CC"
1724 if test -n "$CC"; then
1725   echo "$ac_t""$CC" 1>&6
1726 else
1727   echo "$ac_t""no" 1>&6
1728 fi
1729
1730   if test -z "$CC"; then
1731     case "`uname -s`" in
1732     *win32* | *WIN32*)
1733       # Extract the first word of "cl", so it can be a program name with args.
1734 set dummy cl; ac_word=$2
1735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1736 echo "configure:1737: checking for $ac_word" >&5
1737
1738 if test -n "$CC"; then
1739   ac_cv_prog_CC="$CC" # Let the user override the test.
1740 else
1741   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1742   ac_dummy="$PATH"
1743   for ac_dir in $ac_dummy; do
1744     test -z "$ac_dir" && ac_dir=.
1745     if test -f $ac_dir/$ac_word; then
1746       ac_cv_prog_CC="cl"
1747       break
1748     fi
1749   done
1750   IFS="$ac_save_ifs"
1751 fi
1752 CC="$ac_cv_prog_CC"
1753 if test -n "$CC"; then
1754   echo "$ac_t""$CC" 1>&6
1755 else
1756   echo "$ac_t""no" 1>&6
1757 fi
1758  ;;
1759     esac
1760   fi
1761   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1762 fi
1763
1764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1765 echo "configure:1766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1766
1767 ac_ext=c
1768 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1769 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1770 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1771 ac_cpp='$CPP '"$xe_cppflags"
1772 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1773 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1774 cross_compiling=no
1775
1776 cat > conftest.$ac_ext << EOF
1777
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780
1781 main(){return(0);}
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1784   ac_cv_prog_cc_works=yes
1785   # If we can't run a trivial program, we are probably using a cross compiler.
1786   if (./conftest; exit) 2>/dev/null; then
1787     ac_cv_prog_cc_cross=no
1788   else
1789     ac_cv_prog_cc_cross=yes
1790   fi
1791 else
1792   echo "configure: failed program was:" >&5
1793   cat conftest.$ac_ext >&5
1794   ac_cv_prog_cc_works=no
1795 fi
1796 rm -fr conftest*
1797 ac_ext=c
1798 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1799 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1800 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1801 ac_cpp='$CPP '"$xe_cppflags"
1802 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1803 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1804 cross_compiling=no
1805
1806 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1807 if test $ac_cv_prog_cc_works = no; then
1808   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1809 fi
1810 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1811 echo "configure:1812: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1812 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1813 cross_compiling=$ac_cv_prog_cc_cross
1814
1815 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1816 echo "configure:1817: checking whether we are using GNU C" >&5
1817
1818 cat > conftest.c <<EOF
1819 #ifdef __GNUC__
1820   yes;
1821 #endif
1822 EOF
1823 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1824   ac_cv_prog_gcc=yes
1825 else
1826   ac_cv_prog_gcc=no
1827 fi
1828
1829 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1830
1831 if test $ac_cv_prog_gcc = yes; then
1832   GCC=yes
1833 else
1834   GCC=
1835 fi
1836
1837 ac_test_CFLAGS="${CFLAGS+set}"
1838 ac_save_CFLAGS="$CFLAGS"
1839 CFLAGS=
1840 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1841 echo "configure:1842: checking whether ${CC-cc} accepts -g" >&5
1842
1843 echo 'void f(){}' > conftest.c
1844 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1845   ac_cv_prog_cc_g=yes
1846 else
1847   ac_cv_prog_cc_g=no
1848 fi
1849 rm -f conftest*
1850
1851
1852 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1853 if test "$ac_test_CFLAGS" = set; then
1854   CFLAGS="$ac_save_CFLAGS"
1855 elif test $ac_cv_prog_cc_g = yes; then
1856   if test "$GCC" = yes; then
1857     CFLAGS="-g -O2"
1858   else
1859     CFLAGS="-g"
1860   fi
1861 else
1862   if test "$GCC" = yes; then
1863     CFLAGS="-O2"
1864   else
1865     CFLAGS=
1866   fi
1867 fi
1868  
1869 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1870   CC=${NON_GNU_CC-cc}
1871   # Extract the first word of "gcc", so it can be a program name with args.
1872 set dummy gcc; ac_word=$2
1873 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1874 echo "configure:1875: checking for $ac_word" >&5
1875
1876 if test -n "$CC"; then
1877   ac_cv_prog_CC="$CC" # Let the user override the test.
1878 else
1879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1880   ac_dummy="$PATH"
1881   for ac_dir in $ac_dummy; do
1882     test -z "$ac_dir" && ac_dir=.
1883     if test -f $ac_dir/$ac_word; then
1884       ac_cv_prog_CC="gcc"
1885       break
1886     fi
1887   done
1888   IFS="$ac_save_ifs"
1889 fi
1890 CC="$ac_cv_prog_CC"
1891 if test -n "$CC"; then
1892   echo "$ac_t""$CC" 1>&6
1893 else
1894   echo "$ac_t""no" 1>&6
1895 fi
1896
1897 if test -z "$CC"; then
1898   # Extract the first word of "cc", so it can be a program name with args.
1899 set dummy cc; ac_word=$2
1900 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1901 echo "configure:1902: checking for $ac_word" >&5
1902
1903 if test -n "$CC"; then
1904   ac_cv_prog_CC="$CC" # Let the user override the test.
1905 else
1906   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1907   ac_prog_rejected=no
1908   ac_dummy="$PATH"
1909   for ac_dir in $ac_dummy; do
1910     test -z "$ac_dir" && ac_dir=.
1911     if test -f $ac_dir/$ac_word; then
1912       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1913         ac_prog_rejected=yes
1914         continue
1915       fi
1916       ac_cv_prog_CC="cc"
1917       break
1918     fi
1919   done
1920   IFS="$ac_save_ifs"
1921 if test $ac_prog_rejected = yes; then
1922   # We found a bogon in the path, so make sure we never use it.
1923   set dummy $ac_cv_prog_CC
1924   shift
1925   if test $# -gt 0; then
1926     # We chose a different compiler from the bogus one.
1927     # However, it has the same basename, so the bogon will be chosen
1928     # first if we set CC to just the basename; use the full file name.
1929     shift
1930     set dummy "$ac_dir/$ac_word" "$@"
1931     shift
1932     ac_cv_prog_CC="$@"
1933   fi
1934 fi
1935 fi
1936 CC="$ac_cv_prog_CC"
1937 if test -n "$CC"; then
1938   echo "$ac_t""$CC" 1>&6
1939 else
1940   echo "$ac_t""no" 1>&6
1941 fi
1942
1943   if test -z "$CC"; then
1944     case "`uname -s`" in
1945     *win32* | *WIN32*)
1946       # Extract the first word of "cl", so it can be a program name with args.
1947 set dummy cl; ac_word=$2
1948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1949 echo "configure:1950: checking for $ac_word" >&5
1950
1951 if test -n "$CC"; then
1952   ac_cv_prog_CC="$CC" # Let the user override the test.
1953 else
1954   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1955   ac_dummy="$PATH"
1956   for ac_dir in $ac_dummy; do
1957     test -z "$ac_dir" && ac_dir=.
1958     if test -f $ac_dir/$ac_word; then
1959       ac_cv_prog_CC="cl"
1960       break
1961     fi
1962   done
1963   IFS="$ac_save_ifs"
1964 fi
1965 CC="$ac_cv_prog_CC"
1966 if test -n "$CC"; then
1967   echo "$ac_t""$CC" 1>&6
1968 else
1969   echo "$ac_t""no" 1>&6
1970 fi
1971  ;;
1972     esac
1973   fi
1974   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1975 fi
1976
1977 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1978 echo "configure:1979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1979
1980 ac_ext=c
1981 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1982 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1983 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1984 ac_cpp='$CPP '"$xe_cppflags"
1985 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1986 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1987 cross_compiling=no
1988
1989 cat > conftest.$ac_ext << EOF
1990
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993
1994 main(){return(0);}
1995 EOF
1996 if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1997   ac_cv_prog_cc_works=yes
1998   # If we can't run a trivial program, we are probably using a cross compiler.
1999   if (./conftest; exit) 2>/dev/null; then
2000     ac_cv_prog_cc_cross=no
2001   else
2002     ac_cv_prog_cc_cross=yes
2003   fi
2004 else
2005   echo "configure: failed program was:" >&5
2006   cat conftest.$ac_ext >&5
2007   ac_cv_prog_cc_works=no
2008 fi
2009 rm -fr conftest*
2010 ac_ext=c
2011 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2012 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2013 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2014 ac_cpp='$CPP '"$xe_cppflags"
2015 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2016 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2017 cross_compiling=no
2018
2019 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2020 if test $ac_cv_prog_cc_works = no; then
2021   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2022 fi
2023 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2024 echo "configure:2025: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2025 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2026 cross_compiling=$ac_cv_prog_cc_cross
2027
2028 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2029 echo "configure:2030: checking whether we are using GNU C" >&5
2030
2031 cat > conftest.c <<EOF
2032 #ifdef __GNUC__
2033   yes;
2034 #endif
2035 EOF
2036 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2037   ac_cv_prog_gcc=yes
2038 else
2039   ac_cv_prog_gcc=no
2040 fi
2041
2042 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2043
2044 if test $ac_cv_prog_gcc = yes; then
2045   GCC=yes
2046 else
2047   GCC=
2048 fi
2049
2050 ac_test_CFLAGS="${CFLAGS+set}"
2051 ac_save_CFLAGS="$CFLAGS"
2052 CFLAGS=
2053 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2054 echo "configure:2055: checking whether ${CC-cc} accepts -g" >&5
2055
2056 echo 'void f(){}' > conftest.c
2057 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2058   ac_cv_prog_cc_g=yes
2059 else
2060   ac_cv_prog_cc_g=no
2061 fi
2062 rm -f conftest*
2063
2064
2065 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2066 if test "$ac_test_CFLAGS" = set; then
2067   CFLAGS="$ac_save_CFLAGS"
2068 elif test $ac_cv_prog_cc_g = yes; then
2069   if test "$GCC" = yes; then
2070     CFLAGS="-g -O2"
2071   else
2072     CFLAGS="-g"
2073   fi
2074 else
2075   if test "$GCC" = yes; then
2076     CFLAGS="-O2"
2077   else
2078     CFLAGS=
2079   fi
2080 fi
2081
2082 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2083   CC=gcc
2084   # Extract the first word of "gcc", so it can be a program name with args.
2085 set dummy gcc; ac_word=$2
2086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2087 echo "configure:2088: checking for $ac_word" >&5
2088
2089 if test -n "$CC"; then
2090   ac_cv_prog_CC="$CC" # Let the user override the test.
2091 else
2092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2093   ac_dummy="$PATH"
2094   for ac_dir in $ac_dummy; do
2095     test -z "$ac_dir" && ac_dir=.
2096     if test -f $ac_dir/$ac_word; then
2097       ac_cv_prog_CC="gcc"
2098       break
2099     fi
2100   done
2101   IFS="$ac_save_ifs"
2102 fi
2103 CC="$ac_cv_prog_CC"
2104 if test -n "$CC"; then
2105   echo "$ac_t""$CC" 1>&6
2106 else
2107   echo "$ac_t""no" 1>&6
2108 fi
2109
2110 if test -z "$CC"; then
2111   # Extract the first word of "cc", so it can be a program name with args.
2112 set dummy cc; ac_word=$2
2113 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2114 echo "configure:2115: checking for $ac_word" >&5
2115
2116 if test -n "$CC"; then
2117   ac_cv_prog_CC="$CC" # Let the user override the test.
2118 else
2119   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2120   ac_prog_rejected=no
2121   ac_dummy="$PATH"
2122   for ac_dir in $ac_dummy; do
2123     test -z "$ac_dir" && ac_dir=.
2124     if test -f $ac_dir/$ac_word; then
2125       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2126         ac_prog_rejected=yes
2127         continue
2128       fi
2129       ac_cv_prog_CC="cc"
2130       break
2131     fi
2132   done
2133   IFS="$ac_save_ifs"
2134 if test $ac_prog_rejected = yes; then
2135   # We found a bogon in the path, so make sure we never use it.
2136   set dummy $ac_cv_prog_CC
2137   shift
2138   if test $# -gt 0; then
2139     # We chose a different compiler from the bogus one.
2140     # However, it has the same basename, so the bogon will be chosen
2141     # first if we set CC to just the basename; use the full file name.
2142     shift
2143     set dummy "$ac_dir/$ac_word" "$@"
2144     shift
2145     ac_cv_prog_CC="$@"
2146   fi
2147 fi
2148 fi
2149 CC="$ac_cv_prog_CC"
2150 if test -n "$CC"; then
2151   echo "$ac_t""$CC" 1>&6
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155
2156   if test -z "$CC"; then
2157     case "`uname -s`" in
2158     *win32* | *WIN32*)
2159       # Extract the first word of "cl", so it can be a program name with args.
2160 set dummy cl; ac_word=$2
2161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_word" >&5
2163
2164 if test -n "$CC"; then
2165   ac_cv_prog_CC="$CC" # Let the user override the test.
2166 else
2167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2168   ac_dummy="$PATH"
2169   for ac_dir in $ac_dummy; do
2170     test -z "$ac_dir" && ac_dir=.
2171     if test -f $ac_dir/$ac_word; then
2172       ac_cv_prog_CC="cl"
2173       break
2174     fi
2175   done
2176   IFS="$ac_save_ifs"
2177 fi
2178 CC="$ac_cv_prog_CC"
2179 if test -n "$CC"; then
2180   echo "$ac_t""$CC" 1>&6
2181 else
2182   echo "$ac_t""no" 1>&6
2183 fi
2184  ;;
2185     esac
2186   fi
2187   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2188 fi
2189
2190 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2191 echo "configure:2192: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2192
2193 ac_ext=c
2194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2197 ac_cpp='$CPP '"$xe_cppflags"
2198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2200 cross_compiling=no
2201
2202 cat > conftest.$ac_ext << EOF
2203
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206
2207 main(){return(0);}
2208 EOF
2209 if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2210   ac_cv_prog_cc_works=yes
2211   # If we can't run a trivial program, we are probably using a cross compiler.
2212   if (./conftest; exit) 2>/dev/null; then
2213     ac_cv_prog_cc_cross=no
2214   else
2215     ac_cv_prog_cc_cross=yes
2216   fi
2217 else
2218   echo "configure: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   ac_cv_prog_cc_works=no
2221 fi
2222 rm -fr conftest*
2223 ac_ext=c
2224 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2225 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2226 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2227 ac_cpp='$CPP '"$xe_cppflags"
2228 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2229 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2230 cross_compiling=no
2231
2232 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2233 if test $ac_cv_prog_cc_works = no; then
2234   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2235 fi
2236 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2237 echo "configure:2238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2238 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2239 cross_compiling=$ac_cv_prog_cc_cross
2240
2241 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2242 echo "configure:2243: checking whether we are using GNU C" >&5
2243
2244 cat > conftest.c <<EOF
2245 #ifdef __GNUC__
2246   yes;
2247 #endif
2248 EOF
2249 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2250   ac_cv_prog_gcc=yes
2251 else
2252   ac_cv_prog_gcc=no
2253 fi
2254
2255 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2256
2257 if test $ac_cv_prog_gcc = yes; then
2258   GCC=yes
2259 else
2260   GCC=
2261 fi
2262
2263 ac_test_CFLAGS="${CFLAGS+set}"
2264 ac_save_CFLAGS="$CFLAGS"
2265 CFLAGS=
2266 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2267 echo "configure:2268: checking whether ${CC-cc} accepts -g" >&5
2268
2269 echo 'void f(){}' > conftest.c
2270 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2271   ac_cv_prog_cc_g=yes
2272 else
2273   ac_cv_prog_cc_g=no
2274 fi
2275 rm -f conftest*
2276
2277
2278 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2279 if test "$ac_test_CFLAGS" = set; then
2280   CFLAGS="$ac_save_CFLAGS"
2281 elif test $ac_cv_prog_cc_g = yes; then
2282   if test "$GCC" = yes; then
2283     CFLAGS="-g -O2"
2284   else
2285     CFLAGS="-g"
2286   fi
2287 else
2288   if test "$GCC" = yes; then
2289     CFLAGS="-O2"
2290   else
2291     CFLAGS=
2292   fi
2293 fi
2294
2295 fi
2296 CFLAGS="$xe_save_CFLAGS"
2297
2298
2299 test -n "$CPP" -a -d "$CPP" && CPP=
2300
2301 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2302
2303 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2304 echo "configure:2305: checking how to run the C preprocessor" >&5
2305 # On Suns, sometimes $CPP names a directory.
2306 if test -n "$CPP" && test -d "$CPP"; then
2307   CPP=
2308 fi
2309 if test -z "$CPP"; then
2310
2311   # This must be in double quotes, not single quotes, because CPP may get
2312   # substituted into the Makefile and "${CC-cc}" will confuse make.
2313   CPP="${CC-cc} -E"
2314   # On the NeXT, cc -E runs the code through the compiler's parser,
2315   # not just through cpp.
2316   cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <assert.h>
2320 Syntax Error
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326   :
2327 else
2328   echo "$ac_err" >&5
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   CPP="${CC-cc} -E -traditional-cpp"
2333   cat > conftest.$ac_ext <<EOF
2334 #line 2335 "configure"
2335 #include "confdefs.h"
2336 #include <assert.h>
2337 Syntax Error
2338 EOF
2339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2340 { (eval echo configure:2341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2342 if test -z "$ac_err"; then
2343   :
2344 else
2345   echo "$ac_err" >&5
2346   echo "configure: failed program was:" >&5
2347   cat conftest.$ac_ext >&5
2348   rm -rf conftest*
2349   CPP="${CC-cc} -nologo -E"
2350   cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 #include <assert.h>
2354 Syntax Error
2355 EOF
2356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2357 { (eval echo configure:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2359 if test -z "$ac_err"; then
2360   :
2361 else
2362   echo "$ac_err" >&5
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -rf conftest*
2366   CPP=/lib/cpp
2367 fi
2368 rm -f conftest*
2369 fi
2370 rm -f conftest*
2371 fi
2372 rm -f conftest*
2373   ac_cv_prog_CPP="$CPP"
2374   CPP="$ac_cv_prog_CPP"
2375 else
2376   ac_cv_prog_CPP="$CPP"
2377 fi
2378 echo "$ac_t""$CPP" 1>&6
2379
2380
2381
2382 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2383 echo "configure:2384: checking for AIX" >&5
2384 cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387 #ifdef _AIX
2388   yes
2389 #endif
2390
2391 EOF
2392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2393   egrep "yes" >/dev/null 2>&1; then
2394   rm -rf conftest*
2395   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2396     Defining _ALL_SOURCE
2397 EOF
2398 cat >> confdefs.h <<\EOF
2399 #define _ALL_SOURCE 1
2400 EOF
2401 }
2402
2403 else
2404   rm -rf conftest*
2405   echo "$ac_t""no" 1>&6
2406 fi
2407 rm -f conftest*
2408
2409  
2410
2411 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2412 echo "configure:2413: checking for GNU libc" >&5
2413 cat > conftest.$ac_ext <<EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2416 #include <features.h>
2417 int main() {
2418
2419 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2420 #error Not a GNU libc system :-(
2421 ******* ======= ******** &&&&&&&&
2422 #endif
2423
2424 ; return 0; }
2425 EOF
2426 if { (eval echo configure:2427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2427   rm -rf conftest*
2428   have_glibc=yes
2429 else
2430   echo "configure: failed program was:" >&5
2431   cat conftest.$ac_ext >&5
2432   rm -rf conftest*
2433   have_glibc=no
2434 fi
2435 rm -f conftest*
2436 echo "$ac_t""$have_glibc" 1>&6
2437 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2438     Defining _GNU_SOURCE
2439 EOF
2440 cat >> confdefs.h <<\EOF
2441 #define _GNU_SOURCE 1
2442 EOF
2443 }
2444
2445
2446 case "$opsys" in
2447   sol2)
2448    { test "$extra_verbose" = "yes" && cat << \EOF
2449     Defining __EXTENSIONS__
2450 EOF
2451 cat >> confdefs.h <<\EOF
2452 #define __EXTENSIONS__ 1
2453 EOF
2454 }
2455
2456       if test "$os_release" -ge 505; then
2457      { test "$extra_verbose" = "yes" && cat << \EOF
2458     Defining _XOPEN_SOURCE = 500
2459 EOF
2460 cat >> confdefs.h <<\EOF
2461 #define _XOPEN_SOURCE 500
2462 EOF
2463 }
2464
2465      { test "$extra_verbose" = "yes" && cat << \EOF
2466     Defining _XOPEN_SOURCE_EXTENDED
2467 EOF
2468 cat >> confdefs.h <<\EOF
2469 #define _XOPEN_SOURCE_EXTENDED 1
2470 EOF
2471 }
2472
2473    fi ;;
2474   linux)
2475     { test "$extra_verbose" = "yes" && cat << \EOF
2476     Defining _POSIX_C_SOURCE = 199506L
2477 EOF
2478 cat >> confdefs.h <<\EOF
2479 #define _POSIX_C_SOURCE 199506L
2480 EOF
2481 }
2482
2483     { test "$extra_verbose" = "yes" && cat << \EOF
2484     Defining _XOPEN_SOURCE = 500
2485 EOF
2486 cat >> confdefs.h <<\EOF
2487 #define _XOPEN_SOURCE 500
2488 EOF
2489 }
2490
2491     { test "$extra_verbose" = "yes" && cat << \EOF
2492     Defining _XOPEN_SOURCE_EXTENDED
2493 EOF
2494 cat >> confdefs.h <<\EOF
2495 #define _XOPEN_SOURCE_EXTENDED 1
2496 EOF
2497 }
2498
2499     ;;
2500 esac
2501
2502 cat > conftest.$ac_ext <<EOF
2503 #line 2504 "configure"
2504 #include "confdefs.h"
2505 int main () {
2506 #if defined __SUNPRO_C
2507 return 11;
2508 #elif defined __DECC
2509 return 12;
2510 #elif defined __USLC__ && defined __SCO_VERSION__
2511 return 13;
2512 #elif defined __INTEL_COMPILER
2513 return 14;
2514 #else
2515 return 0;
2516 #endif
2517 }
2518 EOF
2519 if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2520 then
2521   :
2522 else
2523   conftest_rc="$?"
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -fr conftest*
2527   case "$conftest_rc" in
2528   11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
2529   12) echo "You appear to be using the DEC C compiler."    ; __DECC=yes ;;
2530   13) echo "You appear to be using the SCO C compiler."    ; __USLC__=yes ;;
2531   14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
2532             GCC=no ;;
2533 esac
2534 fi
2535 rm -fr conftest*
2536
2537
2538
2539
2540 echo "Extracting information from the machine- and system-dependent headers..."
2541
2542 tempcname="conftest.c"
2543
2544
2545
2546 cat > $tempcname < confdefs.h
2547 cat >> $tempcname <<EOF
2548 #define NOT_C_CODE
2549 #define C_SWITCH_SITE
2550 #define C_SWITCH_X_SITE
2551 #define LD_SWITCH_SITE
2552 #define LD_SWITCH_X_SITE
2553 #define LD_SWITCH_X_SITE_AUX
2554 #define OS_RELEASE $os_release
2555
2556 #ifdef config_opsysfile
2557 #include "$srcdir/src/$opsysfile"
2558 #endif
2559
2560 #ifdef config_machfile
2561 #include "$srcdir/src/$machfile"
2562 #endif
2563
2564 #ifndef LIBS_MACHINE
2565 #define LIBS_MACHINE
2566 #endif
2567 configure___ libs_machine=LIBS_MACHINE
2568
2569 #ifndef LIBS_SYSTEM
2570 #define LIBS_SYSTEM
2571 #endif
2572 configure___ libs_system=LIBS_SYSTEM
2573
2574 #ifndef LIBS_TERMCAP
2575 #define LIBS_TERMCAP
2576 #endif
2577 configure___ libs_termcap=LIBS_TERMCAP
2578
2579 #ifndef LIB_STANDARD
2580 #define LIB_STANDARD
2581 #endif
2582 configure___ libs_standard=LIB_STANDARD
2583
2584
2585 #ifndef OBJECTS_MACHINE
2586 #define OBJECTS_MACHINE
2587 #endif
2588 configure___ objects_machine=OBJECTS_MACHINE
2589
2590 #ifndef OBJECTS_SYSTEM
2591 #define OBJECTS_SYSTEM
2592 #endif
2593 configure___ objects_system=OBJECTS_SYSTEM
2594
2595
2596 #ifndef C_SWITCH_MACHINE
2597 #define C_SWITCH_MACHINE
2598 #endif
2599 configure___ c_switch_machine=C_SWITCH_MACHINE
2600
2601 #ifndef C_SWITCH_SYSTEM
2602 #define C_SWITCH_SYSTEM
2603 #endif
2604 configure___ c_switch_system=C_SWITCH_SYSTEM
2605
2606
2607 #ifndef LD_SWITCH_MACHINE
2608 #define LD_SWITCH_MACHINE
2609 #endif
2610 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2611
2612 #ifndef LD_SWITCH_SYSTEM
2613 #define LD_SWITCH_SYSTEM
2614 #endif
2615 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2616
2617
2618 #ifndef UNEXEC
2619 #define UNEXEC "unexec.o"
2620 #endif
2621 configure___ unexec=UNEXEC
2622
2623
2624 #ifndef LD_SWITCH_SHARED
2625 #define LD_SWITCH_SHARED "-c"
2626 #endif
2627 configure___ ld_switch_shared=LD_SWITCH_SHARED
2628
2629
2630 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2631 configure___ ordinary_ld=ORDINARY_LD
2632
2633 #ifdef ORDINARY_LINK
2634 #define LD ORDINARY_LD
2635 #else /* no ORDINARY LINK */
2636 #ifdef COFF_ENCAPSULATE
2637 #define LD "\$(CC) -nostdlib"
2638 #else /* not COFF_ENCAPSULATE */
2639 #ifdef LINKER
2640 #define LD LINKER
2641 #else /* ! defined (LINKER) */
2642 #define LD "ld"
2643 #endif /* ! defined (LINKER) */
2644 #endif /* ! defined (COFF_ENCAPSULATE) */
2645 #endif /* not ORDINARY_LINK */
2646 configure___ ld=LD
2647
2648 #ifndef LIB_GCC
2649 #define LIB_GCC
2650 #endif
2651 configure___ lib_gcc=LIB_GCC
2652
2653 #ifndef LD_TEXT_START_ADDR
2654 #define LD_TEXT_START_ADDR
2655 #endif
2656 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2657
2658
2659 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2660 #ifdef NO_REMAP
2661 #ifdef COFF_ENCAPSULATE
2662 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2663 #else /* ! defined (COFF_ENCAPSULATE) */
2664 #define START_FILES "pre-crt0.o /lib/crt0.o"
2665 #endif /* ! defined (COFF_ENCAPSULATE) */
2666 #else /* ! defined (NO_REMAP) */
2667 #define START_FILES "ecrt0.o"
2668 #endif /* ! defined (NO_REMAP) */
2669 #endif /* no ORDINARY_LINK */
2670 #ifndef START_FILES
2671 #define START_FILES
2672 #endif
2673 configure___ start_files=START_FILES
2674
2675 #ifdef ORDINARY_LINK
2676 configure___ ordinary_link=yes
2677 #else
2678 configure___ ordinary_link=no
2679 #endif
2680
2681 #ifdef SYSTEM_MALLOC
2682 configure___ system_malloc=yes
2683 #else
2684 configure___ system_malloc=no
2685 #endif
2686
2687 #ifdef TERMINFO
2688 configure___ have_terminfo=yes
2689 #else
2690 configure___ have_terminfo=no
2691 #endif
2692
2693 #ifdef MAIL_USE_FLOCK
2694 configure___ mail_use_flock=yes
2695 #else
2696 configure___ mail_use_flock=no
2697 #endif
2698
2699 #ifdef MAIL_USE_LOCKF
2700 configure___ mail_use_lockf=yes
2701 #else
2702 configure___ mail_use_lockf=no
2703 #endif
2704
2705 #ifdef MAIL_USE_LOCKING
2706 configure___ mail_use_locking=yes
2707 #else
2708 configure___ mail_use_locking=no
2709 #endif
2710
2711 #ifdef HAVE_WIN32_PROCESSES
2712 configure___ win32_processes=yes
2713 #else
2714 configure___ win32_processes=no
2715 #endif
2716
2717 EOF
2718
2719 CPP=`eval "echo $CPP $CPPFLAGS"`
2720 eval `$CPP -Isrc $tempcname \
2721         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2722
2723 rm $tempcname
2724
2725 if test "$pdump" = "yes"; then
2726   ordinary_link="yes"
2727   ld="${ordinary_ld}"
2728   start_files=
2729   libs_standard=
2730   unexec=
2731   lib_gcc=
2732 fi
2733
2734 test "$extra_verbose" = "yes" && \
2735   for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   ld_switch_machine ld_switch_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
2736
2737 case "$opsys" in mingw* | cygwin*)
2738   cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
2739   cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"`
2740   cygwin_include="-I$cygwin_include/include" ;
2741   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2742   case "$opsys" in mingw*)
2743     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2744   esac
2745   ;;
2746 esac
2747
2748 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2749
2750
2751 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2752
2753 if test "$__USLC__" = yes; then
2754   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2755 echo "configure:2756: checking for whether the -Kalloca compiler flag is needed" >&5
2756   need_kalloca=no
2757   cat > conftest.$ac_ext <<EOF
2758 #line 2759 "configure"
2759 #include "confdefs.h"
2760
2761 int main() {
2762 void *x = alloca(4);
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2766   rm -rf conftest*
2767   :
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   
2773     xe_save_c_switch_system="$c_switch_system"
2774     c_switch_system="$c_switch_system -Kalloca"
2775     cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778
2779 int main() {
2780 void *x = alloca(4);
2781 ; return 0; }
2782 EOF
2783 if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2784   rm -rf conftest*
2785    need_kalloca=yes 
2786 else
2787   echo "configure: failed program was:" >&5
2788   cat conftest.$ac_ext >&5
2789 fi
2790 rm -f conftest*
2791     c_switch_system="$xe_save_c_switch_system"
2792 fi
2793 rm -f conftest*
2794   echo "$ac_t""$need_kalloca" 1>&6
2795   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2796 fi
2797
2798 if test "$cflags_specified" = "no"; then
2799       if   test "$GCC" = "yes"; then
2800     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2801         CFLAGS="$CFLAGS -Wsign-compare"
2802         case "`gcc -v --help 2>&1`" in
2803       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2804     esac
2805                 if test "$xemacs_compiler" != "g++"; then
2806       CFLAGS="$CFLAGS -Wshadow"
2807     fi
2808             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2809               elif test "$__SUNPRO_C" = "yes"; then
2810     case "$opsys" in
2811       sol2    ) CFLAGS="-v -xO4" ;;
2812       sunos4* ) CFLAGS="-xO2";;
2813     esac
2814   elif test "$__DECC" = "yes"; then
2815     CFLAGS="-O3"
2816   elif test "$CC" = "xlc"; then
2817     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2818   elif test "$__ICC" = "yes"; then
2819     CFLAGS="-g -O3 -Ob2 -Wall -W1"
2820     else
2821     CFLAGS="-O" ;  fi
2822 fi
2823
2824 if test "$GCC" = "yes"; then
2825 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2826 echo "configure:2827: checking for buggy gcc versions" >&5
2827 GCC_VERSION=`$CC --version`
2828 case `uname -s`:`uname -m`:$GCC_VERSION in
2829                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2830                         case "$CFLAGS" in
2831             *-O2*|*-O3*)
2832                 case "$CFLAGS" in
2833                     *-fno-schedule-insns*) ;;
2834                     *)
2835                         echo "$ac_t""yes" 1>&6
2836                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2837                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2838                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2839                         ;;
2840                 esac
2841                 ;;
2842         esac
2843         ;;
2844                     Linux:alpha:egcs-2.91.*)
2845         echo "$ac_t""yes" 1>&6
2846         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2847         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2848         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2849         ;;
2850     *:i*86*:2.7.2*)
2851         case "$CFLAGS" in
2852             *-O2*|*-O3*)
2853                 case "$GCC_VERSION" in
2854                     2.7.2)
2855                         case "$CFLAGS" in
2856                             *-fno-strength-reduce*) ;;
2857                             *)
2858                                 echo "$ac_t""yes" 1>&6
2859                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2860                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2861                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2862                                 ;;
2863                         esac
2864                         ;;
2865                 esac
2866                 case "$CFLAGS" in
2867                  *-fno-caller-saves*) ;;
2868                  *)
2869                     echo "$ac_t""yes" 1>&6
2870                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2871                     echo "configure: warning: -fno-caller-saves." 1>&2
2872                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2873                     ;;
2874                 esac
2875                 ;;
2876         esac
2877         ;;
2878 esac
2879 echo "$ac_t""no" 1>&6
2880 fi
2881
2882 if test "$pdump" != "yes"; then
2883   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2884 echo "configure:2885: checking for \"-z nocombreloc\" linker flag" >&5
2885   case "`ld --help 2>&1`" in
2886     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2887       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2888     *) echo "$ac_t""no" 1>&6 ;;
2889   esac
2890 fi
2891
2892
2893
2894 if test "$GCC" = "yes"; then
2895   set x $ld_switch_system; shift; ld_switch_system=""
2896   while test -n "$1"; do
2897     case $1 in
2898       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2899       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2900       -Xlinker* ) ;;
2901       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2902     esac
2903     shift
2904   done
2905 fi
2906
2907 if test "$GCC" = "yes"; then
2908   set x $ld_switch_machine; shift; ld_switch_machine=""
2909   while test -n "$1"; do
2910     case $1 in
2911       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2912       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2913       -Xlinker* ) ;;
2914       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2915     esac
2916     shift
2917   done
2918 fi
2919
2920 if test "$GCC" = "yes"; then
2921   set x $ld_switch_site; shift; ld_switch_site=""
2922   while test -n "$1"; do
2923     case $1 in
2924       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2925       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2926       -Xlinker* ) ;;
2927       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2928     esac
2929     shift
2930   done
2931 fi
2932
2933 if test "$GCC" = "yes"; then
2934   set x $LDFLAGS; shift; LDFLAGS=""
2935   while test -n "$1"; do
2936     case $1 in
2937       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2938       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2939       -Xlinker* ) ;;
2940       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2941     esac
2942     shift
2943   done
2944 fi
2945
2946 if test "$GCC" = "yes"; then
2947   set x $ld_call_shared; shift; ld_call_shared=""
2948   while test -n "$1"; do
2949     case $1 in
2950       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2951       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2952       -Xlinker* ) ;;
2953       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2954     esac
2955     shift
2956   done
2957 fi
2958
2959 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2960    echo "    xemacs will be linked with \"$objects_machine\""
2961  fi
2962 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2963    echo "    xemacs will be linked with \"$objects_system\""
2964  fi
2965 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2966    echo "    xemacs will be linked with \"$unexec\""
2967  fi
2968 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2969    echo "    xemacs will be linked with \"dumper.o\""
2970  fi
2971
2972 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2973 echo "configure:2974: checking for dynodump" >&5
2974 if test "$unexec" != "unexsol2.o"; then
2975   echo "$ac_t""no" 1>&6
2976 else
2977   echo "$ac_t""yes" 1>&6
2978   { test "$extra_verbose" = "yes" && cat << \EOF
2979     Defining DYNODUMP
2980 EOF
2981 cat >> confdefs.h <<\EOF
2982 #define DYNODUMP 1
2983 EOF
2984 }
2985
2986   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2987   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2988   case "$machine" in
2989     sparc   ) dynodump_arch=sparc ;;
2990     *86*    ) dynodump_arch=i386  ;;
2991     powerpc ) dynodump_arch=ppc   ;;
2992   esac
2993 fi
2994
2995
2996
2997 if test "$unexec" = "unexaix.o"; then
2998   if   test "$dynamic" = "no"; then
2999   start_flags="-Wl,-bnso,-bnodelcsect"
3000   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
3001   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
3002     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
3003   done
3004   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3005     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3006   done
3007   
3008 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3009 echo "configure:3010: checking for terminateAndUnload in -lC" >&5
3010 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3011
3012 xe_check_libs=" -lC "
3013 cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 /* Override any gcc2 internal prototype to avoid an error.  */
3017 /* We use char because int might match the return type of a gcc2
3018     builtin and then its argument prototype would still apply.  */
3019 char terminateAndUnload();
3020
3021 int main() {
3022 terminateAndUnload()
3023 ; return 0; }
3024 EOF
3025 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3026   rm -rf conftest*
3027   eval "ac_cv_lib_$ac_lib_var=yes"
3028 else
3029   echo "configure: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   rm -rf conftest*
3032   eval "ac_cv_lib_$ac_lib_var=no"
3033 fi
3034 rm -f conftest*
3035 xe_check_libs=""
3036
3037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3038   echo "$ac_t""yes" 1>&6
3039   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3040 else
3041   echo "$ac_t""no" 1>&6
3042 fi
3043
3044
3045   fi
3046 elif test -n "$ld_text_start_addr"; then
3047   start_flags="-T $ld_text_start_addr -e __start"
3048 fi
3049
3050
3051
3052
3053 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3054  test -z "$linker" &&  linker='$(CC) -nostdlib'
3055  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3056 fi
3057 test "$GCC" != "yes" && lib_gcc=
3058
3059
3060
3061
3062
3063 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3064 if test -n "$site_libraries"; then
3065   for arg in $site_libraries; do
3066     case "$arg" in
3067      -* ) ;;
3068      * ) test -d "$arg" || \
3069            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3070        arg="-L${arg}" ;;
3071     esac
3072     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3073   done
3074 fi
3075
3076 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3077 if test -n "$site_includes"; then
3078   for arg in $site_includes; do
3079     case "$arg" in
3080       -* ) ;;
3081       * ) test -d "$arg" || \
3082            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3083       arg="-I${arg}" ;;
3084     esac
3085     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3086   done
3087 fi
3088
3089 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3090 if test -n "$site_prefixes"; then
3091   for dir in $site_prefixes; do
3092     lib_dir="${dir}/lib"
3093     inc_dir="${dir}/include"
3094     if test ! -d "$dir"; then
3095       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3096     elif test ! -d "$lib_dir"; then
3097       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3098     else
3099       if test -d "$inc_dir"; then
3100         c_switch_site="$c_switch_site "-I$inc_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I$inc_dir"\" to \$c_switch_site"; fi
3101       fi
3102       ld_switch_site="$ld_switch_site "-L$lib_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi
3103     fi
3104   done
3105 fi
3106
3107
3108 for dir in "/usr/ccs/lib"; do
3109   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3110 done
3111
3112 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3113 if test -n "$site_runtime_libraries"; then
3114   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3115   export LD_RUN_PATH
3116 fi
3117
3118
3119
3120
3121
3122 if test -n "$add_runtime_path"; then :;
3123 elif test "$dynamic" = "no"; then add_runtime_path=no
3124 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3125 else case "$opsys" in
3126        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3127        * ) add_runtime_path=no ;;
3128      esac
3129 fi
3130
3131 if test "$add_runtime_path" = "yes"; then
3132       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3133 echo "configure:3134: checking "for runtime libraries flag"" >&5
3134   case "$opsys" in
3135     sol2 ) dash_r="-R" ;;
3136     decosf* | linux* | irix*) dash_r="-rpath " ;;
3137     *)
3138       dash_r=""
3139       for try_dash_r in "-R" "-R " "-rpath "; do
3140         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3141         
3142 if test "$GCC" = "yes"; then
3143   set x $xe_check_libs; shift; xe_check_libs=""
3144   while test -n "$1"; do
3145     case $1 in
3146       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3147       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3148       -Xlinker* ) ;;
3149       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3150     esac
3151     shift
3152   done
3153 fi
3154         cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157
3158 int main() {
3159
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3163   rm -rf conftest*
3164   dash_r="$try_dash_r"
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168 fi
3169 rm -f conftest*
3170         xe_check_libs=""
3171         test -n "$dash_r" && break
3172       done ;;
3173   esac
3174   if test -n "$dash_r";
3175     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3176     else echo "$ac_t""NONE" 1>&6
3177   fi
3178 fi
3179
3180 xe_add_unique_runpath_dir='
3181   xe_add_p=yes
3182   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3183   done
3184   if test "$xe_add_p" = "yes"; then
3185     test -n "$runpath" && runpath="${runpath}:"
3186     runpath="${runpath}${xe_runpath_dir}"
3187     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3188   fi'
3189
3190
3191
3192
3193 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3194     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3195   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3196   
3197         runpath="" runpath_dirs=""
3198   if test -n "$LD_RUN_PATH"; then
3199     runpath="$LD_RUN_PATH"
3200   elif test "$GCC" = "yes"; then
3201         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3202     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3203     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3204     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3205       case "$arg" in P,* | -L* | -R* )
3206         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3207           {
3208 xe_runpath_dir="$dir"
3209   test "$xe_runpath_dir" != "/lib"     -a \
3210         "$xe_runpath_dir" != "/usr/lib" -a \
3211         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3212   eval "$xe_add_unique_runpath_dir"
3213 }
3214         done ;;
3215       esac
3216     done
3217     ld_switch_run="$ld_switch_run_save"
3218     rm -f conftest*
3219   else
3220         for arg in $ld_switch_site $ld_switch_x_site; do
3221       case "$arg" in -L*) {
3222 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3223   test "$xe_runpath_dir" != "/lib"     -a \
3224         "$xe_runpath_dir" != "/usr/lib" -a \
3225         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3226   eval "$xe_add_unique_runpath_dir"
3227 };; esac
3228     done
3229             if test "$opsys $need_motif" = "sol2 yes"; then
3230       xe_runpath_dir="/opt/SUNWdt/lib";
3231       eval "$xe_add_unique_runpath_dir";
3232     fi
3233   fi 
3234   if test -n "$runpath"; then
3235     ld_switch_run="${dash_r}${runpath}"
3236     
3237 if test "$GCC" = "yes"; then
3238   set x $ld_switch_run; shift; ld_switch_run=""
3239   while test -n "$1"; do
3240     case $1 in
3241       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3242       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3243       -Xlinker* ) ;;
3244       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3245     esac
3246     shift
3247   done
3248 fi
3249     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3250   fi
3251 fi
3252
3253
3254
3255 GNU_MALLOC=yes
3256 if test "$with_dlmalloc" != "no"; then
3257         doug_lea_malloc=yes
3258 else
3259         doug_lea_malloc=no
3260 fi
3261 after_morecore_hook_exists=yes
3262 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3263 echo "configure:3264: checking for malloc_set_state" >&5
3264
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 /* System header to define __stub macros and hopefully few prototypes,
3269     which can conflict with char malloc_set_state(); below.  */
3270 #include <assert.h>
3271 /* Override any gcc2 internal prototype to avoid an error.  */
3272 /* We use char because int might match the return type of a gcc2
3273     builtin and then its argument prototype would still apply.  */
3274 char malloc_set_state();
3275
3276 int main() {
3277
3278 /* The GNU C library defines this for functions which it implements
3279     to always fail with ENOSYS.  Some functions are actually named
3280     something starting with __ and the normal name is an alias.  */
3281 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3282 choke me
3283 #else
3284 malloc_set_state();
3285 #endif
3286
3287 ; return 0; }
3288 EOF
3289 if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3290   rm -rf conftest*
3291   eval "ac_cv_func_malloc_set_state=yes"
3292 else
3293   echo "configure: failed program was:" >&5
3294   cat conftest.$ac_ext >&5
3295   rm -rf conftest*
3296   eval "ac_cv_func_malloc_set_state=no"
3297 fi
3298 rm -f conftest*
3299
3300 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3301   echo "$ac_t""yes" 1>&6
3302   :
3303 else
3304   echo "$ac_t""no" 1>&6
3305 doug_lea_malloc=no
3306 fi
3307
3308 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3309 echo "configure:3310: checking whether __after_morecore_hook exists" >&5
3310 cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 extern void (* __after_morecore_hook)();
3314 int main() {
3315 __after_morecore_hook = 0
3316 ; return 0; }
3317 EOF
3318 if { (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3319   rm -rf conftest*
3320   echo "$ac_t""yes" 1>&6
3321 else
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   echo "$ac_t""no" 1>&6
3326    after_morecore_hook_exists=no
3327 fi
3328 rm -f conftest*
3329 if test "$system_malloc" = "yes" ; then
3330   GNU_MALLOC=no
3331   GNU_MALLOC_reason="
3332     - The GNU allocators don't work with this system configuration."
3333 elif test "$with_system_malloc" = "yes" ; then
3334   GNU_MALLOC=no
3335   GNU_MALLOC_reason="
3336     - User chose not to use GNU allocators."
3337 elif test "$with_debug_malloc" = "yes" ; then
3338   GNU_MALLOC=no
3339   GNU_MALLOC_reason="
3340     - User chose to use Debugging Malloc."
3341 fi
3342
3343 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3344   GNU_MALLOC_reason="
3345     - Using Doug Lea's new malloc from the GNU C Library."
3346   { test "$extra_verbose" = "yes" && cat << \EOF
3347     Defining DOUG_LEA_MALLOC
3348 EOF
3349 cat >> confdefs.h <<\EOF
3350 #define DOUG_LEA_MALLOC 1
3351 EOF
3352 }
3353
3354   if test "$after_morecore_hook_exists" = "no" ; then
3355     GNU_MALLOC_reason="
3356     - Using Doug Lea's new malloc from the Linux C Library."
3357     { test "$extra_verbose" = "yes" && cat << \EOF
3358     Defining _NO_MALLOC_WARNING_
3359 EOF
3360 cat >> confdefs.h <<\EOF
3361 #define _NO_MALLOC_WARNING_ 1
3362 EOF
3363 }
3364
3365   fi
3366 fi
3367
3368
3369
3370
3371 # Extract the first word of "ranlib", so it can be a program name with args.
3372 set dummy ranlib; ac_word=$2
3373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3374 echo "configure:3375: checking for $ac_word" >&5
3375
3376 if test -n "$RANLIB"; then
3377   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3378 else
3379   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3380   ac_dummy="$PATH"
3381   for ac_dir in $ac_dummy; do
3382     test -z "$ac_dir" && ac_dir=.
3383     if test -f $ac_dir/$ac_word; then
3384       ac_cv_prog_RANLIB="ranlib"
3385       break
3386     fi
3387   done
3388   IFS="$ac_save_ifs"
3389   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3390 fi
3391 RANLIB="$ac_cv_prog_RANLIB"
3392 if test -n "$RANLIB"; then
3393   echo "$ac_t""$RANLIB" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398 ac_aux_dir=
3399 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3400   if test -f $ac_dir/install-sh; then
3401     ac_aux_dir=$ac_dir
3402     ac_install_sh="$ac_aux_dir/install-sh -c"
3403     break
3404   elif test -f $ac_dir/install.sh; then
3405     ac_aux_dir=$ac_dir
3406     ac_install_sh="$ac_aux_dir/install.sh -c"
3407     break
3408   fi
3409 done
3410 if test -z "$ac_aux_dir"; then
3411   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3412 fi
3413 ac_config_guess=$ac_aux_dir/config.guess
3414 ac_config_sub=$ac_aux_dir/config.sub
3415 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3416
3417 # Find a good install program.  We prefer a C program (faster),
3418 # so one script is as good as another.  But avoid the broken or
3419 # incompatible versions:
3420 # SysV /etc/install, /usr/sbin/install
3421 # SunOS /usr/etc/install
3422 # IRIX /sbin/install
3423 # AIX /bin/install
3424 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3425 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3426 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3427 # ./install, which can be erroneously created by make from ./install.sh.
3428 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3429 echo "configure:3430: checking for a BSD compatible install" >&5
3430 if test -z "$INSTALL"; then
3431
3432   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3433   for ac_dir in $PATH; do
3434     # Account for people who put trailing slashes in PATH elements.
3435     case "$ac_dir/" in
3436     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3437     *)
3438       # OSF1 and SCO ODT 3.0 have their own names for install.
3439       # Don't use installbsd from OSF since it installs stuff as root
3440       # by default.
3441       for ac_prog in ginstall scoinst install; do
3442         if test -f $ac_dir/$ac_prog; then
3443           if test $ac_prog = install &&
3444             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3445             # AIX install.  It has an incompatible calling convention.
3446             :
3447           else
3448             ac_cv_path_install="$ac_dir/$ac_prog -c"
3449             break 2
3450           fi
3451         fi
3452       done
3453       ;;
3454     esac
3455   done
3456   IFS="$ac_save_IFS"
3457
3458   if test "${ac_cv_path_install+set}" = set; then
3459     INSTALL="$ac_cv_path_install"
3460   else
3461     # As a last resort, use the slow shell script.  We don't cache a
3462     # path for INSTALL within a source directory, because that will
3463     # break other packages using the cache if that directory is
3464     # removed, or if the path is relative.
3465     INSTALL="$ac_install_sh"
3466   fi
3467 fi
3468 echo "$ac_t""$INSTALL" 1>&6
3469
3470 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3471 # It thinks the first close brace ends the variable substitution.
3472 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3473
3474 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3475
3476 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3477
3478 for ac_prog in 'bison -y' byacc
3479 do
3480 # Extract the first word of "$ac_prog", so it can be a program name with args.
3481 set dummy $ac_prog; ac_word=$2
3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_word" >&5
3484
3485 if test -n "$YACC"; then
3486   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3487 else
3488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3489   ac_dummy="$PATH"
3490   for ac_dir in $ac_dummy; do
3491     test -z "$ac_dir" && ac_dir=.
3492     if test -f $ac_dir/$ac_word; then
3493       ac_cv_prog_YACC="$ac_prog"
3494       break
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498 fi
3499 YACC="$ac_cv_prog_YACC"
3500 if test -n "$YACC"; then
3501   echo "$ac_t""$YACC" 1>&6
3502 else
3503   echo "$ac_t""no" 1>&6
3504 fi
3505
3506 test -n "$YACC" && break
3507 done
3508 test -n "$YACC" || YACC="yacc"
3509
3510
3511 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h 
3512 do
3513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_hdr" >&5
3516
3517 cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <$ac_hdr>
3521 EOF
3522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3523 { (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3525 if test -z "$ac_err"; then
3526   rm -rf conftest*
3527   eval "ac_cv_header_$ac_safe=yes"
3528 else
3529   echo "$ac_err" >&5
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   eval "ac_cv_header_$ac_safe=no"
3534 fi
3535 rm -f conftest*
3536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3537   echo "$ac_t""yes" 1>&6
3538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3539   { test "$extra_verbose" = "yes" && cat << EOF
3540     Defining $ac_tr_hdr
3541 EOF
3542 cat >> confdefs.h <<EOF
3543 #define $ac_tr_hdr 1
3544 EOF
3545 }
3546  
3547 else
3548   echo "$ac_t""no" 1>&6
3549 fi
3550 done
3551
3552 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3553 echo "configure:3554: checking for sys/wait.h that is POSIX.1 compatible" >&5
3554
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <sys/types.h>
3559 #include <sys/wait.h>
3560 #ifndef WEXITSTATUS
3561 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3562 #endif
3563 #ifndef WIFEXITED
3564 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3565 #endif
3566 int main() {
3567 int s;
3568 wait (&s);
3569 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3570 ; return 0; }
3571 EOF
3572 if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3573   rm -rf conftest*
3574   ac_cv_header_sys_wait_h=yes
3575 else
3576   echo "configure: failed program was:" >&5
3577   cat conftest.$ac_ext >&5
3578   rm -rf conftest*
3579   ac_cv_header_sys_wait_h=no
3580 fi
3581 rm -f conftest*
3582
3583 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3584 if test $ac_cv_header_sys_wait_h = yes; then
3585   { test "$extra_verbose" = "yes" && cat << \EOF
3586     Defining HAVE_SYS_WAIT_H
3587 EOF
3588 cat >> confdefs.h <<\EOF
3589 #define HAVE_SYS_WAIT_H 1
3590 EOF
3591 }
3592
3593 fi
3594
3595 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ANSI C header files" >&5
3597
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #include <stdlib.h>
3602 #include <stdarg.h>
3603 #include <string.h>
3604 #include <float.h>
3605 EOF
3606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3607 { (eval echo configure:3608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3609 if test -z "$ac_err"; then
3610   rm -rf conftest*
3611   ac_cv_header_stdc=yes
3612 else
3613   echo "$ac_err" >&5
3614   echo "configure: failed program was:" >&5
3615   cat conftest.$ac_ext >&5
3616   rm -rf conftest*
3617   ac_cv_header_stdc=no
3618 fi
3619 rm -f conftest*
3620
3621 if test $ac_cv_header_stdc = yes; then
3622   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <string.h>
3627 EOF
3628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3629   egrep "memchr" >/dev/null 2>&1; then
3630   :
3631 else
3632   rm -rf conftest*
3633   ac_cv_header_stdc=no
3634 fi
3635 rm -f conftest*
3636
3637 fi
3638
3639 if test $ac_cv_header_stdc = yes; then
3640   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <stdlib.h>
3645 EOF
3646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3647   egrep "free" >/dev/null 2>&1; then
3648   :
3649 else
3650   rm -rf conftest*
3651   ac_cv_header_stdc=no
3652 fi
3653 rm -f conftest*
3654
3655 fi
3656
3657 if test $ac_cv_header_stdc = yes; then
3658   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <ctype.h>
3663 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3664 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3665 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3666 int main () { int i; for (i = 0; i < 256; i++)
3667 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3668 exit (0); }
3669
3670 EOF
3671 if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3672 then
3673   :
3674 else
3675   conftest_rc="$?"
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -fr conftest*
3679   ac_cv_header_stdc=no
3680 fi
3681 rm -fr conftest*
3682 fi
3683
3684 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3685 if test $ac_cv_header_stdc = yes; then
3686   { test "$extra_verbose" = "yes" && cat << \EOF
3687     Defining STDC_HEADERS
3688 EOF
3689 cat >> confdefs.h <<\EOF
3690 #define STDC_HEADERS 1
3691 EOF
3692 }
3693
3694 fi
3695
3696 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3697 echo "configure:3698: checking whether time.h and sys/time.h may both be included" >&5
3698
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 #include <sys/types.h>
3703 #include <sys/time.h>
3704 #include <time.h>
3705 int main() {
3706 struct tm *tp;
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3710   rm -rf conftest*
3711   ac_cv_header_time=yes
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   ac_cv_header_time=no
3717 fi
3718 rm -f conftest*
3719
3720 echo "$ac_t""$ac_cv_header_time" 1>&6
3721 if test $ac_cv_header_time = yes; then
3722   { test "$extra_verbose" = "yes" && cat << \EOF
3723     Defining TIME_WITH_SYS_TIME
3724 EOF
3725 cat >> confdefs.h <<\EOF
3726 #define TIME_WITH_SYS_TIME 1
3727 EOF
3728 }
3729
3730 fi
3731
3732 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3733 echo "configure:3734: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3734
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 #include <sys/types.h>
3739 #include <signal.h>
3740 /* NetBSD declares sys_siglist in unistd.h.  */
3741 #ifdef HAVE_UNISTD_H
3742 #include <unistd.h>
3743 #endif
3744 int main() {
3745 char *msg = *(sys_siglist + 1);
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3749   rm -rf conftest*
3750   ac_cv_decl_sys_siglist=yes
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -rf conftest*
3755   ac_cv_decl_sys_siglist=no
3756 fi
3757 rm -f conftest*
3758
3759 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3760 if test $ac_cv_decl_sys_siglist = yes; then
3761   { test "$extra_verbose" = "yes" && cat << \EOF
3762     Defining SYS_SIGLIST_DECLARED
3763 EOF
3764 cat >> confdefs.h <<\EOF
3765 #define SYS_SIGLIST_DECLARED 1
3766 EOF
3767 }
3768
3769 fi
3770
3771
3772
3773 echo $ac_n "checking for utime""... $ac_c" 1>&6
3774 echo "configure:3775: checking for utime" >&5
3775 cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 #include <sys/types.h>
3779 #include <utime.h>
3780 int main() {
3781 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3782 ; return 0; }
3783 EOF
3784 if { (eval echo configure:3785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3785   rm -rf conftest*
3786   echo "$ac_t""yes" 1>&6
3787    { test "$extra_verbose" = "yes" && cat << \EOF
3788     Defining HAVE_UTIME
3789 EOF
3790 cat >> confdefs.h <<\EOF
3791 #define HAVE_UTIME 1
3792 EOF
3793 }
3794
3795 else
3796   echo "configure: failed program was:" >&5
3797   cat conftest.$ac_ext >&5
3798   rm -rf conftest*
3799   echo "$ac_t""no" 1>&6
3800       for ac_func in utimes
3801 do
3802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_func" >&5
3804
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808 /* System header to define __stub macros and hopefully few prototypes,
3809     which can conflict with char $ac_func(); below.  */
3810 #include <assert.h>
3811 /* Override any gcc2 internal prototype to avoid an error.  */
3812 /* We use char because int might match the return type of a gcc2
3813     builtin and then its argument prototype would still apply.  */
3814 char $ac_func();
3815
3816 int main() {
3817
3818 /* The GNU C library defines this for functions which it implements
3819     to always fail with ENOSYS.  Some functions are actually named
3820     something starting with __ and the normal name is an alias.  */
3821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3822 choke me
3823 #else
3824 $ac_func();
3825 #endif
3826
3827 ; return 0; }
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3830   rm -rf conftest*
3831   eval "ac_cv_func_$ac_func=yes"
3832 else
3833   echo "configure: failed program was:" >&5
3834   cat conftest.$ac_ext >&5
3835   rm -rf conftest*
3836   eval "ac_cv_func_$ac_func=no"
3837 fi
3838 rm -f conftest*
3839
3840 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3841   echo "$ac_t""yes" 1>&6
3842     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3843   { test "$extra_verbose" = "yes" && cat << EOF
3844     Defining $ac_tr_func
3845 EOF
3846 cat >> confdefs.h <<EOF
3847 #define $ac_tr_func 1
3848 EOF
3849 }
3850  
3851 else
3852   echo "$ac_t""no" 1>&6
3853 fi
3854 done
3855
3856 fi
3857 rm -f conftest*
3858
3859
3860 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3861 echo "configure:3862: checking return type of signal handlers" >&5
3862
3863 cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866 #include <sys/types.h>
3867 #include <signal.h>
3868 #ifdef signal
3869 #undef signal
3870 #endif
3871 #ifdef __cplusplus
3872 extern "C" void (*signal (int, void (*)(int)))(int);
3873 #else
3874 void (*signal ()) ();
3875 #endif
3876
3877 int main() {
3878 int i;
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   ac_cv_type_signal=void
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   ac_cv_type_signal=int
3889 fi
3890 rm -f conftest*
3891
3892 echo "$ac_t""$ac_cv_type_signal" 1>&6
3893 { test "$extra_verbose" = "yes" && cat << EOF
3894     Defining RETSIGTYPE = $ac_cv_type_signal
3895 EOF
3896 cat >> confdefs.h <<EOF
3897 #define RETSIGTYPE $ac_cv_type_signal
3898 EOF
3899 }
3900
3901
3902 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3903 echo "configure:3904: checking for size_t" >&5
3904
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 #include <sys/types.h>
3909 #if STDC_HEADERS
3910 #include <stdlib.h>
3911 #include <stddef.h>
3912 #endif
3913 EOF
3914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3915   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3916   rm -rf conftest*
3917   ac_cv_type_size_t=yes
3918 else
3919   rm -rf conftest*
3920   ac_cv_type_size_t=no
3921 fi
3922 rm -f conftest*
3923
3924 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3925 if test $ac_cv_type_size_t = no; then
3926   { test "$extra_verbose" = "yes" && cat << \EOF
3927     Defining size_t = unsigned
3928 EOF
3929 cat >> confdefs.h <<\EOF
3930 #define size_t unsigned
3931 EOF
3932 }
3933
3934 fi
3935
3936 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3937 echo "configure:3938: checking for pid_t" >&5
3938
3939 cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <sys/types.h>
3943 #if STDC_HEADERS
3944 #include <stdlib.h>
3945 #include <stddef.h>
3946 #endif
3947 EOF
3948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3949   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3950   rm -rf conftest*
3951   ac_cv_type_pid_t=yes
3952 else
3953   rm -rf conftest*
3954   ac_cv_type_pid_t=no
3955 fi
3956 rm -f conftest*
3957
3958 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3959 if test $ac_cv_type_pid_t = no; then
3960   { test "$extra_verbose" = "yes" && cat << \EOF
3961     Defining pid_t = int
3962 EOF
3963 cat >> confdefs.h <<\EOF
3964 #define pid_t int
3965 EOF
3966 }
3967
3968 fi
3969
3970 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3971 echo "configure:3972: checking for uid_t in sys/types.h" >&5
3972
3973 cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976 #include <sys/types.h>
3977 EOF
3978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3979   egrep "uid_t" >/dev/null 2>&1; then
3980   rm -rf conftest*
3981   ac_cv_type_uid_t=yes
3982 else
3983   rm -rf conftest*
3984   ac_cv_type_uid_t=no
3985 fi
3986 rm -f conftest*
3987
3988
3989 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3990 if test $ac_cv_type_uid_t = no; then
3991   { test "$extra_verbose" = "yes" && cat << \EOF
3992     Defining uid_t = int
3993 EOF
3994 cat >> confdefs.h <<\EOF
3995 #define uid_t int
3996 EOF
3997 }
3998
3999   { test "$extra_verbose" = "yes" && cat << \EOF
4000     Defining gid_t = int
4001 EOF
4002 cat >> confdefs.h <<\EOF
4003 #define gid_t int
4004 EOF
4005 }
4006
4007 fi
4008
4009 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4010 echo "configure:4011: checking for mode_t" >&5
4011
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <sys/types.h>
4016 #if STDC_HEADERS
4017 #include <stdlib.h>
4018 #include <stddef.h>
4019 #endif
4020 EOF
4021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4022   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4023   rm -rf conftest*
4024   ac_cv_type_mode_t=yes
4025 else
4026   rm -rf conftest*
4027   ac_cv_type_mode_t=no
4028 fi
4029 rm -f conftest*
4030
4031 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4032 if test $ac_cv_type_mode_t = no; then
4033   { test "$extra_verbose" = "yes" && cat << \EOF
4034     Defining mode_t = int
4035 EOF
4036 cat >> confdefs.h <<\EOF
4037 #define mode_t int
4038 EOF
4039 }
4040
4041 fi
4042
4043 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4044 echo "configure:4045: checking for off_t" >&5
4045
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <sys/types.h>
4050 #if STDC_HEADERS
4051 #include <stdlib.h>
4052 #include <stddef.h>
4053 #endif
4054 EOF
4055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4056   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4057   rm -rf conftest*
4058   ac_cv_type_off_t=yes
4059 else
4060   rm -rf conftest*
4061   ac_cv_type_off_t=no
4062 fi
4063 rm -f conftest*
4064
4065 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4066 if test $ac_cv_type_off_t = no; then
4067   { test "$extra_verbose" = "yes" && cat << \EOF
4068     Defining off_t = long
4069 EOF
4070 cat >> confdefs.h <<\EOF
4071 #define off_t long
4072 EOF
4073 }
4074
4075 fi
4076
4077 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4078 echo "configure:4079: checking for ssize_t" >&5
4079
4080 cat > conftest.$ac_ext <<EOF
4081 #line 4082 "configure"
4082 #include "confdefs.h"
4083 #include <sys/types.h>
4084 #if STDC_HEADERS
4085 #include <stdlib.h>
4086 #include <stddef.h>
4087 #endif
4088 EOF
4089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4090   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4091   rm -rf conftest*
4092   ac_cv_type_ssize_t=yes
4093 else
4094   rm -rf conftest*
4095   ac_cv_type_ssize_t=no
4096 fi
4097 rm -f conftest*
4098
4099 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4100 if test $ac_cv_type_ssize_t = no; then
4101   { test "$extra_verbose" = "yes" && cat << \EOF
4102     Defining ssize_t = int
4103 EOF
4104 cat >> confdefs.h <<\EOF
4105 #define ssize_t int
4106 EOF
4107 }
4108
4109 fi
4110
4111
4112 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4113 echo "configure:4114: checking for socklen_t" >&5
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <sys/types.h>
4118 #include <sys/socket.h>
4119 socklen_t x;
4120
4121 int main() {
4122
4123 ; return 0; }
4124 EOF
4125 if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4126   rm -rf conftest*
4127   echo "$ac_t""yes" 1>&6
4128 else
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   
4133 cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 #include <sys/types.h>
4137 #include <sys/socket.h>
4138 int accept (int, struct sockaddr *, size_t *);
4139
4140 int main() {
4141
4142 ; return 0; }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4145   rm -rf conftest*
4146   
4147 echo "$ac_t""size_t" 1>&6
4148 { test "$extra_verbose" = "yes" && cat << \EOF
4149     Defining socklen_t = size_t
4150 EOF
4151 cat >> confdefs.h <<\EOF
4152 #define socklen_t size_t
4153 EOF
4154 }
4155
4156 else
4157   echo "configure: failed program was:" >&5
4158   cat conftest.$ac_ext >&5
4159   rm -rf conftest*
4160   
4161 echo "$ac_t""int" 1>&6
4162 { test "$extra_verbose" = "yes" && cat << \EOF
4163     Defining socklen_t = int
4164 EOF
4165 cat >> confdefs.h <<\EOF
4166 #define socklen_t int
4167 EOF
4168 }
4169
4170 fi
4171 rm -f conftest*
4172 fi
4173 rm -f conftest*
4174
4175 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4176 echo "configure:4177: checking for struct timeval" >&5
4177 cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 #ifdef TIME_WITH_SYS_TIME
4181 #include <sys/time.h>
4182 #include <time.h>
4183 #else
4184 #ifdef HAVE_SYS_TIME_H
4185 #include <sys/time.h>
4186 #else
4187 #include <time.h>
4188 #endif
4189 #endif
4190 int main() {
4191 static struct timeval x; x.tv_sec = x.tv_usec;
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4195   rm -rf conftest*
4196   echo "$ac_t""yes" 1>&6
4197   HAVE_TIMEVAL=yes
4198   { test "$extra_verbose" = "yes" && cat << \EOF
4199     Defining HAVE_TIMEVAL
4200 EOF
4201 cat >> confdefs.h <<\EOF
4202 #define HAVE_TIMEVAL 1
4203 EOF
4204 }
4205
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   echo "$ac_t""no" 1>&6
4211    HAVE_TIMEVAL=no
4212 fi
4213 rm -f conftest*
4214
4215 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4216 echo "configure:4217: checking whether struct tm is in sys/time.h or time.h" >&5
4217
4218 cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <sys/types.h>
4222 #include <time.h>
4223 int main() {
4224 struct tm *tp; tp->tm_sec;
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4228   rm -rf conftest*
4229   ac_cv_struct_tm=time.h
4230 else
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   ac_cv_struct_tm=sys/time.h
4235 fi
4236 rm -f conftest*
4237
4238 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4239 if test $ac_cv_struct_tm = sys/time.h; then
4240   { test "$extra_verbose" = "yes" && cat << \EOF
4241     Defining TM_IN_SYS_TIME
4242 EOF
4243 cat >> confdefs.h <<\EOF
4244 #define TM_IN_SYS_TIME 1
4245 EOF
4246 }
4247
4248 fi
4249
4250 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4251 echo "configure:4252: checking for tm_zone in struct tm" >&5
4252
4253 cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <sys/types.h>
4257 #include <$ac_cv_struct_tm>
4258 int main() {
4259 struct tm tm; tm.tm_zone;
4260 ; return 0; }
4261 EOF
4262 if { (eval echo configure:4263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4263   rm -rf conftest*
4264   ac_cv_struct_tm_zone=yes
4265 else
4266   echo "configure: failed program was:" >&5
4267   cat conftest.$ac_ext >&5
4268   rm -rf conftest*
4269   ac_cv_struct_tm_zone=no
4270 fi
4271 rm -f conftest*
4272
4273 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4274 if test "$ac_cv_struct_tm_zone" = yes; then
4275   { test "$extra_verbose" = "yes" && cat << \EOF
4276     Defining HAVE_TM_ZONE
4277 EOF
4278 cat >> confdefs.h <<\EOF
4279 #define HAVE_TM_ZONE 1
4280 EOF
4281 }
4282
4283 else
4284   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4285 echo "configure:4286: checking for tzname" >&5
4286
4287 cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <time.h>
4291 #ifndef tzname /* For SGI.  */
4292 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4293 #endif
4294 int main() {
4295 atoi(*tzname);
4296 ; return 0; }
4297 EOF
4298 if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4299   rm -rf conftest*
4300   ac_cv_var_tzname=yes
4301 else
4302   echo "configure: failed program was:" >&5
4303   cat conftest.$ac_ext >&5
4304   rm -rf conftest*
4305   ac_cv_var_tzname=no
4306 fi
4307 rm -f conftest*
4308
4309 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4310   if test $ac_cv_var_tzname = yes; then
4311     { test "$extra_verbose" = "yes" && cat << \EOF
4312     Defining HAVE_TZNAME
4313 EOF
4314 cat >> confdefs.h <<\EOF
4315 #define HAVE_TZNAME 1
4316 EOF
4317 }
4318
4319   fi
4320 fi
4321
4322
4323 echo $ac_n "checking for working const""... $ac_c" 1>&6
4324 echo "configure:4325: checking for working const" >&5
4325
4326 cat > conftest.$ac_ext <<EOF
4327 #line 4328 "configure"
4328 #include "confdefs.h"
4329
4330 int main() {
4331
4332 /* Ultrix mips cc rejects this.  */
4333 typedef int charset[2]; const charset x;
4334 /* SunOS 4.1.1 cc rejects this.  */
4335 char const *const *ccp;
4336 char **p;
4337 /* NEC SVR4.0.2 mips cc rejects this.  */
4338 struct point {int x, y;};
4339 static struct point const zero = {0,0};
4340 /* AIX XL C 1.02.0.0 rejects this.
4341    It does not let you subtract one const X* pointer from another in an arm
4342    of an if-expression whose if-part is not a constant expression */
4343 const char *g = "string";
4344 ccp = &g + (g ? g-g : 0);
4345 /* HPUX 7.0 cc rejects these. */
4346 ++ccp;
4347 p = (char**) ccp;
4348 ccp = (char const *const *) p;
4349 { /* SCO 3.2v4 cc rejects this.  */
4350   char *t;
4351   char const *s = 0 ? (char *) 0 : (char const *) 0;
4352
4353   *t++ = 0;
4354 }
4355 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4356   int x[] = {25, 17};
4357   const int *foo = &x[0];
4358   ++foo;
4359 }
4360 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4361   typedef const int *iptr;
4362   iptr p = 0;
4363   ++p;
4364 }
4365 { /* AIX XL C 1.02.0.0 rejects this saying
4366      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4367   struct s { int j; const int *ap[3]; };
4368   struct s *b; b->j = 5;
4369 }
4370 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4371   const int foo = 10;
4372 }
4373
4374 ; return 0; }
4375 EOF
4376 if { (eval echo configure:4377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4377   rm -rf conftest*
4378   ac_cv_c_const=yes
4379 else
4380   echo "configure: failed program was:" >&5
4381   cat conftest.$ac_ext >&5
4382   rm -rf conftest*
4383   ac_cv_c_const=no
4384 fi
4385 rm -f conftest*
4386
4387 echo "$ac_t""$ac_cv_c_const" 1>&6
4388 if test $ac_cv_c_const = no; then
4389   { test "$extra_verbose" = "yes" && cat << \EOF
4390     Defining const = 
4391 EOF
4392 cat >> confdefs.h <<\EOF
4393 #define const 
4394 EOF
4395 }
4396
4397 fi
4398
4399
4400 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4401 echo "configure:4402: checking whether ${MAKE-make} sets \${MAKE}" >&5
4402 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4403
4404 cat > conftestmake <<\EOF
4405 all:
4406         @echo 'ac_maketemp="${MAKE}"'
4407 EOF
4408 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4409 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4410 if test -n "$ac_maketemp"; then
4411   eval ac_cv_prog_make_${ac_make}_set=yes
4412 else
4413   eval ac_cv_prog_make_${ac_make}_set=no
4414 fi
4415 rm -f conftestmake
4416 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4417   echo "$ac_t""yes" 1>&6
4418   SET_MAKE=
4419 else
4420   echo "$ac_t""no" 1>&6
4421   SET_MAKE="MAKE=${MAKE-make}"
4422 fi
4423
4424
4425 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4426 echo "configure:4427: checking whether byte ordering is bigendian" >&5
4427
4428 ac_cv_c_bigendian=unknown
4429 # See if sys/param.h defines the BYTE_ORDER macro.
4430 cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #include <sys/param.h>
4435 int main() {
4436
4437 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4438  bogus endian macros
4439 #endif
4440 ; return 0; }
4441 EOF
4442 if { (eval echo configure:4443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4443   rm -rf conftest*
4444   # It does; now see whether it defined to BIG_ENDIAN or not.
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 #include <sys/types.h>
4449 #include <sys/param.h>
4450 int main() {
4451
4452 #if BYTE_ORDER != BIG_ENDIAN
4453  not big endian
4454 #endif
4455 ; return 0; }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4458   rm -rf conftest*
4459   ac_cv_c_bigendian=yes
4460 else
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   ac_cv_c_bigendian=no
4465 fi
4466 rm -f conftest*
4467 else
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470 fi
4471 rm -f conftest*
4472 if test $ac_cv_c_bigendian = unknown; then
4473 cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 main () {
4477   /* Are we little or big endian?  From Harbison&Steele.  */
4478   union
4479   {
4480     long l;
4481     char c[sizeof (long)];
4482   } u;
4483   u.l = 1;
4484   exit (u.c[sizeof (long) - 1] == 1);
4485 }
4486 EOF
4487 if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4488 then
4489   ac_cv_c_bigendian=no
4490 else
4491   conftest_rc="$?"
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -fr conftest*
4495   ac_cv_c_bigendian=yes
4496 fi
4497 rm -fr conftest*
4498 fi
4499
4500 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4501 if test $ac_cv_c_bigendian = yes; then
4502   { test "$extra_verbose" = "yes" && cat << \EOF
4503     Defining WORDS_BIGENDIAN
4504 EOF
4505 cat >> confdefs.h <<\EOF
4506 #define WORDS_BIGENDIAN 1
4507 EOF
4508 }
4509
4510 fi
4511
4512
4513 echo $ac_n "checking size of short""... $ac_c" 1>&6
4514 echo "configure:4515: checking size of short" >&5
4515
4516 cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <stdio.h>
4520 #include <sys/types.h>
4521 main()
4522 {
4523   FILE *f=fopen("conftestval", "w");
4524   if (!f) exit(1);
4525   fprintf(f, "%d\n", sizeof(short));
4526   exit(0);
4527 }
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4530 then
4531   ac_cv_sizeof_short=`cat conftestval`
4532 else
4533   conftest_rc="$?"
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -fr conftest*
4537   ac_cv_sizeof_short=0
4538 fi
4539 rm -fr conftest*
4540 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4541 { test "$extra_verbose" = "yes" && cat << EOF
4542     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4543 EOF
4544 cat >> confdefs.h <<EOF
4545 #define SIZEOF_SHORT $ac_cv_sizeof_short
4546 EOF
4547 }
4548
4549
4550 if test "$ac_cv_sizeof_short" = 0; then
4551   echo ""
4552   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4553   echo "*** PANIC *** Please examine config.log for compilation errors."
4554   exit 1
4555 fi
4556 echo $ac_n "checking size of int""... $ac_c" 1>&6
4557 echo "configure:4558: checking size of int" >&5
4558
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <stdio.h>
4563 #include <sys/types.h>
4564 main()
4565 {
4566   FILE *f=fopen("conftestval", "w");
4567   if (!f) exit(1);
4568   fprintf(f, "%d\n", sizeof(int));
4569   exit(0);
4570 }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4573 then
4574   ac_cv_sizeof_int=`cat conftestval`
4575 else
4576   conftest_rc="$?"
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -fr conftest*
4580   ac_cv_sizeof_int=0
4581 fi
4582 rm -fr conftest*
4583 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4584 { test "$extra_verbose" = "yes" && cat << EOF
4585     Defining SIZEOF_INT = $ac_cv_sizeof_int
4586 EOF
4587 cat >> confdefs.h <<EOF
4588 #define SIZEOF_INT $ac_cv_sizeof_int
4589 EOF
4590 }
4591
4592
4593 echo $ac_n "checking size of long""... $ac_c" 1>&6
4594 echo "configure:4595: checking size of long" >&5
4595
4596 cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 #include <stdio.h>
4600 #include <sys/types.h>
4601 main()
4602 {
4603   FILE *f=fopen("conftestval", "w");
4604   if (!f) exit(1);
4605   fprintf(f, "%d\n", sizeof(long));
4606   exit(0);
4607 }
4608 EOF
4609 if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4610 then
4611   ac_cv_sizeof_long=`cat conftestval`
4612 else
4613   conftest_rc="$?"
4614   echo "configure: failed program was:" >&5
4615   cat conftest.$ac_ext >&5
4616   rm -fr conftest*
4617   ac_cv_sizeof_long=0
4618 fi
4619 rm -fr conftest*
4620 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4621 { test "$extra_verbose" = "yes" && cat << EOF
4622     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4623 EOF
4624 cat >> confdefs.h <<EOF
4625 #define SIZEOF_LONG $ac_cv_sizeof_long
4626 EOF
4627 }
4628
4629
4630 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4631 echo "configure:4632: checking size of long long" >&5
4632
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 #include <stdio.h>
4637 #include <sys/types.h>
4638 main()
4639 {
4640   FILE *f=fopen("conftestval", "w");
4641   if (!f) exit(1);
4642   fprintf(f, "%d\n", sizeof(long long));
4643   exit(0);
4644 }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4647 then
4648   ac_cv_sizeof_long_long=`cat conftestval`
4649 else
4650   conftest_rc="$?"
4651   echo "configure: failed program was:" >&5
4652   cat conftest.$ac_ext >&5
4653   rm -fr conftest*
4654   ac_cv_sizeof_long_long=0
4655 fi
4656 rm -fr conftest*
4657 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4658 { test "$extra_verbose" = "yes" && cat << EOF
4659     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4660 EOF
4661 cat >> confdefs.h <<EOF
4662 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4663 EOF
4664 }
4665
4666
4667 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4668 echo "configure:4669: checking size of void *" >&5
4669
4670 cat > conftest.$ac_ext <<EOF
4671 #line 4672 "configure"
4672 #include "confdefs.h"
4673 #include <stdio.h>
4674 #include <sys/types.h>
4675 main()
4676 {
4677   FILE *f=fopen("conftestval", "w");
4678   if (!f) exit(1);
4679   fprintf(f, "%d\n", sizeof(void *));
4680   exit(0);
4681 }
4682 EOF
4683 if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4684 then
4685   ac_cv_sizeof_void_p=`cat conftestval`
4686 else
4687   conftest_rc="$?"
4688   echo "configure: failed program was:" >&5
4689   cat conftest.$ac_ext >&5
4690   rm -fr conftest*
4691   ac_cv_sizeof_void_p=0
4692 fi
4693 rm -fr conftest*
4694 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4695 { test "$extra_verbose" = "yes" && cat << EOF
4696     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4697 EOF
4698 cat >> confdefs.h <<EOF
4699 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4700 EOF
4701 }
4702
4703
4704
4705 case $opsys in
4706   cygwin* ) cat > conftest.$ac_ext <<EOF
4707 #line 4708 "configure"
4708 #include "confdefs.h"
4709 #include <cygwin/types.h>
4710 EOF
4711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4712   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4713   rm -rf conftest*
4714   echo "$ac_t""yes" 1>&6
4715                              { test "$extra_verbose" = "yes" && cat << \EOF
4716     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4717 EOF
4718 cat >> confdefs.h <<\EOF
4719 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4720 EOF
4721 }
4722
4723 else
4724   rm -rf conftest*
4725   echo "$ac_t""no" 1>&6
4726 fi
4727 rm -f conftest*
4728  ;;
4729 esac
4730
4731 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4732 echo "configure:4733: checking for long file names" >&5
4733
4734 ac_cv_sys_long_file_names=yes
4735 # Test for long file names in all the places we know might matter:
4736 #      .                the current directory, where building will happen
4737 #      $prefix/lib      where we will be installing things
4738 #      $exec_prefix/lib likewise
4739 # eval it to expand exec_prefix.
4740 #      $TMPDIR          if set, where it might want to write temporary files
4741 # if $TMPDIR is not set:
4742 #      /tmp             where it might want to write temporary files
4743 #      /var/tmp         likewise
4744 #      /usr/tmp         likewise
4745 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4746   ac_tmpdirs="$TMPDIR"
4747 else
4748   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4749 fi
4750 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4751   test -d $ac_dir || continue
4752   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4753   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4754   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4755   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4756   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4757     ac_cv_sys_long_file_names=no
4758     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4759     break
4760   fi
4761   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4762 done
4763
4764 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4765 if test $ac_cv_sys_long_file_names = yes; then
4766   { test "$extra_verbose" = "yes" && cat << \EOF
4767     Defining HAVE_LONG_FILE_NAMES
4768 EOF
4769 cat >> confdefs.h <<\EOF
4770 #define HAVE_LONG_FILE_NAMES 1
4771 EOF
4772 }
4773
4774 fi
4775
4776
4777 echo $ac_n "checking for sin""... $ac_c" 1>&6
4778 echo "configure:4779: checking for sin" >&5
4779
4780 cat > conftest.$ac_ext <<EOF
4781 #line 4782 "configure"
4782 #include "confdefs.h"
4783 /* System header to define __stub macros and hopefully few prototypes,
4784     which can conflict with char sin(); below.  */
4785 #include <assert.h>
4786 /* Override any gcc2 internal prototype to avoid an error.  */
4787 /* We use char because int might match the return type of a gcc2
4788     builtin and then its argument prototype would still apply.  */
4789 char sin();
4790
4791 int main() {
4792
4793 /* The GNU C library defines this for functions which it implements
4794     to always fail with ENOSYS.  Some functions are actually named
4795     something starting with __ and the normal name is an alias.  */
4796 #if defined (__stub_sin) || defined (__stub___sin)
4797 choke me
4798 #else
4799 sin();
4800 #endif
4801
4802 ; return 0; }
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4805   rm -rf conftest*
4806   eval "ac_cv_func_sin=yes"
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -rf conftest*
4811   eval "ac_cv_func_sin=no"
4812 fi
4813 rm -f conftest*
4814
4815 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4816   echo "$ac_t""yes" 1>&6
4817   :
4818 else
4819   echo "$ac_t""no" 1>&6
4820
4821 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4822 echo "configure:4823: checking for sin in -lm" >&5
4823 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4824
4825 xe_check_libs=" -lm "
4826 cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829 /* Override any gcc2 internal prototype to avoid an error.  */
4830 /* We use char because int might match the return type of a gcc2
4831     builtin and then its argument prototype would still apply.  */
4832 char sin();
4833
4834 int main() {
4835 sin()
4836 ; return 0; }
4837 EOF
4838 if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=yes"
4841 else
4842   echo "configure: failed program was:" >&5
4843   cat conftest.$ac_ext >&5
4844   rm -rf conftest*
4845   eval "ac_cv_lib_$ac_lib_var=no"
4846 fi
4847 rm -f conftest*
4848 xe_check_libs=""
4849
4850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4851   echo "$ac_t""yes" 1>&6
4852     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4853     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4854   { test "$extra_verbose" = "yes" && cat << EOF
4855     Defining $ac_tr_lib
4856 EOF
4857 cat >> confdefs.h <<EOF
4858 #define $ac_tr_lib 1
4859 EOF
4860 }
4861
4862   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4863
4864 else
4865   echo "$ac_t""no" 1>&6
4866 fi
4867
4868
4869 fi
4870
4871
4872 { test "$extra_verbose" = "yes" && cat << \EOF
4873     Defining LISP_FLOAT_TYPE
4874 EOF
4875 cat >> confdefs.h <<\EOF
4876 #define LISP_FLOAT_TYPE 1
4877 EOF
4878 }
4879
4880
4881 cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884 #include <math.h>
4885 int main() {
4886 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4887 ; return 0; }
4888 EOF
4889 if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4890   rm -rf conftest*
4891   { test "$extra_verbose" = "yes" && cat << \EOF
4892     Defining HAVE_INVERSE_HYPERBOLIC
4893 EOF
4894 cat >> confdefs.h <<\EOF
4895 #define HAVE_INVERSE_HYPERBOLIC 1
4896 EOF
4897 }
4898
4899 else
4900   echo "configure: failed program was:" >&5
4901   cat conftest.$ac_ext >&5
4902 fi
4903 rm -f conftest*
4904
4905 echo "checking type of mail spool file locking" 1>&6
4906 echo "configure:4907: checking type of mail spool file locking" >&5
4907 for ac_func in lockf flock
4908 do
4909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4910 echo "configure:4911: checking for $ac_func" >&5
4911
4912 cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915 /* System header to define __stub macros and hopefully few prototypes,
4916     which can conflict with char $ac_func(); below.  */
4917 #include <assert.h>
4918 /* Override any gcc2 internal prototype to avoid an error.  */
4919 /* We use char because int might match the return type of a gcc2
4920     builtin and then its argument prototype would still apply.  */
4921 char $ac_func();
4922
4923 int main() {
4924
4925 /* The GNU C library defines this for functions which it implements
4926     to always fail with ENOSYS.  Some functions are actually named
4927     something starting with __ and the normal name is an alias.  */
4928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4929 choke me
4930 #else
4931 $ac_func();
4932 #endif
4933
4934 ; return 0; }
4935 EOF
4936 if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4937   rm -rf conftest*
4938   eval "ac_cv_func_$ac_func=yes"
4939 else
4940   echo "configure: failed program was:" >&5
4941   cat conftest.$ac_ext >&5
4942   rm -rf conftest*
4943   eval "ac_cv_func_$ac_func=no"
4944 fi
4945 rm -f conftest*
4946
4947 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4948   echo "$ac_t""yes" 1>&6
4949     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4950   { test "$extra_verbose" = "yes" && cat << EOF
4951     Defining $ac_tr_func
4952 EOF
4953 cat >> confdefs.h <<EOF
4954 #define $ac_tr_func 1
4955 EOF
4956 }
4957  
4958 else
4959   echo "$ac_t""no" 1>&6
4960 fi
4961 done
4962
4963 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4964 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4965 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4966 if   test -z "$mail_locking"; then
4967   case "$opsys" in cygwin* | mingw*)
4968     mail_locking=pop ;;
4969   esac
4970 fi
4971
4972 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4973     Defining MAIL_LOCK_LOCKF
4974 EOF
4975 cat >> confdefs.h <<\EOF
4976 #define MAIL_LOCK_LOCKF 1
4977 EOF
4978 }
4979
4980 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4981     Defining MAIL_LOCK_FLOCK
4982 EOF
4983 cat >> confdefs.h <<\EOF
4984 #define MAIL_LOCK_FLOCK 1
4985 EOF
4986 }
4987
4988 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4989     Defining MAIL_LOCK_LOCKING
4990 EOF
4991 cat >> confdefs.h <<\EOF
4992 #define MAIL_LOCK_LOCKING 1
4993 EOF
4994 }
4995
4996 elif test "$mail_locking" = "pop"; then
4997   with_pop=yes
4998   mail_locking=
4999 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
5000     Defining MAIL_LOCK_DOT
5001 EOF
5002 cat >> confdefs.h <<\EOF
5003 #define MAIL_LOCK_DOT 1
5004 EOF
5005 }
5006
5007 fi
5008 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5009   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5010 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5011   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5012 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5013   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5014
5015 case "$opsys" in decosf*)
5016   
5017 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5018 echo "configure:5019: checking for cma_open in -lpthreads" >&5
5019 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5020
5021 xe_check_libs=" -lpthreads "
5022 cat > conftest.$ac_ext <<EOF
5023 #line 5024 "configure"
5024 #include "confdefs.h"
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 /* We use char because int might match the return type of a gcc2
5027     builtin and then its argument prototype would still apply.  */
5028 char cma_open();
5029
5030 int main() {
5031 cma_open()
5032 ; return 0; }
5033 EOF
5034 if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=yes"
5037 else
5038   echo "configure: failed program was:" >&5
5039   cat conftest.$ac_ext >&5
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=no"
5042 fi
5043 rm -f conftest*
5044 xe_check_libs=""
5045
5046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5047   echo "$ac_t""yes" 1>&6
5048     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5049     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5050   { test "$extra_verbose" = "yes" && cat << EOF
5051     Defining $ac_tr_lib
5052 EOF
5053 cat >> confdefs.h <<EOF
5054 #define $ac_tr_lib 1
5055 EOF
5056 }
5057
5058   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5059
5060 else
5061   echo "$ac_t""no" 1>&6
5062 fi
5063
5064
5065   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5066     c_switch_site="$c_switch_site -threads" ;;
5067 esac
5068
5069
5070 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5071 echo "configure:5072: checking whether the -xildoff compiler flag is required" >&5
5072 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5073   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5074     then echo "$ac_t""no" 1>&6;
5075     else echo "$ac_t""yes" 1>&6; ld_switch_site="$ld_switch_site -xildoff" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-xildoff\" to \$ld_switch_site"; fi
5076   fi
5077   else echo "$ac_t""no" 1>&6
5078 fi
5079
5080 if test "$opsys" = "sol2"; then
5081   if test "$os_release" -ge 506; then
5082     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5083 echo "configure:5084: checking for \"-z ignore\" linker flag" >&5
5084     case "`ld -h 2>&1`" in
5085       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5086         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5087       *) echo "$ac_t""no" 1>&6 ;;
5088     esac
5089   fi
5090 fi
5091
5092
5093 echo "checking "for specified window system"" 1>&6
5094 echo "configure:5095: checking "for specified window system"" >&5
5095
5096
5097 GNOME_CONFIG=no
5098 GTK_CONFIG=no
5099
5100 if test "$with_gnome" != "no"; then
5101    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5102 echo "configure:5103: checking for GNOME configuration script" >&5
5103    for possible in gnome-config
5104    do
5105       possible_version=`${possible} --version 2> /dev/null`
5106       if test "x${possible_version}" != "x"; then
5107               GNOME_CONFIG="${possible}"
5108               with_gnome=yes
5109               with_gtk=yes
5110               break
5111       fi
5112    done
5113    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5114 fi
5115
5116 if test "${GNOME_CONFIG}" != "no"; then
5117       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5118       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5119       { test "$extra_verbose" = "yes" && cat << \EOF
5120     Defining HAVE_GNOME
5121 EOF
5122 cat >> confdefs.h <<\EOF
5123 #define HAVE_GNOME 1
5124 EOF
5125 }
5126
5127       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5128       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5129 fi
5130
5131 if test "$with_gtk" != "no";then
5132    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5133 echo "configure:5134: checking for GTK configuration script" >&5
5134    for possible in gtk12-config gtk14-config gtk-config
5135    do
5136       possible_version=`${possible} --version 2> /dev/null`
5137       if test "x${possible_version}" != "x"; then
5138               GTK_CONFIG="${possible}"
5139               case "${possible_version}" in
5140                 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5141                 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5142                 1.2.*)
5143                         with_gtk=yes
5144                         break
5145                         ;;
5146                 *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5147               esac
5148       fi
5149    done
5150    echo "$ac_t""${GTK_CONFIG}" 1>&6
5151 fi
5152
5153 if test "${GTK_CONFIG}" != "no"; then
5154       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5155 echo "configure:5156: checking gtk version" >&5
5156       GTK_VERSION=`${GTK_CONFIG} --version`
5157       echo "$ac_t""${GTK_VERSION}" 1>&6
5158
5159       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5160 echo "configure:5161: checking gtk libs" >&5
5161       GTK_LIBS=`${GTK_CONFIG} --libs`
5162       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5163       echo "$ac_t""${GTK_LIBS}" 1>&6
5164
5165       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5166 echo "configure:5167: checking gtk cflags" >&5
5167       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5168       if test "$GCC" = "yes"; then
5169         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5170       fi
5171       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5172       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5173
5174       
5175 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5176 echo "configure:5177: checking for main in -lgdk_imlib" >&5
5177 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5178
5179 xe_check_libs=" -lgdk_imlib "
5180 cat > conftest.$ac_ext <<EOF
5181 #line 5182 "configure"
5182 #include "confdefs.h"
5183
5184 int main() {
5185 main()
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=yes"
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   eval "ac_cv_lib_$ac_lib_var=no"
5196 fi
5197 rm -f conftest*
5198 xe_check_libs=""
5199
5200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5201   echo "$ac_t""yes" 1>&6
5202   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5203 else
5204   echo "$ac_t""no" 1>&6
5205 fi
5206
5207
5208       
5209 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5210 echo "configure:5211: checking for Imlib_init in -lImlib" >&5
5211 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5212
5213 xe_check_libs=" -lImlib "
5214 cat > conftest.$ac_ext <<EOF
5215 #line 5216 "configure"
5216 #include "confdefs.h"
5217 /* Override any gcc2 internal prototype to avoid an error.  */
5218 /* We use char because int might match the return type of a gcc2
5219     builtin and then its argument prototype would still apply.  */
5220 char Imlib_init();
5221
5222 int main() {
5223 Imlib_init()
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5227   rm -rf conftest*
5228   eval "ac_cv_lib_$ac_lib_var=yes"
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   eval "ac_cv_lib_$ac_lib_var=no"
5234 fi
5235 rm -f conftest*
5236 xe_check_libs=""
5237
5238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5239   echo "$ac_t""yes" 1>&6
5240   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5241 else
5242   echo "$ac_t""no" 1>&6
5243 fi
5244
5245
5246       for ac_func in gdk_imlib_init
5247 do
5248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5249 echo "configure:5250: checking for $ac_func" >&5
5250
5251 cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254 /* System header to define __stub macros and hopefully few prototypes,
5255     which can conflict with char $ac_func(); below.  */
5256 #include <assert.h>
5257 /* Override any gcc2 internal prototype to avoid an error.  */
5258 /* We use char because int might match the return type of a gcc2
5259     builtin and then its argument prototype would still apply.  */
5260 char $ac_func();
5261
5262 int main() {
5263
5264 /* The GNU C library defines this for functions which it implements
5265     to always fail with ENOSYS.  Some functions are actually named
5266     something starting with __ and the normal name is an alias.  */
5267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5268 choke me
5269 #else
5270 $ac_func();
5271 #endif
5272
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5276   rm -rf conftest*
5277   eval "ac_cv_func_$ac_func=yes"
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   eval "ac_cv_func_$ac_func=no"
5283 fi
5284 rm -f conftest*
5285
5286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5287   echo "$ac_t""yes" 1>&6
5288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5289   { test "$extra_verbose" = "yes" && cat << EOF
5290     Defining $ac_tr_func
5291 EOF
5292 cat >> confdefs.h <<EOF
5293 #define $ac_tr_func 1
5294 EOF
5295 }
5296  
5297 else
5298   echo "$ac_t""no" 1>&6
5299 fi
5300 done
5301
5302
5303       { test "$extra_verbose" = "yes" && cat << \EOF
5304     Defining HAVE_XPM
5305 EOF
5306 cat >> confdefs.h <<\EOF
5307 #define HAVE_XPM 1
5308 EOF
5309 }
5310
5311       { test "$extra_verbose" = "yes" && cat << \EOF
5312     Defining HAVE_GTK
5313 EOF
5314 cat >> confdefs.h <<\EOF
5315 #define HAVE_GTK 1
5316 EOF
5317 }
5318
5319       
5320
5321       window_system=gtk
5322       with_gtk=yes
5323       with_x11=no
5324
5325       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5326       test "${with_toolbars}" != no && with_toolbars=gtk
5327       test "${with_menubars}" != "no" && with_menubars=gtk
5328       test "${with_dialogs}" != "no" && with_dialogs=gtk
5329       test "${with_widgets}" != "no" && with_widgets=gtk
5330
5331       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5332    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5333  fi
5334       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5335    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5336  fi
5337       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5338    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5339  fi
5340       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5341    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5342  fi
5343
5344             OLD_CFLAGS="${CFLAGS}"
5345       OLD_CPPFLAGS="${CPPFLAGS}"
5346       OLD_LDFLAGS="${LDFLAGS}"
5347       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5348       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5349       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5350       for ac_hdr in glade/glade.h glade.h
5351 do
5352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5354 echo "configure:5355: checking for $ac_hdr" >&5
5355
5356 cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359 #include <$ac_hdr>
5360 EOF
5361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5362 { (eval echo configure:5363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5364 if test -z "$ac_err"; then
5365   rm -rf conftest*
5366   eval "ac_cv_header_$ac_safe=yes"
5367 else
5368   echo "$ac_err" >&5
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371   rm -rf conftest*
5372   eval "ac_cv_header_$ac_safe=no"
5373 fi
5374 rm -f conftest*
5375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5376   echo "$ac_t""yes" 1>&6
5377     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5378   { test "$extra_verbose" = "yes" && cat << EOF
5379     Defining $ac_tr_hdr
5380 EOF
5381 cat >> confdefs.h <<EOF
5382 #define $ac_tr_hdr 1
5383 EOF
5384 }
5385  
5386 else
5387   echo "$ac_t""no" 1>&6
5388 fi
5389 done
5390
5391       
5392 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5393 echo "configure:5394: checking for main in -lxml" >&5
5394 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5395
5396 xe_check_libs=" -lxml "
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400
5401 int main() {
5402 main()
5403 ; return 0; }
5404 EOF
5405 if { (eval echo configure:5406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5406   rm -rf conftest*
5407   eval "ac_cv_lib_$ac_lib_var=yes"
5408 else
5409   echo "configure: failed program was:" >&5
5410   cat conftest.$ac_ext >&5
5411   rm -rf conftest*
5412   eval "ac_cv_lib_$ac_lib_var=no"
5413 fi
5414 rm -f conftest*
5415 xe_check_libs=""
5416
5417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5418   echo "$ac_t""yes" 1>&6
5419   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5420 else
5421   echo "$ac_t""no" 1>&6
5422 fi
5423
5424
5425       
5426 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5427 echo "configure:5428: checking for main in -lglade" >&5
5428 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5429
5430 xe_check_libs=" -lglade "
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434
5435 int main() {
5436 main()
5437 ; return 0; }
5438 EOF
5439 if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5440   rm -rf conftest*
5441   eval "ac_cv_lib_$ac_lib_var=yes"
5442 else
5443   echo "configure: failed program was:" >&5
5444   cat conftest.$ac_ext >&5
5445   rm -rf conftest*
5446   eval "ac_cv_lib_$ac_lib_var=no"
5447 fi
5448 rm -f conftest*
5449 xe_check_libs=""
5450
5451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5452   echo "$ac_t""yes" 1>&6
5453   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5454 else
5455   echo "$ac_t""no" 1>&6
5456 fi
5457
5458
5459       
5460 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5461 echo "configure:5462: checking for main in -lglade-gnome" >&5
5462 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5463
5464 xe_check_libs=" -lglade-gnome "
5465 cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468
5469 int main() {
5470 main()
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5474   rm -rf conftest*
5475   eval "ac_cv_lib_$ac_lib_var=yes"
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -rf conftest*
5480   eval "ac_cv_lib_$ac_lib_var=no"
5481 fi
5482 rm -f conftest*
5483 xe_check_libs=""
5484
5485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5486   echo "$ac_t""yes" 1>&6
5487   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5488 else
5489   echo "$ac_t""no" 1>&6
5490 fi
5491
5492
5493       cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496 #include <glade/glade-xml.h>
5497 EOF
5498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5499   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5500   rm -rf conftest*
5501   echo "$ac_t""yes" 1>&6
5502                        { test "$extra_verbose" = "yes" && cat << \EOF
5503     Defining LIBGLADE_XML_TXTDOMAIN = 1
5504 EOF
5505 cat >> confdefs.h <<\EOF
5506 #define LIBGLADE_XML_TXTDOMAIN 1
5507 EOF
5508 }
5509
5510 else
5511   rm -rf conftest*
5512   echo "$ac_t""no" 1>&6
5513 fi
5514 rm -f conftest*
5515
5516       CFLAGS="${OLD_CFLAGS}"
5517       CPPFLAGS="${OLD_CPPFLAGS}"
5518       LDFLAGS="${OLD_LDFLAGS}"
5519 fi
5520
5521
5522 if test "$with_x11" != "no"; then
5523     test "$x_includes $x_libraries" != "NONE NONE" && \
5524    window_system=x11 with_x11=yes
5525
5526         
5527       if test "$x_includes $x_libraries" = "NONE NONE" \
5528     -a -n "$OPENWINHOME" \
5529     -a "$OPENWINHOME" != "/usr/openwin" \
5530     -a -d "$OPENWINHOME"; then
5531       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5532       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5533       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5534   fi
5535
5536   if test "$x_includes" = "NONE"; then
5537                     for dir in "/usr/X11" "/usr/X11R6"; do
5538       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5539     done
5540   fi
5541
5542   if test "$x_libraries" = "NONE"; then
5543     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5544       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5545     done
5546   fi
5547
5548   # If we find X, set shell vars x_includes and x_libraries to the
5549 # paths, otherwise set no_x=yes.
5550 # Uses ac_ vars as temps to allow command line to override cache and checks.
5551 # --without-x overrides everything else, but does not touch the cache.
5552 echo $ac_n "checking for X""... $ac_c" 1>&6
5553 echo "configure:5554: checking for X" >&5
5554
5555 # Check whether --with-x or --without-x was given.
5556 if test "${with_x+set}" = set; then
5557   withval="$with_x"
5558   :
5559 fi
5560
5561 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5562 if test "x$with_x" = xno; then
5563   # The user explicitly disabled X.
5564   have_x=disabled
5565 else
5566   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5567     # Both variables are already set.
5568     have_x=yes
5569   else
5570
5571 # One or both of the vars are not set, and there is no cached value.
5572 ac_x_includes=NO ac_x_libraries=NO
5573 rm -fr conftestdir
5574 if mkdir conftestdir; then
5575   cd conftestdir
5576   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5577   cat > Imakefile <<'EOF'
5578 acfindx:
5579         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5580 EOF
5581   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5582     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5583     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5584     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5585     for ac_extension in a so sl; do
5586       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5587         test -f $ac_im_libdir/libX11.$ac_extension; then
5588         ac_im_usrlibdir=$ac_im_libdir; break
5589       fi
5590     done
5591     # Screen out bogus values from the imake configuration.  They are
5592     # bogus both because they are the default anyway, and because
5593     # using them would break gcc on systems where it needs fixed includes.
5594     case "$ac_im_incroot" in
5595         /usr/include) ;;
5596         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5597     esac
5598     case "$ac_im_usrlibdir" in
5599         /usr/lib | /lib) ;;
5600         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5601     esac
5602   fi
5603   cd ..
5604   rm -fr conftestdir
5605 fi
5606
5607 if test "$ac_x_includes" = NO; then
5608   # Guess where to find include files, by looking for this one X11 .h file.
5609   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5610
5611   # First, try using that file with no special directory specified.
5612 cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615 #include <$x_direct_test_include>
5616 EOF
5617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5618 { (eval echo configure:5619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5620 if test -z "$ac_err"; then
5621   rm -rf conftest*
5622   # We can compile using X headers with no special include directory.
5623 ac_x_includes=
5624 else
5625   echo "$ac_err" >&5
5626   echo "configure: failed program was:" >&5
5627   cat conftest.$ac_ext >&5
5628   rm -rf conftest*
5629   # Look for the header file in a standard set of common directories.
5630 # Check X11 before X11Rn because it is often a symlink to the current release.
5631   for ac_dir in               \
5632     /usr/X11/include          \
5633     /usr/X11R6/include        \
5634     /usr/X11R5/include        \
5635     /usr/X11R4/include        \
5636                               \
5637     /usr/include/X11          \
5638     /usr/include/X11R6        \
5639     /usr/include/X11R5        \
5640     /usr/include/X11R4        \
5641                               \
5642     /usr/local/X11/include    \
5643     /usr/local/X11R6/include  \
5644     /usr/local/X11R5/include  \
5645     /usr/local/X11R4/include  \
5646                               \
5647     /usr/local/include/X11    \
5648     /usr/local/include/X11R6  \
5649     /usr/local/include/X11R5  \
5650     /usr/local/include/X11R4  \
5651                               \
5652     /usr/X386/include         \
5653     /usr/x386/include         \
5654     /usr/XFree86/include/X11  \
5655                               \
5656     /usr/include              \
5657     /usr/local/include        \
5658     /usr/unsupported/include  \
5659     /usr/athena/include       \
5660     /usr/local/x11r5/include  \
5661     /usr/lpp/Xamples/include  \
5662                               \
5663     /usr/openwin/include      \
5664     /usr/openwin/share/include \
5665     ; \
5666   do
5667     if test -r "$ac_dir/$x_direct_test_include"; then
5668       ac_x_includes=$ac_dir
5669       break
5670     fi
5671   done
5672 fi
5673 rm -f conftest*
5674 fi # $ac_x_includes = NO
5675
5676 if test "$ac_x_libraries" = NO; then
5677   # Check for the libraries.
5678
5679   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5680   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5681
5682   # See if we find them without any special options.
5683   # Don't add to $LIBS permanently.
5684   ac_save_LIBS="$LIBS"
5685   LIBS="-l$x_direct_test_library $LIBS"
5686 cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689
5690 int main() {
5691 ${x_direct_test_function}()
5692 ; return 0; }
5693 EOF
5694 if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5695   rm -rf conftest*
5696   LIBS="$ac_save_LIBS"
5697 # We can link X programs with no special library path.
5698 ac_x_libraries=
5699 else
5700   echo "configure: failed program was:" >&5
5701   cat conftest.$ac_ext >&5
5702   rm -rf conftest*
5703   LIBS="$ac_save_LIBS"
5704 # First see if replacing the include by lib works.
5705 # Check X11 before X11Rn because it is often a symlink to the current release.
5706 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5707     /usr/X11/lib          \
5708     /usr/X11R6/lib        \
5709     /usr/X11R5/lib        \
5710     /usr/X11R4/lib        \
5711                           \
5712     /usr/lib/X11          \
5713     /usr/lib/X11R6        \
5714     /usr/lib/X11R5        \
5715     /usr/lib/X11R4        \
5716                           \
5717     /usr/local/X11/lib    \
5718     /usr/local/X11R6/lib  \
5719     /usr/local/X11R5/lib  \
5720     /usr/local/X11R4/lib  \
5721                           \
5722     /usr/local/lib/X11    \
5723     /usr/local/lib/X11R6  \
5724     /usr/local/lib/X11R5  \
5725     /usr/local/lib/X11R4  \
5726                           \
5727     /usr/X386/lib         \
5728     /usr/x386/lib         \
5729     /usr/XFree86/lib/X11  \
5730                           \
5731     /usr/lib              \
5732     /usr/local/lib        \
5733     /usr/unsupported/lib  \
5734     /usr/athena/lib       \
5735     /usr/local/x11r5/lib  \
5736     /usr/lpp/Xamples/lib  \
5737     /lib/usr/lib/X11      \
5738                           \
5739     /usr/openwin/lib      \
5740     /usr/openwin/share/lib \
5741     ; \
5742 do
5743   for ac_extension in a so sl; do
5744     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5745       ac_x_libraries=$ac_dir
5746       break 2
5747     fi
5748   done
5749 done
5750 fi
5751 rm -f conftest*
5752 fi # $ac_x_libraries = NO
5753
5754 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5755   # Didn't find X anywhere.  Cache the known absence of X.
5756   ac_cv_have_x="have_x=no"
5757 else
5758   # Record where we found X for the cache.
5759   ac_cv_have_x="have_x=yes \
5760                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5761 fi
5762   fi
5763   eval "$ac_cv_have_x"
5764 fi # $with_x != no
5765
5766 if test "$have_x" != yes; then
5767   echo "$ac_t""$have_x" 1>&6
5768   no_x=yes
5769 else
5770   # If each of the values was on the command line, it overrides each guess.
5771   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5772   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5773   # Update the cache value to reflect the command line values.
5774   ac_cv_have_x="have_x=yes \
5775                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5776   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5777 fi
5778
5779 if test "$no_x" = yes; then
5780   # Not all programs may use this symbol, but it does not hurt to define it.
5781   { test "$extra_verbose" = "yes" && cat << \EOF
5782     Defining X_DISPLAY_MISSING
5783 EOF
5784 cat >> confdefs.h <<\EOF
5785 #define X_DISPLAY_MISSING 1
5786 EOF
5787 }
5788
5789   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5790 else
5791   if test -n "$x_includes"; then
5792     X_CFLAGS="$X_CFLAGS -I$x_includes"
5793   fi
5794
5795   # It would also be nice to do this for all -L options, not just this one.
5796   if test -n "$x_libraries"; then
5797     X_LIBS="$X_LIBS -L$x_libraries"
5798     # For Solaris; some versions of Sun CC require a space after -R and
5799     # others require no space.  Words are not sufficient . . . .
5800     case "`(uname -sr) 2>/dev/null`" in
5801     "SunOS 5"*)
5802       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5803 echo "configure:5804: checking whether -R must be followed by a space" >&5
5804       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5805       cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808
5809 int main() {
5810
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5814   rm -rf conftest*
5815   ac_R_nospace=yes
5816 else
5817   echo "configure: failed program was:" >&5
5818   cat conftest.$ac_ext >&5
5819   rm -rf conftest*
5820   ac_R_nospace=no
5821 fi
5822 rm -f conftest*
5823       if test $ac_R_nospace = yes; then
5824         echo "$ac_t""no" 1>&6
5825         X_LIBS="$X_LIBS -R$x_libraries"
5826       else
5827         LIBS="$ac_xsave_LIBS -R $x_libraries"
5828         cat > conftest.$ac_ext <<EOF
5829 #line 5830 "configure"
5830 #include "confdefs.h"
5831
5832 int main() {
5833
5834 ; return 0; }
5835 EOF
5836 if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5837   rm -rf conftest*
5838   ac_R_space=yes
5839 else
5840   echo "configure: failed program was:" >&5
5841   cat conftest.$ac_ext >&5
5842   rm -rf conftest*
5843   ac_R_space=no
5844 fi
5845 rm -f conftest*
5846         if test $ac_R_space = yes; then
5847           echo "$ac_t""yes" 1>&6
5848           X_LIBS="$X_LIBS -R $x_libraries"
5849         else
5850           echo "$ac_t""neither works" 1>&6
5851         fi
5852       fi
5853       LIBS="$ac_xsave_LIBS"
5854     esac
5855   fi
5856
5857   # Check for system-dependent libraries X programs must link with.
5858   # Do this before checking for the system-independent R6 libraries
5859   # (-lICE), since we may need -lsocket or whatever for X linking.
5860
5861   if test "$ISC" = yes; then
5862     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5863   else
5864     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5865     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5866     # the Alpha needs dnet_stub (dnet does not exist).
5867     if test "$with_dnet" = "no" ; then
5868 ac_cv_lib_dnet_dnet_ntoa=no
5869 else
5870
5871 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5872 echo "configure:5873: checking for dnet_ntoa in -ldnet" >&5
5873 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5874
5875 xe_check_libs=" -ldnet "
5876 cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 /* Override any gcc2 internal prototype to avoid an error.  */
5880 /* We use char because int might match the return type of a gcc2
5881     builtin and then its argument prototype would still apply.  */
5882 char dnet_ntoa();
5883
5884 int main() {
5885 dnet_ntoa()
5886 ; return 0; }
5887 EOF
5888 if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5889   rm -rf conftest*
5890   eval "ac_cv_lib_$ac_lib_var=yes"
5891 else
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -rf conftest*
5895   eval "ac_cv_lib_$ac_lib_var=no"
5896 fi
5897 rm -f conftest*
5898 xe_check_libs=""
5899
5900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5901   echo "$ac_t""yes" 1>&6
5902   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5903 else
5904   echo "$ac_t""no" 1>&6
5905 fi
5906
5907 fi
5908
5909     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5910       
5911 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5912 echo "configure:5913: checking for dnet_ntoa in -ldnet_stub" >&5
5913 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5914
5915 xe_check_libs=" -ldnet_stub "
5916 cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 /* Override any gcc2 internal prototype to avoid an error.  */
5920 /* We use char because int might match the return type of a gcc2
5921     builtin and then its argument prototype would still apply.  */
5922 char dnet_ntoa();
5923
5924 int main() {
5925 dnet_ntoa()
5926 ; return 0; }
5927 EOF
5928 if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=yes"
5931 else
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934   rm -rf conftest*
5935   eval "ac_cv_lib_$ac_lib_var=no"
5936 fi
5937 rm -f conftest*
5938 xe_check_libs=""
5939
5940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5941   echo "$ac_t""yes" 1>&6
5942   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5943 else
5944   echo "$ac_t""no" 1>&6
5945 fi
5946
5947
5948     fi
5949
5950     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5951     # to get the SysV transport functions.
5952     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5953     # needs -lnsl.
5954     # The nsl library prevents programs from opening the X display
5955     # on Irix 5.2, according to dickey@clark.net.
5956     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5957 echo "configure:5958: checking for gethostbyname" >&5
5958
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 /* System header to define __stub macros and hopefully few prototypes,
5963     which can conflict with char gethostbyname(); below.  */
5964 #include <assert.h>
5965 /* Override any gcc2 internal prototype to avoid an error.  */
5966 /* We use char because int might match the return type of a gcc2
5967     builtin and then its argument prototype would still apply.  */
5968 char gethostbyname();
5969
5970 int main() {
5971
5972 /* The GNU C library defines this for functions which it implements
5973     to always fail with ENOSYS.  Some functions are actually named
5974     something starting with __ and the normal name is an alias.  */
5975 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5976 choke me
5977 #else
5978 gethostbyname();
5979 #endif
5980
5981 ; return 0; }
5982 EOF
5983 if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5984   rm -rf conftest*
5985   eval "ac_cv_func_gethostbyname=yes"
5986 else
5987   echo "configure: failed program was:" >&5
5988   cat conftest.$ac_ext >&5
5989   rm -rf conftest*
5990   eval "ac_cv_func_gethostbyname=no"
5991 fi
5992 rm -f conftest*
5993
5994 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5995   echo "$ac_t""yes" 1>&6
5996   :
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000
6001     if test $ac_cv_func_gethostbyname = no; then
6002       
6003 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6004 echo "configure:6005: checking for gethostbyname in -lnsl" >&5
6005 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6006
6007 xe_check_libs=" -lnsl "
6008 cat > conftest.$ac_ext <<EOF
6009 #line 6010 "configure"
6010 #include "confdefs.h"
6011 /* Override any gcc2 internal prototype to avoid an error.  */
6012 /* We use char because int might match the return type of a gcc2
6013     builtin and then its argument prototype would still apply.  */
6014 char gethostbyname();
6015
6016 int main() {
6017 gethostbyname()
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_lib_$ac_lib_var=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_lib_$ac_lib_var=no"
6028 fi
6029 rm -f conftest*
6030 xe_check_libs=""
6031
6032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6033   echo "$ac_t""yes" 1>&6
6034   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6035 else
6036   echo "$ac_t""no" 1>&6
6037 fi
6038
6039
6040     fi
6041
6042     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6043     # socket/setsockopt and other routines are undefined under SCO ODT
6044     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6045     # on later versions), says simon@lia.di.epfl.ch: it contains
6046     # gethostby* variants that don't use the nameserver (or something).
6047     # -lsocket must be given before -lnsl if both are needed.
6048     # We assume that if connect needs -lnsl, so does gethostbyname.
6049     echo $ac_n "checking for connect""... $ac_c" 1>&6
6050 echo "configure:6051: checking for connect" >&5
6051
6052 cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* System header to define __stub macros and hopefully few prototypes,
6056     which can conflict with char connect(); below.  */
6057 #include <assert.h>
6058 /* Override any gcc2 internal prototype to avoid an error.  */
6059 /* We use char because int might match the return type of a gcc2
6060     builtin and then its argument prototype would still apply.  */
6061 char connect();
6062
6063 int main() {
6064
6065 /* The GNU C library defines this for functions which it implements
6066     to always fail with ENOSYS.  Some functions are actually named
6067     something starting with __ and the normal name is an alias.  */
6068 #if defined (__stub_connect) || defined (__stub___connect)
6069 choke me
6070 #else
6071 connect();
6072 #endif
6073
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_func_connect=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_func_connect=no"
6084 fi
6085 rm -f conftest*
6086
6087 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6088   echo "$ac_t""yes" 1>&6
6089   :
6090 else
6091   echo "$ac_t""no" 1>&6
6092 fi
6093
6094     if test $ac_cv_func_connect = no; then
6095       
6096 xe_msg_checking="for connect in -lsocket"
6097 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6098 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6099 echo "configure:6100: checking "$xe_msg_checking"" >&5
6100 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6101
6102 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6103 cat > conftest.$ac_ext <<EOF
6104 #line 6105 "configure"
6105 #include "confdefs.h"
6106 /* Override any gcc2 internal prototype to avoid an error.  */
6107 /* We use char because int might match the return type of a gcc2
6108     builtin and then its argument prototype would still apply.  */
6109 char connect();
6110
6111 int main() {
6112 connect()
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116   rm -rf conftest*
6117   eval "ac_cv_lib_$ac_lib_var=yes"
6118 else
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   eval "ac_cv_lib_$ac_lib_var=no"
6123 fi
6124 rm -f conftest*
6125 xe_check_libs=""
6126
6127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6128   echo "$ac_t""yes" 1>&6
6129   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6130 else
6131   echo "$ac_t""no" 1>&6
6132 fi
6133
6134
6135     fi
6136
6137     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6138     echo $ac_n "checking for remove""... $ac_c" 1>&6
6139 echo "configure:6140: checking for remove" >&5
6140
6141 cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 /* System header to define __stub macros and hopefully few prototypes,
6145     which can conflict with char remove(); below.  */
6146 #include <assert.h>
6147 /* Override any gcc2 internal prototype to avoid an error.  */
6148 /* We use char because int might match the return type of a gcc2
6149     builtin and then its argument prototype would still apply.  */
6150 char remove();
6151
6152 int main() {
6153
6154 /* The GNU C library defines this for functions which it implements
6155     to always fail with ENOSYS.  Some functions are actually named
6156     something starting with __ and the normal name is an alias.  */
6157 #if defined (__stub_remove) || defined (__stub___remove)
6158 choke me
6159 #else
6160 remove();
6161 #endif
6162
6163 ; return 0; }
6164 EOF
6165 if { (eval echo configure:6166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6166   rm -rf conftest*
6167   eval "ac_cv_func_remove=yes"
6168 else
6169   echo "configure: failed program was:" >&5
6170   cat conftest.$ac_ext >&5
6171   rm -rf conftest*
6172   eval "ac_cv_func_remove=no"
6173 fi
6174 rm -f conftest*
6175
6176 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6177   echo "$ac_t""yes" 1>&6
6178   :
6179 else
6180   echo "$ac_t""no" 1>&6
6181 fi
6182
6183     if test $ac_cv_func_remove = no; then
6184       
6185 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6186 echo "configure:6187: checking for remove in -lposix" >&5
6187 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6188
6189 xe_check_libs=" -lposix "
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193 /* Override any gcc2 internal prototype to avoid an error.  */
6194 /* We use char because int might match the return type of a gcc2
6195     builtin and then its argument prototype would still apply.  */
6196 char remove();
6197
6198 int main() {
6199 remove()
6200 ; return 0; }
6201 EOF
6202 if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6203   rm -rf conftest*
6204   eval "ac_cv_lib_$ac_lib_var=yes"
6205 else
6206   echo "configure: failed program was:" >&5
6207   cat conftest.$ac_ext >&5
6208   rm -rf conftest*
6209   eval "ac_cv_lib_$ac_lib_var=no"
6210 fi
6211 rm -f conftest*
6212 xe_check_libs=""
6213
6214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6215   echo "$ac_t""yes" 1>&6
6216   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6217 else
6218   echo "$ac_t""no" 1>&6
6219 fi
6220
6221
6222     fi
6223
6224     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6225     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6226 echo "configure:6227: checking for shmat" >&5
6227
6228 cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231 /* System header to define __stub macros and hopefully few prototypes,
6232     which can conflict with char shmat(); below.  */
6233 #include <assert.h>
6234 /* Override any gcc2 internal prototype to avoid an error.  */
6235 /* We use char because int might match the return type of a gcc2
6236     builtin and then its argument prototype would still apply.  */
6237 char shmat();
6238
6239 int main() {
6240
6241 /* The GNU C library defines this for functions which it implements
6242     to always fail with ENOSYS.  Some functions are actually named
6243     something starting with __ and the normal name is an alias.  */
6244 #if defined (__stub_shmat) || defined (__stub___shmat)
6245 choke me
6246 #else
6247 shmat();
6248 #endif
6249
6250 ; return 0; }
6251 EOF
6252 if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6253   rm -rf conftest*
6254   eval "ac_cv_func_shmat=yes"
6255 else
6256   echo "configure: failed program was:" >&5
6257   cat conftest.$ac_ext >&5
6258   rm -rf conftest*
6259   eval "ac_cv_func_shmat=no"
6260 fi
6261 rm -f conftest*
6262
6263 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6264   echo "$ac_t""yes" 1>&6
6265   :
6266 else
6267   echo "$ac_t""no" 1>&6
6268 fi
6269
6270     if test $ac_cv_func_shmat = no; then
6271       
6272 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6273 echo "configure:6274: checking for shmat in -lipc" >&5
6274 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6275
6276 xe_check_libs=" -lipc "
6277 cat > conftest.$ac_ext <<EOF
6278 #line 6279 "configure"
6279 #include "confdefs.h"
6280 /* Override any gcc2 internal prototype to avoid an error.  */
6281 /* We use char because int might match the return type of a gcc2
6282     builtin and then its argument prototype would still apply.  */
6283 char shmat();
6284
6285 int main() {
6286 shmat()
6287 ; return 0; }
6288 EOF
6289 if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6290   rm -rf conftest*
6291   eval "ac_cv_lib_$ac_lib_var=yes"
6292 else
6293   echo "configure: failed program was:" >&5
6294   cat conftest.$ac_ext >&5
6295   rm -rf conftest*
6296   eval "ac_cv_lib_$ac_lib_var=no"
6297 fi
6298 rm -f conftest*
6299 xe_check_libs=""
6300
6301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6302   echo "$ac_t""yes" 1>&6
6303   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6304 else
6305   echo "$ac_t""no" 1>&6
6306 fi
6307
6308
6309     fi
6310   fi
6311
6312   # Check for libraries that X11R6 Xt/Xaw programs need.
6313   ac_save_LDFLAGS="$LDFLAGS"
6314   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6315   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6316   # check for ICE first), but we must link in the order -lSM -lICE or
6317   # we get undefined symbols.  So assume we have SM if we have ICE.
6318   # These have to be linked with before -lX11, unlike the other
6319   # libraries we check for below, so use a different variable.
6320   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6321   
6322 xe_msg_checking="for IceConnectionNumber in -lICE"
6323 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6324 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6325 echo "configure:6326: checking "$xe_msg_checking"" >&5
6326 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6327
6328 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6329 cat > conftest.$ac_ext <<EOF
6330 #line 6331 "configure"
6331 #include "confdefs.h"
6332 /* Override any gcc2 internal prototype to avoid an error.  */
6333 /* We use char because int might match the return type of a gcc2
6334     builtin and then its argument prototype would still apply.  */
6335 char IceConnectionNumber();
6336
6337 int main() {
6338 IceConnectionNumber()
6339 ; return 0; }
6340 EOF
6341 if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6342   rm -rf conftest*
6343   eval "ac_cv_lib_$ac_lib_var=yes"
6344 else
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_lib_$ac_lib_var=no"
6349 fi
6350 rm -f conftest*
6351 xe_check_libs=""
6352
6353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6354   echo "$ac_t""yes" 1>&6
6355   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6356 else
6357   echo "$ac_t""no" 1>&6
6358 fi
6359
6360
6361   LDFLAGS="$ac_save_LDFLAGS"
6362
6363 fi
6364  # Autoconf claims to find X library and include dirs for us.
6365   if test "$no_x" = "yes"
6366   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6367   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6368   fi
6369 fi
6370
6371
6372 if test "$with_x11" = "yes"; then
6373   { test "$extra_verbose" = "yes" && cat << \EOF
6374     Defining HAVE_X_WINDOWS
6375 EOF
6376 cat >> confdefs.h <<\EOF
6377 #define HAVE_X_WINDOWS 1
6378 EOF
6379 }
6380
6381   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6382   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6383
6384
6385     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6386 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6387 echo "configure:6388: checking for Xm/Xm.h" >&5
6388
6389 cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 #include <Xm/Xm.h>
6393 EOF
6394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6395 { (eval echo configure:6396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6397 if test -z "$ac_err"; then
6398   rm -rf conftest*
6399   eval "ac_cv_header_$ac_safe=yes"
6400 else
6401   echo "$ac_err" >&5
6402   echo "configure: failed program was:" >&5
6403   cat conftest.$ac_ext >&5
6404   rm -rf conftest*
6405   eval "ac_cv_header_$ac_safe=no"
6406 fi
6407 rm -f conftest*
6408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6409   echo "$ac_t""yes" 1>&6
6410   
6411 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6412 echo "configure:6413: checking for XmStringFree in -lXm" >&5
6413 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6414
6415 xe_check_libs=" -lXm "
6416 cat > conftest.$ac_ext <<EOF
6417 #line 6418 "configure"
6418 #include "confdefs.h"
6419 /* Override any gcc2 internal prototype to avoid an error.  */
6420 /* We use char because int might match the return type of a gcc2
6421     builtin and then its argument prototype would still apply.  */
6422 char XmStringFree();
6423
6424 int main() {
6425 XmStringFree()
6426 ; return 0; }
6427 EOF
6428 if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6429   rm -rf conftest*
6430   eval "ac_cv_lib_$ac_lib_var=yes"
6431 else
6432   echo "configure: failed program was:" >&5
6433   cat conftest.$ac_ext >&5
6434   rm -rf conftest*
6435   eval "ac_cv_lib_$ac_lib_var=no"
6436 fi
6437 rm -f conftest*
6438 xe_check_libs=""
6439
6440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6441   echo "$ac_t""yes" 1>&6
6442   got_motif=yes
6443 else
6444   echo "$ac_t""no" 1>&6
6445 fi
6446
6447
6448 else
6449   echo "$ac_t""no" 1>&6
6450 fi
6451
6452
6453   if test "$got_motif" != "yes"; then
6454             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6455                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6456       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6457       if test -d "$lib_dir" -a -d "$inc_dir"; then
6458         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6459           x_libraries="$lib_dir $x_libraries"
6460           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6461         esac
6462         case "$x_includes" in "$inc_dir"* ) ;; *)
6463           x_includes="$inc_dir $x_includes"
6464           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6465         esac
6466         break;  fi
6467     done
6468   fi
6469
6470     for rel in "X11R6" "X11R5" "X11R4"; do
6471     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6472     if test -d "$lib_dir" -a -d "$inc_dir"; then
6473       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6474         x_libraries="$x_libraries $lib_dir"
6475         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6476       esac
6477       case "$x_includes" in "$inc_dir"* ) ;; *)
6478         x_includes="$x_includes $inc_dir"
6479         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6480       esac
6481       break;     fi
6482   done
6483
6484     case "$opsys" in
6485   decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
6486   esac
6487
6488   ld_switch_x_site="$X_LIBS"
6489
6490   
6491 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6492     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6493   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6494   
6495         runpath="" runpath_dirs=""
6496   if test -n "$LD_RUN_PATH"; then
6497     runpath="$LD_RUN_PATH"
6498   elif test "$GCC" = "yes"; then
6499         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6500     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6501     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6502     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6503       case "$arg" in P,* | -L* | -R* )
6504         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6505           {
6506 xe_runpath_dir="$dir"
6507   test "$xe_runpath_dir" != "/lib"     -a \
6508         "$xe_runpath_dir" != "/usr/lib" -a \
6509         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6510   eval "$xe_add_unique_runpath_dir"
6511 }
6512         done ;;
6513       esac
6514     done
6515     ld_switch_run="$ld_switch_run_save"
6516     rm -f conftest*
6517   else
6518         for arg in $ld_switch_site $ld_switch_x_site; do
6519       case "$arg" in -L*) {
6520 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6521   test "$xe_runpath_dir" != "/lib"     -a \
6522         "$xe_runpath_dir" != "/usr/lib" -a \
6523         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6524   eval "$xe_add_unique_runpath_dir"
6525 };; esac
6526     done
6527             if test "$opsys $need_motif" = "sol2 yes"; then
6528       xe_runpath_dir="/opt/SUNWdt/lib";
6529       eval "$xe_add_unique_runpath_dir";
6530     fi
6531   fi 
6532   if test -n "$runpath"; then
6533     ld_switch_run="${dash_r}${runpath}"
6534     
6535 if test "$GCC" = "yes"; then
6536   set x $ld_switch_run; shift; ld_switch_run=""
6537   while test -n "$1"; do
6538     case $1 in
6539       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6540       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6541       -Xlinker* ) ;;
6542       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6543     esac
6544     shift
6545   done
6546 fi
6547     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6548   fi
6549 fi
6550
6551
6552   if test "$extra_verbose" = "yes"; then
6553     echo; echo "X11 compilation variables:"
6554     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6555     echo
6556   fi
6557
6558             bitmapdirs=
6559   if test "$x_includes" != NONE; then
6560     for i in $x_includes; do
6561       if test -d "$i/bitmaps"; then
6562         bitmapdirs="$i/bitmaps:$bitmapdirs"
6563       fi
6564       if test -d "$i/X11/bitmaps"; then
6565         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6566       fi
6567     done
6568     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6569   fi
6570   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6571     Defining BITMAPDIR = "$bitmapdirs"
6572 EOF
6573 cat >> confdefs.h <<EOF
6574 #define BITMAPDIR "$bitmapdirs"
6575 EOF
6576 }
6577
6578
6579     echo "checking for X defines extracted by xmkmf" 1>&6
6580 echo "configure:6581: checking for X defines extracted by xmkmf" >&5
6581   rm -fr conftestdir
6582   if mkdir conftestdir; then
6583     cd conftestdir
6584     cat > Imakefile <<'EOF'
6585 xetest:
6586         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6587 EOF
6588     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6589       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6590       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6591     fi
6592     cd ..
6593     rm -fr conftestdir
6594     for word in $xmkmf_defines; do
6595       case "$word" in 
6596       -D__STDC__*) ;;
6597       -D* )
6598         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6599         case "$word" in
6600           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6601           *     ) val=1 ;;
6602         esac
6603         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6604           if test "$val" = "1"
6605             then { test "$extra_verbose" = "yes" && cat << EOF
6606     Defining $sym
6607 EOF
6608 cat >> confdefs.h <<EOF
6609 #define $sym 1
6610 EOF
6611 }
6612
6613             else { test "$extra_verbose" = "yes" && cat << EOF
6614     Defining $sym = $val
6615 EOF
6616 cat >> confdefs.h <<EOF
6617 #define $sym $val
6618 EOF
6619 }
6620
6621           fi
6622         fi  ;;
6623       esac
6624     done
6625   fi
6626
6627     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6628 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6629 echo "configure:6630: checking for X11/Intrinsic.h" >&5
6630
6631 cat > conftest.$ac_ext <<EOF
6632 #line 6633 "configure"
6633 #include "confdefs.h"
6634 #include <X11/Intrinsic.h>
6635 EOF
6636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6637 { (eval echo configure:6638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6639 if test -z "$ac_err"; then
6640   rm -rf conftest*
6641   eval "ac_cv_header_$ac_safe=yes"
6642 else
6643   echo "$ac_err" >&5
6644   echo "configure: failed program was:" >&5
6645   cat conftest.$ac_ext >&5
6646   rm -rf conftest*
6647   eval "ac_cv_header_$ac_safe=no"
6648 fi
6649 rm -f conftest*
6650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6651   echo "$ac_t""yes" 1>&6
6652   :
6653 else
6654   echo "$ac_t""no" 1>&6
6655 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6656 fi
6657
6658
6659       
6660 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6661 echo "configure:6662: checking for XOpenDisplay in -lX11" >&5
6662 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6663
6664 xe_check_libs=" -lX11 "
6665 cat > conftest.$ac_ext <<EOF
6666 #line 6667 "configure"
6667 #include "confdefs.h"
6668 /* Override any gcc2 internal prototype to avoid an error.  */
6669 /* We use char because int might match the return type of a gcc2
6670     builtin and then its argument prototype would still apply.  */
6671 char XOpenDisplay();
6672
6673 int main() {
6674 XOpenDisplay()
6675 ; return 0; }
6676 EOF
6677 if { (eval echo configure:6678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6678   rm -rf conftest*
6679   eval "ac_cv_lib_$ac_lib_var=yes"
6680 else
6681   echo "configure: failed program was:" >&5
6682   cat conftest.$ac_ext >&5
6683   rm -rf conftest*
6684   eval "ac_cv_lib_$ac_lib_var=no"
6685 fi
6686 rm -f conftest*
6687 xe_check_libs=""
6688
6689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6690   echo "$ac_t""yes" 1>&6
6691   have_lib_x11=yes
6692 else
6693   echo "$ac_t""no" 1>&6
6694 fi
6695
6696
6697   if test "$have_lib_x11" != "yes"; then
6698     
6699 xe_msg_checking="for XGetFontProperty in -lX11"
6700 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6701 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6702 echo "configure:6703: checking "$xe_msg_checking"" >&5
6703 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6704
6705 xe_check_libs=" -lX11 -b i486-linuxaout"
6706 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 /* Override any gcc2 internal prototype to avoid an error.  */
6710 /* We use char because int might match the return type of a gcc2
6711     builtin and then its argument prototype would still apply.  */
6712 char XGetFontProperty();
6713
6714 int main() {
6715 XGetFontProperty()
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=no"
6726 fi
6727 rm -f conftest*
6728 xe_check_libs=""
6729
6730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6731   echo "$ac_t""yes" 1>&6
6732   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6733 else
6734   echo "$ac_t""no" 1>&6
6735 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6736 fi
6737
6738
6739   fi
6740   libs_x="-lX11"
6741   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6742
6743     
6744 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6745 echo "configure:6746: checking for XShapeSelectInput in -lXext" >&5
6746 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6747
6748 xe_check_libs=" -lXext "
6749 cat > conftest.$ac_ext <<EOF
6750 #line 6751 "configure"
6751 #include "confdefs.h"
6752 /* Override any gcc2 internal prototype to avoid an error.  */
6753 /* We use char because int might match the return type of a gcc2
6754     builtin and then its argument prototype would still apply.  */
6755 char XShapeSelectInput();
6756
6757 int main() {
6758 XShapeSelectInput()
6759 ; return 0; }
6760 EOF
6761 if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=yes"
6764 else
6765   echo "configure: failed program was:" >&5
6766   cat conftest.$ac_ext >&5
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=no"
6769 fi
6770 rm -f conftest*
6771 xe_check_libs=""
6772
6773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6774   echo "$ac_t""yes" 1>&6
6775   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6776 else
6777   echo "$ac_t""no" 1>&6
6778 fi
6779
6780
6781
6782     
6783 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6784 echo "configure:6785: checking for XtOpenDisplay in -lXt" >&5
6785 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6786
6787 xe_check_libs=" -lXt "
6788 cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char XtOpenDisplay();
6795
6796 int main() {
6797 XtOpenDisplay()
6798 ; return 0; }
6799 EOF
6800 if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6801   rm -rf conftest*
6802   eval "ac_cv_lib_$ac_lib_var=yes"
6803 else
6804   echo "configure: failed program was:" >&5
6805   cat conftest.$ac_ext >&5
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=no"
6808 fi
6809 rm -f conftest*
6810 xe_check_libs=""
6811
6812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6813   echo "$ac_t""yes" 1>&6
6814   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6815 else
6816   echo "$ac_t""no" 1>&6
6817 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6818 fi
6819
6820
6821
6822   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6823 echo "configure:6824: checking the version of X11 being used" >&5
6824   cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 #include <X11/Intrinsic.h>
6828     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6829 EOF
6830 if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6831 then
6832   ./conftest foobar; x11_release=$?
6833 else
6834   conftest_rc="$?"
6835   echo "configure: failed program was:" >&5
6836   cat conftest.$ac_ext >&5
6837   rm -fr conftest*
6838   x11_release=4
6839 fi
6840 rm -fr conftest*
6841   echo "$ac_t""R${x11_release}" 1>&6
6842   { test "$extra_verbose" = "yes" && cat << EOF
6843     Defining THIS_IS_X11R${x11_release}
6844 EOF
6845 cat >> confdefs.h <<EOF
6846 #define THIS_IS_X11R${x11_release} 1
6847 EOF
6848 }
6849
6850
6851   if test "${x11_release}" = "4"; then
6852     case "$with_widgets" in
6853       "" | "no") with_widgets=no ;;
6854       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6855     esac
6856   fi
6857
6858   for ac_func in XConvertCase XtRegisterDrawable
6859 do
6860 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6861 echo "configure:6862: checking for $ac_func" >&5
6862
6863 cat > conftest.$ac_ext <<EOF
6864 #line 6865 "configure"
6865 #include "confdefs.h"
6866 /* System header to define __stub macros and hopefully few prototypes,
6867     which can conflict with char $ac_func(); below.  */
6868 #include <assert.h>
6869 /* Override any gcc2 internal prototype to avoid an error.  */
6870 /* We use char because int might match the return type of a gcc2
6871     builtin and then its argument prototype would still apply.  */
6872 char $ac_func();
6873
6874 int main() {
6875
6876 /* The GNU C library defines this for functions which it implements
6877     to always fail with ENOSYS.  Some functions are actually named
6878     something starting with __ and the normal name is an alias.  */
6879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6880 choke me
6881 #else
6882 $ac_func();
6883 #endif
6884
6885 ; return 0; }
6886 EOF
6887 if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6888   rm -rf conftest*
6889   eval "ac_cv_func_$ac_func=yes"
6890 else
6891   echo "configure: failed program was:" >&5
6892   cat conftest.$ac_ext >&5
6893   rm -rf conftest*
6894   eval "ac_cv_func_$ac_func=no"
6895 fi
6896 rm -f conftest*
6897
6898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6899   echo "$ac_t""yes" 1>&6
6900     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6901   { test "$extra_verbose" = "yes" && cat << EOF
6902     Defining $ac_tr_func
6903 EOF
6904 cat >> confdefs.h <<EOF
6905 #define $ac_tr_func 1
6906 EOF
6907 }
6908  
6909 else
6910   echo "$ac_t""no" 1>&6
6911 fi
6912 done
6913
6914
6915   for ac_hdr in X11/Xlocale.h
6916 do
6917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6919 echo "configure:6920: checking for $ac_hdr" >&5
6920
6921 cat > conftest.$ac_ext <<EOF
6922 #line 6923 "configure"
6923 #include "confdefs.h"
6924 #include <$ac_hdr>
6925 EOF
6926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6927 { (eval echo configure:6928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6929 if test -z "$ac_err"; then
6930   rm -rf conftest*
6931   eval "ac_cv_header_$ac_safe=yes"
6932 else
6933   echo "$ac_err" >&5
6934   echo "configure: failed program was:" >&5
6935   cat conftest.$ac_ext >&5
6936   rm -rf conftest*
6937   eval "ac_cv_header_$ac_safe=no"
6938 fi
6939 rm -f conftest*
6940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6941   echo "$ac_t""yes" 1>&6
6942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6943   { test "$extra_verbose" = "yes" && cat << EOF
6944     Defining $ac_tr_hdr
6945 EOF
6946 cat >> confdefs.h <<EOF
6947 #define $ac_tr_hdr 1
6948 EOF
6949 }
6950  
6951 else
6952   echo "$ac_t""no" 1>&6
6953 fi
6954 done
6955
6956
6957     for ac_func in XRegisterIMInstantiateCallback
6958 do
6959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6960 echo "configure:6961: checking for $ac_func" >&5
6961
6962 cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965 /* System header to define __stub macros and hopefully few prototypes,
6966     which can conflict with char $ac_func(); below.  */
6967 #include <assert.h>
6968 /* Override any gcc2 internal prototype to avoid an error.  */
6969 /* We use char because int might match the return type of a gcc2
6970     builtin and then its argument prototype would still apply.  */
6971 char $ac_func();
6972
6973 int main() {
6974
6975 /* The GNU C library defines this for functions which it implements
6976     to always fail with ENOSYS.  Some functions are actually named
6977     something starting with __ and the normal name is an alias.  */
6978 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6979 choke me
6980 #else
6981 $ac_func();
6982 #endif
6983
6984 ; return 0; }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6987   rm -rf conftest*
6988   eval "ac_cv_func_$ac_func=yes"
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -rf conftest*
6993   eval "ac_cv_func_$ac_func=no"
6994 fi
6995 rm -f conftest*
6996
6997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6998   echo "$ac_t""yes" 1>&6
6999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7000   { test "$extra_verbose" = "yes" && cat << EOF
7001     Defining $ac_tr_func
7002 EOF
7003 cat >> confdefs.h <<EOF
7004 #define $ac_tr_func 1
7005 EOF
7006 }
7007  
7008 else
7009   echo "$ac_t""no" 1>&6
7010 fi
7011 done
7012
7013   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7014 echo "configure:7015: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7015   cat > conftest.$ac_ext <<EOF
7016 #line 7017 "configure"
7017 #include "confdefs.h"
7018
7019 #define NeedFunctionPrototypes 1
7020 #include <X11/Xlib.h>
7021 extern Bool XRegisterIMInstantiateCallback(
7022    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7023
7024 int main() {
7025
7026 ; return 0; }
7027 EOF
7028 if { (eval echo configure:7029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7029   rm -rf conftest*
7030   echo "$ac_t""yes" 1>&6
7031 else
7032   echo "configure: failed program was:" >&5
7033   cat conftest.$ac_ext >&5
7034   rm -rf conftest*
7035   echo "$ac_t""no" 1>&6
7036    { test "$extra_verbose" = "yes" && cat << \EOF
7037     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7038 EOF
7039 cat >> confdefs.h <<\EOF
7040 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7041 EOF
7042 }
7043
7044 fi
7045 rm -f conftest*
7046
7047     test -z "$with_xmu" && { 
7048 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7049 echo "configure:7050: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7050 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7051
7052 xe_check_libs=" -lXmu "
7053 cat > conftest.$ac_ext <<EOF
7054 #line 7055 "configure"
7055 #include "confdefs.h"
7056 /* Override any gcc2 internal prototype to avoid an error.  */
7057 /* We use char because int might match the return type of a gcc2
7058     builtin and then its argument prototype would still apply.  */
7059 char XmuReadBitmapDataFromFile();
7060
7061 int main() {
7062 XmuReadBitmapDataFromFile()
7063 ; return 0; }
7064 EOF
7065 if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7066   rm -rf conftest*
7067   eval "ac_cv_lib_$ac_lib_var=yes"
7068 else
7069   echo "configure: failed program was:" >&5
7070   cat conftest.$ac_ext >&5
7071   rm -rf conftest*
7072   eval "ac_cv_lib_$ac_lib_var=no"
7073 fi
7074 rm -f conftest*
7075 xe_check_libs=""
7076
7077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7078   echo "$ac_t""yes" 1>&6
7079   with_xmu=yes
7080 else
7081   echo "$ac_t""no" 1>&6
7082 with_xmu=no
7083 fi
7084
7085  }
7086   if test "$with_xmu" = "no"; then
7087     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7088    echo "    xemacs will be linked with \"xmu.o\""
7089  fi
7090   else
7091     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7092     { test "$extra_verbose" = "yes" && cat << \EOF
7093     Defining HAVE_XMU
7094 EOF
7095 cat >> confdefs.h <<\EOF
7096 #define HAVE_XMU 1
7097 EOF
7098 }
7099
7100   fi
7101
7102       
7103 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7104 echo "configure:7105: checking for main in -lXbsd" >&5
7105 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7106
7107 xe_check_libs=" -lXbsd "
7108 cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111
7112 int main() {
7113 main()
7114 ; return 0; }
7115 EOF
7116 if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7117   rm -rf conftest*
7118   eval "ac_cv_lib_$ac_lib_var=yes"
7119 else
7120   echo "configure: failed program was:" >&5
7121   cat conftest.$ac_ext >&5
7122   rm -rf conftest*
7123   eval "ac_cv_lib_$ac_lib_var=no"
7124 fi
7125 rm -f conftest*
7126 xe_check_libs=""
7127
7128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7129   echo "$ac_t""yes" 1>&6
7130   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7131 else
7132   echo "$ac_t""no" 1>&6
7133 fi
7134
7135
7136
7137     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7138         if test "$GCC" = "yes"; then
7139                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7140 echo "configure:7141: checking for name of AIX gcc threads option" >&5
7141       case `$CC -v --help 2>&1` in
7142         *-mthreads*) aix_threads=-mthreads ;;
7143                   *) aix_threads=-pthread  ;;
7144       esac
7145       echo "$ac_t""$aix_threads" 1>&6
7146       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7147       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7148     else
7149             case "$CC" in *_r) : ;;
7150         *)
7151          xe_save_CC="$CC"
7152          CC="${CC}_r"
7153          echo $ac_n "checking size of short""... $ac_c" 1>&6
7154 echo "configure:7155: checking size of short" >&5
7155
7156 cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159 #include <stdio.h>
7160 #include <sys/types.h>
7161 main()
7162 {
7163   FILE *f=fopen("conftestval", "w");
7164   if (!f) exit(1);
7165   fprintf(f, "%d\n", sizeof(short));
7166   exit(0);
7167 }
7168 EOF
7169 if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7170 then
7171   ac_cv_sizeof_short=`cat conftestval`
7172 else
7173   conftest_rc="$?"
7174   echo "configure: failed program was:" >&5
7175   cat conftest.$ac_ext >&5
7176   rm -fr conftest*
7177   ac_cv_sizeof_short=0
7178 fi
7179 rm -fr conftest*
7180 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7181 { test "$extra_verbose" = "yes" && cat << EOF
7182     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7183 EOF
7184 cat >> confdefs.h <<EOF
7185 #define SIZEOF_SHORT $ac_cv_sizeof_short
7186 EOF
7187 }
7188
7189
7190          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7191       esac
7192     fi
7193   fi
7194
7195 fi 
7196 if test "$with_msw" != "no"; then
7197   echo "checking for MS-Windows" 1>&6
7198 echo "configure:7199: checking for MS-Windows" >&5
7199   
7200 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7201 echo "configure:7202: checking for main in -lgdi32" >&5
7202 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7203
7204 xe_check_libs=" -lgdi32 "
7205 cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208
7209 int main() {
7210 main()
7211 ; return 0; }
7212 EOF
7213 if { (eval echo configure:7214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7214   rm -rf conftest*
7215   eval "ac_cv_lib_$ac_lib_var=yes"
7216 else
7217   echo "configure: failed program was:" >&5
7218   cat conftest.$ac_ext >&5
7219   rm -rf conftest*
7220   eval "ac_cv_lib_$ac_lib_var=no"
7221 fi
7222 rm -f conftest*
7223 xe_check_libs=""
7224
7225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7226   echo "$ac_t""yes" 1>&6
7227   with_msw=yes
7228 else
7229   echo "$ac_t""no" 1>&6
7230 fi
7231
7232
7233   if test "$with_msw" = "yes"; then
7234     { test "$extra_verbose" = "yes" && cat << \EOF
7235     Defining HAVE_MS_WINDOWS
7236 EOF
7237 cat >> confdefs.h <<\EOF
7238 #define HAVE_MS_WINDOWS 1
7239 EOF
7240 }
7241
7242
7243         if test "$with_netinstall" = "yes"; then
7244       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7245       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7246       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7247     fi
7248
7249     install_pp="$srcdir/lib-src/installexe.sh"
7250     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool\" to \$libs_system"; fi
7251     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7252     if test "$window_system" != x11; then
7253         window_system=msw
7254         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7255             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7256    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7257  fi
7258         test "$with_menubars"   != "no" && with_menubars=msw \
7259             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7260    echo "    xemacs will be linked with \"menubar-msw.o\""
7261  fi
7262         test "$with_toolbars"   != "no" && with_toolbars=msw \
7263             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7264    echo "    xemacs will be linked with \"toolbar-msw.o\""
7265  fi
7266         test "$with_dialogs"   != "no" && with_dialogs=msw \
7267             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7268    echo "    xemacs will be linked with \"dialog-msw.o\""
7269  fi
7270         test "$with_widgets"   != "no" && with_widgets=msw
7271     else
7272         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7273    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7274  fi
7275         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7276    echo "    xemacs will be linked with \"menubar-msw.o\""
7277  fi
7278         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7279    echo "    xemacs will be linked with \"toolbar-msw.o\""
7280  fi
7281         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7282    echo "    xemacs will be linked with \"dialog-msw.o\""
7283  fi
7284     fi
7285         cat > conftest.$ac_ext <<EOF
7286 #line 7287 "configure"
7287 #include "confdefs.h"
7288 #include <fcntl.h>
7289     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7290 EOF
7291 if { (eval echo configure:7292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7292 then
7293   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7294     Defining HAVE_MSG_SELECT
7295 EOF
7296 cat >> confdefs.h <<\EOF
7297 #define HAVE_MSG_SELECT 1
7298 EOF
7299 }
7300
7301 else
7302   conftest_rc="$?"
7303   echo "configure: failed program was:" >&5
7304   cat conftest.$ac_ext >&5
7305 fi
7306 rm -fr conftest*
7307     with_file_coding=yes
7308     extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o" &&  if test "$extra_verbose" = "yes"; then
7309    echo "    xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o\""
7310  fi
7311   fi
7312 fi
7313
7314
7315
7316 test -z "$window_system" && window_system="none"
7317
7318 if test "$window_system" = "none"; then
7319   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7320   do
7321     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7322        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7323     fi
7324     eval "with_${feature}=no"
7325   done
7326 else
7327   test -z "$with_toolbars" && with_toolbars=yes
7328 fi
7329
7330 if test "$with_msw" != "yes"; then
7331   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7332   do
7333     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7334        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7335     fi
7336     eval "with_${feature}=no"
7337   done
7338 else
7339   :
7340 fi
7341
7342 if test "$with_x11" != "yes"; then
7343             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7344   do
7345     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7346        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7347     fi
7348     eval "with_${feature}=no"
7349   done
7350 fi
7351
7352 if test "$with_x11" = "yes"; then
7353   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7354 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7355 echo "configure:7356: checking for X11/extensions/shape.h" >&5
7356
7357 cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 #include <X11/extensions/shape.h>
7361 EOF
7362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7363 { (eval echo configure:7364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7365 if test -z "$ac_err"; then
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=yes"
7368 else
7369   echo "$ac_err" >&5
7370   echo "configure: failed program was:" >&5
7371   cat conftest.$ac_ext >&5
7372   rm -rf conftest*
7373   eval "ac_cv_header_$ac_safe=no"
7374 fi
7375 rm -f conftest*
7376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7377   echo "$ac_t""yes" 1>&6
7378   
7379    { test "$extra_verbose" = "yes" && cat << \EOF
7380     Defining HAVE_BALLOON_HELP
7381 EOF
7382 cat >> confdefs.h <<\EOF
7383 #define HAVE_BALLOON_HELP 1
7384 EOF
7385 }
7386
7387    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7388    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7389  fi
7390 else
7391   echo "$ac_t""no" 1>&6
7392 fi
7393
7394 fi
7395
7396 bitmapdir=
7397
7398 case "$window_system" in
7399   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7400   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7401   gtk  )
7402        HAVE_X_WINDOWS=no
7403        test "$with_gnome" = "yes" && echo "  Using GNOME."
7404        test "$with_gnome" = "no" && echo "  Using GTK."
7405        ;;
7406   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7407 esac
7408
7409 case "$x_libraries" in *X11R4* )
7410   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7411   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7412 esac
7413
7414 echo "checking for WM_COMMAND option" 1>&6
7415 echo "configure:7416: checking for WM_COMMAND option" >&5;
7416 if test "$with_wmcommand" != "no"; then
7417   { test "$extra_verbose" = "yes" && cat << \EOF
7418     Defining HAVE_WMCOMMAND
7419 EOF
7420 cat >> confdefs.h <<\EOF
7421 #define HAVE_WMCOMMAND 1
7422 EOF
7423 }
7424
7425 fi
7426
7427 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7428 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7429 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7430 echo "configure:7431: checking for X11/Xauth.h" >&5
7431
7432 cat > conftest.$ac_ext <<EOF
7433 #line 7434 "configure"
7434 #include "confdefs.h"
7435 #include <X11/Xauth.h>
7436 EOF
7437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7438 { (eval echo configure:7439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7440 if test -z "$ac_err"; then
7441   rm -rf conftest*
7442   eval "ac_cv_header_$ac_safe=yes"
7443 else
7444   echo "$ac_err" >&5
7445   echo "configure: failed program was:" >&5
7446   cat conftest.$ac_ext >&5
7447   rm -rf conftest*
7448   eval "ac_cv_header_$ac_safe=no"
7449 fi
7450 rm -f conftest*
7451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7452   echo "$ac_t""yes" 1>&6
7453   :
7454 else
7455   echo "$ac_t""no" 1>&6
7456 with_xauth=no
7457 fi
7458  }
7459 test -z "$with_xauth" && { 
7460 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7461 echo "configure:7462: checking for XauGetAuthByAddr in -lXau" >&5
7462 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7463
7464 xe_check_libs=" -lXau "
7465 cat > conftest.$ac_ext <<EOF
7466 #line 7467 "configure"
7467 #include "confdefs.h"
7468 /* Override any gcc2 internal prototype to avoid an error.  */
7469 /* We use char because int might match the return type of a gcc2
7470     builtin and then its argument prototype would still apply.  */
7471 char XauGetAuthByAddr();
7472
7473 int main() {
7474 XauGetAuthByAddr()
7475 ; return 0; }
7476 EOF
7477 if { (eval echo configure:7478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7478   rm -rf conftest*
7479   eval "ac_cv_lib_$ac_lib_var=yes"
7480 else
7481   echo "configure: failed program was:" >&5
7482   cat conftest.$ac_ext >&5
7483   rm -rf conftest*
7484   eval "ac_cv_lib_$ac_lib_var=no"
7485 fi
7486 rm -f conftest*
7487 xe_check_libs=""
7488
7489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7490   echo "$ac_t""yes" 1>&6
7491   :
7492 else
7493   echo "$ac_t""no" 1>&6
7494 with_xauth=no
7495 fi
7496
7497  }
7498 test -z "$with_xauth" && with_xauth=yes
7499 if test "$with_xauth" = "yes"; then
7500   { test "$extra_verbose" = "yes" && cat << \EOF
7501     Defining HAVE_XAUTH
7502 EOF
7503 cat >> confdefs.h <<\EOF
7504 #define HAVE_XAUTH 1
7505 EOF
7506 }
7507
7508   
7509 T=""
7510 for W in $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
7511 libs_xauth="$T"
7512
7513 fi
7514
7515
7516
7517
7518 if test "$with_tooltalk" != "no" ; then
7519       for dir in "" "Tt/" "desktop/" ; do
7520     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7521 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7522 echo "configure:7523: checking for ${dir}tt_c.h" >&5
7523
7524 cat > conftest.$ac_ext <<EOF
7525 #line 7526 "configure"
7526 #include "confdefs.h"
7527 #include <${dir}tt_c.h>
7528 EOF
7529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7530 { (eval echo configure:7531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7532 if test -z "$ac_err"; then
7533   rm -rf conftest*
7534   eval "ac_cv_header_$ac_safe=yes"
7535 else
7536   echo "$ac_err" >&5
7537   echo "configure: failed program was:" >&5
7538   cat conftest.$ac_ext >&5
7539   rm -rf conftest*
7540   eval "ac_cv_header_$ac_safe=no"
7541 fi
7542 rm -f conftest*
7543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7544   echo "$ac_t""yes" 1>&6
7545   tt_c_h_file="${dir}tt_c.h"; break
7546 else
7547   echo "$ac_t""no" 1>&6
7548 fi
7549
7550   done
7551   if test -z "$tt_c_h_file"; then
7552     if test "$with_tooltalk" = "yes"; then
7553       (echo "$progname: Usage error:"
7554 echo " " "Unable to find required tooltalk header files."
7555 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7556     fi
7557     with_tooltalk=no
7558   fi
7559 fi
7560 if test "$with_tooltalk" != "no" ; then
7561   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7562     
7563 xe_msg_checking="for tt_message_create in -ltt"
7564 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7565 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7566 echo "configure:7567: checking "$xe_msg_checking"" >&5
7567 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7568
7569 xe_check_libs=" -ltt $extra_libs"
7570 cat > conftest.$ac_ext <<EOF
7571 #line 7572 "configure"
7572 #include "confdefs.h"
7573 /* Override any gcc2 internal prototype to avoid an error.  */
7574 /* We use char because int might match the return type of a gcc2
7575     builtin and then its argument prototype would still apply.  */
7576 char tt_message_create();
7577
7578 int main() {
7579 tt_message_create()
7580 ; return 0; }
7581 EOF
7582 if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7583   rm -rf conftest*
7584   eval "ac_cv_lib_$ac_lib_var=yes"
7585 else
7586   echo "configure: failed program was:" >&5
7587   cat conftest.$ac_ext >&5
7588   rm -rf conftest*
7589   eval "ac_cv_lib_$ac_lib_var=no"
7590 fi
7591 rm -f conftest*
7592 xe_check_libs=""
7593
7594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7595   echo "$ac_t""yes" 1>&6
7596   tt_libs="-ltt $extra_libs"; break
7597 else
7598   echo "$ac_t""no" 1>&6
7599 :
7600 fi
7601
7602
7603   done
7604   if test -z "$tt_libs"; then
7605     if test "$with_tooltalk" = "yes"; then
7606       (echo "$progname: Usage error:"
7607 echo " " "Unable to find required tooltalk libraries."
7608 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7609     fi
7610     with_tooltalk=no
7611   fi
7612 fi
7613 test -z "$with_tooltalk" && with_tooltalk=yes
7614 if test "$with_tooltalk" = "yes"; then
7615   { test "$extra_verbose" = "yes" && cat << \EOF
7616     Defining TOOLTALK
7617 EOF
7618 cat >> confdefs.h <<\EOF
7619 #define TOOLTALK 1
7620 EOF
7621 }
7622
7623   { test "$extra_verbose" = "yes" && cat << EOF
7624     Defining TT_C_H_FILE = "$tt_c_h_file"
7625 EOF
7626 cat >> confdefs.h <<EOF
7627 #define TT_C_H_FILE "$tt_c_h_file"
7628 EOF
7629 }
7630
7631   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7632   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7633    echo "    xemacs will be linked with \"tooltalk.o\""
7634  fi
7635 fi
7636
7637 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7638 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7639 echo "configure:7640: checking for Dt/Dt.h" >&5
7640
7641 cat > conftest.$ac_ext <<EOF
7642 #line 7643 "configure"
7643 #include "confdefs.h"
7644 #include <Dt/Dt.h>
7645 EOF
7646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7647 { (eval echo configure:7648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7649 if test -z "$ac_err"; then
7650   rm -rf conftest*
7651   eval "ac_cv_header_$ac_safe=yes"
7652 else
7653   echo "$ac_err" >&5
7654   echo "configure: failed program was:" >&5
7655   cat conftest.$ac_ext >&5
7656   rm -rf conftest*
7657   eval "ac_cv_header_$ac_safe=no"
7658 fi
7659 rm -f conftest*
7660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7661   echo "$ac_t""yes" 1>&6
7662   :
7663 else
7664   echo "$ac_t""no" 1>&6
7665 with_cde=no
7666 fi
7667  }
7668 test -z "$with_cde" && { 
7669 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7670 echo "configure:7671: checking for DtDndDragStart in -lDtSvc" >&5
7671 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7672
7673 xe_check_libs=" -lDtSvc "
7674 cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* Override any gcc2 internal prototype to avoid an error.  */
7678 /* We use char because int might match the return type of a gcc2
7679     builtin and then its argument prototype would still apply.  */
7680 char DtDndDragStart();
7681
7682 int main() {
7683 DtDndDragStart()
7684 ; return 0; }
7685 EOF
7686 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=yes"
7689 else
7690   echo "configure: failed program was:" >&5
7691   cat conftest.$ac_ext >&5
7692   rm -rf conftest*
7693   eval "ac_cv_lib_$ac_lib_var=no"
7694 fi
7695 rm -f conftest*
7696 xe_check_libs=""
7697
7698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7699   echo "$ac_t""yes" 1>&6
7700   :
7701 else
7702   echo "$ac_t""no" 1>&6
7703 with_cde=no
7704 fi
7705
7706  }
7707 test -z "$with_cde" && with_cde=yes
7708 if test "$with_dragndrop" = no; then
7709   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7710   with_cde=no
7711 fi
7712 if test "$with_cde" = "yes" ; then
7713   { test "$extra_verbose" = "yes" && cat << \EOF
7714     Defining HAVE_CDE
7715 EOF
7716 cat >> confdefs.h <<\EOF
7717 #define HAVE_CDE 1
7718 EOF
7719 }
7720
7721   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7722   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7723   with_tooltalk=yes # CDE requires Tooltalk
7724   need_motif=yes    # CDE requires Motif
7725 fi
7726
7727 test "$window_system" != "x11" && with_offix=no
7728 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7729   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7730   with_offix=no
7731 fi
7732 if test "$with_dragndrop" = no; then
7733   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7734   with_offix=no
7735 fi
7736 if test "$with_cde" = yes; then
7737   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7738   with_offix=no
7739 fi
7740 test -z "$with_offix" && with_offix=no
7741 if test "$with_offix" = "yes"; then
7742   { test "$extra_verbose" = "yes" && cat << \EOF
7743     Defining HAVE_OFFIX_DND
7744 EOF
7745 cat >> confdefs.h <<\EOF
7746 #define HAVE_OFFIX_DND 1
7747 EOF
7748 }
7749
7750   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7751   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7752 fi
7753 if test "$with_gtk" = "yes"; then
7754    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7755 fi
7756
7757 if test "$with_dragndrop" != "no" ; then
7758   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7759 echo "configure:7760: checking if drag and drop API is needed" >&5
7760   if test -n "$dragndrop_proto" ; then
7761     with_dragndrop=yes
7762     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7763     { test "$extra_verbose" = "yes" && cat << \EOF
7764     Defining HAVE_DRAGNDROP
7765 EOF
7766 cat >> confdefs.h <<\EOF
7767 #define HAVE_DRAGNDROP 1
7768 EOF
7769 }
7770
7771     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7772   else
7773     with_dragndrop=no
7774     echo "$ac_t""no" 1>&6
7775   fi
7776 fi
7777
7778 echo "checking for LDAP" 1>&6
7779 echo "configure:7780: checking for LDAP" >&5
7780 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7781 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7782 echo "configure:7783: checking for ldap.h" >&5
7783
7784 cat > conftest.$ac_ext <<EOF
7785 #line 7786 "configure"
7786 #include "confdefs.h"
7787 #include <ldap.h>
7788 EOF
7789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7790 { (eval echo configure:7791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7792 if test -z "$ac_err"; then
7793   rm -rf conftest*
7794   eval "ac_cv_header_$ac_safe=yes"
7795 else
7796   echo "$ac_err" >&5
7797   echo "configure: failed program was:" >&5
7798   cat conftest.$ac_ext >&5
7799   rm -rf conftest*
7800   eval "ac_cv_header_$ac_safe=no"
7801 fi
7802 rm -f conftest*
7803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7804   echo "$ac_t""yes" 1>&6
7805   :
7806 else
7807   echo "$ac_t""no" 1>&6
7808 with_ldap=no
7809 fi
7810  }
7811 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7812 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7813 echo "configure:7814: checking for lber.h" >&5
7814
7815 cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 #include <lber.h>
7819 EOF
7820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7821 { (eval echo configure:7822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7823 if test -z "$ac_err"; then
7824   rm -rf conftest*
7825   eval "ac_cv_header_$ac_safe=yes"
7826 else
7827   echo "$ac_err" >&5
7828   echo "configure: failed program was:" >&5
7829   cat conftest.$ac_ext >&5
7830   rm -rf conftest*
7831   eval "ac_cv_header_$ac_safe=no"
7832 fi
7833 rm -f conftest*
7834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7835   echo "$ac_t""yes" 1>&6
7836   :
7837 else
7838   echo "$ac_t""no" 1>&6
7839 with_ldap=no
7840 fi
7841  }
7842 if test no != "$with_ldap";then
7843   if test . != "${ldap_libs+.}";then
7844     ldap_libs=
7845     echo $ac_n "checking for ldap_open""... $ac_c" 1>&6
7846 echo "configure:7847: checking for ldap_open" >&5
7847
7848 cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 /* System header to define __stub macros and hopefully few prototypes,
7852     which can conflict with char ldap_open(); below.  */
7853 #include <assert.h>
7854 /* Override any gcc2 internal prototype to avoid an error.  */
7855 /* We use char because int might match the return type of a gcc2
7856     builtin and then its argument prototype would still apply.  */
7857 char ldap_open();
7858
7859 int main() {
7860
7861 /* The GNU C library defines this for functions which it implements
7862     to always fail with ENOSYS.  Some functions are actually named
7863     something starting with __ and the normal name is an alias.  */
7864 #if defined (__stub_ldap_open) || defined (__stub___ldap_open)
7865 choke me
7866 #else
7867 ldap_open();
7868 #endif
7869
7870 ; return 0; }
7871 EOF
7872 if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7873   rm -rf conftest*
7874   eval "ac_cv_func_ldap_open=yes"
7875 else
7876   echo "configure: failed program was:" >&5
7877   cat conftest.$ac_ext >&5
7878   rm -rf conftest*
7879   eval "ac_cv_func_ldap_open=no"
7880 fi
7881 rm -f conftest*
7882
7883 if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then
7884   echo "$ac_t""yes" 1>&6
7885         with_ldap=yes
7886       test yes = "$extra_verbose" &&
7887         echo "Setting ldap_libs to $ldap_libs"
7888 else
7889   echo "$ac_t""no" 1>&6
7890       
7891 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
7892 echo "configure:7893: checking for ldap_open in -lldap" >&5
7893 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7894
7895 xe_check_libs=" -lldap "
7896 cat > conftest.$ac_ext <<EOF
7897 #line 7898 "configure"
7898 #include "confdefs.h"
7899 /* Override any gcc2 internal prototype to avoid an error.  */
7900 /* We use char because int might match the return type of a gcc2
7901     builtin and then its argument prototype would still apply.  */
7902 char ldap_open();
7903
7904 int main() {
7905 ldap_open()
7906 ; return 0; }
7907 EOF
7908 if { (eval echo configure:7909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7909   rm -rf conftest*
7910   eval "ac_cv_lib_$ac_lib_var=yes"
7911 else
7912   echo "configure: failed program was:" >&5
7913   cat conftest.$ac_ext >&5
7914   rm -rf conftest*
7915   eval "ac_cv_lib_$ac_lib_var=no"
7916 fi
7917 rm -f conftest*
7918 xe_check_libs=""
7919
7920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7921   echo "$ac_t""yes" 1>&6
7922   with_ldap=yes
7923 else
7924   echo "$ac_t""no" 1>&6
7925 ldap_needs_lber=yes ldap_other_libs=-llber
7926         
7927 xe_msg_checking="for ldap_open in -lldap"
7928 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7929 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7930 echo "configure:7931: checking "$xe_msg_checking"" >&5
7931 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7932
7933 xe_check_libs=" -lldap $ldap_other_libs"
7934 cat > conftest.$ac_ext <<EOF
7935 #line 7936 "configure"
7936 #include "confdefs.h"
7937 /* Override any gcc2 internal prototype to avoid an error.  */
7938 /* We use char because int might match the return type of a gcc2
7939     builtin and then its argument prototype would still apply.  */
7940 char ldap_open();
7941
7942 int main() {
7943 ldap_open()
7944 ; return 0; }
7945 EOF
7946 if { (eval echo configure:7947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7947   rm -rf conftest*
7948   eval "ac_cv_lib_$ac_lib_var=yes"
7949 else
7950   echo "configure: failed program was:" >&5
7951   cat conftest.$ac_ext >&5
7952   rm -rf conftest*
7953   eval "ac_cv_lib_$ac_lib_var=no"
7954 fi
7955 rm -f conftest*
7956 xe_check_libs=""
7957
7958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7959   echo "$ac_t""yes" 1>&6
7960   with_ldap=yes
7961 else
7962   echo "$ac_t""no" 1>&6
7963 ldap_needs_krb=yes ldap_other_libs="$ldap_other_libs -lkrb"
7964           
7965 xe_msg_checking="for ldap_open in -lldap"
7966 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7967 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7968 echo "configure:7969: checking "$xe_msg_checking"" >&5
7969 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7970
7971 xe_check_libs=" -lldap $ldap_other_libs"
7972 cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975 /* Override any gcc2 internal prototype to avoid an error.  */
7976 /* We use char because int might match the return type of a gcc2
7977     builtin and then its argument prototype would still apply.  */
7978 char ldap_open();
7979
7980 int main() {
7981 ldap_open()
7982 ; return 0; }
7983 EOF
7984 if { (eval echo configure:7985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7985   rm -rf conftest*
7986   eval "ac_cv_lib_$ac_lib_var=yes"
7987 else
7988   echo "configure: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   rm -rf conftest*
7991   eval "ac_cv_lib_$ac_lib_var=no"
7992 fi
7993 rm -f conftest*
7994 xe_check_libs=""
7995
7996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7997   echo "$ac_t""yes" 1>&6
7998   with_ldap=yes
7999 else
8000   echo "$ac_t""no" 1>&6
8001 ldap_needs_des=yes ldap_other_libs="$ldap_other_libs -ldes"
8002             
8003 xe_msg_checking="for ldap_open in -lldap"
8004 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
8005 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
8006 echo "configure:8007: checking "$xe_msg_checking"" >&5
8007 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
8008
8009 xe_check_libs=" -lldap $ldap_other_libs"
8010 cat > conftest.$ac_ext <<EOF
8011 #line 8012 "configure"
8012 #include "confdefs.h"
8013 /* Override any gcc2 internal prototype to avoid an error.  */
8014 /* We use char because int might match the return type of a gcc2
8015     builtin and then its argument prototype would still apply.  */
8016 char ldap_open();
8017
8018 int main() {
8019 ldap_open()
8020 ; return 0; }
8021 EOF
8022 if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8023   rm -rf conftest*
8024   eval "ac_cv_lib_$ac_lib_var=yes"
8025 else
8026   echo "configure: failed program was:" >&5
8027   cat conftest.$ac_ext >&5
8028   rm -rf conftest*
8029   eval "ac_cv_lib_$ac_lib_var=no"
8030 fi
8031 rm -f conftest*
8032 xe_check_libs=""
8033
8034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8035   echo "$ac_t""yes" 1>&6
8036   with_ldap=yes
8037 else
8038   echo "$ac_t""no" 1>&6
8039 with_ldap=no
8040 fi
8041
8042
8043 fi
8044
8045
8046 fi
8047
8048
8049 fi
8050
8051
8052       if test yes = "$with_ldap" -a yes != "$ldap_needs_lber";then
8053         echo $ac_n "checking for LDAP_OPT_ON definition""... $ac_c" 1>&6
8054 echo "configure:8055: checking for LDAP_OPT_ON definition" >&5
8055
8056 cat > conftest.$ac_ext <<EOF
8057 #line 8058 "configure"
8058 #include "confdefs.h"
8059 #include <lber.h>
8060 #include <ldap.h>
8061 #ifdef LDAP_OPT_ON
8062 /* Relying on const defined by ac_c_const (upper case). */
8063 const void *const v = LDAP_OPT_ON;
8064 #else /* !defined (LDAP_OPT_ON) */
8065 choke me
8066 #endif /* !defined (LDAP_OPT_ON) */
8067 int main() {
8068
8069 ; return 0; }
8070 EOF
8071 if { (eval echo configure:8072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8072   rm -rf conftest*
8073   xe_cv_have_LDAP_OPT_ON=yes
8074 else
8075   echo "configure: failed program was:" >&5
8076   cat conftest.$ac_ext >&5
8077   rm -rf conftest*
8078   xe_cv_have_LDAP_OPT_ON=no
8079 fi
8080 rm -f conftest*
8081
8082 echo "$ac_t""$xe_cv_have_LDAP_OPT_ON" 1>&6
8083         if test yes = "$xe_cv_have_LDAP_OPT_ON";then
8084           echo $ac_n "checking LDAP_OPT_ON linking""... $ac_c" 1>&6
8085 echo "configure:8086: checking LDAP_OPT_ON linking" >&5
8086
8087 xe_save_LIBS="$LIBS"
8088             LIBS="-lldap $LIBS"
8089 cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 #include <lber.h>
8093 #include <ldap.h>
8094 const void *const v = LDAP_OPT_ON;
8095 int main() {
8096
8097 ; return 0; }
8098 EOF
8099 if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8100   rm -rf conftest*
8101   xe_cv_LDAP_OPT_ON_links=yes
8102 else
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -rf conftest*
8106   xe_cv_LDAP_OPT_ON_links=no
8107 fi
8108 rm -f conftest*
8109             LIBS="$xe_save_LIBS"
8110
8111 echo "$ac_t""$xe_cv_LDAP_OPT_ON_links" 1>&6
8112           if test yes != "$xe_cv_LDAP_OPT_ON_links";then
8113             ldap_needs_lber=yes ldap_other_libs=-llber
8114             echo $ac_n "checking LDAP_OPT_ON linking with -llber""... $ac_c" 1>&6
8115 echo "configure:8116: checking LDAP_OPT_ON linking with -llber" >&5
8116
8117 xe_save_LIBS="$LIBS"
8118               LIBS="-lldap $ldap_other_libs $LIBS"
8119 cat > conftest.$ac_ext <<EOF
8120 #line 8121 "configure"
8121 #include "confdefs.h"
8122 #include <lber.h>
8123 #include <ldap.h>
8124 const void *const v = LDAP_OPT_ON;
8125 int main() {
8126
8127 ; return 0; }
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8130   rm -rf conftest*
8131   xe_cv_LDAP_OPT_ON_links_w_lber=yes
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -rf conftest*
8136   xe_cv_LDAP_OPT_ON_links_w_lber=no
8137 fi
8138 rm -f conftest*
8139               LIBS="$xe_save_LIBS"
8140
8141 echo "$ac_t""$xe_cv_LDAP_OPT_ON_links_w_lber" 1>&6
8142             if test yes != "$xe_cv_LDAP_OPT_ON_links_w_lber";then
8143               with_ldap=no
8144             fi
8145           fi
8146         fi
8147       fi
8148       if test yes = "$with_ldap";then
8149         if test yes = "$ldap_needs_des";then
8150           ldap_libs="-ldes $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$ldap_libs"; fi
8151         fi
8152         if test yes = "$ldap_needs_krb";then
8153           ldap_libs="-lkrb $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$ldap_libs"; fi
8154         fi
8155         if test yes = "$ldap_needs_lber";then
8156           ldap_libs="-llber $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$ldap_libs"; fi
8157         fi
8158         ldap_libs="-lldap $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$ldap_libs"; fi
8159       fi
8160 fi
8161
8162   else
8163     save_LIBS="$LIBS" LIBS="$ldap_libs $LIBS"
8164     echo $ac_n "checking for ldap_open""... $ac_c" 1>&6
8165 echo "configure:8166: checking for ldap_open" >&5
8166
8167 cat > conftest.$ac_ext <<EOF
8168 #line 8169 "configure"
8169 #include "confdefs.h"
8170 /* System header to define __stub macros and hopefully few prototypes,
8171     which can conflict with char ldap_open(); below.  */
8172 #include <assert.h>
8173 /* Override any gcc2 internal prototype to avoid an error.  */
8174 /* We use char because int might match the return type of a gcc2
8175     builtin and then its argument prototype would still apply.  */
8176 char ldap_open();
8177
8178 int main() {
8179
8180 /* The GNU C library defines this for functions which it implements
8181     to always fail with ENOSYS.  Some functions are actually named
8182     something starting with __ and the normal name is an alias.  */
8183 #if defined (__stub_ldap_open) || defined (__stub___ldap_open)
8184 choke me
8185 #else
8186 ldap_open();
8187 #endif
8188
8189 ; return 0; }
8190 EOF
8191 if { (eval echo configure:8192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8192   rm -rf conftest*
8193   eval "ac_cv_func_ldap_open=yes"
8194 else
8195   echo "configure: failed program was:" >&5
8196   cat conftest.$ac_ext >&5
8197   rm -rf conftest*
8198   eval "ac_cv_func_ldap_open=no"
8199 fi
8200 rm -f conftest*
8201
8202 if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then
8203   echo "$ac_t""yes" 1>&6
8204         with_ldap=yes
8205       test yes = "$extra_verbose" &&
8206         echo "Setting ldap_libs to $ldap_libs"
8207 else
8208   echo "$ac_t""no" 1>&6
8209       with_ldap=no
8210 fi
8211
8212     LIBS="$save_LIBS"
8213   fi
8214 fi
8215 if test "$with_ldap" = "yes"; then
8216   { test "$extra_verbose" = "yes" && cat << \EOF
8217     Defining HAVE_LDAP
8218 EOF
8219 cat >> confdefs.h <<\EOF
8220 #define HAVE_LDAP 1
8221 EOF
8222 }
8223
8224   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8225    echo "    xemacs will be linked with \"eldap.o\""
8226  fi
8227   LIBS="$ldap_libs $LIBS"
8228   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8229 do
8230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8231 echo "configure:8232: checking for $ac_func" >&5
8232
8233 cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* System header to define __stub macros and hopefully few prototypes,
8237     which can conflict with char $ac_func(); below.  */
8238 #include <assert.h>
8239 /* Override any gcc2 internal prototype to avoid an error.  */
8240 /* We use char because int might match the return type of a gcc2
8241     builtin and then its argument prototype would still apply.  */
8242 char $ac_func();
8243
8244 int main() {
8245
8246 /* The GNU C library defines this for functions which it implements
8247     to always fail with ENOSYS.  Some functions are actually named
8248     something starting with __ and the normal name is an alias.  */
8249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8250 choke me
8251 #else
8252 $ac_func();
8253 #endif
8254
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8258   rm -rf conftest*
8259   eval "ac_cv_func_$ac_func=yes"
8260 else
8261   echo "configure: failed program was:" >&5
8262   cat conftest.$ac_ext >&5
8263   rm -rf conftest*
8264   eval "ac_cv_func_$ac_func=no"
8265 fi
8266 rm -f conftest*
8267
8268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8269   echo "$ac_t""yes" 1>&6
8270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8271   { test "$extra_verbose" = "yes" && cat << EOF
8272     Defining $ac_tr_func
8273 EOF
8274 cat >> confdefs.h <<EOF
8275 #define $ac_tr_func 1
8276 EOF
8277 }
8278  
8279 else
8280   echo "$ac_t""no" 1>&6
8281 fi
8282 done
8283
8284 fi
8285
8286 if test "$with_postgresql" != "no"; then
8287   echo "checking for PostgreSQL" 1>&6
8288 echo "configure:8289: checking for PostgreSQL" >&5
8289
8290   for header_dir in "" "pgsql/" "postgresql/"; do
8291     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8292 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8293 echo "configure:8294: checking for ${header_dir}libpq-fe.h" >&5
8294
8295 cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 #include <${header_dir}libpq-fe.h>
8299 EOF
8300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8301 { (eval echo configure:8302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8303 if test -z "$ac_err"; then
8304   rm -rf conftest*
8305   eval "ac_cv_header_$ac_safe=yes"
8306 else
8307   echo "$ac_err" >&5
8308   echo "configure: failed program was:" >&5
8309   cat conftest.$ac_ext >&5
8310   rm -rf conftest*
8311   eval "ac_cv_header_$ac_safe=no"
8312 fi
8313 rm -f conftest*
8314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8315   echo "$ac_t""yes" 1>&6
8316   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8317 else
8318   echo "$ac_t""no" 1>&6
8319 fi
8320
8321   done
8322
8323   test -n "$libpq_fe_h_file" && { 
8324 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8325 echo "configure:8326: checking for PQconnectdb in -lpq" >&5
8326 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8327
8328 xe_check_libs=" -lpq "
8329 cat > conftest.$ac_ext <<EOF
8330 #line 8331 "configure"
8331 #include "confdefs.h"
8332 /* Override any gcc2 internal prototype to avoid an error.  */
8333 /* We use char because int might match the return type of a gcc2
8334     builtin and then its argument prototype would still apply.  */
8335 char PQconnectdb();
8336
8337 int main() {
8338 PQconnectdb()
8339 ; return 0; }
8340 EOF
8341 if { (eval echo configure:8342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8342   rm -rf conftest*
8343   eval "ac_cv_lib_$ac_lib_var=yes"
8344 else
8345   echo "configure: failed program was:" >&5
8346   cat conftest.$ac_ext >&5
8347   rm -rf conftest*
8348   eval "ac_cv_lib_$ac_lib_var=no"
8349 fi
8350 rm -f conftest*
8351 xe_check_libs=""
8352
8353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8354   echo "$ac_t""yes" 1>&6
8355   have_libpq=yes
8356 else
8357   echo "$ac_t""no" 1>&6
8358 fi
8359
8360  }
8361
8362   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8363     with_postgresql=yes
8364     { test "$extra_verbose" = "yes" && cat << \EOF
8365     Defining HAVE_POSTGRESQL
8366 EOF
8367 cat >> confdefs.h <<\EOF
8368 #define HAVE_POSTGRESQL 1
8369 EOF
8370 }
8371
8372     
8373 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8374 echo "configure:8375: checking for PQconnectStart in -lpq" >&5
8375 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8376
8377 xe_check_libs=" -lpq "
8378 cat > conftest.$ac_ext <<EOF
8379 #line 8380 "configure"
8380 #include "confdefs.h"
8381 /* Override any gcc2 internal prototype to avoid an error.  */
8382 /* We use char because int might match the return type of a gcc2
8383     builtin and then its argument prototype would still apply.  */
8384 char PQconnectStart();
8385
8386 int main() {
8387 PQconnectStart()
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8391   rm -rf conftest*
8392   eval "ac_cv_lib_$ac_lib_var=yes"
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   eval "ac_cv_lib_$ac_lib_var=no"
8398 fi
8399 rm -f conftest*
8400 xe_check_libs=""
8401
8402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8403   echo "$ac_t""yes" 1>&6
8404   with_postgresqlv7=yes;
8405                  { test "$extra_verbose" = "yes" && cat << \EOF
8406     Defining HAVE_POSTGRESQLV7
8407 EOF
8408 cat >> confdefs.h <<\EOF
8409 #define HAVE_POSTGRESQLV7 1
8410 EOF
8411 }
8412
8413 else
8414   echo "$ac_t""no" 1>&6
8415 fi
8416
8417
8418     { test "$extra_verbose" = "yes" && cat << EOF
8419     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8420 EOF
8421 cat >> confdefs.h <<EOF
8422 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8423 EOF
8424 }
8425
8426     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8427     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8428    echo "    xemacs will be linked with \"postgresql.o\""
8429  fi
8430   elif test "$with_postgresql" = "yes"; then
8431     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8432   fi
8433 fi
8434
8435
8436 if test "$window_system" != "none"; then
8437   echo "checking for graphics libraries" 1>&6
8438 echo "configure:8439: checking for graphics libraries" >&5
8439
8440       libpath_xpm=
8441   incpath_xpm=
8442   libname_xpm="-lXpm"
8443   case "$opsys" in 
8444     cygwin*)
8445       cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
8446       cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"`
8447       case "$window_system" in
8448                 x11)  ;;
8449                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8450              incpath_xpm="-I${cygwin_top}/include/noX"
8451              libname_xpm="-lXpm-noX"
8452               ;;
8453                 gtk)  ;;
8454                 none) ;;
8455                 *)    ;;
8456       esac
8457       ;;
8458         *) ;;
8459   esac
8460     xpm_problem=""
8461   if test -z "$with_xpm"; then
8462     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8463     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8464     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8465 echo "configure:8466: checking for Xpm - no older than 3.4f" >&5
8466     xe_check_libs="$libname_xpm"
8467     cat > conftest.$ac_ext <<EOF
8468 #line 8469 "configure"
8469 #include "confdefs.h"
8470 #define XPM_NUMBERS
8471 #include <X11/xpm.h>
8472     int main(int c, char **v) {
8473     return c == 1 ? 0 :
8474       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8475       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8476 EOF
8477 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8478 then
8479   ./conftest dummy_arg; xpm_status=$?;
8480       if test "$xpm_status" = "0"; then
8481         with_xpm=yes;
8482       else
8483         with_xpm=no;
8484         if test "$xpm_status" = "1"; then
8485           xpm_problem="Xpm library version and header file version don't match!"
8486         elif test "$xpm_status" = "2"; then
8487           xpm_problem="Xpm library version is too old!"
8488         else
8489           xpm_problem="Internal xpm detection logic error!"
8490         fi
8491         echo "
8492 *** WARNING *** $xpm_problem
8493   I'm not touching that with a 10-foot pole!
8494   If you really want to use the installed version of Xpm, rerun
8495   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8496     fi
8497 else
8498   conftest_rc="$?"
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -fr conftest*
8502   with_xpm=no
8503 fi
8504 rm -fr conftest*
8505     xe_check_libs=
8506     echo "$ac_t""$with_xpm" 1>&6
8507   fi
8508   if test "$with_xpm" = "yes"; then
8509                 { test "$extra_verbose" = "yes" && cat << \EOF
8510     Defining HAVE_XPM
8511 EOF
8512 cat >> confdefs.h <<\EOF
8513 #define HAVE_XPM 1
8514 EOF
8515 }
8516
8517     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8518     libs_x=""$libname_xpm" $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libname_xpm"\" to \$libs_x"; fi
8519     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8520     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8521 echo "configure:8522: checking for \"FOR_MSW\" xpm" >&5
8522     xe_check_libs="$libname_xpm"
8523     cat > conftest.$ac_ext <<EOF
8524 #line 8525 "configure"
8525 #include "confdefs.h"
8526
8527 int main() {
8528 XpmCreatePixmapFromData()
8529 ; return 0; }
8530 EOF
8531 if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8532   rm -rf conftest*
8533   xpm_for_msw=no
8534 else
8535   echo "configure: failed program was:" >&5
8536   cat conftest.$ac_ext >&5
8537   rm -rf conftest*
8538   xpm_for_msw=yes
8539 fi
8540 rm -f conftest*
8541     xe_check_libs=
8542     echo "$ac_t""$xpm_for_msw" 1>&6
8543     if test "$xpm_for_msw" = "yes"; then
8544       { test "$extra_verbose" = "yes" && cat << \EOF
8545     Defining FOR_MSW
8546 EOF
8547 cat >> confdefs.h <<\EOF
8548 #define FOR_MSW 1
8549 EOF
8550 }
8551
8552     fi
8553   fi
8554
8555     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8556 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8557 echo "configure:8558: checking for compface.h" >&5
8558
8559 cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562 #include <compface.h>
8563 EOF
8564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8565 { (eval echo configure:8566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8567 if test -z "$ac_err"; then
8568   rm -rf conftest*
8569   eval "ac_cv_header_$ac_safe=yes"
8570 else
8571   echo "$ac_err" >&5
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   eval "ac_cv_header_$ac_safe=no"
8576 fi
8577 rm -f conftest*
8578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8579   echo "$ac_t""yes" 1>&6
8580   :
8581 else
8582   echo "$ac_t""no" 1>&6
8583 with_xface=no
8584 fi
8585  }
8586   test -z "$with_xface" && { 
8587 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8588 echo "configure:8589: checking for UnGenFace in -lcompface" >&5
8589 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8590
8591 xe_check_libs=" -lcompface "
8592 cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 /* Override any gcc2 internal prototype to avoid an error.  */
8596 /* We use char because int might match the return type of a gcc2
8597     builtin and then its argument prototype would still apply.  */
8598 char UnGenFace();
8599
8600 int main() {
8601 UnGenFace()
8602 ; return 0; }
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8605   rm -rf conftest*
8606   eval "ac_cv_lib_$ac_lib_var=yes"
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   eval "ac_cv_lib_$ac_lib_var=no"
8612 fi
8613 rm -f conftest*
8614 xe_check_libs=""
8615
8616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8617   echo "$ac_t""yes" 1>&6
8618   : 
8619 else
8620   echo "$ac_t""no" 1>&6
8621 with_xface=no
8622 fi
8623
8624  }
8625   test -z "$with_xface" && with_xface=yes
8626   if test "$with_xface" = "yes"; then
8627     { test "$extra_verbose" = "yes" && cat << \EOF
8628     Defining HAVE_XFACE
8629 EOF
8630 cat >> confdefs.h <<\EOF
8631 #define HAVE_XFACE 1
8632 EOF
8633 }
8634
8635     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8636   fi
8637
8638         if test "$with_gif" != "no"; then
8639     with_gif="yes"
8640     { test "$extra_verbose" = "yes" && cat << \EOF
8641     Defining HAVE_GIF
8642 EOF
8643 cat >> confdefs.h <<\EOF
8644 #define HAVE_GIF 1
8645 EOF
8646 }
8647
8648     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8649    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8650  fi
8651   fi
8652
8653       if test "$with_png $with_tiff" != "no no"; then
8654     
8655 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8656 echo "configure:8657: checking for inflate in -lc" >&5
8657 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8658
8659 xe_check_libs=" -lc "
8660 cat > conftest.$ac_ext <<EOF
8661 #line 8662 "configure"
8662 #include "confdefs.h"
8663 /* Override any gcc2 internal prototype to avoid an error.  */
8664 /* We use char because int might match the return type of a gcc2
8665     builtin and then its argument prototype would still apply.  */
8666 char inflate();
8667
8668 int main() {
8669 inflate()
8670 ; return 0; }
8671 EOF
8672 if { (eval echo configure:8673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8673   rm -rf conftest*
8674   eval "ac_cv_lib_$ac_lib_var=yes"
8675 else
8676   echo "configure: failed program was:" >&5
8677   cat conftest.$ac_ext >&5
8678   rm -rf conftest*
8679   eval "ac_cv_lib_$ac_lib_var=no"
8680 fi
8681 rm -f conftest*
8682 xe_check_libs=""
8683
8684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8685   echo "$ac_t""yes" 1>&6
8686   :
8687 else
8688   echo "$ac_t""no" 1>&6
8689
8690 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8691 echo "configure:8692: checking for inflate in -lz" >&5
8692 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8693
8694 xe_check_libs=" -lz "
8695 cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 /* Override any gcc2 internal prototype to avoid an error.  */
8699 /* We use char because int might match the return type of a gcc2
8700     builtin and then its argument prototype would still apply.  */
8701 char inflate();
8702
8703 int main() {
8704 inflate()
8705 ; return 0; }
8706 EOF
8707 if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8708   rm -rf conftest*
8709   eval "ac_cv_lib_$ac_lib_var=yes"
8710 else
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=no"
8715 fi
8716 rm -f conftest*
8717 xe_check_libs=""
8718
8719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8720   echo "$ac_t""yes" 1>&6
8721   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8722 else
8723   echo "$ac_t""no" 1>&6
8724
8725 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8726 echo "configure:8727: checking for inflate in -lgz" >&5
8727 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8728
8729 xe_check_libs=" -lgz "
8730 cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 /* Override any gcc2 internal prototype to avoid an error.  */
8734 /* We use char because int might match the return type of a gcc2
8735     builtin and then its argument prototype would still apply.  */
8736 char inflate();
8737
8738 int main() {
8739 inflate()
8740 ; return 0; }
8741 EOF
8742 if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=yes"
8745 else
8746   echo "configure: failed program was:" >&5
8747   cat conftest.$ac_ext >&5
8748   rm -rf conftest*
8749   eval "ac_cv_lib_$ac_lib_var=no"
8750 fi
8751 rm -f conftest*
8752 xe_check_libs=""
8753
8754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8755   echo "$ac_t""yes" 1>&6
8756   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8757 else
8758   echo "$ac_t""no" 1>&6
8759 fi
8760
8761
8762 fi
8763
8764
8765 fi
8766
8767
8768   fi
8769
8770     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8771 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8772 echo "configure:8773: checking for jpeglib.h" >&5
8773
8774 cat > conftest.$ac_ext <<EOF
8775 #line 8776 "configure"
8776 #include "confdefs.h"
8777 #include <jpeglib.h>
8778 EOF
8779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8780 { (eval echo configure:8781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8782 if test -z "$ac_err"; then
8783   rm -rf conftest*
8784   eval "ac_cv_header_$ac_safe=yes"
8785 else
8786   echo "$ac_err" >&5
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -rf conftest*
8790   eval "ac_cv_header_$ac_safe=no"
8791 fi
8792 rm -f conftest*
8793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8794   echo "$ac_t""yes" 1>&6
8795   :
8796 else
8797   echo "$ac_t""no" 1>&6
8798 with_jpeg=no
8799 fi
8800  }
8801   test -z "$with_jpeg" && { 
8802 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8803 echo "configure:8804: checking for jpeg_destroy_decompress in -ljpeg" >&5
8804 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8805
8806 xe_check_libs=" -ljpeg "
8807 cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 /* Override any gcc2 internal prototype to avoid an error.  */
8811 /* We use char because int might match the return type of a gcc2
8812     builtin and then its argument prototype would still apply.  */
8813 char jpeg_destroy_decompress();
8814
8815 int main() {
8816 jpeg_destroy_decompress()
8817 ; return 0; }
8818 EOF
8819 if { (eval echo configure:8820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8820   rm -rf conftest*
8821   eval "ac_cv_lib_$ac_lib_var=yes"
8822 else
8823   echo "configure: failed program was:" >&5
8824   cat conftest.$ac_ext >&5
8825   rm -rf conftest*
8826   eval "ac_cv_lib_$ac_lib_var=no"
8827 fi
8828 rm -f conftest*
8829 xe_check_libs=""
8830
8831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8832   echo "$ac_t""yes" 1>&6
8833   :
8834 else
8835   echo "$ac_t""no" 1>&6
8836 with_jpeg=no
8837 fi
8838
8839  }
8840   test -z "$with_jpeg" && with_jpeg=yes
8841   if test "$with_jpeg" = "yes"; then
8842     { test "$extra_verbose" = "yes" && cat << \EOF
8843     Defining HAVE_JPEG
8844 EOF
8845 cat >> confdefs.h <<\EOF
8846 #define HAVE_JPEG 1
8847 EOF
8848 }
8849
8850     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8851   fi
8852
8853     png_problem=""
8854   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8855 echo "configure:8856: checking for pow" >&5
8856
8857 cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860 /* System header to define __stub macros and hopefully few prototypes,
8861     which can conflict with char pow(); below.  */
8862 #include <assert.h>
8863 /* Override any gcc2 internal prototype to avoid an error.  */
8864 /* We use char because int might match the return type of a gcc2
8865     builtin and then its argument prototype would still apply.  */
8866 char pow();
8867
8868 int main() {
8869
8870 /* The GNU C library defines this for functions which it implements
8871     to always fail with ENOSYS.  Some functions are actually named
8872     something starting with __ and the normal name is an alias.  */
8873 #if defined (__stub_pow) || defined (__stub___pow)
8874 choke me
8875 #else
8876 pow();
8877 #endif
8878
8879 ; return 0; }
8880 EOF
8881 if { (eval echo configure:8882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8882   rm -rf conftest*
8883   eval "ac_cv_func_pow=yes"
8884 else
8885   echo "configure: failed program was:" >&5
8886   cat conftest.$ac_ext >&5
8887   rm -rf conftest*
8888   eval "ac_cv_func_pow=no"
8889 fi
8890 rm -f conftest*
8891
8892 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8893   echo "$ac_t""yes" 1>&6
8894   :
8895 else
8896   echo "$ac_t""no" 1>&6
8897 with_png=no
8898 fi
8899  }
8900   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8901 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8902 echo "configure:8903: checking for png.h" >&5
8903
8904 cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907 #include <png.h>
8908 EOF
8909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8910 { (eval echo configure:8911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8912 if test -z "$ac_err"; then
8913   rm -rf conftest*
8914   eval "ac_cv_header_$ac_safe=yes"
8915 else
8916   echo "$ac_err" >&5
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   eval "ac_cv_header_$ac_safe=no"
8921 fi
8922 rm -f conftest*
8923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8924   echo "$ac_t""yes" 1>&6
8925   :
8926 else
8927   echo "$ac_t""no" 1>&6
8928 with_png=no
8929 fi
8930  }
8931   test -z "$with_png" && { 
8932 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8933 echo "configure:8934: checking for png_read_image in -lpng" >&5
8934 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8935
8936 xe_check_libs=" -lpng "
8937 cat > conftest.$ac_ext <<EOF
8938 #line 8939 "configure"
8939 #include "confdefs.h"
8940 /* Override any gcc2 internal prototype to avoid an error.  */
8941 /* We use char because int might match the return type of a gcc2
8942     builtin and then its argument prototype would still apply.  */
8943 char png_read_image();
8944
8945 int main() {
8946 png_read_image()
8947 ; return 0; }
8948 EOF
8949 if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8950   rm -rf conftest*
8951   eval "ac_cv_lib_$ac_lib_var=yes"
8952 else
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_lib_$ac_lib_var=no"
8957 fi
8958 rm -f conftest*
8959 xe_check_libs=""
8960
8961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8962   echo "$ac_t""yes" 1>&6
8963   :
8964 else
8965   echo "$ac_t""no" 1>&6
8966 with_png=no
8967 fi
8968
8969  }
8970   if test -z "$with_png"; then
8971     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8972 echo "configure:8973: checking for workable png version information" >&5
8973     xe_check_libs="-lpng -lz"
8974     cat > conftest.$ac_ext <<EOF
8975 #line 8976 "configure"
8976 #include "confdefs.h"
8977 #include <png.h>
8978     int main(int c, char **v) {
8979     if (c == 1) return 0;
8980     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8981     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8984 then
8985   ./conftest dummy_arg; png_status=$?;
8986       if test "$png_status" = "0"; then
8987         with_png=yes;
8988       else
8989         with_png=no;
8990         if test "$png_status" = "1"; then
8991           png_problem="PNG library version and header file don't match!"
8992         elif test "$png_status" = "2"; then
8993           png_problem="PNG library version too old (pre 1.0.2)!"
8994         fi
8995         echo "
8996 *** WARNING *** $png_problem
8997   I'm not touching that with a 10-foot pole!
8998   If you really want to use the installed version of libPNG, rerun
8999   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
9000     fi
9001 else
9002   conftest_rc="$?"
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -fr conftest*
9006   with_png=no
9007 fi
9008 rm -fr conftest*
9009     xe_check_libs=
9010     echo "$ac_t""$with_png" 1>&6
9011   fi
9012   if test "$with_png" = "yes"; then
9013     { test "$extra_verbose" = "yes" && cat << \EOF
9014     Defining HAVE_PNG
9015 EOF
9016 cat >> confdefs.h <<\EOF
9017 #define HAVE_PNG 1
9018 EOF
9019 }
9020
9021     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
9022   fi
9023
9024     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
9025 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
9026 echo "configure:9027: checking for tiffio.h" >&5
9027
9028 cat > conftest.$ac_ext <<EOF
9029 #line 9030 "configure"
9030 #include "confdefs.h"
9031 #include <tiffio.h>
9032 EOF
9033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9034 { (eval echo configure:9035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9036 if test -z "$ac_err"; then
9037   rm -rf conftest*
9038   eval "ac_cv_header_$ac_safe=yes"
9039 else
9040   echo "$ac_err" >&5
9041   echo "configure: failed program was:" >&5
9042   cat conftest.$ac_ext >&5
9043   rm -rf conftest*
9044   eval "ac_cv_header_$ac_safe=no"
9045 fi
9046 rm -f conftest*
9047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9048   echo "$ac_t""yes" 1>&6
9049   :
9050 else
9051   echo "$ac_t""no" 1>&6
9052 with_tiff=no
9053 fi
9054  }
9055   test -z "$with_tiff" && { 
9056 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
9057 echo "configure:9058: checking for TIFFClientOpen in -ltiff" >&5
9058 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
9059
9060 xe_check_libs=" -ltiff "
9061 cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 /* Override any gcc2 internal prototype to avoid an error.  */
9065 /* We use char because int might match the return type of a gcc2
9066     builtin and then its argument prototype would still apply.  */
9067 char TIFFClientOpen();
9068
9069 int main() {
9070 TIFFClientOpen()
9071 ; return 0; }
9072 EOF
9073 if { (eval echo configure:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9074   rm -rf conftest*
9075   eval "ac_cv_lib_$ac_lib_var=yes"
9076 else
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -rf conftest*
9080   eval "ac_cv_lib_$ac_lib_var=no"
9081 fi
9082 rm -f conftest*
9083 xe_check_libs=""
9084
9085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9086   echo "$ac_t""yes" 1>&6
9087   :
9088 else
9089   echo "$ac_t""no" 1>&6
9090 with_tiff=no
9091 fi
9092
9093  }
9094   test -z "$with_tiff" && with_tiff=yes
9095   if test "$with_tiff" = "yes"; then
9096     { test "$extra_verbose" = "yes" && cat << \EOF
9097     Defining HAVE_TIFF
9098 EOF
9099 cat >> confdefs.h <<\EOF
9100 #define HAVE_TIFF 1
9101 EOF
9102 }
9103
9104     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
9105   fi
9106 fi
9107
9108
9109 if test "$with_gtk" = "yes"; then
9110     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
9111 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
9112 echo "configure:9113: checking for compface.h" >&5
9113
9114 cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117 #include <compface.h>
9118 EOF
9119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9120 { (eval echo configure:9121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9122 if test -z "$ac_err"; then
9123   rm -rf conftest*
9124   eval "ac_cv_header_$ac_safe=yes"
9125 else
9126   echo "$ac_err" >&5
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   eval "ac_cv_header_$ac_safe=no"
9131 fi
9132 rm -f conftest*
9133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9134   echo "$ac_t""yes" 1>&6
9135   :
9136 else
9137   echo "$ac_t""no" 1>&6
9138 with_xface=no
9139 fi
9140  }
9141   test -z "$with_xface" && { 
9142 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
9143 echo "configure:9144: checking for UnGenFace in -lcompface" >&5
9144 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
9145
9146 xe_check_libs=" -lcompface "
9147 cat > conftest.$ac_ext <<EOF
9148 #line 9149 "configure"
9149 #include "confdefs.h"
9150 /* Override any gcc2 internal prototype to avoid an error.  */
9151 /* We use char because int might match the return type of a gcc2
9152     builtin and then its argument prototype would still apply.  */
9153 char UnGenFace();
9154
9155 int main() {
9156 UnGenFace()
9157 ; return 0; }
9158 EOF
9159 if { (eval echo configure:9160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9160   rm -rf conftest*
9161   eval "ac_cv_lib_$ac_lib_var=yes"
9162 else
9163   echo "configure: failed program was:" >&5
9164   cat conftest.$ac_ext >&5
9165   rm -rf conftest*
9166   eval "ac_cv_lib_$ac_lib_var=no"
9167 fi
9168 rm -f conftest*
9169 xe_check_libs=""
9170
9171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9172   echo "$ac_t""yes" 1>&6
9173   : 
9174 else
9175   echo "$ac_t""no" 1>&6
9176 with_xface=no
9177 fi
9178
9179  }
9180   test -z "$with_xface" && with_xface=yes
9181   if test "$with_xface" = "yes"; then
9182     { test "$extra_verbose" = "yes" && cat << \EOF
9183     Defining HAVE_XFACE
9184 EOF
9185 cat >> confdefs.h <<\EOF
9186 #define HAVE_XFACE 1
9187 EOF
9188 }
9189
9190     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
9191   fi
9192 fi
9193
9194
9195
9196 if test "$with_x11" = "yes"; then
9197   echo "checking for X11 graphics libraries" 1>&6
9198 echo "configure:9199: checking for X11 graphics libraries" >&5
9199 fi
9200
9201 if test "$with_x11" = "yes"; then
9202   echo "checking for the Athena widgets" 1>&6
9203 echo "configure:9204: checking for the Athena widgets" >&5
9204
9205     case "$with_athena" in
9206         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9207     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9208     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9209     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9210     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9211     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9212   esac
9213
9214   athena_3d_function=Xaw3dComputeBottomShadowRGB
9215
9216     if test "$athena_3d" = "no"; then
9217     
9218 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9219 echo "configure:9220: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9220 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9221
9222 xe_check_libs=" -l$athena_variant "
9223 cat > conftest.$ac_ext <<EOF
9224 #line 9225 "configure"
9225 #include "confdefs.h"
9226 /* Override any gcc2 internal prototype to avoid an error.  */
9227 /* We use char because int might match the return type of a gcc2
9228     builtin and then its argument prototype would still apply.  */
9229 char XawScrollbarSetThumb();
9230
9231 int main() {
9232 XawScrollbarSetThumb()
9233 ; return 0; }
9234 EOF
9235 if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9236   rm -rf conftest*
9237   eval "ac_cv_lib_$ac_lib_var=yes"
9238 else
9239   echo "configure: failed program was:" >&5
9240   cat conftest.$ac_ext >&5
9241   rm -rf conftest*
9242   eval "ac_cv_lib_$ac_lib_var=no"
9243 fi
9244 rm -f conftest*
9245 xe_check_libs=""
9246
9247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9248   echo "$ac_t""yes" 1>&6
9249           
9250 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9251 echo "configure:9252: checking for $athena_3d_function in -l$athena_variant" >&5
9252 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9253
9254 xe_check_libs=" -l$athena_variant "
9255 cat > conftest.$ac_ext <<EOF
9256 #line 9257 "configure"
9257 #include "confdefs.h"
9258 /* Override any gcc2 internal prototype to avoid an error.  */
9259 /* We use char because int might match the return type of a gcc2
9260     builtin and then its argument prototype would still apply.  */
9261 char $athena_3d_function();
9262
9263 int main() {
9264 $athena_3d_function()
9265 ; return 0; }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9268   rm -rf conftest*
9269   eval "ac_cv_lib_$ac_lib_var=yes"
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_lib_$ac_lib_var=no"
9275 fi
9276 rm -f conftest*
9277 xe_check_libs=""
9278
9279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9280   echo "$ac_t""yes" 1>&6
9281   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9282 else
9283   echo "$ac_t""no" 1>&6
9284 athena_lib=$athena_variant
9285 fi
9286
9287
9288       
9289 else
9290   echo "$ac_t""no" 1>&6
9291 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9292 fi
9293
9294
9295   else
9296         
9297 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9298 echo "configure:9299: checking for $athena_3d_function in -l$athena_variant" >&5
9299 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9300
9301 xe_check_libs=" -l$athena_variant "
9302 cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305 /* Override any gcc2 internal prototype to avoid an error.  */
9306 /* We use char because int might match the return type of a gcc2
9307     builtin and then its argument prototype would still apply.  */
9308 char $athena_3d_function();
9309
9310 int main() {
9311 $athena_3d_function()
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9315   rm -rf conftest*
9316   eval "ac_cv_lib_$ac_lib_var=yes"
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   eval "ac_cv_lib_$ac_lib_var=no"
9322 fi
9323 rm -f conftest*
9324 xe_check_libs=""
9325
9326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9327   echo "$ac_t""yes" 1>&6
9328   athena_lib=$athena_variant
9329 else
9330   echo "$ac_t""no" 1>&6
9331 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9332 echo "configure:9333: checking for $athena_3d_function in -lXaw" >&5
9333 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9334
9335 xe_check_libs=" -lXaw "
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 /* Override any gcc2 internal prototype to avoid an error.  */
9340 /* We use char because int might match the return type of a gcc2
9341     builtin and then its argument prototype would still apply.  */
9342 char $athena_3d_function();
9343
9344 int main() {
9345 $athena_3d_function()
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9349   rm -rf conftest*
9350   eval "ac_cv_lib_$ac_lib_var=yes"
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -rf conftest*
9355   eval "ac_cv_lib_$ac_lib_var=no"
9356 fi
9357 rm -f conftest*
9358 xe_check_libs=""
9359
9360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9361   echo "$ac_t""yes" 1>&6
9362   athena_lib=Xaw;
9363           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9364         
9365 else
9366   echo "$ac_t""no" 1>&6
9367 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9368 fi
9369
9370
9371 fi
9372
9373
9374   fi
9375
9376     if test "$athena_3d" = "no"; then
9377     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9378 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9379 echo "configure:9380: checking for X11/Xaw/ThreeD.h" >&5
9380
9381 cat > conftest.$ac_ext <<EOF
9382 #line 9383 "configure"
9383 #include "confdefs.h"
9384 #include <X11/Xaw/ThreeD.h>
9385 EOF
9386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9387 { (eval echo configure:9388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9389 if test -z "$ac_err"; then
9390   rm -rf conftest*
9391   eval "ac_cv_header_$ac_safe=yes"
9392 else
9393   echo "$ac_err" >&5
9394   echo "configure: failed program was:" >&5
9395   cat conftest.$ac_ext >&5
9396   rm -rf conftest*
9397   eval "ac_cv_header_$ac_safe=no"
9398 fi
9399 rm -f conftest*
9400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9401   echo "$ac_t""yes" 1>&6
9402   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9403 else
9404   echo "$ac_t""no" 1>&6
9405 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9406 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9407 echo "configure:9408: checking for X11/Xaw/XawInit.h" >&5
9408
9409 cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 #include <X11/Xaw/XawInit.h>
9413 EOF
9414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9415 { (eval echo configure:9416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9417 if test -z "$ac_err"; then
9418   rm -rf conftest*
9419   eval "ac_cv_header_$ac_safe=yes"
9420 else
9421   echo "$ac_err" >&5
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_header_$ac_safe=no"
9426 fi
9427 rm -f conftest*
9428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9429   echo "$ac_t""yes" 1>&6
9430   athena_h_path=X11/Xaw
9431 else
9432   echo "$ac_t""no" 1>&6
9433 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9434 fi
9435
9436 fi
9437
9438   else
9439             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9440 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9441 echo "configure:9442: checking for X11/$athena_variant/XawInit.h" >&5
9442
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #include <X11/$athena_variant/XawInit.h>
9447 EOF
9448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9449 { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9451 if test -z "$ac_err"; then
9452   rm -rf conftest*
9453   eval "ac_cv_header_$ac_safe=yes"
9454 else
9455   echo "$ac_err" >&5
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -rf conftest*
9459   eval "ac_cv_header_$ac_safe=no"
9460 fi
9461 rm -f conftest*
9462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9463   echo "$ac_t""yes" 1>&6
9464   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9465 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9466 echo "configure:9467: checking for X11/$athena_variant/ThreeD.h" >&5
9467
9468 cat > conftest.$ac_ext <<EOF
9469 #line 9470 "configure"
9470 #include "confdefs.h"
9471 #include <X11/$athena_variant/ThreeD.h>
9472 EOF
9473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9474 { (eval echo configure:9475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9476 if test -z "$ac_err"; then
9477   rm -rf conftest*
9478   eval "ac_cv_header_$ac_safe=yes"
9479 else
9480   echo "$ac_err" >&5
9481   echo "configure: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   rm -rf conftest*
9484   eval "ac_cv_header_$ac_safe=no"
9485 fi
9486 rm -f conftest*
9487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9488   echo "$ac_t""yes" 1>&6
9489   athena_h_path=X11/$athena_variant
9490 else
9491   echo "$ac_t""no" 1>&6
9492 fi
9493
9494 else
9495   echo "$ac_t""no" 1>&6
9496 fi
9497
9498
9499         if test -z "$athena_h_path"; then
9500       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9501 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9502 echo "configure:9503: checking for $athena_variant/XawInit.h" >&5
9503
9504 cat > conftest.$ac_ext <<EOF
9505 #line 9506 "configure"
9506 #include "confdefs.h"
9507 #include <$athena_variant/XawInit.h>
9508 EOF
9509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9510 { (eval echo configure:9511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9512 if test -z "$ac_err"; then
9513   rm -rf conftest*
9514   eval "ac_cv_header_$ac_safe=yes"
9515 else
9516   echo "$ac_err" >&5
9517   echo "configure: failed program was:" >&5
9518   cat conftest.$ac_ext >&5
9519   rm -rf conftest*
9520   eval "ac_cv_header_$ac_safe=no"
9521 fi
9522 rm -f conftest*
9523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9524   echo "$ac_t""yes" 1>&6
9525   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9526 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9527 echo "configure:9528: checking for $athena_variant/ThreeD.h" >&5
9528
9529 cat > conftest.$ac_ext <<EOF
9530 #line 9531 "configure"
9531 #include "confdefs.h"
9532 #include <$athena_variant/ThreeD.h>
9533 EOF
9534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9535 { (eval echo configure:9536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9537 if test -z "$ac_err"; then
9538   rm -rf conftest*
9539   eval "ac_cv_header_$ac_safe=yes"
9540 else
9541   echo "$ac_err" >&5
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -rf conftest*
9545   eval "ac_cv_header_$ac_safe=no"
9546 fi
9547 rm -f conftest*
9548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9549   echo "$ac_t""yes" 1>&6
9550   athena_h_path=$athena_variant
9551 else
9552   echo "$ac_t""no" 1>&6
9553 fi
9554
9555 else
9556   echo "$ac_t""no" 1>&6
9557 fi
9558
9559     fi
9560
9561         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9562       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9563 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9564 echo "configure:9565: checking for X11/Xaw3d/XawInit.h" >&5
9565
9566 cat > conftest.$ac_ext <<EOF
9567 #line 9568 "configure"
9568 #include "confdefs.h"
9569 #include <X11/Xaw3d/XawInit.h>
9570 EOF
9571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9572 { (eval echo configure:9573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9574 if test -z "$ac_err"; then
9575   rm -rf conftest*
9576   eval "ac_cv_header_$ac_safe=yes"
9577 else
9578   echo "$ac_err" >&5
9579   echo "configure: failed program was:" >&5
9580   cat conftest.$ac_ext >&5
9581   rm -rf conftest*
9582   eval "ac_cv_header_$ac_safe=no"
9583 fi
9584 rm -f conftest*
9585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9586   echo "$ac_t""yes" 1>&6
9587   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9588 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9589 echo "configure:9590: checking for X11/Xaw3d/ThreeD.h" >&5
9590
9591 cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 #include <X11/Xaw3d/ThreeD.h>
9595 EOF
9596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9597 { (eval echo configure:9598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9599 if test -z "$ac_err"; then
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=yes"
9602 else
9603   echo "$ac_err" >&5
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   eval "ac_cv_header_$ac_safe=no"
9608 fi
9609 rm -f conftest*
9610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9611   echo "$ac_t""yes" 1>&6
9612   
9613             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9614             athena_h_path=X11/Xaw3d
9615           
9616 else
9617   echo "$ac_t""no" 1>&6
9618 fi
9619
9620 else
9621   echo "$ac_t""no" 1>&6
9622 fi
9623
9624     fi
9625
9626         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9627       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9628 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9629 echo "configure:9630: checking for Xaw3d/XawInit.h" >&5
9630
9631 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 #include <Xaw3d/XawInit.h>
9635 EOF
9636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9637 { (eval echo configure:9638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9639 if test -z "$ac_err"; then
9640   rm -rf conftest*
9641   eval "ac_cv_header_$ac_safe=yes"
9642 else
9643   echo "$ac_err" >&5
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -rf conftest*
9647   eval "ac_cv_header_$ac_safe=no"
9648 fi
9649 rm -f conftest*
9650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9651   echo "$ac_t""yes" 1>&6
9652   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9653 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9654 echo "configure:9655: checking for Xaw3d/ThreeD.h" >&5
9655
9656 cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659 #include <Xaw3d/ThreeD.h>
9660 EOF
9661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9662 { (eval echo configure:9663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9664 if test -z "$ac_err"; then
9665   rm -rf conftest*
9666   eval "ac_cv_header_$ac_safe=yes"
9667 else
9668   echo "$ac_err" >&5
9669   echo "configure: failed program was:" >&5
9670   cat conftest.$ac_ext >&5
9671   rm -rf conftest*
9672   eval "ac_cv_header_$ac_safe=no"
9673 fi
9674 rm -f conftest*
9675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9676   echo "$ac_t""yes" 1>&6
9677   
9678             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9679             athena_h_path=Xaw3d
9680           
9681 else
9682   echo "$ac_t""no" 1>&6
9683 fi
9684
9685 else
9686   echo "$ac_t""no" 1>&6
9687 fi
9688
9689     fi
9690
9691             if test -z "$athena_h_path"; then
9692       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9693 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9694 echo "configure:9695: checking for X11/Xaw/ThreeD.h" >&5
9695
9696 cat > conftest.$ac_ext <<EOF
9697 #line 9698 "configure"
9698 #include "confdefs.h"
9699 #include <X11/Xaw/ThreeD.h>
9700 EOF
9701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9702 { (eval echo configure:9703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9704 if test -z "$ac_err"; then
9705   rm -rf conftest*
9706   eval "ac_cv_header_$ac_safe=yes"
9707 else
9708   echo "$ac_err" >&5
9709   echo "configure: failed program was:" >&5
9710   cat conftest.$ac_ext >&5
9711   rm -rf conftest*
9712   eval "ac_cv_header_$ac_safe=no"
9713 fi
9714 rm -f conftest*
9715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9716   echo "$ac_t""yes" 1>&6
9717   
9718           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9719           athena_h_path=X11/Xaw
9720         
9721 else
9722   echo "$ac_t""no" 1>&6
9723 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9724 fi
9725
9726     fi
9727   fi
9728
9729     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9730     have_xaw=yes
9731   else
9732     have_xaw=no
9733   fi
9734
9735 else
9736   have_xaw=no
9737 fi 
9738 if test "$with_x11" = "yes"; then
9739     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9740 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9741 echo "configure:9742: checking for Xm/Xm.h" >&5
9742
9743 cat > conftest.$ac_ext <<EOF
9744 #line 9745 "configure"
9745 #include "confdefs.h"
9746 #include <Xm/Xm.h>
9747 EOF
9748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9749 { (eval echo configure:9750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9751 if test -z "$ac_err"; then
9752   rm -rf conftest*
9753   eval "ac_cv_header_$ac_safe=yes"
9754 else
9755   echo "$ac_err" >&5
9756   echo "configure: failed program was:" >&5
9757   cat conftest.$ac_ext >&5
9758   rm -rf conftest*
9759   eval "ac_cv_header_$ac_safe=no"
9760 fi
9761 rm -f conftest*
9762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9763   echo "$ac_t""yes" 1>&6
9764   
9765 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9766 echo "configure:9767: checking for XmStringFree in -lXm" >&5
9767 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9768
9769 xe_check_libs=" -lXm "
9770 cat > conftest.$ac_ext <<EOF
9771 #line 9772 "configure"
9772 #include "confdefs.h"
9773 /* Override any gcc2 internal prototype to avoid an error.  */
9774 /* We use char because int might match the return type of a gcc2
9775     builtin and then its argument prototype would still apply.  */
9776 char XmStringFree();
9777
9778 int main() {
9779 XmStringFree()
9780 ; return 0; }
9781 EOF
9782 if { (eval echo configure:9783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9783   rm -rf conftest*
9784   eval "ac_cv_lib_$ac_lib_var=yes"
9785 else
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -rf conftest*
9789   eval "ac_cv_lib_$ac_lib_var=no"
9790 fi
9791 rm -f conftest*
9792 xe_check_libs=""
9793
9794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9795   echo "$ac_t""yes" 1>&6
9796   have_motif=yes
9797 else
9798   echo "$ac_t""no" 1>&6
9799 have_motif=no
9800 fi
9801
9802
9803 else
9804   echo "$ac_t""no" 1>&6
9805 have_motif=no
9806 fi
9807
9808
9809   if test "$have_motif" = "yes"; then
9810         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9811 echo "configure:9812: checking for Lesstif" >&5
9812     cat > conftest.$ac_ext <<EOF
9813 #line 9814 "configure"
9814 #include "confdefs.h"
9815 #include <Xm/Xm.h>
9816 #ifdef LESSTIF_VERSION
9817 yes
9818 #endif
9819
9820 EOF
9821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9822   egrep "yes" >/dev/null 2>&1; then
9823   rm -rf conftest*
9824   have_lesstif=yes
9825 else
9826   rm -rf conftest*
9827   have_lesstif=no
9828 fi
9829 rm -f conftest*
9830
9831   echo "$ac_t""$have_lesstif" 1>&6
9832   fi
9833
9834 fi 
9835
9836 case "$opsys" in
9837   *linux* | cygwin* )  lucid_prefers_motif="no"  ;;
9838   * )        lucid_prefers_motif="yes" ;;
9839 esac
9840
9841 case "$with_menubars" in "" | "yes" | "athena" )
9842   with_menubars="lucid" ;;
9843 esac
9844 case "$with_dialogs" in "" | "yes" | "lucid" )
9845   if test "$lucid_prefers_motif" = "yes"; then
9846     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9847     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9848     else with_dialogs=no
9849     fi
9850   else
9851     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9852     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9853     else with_dialogs=no
9854     fi
9855   fi ;;
9856 esac
9857 case "$with_scrollbars" in "" | "yes" )
9858   with_scrollbars="lucid" ;;
9859 esac
9860 case "$with_widgets" in
9861   "yes" | "lucid")
9862     if test "$lucid_prefers_motif" = "yes"; then
9863       if   test "$have_motif" = "yes"; then with_widgets="motif"
9864       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9865       else with_widgets=no
9866       fi
9867     else
9868       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9869       elif test "$have_motif" = "yes"; then with_widgets="motif"
9870       else with_widgets=no
9871       fi
9872     fi ;;
9873   "" )
9874     with_widgets=no ;;
9875 esac
9876
9877 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9878
9879 case "$all_widgets" in
9880   *athena* )
9881     if test "$have_xaw" != "yes"; then
9882       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9883     fi
9884
9885         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9886
9887         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9888
9889                     { test "$extra_verbose" = "yes" && cat << EOF
9890     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9891 EOF
9892 cat >> confdefs.h <<EOF
9893 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9894 EOF
9895 }
9896
9897     { test "$extra_verbose" = "yes" && cat << EOF
9898     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9899 EOF
9900 cat >> confdefs.h <<EOF
9901 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9902 EOF
9903 }
9904
9905     { test "$extra_verbose" = "yes" && cat << EOF
9906     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9907 EOF
9908 cat >> confdefs.h <<EOF
9909 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9910 EOF
9911 }
9912
9913     { test "$extra_verbose" = "yes" && cat << EOF
9914     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9915 EOF
9916 cat >> confdefs.h <<EOF
9917 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9918 EOF
9919 }
9920
9921     { test "$extra_verbose" = "yes" && cat << EOF
9922     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9923 EOF
9924 cat >> confdefs.h <<EOF
9925 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9926 EOF
9927 }
9928
9929     { test "$extra_verbose" = "yes" && cat << EOF
9930     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9931 EOF
9932 cat >> confdefs.h <<EOF
9933 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9934 EOF
9935 }
9936
9937     { test "$extra_verbose" = "yes" && cat << EOF
9938     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9939 EOF
9940 cat >> confdefs.h <<EOF
9941 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9942 EOF
9943 }
9944
9945     { test "$extra_verbose" = "yes" && cat << EOF
9946     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9947 EOF
9948 cat >> confdefs.h <<EOF
9949 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9950 EOF
9951 }
9952
9953     { test "$extra_verbose" = "yes" && cat << EOF
9954     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9955 EOF
9956 cat >> confdefs.h <<EOF
9957 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9958 EOF
9959 }
9960
9961     { test "$extra_verbose" = "yes" && cat << EOF
9962     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9963 EOF
9964 cat >> confdefs.h <<EOF
9965 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9966 EOF
9967 }
9968
9969
9970     { test "$extra_verbose" = "yes" && cat << \EOF
9971     Defining LWLIB_USES_ATHENA
9972 EOF
9973 cat >> confdefs.h <<\EOF
9974 #define LWLIB_USES_ATHENA 1
9975 EOF
9976 }
9977
9978     { test "$extra_verbose" = "yes" && cat << \EOF
9979     Defining NEED_ATHENA
9980 EOF
9981 cat >> confdefs.h <<\EOF
9982 #define NEED_ATHENA 1
9983 EOF
9984 }
9985
9986     need_athena="yes"
9987
9988     if test "$athena_3d" = "yes"; then
9989       { test "$extra_verbose" = "yes" && cat << \EOF
9990     Defining HAVE_ATHENA_3D
9991 EOF
9992 cat >> confdefs.h <<\EOF
9993 #define HAVE_ATHENA_3D 1
9994 EOF
9995 }
9996
9997     fi
9998   ;;
9999 esac
10000
10001 case "$all_widgets" in *motif* )
10002   { test "$extra_verbose" = "yes" && cat << \EOF
10003     Defining LWLIB_USES_MOTIF
10004 EOF
10005 cat >> confdefs.h <<\EOF
10006 #define LWLIB_USES_MOTIF 1
10007 EOF
10008 }
10009
10010   { test "$extra_verbose" = "yes" && cat << \EOF
10011     Defining NEED_MOTIF
10012 EOF
10013 cat >> confdefs.h <<\EOF
10014 #define NEED_MOTIF 1
10015 EOF
10016 }
10017
10018   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
10019   need_motif=yes ;;
10020 esac
10021
10022 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
10023 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
10024 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
10025 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
10026         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
10027 case "$with_widgets" in athena* )
10028         lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi;;
10029 esac
10030 case "$all_widgets" in *lucid* )
10031   { test "$extra_verbose" = "yes" && cat << \EOF
10032     Defining NEED_LUCID
10033 EOF
10034 cat >> confdefs.h <<\EOF
10035 #define NEED_LUCID 1
10036 EOF
10037 }
10038
10039   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
10040 esac
10041
10042
10043
10044 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10045     Defining LWLIB_SCROLLBARS_ATHENA
10046 EOF
10047 cat >> confdefs.h <<\EOF
10048 #define LWLIB_SCROLLBARS_ATHENA 1
10049 EOF
10050 }
10051
10052 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10053     Defining LWLIB_DIALOGS_ATHENA
10054 EOF
10055 cat >> confdefs.h <<\EOF
10056 #define LWLIB_DIALOGS_ATHENA 1
10057 EOF
10058 }
10059
10060
10061 if test "$athena_3d" = "yes"; then
10062   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10063     Defining LWLIB_SCROLLBARS_ATHENA3D
10064 EOF
10065 cat >> confdefs.h <<\EOF
10066 #define LWLIB_SCROLLBARS_ATHENA3D 1
10067 EOF
10068 }
10069
10070   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10071     Defining LWLIB_DIALOGS_ATHENA3D
10072 EOF
10073 cat >> confdefs.h <<\EOF
10074 #define LWLIB_DIALOGS_ATHENA3D 1
10075 EOF
10076 }
10077
10078 fi
10079
10080 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
10081     Defining LWLIB_WIDGETS_ATHENA
10082 EOF
10083 cat >> confdefs.h <<\EOF
10084 #define LWLIB_WIDGETS_ATHENA 1
10085 EOF
10086 }
10087 ;; esac
10088 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
10089         { test "$extra_verbose" = "yes" && cat << \EOF
10090     Defining LWLIB_TABS_LUCID
10091 EOF
10092 cat >> confdefs.h <<\EOF
10093 #define LWLIB_TABS_LUCID 1
10094 EOF
10095 }
10096
10097
10098 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10099     Defining HAVE_MENUBARS
10100 EOF
10101 cat >> confdefs.h <<\EOF
10102 #define HAVE_MENUBARS 1
10103 EOF
10104 }
10105
10106 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10107     Defining HAVE_SCROLLBARS
10108 EOF
10109 cat >> confdefs.h <<\EOF
10110 #define HAVE_SCROLLBARS 1
10111 EOF
10112 }
10113
10114 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10115     Defining HAVE_DIALOGS
10116 EOF
10117 cat >> confdefs.h <<\EOF
10118 #define HAVE_DIALOGS 1
10119 EOF
10120 }
10121
10122 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10123     Defining HAVE_TOOLBARS
10124 EOF
10125 cat >> confdefs.h <<\EOF
10126 #define HAVE_TOOLBARS 1
10127 EOF
10128 }
10129
10130 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10131     Defining HAVE_WIDGETS
10132 EOF
10133 cat >> confdefs.h <<\EOF
10134 #define HAVE_WIDGETS 1
10135 EOF
10136 }
10137
10138
10139 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
10140     Defining LWLIB_MENUBARS_LUCID
10141 EOF
10142 cat >> confdefs.h <<\EOF
10143 #define LWLIB_MENUBARS_LUCID 1
10144 EOF
10145 }
10146
10147 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
10148     Defining LWLIB_SCROLLBARS_LUCID
10149 EOF
10150 cat >> confdefs.h <<\EOF
10151 #define LWLIB_SCROLLBARS_LUCID 1
10152 EOF
10153 }
10154
10155
10156 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10157     Defining LWLIB_MENUBARS_MOTIF
10158 EOF
10159 cat >> confdefs.h <<\EOF
10160 #define LWLIB_MENUBARS_MOTIF 1
10161 EOF
10162 }
10163
10164 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10165     Defining LWLIB_SCROLLBARS_MOTIF
10166 EOF
10167 cat >> confdefs.h <<\EOF
10168 #define LWLIB_SCROLLBARS_MOTIF 1
10169 EOF
10170 }
10171
10172 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10173     Defining LWLIB_DIALOGS_MOTIF
10174 EOF
10175 cat >> confdefs.h <<\EOF
10176 #define LWLIB_DIALOGS_MOTIF 1
10177 EOF
10178 }
10179
10180 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10181     Defining LWLIB_WIDGETS_MOTIF
10182 EOF
10183 cat >> confdefs.h <<\EOF
10184 #define LWLIB_WIDGETS_MOTIF 1
10185 EOF
10186 }
10187
10188
10189 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
10190    echo "    xemacs will be linked with \"menubar.o\""
10191  fi
10192 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
10193    echo "    xemacs will be linked with \"scrollbar.o\""
10194  fi
10195 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
10196    echo "    xemacs will be linked with \"dialog.o\""
10197  fi
10198 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
10199    echo "    xemacs will be linked with \"toolbar.o\""
10200  fi
10201
10202 if test "$with_gtk" = "yes"; then
10203   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10204    echo "    xemacs will be linked with \"menubar-gtk.o\""
10205  fi
10206   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10207    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10208  fi
10209   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10210    echo "    xemacs will be linked with \"dialog-gtk.o\""
10211  fi
10212   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10213    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10214  fi
10215   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10216    echo "    xemacs will be linked with \"gui-gtk.o\""
10217  fi
10218 fi
10219
10220 if test "$with_x11" = "yes"; then
10221   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10222    echo "    xemacs will be linked with \"menubar-x.o\""
10223  fi
10224   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10225    echo "    xemacs will be linked with \"scrollbar-x.o\""
10226  fi
10227   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10228    echo "    xemacs will be linked with \"dialog-x.o\""
10229  fi
10230   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10231    echo "    xemacs will be linked with \"toolbar-x.o\""
10232  fi
10233   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10234    echo "    xemacs will be linked with \"gui-x.o\""
10235  fi
10236 fi
10237
10238
10239 test -z "$with_mule" && with_mule=no
10240 test -z "$with_file_coding" && with_file_coding=no
10241
10242
10243 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10244   { test "$extra_verbose" = "yes" && cat << \EOF
10245     Defining FILE_CODING
10246 EOF
10247 cat >> confdefs.h <<\EOF
10248 #define FILE_CODING 1
10249 EOF
10250 }
10251
10252   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10253    echo "    xemacs will be linked with \"file-coding.o\""
10254  fi
10255 fi
10256
10257 concord_includes_found=no
10258 if test "$with_concord" != "no"; then
10259    ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'`
10260 echo $ac_n "checking for concord.h""... $ac_c" 1>&6
10261 echo "configure:10262: checking for concord.h" >&5
10262
10263 cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266 #include <concord.h>
10267 EOF
10268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10269 { (eval echo configure:10270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10271 if test -z "$ac_err"; then
10272   rm -rf conftest*
10273   eval "ac_cv_header_$ac_safe=yes"
10274 else
10275   echo "$ac_err" >&5
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   eval "ac_cv_header_$ac_safe=no"
10280 fi
10281 rm -f conftest*
10282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284   :
10285 else
10286   echo "$ac_t""no" 1>&6
10287 with_concord=no
10288 fi
10289
10290 fi
10291 if test "$concord_includes_found" = "no" -a "$with_concord" != "no" -a \
10292    -d "/usr/local/concord/include"; then
10293   save_c_switch_site="$c_switch_site"
10294   c_switch_site="$c_switch_site -I/usr/local/concord/include"
10295   ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'`
10296 echo $ac_n "checking for concord.h""... $ac_c" 1>&6
10297 echo "configure:10298: checking for concord.h" >&5
10298
10299 cat > conftest.$ac_ext <<EOF
10300 #line 10301 "configure"
10301 #include "confdefs.h"
10302 #include <concord.h>
10303 EOF
10304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10305 { (eval echo configure:10306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10307 if test -z "$ac_err"; then
10308   rm -rf conftest*
10309   eval "ac_cv_header_$ac_safe=yes"
10310 else
10311   echo "$ac_err" >&5
10312   echo "configure: failed program was:" >&5
10313   cat conftest.$ac_ext >&5
10314   rm -rf conftest*
10315   eval "ac_cv_header_$ac_safe=no"
10316 fi
10317 rm -f conftest*
10318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10319   echo "$ac_t""yes" 1>&6
10320   concord_includes_found=yes
10321 else
10322   echo "$ac_t""no" 1>&6
10323 fi
10324
10325   if test "$concord_includes_found" != "yes"; then
10326     c_switch_site="$save_c_switch_site"
10327     with_concord="no"
10328   fi
10329 fi
10330
10331 test -z "$with_concord" && with_concord=yes
10332 if test "$with_concord" = "yes"; then
10333   { test "$extra_verbose" = "yes" && cat << \EOF
10334     Defining HAVE_CONCORD
10335 EOF
10336 cat >> confdefs.h <<\EOF
10337 #define HAVE_CONCORD 1
10338 EOF
10339 }
10340
10341   libs_x="-lconcord $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lconcord\" to \$libs_x"; fi
10342   extra_objs="$extra_objs concord.o" &&  if test "$extra_verbose" = "yes"; then
10343    echo "    xemacs will be linked with \"concord.o\""
10344  fi
10345 fi
10346
10347 test -z "$with_chise" && with_chise=yes
10348 if test "$with_chise" = "yes"; then
10349     with_mule=yes
10350     with_utf_2000=yes
10351     with_text_coding=yes
10352 fi
10353
10354 if test "$with_mule" = "yes" ; then
10355   echo "checking for Mule-related features" 1>&6
10356 echo "configure:10357: checking for Mule-related features" >&5
10357   { test "$extra_verbose" = "yes" && cat << \EOF
10358     Defining MULE
10359 EOF
10360 cat >> confdefs.h <<\EOF
10361 #define MULE 1
10362 EOF
10363 }
10364
10365
10366     chise_includes_found=no
10367   if test "$with_chise" != "no"; then
10368     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10369 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10370 echo "configure:10371: checking for chise.h" >&5
10371
10372 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375 #include <chise.h>
10376 EOF
10377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10378 { (eval echo configure:10379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10380 if test -z "$ac_err"; then
10381   rm -rf conftest*
10382   eval "ac_cv_header_$ac_safe=yes"
10383 else
10384   echo "$ac_err" >&5
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_header_$ac_safe=no"
10389 fi
10390 rm -f conftest*
10391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10392   echo "$ac_t""yes" 1>&6
10393   :
10394 else
10395   echo "$ac_t""no" 1>&6
10396 with_chise=no
10397 fi
10398
10399   fi
10400   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10401       -d "/usr/local/chise/include"; then
10402     save_c_switch_site="$c_switch_site"
10403     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10404     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10405 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10406 echo "configure:10407: checking for chise.h" >&5
10407
10408 cat > conftest.$ac_ext <<EOF
10409 #line 10410 "configure"
10410 #include "confdefs.h"
10411 #include <chise.h>
10412 EOF
10413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10414 { (eval echo configure:10415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10416 if test -z "$ac_err"; then
10417   rm -rf conftest*
10418   eval "ac_cv_header_$ac_safe=yes"
10419 else
10420   echo "$ac_err" >&5
10421   echo "configure: failed program was:" >&5
10422   cat conftest.$ac_ext >&5
10423   rm -rf conftest*
10424   eval "ac_cv_header_$ac_safe=no"
10425 fi
10426 rm -f conftest*
10427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10428   echo "$ac_t""yes" 1>&6
10429   chise_includes_found=yes
10430 else
10431   echo "$ac_t""no" 1>&6
10432 fi
10433
10434     if test "$chise_includes_found" != "yes"; then
10435       c_switch_site="$save_c_switch_site"
10436       with_chise="no"
10437     fi
10438   fi
10439
10440   test -z "$with_chise" && with_chise=yes
10441   if test "$with_chise" = "yes"; then
10442     { test "$extra_verbose" = "yes" && cat << \EOF
10443     Defining HAVE_CHISE
10444 EOF
10445 cat >> confdefs.h <<\EOF
10446 #define HAVE_CHISE 1
10447 EOF
10448 }
10449
10450     { test "$extra_verbose" = "yes" && cat << \EOF
10451     Defining HAVE_LIBCHISE
10452 EOF
10453 cat >> confdefs.h <<\EOF
10454 #define HAVE_LIBCHISE 1
10455 EOF
10456 }
10457
10458     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10459   fi
10460
10461   { test "$extra_verbose" = "yes" && cat << \EOF
10462     Defining FILE_CODING
10463 EOF
10464 cat >> confdefs.h <<\EOF
10465 #define FILE_CODING 1
10466 EOF
10467 }
10468
10469   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10470    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10471  fi
10472   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10473     { test "$extra_verbose" = "yes" && cat << \EOF
10474     Defining TEXT_CODING
10475 EOF
10476 cat >> confdefs.h <<\EOF
10477 #define TEXT_CODING 1
10478 EOF
10479 }
10480
10481     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10482    echo "    xemacs will be linked with \"text-coding.o\""
10483  fi
10484   else
10485     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10486    echo "    xemacs will be linked with \"file-coding.o\""
10487  fi
10488   fi
10489     for ac_hdr in libintl.h
10490 do
10491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10493 echo "configure:10494: checking for $ac_hdr" >&5
10494
10495 cat > conftest.$ac_ext <<EOF
10496 #line 10497 "configure"
10497 #include "confdefs.h"
10498 #include <$ac_hdr>
10499 EOF
10500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10501 { (eval echo configure:10502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10503 if test -z "$ac_err"; then
10504   rm -rf conftest*
10505   eval "ac_cv_header_$ac_safe=yes"
10506 else
10507   echo "$ac_err" >&5
10508   echo "configure: failed program was:" >&5
10509   cat conftest.$ac_ext >&5
10510   rm -rf conftest*
10511   eval "ac_cv_header_$ac_safe=no"
10512 fi
10513 rm -f conftest*
10514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10515   echo "$ac_t""yes" 1>&6
10516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10517   { test "$extra_verbose" = "yes" && cat << EOF
10518     Defining $ac_tr_hdr
10519 EOF
10520 cat >> confdefs.h <<EOF
10521 #define $ac_tr_hdr 1
10522 EOF
10523 }
10524  
10525 else
10526   echo "$ac_t""no" 1>&6
10527 fi
10528 done
10529
10530   
10531 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10532 echo "configure:10533: checking for strerror in -lintl" >&5
10533 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10534
10535 xe_check_libs=" -lintl "
10536 cat > conftest.$ac_ext <<EOF
10537 #line 10538 "configure"
10538 #include "confdefs.h"
10539 /* Override any gcc2 internal prototype to avoid an error.  */
10540 /* We use char because int might match the return type of a gcc2
10541     builtin and then its argument prototype would still apply.  */
10542 char strerror();
10543
10544 int main() {
10545 strerror()
10546 ; return 0; }
10547 EOF
10548 if { (eval echo configure:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10549   rm -rf conftest*
10550   eval "ac_cv_lib_$ac_lib_var=yes"
10551 else
10552   echo "configure: failed program was:" >&5
10553   cat conftest.$ac_ext >&5
10554   rm -rf conftest*
10555   eval "ac_cv_lib_$ac_lib_var=no"
10556 fi
10557 rm -f conftest*
10558 xe_check_libs=""
10559
10560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10561   echo "$ac_t""yes" 1>&6
10562     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10563     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10564   { test "$extra_verbose" = "yes" && cat << EOF
10565     Defining $ac_tr_lib
10566 EOF
10567 cat >> confdefs.h <<EOF
10568 #define $ac_tr_lib 1
10569 EOF
10570 }
10571
10572   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10573
10574 else
10575   echo "$ac_t""no" 1>&6
10576 fi
10577
10578
10579
10580   if test "$with_utf_2000" = "yes" ; then
10581     { test "$extra_verbose" = "yes" && cat << \EOF
10582     Defining CHAR_IS_UCS4
10583 EOF
10584 cat >> confdefs.h <<\EOF
10585 #define CHAR_IS_UCS4 1
10586 EOF
10587 }
10588
10589     { test "$extra_verbose" = "yes" && cat << \EOF
10590     Defining UTF2000
10591 EOF
10592 cat >> confdefs.h <<\EOF
10593 #define UTF2000 1
10594 EOF
10595 }
10596
10597     with_wnn=no
10598     with_wnn6=no
10599   fi
10600
10601   echo "checking for Mule input methods" 1>&6
10602 echo "configure:10603: checking for Mule input methods" >&5
10603         case "$with_xim" in "" | "yes" )
10604     echo "checking for XIM" 1>&6
10605 echo "configure:10606: checking for XIM" >&5
10606     
10607 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10608 echo "configure:10609: checking for XOpenIM in -lX11" >&5
10609 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10610
10611 xe_check_libs=" -lX11 "
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615 /* Override any gcc2 internal prototype to avoid an error.  */
10616 /* We use char because int might match the return type of a gcc2
10617     builtin and then its argument prototype would still apply.  */
10618 char XOpenIM();
10619
10620 int main() {
10621 XOpenIM()
10622 ; return 0; }
10623 EOF
10624 if { (eval echo configure:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10625   rm -rf conftest*
10626   eval "ac_cv_lib_$ac_lib_var=yes"
10627 else
10628   echo "configure: failed program was:" >&5
10629   cat conftest.$ac_ext >&5
10630   rm -rf conftest*
10631   eval "ac_cv_lib_$ac_lib_var=no"
10632 fi
10633 rm -f conftest*
10634 xe_check_libs=""
10635
10636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10637   echo "$ac_t""yes" 1>&6
10638   with_xim=xlib
10639 else
10640   echo "$ac_t""no" 1>&6
10641 with_xim=no
10642 fi
10643
10644
10645             if test "$need_motif $have_lesstif" = "yes no"; then
10646       
10647 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10648 echo "configure:10649: checking for XmImMbLookupString in -lXm" >&5
10649 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10650
10651 xe_check_libs=" -lXm "
10652 cat > conftest.$ac_ext <<EOF
10653 #line 10654 "configure"
10654 #include "confdefs.h"
10655 /* Override any gcc2 internal prototype to avoid an error.  */
10656 /* We use char because int might match the return type of a gcc2
10657     builtin and then its argument prototype would still apply.  */
10658 char XmImMbLookupString();
10659
10660 int main() {
10661 XmImMbLookupString()
10662 ; return 0; }
10663 EOF
10664 if { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10665   rm -rf conftest*
10666   eval "ac_cv_lib_$ac_lib_var=yes"
10667 else
10668   echo "configure: failed program was:" >&5
10669   cat conftest.$ac_ext >&5
10670   rm -rf conftest*
10671   eval "ac_cv_lib_$ac_lib_var=no"
10672 fi
10673 rm -f conftest*
10674 xe_check_libs=""
10675
10676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10677   echo "$ac_t""yes" 1>&6
10678   with_xim=motif
10679 else
10680   echo "$ac_t""no" 1>&6
10681 fi
10682
10683
10684     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10685       
10686 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10687 echo "configure:10688: checking for XmImMbLookupString in -lXm" >&5
10688 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10689
10690 xe_check_libs=" -lXm "
10691 cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694 /* Override any gcc2 internal prototype to avoid an error.  */
10695 /* We use char because int might match the return type of a gcc2
10696     builtin and then its argument prototype would still apply.  */
10697 char XmImMbLookupString();
10698
10699 int main() {
10700 XmImMbLookupString()
10701 ; return 0; }
10702 EOF
10703 if { (eval echo configure:10704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10704   rm -rf conftest*
10705   eval "ac_cv_lib_$ac_lib_var=yes"
10706 else
10707   echo "configure: failed program was:" >&5
10708   cat conftest.$ac_ext >&5
10709   rm -rf conftest*
10710   eval "ac_cv_lib_$ac_lib_var=no"
10711 fi
10712 rm -f conftest*
10713 xe_check_libs=""
10714
10715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10716   echo "$ac_t""yes" 1>&6
10717   with_xim=motif
10718 else
10719   echo "$ac_t""no" 1>&6
10720 fi
10721
10722
10723     fi ;;
10724   esac
10725   if test "$with_xim" != "no"; then
10726     { test "$extra_verbose" = "yes" && cat << \EOF
10727     Defining HAVE_XIM
10728 EOF
10729 cat >> confdefs.h <<\EOF
10730 #define HAVE_XIM 1
10731 EOF
10732 }
10733
10734     if test "$with_xim" = "xlib"; then
10735       { test "$extra_verbose" = "yes" && cat << \EOF
10736     Defining XIM_XLIB
10737 EOF
10738 cat >> confdefs.h <<\EOF
10739 #define XIM_XLIB 1
10740 EOF
10741 }
10742
10743       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10744    echo "    xemacs will be linked with \"input-method-xlib.o\""
10745  fi
10746     fi
10747     if test "$with_xim" = "motif"; then
10748       { test "$extra_verbose" = "yes" && cat << \EOF
10749     Defining XIM_MOTIF
10750 EOF
10751 cat >> confdefs.h <<\EOF
10752 #define XIM_MOTIF 1
10753 EOF
10754 }
10755
10756       need_motif=yes
10757       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10758    echo "    xemacs will be linked with \"input-method-motif.o\""
10759  fi
10760     fi
10761     if test "$with_xim" = "motif"; then
10762       with_xfs=no
10763     fi
10764   fi
10765
10766     if test "$with_xfs" = "yes" ; then
10767     echo "checking for XFontSet" 1>&6
10768 echo "configure:10769: checking for XFontSet" >&5
10769     
10770 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10771 echo "configure:10772: checking for XmbDrawString in -lX11" >&5
10772 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10773
10774 xe_check_libs=" -lX11 "
10775 cat > conftest.$ac_ext <<EOF
10776 #line 10777 "configure"
10777 #include "confdefs.h"
10778 /* Override any gcc2 internal prototype to avoid an error.  */
10779 /* We use char because int might match the return type of a gcc2
10780     builtin and then its argument prototype would still apply.  */
10781 char XmbDrawString();
10782
10783 int main() {
10784 XmbDrawString()
10785 ; return 0; }
10786 EOF
10787 if { (eval echo configure:10788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10788   rm -rf conftest*
10789   eval "ac_cv_lib_$ac_lib_var=yes"
10790 else
10791   echo "configure: failed program was:" >&5
10792   cat conftest.$ac_ext >&5
10793   rm -rf conftest*
10794   eval "ac_cv_lib_$ac_lib_var=no"
10795 fi
10796 rm -f conftest*
10797 xe_check_libs=""
10798
10799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10800   echo "$ac_t""yes" 1>&6
10801   :
10802 else
10803   echo "$ac_t""no" 1>&6
10804 with_xfs=no
10805 fi
10806
10807
10808     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10809       { test "$extra_verbose" = "yes" && cat << \EOF
10810     Defining USE_XFONTSET
10811 EOF
10812 cat >> confdefs.h <<\EOF
10813 #define USE_XFONTSET 1
10814 EOF
10815 }
10816
10817       if test "$with_xim" = "no" ; then
10818         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10819    echo "    xemacs will be linked with \"input-method-xlib.o\""
10820  fi
10821       fi
10822     fi
10823   fi 
10824     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10825   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10826 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10827 echo "configure:10828: checking for wnn/jllib.h" >&5
10828
10829 cat > conftest.$ac_ext <<EOF
10830 #line 10831 "configure"
10831 #include "confdefs.h"
10832 #include <wnn/jllib.h>
10833 EOF
10834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10835 { (eval echo configure:10836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10837 if test -z "$ac_err"; then
10838   rm -rf conftest*
10839   eval "ac_cv_header_$ac_safe=yes"
10840 else
10841   echo "$ac_err" >&5
10842   echo "configure: failed program was:" >&5
10843   cat conftest.$ac_ext >&5
10844   rm -rf conftest*
10845   eval "ac_cv_header_$ac_safe=no"
10846 fi
10847 rm -f conftest*
10848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10849   echo "$ac_t""yes" 1>&6
10850   :
10851 else
10852   echo "$ac_t""no" 1>&6
10853 with_wnn=no
10854 fi
10855  }
10856     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10857 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10858 echo "configure:10859: checking for wnn/commonhd.h" >&5
10859
10860 cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863 #include <wnn/commonhd.h>
10864 EOF
10865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10866 { (eval echo configure:10867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10868 if test -z "$ac_err"; then
10869   rm -rf conftest*
10870   eval "ac_cv_header_$ac_safe=yes"
10871 else
10872   echo "$ac_err" >&5
10873   echo "configure: failed program was:" >&5
10874   cat conftest.$ac_ext >&5
10875   rm -rf conftest*
10876   eval "ac_cv_header_$ac_safe=no"
10877 fi
10878 rm -f conftest*
10879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10880   echo "$ac_t""yes" 1>&6
10881   :
10882 else
10883   echo "$ac_t""no" 1>&6
10884 with_wnn=no
10885 fi
10886  }
10887     if test "$with_wnn" != "no"; then
10888     for ac_func in crypt
10889 do
10890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10891 echo "configure:10892: checking for $ac_func" >&5
10892
10893 cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 /* System header to define __stub macros and hopefully few prototypes,
10897     which can conflict with char $ac_func(); below.  */
10898 #include <assert.h>
10899 /* Override any gcc2 internal prototype to avoid an error.  */
10900 /* We use char because int might match the return type of a gcc2
10901     builtin and then its argument prototype would still apply.  */
10902 char $ac_func();
10903
10904 int main() {
10905
10906 /* The GNU C library defines this for functions which it implements
10907     to always fail with ENOSYS.  Some functions are actually named
10908     something starting with __ and the normal name is an alias.  */
10909 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10910 choke me
10911 #else
10912 $ac_func();
10913 #endif
10914
10915 ; return 0; }
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10918   rm -rf conftest*
10919   eval "ac_cv_func_$ac_func=yes"
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -rf conftest*
10924   eval "ac_cv_func_$ac_func=no"
10925 fi
10926 rm -f conftest*
10927
10928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10929   echo "$ac_t""yes" 1>&6
10930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10931   { test "$extra_verbose" = "yes" && cat << EOF
10932     Defining $ac_tr_func
10933 EOF
10934 cat >> confdefs.h <<EOF
10935 #define $ac_tr_func 1
10936 EOF
10937 }
10938  
10939 else
10940   echo "$ac_t""no" 1>&6
10941 fi
10942 done
10943
10944     test "$ac_cv_func_crypt" != "yes" && { 
10945 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10946 echo "configure:10947: checking for crypt in -lcrypt" >&5
10947 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10948
10949 xe_check_libs=" -lcrypt "
10950 cat > conftest.$ac_ext <<EOF
10951 #line 10952 "configure"
10952 #include "confdefs.h"
10953 /* Override any gcc2 internal prototype to avoid an error.  */
10954 /* We use char because int might match the return type of a gcc2
10955     builtin and then its argument prototype would still apply.  */
10956 char crypt();
10957
10958 int main() {
10959 crypt()
10960 ; return 0; }
10961 EOF
10962 if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10963   rm -rf conftest*
10964   eval "ac_cv_lib_$ac_lib_var=yes"
10965 else
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_lib_$ac_lib_var=no"
10970 fi
10971 rm -f conftest*
10972 xe_check_libs=""
10973
10974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10975   echo "$ac_t""yes" 1>&6
10976     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10977     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10978   { test "$extra_verbose" = "yes" && cat << EOF
10979     Defining $ac_tr_lib
10980 EOF
10981 cat >> confdefs.h <<EOF
10982 #define $ac_tr_lib 1
10983 EOF
10984 }
10985
10986   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10987
10988 else
10989   echo "$ac_t""no" 1>&6
10990 fi
10991
10992  }
10993   fi
10994     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10995     
10996 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10997 echo "configure:10998: checking for jl_dic_list_e in -lwnn" >&5
10998 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10999
11000 xe_check_libs=" -lwnn "
11001 cat > conftest.$ac_ext <<EOF
11002 #line 11003 "configure"
11003 #include "confdefs.h"
11004 /* Override any gcc2 internal prototype to avoid an error.  */
11005 /* We use char because int might match the return type of a gcc2
11006     builtin and then its argument prototype would still apply.  */
11007 char jl_dic_list_e();
11008
11009 int main() {
11010 jl_dic_list_e()
11011 ; return 0; }
11012 EOF
11013 if { (eval echo configure:11014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11014   rm -rf conftest*
11015   eval "ac_cv_lib_$ac_lib_var=yes"
11016 else
11017   echo "configure: failed program was:" >&5
11018   cat conftest.$ac_ext >&5
11019   rm -rf conftest*
11020   eval "ac_cv_lib_$ac_lib_var=no"
11021 fi
11022 rm -f conftest*
11023 xe_check_libs=""
11024
11025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11026   echo "$ac_t""yes" 1>&6
11027   libwnn=wnn
11028 else
11029   echo "$ac_t""no" 1>&6
11030 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
11031 echo "configure:11032: checking for jl_dic_list_e in -lwnn4" >&5
11032 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
11033
11034 xe_check_libs=" -lwnn4 "
11035 cat > conftest.$ac_ext <<EOF
11036 #line 11037 "configure"
11037 #include "confdefs.h"
11038 /* Override any gcc2 internal prototype to avoid an error.  */
11039 /* We use char because int might match the return type of a gcc2
11040     builtin and then its argument prototype would still apply.  */
11041 char jl_dic_list_e();
11042
11043 int main() {
11044 jl_dic_list_e()
11045 ; return 0; }
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11048   rm -rf conftest*
11049   eval "ac_cv_lib_$ac_lib_var=yes"
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   eval "ac_cv_lib_$ac_lib_var=no"
11055 fi
11056 rm -f conftest*
11057 xe_check_libs=""
11058
11059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11060   echo "$ac_t""yes" 1>&6
11061   libwnn=wnn4
11062 else
11063   echo "$ac_t""no" 1>&6
11064 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
11065 echo "configure:11066: checking for jl_dic_list_e in -lwnn6" >&5
11066 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
11067
11068 xe_check_libs=" -lwnn6 "
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char jl_dic_list_e();
11076
11077 int main() {
11078 jl_dic_list_e()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 xe_check_libs=""
11092
11093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11094   echo "$ac_t""yes" 1>&6
11095   libwnn=wnn6
11096 else
11097   echo "$ac_t""no" 1>&6
11098 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
11099 echo "configure:11100: checking for dic_list_e in -lwnn6_fromsrc" >&5
11100 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
11101
11102 xe_check_libs=" -lwnn6_fromsrc "
11103 cat > conftest.$ac_ext <<EOF
11104 #line 11105 "configure"
11105 #include "confdefs.h"
11106 /* Override any gcc2 internal prototype to avoid an error.  */
11107 /* We use char because int might match the return type of a gcc2
11108     builtin and then its argument prototype would still apply.  */
11109 char dic_list_e();
11110
11111 int main() {
11112 dic_list_e()
11113 ; return 0; }
11114 EOF
11115 if { (eval echo configure:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11116   rm -rf conftest*
11117   eval "ac_cv_lib_$ac_lib_var=yes"
11118 else
11119   echo "configure: failed program was:" >&5
11120   cat conftest.$ac_ext >&5
11121   rm -rf conftest*
11122   eval "ac_cv_lib_$ac_lib_var=no"
11123 fi
11124 rm -f conftest*
11125 xe_check_libs=""
11126
11127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11128   echo "$ac_t""yes" 1>&6
11129   libwnn=wnn6_fromsrc
11130 else
11131   echo "$ac_t""no" 1>&6
11132 with_wnn=no
11133 fi
11134
11135
11136 fi
11137
11138
11139 fi
11140
11141
11142 fi
11143
11144
11145   fi
11146   test -z "$with_wnn" && with_wnn=yes
11147   if test "$with_wnn" = "yes"; then
11148     { test "$extra_verbose" = "yes" && cat << \EOF
11149     Defining HAVE_WNN
11150 EOF
11151 cat >> confdefs.h <<\EOF
11152 #define HAVE_WNN 1
11153 EOF
11154 }
11155
11156     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
11157     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
11158    echo "    xemacs will be linked with \"mule-wnnfns.o\""
11159  fi
11160     if test "$with_wnn6" != "no"; then
11161       
11162 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
11163 echo "configure:11164: checking for jl_fi_dic_list in -l$libwnn" >&5
11164 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
11165
11166 xe_check_libs=" -l$libwnn "
11167 cat > conftest.$ac_ext <<EOF
11168 #line 11169 "configure"
11169 #include "confdefs.h"
11170 /* Override any gcc2 internal prototype to avoid an error.  */
11171 /* We use char because int might match the return type of a gcc2
11172     builtin and then its argument prototype would still apply.  */
11173 char jl_fi_dic_list();
11174
11175 int main() {
11176 jl_fi_dic_list()
11177 ; return 0; }
11178 EOF
11179 if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11180   rm -rf conftest*
11181   eval "ac_cv_lib_$ac_lib_var=yes"
11182 else
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_lib_$ac_lib_var=no"
11187 fi
11188 rm -f conftest*
11189 xe_check_libs=""
11190
11191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11192   echo "$ac_t""yes" 1>&6
11193   with_wnn6=yes
11194 else
11195   echo "$ac_t""no" 1>&6
11196 fi
11197
11198
11199       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11200     Defining WNN6
11201 EOF
11202 cat >> confdefs.h <<\EOF
11203 #define WNN6 1
11204 EOF
11205 }
11206
11207     fi
11208   fi
11209
11210     canna_includes_found=no
11211   if test "$with_canna" != "no"; then
11212     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11213 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11214 echo "configure:11215: checking for canna/jrkanji.h" >&5
11215
11216 cat > conftest.$ac_ext <<EOF
11217 #line 11218 "configure"
11218 #include "confdefs.h"
11219 #include <canna/jrkanji.h>
11220 EOF
11221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11222 { (eval echo configure:11223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11224 if test -z "$ac_err"; then
11225   rm -rf conftest*
11226   eval "ac_cv_header_$ac_safe=yes"
11227 else
11228   echo "$ac_err" >&5
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_header_$ac_safe=no"
11233 fi
11234 rm -f conftest*
11235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237   canna_includes_found=yes
11238 else
11239   echo "$ac_t""no" 1>&6
11240 fi
11241
11242   fi
11243   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
11244       -d "/usr/local/canna/include"; then
11245     save_c_switch_site="$c_switch_site"
11246     c_switch_site="$c_switch_site -I/usr/local/canna/include"
11247     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11248 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11249 echo "configure:11250: checking for canna/jrkanji.h" >&5
11250
11251 cat > conftest.$ac_ext <<EOF
11252 #line 11253 "configure"
11253 #include "confdefs.h"
11254 #include <canna/jrkanji.h>
11255 EOF
11256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11257 { (eval echo configure:11258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11259 if test -z "$ac_err"; then
11260   rm -rf conftest*
11261   eval "ac_cv_header_$ac_safe=yes"
11262 else
11263   echo "$ac_err" >&5
11264   echo "configure: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   rm -rf conftest*
11267   eval "ac_cv_header_$ac_safe=no"
11268 fi
11269 rm -f conftest*
11270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11271   echo "$ac_t""yes" 1>&6
11272   canna_includes_found=yes
11273 else
11274   echo "$ac_t""no" 1>&6
11275 fi
11276
11277     if test "$canna_includes_found" != "yes"; then
11278       c_switch_site="$save_c_switch_site"
11279       with_canna="no"
11280     fi
11281   fi
11282
11283   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
11284 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
11285 echo "configure:11286: checking for canna/RK.h" >&5
11286
11287 cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290 #include <canna/RK.h>
11291 EOF
11292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11293 { (eval echo configure:11294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11295 if test -z "$ac_err"; then
11296   rm -rf conftest*
11297   eval "ac_cv_header_$ac_safe=yes"
11298 else
11299   echo "$ac_err" >&5
11300   echo "configure: failed program was:" >&5
11301   cat conftest.$ac_ext >&5
11302   rm -rf conftest*
11303   eval "ac_cv_header_$ac_safe=no"
11304 fi
11305 rm -f conftest*
11306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11307   echo "$ac_t""yes" 1>&6
11308   :
11309 else
11310   echo "$ac_t""no" 1>&6
11311 with_canna=no
11312 fi
11313  }
11314   test -z "$with_canna" && { 
11315 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
11316 echo "configure:11317: checking for RkBgnBun in -lRKC" >&5
11317 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
11318
11319 xe_check_libs=" -lRKC "
11320 cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 /* Override any gcc2 internal prototype to avoid an error.  */
11324 /* We use char because int might match the return type of a gcc2
11325     builtin and then its argument prototype would still apply.  */
11326 char RkBgnBun();
11327
11328 int main() {
11329 RkBgnBun()
11330 ; return 0; }
11331 EOF
11332 if { (eval echo configure:11333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11333   rm -rf conftest*
11334   eval "ac_cv_lib_$ac_lib_var=yes"
11335 else
11336   echo "configure: failed program was:" >&5
11337   cat conftest.$ac_ext >&5
11338   rm -rf conftest*
11339   eval "ac_cv_lib_$ac_lib_var=no"
11340 fi
11341 rm -f conftest*
11342 xe_check_libs=""
11343
11344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11345   echo "$ac_t""yes" 1>&6
11346   :
11347 else
11348   echo "$ac_t""no" 1>&6
11349 with_canna=no
11350 fi
11351
11352  }
11353   test -z "$with_canna" && { 
11354 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
11355 echo "configure:11356: checking for jrKanjiControl in -lcanna" >&5
11356 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
11357
11358 xe_check_libs=" -lcanna "
11359 cat > conftest.$ac_ext <<EOF
11360 #line 11361 "configure"
11361 #include "confdefs.h"
11362 /* Override any gcc2 internal prototype to avoid an error.  */
11363 /* We use char because int might match the return type of a gcc2
11364     builtin and then its argument prototype would still apply.  */
11365 char jrKanjiControl();
11366
11367 int main() {
11368 jrKanjiControl()
11369 ; return 0; }
11370 EOF
11371 if { (eval echo configure:11372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11372   rm -rf conftest*
11373   eval "ac_cv_lib_$ac_lib_var=yes"
11374 else
11375   echo "configure: failed program was:" >&5
11376   cat conftest.$ac_ext >&5
11377   rm -rf conftest*
11378   eval "ac_cv_lib_$ac_lib_var=no"
11379 fi
11380 rm -f conftest*
11381 xe_check_libs=""
11382
11383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11384   echo "$ac_t""yes" 1>&6
11385   :
11386 else
11387   echo "$ac_t""no" 1>&6
11388 with_canna=no
11389 fi
11390
11391  }
11392   test -z "$with_canna" && with_canna=yes
11393   if test "$with_canna" = "yes"; then
11394     { test "$extra_verbose" = "yes" && cat << \EOF
11395     Defining HAVE_CANNA
11396 EOF
11397 cat >> confdefs.h <<\EOF
11398 #define HAVE_CANNA 1
11399 EOF
11400 }
11401
11402     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11403     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11404    echo "    xemacs will be linked with \"mule-canna.o\""
11405  fi
11406   fi
11407
11408 else   for feature in xim canna wnn; do
11409     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11410       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11411     fi
11412     eval "with_${feature}=no"
11413   done
11414 fi 
11415
11416 if test "$need_motif" = "yes" ; then
11417   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11418     
11419 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11420 echo "configure:11421: checking for layout_object_getvalue in -li18n" >&5
11421 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11422
11423 xe_check_libs=" -li18n "
11424 cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 /* Override any gcc2 internal prototype to avoid an error.  */
11428 /* We use char because int might match the return type of a gcc2
11429     builtin and then its argument prototype would still apply.  */
11430 char layout_object_getvalue();
11431
11432 int main() {
11433 layout_object_getvalue()
11434 ; return 0; }
11435 EOF
11436 if { (eval echo configure:11437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11437   rm -rf conftest*
11438   eval "ac_cv_lib_$ac_lib_var=yes"
11439 else
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   eval "ac_cv_lib_$ac_lib_var=no"
11444 fi
11445 rm -f conftest*
11446 xe_check_libs=""
11447
11448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11449   echo "$ac_t""yes" 1>&6
11450   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11451 else
11452   echo "$ac_t""no" 1>&6
11453 fi
11454
11455
11456   
11457 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11458     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11459   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11460   
11461         runpath="" runpath_dirs=""
11462   if test -n "$LD_RUN_PATH"; then
11463     runpath="$LD_RUN_PATH"
11464   elif test "$GCC" = "yes"; then
11465         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11466     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11467     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11468     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11469       case "$arg" in P,* | -L* | -R* )
11470         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11471           {
11472 xe_runpath_dir="$dir"
11473   test "$xe_runpath_dir" != "/lib"     -a \
11474         "$xe_runpath_dir" != "/usr/lib" -a \
11475         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11476   eval "$xe_add_unique_runpath_dir"
11477 }
11478         done ;;
11479       esac
11480     done
11481     ld_switch_run="$ld_switch_run_save"
11482     rm -f conftest*
11483   else
11484         for arg in $ld_switch_site $ld_switch_x_site; do
11485       case "$arg" in -L*) {
11486 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11487   test "$xe_runpath_dir" != "/lib"     -a \
11488         "$xe_runpath_dir" != "/usr/lib" -a \
11489         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11490   eval "$xe_add_unique_runpath_dir"
11491 };; esac
11492     done
11493             if test "$opsys $need_motif" = "sol2 yes"; then
11494       xe_runpath_dir="/opt/SUNWdt/lib";
11495       eval "$xe_add_unique_runpath_dir";
11496     fi
11497   fi 
11498   if test -n "$runpath"; then
11499     ld_switch_run="${dash_r}${runpath}"
11500     
11501 if test "$GCC" = "yes"; then
11502   set x $ld_switch_run; shift; ld_switch_run=""
11503   while test -n "$1"; do
11504     case $1 in
11505       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11506       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11507       -Xlinker* ) ;;
11508       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11509     esac
11510     shift
11511   done
11512 fi
11513     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11514   fi
11515 fi
11516
11517 fi
11518
11519
11520 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask
11521 do
11522 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11523 echo "configure:11524: checking for $ac_func" >&5
11524
11525 cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 /* System header to define __stub macros and hopefully few prototypes,
11529     which can conflict with char $ac_func(); below.  */
11530 #include <assert.h>
11531 /* Override any gcc2 internal prototype to avoid an error.  */
11532 /* We use char because int might match the return type of a gcc2
11533     builtin and then its argument prototype would still apply.  */
11534 char $ac_func();
11535
11536 int main() {
11537
11538 /* The GNU C library defines this for functions which it implements
11539     to always fail with ENOSYS.  Some functions are actually named
11540     something starting with __ and the normal name is an alias.  */
11541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11542 choke me
11543 #else
11544 $ac_func();
11545 #endif
11546
11547 ; return 0; }
11548 EOF
11549 if { (eval echo configure:11550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11550   rm -rf conftest*
11551   eval "ac_cv_func_$ac_func=yes"
11552 else
11553   echo "configure: failed program was:" >&5
11554   cat conftest.$ac_ext >&5
11555   rm -rf conftest*
11556   eval "ac_cv_func_$ac_func=no"
11557 fi
11558 rm -f conftest*
11559
11560 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11561   echo "$ac_t""yes" 1>&6
11562     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11563   { test "$extra_verbose" = "yes" && cat << EOF
11564     Defining $ac_tr_func
11565 EOF
11566 cat >> confdefs.h <<EOF
11567 #define $ac_tr_func 1
11568 EOF
11569 }
11570  
11571 else
11572   echo "$ac_t""no" 1>&6
11573 fi
11574 done
11575
11576
11577 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11578   case "$opsys" in
11579     hpux11* )
11580       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11581       ac_cv_func_getaddrinfo=no
11582       ;;
11583   esac
11584 fi
11585
11586
11587 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11588 do
11589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11590 echo "configure:11591: checking for $ac_func" >&5
11591
11592 cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595 /* System header to define __stub macros and hopefully few prototypes,
11596     which can conflict with char $ac_func(); below.  */
11597 #include <assert.h>
11598 /* Override any gcc2 internal prototype to avoid an error.  */
11599 /* We use char because int might match the return type of a gcc2
11600     builtin and then its argument prototype would still apply.  */
11601 char $ac_func();
11602
11603 int main() {
11604
11605 /* The GNU C library defines this for functions which it implements
11606     to always fail with ENOSYS.  Some functions are actually named
11607     something starting with __ and the normal name is an alias.  */
11608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11609 choke me
11610 #else
11611 $ac_func();
11612 #endif
11613
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   eval "ac_cv_func_$ac_func=yes"
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   eval "ac_cv_func_$ac_func=no"
11624 fi
11625 rm -f conftest*
11626
11627 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11628   echo "$ac_t""yes" 1>&6
11629     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11630   { test "$extra_verbose" = "yes" && cat << EOF
11631     Defining $ac_tr_func
11632 EOF
11633 cat >> confdefs.h <<EOF
11634 #define $ac_tr_func 1
11635 EOF
11636 }
11637  
11638 else
11639   echo "$ac_t""no" 1>&6
11640 fi
11641 done
11642
11643
11644 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11645 echo "configure:11646: checking for openpty" >&5
11646
11647 cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650 /* System header to define __stub macros and hopefully few prototypes,
11651     which can conflict with char openpty(); below.  */
11652 #include <assert.h>
11653 /* Override any gcc2 internal prototype to avoid an error.  */
11654 /* We use char because int might match the return type of a gcc2
11655     builtin and then its argument prototype would still apply.  */
11656 char openpty();
11657
11658 int main() {
11659
11660 /* The GNU C library defines this for functions which it implements
11661     to always fail with ENOSYS.  Some functions are actually named
11662     something starting with __ and the normal name is an alias.  */
11663 #if defined (__stub_openpty) || defined (__stub___openpty)
11664 choke me
11665 #else
11666 openpty();
11667 #endif
11668
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11672   rm -rf conftest*
11673   eval "ac_cv_func_openpty=yes"
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   eval "ac_cv_func_openpty=no"
11679 fi
11680 rm -f conftest*
11681
11682 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11683   echo "$ac_t""yes" 1>&6
11684   have_openpty=yes
11685 else
11686   echo "$ac_t""no" 1>&6
11687
11688   
11689 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11690 echo "configure:11691: checking for openpty in -lutil" >&5
11691 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11692
11693 xe_check_libs=" -lutil "
11694 cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697 /* Override any gcc2 internal prototype to avoid an error.  */
11698 /* We use char because int might match the return type of a gcc2
11699     builtin and then its argument prototype would still apply.  */
11700 char openpty();
11701
11702 int main() {
11703 openpty()
11704 ; return 0; }
11705 EOF
11706 if { (eval echo configure:11707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11707   rm -rf conftest*
11708   eval "ac_cv_lib_$ac_lib_var=yes"
11709 else
11710   echo "configure: failed program was:" >&5
11711   cat conftest.$ac_ext >&5
11712   rm -rf conftest*
11713   eval "ac_cv_lib_$ac_lib_var=no"
11714 fi
11715 rm -f conftest*
11716 xe_check_libs=""
11717
11718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11719   echo "$ac_t""yes" 1>&6
11720   have_openpty=yes need_libutil=yes
11721 else
11722   echo "$ac_t""no" 1>&6
11723 fi
11724
11725
11726 fi
11727
11728 if test "$have_openpty" = "yes"; then
11729   { test "$extra_verbose" = "yes" && cat << \EOF
11730     Defining HAVE_OPENPTY
11731 EOF
11732 cat >> confdefs.h <<\EOF
11733 #define HAVE_OPENPTY 1
11734 EOF
11735 }
11736
11737   for ac_hdr in pty.h libutil.h util.h
11738 do
11739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11741 echo "configure:11742: checking for $ac_hdr" >&5
11742
11743 cat > conftest.$ac_ext <<EOF
11744 #line 11745 "configure"
11745 #include "confdefs.h"
11746 #include <$ac_hdr>
11747 EOF
11748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11749 { (eval echo configure:11750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11751 if test -z "$ac_err"; then
11752   rm -rf conftest*
11753   eval "ac_cv_header_$ac_safe=yes"
11754 else
11755   echo "$ac_err" >&5
11756   echo "configure: failed program was:" >&5
11757   cat conftest.$ac_ext >&5
11758   rm -rf conftest*
11759   eval "ac_cv_header_$ac_safe=no"
11760 fi
11761 rm -f conftest*
11762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11763   echo "$ac_t""yes" 1>&6
11764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11765   { test "$extra_verbose" = "yes" && cat << EOF
11766     Defining $ac_tr_hdr
11767 EOF
11768 cat >> confdefs.h <<EOF
11769 #define $ac_tr_hdr 1
11770 EOF
11771 }
11772  break
11773 else
11774   echo "$ac_t""no" 1>&6
11775 fi
11776 done
11777
11778   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11779 fi
11780
11781 for ac_hdr in stropts.h
11782 do
11783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11785 echo "configure:11786: checking for $ac_hdr" >&5
11786
11787 cat > conftest.$ac_ext <<EOF
11788 #line 11789 "configure"
11789 #include "confdefs.h"
11790 #include <$ac_hdr>
11791 EOF
11792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11793 { (eval echo configure:11794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11795 if test -z "$ac_err"; then
11796   rm -rf conftest*
11797   eval "ac_cv_header_$ac_safe=yes"
11798 else
11799   echo "$ac_err" >&5
11800   echo "configure: failed program was:" >&5
11801   cat conftest.$ac_ext >&5
11802   rm -rf conftest*
11803   eval "ac_cv_header_$ac_safe=no"
11804 fi
11805 rm -f conftest*
11806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11807   echo "$ac_t""yes" 1>&6
11808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11809   { test "$extra_verbose" = "yes" && cat << EOF
11810     Defining $ac_tr_hdr
11811 EOF
11812 cat >> confdefs.h <<EOF
11813 #define $ac_tr_hdr 1
11814 EOF
11815 }
11816  
11817 else
11818   echo "$ac_t""no" 1>&6
11819 fi
11820 done
11821
11822 if test "$ac_cv_header_stropts_h" = "yes"; then
11823   for ac_func in isastream
11824 do
11825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11826 echo "configure:11827: checking for $ac_func" >&5
11827
11828 cat > conftest.$ac_ext <<EOF
11829 #line 11830 "configure"
11830 #include "confdefs.h"
11831 /* System header to define __stub macros and hopefully few prototypes,
11832     which can conflict with char $ac_func(); below.  */
11833 #include <assert.h>
11834 /* Override any gcc2 internal prototype to avoid an error.  */
11835 /* We use char because int might match the return type of a gcc2
11836     builtin and then its argument prototype would still apply.  */
11837 char $ac_func();
11838
11839 int main() {
11840
11841 /* The GNU C library defines this for functions which it implements
11842     to always fail with ENOSYS.  Some functions are actually named
11843     something starting with __ and the normal name is an alias.  */
11844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11845 choke me
11846 #else
11847 $ac_func();
11848 #endif
11849
11850 ; return 0; }
11851 EOF
11852 if { (eval echo configure:11853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11853   rm -rf conftest*
11854   eval "ac_cv_func_$ac_func=yes"
11855 else
11856   echo "configure: failed program was:" >&5
11857   cat conftest.$ac_ext >&5
11858   rm -rf conftest*
11859   eval "ac_cv_func_$ac_func=no"
11860 fi
11861 rm -f conftest*
11862
11863 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11864   echo "$ac_t""yes" 1>&6
11865     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11866   { test "$extra_verbose" = "yes" && cat << EOF
11867     Defining $ac_tr_func
11868 EOF
11869 cat >> confdefs.h <<EOF
11870 #define $ac_tr_func 1
11871 EOF
11872 }
11873  
11874 else
11875   echo "$ac_t""no" 1>&6
11876 fi
11877 done
11878
11879   for ac_hdr in strtio.h
11880 do
11881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11883 echo "configure:11884: checking for $ac_hdr" >&5
11884
11885 cat > conftest.$ac_ext <<EOF
11886 #line 11887 "configure"
11887 #include "confdefs.h"
11888 #include <$ac_hdr>
11889 EOF
11890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11891 { (eval echo configure:11892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11893 if test -z "$ac_err"; then
11894   rm -rf conftest*
11895   eval "ac_cv_header_$ac_safe=yes"
11896 else
11897   echo "$ac_err" >&5
11898   echo "configure: failed program was:" >&5
11899   cat conftest.$ac_ext >&5
11900   rm -rf conftest*
11901   eval "ac_cv_header_$ac_safe=no"
11902 fi
11903 rm -f conftest*
11904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11905   echo "$ac_t""yes" 1>&6
11906     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11907   { test "$extra_verbose" = "yes" && cat << EOF
11908     Defining $ac_tr_hdr
11909 EOF
11910 cat >> confdefs.h <<EOF
11911 #define $ac_tr_hdr 1
11912 EOF
11913 }
11914  
11915 else
11916   echo "$ac_t""no" 1>&6
11917 fi
11918 done
11919  fi
11920
11921 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11922    echo "    xemacs will be linked with \"realpath.o\""
11923  fi
11924
11925 for ac_func in getloadavg
11926 do
11927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11928 echo "configure:11929: checking for $ac_func" >&5
11929
11930 cat > conftest.$ac_ext <<EOF
11931 #line 11932 "configure"
11932 #include "confdefs.h"
11933 /* System header to define __stub macros and hopefully few prototypes,
11934     which can conflict with char $ac_func(); below.  */
11935 #include <assert.h>
11936 /* Override any gcc2 internal prototype to avoid an error.  */
11937 /* We use char because int might match the return type of a gcc2
11938     builtin and then its argument prototype would still apply.  */
11939 char $ac_func();
11940
11941 int main() {
11942
11943 /* The GNU C library defines this for functions which it implements
11944     to always fail with ENOSYS.  Some functions are actually named
11945     something starting with __ and the normal name is an alias.  */
11946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11947 choke me
11948 #else
11949 $ac_func();
11950 #endif
11951
11952 ; return 0; }
11953 EOF
11954 if { (eval echo configure:11955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11955   rm -rf conftest*
11956   eval "ac_cv_func_$ac_func=yes"
11957 else
11958   echo "configure: failed program was:" >&5
11959   cat conftest.$ac_ext >&5
11960   rm -rf conftest*
11961   eval "ac_cv_func_$ac_func=no"
11962 fi
11963 rm -f conftest*
11964
11965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11966   echo "$ac_t""yes" 1>&6
11967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11968   { test "$extra_verbose" = "yes" && cat << EOF
11969     Defining $ac_tr_func
11970 EOF
11971 cat >> confdefs.h <<EOF
11972 #define $ac_tr_func 1
11973 EOF
11974 }
11975  
11976 else
11977   echo "$ac_t""no" 1>&6
11978 fi
11979 done
11980
11981
11982 if test "$ac_cv_func_getloadavg" = "yes"; then
11983         for ac_hdr in sys/loadavg.h
11984 do
11985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11986 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11987 echo "configure:11988: checking for $ac_hdr" >&5
11988
11989 cat > conftest.$ac_ext <<EOF
11990 #line 11991 "configure"
11991 #include "confdefs.h"
11992 #include <$ac_hdr>
11993 EOF
11994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11995 { (eval echo configure:11996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11997 if test -z "$ac_err"; then
11998   rm -rf conftest*
11999   eval "ac_cv_header_$ac_safe=yes"
12000 else
12001   echo "$ac_err" >&5
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -rf conftest*
12005   eval "ac_cv_header_$ac_safe=no"
12006 fi
12007 rm -f conftest*
12008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12009   echo "$ac_t""yes" 1>&6
12010     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12011   { test "$extra_verbose" = "yes" && cat << EOF
12012     Defining $ac_tr_hdr
12013 EOF
12014 cat >> confdefs.h <<EOF
12015 #define $ac_tr_hdr 1
12016 EOF
12017 }
12018  
12019 else
12020   echo "$ac_t""no" 1>&6
12021 fi
12022 done
12023
12024 else
12025     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
12026    echo "    xemacs will be linked with \"getloadavg.o\""
12027  fi
12028
12029     
12030 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
12031 echo "configure:12032: checking for kstat_open in -lkstat" >&5
12032 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
12033
12034 xe_check_libs=" -lkstat "
12035 cat > conftest.$ac_ext <<EOF
12036 #line 12037 "configure"
12037 #include "confdefs.h"
12038 /* Override any gcc2 internal prototype to avoid an error.  */
12039 /* We use char because int might match the return type of a gcc2
12040     builtin and then its argument prototype would still apply.  */
12041 char kstat_open();
12042
12043 int main() {
12044 kstat_open()
12045 ; return 0; }
12046 EOF
12047 if { (eval echo configure:12048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12048   rm -rf conftest*
12049   eval "ac_cv_lib_$ac_lib_var=yes"
12050 else
12051   echo "configure: failed program was:" >&5
12052   cat conftest.$ac_ext >&5
12053   rm -rf conftest*
12054   eval "ac_cv_lib_$ac_lib_var=no"
12055 fi
12056 rm -f conftest*
12057 xe_check_libs=""
12058
12059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12060   echo "$ac_t""yes" 1>&6
12061     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12063   { test "$extra_verbose" = "yes" && cat << EOF
12064     Defining $ac_tr_lib
12065 EOF
12066 cat >> confdefs.h <<EOF
12067 #define $ac_tr_lib 1
12068 EOF
12069 }
12070
12071   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
12072
12073 else
12074   echo "$ac_t""no" 1>&6
12075 fi
12076
12077
12078   for ac_hdr in kstat.h
12079 do
12080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12082 echo "configure:12083: checking for $ac_hdr" >&5
12083
12084 cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087 #include <$ac_hdr>
12088 EOF
12089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12090 { (eval echo configure:12091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12092 if test -z "$ac_err"; then
12093   rm -rf conftest*
12094   eval "ac_cv_header_$ac_safe=yes"
12095 else
12096   echo "$ac_err" >&5
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   eval "ac_cv_header_$ac_safe=no"
12101 fi
12102 rm -f conftest*
12103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12104   echo "$ac_t""yes" 1>&6
12105     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12106   { test "$extra_verbose" = "yes" && cat << EOF
12107     Defining $ac_tr_hdr
12108 EOF
12109 cat >> confdefs.h <<EOF
12110 #define $ac_tr_hdr 1
12111 EOF
12112 }
12113  
12114 else
12115   echo "$ac_t""no" 1>&6
12116 fi
12117 done
12118
12119
12120     
12121 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
12122 echo "configure:12123: checking for kvm_read in -lkvm" >&5
12123 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
12124
12125 xe_check_libs=" -lkvm "
12126 cat > conftest.$ac_ext <<EOF
12127 #line 12128 "configure"
12128 #include "confdefs.h"
12129 /* Override any gcc2 internal prototype to avoid an error.  */
12130 /* We use char because int might match the return type of a gcc2
12131     builtin and then its argument prototype would still apply.  */
12132 char kvm_read();
12133
12134 int main() {
12135 kvm_read()
12136 ; return 0; }
12137 EOF
12138 if { (eval echo configure:12139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12139   rm -rf conftest*
12140   eval "ac_cv_lib_$ac_lib_var=yes"
12141 else
12142   echo "configure: failed program was:" >&5
12143   cat conftest.$ac_ext >&5
12144   rm -rf conftest*
12145   eval "ac_cv_lib_$ac_lib_var=no"
12146 fi
12147 rm -f conftest*
12148 xe_check_libs=""
12149
12150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12151   echo "$ac_t""yes" 1>&6
12152     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12153     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12154   { test "$extra_verbose" = "yes" && cat << EOF
12155     Defining $ac_tr_lib
12156 EOF
12157 cat >> confdefs.h <<EOF
12158 #define $ac_tr_lib 1
12159 EOF
12160 }
12161
12162   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
12163
12164 else
12165   echo "$ac_t""no" 1>&6
12166 fi
12167
12168
12169 fi
12170
12171 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
12172 echo "configure:12173: checking whether netdb declares h_errno" >&5
12173 cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176 #include <netdb.h>
12177 int main() {
12178 return h_errno;
12179 ; return 0; }
12180 EOF
12181 if { (eval echo configure:12182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12182   rm -rf conftest*
12183   echo "$ac_t""yes" 1>&6
12184    { test "$extra_verbose" = "yes" && cat << \EOF
12185     Defining HAVE_H_ERRNO
12186 EOF
12187 cat >> confdefs.h <<\EOF
12188 #define HAVE_H_ERRNO 1
12189 EOF
12190 }
12191
12192 else
12193   echo "configure: failed program was:" >&5
12194   cat conftest.$ac_ext >&5
12195   rm -rf conftest*
12196   echo "$ac_t""no" 1>&6
12197 fi
12198 rm -f conftest*
12199
12200 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
12201 echo "configure:12202: checking for sigsetjmp" >&5
12202 cat > conftest.$ac_ext <<EOF
12203 #line 12204 "configure"
12204 #include "confdefs.h"
12205 #include <setjmp.h>
12206 int main() {
12207 sigjmp_buf bar; sigsetjmp (bar, 0);
12208 ; return 0; }
12209 EOF
12210 if { (eval echo configure:12211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12211   rm -rf conftest*
12212   echo "$ac_t""yes" 1>&6
12213    { test "$extra_verbose" = "yes" && cat << \EOF
12214     Defining HAVE_SIGSETJMP
12215 EOF
12216 cat >> confdefs.h <<\EOF
12217 #define HAVE_SIGSETJMP 1
12218 EOF
12219 }
12220
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -rf conftest*
12225   echo "$ac_t""no" 1>&6
12226 fi
12227 rm -f conftest*
12228
12229 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
12230 echo "configure:12231: checking whether localtime caches TZ" >&5
12231
12232 if test "$ac_cv_func_tzset" = "yes"; then
12233 cat > conftest.$ac_ext <<EOF
12234 #line 12235 "configure"
12235 #include "confdefs.h"
12236 #include <time.h>
12237 #if STDC_HEADERS
12238 # include <stdlib.h>
12239 #endif
12240 extern char **environ;
12241 unset_TZ ()
12242 {
12243   char **from, **to;
12244   for (to = from = environ; (*to = *from); from++)
12245     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
12246       to++;
12247 }
12248 char TZ_GMT0[] = "TZ=GMT0";
12249 char TZ_PST8[] = "TZ=PST8";
12250 main()
12251 {
12252   time_t now = time ((time_t *) 0);
12253   int hour_GMT0, hour_unset;
12254   if (putenv (TZ_GMT0) != 0)
12255     exit (1);
12256   hour_GMT0 = localtime (&now)->tm_hour;
12257   unset_TZ ();
12258   hour_unset = localtime (&now)->tm_hour;
12259   if (putenv (TZ_PST8) != 0)
12260     exit (1);
12261   if (localtime (&now)->tm_hour == hour_GMT0)
12262     exit (1);
12263   unset_TZ ();
12264   if (localtime (&now)->tm_hour != hour_unset)
12265     exit (1);
12266   exit (0);
12267 }
12268 EOF
12269 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12270 then
12271   emacs_cv_localtime_cache=no
12272 else
12273   conftest_rc="$?"
12274   echo "configure: failed program was:" >&5
12275   cat conftest.$ac_ext >&5
12276   rm -fr conftest*
12277   emacs_cv_localtime_cache=yes
12278 fi
12279 rm -fr conftest*
12280 else
12281         # If we lack tzset, report that localtime does not cache TZ,
12282         # since we can't invalidate the cache if we don't have tzset.
12283         emacs_cv_localtime_cache=no
12284 fi
12285 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
12286 if test $emacs_cv_localtime_cache = yes; then
12287   { test "$extra_verbose" = "yes" && cat << \EOF
12288     Defining LOCALTIME_CACHE
12289 EOF
12290 cat >> confdefs.h <<\EOF
12291 #define LOCALTIME_CACHE 1
12292 EOF
12293 }
12294
12295 fi
12296
12297 if test "$HAVE_TIMEVAL" = "yes"; then
12298 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
12299 echo "configure:12300: checking whether gettimeofday accepts one or two arguments" >&5
12300 cat > conftest.$ac_ext <<EOF
12301 #line 12302 "configure"
12302 #include "confdefs.h"
12303
12304 #ifdef TIME_WITH_SYS_TIME
12305 #include <sys/time.h>
12306 #include <time.h>
12307 #else
12308 #ifdef HAVE_SYS_TIME_H
12309 #include <sys/time.h>
12310 #else
12311 #include <time.h>
12312 #endif
12313 #endif
12314   
12315 int main() {
12316
12317   struct timeval time;
12318   gettimeofday (&time, 0);
12319
12320 ; return 0; }
12321 EOF
12322 if { (eval echo configure:12323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12323   rm -rf conftest*
12324   echo "$ac_t""two" 1>&6
12325 else
12326   echo "configure: failed program was:" >&5
12327   cat conftest.$ac_ext >&5
12328   rm -rf conftest*
12329   echo "$ac_t""one" 1>&6
12330    { test "$extra_verbose" = "yes" && cat << \EOF
12331     Defining GETTIMEOFDAY_ONE_ARGUMENT
12332 EOF
12333 cat >> confdefs.h <<\EOF
12334 #define GETTIMEOFDAY_ONE_ARGUMENT 1
12335 EOF
12336 }
12337
12338 fi
12339 rm -f conftest*
12340 fi
12341
12342
12343 echo $ac_n "checking for inline""... $ac_c" 1>&6
12344 echo "configure:12345: checking for inline" >&5
12345
12346 ac_cv_c_inline=no
12347 for ac_kw in inline __inline__ __inline; do
12348   cat > conftest.$ac_ext <<EOF
12349 #line 12350 "configure"
12350 #include "confdefs.h"
12351
12352 int main() {
12353 } $ac_kw foo() {
12354 ; return 0; }
12355 EOF
12356 if { (eval echo configure:12357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12357   rm -rf conftest*
12358   ac_cv_c_inline=$ac_kw; break
12359 else
12360   echo "configure: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362 fi
12363 rm -f conftest*
12364 done
12365
12366
12367 echo "$ac_t""$ac_cv_c_inline" 1>&6
12368 case "$ac_cv_c_inline" in
12369   inline | yes) ;;
12370   no) { test "$extra_verbose" = "yes" && cat << \EOF
12371     Defining inline = 
12372 EOF
12373 cat >> confdefs.h <<\EOF
12374 #define inline 
12375 EOF
12376 }
12377  ;;
12378   *)  { test "$extra_verbose" = "yes" && cat << EOF
12379     Defining inline = $ac_cv_c_inline
12380 EOF
12381 cat >> confdefs.h <<EOF
12382 #define inline $ac_cv_c_inline
12383 EOF
12384 }
12385  ;;
12386 esac
12387
12388 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12389    echo "    xemacs will be linked with \"inline.o\""
12390  fi
12391
12392
12393 if test "$__DECC" != "yes"; then
12394   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12395 # for constant arguments.  Useless!
12396 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12397 echo "configure:12398: checking for working alloca.h" >&5
12398
12399 cat > conftest.$ac_ext <<EOF
12400 #line 12401 "configure"
12401 #include "confdefs.h"
12402 #include <alloca.h>
12403 int main() {
12404 char *p = alloca(2 * sizeof(int));
12405 ; return 0; }
12406 EOF
12407 if { (eval echo configure:12408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12408   rm -rf conftest*
12409   ac_cv_header_alloca_h=yes
12410 else
12411   echo "configure: failed program was:" >&5
12412   cat conftest.$ac_ext >&5
12413   rm -rf conftest*
12414   ac_cv_header_alloca_h=no
12415 fi
12416 rm -f conftest*
12417
12418 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12419 if test $ac_cv_header_alloca_h = yes; then
12420   { test "$extra_verbose" = "yes" && cat << \EOF
12421     Defining HAVE_ALLOCA_H
12422 EOF
12423 cat >> confdefs.h <<\EOF
12424 #define HAVE_ALLOCA_H 1
12425 EOF
12426 }
12427
12428 fi
12429
12430 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12431 echo "configure:12432: checking for alloca" >&5
12432
12433 cat > conftest.$ac_ext <<EOF
12434 #line 12435 "configure"
12435 #include "confdefs.h"
12436
12437 #ifdef __GNUC__
12438 # define alloca __builtin_alloca
12439 #else
12440 # ifdef _MSC_VER
12441 #  include <malloc.h>
12442 #  define alloca _alloca
12443 # else
12444 #  if HAVE_ALLOCA_H
12445 #   include <alloca.h>
12446 #  else
12447 #   ifdef _AIX
12448  #pragma alloca
12449 #   else
12450 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12451 char *alloca ();
12452 #    endif
12453 #   endif
12454 #  endif
12455 # endif
12456 #endif
12457
12458 int main() {
12459 char *p = (char *) alloca(1);
12460 ; return 0; }
12461 EOF
12462 if { (eval echo configure:12463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12463   rm -rf conftest*
12464   ac_cv_func_alloca_works=yes
12465 else
12466   echo "configure: failed program was:" >&5
12467   cat conftest.$ac_ext >&5
12468   rm -rf conftest*
12469   ac_cv_func_alloca_works=no
12470 fi
12471 rm -f conftest*
12472
12473 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12474 if test $ac_cv_func_alloca_works = yes; then
12475   { test "$extra_verbose" = "yes" && cat << \EOF
12476     Defining HAVE_ALLOCA
12477 EOF
12478 cat >> confdefs.h <<\EOF
12479 #define HAVE_ALLOCA 1
12480 EOF
12481 }
12482
12483 fi
12484
12485 if test $ac_cv_func_alloca_works = no; then
12486   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12487   # that cause trouble.  Some versions do not even contain alloca or
12488   # contain a buggy version.  If you still want to use their alloca,
12489   # use ar to extract alloca.o from them instead of compiling alloca.c.
12490   ALLOCA=alloca.${ac_objext}
12491   { test "$extra_verbose" = "yes" && cat << \EOF
12492     Defining C_ALLOCA
12493 EOF
12494 cat >> confdefs.h <<\EOF
12495 #define C_ALLOCA 1
12496 EOF
12497 }
12498
12499
12500 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12501 echo "configure:12502: checking whether alloca needs Cray hooks" >&5
12502
12503 cat > conftest.$ac_ext <<EOF
12504 #line 12505 "configure"
12505 #include "confdefs.h"
12506 #if defined(CRAY) && ! defined(CRAY2)
12507 webecray
12508 #else
12509 wenotbecray
12510 #endif
12511
12512 EOF
12513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12514   egrep "webecray" >/dev/null 2>&1; then
12515   rm -rf conftest*
12516   ac_cv_os_cray=yes
12517 else
12518   rm -rf conftest*
12519   ac_cv_os_cray=no
12520 fi
12521 rm -f conftest*
12522
12523
12524 echo "$ac_t""$ac_cv_os_cray" 1>&6
12525 if test $ac_cv_os_cray = yes; then
12526 for ac_func in _getb67 GETB67 getb67; do
12527   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12528 echo "configure:12529: checking for $ac_func" >&5
12529
12530 cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 /* System header to define __stub macros and hopefully few prototypes,
12534     which can conflict with char $ac_func(); below.  */
12535 #include <assert.h>
12536 /* Override any gcc2 internal prototype to avoid an error.  */
12537 /* We use char because int might match the return type of a gcc2
12538     builtin and then its argument prototype would still apply.  */
12539 char $ac_func();
12540
12541 int main() {
12542
12543 /* The GNU C library defines this for functions which it implements
12544     to always fail with ENOSYS.  Some functions are actually named
12545     something starting with __ and the normal name is an alias.  */
12546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12547 choke me
12548 #else
12549 $ac_func();
12550 #endif
12551
12552 ; return 0; }
12553 EOF
12554 if { (eval echo configure:12555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12555   rm -rf conftest*
12556   eval "ac_cv_func_$ac_func=yes"
12557 else
12558   echo "configure: failed program was:" >&5
12559   cat conftest.$ac_ext >&5
12560   rm -rf conftest*
12561   eval "ac_cv_func_$ac_func=no"
12562 fi
12563 rm -f conftest*
12564
12565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12566   echo "$ac_t""yes" 1>&6
12567   { test "$extra_verbose" = "yes" && cat << EOF
12568     Defining CRAY_STACKSEG_END = $ac_func
12569 EOF
12570 cat >> confdefs.h <<EOF
12571 #define CRAY_STACKSEG_END $ac_func
12572 EOF
12573 }
12574
12575   break
12576 else
12577   echo "$ac_t""no" 1>&6
12578 fi
12579
12580 done
12581 fi
12582
12583 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12584 echo "configure:12585: checking stack direction for C alloca" >&5
12585
12586 cat > conftest.$ac_ext <<EOF
12587 #line 12588 "configure"
12588 #include "confdefs.h"
12589 find_stack_direction ()
12590 {
12591   static char *addr = 0;
12592   auto char dummy;
12593   if (addr == 0)
12594     {
12595       addr = &dummy;
12596       return find_stack_direction ();
12597     }
12598   else
12599     return (&dummy > addr) ? 1 : -1;
12600 }
12601 main ()
12602 {
12603   exit (find_stack_direction() < 0);
12604 }
12605 EOF
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12607 then
12608   ac_cv_c_stack_direction=1
12609 else
12610   conftest_rc="$?"
12611   echo "configure: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   rm -fr conftest*
12614   ac_cv_c_stack_direction=-1
12615 fi
12616 rm -fr conftest*
12617
12618 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12619 { test "$extra_verbose" = "yes" && cat << EOF
12620     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12621 EOF
12622 cat >> confdefs.h <<EOF
12623 #define STACK_DIRECTION $ac_cv_c_stack_direction
12624 EOF
12625 }
12626
12627 fi
12628
12629   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12630    echo "    xemacs will be linked with \"$ALLOCA\""
12631  fi
12632 fi
12633
12634 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12635 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12636 echo "configure:12637: checking for vfork.h" >&5
12637
12638 cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641 #include <vfork.h>
12642 EOF
12643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12644 { (eval echo configure:12645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12646 if test -z "$ac_err"; then
12647   rm -rf conftest*
12648   eval "ac_cv_header_$ac_safe=yes"
12649 else
12650   echo "$ac_err" >&5
12651   echo "configure: failed program was:" >&5
12652   cat conftest.$ac_ext >&5
12653   rm -rf conftest*
12654   eval "ac_cv_header_$ac_safe=no"
12655 fi
12656 rm -f conftest*
12657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12658   echo "$ac_t""yes" 1>&6
12659   { test "$extra_verbose" = "yes" && cat << \EOF
12660     Defining HAVE_VFORK_H
12661 EOF
12662 cat >> confdefs.h <<\EOF
12663 #define HAVE_VFORK_H 1
12664 EOF
12665 }
12666
12667 else
12668   echo "$ac_t""no" 1>&6
12669 fi
12670
12671 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12672 echo "configure:12673: checking for working vfork" >&5
12673
12674 cat > conftest.$ac_ext <<EOF
12675 #line 12676 "configure"
12676 #include "confdefs.h"
12677 /* Thanks to Paul Eggert for this test.  */
12678 #include <stdio.h>
12679 #include <sys/types.h>
12680 #include <sys/stat.h>
12681 #ifdef HAVE_UNISTD_H
12682 #include <unistd.h>
12683 #endif
12684 #ifdef HAVE_VFORK_H
12685 #include <vfork.h>
12686 #endif
12687 /* On some sparc systems, changes by the child to local and incoming
12688    argument registers are propagated back to the parent.
12689    The compiler is told about this with #include <vfork.h>,
12690    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12691    Test for this by using a static variable whose address
12692    is put into a register that is clobbered by the vfork.  */
12693 static
12694 #ifdef __cplusplus
12695 sparc_address_test (int arg)
12696 #else
12697 sparc_address_test (arg) int arg;
12698 #endif
12699 {
12700   static pid_t child;
12701   if (!child) {
12702     child = vfork ();
12703     if (child < 0) {
12704       perror ("vfork");
12705       _exit(2);
12706     }
12707     if (!child) {
12708       arg = getpid();
12709       write(-1, "", 0);
12710       _exit (arg);
12711     }
12712   }
12713 }
12714 main() {
12715   pid_t parent = getpid ();
12716   pid_t child;
12717
12718   sparc_address_test ();
12719
12720   child = vfork ();
12721
12722   if (child == 0) {
12723     /* Here is another test for sparc vfork register problems.
12724        This test uses lots of local variables, at least
12725        as many local variables as main has allocated so far
12726        including compiler temporaries.  4 locals are enough for
12727        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12728        A buggy compiler should reuse the register of parent
12729        for one of the local variables, since it will think that
12730        parent can't possibly be used any more in this routine.
12731        Assigning to the local variable will thus munge parent
12732        in the parent process.  */
12733     pid_t
12734       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12735       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12736     /* Convince the compiler that p..p7 are live; otherwise, it might
12737        use the same hardware register for all 8 local variables.  */
12738     if (p != p1 || p != p2 || p != p3 || p != p4
12739         || p != p5 || p != p6 || p != p7)
12740       _exit(1);
12741
12742     /* On some systems (e.g. IRIX 3.3),
12743        vfork doesn't separate parent from child file descriptors.
12744        If the child closes a descriptor before it execs or exits,
12745        this munges the parent's descriptor as well.
12746        Test for this by closing stdout in the child.  */
12747     _exit(close(fileno(stdout)) != 0);
12748   } else {
12749     int status;
12750     struct stat st;
12751
12752     while (wait(&status) != child)
12753       ;
12754     exit(
12755          /* Was there some problem with vforking?  */
12756          child < 0
12757
12758          /* Did the child fail?  (This shouldn't happen.)  */
12759          || status
12760
12761          /* Did the vfork/compiler bug occur?  */
12762          || parent != getpid()
12763
12764          /* Did the file descriptor bug occur?  */
12765          || fstat(fileno(stdout), &st) != 0
12766          );
12767   }
12768 }
12769 EOF
12770 if { (eval echo configure:12771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12771 then
12772   ac_cv_func_vfork_works=yes
12773 else
12774   conftest_rc="$?"
12775   echo "configure: failed program was:" >&5
12776   cat conftest.$ac_ext >&5
12777   rm -fr conftest*
12778   ac_cv_func_vfork_works=no
12779 fi
12780 rm -fr conftest*
12781
12782 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12783 if test $ac_cv_func_vfork_works = no; then
12784   { test "$extra_verbose" = "yes" && cat << \EOF
12785     Defining vfork = fork
12786 EOF
12787 cat >> confdefs.h <<\EOF
12788 #define vfork fork
12789 EOF
12790 }
12791
12792 fi
12793
12794
12795 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12796 echo "configure:12797: checking for working strcoll" >&5
12797
12798 cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801 #include <string.h>
12802 main ()
12803 {
12804   exit (strcoll ("abc", "def") >= 0 ||
12805         strcoll ("ABC", "DEF") >= 0 ||
12806         strcoll ("123", "456") >= 0);
12807 }
12808 EOF
12809 if { (eval echo configure:12810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12810 then
12811   ac_cv_func_strcoll_works=yes
12812 else
12813   conftest_rc="$?"
12814   echo "configure: failed program was:" >&5
12815   cat conftest.$ac_ext >&5
12816   rm -fr conftest*
12817   ac_cv_func_strcoll_works=no
12818 fi
12819 rm -fr conftest*
12820
12821 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12822 if test $ac_cv_func_strcoll_works = yes; then
12823   { test "$extra_verbose" = "yes" && cat << \EOF
12824     Defining HAVE_STRCOLL
12825 EOF
12826 cat >> confdefs.h <<\EOF
12827 #define HAVE_STRCOLL 1
12828 EOF
12829 }
12830
12831 fi
12832
12833
12834 for ac_func in getpgrp
12835 do
12836 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12837 echo "configure:12838: checking for $ac_func" >&5
12838
12839 cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842 /* System header to define __stub macros and hopefully few prototypes,
12843     which can conflict with char $ac_func(); below.  */
12844 #include <assert.h>
12845 /* Override any gcc2 internal prototype to avoid an error.  */
12846 /* We use char because int might match the return type of a gcc2
12847     builtin and then its argument prototype would still apply.  */
12848 char $ac_func();
12849
12850 int main() {
12851
12852 /* The GNU C library defines this for functions which it implements
12853     to always fail with ENOSYS.  Some functions are actually named
12854     something starting with __ and the normal name is an alias.  */
12855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12856 choke me
12857 #else
12858 $ac_func();
12859 #endif
12860
12861 ; return 0; }
12862 EOF
12863 if { (eval echo configure:12864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12864   rm -rf conftest*
12865   eval "ac_cv_func_$ac_func=yes"
12866 else
12867   echo "configure: failed program was:" >&5
12868   cat conftest.$ac_ext >&5
12869   rm -rf conftest*
12870   eval "ac_cv_func_$ac_func=no"
12871 fi
12872 rm -f conftest*
12873
12874 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12875   echo "$ac_t""yes" 1>&6
12876     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12877   { test "$extra_verbose" = "yes" && cat << EOF
12878     Defining $ac_tr_func
12879 EOF
12880 cat >> confdefs.h <<EOF
12881 #define $ac_tr_func 1
12882 EOF
12883 }
12884  
12885 else
12886   echo "$ac_t""no" 1>&6
12887 fi
12888 done
12889
12890 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12891 echo "configure:12892: checking whether getpgrp takes no argument" >&5
12892
12893 cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896
12897 /*
12898  * If this system has a BSD-style getpgrp(),
12899  * which takes a pid argument, exit unsuccessfully.
12900  *
12901  * Snarfed from Chet Ramey's bash pgrp.c test program
12902  */
12903 #include <stdio.h>
12904 #include <sys/types.h>
12905
12906 int     pid;
12907 int     pg1, pg2, pg3, pg4;
12908 int     ng, np, s, child;
12909
12910 main()
12911 {
12912         pid = getpid();
12913         pg1 = getpgrp(0);
12914         pg2 = getpgrp();
12915         pg3 = getpgrp(pid);
12916         pg4 = getpgrp(1);
12917
12918         /*
12919          * If all of these values are the same, it's pretty sure that
12920          * we're on a system that ignores getpgrp's first argument.
12921          */
12922         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12923                 exit(0);
12924
12925         child = fork();
12926         if (child < 0)
12927                 exit(1);
12928         else if (child == 0) {
12929                 np = getpid();
12930                 /*
12931                  * If this is Sys V, this will not work; pgrp will be
12932                  * set to np because setpgrp just changes a pgrp to be
12933                  * the same as the pid.
12934                  */
12935                 setpgrp(np, pg1);
12936                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12937                 if (ng == pg1) {
12938                         exit(1);
12939                 } else {
12940                         exit(0);
12941                 }
12942         } else {
12943                 wait(&s);
12944                 exit(s>>8);
12945         }
12946 }
12947
12948 EOF
12949 if { (eval echo configure:12950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12950 then
12951   ac_cv_func_getpgrp_void=yes
12952 else
12953   conftest_rc="$?"
12954   echo "configure: failed program was:" >&5
12955   cat conftest.$ac_ext >&5
12956   rm -fr conftest*
12957   ac_cv_func_getpgrp_void=no
12958 fi
12959 rm -fr conftest*
12960
12961
12962 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12963 if test $ac_cv_func_getpgrp_void = yes; then
12964   { test "$extra_verbose" = "yes" && cat << \EOF
12965     Defining GETPGRP_VOID
12966 EOF
12967 cat >> confdefs.h <<\EOF
12968 #define GETPGRP_VOID 1
12969 EOF
12970 }
12971
12972 fi
12973
12974
12975 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12976 echo "configure:12977: checking for working mmap" >&5
12977 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12978 cat > conftest.$ac_ext <<EOF
12979 #line 12980 "configure"
12980 #include "confdefs.h"
12981 #include <stdio.h>
12982 #include <unistd.h>
12983 #include <fcntl.h>
12984 #include <sys/mman.h>
12985
12986 #ifndef MAP_VARIABLE
12987 #define MAP_VARIABLE 0
12988 #endif
12989
12990 #ifndef MAP_FAILED
12991 #define MAP_FAILED -1
12992 #endif
12993
12994 int main (int argc, char *argv[])
12995 {
12996   int fd = -1;
12997   caddr_t p;
12998 #ifndef MAP_ANONYMOUS
12999   fd = open ("/dev/zero", O_RDWR);
13000   if (fd < 0)
13001     return 1;
13002 #define MAP_ANONYMOUS 0
13003 #endif
13004   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
13005            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
13006            fd, 0) != (void *) MAP_FAILED)
13007     return 0;
13008   perror ("conftest: mmap failed");
13009   return 1;
13010 }
13011 EOF
13012 if { (eval echo configure:13013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13013 then
13014   have_mmap=yes
13015 else
13016   conftest_rc="$?"
13017   echo "configure: failed program was:" >&5
13018   cat conftest.$ac_ext >&5
13019   rm -fr conftest*
13020   have_mmap=no
13021 fi
13022 rm -fr conftest* ;;
13023 esac
13024 echo "$ac_t""$have_mmap" 1>&6
13025 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13026     Defining HAVE_MMAP
13027 EOF
13028 cat >> confdefs.h <<\EOF
13029 #define HAVE_MMAP 1
13030 EOF
13031 }
13032
13033
13034 case "$opsys" in cygwin*) 
13035         test "$rel_alloc" = "default" && rel_alloc=no ;;
13036 esac
13037 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
13038 if test "$rel_alloc $have_mmap" = "default yes"; then
13039   if test "$doug_lea_malloc" = "yes"; then
13040         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
13041 echo "configure:13042: checking for M_MMAP_THRESHOLD" >&5
13042     cat > conftest.$ac_ext <<EOF
13043 #line 13044 "configure"
13044 #include "confdefs.h"
13045 #include <malloc.h>
13046 int main() {
13047
13048 #ifndef M_MMAP_THRESHOLD
13049 #error No M_MMAP_THRESHOLD :-(
13050 !@+$%^&*_)(_ - unlikely to compile...
13051 #endif
13052
13053 ; return 0; }
13054 EOF
13055 if { (eval echo configure:13056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13056   rm -rf conftest*
13057   rel_alloc=no; echo "$ac_t""yes" 1>&6;
13058 else
13059   echo "configure: failed program was:" >&5
13060   cat conftest.$ac_ext >&5
13061   rm -rf conftest*
13062   rel_alloc=yes; echo "$ac_t""no" 1>&6;
13063 fi
13064 rm -f conftest*
13065   else
13066     rel_alloc=yes
13067   fi
13068 fi
13069 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13070     Defining REL_ALLOC
13071 EOF
13072 cat >> confdefs.h <<\EOF
13073 #define REL_ALLOC 1
13074 EOF
13075 }
13076
13077
13078 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
13079 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
13080 echo "configure:13081: checking for termios.h" >&5
13081
13082 cat > conftest.$ac_ext <<EOF
13083 #line 13084 "configure"
13084 #include "confdefs.h"
13085 #include <termios.h>
13086 EOF
13087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13088 { (eval echo configure:13089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13090 if test -z "$ac_err"; then
13091   rm -rf conftest*
13092   eval "ac_cv_header_$ac_safe=yes"
13093 else
13094   echo "$ac_err" >&5
13095   echo "configure: failed program was:" >&5
13096   cat conftest.$ac_ext >&5
13097   rm -rf conftest*
13098   eval "ac_cv_header_$ac_safe=no"
13099 fi
13100 rm -f conftest*
13101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13102   echo "$ac_t""yes" 1>&6
13103   { test "$extra_verbose" = "yes" && cat << \EOF
13104     Defining HAVE_TERMIOS
13105 EOF
13106 cat >> confdefs.h <<\EOF
13107 #define HAVE_TERMIOS 1
13108 EOF
13109 }
13110
13111   { test "$extra_verbose" = "yes" && cat << \EOF
13112     Defining SIGNALS_VIA_CHARACTERS
13113 EOF
13114 cat >> confdefs.h <<\EOF
13115 #define SIGNALS_VIA_CHARACTERS 1
13116 EOF
13117 }
13118
13119   { test "$extra_verbose" = "yes" && cat << \EOF
13120     Defining NO_TERMIO
13121 EOF
13122 cat >> confdefs.h <<\EOF
13123 #define NO_TERMIO 1
13124 EOF
13125 }
13126
13127 else
13128   echo "$ac_t""no" 1>&6
13129 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
13130 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
13131 echo "configure:13132: checking for termio.h" >&5
13132
13133 cat > conftest.$ac_ext <<EOF
13134 #line 13135 "configure"
13135 #include "confdefs.h"
13136 #include <termio.h>
13137 EOF
13138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13139 { (eval echo configure:13140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13141 if test -z "$ac_err"; then
13142   rm -rf conftest*
13143   eval "ac_cv_header_$ac_safe=yes"
13144 else
13145   echo "$ac_err" >&5
13146   echo "configure: failed program was:" >&5
13147   cat conftest.$ac_ext >&5
13148   rm -rf conftest*
13149   eval "ac_cv_header_$ac_safe=no"
13150 fi
13151 rm -f conftest*
13152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13153   echo "$ac_t""yes" 1>&6
13154   { test "$extra_verbose" = "yes" && cat << \EOF
13155     Defining HAVE_TERMIO
13156 EOF
13157 cat >> confdefs.h <<\EOF
13158 #define HAVE_TERMIO 1
13159 EOF
13160 }
13161
13162 else
13163   echo "$ac_t""no" 1>&6
13164 fi
13165
13166 fi
13167
13168
13169
13170 echo $ac_n "checking for socket""... $ac_c" 1>&6
13171 echo "configure:13172: checking for socket" >&5
13172
13173 cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 /* System header to define __stub macros and hopefully few prototypes,
13177     which can conflict with char socket(); below.  */
13178 #include <assert.h>
13179 /* Override any gcc2 internal prototype to avoid an error.  */
13180 /* We use char because int might match the return type of a gcc2
13181     builtin and then its argument prototype would still apply.  */
13182 char socket();
13183
13184 int main() {
13185
13186 /* The GNU C library defines this for functions which it implements
13187     to always fail with ENOSYS.  Some functions are actually named
13188     something starting with __ and the normal name is an alias.  */
13189 #if defined (__stub_socket) || defined (__stub___socket)
13190 choke me
13191 #else
13192 socket();
13193 #endif
13194
13195 ; return 0; }
13196 EOF
13197 if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13198   rm -rf conftest*
13199   eval "ac_cv_func_socket=yes"
13200 else
13201   echo "configure: failed program was:" >&5
13202   cat conftest.$ac_ext >&5
13203   rm -rf conftest*
13204   eval "ac_cv_func_socket=no"
13205 fi
13206 rm -f conftest*
13207
13208 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
13209   echo "$ac_t""yes" 1>&6
13210   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
13211 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
13212 echo "configure:13213: checking for netinet/in.h" >&5
13213
13214 cat > conftest.$ac_ext <<EOF
13215 #line 13216 "configure"
13216 #include "confdefs.h"
13217 #include <netinet/in.h>
13218 EOF
13219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13220 { (eval echo configure:13221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13222 if test -z "$ac_err"; then
13223   rm -rf conftest*
13224   eval "ac_cv_header_$ac_safe=yes"
13225 else
13226   echo "$ac_err" >&5
13227   echo "configure: failed program was:" >&5
13228   cat conftest.$ac_ext >&5
13229   rm -rf conftest*
13230   eval "ac_cv_header_$ac_safe=no"
13231 fi
13232 rm -f conftest*
13233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13234   echo "$ac_t""yes" 1>&6
13235   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
13236 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
13237 echo "configure:13238: checking for arpa/inet.h" >&5
13238
13239 cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242 #include <arpa/inet.h>
13243 EOF
13244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13245 { (eval echo configure:13246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13247 if test -z "$ac_err"; then
13248   rm -rf conftest*
13249   eval "ac_cv_header_$ac_safe=yes"
13250 else
13251   echo "$ac_err" >&5
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -rf conftest*
13255   eval "ac_cv_header_$ac_safe=no"
13256 fi
13257 rm -f conftest*
13258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13259   echo "$ac_t""yes" 1>&6
13260   
13261   { test "$extra_verbose" = "yes" && cat << \EOF
13262     Defining HAVE_SOCKETS
13263 EOF
13264 cat >> confdefs.h <<\EOF
13265 #define HAVE_SOCKETS 1
13266 EOF
13267 }
13268
13269       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
13270 echo "configure:13271: checking "for sun_len member in struct sockaddr_un"" >&5
13271       cat > conftest.$ac_ext <<EOF
13272 #line 13273 "configure"
13273 #include "confdefs.h"
13274
13275 #include <sys/types.h>
13276 #include <sys/socket.h>
13277 #include <sys/un.h>
13278       
13279 int main() {
13280 static struct sockaddr_un x; x.sun_len = 1;
13281 ; return 0; }
13282 EOF
13283 if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13284   rm -rf conftest*
13285   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13286     Defining HAVE_SOCKADDR_SUN_LEN
13287 EOF
13288 cat >> confdefs.h <<\EOF
13289 #define HAVE_SOCKADDR_SUN_LEN 1
13290 EOF
13291 }
13292
13293 else
13294   echo "configure: failed program was:" >&5
13295   cat conftest.$ac_ext >&5
13296   rm -rf conftest*
13297   echo "$ac_t""no" 1>&6
13298 fi
13299 rm -f conftest*
13300       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
13301 echo "configure:13302: checking "for ip_mreq struct in netinet/in.h"" >&5
13302       cat > conftest.$ac_ext <<EOF
13303 #line 13304 "configure"
13304 #include "confdefs.h"
13305
13306 #include <sys/types.h>
13307 #include <netinet/in.h>
13308       
13309 int main() {
13310 static struct ip_mreq x;
13311 ; return 0; }
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13314   rm -rf conftest*
13315   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13316     Defining HAVE_MULTICAST
13317 EOF
13318 cat >> confdefs.h <<\EOF
13319 #define HAVE_MULTICAST 1
13320 EOF
13321 }
13322
13323 else
13324   echo "configure: failed program was:" >&5
13325   cat conftest.$ac_ext >&5
13326   rm -rf conftest*
13327   echo "$ac_t""no" 1>&6
13328 fi
13329 rm -f conftest*
13330 else
13331   echo "$ac_t""no" 1>&6
13332 fi
13333
13334 else
13335   echo "$ac_t""no" 1>&6
13336 fi
13337
13338 else
13339   echo "$ac_t""no" 1>&6
13340 fi
13341
13342
13343 echo $ac_n "checking for msgget""... $ac_c" 1>&6
13344 echo "configure:13345: checking for msgget" >&5
13345
13346 cat > conftest.$ac_ext <<EOF
13347 #line 13348 "configure"
13348 #include "confdefs.h"
13349 /* System header to define __stub macros and hopefully few prototypes,
13350     which can conflict with char msgget(); below.  */
13351 #include <assert.h>
13352 /* Override any gcc2 internal prototype to avoid an error.  */
13353 /* We use char because int might match the return type of a gcc2
13354     builtin and then its argument prototype would still apply.  */
13355 char msgget();
13356
13357 int main() {
13358
13359 /* The GNU C library defines this for functions which it implements
13360     to always fail with ENOSYS.  Some functions are actually named
13361     something starting with __ and the normal name is an alias.  */
13362 #if defined (__stub_msgget) || defined (__stub___msgget)
13363 choke me
13364 #else
13365 msgget();
13366 #endif
13367
13368 ; return 0; }
13369 EOF
13370 if { (eval echo configure:13371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13371   rm -rf conftest*
13372   eval "ac_cv_func_msgget=yes"
13373 else
13374   echo "configure: failed program was:" >&5
13375   cat conftest.$ac_ext >&5
13376   rm -rf conftest*
13377   eval "ac_cv_func_msgget=no"
13378 fi
13379 rm -f conftest*
13380
13381 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13382   echo "$ac_t""yes" 1>&6
13383   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13384 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13385 echo "configure:13386: checking for sys/ipc.h" >&5
13386
13387 cat > conftest.$ac_ext <<EOF
13388 #line 13389 "configure"
13389 #include "confdefs.h"
13390 #include <sys/ipc.h>
13391 EOF
13392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13393 { (eval echo configure:13394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13395 if test -z "$ac_err"; then
13396   rm -rf conftest*
13397   eval "ac_cv_header_$ac_safe=yes"
13398 else
13399   echo "$ac_err" >&5
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402   rm -rf conftest*
13403   eval "ac_cv_header_$ac_safe=no"
13404 fi
13405 rm -f conftest*
13406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13407   echo "$ac_t""yes" 1>&6
13408   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13409 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13410 echo "configure:13411: checking for sys/msg.h" >&5
13411
13412 cat > conftest.$ac_ext <<EOF
13413 #line 13414 "configure"
13414 #include "confdefs.h"
13415 #include <sys/msg.h>
13416 EOF
13417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13418 { (eval echo configure:13419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13420 if test -z "$ac_err"; then
13421   rm -rf conftest*
13422   eval "ac_cv_header_$ac_safe=yes"
13423 else
13424   echo "$ac_err" >&5
13425   echo "configure: failed program was:" >&5
13426   cat conftest.$ac_ext >&5
13427   rm -rf conftest*
13428   eval "ac_cv_header_$ac_safe=no"
13429 fi
13430 rm -f conftest*
13431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13432   echo "$ac_t""yes" 1>&6
13433   { test "$extra_verbose" = "yes" && cat << \EOF
13434     Defining HAVE_SYSVIPC
13435 EOF
13436 cat >> confdefs.h <<\EOF
13437 #define HAVE_SYSVIPC 1
13438 EOF
13439 }
13440
13441 else
13442   echo "$ac_t""no" 1>&6
13443 fi
13444
13445 else
13446   echo "$ac_t""no" 1>&6
13447 fi
13448
13449 else
13450   echo "$ac_t""no" 1>&6
13451 fi
13452
13453
13454 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13455 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13456 echo "configure:13457: checking for dirent.h" >&5
13457
13458 cat > conftest.$ac_ext <<EOF
13459 #line 13460 "configure"
13460 #include "confdefs.h"
13461 #include <dirent.h>
13462 EOF
13463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13464 { (eval echo configure:13465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13466 if test -z "$ac_err"; then
13467   rm -rf conftest*
13468   eval "ac_cv_header_$ac_safe=yes"
13469 else
13470   echo "$ac_err" >&5
13471   echo "configure: failed program was:" >&5
13472   cat conftest.$ac_ext >&5
13473   rm -rf conftest*
13474   eval "ac_cv_header_$ac_safe=no"
13475 fi
13476 rm -f conftest*
13477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13478   echo "$ac_t""yes" 1>&6
13479   { test "$extra_verbose" = "yes" && cat << \EOF
13480     Defining SYSV_SYSTEM_DIR
13481 EOF
13482 cat >> confdefs.h <<\EOF
13483 #define SYSV_SYSTEM_DIR 1
13484 EOF
13485 }
13486
13487 else
13488   echo "$ac_t""no" 1>&6
13489 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13490 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13491 echo "configure:13492: checking for sys/dir.h" >&5
13492
13493 cat > conftest.$ac_ext <<EOF
13494 #line 13495 "configure"
13495 #include "confdefs.h"
13496 #include <sys/dir.h>
13497 EOF
13498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13499 { (eval echo configure:13500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13501 if test -z "$ac_err"; then
13502   rm -rf conftest*
13503   eval "ac_cv_header_$ac_safe=yes"
13504 else
13505   echo "$ac_err" >&5
13506   echo "configure: failed program was:" >&5
13507   cat conftest.$ac_ext >&5
13508   rm -rf conftest*
13509   eval "ac_cv_header_$ac_safe=no"
13510 fi
13511 rm -f conftest*
13512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13513   echo "$ac_t""yes" 1>&6
13514   :
13515 else
13516   echo "$ac_t""no" 1>&6
13517 { test "$extra_verbose" = "yes" && cat << \EOF
13518     Defining NONSYSTEM_DIR_LIBRARY
13519 EOF
13520 cat >> confdefs.h <<\EOF
13521 #define NONSYSTEM_DIR_LIBRARY 1
13522 EOF
13523 }
13524
13525 fi
13526
13527 fi
13528
13529
13530 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13531 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13532 echo "configure:13533: checking for nlist.h" >&5
13533
13534 cat > conftest.$ac_ext <<EOF
13535 #line 13536 "configure"
13536 #include "confdefs.h"
13537 #include <nlist.h>
13538 EOF
13539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13540 { (eval echo configure:13541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13542 if test -z "$ac_err"; then
13543   rm -rf conftest*
13544   eval "ac_cv_header_$ac_safe=yes"
13545 else
13546   echo "$ac_err" >&5
13547   echo "configure: failed program was:" >&5
13548   cat conftest.$ac_ext >&5
13549   rm -rf conftest*
13550   eval "ac_cv_header_$ac_safe=no"
13551 fi
13552 rm -f conftest*
13553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13554   echo "$ac_t""yes" 1>&6
13555   { test "$extra_verbose" = "yes" && cat << \EOF
13556     Defining NLIST_STRUCT
13557 EOF
13558 cat >> confdefs.h <<\EOF
13559 #define NLIST_STRUCT 1
13560 EOF
13561 }
13562
13563 else
13564   echo "$ac_t""no" 1>&6
13565 fi
13566
13567
13568
13569 echo "checking "for sound support"" 1>&6
13570 echo "configure:13571: checking "for sound support"" >&5
13571 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13572
13573 if test "$with_native_sound" != "no"; then
13574     if test -n "$native_sound_lib"; then
13575     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13576 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13577 echo "configure:13578: checking for multimedia/audio_device.h" >&5
13578
13579 cat > conftest.$ac_ext <<EOF
13580 #line 13581 "configure"
13581 #include "confdefs.h"
13582 #include <multimedia/audio_device.h>
13583 EOF
13584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13585 { (eval echo configure:13586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13587 if test -z "$ac_err"; then
13588   rm -rf conftest*
13589   eval "ac_cv_header_$ac_safe=yes"
13590 else
13591   echo "$ac_err" >&5
13592   echo "configure: failed program was:" >&5
13593   cat conftest.$ac_ext >&5
13594   rm -rf conftest*
13595   eval "ac_cv_header_$ac_safe=no"
13596 fi
13597 rm -f conftest*
13598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13599   echo "$ac_t""yes" 1>&6
13600   sound_found=yes sound_cflags=""
13601       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13602    echo "    xemacs will be linked with \"sunplay.o\""
13603  fi
13604 else
13605   echo "$ac_t""no" 1>&6
13606 fi
13607
13608   fi
13609
13610     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13611     if test -d "/usr/demo/SOUND/include/multimedia"; then
13612       sun_sound_cflags="-I/usr/demo/SOUND/include"
13613     elif test -d "/usr/demo/SOUND/multimedia"; then
13614       sun_sound_cflags="-I/usr/demo/SOUND"
13615     fi
13616
13617     if test -n "$native_sound_lib"; then
13618       sun_sound_lib="$native_sound_lib"
13619     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13620       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13621     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13622       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13623     fi
13624
13625     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13626       native_sound_lib="$sun_sound_lib"
13627       sound_cflags="$sun_sound_cflags"
13628       sound_found=yes
13629       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13630    echo "    xemacs will be linked with \"sunplay.o\""
13631  fi
13632     fi
13633   fi
13634
13635     if test -z "$sound_found"; then
13636     case "$canonical" in
13637     *-sgi-* )
13638       if test -z "$native_sound_lib"; then
13639         
13640 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13641 echo "configure:13642: checking for ALopenport in -laudio" >&5
13642 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13643
13644 xe_check_libs=" -laudio "
13645 cat > conftest.$ac_ext <<EOF
13646 #line 13647 "configure"
13647 #include "confdefs.h"
13648 /* Override any gcc2 internal prototype to avoid an error.  */
13649 /* We use char because int might match the return type of a gcc2
13650     builtin and then its argument prototype would still apply.  */
13651 char ALopenport();
13652
13653 int main() {
13654 ALopenport()
13655 ; return 0; }
13656 EOF
13657 if { (eval echo configure:13658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13658   rm -rf conftest*
13659   eval "ac_cv_lib_$ac_lib_var=yes"
13660 else
13661   echo "configure: failed program was:" >&5
13662   cat conftest.$ac_ext >&5
13663   rm -rf conftest*
13664   eval "ac_cv_lib_$ac_lib_var=no"
13665 fi
13666 rm -f conftest*
13667 xe_check_libs=""
13668
13669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13670   echo "$ac_t""yes" 1>&6
13671   native_sound_lib="-laudio"
13672 else
13673   echo "$ac_t""no" 1>&6
13674 fi
13675
13676
13677       fi
13678       if test -n "$native_sound_lib"; then
13679         sound_found=yes sound_cflags=""
13680         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13681    echo "    xemacs will be linked with \"sgiplay.o\""
13682  fi
13683       fi ;;
13684     hppa*-hp-hpux* )
13685       if test -z "$native_sound_lib"; then
13686         
13687 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13688 echo "configure:13689: checking for AOpenAudio in -lAlib" >&5
13689 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13690
13691 xe_check_libs=" -lAlib "
13692 cat > conftest.$ac_ext <<EOF
13693 #line 13694 "configure"
13694 #include "confdefs.h"
13695 /* Override any gcc2 internal prototype to avoid an error.  */
13696 /* We use char because int might match the return type of a gcc2
13697     builtin and then its argument prototype would still apply.  */
13698 char AOpenAudio();
13699
13700 int main() {
13701 AOpenAudio()
13702 ; return 0; }
13703 EOF
13704 if { (eval echo configure:13705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13705   rm -rf conftest*
13706   eval "ac_cv_lib_$ac_lib_var=yes"
13707 else
13708   echo "configure: failed program was:" >&5
13709   cat conftest.$ac_ext >&5
13710   rm -rf conftest*
13711   eval "ac_cv_lib_$ac_lib_var=no"
13712 fi
13713 rm -f conftest*
13714 xe_check_libs=""
13715
13716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13717   echo "$ac_t""yes" 1>&6
13718   native_sound_lib="-lAlib"
13719 else
13720   echo "$ac_t""no" 1>&6
13721 fi
13722
13723
13724       fi
13725       if test -n "$native_sound_lib"; then
13726         sound_found=yes
13727         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13728    echo "    xemacs will be linked with \"hpplay.o\""
13729  fi
13730         if test "$GCC" = "yes" # Kludge city
13731           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13732           else sound_cflags="+e -I/usr/audio/examples"
13733         fi
13734       fi ;;
13735     esac
13736   fi
13737
13738     if test -z "$sound_found"; then
13739     if test "$with_msw" = "yes"; then
13740     sound_found=yes
13741     native_sound_lib=
13742     fi
13743   fi
13744
13745     if test -z "$sound_found"; then
13746     for dir in "machine" "sys" "linux"; do
13747       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13748 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13749 echo "configure:13750: checking for ${dir}/soundcard.h" >&5
13750
13751 cat > conftest.$ac_ext <<EOF
13752 #line 13753 "configure"
13753 #include "confdefs.h"
13754 #include <${dir}/soundcard.h>
13755 EOF
13756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13757 { (eval echo configure:13758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13759 if test -z "$ac_err"; then
13760   rm -rf conftest*
13761   eval "ac_cv_header_$ac_safe=yes"
13762 else
13763   echo "$ac_err" >&5
13764   echo "configure: failed program was:" >&5
13765   cat conftest.$ac_ext >&5
13766   rm -rf conftest*
13767   eval "ac_cv_header_$ac_safe=no"
13768 fi
13769 rm -f conftest*
13770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13771   echo "$ac_t""yes" 1>&6
13772   sound_found=yes
13773        need_miscplay=yes
13774         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13775    echo "    xemacs will be linked with \"linuxplay.o\""
13776  fi
13777         { test "$extra_verbose" = "yes" && cat << EOF
13778     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13779 EOF
13780 cat >> confdefs.h <<EOF
13781 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13782 EOF
13783 }
13784
13785         break
13786 else
13787   echo "$ac_t""no" 1>&6
13788 fi
13789
13790     done
13791   fi
13792
13793   test "$sound_found" = "yes" && with_native_sound=yes
13794 fi
13795
13796 if test "$with_native_sound" = "yes"; then
13797   { test "$extra_verbose" = "yes" && cat << \EOF
13798     Defining HAVE_NATIVE_SOUND
13799 EOF
13800 cat >> confdefs.h <<\EOF
13801 #define HAVE_NATIVE_SOUND 1
13802 EOF
13803 }
13804
13805   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13806 fi
13807
13808 if test "$with_nas_sound" != "no"; then
13809   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13810 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13811 echo "configure:13812: checking for audio/audiolib.h" >&5
13812
13813 cat > conftest.$ac_ext <<EOF
13814 #line 13815 "configure"
13815 #include "confdefs.h"
13816 #include <audio/audiolib.h>
13817 EOF
13818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13819 { (eval echo configure:13820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13821 if test -z "$ac_err"; then
13822   rm -rf conftest*
13823   eval "ac_cv_header_$ac_safe=yes"
13824 else
13825   echo "$ac_err" >&5
13826   echo "configure: failed program was:" >&5
13827   cat conftest.$ac_ext >&5
13828   rm -rf conftest*
13829   eval "ac_cv_header_$ac_safe=no"
13830 fi
13831 rm -f conftest*
13832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13833   echo "$ac_t""yes" 1>&6
13834   
13835     
13836 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13837 echo "configure:13838: checking for AuOpenServer in -laudio" >&5
13838 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13839
13840 xe_check_libs=" -laudio "
13841 cat > conftest.$ac_ext <<EOF
13842 #line 13843 "configure"
13843 #include "confdefs.h"
13844 /* Override any gcc2 internal prototype to avoid an error.  */
13845 /* We use char because int might match the return type of a gcc2
13846     builtin and then its argument prototype would still apply.  */
13847 char AuOpenServer();
13848
13849 int main() {
13850 AuOpenServer()
13851 ; return 0; }
13852 EOF
13853 if { (eval echo configure:13854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13854   rm -rf conftest*
13855   eval "ac_cv_lib_$ac_lib_var=yes"
13856 else
13857   echo "configure: failed program was:" >&5
13858   cat conftest.$ac_ext >&5
13859   rm -rf conftest*
13860   eval "ac_cv_lib_$ac_lib_var=no"
13861 fi
13862 rm -f conftest*
13863 xe_check_libs=""
13864
13865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13866   echo "$ac_t""yes" 1>&6
13867   have_nas_sound=yes
13868 else
13869   echo "$ac_t""no" 1>&6
13870 fi
13871
13872
13873 else
13874   echo "$ac_t""no" 1>&6
13875 fi
13876
13877   if test "$have_nas_sound" = "yes"; then
13878     with_nas_sound=yes
13879     { test "$extra_verbose" = "yes" && cat << \EOF
13880     Defining HAVE_NAS_SOUND
13881 EOF
13882 cat >> confdefs.h <<\EOF
13883 #define HAVE_NAS_SOUND 1
13884 EOF
13885 }
13886
13887     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13888    echo "    xemacs will be linked with \"nas.o\""
13889  fi
13890     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13891             cat > conftest.$ac_ext <<EOF
13892 #line 13893 "configure"
13893 #include "confdefs.h"
13894 #include <audio/Xtutil.h>
13895 EOF
13896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13897   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13898   :
13899 else
13900   rm -rf conftest*
13901   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13902     Defining NAS_NO_ERROR_JUMP
13903 EOF
13904 cat >> confdefs.h <<\EOF
13905 #define NAS_NO_ERROR_JUMP 1
13906 EOF
13907 }
13908
13909 fi
13910 rm -f conftest*
13911
13912   else
13913     test "$with_nas_sound" = "yes" && \
13914       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13915     with_nas_sound=no
13916   fi
13917 fi
13918
13919 if test "$with_esd_sound" != "no"; then
13920   # Extract the first word of "esd-config", so it can be a program name with args.
13921 set dummy esd-config; ac_word=$2
13922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13923 echo "configure:13924: checking for $ac_word" >&5
13924
13925 if test -n "$have_esd_config"; then
13926   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13927 else
13928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13929   ac_dummy="$PATH"
13930   for ac_dir in $ac_dummy; do
13931     test -z "$ac_dir" && ac_dir=.
13932     if test -f $ac_dir/$ac_word; then
13933       ac_cv_prog_have_esd_config="yes"
13934       break
13935     fi
13936   done
13937   IFS="$ac_save_ifs"
13938   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13939 fi
13940 have_esd_config="$ac_cv_prog_have_esd_config"
13941 if test -n "$have_esd_config"; then
13942   echo "$ac_t""$have_esd_config" 1>&6
13943 else
13944   echo "$ac_t""no" 1>&6
13945 fi
13946
13947   if test "$have_esd_config" = "yes"; then
13948     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13949     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
13950     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13951     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13952 echo "configure:13953: checking for esd_play_stream" >&5
13953
13954 cat > conftest.$ac_ext <<EOF
13955 #line 13956 "configure"
13956 #include "confdefs.h"
13957 /* System header to define __stub macros and hopefully few prototypes,
13958     which can conflict with char esd_play_stream(); below.  */
13959 #include <assert.h>
13960 /* Override any gcc2 internal prototype to avoid an error.  */
13961 /* We use char because int might match the return type of a gcc2
13962     builtin and then its argument prototype would still apply.  */
13963 char esd_play_stream();
13964
13965 int main() {
13966
13967 /* The GNU C library defines this for functions which it implements
13968     to always fail with ENOSYS.  Some functions are actually named
13969     something starting with __ and the normal name is an alias.  */
13970 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13971 choke me
13972 #else
13973 esd_play_stream();
13974 #endif
13975
13976 ; return 0; }
13977 EOF
13978 if { (eval echo configure:13979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13979   rm -rf conftest*
13980   eval "ac_cv_func_esd_play_stream=yes"
13981 else
13982   echo "configure: failed program was:" >&5
13983   cat conftest.$ac_ext >&5
13984   rm -rf conftest*
13985   eval "ac_cv_func_esd_play_stream=no"
13986 fi
13987 rm -f conftest*
13988
13989 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13990   echo "$ac_t""yes" 1>&6
13991   have_esd_sound=yes
13992 else
13993   echo "$ac_t""no" 1>&6
13994 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13995 fi
13996
13997   fi
13998
13999   if test "$have_esd_sound" = "yes"; then
14000     with_esd_sound=yes
14001     need_miscplay=yes
14002     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
14003    echo "    xemacs will be linked with \"esd.o\""
14004  fi
14005     { test "$extra_verbose" = "yes" && cat << \EOF
14006     Defining HAVE_ESD_SOUND
14007 EOF
14008 cat >> confdefs.h <<\EOF
14009 #define HAVE_ESD_SOUND 1
14010 EOF
14011 }
14012
14013   else
14014     test "$with_esd_sound" = "yes" && \
14015       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
14016     with_esd_sound=no
14017   fi
14018 fi
14019
14020 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
14021    echo "    xemacs will be linked with \"miscplay.o\""
14022  fi
14023
14024
14025 test -z "$with_tty" && with_tty=yes
14026
14027 if test "$with_tty" = "yes"  ; then
14028   echo "checking for TTY-related features" 1>&6
14029 echo "configure:14030: checking for TTY-related features" >&5
14030   { test "$extra_verbose" = "yes" && cat << \EOF
14031     Defining HAVE_TTY
14032 EOF
14033 cat >> confdefs.h <<\EOF
14034 #define HAVE_TTY 1
14035 EOF
14036 }
14037
14038   extra_objs="$extra_objs console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o" &&  if test "$extra_verbose" = "yes"; then
14039    echo "    xemacs will be linked with \"console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o\""
14040  fi
14041
14042     if test -z "$with_ncurses"; then
14043     
14044 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
14045 echo "configure:14046: checking for tgetent in -lncurses" >&5
14046 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
14047
14048 xe_check_libs=" -lncurses "
14049 cat > conftest.$ac_ext <<EOF
14050 #line 14051 "configure"
14051 #include "confdefs.h"
14052 /* Override any gcc2 internal prototype to avoid an error.  */
14053 /* We use char because int might match the return type of a gcc2
14054     builtin and then its argument prototype would still apply.  */
14055 char tgetent();
14056
14057 int main() {
14058 tgetent()
14059 ; return 0; }
14060 EOF
14061 if { (eval echo configure:14062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14062   rm -rf conftest*
14063   eval "ac_cv_lib_$ac_lib_var=yes"
14064 else
14065   echo "configure: failed program was:" >&5
14066   cat conftest.$ac_ext >&5
14067   rm -rf conftest*
14068   eval "ac_cv_lib_$ac_lib_var=no"
14069 fi
14070 rm -f conftest*
14071 xe_check_libs=""
14072
14073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14074   echo "$ac_t""yes" 1>&6
14075   with_ncurses=yes
14076 else
14077   echo "$ac_t""no" 1>&6
14078 with_ncurses=no
14079 fi
14080
14081
14082   fi
14083   if test "$with_ncurses" = "yes"; then
14084     { test "$extra_verbose" = "yes" && cat << \EOF
14085     Defining HAVE_NCURSES
14086 EOF
14087 cat >> confdefs.h <<\EOF
14088 #define HAVE_NCURSES 1
14089 EOF
14090 }
14091
14092     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
14093 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
14094 echo "configure:14095: checking for ncurses/curses.h" >&5
14095
14096 cat > conftest.$ac_ext <<EOF
14097 #line 14098 "configure"
14098 #include "confdefs.h"
14099 #include <ncurses/curses.h>
14100 EOF
14101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14102 { (eval echo configure:14103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14104 if test -z "$ac_err"; then
14105   rm -rf conftest*
14106   eval "ac_cv_header_$ac_safe=yes"
14107 else
14108   echo "$ac_err" >&5
14109   echo "configure: failed program was:" >&5
14110   cat conftest.$ac_ext >&5
14111   rm -rf conftest*
14112   eval "ac_cv_header_$ac_safe=no"
14113 fi
14114 rm -f conftest*
14115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14116   echo "$ac_t""yes" 1>&6
14117   curses_h_file=ncurses/curses.h
14118 else
14119   echo "$ac_t""no" 1>&6
14120 fi
14121
14122     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
14123 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
14124 echo "configure:14125: checking for ncurses/term.h" >&5
14125
14126 cat > conftest.$ac_ext <<EOF
14127 #line 14128 "configure"
14128 #include "confdefs.h"
14129 #include <ncurses/term.h>
14130 EOF
14131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14132 { (eval echo configure:14133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14134 if test -z "$ac_err"; then
14135   rm -rf conftest*
14136   eval "ac_cv_header_$ac_safe=yes"
14137 else
14138   echo "$ac_err" >&5
14139   echo "configure: failed program was:" >&5
14140   cat conftest.$ac_ext >&5
14141   rm -rf conftest*
14142   eval "ac_cv_header_$ac_safe=no"
14143 fi
14144 rm -f conftest*
14145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14146   echo "$ac_t""yes" 1>&6
14147   term_h_file=ncurses/term.h
14148 else
14149   echo "$ac_t""no" 1>&6
14150 fi
14151
14152     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
14153    echo "    xemacs will be linked with \"terminfo.o\""
14154  fi
14155     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
14156
14157     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
14158                         save_c_switch_site="$c_switch_site"
14159       c_switch_site="$c_switch_site -I/usr/include/ncurses"
14160       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
14161 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
14162 echo "configure:14163: checking for ncurses/curses.h" >&5
14163
14164 cat > conftest.$ac_ext <<EOF
14165 #line 14166 "configure"
14166 #include "confdefs.h"
14167 #include <ncurses/curses.h>
14168 EOF
14169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14170 { (eval echo configure:14171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14172 if test -z "$ac_err"; then
14173   rm -rf conftest*
14174   eval "ac_cv_header_$ac_safe=yes"
14175 else
14176   echo "$ac_err" >&5
14177   echo "configure: failed program was:" >&5
14178   cat conftest.$ac_ext >&5
14179   rm -rf conftest*
14180   eval "ac_cv_header_$ac_safe=no"
14181 fi
14182 rm -f conftest*
14183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14184   echo "$ac_t""yes" 1>&6
14185   curses_h_file=ncurses/curses.h
14186 else
14187   echo "$ac_t""no" 1>&6
14188 fi
14189
14190       if test "$ac_cv_header_ncurses_curses_h" = "yes"
14191         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
14192         else c_switch_site="$save_c_switch_site"
14193       fi
14194     fi
14195   else         if test "$have_terminfo" = "yes"; then
14196       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
14197    echo "    xemacs will be linked with \"terminfo.o\""
14198  fi
14199       if test -n "$libs_termcap"; then
14200         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14201       else
14202         for lib in curses termlib termcap; do
14203           
14204 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
14205 echo "configure:14206: checking for tgetent in -l$lib" >&5
14206 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
14207
14208 xe_check_libs=" -l$lib "
14209 cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212 /* Override any gcc2 internal prototype to avoid an error.  */
14213 /* We use char because int might match the return type of a gcc2
14214     builtin and then its argument prototype would still apply.  */
14215 char tgetent();
14216
14217 int main() {
14218 tgetent()
14219 ; return 0; }
14220 EOF
14221 if { (eval echo configure:14222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14222   rm -rf conftest*
14223   eval "ac_cv_lib_$ac_lib_var=yes"
14224 else
14225   echo "configure: failed program was:" >&5
14226   cat conftest.$ac_ext >&5
14227   rm -rf conftest*
14228   eval "ac_cv_lib_$ac_lib_var=no"
14229 fi
14230 rm -f conftest*
14231 xe_check_libs=""
14232
14233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14234   echo "$ac_t""yes" 1>&6
14235   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
14236 else
14237   echo "$ac_t""no" 1>&6
14238 fi
14239
14240
14241         done
14242       fi
14243     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
14244                                 
14245 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
14246 echo "configure:14247: checking for tgoto in -ltermcap" >&5
14247 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
14248
14249 xe_check_libs=" -ltermcap "
14250 cat > conftest.$ac_ext <<EOF
14251 #line 14252 "configure"
14252 #include "confdefs.h"
14253 /* Override any gcc2 internal prototype to avoid an error.  */
14254 /* We use char because int might match the return type of a gcc2
14255     builtin and then its argument prototype would still apply.  */
14256 char tgoto();
14257
14258 int main() {
14259 tgoto()
14260 ; return 0; }
14261 EOF
14262 if { (eval echo configure:14263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14263   rm -rf conftest*
14264   eval "ac_cv_lib_$ac_lib_var=yes"
14265 else
14266   echo "configure: failed program was:" >&5
14267   cat conftest.$ac_ext >&5
14268   rm -rf conftest*
14269   eval "ac_cv_lib_$ac_lib_var=no"
14270 fi
14271 rm -f conftest*
14272 xe_check_libs=""
14273
14274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14275   echo "$ac_t""yes" 1>&6
14276     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14277     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14278   { test "$extra_verbose" = "yes" && cat << EOF
14279     Defining $ac_tr_lib
14280 EOF
14281 cat >> confdefs.h <<EOF
14282 #define $ac_tr_lib 1
14283 EOF
14284 }
14285
14286   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14287
14288 else
14289   echo "$ac_t""no" 1>&6
14290 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14291    echo "    xemacs will be linked with \"tparam.o\""
14292  fi
14293 fi
14294
14295
14296       else
14297         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14298    echo "    xemacs will be linked with \"tparam.o\""
14299  fi
14300       fi
14301                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
14302       if test -n "$libs_termcap"; then
14303         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14304       else
14305         
14306 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
14307 echo "configure:14308: checking for tgetent in -lcurses" >&5
14308 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
14309
14310 xe_check_libs=" -lcurses "
14311 cat > conftest.$ac_ext <<EOF
14312 #line 14313 "configure"
14313 #include "confdefs.h"
14314 /* Override any gcc2 internal prototype to avoid an error.  */
14315 /* We use char because int might match the return type of a gcc2
14316     builtin and then its argument prototype would still apply.  */
14317 char tgetent();
14318
14319 int main() {
14320 tgetent()
14321 ; return 0; }
14322 EOF
14323 if { (eval echo configure:14324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14324   rm -rf conftest*
14325   eval "ac_cv_lib_$ac_lib_var=yes"
14326 else
14327   echo "configure: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329   rm -rf conftest*
14330   eval "ac_cv_lib_$ac_lib_var=no"
14331 fi
14332 rm -f conftest*
14333 xe_check_libs=""
14334
14335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14336   echo "$ac_t""yes" 1>&6
14337   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
14338 else
14339   echo "$ac_t""no" 1>&6
14340 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
14341 echo "configure:14342: checking for tgetent in -ltermcap" >&5
14342 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
14343
14344 xe_check_libs=" -ltermcap "
14345 cat > conftest.$ac_ext <<EOF
14346 #line 14347 "configure"
14347 #include "confdefs.h"
14348 /* Override any gcc2 internal prototype to avoid an error.  */
14349 /* We use char because int might match the return type of a gcc2
14350     builtin and then its argument prototype would still apply.  */
14351 char tgetent();
14352
14353 int main() {
14354 tgetent()
14355 ; return 0; }
14356 EOF
14357 if { (eval echo configure:14358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14358   rm -rf conftest*
14359   eval "ac_cv_lib_$ac_lib_var=yes"
14360 else
14361   echo "configure: failed program was:" >&5
14362   cat conftest.$ac_ext >&5
14363   rm -rf conftest*
14364   eval "ac_cv_lib_$ac_lib_var=no"
14365 fi
14366 rm -f conftest*
14367 xe_check_libs=""
14368
14369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14370   echo "$ac_t""yes" 1>&6
14371   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14372 else
14373   echo "$ac_t""no" 1>&6
14374 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14375    echo "    xemacs will be linked with \"termcap.o\""
14376  fi
14377 fi
14378
14379
14380 fi
14381
14382
14383       fi
14384     fi
14385   fi
14386   { test "$extra_verbose" = "yes" && cat << EOF
14387     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14388 EOF
14389 cat >> confdefs.h <<EOF
14390 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14391 EOF
14392 }
14393
14394   { test "$extra_verbose" = "yes" && cat << EOF
14395     Defining TERM_H_FILE = "${term_h_file-term.h}"
14396 EOF
14397 cat >> confdefs.h <<EOF
14398 #define TERM_H_FILE "${term_h_file-term.h}"
14399 EOF
14400 }
14401
14402
14403     if test "$with_gpm" != "no"; then
14404     ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14405 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14406 echo "configure:14407: checking for gpm.h" >&5
14407
14408 cat > conftest.$ac_ext <<EOF
14409 #line 14410 "configure"
14410 #include "confdefs.h"
14411 #include <gpm.h>
14412 EOF
14413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14414 { (eval echo configure:14415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14416 if test -z "$ac_err"; then
14417   rm -rf conftest*
14418   eval "ac_cv_header_$ac_safe=yes"
14419 else
14420   echo "$ac_err" >&5
14421   echo "configure: failed program was:" >&5
14422   cat conftest.$ac_ext >&5
14423   rm -rf conftest*
14424   eval "ac_cv_header_$ac_safe=no"
14425 fi
14426 rm -f conftest*
14427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14428   echo "$ac_t""yes" 1>&6
14429   
14430       
14431 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14432 echo "configure:14433: checking for Gpm_Open in -lgpm" >&5
14433 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14434
14435 xe_check_libs=" -lgpm "
14436 cat > conftest.$ac_ext <<EOF
14437 #line 14438 "configure"
14438 #include "confdefs.h"
14439 /* Override any gcc2 internal prototype to avoid an error.  */
14440 /* We use char because int might match the return type of a gcc2
14441     builtin and then its argument prototype would still apply.  */
14442 char Gpm_Open();
14443
14444 int main() {
14445 Gpm_Open()
14446 ; return 0; }
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14449   rm -rf conftest*
14450   eval "ac_cv_lib_$ac_lib_var=yes"
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -rf conftest*
14455   eval "ac_cv_lib_$ac_lib_var=no"
14456 fi
14457 rm -f conftest*
14458 xe_check_libs=""
14459
14460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14461   echo "$ac_t""yes" 1>&6
14462   have_gpm=yes
14463 else
14464   echo "$ac_t""no" 1>&6
14465 fi
14466
14467
14468 else
14469   echo "$ac_t""no" 1>&6
14470 fi
14471
14472     if test "$have_gpm" = "yes"; then
14473       with_gpm=yes
14474       { test "$extra_verbose" = "yes" && cat << \EOF
14475     Defining HAVE_GPM
14476 EOF
14477 cat >> confdefs.h <<\EOF
14478 #define HAVE_GPM 1
14479 EOF
14480 }
14481
14482       extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14483    echo "    xemacs will be linked with \"gpmevent.o\""
14484  fi
14485       LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14486     elif test "$with_gpm" = "yes"; then
14487       { echo "Error:" "GPM requested, but gpm.h or libgpm seems to be missing." >&2; exit 1; }
14488     else
14489       with_gpm=no
14490     fi
14491   fi
14492
14493 else   for feature in ncurses gpm; do
14494     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14495       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14496     fi
14497     eval "with_${feature}=no"
14498   done
14499 fi 
14500 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
14501    echo "    xemacs will be linked with \"event-unixoid.o\""
14502  fi
14503
14504
14505 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14506   != "no no no" && echo "checking for database support" 1>&6
14507 echo "configure:14508: checking for database support" >&5
14508
14509 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14510   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14511 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14512 echo "configure:14513: checking for ndbm.h" >&5
14513
14514 cat > conftest.$ac_ext <<EOF
14515 #line 14516 "configure"
14516 #include "confdefs.h"
14517 #include <ndbm.h>
14518 EOF
14519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14520 { (eval echo configure:14521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14522 if test -z "$ac_err"; then
14523   rm -rf conftest*
14524   eval "ac_cv_header_$ac_safe=yes"
14525 else
14526   echo "$ac_err" >&5
14527   echo "configure: failed program was:" >&5
14528   cat conftest.$ac_ext >&5
14529   rm -rf conftest*
14530   eval "ac_cv_header_$ac_safe=no"
14531 fi
14532 rm -f conftest*
14533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14534   echo "$ac_t""yes" 1>&6
14535   :
14536 else
14537   echo "$ac_t""no" 1>&6
14538
14539     test "$with_database_gdbm" = "yes" -o \
14540          "$with_database_dbm"  = "yes" && \
14541       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14542     with_database_gdbm=no with_database_dbm=no
14543 fi
14544
14545 fi
14546
14547 if test "$with_database_gdbm" != "no"; then
14548   
14549 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14550 echo "configure:14551: checking for dbm_open in -lgdbm" >&5
14551 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14552
14553 xe_check_libs=" -lgdbm "
14554 cat > conftest.$ac_ext <<EOF
14555 #line 14556 "configure"
14556 #include "confdefs.h"
14557 /* Override any gcc2 internal prototype to avoid an error.  */
14558 /* We use char because int might match the return type of a gcc2
14559     builtin and then its argument prototype would still apply.  */
14560 char dbm_open();
14561
14562 int main() {
14563 dbm_open()
14564 ; return 0; }
14565 EOF
14566 if { (eval echo configure:14567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14567   rm -rf conftest*
14568   eval "ac_cv_lib_$ac_lib_var=yes"
14569 else
14570   echo "configure: failed program was:" >&5
14571   cat conftest.$ac_ext >&5
14572   rm -rf conftest*
14573   eval "ac_cv_lib_$ac_lib_var=no"
14574 fi
14575 rm -f conftest*
14576 xe_check_libs=""
14577
14578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14579   echo "$ac_t""yes" 1>&6
14580   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14581 else
14582   echo "$ac_t""no" 1>&6
14583 if test "$with_database_gdbm" = "yes"; then
14584      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14585    fi
14586    with_database_gdbm=no
14587 fi
14588
14589
14590 fi
14591
14592 if test "$with_database_dbm" != "no"; then
14593   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14594 echo "configure:14595: checking for dbm_open" >&5
14595
14596 cat > conftest.$ac_ext <<EOF
14597 #line 14598 "configure"
14598 #include "confdefs.h"
14599 /* System header to define __stub macros and hopefully few prototypes,
14600     which can conflict with char dbm_open(); below.  */
14601 #include <assert.h>
14602 /* Override any gcc2 internal prototype to avoid an error.  */
14603 /* We use char because int might match the return type of a gcc2
14604     builtin and then its argument prototype would still apply.  */
14605 char dbm_open();
14606
14607 int main() {
14608
14609 /* The GNU C library defines this for functions which it implements
14610     to always fail with ENOSYS.  Some functions are actually named
14611     something starting with __ and the normal name is an alias.  */
14612 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14613 choke me
14614 #else
14615 dbm_open();
14616 #endif
14617
14618 ; return 0; }
14619 EOF
14620 if { (eval echo configure:14621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14621   rm -rf conftest*
14622   eval "ac_cv_func_dbm_open=yes"
14623 else
14624   echo "configure: failed program was:" >&5
14625   cat conftest.$ac_ext >&5
14626   rm -rf conftest*
14627   eval "ac_cv_func_dbm_open=no"
14628 fi
14629 rm -f conftest*
14630
14631 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14632   echo "$ac_t""yes" 1>&6
14633   with_database_dbm=yes libdbm=
14634 else
14635   echo "$ac_t""no" 1>&6
14636
14637     
14638 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14639 echo "configure:14640: checking for dbm_open in -ldbm" >&5
14640 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14641
14642 xe_check_libs=" -ldbm "
14643 cat > conftest.$ac_ext <<EOF
14644 #line 14645 "configure"
14645 #include "confdefs.h"
14646 /* Override any gcc2 internal prototype to avoid an error.  */
14647 /* We use char because int might match the return type of a gcc2
14648     builtin and then its argument prototype would still apply.  */
14649 char dbm_open();
14650
14651 int main() {
14652 dbm_open()
14653 ; return 0; }
14654 EOF
14655 if { (eval echo configure:14656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14656   rm -rf conftest*
14657   eval "ac_cv_lib_$ac_lib_var=yes"
14658 else
14659   echo "configure: failed program was:" >&5
14660   cat conftest.$ac_ext >&5
14661   rm -rf conftest*
14662   eval "ac_cv_lib_$ac_lib_var=no"
14663 fi
14664 rm -f conftest*
14665 xe_check_libs=""
14666
14667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14668   echo "$ac_t""yes" 1>&6
14669   with_database_dbm=yes libdbm=-ldbm
14670 else
14671   echo "$ac_t""no" 1>&6
14672 test "$with_database_dbm" = "yes" && \
14673         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14674       with_database_dbm=no
14675 fi
14676
14677
14678 fi
14679
14680 fi
14681
14682 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14683 test "$with_database_gdbm" = "yes" -o \
14684      "$with_database_dbm"  = "yes" && \
14685   { test "$extra_verbose" = "yes" && cat << \EOF
14686     Defining HAVE_DBM
14687 EOF
14688 cat >> confdefs.h <<\EOF
14689 #define HAVE_DBM 1
14690 EOF
14691 }
14692
14693
14694 echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
14695 echo "configure:14696: checking for u_int8_t" >&5
14696
14697 cat > conftest.$ac_ext <<EOF
14698 #line 14699 "configure"
14699 #include "confdefs.h"
14700 #include <sys/types.h>
14701 #if STDC_HEADERS
14702 #include <stdlib.h>
14703 #include <stddef.h>
14704 #endif
14705 EOF
14706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14707   egrep "(^|[^a-zA-Z_0-9])u_int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14708   rm -rf conftest*
14709   ac_cv_type_u_int8_t=yes
14710 else
14711   rm -rf conftest*
14712   ac_cv_type_u_int8_t=no
14713 fi
14714 rm -f conftest*
14715
14716 echo "$ac_t""$ac_cv_type_u_int8_t" 1>&6
14717 if test $ac_cv_type_u_int8_t = no; then
14718   { test "$extra_verbose" = "yes" && cat << \EOF
14719     Defining u_int8_t = uint8_t
14720 EOF
14721 cat >> confdefs.h <<\EOF
14722 #define u_int8_t uint8_t
14723 EOF
14724 }
14725
14726 fi
14727
14728 if test $ac_cv_type_u_int8_t = yes; then
14729 { test "$extra_verbose" = "yes" && cat << \EOF
14730     Defining HAVE_U_INT8_T = 1
14731 EOF
14732 cat >> confdefs.h <<\EOF
14733 #define HAVE_U_INT8_T 1
14734 EOF
14735 }
14736
14737 fi
14738 echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
14739 echo "configure:14740: checking for u_int16_t" >&5
14740
14741 cat > conftest.$ac_ext <<EOF
14742 #line 14743 "configure"
14743 #include "confdefs.h"
14744 #include <sys/types.h>
14745 #if STDC_HEADERS
14746 #include <stdlib.h>
14747 #include <stddef.h>
14748 #endif
14749 EOF
14750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14751   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14752   rm -rf conftest*
14753   ac_cv_type_u_int16_t=yes
14754 else
14755   rm -rf conftest*
14756   ac_cv_type_u_int16_t=no
14757 fi
14758 rm -f conftest*
14759
14760 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
14761 if test $ac_cv_type_u_int16_t = no; then
14762   { test "$extra_verbose" = "yes" && cat << \EOF
14763     Defining u_int16_t = uint16_t
14764 EOF
14765 cat >> confdefs.h <<\EOF
14766 #define u_int16_t uint16_t
14767 EOF
14768 }
14769
14770 fi
14771
14772 if test $ac_cv_type_u_int16_t = yes; then
14773 { test "$extra_verbose" = "yes" && cat << \EOF
14774     Defining HAVE_U_INT16_T = 1
14775 EOF
14776 cat >> confdefs.h <<\EOF
14777 #define HAVE_U_INT16_T 1
14778 EOF
14779 }
14780
14781 fi
14782 echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
14783 echo "configure:14784: checking for u_int32_t" >&5
14784
14785 cat > conftest.$ac_ext <<EOF
14786 #line 14787 "configure"
14787 #include "confdefs.h"
14788 #include <sys/types.h>
14789 #if STDC_HEADERS
14790 #include <stdlib.h>
14791 #include <stddef.h>
14792 #endif
14793 EOF
14794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14795   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14796   rm -rf conftest*
14797   ac_cv_type_u_int32_t=yes
14798 else
14799   rm -rf conftest*
14800   ac_cv_type_u_int32_t=no
14801 fi
14802 rm -f conftest*
14803
14804 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
14805 if test $ac_cv_type_u_int32_t = no; then
14806   { test "$extra_verbose" = "yes" && cat << \EOF
14807     Defining u_int32_t = uint32_t
14808 EOF
14809 cat >> confdefs.h <<\EOF
14810 #define u_int32_t uint32_t
14811 EOF
14812 }
14813
14814 fi
14815
14816 if test $ac_cv_type_u_int32_t = yes; then
14817 { test "$extra_verbose" = "yes" && cat << \EOF
14818     Defining HAVE_U_INT32_T = 1
14819 EOF
14820 cat >> confdefs.h <<\EOF
14821 #define HAVE_U_INT32_T 1
14822 EOF
14823 }
14824
14825 fi
14826 echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
14827 echo "configure:14828: checking for u_int64_t" >&5
14828
14829 cat > conftest.$ac_ext <<EOF
14830 #line 14831 "configure"
14831 #include "confdefs.h"
14832 #include <sys/types.h>
14833 #if STDC_HEADERS
14834 #include <stdlib.h>
14835 #include <stddef.h>
14836 #endif
14837 EOF
14838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14839   egrep "(^|[^a-zA-Z_0-9])u_int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14840   rm -rf conftest*
14841   ac_cv_type_u_int64_t=yes
14842 else
14843   rm -rf conftest*
14844   ac_cv_type_u_int64_t=no
14845 fi
14846 rm -f conftest*
14847
14848 echo "$ac_t""$ac_cv_type_u_int64_t" 1>&6
14849 if test $ac_cv_type_u_int64_t = no; then
14850   { test "$extra_verbose" = "yes" && cat << \EOF
14851     Defining u_int64_t = uint64_t
14852 EOF
14853 cat >> confdefs.h <<\EOF
14854 #define u_int64_t uint64_t
14855 EOF
14856 }
14857
14858 fi
14859
14860 if test $ac_cv_type_u_int64_t = yes; then
14861 { test "$extra_verbose" = "yes" && cat << \EOF
14862     Defining HAVE_U_INT64_T = 1
14863 EOF
14864 cat >> confdefs.h <<\EOF
14865 #define HAVE_U_INT64_T 1
14866 EOF
14867 }
14868
14869 fi
14870
14871 if test "$with_database_berkdb" != "no"; then
14872   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14873 echo "configure:14874: checking for Berkeley db.h" >&5
14874   for header in "db/db.h" "db.h"; do
14875     case "$opsys" in
14876         *freebsd*)
14877     cat > conftest.$ac_ext <<EOF
14878 #line 14879 "configure"
14879 #include "confdefs.h"
14880
14881 #include <stdlib.h>
14882 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14883 #ifdef HAVE_INTTYPES_H
14884 #define __BIT_TYPES_DEFINED__
14885 #include <inttypes.h>
14886 #endif
14887 #endif
14888 #include <$header>
14889
14890 int main() {
14891
14892 ; return 0; }
14893 EOF
14894 if { (eval echo configure:14895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14895   rm -rf conftest*
14896   db_h_file="$header"; break
14897 else
14898   echo "configure: failed program was:" >&5
14899   cat conftest.$ac_ext >&5
14900 fi
14901 rm -f conftest*
14902         ;;
14903         *)
14904     cat > conftest.$ac_ext <<EOF
14905 #line 14906 "configure"
14906 #include "confdefs.h"
14907
14908 #include <stdlib.h>
14909 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14910 #ifdef HAVE_INTTYPES_H
14911 #define __BIT_TYPES_DEFINED__
14912 #include <inttypes.h>
14913 #if !HAVE_U_INT8_T
14914 typedef uint8_t  u_int8_t;
14915 #endif
14916 #if !HAVE_U_INT16_T
14917 typedef uint16_t u_int16_t;
14918 #endif
14919 #if !HAVE_U_INT32_T
14920 typedef uint32_t u_int32_t;
14921 #endif
14922 #ifdef WE_DONT_NEED_QUADS
14923 #if !HAVE_U_INT64_T
14924 typedef uint64_t u_int64_t;
14925 #endif
14926 #endif
14927 #endif
14928 #endif
14929 #include <$header>
14930
14931 int main() {
14932
14933 ; return 0; }
14934 EOF
14935 if { (eval echo configure:14936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14936   rm -rf conftest*
14937   db_h_file="$header"; break
14938 else
14939   echo "configure: failed program was:" >&5
14940   cat conftest.$ac_ext >&5
14941 fi
14942 rm -f conftest*
14943         ;;
14944         esac
14945   done
14946   if test -z "$db_h_file"
14947   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14948   else echo "$ac_t""$db_h_file" 1>&6
14949   fi
14950
14951   if test "$with_database_berkdb" != "no"; then
14952     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14953 echo "configure:14954: checking for Berkeley DB version" >&5
14954     cat > conftest.$ac_ext <<EOF
14955 #line 14956 "configure"
14956 #include "confdefs.h"
14957 #include <$db_h_file>
14958 #if DB_VERSION_MAJOR > 1
14959 yes
14960 #endif
14961
14962 EOF
14963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14964   egrep "yes" >/dev/null 2>&1; then
14965   rm -rf conftest*
14966   cat > conftest.$ac_ext <<EOF
14967 #line 14968 "configure"
14968 #include "confdefs.h"
14969 #include <$db_h_file>
14970 #if DB_VERSION_MAJOR > 2
14971 yes
14972 #endif
14973
14974 EOF
14975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14976   egrep "yes" >/dev/null 2>&1; then
14977   rm -rf conftest*
14978   echo "$ac_t""3" 1>&6; dbfunc=db_create
14979 else
14980   rm -rf conftest*
14981   
14982     echo "$ac_t""2" 1>&6; dbfunc=db_open
14983 fi
14984 rm -f conftest*
14985
14986 else
14987   rm -rf conftest*
14988   
14989     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14990 fi
14991 rm -f conftest*
14992
14993     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14994 echo "configure:14995: checking for $dbfunc" >&5
14995
14996 cat > conftest.$ac_ext <<EOF
14997 #line 14998 "configure"
14998 #include "confdefs.h"
14999 /* System header to define __stub macros and hopefully few prototypes,
15000     which can conflict with char $dbfunc(); below.  */
15001 #include <assert.h>
15002 /* Override any gcc2 internal prototype to avoid an error.  */
15003 /* We use char because int might match the return type of a gcc2
15004     builtin and then its argument prototype would still apply.  */
15005 char $dbfunc();
15006
15007 int main() {
15008
15009 /* The GNU C library defines this for functions which it implements
15010     to always fail with ENOSYS.  Some functions are actually named
15011     something starting with __ and the normal name is an alias.  */
15012 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
15013 choke me
15014 #else
15015 $dbfunc();
15016 #endif
15017
15018 ; return 0; }
15019 EOF
15020 if { (eval echo configure:15021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15021   rm -rf conftest*
15022   eval "ac_cv_func_$dbfunc=yes"
15023 else
15024   echo "configure: failed program was:" >&5
15025   cat conftest.$ac_ext >&5
15026   rm -rf conftest*
15027   eval "ac_cv_func_$dbfunc=no"
15028 fi
15029 rm -f conftest*
15030
15031 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
15032   echo "$ac_t""yes" 1>&6
15033   with_database_berkdb=yes need_libdb=no
15034 else
15035   echo "$ac_t""no" 1>&6
15036
15037     
15038 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
15039 echo "configure:15040: checking for $dbfunc in -ldb" >&5
15040 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
15041
15042 xe_check_libs=" -ldb "
15043 cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* Override any gcc2 internal prototype to avoid an error.  */
15047 /* We use char because int might match the return type of a gcc2
15048     builtin and then its argument prototype would still apply.  */
15049 char $dbfunc();
15050
15051 int main() {
15052 $dbfunc()
15053 ; return 0; }
15054 EOF
15055 if { (eval echo configure:15056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15056   rm -rf conftest*
15057   eval "ac_cv_lib_$ac_lib_var=yes"
15058 else
15059   echo "configure: failed program was:" >&5
15060   cat conftest.$ac_ext >&5
15061   rm -rf conftest*
15062   eval "ac_cv_lib_$ac_lib_var=no"
15063 fi
15064 rm -f conftest*
15065 xe_check_libs=""
15066
15067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15068   echo "$ac_t""yes" 1>&6
15069   with_database_berkdb=yes need_libdb=yes
15070 else
15071   echo "$ac_t""no" 1>&6
15072 fi
15073
15074
15075 fi
15076
15077   fi
15078
15079   if test "$with_database_berkdb" = "yes"; then
15080     { test "$extra_verbose" = "yes" && cat << EOF
15081     Defining DB_H_FILE = "$db_h_file"
15082 EOF
15083 cat >> confdefs.h <<EOF
15084 #define DB_H_FILE "$db_h_file"
15085 EOF
15086 }
15087
15088     { test "$extra_verbose" = "yes" && cat << \EOF
15089     Defining HAVE_BERKELEY_DB
15090 EOF
15091 cat >> confdefs.h <<\EOF
15092 #define HAVE_BERKELEY_DB 1
15093 EOF
15094 }
15095
15096     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
15097   else with_database_berkdb=no
15098   fi
15099 fi
15100
15101 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
15102      != "no no no"; then
15103   { test "$extra_verbose" = "yes" && cat << \EOF
15104     Defining HAVE_DATABASE
15105 EOF
15106 cat >> confdefs.h <<\EOF
15107 #define HAVE_DATABASE 1
15108 EOF
15109 }
15110
15111   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
15112    echo "    xemacs will be linked with \"database.o\""
15113  fi
15114   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
15115     { test "$extra_verbose" = "yes" && cat << \EOF
15116     Defining HAVE_CHISE
15117 EOF
15118 cat >> confdefs.h <<\EOF
15119 #define HAVE_CHISE 1
15120 EOF
15121 }
15122
15123   fi
15124 fi
15125
15126 if test "$with_socks" = "yes"; then
15127   
15128 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
15129 echo "configure:15130: checking for SOCKSinit in -lsocks" >&5
15130 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
15131
15132 xe_check_libs=" -lsocks "
15133 cat > conftest.$ac_ext <<EOF
15134 #line 15135 "configure"
15135 #include "confdefs.h"
15136 /* Override any gcc2 internal prototype to avoid an error.  */
15137 /* We use char because int might match the return type of a gcc2
15138     builtin and then its argument prototype would still apply.  */
15139 char SOCKSinit();
15140
15141 int main() {
15142 SOCKSinit()
15143 ; return 0; }
15144 EOF
15145 if { (eval echo configure:15146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15146   rm -rf conftest*
15147   eval "ac_cv_lib_$ac_lib_var=yes"
15148 else
15149   echo "configure: failed program was:" >&5
15150   cat conftest.$ac_ext >&5
15151   rm -rf conftest*
15152   eval "ac_cv_lib_$ac_lib_var=no"
15153 fi
15154 rm -f conftest*
15155 xe_check_libs=""
15156
15157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15158   echo "$ac_t""yes" 1>&6
15159     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
15160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
15161   { test "$extra_verbose" = "yes" && cat << EOF
15162     Defining $ac_tr_lib
15163 EOF
15164 cat >> confdefs.h <<EOF
15165 #define $ac_tr_lib 1
15166 EOF
15167 }
15168
15169   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
15170
15171 else
15172   echo "$ac_t""no" 1>&6
15173 fi
15174
15175
15176   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
15177     Defining HAVE_SOCKS
15178 EOF
15179 cat >> confdefs.h <<\EOF
15180 #define HAVE_SOCKS 1
15181 EOF
15182 }
15183
15184 fi
15185
15186 if test "$usage_tracking" = "yes"; then
15187   { test "$extra_verbose" = "yes" && cat << \EOF
15188     Defining USAGE_TRACKING
15189 EOF
15190 cat >> confdefs.h <<\EOF
15191 #define USAGE_TRACKING 1
15192 EOF
15193 }
15194
15195   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
15196 fi
15197
15198 if test "$with_modules" != "no"; then
15199   echo "checking for module support" 1>&6
15200 echo "configure:15201: checking for module support" >&5
15201
15202     if test "$with_msw" = "yes"; then
15203     have_dl=yes;
15204   else
15205         case "$opsys" in
15206       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
15207     Defining HAVE_DYLD
15208 EOF
15209 cat >> confdefs.h <<\EOF
15210 #define HAVE_DYLD 1
15211 EOF
15212 }
15213  ;;
15214       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
15215 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
15216 echo "configure:15217: checking for dlfcn.h" >&5
15217
15218 cat > conftest.$ac_ext <<EOF
15219 #line 15220 "configure"
15220 #include "confdefs.h"
15221 #include <dlfcn.h>
15222 EOF
15223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15224 { (eval echo configure:15225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15226 if test -z "$ac_err"; then
15227   rm -rf conftest*
15228   eval "ac_cv_header_$ac_safe=yes"
15229 else
15230   echo "$ac_err" >&5
15231   echo "configure: failed program was:" >&5
15232   cat conftest.$ac_ext >&5
15233   rm -rf conftest*
15234   eval "ac_cv_header_$ac_safe=no"
15235 fi
15236 rm -f conftest*
15237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15238   echo "$ac_t""yes" 1>&6
15239   
15240            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
15241 echo "configure:15242: checking for dlopen in -lc" >&5
15242            cat > conftest.$ac_ext <<EOF
15243 #line 15244 "configure"
15244 #include "confdefs.h"
15245 #include <dlfcn.h>
15246 int main() {
15247               dlopen ("", 0);
15248 ; return 0; }
15249 EOF
15250 if { (eval echo configure:15251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15251   rm -rf conftest*
15252    have_dl=yes 
15253 else
15254   echo "configure: failed program was:" >&5
15255   cat conftest.$ac_ext >&5
15256   rm -rf conftest*
15257   
15258                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
15259 echo "configure:15260: checking for dlopen in -ldl" >&5
15260                ac_save_LIBS="$LIBS"
15261                LIBS="-ldl $LIBS"
15262                cat > conftest.$ac_ext <<EOF
15263 #line 15264 "configure"
15264 #include "confdefs.h"
15265 #include <dlfcn.h>
15266 int main() {
15267                  dlopen ("", 0);
15268 ; return 0; }
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15271   rm -rf conftest*
15272    have_dl=yes 
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -rf conftest*
15277   LIBS="$ac_save_LIBS"
15278 fi
15279 rm -f conftest*
15280                ac_save_LIBS=
15281 fi
15282 rm -f conftest*
15283 else
15284   echo "$ac_t""no" 1>&6
15285 fi
15286
15287         if test -n "$have_dl"; then
15288            { test "$extra_verbose" = "yes" && cat << \EOF
15289     Defining HAVE_DLOPEN
15290 EOF
15291 cat >> confdefs.h <<\EOF
15292 #define HAVE_DLOPEN 1
15293 EOF
15294 }
15295
15296         else
15297            
15298 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
15299 echo "configure:15300: checking for shl_load in -ldld" >&5
15300 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
15301
15302 xe_check_libs=" -ldld "
15303 cat > conftest.$ac_ext <<EOF
15304 #line 15305 "configure"
15305 #include "confdefs.h"
15306 /* Override any gcc2 internal prototype to avoid an error.  */
15307 /* We use char because int might match the return type of a gcc2
15308     builtin and then its argument prototype would still apply.  */
15309 char shl_load();
15310
15311 int main() {
15312 shl_load()
15313 ; return 0; }
15314 EOF
15315 if { (eval echo configure:15316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15316   rm -rf conftest*
15317   eval "ac_cv_lib_$ac_lib_var=yes"
15318 else
15319   echo "configure: failed program was:" >&5
15320   cat conftest.$ac_ext >&5
15321   rm -rf conftest*
15322   eval "ac_cv_lib_$ac_lib_var=no"
15323 fi
15324 rm -f conftest*
15325 xe_check_libs=""
15326
15327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15328   echo "$ac_t""yes" 1>&6
15329   libdl=dld have_dl=yes;
15330            { test "$extra_verbose" = "yes" && cat << \EOF
15331     Defining HAVE_SHL_LOAD
15332 EOF
15333 cat >> confdefs.h <<\EOF
15334 #define HAVE_SHL_LOAD 1
15335 EOF
15336 }
15337
15338 else
15339   echo "$ac_t""no" 1>&6
15340
15341 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
15342 echo "configure:15343: checking for dld_init in -ldld" >&5
15343 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
15344
15345 xe_check_libs=" -ldld "
15346 cat > conftest.$ac_ext <<EOF
15347 #line 15348 "configure"
15348 #include "confdefs.h"
15349 /* Override any gcc2 internal prototype to avoid an error.  */
15350 /* We use char because int might match the return type of a gcc2
15351     builtin and then its argument prototype would still apply.  */
15352 char dld_init();
15353
15354 int main() {
15355 dld_init()
15356 ; return 0; }
15357 EOF
15358 if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15359   rm -rf conftest*
15360   eval "ac_cv_lib_$ac_lib_var=yes"
15361 else
15362   echo "configure: failed program was:" >&5
15363   cat conftest.$ac_ext >&5
15364   rm -rf conftest*
15365   eval "ac_cv_lib_$ac_lib_var=no"
15366 fi
15367 rm -f conftest*
15368 xe_check_libs=""
15369
15370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15371   echo "$ac_t""yes" 1>&6
15372   libdl=dld have_dl=yes;
15373            { test "$extra_verbose" = "yes" && cat << \EOF
15374     Defining HAVE_DLD_INIT
15375 EOF
15376 cat >> confdefs.h <<\EOF
15377 #define HAVE_DLD_INIT 1
15378 EOF
15379 }
15380
15381 else
15382   echo "$ac_t""no" 1>&6
15383 fi
15384
15385
15386 fi
15387
15388
15389         fi
15390     ;;
15391     esac
15392   fi 
15393   if test -n "$have_dl"; then
15394         
15395 dll_ld=
15396 dll_ldflags=
15397 dll_cflags=
15398 dll_post=
15399 dll_ldo="-o"
15400 ld_dynamic_link_flags=
15401 xehost=$canonical
15402 xealias=$internal_configuration
15403
15404 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
15405 echo "configure:15406: checking how to build dynamic libraries for ${xehost}" >&5
15406 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
15407 case "$xehost" in
15408 *-*-linux-gnu*) ;;
15409 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
15410 esac
15411
15412 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
15413 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
15414 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
15415
15416 case "$xehost_os" in
15417 aix3*)
15418   # AIX sometimes has problems with the GCC collect2 program.  For some
15419   # reason, if we set the COLLECT_NAMES environment variable, the problems
15420   # vanish in a puff of smoke.
15421   if test "${COLLECT_NAMES+set}" != set; then
15422     COLLECT_NAMES=
15423     export COLLECT_NAMES
15424   fi
15425   ;;
15426 esac
15427
15428 # Now see if the compiler is really GCC.
15429 if test "$GCC" = "yes"; then
15430   XEGCC=yes
15431 else
15432   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
15433 echo "configure:15434: checking checking whether we are using GNU C" >&5
15434   cat > conftest.$ac_ext <<EOF
15435 #line 15436 "configure"
15436 #include "confdefs.h"
15437
15438 #ifdef __GNUC__
15439   yes;
15440 #endif
15441
15442 EOF
15443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15444   egrep "yes" >/dev/null 2>&1; then
15445   rm -rf conftest*
15446   XEGCC=yes
15447 else
15448   rm -rf conftest*
15449   XEGCC=no
15450 fi
15451 rm -f conftest*
15452
15453   echo "$ac_t""${XEGCC}" 1>&6
15454 fi
15455
15456 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
15457 echo "configure:15458: checking how to produce PIC code" >&5
15458 wl=
15459
15460 can_build_shared=yes
15461 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15462   wl='-Wl,'
15463
15464   case "$xehost_os" in
15465   aix[3-9]* | irix[5-9]* | osf[3-9])
15466     # PIC is the default for these OSes.
15467     ;;
15468
15469   os2*)
15470     # We can build DLLs from non-PIC.
15471     ;;
15472   amigaos*)
15473     # FIXME: we need at least 68020 code to build shared libraries, but
15474     # adding the `-m68020' flag to GCC prevents building anything better,
15475     # like `-m68040'.
15476     dll_cflags='-m68020 -resident32 -malways-restore-a4'
15477     ;;
15478   *cygwin* | *mingw* )
15479     # PIC is the default
15480     ;;
15481   *)
15482     dll_cflags='-fPIC'
15483     ;;
15484   esac
15485 else
15486   # PORTME Check for PIC flags for the system compiler.
15487   case "$xehost_os" in
15488   hpux9* | hpux1[0-9]*)
15489     # Is there a better link_static_flag that works with the bundled CC?
15490     wl='-Wl,'
15491     dll_cflags='+Z'
15492     ;;
15493
15494   irix[5-9]*)
15495     wl='-Wl,'
15496     # PIC (with -KPIC) is the default.
15497     ;;
15498
15499   os2*)
15500     # We can build DLLs from non-PIC.
15501     ;;
15502
15503   osf[3-9]*)
15504     # All OSF/1 code is PIC.
15505     wl='-Wl,'
15506     ;;
15507
15508   aix[3-9]*)
15509     # All AIX code is PIC.
15510     wl='-Wl,'
15511     ;;
15512
15513   sco3.2v5*)
15514     dll_cflags='-belf -Kpic'
15515     wl='-Wl,'
15516     ;;
15517
15518   unixware*)
15519     dll_cflags="-KPIC"
15520     wl="-Wl,"
15521     ;;
15522
15523   sysv4*)
15524     dll_cflags="-KPIC"
15525     wl="-Wl,"
15526     ;;
15527
15528   sysv5*)
15529     dll_cflags="-KPIC"
15530     wl="-Wl,"
15531     ;;
15532
15533   solaris2*)
15534     dll_cflags='-KPIC'
15535     wl='-Wl,'
15536     ;;
15537
15538   sunos4*)
15539     dll_cflags='-PIC'
15540     wl='-Qoption ld '
15541     ;;
15542
15543   uts4*)
15544     dll_cflags='-pic'
15545     ;;
15546
15547   *)
15548     can_build_shared=no
15549     ;;
15550   esac
15551 fi
15552
15553 if test -n "$dll_cflags"; then
15554   echo "$ac_t""${dll_cflags}" 1>&6
15555
15556   # Check to make sure the dll_cflags actually works.
15557   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
15558 echo "configure:15559: checking if PIC flag ${dll_cflags} really works" >&5
15559   save_CFLAGS="$CFLAGS"
15560   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15561   cat > conftest.$ac_ext <<EOF
15562 #line 15563 "configure"
15563 #include "confdefs.h"
15564
15565 int main() {
15566 int x=0;
15567 ; return 0; }
15568 EOF
15569 if { (eval echo configure:15570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15570   rm -rf conftest*
15571   
15572     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15573     # reports no error.  So, we need to grep stderr for (Bundled).
15574     if grep '(Bundled)' config.log >/dev/null; then
15575       echo "$ac_t""no" 1>&6
15576       can_build_shared=no
15577       dll_cflags=
15578     else
15579       echo "$ac_t""yes" 1>&6
15580     fi
15581 else
15582   echo "configure: failed program was:" >&5
15583   cat conftest.$ac_ext >&5
15584   rm -rf conftest*
15585   echo "$ac_t""no" 1>&6
15586     can_build_shared=no
15587     dll_cflags=
15588 fi
15589 rm -f conftest*
15590   CFLAGS="$save_CFLAGS"
15591 else
15592   echo "$ac_t""none" 1>&6
15593 fi
15594
15595 if test "$can_build_shared" = "yes"; then
15596 cc_produces_so=no
15597 xldf=
15598 xcldf=
15599 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15600 echo "configure:15601: checking if C compiler can produce shared libraries" >&5
15601 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15602   xcldf="-shared"
15603   xldf="-shared"
15604 else # Not using GCC
15605   case "$xehost_os" in
15606     aix[3-9]*)
15607       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15608       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15609       ;;
15610
15611     freebsd2* | netbsd* | openbsd*)
15612       xldf="-Bshareable"
15613       xcldf="${wl}-Bshareable"
15614       ;;
15615
15616     freebsd3*)
15617       xcldf="-shared"
15618       ;;
15619
15620     hpux*)
15621       xldf="-b +s"
15622       xcldf="${wl}-b ${wl}+s"
15623       ;;
15624
15625     irix[5-9]* | osf[3-9]*)
15626       xcldf="${wl}-shared"
15627       xldf="-shared"
15628       ;;
15629
15630     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15631       xcldf="-G"
15632       xldf="-G"
15633       ;;
15634
15635     sunos4*)
15636       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15637       xldf="-assert pure-text -Bstatic"
15638       ;;
15639   esac
15640 fi # End if if we are using gcc
15641
15642 if test -n "$xcldf"; then
15643   save_LDFLAGS=$LDFLAGS
15644   save_LIBS=$LIBS
15645   save_xe_libs=$xe_libs
15646   LDFLAGS="$xcldf $LDFLAGS"
15647   LIBS=
15648   xe_libs=
15649   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15650   cat > conftest.$ac_ext <<EOF
15651 #line 15652 "configure"
15652 #include "confdefs.h"
15653
15654 int main() {
15655 int x=0;
15656 ; return 0; }
15657 EOF
15658 if { (eval echo configure:15659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15659   rm -rf conftest*
15660   cc_produces_so=yes
15661 else
15662   echo "configure: failed program was:" >&5
15663   cat conftest.$ac_ext >&5
15664   rm -rf conftest*
15665   cc_produces_so=no
15666 fi
15667 rm -f conftest*
15668   LDFLAGS=$save_LDFLAGS
15669   LIBS=$save_LIBS
15670   xe_libs=$save_xe_libs
15671   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15672 else
15673   cc_produces_so=no
15674 fi
15675 echo "$ac_t""${cc_produces_so}" 1>&6
15676
15677 LTLD=$LD
15678 if test -z "$LTLD"; then
15679   ac_prog=ld
15680   if test "$XEGCC" = yes; then
15681     # Check if gcc -print-prog-name=ld gives a path.
15682     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15683 echo "configure:15684: checking for ld used by GCC" >&5
15684     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15685     case "$ac_prog" in
15686     # Accept absolute paths.
15687     /*)
15688       if test -z "$LTLD"; then
15689 #        case "$ac_prog" in
15690 #          *gcc-lib*) LTLD="$CC"
15691 #                     ;;
15692 #          *)
15693          LTLD="$ac_prog"
15694 #                     ;;
15695 #        esac
15696       fi
15697       ;;
15698     "")
15699       # If it fails, then pretend we aren't using GCC.
15700       ac_prog=ld
15701       ;;
15702     *)
15703       # If it is relative, then search for the first ld in PATH.
15704       with_gnu_ld=unknown
15705       ;;
15706     esac
15707   else
15708     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15709 echo "configure:15710: checking for GNU ld" >&5
15710   fi
15711
15712   if test -z "$LTLD"; then
15713     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15714     for ac_dir in $PATH; do
15715       test -z "$ac_dir" && ac_dir=.
15716       if test -f "$ac_dir/$ac_prog"; then
15717         LTLD="$ac_dir/$ac_prog"
15718         # Check to see if the program is GNU ld.  I'd rather use --version,
15719         # but apparently some GNU ld's only accept -v.
15720         # Break only if it was the GNU/non-GNU ld that we prefer.
15721         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15722           xe_gnu_ld=yes
15723         else
15724           xe_gnu_ld=no
15725         fi
15726       fi
15727     done
15728     IFS="$ac_save_ifs"
15729   fi
15730
15731   if test -n "$LTLD"; then
15732     echo "$ac_t""${LTLD}" 1>&6
15733   else
15734     echo "$ac_t""no" 1>&6
15735   fi
15736
15737   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15738     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15739     exit 1
15740   fi
15741 fi
15742
15743 ld_dynamic_link_flags=
15744
15745 # Check to see if it really is or isn't GNU ld.
15746 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15747 echo "configure:15748: checking if the linker is GNU ld" >&5
15748 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15749 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15750   xe_gnu_ld=yes
15751 else
15752   xe_gnu_ld=no
15753 fi
15754 echo "$ac_t""${xe_gnu_ld}" 1>&6
15755
15756 case "$xehost_os" in
15757   amigaos* | sunos4*)
15758     # On these operating systems, we should treat GNU ld like the system ld.
15759     gnu_ld_acts_native=yes
15760     ;;
15761   *)
15762     gnu_ld_acts_native=no
15763     ;;
15764 esac
15765
15766 if test "$cc_produces_so" = "yes"; then
15767   dll_ld=$CC
15768   dll_ldflags=$xcldf
15769   can_build_shared=yes
15770   ld_shlibs=yes
15771 else
15772   # OK - only NOW do we futz about with ld.
15773   # See if the linker supports building shared libraries.
15774   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15775 echo "configure:15776: checking whether the linker supports shared libraries" >&5
15776   dll_ld=$CC
15777   dll_ldflags=$LDFLAGS
15778   ld_shlibs=yes
15779   can_build_shared=yes
15780   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15781     # See if GNU ld supports shared libraries.
15782     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15783       dll_ld=$CC
15784       dll_ldflags="-shared"
15785       ld_shlibs=yes
15786     else
15787       ld_shlibs=no
15788     fi
15789   else
15790     # PORTME fill in a description of your system's linker (not GNU ld)
15791     case "$xehost_os" in
15792     aix3*)
15793       dll_ld=$LTLD
15794       dll_ldflags=$xldf
15795       ;;
15796
15797     aix[4-9]*)
15798       dll_ldflags=$xcldf
15799       ;;
15800
15801     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15802     # support.  Future versions do this automatically, but an explicit c++rt0.o
15803     # doesn't break anything, and helps significantly (at the cost of a little
15804     # extra space).
15805     freebsd2.2*)
15806       dll_ld=$LTLD
15807       dll_ldflags=$xldf
15808       dll_post="/usr/lib/c++rt0.o"
15809       ;;
15810
15811     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15812     freebsd2*)
15813       dll_ld=$LTLD
15814       dll_ldflags="-Bshareable"
15815       ;;
15816
15817     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15818     freebsd3*)
15819       dll_ldflags="-shared"
15820       ;;
15821
15822     hpux*)
15823       dll_ld=$LTLD
15824       dll_ldflags=$xldf
15825       ;;
15826
15827     irix[5-9]*)
15828       dll_ld=$LTLD
15829       dll_ldflags=$xldf
15830       ;;
15831
15832     netbsd*)
15833       # Tested with NetBSD 1.2 ld
15834       dll_ld=$LTLD
15835       dll_ldflags=$xldf
15836       ;;
15837
15838     openbsd*)
15839       dll_ld=$LTLD
15840       dll_ldflags=$xldf
15841       ;;
15842
15843     osf3* | osf4*)
15844       dll_ld=$LTLD
15845       dll_ldflags=$xldf
15846       ;;
15847
15848     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15849     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15850       dll_ld=$LTLD
15851       case "$dll_ld" in
15852         *gcc*) dll_ldflags="-shared"
15853                dll_ld=$CC
15854                ;;
15855         *)     dll_ldflags="-G"
15856                ;;
15857       esac
15858       ;;
15859
15860     sunos4*)
15861       if test "$XEGCC" = yes; then
15862         dll_ld=$CC
15863       else
15864         dll_ld=$LTLD
15865       fi
15866       dll_ldflags=$xldf
15867       ;;
15868
15869     uts4*)
15870       dll_ld=$LTLD
15871       dll_ldflags="-G"
15872       ;;
15873
15874     bsdi*)
15875       dll_ldflags="-r"
15876       dll_ld="shlicc2"
15877       ;;
15878
15879     *)
15880       ld_shlibs=no
15881       can_build_shared=no
15882       ;;
15883     esac
15884   fi
15885   echo "$ac_t""${ld_shlibs}" 1>&6
15886   if test "$ld_shlibs" = "no"; then
15887     can_build_shared=no
15888   fi
15889 fi # End of if cc_produces_so = no
15890
15891
15892 if test "$xe_gnu_ld" = yes; then
15893   if test "$ld_shlibs" = yes; then
15894     ld_dynamic_link_flags="${wl}-export-dynamic"
15895   fi
15896 fi
15897
15898 if test -z "$ld_dynamic_link_flags"; then
15899   case "$xehost_os" in
15900   aix[3-9]*)
15901     ld_dynamic_link_flags=
15902     ;;
15903
15904   freebsd2.2*)
15905     ld_dynamic_link_flags=
15906     ;;
15907
15908   freebsd2*)
15909     ld_dynamic_link_flags=
15910     ;;
15911
15912   freebsd3*)
15913     ld_dynamic_link_flags=
15914     ;;
15915
15916   hpux*)
15917     ld_dynamic_link_flags="${wl}-E"
15918     ;;
15919
15920   irix[5-9]*)
15921     ld_dynamic_link_flags=
15922     ;;
15923
15924   netbsd*)
15925     ld_dynamic_link_flags=
15926     ;;
15927
15928   openbsd*)
15929     ld_dynamic_link_flags=
15930     ;;
15931
15932   osf3* | osf4*)
15933     ld_dynamic_link_flags=
15934     ;;
15935
15936   solaris2* | solaris7*)
15937     ld_dynamic_link_flags=
15938     ;;
15939
15940   sco3.2v5* | unixware* | sysv5* | sysv4*)
15941     ld_dynamic_link_flags="${wl}-Bexport"
15942     ;;
15943
15944   sunos4*)
15945     ld_dynamic_link_flags=
15946     ;;
15947
15948   uts4*)
15949     ld_dynamic_link_flags=
15950     ;;
15951
15952   bsdi*)
15953     ld_dynamic_link_flags=
15954     ;;
15955
15956   esac
15957 fi # End of if -z ld_dynamic_link_flags
15958 fi # End of if test "$can_build_shared" = "yes"
15959
15960
15961
15962
15963
15964
15965
15966
15967   fi
15968
15969   if test "$can_build_shared" = "yes"; then
15970     { test "$extra_verbose" = "yes" && cat << \EOF
15971     Defining HAVE_SHLIB
15972 EOF
15973 cat >> confdefs.h <<\EOF
15974 #define HAVE_SHLIB 1
15975 EOF
15976 }
15977
15978     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15979    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15980  fi
15981     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15982     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15983     for ac_func in dlerror _dlerror
15984 do
15985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15986 echo "configure:15987: checking for $ac_func" >&5
15987
15988 cat > conftest.$ac_ext <<EOF
15989 #line 15990 "configure"
15990 #include "confdefs.h"
15991 /* System header to define __stub macros and hopefully few prototypes,
15992     which can conflict with char $ac_func(); below.  */
15993 #include <assert.h>
15994 /* Override any gcc2 internal prototype to avoid an error.  */
15995 /* We use char because int might match the return type of a gcc2
15996     builtin and then its argument prototype would still apply.  */
15997 char $ac_func();
15998
15999 int main() {
16000
16001 /* The GNU C library defines this for functions which it implements
16002     to always fail with ENOSYS.  Some functions are actually named
16003     something starting with __ and the normal name is an alias.  */
16004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16005 choke me
16006 #else
16007 $ac_func();
16008 #endif
16009
16010 ; return 0; }
16011 EOF
16012 if { (eval echo configure:16013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16013   rm -rf conftest*
16014   eval "ac_cv_func_$ac_func=yes"
16015 else
16016   echo "configure: failed program was:" >&5
16017   cat conftest.$ac_ext >&5
16018   rm -rf conftest*
16019   eval "ac_cv_func_$ac_func=no"
16020 fi
16021 rm -f conftest*
16022
16023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16024   echo "$ac_t""yes" 1>&6
16025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16026   { test "$extra_verbose" = "yes" && cat << EOF
16027     Defining $ac_tr_func
16028 EOF
16029 cat >> confdefs.h <<EOF
16030 #define $ac_tr_func 1
16031 EOF
16032 }
16033  
16034 else
16035   echo "$ac_t""no" 1>&6
16036 fi
16037 done
16038
16039     with_modules=yes
16040   else
16041     if test "$with_modules" = "yes"; then
16042       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
16043     else
16044       echo "configure: warning: "Module support cannot be provided."" 1>&2
16045     fi
16046     with_modules=no
16047   fi
16048 fi
16049
16050 cat > conftest.$ac_ext <<EOF
16051 #line 16052 "configure"
16052 #include "confdefs.h"
16053 int main(int c,char *v[]){return 0;}
16054 EOF
16055 if { (eval echo configure:16056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
16056 then
16057   :
16058 else
16059   conftest_rc="$?"
16060   echo "configure: failed program was:" >&5
16061   cat conftest.$ac_ext >&5
16062   rm -fr conftest*
16063   
16064   echo ""
16065   echo "*** PANIC *** configure forgot how to build working executables!"
16066   echo ""
16067   echo "*** This is most commonly due to an unforeseen environment, causing"
16068   echo "*** configure to incorrectly compute the sequence of libraries to link."
16069   echo "*** Please examine the tail of config.log for runtime errors."
16070   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
16071   echo "*** Often adding or removing explicit options in the configure"
16072   echo "*** invocation can work around this kind of problem.  If so, please"
16073   echo "*** report it as a bug to xemacs-beta@xemacs.org."
16074   echo "***"
16075   echo "*** Other possible causes are inability to write to the file system"
16076   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
16077   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
16078   echo "*** necessary.  On other systems, try telling configure where to find"
16079   echo "*** the shared libraries using the --site-runtime-libraries option."
16080   echo "***"
16081   echo "*** Another way to shoot yourself in the foot is to specify"
16082   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
16083   echo "*** system.  Don't do that."
16084   exit 1
16085 fi
16086 rm -fr conftest*
16087
16088 if test "$win32_processes" = "yes"; then
16089   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
16090    echo "    xemacs will be linked with \"process-nt.o\""
16091  fi
16092 else
16093   { test "$extra_verbose" = "yes" && cat << \EOF
16094     Defining HAVE_UNIX_PROCESSES
16095 EOF
16096 cat >> confdefs.h <<\EOF
16097 #define HAVE_UNIX_PROCESSES 1
16098 EOF
16099 }
16100
16101   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
16102    echo "    xemacs will be linked with \"process-unix.o\""
16103  fi
16104 fi
16105
16106
16107
16108 T=""
16109 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16110 CFLAGS="$T"
16111
16112
16113 T=""
16114 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16115 extra_objs="$T"
16116
16117
16118 T=""
16119 for W in -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16120 c_switch_general="$T"
16121
16122
16123 T=""
16124 for W in $c_switch_x_site $c_switch_gtk $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16125 c_switch_window_system="$T"
16126
16127
16128 T=""
16129 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16130 c_switch_all="$T"
16131
16132
16133 T=""
16134 for W in $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16135 ld_switch_general="$T"
16136
16137
16138 T=""
16139 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16140 ld_switch_window_system="$T"
16141
16142
16143 T=""
16144 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16145 ld_switch_all="$T"
16146
16147
16148 T=""
16149 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16150 ld_libs_general="$T"
16151
16152
16153 T=""
16154 for W in $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16155 ld_libs_window_system="$T"
16156
16157
16158 T=""
16159 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16160 ld_libs_all="$T"
16161
16162
16163
16164 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
16165 internal_makefile_list="Makefile.in"
16166 SUBDIR_MAKEFILES=''
16167 test -d lock || mkdir lock
16168 for dir in $MAKE_SUBDIR; do
16169   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
16170         test -d "$d" || mkdir "$d"; cd "$d"
16171       done ) ;;
16172    * ) test -d "$dir" || mkdir "$dir" ;;
16173   esac
16174   
16175 T=""
16176 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16177 SUBDIR_MAKEFILES="$T"
16178
16179   
16180 T=""
16181 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16182 internal_makefile_list="$T"
16183
16184 done
16185
16186
16187
16188
16189 for dir in src/s src/m; do
16190   if test ! -d "$dir" ; then
16191     echo Making symbolic link to "$srcdir/$dir"
16192     ${LN_S} "$srcdir/$dir" "$dir"
16193   fi
16194 done
16195
16196 if test "$extra_verbose" = "yes"; then
16197   echo ""
16198   for var in extra_objs    c_switch_general  c_switch_window_system  c_switch_all   ld_switch_general ld_switch_window_system ld_switch_all     ld_libs_general   ld_libs_window_system   ld_libs_all; do eval "echo \"$var = '\$$var'\""; done
16199   echo ""
16200 fi
16201
16202
16203 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
16204   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
16205   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
16206 fi
16207
16208 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
16209   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
16210   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
16211 fi
16212
16213 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
16214   test "$extra_verbose" = "yes" && echo "creating TAGS"
16215   echo "\f
16216 $srcdir/TAGS,include" > "TAGS"
16217 fi
16218
16219 if test "$__SUNPRO_C" = "yes"; then
16220   test "$extra_verbose" = "yes" && echo "creating .sbinit"
16221   ( echo "# For use with Sun WorkShop's Source browser."
16222     echo "# See sbquery(1) and sbinit(4) for more information"
16223     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
16224   ) > .sbinit
16225 fi
16226
16227 rm -f core
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248 PREFIX=$prefix
16249 while true; do
16250   case "$PREFIX" in
16251     *\$* ) eval "PREFIX=$PREFIX" ;;
16252     *) break ;;
16253   esac
16254 done
16255
16256
16257
16258
16259 EXEC_PREFIX=$exec_prefix
16260 while true; do
16261   case "$EXEC_PREFIX" in
16262     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
16263     *) break ;;
16264   esac
16265 done
16266
16267
16268
16269
16270 INFODIR=$infodir
16271 while true; do
16272   case "$INFODIR" in
16273     *\$* ) eval "INFODIR=$INFODIR" ;;
16274     *) break ;;
16275   esac
16276 done
16277
16278
16279
16280
16281 INFOPATH=$infopath
16282 while true; do
16283   case "$INFOPATH" in
16284     *\$* ) eval "INFOPATH=$INFOPATH" ;;
16285     *) break ;;
16286   esac
16287 done
16288
16289
16290
16291
16292 PACKAGE_PATH=$package_path
16293 while true; do
16294   case "$PACKAGE_PATH" in
16295     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
16296     *) break ;;
16297   esac
16298 done
16299
16300
16301
16302
16303 LISPDIR=$lispdir
16304 while true; do
16305   case "$LISPDIR" in
16306     *\$* ) eval "LISPDIR=$LISPDIR" ;;
16307     *) break ;;
16308   esac
16309 done
16310
16311
16312
16313
16314 MODULEDIR=$moduledir
16315 while true; do
16316   case "$MODULEDIR" in
16317     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
16318     *) break ;;
16319   esac
16320 done
16321
16322
16323
16324
16325 SITELISPDIR=$sitelispdir
16326 while true; do
16327   case "$SITELISPDIR" in
16328     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
16329     *) break ;;
16330   esac
16331 done
16332
16333
16334
16335
16336 SITEMODULEDIR=$sitemoduledir
16337 while true; do
16338   case "$SITEMODULEDIR" in
16339     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
16340     *) break ;;
16341   esac
16342 done
16343
16344
16345
16346
16347 ETCDIR=$etcdir
16348 while true; do
16349   case "$ETCDIR" in
16350     *\$* ) eval "ETCDIR=$ETCDIR" ;;
16351     *) break ;;
16352   esac
16353 done
16354
16355
16356
16357
16358 DOCDIR=$docdir
16359 while true; do
16360   case "$DOCDIR" in
16361     *\$* ) eval "DOCDIR=$DOCDIR" ;;
16362     *) break ;;
16363   esac
16364 done
16365
16366
16367
16368
16369 ARCHLIBDIR=$archlibdir
16370 while true; do
16371   case "$ARCHLIBDIR" in
16372     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
16373     *) break ;;
16374   esac
16375 done
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
16397
16398
16399
16400
16401
16402
16403
16404 : ${XEMACS_CC:=$CC}
16405
16406
16407 if test "$with_prefix" = "yes"; then
16408   { test "$extra_verbose" = "yes" && cat << \EOF
16409     Defining PREFIX_USER_DEFINED
16410 EOF
16411 cat >> confdefs.h <<\EOF
16412 #define PREFIX_USER_DEFINED 1
16413 EOF
16414 }
16415
16416 fi
16417
16418 if test "$with_site_lisp" = "no"; then
16419   { test "$extra_verbose" = "yes" && cat << \EOF
16420     Defining INHIBIT_SITE_LISP
16421 EOF
16422 cat >> confdefs.h <<\EOF
16423 #define INHIBIT_SITE_LISP 1
16424 EOF
16425 }
16426
16427 fi
16428 if test "$with_site_modules" = "no"; then
16429   { test "$extra_verbose" = "yes" && cat << \EOF
16430     Defining INHIBIT_SITE_MODULES
16431 EOF
16432 cat >> confdefs.h <<\EOF
16433 #define INHIBIT_SITE_MODULES 1
16434 EOF
16435 }
16436
16437 fi
16438
16439
16440 T=""
16441 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16442 ac_configure_args="$T"
16443
16444 { test "$extra_verbose" = "yes" && cat << EOF
16445     Defining EMACS_CONFIGURATION = "$configuration"
16446 EOF
16447 cat >> confdefs.h <<EOF
16448 #define EMACS_CONFIGURATION "$configuration"
16449 EOF
16450 }
16451
16452 { test "$extra_verbose" = "yes" && cat << EOF
16453     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
16454 EOF
16455 cat >> confdefs.h <<EOF
16456 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
16457 EOF
16458 }
16459
16460
16461
16462 null_string=""
16463 { test "$extra_verbose" = "yes" && cat << EOF
16464     Defining LD_SWITCH_X_SITE = $null_string
16465 EOF
16466 cat >> confdefs.h <<EOF
16467 #define LD_SWITCH_X_SITE $null_string
16468 EOF
16469 }
16470
16471 { test "$extra_verbose" = "yes" && cat << EOF
16472     Defining LD_SWITCH_X_SITE_AUX = $null_string
16473 EOF
16474 cat >> confdefs.h <<EOF
16475 #define LD_SWITCH_X_SITE_AUX $null_string
16476 EOF
16477 }
16478
16479 { test "$extra_verbose" = "yes" && cat << EOF
16480     Defining C_SWITCH_X_SITE = $null_string
16481 EOF
16482 cat >> confdefs.h <<EOF
16483 #define C_SWITCH_X_SITE $null_string
16484 EOF
16485 }
16486
16487 { test "$extra_verbose" = "yes" && cat << EOF
16488     Defining LD_SWITCH_SITE = $null_string
16489 EOF
16490 cat >> confdefs.h <<EOF
16491 #define LD_SWITCH_SITE $null_string
16492 EOF
16493 }
16494
16495 { test "$extra_verbose" = "yes" && cat << EOF
16496     Defining C_SWITCH_SITE = $null_string
16497 EOF
16498 cat >> confdefs.h <<EOF
16499 #define C_SWITCH_SITE $null_string
16500 EOF
16501 }
16502
16503
16504
16505 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16506     Defining GNU_MALLOC
16507 EOF
16508 cat >> confdefs.h <<\EOF
16509 #define GNU_MALLOC 1
16510 EOF
16511 }
16512
16513 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16514     Defining USE_SYSTEM_MALLOC
16515 EOF
16516 cat >> confdefs.h <<\EOF
16517 #define USE_SYSTEM_MALLOC 1
16518 EOF
16519 }
16520
16521 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16522     Defining USE_DEBUG_MALLOC
16523 EOF
16524 cat >> confdefs.h <<\EOF
16525 #define USE_DEBUG_MALLOC 1
16526 EOF
16527 }
16528
16529                                               { test "$extra_verbose" = "yes" && cat << \EOF
16530     Defining USE_SYSTEM_MALLOC
16531 EOF
16532 cat >> confdefs.h <<\EOF
16533 #define USE_SYSTEM_MALLOC 1
16534 EOF
16535 }
16536
16537 fi
16538 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16539     Defining I18N3
16540 EOF
16541 cat >> confdefs.h <<\EOF
16542 #define I18N3 1
16543 EOF
16544 }
16545
16546 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16547     Defining USE_GCC
16548 EOF
16549 cat >> confdefs.h <<\EOF
16550 #define USE_GCC 1
16551 EOF
16552 }
16553
16554 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16555     Defining EXTERNAL_WIDGET
16556 EOF
16557 cat >> confdefs.h <<\EOF
16558 #define EXTERNAL_WIDGET 1
16559 EOF
16560 }
16561
16562 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16563     Defining QUICK_BUILD
16564 EOF
16565 cat >> confdefs.h <<\EOF
16566 #define QUICK_BUILD 1
16567 EOF
16568 }
16569
16570 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16571     Defining PURIFY
16572 EOF
16573 cat >> confdefs.h <<\EOF
16574 #define PURIFY 1
16575 EOF
16576 }
16577
16578 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16579     Defining QUANTIFY
16580 EOF
16581 cat >> confdefs.h <<\EOF
16582 #define QUANTIFY 1
16583 EOF
16584 }
16585
16586 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16587     Defining MAIL_USE_POP
16588 EOF
16589 cat >> confdefs.h <<\EOF
16590 #define MAIL_USE_POP 1
16591 EOF
16592 }
16593
16594 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16595     Defining KERBEROS
16596 EOF
16597 cat >> confdefs.h <<\EOF
16598 #define KERBEROS 1
16599 EOF
16600 }
16601
16602 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16603     Defining HESIOD
16604 EOF
16605 cat >> confdefs.h <<\EOF
16606 #define HESIOD 1
16607 EOF
16608 }
16609
16610 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16611     Defining USE_UNION_TYPE
16612 EOF
16613 cat >> confdefs.h <<\EOF
16614 #define USE_UNION_TYPE 1
16615 EOF
16616 }
16617
16618 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16619     Defining REGEX_MALLOC
16620 EOF
16621 cat >> confdefs.h <<\EOF
16622 #define REGEX_MALLOC 1
16623 EOF
16624 }
16625
16626 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16627     Defining PDUMP
16628 EOF
16629 cat >> confdefs.h <<\EOF
16630 #define PDUMP 1
16631 EOF
16632 }
16633
16634 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16635     Defining IPV6_CANONICALIZE
16636 EOF
16637 cat >> confdefs.h <<\EOF
16638 #define IPV6_CANONICALIZE 1
16639 EOF
16640 }
16641
16642
16643
16644 (
16645 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16646 else
16647   echo "uname -a: `uname -a`"
16648 fi
16649 echo ""
16650 echo "$0 $quoted_arguments"
16651 ) > Installation
16652
16653 if test ! -z ${emacs_beta_version} ; then
16654   if test -z "${emacs_is_beta}" ; then
16655         xemacs_betaname=".${emacs_beta_version}"
16656   else
16657         xemacs_betaname="-b${emacs_beta_version}"
16658   fi
16659 else
16660   xemacs_betaname=""
16661 fi
16662
16663 (
16664 echo "
16665
16666 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16667 "
16668 echo "
16669 Compilation / Installation:"
16670 echo "  Source code location:              $srcdir"
16671 echo "  Installation prefix:               $prefix"
16672 if test -n "$site_includes"; then
16673   echo "  Additional header files:           $site_includes"
16674 fi
16675 if test -n "$site_libraries"; then
16676   echo "  Additional libraries:              $site_libraries"
16677 fi
16678 if test -n "$site_prefixes"; then
16679   echo "  Additional prefixes:               $site_prefixes"
16680 fi
16681 if test -n "$runpath"; then
16682   echo "  Runtime library search path:       $runpath"
16683 fi
16684
16685 if test -n "$opsysfile"
16686 then echo "  Operating system description file: \`$opsysfile'"
16687 else echo "  Not using any operating system description file"
16688 fi
16689 if test -n "$machfile"
16690 then echo "  Machine description file:          \`$machfile'"
16691 else echo "  Not using any machine description file"
16692 fi
16693
16694 echo "  Compiler:                          $CC $CFLAGS"
16695 case "$CC" in
16696   gcc*) echo "  Compiler version:                  `$CC --version | sed 1q`"
16697         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | sed 1q`"
16698         ;;
16699   *) case "$canonical" in
16700         *-*-aix*   ) 
16701                   realcc=`which $CC`
16702                   if test -L $realcc ; then
16703             ccdir=`dirname $realcc`
16704             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16705                     case $ccprog in
16706                 */*) realcc=$ccprog;;
16707                 *) realcc=$ccdir/$ccprog;;
16708             esac
16709           fi
16710           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16711           if test ! -z "$lpp" ; then
16712             lppstr=`lslpp -Lqc $lpp`
16713             lpplev=`echo "$lppstr" | cut -f3 -d:`
16714             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16715           fi
16716           if test ! -z "$lpplev" ; then
16717             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16718           else
16719             echo "  Compiler version:                  (unknown version)"
16720           fi
16721         ;;
16722         
16723         *-*-solaris*)
16724           ccvers=`$CC -V 2>&1 | sed 1q`
16725           if test ! -z "$ccvers" ; then
16726             echo "  Compiler version:                  $ccvers"
16727           fi
16728         ;;
16729
16730         alpha*-dec-osf*)
16731           ccvers=`$CC -V | tr '\n' ' '`
16732           if test ! -z "$ccvers" ; then
16733             echo "  Compiler version:                  $ccvers"
16734           fi
16735         ;;
16736
16737         mips-sgi-irix*)
16738           ccvers=`$CC -version`
16739           if test ! -z "$ccvers" ; then
16740             echo "  Compiler version:                  $ccvers"
16741           fi
16742         ;;
16743
16744                 i[3-9]86-pc-linux)
16745           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16746           if test ! -z "$ccvers" ; then
16747             echo "  Compiler version:                  $ccvers"
16748           fi
16749         ;;
16750           
16751         *) echo "  Compiler version:                  $CC on $canonical";;
16752   esac
16753 esac
16754
16755 echo "  Relocating allocator for buffers:  $rel_alloc"
16756 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16757 case "$ld_switch_site" in
16758   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16759     - Consider configuring with --pdump." ;;
16760 esac
16761
16762 case "$canonical" in
16763         *-*-linux*) 
16764           if test -f /etc/redhat-release ; then
16765             echo "  libc:                              `rpm -q glibc`";
16766           else
16767             echo "Need to guess glibc1/2/etc here";
16768           fi
16769         ;;
16770
16771         *-*-aix*) 
16772           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16773         ;;
16774
16775         *-*-solaris*)
16776           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16777           echo "  libc:                              SUNWcsl $libc"
16778
16779         ;;
16780
16781         mips-sgi-irix*)
16782           echo "  IRIX version:                      `uname -sRm`'"
16783         ;;
16784           
16785
16786         alpha*-dec-osf*)
16787                   (cd /usr/.smdb.;
16788                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16789                 echo "  libc:                              $libc"
16790                 
16791           )
16792         ;;
16793
16794         *) echo "  libc:                              system-provided libc on $canonical" ;;
16795 esac
16796
16797
16798 echo "
16799 Window System:"
16800 if test "$with_msw" = "yes"; then
16801   echo "  Compiling in support for the Microsoft window system."
16802 fi
16803 if test "$with_x11" = "yes"; then
16804   echo "  Compiling in support for the X window system:"
16805   echo "    - X Windows headers location:                 $x_includes"
16806   echo "    - X Windows libraries location:               $x_libraries"
16807   if test "$with_xauth" != yes; then
16808     echo "    - Xau (X authority) not available."
16809   fi
16810   if test "$with_xmu" != yes; then
16811     echo "    - Xmu library not available; substituting equivalent routines."
16812   fi
16813   if test "$with_wmcommand" != no; then
16814     echo "    - Handling WM_COMMAND properly."
16815   fi
16816 fi
16817 if test "$need_motif" = "yes" ; then
16818   echo "  Compiling in support for Motif."
16819   if test "$have_lesstif" = "yes"; then
16820     echo "    - Using LessTif implementation."
16821   fi
16822   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16823   echo "             You are likely to experience slow redisplay."
16824   echo "             You may need to install vendor patches to Motif."
16825   echo "             See PROBLEMS for more information."
16826 fi
16827 if test "$need_athena" = "yes"; then
16828   echo "  Compiling in support for the Athena widget set:"
16829   echo "    - Athena headers location:                    $athena_h_path"
16830   echo "    - Athena library to link:                     $athena_lib"
16831 fi
16832 case "$with_menubars" in
16833   gtk   ) echo "  Using GTK menubars."   ;;
16834   lucid ) echo "  Using Lucid menubars." ;;
16835   motif ) echo "  Using Motif menubars."
16836           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16837           echo "             We recommend using the Lucid menubar instead."
16838           echo "             Re-run configure with --with-menubars='lucid'." ;;
16839     msw ) echo "  Using MS-Windows menubars." ;;
16840 esac
16841 case "$with_scrollbars" in
16842   gtk    ) echo "  Using GTK scrollbars."        ;;
16843   lucid  ) echo "  Using Lucid scrollbars."      ;;
16844   motif  ) echo "  Using Motif scrollbars."      ;;
16845   athena ) echo "  Using Athena scrollbars."     ;;
16846      msw ) echo "  Using MS-Windows scrollbars." ;;
16847 esac
16848 case "$with_dialogs" in
16849   gtk    ) echo "  Using GTK dialog boxes." ;;
16850   motif  ) echo "  Using Motif dialog boxes."
16851            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16852              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16853              echo "             We recommend using the Athena dialog boxes instead."
16854              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16855              echo "             Read the PROBLEMS file for more information."
16856            fi; fi ;;
16857   athena ) echo "  Using Athena dialog boxes."     ;;
16858      msw ) echo "  Using MS-Windows dialog boxes." ;;
16859 esac
16860 case "$with_widgets" in
16861   gtk    ) echo "  Using GTK native widgets."        ;;
16862   motif  ) echo "  Using Motif native widgets."      ;;
16863   athena ) echo "  Using Athena native widgets."     ;;
16864      msw ) echo "  Using MS-Windows native widgets." ;;
16865 esac
16866 if test "$with_dragndrop" = yes; then
16867   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16868   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16869 fi
16870
16871 echo "
16872 TTY:"
16873 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16874 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16875
16876 echo "
16877 Images:"
16878 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16879 if test "$with_xpm" = yes; then
16880   echo "  Compiling in support for XPM  images."
16881 elif test "$with_x11" = yes; then
16882   echo "  WARNING: -----------------------------------------------------------"
16883   echo "  WARNING: Compiling without XPM image support."
16884   if test "$xpm_problem" != ""; then
16885     echo "  Reason: $xpm_problem"
16886   fi
16887   echo "  WARNING: You should strongly consider installing XPM."
16888   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16889   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16890   echo "  WARNING: -----------------------------------------------------------"
16891 fi
16892 if test "$with_png" = yes; then
16893   echo "  Compiling in support for PNG  images."
16894 elif test "$window_system" != "none"; then
16895   echo "  WARNING: -----------------------------------------------------------"
16896   echo "  WARNING: Compiling without PNG image support."
16897   if test "$png_problem" != ""; then
16898     echo "  Reason: $png_problem"
16899   fi
16900   echo "  WARNING: You should strongly consider installing the PNG libraries."
16901   echo "  WARNING: Otherwise certain images and glyphs may not display."
16902   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16903   echo "  WARNING: -----------------------------------------------------------"
16904 fi
16905 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16906 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16907 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16908
16909 echo "
16910 Sound:"
16911 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16912 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16913 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16914 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16915
16916 echo "
16917 Databases:"
16918 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16919 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16920 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16921 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16922 if test "$with_postgresql" = yes; then
16923   echo "  Compiling in support for PostgreSQL."
16924   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16925   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16926 fi
16927 if test "$with_concord" = yes; then
16928   echo "  Compiling in support for CONCORD."
16929 fi
16930
16931 echo "
16932 Multiscriptization / Multilingualization / Internationalization:"
16933 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16934 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16935 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16936 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16937 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16938 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16939 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16940 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16941 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16942 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16943 if test "$with_wnn" = yes; then
16944   echo "  Compiling in support for the WNN input method on Mule."
16945   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16946 fi
16947 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16948
16949 echo "
16950 Mail:"
16951 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16952 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16953 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16954 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16955
16956 echo "
16957 Other Features:"
16958 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16959 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16960 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16961 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16962 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16963 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16964 if test "$use_union_type" = yes; then
16965   echo "  WARNING: ---------------------------------------------------------"
16966   echo "  Using the union type for Lisp_Objects."
16967   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16968   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16969   echo "  WARNING: ---------------------------------------------------------"
16970 fi
16971 if test "$use_regex_malloc" = no; then
16972   echo "  WARNING: -----------------------------------------------------------"
16973   echo "  Using alloca to allocate the failure stack."
16974   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16975   echo "  Do NOT use this build of XEmacs for ordinary work."
16976   echo "  WARNING: -----------------------------------------------------------"
16977 fi
16978 test "$pdump" = yes && echo "  Using the new portable dumper."
16979 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16980 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16981 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16982   != "no no no no no no"; then
16983   echo "  WARNING: ---------------------------------------------------------"
16984   echo "  WARNING: Compiling in support for runtime error checking."
16985   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16986   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16987   echo "  WARNING: ---------------------------------------------------------"
16988 fi
16989 echo ""
16990 ) | tee -a Installation
16991 echo ""
16992
16993
16994 # Remove any trailing slashes in these variables.
16995 test -n "$prefix" &&
16996   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16997 test -n "$exec_prefix" &&
16998   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16999
17000
17001 for file in $internal_makefile_list; do
17002   test "$file" = src/Makefile.in && \
17003     file="src/Makefile.in:src/Makefile.in.in:src/depend"
17004   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
17005 done
17006 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
17007 test "$with_modules" = "yes" && ac_output_files="$ac_output_files lib-src/ellcc.h" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src/ellcc.h\" to \$ac_output_files"; fi
17008
17009 trap '' 1 2 15
17010
17011 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
17012
17013 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17014 # Let make expand exec_prefix.
17015 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17016
17017 # Any assignment to VPATH causes Sun make to only execute
17018 # the first set of double-colon rules, so remove it if not needed.
17019 # If there is a colon in the path, we need to keep it.
17020 if test "x$srcdir" = x.; then
17021   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
17022 fi
17023
17024 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
17025
17026 DEFS=-DHAVE_CONFIG_H
17027
17028 # Without the "./", some shells look in PATH for config.status.
17029 : ${CONFIG_STATUS=./config.status}
17030
17031 echo creating $CONFIG_STATUS
17032 rm -f $CONFIG_STATUS
17033 cat > $CONFIG_STATUS <<EOF
17034 #! /bin/sh
17035 # Generated automatically by configure.
17036 # Run this file to recreate the current configuration.
17037 # This directory was configured as follows,
17038 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17039 #
17040 # $0 $ac_configure_args
17041 #
17042 # Compiler output produced by configure, useful for debugging
17043 # configure, is in ./config.log if it exists.
17044
17045 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
17046 for ac_option
17047 do
17048   case "\$ac_option" in
17049   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17050     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
17051     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
17052   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
17053     echo "$CONFIG_STATUS generated by autoconf version 2.13"
17054     exit 0 ;;
17055   -help | --help | --hel | --he | --h)
17056     echo "\$ac_cs_usage"; exit 0 ;;
17057   *) echo "\$ac_cs_usage"; exit 1 ;;
17058   esac
17059 done
17060
17061 ac_given_srcdir=$srcdir
17062 ac_given_INSTALL="$INSTALL"
17063
17064 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
17065 EOF
17066 cat >> $CONFIG_STATUS <<EOF
17067
17068 # Protect against being on the right side of a sed subst in config.status.
17069 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
17070  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
17071 $ac_vpsub
17072 $extrasub
17073 s%@SHELL@%$SHELL%g
17074 s%@CFLAGS@%$CFLAGS%g
17075 s%@CPPFLAGS@%$CPPFLAGS%g
17076 s%@CXXFLAGS@%$CXXFLAGS%g
17077 s%@FFLAGS@%$FFLAGS%g
17078 s%@DEFS@%$DEFS%g
17079 s%@LDFLAGS@%$LDFLAGS%g
17080 s%@LIBS@%$LIBS%g
17081 s%@exec_prefix@%$exec_prefix%g
17082 s%@prefix@%$prefix%g
17083 s%@program_transform_name@%$program_transform_name%g
17084 s%@bindir@%$bindir%g
17085 s%@sbindir@%$sbindir%g
17086 s%@libexecdir@%$libexecdir%g
17087 s%@datadir@%$datadir%g
17088 s%@sysconfdir@%$sysconfdir%g
17089 s%@sharedstatedir@%$sharedstatedir%g
17090 s%@localstatedir@%$localstatedir%g
17091 s%@libdir@%$libdir%g
17092 s%@includedir@%$includedir%g
17093 s%@oldincludedir@%$oldincludedir%g
17094 s%@infodir@%$infodir%g
17095 s%@mandir@%$mandir%g
17096 s%@LN_S@%$LN_S%g
17097 s%@blddir@%$blddir%g
17098 s%@CC@%$CC%g
17099 s%@CPP@%$CPP%g
17100 s%@start_flags@%$start_flags%g
17101 s%@ld_switch_shared@%$ld_switch_shared%g
17102 s%@start_files@%$start_files%g
17103 s%@ld@%$ld%g
17104 s%@lib_gcc@%$lib_gcc%g
17105 s%@RANLIB@%$RANLIB%g
17106 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
17107 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
17108 s%@INSTALL_DATA@%$INSTALL_DATA%g
17109 s%@YACC@%$YACC%g
17110 s%@SET_MAKE@%$SET_MAKE%g
17111 s%@GTK_CONFIG@%$GTK_CONFIG%g
17112 s%@X_CFLAGS@%$X_CFLAGS%g
17113 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
17114 s%@X_LIBS@%$X_LIBS%g
17115 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
17116 s%@install_pp@%$install_pp%g
17117 s%@libs_xauth@%$libs_xauth%g
17118 s%@dnd_objs@%$dnd_objs%g
17119 s%@lwlib_objs@%$lwlib_objs%g
17120 s%@ALLOCA@%$ALLOCA%g
17121 s%@have_esd_config@%$have_esd_config%g
17122 s%@dll_ld@%$dll_ld%g
17123 s%@dll_cflags@%$dll_cflags%g
17124 s%@dll_ldflags@%$dll_ldflags%g
17125 s%@dll_post@%$dll_post%g
17126 s%@dll_ldo@%$dll_ldo%g
17127 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
17128 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
17129 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
17130 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
17131 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
17132 s%@PROGNAME@%$PROGNAME%g
17133 s%@version@%$version%g
17134 s%@configuration@%$configuration%g
17135 s%@canonical@%$canonical%g
17136 s%@inststaticdir@%$inststaticdir%g
17137 s%@instvardir@%$instvardir%g
17138 s%@srcdir@%$srcdir%g
17139 s%@pkgdir@%$pkgdir%g
17140 s%@statedir@%$statedir%g
17141 s%@extra_includes@%$extra_includes%g
17142 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
17143 s%@PREFIX@%$PREFIX%g
17144 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
17145 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
17146 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
17147 s%@INFODIR@%$INFODIR%g
17148 s%@infopath@%$infopath%g
17149 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
17150 s%@INFOPATH@%$INFOPATH%g
17151 s%@package_path@%$package_path%g
17152 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
17153 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
17154 s%@lispdir@%$lispdir%g
17155 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
17156 s%@LISPDIR@%$LISPDIR%g
17157 s%@moduledir@%$moduledir%g
17158 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
17159 s%@MODULEDIR@%$MODULEDIR%g
17160 s%@sitelispdir@%$sitelispdir%g
17161 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
17162 s%@SITELISPDIR@%$SITELISPDIR%g
17163 s%@sitemoduledir@%$sitemoduledir%g
17164 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
17165 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
17166 s%@etcdir@%$etcdir%g
17167 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
17168 s%@ETCDIR@%$ETCDIR%g
17169 s%@docdir@%$docdir%g
17170 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
17171 s%@DOCDIR@%$DOCDIR%g
17172 s%@archlibdir@%$archlibdir%g
17173 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
17174 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
17175 s%@bitmapdir@%$bitmapdir%g
17176 s%@extra_objs@%$extra_objs%g
17177 s%@machfile@%$machfile%g
17178 s%@opsysfile@%$opsysfile%g
17179 s%@c_switch_general@%$c_switch_general%g
17180 s%@c_switch_window_system@%$c_switch_window_system%g
17181 s%@c_switch_all@%$c_switch_all%g
17182 s%@ld_switch_general@%$ld_switch_general%g
17183 s%@ld_switch_window_system@%$ld_switch_window_system%g
17184 s%@ld_switch_all@%$ld_switch_all%g
17185 s%@ld_libs_general@%$ld_libs_general%g
17186 s%@ld_libs_window_system@%$ld_libs_window_system%g
17187 s%@ld_libs_all@%$ld_libs_all%g
17188 s%@RECURSIVE_MAKE_ARGS@%$RECURSIVE_MAKE_ARGS%g
17189 s%@native_sound_lib@%$native_sound_lib%g
17190 s%@sound_cflags@%$sound_cflags%g
17191 s%@dynodump_arch@%$dynodump_arch%g
17192 s%@XEMACS_CC@%$XEMACS_CC%g
17193 s%@internal_makefile_list@%$internal_makefile_list%g
17194
17195 CEOF
17196 EOF
17197
17198 cat >> $CONFIG_STATUS <<\EOF
17199
17200 # Split the substitutions into bite-sized pieces for seds with
17201 # small command number limits, like on Digital OSF/1 and HP-UX.
17202 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17203 ac_file=1 # Number of current file.
17204 ac_beg=1 # First line for current file.
17205 ac_end=$ac_max_sed_cmds # Line after last line for current file.
17206 ac_more_lines=:
17207 ac_sed_cmds=""
17208 while $ac_more_lines; do
17209   if test $ac_beg -gt 1; then
17210     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
17211   else
17212     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
17213   fi
17214   if test ! -s conftest.s$ac_file; then
17215     ac_more_lines=false
17216     rm -f conftest.s$ac_file
17217   else
17218     if test -z "$ac_sed_cmds"; then
17219       ac_sed_cmds="sed -f conftest.s$ac_file"
17220     else
17221       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
17222     fi
17223     ac_file=`expr $ac_file + 1`
17224     ac_beg=$ac_end
17225     ac_end=`expr $ac_end + $ac_max_sed_cmds`
17226   fi
17227 done
17228 if test -z "$ac_sed_cmds"; then
17229   ac_sed_cmds=cat
17230 fi
17231 EOF
17232
17233 cat >> $CONFIG_STATUS <<EOF
17234
17235 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
17236 EOF
17237 cat >> $CONFIG_STATUS <<\EOF
17238 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17239   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17240   case "$ac_file" in
17241   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17242        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17243   *) ac_file_in="${ac_file}.in" ;;
17244   esac
17245
17246   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17247
17248   # Remove last slash and all that follows it.  Not all systems have dirname.
17249   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17250   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17251     # The file is in a subdirectory.
17252     test ! -d "$ac_dir" && mkdir "$ac_dir"
17253     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17254     # A "../" for each directory in $ac_dir_suffix.
17255     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17256   else
17257     ac_dir_suffix= ac_dots=
17258   fi
17259
17260   case "$ac_given_srcdir" in
17261   .)  srcdir=.
17262       if test -z "$ac_dots"; then top_srcdir=.
17263       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17264   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17265   *) # Relative path.
17266     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17267     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17268   esac
17269
17270   case "$ac_given_INSTALL" in
17271   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17272   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17273   esac
17274
17275   echo creating "$ac_file"
17276   rm -f "$ac_file"
17277   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17278   case "$ac_file" in
17279   *Makefile*) ac_comsub="1i\\
17280 # $configure_input" ;;
17281   *) ac_comsub= ;;
17282   esac
17283
17284   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17285   sed -e "$ac_comsub
17286 s%@configure_input@%$configure_input%g
17287 s%@srcdir@%$srcdir%g
17288 s%@top_srcdir@%$top_srcdir%g
17289 s%@INSTALL@%$INSTALL%g
17290 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17291 fi; done
17292 rm -f conftest.s*
17293
17294 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17295 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17296 #
17297 # ac_d sets the value in "#define NAME VALUE" lines.
17298 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17299 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17300 ac_dC='\3'
17301 ac_dD='%g'
17302 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17303 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17304 ac_uB='\([      ]\)%\1#\2define\3'
17305 ac_uC=' '
17306 ac_uD='\4%g'
17307 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17308 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17309 ac_eB='$%\1#\2define\3'
17310 ac_eC=' '
17311 ac_eD='%g'
17312
17313 if test "${CONFIG_HEADERS+set}" != set; then
17314 EOF
17315 cat >> $CONFIG_STATUS <<EOF
17316   CONFIG_HEADERS="src/config.h lwlib/config.h"
17317 EOF
17318 cat >> $CONFIG_STATUS <<\EOF
17319 fi
17320 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17321   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17322   case "$ac_file" in
17323   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17324        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17325   *) ac_file_in="${ac_file}.in" ;;
17326   esac
17327
17328   echo creating $ac_file
17329
17330   rm -f conftest.frag conftest.in conftest.out
17331   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17332   cat $ac_file_inputs > conftest.in
17333
17334 EOF
17335
17336 # Transform confdefs.h into a sed script conftest.vals that substitutes
17337 # the proper values into config.h.in to produce config.h.  And first:
17338 # Protect against being on the right side of a sed subst in config.status.
17339 # Protect against being in an unquoted here document in config.status.
17340 rm -f conftest.vals
17341 cat > conftest.hdr <<\EOF
17342 s/[\\&%]/\\&/g
17343 s%[\\$`]%\\&%g
17344 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17345 s%ac_d%ac_u%gp
17346 s%ac_u%ac_e%gp
17347 EOF
17348 sed -n -f conftest.hdr confdefs.h > conftest.vals
17349 rm -f conftest.hdr
17350
17351 # This sed command replaces #undef with comments.  This is necessary, for
17352 # example, in the case of _POSIX_SOURCE, which is predefined and required
17353 # on some systems where configure will not decide to define it.
17354 cat >> conftest.vals <<\EOF
17355 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17356 EOF
17357
17358 # Break up conftest.vals because some shells have a limit on
17359 # the size of here documents, and old seds have small limits too.
17360
17361 rm -f conftest.tail
17362 while :
17363 do
17364   ac_lines=`grep -c . conftest.vals`
17365   # grep -c gives empty output for an empty file on some AIX systems.
17366   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17367   # Write a limited-size here document to conftest.frag.
17368   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17369   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17370   echo 'CEOF
17371   sed -f conftest.frag conftest.in > conftest.out
17372   rm -f conftest.in
17373   mv conftest.out conftest.in
17374 ' >> $CONFIG_STATUS
17375   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17376   rm -f conftest.vals
17377   mv conftest.tail conftest.vals
17378 done
17379 rm -f conftest.vals
17380
17381 cat >> $CONFIG_STATUS <<\EOF
17382   rm -f conftest.frag conftest.h
17383   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17384   cat conftest.in >> conftest.h
17385   rm -f conftest.in
17386   if cmp -s $ac_file conftest.h 2>/dev/null; then
17387     echo "$ac_file is unchanged"
17388     rm -f conftest.h
17389   else
17390     # Remove last slash and all that follows it.  Not all systems have dirname.
17391       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17392       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17393       # The file is in a subdirectory.
17394       test ! -d "$ac_dir" && mkdir "$ac_dir"
17395     fi
17396     rm -f $ac_file
17397     mv conftest.h $ac_file
17398   fi
17399 fi; done
17400
17401 EOF
17402 cat >> $CONFIG_STATUS <<EOF
17403 CPP="$CPP"
17404  top_srcdir="$srcdir"
17405  MAKE_SUBDIR="$MAKE_SUBDIR"
17406
17407 EOF
17408 cat >> $CONFIG_STATUS <<\EOF
17409 for dir in . $MAKE_SUBDIR; do
17410   (
17411     cd $dir
17412     rm -f junk.c
17413     < Makefile.in \
17414       sed -e '/^# Generated/d' \
17415           -e 's%/\*\*/#.*%%' \
17416           -e 's/^ *# */#/' \
17417           -e '/^##/d' \
17418           -e '/^#/ {
17419 p
17420 d
17421 }'        \
17422           -e '/./ {
17423 s/\([\"]\)/\\\1/g
17424 s/^/"/
17425 s/$/"/
17426 }'  > junk.c;
17427
17428
17429
17430     echo creating $dir/Makefile
17431 $CPP -I. -I${top_srcdir}/src  junk.c \
17432   | sed -e 's/^\#.*//'          \
17433         -e 's/^[        ][      ]*$//'\
17434         -e 's/^ /       /'              \
17435         -e '/^[ \f]*$/d' \
17436         -e '/^\"/ {
17437         s/\\\([\"]\)/\1/g
17438         s/^[    ]*\"//
17439         s/\"[   ]*$//
17440 }' > Makefile.new
17441     chmod 444 Makefile.new
17442     mv -f Makefile.new Makefile
17443
17444     echo creating $dir/GNUmakefile
17445 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
17446   | sed -e 's/^\#.*//'          \
17447         -e 's/^[        ][      ]*$//'\
17448         -e 's/^ /       /'              \
17449         -e '/^[ \f]*$/d' \
17450         -e '/^\"/ {
17451         s/\\\([\"]\)/\1/g
17452         s/^[    ]*\"//
17453         s/\"[   ]*$//
17454 }' > Makefile.new
17455     chmod 444 Makefile.new
17456     mv -f Makefile.new GNUmakefile
17457
17458     rm -f junk.c
17459   )
17460 done
17461
17462 sed < config.status >> lib-src/config.values \
17463   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
17464   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
17465   -e 's/^\([^ ]*\) $/\1 ""/' \
17466   -e 's/ 1$/ t/'
17467
17468
17469 exit 0
17470 EOF
17471 chmod +x $CONFIG_STATUS
17472 rm -fr confdefs* $ac_clean_files
17473 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1