(U+5E72): Add `<-denotational@component' for A-compU+5343.
[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 main()
4521 {
4522   FILE *f=fopen("conftestval", "w");
4523   if (!f) exit(1);
4524   fprintf(f, "%d\n", sizeof(short));
4525   exit(0);
4526 }
4527 EOF
4528 if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4529 then
4530   ac_cv_sizeof_short=`cat conftestval`
4531 else
4532   conftest_rc="$?"
4533   echo "configure: failed program was:" >&5
4534   cat conftest.$ac_ext >&5
4535   rm -fr conftest*
4536   ac_cv_sizeof_short=0
4537 fi
4538 rm -fr conftest*
4539 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4540 { test "$extra_verbose" = "yes" && cat << EOF
4541     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4542 EOF
4543 cat >> confdefs.h <<EOF
4544 #define SIZEOF_SHORT $ac_cv_sizeof_short
4545 EOF
4546 }
4547
4548
4549 if test "$ac_cv_sizeof_short" = 0; then
4550   echo ""
4551   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4552   echo "*** PANIC *** Please examine config.log for compilation errors."
4553   exit 1
4554 fi
4555 echo $ac_n "checking size of int""... $ac_c" 1>&6
4556 echo "configure:4557: checking size of int" >&5
4557
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 #include <stdio.h>
4562 main()
4563 {
4564   FILE *f=fopen("conftestval", "w");
4565   if (!f) exit(1);
4566   fprintf(f, "%d\n", sizeof(int));
4567   exit(0);
4568 }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4571 then
4572   ac_cv_sizeof_int=`cat conftestval`
4573 else
4574   conftest_rc="$?"
4575   echo "configure: failed program was:" >&5
4576   cat conftest.$ac_ext >&5
4577   rm -fr conftest*
4578   ac_cv_sizeof_int=0
4579 fi
4580 rm -fr conftest*
4581 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4582 { test "$extra_verbose" = "yes" && cat << EOF
4583     Defining SIZEOF_INT = $ac_cv_sizeof_int
4584 EOF
4585 cat >> confdefs.h <<EOF
4586 #define SIZEOF_INT $ac_cv_sizeof_int
4587 EOF
4588 }
4589
4590
4591 echo $ac_n "checking size of long""... $ac_c" 1>&6
4592 echo "configure:4593: checking size of long" >&5
4593
4594 cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597 #include <stdio.h>
4598 main()
4599 {
4600   FILE *f=fopen("conftestval", "w");
4601   if (!f) exit(1);
4602   fprintf(f, "%d\n", sizeof(long));
4603   exit(0);
4604 }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4607 then
4608   ac_cv_sizeof_long=`cat conftestval`
4609 else
4610   conftest_rc="$?"
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -fr conftest*
4614   ac_cv_sizeof_long=0
4615 fi
4616 rm -fr conftest*
4617 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4618 { test "$extra_verbose" = "yes" && cat << EOF
4619     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4620 EOF
4621 cat >> confdefs.h <<EOF
4622 #define SIZEOF_LONG $ac_cv_sizeof_long
4623 EOF
4624 }
4625
4626
4627 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4628 echo "configure:4629: checking size of long long" >&5
4629
4630 cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 #include <stdio.h>
4634 main()
4635 {
4636   FILE *f=fopen("conftestval", "w");
4637   if (!f) exit(1);
4638   fprintf(f, "%d\n", sizeof(long long));
4639   exit(0);
4640 }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4643 then
4644   ac_cv_sizeof_long_long=`cat conftestval`
4645 else
4646   conftest_rc="$?"
4647   echo "configure: failed program was:" >&5
4648   cat conftest.$ac_ext >&5
4649   rm -fr conftest*
4650   ac_cv_sizeof_long_long=0
4651 fi
4652 rm -fr conftest*
4653 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4654 { test "$extra_verbose" = "yes" && cat << EOF
4655     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4656 EOF
4657 cat >> confdefs.h <<EOF
4658 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4659 EOF
4660 }
4661
4662
4663 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4664 echo "configure:4665: checking size of void *" >&5
4665
4666 cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4669 #include <stdio.h>
4670 main()
4671 {
4672   FILE *f=fopen("conftestval", "w");
4673   if (!f) exit(1);
4674   fprintf(f, "%d\n", sizeof(void *));
4675   exit(0);
4676 }
4677 EOF
4678 if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4679 then
4680   ac_cv_sizeof_void_p=`cat conftestval`
4681 else
4682   conftest_rc="$?"
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -fr conftest*
4686   ac_cv_sizeof_void_p=0
4687 fi
4688 rm -fr conftest*
4689 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4690 { test "$extra_verbose" = "yes" && cat << EOF
4691     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4692 EOF
4693 cat >> confdefs.h <<EOF
4694 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4695 EOF
4696 }
4697
4698
4699
4700 case $opsys in
4701   cygwin* ) cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704 #include <cygwin/types.h>
4705 EOF
4706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4707   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4708   rm -rf conftest*
4709   echo "$ac_t""yes" 1>&6
4710                              { test "$extra_verbose" = "yes" && cat << \EOF
4711     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4712 EOF
4713 cat >> confdefs.h <<\EOF
4714 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4715 EOF
4716 }
4717
4718 else
4719   rm -rf conftest*
4720   echo "$ac_t""no" 1>&6
4721 fi
4722 rm -f conftest*
4723  ;;
4724 esac
4725
4726 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4727 echo "configure:4728: checking for long file names" >&5
4728
4729 ac_cv_sys_long_file_names=yes
4730 # Test for long file names in all the places we know might matter:
4731 #      .                the current directory, where building will happen
4732 #      $prefix/lib      where we will be installing things
4733 #      $exec_prefix/lib likewise
4734 # eval it to expand exec_prefix.
4735 #      $TMPDIR          if set, where it might want to write temporary files
4736 # if $TMPDIR is not set:
4737 #      /tmp             where it might want to write temporary files
4738 #      /var/tmp         likewise
4739 #      /usr/tmp         likewise
4740 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4741   ac_tmpdirs="$TMPDIR"
4742 else
4743   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4744 fi
4745 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4746   test -d $ac_dir || continue
4747   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4748   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4749   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4750   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4751   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4752     ac_cv_sys_long_file_names=no
4753     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4754     break
4755   fi
4756   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4757 done
4758
4759 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4760 if test $ac_cv_sys_long_file_names = yes; then
4761   { test "$extra_verbose" = "yes" && cat << \EOF
4762     Defining HAVE_LONG_FILE_NAMES
4763 EOF
4764 cat >> confdefs.h <<\EOF
4765 #define HAVE_LONG_FILE_NAMES 1
4766 EOF
4767 }
4768
4769 fi
4770
4771
4772 echo $ac_n "checking for sin""... $ac_c" 1>&6
4773 echo "configure:4774: checking for sin" >&5
4774
4775 cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778 /* System header to define __stub macros and hopefully few prototypes,
4779     which can conflict with char sin(); below.  */
4780 #include <assert.h>
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 /* We use char because int might match the return type of a gcc2
4783     builtin and then its argument prototype would still apply.  */
4784 char sin();
4785
4786 int main() {
4787
4788 /* The GNU C library defines this for functions which it implements
4789     to always fail with ENOSYS.  Some functions are actually named
4790     something starting with __ and the normal name is an alias.  */
4791 #if defined (__stub_sin) || defined (__stub___sin)
4792 choke me
4793 #else
4794 sin();
4795 #endif
4796
4797 ; return 0; }
4798 EOF
4799 if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4800   rm -rf conftest*
4801   eval "ac_cv_func_sin=yes"
4802 else
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   eval "ac_cv_func_sin=no"
4807 fi
4808 rm -f conftest*
4809
4810 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812   :
4813 else
4814   echo "$ac_t""no" 1>&6
4815
4816 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4817 echo "configure:4818: checking for sin in -lm" >&5
4818 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4819
4820 xe_check_libs=" -lm "
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* Override any gcc2 internal prototype to avoid an error.  */
4825 /* We use char because int might match the return type of a gcc2
4826     builtin and then its argument prototype would still apply.  */
4827 char sin();
4828
4829 int main() {
4830 sin()
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   eval "ac_cv_lib_$ac_lib_var=yes"
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=no"
4841 fi
4842 rm -f conftest*
4843 xe_check_libs=""
4844
4845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4846   echo "$ac_t""yes" 1>&6
4847     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4848     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4849   { test "$extra_verbose" = "yes" && cat << EOF
4850     Defining $ac_tr_lib
4851 EOF
4852 cat >> confdefs.h <<EOF
4853 #define $ac_tr_lib 1
4854 EOF
4855 }
4856
4857   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4858
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862
4863
4864 fi
4865
4866
4867 { test "$extra_verbose" = "yes" && cat << \EOF
4868     Defining LISP_FLOAT_TYPE
4869 EOF
4870 cat >> confdefs.h <<\EOF
4871 #define LISP_FLOAT_TYPE 1
4872 EOF
4873 }
4874
4875
4876 cat > conftest.$ac_ext <<EOF
4877 #line 4878 "configure"
4878 #include "confdefs.h"
4879 #include <math.h>
4880 int main() {
4881 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4882 ; return 0; }
4883 EOF
4884 if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4885   rm -rf conftest*
4886   { test "$extra_verbose" = "yes" && cat << \EOF
4887     Defining HAVE_INVERSE_HYPERBOLIC
4888 EOF
4889 cat >> confdefs.h <<\EOF
4890 #define HAVE_INVERSE_HYPERBOLIC 1
4891 EOF
4892 }
4893
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897 fi
4898 rm -f conftest*
4899
4900 echo "checking type of mail spool file locking" 1>&6
4901 echo "configure:4902: checking type of mail spool file locking" >&5
4902 for ac_func in lockf flock
4903 do
4904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4905 echo "configure:4906: checking for $ac_func" >&5
4906
4907 cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910 /* System header to define __stub macros and hopefully few prototypes,
4911     which can conflict with char $ac_func(); below.  */
4912 #include <assert.h>
4913 /* Override any gcc2 internal prototype to avoid an error.  */
4914 /* We use char because int might match the return type of a gcc2
4915     builtin and then its argument prototype would still apply.  */
4916 char $ac_func();
4917
4918 int main() {
4919
4920 /* The GNU C library defines this for functions which it implements
4921     to always fail with ENOSYS.  Some functions are actually named
4922     something starting with __ and the normal name is an alias.  */
4923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4924 choke me
4925 #else
4926 $ac_func();
4927 #endif
4928
4929 ; return 0; }
4930 EOF
4931 if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932   rm -rf conftest*
4933   eval "ac_cv_func_$ac_func=yes"
4934 else
4935   echo "configure: failed program was:" >&5
4936   cat conftest.$ac_ext >&5
4937   rm -rf conftest*
4938   eval "ac_cv_func_$ac_func=no"
4939 fi
4940 rm -f conftest*
4941
4942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4943   echo "$ac_t""yes" 1>&6
4944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4945   { test "$extra_verbose" = "yes" && cat << EOF
4946     Defining $ac_tr_func
4947 EOF
4948 cat >> confdefs.h <<EOF
4949 #define $ac_tr_func 1
4950 EOF
4951 }
4952  
4953 else
4954   echo "$ac_t""no" 1>&6
4955 fi
4956 done
4957
4958 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4959 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4960 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4961 if   test -z "$mail_locking"; then
4962   case "$opsys" in cygwin* | mingw*)
4963     mail_locking=pop ;;
4964   esac
4965 fi
4966
4967 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4968     Defining MAIL_LOCK_LOCKF
4969 EOF
4970 cat >> confdefs.h <<\EOF
4971 #define MAIL_LOCK_LOCKF 1
4972 EOF
4973 }
4974
4975 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4976     Defining MAIL_LOCK_FLOCK
4977 EOF
4978 cat >> confdefs.h <<\EOF
4979 #define MAIL_LOCK_FLOCK 1
4980 EOF
4981 }
4982
4983 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4984     Defining MAIL_LOCK_LOCKING
4985 EOF
4986 cat >> confdefs.h <<\EOF
4987 #define MAIL_LOCK_LOCKING 1
4988 EOF
4989 }
4990
4991 elif test "$mail_locking" = "pop"; then
4992   with_pop=yes
4993   mail_locking=
4994 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4995     Defining MAIL_LOCK_DOT
4996 EOF
4997 cat >> confdefs.h <<\EOF
4998 #define MAIL_LOCK_DOT 1
4999 EOF
5000 }
5001
5002 fi
5003 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5004   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5005 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5006   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5007 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5008   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5009
5010 case "$opsys" in decosf*)
5011   
5012 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5013 echo "configure:5014: checking for cma_open in -lpthreads" >&5
5014 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5015
5016 xe_check_libs=" -lpthreads "
5017 cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* Override any gcc2 internal prototype to avoid an error.  */
5021 /* We use char because int might match the return type of a gcc2
5022     builtin and then its argument prototype would still apply.  */
5023 char cma_open();
5024
5025 int main() {
5026 cma_open()
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_lib_$ac_lib_var=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=no"
5037 fi
5038 rm -f conftest*
5039 xe_check_libs=""
5040
5041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5045   { test "$extra_verbose" = "yes" && cat << EOF
5046     Defining $ac_tr_lib
5047 EOF
5048 cat >> confdefs.h <<EOF
5049 #define $ac_tr_lib 1
5050 EOF
5051 }
5052
5053   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5054
5055 else
5056   echo "$ac_t""no" 1>&6
5057 fi
5058
5059
5060   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5061     c_switch_site="$c_switch_site -threads" ;;
5062 esac
5063
5064
5065 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5066 echo "configure:5067: checking whether the -xildoff compiler flag is required" >&5
5067 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5068   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5069     then echo "$ac_t""no" 1>&6;
5070     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
5071   fi
5072   else echo "$ac_t""no" 1>&6
5073 fi
5074
5075 if test "$opsys" = "sol2"; then
5076   if test "$os_release" -ge 506; then
5077     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5078 echo "configure:5079: checking for \"-z ignore\" linker flag" >&5
5079     case "`ld -h 2>&1`" in
5080       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5081         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5082       *) echo "$ac_t""no" 1>&6 ;;
5083     esac
5084   fi
5085 fi
5086
5087
5088 echo "checking "for specified window system"" 1>&6
5089 echo "configure:5090: checking "for specified window system"" >&5
5090
5091
5092 GNOME_CONFIG=no
5093 GTK_CONFIG=no
5094
5095 if test "$with_gnome" != "no"; then
5096    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5097 echo "configure:5098: checking for GNOME configuration script" >&5
5098    for possible in gnome-config
5099    do
5100       possible_version=`${possible} --version 2> /dev/null`
5101       if test "x${possible_version}" != "x"; then
5102               GNOME_CONFIG="${possible}"
5103               with_gnome=yes
5104               with_gtk=yes
5105               break
5106       fi
5107    done
5108    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5109 fi
5110
5111 if test "${GNOME_CONFIG}" != "no"; then
5112       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5113       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5114       { test "$extra_verbose" = "yes" && cat << \EOF
5115     Defining HAVE_GNOME
5116 EOF
5117 cat >> confdefs.h <<\EOF
5118 #define HAVE_GNOME 1
5119 EOF
5120 }
5121
5122       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5123       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5124 fi
5125
5126 if test "$with_gtk" != "no";then
5127    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5128 echo "configure:5129: checking for GTK configuration script" >&5
5129    for possible in gtk12-config gtk14-config gtk-config
5130    do
5131       possible_version=`${possible} --version 2> /dev/null`
5132       if test "x${possible_version}" != "x"; then
5133               GTK_CONFIG="${possible}"
5134               case "${possible_version}" in
5135                 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5136                 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5137                 1.2.*)
5138                         with_gtk=yes
5139                         break
5140                         ;;
5141                 *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5142               esac
5143       fi
5144    done
5145    echo "$ac_t""${GTK_CONFIG}" 1>&6
5146 fi
5147
5148 if test "${GTK_CONFIG}" != "no"; then
5149       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5150 echo "configure:5151: checking gtk version" >&5
5151       GTK_VERSION=`${GTK_CONFIG} --version`
5152       echo "$ac_t""${GTK_VERSION}" 1>&6
5153
5154       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5155 echo "configure:5156: checking gtk libs" >&5
5156       GTK_LIBS=`${GTK_CONFIG} --libs`
5157       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5158       echo "$ac_t""${GTK_LIBS}" 1>&6
5159
5160       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5161 echo "configure:5162: checking gtk cflags" >&5
5162       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5163       if test "$GCC" = "yes"; then
5164         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5165       fi
5166       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5167       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5168
5169       
5170 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5171 echo "configure:5172: checking for main in -lgdk_imlib" >&5
5172 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5173
5174 xe_check_libs=" -lgdk_imlib "
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178
5179 int main() {
5180 main()
5181 ; return 0; }
5182 EOF
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5184   rm -rf conftest*
5185   eval "ac_cv_lib_$ac_lib_var=yes"
5186 else
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=no"
5191 fi
5192 rm -f conftest*
5193 xe_check_libs=""
5194
5195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5196   echo "$ac_t""yes" 1>&6
5197   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201
5202
5203       
5204 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5205 echo "configure:5206: checking for Imlib_init in -lImlib" >&5
5206 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5207
5208 xe_check_libs=" -lImlib "
5209 cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 /* Override any gcc2 internal prototype to avoid an error.  */
5213 /* We use char because int might match the return type of a gcc2
5214     builtin and then its argument prototype would still apply.  */
5215 char Imlib_init();
5216
5217 int main() {
5218 Imlib_init()
5219 ; return 0; }
5220 EOF
5221 if { (eval echo configure:5222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5222   rm -rf conftest*
5223   eval "ac_cv_lib_$ac_lib_var=yes"
5224 else
5225   echo "configure: failed program was:" >&5
5226   cat conftest.$ac_ext >&5
5227   rm -rf conftest*
5228   eval "ac_cv_lib_$ac_lib_var=no"
5229 fi
5230 rm -f conftest*
5231 xe_check_libs=""
5232
5233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5234   echo "$ac_t""yes" 1>&6
5235   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5236 else
5237   echo "$ac_t""no" 1>&6
5238 fi
5239
5240
5241       for ac_func in gdk_imlib_init
5242 do
5243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5244 echo "configure:5245: checking for $ac_func" >&5
5245
5246 cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5249 /* System header to define __stub macros and hopefully few prototypes,
5250     which can conflict with char $ac_func(); below.  */
5251 #include <assert.h>
5252 /* Override any gcc2 internal prototype to avoid an error.  */
5253 /* We use char because int might match the return type of a gcc2
5254     builtin and then its argument prototype would still apply.  */
5255 char $ac_func();
5256
5257 int main() {
5258
5259 /* The GNU C library defines this for functions which it implements
5260     to always fail with ENOSYS.  Some functions are actually named
5261     something starting with __ and the normal name is an alias.  */
5262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5263 choke me
5264 #else
5265 $ac_func();
5266 #endif
5267
5268 ; return 0; }
5269 EOF
5270 if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5271   rm -rf conftest*
5272   eval "ac_cv_func_$ac_func=yes"
5273 else
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_func_$ac_func=no"
5278 fi
5279 rm -f conftest*
5280
5281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5284   { test "$extra_verbose" = "yes" && cat << EOF
5285     Defining $ac_tr_func
5286 EOF
5287 cat >> confdefs.h <<EOF
5288 #define $ac_tr_func 1
5289 EOF
5290 }
5291  
5292 else
5293   echo "$ac_t""no" 1>&6
5294 fi
5295 done
5296
5297
5298       { test "$extra_verbose" = "yes" && cat << \EOF
5299     Defining HAVE_XPM
5300 EOF
5301 cat >> confdefs.h <<\EOF
5302 #define HAVE_XPM 1
5303 EOF
5304 }
5305
5306       { test "$extra_verbose" = "yes" && cat << \EOF
5307     Defining HAVE_GTK
5308 EOF
5309 cat >> confdefs.h <<\EOF
5310 #define HAVE_GTK 1
5311 EOF
5312 }
5313
5314       
5315
5316       window_system=gtk
5317       with_gtk=yes
5318       with_x11=no
5319
5320       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5321       test "${with_toolbars}" != no && with_toolbars=gtk
5322       test "${with_menubars}" != "no" && with_menubars=gtk
5323       test "${with_dialogs}" != "no" && with_dialogs=gtk
5324       test "${with_widgets}" != "no" && with_widgets=gtk
5325
5326       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5327    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5328  fi
5329       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5330    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5331  fi
5332       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5333    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5334  fi
5335       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5336    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5337  fi
5338
5339             OLD_CFLAGS="${CFLAGS}"
5340       OLD_CPPFLAGS="${CPPFLAGS}"
5341       OLD_LDFLAGS="${LDFLAGS}"
5342       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5343       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5344       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5345       for ac_hdr in glade/glade.h glade.h
5346 do
5347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5349 echo "configure:5350: checking for $ac_hdr" >&5
5350
5351 cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354 #include <$ac_hdr>
5355 EOF
5356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5357 { (eval echo configure:5358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5359 if test -z "$ac_err"; then
5360   rm -rf conftest*
5361   eval "ac_cv_header_$ac_safe=yes"
5362 else
5363   echo "$ac_err" >&5
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_header_$ac_safe=no"
5368 fi
5369 rm -f conftest*
5370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5371   echo "$ac_t""yes" 1>&6
5372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5373   { test "$extra_verbose" = "yes" && cat << EOF
5374     Defining $ac_tr_hdr
5375 EOF
5376 cat >> confdefs.h <<EOF
5377 #define $ac_tr_hdr 1
5378 EOF
5379 }
5380  
5381 else
5382   echo "$ac_t""no" 1>&6
5383 fi
5384 done
5385
5386       
5387 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5388 echo "configure:5389: checking for main in -lxml" >&5
5389 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5390
5391 xe_check_libs=" -lxml "
5392 cat > conftest.$ac_ext <<EOF
5393 #line 5394 "configure"
5394 #include "confdefs.h"
5395
5396 int main() {
5397 main()
5398 ; return 0; }
5399 EOF
5400 if { (eval echo configure:5401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5401   rm -rf conftest*
5402   eval "ac_cv_lib_$ac_lib_var=yes"
5403 else
5404   echo "configure: failed program was:" >&5
5405   cat conftest.$ac_ext >&5
5406   rm -rf conftest*
5407   eval "ac_cv_lib_$ac_lib_var=no"
5408 fi
5409 rm -f conftest*
5410 xe_check_libs=""
5411
5412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5413   echo "$ac_t""yes" 1>&6
5414   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5415 else
5416   echo "$ac_t""no" 1>&6
5417 fi
5418
5419
5420       
5421 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5422 echo "configure:5423: checking for main in -lglade" >&5
5423 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5424
5425 xe_check_libs=" -lglade "
5426 cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429
5430 int main() {
5431 main()
5432 ; return 0; }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435   rm -rf conftest*
5436   eval "ac_cv_lib_$ac_lib_var=yes"
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -rf conftest*
5441   eval "ac_cv_lib_$ac_lib_var=no"
5442 fi
5443 rm -f conftest*
5444 xe_check_libs=""
5445
5446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5447   echo "$ac_t""yes" 1>&6
5448   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5449 else
5450   echo "$ac_t""no" 1>&6
5451 fi
5452
5453
5454       
5455 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5456 echo "configure:5457: checking for main in -lglade-gnome" >&5
5457 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5458
5459 xe_check_libs=" -lglade-gnome "
5460 cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463
5464 int main() {
5465 main()
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469   rm -rf conftest*
5470   eval "ac_cv_lib_$ac_lib_var=yes"
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   eval "ac_cv_lib_$ac_lib_var=no"
5476 fi
5477 rm -f conftest*
5478 xe_check_libs=""
5479
5480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5481   echo "$ac_t""yes" 1>&6
5482   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5483 else
5484   echo "$ac_t""no" 1>&6
5485 fi
5486
5487
5488       cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 #include <glade/glade-xml.h>
5492 EOF
5493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5494   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5495   rm -rf conftest*
5496   echo "$ac_t""yes" 1>&6
5497                        { test "$extra_verbose" = "yes" && cat << \EOF
5498     Defining LIBGLADE_XML_TXTDOMAIN = 1
5499 EOF
5500 cat >> confdefs.h <<\EOF
5501 #define LIBGLADE_XML_TXTDOMAIN 1
5502 EOF
5503 }
5504
5505 else
5506   rm -rf conftest*
5507   echo "$ac_t""no" 1>&6
5508 fi
5509 rm -f conftest*
5510
5511       CFLAGS="${OLD_CFLAGS}"
5512       CPPFLAGS="${OLD_CPPFLAGS}"
5513       LDFLAGS="${OLD_LDFLAGS}"
5514 fi
5515
5516
5517 if test "$with_x11" != "no"; then
5518     test "$x_includes $x_libraries" != "NONE NONE" && \
5519    window_system=x11 with_x11=yes
5520
5521         
5522       if test "$x_includes $x_libraries" = "NONE NONE" \
5523     -a -n "$OPENWINHOME" \
5524     -a "$OPENWINHOME" != "/usr/openwin" \
5525     -a -d "$OPENWINHOME"; then
5526       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5527       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5528       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5529   fi
5530
5531   if test "$x_includes" = "NONE"; then
5532                     for dir in "/usr/X11" "/usr/X11R6"; do
5533       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5534     done
5535   fi
5536
5537   if test "$x_libraries" = "NONE"; then
5538     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5539       if test -r "$dir/libX11.a" -o -r "$dir/libX11.dylib"; then x_libraries="$dir"; break; fi
5540     done
5541   fi
5542
5543   # If we find X, set shell vars x_includes and x_libraries to the
5544 # paths, otherwise set no_x=yes.
5545 # Uses ac_ vars as temps to allow command line to override cache and checks.
5546 # --without-x overrides everything else, but does not touch the cache.
5547 echo $ac_n "checking for X""... $ac_c" 1>&6
5548 echo "configure:5549: checking for X" >&5
5549
5550 # Check whether --with-x or --without-x was given.
5551 if test "${with_x+set}" = set; then
5552   withval="$with_x"
5553   :
5554 fi
5555
5556 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5557 if test "x$with_x" = xno; then
5558   # The user explicitly disabled X.
5559   have_x=disabled
5560 else
5561   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5562     # Both variables are already set.
5563     have_x=yes
5564   else
5565
5566 # One or both of the vars are not set, and there is no cached value.
5567 ac_x_includes=NO ac_x_libraries=NO
5568 rm -fr conftestdir
5569 if mkdir conftestdir; then
5570   cd conftestdir
5571   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5572   cat > Imakefile <<'EOF'
5573 acfindx:
5574         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5575 EOF
5576   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5577     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5578     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5579     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5580     for ac_extension in a so sl; do
5581       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5582         test -f $ac_im_libdir/libX11.$ac_extension; then
5583         ac_im_usrlibdir=$ac_im_libdir; break
5584       fi
5585     done
5586     # Screen out bogus values from the imake configuration.  They are
5587     # bogus both because they are the default anyway, and because
5588     # using them would break gcc on systems where it needs fixed includes.
5589     case "$ac_im_incroot" in
5590         /usr/include) ;;
5591         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5592     esac
5593     case "$ac_im_usrlibdir" in
5594         /usr/lib | /lib) ;;
5595         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5596     esac
5597   fi
5598   cd ..
5599   rm -fr conftestdir
5600 fi
5601
5602 if test "$ac_x_includes" = NO; then
5603   # Guess where to find include files, by looking for this one X11 .h file.
5604   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5605
5606   # First, try using that file with no special directory specified.
5607 cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 #include <$x_direct_test_include>
5611 EOF
5612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5613 { (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5615 if test -z "$ac_err"; then
5616   rm -rf conftest*
5617   # We can compile using X headers with no special include directory.
5618 ac_x_includes=
5619 else
5620   echo "$ac_err" >&5
5621   echo "configure: failed program was:" >&5
5622   cat conftest.$ac_ext >&5
5623   rm -rf conftest*
5624   # Look for the header file in a standard set of common directories.
5625 # Check X11 before X11Rn because it is often a symlink to the current release.
5626   for ac_dir in               \
5627     /usr/X11/include          \
5628     /usr/X11R6/include        \
5629     /usr/X11R5/include        \
5630     /usr/X11R4/include        \
5631                               \
5632     /usr/include/X11          \
5633     /usr/include/X11R6        \
5634     /usr/include/X11R5        \
5635     /usr/include/X11R4        \
5636                               \
5637     /usr/local/X11/include    \
5638     /usr/local/X11R6/include  \
5639     /usr/local/X11R5/include  \
5640     /usr/local/X11R4/include  \
5641                               \
5642     /usr/local/include/X11    \
5643     /usr/local/include/X11R6  \
5644     /usr/local/include/X11R5  \
5645     /usr/local/include/X11R4  \
5646                               \
5647     /usr/X386/include         \
5648     /usr/x386/include         \
5649     /usr/XFree86/include/X11  \
5650                               \
5651     /usr/include              \
5652     /usr/local/include        \
5653     /usr/unsupported/include  \
5654     /usr/athena/include       \
5655     /usr/local/x11r5/include  \
5656     /usr/lpp/Xamples/include  \
5657                               \
5658     /usr/openwin/include      \
5659     /usr/openwin/share/include \
5660     ; \
5661   do
5662     if test -r "$ac_dir/$x_direct_test_include"; then
5663       ac_x_includes=$ac_dir
5664       break
5665     fi
5666   done
5667 fi
5668 rm -f conftest*
5669 fi # $ac_x_includes = NO
5670
5671 if test "$ac_x_libraries" = NO; then
5672   # Check for the libraries.
5673
5674   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5675   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5676
5677   # See if we find them without any special options.
5678   # Don't add to $LIBS permanently.
5679   ac_save_LIBS="$LIBS"
5680   LIBS="-l$x_direct_test_library $LIBS"
5681 cat > conftest.$ac_ext <<EOF
5682 #line 5683 "configure"
5683 #include "confdefs.h"
5684
5685 int main() {
5686 ${x_direct_test_function}()
5687 ; return 0; }
5688 EOF
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5690   rm -rf conftest*
5691   LIBS="$ac_save_LIBS"
5692 # We can link X programs with no special library path.
5693 ac_x_libraries=
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   LIBS="$ac_save_LIBS"
5699 # First see if replacing the include by lib works.
5700 # Check X11 before X11Rn because it is often a symlink to the current release.
5701 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5702     /usr/X11/lib          \
5703     /usr/X11R6/lib        \
5704     /usr/X11R5/lib        \
5705     /usr/X11R4/lib        \
5706                           \
5707     /usr/lib/X11          \
5708     /usr/lib/X11R6        \
5709     /usr/lib/X11R5        \
5710     /usr/lib/X11R4        \
5711                           \
5712     /usr/local/X11/lib    \
5713     /usr/local/X11R6/lib  \
5714     /usr/local/X11R5/lib  \
5715     /usr/local/X11R4/lib  \
5716                           \
5717     /usr/local/lib/X11    \
5718     /usr/local/lib/X11R6  \
5719     /usr/local/lib/X11R5  \
5720     /usr/local/lib/X11R4  \
5721                           \
5722     /usr/X386/lib         \
5723     /usr/x386/lib         \
5724     /usr/XFree86/lib/X11  \
5725                           \
5726     /usr/lib              \
5727     /usr/local/lib        \
5728     /usr/unsupported/lib  \
5729     /usr/athena/lib       \
5730     /usr/local/x11r5/lib  \
5731     /usr/lpp/Xamples/lib  \
5732     /lib/usr/lib/X11      \
5733                           \
5734     /usr/openwin/lib      \
5735     /usr/openwin/share/lib \
5736     ; \
5737 do
5738   for ac_extension in a so sl; do
5739     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5740       ac_x_libraries=$ac_dir
5741       break 2
5742     fi
5743   done
5744 done
5745 fi
5746 rm -f conftest*
5747 fi # $ac_x_libraries = NO
5748
5749 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5750   # Didn't find X anywhere.  Cache the known absence of X.
5751   ac_cv_have_x="have_x=no"
5752 else
5753   # Record where we found X for the cache.
5754   ac_cv_have_x="have_x=yes \
5755                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5756 fi
5757   fi
5758   eval "$ac_cv_have_x"
5759 fi # $with_x != no
5760
5761 if test "$have_x" != yes; then
5762   echo "$ac_t""$have_x" 1>&6
5763   no_x=yes
5764 else
5765   # If each of the values was on the command line, it overrides each guess.
5766   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5767   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5768   # Update the cache value to reflect the command line values.
5769   ac_cv_have_x="have_x=yes \
5770                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5771   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5772 fi
5773
5774 if test "$no_x" = yes; then
5775   # Not all programs may use this symbol, but it does not hurt to define it.
5776   { test "$extra_verbose" = "yes" && cat << \EOF
5777     Defining X_DISPLAY_MISSING
5778 EOF
5779 cat >> confdefs.h <<\EOF
5780 #define X_DISPLAY_MISSING 1
5781 EOF
5782 }
5783
5784   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5785 else
5786   if test -n "$x_includes"; then
5787     X_CFLAGS="$X_CFLAGS -I$x_includes"
5788   fi
5789
5790   # It would also be nice to do this for all -L options, not just this one.
5791   if test -n "$x_libraries"; then
5792     X_LIBS="$X_LIBS -L$x_libraries"
5793     # For Solaris; some versions of Sun CC require a space after -R and
5794     # others require no space.  Words are not sufficient . . . .
5795     case "`(uname -sr) 2>/dev/null`" in
5796     "SunOS 5"*)
5797       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5798 echo "configure:5799: checking whether -R must be followed by a space" >&5
5799       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5800       cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803
5804 int main() {
5805
5806 ; return 0; }
5807 EOF
5808 if { (eval echo configure:5809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5809   rm -rf conftest*
5810   ac_R_nospace=yes
5811 else
5812   echo "configure: failed program was:" >&5
5813   cat conftest.$ac_ext >&5
5814   rm -rf conftest*
5815   ac_R_nospace=no
5816 fi
5817 rm -f conftest*
5818       if test $ac_R_nospace = yes; then
5819         echo "$ac_t""no" 1>&6
5820         X_LIBS="$X_LIBS -R$x_libraries"
5821       else
5822         LIBS="$ac_xsave_LIBS -R $x_libraries"
5823         cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826
5827 int main() {
5828
5829 ; return 0; }
5830 EOF
5831 if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5832   rm -rf conftest*
5833   ac_R_space=yes
5834 else
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   ac_R_space=no
5839 fi
5840 rm -f conftest*
5841         if test $ac_R_space = yes; then
5842           echo "$ac_t""yes" 1>&6
5843           X_LIBS="$X_LIBS -R $x_libraries"
5844         else
5845           echo "$ac_t""neither works" 1>&6
5846         fi
5847       fi
5848       LIBS="$ac_xsave_LIBS"
5849     esac
5850   fi
5851
5852   # Check for system-dependent libraries X programs must link with.
5853   # Do this before checking for the system-independent R6 libraries
5854   # (-lICE), since we may need -lsocket or whatever for X linking.
5855
5856   if test "$ISC" = yes; then
5857     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5858   else
5859     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5860     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5861     # the Alpha needs dnet_stub (dnet does not exist).
5862     if test "$with_dnet" = "no" ; then
5863 ac_cv_lib_dnet_dnet_ntoa=no
5864 else
5865
5866 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5867 echo "configure:5868: checking for dnet_ntoa in -ldnet" >&5
5868 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5869
5870 xe_check_libs=" -ldnet "
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 /* Override any gcc2 internal prototype to avoid an error.  */
5875 /* We use char because int might match the return type of a gcc2
5876     builtin and then its argument prototype would still apply.  */
5877 char dnet_ntoa();
5878
5879 int main() {
5880 dnet_ntoa()
5881 ; return 0; }
5882 EOF
5883 if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5884   rm -rf conftest*
5885   eval "ac_cv_lib_$ac_lib_var=yes"
5886 else
5887   echo "configure: failed program was:" >&5
5888   cat conftest.$ac_ext >&5
5889   rm -rf conftest*
5890   eval "ac_cv_lib_$ac_lib_var=no"
5891 fi
5892 rm -f conftest*
5893 xe_check_libs=""
5894
5895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5896   echo "$ac_t""yes" 1>&6
5897   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5898 else
5899   echo "$ac_t""no" 1>&6
5900 fi
5901
5902 fi
5903
5904     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5905       
5906 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5907 echo "configure:5908: checking for dnet_ntoa in -ldnet_stub" >&5
5908 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5909
5910 xe_check_libs=" -ldnet_stub "
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char dnet_ntoa();
5918
5919 int main() {
5920 dnet_ntoa()
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=no"
5931 fi
5932 rm -f conftest*
5933 xe_check_libs=""
5934
5935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5936   echo "$ac_t""yes" 1>&6
5937   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5938 else
5939   echo "$ac_t""no" 1>&6
5940 fi
5941
5942
5943     fi
5944
5945     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5946     # to get the SysV transport functions.
5947     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5948     # needs -lnsl.
5949     # The nsl library prevents programs from opening the X display
5950     # on Irix 5.2, according to dickey@clark.net.
5951     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5952 echo "configure:5953: checking for gethostbyname" >&5
5953
5954 cat > conftest.$ac_ext <<EOF
5955 #line 5956 "configure"
5956 #include "confdefs.h"
5957 /* System header to define __stub macros and hopefully few prototypes,
5958     which can conflict with char gethostbyname(); below.  */
5959 #include <assert.h>
5960 /* Override any gcc2 internal prototype to avoid an error.  */
5961 /* We use char because int might match the return type of a gcc2
5962     builtin and then its argument prototype would still apply.  */
5963 char gethostbyname();
5964
5965 int main() {
5966
5967 /* The GNU C library defines this for functions which it implements
5968     to always fail with ENOSYS.  Some functions are actually named
5969     something starting with __ and the normal name is an alias.  */
5970 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5971 choke me
5972 #else
5973 gethostbyname();
5974 #endif
5975
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979   rm -rf conftest*
5980   eval "ac_cv_func_gethostbyname=yes"
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   eval "ac_cv_func_gethostbyname=no"
5986 fi
5987 rm -f conftest*
5988
5989 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5990   echo "$ac_t""yes" 1>&6
5991   :
5992 else
5993   echo "$ac_t""no" 1>&6
5994 fi
5995
5996     if test $ac_cv_func_gethostbyname = no; then
5997       
5998 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5999 echo "configure:6000: checking for gethostbyname in -lnsl" >&5
6000 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6001
6002 xe_check_libs=" -lnsl "
6003 cat > conftest.$ac_ext <<EOF
6004 #line 6005 "configure"
6005 #include "confdefs.h"
6006 /* Override any gcc2 internal prototype to avoid an error.  */
6007 /* We use char because int might match the return type of a gcc2
6008     builtin and then its argument prototype would still apply.  */
6009 char gethostbyname();
6010
6011 int main() {
6012 gethostbyname()
6013 ; return 0; }
6014 EOF
6015 if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6016   rm -rf conftest*
6017   eval "ac_cv_lib_$ac_lib_var=yes"
6018 else
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_lib_$ac_lib_var=no"
6023 fi
6024 rm -f conftest*
6025 xe_check_libs=""
6026
6027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6028   echo "$ac_t""yes" 1>&6
6029   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6030 else
6031   echo "$ac_t""no" 1>&6
6032 fi
6033
6034
6035     fi
6036
6037     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6038     # socket/setsockopt and other routines are undefined under SCO ODT
6039     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6040     # on later versions), says simon@lia.di.epfl.ch: it contains
6041     # gethostby* variants that don't use the nameserver (or something).
6042     # -lsocket must be given before -lnsl if both are needed.
6043     # We assume that if connect needs -lnsl, so does gethostbyname.
6044     echo $ac_n "checking for connect""... $ac_c" 1>&6
6045 echo "configure:6046: checking for connect" >&5
6046
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* System header to define __stub macros and hopefully few prototypes,
6051     which can conflict with char connect(); below.  */
6052 #include <assert.h>
6053 /* Override any gcc2 internal prototype to avoid an error.  */
6054 /* We use char because int might match the return type of a gcc2
6055     builtin and then its argument prototype would still apply.  */
6056 char connect();
6057
6058 int main() {
6059
6060 /* The GNU C library defines this for functions which it implements
6061     to always fail with ENOSYS.  Some functions are actually named
6062     something starting with __ and the normal name is an alias.  */
6063 #if defined (__stub_connect) || defined (__stub___connect)
6064 choke me
6065 #else
6066 connect();
6067 #endif
6068
6069 ; return 0; }
6070 EOF
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6072   rm -rf conftest*
6073   eval "ac_cv_func_connect=yes"
6074 else
6075   echo "configure: failed program was:" >&5
6076   cat conftest.$ac_ext >&5
6077   rm -rf conftest*
6078   eval "ac_cv_func_connect=no"
6079 fi
6080 rm -f conftest*
6081
6082 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6083   echo "$ac_t""yes" 1>&6
6084   :
6085 else
6086   echo "$ac_t""no" 1>&6
6087 fi
6088
6089     if test $ac_cv_func_connect = no; then
6090       
6091 xe_msg_checking="for connect in -lsocket"
6092 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6093 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6094 echo "configure:6095: checking "$xe_msg_checking"" >&5
6095 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6096
6097 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6098 cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 /* Override any gcc2 internal prototype to avoid an error.  */
6102 /* We use char because int might match the return type of a gcc2
6103     builtin and then its argument prototype would still apply.  */
6104 char connect();
6105
6106 int main() {
6107 connect()
6108 ; return 0; }
6109 EOF
6110 if { (eval echo configure:6111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6111   rm -rf conftest*
6112   eval "ac_cv_lib_$ac_lib_var=yes"
6113 else
6114   echo "configure: failed program was:" >&5
6115   cat conftest.$ac_ext >&5
6116   rm -rf conftest*
6117   eval "ac_cv_lib_$ac_lib_var=no"
6118 fi
6119 rm -f conftest*
6120 xe_check_libs=""
6121
6122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6123   echo "$ac_t""yes" 1>&6
6124   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6125 else
6126   echo "$ac_t""no" 1>&6
6127 fi
6128
6129
6130     fi
6131
6132     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6133     echo $ac_n "checking for remove""... $ac_c" 1>&6
6134 echo "configure:6135: checking for remove" >&5
6135
6136 cat > conftest.$ac_ext <<EOF
6137 #line 6138 "configure"
6138 #include "confdefs.h"
6139 /* System header to define __stub macros and hopefully few prototypes,
6140     which can conflict with char remove(); below.  */
6141 #include <assert.h>
6142 /* Override any gcc2 internal prototype to avoid an error.  */
6143 /* We use char because int might match the return type of a gcc2
6144     builtin and then its argument prototype would still apply.  */
6145 char remove();
6146
6147 int main() {
6148
6149 /* The GNU C library defines this for functions which it implements
6150     to always fail with ENOSYS.  Some functions are actually named
6151     something starting with __ and the normal name is an alias.  */
6152 #if defined (__stub_remove) || defined (__stub___remove)
6153 choke me
6154 #else
6155 remove();
6156 #endif
6157
6158 ; return 0; }
6159 EOF
6160 if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6161   rm -rf conftest*
6162   eval "ac_cv_func_remove=yes"
6163 else
6164   echo "configure: failed program was:" >&5
6165   cat conftest.$ac_ext >&5
6166   rm -rf conftest*
6167   eval "ac_cv_func_remove=no"
6168 fi
6169 rm -f conftest*
6170
6171 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6172   echo "$ac_t""yes" 1>&6
6173   :
6174 else
6175   echo "$ac_t""no" 1>&6
6176 fi
6177
6178     if test $ac_cv_func_remove = no; then
6179       
6180 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6181 echo "configure:6182: checking for remove in -lposix" >&5
6182 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6183
6184 xe_check_libs=" -lposix "
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 /* Override any gcc2 internal prototype to avoid an error.  */
6189 /* We use char because int might match the return type of a gcc2
6190     builtin and then its argument prototype would still apply.  */
6191 char remove();
6192
6193 int main() {
6194 remove()
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6198   rm -rf conftest*
6199   eval "ac_cv_lib_$ac_lib_var=yes"
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   eval "ac_cv_lib_$ac_lib_var=no"
6205 fi
6206 rm -f conftest*
6207 xe_check_libs=""
6208
6209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6210   echo "$ac_t""yes" 1>&6
6211   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6212 else
6213   echo "$ac_t""no" 1>&6
6214 fi
6215
6216
6217     fi
6218
6219     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6220     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6221 echo "configure:6222: checking for shmat" >&5
6222
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 /* System header to define __stub macros and hopefully few prototypes,
6227     which can conflict with char shmat(); below.  */
6228 #include <assert.h>
6229 /* Override any gcc2 internal prototype to avoid an error.  */
6230 /* We use char because int might match the return type of a gcc2
6231     builtin and then its argument prototype would still apply.  */
6232 char shmat();
6233
6234 int main() {
6235
6236 /* The GNU C library defines this for functions which it implements
6237     to always fail with ENOSYS.  Some functions are actually named
6238     something starting with __ and the normal name is an alias.  */
6239 #if defined (__stub_shmat) || defined (__stub___shmat)
6240 choke me
6241 #else
6242 shmat();
6243 #endif
6244
6245 ; return 0; }
6246 EOF
6247 if { (eval echo configure:6248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6248   rm -rf conftest*
6249   eval "ac_cv_func_shmat=yes"
6250 else
6251   echo "configure: failed program was:" >&5
6252   cat conftest.$ac_ext >&5
6253   rm -rf conftest*
6254   eval "ac_cv_func_shmat=no"
6255 fi
6256 rm -f conftest*
6257
6258 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6259   echo "$ac_t""yes" 1>&6
6260   :
6261 else
6262   echo "$ac_t""no" 1>&6
6263 fi
6264
6265     if test $ac_cv_func_shmat = no; then
6266       
6267 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6268 echo "configure:6269: checking for shmat in -lipc" >&5
6269 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6270
6271 xe_check_libs=" -lipc "
6272 cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275 /* Override any gcc2 internal prototype to avoid an error.  */
6276 /* We use char because int might match the return type of a gcc2
6277     builtin and then its argument prototype would still apply.  */
6278 char shmat();
6279
6280 int main() {
6281 shmat()
6282 ; return 0; }
6283 EOF
6284 if { (eval echo configure:6285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6285   rm -rf conftest*
6286   eval "ac_cv_lib_$ac_lib_var=yes"
6287 else
6288   echo "configure: failed program was:" >&5
6289   cat conftest.$ac_ext >&5
6290   rm -rf conftest*
6291   eval "ac_cv_lib_$ac_lib_var=no"
6292 fi
6293 rm -f conftest*
6294 xe_check_libs=""
6295
6296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6297   echo "$ac_t""yes" 1>&6
6298   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6299 else
6300   echo "$ac_t""no" 1>&6
6301 fi
6302
6303
6304     fi
6305   fi
6306
6307   # Check for libraries that X11R6 Xt/Xaw programs need.
6308   ac_save_LDFLAGS="$LDFLAGS"
6309   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6310   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6311   # check for ICE first), but we must link in the order -lSM -lICE or
6312   # we get undefined symbols.  So assume we have SM if we have ICE.
6313   # These have to be linked with before -lX11, unlike the other
6314   # libraries we check for below, so use a different variable.
6315   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6316   
6317 xe_msg_checking="for IceConnectionNumber in -lICE"
6318 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6319 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6320 echo "configure:6321: checking "$xe_msg_checking"" >&5
6321 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6322
6323 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6324 cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6327 /* Override any gcc2 internal prototype to avoid an error.  */
6328 /* We use char because int might match the return type of a gcc2
6329     builtin and then its argument prototype would still apply.  */
6330 char IceConnectionNumber();
6331
6332 int main() {
6333 IceConnectionNumber()
6334 ; return 0; }
6335 EOF
6336 if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6337   rm -rf conftest*
6338   eval "ac_cv_lib_$ac_lib_var=yes"
6339 else
6340   echo "configure: failed program was:" >&5
6341   cat conftest.$ac_ext >&5
6342   rm -rf conftest*
6343   eval "ac_cv_lib_$ac_lib_var=no"
6344 fi
6345 rm -f conftest*
6346 xe_check_libs=""
6347
6348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6349   echo "$ac_t""yes" 1>&6
6350   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6351 else
6352   echo "$ac_t""no" 1>&6
6353 fi
6354
6355
6356   LDFLAGS="$ac_save_LDFLAGS"
6357
6358 fi
6359  # Autoconf claims to find X library and include dirs for us.
6360   if test "$no_x" = "yes"
6361   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6362   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6363   fi
6364 fi
6365
6366
6367 if test "$with_x11" = "yes"; then
6368   { test "$extra_verbose" = "yes" && cat << \EOF
6369     Defining HAVE_X_WINDOWS
6370 EOF
6371 cat >> confdefs.h <<\EOF
6372 #define HAVE_X_WINDOWS 1
6373 EOF
6374 }
6375
6376   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6377   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6378
6379
6380     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6381 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6382 echo "configure:6383: checking for Xm/Xm.h" >&5
6383
6384 cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387 #include <Xm/Xm.h>
6388 EOF
6389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6390 { (eval echo configure:6391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6392 if test -z "$ac_err"; then
6393   rm -rf conftest*
6394   eval "ac_cv_header_$ac_safe=yes"
6395 else
6396   echo "$ac_err" >&5
6397   echo "configure: failed program was:" >&5
6398   cat conftest.$ac_ext >&5
6399   rm -rf conftest*
6400   eval "ac_cv_header_$ac_safe=no"
6401 fi
6402 rm -f conftest*
6403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6404   echo "$ac_t""yes" 1>&6
6405   
6406 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6407 echo "configure:6408: checking for XmStringFree in -lXm" >&5
6408 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6409
6410 xe_check_libs=" -lXm "
6411 cat > conftest.$ac_ext <<EOF
6412 #line 6413 "configure"
6413 #include "confdefs.h"
6414 /* Override any gcc2 internal prototype to avoid an error.  */
6415 /* We use char because int might match the return type of a gcc2
6416     builtin and then its argument prototype would still apply.  */
6417 char XmStringFree();
6418
6419 int main() {
6420 XmStringFree()
6421 ; return 0; }
6422 EOF
6423 if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=yes"
6426 else
6427   echo "configure: failed program was:" >&5
6428   cat conftest.$ac_ext >&5
6429   rm -rf conftest*
6430   eval "ac_cv_lib_$ac_lib_var=no"
6431 fi
6432 rm -f conftest*
6433 xe_check_libs=""
6434
6435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6436   echo "$ac_t""yes" 1>&6
6437   got_motif=yes
6438 else
6439   echo "$ac_t""no" 1>&6
6440 fi
6441
6442
6443 else
6444   echo "$ac_t""no" 1>&6
6445 fi
6446
6447
6448   if test "$got_motif" != "yes"; then
6449             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6450                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6451       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6452       if test -d "$lib_dir" -a -d "$inc_dir"; then
6453         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6454           x_libraries="$lib_dir $x_libraries"
6455           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6456         esac
6457         case "$x_includes" in "$inc_dir"* ) ;; *)
6458           x_includes="$inc_dir $x_includes"
6459           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6460         esac
6461         break;  fi
6462     done
6463   fi
6464
6465     for rel in "X11R6" "X11R5" "X11R4"; do
6466     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6467     if test -d "$lib_dir" -a -d "$inc_dir"; then
6468       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6469         x_libraries="$x_libraries $lib_dir"
6470         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6471       esac
6472       case "$x_includes" in "$inc_dir"* ) ;; *)
6473         x_includes="$x_includes $inc_dir"
6474         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6475       esac
6476       break;     fi
6477   done
6478
6479     case "$opsys" in
6480   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 ;;
6481   esac
6482
6483   ld_switch_x_site="$X_LIBS"
6484
6485   
6486 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6487     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6488   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6489   
6490         runpath="" runpath_dirs=""
6491   if test -n "$LD_RUN_PATH"; then
6492     runpath="$LD_RUN_PATH"
6493   elif test "$GCC" = "yes"; then
6494         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6495     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6496     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6497     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6498       case "$arg" in P,* | -L* | -R* )
6499         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6500           {
6501 xe_runpath_dir="$dir"
6502   test "$xe_runpath_dir" != "/lib"     -a \
6503         "$xe_runpath_dir" != "/usr/lib" -a \
6504         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6505   eval "$xe_add_unique_runpath_dir"
6506 }
6507         done ;;
6508       esac
6509     done
6510     ld_switch_run="$ld_switch_run_save"
6511     rm -f conftest*
6512   else
6513         for arg in $ld_switch_site $ld_switch_x_site; do
6514       case "$arg" in -L*) {
6515 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6516   test "$xe_runpath_dir" != "/lib"     -a \
6517         "$xe_runpath_dir" != "/usr/lib" -a \
6518         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6519   eval "$xe_add_unique_runpath_dir"
6520 };; esac
6521     done
6522             if test "$opsys $need_motif" = "sol2 yes"; then
6523       xe_runpath_dir="/opt/SUNWdt/lib";
6524       eval "$xe_add_unique_runpath_dir";
6525     fi
6526   fi 
6527   if test -n "$runpath"; then
6528     ld_switch_run="${dash_r}${runpath}"
6529     
6530 if test "$GCC" = "yes"; then
6531   set x $ld_switch_run; shift; ld_switch_run=""
6532   while test -n "$1"; do
6533     case $1 in
6534       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6535       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6536       -Xlinker* ) ;;
6537       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6538     esac
6539     shift
6540   done
6541 fi
6542     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6543   fi
6544 fi
6545
6546
6547   if test "$extra_verbose" = "yes"; then
6548     echo; echo "X11 compilation variables:"
6549     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6550     echo
6551   fi
6552
6553             bitmapdirs=
6554   if test "$x_includes" != NONE; then
6555     for i in $x_includes; do
6556       if test -d "$i/bitmaps"; then
6557         bitmapdirs="$i/bitmaps:$bitmapdirs"
6558       fi
6559       if test -d "$i/X11/bitmaps"; then
6560         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6561       fi
6562     done
6563     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6564   fi
6565   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6566     Defining BITMAPDIR = "$bitmapdirs"
6567 EOF
6568 cat >> confdefs.h <<EOF
6569 #define BITMAPDIR "$bitmapdirs"
6570 EOF
6571 }
6572
6573
6574     echo "checking for X defines extracted by xmkmf" 1>&6
6575 echo "configure:6576: checking for X defines extracted by xmkmf" >&5
6576   rm -fr conftestdir
6577   if mkdir conftestdir; then
6578     cd conftestdir
6579     cat > Imakefile <<'EOF'
6580 xetest:
6581         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6582 EOF
6583     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6584       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6585       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6586     fi
6587     cd ..
6588     rm -fr conftestdir
6589     for word in $xmkmf_defines; do
6590       case "$word" in 
6591       -D__STDC__*) ;;
6592       -D* )
6593         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6594         case "$word" in
6595           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6596           *     ) val=1 ;;
6597         esac
6598         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6599           if test "$val" = "1"
6600             then { test "$extra_verbose" = "yes" && cat << EOF
6601     Defining $sym
6602 EOF
6603 cat >> confdefs.h <<EOF
6604 #define $sym 1
6605 EOF
6606 }
6607
6608             else { test "$extra_verbose" = "yes" && cat << EOF
6609     Defining $sym = $val
6610 EOF
6611 cat >> confdefs.h <<EOF
6612 #define $sym $val
6613 EOF
6614 }
6615
6616           fi
6617         fi  ;;
6618       esac
6619     done
6620   fi
6621
6622     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6623 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6624 echo "configure:6625: checking for X11/Intrinsic.h" >&5
6625
6626 cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629 #include <X11/Intrinsic.h>
6630 EOF
6631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6632 { (eval echo configure:6633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6634 if test -z "$ac_err"; then
6635   rm -rf conftest*
6636   eval "ac_cv_header_$ac_safe=yes"
6637 else
6638   echo "$ac_err" >&5
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641   rm -rf conftest*
6642   eval "ac_cv_header_$ac_safe=no"
6643 fi
6644 rm -f conftest*
6645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6646   echo "$ac_t""yes" 1>&6
6647   :
6648 else
6649   echo "$ac_t""no" 1>&6
6650 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6651 fi
6652
6653
6654       
6655 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6656 echo "configure:6657: checking for XOpenDisplay in -lX11" >&5
6657 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6658
6659 xe_check_libs=" -lX11 "
6660 cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* Override any gcc2 internal prototype to avoid an error.  */
6664 /* We use char because int might match the return type of a gcc2
6665     builtin and then its argument prototype would still apply.  */
6666 char XOpenDisplay();
6667
6668 int main() {
6669 XOpenDisplay()
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   eval "ac_cv_lib_$ac_lib_var=yes"
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678   rm -rf conftest*
6679   eval "ac_cv_lib_$ac_lib_var=no"
6680 fi
6681 rm -f conftest*
6682 xe_check_libs=""
6683
6684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6685   echo "$ac_t""yes" 1>&6
6686   have_lib_x11=yes
6687 else
6688   echo "$ac_t""no" 1>&6
6689 fi
6690
6691
6692   if test "$have_lib_x11" != "yes"; then
6693     
6694 xe_msg_checking="for XGetFontProperty in -lX11"
6695 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6696 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6697 echo "configure:6698: checking "$xe_msg_checking"" >&5
6698 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6699
6700 xe_check_libs=" -lX11 -b i486-linuxaout"
6701 cat > conftest.$ac_ext <<EOF
6702 #line 6703 "configure"
6703 #include "confdefs.h"
6704 /* Override any gcc2 internal prototype to avoid an error.  */
6705 /* We use char because int might match the return type of a gcc2
6706     builtin and then its argument prototype would still apply.  */
6707 char XGetFontProperty();
6708
6709 int main() {
6710 XGetFontProperty()
6711 ; return 0; }
6712 EOF
6713 if { (eval echo configure:6714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=yes"
6716 else
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=no"
6721 fi
6722 rm -f conftest*
6723 xe_check_libs=""
6724
6725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6726   echo "$ac_t""yes" 1>&6
6727   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6728 else
6729   echo "$ac_t""no" 1>&6
6730 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6731 fi
6732
6733
6734   fi
6735   libs_x="-lX11"
6736   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6737
6738     
6739 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6740 echo "configure:6741: checking for XShapeSelectInput in -lXext" >&5
6741 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6742
6743 xe_check_libs=" -lXext "
6744 cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 /* We use char because int might match the return type of a gcc2
6749     builtin and then its argument prototype would still apply.  */
6750 char XShapeSelectInput();
6751
6752 int main() {
6753 XShapeSelectInput()
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   eval "ac_cv_lib_$ac_lib_var=yes"
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=no"
6764 fi
6765 rm -f conftest*
6766 xe_check_libs=""
6767
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6769   echo "$ac_t""yes" 1>&6
6770   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6771 else
6772   echo "$ac_t""no" 1>&6
6773 fi
6774
6775
6776
6777     
6778 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6779 echo "configure:6780: checking for XtOpenDisplay in -lXt" >&5
6780 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6781
6782 xe_check_libs=" -lXt "
6783 cat > conftest.$ac_ext <<EOF
6784 #line 6785 "configure"
6785 #include "confdefs.h"
6786 /* Override any gcc2 internal prototype to avoid an error.  */
6787 /* We use char because int might match the return type of a gcc2
6788     builtin and then its argument prototype would still apply.  */
6789 char XtOpenDisplay();
6790
6791 int main() {
6792 XtOpenDisplay()
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796   rm -rf conftest*
6797   eval "ac_cv_lib_$ac_lib_var=yes"
6798 else
6799   echo "configure: failed program was:" >&5
6800   cat conftest.$ac_ext >&5
6801   rm -rf conftest*
6802   eval "ac_cv_lib_$ac_lib_var=no"
6803 fi
6804 rm -f conftest*
6805 xe_check_libs=""
6806
6807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6808   echo "$ac_t""yes" 1>&6
6809   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6810 else
6811   echo "$ac_t""no" 1>&6
6812 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6813 fi
6814
6815
6816
6817   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6818 echo "configure:6819: checking the version of X11 being used" >&5
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 #include <X11/Intrinsic.h>
6823     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6824 EOF
6825 if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6826 then
6827   ./conftest foobar; x11_release=$?
6828 else
6829   conftest_rc="$?"
6830   echo "configure: failed program was:" >&5
6831   cat conftest.$ac_ext >&5
6832   rm -fr conftest*
6833   x11_release=4
6834 fi
6835 rm -fr conftest*
6836   echo "$ac_t""R${x11_release}" 1>&6
6837   { test "$extra_verbose" = "yes" && cat << EOF
6838     Defining THIS_IS_X11R${x11_release}
6839 EOF
6840 cat >> confdefs.h <<EOF
6841 #define THIS_IS_X11R${x11_release} 1
6842 EOF
6843 }
6844
6845
6846   if test "${x11_release}" = "4"; then
6847     case "$with_widgets" in
6848       "" | "no") with_widgets=no ;;
6849       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6850     esac
6851   fi
6852
6853   for ac_func in XConvertCase XtRegisterDrawable
6854 do
6855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6856 echo "configure:6857: checking for $ac_func" >&5
6857
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* System header to define __stub macros and hopefully few prototypes,
6862     which can conflict with char $ac_func(); below.  */
6863 #include <assert.h>
6864 /* Override any gcc2 internal prototype to avoid an error.  */
6865 /* We use char because int might match the return type of a gcc2
6866     builtin and then its argument prototype would still apply.  */
6867 char $ac_func();
6868
6869 int main() {
6870
6871 /* The GNU C library defines this for functions which it implements
6872     to always fail with ENOSYS.  Some functions are actually named
6873     something starting with __ and the normal name is an alias.  */
6874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6875 choke me
6876 #else
6877 $ac_func();
6878 #endif
6879
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6883   rm -rf conftest*
6884   eval "ac_cv_func_$ac_func=yes"
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   eval "ac_cv_func_$ac_func=no"
6890 fi
6891 rm -f conftest*
6892
6893 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6894   echo "$ac_t""yes" 1>&6
6895     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6896   { test "$extra_verbose" = "yes" && cat << EOF
6897     Defining $ac_tr_func
6898 EOF
6899 cat >> confdefs.h <<EOF
6900 #define $ac_tr_func 1
6901 EOF
6902 }
6903  
6904 else
6905   echo "$ac_t""no" 1>&6
6906 fi
6907 done
6908
6909
6910   for ac_hdr in X11/Xlocale.h
6911 do
6912 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6913 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6914 echo "configure:6915: checking for $ac_hdr" >&5
6915
6916 cat > conftest.$ac_ext <<EOF
6917 #line 6918 "configure"
6918 #include "confdefs.h"
6919 #include <$ac_hdr>
6920 EOF
6921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6922 { (eval echo configure:6923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6924 if test -z "$ac_err"; then
6925   rm -rf conftest*
6926   eval "ac_cv_header_$ac_safe=yes"
6927 else
6928   echo "$ac_err" >&5
6929   echo "configure: failed program was:" >&5
6930   cat conftest.$ac_ext >&5
6931   rm -rf conftest*
6932   eval "ac_cv_header_$ac_safe=no"
6933 fi
6934 rm -f conftest*
6935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6936   echo "$ac_t""yes" 1>&6
6937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6938   { test "$extra_verbose" = "yes" && cat << EOF
6939     Defining $ac_tr_hdr
6940 EOF
6941 cat >> confdefs.h <<EOF
6942 #define $ac_tr_hdr 1
6943 EOF
6944 }
6945  
6946 else
6947   echo "$ac_t""no" 1>&6
6948 fi
6949 done
6950
6951
6952     for ac_func in XRegisterIMInstantiateCallback
6953 do
6954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6955 echo "configure:6956: checking for $ac_func" >&5
6956
6957 cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960 /* System header to define __stub macros and hopefully few prototypes,
6961     which can conflict with char $ac_func(); below.  */
6962 #include <assert.h>
6963 /* Override any gcc2 internal prototype to avoid an error.  */
6964 /* We use char because int might match the return type of a gcc2
6965     builtin and then its argument prototype would still apply.  */
6966 char $ac_func();
6967
6968 int main() {
6969
6970 /* The GNU C library defines this for functions which it implements
6971     to always fail with ENOSYS.  Some functions are actually named
6972     something starting with __ and the normal name is an alias.  */
6973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6974 choke me
6975 #else
6976 $ac_func();
6977 #endif
6978
6979 ; return 0; }
6980 EOF
6981 if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6982   rm -rf conftest*
6983   eval "ac_cv_func_$ac_func=yes"
6984 else
6985   echo "configure: failed program was:" >&5
6986   cat conftest.$ac_ext >&5
6987   rm -rf conftest*
6988   eval "ac_cv_func_$ac_func=no"
6989 fi
6990 rm -f conftest*
6991
6992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6993   echo "$ac_t""yes" 1>&6
6994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6995   { test "$extra_verbose" = "yes" && cat << EOF
6996     Defining $ac_tr_func
6997 EOF
6998 cat >> confdefs.h <<EOF
6999 #define $ac_tr_func 1
7000 EOF
7001 }
7002  
7003 else
7004   echo "$ac_t""no" 1>&6
7005 fi
7006 done
7007
7008   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7009 echo "configure:7010: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7010   cat > conftest.$ac_ext <<EOF
7011 #line 7012 "configure"
7012 #include "confdefs.h"
7013
7014 #define NeedFunctionPrototypes 1
7015 #include <X11/Xlib.h>
7016 extern Bool XRegisterIMInstantiateCallback(
7017    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7018
7019 int main() {
7020
7021 ; return 0; }
7022 EOF
7023 if { (eval echo configure:7024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7024   rm -rf conftest*
7025   echo "$ac_t""yes" 1>&6
7026 else
7027   echo "configure: failed program was:" >&5
7028   cat conftest.$ac_ext >&5
7029   rm -rf conftest*
7030   echo "$ac_t""no" 1>&6
7031    { test "$extra_verbose" = "yes" && cat << \EOF
7032     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7033 EOF
7034 cat >> confdefs.h <<\EOF
7035 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7036 EOF
7037 }
7038
7039 fi
7040 rm -f conftest*
7041
7042     test -z "$with_xmu" && { 
7043 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7044 echo "configure:7045: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7045 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7046
7047 xe_check_libs=" -lXmu "
7048 cat > conftest.$ac_ext <<EOF
7049 #line 7050 "configure"
7050 #include "confdefs.h"
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 /* We use char because int might match the return type of a gcc2
7053     builtin and then its argument prototype would still apply.  */
7054 char XmuReadBitmapDataFromFile();
7055
7056 int main() {
7057 XmuReadBitmapDataFromFile()
7058 ; return 0; }
7059 EOF
7060 if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7061   rm -rf conftest*
7062   eval "ac_cv_lib_$ac_lib_var=yes"
7063 else
7064   echo "configure: failed program was:" >&5
7065   cat conftest.$ac_ext >&5
7066   rm -rf conftest*
7067   eval "ac_cv_lib_$ac_lib_var=no"
7068 fi
7069 rm -f conftest*
7070 xe_check_libs=""
7071
7072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7073   echo "$ac_t""yes" 1>&6
7074   with_xmu=yes
7075 else
7076   echo "$ac_t""no" 1>&6
7077 with_xmu=no
7078 fi
7079
7080  }
7081   if test "$with_xmu" = "no"; then
7082     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7083    echo "    xemacs will be linked with \"xmu.o\""
7084  fi
7085   else
7086     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7087     { test "$extra_verbose" = "yes" && cat << \EOF
7088     Defining HAVE_XMU
7089 EOF
7090 cat >> confdefs.h <<\EOF
7091 #define HAVE_XMU 1
7092 EOF
7093 }
7094
7095   fi
7096
7097       
7098 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7099 echo "configure:7100: checking for main in -lXbsd" >&5
7100 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7101
7102 xe_check_libs=" -lXbsd "
7103 cat > conftest.$ac_ext <<EOF
7104 #line 7105 "configure"
7105 #include "confdefs.h"
7106
7107 int main() {
7108 main()
7109 ; return 0; }
7110 EOF
7111 if { (eval echo configure:7112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7112   rm -rf conftest*
7113   eval "ac_cv_lib_$ac_lib_var=yes"
7114 else
7115   echo "configure: failed program was:" >&5
7116   cat conftest.$ac_ext >&5
7117   rm -rf conftest*
7118   eval "ac_cv_lib_$ac_lib_var=no"
7119 fi
7120 rm -f conftest*
7121 xe_check_libs=""
7122
7123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7124   echo "$ac_t""yes" 1>&6
7125   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7126 else
7127   echo "$ac_t""no" 1>&6
7128 fi
7129
7130
7131
7132     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7133         if test "$GCC" = "yes"; then
7134                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7135 echo "configure:7136: checking for name of AIX gcc threads option" >&5
7136       case `$CC -v --help 2>&1` in
7137         *-mthreads*) aix_threads=-mthreads ;;
7138                   *) aix_threads=-pthread  ;;
7139       esac
7140       echo "$ac_t""$aix_threads" 1>&6
7141       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7142       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7143     else
7144             case "$CC" in *_r) : ;;
7145         *)
7146          xe_save_CC="$CC"
7147          CC="${CC}_r"
7148          echo $ac_n "checking size of short""... $ac_c" 1>&6
7149 echo "configure:7150: checking size of short" >&5
7150
7151 cat > conftest.$ac_ext <<EOF
7152 #line 7153 "configure"
7153 #include "confdefs.h"
7154 #include <stdio.h>
7155 main()
7156 {
7157   FILE *f=fopen("conftestval", "w");
7158   if (!f) exit(1);
7159   fprintf(f, "%d\n", sizeof(short));
7160   exit(0);
7161 }
7162 EOF
7163 if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7164 then
7165   ac_cv_sizeof_short=`cat conftestval`
7166 else
7167   conftest_rc="$?"
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -fr conftest*
7171   ac_cv_sizeof_short=0
7172 fi
7173 rm -fr conftest*
7174 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7175 { test "$extra_verbose" = "yes" && cat << EOF
7176     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7177 EOF
7178 cat >> confdefs.h <<EOF
7179 #define SIZEOF_SHORT $ac_cv_sizeof_short
7180 EOF
7181 }
7182
7183
7184          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7185       esac
7186     fi
7187   fi
7188
7189 fi 
7190 if test "$with_msw" != "no"; then
7191   echo "checking for MS-Windows" 1>&6
7192 echo "configure:7193: checking for MS-Windows" >&5
7193   
7194 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7195 echo "configure:7196: checking for main in -lgdi32" >&5
7196 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7197
7198 xe_check_libs=" -lgdi32 "
7199 cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202
7203 int main() {
7204 main()
7205 ; return 0; }
7206 EOF
7207 if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7208   rm -rf conftest*
7209   eval "ac_cv_lib_$ac_lib_var=yes"
7210 else
7211   echo "configure: failed program was:" >&5
7212   cat conftest.$ac_ext >&5
7213   rm -rf conftest*
7214   eval "ac_cv_lib_$ac_lib_var=no"
7215 fi
7216 rm -f conftest*
7217 xe_check_libs=""
7218
7219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7220   echo "$ac_t""yes" 1>&6
7221   with_msw=yes
7222 else
7223   echo "$ac_t""no" 1>&6
7224 fi
7225
7226
7227   if test "$with_msw" = "yes"; then
7228     { test "$extra_verbose" = "yes" && cat << \EOF
7229     Defining HAVE_MS_WINDOWS
7230 EOF
7231 cat >> confdefs.h <<\EOF
7232 #define HAVE_MS_WINDOWS 1
7233 EOF
7234 }
7235
7236
7237         if test "$with_netinstall" = "yes"; then
7238       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7239       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7240       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7241     fi
7242
7243     install_pp="$srcdir/lib-src/installexe.sh"
7244     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
7245     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7246     if test "$window_system" != x11; then
7247         window_system=msw
7248         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7249             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7250    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7251  fi
7252         test "$with_menubars"   != "no" && with_menubars=msw \
7253             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7254    echo "    xemacs will be linked with \"menubar-msw.o\""
7255  fi
7256         test "$with_toolbars"   != "no" && with_toolbars=msw \
7257             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7258    echo "    xemacs will be linked with \"toolbar-msw.o\""
7259  fi
7260         test "$with_dialogs"   != "no" && with_dialogs=msw \
7261             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7262    echo "    xemacs will be linked with \"dialog-msw.o\""
7263  fi
7264         test "$with_widgets"   != "no" && with_widgets=msw
7265     else
7266         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7267    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7268  fi
7269         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7270    echo "    xemacs will be linked with \"menubar-msw.o\""
7271  fi
7272         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7273    echo "    xemacs will be linked with \"toolbar-msw.o\""
7274  fi
7275         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7276    echo "    xemacs will be linked with \"dialog-msw.o\""
7277  fi
7278     fi
7279         cat > conftest.$ac_ext <<EOF
7280 #line 7281 "configure"
7281 #include "confdefs.h"
7282 #include <fcntl.h>
7283     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7284 EOF
7285 if { (eval echo configure:7286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7286 then
7287   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7288     Defining HAVE_MSG_SELECT
7289 EOF
7290 cat >> confdefs.h <<\EOF
7291 #define HAVE_MSG_SELECT 1
7292 EOF
7293 }
7294
7295 else
7296   conftest_rc="$?"
7297   echo "configure: failed program was:" >&5
7298   cat conftest.$ac_ext >&5
7299 fi
7300 rm -fr conftest*
7301     with_file_coding=yes
7302     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
7303    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\""
7304  fi
7305   fi
7306 fi
7307
7308
7309
7310 test -z "$window_system" && window_system="none"
7311
7312 if test "$window_system" = "none"; then
7313   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7314   do
7315     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7316        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7317     fi
7318     eval "with_${feature}=no"
7319   done
7320 else
7321   test -z "$with_toolbars" && with_toolbars=yes
7322 fi
7323
7324 if test "$with_msw" != "yes"; then
7325   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7326   do
7327     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7328        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7329     fi
7330     eval "with_${feature}=no"
7331   done
7332 else
7333   :
7334 fi
7335
7336 if test "$with_x11" != "yes"; then
7337             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7338   do
7339     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7340        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7341     fi
7342     eval "with_${feature}=no"
7343   done
7344 fi
7345
7346 if test "$with_x11" = "yes"; then
7347   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7348 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7349 echo "configure:7350: checking for X11/extensions/shape.h" >&5
7350
7351 cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 #include <X11/extensions/shape.h>
7355 EOF
7356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7357 { (eval echo configure:7358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7359 if test -z "$ac_err"; then
7360   rm -rf conftest*
7361   eval "ac_cv_header_$ac_safe=yes"
7362 else
7363   echo "$ac_err" >&5
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=no"
7368 fi
7369 rm -f conftest*
7370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372   
7373    { test "$extra_verbose" = "yes" && cat << \EOF
7374     Defining HAVE_BALLOON_HELP
7375 EOF
7376 cat >> confdefs.h <<\EOF
7377 #define HAVE_BALLOON_HELP 1
7378 EOF
7379 }
7380
7381    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7382    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7383  fi
7384 else
7385   echo "$ac_t""no" 1>&6
7386 fi
7387
7388 fi
7389
7390 bitmapdir=
7391
7392 case "$window_system" in
7393   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7394   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7395   gtk  )
7396        HAVE_X_WINDOWS=no
7397        test "$with_gnome" = "yes" && echo "  Using GNOME."
7398        test "$with_gnome" = "no" && echo "  Using GTK."
7399        ;;
7400   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7401 esac
7402
7403 case "$x_libraries" in *X11R4* )
7404   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7405   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7406 esac
7407
7408 echo "checking for WM_COMMAND option" 1>&6
7409 echo "configure:7410: checking for WM_COMMAND option" >&5;
7410 if test "$with_wmcommand" != "no"; then
7411   { test "$extra_verbose" = "yes" && cat << \EOF
7412     Defining HAVE_WMCOMMAND
7413 EOF
7414 cat >> confdefs.h <<\EOF
7415 #define HAVE_WMCOMMAND 1
7416 EOF
7417 }
7418
7419 fi
7420
7421 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7422 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7423 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7424 echo "configure:7425: checking for X11/Xauth.h" >&5
7425
7426 cat > conftest.$ac_ext <<EOF
7427 #line 7428 "configure"
7428 #include "confdefs.h"
7429 #include <X11/Xauth.h>
7430 EOF
7431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7432 { (eval echo configure:7433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7434 if test -z "$ac_err"; then
7435   rm -rf conftest*
7436   eval "ac_cv_header_$ac_safe=yes"
7437 else
7438   echo "$ac_err" >&5
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442   eval "ac_cv_header_$ac_safe=no"
7443 fi
7444 rm -f conftest*
7445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7446   echo "$ac_t""yes" 1>&6
7447   :
7448 else
7449   echo "$ac_t""no" 1>&6
7450 with_xauth=no
7451 fi
7452  }
7453 test -z "$with_xauth" && { 
7454 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7455 echo "configure:7456: checking for XauGetAuthByAddr in -lXau" >&5
7456 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7457
7458 xe_check_libs=" -lXau "
7459 cat > conftest.$ac_ext <<EOF
7460 #line 7461 "configure"
7461 #include "confdefs.h"
7462 /* Override any gcc2 internal prototype to avoid an error.  */
7463 /* We use char because int might match the return type of a gcc2
7464     builtin and then its argument prototype would still apply.  */
7465 char XauGetAuthByAddr();
7466
7467 int main() {
7468 XauGetAuthByAddr()
7469 ; return 0; }
7470 EOF
7471 if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7472   rm -rf conftest*
7473   eval "ac_cv_lib_$ac_lib_var=yes"
7474 else
7475   echo "configure: failed program was:" >&5
7476   cat conftest.$ac_ext >&5
7477   rm -rf conftest*
7478   eval "ac_cv_lib_$ac_lib_var=no"
7479 fi
7480 rm -f conftest*
7481 xe_check_libs=""
7482
7483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7484   echo "$ac_t""yes" 1>&6
7485   :
7486 else
7487   echo "$ac_t""no" 1>&6
7488 with_xauth=no
7489 fi
7490
7491  }
7492 test -z "$with_xauth" && with_xauth=yes
7493 if test "$with_xauth" = "yes"; then
7494   { test "$extra_verbose" = "yes" && cat << \EOF
7495     Defining HAVE_XAUTH
7496 EOF
7497 cat >> confdefs.h <<\EOF
7498 #define HAVE_XAUTH 1
7499 EOF
7500 }
7501
7502   
7503 T=""
7504 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
7505 libs_xauth="$T"
7506
7507 fi
7508
7509
7510
7511
7512 if test "$with_tooltalk" != "no" ; then
7513       for dir in "" "Tt/" "desktop/" ; do
7514     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7515 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7516 echo "configure:7517: checking for ${dir}tt_c.h" >&5
7517
7518 cat > conftest.$ac_ext <<EOF
7519 #line 7520 "configure"
7520 #include "confdefs.h"
7521 #include <${dir}tt_c.h>
7522 EOF
7523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7524 { (eval echo configure:7525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7526 if test -z "$ac_err"; then
7527   rm -rf conftest*
7528   eval "ac_cv_header_$ac_safe=yes"
7529 else
7530   echo "$ac_err" >&5
7531   echo "configure: failed program was:" >&5
7532   cat conftest.$ac_ext >&5
7533   rm -rf conftest*
7534   eval "ac_cv_header_$ac_safe=no"
7535 fi
7536 rm -f conftest*
7537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7538   echo "$ac_t""yes" 1>&6
7539   tt_c_h_file="${dir}tt_c.h"; break
7540 else
7541   echo "$ac_t""no" 1>&6
7542 fi
7543
7544   done
7545   if test -z "$tt_c_h_file"; then
7546     if test "$with_tooltalk" = "yes"; then
7547       (echo "$progname: Usage error:"
7548 echo " " "Unable to find required tooltalk header files."
7549 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7550     fi
7551     with_tooltalk=no
7552   fi
7553 fi
7554 if test "$with_tooltalk" != "no" ; then
7555   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7556     
7557 xe_msg_checking="for tt_message_create in -ltt"
7558 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7559 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7560 echo "configure:7561: checking "$xe_msg_checking"" >&5
7561 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7562
7563 xe_check_libs=" -ltt $extra_libs"
7564 cat > conftest.$ac_ext <<EOF
7565 #line 7566 "configure"
7566 #include "confdefs.h"
7567 /* Override any gcc2 internal prototype to avoid an error.  */
7568 /* We use char because int might match the return type of a gcc2
7569     builtin and then its argument prototype would still apply.  */
7570 char tt_message_create();
7571
7572 int main() {
7573 tt_message_create()
7574 ; return 0; }
7575 EOF
7576 if { (eval echo configure:7577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7577   rm -rf conftest*
7578   eval "ac_cv_lib_$ac_lib_var=yes"
7579 else
7580   echo "configure: failed program was:" >&5
7581   cat conftest.$ac_ext >&5
7582   rm -rf conftest*
7583   eval "ac_cv_lib_$ac_lib_var=no"
7584 fi
7585 rm -f conftest*
7586 xe_check_libs=""
7587
7588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7589   echo "$ac_t""yes" 1>&6
7590   tt_libs="-ltt $extra_libs"; break
7591 else
7592   echo "$ac_t""no" 1>&6
7593 :
7594 fi
7595
7596
7597   done
7598   if test -z "$tt_libs"; then
7599     if test "$with_tooltalk" = "yes"; then
7600       (echo "$progname: Usage error:"
7601 echo " " "Unable to find required tooltalk libraries."
7602 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7603     fi
7604     with_tooltalk=no
7605   fi
7606 fi
7607 test -z "$with_tooltalk" && with_tooltalk=yes
7608 if test "$with_tooltalk" = "yes"; then
7609   { test "$extra_verbose" = "yes" && cat << \EOF
7610     Defining TOOLTALK
7611 EOF
7612 cat >> confdefs.h <<\EOF
7613 #define TOOLTALK 1
7614 EOF
7615 }
7616
7617   { test "$extra_verbose" = "yes" && cat << EOF
7618     Defining TT_C_H_FILE = "$tt_c_h_file"
7619 EOF
7620 cat >> confdefs.h <<EOF
7621 #define TT_C_H_FILE "$tt_c_h_file"
7622 EOF
7623 }
7624
7625   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7626   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7627    echo "    xemacs will be linked with \"tooltalk.o\""
7628  fi
7629 fi
7630
7631 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7632 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7633 echo "configure:7634: checking for Dt/Dt.h" >&5
7634
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 #include <Dt/Dt.h>
7639 EOF
7640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7641 { (eval echo configure:7642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7643 if test -z "$ac_err"; then
7644   rm -rf conftest*
7645   eval "ac_cv_header_$ac_safe=yes"
7646 else
7647   echo "$ac_err" >&5
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   eval "ac_cv_header_$ac_safe=no"
7652 fi
7653 rm -f conftest*
7654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656   :
7657 else
7658   echo "$ac_t""no" 1>&6
7659 with_cde=no
7660 fi
7661  }
7662 test -z "$with_cde" && { 
7663 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7664 echo "configure:7665: checking for DtDndDragStart in -lDtSvc" >&5
7665 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7666
7667 xe_check_libs=" -lDtSvc "
7668 cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 /* Override any gcc2 internal prototype to avoid an error.  */
7672 /* We use char because int might match the return type of a gcc2
7673     builtin and then its argument prototype would still apply.  */
7674 char DtDndDragStart();
7675
7676 int main() {
7677 DtDndDragStart()
7678 ; return 0; }
7679 EOF
7680 if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7681   rm -rf conftest*
7682   eval "ac_cv_lib_$ac_lib_var=yes"
7683 else
7684   echo "configure: failed program was:" >&5
7685   cat conftest.$ac_ext >&5
7686   rm -rf conftest*
7687   eval "ac_cv_lib_$ac_lib_var=no"
7688 fi
7689 rm -f conftest*
7690 xe_check_libs=""
7691
7692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7693   echo "$ac_t""yes" 1>&6
7694   :
7695 else
7696   echo "$ac_t""no" 1>&6
7697 with_cde=no
7698 fi
7699
7700  }
7701 test -z "$with_cde" && with_cde=yes
7702 if test "$with_dragndrop" = no; then
7703   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7704   with_cde=no
7705 fi
7706 if test "$with_cde" = "yes" ; then
7707   { test "$extra_verbose" = "yes" && cat << \EOF
7708     Defining HAVE_CDE
7709 EOF
7710 cat >> confdefs.h <<\EOF
7711 #define HAVE_CDE 1
7712 EOF
7713 }
7714
7715   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7716   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7717   with_tooltalk=yes # CDE requires Tooltalk
7718   need_motif=yes    # CDE requires Motif
7719 fi
7720
7721 test "$window_system" != "x11" && with_offix=no
7722 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7723   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7724   with_offix=no
7725 fi
7726 if test "$with_dragndrop" = no; then
7727   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7728   with_offix=no
7729 fi
7730 if test "$with_cde" = yes; then
7731   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7732   with_offix=no
7733 fi
7734 test -z "$with_offix" && with_offix=no
7735 if test "$with_offix" = "yes"; then
7736   { test "$extra_verbose" = "yes" && cat << \EOF
7737     Defining HAVE_OFFIX_DND
7738 EOF
7739 cat >> confdefs.h <<\EOF
7740 #define HAVE_OFFIX_DND 1
7741 EOF
7742 }
7743
7744   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7745   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7746 fi
7747 if test "$with_gtk" = "yes"; then
7748    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7749 fi
7750
7751 if test "$with_dragndrop" != "no" ; then
7752   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7753 echo "configure:7754: checking if drag and drop API is needed" >&5
7754   if test -n "$dragndrop_proto" ; then
7755     with_dragndrop=yes
7756     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7757     { test "$extra_verbose" = "yes" && cat << \EOF
7758     Defining HAVE_DRAGNDROP
7759 EOF
7760 cat >> confdefs.h <<\EOF
7761 #define HAVE_DRAGNDROP 1
7762 EOF
7763 }
7764
7765     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7766   else
7767     with_dragndrop=no
7768     echo "$ac_t""no" 1>&6
7769   fi
7770 fi
7771
7772 echo "checking for LDAP" 1>&6
7773 echo "configure:7774: checking for LDAP" >&5
7774 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7775 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7776 echo "configure:7777: checking for ldap.h" >&5
7777
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 #include <ldap.h>
7782 EOF
7783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7784 { (eval echo configure:7785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7786 if test -z "$ac_err"; then
7787   rm -rf conftest*
7788   eval "ac_cv_header_$ac_safe=yes"
7789 else
7790   echo "$ac_err" >&5
7791   echo "configure: failed program was:" >&5
7792   cat conftest.$ac_ext >&5
7793   rm -rf conftest*
7794   eval "ac_cv_header_$ac_safe=no"
7795 fi
7796 rm -f conftest*
7797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7798   echo "$ac_t""yes" 1>&6
7799   :
7800 else
7801   echo "$ac_t""no" 1>&6
7802 with_ldap=no
7803 fi
7804  }
7805 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7806 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7807 echo "configure:7808: checking for lber.h" >&5
7808
7809 cat > conftest.$ac_ext <<EOF
7810 #line 7811 "configure"
7811 #include "confdefs.h"
7812 #include <lber.h>
7813 EOF
7814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7815 { (eval echo configure:7816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7817 if test -z "$ac_err"; then
7818   rm -rf conftest*
7819   eval "ac_cv_header_$ac_safe=yes"
7820 else
7821   echo "$ac_err" >&5
7822   echo "configure: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   rm -rf conftest*
7825   eval "ac_cv_header_$ac_safe=no"
7826 fi
7827 rm -f conftest*
7828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7829   echo "$ac_t""yes" 1>&6
7830   :
7831 else
7832   echo "$ac_t""no" 1>&6
7833 with_ldap=no
7834 fi
7835  }
7836 if test no != "$with_ldap";then
7837   if test . != "${ldap_libs+.}";then
7838     ldap_libs=
7839     echo $ac_n "checking for ldap_open""... $ac_c" 1>&6
7840 echo "configure:7841: checking for ldap_open" >&5
7841
7842 cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845 /* System header to define __stub macros and hopefully few prototypes,
7846     which can conflict with char ldap_open(); below.  */
7847 #include <assert.h>
7848 /* Override any gcc2 internal prototype to avoid an error.  */
7849 /* We use char because int might match the return type of a gcc2
7850     builtin and then its argument prototype would still apply.  */
7851 char ldap_open();
7852
7853 int main() {
7854
7855 /* The GNU C library defines this for functions which it implements
7856     to always fail with ENOSYS.  Some functions are actually named
7857     something starting with __ and the normal name is an alias.  */
7858 #if defined (__stub_ldap_open) || defined (__stub___ldap_open)
7859 choke me
7860 #else
7861 ldap_open();
7862 #endif
7863
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7867   rm -rf conftest*
7868   eval "ac_cv_func_ldap_open=yes"
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -rf conftest*
7873   eval "ac_cv_func_ldap_open=no"
7874 fi
7875 rm -f conftest*
7876
7877 if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then
7878   echo "$ac_t""yes" 1>&6
7879         with_ldap=yes
7880       test yes = "$extra_verbose" &&
7881         echo "Setting ldap_libs to $ldap_libs"
7882 else
7883   echo "$ac_t""no" 1>&6
7884       
7885 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
7886 echo "configure:7887: checking for ldap_open in -lldap" >&5
7887 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7888
7889 xe_check_libs=" -lldap "
7890 cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893 /* Override any gcc2 internal prototype to avoid an error.  */
7894 /* We use char because int might match the return type of a gcc2
7895     builtin and then its argument prototype would still apply.  */
7896 char ldap_open();
7897
7898 int main() {
7899 ldap_open()
7900 ; return 0; }
7901 EOF
7902 if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7903   rm -rf conftest*
7904   eval "ac_cv_lib_$ac_lib_var=yes"
7905 else
7906   echo "configure: failed program was:" >&5
7907   cat conftest.$ac_ext >&5
7908   rm -rf conftest*
7909   eval "ac_cv_lib_$ac_lib_var=no"
7910 fi
7911 rm -f conftest*
7912 xe_check_libs=""
7913
7914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7915   echo "$ac_t""yes" 1>&6
7916   with_ldap=yes
7917 else
7918   echo "$ac_t""no" 1>&6
7919 ldap_needs_lber=yes ldap_other_libs=-llber
7920         
7921 xe_msg_checking="for ldap_open in -lldap"
7922 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7923 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7924 echo "configure:7925: checking "$xe_msg_checking"" >&5
7925 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7926
7927 xe_check_libs=" -lldap $ldap_other_libs"
7928 cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931 /* Override any gcc2 internal prototype to avoid an error.  */
7932 /* We use char because int might match the return type of a gcc2
7933     builtin and then its argument prototype would still apply.  */
7934 char ldap_open();
7935
7936 int main() {
7937 ldap_open()
7938 ; return 0; }
7939 EOF
7940 if { (eval echo configure:7941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7941   rm -rf conftest*
7942   eval "ac_cv_lib_$ac_lib_var=yes"
7943 else
7944   echo "configure: failed program was:" >&5
7945   cat conftest.$ac_ext >&5
7946   rm -rf conftest*
7947   eval "ac_cv_lib_$ac_lib_var=no"
7948 fi
7949 rm -f conftest*
7950 xe_check_libs=""
7951
7952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7953   echo "$ac_t""yes" 1>&6
7954   with_ldap=yes
7955 else
7956   echo "$ac_t""no" 1>&6
7957 ldap_needs_krb=yes ldap_other_libs="$ldap_other_libs -lkrb"
7958           
7959 xe_msg_checking="for ldap_open in -lldap"
7960 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7961 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7962 echo "configure:7963: checking "$xe_msg_checking"" >&5
7963 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7964
7965 xe_check_libs=" -lldap $ldap_other_libs"
7966 cat > conftest.$ac_ext <<EOF
7967 #line 7968 "configure"
7968 #include "confdefs.h"
7969 /* Override any gcc2 internal prototype to avoid an error.  */
7970 /* We use char because int might match the return type of a gcc2
7971     builtin and then its argument prototype would still apply.  */
7972 char ldap_open();
7973
7974 int main() {
7975 ldap_open()
7976 ; return 0; }
7977 EOF
7978 if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=yes"
7981 else
7982   echo "configure: failed program was:" >&5
7983   cat conftest.$ac_ext >&5
7984   rm -rf conftest*
7985   eval "ac_cv_lib_$ac_lib_var=no"
7986 fi
7987 rm -f conftest*
7988 xe_check_libs=""
7989
7990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7991   echo "$ac_t""yes" 1>&6
7992   with_ldap=yes
7993 else
7994   echo "$ac_t""no" 1>&6
7995 ldap_needs_des=yes ldap_other_libs="$ldap_other_libs -ldes"
7996             
7997 xe_msg_checking="for ldap_open in -lldap"
7998 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7999 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
8000 echo "configure:8001: checking "$xe_msg_checking"" >&5
8001 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
8002
8003 xe_check_libs=" -lldap $ldap_other_libs"
8004 cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 /* Override any gcc2 internal prototype to avoid an error.  */
8008 /* We use char because int might match the return type of a gcc2
8009     builtin and then its argument prototype would still apply.  */
8010 char ldap_open();
8011
8012 int main() {
8013 ldap_open()
8014 ; return 0; }
8015 EOF
8016 if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8017   rm -rf conftest*
8018   eval "ac_cv_lib_$ac_lib_var=yes"
8019 else
8020   echo "configure: failed program was:" >&5
8021   cat conftest.$ac_ext >&5
8022   rm -rf conftest*
8023   eval "ac_cv_lib_$ac_lib_var=no"
8024 fi
8025 rm -f conftest*
8026 xe_check_libs=""
8027
8028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8029   echo "$ac_t""yes" 1>&6
8030   with_ldap=yes
8031 else
8032   echo "$ac_t""no" 1>&6
8033 with_ldap=no
8034 fi
8035
8036
8037 fi
8038
8039
8040 fi
8041
8042
8043 fi
8044
8045
8046       if test yes = "$with_ldap" -a yes != "$ldap_needs_lber";then
8047         echo $ac_n "checking for LDAP_OPT_ON definition""... $ac_c" 1>&6
8048 echo "configure:8049: checking for LDAP_OPT_ON definition" >&5
8049
8050 cat > conftest.$ac_ext <<EOF
8051 #line 8052 "configure"
8052 #include "confdefs.h"
8053 #include <lber.h>
8054 #include <ldap.h>
8055 #ifdef LDAP_OPT_ON
8056 /* Relying on const defined by ac_c_const (upper case). */
8057 const void *const v = LDAP_OPT_ON;
8058 #else /* !defined (LDAP_OPT_ON) */
8059 choke me
8060 #endif /* !defined (LDAP_OPT_ON) */
8061 int main() {
8062
8063 ; return 0; }
8064 EOF
8065 if { (eval echo configure:8066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8066   rm -rf conftest*
8067   xe_cv_have_LDAP_OPT_ON=yes
8068 else
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071   rm -rf conftest*
8072   xe_cv_have_LDAP_OPT_ON=no
8073 fi
8074 rm -f conftest*
8075
8076 echo "$ac_t""$xe_cv_have_LDAP_OPT_ON" 1>&6
8077         if test yes = "$xe_cv_have_LDAP_OPT_ON";then
8078           echo $ac_n "checking LDAP_OPT_ON linking""... $ac_c" 1>&6
8079 echo "configure:8080: checking LDAP_OPT_ON linking" >&5
8080
8081 xe_save_LIBS="$LIBS"
8082             LIBS="-lldap $LIBS"
8083 cat > conftest.$ac_ext <<EOF
8084 #line 8085 "configure"
8085 #include "confdefs.h"
8086 #include <lber.h>
8087 #include <ldap.h>
8088 const void *const v = LDAP_OPT_ON;
8089 int main() {
8090
8091 ; return 0; }
8092 EOF
8093 if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8094   rm -rf conftest*
8095   xe_cv_LDAP_OPT_ON_links=yes
8096 else
8097   echo "configure: failed program was:" >&5
8098   cat conftest.$ac_ext >&5
8099   rm -rf conftest*
8100   xe_cv_LDAP_OPT_ON_links=no
8101 fi
8102 rm -f conftest*
8103             LIBS="$xe_save_LIBS"
8104
8105 echo "$ac_t""$xe_cv_LDAP_OPT_ON_links" 1>&6
8106           if test yes != "$xe_cv_LDAP_OPT_ON_links";then
8107             ldap_needs_lber=yes ldap_other_libs=-llber
8108             echo $ac_n "checking LDAP_OPT_ON linking with -llber""... $ac_c" 1>&6
8109 echo "configure:8110: checking LDAP_OPT_ON linking with -llber" >&5
8110
8111 xe_save_LIBS="$LIBS"
8112               LIBS="-lldap $ldap_other_libs $LIBS"
8113 cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8116 #include <lber.h>
8117 #include <ldap.h>
8118 const void *const v = LDAP_OPT_ON;
8119 int main() {
8120
8121 ; return 0; }
8122 EOF
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8124   rm -rf conftest*
8125   xe_cv_LDAP_OPT_ON_links_w_lber=yes
8126 else
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   xe_cv_LDAP_OPT_ON_links_w_lber=no
8131 fi
8132 rm -f conftest*
8133               LIBS="$xe_save_LIBS"
8134
8135 echo "$ac_t""$xe_cv_LDAP_OPT_ON_links_w_lber" 1>&6
8136             if test yes != "$xe_cv_LDAP_OPT_ON_links_w_lber";then
8137               with_ldap=no
8138             fi
8139           fi
8140         fi
8141       fi
8142       if test yes = "$with_ldap";then
8143         if test yes = "$ldap_needs_des";then
8144           ldap_libs="-ldes $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$ldap_libs"; fi
8145         fi
8146         if test yes = "$ldap_needs_krb";then
8147           ldap_libs="-lkrb $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$ldap_libs"; fi
8148         fi
8149         if test yes = "$ldap_needs_lber";then
8150           ldap_libs="-llber $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$ldap_libs"; fi
8151         fi
8152         ldap_libs="-lldap $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$ldap_libs"; fi
8153       fi
8154 fi
8155
8156   else
8157     save_LIBS="$LIBS" LIBS="$ldap_libs $LIBS"
8158     echo $ac_n "checking for ldap_open""... $ac_c" 1>&6
8159 echo "configure:8160: checking for ldap_open" >&5
8160
8161 cat > conftest.$ac_ext <<EOF
8162 #line 8163 "configure"
8163 #include "confdefs.h"
8164 /* System header to define __stub macros and hopefully few prototypes,
8165     which can conflict with char ldap_open(); below.  */
8166 #include <assert.h>
8167 /* Override any gcc2 internal prototype to avoid an error.  */
8168 /* We use char because int might match the return type of a gcc2
8169     builtin and then its argument prototype would still apply.  */
8170 char ldap_open();
8171
8172 int main() {
8173
8174 /* The GNU C library defines this for functions which it implements
8175     to always fail with ENOSYS.  Some functions are actually named
8176     something starting with __ and the normal name is an alias.  */
8177 #if defined (__stub_ldap_open) || defined (__stub___ldap_open)
8178 choke me
8179 #else
8180 ldap_open();
8181 #endif
8182
8183 ; return 0; }
8184 EOF
8185 if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8186   rm -rf conftest*
8187   eval "ac_cv_func_ldap_open=yes"
8188 else
8189   echo "configure: failed program was:" >&5
8190   cat conftest.$ac_ext >&5
8191   rm -rf conftest*
8192   eval "ac_cv_func_ldap_open=no"
8193 fi
8194 rm -f conftest*
8195
8196 if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then
8197   echo "$ac_t""yes" 1>&6
8198         with_ldap=yes
8199       test yes = "$extra_verbose" &&
8200         echo "Setting ldap_libs to $ldap_libs"
8201 else
8202   echo "$ac_t""no" 1>&6
8203       with_ldap=no
8204 fi
8205
8206     LIBS="$save_LIBS"
8207   fi
8208 fi
8209 if test "$with_ldap" = "yes"; then
8210   { test "$extra_verbose" = "yes" && cat << \EOF
8211     Defining HAVE_LDAP
8212 EOF
8213 cat >> confdefs.h <<\EOF
8214 #define HAVE_LDAP 1
8215 EOF
8216 }
8217
8218   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8219    echo "    xemacs will be linked with \"eldap.o\""
8220  fi
8221   LIBS="$ldap_libs $LIBS"
8222   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8223 do
8224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8225 echo "configure:8226: checking for $ac_func" >&5
8226
8227 cat > conftest.$ac_ext <<EOF
8228 #line 8229 "configure"
8229 #include "confdefs.h"
8230 /* System header to define __stub macros and hopefully few prototypes,
8231     which can conflict with char $ac_func(); below.  */
8232 #include <assert.h>
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char $ac_func();
8237
8238 int main() {
8239
8240 /* The GNU C library defines this for functions which it implements
8241     to always fail with ENOSYS.  Some functions are actually named
8242     something starting with __ and the normal name is an alias.  */
8243 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8244 choke me
8245 #else
8246 $ac_func();
8247 #endif
8248
8249 ; return 0; }
8250 EOF
8251 if { (eval echo configure:8252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8252   rm -rf conftest*
8253   eval "ac_cv_func_$ac_func=yes"
8254 else
8255   echo "configure: failed program was:" >&5
8256   cat conftest.$ac_ext >&5
8257   rm -rf conftest*
8258   eval "ac_cv_func_$ac_func=no"
8259 fi
8260 rm -f conftest*
8261
8262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8263   echo "$ac_t""yes" 1>&6
8264     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8265   { test "$extra_verbose" = "yes" && cat << EOF
8266     Defining $ac_tr_func
8267 EOF
8268 cat >> confdefs.h <<EOF
8269 #define $ac_tr_func 1
8270 EOF
8271 }
8272  
8273 else
8274   echo "$ac_t""no" 1>&6
8275 fi
8276 done
8277
8278 fi
8279
8280 if test "$with_postgresql" != "no"; then
8281   echo "checking for PostgreSQL" 1>&6
8282 echo "configure:8283: checking for PostgreSQL" >&5
8283
8284   for header_dir in "" "pgsql/" "postgresql/"; do
8285     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8286 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8287 echo "configure:8288: checking for ${header_dir}libpq-fe.h" >&5
8288
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 #include <${header_dir}libpq-fe.h>
8293 EOF
8294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8295 { (eval echo configure:8296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8297 if test -z "$ac_err"; then
8298   rm -rf conftest*
8299   eval "ac_cv_header_$ac_safe=yes"
8300 else
8301   echo "$ac_err" >&5
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   eval "ac_cv_header_$ac_safe=no"
8306 fi
8307 rm -f conftest*
8308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8309   echo "$ac_t""yes" 1>&6
8310   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8311 else
8312   echo "$ac_t""no" 1>&6
8313 fi
8314
8315   done
8316
8317   test -n "$libpq_fe_h_file" && { 
8318 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8319 echo "configure:8320: checking for PQconnectdb in -lpq" >&5
8320 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8321
8322 xe_check_libs=" -lpq "
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* Override any gcc2 internal prototype to avoid an error.  */
8327 /* We use char because int might match the return type of a gcc2
8328     builtin and then its argument prototype would still apply.  */
8329 char PQconnectdb();
8330
8331 int main() {
8332 PQconnectdb()
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=yes"
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_lib_$ac_lib_var=no"
8343 fi
8344 rm -f conftest*
8345 xe_check_libs=""
8346
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8348   echo "$ac_t""yes" 1>&6
8349   have_libpq=yes
8350 else
8351   echo "$ac_t""no" 1>&6
8352 fi
8353
8354  }
8355
8356   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8357     with_postgresql=yes
8358     { test "$extra_verbose" = "yes" && cat << \EOF
8359     Defining HAVE_POSTGRESQL
8360 EOF
8361 cat >> confdefs.h <<\EOF
8362 #define HAVE_POSTGRESQL 1
8363 EOF
8364 }
8365
8366     
8367 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8368 echo "configure:8369: checking for PQconnectStart in -lpq" >&5
8369 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8370
8371 xe_check_libs=" -lpq "
8372 cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 /* Override any gcc2 internal prototype to avoid an error.  */
8376 /* We use char because int might match the return type of a gcc2
8377     builtin and then its argument prototype would still apply.  */
8378 char PQconnectStart();
8379
8380 int main() {
8381 PQconnectStart()
8382 ; return 0; }
8383 EOF
8384 if { (eval echo configure:8385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8385   rm -rf conftest*
8386   eval "ac_cv_lib_$ac_lib_var=yes"
8387 else
8388   echo "configure: failed program was:" >&5
8389   cat conftest.$ac_ext >&5
8390   rm -rf conftest*
8391   eval "ac_cv_lib_$ac_lib_var=no"
8392 fi
8393 rm -f conftest*
8394 xe_check_libs=""
8395
8396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8397   echo "$ac_t""yes" 1>&6
8398   with_postgresqlv7=yes;
8399                  { test "$extra_verbose" = "yes" && cat << \EOF
8400     Defining HAVE_POSTGRESQLV7
8401 EOF
8402 cat >> confdefs.h <<\EOF
8403 #define HAVE_POSTGRESQLV7 1
8404 EOF
8405 }
8406
8407 else
8408   echo "$ac_t""no" 1>&6
8409 fi
8410
8411
8412     { test "$extra_verbose" = "yes" && cat << EOF
8413     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8414 EOF
8415 cat >> confdefs.h <<EOF
8416 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8417 EOF
8418 }
8419
8420     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8421     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8422    echo "    xemacs will be linked with \"postgresql.o\""
8423  fi
8424   elif test "$with_postgresql" = "yes"; then
8425     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8426   fi
8427 fi
8428
8429
8430 if test "$window_system" != "none"; then
8431   echo "checking for graphics libraries" 1>&6
8432 echo "configure:8433: checking for graphics libraries" >&5
8433
8434       libpath_xpm=
8435   incpath_xpm=
8436   libname_xpm="-lXpm"
8437   case "$opsys" in 
8438     cygwin*)
8439       cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
8440       cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"`
8441       case "$window_system" in
8442                 x11)  ;;
8443                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8444              incpath_xpm="-I${cygwin_top}/include/noX"
8445              libname_xpm="-lXpm-noX"
8446               ;;
8447                 gtk)  ;;
8448                 none) ;;
8449                 *)    ;;
8450       esac
8451       ;;
8452         *) ;;
8453   esac
8454     xpm_problem=""
8455   if test -z "$with_xpm"; then
8456     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8457     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8458     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8459 echo "configure:8460: checking for Xpm - no older than 3.4f" >&5
8460     xe_check_libs="$libname_xpm"
8461     cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 #define XPM_NUMBERS
8465 #include <X11/xpm.h>
8466     int main(int c, char **v) {
8467     return c == 1 ? 0 :
8468       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8469       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8470 EOF
8471 if { (eval echo configure:8472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8472 then
8473   ./conftest dummy_arg; xpm_status=$?;
8474       if test "$xpm_status" = "0"; then
8475         with_xpm=yes;
8476       else
8477         with_xpm=no;
8478         if test "$xpm_status" = "1"; then
8479           xpm_problem="Xpm library version and header file version don't match!"
8480         elif test "$xpm_status" = "2"; then
8481           xpm_problem="Xpm library version is too old!"
8482         else
8483           xpm_problem="Internal xpm detection logic error!"
8484         fi
8485         echo "
8486 *** WARNING *** $xpm_problem
8487   I'm not touching that with a 10-foot pole!
8488   If you really want to use the installed version of Xpm, rerun
8489   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8490     fi
8491 else
8492   conftest_rc="$?"
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -fr conftest*
8496   with_xpm=no
8497 fi
8498 rm -fr conftest*
8499     xe_check_libs=
8500     echo "$ac_t""$with_xpm" 1>&6
8501   fi
8502   if test "$with_xpm" = "yes"; then
8503                 { test "$extra_verbose" = "yes" && cat << \EOF
8504     Defining HAVE_XPM
8505 EOF
8506 cat >> confdefs.h <<\EOF
8507 #define HAVE_XPM 1
8508 EOF
8509 }
8510
8511     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8512     libs_x=""$libname_xpm" $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libname_xpm"\" to \$libs_x"; fi
8513     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8514     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8515 echo "configure:8516: checking for \"FOR_MSW\" xpm" >&5
8516     xe_check_libs="$libname_xpm"
8517     cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520
8521 int main() {
8522 XpmCreatePixmapFromData()
8523 ; return 0; }
8524 EOF
8525 if { (eval echo configure:8526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8526   rm -rf conftest*
8527   xpm_for_msw=no
8528 else
8529   echo "configure: failed program was:" >&5
8530   cat conftest.$ac_ext >&5
8531   rm -rf conftest*
8532   xpm_for_msw=yes
8533 fi
8534 rm -f conftest*
8535     xe_check_libs=
8536     echo "$ac_t""$xpm_for_msw" 1>&6
8537     if test "$xpm_for_msw" = "yes"; then
8538       { test "$extra_verbose" = "yes" && cat << \EOF
8539     Defining FOR_MSW
8540 EOF
8541 cat >> confdefs.h <<\EOF
8542 #define FOR_MSW 1
8543 EOF
8544 }
8545
8546     fi
8547   fi
8548
8549     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8550 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8551 echo "configure:8552: checking for compface.h" >&5
8552
8553 cat > conftest.$ac_ext <<EOF
8554 #line 8555 "configure"
8555 #include "confdefs.h"
8556 #include <compface.h>
8557 EOF
8558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8559 { (eval echo configure:8560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8561 if test -z "$ac_err"; then
8562   rm -rf conftest*
8563   eval "ac_cv_header_$ac_safe=yes"
8564 else
8565   echo "$ac_err" >&5
8566   echo "configure: failed program was:" >&5
8567   cat conftest.$ac_ext >&5
8568   rm -rf conftest*
8569   eval "ac_cv_header_$ac_safe=no"
8570 fi
8571 rm -f conftest*
8572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8573   echo "$ac_t""yes" 1>&6
8574   :
8575 else
8576   echo "$ac_t""no" 1>&6
8577 with_xface=no
8578 fi
8579  }
8580   test -z "$with_xface" && { 
8581 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8582 echo "configure:8583: checking for UnGenFace in -lcompface" >&5
8583 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8584
8585 xe_check_libs=" -lcompface "
8586 cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 /* Override any gcc2 internal prototype to avoid an error.  */
8590 /* We use char because int might match the return type of a gcc2
8591     builtin and then its argument prototype would still apply.  */
8592 char UnGenFace();
8593
8594 int main() {
8595 UnGenFace()
8596 ; return 0; }
8597 EOF
8598 if { (eval echo configure:8599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8599   rm -rf conftest*
8600   eval "ac_cv_lib_$ac_lib_var=yes"
8601 else
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=no"
8606 fi
8607 rm -f conftest*
8608 xe_check_libs=""
8609
8610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8611   echo "$ac_t""yes" 1>&6
8612   : 
8613 else
8614   echo "$ac_t""no" 1>&6
8615 with_xface=no
8616 fi
8617
8618  }
8619   test -z "$with_xface" && with_xface=yes
8620   if test "$with_xface" = "yes"; then
8621     { test "$extra_verbose" = "yes" && cat << \EOF
8622     Defining HAVE_XFACE
8623 EOF
8624 cat >> confdefs.h <<\EOF
8625 #define HAVE_XFACE 1
8626 EOF
8627 }
8628
8629     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8630   fi
8631
8632         if test "$with_gif" != "no"; then
8633     with_gif="yes"
8634     { test "$extra_verbose" = "yes" && cat << \EOF
8635     Defining HAVE_GIF
8636 EOF
8637 cat >> confdefs.h <<\EOF
8638 #define HAVE_GIF 1
8639 EOF
8640 }
8641
8642     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8643    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8644  fi
8645   fi
8646
8647       if test "$with_png $with_tiff" != "no no"; then
8648     
8649 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8650 echo "configure:8651: checking for inflate in -lc" >&5
8651 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8652
8653 xe_check_libs=" -lc "
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 /* Override any gcc2 internal prototype to avoid an error.  */
8658 /* We use char because int might match the return type of a gcc2
8659     builtin and then its argument prototype would still apply.  */
8660 char inflate();
8661
8662 int main() {
8663 inflate()
8664 ; return 0; }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8667   rm -rf conftest*
8668   eval "ac_cv_lib_$ac_lib_var=yes"
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_lib_$ac_lib_var=no"
8674 fi
8675 rm -f conftest*
8676 xe_check_libs=""
8677
8678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8679   echo "$ac_t""yes" 1>&6
8680   :
8681 else
8682   echo "$ac_t""no" 1>&6
8683
8684 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8685 echo "configure:8686: checking for inflate in -lz" >&5
8686 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8687
8688 xe_check_libs=" -lz "
8689 cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 /* Override any gcc2 internal prototype to avoid an error.  */
8693 /* We use char because int might match the return type of a gcc2
8694     builtin and then its argument prototype would still apply.  */
8695 char inflate();
8696
8697 int main() {
8698 inflate()
8699 ; return 0; }
8700 EOF
8701 if { (eval echo configure:8702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8702   rm -rf conftest*
8703   eval "ac_cv_lib_$ac_lib_var=yes"
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   eval "ac_cv_lib_$ac_lib_var=no"
8709 fi
8710 rm -f conftest*
8711 xe_check_libs=""
8712
8713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8714   echo "$ac_t""yes" 1>&6
8715   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8716 else
8717   echo "$ac_t""no" 1>&6
8718
8719 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8720 echo "configure:8721: checking for inflate in -lgz" >&5
8721 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8722
8723 xe_check_libs=" -lgz "
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 /* Override any gcc2 internal prototype to avoid an error.  */
8728 /* We use char because int might match the return type of a gcc2
8729     builtin and then its argument prototype would still apply.  */
8730 char inflate();
8731
8732 int main() {
8733 inflate()
8734 ; return 0; }
8735 EOF
8736 if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8737   rm -rf conftest*
8738   eval "ac_cv_lib_$ac_lib_var=yes"
8739 else
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_lib_$ac_lib_var=no"
8744 fi
8745 rm -f conftest*
8746 xe_check_libs=""
8747
8748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8749   echo "$ac_t""yes" 1>&6
8750   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8751 else
8752   echo "$ac_t""no" 1>&6
8753 fi
8754
8755
8756 fi
8757
8758
8759 fi
8760
8761
8762   fi
8763
8764     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8765 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8766 echo "configure:8767: checking for jpeglib.h" >&5
8767
8768 cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <jpeglib.h>
8772 EOF
8773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8774 { (eval echo configure:8775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8776 if test -z "$ac_err"; then
8777   rm -rf conftest*
8778   eval "ac_cv_header_$ac_safe=yes"
8779 else
8780   echo "$ac_err" >&5
8781   echo "configure: failed program was:" >&5
8782   cat conftest.$ac_ext >&5
8783   rm -rf conftest*
8784   eval "ac_cv_header_$ac_safe=no"
8785 fi
8786 rm -f conftest*
8787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8788   echo "$ac_t""yes" 1>&6
8789   :
8790 else
8791   echo "$ac_t""no" 1>&6
8792 with_jpeg=no
8793 fi
8794  }
8795   test -z "$with_jpeg" && { 
8796 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8797 echo "configure:8798: checking for jpeg_destroy_decompress in -ljpeg" >&5
8798 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8799
8800 xe_check_libs=" -ljpeg "
8801 cat > conftest.$ac_ext <<EOF
8802 #line 8803 "configure"
8803 #include "confdefs.h"
8804 /* Override any gcc2 internal prototype to avoid an error.  */
8805 /* We use char because int might match the return type of a gcc2
8806     builtin and then its argument prototype would still apply.  */
8807 char jpeg_destroy_decompress();
8808
8809 int main() {
8810 jpeg_destroy_decompress()
8811 ; return 0; }
8812 EOF
8813 if { (eval echo configure:8814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8814   rm -rf conftest*
8815   eval "ac_cv_lib_$ac_lib_var=yes"
8816 else
8817   echo "configure: failed program was:" >&5
8818   cat conftest.$ac_ext >&5
8819   rm -rf conftest*
8820   eval "ac_cv_lib_$ac_lib_var=no"
8821 fi
8822 rm -f conftest*
8823 xe_check_libs=""
8824
8825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8826   echo "$ac_t""yes" 1>&6
8827   :
8828 else
8829   echo "$ac_t""no" 1>&6
8830 with_jpeg=no
8831 fi
8832
8833  }
8834   test -z "$with_jpeg" && with_jpeg=yes
8835   if test "$with_jpeg" = "yes"; then
8836     { test "$extra_verbose" = "yes" && cat << \EOF
8837     Defining HAVE_JPEG
8838 EOF
8839 cat >> confdefs.h <<\EOF
8840 #define HAVE_JPEG 1
8841 EOF
8842 }
8843
8844     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8845   fi
8846
8847     png_problem=""
8848   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8849 echo "configure:8850: checking for pow" >&5
8850
8851 cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 /* System header to define __stub macros and hopefully few prototypes,
8855     which can conflict with char pow(); below.  */
8856 #include <assert.h>
8857 /* Override any gcc2 internal prototype to avoid an error.  */
8858 /* We use char because int might match the return type of a gcc2
8859     builtin and then its argument prototype would still apply.  */
8860 char pow();
8861
8862 int main() {
8863
8864 /* The GNU C library defines this for functions which it implements
8865     to always fail with ENOSYS.  Some functions are actually named
8866     something starting with __ and the normal name is an alias.  */
8867 #if defined (__stub_pow) || defined (__stub___pow)
8868 choke me
8869 #else
8870 pow();
8871 #endif
8872
8873 ; return 0; }
8874 EOF
8875 if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8876   rm -rf conftest*
8877   eval "ac_cv_func_pow=yes"
8878 else
8879   echo "configure: failed program was:" >&5
8880   cat conftest.$ac_ext >&5
8881   rm -rf conftest*
8882   eval "ac_cv_func_pow=no"
8883 fi
8884 rm -f conftest*
8885
8886 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8887   echo "$ac_t""yes" 1>&6
8888   :
8889 else
8890   echo "$ac_t""no" 1>&6
8891 with_png=no
8892 fi
8893  }
8894   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8895 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8896 echo "configure:8897: checking for png.h" >&5
8897
8898 cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 #include <png.h>
8902 EOF
8903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8904 { (eval echo configure:8905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8906 if test -z "$ac_err"; then
8907   rm -rf conftest*
8908   eval "ac_cv_header_$ac_safe=yes"
8909 else
8910   echo "$ac_err" >&5
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_header_$ac_safe=no"
8915 fi
8916 rm -f conftest*
8917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8918   echo "$ac_t""yes" 1>&6
8919   :
8920 else
8921   echo "$ac_t""no" 1>&6
8922 with_png=no
8923 fi
8924  }
8925   test -z "$with_png" && { 
8926 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8927 echo "configure:8928: checking for png_read_image in -lpng" >&5
8928 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8929
8930 xe_check_libs=" -lpng "
8931 cat > conftest.$ac_ext <<EOF
8932 #line 8933 "configure"
8933 #include "confdefs.h"
8934 /* Override any gcc2 internal prototype to avoid an error.  */
8935 /* We use char because int might match the return type of a gcc2
8936     builtin and then its argument prototype would still apply.  */
8937 char png_read_image();
8938
8939 int main() {
8940 png_read_image()
8941 ; return 0; }
8942 EOF
8943 if { (eval echo configure:8944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8944   rm -rf conftest*
8945   eval "ac_cv_lib_$ac_lib_var=yes"
8946 else
8947   echo "configure: failed program was:" >&5
8948   cat conftest.$ac_ext >&5
8949   rm -rf conftest*
8950   eval "ac_cv_lib_$ac_lib_var=no"
8951 fi
8952 rm -f conftest*
8953 xe_check_libs=""
8954
8955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8956   echo "$ac_t""yes" 1>&6
8957   :
8958 else
8959   echo "$ac_t""no" 1>&6
8960 with_png=no
8961 fi
8962
8963  }
8964   if test -z "$with_png"; then
8965     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8966 echo "configure:8967: checking for workable png version information" >&5
8967     xe_check_libs="-lpng -lz"
8968     cat > conftest.$ac_ext <<EOF
8969 #line 8970 "configure"
8970 #include "confdefs.h"
8971 #include <png.h>
8972     int main(int c, char **v) {
8973     if (c == 1) return 0;
8974     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8975     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8978 then
8979   ./conftest dummy_arg; png_status=$?;
8980       if test "$png_status" = "0"; then
8981         with_png=yes;
8982       else
8983         with_png=no;
8984         if test "$png_status" = "1"; then
8985           png_problem="PNG library version and header file don't match!"
8986         elif test "$png_status" = "2"; then
8987           png_problem="PNG library version too old (pre 1.0.2)!"
8988         fi
8989         echo "
8990 *** WARNING *** $png_problem
8991   I'm not touching that with a 10-foot pole!
8992   If you really want to use the installed version of libPNG, rerun
8993   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8994     fi
8995 else
8996   conftest_rc="$?"
8997   echo "configure: failed program was:" >&5
8998   cat conftest.$ac_ext >&5
8999   rm -fr conftest*
9000   with_png=no
9001 fi
9002 rm -fr conftest*
9003     xe_check_libs=
9004     echo "$ac_t""$with_png" 1>&6
9005   fi
9006   if test "$with_png" = "yes"; then
9007     { test "$extra_verbose" = "yes" && cat << \EOF
9008     Defining HAVE_PNG
9009 EOF
9010 cat >> confdefs.h <<\EOF
9011 #define HAVE_PNG 1
9012 EOF
9013 }
9014
9015     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
9016   fi
9017
9018     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
9019 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
9020 echo "configure:9021: checking for tiffio.h" >&5
9021
9022 cat > conftest.$ac_ext <<EOF
9023 #line 9024 "configure"
9024 #include "confdefs.h"
9025 #include <tiffio.h>
9026 EOF
9027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9028 { (eval echo configure:9029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9030 if test -z "$ac_err"; then
9031   rm -rf conftest*
9032   eval "ac_cv_header_$ac_safe=yes"
9033 else
9034   echo "$ac_err" >&5
9035   echo "configure: failed program was:" >&5
9036   cat conftest.$ac_ext >&5
9037   rm -rf conftest*
9038   eval "ac_cv_header_$ac_safe=no"
9039 fi
9040 rm -f conftest*
9041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9042   echo "$ac_t""yes" 1>&6
9043   :
9044 else
9045   echo "$ac_t""no" 1>&6
9046 with_tiff=no
9047 fi
9048  }
9049   test -z "$with_tiff" && { 
9050 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
9051 echo "configure:9052: checking for TIFFClientOpen in -ltiff" >&5
9052 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
9053
9054 xe_check_libs=" -ltiff "
9055 cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058 /* Override any gcc2 internal prototype to avoid an error.  */
9059 /* We use char because int might match the return type of a gcc2
9060     builtin and then its argument prototype would still apply.  */
9061 char TIFFClientOpen();
9062
9063 int main() {
9064 TIFFClientOpen()
9065 ; return 0; }
9066 EOF
9067 if { (eval echo configure:9068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9068   rm -rf conftest*
9069   eval "ac_cv_lib_$ac_lib_var=yes"
9070 else
9071   echo "configure: failed program was:" >&5
9072   cat conftest.$ac_ext >&5
9073   rm -rf conftest*
9074   eval "ac_cv_lib_$ac_lib_var=no"
9075 fi
9076 rm -f conftest*
9077 xe_check_libs=""
9078
9079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9080   echo "$ac_t""yes" 1>&6
9081   :
9082 else
9083   echo "$ac_t""no" 1>&6
9084 with_tiff=no
9085 fi
9086
9087  }
9088   test -z "$with_tiff" && with_tiff=yes
9089   if test "$with_tiff" = "yes"; then
9090     { test "$extra_verbose" = "yes" && cat << \EOF
9091     Defining HAVE_TIFF
9092 EOF
9093 cat >> confdefs.h <<\EOF
9094 #define HAVE_TIFF 1
9095 EOF
9096 }
9097
9098     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
9099   fi
9100 fi
9101
9102
9103 if test "$with_gtk" = "yes"; then
9104     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
9105 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
9106 echo "configure:9107: checking for compface.h" >&5
9107
9108 cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111 #include <compface.h>
9112 EOF
9113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9114 { (eval echo configure:9115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9116 if test -z "$ac_err"; then
9117   rm -rf conftest*
9118   eval "ac_cv_header_$ac_safe=yes"
9119 else
9120   echo "$ac_err" >&5
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_header_$ac_safe=no"
9125 fi
9126 rm -f conftest*
9127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9128   echo "$ac_t""yes" 1>&6
9129   :
9130 else
9131   echo "$ac_t""no" 1>&6
9132 with_xface=no
9133 fi
9134  }
9135   test -z "$with_xface" && { 
9136 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
9137 echo "configure:9138: checking for UnGenFace in -lcompface" >&5
9138 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
9139
9140 xe_check_libs=" -lcompface "
9141 cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 /* Override any gcc2 internal prototype to avoid an error.  */
9145 /* We use char because int might match the return type of a gcc2
9146     builtin and then its argument prototype would still apply.  */
9147 char UnGenFace();
9148
9149 int main() {
9150 UnGenFace()
9151 ; return 0; }
9152 EOF
9153 if { (eval echo configure:9154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9154   rm -rf conftest*
9155   eval "ac_cv_lib_$ac_lib_var=yes"
9156 else
9157   echo "configure: failed program was:" >&5
9158   cat conftest.$ac_ext >&5
9159   rm -rf conftest*
9160   eval "ac_cv_lib_$ac_lib_var=no"
9161 fi
9162 rm -f conftest*
9163 xe_check_libs=""
9164
9165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9166   echo "$ac_t""yes" 1>&6
9167   : 
9168 else
9169   echo "$ac_t""no" 1>&6
9170 with_xface=no
9171 fi
9172
9173  }
9174   test -z "$with_xface" && with_xface=yes
9175   if test "$with_xface" = "yes"; then
9176     { test "$extra_verbose" = "yes" && cat << \EOF
9177     Defining HAVE_XFACE
9178 EOF
9179 cat >> confdefs.h <<\EOF
9180 #define HAVE_XFACE 1
9181 EOF
9182 }
9183
9184     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
9185   fi
9186 fi
9187
9188
9189
9190 if test "$with_x11" = "yes"; then
9191   echo "checking for X11 graphics libraries" 1>&6
9192 echo "configure:9193: checking for X11 graphics libraries" >&5
9193 fi
9194
9195 if test "$with_x11" = "yes"; then
9196   echo "checking for the Athena widgets" 1>&6
9197 echo "configure:9198: checking for the Athena widgets" >&5
9198
9199     case "$with_athena" in
9200         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9201     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9202     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9203     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9204     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9205     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9206   esac
9207
9208   athena_3d_function=Xaw3dComputeBottomShadowRGB
9209
9210     if test "$athena_3d" = "no"; then
9211     
9212 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9213 echo "configure:9214: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9214 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9215
9216 xe_check_libs=" -l$athena_variant "
9217 cat > conftest.$ac_ext <<EOF
9218 #line 9219 "configure"
9219 #include "confdefs.h"
9220 /* Override any gcc2 internal prototype to avoid an error.  */
9221 /* We use char because int might match the return type of a gcc2
9222     builtin and then its argument prototype would still apply.  */
9223 char XawScrollbarSetThumb();
9224
9225 int main() {
9226 XawScrollbarSetThumb()
9227 ; return 0; }
9228 EOF
9229 if { (eval echo configure:9230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9230   rm -rf conftest*
9231   eval "ac_cv_lib_$ac_lib_var=yes"
9232 else
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -rf conftest*
9236   eval "ac_cv_lib_$ac_lib_var=no"
9237 fi
9238 rm -f conftest*
9239 xe_check_libs=""
9240
9241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9242   echo "$ac_t""yes" 1>&6
9243           
9244 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9245 echo "configure:9246: checking for $athena_3d_function in -l$athena_variant" >&5
9246 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9247
9248 xe_check_libs=" -l$athena_variant "
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 /* Override any gcc2 internal prototype to avoid an error.  */
9253 /* We use char because int might match the return type of a gcc2
9254     builtin and then its argument prototype would still apply.  */
9255 char $athena_3d_function();
9256
9257 int main() {
9258 $athena_3d_function()
9259 ; return 0; }
9260 EOF
9261 if { (eval echo configure:9262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9262   rm -rf conftest*
9263   eval "ac_cv_lib_$ac_lib_var=yes"
9264 else
9265   echo "configure: failed program was:" >&5
9266   cat conftest.$ac_ext >&5
9267   rm -rf conftest*
9268   eval "ac_cv_lib_$ac_lib_var=no"
9269 fi
9270 rm -f conftest*
9271 xe_check_libs=""
9272
9273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9274   echo "$ac_t""yes" 1>&6
9275   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9276 else
9277   echo "$ac_t""no" 1>&6
9278 athena_lib=$athena_variant
9279 fi
9280
9281
9282       
9283 else
9284   echo "$ac_t""no" 1>&6
9285 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9286 fi
9287
9288
9289   else
9290         
9291 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9292 echo "configure:9293: checking for $athena_3d_function in -l$athena_variant" >&5
9293 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9294
9295 xe_check_libs=" -l$athena_variant "
9296 cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 /* Override any gcc2 internal prototype to avoid an error.  */
9300 /* We use char because int might match the return type of a gcc2
9301     builtin and then its argument prototype would still apply.  */
9302 char $athena_3d_function();
9303
9304 int main() {
9305 $athena_3d_function()
9306 ; return 0; }
9307 EOF
9308 if { (eval echo configure:9309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9309   rm -rf conftest*
9310   eval "ac_cv_lib_$ac_lib_var=yes"
9311 else
9312   echo "configure: failed program was:" >&5
9313   cat conftest.$ac_ext >&5
9314   rm -rf conftest*
9315   eval "ac_cv_lib_$ac_lib_var=no"
9316 fi
9317 rm -f conftest*
9318 xe_check_libs=""
9319
9320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9321   echo "$ac_t""yes" 1>&6
9322   athena_lib=$athena_variant
9323 else
9324   echo "$ac_t""no" 1>&6
9325 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9326 echo "configure:9327: checking for $athena_3d_function in -lXaw" >&5
9327 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9328
9329 xe_check_libs=" -lXaw "
9330 cat > conftest.$ac_ext <<EOF
9331 #line 9332 "configure"
9332 #include "confdefs.h"
9333 /* Override any gcc2 internal prototype to avoid an error.  */
9334 /* We use char because int might match the return type of a gcc2
9335     builtin and then its argument prototype would still apply.  */
9336 char $athena_3d_function();
9337
9338 int main() {
9339 $athena_3d_function()
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_lib_$ac_lib_var=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_lib_$ac_lib_var=no"
9350 fi
9351 rm -f conftest*
9352 xe_check_libs=""
9353
9354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9355   echo "$ac_t""yes" 1>&6
9356   athena_lib=Xaw;
9357           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9358         
9359 else
9360   echo "$ac_t""no" 1>&6
9361 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9362 fi
9363
9364
9365 fi
9366
9367
9368   fi
9369
9370     if test "$athena_3d" = "no"; then
9371     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9372 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9373 echo "configure:9374: checking for X11/Xaw/ThreeD.h" >&5
9374
9375 cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378 #include <X11/Xaw/ThreeD.h>
9379 EOF
9380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9381 { (eval echo configure:9382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9383 if test -z "$ac_err"; then
9384   rm -rf conftest*
9385   eval "ac_cv_header_$ac_safe=yes"
9386 else
9387   echo "$ac_err" >&5
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_header_$ac_safe=no"
9392 fi
9393 rm -f conftest*
9394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9397 else
9398   echo "$ac_t""no" 1>&6
9399 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9400 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9401 echo "configure:9402: checking for X11/Xaw/XawInit.h" >&5
9402
9403 cat > conftest.$ac_ext <<EOF
9404 #line 9405 "configure"
9405 #include "confdefs.h"
9406 #include <X11/Xaw/XawInit.h>
9407 EOF
9408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9409 { (eval echo configure:9410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9411 if test -z "$ac_err"; then
9412   rm -rf conftest*
9413   eval "ac_cv_header_$ac_safe=yes"
9414 else
9415   echo "$ac_err" >&5
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -rf conftest*
9419   eval "ac_cv_header_$ac_safe=no"
9420 fi
9421 rm -f conftest*
9422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9423   echo "$ac_t""yes" 1>&6
9424   athena_h_path=X11/Xaw
9425 else
9426   echo "$ac_t""no" 1>&6
9427 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9428 fi
9429
9430 fi
9431
9432   else
9433             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9434 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9435 echo "configure:9436: checking for X11/$athena_variant/XawInit.h" >&5
9436
9437 cat > conftest.$ac_ext <<EOF
9438 #line 9439 "configure"
9439 #include "confdefs.h"
9440 #include <X11/$athena_variant/XawInit.h>
9441 EOF
9442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9443 { (eval echo configure:9444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9445 if test -z "$ac_err"; then
9446   rm -rf conftest*
9447   eval "ac_cv_header_$ac_safe=yes"
9448 else
9449   echo "$ac_err" >&5
9450   echo "configure: failed program was:" >&5
9451   cat conftest.$ac_ext >&5
9452   rm -rf conftest*
9453   eval "ac_cv_header_$ac_safe=no"
9454 fi
9455 rm -f conftest*
9456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9457   echo "$ac_t""yes" 1>&6
9458   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9459 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9460 echo "configure:9461: checking for X11/$athena_variant/ThreeD.h" >&5
9461
9462 cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9465 #include <X11/$athena_variant/ThreeD.h>
9466 EOF
9467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9468 { (eval echo configure:9469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9470 if test -z "$ac_err"; then
9471   rm -rf conftest*
9472   eval "ac_cv_header_$ac_safe=yes"
9473 else
9474   echo "$ac_err" >&5
9475   echo "configure: failed program was:" >&5
9476   cat conftest.$ac_ext >&5
9477   rm -rf conftest*
9478   eval "ac_cv_header_$ac_safe=no"
9479 fi
9480 rm -f conftest*
9481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9482   echo "$ac_t""yes" 1>&6
9483   athena_h_path=X11/$athena_variant
9484 else
9485   echo "$ac_t""no" 1>&6
9486 fi
9487
9488 else
9489   echo "$ac_t""no" 1>&6
9490 fi
9491
9492
9493         if test -z "$athena_h_path"; then
9494       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9495 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9496 echo "configure:9497: checking for $athena_variant/XawInit.h" >&5
9497
9498 cat > conftest.$ac_ext <<EOF
9499 #line 9500 "configure"
9500 #include "confdefs.h"
9501 #include <$athena_variant/XawInit.h>
9502 EOF
9503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9504 { (eval echo configure:9505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9506 if test -z "$ac_err"; then
9507   rm -rf conftest*
9508   eval "ac_cv_header_$ac_safe=yes"
9509 else
9510   echo "$ac_err" >&5
9511   echo "configure: failed program was:" >&5
9512   cat conftest.$ac_ext >&5
9513   rm -rf conftest*
9514   eval "ac_cv_header_$ac_safe=no"
9515 fi
9516 rm -f conftest*
9517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9518   echo "$ac_t""yes" 1>&6
9519   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9520 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9521 echo "configure:9522: checking for $athena_variant/ThreeD.h" >&5
9522
9523 cat > conftest.$ac_ext <<EOF
9524 #line 9525 "configure"
9525 #include "confdefs.h"
9526 #include <$athena_variant/ThreeD.h>
9527 EOF
9528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9529 { (eval echo configure:9530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9531 if test -z "$ac_err"; then
9532   rm -rf conftest*
9533   eval "ac_cv_header_$ac_safe=yes"
9534 else
9535   echo "$ac_err" >&5
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -rf conftest*
9539   eval "ac_cv_header_$ac_safe=no"
9540 fi
9541 rm -f conftest*
9542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9543   echo "$ac_t""yes" 1>&6
9544   athena_h_path=$athena_variant
9545 else
9546   echo "$ac_t""no" 1>&6
9547 fi
9548
9549 else
9550   echo "$ac_t""no" 1>&6
9551 fi
9552
9553     fi
9554
9555         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9556       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9557 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9558 echo "configure:9559: checking for X11/Xaw3d/XawInit.h" >&5
9559
9560 cat > conftest.$ac_ext <<EOF
9561 #line 9562 "configure"
9562 #include "confdefs.h"
9563 #include <X11/Xaw3d/XawInit.h>
9564 EOF
9565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9566 { (eval echo configure:9567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9568 if test -z "$ac_err"; then
9569   rm -rf conftest*
9570   eval "ac_cv_header_$ac_safe=yes"
9571 else
9572   echo "$ac_err" >&5
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_header_$ac_safe=no"
9577 fi
9578 rm -f conftest*
9579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9580   echo "$ac_t""yes" 1>&6
9581   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9582 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9583 echo "configure:9584: checking for X11/Xaw3d/ThreeD.h" >&5
9584
9585 cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 #include <X11/Xaw3d/ThreeD.h>
9589 EOF
9590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9591 { (eval echo configure:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9593 if test -z "$ac_err"; then
9594   rm -rf conftest*
9595   eval "ac_cv_header_$ac_safe=yes"
9596 else
9597   echo "$ac_err" >&5
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=no"
9602 fi
9603 rm -f conftest*
9604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9605   echo "$ac_t""yes" 1>&6
9606   
9607             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9608             athena_h_path=X11/Xaw3d
9609           
9610 else
9611   echo "$ac_t""no" 1>&6
9612 fi
9613
9614 else
9615   echo "$ac_t""no" 1>&6
9616 fi
9617
9618     fi
9619
9620         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9621       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9622 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9623 echo "configure:9624: checking for Xaw3d/XawInit.h" >&5
9624
9625 cat > conftest.$ac_ext <<EOF
9626 #line 9627 "configure"
9627 #include "confdefs.h"
9628 #include <Xaw3d/XawInit.h>
9629 EOF
9630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9631 { (eval echo configure:9632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9633 if test -z "$ac_err"; then
9634   rm -rf conftest*
9635   eval "ac_cv_header_$ac_safe=yes"
9636 else
9637   echo "$ac_err" >&5
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -rf conftest*
9641   eval "ac_cv_header_$ac_safe=no"
9642 fi
9643 rm -f conftest*
9644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9645   echo "$ac_t""yes" 1>&6
9646   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9647 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9648 echo "configure:9649: checking for Xaw3d/ThreeD.h" >&5
9649
9650 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 #include <Xaw3d/ThreeD.h>
9654 EOF
9655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9656 { (eval echo configure:9657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9658 if test -z "$ac_err"; then
9659   rm -rf conftest*
9660   eval "ac_cv_header_$ac_safe=yes"
9661 else
9662   echo "$ac_err" >&5
9663   echo "configure: failed program was:" >&5
9664   cat conftest.$ac_ext >&5
9665   rm -rf conftest*
9666   eval "ac_cv_header_$ac_safe=no"
9667 fi
9668 rm -f conftest*
9669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9670   echo "$ac_t""yes" 1>&6
9671   
9672             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9673             athena_h_path=Xaw3d
9674           
9675 else
9676   echo "$ac_t""no" 1>&6
9677 fi
9678
9679 else
9680   echo "$ac_t""no" 1>&6
9681 fi
9682
9683     fi
9684
9685             if test -z "$athena_h_path"; then
9686       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9687 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9688 echo "configure:9689: checking for X11/Xaw/ThreeD.h" >&5
9689
9690 cat > conftest.$ac_ext <<EOF
9691 #line 9692 "configure"
9692 #include "confdefs.h"
9693 #include <X11/Xaw/ThreeD.h>
9694 EOF
9695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9696 { (eval echo configure:9697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9698 if test -z "$ac_err"; then
9699   rm -rf conftest*
9700   eval "ac_cv_header_$ac_safe=yes"
9701 else
9702   echo "$ac_err" >&5
9703   echo "configure: failed program was:" >&5
9704   cat conftest.$ac_ext >&5
9705   rm -rf conftest*
9706   eval "ac_cv_header_$ac_safe=no"
9707 fi
9708 rm -f conftest*
9709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9710   echo "$ac_t""yes" 1>&6
9711   
9712           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9713           athena_h_path=X11/Xaw
9714         
9715 else
9716   echo "$ac_t""no" 1>&6
9717 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9718 fi
9719
9720     fi
9721   fi
9722
9723     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9724     have_xaw=yes
9725   else
9726     have_xaw=no
9727   fi
9728
9729 else
9730   have_xaw=no
9731 fi 
9732 if test "$with_x11" = "yes"; then
9733     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9734 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9735 echo "configure:9736: checking for Xm/Xm.h" >&5
9736
9737 cat > conftest.$ac_ext <<EOF
9738 #line 9739 "configure"
9739 #include "confdefs.h"
9740 #include <Xm/Xm.h>
9741 EOF
9742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9743 { (eval echo configure:9744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9745 if test -z "$ac_err"; then
9746   rm -rf conftest*
9747   eval "ac_cv_header_$ac_safe=yes"
9748 else
9749   echo "$ac_err" >&5
9750   echo "configure: failed program was:" >&5
9751   cat conftest.$ac_ext >&5
9752   rm -rf conftest*
9753   eval "ac_cv_header_$ac_safe=no"
9754 fi
9755 rm -f conftest*
9756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9757   echo "$ac_t""yes" 1>&6
9758   
9759 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9760 echo "configure:9761: checking for XmStringFree in -lXm" >&5
9761 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9762
9763 xe_check_libs=" -lXm "
9764 cat > conftest.$ac_ext <<EOF
9765 #line 9766 "configure"
9766 #include "confdefs.h"
9767 /* Override any gcc2 internal prototype to avoid an error.  */
9768 /* We use char because int might match the return type of a gcc2
9769     builtin and then its argument prototype would still apply.  */
9770 char XmStringFree();
9771
9772 int main() {
9773 XmStringFree()
9774 ; return 0; }
9775 EOF
9776 if { (eval echo configure:9777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9777   rm -rf conftest*
9778   eval "ac_cv_lib_$ac_lib_var=yes"
9779 else
9780   echo "configure: failed program was:" >&5
9781   cat conftest.$ac_ext >&5
9782   rm -rf conftest*
9783   eval "ac_cv_lib_$ac_lib_var=no"
9784 fi
9785 rm -f conftest*
9786 xe_check_libs=""
9787
9788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9789   echo "$ac_t""yes" 1>&6
9790   have_motif=yes
9791 else
9792   echo "$ac_t""no" 1>&6
9793 have_motif=no
9794 fi
9795
9796
9797 else
9798   echo "$ac_t""no" 1>&6
9799 have_motif=no
9800 fi
9801
9802
9803   if test "$have_motif" = "yes"; then
9804         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9805 echo "configure:9806: checking for Lesstif" >&5
9806     cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 #include <Xm/Xm.h>
9810 #ifdef LESSTIF_VERSION
9811 yes
9812 #endif
9813
9814 EOF
9815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9816   egrep "yes" >/dev/null 2>&1; then
9817   rm -rf conftest*
9818   have_lesstif=yes
9819 else
9820   rm -rf conftest*
9821   have_lesstif=no
9822 fi
9823 rm -f conftest*
9824
9825   echo "$ac_t""$have_lesstif" 1>&6
9826   fi
9827
9828 fi 
9829
9830 case "$opsys" in
9831   *linux* | cygwin* )  lucid_prefers_motif="no"  ;;
9832   * )        lucid_prefers_motif="yes" ;;
9833 esac
9834
9835 case "$with_menubars" in "" | "yes" | "athena" )
9836   with_menubars="lucid" ;;
9837 esac
9838 case "$with_dialogs" in "" | "yes" | "lucid" )
9839   if test "$lucid_prefers_motif" = "yes"; then
9840     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9841     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9842     else with_dialogs=no
9843     fi
9844   else
9845     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9846     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9847     else with_dialogs=no
9848     fi
9849   fi ;;
9850 esac
9851 case "$with_scrollbars" in "" | "yes" )
9852   with_scrollbars="lucid" ;;
9853 esac
9854 case "$with_widgets" in
9855   "yes" | "lucid")
9856     if test "$lucid_prefers_motif" = "yes"; then
9857       if   test "$have_motif" = "yes"; then with_widgets="motif"
9858       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9859       else with_widgets=no
9860       fi
9861     else
9862       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9863       elif test "$have_motif" = "yes"; then with_widgets="motif"
9864       else with_widgets=no
9865       fi
9866     fi ;;
9867   "" )
9868     with_widgets=no ;;
9869 esac
9870
9871 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9872
9873 case "$all_widgets" in
9874   *athena* )
9875     if test "$have_xaw" != "yes"; then
9876       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9877     fi
9878
9879         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9880
9881         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9882
9883                     { test "$extra_verbose" = "yes" && cat << EOF
9884     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9885 EOF
9886 cat >> confdefs.h <<EOF
9887 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9888 EOF
9889 }
9890
9891     { test "$extra_verbose" = "yes" && cat << EOF
9892     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9893 EOF
9894 cat >> confdefs.h <<EOF
9895 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9896 EOF
9897 }
9898
9899     { test "$extra_verbose" = "yes" && cat << EOF
9900     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9901 EOF
9902 cat >> confdefs.h <<EOF
9903 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9904 EOF
9905 }
9906
9907     { test "$extra_verbose" = "yes" && cat << EOF
9908     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9909 EOF
9910 cat >> confdefs.h <<EOF
9911 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9912 EOF
9913 }
9914
9915     { test "$extra_verbose" = "yes" && cat << EOF
9916     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9917 EOF
9918 cat >> confdefs.h <<EOF
9919 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9920 EOF
9921 }
9922
9923     { test "$extra_verbose" = "yes" && cat << EOF
9924     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9925 EOF
9926 cat >> confdefs.h <<EOF
9927 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9928 EOF
9929 }
9930
9931     { test "$extra_verbose" = "yes" && cat << EOF
9932     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9933 EOF
9934 cat >> confdefs.h <<EOF
9935 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9936 EOF
9937 }
9938
9939     { test "$extra_verbose" = "yes" && cat << EOF
9940     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9941 EOF
9942 cat >> confdefs.h <<EOF
9943 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9944 EOF
9945 }
9946
9947     { test "$extra_verbose" = "yes" && cat << EOF
9948     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9949 EOF
9950 cat >> confdefs.h <<EOF
9951 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9952 EOF
9953 }
9954
9955     { test "$extra_verbose" = "yes" && cat << EOF
9956     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9957 EOF
9958 cat >> confdefs.h <<EOF
9959 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9960 EOF
9961 }
9962
9963
9964     { test "$extra_verbose" = "yes" && cat << \EOF
9965     Defining LWLIB_USES_ATHENA
9966 EOF
9967 cat >> confdefs.h <<\EOF
9968 #define LWLIB_USES_ATHENA 1
9969 EOF
9970 }
9971
9972     { test "$extra_verbose" = "yes" && cat << \EOF
9973     Defining NEED_ATHENA
9974 EOF
9975 cat >> confdefs.h <<\EOF
9976 #define NEED_ATHENA 1
9977 EOF
9978 }
9979
9980     need_athena="yes"
9981
9982     if test "$athena_3d" = "yes"; then
9983       { test "$extra_verbose" = "yes" && cat << \EOF
9984     Defining HAVE_ATHENA_3D
9985 EOF
9986 cat >> confdefs.h <<\EOF
9987 #define HAVE_ATHENA_3D 1
9988 EOF
9989 }
9990
9991     fi
9992   ;;
9993 esac
9994
9995 case "$all_widgets" in *motif* )
9996   { test "$extra_verbose" = "yes" && cat << \EOF
9997     Defining LWLIB_USES_MOTIF
9998 EOF
9999 cat >> confdefs.h <<\EOF
10000 #define LWLIB_USES_MOTIF 1
10001 EOF
10002 }
10003
10004   { test "$extra_verbose" = "yes" && cat << \EOF
10005     Defining NEED_MOTIF
10006 EOF
10007 cat >> confdefs.h <<\EOF
10008 #define NEED_MOTIF 1
10009 EOF
10010 }
10011
10012   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
10013   need_motif=yes ;;
10014 esac
10015
10016 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
10017 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
10018 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
10019 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
10020         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
10021 case "$with_widgets" in athena* )
10022         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;;
10023 esac
10024 case "$all_widgets" in *lucid* )
10025   { test "$extra_verbose" = "yes" && cat << \EOF
10026     Defining NEED_LUCID
10027 EOF
10028 cat >> confdefs.h <<\EOF
10029 #define NEED_LUCID 1
10030 EOF
10031 }
10032
10033   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
10034 esac
10035
10036
10037
10038 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10039     Defining LWLIB_SCROLLBARS_ATHENA
10040 EOF
10041 cat >> confdefs.h <<\EOF
10042 #define LWLIB_SCROLLBARS_ATHENA 1
10043 EOF
10044 }
10045
10046 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10047     Defining LWLIB_DIALOGS_ATHENA
10048 EOF
10049 cat >> confdefs.h <<\EOF
10050 #define LWLIB_DIALOGS_ATHENA 1
10051 EOF
10052 }
10053
10054
10055 if test "$athena_3d" = "yes"; then
10056   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10057     Defining LWLIB_SCROLLBARS_ATHENA3D
10058 EOF
10059 cat >> confdefs.h <<\EOF
10060 #define LWLIB_SCROLLBARS_ATHENA3D 1
10061 EOF
10062 }
10063
10064   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10065     Defining LWLIB_DIALOGS_ATHENA3D
10066 EOF
10067 cat >> confdefs.h <<\EOF
10068 #define LWLIB_DIALOGS_ATHENA3D 1
10069 EOF
10070 }
10071
10072 fi
10073
10074 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
10075     Defining LWLIB_WIDGETS_ATHENA
10076 EOF
10077 cat >> confdefs.h <<\EOF
10078 #define LWLIB_WIDGETS_ATHENA 1
10079 EOF
10080 }
10081 ;; esac
10082 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
10083         { test "$extra_verbose" = "yes" && cat << \EOF
10084     Defining LWLIB_TABS_LUCID
10085 EOF
10086 cat >> confdefs.h <<\EOF
10087 #define LWLIB_TABS_LUCID 1
10088 EOF
10089 }
10090
10091
10092 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10093     Defining HAVE_MENUBARS
10094 EOF
10095 cat >> confdefs.h <<\EOF
10096 #define HAVE_MENUBARS 1
10097 EOF
10098 }
10099
10100 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10101     Defining HAVE_SCROLLBARS
10102 EOF
10103 cat >> confdefs.h <<\EOF
10104 #define HAVE_SCROLLBARS 1
10105 EOF
10106 }
10107
10108 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10109     Defining HAVE_DIALOGS
10110 EOF
10111 cat >> confdefs.h <<\EOF
10112 #define HAVE_DIALOGS 1
10113 EOF
10114 }
10115
10116 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10117     Defining HAVE_TOOLBARS
10118 EOF
10119 cat >> confdefs.h <<\EOF
10120 #define HAVE_TOOLBARS 1
10121 EOF
10122 }
10123
10124 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10125     Defining HAVE_WIDGETS
10126 EOF
10127 cat >> confdefs.h <<\EOF
10128 #define HAVE_WIDGETS 1
10129 EOF
10130 }
10131
10132
10133 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
10134     Defining LWLIB_MENUBARS_LUCID
10135 EOF
10136 cat >> confdefs.h <<\EOF
10137 #define LWLIB_MENUBARS_LUCID 1
10138 EOF
10139 }
10140
10141 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
10142     Defining LWLIB_SCROLLBARS_LUCID
10143 EOF
10144 cat >> confdefs.h <<\EOF
10145 #define LWLIB_SCROLLBARS_LUCID 1
10146 EOF
10147 }
10148
10149
10150 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10151     Defining LWLIB_MENUBARS_MOTIF
10152 EOF
10153 cat >> confdefs.h <<\EOF
10154 #define LWLIB_MENUBARS_MOTIF 1
10155 EOF
10156 }
10157
10158 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10159     Defining LWLIB_SCROLLBARS_MOTIF
10160 EOF
10161 cat >> confdefs.h <<\EOF
10162 #define LWLIB_SCROLLBARS_MOTIF 1
10163 EOF
10164 }
10165
10166 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10167     Defining LWLIB_DIALOGS_MOTIF
10168 EOF
10169 cat >> confdefs.h <<\EOF
10170 #define LWLIB_DIALOGS_MOTIF 1
10171 EOF
10172 }
10173
10174 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10175     Defining LWLIB_WIDGETS_MOTIF
10176 EOF
10177 cat >> confdefs.h <<\EOF
10178 #define LWLIB_WIDGETS_MOTIF 1
10179 EOF
10180 }
10181
10182
10183 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
10184    echo "    xemacs will be linked with \"menubar.o\""
10185  fi
10186 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
10187    echo "    xemacs will be linked with \"scrollbar.o\""
10188  fi
10189 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
10190    echo "    xemacs will be linked with \"dialog.o\""
10191  fi
10192 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
10193    echo "    xemacs will be linked with \"toolbar.o\""
10194  fi
10195
10196 if test "$with_gtk" = "yes"; then
10197   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10198    echo "    xemacs will be linked with \"menubar-gtk.o\""
10199  fi
10200   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10201    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10202  fi
10203   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10204    echo "    xemacs will be linked with \"dialog-gtk.o\""
10205  fi
10206   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10207    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10208  fi
10209   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10210    echo "    xemacs will be linked with \"gui-gtk.o\""
10211  fi
10212 fi
10213
10214 if test "$with_x11" = "yes"; then
10215   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10216    echo "    xemacs will be linked with \"menubar-x.o\""
10217  fi
10218   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10219    echo "    xemacs will be linked with \"scrollbar-x.o\""
10220  fi
10221   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10222    echo "    xemacs will be linked with \"dialog-x.o\""
10223  fi
10224   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10225    echo "    xemacs will be linked with \"toolbar-x.o\""
10226  fi
10227   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10228    echo "    xemacs will be linked with \"gui-x.o\""
10229  fi
10230 fi
10231
10232
10233 test -z "$with_mule" && with_mule=no
10234 test -z "$with_file_coding" && with_file_coding=no
10235
10236
10237 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10238   { test "$extra_verbose" = "yes" && cat << \EOF
10239     Defining FILE_CODING
10240 EOF
10241 cat >> confdefs.h <<\EOF
10242 #define FILE_CODING 1
10243 EOF
10244 }
10245
10246   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10247    echo "    xemacs will be linked with \"file-coding.o\""
10248  fi
10249 fi
10250
10251 concord_includes_found=no
10252 if test "$with_concord" != "no"; then
10253    ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'`
10254 echo $ac_n "checking for concord.h""... $ac_c" 1>&6
10255 echo "configure:10256: checking for concord.h" >&5
10256
10257 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260 #include <concord.h>
10261 EOF
10262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10263 { (eval echo configure:10264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10265 if test -z "$ac_err"; then
10266   rm -rf conftest*
10267   eval "ac_cv_header_$ac_safe=yes"
10268 else
10269   echo "$ac_err" >&5
10270   echo "configure: failed program was:" >&5
10271   cat conftest.$ac_ext >&5
10272   rm -rf conftest*
10273   eval "ac_cv_header_$ac_safe=no"
10274 fi
10275 rm -f conftest*
10276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10277   echo "$ac_t""yes" 1>&6
10278   :
10279 else
10280   echo "$ac_t""no" 1>&6
10281 with_concord=no
10282 fi
10283
10284 fi
10285 if test "$concord_includes_found" = "no" -a "$with_concord" != "no" -a \
10286    -d "/usr/local/concord/include"; then
10287   save_c_switch_site="$c_switch_site"
10288   c_switch_site="$c_switch_site -I/usr/local/concord/include"
10289   ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'`
10290 echo $ac_n "checking for concord.h""... $ac_c" 1>&6
10291 echo "configure:10292: checking for concord.h" >&5
10292
10293 cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296 #include <concord.h>
10297 EOF
10298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10299 { (eval echo configure:10300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10301 if test -z "$ac_err"; then
10302   rm -rf conftest*
10303   eval "ac_cv_header_$ac_safe=yes"
10304 else
10305   echo "$ac_err" >&5
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   eval "ac_cv_header_$ac_safe=no"
10310 fi
10311 rm -f conftest*
10312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10313   echo "$ac_t""yes" 1>&6
10314   concord_includes_found=yes
10315 else
10316   echo "$ac_t""no" 1>&6
10317 fi
10318
10319   if test "$concord_includes_found" != "yes"; then
10320     c_switch_site="$save_c_switch_site"
10321     with_concord="no"
10322   fi
10323 fi
10324
10325 test -z "$with_concord" && with_concord=yes
10326 if test "$with_concord" = "yes"; then
10327   { test "$extra_verbose" = "yes" && cat << \EOF
10328     Defining HAVE_CONCORD
10329 EOF
10330 cat >> confdefs.h <<\EOF
10331 #define HAVE_CONCORD 1
10332 EOF
10333 }
10334
10335   libs_x="-lconcord $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lconcord\" to \$libs_x"; fi
10336   extra_objs="$extra_objs concord.o" &&  if test "$extra_verbose" = "yes"; then
10337    echo "    xemacs will be linked with \"concord.o\""
10338  fi
10339 fi
10340
10341 test -z "$with_chise" && with_chise=yes
10342 if test "$with_chise" = "yes"; then
10343     with_mule=yes
10344     with_utf_2000=yes
10345     with_text_coding=yes
10346 fi
10347
10348 if test "$with_mule" = "yes" ; then
10349   echo "checking for Mule-related features" 1>&6
10350 echo "configure:10351: checking for Mule-related features" >&5
10351   { test "$extra_verbose" = "yes" && cat << \EOF
10352     Defining MULE
10353 EOF
10354 cat >> confdefs.h <<\EOF
10355 #define MULE 1
10356 EOF
10357 }
10358
10359
10360     chise_includes_found=no
10361   if test "$with_chise" != "no"; then
10362     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10363 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10364 echo "configure:10365: checking for chise.h" >&5
10365
10366 cat > conftest.$ac_ext <<EOF
10367 #line 10368 "configure"
10368 #include "confdefs.h"
10369 #include <chise.h>
10370 EOF
10371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10372 { (eval echo configure:10373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10374 if test -z "$ac_err"; then
10375   rm -rf conftest*
10376   eval "ac_cv_header_$ac_safe=yes"
10377 else
10378   echo "$ac_err" >&5
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   eval "ac_cv_header_$ac_safe=no"
10383 fi
10384 rm -f conftest*
10385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10386   echo "$ac_t""yes" 1>&6
10387   :
10388 else
10389   echo "$ac_t""no" 1>&6
10390 with_chise=no
10391 fi
10392
10393   fi
10394   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10395       -d "/usr/local/chise/include"; then
10396     save_c_switch_site="$c_switch_site"
10397     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10398     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10399 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10400 echo "configure:10401: checking for chise.h" >&5
10401
10402 cat > conftest.$ac_ext <<EOF
10403 #line 10404 "configure"
10404 #include "confdefs.h"
10405 #include <chise.h>
10406 EOF
10407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10408 { (eval echo configure:10409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10410 if test -z "$ac_err"; then
10411   rm -rf conftest*
10412   eval "ac_cv_header_$ac_safe=yes"
10413 else
10414   echo "$ac_err" >&5
10415   echo "configure: failed program was:" >&5
10416   cat conftest.$ac_ext >&5
10417   rm -rf conftest*
10418   eval "ac_cv_header_$ac_safe=no"
10419 fi
10420 rm -f conftest*
10421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10422   echo "$ac_t""yes" 1>&6
10423   chise_includes_found=yes
10424 else
10425   echo "$ac_t""no" 1>&6
10426 fi
10427
10428     if test "$chise_includes_found" != "yes"; then
10429       c_switch_site="$save_c_switch_site"
10430       with_chise="no"
10431     fi
10432   fi
10433
10434   test -z "$with_chise" && with_chise=yes
10435   if test "$with_chise" = "yes"; then
10436     { test "$extra_verbose" = "yes" && cat << \EOF
10437     Defining HAVE_CHISE
10438 EOF
10439 cat >> confdefs.h <<\EOF
10440 #define HAVE_CHISE 1
10441 EOF
10442 }
10443
10444     { test "$extra_verbose" = "yes" && cat << \EOF
10445     Defining HAVE_LIBCHISE
10446 EOF
10447 cat >> confdefs.h <<\EOF
10448 #define HAVE_LIBCHISE 1
10449 EOF
10450 }
10451
10452     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10453   fi
10454
10455   { test "$extra_verbose" = "yes" && cat << \EOF
10456     Defining FILE_CODING
10457 EOF
10458 cat >> confdefs.h <<\EOF
10459 #define FILE_CODING 1
10460 EOF
10461 }
10462
10463   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10464    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10465  fi
10466   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10467     { test "$extra_verbose" = "yes" && cat << \EOF
10468     Defining TEXT_CODING
10469 EOF
10470 cat >> confdefs.h <<\EOF
10471 #define TEXT_CODING 1
10472 EOF
10473 }
10474
10475     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10476    echo "    xemacs will be linked with \"text-coding.o\""
10477  fi
10478   else
10479     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10480    echo "    xemacs will be linked with \"file-coding.o\""
10481  fi
10482   fi
10483     for ac_hdr in libintl.h
10484 do
10485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10487 echo "configure:10488: checking for $ac_hdr" >&5
10488
10489 cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492 #include <$ac_hdr>
10493 EOF
10494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10495 { (eval echo configure:10496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10497 if test -z "$ac_err"; then
10498   rm -rf conftest*
10499   eval "ac_cv_header_$ac_safe=yes"
10500 else
10501   echo "$ac_err" >&5
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_header_$ac_safe=no"
10506 fi
10507 rm -f conftest*
10508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10511   { test "$extra_verbose" = "yes" && cat << EOF
10512     Defining $ac_tr_hdr
10513 EOF
10514 cat >> confdefs.h <<EOF
10515 #define $ac_tr_hdr 1
10516 EOF
10517 }
10518  
10519 else
10520   echo "$ac_t""no" 1>&6
10521 fi
10522 done
10523
10524   
10525 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10526 echo "configure:10527: checking for strerror in -lintl" >&5
10527 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10528
10529 xe_check_libs=" -lintl "
10530 cat > conftest.$ac_ext <<EOF
10531 #line 10532 "configure"
10532 #include "confdefs.h"
10533 /* Override any gcc2 internal prototype to avoid an error.  */
10534 /* We use char because int might match the return type of a gcc2
10535     builtin and then its argument prototype would still apply.  */
10536 char strerror();
10537
10538 int main() {
10539 strerror()
10540 ; return 0; }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10543   rm -rf conftest*
10544   eval "ac_cv_lib_$ac_lib_var=yes"
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -rf conftest*
10549   eval "ac_cv_lib_$ac_lib_var=no"
10550 fi
10551 rm -f conftest*
10552 xe_check_libs=""
10553
10554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10555   echo "$ac_t""yes" 1>&6
10556     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10557     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10558   { test "$extra_verbose" = "yes" && cat << EOF
10559     Defining $ac_tr_lib
10560 EOF
10561 cat >> confdefs.h <<EOF
10562 #define $ac_tr_lib 1
10563 EOF
10564 }
10565
10566   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10567
10568 else
10569   echo "$ac_t""no" 1>&6
10570 fi
10571
10572
10573
10574   if test "$with_utf_2000" = "yes" ; then
10575     { test "$extra_verbose" = "yes" && cat << \EOF
10576     Defining CHAR_IS_UCS4
10577 EOF
10578 cat >> confdefs.h <<\EOF
10579 #define CHAR_IS_UCS4 1
10580 EOF
10581 }
10582
10583     { test "$extra_verbose" = "yes" && cat << \EOF
10584     Defining UTF2000
10585 EOF
10586 cat >> confdefs.h <<\EOF
10587 #define UTF2000 1
10588 EOF
10589 }
10590
10591     with_wnn=no
10592     with_wnn6=no
10593   fi
10594
10595   echo "checking for Mule input methods" 1>&6
10596 echo "configure:10597: checking for Mule input methods" >&5
10597         case "$with_xim" in "" | "yes" )
10598     echo "checking for XIM" 1>&6
10599 echo "configure:10600: checking for XIM" >&5
10600     
10601 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10602 echo "configure:10603: checking for XOpenIM in -lX11" >&5
10603 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10604
10605 xe_check_libs=" -lX11 "
10606 cat > conftest.$ac_ext <<EOF
10607 #line 10608 "configure"
10608 #include "confdefs.h"
10609 /* Override any gcc2 internal prototype to avoid an error.  */
10610 /* We use char because int might match the return type of a gcc2
10611     builtin and then its argument prototype would still apply.  */
10612 char XOpenIM();
10613
10614 int main() {
10615 XOpenIM()
10616 ; return 0; }
10617 EOF
10618 if { (eval echo configure:10619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10619   rm -rf conftest*
10620   eval "ac_cv_lib_$ac_lib_var=yes"
10621 else
10622   echo "configure: failed program was:" >&5
10623   cat conftest.$ac_ext >&5
10624   rm -rf conftest*
10625   eval "ac_cv_lib_$ac_lib_var=no"
10626 fi
10627 rm -f conftest*
10628 xe_check_libs=""
10629
10630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10631   echo "$ac_t""yes" 1>&6
10632   with_xim=xlib
10633 else
10634   echo "$ac_t""no" 1>&6
10635 with_xim=no
10636 fi
10637
10638
10639             if test "$need_motif $have_lesstif" = "yes no"; then
10640       
10641 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10642 echo "configure:10643: checking for XmImMbLookupString in -lXm" >&5
10643 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10644
10645 xe_check_libs=" -lXm "
10646 cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649 /* Override any gcc2 internal prototype to avoid an error.  */
10650 /* We use char because int might match the return type of a gcc2
10651     builtin and then its argument prototype would still apply.  */
10652 char XmImMbLookupString();
10653
10654 int main() {
10655 XmImMbLookupString()
10656 ; return 0; }
10657 EOF
10658 if { (eval echo configure:10659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10659   rm -rf conftest*
10660   eval "ac_cv_lib_$ac_lib_var=yes"
10661 else
10662   echo "configure: failed program was:" >&5
10663   cat conftest.$ac_ext >&5
10664   rm -rf conftest*
10665   eval "ac_cv_lib_$ac_lib_var=no"
10666 fi
10667 rm -f conftest*
10668 xe_check_libs=""
10669
10670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10671   echo "$ac_t""yes" 1>&6
10672   with_xim=motif
10673 else
10674   echo "$ac_t""no" 1>&6
10675 fi
10676
10677
10678     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10679       
10680 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10681 echo "configure:10682: checking for XmImMbLookupString in -lXm" >&5
10682 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10683
10684 xe_check_libs=" -lXm "
10685 cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 /* Override any gcc2 internal prototype to avoid an error.  */
10689 /* We use char because int might match the return type of a gcc2
10690     builtin and then its argument prototype would still apply.  */
10691 char XmImMbLookupString();
10692
10693 int main() {
10694 XmImMbLookupString()
10695 ; return 0; }
10696 EOF
10697 if { (eval echo configure:10698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10698   rm -rf conftest*
10699   eval "ac_cv_lib_$ac_lib_var=yes"
10700 else
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -rf conftest*
10704   eval "ac_cv_lib_$ac_lib_var=no"
10705 fi
10706 rm -f conftest*
10707 xe_check_libs=""
10708
10709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10710   echo "$ac_t""yes" 1>&6
10711   with_xim=motif
10712 else
10713   echo "$ac_t""no" 1>&6
10714 fi
10715
10716
10717     fi ;;
10718   esac
10719   if test "$with_xim" != "no"; then
10720     { test "$extra_verbose" = "yes" && cat << \EOF
10721     Defining HAVE_XIM
10722 EOF
10723 cat >> confdefs.h <<\EOF
10724 #define HAVE_XIM 1
10725 EOF
10726 }
10727
10728     if test "$with_xim" = "xlib"; then
10729       { test "$extra_verbose" = "yes" && cat << \EOF
10730     Defining XIM_XLIB
10731 EOF
10732 cat >> confdefs.h <<\EOF
10733 #define XIM_XLIB 1
10734 EOF
10735 }
10736
10737       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10738    echo "    xemacs will be linked with \"input-method-xlib.o\""
10739  fi
10740     fi
10741     if test "$with_xim" = "motif"; then
10742       { test "$extra_verbose" = "yes" && cat << \EOF
10743     Defining XIM_MOTIF
10744 EOF
10745 cat >> confdefs.h <<\EOF
10746 #define XIM_MOTIF 1
10747 EOF
10748 }
10749
10750       need_motif=yes
10751       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10752    echo "    xemacs will be linked with \"input-method-motif.o\""
10753  fi
10754     fi
10755     if test "$with_xim" = "motif"; then
10756       with_xfs=no
10757     fi
10758   fi
10759
10760     if test "$with_xfs" = "yes" ; then
10761     echo "checking for XFontSet" 1>&6
10762 echo "configure:10763: checking for XFontSet" >&5
10763     
10764 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10765 echo "configure:10766: checking for XmbDrawString in -lX11" >&5
10766 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10767
10768 xe_check_libs=" -lX11 "
10769 cat > conftest.$ac_ext <<EOF
10770 #line 10771 "configure"
10771 #include "confdefs.h"
10772 /* Override any gcc2 internal prototype to avoid an error.  */
10773 /* We use char because int might match the return type of a gcc2
10774     builtin and then its argument prototype would still apply.  */
10775 char XmbDrawString();
10776
10777 int main() {
10778 XmbDrawString()
10779 ; return 0; }
10780 EOF
10781 if { (eval echo configure:10782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10782   rm -rf conftest*
10783   eval "ac_cv_lib_$ac_lib_var=yes"
10784 else
10785   echo "configure: failed program was:" >&5
10786   cat conftest.$ac_ext >&5
10787   rm -rf conftest*
10788   eval "ac_cv_lib_$ac_lib_var=no"
10789 fi
10790 rm -f conftest*
10791 xe_check_libs=""
10792
10793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10794   echo "$ac_t""yes" 1>&6
10795   :
10796 else
10797   echo "$ac_t""no" 1>&6
10798 with_xfs=no
10799 fi
10800
10801
10802     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10803       { test "$extra_verbose" = "yes" && cat << \EOF
10804     Defining USE_XFONTSET
10805 EOF
10806 cat >> confdefs.h <<\EOF
10807 #define USE_XFONTSET 1
10808 EOF
10809 }
10810
10811       if test "$with_xim" = "no" ; then
10812         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10813    echo "    xemacs will be linked with \"input-method-xlib.o\""
10814  fi
10815       fi
10816     fi
10817   fi 
10818     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10819   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10820 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10821 echo "configure:10822: checking for wnn/jllib.h" >&5
10822
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 #include <wnn/jllib.h>
10827 EOF
10828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10829 { (eval echo configure:10830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10831 if test -z "$ac_err"; then
10832   rm -rf conftest*
10833   eval "ac_cv_header_$ac_safe=yes"
10834 else
10835   echo "$ac_err" >&5
10836   echo "configure: failed program was:" >&5
10837   cat conftest.$ac_ext >&5
10838   rm -rf conftest*
10839   eval "ac_cv_header_$ac_safe=no"
10840 fi
10841 rm -f conftest*
10842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10843   echo "$ac_t""yes" 1>&6
10844   :
10845 else
10846   echo "$ac_t""no" 1>&6
10847 with_wnn=no
10848 fi
10849  }
10850     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10851 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10852 echo "configure:10853: checking for wnn/commonhd.h" >&5
10853
10854 cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857 #include <wnn/commonhd.h>
10858 EOF
10859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10860 { (eval echo configure:10861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10862 if test -z "$ac_err"; then
10863   rm -rf conftest*
10864   eval "ac_cv_header_$ac_safe=yes"
10865 else
10866   echo "$ac_err" >&5
10867   echo "configure: failed program was:" >&5
10868   cat conftest.$ac_ext >&5
10869   rm -rf conftest*
10870   eval "ac_cv_header_$ac_safe=no"
10871 fi
10872 rm -f conftest*
10873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875   :
10876 else
10877   echo "$ac_t""no" 1>&6
10878 with_wnn=no
10879 fi
10880  }
10881     if test "$with_wnn" != "no"; then
10882     for ac_func in crypt
10883 do
10884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10885 echo "configure:10886: checking for $ac_func" >&5
10886
10887 cat > conftest.$ac_ext <<EOF
10888 #line 10889 "configure"
10889 #include "confdefs.h"
10890 /* System header to define __stub macros and hopefully few prototypes,
10891     which can conflict with char $ac_func(); below.  */
10892 #include <assert.h>
10893 /* Override any gcc2 internal prototype to avoid an error.  */
10894 /* We use char because int might match the return type of a gcc2
10895     builtin and then its argument prototype would still apply.  */
10896 char $ac_func();
10897
10898 int main() {
10899
10900 /* The GNU C library defines this for functions which it implements
10901     to always fail with ENOSYS.  Some functions are actually named
10902     something starting with __ and the normal name is an alias.  */
10903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10904 choke me
10905 #else
10906 $ac_func();
10907 #endif
10908
10909 ; return 0; }
10910 EOF
10911 if { (eval echo configure:10912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10912   rm -rf conftest*
10913   eval "ac_cv_func_$ac_func=yes"
10914 else
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   eval "ac_cv_func_$ac_func=no"
10919 fi
10920 rm -f conftest*
10921
10922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10923   echo "$ac_t""yes" 1>&6
10924     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10925   { test "$extra_verbose" = "yes" && cat << EOF
10926     Defining $ac_tr_func
10927 EOF
10928 cat >> confdefs.h <<EOF
10929 #define $ac_tr_func 1
10930 EOF
10931 }
10932  
10933 else
10934   echo "$ac_t""no" 1>&6
10935 fi
10936 done
10937
10938     test "$ac_cv_func_crypt" != "yes" && { 
10939 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10940 echo "configure:10941: checking for crypt in -lcrypt" >&5
10941 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10942
10943 xe_check_libs=" -lcrypt "
10944 cat > conftest.$ac_ext <<EOF
10945 #line 10946 "configure"
10946 #include "confdefs.h"
10947 /* Override any gcc2 internal prototype to avoid an error.  */
10948 /* We use char because int might match the return type of a gcc2
10949     builtin and then its argument prototype would still apply.  */
10950 char crypt();
10951
10952 int main() {
10953 crypt()
10954 ; return 0; }
10955 EOF
10956 if { (eval echo configure:10957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10957   rm -rf conftest*
10958   eval "ac_cv_lib_$ac_lib_var=yes"
10959 else
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_lib_$ac_lib_var=no"
10964 fi
10965 rm -f conftest*
10966 xe_check_libs=""
10967
10968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10969   echo "$ac_t""yes" 1>&6
10970     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10971     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10972   { test "$extra_verbose" = "yes" && cat << EOF
10973     Defining $ac_tr_lib
10974 EOF
10975 cat >> confdefs.h <<EOF
10976 #define $ac_tr_lib 1
10977 EOF
10978 }
10979
10980   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10981
10982 else
10983   echo "$ac_t""no" 1>&6
10984 fi
10985
10986  }
10987   fi
10988     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10989     
10990 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10991 echo "configure:10992: checking for jl_dic_list_e in -lwnn" >&5
10992 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10993
10994 xe_check_libs=" -lwnn "
10995 cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 /* Override any gcc2 internal prototype to avoid an error.  */
10999 /* We use char because int might match the return type of a gcc2
11000     builtin and then its argument prototype would still apply.  */
11001 char jl_dic_list_e();
11002
11003 int main() {
11004 jl_dic_list_e()
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   eval "ac_cv_lib_$ac_lib_var=yes"
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=no"
11015 fi
11016 rm -f conftest*
11017 xe_check_libs=""
11018
11019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11020   echo "$ac_t""yes" 1>&6
11021   libwnn=wnn
11022 else
11023   echo "$ac_t""no" 1>&6
11024 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
11025 echo "configure:11026: checking for jl_dic_list_e in -lwnn4" >&5
11026 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
11027
11028 xe_check_libs=" -lwnn4 "
11029 cat > conftest.$ac_ext <<EOF
11030 #line 11031 "configure"
11031 #include "confdefs.h"
11032 /* Override any gcc2 internal prototype to avoid an error.  */
11033 /* We use char because int might match the return type of a gcc2
11034     builtin and then its argument prototype would still apply.  */
11035 char jl_dic_list_e();
11036
11037 int main() {
11038 jl_dic_list_e()
11039 ; return 0; }
11040 EOF
11041 if { (eval echo configure:11042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11042   rm -rf conftest*
11043   eval "ac_cv_lib_$ac_lib_var=yes"
11044 else
11045   echo "configure: failed program was:" >&5
11046   cat conftest.$ac_ext >&5
11047   rm -rf conftest*
11048   eval "ac_cv_lib_$ac_lib_var=no"
11049 fi
11050 rm -f conftest*
11051 xe_check_libs=""
11052
11053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11054   echo "$ac_t""yes" 1>&6
11055   libwnn=wnn4
11056 else
11057   echo "$ac_t""no" 1>&6
11058 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
11059 echo "configure:11060: checking for jl_dic_list_e in -lwnn6" >&5
11060 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
11061
11062 xe_check_libs=" -lwnn6 "
11063 cat > conftest.$ac_ext <<EOF
11064 #line 11065 "configure"
11065 #include "confdefs.h"
11066 /* Override any gcc2 internal prototype to avoid an error.  */
11067 /* We use char because int might match the return type of a gcc2
11068     builtin and then its argument prototype would still apply.  */
11069 char jl_dic_list_e();
11070
11071 int main() {
11072 jl_dic_list_e()
11073 ; return 0; }
11074 EOF
11075 if { (eval echo configure:11076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11076   rm -rf conftest*
11077   eval "ac_cv_lib_$ac_lib_var=yes"
11078 else
11079   echo "configure: failed program was:" >&5
11080   cat conftest.$ac_ext >&5
11081   rm -rf conftest*
11082   eval "ac_cv_lib_$ac_lib_var=no"
11083 fi
11084 rm -f conftest*
11085 xe_check_libs=""
11086
11087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11088   echo "$ac_t""yes" 1>&6
11089   libwnn=wnn6
11090 else
11091   echo "$ac_t""no" 1>&6
11092 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
11093 echo "configure:11094: checking for dic_list_e in -lwnn6_fromsrc" >&5
11094 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
11095
11096 xe_check_libs=" -lwnn6_fromsrc "
11097 cat > conftest.$ac_ext <<EOF
11098 #line 11099 "configure"
11099 #include "confdefs.h"
11100 /* Override any gcc2 internal prototype to avoid an error.  */
11101 /* We use char because int might match the return type of a gcc2
11102     builtin and then its argument prototype would still apply.  */
11103 char dic_list_e();
11104
11105 int main() {
11106 dic_list_e()
11107 ; return 0; }
11108 EOF
11109 if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11110   rm -rf conftest*
11111   eval "ac_cv_lib_$ac_lib_var=yes"
11112 else
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -rf conftest*
11116   eval "ac_cv_lib_$ac_lib_var=no"
11117 fi
11118 rm -f conftest*
11119 xe_check_libs=""
11120
11121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11122   echo "$ac_t""yes" 1>&6
11123   libwnn=wnn6_fromsrc
11124 else
11125   echo "$ac_t""no" 1>&6
11126 with_wnn=no
11127 fi
11128
11129
11130 fi
11131
11132
11133 fi
11134
11135
11136 fi
11137
11138
11139   fi
11140   test -z "$with_wnn" && with_wnn=yes
11141   if test "$with_wnn" = "yes"; then
11142     { test "$extra_verbose" = "yes" && cat << \EOF
11143     Defining HAVE_WNN
11144 EOF
11145 cat >> confdefs.h <<\EOF
11146 #define HAVE_WNN 1
11147 EOF
11148 }
11149
11150     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
11151     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
11152    echo "    xemacs will be linked with \"mule-wnnfns.o\""
11153  fi
11154     if test "$with_wnn6" != "no"; then
11155       
11156 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
11157 echo "configure:11158: checking for jl_fi_dic_list in -l$libwnn" >&5
11158 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
11159
11160 xe_check_libs=" -l$libwnn "
11161 cat > conftest.$ac_ext <<EOF
11162 #line 11163 "configure"
11163 #include "confdefs.h"
11164 /* Override any gcc2 internal prototype to avoid an error.  */
11165 /* We use char because int might match the return type of a gcc2
11166     builtin and then its argument prototype would still apply.  */
11167 char jl_fi_dic_list();
11168
11169 int main() {
11170 jl_fi_dic_list()
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=no"
11181 fi
11182 rm -f conftest*
11183 xe_check_libs=""
11184
11185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11186   echo "$ac_t""yes" 1>&6
11187   with_wnn6=yes
11188 else
11189   echo "$ac_t""no" 1>&6
11190 fi
11191
11192
11193       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11194     Defining WNN6
11195 EOF
11196 cat >> confdefs.h <<\EOF
11197 #define WNN6 1
11198 EOF
11199 }
11200
11201     fi
11202   fi
11203
11204     canna_includes_found=no
11205   if test "$with_canna" != "no"; then
11206     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11207 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11208 echo "configure:11209: checking for canna/jrkanji.h" >&5
11209
11210 cat > conftest.$ac_ext <<EOF
11211 #line 11212 "configure"
11212 #include "confdefs.h"
11213 #include <canna/jrkanji.h>
11214 EOF
11215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11216 { (eval echo configure:11217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11218 if test -z "$ac_err"; then
11219   rm -rf conftest*
11220   eval "ac_cv_header_$ac_safe=yes"
11221 else
11222   echo "$ac_err" >&5
11223   echo "configure: failed program was:" >&5
11224   cat conftest.$ac_ext >&5
11225   rm -rf conftest*
11226   eval "ac_cv_header_$ac_safe=no"
11227 fi
11228 rm -f conftest*
11229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11230   echo "$ac_t""yes" 1>&6
11231   canna_includes_found=yes
11232 else
11233   echo "$ac_t""no" 1>&6
11234 fi
11235
11236   fi
11237   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
11238       -d "/usr/local/canna/include"; then
11239     save_c_switch_site="$c_switch_site"
11240     c_switch_site="$c_switch_site -I/usr/local/canna/include"
11241     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11242 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11243 echo "configure:11244: checking for canna/jrkanji.h" >&5
11244
11245 cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 #include <canna/jrkanji.h>
11249 EOF
11250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11251 { (eval echo configure:11252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11253 if test -z "$ac_err"; then
11254   rm -rf conftest*
11255   eval "ac_cv_header_$ac_safe=yes"
11256 else
11257   echo "$ac_err" >&5
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_header_$ac_safe=no"
11262 fi
11263 rm -f conftest*
11264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11265   echo "$ac_t""yes" 1>&6
11266   canna_includes_found=yes
11267 else
11268   echo "$ac_t""no" 1>&6
11269 fi
11270
11271     if test "$canna_includes_found" != "yes"; then
11272       c_switch_site="$save_c_switch_site"
11273       with_canna="no"
11274     fi
11275   fi
11276
11277   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
11278 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
11279 echo "configure:11280: checking for canna/RK.h" >&5
11280
11281 cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 #include <canna/RK.h>
11285 EOF
11286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11287 { (eval echo configure:11288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11289 if test -z "$ac_err"; then
11290   rm -rf conftest*
11291   eval "ac_cv_header_$ac_safe=yes"
11292 else
11293   echo "$ac_err" >&5
11294   echo "configure: failed program was:" >&5
11295   cat conftest.$ac_ext >&5
11296   rm -rf conftest*
11297   eval "ac_cv_header_$ac_safe=no"
11298 fi
11299 rm -f conftest*
11300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11301   echo "$ac_t""yes" 1>&6
11302   :
11303 else
11304   echo "$ac_t""no" 1>&6
11305 with_canna=no
11306 fi
11307  }
11308   test -z "$with_canna" && { 
11309 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
11310 echo "configure:11311: checking for RkBgnBun in -lRKC" >&5
11311 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
11312
11313 xe_check_libs=" -lRKC "
11314 cat > conftest.$ac_ext <<EOF
11315 #line 11316 "configure"
11316 #include "confdefs.h"
11317 /* Override any gcc2 internal prototype to avoid an error.  */
11318 /* We use char because int might match the return type of a gcc2
11319     builtin and then its argument prototype would still apply.  */
11320 char RkBgnBun();
11321
11322 int main() {
11323 RkBgnBun()
11324 ; return 0; }
11325 EOF
11326 if { (eval echo configure:11327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11327   rm -rf conftest*
11328   eval "ac_cv_lib_$ac_lib_var=yes"
11329 else
11330   echo "configure: failed program was:" >&5
11331   cat conftest.$ac_ext >&5
11332   rm -rf conftest*
11333   eval "ac_cv_lib_$ac_lib_var=no"
11334 fi
11335 rm -f conftest*
11336 xe_check_libs=""
11337
11338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11339   echo "$ac_t""yes" 1>&6
11340   :
11341 else
11342   echo "$ac_t""no" 1>&6
11343 with_canna=no
11344 fi
11345
11346  }
11347   test -z "$with_canna" && { 
11348 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
11349 echo "configure:11350: checking for jrKanjiControl in -lcanna" >&5
11350 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
11351
11352 xe_check_libs=" -lcanna "
11353 cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 /* Override any gcc2 internal prototype to avoid an error.  */
11357 /* We use char because int might match the return type of a gcc2
11358     builtin and then its argument prototype would still apply.  */
11359 char jrKanjiControl();
11360
11361 int main() {
11362 jrKanjiControl()
11363 ; return 0; }
11364 EOF
11365 if { (eval echo configure:11366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11366   rm -rf conftest*
11367   eval "ac_cv_lib_$ac_lib_var=yes"
11368 else
11369   echo "configure: failed program was:" >&5
11370   cat conftest.$ac_ext >&5
11371   rm -rf conftest*
11372   eval "ac_cv_lib_$ac_lib_var=no"
11373 fi
11374 rm -f conftest*
11375 xe_check_libs=""
11376
11377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11378   echo "$ac_t""yes" 1>&6
11379   :
11380 else
11381   echo "$ac_t""no" 1>&6
11382 with_canna=no
11383 fi
11384
11385  }
11386   test -z "$with_canna" && with_canna=yes
11387   if test "$with_canna" = "yes"; then
11388     { test "$extra_verbose" = "yes" && cat << \EOF
11389     Defining HAVE_CANNA
11390 EOF
11391 cat >> confdefs.h <<\EOF
11392 #define HAVE_CANNA 1
11393 EOF
11394 }
11395
11396     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11397     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11398    echo "    xemacs will be linked with \"mule-canna.o\""
11399  fi
11400   fi
11401
11402 else   for feature in xim canna wnn; do
11403     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11404       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11405     fi
11406     eval "with_${feature}=no"
11407   done
11408 fi 
11409
11410 if test "$need_motif" = "yes" ; then
11411   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11412     
11413 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11414 echo "configure:11415: checking for layout_object_getvalue in -li18n" >&5
11415 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11416
11417 xe_check_libs=" -li18n "
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 /* Override any gcc2 internal prototype to avoid an error.  */
11422 /* We use char because int might match the return type of a gcc2
11423     builtin and then its argument prototype would still apply.  */
11424 char layout_object_getvalue();
11425
11426 int main() {
11427 layout_object_getvalue()
11428 ; return 0; }
11429 EOF
11430 if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=yes"
11433 else
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -rf conftest*
11437   eval "ac_cv_lib_$ac_lib_var=no"
11438 fi
11439 rm -f conftest*
11440 xe_check_libs=""
11441
11442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11443   echo "$ac_t""yes" 1>&6
11444   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11445 else
11446   echo "$ac_t""no" 1>&6
11447 fi
11448
11449
11450   
11451 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11452     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11453   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11454   
11455         runpath="" runpath_dirs=""
11456   if test -n "$LD_RUN_PATH"; then
11457     runpath="$LD_RUN_PATH"
11458   elif test "$GCC" = "yes"; then
11459         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11460     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11461     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11462     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11463       case "$arg" in P,* | -L* | -R* )
11464         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11465           {
11466 xe_runpath_dir="$dir"
11467   test "$xe_runpath_dir" != "/lib"     -a \
11468         "$xe_runpath_dir" != "/usr/lib" -a \
11469         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11470   eval "$xe_add_unique_runpath_dir"
11471 }
11472         done ;;
11473       esac
11474     done
11475     ld_switch_run="$ld_switch_run_save"
11476     rm -f conftest*
11477   else
11478         for arg in $ld_switch_site $ld_switch_x_site; do
11479       case "$arg" in -L*) {
11480 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11481   test "$xe_runpath_dir" != "/lib"     -a \
11482         "$xe_runpath_dir" != "/usr/lib" -a \
11483         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11484   eval "$xe_add_unique_runpath_dir"
11485 };; esac
11486     done
11487             if test "$opsys $need_motif" = "sol2 yes"; then
11488       xe_runpath_dir="/opt/SUNWdt/lib";
11489       eval "$xe_add_unique_runpath_dir";
11490     fi
11491   fi 
11492   if test -n "$runpath"; then
11493     ld_switch_run="${dash_r}${runpath}"
11494     
11495 if test "$GCC" = "yes"; then
11496   set x $ld_switch_run; shift; ld_switch_run=""
11497   while test -n "$1"; do
11498     case $1 in
11499       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11500       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11501       -Xlinker* ) ;;
11502       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11503     esac
11504     shift
11505   done
11506 fi
11507     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11508   fi
11509 fi
11510
11511 fi
11512
11513
11514 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
11515 do
11516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11517 echo "configure:11518: checking for $ac_func" >&5
11518
11519 cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 /* System header to define __stub macros and hopefully few prototypes,
11523     which can conflict with char $ac_func(); below.  */
11524 #include <assert.h>
11525 /* Override any gcc2 internal prototype to avoid an error.  */
11526 /* We use char because int might match the return type of a gcc2
11527     builtin and then its argument prototype would still apply.  */
11528 char $ac_func();
11529
11530 int main() {
11531
11532 /* The GNU C library defines this for functions which it implements
11533     to always fail with ENOSYS.  Some functions are actually named
11534     something starting with __ and the normal name is an alias.  */
11535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11536 choke me
11537 #else
11538 $ac_func();
11539 #endif
11540
11541 ; return 0; }
11542 EOF
11543 if { (eval echo configure:11544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11544   rm -rf conftest*
11545   eval "ac_cv_func_$ac_func=yes"
11546 else
11547   echo "configure: failed program was:" >&5
11548   cat conftest.$ac_ext >&5
11549   rm -rf conftest*
11550   eval "ac_cv_func_$ac_func=no"
11551 fi
11552 rm -f conftest*
11553
11554 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11555   echo "$ac_t""yes" 1>&6
11556     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11557   { test "$extra_verbose" = "yes" && cat << EOF
11558     Defining $ac_tr_func
11559 EOF
11560 cat >> confdefs.h <<EOF
11561 #define $ac_tr_func 1
11562 EOF
11563 }
11564  
11565 else
11566   echo "$ac_t""no" 1>&6
11567 fi
11568 done
11569
11570
11571 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11572   case "$opsys" in
11573     hpux11* )
11574       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11575       ac_cv_func_getaddrinfo=no
11576       ;;
11577   esac
11578 fi
11579
11580
11581 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11582 do
11583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11584 echo "configure:11585: checking for $ac_func" >&5
11585
11586 cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589 /* System header to define __stub macros and hopefully few prototypes,
11590     which can conflict with char $ac_func(); below.  */
11591 #include <assert.h>
11592 /* Override any gcc2 internal prototype to avoid an error.  */
11593 /* We use char because int might match the return type of a gcc2
11594     builtin and then its argument prototype would still apply.  */
11595 char $ac_func();
11596
11597 int main() {
11598
11599 /* The GNU C library defines this for functions which it implements
11600     to always fail with ENOSYS.  Some functions are actually named
11601     something starting with __ and the normal name is an alias.  */
11602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11603 choke me
11604 #else
11605 $ac_func();
11606 #endif
11607
11608 ; return 0; }
11609 EOF
11610 if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11611   rm -rf conftest*
11612   eval "ac_cv_func_$ac_func=yes"
11613 else
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   eval "ac_cv_func_$ac_func=no"
11618 fi
11619 rm -f conftest*
11620
11621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11622   echo "$ac_t""yes" 1>&6
11623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11624   { test "$extra_verbose" = "yes" && cat << EOF
11625     Defining $ac_tr_func
11626 EOF
11627 cat >> confdefs.h <<EOF
11628 #define $ac_tr_func 1
11629 EOF
11630 }
11631  
11632 else
11633   echo "$ac_t""no" 1>&6
11634 fi
11635 done
11636
11637
11638 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11639 echo "configure:11640: checking for openpty" >&5
11640
11641 cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644 /* System header to define __stub macros and hopefully few prototypes,
11645     which can conflict with char openpty(); below.  */
11646 #include <assert.h>
11647 /* Override any gcc2 internal prototype to avoid an error.  */
11648 /* We use char because int might match the return type of a gcc2
11649     builtin and then its argument prototype would still apply.  */
11650 char openpty();
11651
11652 int main() {
11653
11654 /* The GNU C library defines this for functions which it implements
11655     to always fail with ENOSYS.  Some functions are actually named
11656     something starting with __ and the normal name is an alias.  */
11657 #if defined (__stub_openpty) || defined (__stub___openpty)
11658 choke me
11659 #else
11660 openpty();
11661 #endif
11662
11663 ; return 0; }
11664 EOF
11665 if { (eval echo configure:11666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11666   rm -rf conftest*
11667   eval "ac_cv_func_openpty=yes"
11668 else
11669   echo "configure: failed program was:" >&5
11670   cat conftest.$ac_ext >&5
11671   rm -rf conftest*
11672   eval "ac_cv_func_openpty=no"
11673 fi
11674 rm -f conftest*
11675
11676 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11677   echo "$ac_t""yes" 1>&6
11678   have_openpty=yes
11679 else
11680   echo "$ac_t""no" 1>&6
11681
11682   
11683 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11684 echo "configure:11685: checking for openpty in -lutil" >&5
11685 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11686
11687 xe_check_libs=" -lutil "
11688 cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691 /* Override any gcc2 internal prototype to avoid an error.  */
11692 /* We use char because int might match the return type of a gcc2
11693     builtin and then its argument prototype would still apply.  */
11694 char openpty();
11695
11696 int main() {
11697 openpty()
11698 ; return 0; }
11699 EOF
11700 if { (eval echo configure:11701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11701   rm -rf conftest*
11702   eval "ac_cv_lib_$ac_lib_var=yes"
11703 else
11704   echo "configure: failed program was:" >&5
11705   cat conftest.$ac_ext >&5
11706   rm -rf conftest*
11707   eval "ac_cv_lib_$ac_lib_var=no"
11708 fi
11709 rm -f conftest*
11710 xe_check_libs=""
11711
11712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11713   echo "$ac_t""yes" 1>&6
11714   have_openpty=yes need_libutil=yes
11715 else
11716   echo "$ac_t""no" 1>&6
11717 fi
11718
11719
11720 fi
11721
11722 if test "$have_openpty" = "yes"; then
11723   { test "$extra_verbose" = "yes" && cat << \EOF
11724     Defining HAVE_OPENPTY
11725 EOF
11726 cat >> confdefs.h <<\EOF
11727 #define HAVE_OPENPTY 1
11728 EOF
11729 }
11730
11731   for ac_hdr in pty.h libutil.h util.h
11732 do
11733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11735 echo "configure:11736: checking for $ac_hdr" >&5
11736
11737 cat > conftest.$ac_ext <<EOF
11738 #line 11739 "configure"
11739 #include "confdefs.h"
11740 #include <$ac_hdr>
11741 EOF
11742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11743 { (eval echo configure:11744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11745 if test -z "$ac_err"; then
11746   rm -rf conftest*
11747   eval "ac_cv_header_$ac_safe=yes"
11748 else
11749   echo "$ac_err" >&5
11750   echo "configure: failed program was:" >&5
11751   cat conftest.$ac_ext >&5
11752   rm -rf conftest*
11753   eval "ac_cv_header_$ac_safe=no"
11754 fi
11755 rm -f conftest*
11756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11757   echo "$ac_t""yes" 1>&6
11758     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11759   { test "$extra_verbose" = "yes" && cat << EOF
11760     Defining $ac_tr_hdr
11761 EOF
11762 cat >> confdefs.h <<EOF
11763 #define $ac_tr_hdr 1
11764 EOF
11765 }
11766  break
11767 else
11768   echo "$ac_t""no" 1>&6
11769 fi
11770 done
11771
11772   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11773 fi
11774
11775 for ac_hdr in stropts.h
11776 do
11777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11779 echo "configure:11780: checking for $ac_hdr" >&5
11780
11781 cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784 #include <$ac_hdr>
11785 EOF
11786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11787 { (eval echo configure:11788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11789 if test -z "$ac_err"; then
11790   rm -rf conftest*
11791   eval "ac_cv_header_$ac_safe=yes"
11792 else
11793   echo "$ac_err" >&5
11794   echo "configure: failed program was:" >&5
11795   cat conftest.$ac_ext >&5
11796   rm -rf conftest*
11797   eval "ac_cv_header_$ac_safe=no"
11798 fi
11799 rm -f conftest*
11800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11801   echo "$ac_t""yes" 1>&6
11802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11803   { test "$extra_verbose" = "yes" && cat << EOF
11804     Defining $ac_tr_hdr
11805 EOF
11806 cat >> confdefs.h <<EOF
11807 #define $ac_tr_hdr 1
11808 EOF
11809 }
11810  
11811 else
11812   echo "$ac_t""no" 1>&6
11813 fi
11814 done
11815
11816 if test "$ac_cv_header_stropts_h" = "yes"; then
11817   for ac_func in isastream
11818 do
11819 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11820 echo "configure:11821: checking for $ac_func" >&5
11821
11822 cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825 /* System header to define __stub macros and hopefully few prototypes,
11826     which can conflict with char $ac_func(); below.  */
11827 #include <assert.h>
11828 /* Override any gcc2 internal prototype to avoid an error.  */
11829 /* We use char because int might match the return type of a gcc2
11830     builtin and then its argument prototype would still apply.  */
11831 char $ac_func();
11832
11833 int main() {
11834
11835 /* The GNU C library defines this for functions which it implements
11836     to always fail with ENOSYS.  Some functions are actually named
11837     something starting with __ and the normal name is an alias.  */
11838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11839 choke me
11840 #else
11841 $ac_func();
11842 #endif
11843
11844 ; return 0; }
11845 EOF
11846 if { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11847   rm -rf conftest*
11848   eval "ac_cv_func_$ac_func=yes"
11849 else
11850   echo "configure: failed program was:" >&5
11851   cat conftest.$ac_ext >&5
11852   rm -rf conftest*
11853   eval "ac_cv_func_$ac_func=no"
11854 fi
11855 rm -f conftest*
11856
11857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11858   echo "$ac_t""yes" 1>&6
11859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11860   { test "$extra_verbose" = "yes" && cat << EOF
11861     Defining $ac_tr_func
11862 EOF
11863 cat >> confdefs.h <<EOF
11864 #define $ac_tr_func 1
11865 EOF
11866 }
11867  
11868 else
11869   echo "$ac_t""no" 1>&6
11870 fi
11871 done
11872
11873   for ac_hdr in strtio.h
11874 do
11875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11877 echo "configure:11878: checking for $ac_hdr" >&5
11878
11879 cat > conftest.$ac_ext <<EOF
11880 #line 11881 "configure"
11881 #include "confdefs.h"
11882 #include <$ac_hdr>
11883 EOF
11884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11885 { (eval echo configure:11886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11887 if test -z "$ac_err"; then
11888   rm -rf conftest*
11889   eval "ac_cv_header_$ac_safe=yes"
11890 else
11891   echo "$ac_err" >&5
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -rf conftest*
11895   eval "ac_cv_header_$ac_safe=no"
11896 fi
11897 rm -f conftest*
11898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11899   echo "$ac_t""yes" 1>&6
11900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11901   { test "$extra_verbose" = "yes" && cat << EOF
11902     Defining $ac_tr_hdr
11903 EOF
11904 cat >> confdefs.h <<EOF
11905 #define $ac_tr_hdr 1
11906 EOF
11907 }
11908  
11909 else
11910   echo "$ac_t""no" 1>&6
11911 fi
11912 done
11913  fi
11914
11915 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11916    echo "    xemacs will be linked with \"realpath.o\""
11917  fi
11918
11919 for ac_func in getloadavg
11920 do
11921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11922 echo "configure:11923: checking for $ac_func" >&5
11923
11924 cat > conftest.$ac_ext <<EOF
11925 #line 11926 "configure"
11926 #include "confdefs.h"
11927 /* System header to define __stub macros and hopefully few prototypes,
11928     which can conflict with char $ac_func(); below.  */
11929 #include <assert.h>
11930 /* Override any gcc2 internal prototype to avoid an error.  */
11931 /* We use char because int might match the return type of a gcc2
11932     builtin and then its argument prototype would still apply.  */
11933 char $ac_func();
11934
11935 int main() {
11936
11937 /* The GNU C library defines this for functions which it implements
11938     to always fail with ENOSYS.  Some functions are actually named
11939     something starting with __ and the normal name is an alias.  */
11940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11941 choke me
11942 #else
11943 $ac_func();
11944 #endif
11945
11946 ; return 0; }
11947 EOF
11948 if { (eval echo configure:11949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11949   rm -rf conftest*
11950   eval "ac_cv_func_$ac_func=yes"
11951 else
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -rf conftest*
11955   eval "ac_cv_func_$ac_func=no"
11956 fi
11957 rm -f conftest*
11958
11959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11960   echo "$ac_t""yes" 1>&6
11961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11962   { test "$extra_verbose" = "yes" && cat << EOF
11963     Defining $ac_tr_func
11964 EOF
11965 cat >> confdefs.h <<EOF
11966 #define $ac_tr_func 1
11967 EOF
11968 }
11969  
11970 else
11971   echo "$ac_t""no" 1>&6
11972 fi
11973 done
11974
11975
11976 if test "$ac_cv_func_getloadavg" = "yes"; then
11977         for ac_hdr in sys/loadavg.h
11978 do
11979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11981 echo "configure:11982: checking for $ac_hdr" >&5
11982
11983 cat > conftest.$ac_ext <<EOF
11984 #line 11985 "configure"
11985 #include "confdefs.h"
11986 #include <$ac_hdr>
11987 EOF
11988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11989 { (eval echo configure:11990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11991 if test -z "$ac_err"; then
11992   rm -rf conftest*
11993   eval "ac_cv_header_$ac_safe=yes"
11994 else
11995   echo "$ac_err" >&5
11996   echo "configure: failed program was:" >&5
11997   cat conftest.$ac_ext >&5
11998   rm -rf conftest*
11999   eval "ac_cv_header_$ac_safe=no"
12000 fi
12001 rm -f conftest*
12002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12003   echo "$ac_t""yes" 1>&6
12004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12005   { test "$extra_verbose" = "yes" && cat << EOF
12006     Defining $ac_tr_hdr
12007 EOF
12008 cat >> confdefs.h <<EOF
12009 #define $ac_tr_hdr 1
12010 EOF
12011 }
12012  
12013 else
12014   echo "$ac_t""no" 1>&6
12015 fi
12016 done
12017
12018 else
12019     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
12020    echo "    xemacs will be linked with \"getloadavg.o\""
12021  fi
12022
12023     
12024 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
12025 echo "configure:12026: checking for kstat_open in -lkstat" >&5
12026 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
12027
12028 xe_check_libs=" -lkstat "
12029 cat > conftest.$ac_ext <<EOF
12030 #line 12031 "configure"
12031 #include "confdefs.h"
12032 /* Override any gcc2 internal prototype to avoid an error.  */
12033 /* We use char because int might match the return type of a gcc2
12034     builtin and then its argument prototype would still apply.  */
12035 char kstat_open();
12036
12037 int main() {
12038 kstat_open()
12039 ; return 0; }
12040 EOF
12041 if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12042   rm -rf conftest*
12043   eval "ac_cv_lib_$ac_lib_var=yes"
12044 else
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -rf conftest*
12048   eval "ac_cv_lib_$ac_lib_var=no"
12049 fi
12050 rm -f conftest*
12051 xe_check_libs=""
12052
12053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12054   echo "$ac_t""yes" 1>&6
12055     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12056     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12057   { test "$extra_verbose" = "yes" && cat << EOF
12058     Defining $ac_tr_lib
12059 EOF
12060 cat >> confdefs.h <<EOF
12061 #define $ac_tr_lib 1
12062 EOF
12063 }
12064
12065   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
12066
12067 else
12068   echo "$ac_t""no" 1>&6
12069 fi
12070
12071
12072   for ac_hdr in kstat.h
12073 do
12074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12076 echo "configure:12077: checking for $ac_hdr" >&5
12077
12078 cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 #include <$ac_hdr>
12082 EOF
12083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12084 { (eval echo configure:12085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12086 if test -z "$ac_err"; then
12087   rm -rf conftest*
12088   eval "ac_cv_header_$ac_safe=yes"
12089 else
12090   echo "$ac_err" >&5
12091   echo "configure: failed program was:" >&5
12092   cat conftest.$ac_ext >&5
12093   rm -rf conftest*
12094   eval "ac_cv_header_$ac_safe=no"
12095 fi
12096 rm -f conftest*
12097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12098   echo "$ac_t""yes" 1>&6
12099     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12100   { test "$extra_verbose" = "yes" && cat << EOF
12101     Defining $ac_tr_hdr
12102 EOF
12103 cat >> confdefs.h <<EOF
12104 #define $ac_tr_hdr 1
12105 EOF
12106 }
12107  
12108 else
12109   echo "$ac_t""no" 1>&6
12110 fi
12111 done
12112
12113
12114     
12115 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
12116 echo "configure:12117: checking for kvm_read in -lkvm" >&5
12117 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
12118
12119 xe_check_libs=" -lkvm "
12120 cat > conftest.$ac_ext <<EOF
12121 #line 12122 "configure"
12122 #include "confdefs.h"
12123 /* Override any gcc2 internal prototype to avoid an error.  */
12124 /* We use char because int might match the return type of a gcc2
12125     builtin and then its argument prototype would still apply.  */
12126 char kvm_read();
12127
12128 int main() {
12129 kvm_read()
12130 ; return 0; }
12131 EOF
12132 if { (eval echo configure:12133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12133   rm -rf conftest*
12134   eval "ac_cv_lib_$ac_lib_var=yes"
12135 else
12136   echo "configure: failed program was:" >&5
12137   cat conftest.$ac_ext >&5
12138   rm -rf conftest*
12139   eval "ac_cv_lib_$ac_lib_var=no"
12140 fi
12141 rm -f conftest*
12142 xe_check_libs=""
12143
12144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12145   echo "$ac_t""yes" 1>&6
12146     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12147     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12148   { test "$extra_verbose" = "yes" && cat << EOF
12149     Defining $ac_tr_lib
12150 EOF
12151 cat >> confdefs.h <<EOF
12152 #define $ac_tr_lib 1
12153 EOF
12154 }
12155
12156   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
12157
12158 else
12159   echo "$ac_t""no" 1>&6
12160 fi
12161
12162
12163 fi
12164
12165 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
12166 echo "configure:12167: checking whether netdb declares h_errno" >&5
12167 cat > conftest.$ac_ext <<EOF
12168 #line 12169 "configure"
12169 #include "confdefs.h"
12170 #include <netdb.h>
12171 int main() {
12172 return h_errno;
12173 ; return 0; }
12174 EOF
12175 if { (eval echo configure:12176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12176   rm -rf conftest*
12177   echo "$ac_t""yes" 1>&6
12178    { test "$extra_verbose" = "yes" && cat << \EOF
12179     Defining HAVE_H_ERRNO
12180 EOF
12181 cat >> confdefs.h <<\EOF
12182 #define HAVE_H_ERRNO 1
12183 EOF
12184 }
12185
12186 else
12187   echo "configure: failed program was:" >&5
12188   cat conftest.$ac_ext >&5
12189   rm -rf conftest*
12190   echo "$ac_t""no" 1>&6
12191 fi
12192 rm -f conftest*
12193
12194 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
12195 echo "configure:12196: checking for sigsetjmp" >&5
12196 cat > conftest.$ac_ext <<EOF
12197 #line 12198 "configure"
12198 #include "confdefs.h"
12199 #include <setjmp.h>
12200 int main() {
12201 sigjmp_buf bar; sigsetjmp (bar, 0);
12202 ; return 0; }
12203 EOF
12204 if { (eval echo configure:12205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12205   rm -rf conftest*
12206   echo "$ac_t""yes" 1>&6
12207    { test "$extra_verbose" = "yes" && cat << \EOF
12208     Defining HAVE_SIGSETJMP
12209 EOF
12210 cat >> confdefs.h <<\EOF
12211 #define HAVE_SIGSETJMP 1
12212 EOF
12213 }
12214
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -rf conftest*
12219   echo "$ac_t""no" 1>&6
12220 fi
12221 rm -f conftest*
12222
12223 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
12224 echo "configure:12225: checking whether localtime caches TZ" >&5
12225
12226 if test "$ac_cv_func_tzset" = "yes"; then
12227 cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 #include <time.h>
12231 #if STDC_HEADERS
12232 # include <stdlib.h>
12233 #endif
12234 extern char **environ;
12235 unset_TZ ()
12236 {
12237   char **from, **to;
12238   for (to = from = environ; (*to = *from); from++)
12239     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
12240       to++;
12241 }
12242 char TZ_GMT0[] = "TZ=GMT0";
12243 char TZ_PST8[] = "TZ=PST8";
12244 main()
12245 {
12246   time_t now = time ((time_t *) 0);
12247   int hour_GMT0, hour_unset;
12248   if (putenv (TZ_GMT0) != 0)
12249     exit (1);
12250   hour_GMT0 = localtime (&now)->tm_hour;
12251   unset_TZ ();
12252   hour_unset = localtime (&now)->tm_hour;
12253   if (putenv (TZ_PST8) != 0)
12254     exit (1);
12255   if (localtime (&now)->tm_hour == hour_GMT0)
12256     exit (1);
12257   unset_TZ ();
12258   if (localtime (&now)->tm_hour != hour_unset)
12259     exit (1);
12260   exit (0);
12261 }
12262 EOF
12263 if { (eval echo configure:12264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12264 then
12265   emacs_cv_localtime_cache=no
12266 else
12267   conftest_rc="$?"
12268   echo "configure: failed program was:" >&5
12269   cat conftest.$ac_ext >&5
12270   rm -fr conftest*
12271   emacs_cv_localtime_cache=yes
12272 fi
12273 rm -fr conftest*
12274 else
12275         # If we lack tzset, report that localtime does not cache TZ,
12276         # since we can't invalidate the cache if we don't have tzset.
12277         emacs_cv_localtime_cache=no
12278 fi
12279 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
12280 if test $emacs_cv_localtime_cache = yes; then
12281   { test "$extra_verbose" = "yes" && cat << \EOF
12282     Defining LOCALTIME_CACHE
12283 EOF
12284 cat >> confdefs.h <<\EOF
12285 #define LOCALTIME_CACHE 1
12286 EOF
12287 }
12288
12289 fi
12290
12291 if test "$HAVE_TIMEVAL" = "yes"; then
12292 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
12293 echo "configure:12294: checking whether gettimeofday accepts one or two arguments" >&5
12294 cat > conftest.$ac_ext <<EOF
12295 #line 12296 "configure"
12296 #include "confdefs.h"
12297
12298 #ifdef TIME_WITH_SYS_TIME
12299 #include <sys/time.h>
12300 #include <time.h>
12301 #else
12302 #ifdef HAVE_SYS_TIME_H
12303 #include <sys/time.h>
12304 #else
12305 #include <time.h>
12306 #endif
12307 #endif
12308   
12309 int main() {
12310
12311   struct timeval time;
12312   gettimeofday (&time, 0);
12313
12314 ; return 0; }
12315 EOF
12316 if { (eval echo configure:12317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12317   rm -rf conftest*
12318   echo "$ac_t""two" 1>&6
12319 else
12320   echo "configure: failed program was:" >&5
12321   cat conftest.$ac_ext >&5
12322   rm -rf conftest*
12323   echo "$ac_t""one" 1>&6
12324    { test "$extra_verbose" = "yes" && cat << \EOF
12325     Defining GETTIMEOFDAY_ONE_ARGUMENT
12326 EOF
12327 cat >> confdefs.h <<\EOF
12328 #define GETTIMEOFDAY_ONE_ARGUMENT 1
12329 EOF
12330 }
12331
12332 fi
12333 rm -f conftest*
12334 fi
12335
12336
12337 echo $ac_n "checking for inline""... $ac_c" 1>&6
12338 echo "configure:12339: checking for inline" >&5
12339
12340 ac_cv_c_inline=no
12341 for ac_kw in inline __inline__ __inline; do
12342   cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345
12346 int main() {
12347 } $ac_kw foo() {
12348 ; return 0; }
12349 EOF
12350 if { (eval echo configure:12351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12351   rm -rf conftest*
12352   ac_cv_c_inline=$ac_kw; break
12353 else
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356 fi
12357 rm -f conftest*
12358 done
12359
12360
12361 echo "$ac_t""$ac_cv_c_inline" 1>&6
12362 case "$ac_cv_c_inline" in
12363   inline | yes) ;;
12364   no) { test "$extra_verbose" = "yes" && cat << \EOF
12365     Defining inline = 
12366 EOF
12367 cat >> confdefs.h <<\EOF
12368 #define inline 
12369 EOF
12370 }
12371  ;;
12372   *)  { test "$extra_verbose" = "yes" && cat << EOF
12373     Defining inline = $ac_cv_c_inline
12374 EOF
12375 cat >> confdefs.h <<EOF
12376 #define inline $ac_cv_c_inline
12377 EOF
12378 }
12379  ;;
12380 esac
12381
12382 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12383    echo "    xemacs will be linked with \"inline.o\""
12384  fi
12385
12386
12387 if test "$__DECC" != "yes"; then
12388   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12389 # for constant arguments.  Useless!
12390 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12391 echo "configure:12392: checking for working alloca.h" >&5
12392
12393 cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 #include <alloca.h>
12397 int main() {
12398 char *p = alloca(2 * sizeof(int));
12399 ; return 0; }
12400 EOF
12401 if { (eval echo configure:12402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12402   rm -rf conftest*
12403   ac_cv_header_alloca_h=yes
12404 else
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -rf conftest*
12408   ac_cv_header_alloca_h=no
12409 fi
12410 rm -f conftest*
12411
12412 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12413 if test $ac_cv_header_alloca_h = yes; then
12414   { test "$extra_verbose" = "yes" && cat << \EOF
12415     Defining HAVE_ALLOCA_H
12416 EOF
12417 cat >> confdefs.h <<\EOF
12418 #define HAVE_ALLOCA_H 1
12419 EOF
12420 }
12421
12422 fi
12423
12424 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12425 echo "configure:12426: checking for alloca" >&5
12426
12427 cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430
12431 #ifdef __GNUC__
12432 # define alloca __builtin_alloca
12433 #else
12434 # ifdef _MSC_VER
12435 #  include <malloc.h>
12436 #  define alloca _alloca
12437 # else
12438 #  if HAVE_ALLOCA_H
12439 #   include <alloca.h>
12440 #  else
12441 #   ifdef _AIX
12442  #pragma alloca
12443 #   else
12444 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12445 char *alloca ();
12446 #    endif
12447 #   endif
12448 #  endif
12449 # endif
12450 #endif
12451
12452 int main() {
12453 char *p = (char *) alloca(1);
12454 ; return 0; }
12455 EOF
12456 if { (eval echo configure:12457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12457   rm -rf conftest*
12458   ac_cv_func_alloca_works=yes
12459 else
12460   echo "configure: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   rm -rf conftest*
12463   ac_cv_func_alloca_works=no
12464 fi
12465 rm -f conftest*
12466
12467 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12468 if test $ac_cv_func_alloca_works = yes; then
12469   { test "$extra_verbose" = "yes" && cat << \EOF
12470     Defining HAVE_ALLOCA
12471 EOF
12472 cat >> confdefs.h <<\EOF
12473 #define HAVE_ALLOCA 1
12474 EOF
12475 }
12476
12477 fi
12478
12479 if test $ac_cv_func_alloca_works = no; then
12480   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12481   # that cause trouble.  Some versions do not even contain alloca or
12482   # contain a buggy version.  If you still want to use their alloca,
12483   # use ar to extract alloca.o from them instead of compiling alloca.c.
12484   ALLOCA=alloca.${ac_objext}
12485   { test "$extra_verbose" = "yes" && cat << \EOF
12486     Defining C_ALLOCA
12487 EOF
12488 cat >> confdefs.h <<\EOF
12489 #define C_ALLOCA 1
12490 EOF
12491 }
12492
12493
12494 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12495 echo "configure:12496: checking whether alloca needs Cray hooks" >&5
12496
12497 cat > conftest.$ac_ext <<EOF
12498 #line 12499 "configure"
12499 #include "confdefs.h"
12500 #if defined(CRAY) && ! defined(CRAY2)
12501 webecray
12502 #else
12503 wenotbecray
12504 #endif
12505
12506 EOF
12507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12508   egrep "webecray" >/dev/null 2>&1; then
12509   rm -rf conftest*
12510   ac_cv_os_cray=yes
12511 else
12512   rm -rf conftest*
12513   ac_cv_os_cray=no
12514 fi
12515 rm -f conftest*
12516
12517
12518 echo "$ac_t""$ac_cv_os_cray" 1>&6
12519 if test $ac_cv_os_cray = yes; then
12520 for ac_func in _getb67 GETB67 getb67; do
12521   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12522 echo "configure:12523: checking for $ac_func" >&5
12523
12524 cat > conftest.$ac_ext <<EOF
12525 #line 12526 "configure"
12526 #include "confdefs.h"
12527 /* System header to define __stub macros and hopefully few prototypes,
12528     which can conflict with char $ac_func(); below.  */
12529 #include <assert.h>
12530 /* Override any gcc2 internal prototype to avoid an error.  */
12531 /* We use char because int might match the return type of a gcc2
12532     builtin and then its argument prototype would still apply.  */
12533 char $ac_func();
12534
12535 int main() {
12536
12537 /* The GNU C library defines this for functions which it implements
12538     to always fail with ENOSYS.  Some functions are actually named
12539     something starting with __ and the normal name is an alias.  */
12540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12541 choke me
12542 #else
12543 $ac_func();
12544 #endif
12545
12546 ; return 0; }
12547 EOF
12548 if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12549   rm -rf conftest*
12550   eval "ac_cv_func_$ac_func=yes"
12551 else
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_func_$ac_func=no"
12556 fi
12557 rm -f conftest*
12558
12559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12560   echo "$ac_t""yes" 1>&6
12561   { test "$extra_verbose" = "yes" && cat << EOF
12562     Defining CRAY_STACKSEG_END = $ac_func
12563 EOF
12564 cat >> confdefs.h <<EOF
12565 #define CRAY_STACKSEG_END $ac_func
12566 EOF
12567 }
12568
12569   break
12570 else
12571   echo "$ac_t""no" 1>&6
12572 fi
12573
12574 done
12575 fi
12576
12577 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12578 echo "configure:12579: checking stack direction for C alloca" >&5
12579
12580 cat > conftest.$ac_ext <<EOF
12581 #line 12582 "configure"
12582 #include "confdefs.h"
12583 find_stack_direction ()
12584 {
12585   static char *addr = 0;
12586   auto char dummy;
12587   if (addr == 0)
12588     {
12589       addr = &dummy;
12590       return find_stack_direction ();
12591     }
12592   else
12593     return (&dummy > addr) ? 1 : -1;
12594 }
12595 main ()
12596 {
12597   exit (find_stack_direction() < 0);
12598 }
12599 EOF
12600 if { (eval echo configure:12601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12601 then
12602   ac_cv_c_stack_direction=1
12603 else
12604   conftest_rc="$?"
12605   echo "configure: failed program was:" >&5
12606   cat conftest.$ac_ext >&5
12607   rm -fr conftest*
12608   ac_cv_c_stack_direction=-1
12609 fi
12610 rm -fr conftest*
12611
12612 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12613 { test "$extra_verbose" = "yes" && cat << EOF
12614     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12615 EOF
12616 cat >> confdefs.h <<EOF
12617 #define STACK_DIRECTION $ac_cv_c_stack_direction
12618 EOF
12619 }
12620
12621 fi
12622
12623   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12624    echo "    xemacs will be linked with \"$ALLOCA\""
12625  fi
12626 fi
12627
12628 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12629 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12630 echo "configure:12631: checking for vfork.h" >&5
12631
12632 cat > conftest.$ac_ext <<EOF
12633 #line 12634 "configure"
12634 #include "confdefs.h"
12635 #include <vfork.h>
12636 EOF
12637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12638 { (eval echo configure:12639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12640 if test -z "$ac_err"; then
12641   rm -rf conftest*
12642   eval "ac_cv_header_$ac_safe=yes"
12643 else
12644   echo "$ac_err" >&5
12645   echo "configure: failed program was:" >&5
12646   cat conftest.$ac_ext >&5
12647   rm -rf conftest*
12648   eval "ac_cv_header_$ac_safe=no"
12649 fi
12650 rm -f conftest*
12651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12652   echo "$ac_t""yes" 1>&6
12653   { test "$extra_verbose" = "yes" && cat << \EOF
12654     Defining HAVE_VFORK_H
12655 EOF
12656 cat >> confdefs.h <<\EOF
12657 #define HAVE_VFORK_H 1
12658 EOF
12659 }
12660
12661 else
12662   echo "$ac_t""no" 1>&6
12663 fi
12664
12665 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12666 echo "configure:12667: checking for working vfork" >&5
12667
12668 cat > conftest.$ac_ext <<EOF
12669 #line 12670 "configure"
12670 #include "confdefs.h"
12671 /* Thanks to Paul Eggert for this test.  */
12672 #include <stdio.h>
12673 #include <sys/types.h>
12674 #include <sys/stat.h>
12675 #ifdef HAVE_UNISTD_H
12676 #include <unistd.h>
12677 #endif
12678 #ifdef HAVE_VFORK_H
12679 #include <vfork.h>
12680 #endif
12681 /* On some sparc systems, changes by the child to local and incoming
12682    argument registers are propagated back to the parent.
12683    The compiler is told about this with #include <vfork.h>,
12684    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12685    Test for this by using a static variable whose address
12686    is put into a register that is clobbered by the vfork.  */
12687 static
12688 #ifdef __cplusplus
12689 sparc_address_test (int arg)
12690 #else
12691 sparc_address_test (arg) int arg;
12692 #endif
12693 {
12694   static pid_t child;
12695   if (!child) {
12696     child = vfork ();
12697     if (child < 0) {
12698       perror ("vfork");
12699       _exit(2);
12700     }
12701     if (!child) {
12702       arg = getpid();
12703       write(-1, "", 0);
12704       _exit (arg);
12705     }
12706   }
12707 }
12708 main() {
12709   pid_t parent = getpid ();
12710   pid_t child;
12711
12712   sparc_address_test ();
12713
12714   child = vfork ();
12715
12716   if (child == 0) {
12717     /* Here is another test for sparc vfork register problems.
12718        This test uses lots of local variables, at least
12719        as many local variables as main has allocated so far
12720        including compiler temporaries.  4 locals are enough for
12721        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12722        A buggy compiler should reuse the register of parent
12723        for one of the local variables, since it will think that
12724        parent can't possibly be used any more in this routine.
12725        Assigning to the local variable will thus munge parent
12726        in the parent process.  */
12727     pid_t
12728       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12729       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12730     /* Convince the compiler that p..p7 are live; otherwise, it might
12731        use the same hardware register for all 8 local variables.  */
12732     if (p != p1 || p != p2 || p != p3 || p != p4
12733         || p != p5 || p != p6 || p != p7)
12734       _exit(1);
12735
12736     /* On some systems (e.g. IRIX 3.3),
12737        vfork doesn't separate parent from child file descriptors.
12738        If the child closes a descriptor before it execs or exits,
12739        this munges the parent's descriptor as well.
12740        Test for this by closing stdout in the child.  */
12741     _exit(close(fileno(stdout)) != 0);
12742   } else {
12743     int status;
12744     struct stat st;
12745
12746     while (wait(&status) != child)
12747       ;
12748     exit(
12749          /* Was there some problem with vforking?  */
12750          child < 0
12751
12752          /* Did the child fail?  (This shouldn't happen.)  */
12753          || status
12754
12755          /* Did the vfork/compiler bug occur?  */
12756          || parent != getpid()
12757
12758          /* Did the file descriptor bug occur?  */
12759          || fstat(fileno(stdout), &st) != 0
12760          );
12761   }
12762 }
12763 EOF
12764 if { (eval echo configure:12765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12765 then
12766   ac_cv_func_vfork_works=yes
12767 else
12768   conftest_rc="$?"
12769   echo "configure: failed program was:" >&5
12770   cat conftest.$ac_ext >&5
12771   rm -fr conftest*
12772   ac_cv_func_vfork_works=no
12773 fi
12774 rm -fr conftest*
12775
12776 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12777 if test $ac_cv_func_vfork_works = no; then
12778   { test "$extra_verbose" = "yes" && cat << \EOF
12779     Defining vfork = fork
12780 EOF
12781 cat >> confdefs.h <<\EOF
12782 #define vfork fork
12783 EOF
12784 }
12785
12786 fi
12787
12788
12789 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12790 echo "configure:12791: checking for working strcoll" >&5
12791
12792 cat > conftest.$ac_ext <<EOF
12793 #line 12794 "configure"
12794 #include "confdefs.h"
12795 #include <string.h>
12796 main ()
12797 {
12798   exit (strcoll ("abc", "def") >= 0 ||
12799         strcoll ("ABC", "DEF") >= 0 ||
12800         strcoll ("123", "456") >= 0);
12801 }
12802 EOF
12803 if { (eval echo configure:12804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12804 then
12805   ac_cv_func_strcoll_works=yes
12806 else
12807   conftest_rc="$?"
12808   echo "configure: failed program was:" >&5
12809   cat conftest.$ac_ext >&5
12810   rm -fr conftest*
12811   ac_cv_func_strcoll_works=no
12812 fi
12813 rm -fr conftest*
12814
12815 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12816 if test $ac_cv_func_strcoll_works = yes; then
12817   { test "$extra_verbose" = "yes" && cat << \EOF
12818     Defining HAVE_STRCOLL
12819 EOF
12820 cat >> confdefs.h <<\EOF
12821 #define HAVE_STRCOLL 1
12822 EOF
12823 }
12824
12825 fi
12826
12827
12828 for ac_func in getpgrp
12829 do
12830 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12831 echo "configure:12832: checking for $ac_func" >&5
12832
12833 cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 /* System header to define __stub macros and hopefully few prototypes,
12837     which can conflict with char $ac_func(); below.  */
12838 #include <assert.h>
12839 /* Override any gcc2 internal prototype to avoid an error.  */
12840 /* We use char because int might match the return type of a gcc2
12841     builtin and then its argument prototype would still apply.  */
12842 char $ac_func();
12843
12844 int main() {
12845
12846 /* The GNU C library defines this for functions which it implements
12847     to always fail with ENOSYS.  Some functions are actually named
12848     something starting with __ and the normal name is an alias.  */
12849 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12850 choke me
12851 #else
12852 $ac_func();
12853 #endif
12854
12855 ; return 0; }
12856 EOF
12857 if { (eval echo configure:12858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12858   rm -rf conftest*
12859   eval "ac_cv_func_$ac_func=yes"
12860 else
12861   echo "configure: failed program was:" >&5
12862   cat conftest.$ac_ext >&5
12863   rm -rf conftest*
12864   eval "ac_cv_func_$ac_func=no"
12865 fi
12866 rm -f conftest*
12867
12868 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12869   echo "$ac_t""yes" 1>&6
12870     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12871   { test "$extra_verbose" = "yes" && cat << EOF
12872     Defining $ac_tr_func
12873 EOF
12874 cat >> confdefs.h <<EOF
12875 #define $ac_tr_func 1
12876 EOF
12877 }
12878  
12879 else
12880   echo "$ac_t""no" 1>&6
12881 fi
12882 done
12883
12884 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12885 echo "configure:12886: checking whether getpgrp takes no argument" >&5
12886
12887 cat > conftest.$ac_ext <<EOF
12888 #line 12889 "configure"
12889 #include "confdefs.h"
12890
12891 /*
12892  * If this system has a BSD-style getpgrp(),
12893  * which takes a pid argument, exit unsuccessfully.
12894  *
12895  * Snarfed from Chet Ramey's bash pgrp.c test program
12896  */
12897 #include <stdio.h>
12898 #include <sys/types.h>
12899
12900 int     pid;
12901 int     pg1, pg2, pg3, pg4;
12902 int     ng, np, s, child;
12903
12904 main()
12905 {
12906         pid = getpid();
12907         pg1 = getpgrp(0);
12908         pg2 = getpgrp();
12909         pg3 = getpgrp(pid);
12910         pg4 = getpgrp(1);
12911
12912         /*
12913          * If all of these values are the same, it's pretty sure that
12914          * we're on a system that ignores getpgrp's first argument.
12915          */
12916         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12917                 exit(0);
12918
12919         child = fork();
12920         if (child < 0)
12921                 exit(1);
12922         else if (child == 0) {
12923                 np = getpid();
12924                 /*
12925                  * If this is Sys V, this will not work; pgrp will be
12926                  * set to np because setpgrp just changes a pgrp to be
12927                  * the same as the pid.
12928                  */
12929                 setpgrp(np, pg1);
12930                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12931                 if (ng == pg1) {
12932                         exit(1);
12933                 } else {
12934                         exit(0);
12935                 }
12936         } else {
12937                 wait(&s);
12938                 exit(s>>8);
12939         }
12940 }
12941
12942 EOF
12943 if { (eval echo configure:12944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12944 then
12945   ac_cv_func_getpgrp_void=yes
12946 else
12947   conftest_rc="$?"
12948   echo "configure: failed program was:" >&5
12949   cat conftest.$ac_ext >&5
12950   rm -fr conftest*
12951   ac_cv_func_getpgrp_void=no
12952 fi
12953 rm -fr conftest*
12954
12955
12956 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12957 if test $ac_cv_func_getpgrp_void = yes; then
12958   { test "$extra_verbose" = "yes" && cat << \EOF
12959     Defining GETPGRP_VOID
12960 EOF
12961 cat >> confdefs.h <<\EOF
12962 #define GETPGRP_VOID 1
12963 EOF
12964 }
12965
12966 fi
12967
12968
12969 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12970 echo "configure:12971: checking for working mmap" >&5
12971 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12972 cat > conftest.$ac_ext <<EOF
12973 #line 12974 "configure"
12974 #include "confdefs.h"
12975 #include <stdio.h>
12976 #include <unistd.h>
12977 #include <fcntl.h>
12978 #include <sys/mman.h>
12979
12980 #ifndef MAP_VARIABLE
12981 #define MAP_VARIABLE 0
12982 #endif
12983
12984 #ifndef MAP_FAILED
12985 #define MAP_FAILED -1
12986 #endif
12987
12988 int main (int argc, char *argv[])
12989 {
12990   int fd = -1;
12991   caddr_t p;
12992 #ifndef MAP_ANONYMOUS
12993   fd = open ("/dev/zero", O_RDWR);
12994   if (fd < 0)
12995     return 1;
12996 #define MAP_ANONYMOUS 0
12997 #endif
12998   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12999            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
13000            fd, 0) != (void *) MAP_FAILED)
13001     return 0;
13002   perror ("conftest: mmap failed");
13003   return 1;
13004 }
13005 EOF
13006 if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13007 then
13008   have_mmap=yes
13009 else
13010   conftest_rc="$?"
13011   echo "configure: failed program was:" >&5
13012   cat conftest.$ac_ext >&5
13013   rm -fr conftest*
13014   have_mmap=no
13015 fi
13016 rm -fr conftest* ;;
13017 esac
13018 echo "$ac_t""$have_mmap" 1>&6
13019 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13020     Defining HAVE_MMAP
13021 EOF
13022 cat >> confdefs.h <<\EOF
13023 #define HAVE_MMAP 1
13024 EOF
13025 }
13026
13027
13028 case "$opsys" in cygwin*) 
13029         test "$rel_alloc" = "default" && rel_alloc=no ;;
13030 esac
13031 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
13032 if test "$rel_alloc $have_mmap" = "default yes"; then
13033   if test "$doug_lea_malloc" = "yes"; then
13034         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
13035 echo "configure:13036: checking for M_MMAP_THRESHOLD" >&5
13036     cat > conftest.$ac_ext <<EOF
13037 #line 13038 "configure"
13038 #include "confdefs.h"
13039 #include <malloc.h>
13040 int main() {
13041
13042 #ifndef M_MMAP_THRESHOLD
13043 #error No M_MMAP_THRESHOLD :-(
13044 !@+$%^&*_)(_ - unlikely to compile...
13045 #endif
13046
13047 ; return 0; }
13048 EOF
13049 if { (eval echo configure:13050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13050   rm -rf conftest*
13051   rel_alloc=no; echo "$ac_t""yes" 1>&6;
13052 else
13053   echo "configure: failed program was:" >&5
13054   cat conftest.$ac_ext >&5
13055   rm -rf conftest*
13056   rel_alloc=yes; echo "$ac_t""no" 1>&6;
13057 fi
13058 rm -f conftest*
13059   else
13060     rel_alloc=yes
13061   fi
13062 fi
13063 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13064     Defining REL_ALLOC
13065 EOF
13066 cat >> confdefs.h <<\EOF
13067 #define REL_ALLOC 1
13068 EOF
13069 }
13070
13071
13072 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
13073 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
13074 echo "configure:13075: checking for termios.h" >&5
13075
13076 cat > conftest.$ac_ext <<EOF
13077 #line 13078 "configure"
13078 #include "confdefs.h"
13079 #include <termios.h>
13080 EOF
13081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13082 { (eval echo configure:13083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13084 if test -z "$ac_err"; then
13085   rm -rf conftest*
13086   eval "ac_cv_header_$ac_safe=yes"
13087 else
13088   echo "$ac_err" >&5
13089   echo "configure: failed program was:" >&5
13090   cat conftest.$ac_ext >&5
13091   rm -rf conftest*
13092   eval "ac_cv_header_$ac_safe=no"
13093 fi
13094 rm -f conftest*
13095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13096   echo "$ac_t""yes" 1>&6
13097   { test "$extra_verbose" = "yes" && cat << \EOF
13098     Defining HAVE_TERMIOS
13099 EOF
13100 cat >> confdefs.h <<\EOF
13101 #define HAVE_TERMIOS 1
13102 EOF
13103 }
13104
13105   { test "$extra_verbose" = "yes" && cat << \EOF
13106     Defining SIGNALS_VIA_CHARACTERS
13107 EOF
13108 cat >> confdefs.h <<\EOF
13109 #define SIGNALS_VIA_CHARACTERS 1
13110 EOF
13111 }
13112
13113   { test "$extra_verbose" = "yes" && cat << \EOF
13114     Defining NO_TERMIO
13115 EOF
13116 cat >> confdefs.h <<\EOF
13117 #define NO_TERMIO 1
13118 EOF
13119 }
13120
13121 else
13122   echo "$ac_t""no" 1>&6
13123 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
13124 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
13125 echo "configure:13126: checking for termio.h" >&5
13126
13127 cat > conftest.$ac_ext <<EOF
13128 #line 13129 "configure"
13129 #include "confdefs.h"
13130 #include <termio.h>
13131 EOF
13132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13133 { (eval echo configure:13134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13135 if test -z "$ac_err"; then
13136   rm -rf conftest*
13137   eval "ac_cv_header_$ac_safe=yes"
13138 else
13139   echo "$ac_err" >&5
13140   echo "configure: failed program was:" >&5
13141   cat conftest.$ac_ext >&5
13142   rm -rf conftest*
13143   eval "ac_cv_header_$ac_safe=no"
13144 fi
13145 rm -f conftest*
13146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13147   echo "$ac_t""yes" 1>&6
13148   { test "$extra_verbose" = "yes" && cat << \EOF
13149     Defining HAVE_TERMIO
13150 EOF
13151 cat >> confdefs.h <<\EOF
13152 #define HAVE_TERMIO 1
13153 EOF
13154 }
13155
13156 else
13157   echo "$ac_t""no" 1>&6
13158 fi
13159
13160 fi
13161
13162
13163
13164 echo $ac_n "checking for socket""... $ac_c" 1>&6
13165 echo "configure:13166: checking for socket" >&5
13166
13167 cat > conftest.$ac_ext <<EOF
13168 #line 13169 "configure"
13169 #include "confdefs.h"
13170 /* System header to define __stub macros and hopefully few prototypes,
13171     which can conflict with char socket(); below.  */
13172 #include <assert.h>
13173 /* Override any gcc2 internal prototype to avoid an error.  */
13174 /* We use char because int might match the return type of a gcc2
13175     builtin and then its argument prototype would still apply.  */
13176 char socket();
13177
13178 int main() {
13179
13180 /* The GNU C library defines this for functions which it implements
13181     to always fail with ENOSYS.  Some functions are actually named
13182     something starting with __ and the normal name is an alias.  */
13183 #if defined (__stub_socket) || defined (__stub___socket)
13184 choke me
13185 #else
13186 socket();
13187 #endif
13188
13189 ; return 0; }
13190 EOF
13191 if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13192   rm -rf conftest*
13193   eval "ac_cv_func_socket=yes"
13194 else
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -rf conftest*
13198   eval "ac_cv_func_socket=no"
13199 fi
13200 rm -f conftest*
13201
13202 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
13203   echo "$ac_t""yes" 1>&6
13204   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
13205 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
13206 echo "configure:13207: checking for netinet/in.h" >&5
13207
13208 cat > conftest.$ac_ext <<EOF
13209 #line 13210 "configure"
13210 #include "confdefs.h"
13211 #include <netinet/in.h>
13212 EOF
13213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13214 { (eval echo configure:13215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13216 if test -z "$ac_err"; then
13217   rm -rf conftest*
13218   eval "ac_cv_header_$ac_safe=yes"
13219 else
13220   echo "$ac_err" >&5
13221   echo "configure: failed program was:" >&5
13222   cat conftest.$ac_ext >&5
13223   rm -rf conftest*
13224   eval "ac_cv_header_$ac_safe=no"
13225 fi
13226 rm -f conftest*
13227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13228   echo "$ac_t""yes" 1>&6
13229   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
13230 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
13231 echo "configure:13232: checking for arpa/inet.h" >&5
13232
13233 cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236 #include <arpa/inet.h>
13237 EOF
13238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13239 { (eval echo configure:13240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13241 if test -z "$ac_err"; then
13242   rm -rf conftest*
13243   eval "ac_cv_header_$ac_safe=yes"
13244 else
13245   echo "$ac_err" >&5
13246   echo "configure: failed program was:" >&5
13247   cat conftest.$ac_ext >&5
13248   rm -rf conftest*
13249   eval "ac_cv_header_$ac_safe=no"
13250 fi
13251 rm -f conftest*
13252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13253   echo "$ac_t""yes" 1>&6
13254   
13255   { test "$extra_verbose" = "yes" && cat << \EOF
13256     Defining HAVE_SOCKETS
13257 EOF
13258 cat >> confdefs.h <<\EOF
13259 #define HAVE_SOCKETS 1
13260 EOF
13261 }
13262
13263       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
13264 echo "configure:13265: checking "for sun_len member in struct sockaddr_un"" >&5
13265       cat > conftest.$ac_ext <<EOF
13266 #line 13267 "configure"
13267 #include "confdefs.h"
13268
13269 #include <sys/types.h>
13270 #include <sys/socket.h>
13271 #include <sys/un.h>
13272       
13273 int main() {
13274 static struct sockaddr_un x; x.sun_len = 1;
13275 ; return 0; }
13276 EOF
13277 if { (eval echo configure:13278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13278   rm -rf conftest*
13279   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13280     Defining HAVE_SOCKADDR_SUN_LEN
13281 EOF
13282 cat >> confdefs.h <<\EOF
13283 #define HAVE_SOCKADDR_SUN_LEN 1
13284 EOF
13285 }
13286
13287 else
13288   echo "configure: failed program was:" >&5
13289   cat conftest.$ac_ext >&5
13290   rm -rf conftest*
13291   echo "$ac_t""no" 1>&6
13292 fi
13293 rm -f conftest*
13294       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
13295 echo "configure:13296: checking "for ip_mreq struct in netinet/in.h"" >&5
13296       cat > conftest.$ac_ext <<EOF
13297 #line 13298 "configure"
13298 #include "confdefs.h"
13299
13300 #include <sys/types.h>
13301 #include <netinet/in.h>
13302       
13303 int main() {
13304 static struct ip_mreq x;
13305 ; return 0; }
13306 EOF
13307 if { (eval echo configure:13308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13308   rm -rf conftest*
13309   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13310     Defining HAVE_MULTICAST
13311 EOF
13312 cat >> confdefs.h <<\EOF
13313 #define HAVE_MULTICAST 1
13314 EOF
13315 }
13316
13317 else
13318   echo "configure: failed program was:" >&5
13319   cat conftest.$ac_ext >&5
13320   rm -rf conftest*
13321   echo "$ac_t""no" 1>&6
13322 fi
13323 rm -f conftest*
13324 else
13325   echo "$ac_t""no" 1>&6
13326 fi
13327
13328 else
13329   echo "$ac_t""no" 1>&6
13330 fi
13331
13332 else
13333   echo "$ac_t""no" 1>&6
13334 fi
13335
13336
13337 echo $ac_n "checking for msgget""... $ac_c" 1>&6
13338 echo "configure:13339: checking for msgget" >&5
13339
13340 cat > conftest.$ac_ext <<EOF
13341 #line 13342 "configure"
13342 #include "confdefs.h"
13343 /* System header to define __stub macros and hopefully few prototypes,
13344     which can conflict with char msgget(); below.  */
13345 #include <assert.h>
13346 /* Override any gcc2 internal prototype to avoid an error.  */
13347 /* We use char because int might match the return type of a gcc2
13348     builtin and then its argument prototype would still apply.  */
13349 char msgget();
13350
13351 int main() {
13352
13353 /* The GNU C library defines this for functions which it implements
13354     to always fail with ENOSYS.  Some functions are actually named
13355     something starting with __ and the normal name is an alias.  */
13356 #if defined (__stub_msgget) || defined (__stub___msgget)
13357 choke me
13358 #else
13359 msgget();
13360 #endif
13361
13362 ; return 0; }
13363 EOF
13364 if { (eval echo configure:13365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13365   rm -rf conftest*
13366   eval "ac_cv_func_msgget=yes"
13367 else
13368   echo "configure: failed program was:" >&5
13369   cat conftest.$ac_ext >&5
13370   rm -rf conftest*
13371   eval "ac_cv_func_msgget=no"
13372 fi
13373 rm -f conftest*
13374
13375 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13376   echo "$ac_t""yes" 1>&6
13377   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13378 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13379 echo "configure:13380: checking for sys/ipc.h" >&5
13380
13381 cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 #include <sys/ipc.h>
13385 EOF
13386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13387 { (eval echo configure:13388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13389 if test -z "$ac_err"; then
13390   rm -rf conftest*
13391   eval "ac_cv_header_$ac_safe=yes"
13392 else
13393   echo "$ac_err" >&5
13394   echo "configure: failed program was:" >&5
13395   cat conftest.$ac_ext >&5
13396   rm -rf conftest*
13397   eval "ac_cv_header_$ac_safe=no"
13398 fi
13399 rm -f conftest*
13400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13401   echo "$ac_t""yes" 1>&6
13402   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13403 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13404 echo "configure:13405: checking for sys/msg.h" >&5
13405
13406 cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409 #include <sys/msg.h>
13410 EOF
13411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13412 { (eval echo configure:13413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13414 if test -z "$ac_err"; then
13415   rm -rf conftest*
13416   eval "ac_cv_header_$ac_safe=yes"
13417 else
13418   echo "$ac_err" >&5
13419   echo "configure: failed program was:" >&5
13420   cat conftest.$ac_ext >&5
13421   rm -rf conftest*
13422   eval "ac_cv_header_$ac_safe=no"
13423 fi
13424 rm -f conftest*
13425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13426   echo "$ac_t""yes" 1>&6
13427   { test "$extra_verbose" = "yes" && cat << \EOF
13428     Defining HAVE_SYSVIPC
13429 EOF
13430 cat >> confdefs.h <<\EOF
13431 #define HAVE_SYSVIPC 1
13432 EOF
13433 }
13434
13435 else
13436   echo "$ac_t""no" 1>&6
13437 fi
13438
13439 else
13440   echo "$ac_t""no" 1>&6
13441 fi
13442
13443 else
13444   echo "$ac_t""no" 1>&6
13445 fi
13446
13447
13448 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13449 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13450 echo "configure:13451: checking for dirent.h" >&5
13451
13452 cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 #include <dirent.h>
13456 EOF
13457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13458 { (eval echo configure:13459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13460 if test -z "$ac_err"; then
13461   rm -rf conftest*
13462   eval "ac_cv_header_$ac_safe=yes"
13463 else
13464   echo "$ac_err" >&5
13465   echo "configure: failed program was:" >&5
13466   cat conftest.$ac_ext >&5
13467   rm -rf conftest*
13468   eval "ac_cv_header_$ac_safe=no"
13469 fi
13470 rm -f conftest*
13471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13472   echo "$ac_t""yes" 1>&6
13473   { test "$extra_verbose" = "yes" && cat << \EOF
13474     Defining SYSV_SYSTEM_DIR
13475 EOF
13476 cat >> confdefs.h <<\EOF
13477 #define SYSV_SYSTEM_DIR 1
13478 EOF
13479 }
13480
13481 else
13482   echo "$ac_t""no" 1>&6
13483 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13484 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13485 echo "configure:13486: checking for sys/dir.h" >&5
13486
13487 cat > conftest.$ac_ext <<EOF
13488 #line 13489 "configure"
13489 #include "confdefs.h"
13490 #include <sys/dir.h>
13491 EOF
13492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13493 { (eval echo configure:13494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13495 if test -z "$ac_err"; then
13496   rm -rf conftest*
13497   eval "ac_cv_header_$ac_safe=yes"
13498 else
13499   echo "$ac_err" >&5
13500   echo "configure: failed program was:" >&5
13501   cat conftest.$ac_ext >&5
13502   rm -rf conftest*
13503   eval "ac_cv_header_$ac_safe=no"
13504 fi
13505 rm -f conftest*
13506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13507   echo "$ac_t""yes" 1>&6
13508   :
13509 else
13510   echo "$ac_t""no" 1>&6
13511 { test "$extra_verbose" = "yes" && cat << \EOF
13512     Defining NONSYSTEM_DIR_LIBRARY
13513 EOF
13514 cat >> confdefs.h <<\EOF
13515 #define NONSYSTEM_DIR_LIBRARY 1
13516 EOF
13517 }
13518
13519 fi
13520
13521 fi
13522
13523
13524 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13525 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13526 echo "configure:13527: checking for nlist.h" >&5
13527
13528 cat > conftest.$ac_ext <<EOF
13529 #line 13530 "configure"
13530 #include "confdefs.h"
13531 #include <nlist.h>
13532 EOF
13533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13534 { (eval echo configure:13535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13536 if test -z "$ac_err"; then
13537   rm -rf conftest*
13538   eval "ac_cv_header_$ac_safe=yes"
13539 else
13540   echo "$ac_err" >&5
13541   echo "configure: failed program was:" >&5
13542   cat conftest.$ac_ext >&5
13543   rm -rf conftest*
13544   eval "ac_cv_header_$ac_safe=no"
13545 fi
13546 rm -f conftest*
13547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13548   echo "$ac_t""yes" 1>&6
13549   { test "$extra_verbose" = "yes" && cat << \EOF
13550     Defining NLIST_STRUCT
13551 EOF
13552 cat >> confdefs.h <<\EOF
13553 #define NLIST_STRUCT 1
13554 EOF
13555 }
13556
13557 else
13558   echo "$ac_t""no" 1>&6
13559 fi
13560
13561
13562
13563 echo "checking "for sound support"" 1>&6
13564 echo "configure:13565: checking "for sound support"" >&5
13565 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13566
13567 if test "$with_native_sound" != "no"; then
13568     if test -n "$native_sound_lib"; then
13569     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13570 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13571 echo "configure:13572: checking for multimedia/audio_device.h" >&5
13572
13573 cat > conftest.$ac_ext <<EOF
13574 #line 13575 "configure"
13575 #include "confdefs.h"
13576 #include <multimedia/audio_device.h>
13577 EOF
13578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13579 { (eval echo configure:13580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13581 if test -z "$ac_err"; then
13582   rm -rf conftest*
13583   eval "ac_cv_header_$ac_safe=yes"
13584 else
13585   echo "$ac_err" >&5
13586   echo "configure: failed program was:" >&5
13587   cat conftest.$ac_ext >&5
13588   rm -rf conftest*
13589   eval "ac_cv_header_$ac_safe=no"
13590 fi
13591 rm -f conftest*
13592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13593   echo "$ac_t""yes" 1>&6
13594   sound_found=yes sound_cflags=""
13595       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13596    echo "    xemacs will be linked with \"sunplay.o\""
13597  fi
13598 else
13599   echo "$ac_t""no" 1>&6
13600 fi
13601
13602   fi
13603
13604     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13605     if test -d "/usr/demo/SOUND/include/multimedia"; then
13606       sun_sound_cflags="-I/usr/demo/SOUND/include"
13607     elif test -d "/usr/demo/SOUND/multimedia"; then
13608       sun_sound_cflags="-I/usr/demo/SOUND"
13609     fi
13610
13611     if test -n "$native_sound_lib"; then
13612       sun_sound_lib="$native_sound_lib"
13613     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13614       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13615     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13616       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13617     fi
13618
13619     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13620       native_sound_lib="$sun_sound_lib"
13621       sound_cflags="$sun_sound_cflags"
13622       sound_found=yes
13623       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13624    echo "    xemacs will be linked with \"sunplay.o\""
13625  fi
13626     fi
13627   fi
13628
13629     if test -z "$sound_found"; then
13630     case "$canonical" in
13631     *-sgi-* )
13632       if test -z "$native_sound_lib"; then
13633         
13634 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13635 echo "configure:13636: checking for ALopenport in -laudio" >&5
13636 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13637
13638 xe_check_libs=" -laudio "
13639 cat > conftest.$ac_ext <<EOF
13640 #line 13641 "configure"
13641 #include "confdefs.h"
13642 /* Override any gcc2 internal prototype to avoid an error.  */
13643 /* We use char because int might match the return type of a gcc2
13644     builtin and then its argument prototype would still apply.  */
13645 char ALopenport();
13646
13647 int main() {
13648 ALopenport()
13649 ; return 0; }
13650 EOF
13651 if { (eval echo configure:13652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13652   rm -rf conftest*
13653   eval "ac_cv_lib_$ac_lib_var=yes"
13654 else
13655   echo "configure: failed program was:" >&5
13656   cat conftest.$ac_ext >&5
13657   rm -rf conftest*
13658   eval "ac_cv_lib_$ac_lib_var=no"
13659 fi
13660 rm -f conftest*
13661 xe_check_libs=""
13662
13663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13664   echo "$ac_t""yes" 1>&6
13665   native_sound_lib="-laudio"
13666 else
13667   echo "$ac_t""no" 1>&6
13668 fi
13669
13670
13671       fi
13672       if test -n "$native_sound_lib"; then
13673         sound_found=yes sound_cflags=""
13674         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13675    echo "    xemacs will be linked with \"sgiplay.o\""
13676  fi
13677       fi ;;
13678     hppa*-hp-hpux* )
13679       if test -z "$native_sound_lib"; then
13680         
13681 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13682 echo "configure:13683: checking for AOpenAudio in -lAlib" >&5
13683 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13684
13685 xe_check_libs=" -lAlib "
13686 cat > conftest.$ac_ext <<EOF
13687 #line 13688 "configure"
13688 #include "confdefs.h"
13689 /* Override any gcc2 internal prototype to avoid an error.  */
13690 /* We use char because int might match the return type of a gcc2
13691     builtin and then its argument prototype would still apply.  */
13692 char AOpenAudio();
13693
13694 int main() {
13695 AOpenAudio()
13696 ; return 0; }
13697 EOF
13698 if { (eval echo configure:13699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13699   rm -rf conftest*
13700   eval "ac_cv_lib_$ac_lib_var=yes"
13701 else
13702   echo "configure: failed program was:" >&5
13703   cat conftest.$ac_ext >&5
13704   rm -rf conftest*
13705   eval "ac_cv_lib_$ac_lib_var=no"
13706 fi
13707 rm -f conftest*
13708 xe_check_libs=""
13709
13710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13711   echo "$ac_t""yes" 1>&6
13712   native_sound_lib="-lAlib"
13713 else
13714   echo "$ac_t""no" 1>&6
13715 fi
13716
13717
13718       fi
13719       if test -n "$native_sound_lib"; then
13720         sound_found=yes
13721         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13722    echo "    xemacs will be linked with \"hpplay.o\""
13723  fi
13724         if test "$GCC" = "yes" # Kludge city
13725           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13726           else sound_cflags="+e -I/usr/audio/examples"
13727         fi
13728       fi ;;
13729     esac
13730   fi
13731
13732     if test -z "$sound_found"; then
13733     if test "$with_msw" = "yes"; then
13734     sound_found=yes
13735     native_sound_lib=
13736     fi
13737   fi
13738
13739     if test -z "$sound_found"; then
13740     for dir in "machine" "sys" "linux"; do
13741       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13742 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13743 echo "configure:13744: checking for ${dir}/soundcard.h" >&5
13744
13745 cat > conftest.$ac_ext <<EOF
13746 #line 13747 "configure"
13747 #include "confdefs.h"
13748 #include <${dir}/soundcard.h>
13749 EOF
13750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13751 { (eval echo configure:13752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13753 if test -z "$ac_err"; then
13754   rm -rf conftest*
13755   eval "ac_cv_header_$ac_safe=yes"
13756 else
13757   echo "$ac_err" >&5
13758   echo "configure: failed program was:" >&5
13759   cat conftest.$ac_ext >&5
13760   rm -rf conftest*
13761   eval "ac_cv_header_$ac_safe=no"
13762 fi
13763 rm -f conftest*
13764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13765   echo "$ac_t""yes" 1>&6
13766   sound_found=yes
13767        need_miscplay=yes
13768         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13769    echo "    xemacs will be linked with \"linuxplay.o\""
13770  fi
13771         { test "$extra_verbose" = "yes" && cat << EOF
13772     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13773 EOF
13774 cat >> confdefs.h <<EOF
13775 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13776 EOF
13777 }
13778
13779         break
13780 else
13781   echo "$ac_t""no" 1>&6
13782 fi
13783
13784     done
13785   fi
13786
13787   test "$sound_found" = "yes" && with_native_sound=yes
13788 fi
13789
13790 if test "$with_native_sound" = "yes"; then
13791   { test "$extra_verbose" = "yes" && cat << \EOF
13792     Defining HAVE_NATIVE_SOUND
13793 EOF
13794 cat >> confdefs.h <<\EOF
13795 #define HAVE_NATIVE_SOUND 1
13796 EOF
13797 }
13798
13799   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13800 fi
13801
13802 if test "$with_nas_sound" != "no"; then
13803   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13804 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13805 echo "configure:13806: checking for audio/audiolib.h" >&5
13806
13807 cat > conftest.$ac_ext <<EOF
13808 #line 13809 "configure"
13809 #include "confdefs.h"
13810 #include <audio/audiolib.h>
13811 EOF
13812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13813 { (eval echo configure:13814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13815 if test -z "$ac_err"; then
13816   rm -rf conftest*
13817   eval "ac_cv_header_$ac_safe=yes"
13818 else
13819   echo "$ac_err" >&5
13820   echo "configure: failed program was:" >&5
13821   cat conftest.$ac_ext >&5
13822   rm -rf conftest*
13823   eval "ac_cv_header_$ac_safe=no"
13824 fi
13825 rm -f conftest*
13826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13827   echo "$ac_t""yes" 1>&6
13828   
13829     
13830 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13831 echo "configure:13832: checking for AuOpenServer in -laudio" >&5
13832 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13833
13834 xe_check_libs=" -laudio "
13835 cat > conftest.$ac_ext <<EOF
13836 #line 13837 "configure"
13837 #include "confdefs.h"
13838 /* Override any gcc2 internal prototype to avoid an error.  */
13839 /* We use char because int might match the return type of a gcc2
13840     builtin and then its argument prototype would still apply.  */
13841 char AuOpenServer();
13842
13843 int main() {
13844 AuOpenServer()
13845 ; return 0; }
13846 EOF
13847 if { (eval echo configure:13848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13848   rm -rf conftest*
13849   eval "ac_cv_lib_$ac_lib_var=yes"
13850 else
13851   echo "configure: failed program was:" >&5
13852   cat conftest.$ac_ext >&5
13853   rm -rf conftest*
13854   eval "ac_cv_lib_$ac_lib_var=no"
13855 fi
13856 rm -f conftest*
13857 xe_check_libs=""
13858
13859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13860   echo "$ac_t""yes" 1>&6
13861   have_nas_sound=yes
13862 else
13863   echo "$ac_t""no" 1>&6
13864 fi
13865
13866
13867 else
13868   echo "$ac_t""no" 1>&6
13869 fi
13870
13871   if test "$have_nas_sound" = "yes"; then
13872     with_nas_sound=yes
13873     { test "$extra_verbose" = "yes" && cat << \EOF
13874     Defining HAVE_NAS_SOUND
13875 EOF
13876 cat >> confdefs.h <<\EOF
13877 #define HAVE_NAS_SOUND 1
13878 EOF
13879 }
13880
13881     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13882    echo "    xemacs will be linked with \"nas.o\""
13883  fi
13884     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13885             cat > conftest.$ac_ext <<EOF
13886 #line 13887 "configure"
13887 #include "confdefs.h"
13888 #include <audio/Xtutil.h>
13889 EOF
13890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13891   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13892   :
13893 else
13894   rm -rf conftest*
13895   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13896     Defining NAS_NO_ERROR_JUMP
13897 EOF
13898 cat >> confdefs.h <<\EOF
13899 #define NAS_NO_ERROR_JUMP 1
13900 EOF
13901 }
13902
13903 fi
13904 rm -f conftest*
13905
13906   else
13907     test "$with_nas_sound" = "yes" && \
13908       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13909     with_nas_sound=no
13910   fi
13911 fi
13912
13913 if test "$with_esd_sound" != "no"; then
13914   # Extract the first word of "esd-config", so it can be a program name with args.
13915 set dummy esd-config; ac_word=$2
13916 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13917 echo "configure:13918: checking for $ac_word" >&5
13918
13919 if test -n "$have_esd_config"; then
13920   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13921 else
13922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13923   ac_dummy="$PATH"
13924   for ac_dir in $ac_dummy; do
13925     test -z "$ac_dir" && ac_dir=.
13926     if test -f $ac_dir/$ac_word; then
13927       ac_cv_prog_have_esd_config="yes"
13928       break
13929     fi
13930   done
13931   IFS="$ac_save_ifs"
13932   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13933 fi
13934 have_esd_config="$ac_cv_prog_have_esd_config"
13935 if test -n "$have_esd_config"; then
13936   echo "$ac_t""$have_esd_config" 1>&6
13937 else
13938   echo "$ac_t""no" 1>&6
13939 fi
13940
13941   if test "$have_esd_config" = "yes"; then
13942     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13943     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
13944     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13945     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13946 echo "configure:13947: checking for esd_play_stream" >&5
13947
13948 cat > conftest.$ac_ext <<EOF
13949 #line 13950 "configure"
13950 #include "confdefs.h"
13951 /* System header to define __stub macros and hopefully few prototypes,
13952     which can conflict with char esd_play_stream(); below.  */
13953 #include <assert.h>
13954 /* Override any gcc2 internal prototype to avoid an error.  */
13955 /* We use char because int might match the return type of a gcc2
13956     builtin and then its argument prototype would still apply.  */
13957 char esd_play_stream();
13958
13959 int main() {
13960
13961 /* The GNU C library defines this for functions which it implements
13962     to always fail with ENOSYS.  Some functions are actually named
13963     something starting with __ and the normal name is an alias.  */
13964 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13965 choke me
13966 #else
13967 esd_play_stream();
13968 #endif
13969
13970 ; return 0; }
13971 EOF
13972 if { (eval echo configure:13973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13973   rm -rf conftest*
13974   eval "ac_cv_func_esd_play_stream=yes"
13975 else
13976   echo "configure: failed program was:" >&5
13977   cat conftest.$ac_ext >&5
13978   rm -rf conftest*
13979   eval "ac_cv_func_esd_play_stream=no"
13980 fi
13981 rm -f conftest*
13982
13983 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13984   echo "$ac_t""yes" 1>&6
13985   have_esd_sound=yes
13986 else
13987   echo "$ac_t""no" 1>&6
13988 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13989 fi
13990
13991   fi
13992
13993   if test "$have_esd_sound" = "yes"; then
13994     with_esd_sound=yes
13995     need_miscplay=yes
13996     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13997    echo "    xemacs will be linked with \"esd.o\""
13998  fi
13999     { test "$extra_verbose" = "yes" && cat << \EOF
14000     Defining HAVE_ESD_SOUND
14001 EOF
14002 cat >> confdefs.h <<\EOF
14003 #define HAVE_ESD_SOUND 1
14004 EOF
14005 }
14006
14007   else
14008     test "$with_esd_sound" = "yes" && \
14009       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
14010     with_esd_sound=no
14011   fi
14012 fi
14013
14014 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
14015    echo "    xemacs will be linked with \"miscplay.o\""
14016  fi
14017
14018
14019 test -z "$with_tty" && with_tty=yes
14020
14021 if test "$with_tty" = "yes"  ; then
14022   echo "checking for TTY-related features" 1>&6
14023 echo "configure:14024: checking for TTY-related features" >&5
14024   { test "$extra_verbose" = "yes" && cat << \EOF
14025     Defining HAVE_TTY
14026 EOF
14027 cat >> confdefs.h <<\EOF
14028 #define HAVE_TTY 1
14029 EOF
14030 }
14031
14032   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
14033    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\""
14034  fi
14035
14036     if test -z "$with_ncurses"; then
14037     
14038 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
14039 echo "configure:14040: checking for tgetent in -lncurses" >&5
14040 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
14041
14042 xe_check_libs=" -lncurses "
14043 cat > conftest.$ac_ext <<EOF
14044 #line 14045 "configure"
14045 #include "confdefs.h"
14046 /* Override any gcc2 internal prototype to avoid an error.  */
14047 /* We use char because int might match the return type of a gcc2
14048     builtin and then its argument prototype would still apply.  */
14049 char tgetent();
14050
14051 int main() {
14052 tgetent()
14053 ; return 0; }
14054 EOF
14055 if { (eval echo configure:14056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14056   rm -rf conftest*
14057   eval "ac_cv_lib_$ac_lib_var=yes"
14058 else
14059   echo "configure: failed program was:" >&5
14060   cat conftest.$ac_ext >&5
14061   rm -rf conftest*
14062   eval "ac_cv_lib_$ac_lib_var=no"
14063 fi
14064 rm -f conftest*
14065 xe_check_libs=""
14066
14067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14068   echo "$ac_t""yes" 1>&6
14069   with_ncurses=yes
14070 else
14071   echo "$ac_t""no" 1>&6
14072 with_ncurses=no
14073 fi
14074
14075
14076   fi
14077   if test "$with_ncurses" = "yes"; then
14078     { test "$extra_verbose" = "yes" && cat << \EOF
14079     Defining HAVE_NCURSES
14080 EOF
14081 cat >> confdefs.h <<\EOF
14082 #define HAVE_NCURSES 1
14083 EOF
14084 }
14085
14086     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
14087 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
14088 echo "configure:14089: checking for ncurses/curses.h" >&5
14089
14090 cat > conftest.$ac_ext <<EOF
14091 #line 14092 "configure"
14092 #include "confdefs.h"
14093 #include <ncurses/curses.h>
14094 EOF
14095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14096 { (eval echo configure:14097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14098 if test -z "$ac_err"; then
14099   rm -rf conftest*
14100   eval "ac_cv_header_$ac_safe=yes"
14101 else
14102   echo "$ac_err" >&5
14103   echo "configure: failed program was:" >&5
14104   cat conftest.$ac_ext >&5
14105   rm -rf conftest*
14106   eval "ac_cv_header_$ac_safe=no"
14107 fi
14108 rm -f conftest*
14109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14110   echo "$ac_t""yes" 1>&6
14111   curses_h_file=ncurses/curses.h
14112 else
14113   echo "$ac_t""no" 1>&6
14114 fi
14115
14116     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
14117 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
14118 echo "configure:14119: checking for ncurses/term.h" >&5
14119
14120 cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123 #include <ncurses/term.h>
14124 EOF
14125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14126 { (eval echo configure:14127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14128 if test -z "$ac_err"; then
14129   rm -rf conftest*
14130   eval "ac_cv_header_$ac_safe=yes"
14131 else
14132   echo "$ac_err" >&5
14133   echo "configure: failed program was:" >&5
14134   cat conftest.$ac_ext >&5
14135   rm -rf conftest*
14136   eval "ac_cv_header_$ac_safe=no"
14137 fi
14138 rm -f conftest*
14139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14140   echo "$ac_t""yes" 1>&6
14141   term_h_file=ncurses/term.h
14142 else
14143   echo "$ac_t""no" 1>&6
14144 fi
14145
14146     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
14147    echo "    xemacs will be linked with \"terminfo.o\""
14148  fi
14149     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
14150
14151     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
14152                         save_c_switch_site="$c_switch_site"
14153       c_switch_site="$c_switch_site -I/usr/include/ncurses"
14154       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
14155 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
14156 echo "configure:14157: checking for ncurses/curses.h" >&5
14157
14158 cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 #include <ncurses/curses.h>
14162 EOF
14163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14164 { (eval echo configure:14165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14166 if test -z "$ac_err"; then
14167   rm -rf conftest*
14168   eval "ac_cv_header_$ac_safe=yes"
14169 else
14170   echo "$ac_err" >&5
14171   echo "configure: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173   rm -rf conftest*
14174   eval "ac_cv_header_$ac_safe=no"
14175 fi
14176 rm -f conftest*
14177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14178   echo "$ac_t""yes" 1>&6
14179   curses_h_file=ncurses/curses.h
14180 else
14181   echo "$ac_t""no" 1>&6
14182 fi
14183
14184       if test "$ac_cv_header_ncurses_curses_h" = "yes"
14185         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
14186         else c_switch_site="$save_c_switch_site"
14187       fi
14188     fi
14189   else         if test "$have_terminfo" = "yes"; then
14190       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
14191    echo "    xemacs will be linked with \"terminfo.o\""
14192  fi
14193       if test -n "$libs_termcap"; then
14194         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14195       else
14196         for lib in curses termlib termcap; do
14197           
14198 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
14199 echo "configure:14200: checking for tgetent in -l$lib" >&5
14200 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
14201
14202 xe_check_libs=" -l$lib "
14203 cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 /* Override any gcc2 internal prototype to avoid an error.  */
14207 /* We use char because int might match the return type of a gcc2
14208     builtin and then its argument prototype would still apply.  */
14209 char tgetent();
14210
14211 int main() {
14212 tgetent()
14213 ; return 0; }
14214 EOF
14215 if { (eval echo configure:14216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14216   rm -rf conftest*
14217   eval "ac_cv_lib_$ac_lib_var=yes"
14218 else
14219   echo "configure: failed program was:" >&5
14220   cat conftest.$ac_ext >&5
14221   rm -rf conftest*
14222   eval "ac_cv_lib_$ac_lib_var=no"
14223 fi
14224 rm -f conftest*
14225 xe_check_libs=""
14226
14227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14228   echo "$ac_t""yes" 1>&6
14229   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
14230 else
14231   echo "$ac_t""no" 1>&6
14232 fi
14233
14234
14235         done
14236       fi
14237     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
14238                                 
14239 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
14240 echo "configure:14241: checking for tgoto in -ltermcap" >&5
14241 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
14242
14243 xe_check_libs=" -ltermcap "
14244 cat > conftest.$ac_ext <<EOF
14245 #line 14246 "configure"
14246 #include "confdefs.h"
14247 /* Override any gcc2 internal prototype to avoid an error.  */
14248 /* We use char because int might match the return type of a gcc2
14249     builtin and then its argument prototype would still apply.  */
14250 char tgoto();
14251
14252 int main() {
14253 tgoto()
14254 ; return 0; }
14255 EOF
14256 if { (eval echo configure:14257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14257   rm -rf conftest*
14258   eval "ac_cv_lib_$ac_lib_var=yes"
14259 else
14260   echo "configure: failed program was:" >&5
14261   cat conftest.$ac_ext >&5
14262   rm -rf conftest*
14263   eval "ac_cv_lib_$ac_lib_var=no"
14264 fi
14265 rm -f conftest*
14266 xe_check_libs=""
14267
14268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14269   echo "$ac_t""yes" 1>&6
14270     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14272   { test "$extra_verbose" = "yes" && cat << EOF
14273     Defining $ac_tr_lib
14274 EOF
14275 cat >> confdefs.h <<EOF
14276 #define $ac_tr_lib 1
14277 EOF
14278 }
14279
14280   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14281
14282 else
14283   echo "$ac_t""no" 1>&6
14284 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14285    echo "    xemacs will be linked with \"tparam.o\""
14286  fi
14287 fi
14288
14289
14290       else
14291         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14292    echo "    xemacs will be linked with \"tparam.o\""
14293  fi
14294       fi
14295                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
14296       if test -n "$libs_termcap"; then
14297         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14298       else
14299         
14300 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
14301 echo "configure:14302: checking for tgetent in -lcurses" >&5
14302 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
14303
14304 xe_check_libs=" -lcurses "
14305 cat > conftest.$ac_ext <<EOF
14306 #line 14307 "configure"
14307 #include "confdefs.h"
14308 /* Override any gcc2 internal prototype to avoid an error.  */
14309 /* We use char because int might match the return type of a gcc2
14310     builtin and then its argument prototype would still apply.  */
14311 char tgetent();
14312
14313 int main() {
14314 tgetent()
14315 ; return 0; }
14316 EOF
14317 if { (eval echo configure:14318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14318   rm -rf conftest*
14319   eval "ac_cv_lib_$ac_lib_var=yes"
14320 else
14321   echo "configure: failed program was:" >&5
14322   cat conftest.$ac_ext >&5
14323   rm -rf conftest*
14324   eval "ac_cv_lib_$ac_lib_var=no"
14325 fi
14326 rm -f conftest*
14327 xe_check_libs=""
14328
14329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14330   echo "$ac_t""yes" 1>&6
14331   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
14332 else
14333   echo "$ac_t""no" 1>&6
14334 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
14335 echo "configure:14336: checking for tgetent in -ltermcap" >&5
14336 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
14337
14338 xe_check_libs=" -ltermcap "
14339 cat > conftest.$ac_ext <<EOF
14340 #line 14341 "configure"
14341 #include "confdefs.h"
14342 /* Override any gcc2 internal prototype to avoid an error.  */
14343 /* We use char because int might match the return type of a gcc2
14344     builtin and then its argument prototype would still apply.  */
14345 char tgetent();
14346
14347 int main() {
14348 tgetent()
14349 ; return 0; }
14350 EOF
14351 if { (eval echo configure:14352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14352   rm -rf conftest*
14353   eval "ac_cv_lib_$ac_lib_var=yes"
14354 else
14355   echo "configure: failed program was:" >&5
14356   cat conftest.$ac_ext >&5
14357   rm -rf conftest*
14358   eval "ac_cv_lib_$ac_lib_var=no"
14359 fi
14360 rm -f conftest*
14361 xe_check_libs=""
14362
14363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14364   echo "$ac_t""yes" 1>&6
14365   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14366 else
14367   echo "$ac_t""no" 1>&6
14368 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14369    echo "    xemacs will be linked with \"termcap.o\""
14370  fi
14371 fi
14372
14373
14374 fi
14375
14376
14377       fi
14378     fi
14379   fi
14380   { test "$extra_verbose" = "yes" && cat << EOF
14381     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14382 EOF
14383 cat >> confdefs.h <<EOF
14384 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14385 EOF
14386 }
14387
14388   { test "$extra_verbose" = "yes" && cat << EOF
14389     Defining TERM_H_FILE = "${term_h_file-term.h}"
14390 EOF
14391 cat >> confdefs.h <<EOF
14392 #define TERM_H_FILE "${term_h_file-term.h}"
14393 EOF
14394 }
14395
14396
14397     if test "$with_gpm" != "no"; then
14398     ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14399 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14400 echo "configure:14401: checking for gpm.h" >&5
14401
14402 cat > conftest.$ac_ext <<EOF
14403 #line 14404 "configure"
14404 #include "confdefs.h"
14405 #include <gpm.h>
14406 EOF
14407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14408 { (eval echo configure:14409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14410 if test -z "$ac_err"; then
14411   rm -rf conftest*
14412   eval "ac_cv_header_$ac_safe=yes"
14413 else
14414   echo "$ac_err" >&5
14415   echo "configure: failed program was:" >&5
14416   cat conftest.$ac_ext >&5
14417   rm -rf conftest*
14418   eval "ac_cv_header_$ac_safe=no"
14419 fi
14420 rm -f conftest*
14421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14422   echo "$ac_t""yes" 1>&6
14423   
14424       
14425 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14426 echo "configure:14427: checking for Gpm_Open in -lgpm" >&5
14427 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14428
14429 xe_check_libs=" -lgpm "
14430 cat > conftest.$ac_ext <<EOF
14431 #line 14432 "configure"
14432 #include "confdefs.h"
14433 /* Override any gcc2 internal prototype to avoid an error.  */
14434 /* We use char because int might match the return type of a gcc2
14435     builtin and then its argument prototype would still apply.  */
14436 char Gpm_Open();
14437
14438 int main() {
14439 Gpm_Open()
14440 ; return 0; }
14441 EOF
14442 if { (eval echo configure:14443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14443   rm -rf conftest*
14444   eval "ac_cv_lib_$ac_lib_var=yes"
14445 else
14446   echo "configure: failed program was:" >&5
14447   cat conftest.$ac_ext >&5
14448   rm -rf conftest*
14449   eval "ac_cv_lib_$ac_lib_var=no"
14450 fi
14451 rm -f conftest*
14452 xe_check_libs=""
14453
14454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14455   echo "$ac_t""yes" 1>&6
14456   have_gpm=yes
14457 else
14458   echo "$ac_t""no" 1>&6
14459 fi
14460
14461
14462 else
14463   echo "$ac_t""no" 1>&6
14464 fi
14465
14466     if test "$have_gpm" = "yes"; then
14467       with_gpm=yes
14468       { test "$extra_verbose" = "yes" && cat << \EOF
14469     Defining HAVE_GPM
14470 EOF
14471 cat >> confdefs.h <<\EOF
14472 #define HAVE_GPM 1
14473 EOF
14474 }
14475
14476       extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14477    echo "    xemacs will be linked with \"gpmevent.o\""
14478  fi
14479       LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14480     elif test "$with_gpm" = "yes"; then
14481       { echo "Error:" "GPM requested, but gpm.h or libgpm seems to be missing." >&2; exit 1; }
14482     else
14483       with_gpm=no
14484     fi
14485   fi
14486
14487 else   for feature in ncurses gpm; do
14488     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14489       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14490     fi
14491     eval "with_${feature}=no"
14492   done
14493 fi 
14494 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
14495    echo "    xemacs will be linked with \"event-unixoid.o\""
14496  fi
14497
14498
14499 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14500   != "no no no" && echo "checking for database support" 1>&6
14501 echo "configure:14502: checking for database support" >&5
14502
14503 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14504   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14505 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14506 echo "configure:14507: checking for ndbm.h" >&5
14507
14508 cat > conftest.$ac_ext <<EOF
14509 #line 14510 "configure"
14510 #include "confdefs.h"
14511 #include <ndbm.h>
14512 EOF
14513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14514 { (eval echo configure:14515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14516 if test -z "$ac_err"; then
14517   rm -rf conftest*
14518   eval "ac_cv_header_$ac_safe=yes"
14519 else
14520   echo "$ac_err" >&5
14521   echo "configure: failed program was:" >&5
14522   cat conftest.$ac_ext >&5
14523   rm -rf conftest*
14524   eval "ac_cv_header_$ac_safe=no"
14525 fi
14526 rm -f conftest*
14527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14528   echo "$ac_t""yes" 1>&6
14529   :
14530 else
14531   echo "$ac_t""no" 1>&6
14532
14533     test "$with_database_gdbm" = "yes" -o \
14534          "$with_database_dbm"  = "yes" && \
14535       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14536     with_database_gdbm=no with_database_dbm=no
14537 fi
14538
14539 fi
14540
14541 if test "$with_database_gdbm" != "no"; then
14542   
14543 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14544 echo "configure:14545: checking for dbm_open in -lgdbm" >&5
14545 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14546
14547 xe_check_libs=" -lgdbm "
14548 cat > conftest.$ac_ext <<EOF
14549 #line 14550 "configure"
14550 #include "confdefs.h"
14551 /* Override any gcc2 internal prototype to avoid an error.  */
14552 /* We use char because int might match the return type of a gcc2
14553     builtin and then its argument prototype would still apply.  */
14554 char dbm_open();
14555
14556 int main() {
14557 dbm_open()
14558 ; return 0; }
14559 EOF
14560 if { (eval echo configure:14561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14561   rm -rf conftest*
14562   eval "ac_cv_lib_$ac_lib_var=yes"
14563 else
14564   echo "configure: failed program was:" >&5
14565   cat conftest.$ac_ext >&5
14566   rm -rf conftest*
14567   eval "ac_cv_lib_$ac_lib_var=no"
14568 fi
14569 rm -f conftest*
14570 xe_check_libs=""
14571
14572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14573   echo "$ac_t""yes" 1>&6
14574   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14575 else
14576   echo "$ac_t""no" 1>&6
14577 if test "$with_database_gdbm" = "yes"; then
14578      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14579    fi
14580    with_database_gdbm=no
14581 fi
14582
14583
14584 fi
14585
14586 if test "$with_database_dbm" != "no"; then
14587   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14588 echo "configure:14589: checking for dbm_open" >&5
14589
14590 cat > conftest.$ac_ext <<EOF
14591 #line 14592 "configure"
14592 #include "confdefs.h"
14593 /* System header to define __stub macros and hopefully few prototypes,
14594     which can conflict with char dbm_open(); below.  */
14595 #include <assert.h>
14596 /* Override any gcc2 internal prototype to avoid an error.  */
14597 /* We use char because int might match the return type of a gcc2
14598     builtin and then its argument prototype would still apply.  */
14599 char dbm_open();
14600
14601 int main() {
14602
14603 /* The GNU C library defines this for functions which it implements
14604     to always fail with ENOSYS.  Some functions are actually named
14605     something starting with __ and the normal name is an alias.  */
14606 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14607 choke me
14608 #else
14609 dbm_open();
14610 #endif
14611
14612 ; return 0; }
14613 EOF
14614 if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14615   rm -rf conftest*
14616   eval "ac_cv_func_dbm_open=yes"
14617 else
14618   echo "configure: failed program was:" >&5
14619   cat conftest.$ac_ext >&5
14620   rm -rf conftest*
14621   eval "ac_cv_func_dbm_open=no"
14622 fi
14623 rm -f conftest*
14624
14625 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14626   echo "$ac_t""yes" 1>&6
14627   with_database_dbm=yes libdbm=
14628 else
14629   echo "$ac_t""no" 1>&6
14630
14631     
14632 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14633 echo "configure:14634: checking for dbm_open in -ldbm" >&5
14634 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14635
14636 xe_check_libs=" -ldbm "
14637 cat > conftest.$ac_ext <<EOF
14638 #line 14639 "configure"
14639 #include "confdefs.h"
14640 /* Override any gcc2 internal prototype to avoid an error.  */
14641 /* We use char because int might match the return type of a gcc2
14642     builtin and then its argument prototype would still apply.  */
14643 char dbm_open();
14644
14645 int main() {
14646 dbm_open()
14647 ; return 0; }
14648 EOF
14649 if { (eval echo configure:14650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14650   rm -rf conftest*
14651   eval "ac_cv_lib_$ac_lib_var=yes"
14652 else
14653   echo "configure: failed program was:" >&5
14654   cat conftest.$ac_ext >&5
14655   rm -rf conftest*
14656   eval "ac_cv_lib_$ac_lib_var=no"
14657 fi
14658 rm -f conftest*
14659 xe_check_libs=""
14660
14661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14662   echo "$ac_t""yes" 1>&6
14663   with_database_dbm=yes libdbm=-ldbm
14664 else
14665   echo "$ac_t""no" 1>&6
14666 test "$with_database_dbm" = "yes" && \
14667         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14668       with_database_dbm=no
14669 fi
14670
14671
14672 fi
14673
14674 fi
14675
14676 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14677 test "$with_database_gdbm" = "yes" -o \
14678      "$with_database_dbm"  = "yes" && \
14679   { test "$extra_verbose" = "yes" && cat << \EOF
14680     Defining HAVE_DBM
14681 EOF
14682 cat >> confdefs.h <<\EOF
14683 #define HAVE_DBM 1
14684 EOF
14685 }
14686
14687
14688 echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
14689 echo "configure:14690: checking for u_int8_t" >&5
14690
14691 cat > conftest.$ac_ext <<EOF
14692 #line 14693 "configure"
14693 #include "confdefs.h"
14694 #include <sys/types.h>
14695 #if STDC_HEADERS
14696 #include <stdlib.h>
14697 #include <stddef.h>
14698 #endif
14699 EOF
14700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14701   egrep "(^|[^a-zA-Z_0-9])u_int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14702   rm -rf conftest*
14703   ac_cv_type_u_int8_t=yes
14704 else
14705   rm -rf conftest*
14706   ac_cv_type_u_int8_t=no
14707 fi
14708 rm -f conftest*
14709
14710 echo "$ac_t""$ac_cv_type_u_int8_t" 1>&6
14711 if test $ac_cv_type_u_int8_t = no; then
14712   { test "$extra_verbose" = "yes" && cat << \EOF
14713     Defining u_int8_t = uint8_t
14714 EOF
14715 cat >> confdefs.h <<\EOF
14716 #define u_int8_t uint8_t
14717 EOF
14718 }
14719
14720 fi
14721
14722 if test $ac_cv_type_u_int8_t = yes; then
14723 { test "$extra_verbose" = "yes" && cat << \EOF
14724     Defining HAVE_U_INT8_T = 1
14725 EOF
14726 cat >> confdefs.h <<\EOF
14727 #define HAVE_U_INT8_T 1
14728 EOF
14729 }
14730
14731 fi
14732 echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
14733 echo "configure:14734: checking for u_int16_t" >&5
14734
14735 cat > conftest.$ac_ext <<EOF
14736 #line 14737 "configure"
14737 #include "confdefs.h"
14738 #include <sys/types.h>
14739 #if STDC_HEADERS
14740 #include <stdlib.h>
14741 #include <stddef.h>
14742 #endif
14743 EOF
14744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14745   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14746   rm -rf conftest*
14747   ac_cv_type_u_int16_t=yes
14748 else
14749   rm -rf conftest*
14750   ac_cv_type_u_int16_t=no
14751 fi
14752 rm -f conftest*
14753
14754 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
14755 if test $ac_cv_type_u_int16_t = no; then
14756   { test "$extra_verbose" = "yes" && cat << \EOF
14757     Defining u_int16_t = uint16_t
14758 EOF
14759 cat >> confdefs.h <<\EOF
14760 #define u_int16_t uint16_t
14761 EOF
14762 }
14763
14764 fi
14765
14766 if test $ac_cv_type_u_int16_t = yes; then
14767 { test "$extra_verbose" = "yes" && cat << \EOF
14768     Defining HAVE_U_INT16_T = 1
14769 EOF
14770 cat >> confdefs.h <<\EOF
14771 #define HAVE_U_INT16_T 1
14772 EOF
14773 }
14774
14775 fi
14776 echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
14777 echo "configure:14778: checking for u_int32_t" >&5
14778
14779 cat > conftest.$ac_ext <<EOF
14780 #line 14781 "configure"
14781 #include "confdefs.h"
14782 #include <sys/types.h>
14783 #if STDC_HEADERS
14784 #include <stdlib.h>
14785 #include <stddef.h>
14786 #endif
14787 EOF
14788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14789   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14790   rm -rf conftest*
14791   ac_cv_type_u_int32_t=yes
14792 else
14793   rm -rf conftest*
14794   ac_cv_type_u_int32_t=no
14795 fi
14796 rm -f conftest*
14797
14798 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
14799 if test $ac_cv_type_u_int32_t = no; then
14800   { test "$extra_verbose" = "yes" && cat << \EOF
14801     Defining u_int32_t = uint32_t
14802 EOF
14803 cat >> confdefs.h <<\EOF
14804 #define u_int32_t uint32_t
14805 EOF
14806 }
14807
14808 fi
14809
14810 if test $ac_cv_type_u_int32_t = yes; then
14811 { test "$extra_verbose" = "yes" && cat << \EOF
14812     Defining HAVE_U_INT32_T = 1
14813 EOF
14814 cat >> confdefs.h <<\EOF
14815 #define HAVE_U_INT32_T 1
14816 EOF
14817 }
14818
14819 fi
14820 echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
14821 echo "configure:14822: checking for u_int64_t" >&5
14822
14823 cat > conftest.$ac_ext <<EOF
14824 #line 14825 "configure"
14825 #include "confdefs.h"
14826 #include <sys/types.h>
14827 #if STDC_HEADERS
14828 #include <stdlib.h>
14829 #include <stddef.h>
14830 #endif
14831 EOF
14832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14833   egrep "(^|[^a-zA-Z_0-9])u_int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14834   rm -rf conftest*
14835   ac_cv_type_u_int64_t=yes
14836 else
14837   rm -rf conftest*
14838   ac_cv_type_u_int64_t=no
14839 fi
14840 rm -f conftest*
14841
14842 echo "$ac_t""$ac_cv_type_u_int64_t" 1>&6
14843 if test $ac_cv_type_u_int64_t = no; then
14844   { test "$extra_verbose" = "yes" && cat << \EOF
14845     Defining u_int64_t = uint64_t
14846 EOF
14847 cat >> confdefs.h <<\EOF
14848 #define u_int64_t uint64_t
14849 EOF
14850 }
14851
14852 fi
14853
14854 if test $ac_cv_type_u_int64_t = yes; then
14855 { test "$extra_verbose" = "yes" && cat << \EOF
14856     Defining HAVE_U_INT64_T = 1
14857 EOF
14858 cat >> confdefs.h <<\EOF
14859 #define HAVE_U_INT64_T 1
14860 EOF
14861 }
14862
14863 fi
14864
14865 if test "$with_database_berkdb" != "no"; then
14866   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14867 echo "configure:14868: checking for Berkeley db.h" >&5
14868   for header in "db/db.h" "db.h"; do
14869     case "$opsys" in
14870         *freebsd*)
14871     cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874
14875 #include <stdlib.h>
14876 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14877 #ifdef HAVE_INTTYPES_H
14878 #define __BIT_TYPES_DEFINED__
14879 #include <inttypes.h>
14880 #endif
14881 #endif
14882 #include <$header>
14883
14884 int main() {
14885
14886 ; return 0; }
14887 EOF
14888 if { (eval echo configure:14889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14889   rm -rf conftest*
14890   db_h_file="$header"; break
14891 else
14892   echo "configure: failed program was:" >&5
14893   cat conftest.$ac_ext >&5
14894 fi
14895 rm -f conftest*
14896         ;;
14897         *)
14898     cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901
14902 #include <stdlib.h>
14903 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14904 #ifdef HAVE_INTTYPES_H
14905 #define __BIT_TYPES_DEFINED__
14906 #include <inttypes.h>
14907 #if !HAVE_U_INT8_T
14908 typedef uint8_t  u_int8_t;
14909 #endif
14910 #if !HAVE_U_INT16_T
14911 typedef uint16_t u_int16_t;
14912 #endif
14913 #if !HAVE_U_INT32_T
14914 typedef uint32_t u_int32_t;
14915 #endif
14916 #ifdef WE_DONT_NEED_QUADS
14917 #if !HAVE_U_INT64_T
14918 typedef uint64_t u_int64_t;
14919 #endif
14920 #endif
14921 #endif
14922 #endif
14923 #include <$header>
14924
14925 int main() {
14926
14927 ; return 0; }
14928 EOF
14929 if { (eval echo configure:14930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14930   rm -rf conftest*
14931   db_h_file="$header"; break
14932 else
14933   echo "configure: failed program was:" >&5
14934   cat conftest.$ac_ext >&5
14935 fi
14936 rm -f conftest*
14937         ;;
14938         esac
14939   done
14940   if test -z "$db_h_file"
14941   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14942   else echo "$ac_t""$db_h_file" 1>&6
14943   fi
14944
14945   if test "$with_database_berkdb" != "no"; then
14946     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14947 echo "configure:14948: checking for Berkeley DB version" >&5
14948     cat > conftest.$ac_ext <<EOF
14949 #line 14950 "configure"
14950 #include "confdefs.h"
14951 #include <$db_h_file>
14952 #if DB_VERSION_MAJOR > 1
14953 yes
14954 #endif
14955
14956 EOF
14957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14958   egrep "yes" >/dev/null 2>&1; then
14959   rm -rf conftest*
14960   cat > conftest.$ac_ext <<EOF
14961 #line 14962 "configure"
14962 #include "confdefs.h"
14963 #include <$db_h_file>
14964 #if DB_VERSION_MAJOR > 2
14965 yes
14966 #endif
14967
14968 EOF
14969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14970   egrep "yes" >/dev/null 2>&1; then
14971   rm -rf conftest*
14972   echo "$ac_t""3" 1>&6; dbfunc=db_create
14973 else
14974   rm -rf conftest*
14975   
14976     echo "$ac_t""2" 1>&6; dbfunc=db_open
14977 fi
14978 rm -f conftest*
14979
14980 else
14981   rm -rf conftest*
14982   
14983     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14984 fi
14985 rm -f conftest*
14986
14987     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14988 echo "configure:14989: checking for $dbfunc" >&5
14989
14990 cat > conftest.$ac_ext <<EOF
14991 #line 14992 "configure"
14992 #include "confdefs.h"
14993 /* System header to define __stub macros and hopefully few prototypes,
14994     which can conflict with char $dbfunc(); below.  */
14995 #include <assert.h>
14996 /* Override any gcc2 internal prototype to avoid an error.  */
14997 /* We use char because int might match the return type of a gcc2
14998     builtin and then its argument prototype would still apply.  */
14999 char $dbfunc();
15000
15001 int main() {
15002
15003 /* The GNU C library defines this for functions which it implements
15004     to always fail with ENOSYS.  Some functions are actually named
15005     something starting with __ and the normal name is an alias.  */
15006 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
15007 choke me
15008 #else
15009 $dbfunc();
15010 #endif
15011
15012 ; return 0; }
15013 EOF
15014 if { (eval echo configure:15015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15015   rm -rf conftest*
15016   eval "ac_cv_func_$dbfunc=yes"
15017 else
15018   echo "configure: failed program was:" >&5
15019   cat conftest.$ac_ext >&5
15020   rm -rf conftest*
15021   eval "ac_cv_func_$dbfunc=no"
15022 fi
15023 rm -f conftest*
15024
15025 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
15026   echo "$ac_t""yes" 1>&6
15027   with_database_berkdb=yes need_libdb=no
15028 else
15029   echo "$ac_t""no" 1>&6
15030
15031     
15032 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
15033 echo "configure:15034: checking for $dbfunc in -ldb" >&5
15034 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
15035
15036 xe_check_libs=" -ldb "
15037 cat > conftest.$ac_ext <<EOF
15038 #line 15039 "configure"
15039 #include "confdefs.h"
15040 /* Override any gcc2 internal prototype to avoid an error.  */
15041 /* We use char because int might match the return type of a gcc2
15042     builtin and then its argument prototype would still apply.  */
15043 char $dbfunc();
15044
15045 int main() {
15046 $dbfunc()
15047 ; return 0; }
15048 EOF
15049 if { (eval echo configure:15050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15050   rm -rf conftest*
15051   eval "ac_cv_lib_$ac_lib_var=yes"
15052 else
15053   echo "configure: failed program was:" >&5
15054   cat conftest.$ac_ext >&5
15055   rm -rf conftest*
15056   eval "ac_cv_lib_$ac_lib_var=no"
15057 fi
15058 rm -f conftest*
15059 xe_check_libs=""
15060
15061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15062   echo "$ac_t""yes" 1>&6
15063   with_database_berkdb=yes need_libdb=yes
15064 else
15065   echo "$ac_t""no" 1>&6
15066 fi
15067
15068
15069 fi
15070
15071   fi
15072
15073   if test "$with_database_berkdb" = "yes"; then
15074     { test "$extra_verbose" = "yes" && cat << EOF
15075     Defining DB_H_FILE = "$db_h_file"
15076 EOF
15077 cat >> confdefs.h <<EOF
15078 #define DB_H_FILE "$db_h_file"
15079 EOF
15080 }
15081
15082     { test "$extra_verbose" = "yes" && cat << \EOF
15083     Defining HAVE_BERKELEY_DB
15084 EOF
15085 cat >> confdefs.h <<\EOF
15086 #define HAVE_BERKELEY_DB 1
15087 EOF
15088 }
15089
15090     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
15091   else with_database_berkdb=no
15092   fi
15093 fi
15094
15095 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
15096      != "no no no"; then
15097   { test "$extra_verbose" = "yes" && cat << \EOF
15098     Defining HAVE_DATABASE
15099 EOF
15100 cat >> confdefs.h <<\EOF
15101 #define HAVE_DATABASE 1
15102 EOF
15103 }
15104
15105   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
15106    echo "    xemacs will be linked with \"database.o\""
15107  fi
15108   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
15109     { test "$extra_verbose" = "yes" && cat << \EOF
15110     Defining HAVE_CHISE
15111 EOF
15112 cat >> confdefs.h <<\EOF
15113 #define HAVE_CHISE 1
15114 EOF
15115 }
15116
15117   fi
15118 fi
15119
15120 if test "$with_socks" = "yes"; then
15121   
15122 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
15123 echo "configure:15124: checking for SOCKSinit in -lsocks" >&5
15124 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
15125
15126 xe_check_libs=" -lsocks "
15127 cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 /* Override any gcc2 internal prototype to avoid an error.  */
15131 /* We use char because int might match the return type of a gcc2
15132     builtin and then its argument prototype would still apply.  */
15133 char SOCKSinit();
15134
15135 int main() {
15136 SOCKSinit()
15137 ; return 0; }
15138 EOF
15139 if { (eval echo configure:15140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15140   rm -rf conftest*
15141   eval "ac_cv_lib_$ac_lib_var=yes"
15142 else
15143   echo "configure: failed program was:" >&5
15144   cat conftest.$ac_ext >&5
15145   rm -rf conftest*
15146   eval "ac_cv_lib_$ac_lib_var=no"
15147 fi
15148 rm -f conftest*
15149 xe_check_libs=""
15150
15151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15152   echo "$ac_t""yes" 1>&6
15153     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
15154     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
15155   { test "$extra_verbose" = "yes" && cat << EOF
15156     Defining $ac_tr_lib
15157 EOF
15158 cat >> confdefs.h <<EOF
15159 #define $ac_tr_lib 1
15160 EOF
15161 }
15162
15163   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
15164
15165 else
15166   echo "$ac_t""no" 1>&6
15167 fi
15168
15169
15170   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
15171     Defining HAVE_SOCKS
15172 EOF
15173 cat >> confdefs.h <<\EOF
15174 #define HAVE_SOCKS 1
15175 EOF
15176 }
15177
15178 fi
15179
15180 if test "$usage_tracking" = "yes"; then
15181   { test "$extra_verbose" = "yes" && cat << \EOF
15182     Defining USAGE_TRACKING
15183 EOF
15184 cat >> confdefs.h <<\EOF
15185 #define USAGE_TRACKING 1
15186 EOF
15187 }
15188
15189   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
15190 fi
15191
15192 if test "$with_modules" != "no"; then
15193   echo "checking for module support" 1>&6
15194 echo "configure:15195: checking for module support" >&5
15195
15196     if test "$with_msw" = "yes"; then
15197     have_dl=yes;
15198   else
15199         case "$opsys" in
15200       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
15201     Defining HAVE_DYLD
15202 EOF
15203 cat >> confdefs.h <<\EOF
15204 #define HAVE_DYLD 1
15205 EOF
15206 }
15207  ;;
15208       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
15209 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
15210 echo "configure:15211: checking for dlfcn.h" >&5
15211
15212 cat > conftest.$ac_ext <<EOF
15213 #line 15214 "configure"
15214 #include "confdefs.h"
15215 #include <dlfcn.h>
15216 EOF
15217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15218 { (eval echo configure:15219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15220 if test -z "$ac_err"; then
15221   rm -rf conftest*
15222   eval "ac_cv_header_$ac_safe=yes"
15223 else
15224   echo "$ac_err" >&5
15225   echo "configure: failed program was:" >&5
15226   cat conftest.$ac_ext >&5
15227   rm -rf conftest*
15228   eval "ac_cv_header_$ac_safe=no"
15229 fi
15230 rm -f conftest*
15231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15232   echo "$ac_t""yes" 1>&6
15233   
15234            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
15235 echo "configure:15236: checking for dlopen in -lc" >&5
15236            cat > conftest.$ac_ext <<EOF
15237 #line 15238 "configure"
15238 #include "confdefs.h"
15239 #include <dlfcn.h>
15240 int main() {
15241               dlopen ("", 0);
15242 ; return 0; }
15243 EOF
15244 if { (eval echo configure:15245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15245   rm -rf conftest*
15246    have_dl=yes 
15247 else
15248   echo "configure: failed program was:" >&5
15249   cat conftest.$ac_ext >&5
15250   rm -rf conftest*
15251   
15252                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
15253 echo "configure:15254: checking for dlopen in -ldl" >&5
15254                ac_save_LIBS="$LIBS"
15255                LIBS="-ldl $LIBS"
15256                cat > conftest.$ac_ext <<EOF
15257 #line 15258 "configure"
15258 #include "confdefs.h"
15259 #include <dlfcn.h>
15260 int main() {
15261                  dlopen ("", 0);
15262 ; return 0; }
15263 EOF
15264 if { (eval echo configure:15265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15265   rm -rf conftest*
15266    have_dl=yes 
15267 else
15268   echo "configure: failed program was:" >&5
15269   cat conftest.$ac_ext >&5
15270   rm -rf conftest*
15271   LIBS="$ac_save_LIBS"
15272 fi
15273 rm -f conftest*
15274                ac_save_LIBS=
15275 fi
15276 rm -f conftest*
15277 else
15278   echo "$ac_t""no" 1>&6
15279 fi
15280
15281         if test -n "$have_dl"; then
15282            { test "$extra_verbose" = "yes" && cat << \EOF
15283     Defining HAVE_DLOPEN
15284 EOF
15285 cat >> confdefs.h <<\EOF
15286 #define HAVE_DLOPEN 1
15287 EOF
15288 }
15289
15290         else
15291            
15292 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
15293 echo "configure:15294: checking for shl_load in -ldld" >&5
15294 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
15295
15296 xe_check_libs=" -ldld "
15297 cat > conftest.$ac_ext <<EOF
15298 #line 15299 "configure"
15299 #include "confdefs.h"
15300 /* Override any gcc2 internal prototype to avoid an error.  */
15301 /* We use char because int might match the return type of a gcc2
15302     builtin and then its argument prototype would still apply.  */
15303 char shl_load();
15304
15305 int main() {
15306 shl_load()
15307 ; return 0; }
15308 EOF
15309 if { (eval echo configure:15310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15310   rm -rf conftest*
15311   eval "ac_cv_lib_$ac_lib_var=yes"
15312 else
15313   echo "configure: failed program was:" >&5
15314   cat conftest.$ac_ext >&5
15315   rm -rf conftest*
15316   eval "ac_cv_lib_$ac_lib_var=no"
15317 fi
15318 rm -f conftest*
15319 xe_check_libs=""
15320
15321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15322   echo "$ac_t""yes" 1>&6
15323   libdl=dld have_dl=yes;
15324            { test "$extra_verbose" = "yes" && cat << \EOF
15325     Defining HAVE_SHL_LOAD
15326 EOF
15327 cat >> confdefs.h <<\EOF
15328 #define HAVE_SHL_LOAD 1
15329 EOF
15330 }
15331
15332 else
15333   echo "$ac_t""no" 1>&6
15334
15335 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
15336 echo "configure:15337: checking for dld_init in -ldld" >&5
15337 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
15338
15339 xe_check_libs=" -ldld "
15340 cat > conftest.$ac_ext <<EOF
15341 #line 15342 "configure"
15342 #include "confdefs.h"
15343 /* Override any gcc2 internal prototype to avoid an error.  */
15344 /* We use char because int might match the return type of a gcc2
15345     builtin and then its argument prototype would still apply.  */
15346 char dld_init();
15347
15348 int main() {
15349 dld_init()
15350 ; return 0; }
15351 EOF
15352 if { (eval echo configure:15353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15353   rm -rf conftest*
15354   eval "ac_cv_lib_$ac_lib_var=yes"
15355 else
15356   echo "configure: failed program was:" >&5
15357   cat conftest.$ac_ext >&5
15358   rm -rf conftest*
15359   eval "ac_cv_lib_$ac_lib_var=no"
15360 fi
15361 rm -f conftest*
15362 xe_check_libs=""
15363
15364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15365   echo "$ac_t""yes" 1>&6
15366   libdl=dld have_dl=yes;
15367            { test "$extra_verbose" = "yes" && cat << \EOF
15368     Defining HAVE_DLD_INIT
15369 EOF
15370 cat >> confdefs.h <<\EOF
15371 #define HAVE_DLD_INIT 1
15372 EOF
15373 }
15374
15375 else
15376   echo "$ac_t""no" 1>&6
15377 fi
15378
15379
15380 fi
15381
15382
15383         fi
15384     ;;
15385     esac
15386   fi 
15387   if test -n "$have_dl"; then
15388         
15389 dll_ld=
15390 dll_ldflags=
15391 dll_cflags=
15392 dll_post=
15393 dll_ldo="-o"
15394 ld_dynamic_link_flags=
15395 xehost=$canonical
15396 xealias=$internal_configuration
15397
15398 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
15399 echo "configure:15400: checking how to build dynamic libraries for ${xehost}" >&5
15400 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
15401 case "$xehost" in
15402 *-*-linux-gnu*) ;;
15403 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
15404 esac
15405
15406 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
15407 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
15408 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
15409
15410 case "$xehost_os" in
15411 aix3*)
15412   # AIX sometimes has problems with the GCC collect2 program.  For some
15413   # reason, if we set the COLLECT_NAMES environment variable, the problems
15414   # vanish in a puff of smoke.
15415   if test "${COLLECT_NAMES+set}" != set; then
15416     COLLECT_NAMES=
15417     export COLLECT_NAMES
15418   fi
15419   ;;
15420 esac
15421
15422 # Now see if the compiler is really GCC.
15423 if test "$GCC" = "yes"; then
15424   XEGCC=yes
15425 else
15426   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
15427 echo "configure:15428: checking checking whether we are using GNU C" >&5
15428   cat > conftest.$ac_ext <<EOF
15429 #line 15430 "configure"
15430 #include "confdefs.h"
15431
15432 #ifdef __GNUC__
15433   yes;
15434 #endif
15435
15436 EOF
15437 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15438   egrep "yes" >/dev/null 2>&1; then
15439   rm -rf conftest*
15440   XEGCC=yes
15441 else
15442   rm -rf conftest*
15443   XEGCC=no
15444 fi
15445 rm -f conftest*
15446
15447   echo "$ac_t""${XEGCC}" 1>&6
15448 fi
15449
15450 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
15451 echo "configure:15452: checking how to produce PIC code" >&5
15452 wl=
15453
15454 can_build_shared=yes
15455 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15456   wl='-Wl,'
15457
15458   case "$xehost_os" in
15459   aix[3-9]* | irix[5-9]* | osf[3-9])
15460     # PIC is the default for these OSes.
15461     ;;
15462
15463   os2*)
15464     # We can build DLLs from non-PIC.
15465     ;;
15466   amigaos*)
15467     # FIXME: we need at least 68020 code to build shared libraries, but
15468     # adding the `-m68020' flag to GCC prevents building anything better,
15469     # like `-m68040'.
15470     dll_cflags='-m68020 -resident32 -malways-restore-a4'
15471     ;;
15472   *cygwin* | *mingw* )
15473     # PIC is the default
15474     ;;
15475   *)
15476     dll_cflags='-fPIC'
15477     ;;
15478   esac
15479 else
15480   # PORTME Check for PIC flags for the system compiler.
15481   case "$xehost_os" in
15482   hpux9* | hpux1[0-9]*)
15483     # Is there a better link_static_flag that works with the bundled CC?
15484     wl='-Wl,'
15485     dll_cflags='+Z'
15486     ;;
15487
15488   irix[5-9]*)
15489     wl='-Wl,'
15490     # PIC (with -KPIC) is the default.
15491     ;;
15492
15493   os2*)
15494     # We can build DLLs from non-PIC.
15495     ;;
15496
15497   osf[3-9]*)
15498     # All OSF/1 code is PIC.
15499     wl='-Wl,'
15500     ;;
15501
15502   aix[3-9]*)
15503     # All AIX code is PIC.
15504     wl='-Wl,'
15505     ;;
15506
15507   sco3.2v5*)
15508     dll_cflags='-belf -Kpic'
15509     wl='-Wl,'
15510     ;;
15511
15512   unixware*)
15513     dll_cflags="-KPIC"
15514     wl="-Wl,"
15515     ;;
15516
15517   sysv4*)
15518     dll_cflags="-KPIC"
15519     wl="-Wl,"
15520     ;;
15521
15522   sysv5*)
15523     dll_cflags="-KPIC"
15524     wl="-Wl,"
15525     ;;
15526
15527   solaris2*)
15528     dll_cflags='-KPIC'
15529     wl='-Wl,'
15530     ;;
15531
15532   sunos4*)
15533     dll_cflags='-PIC'
15534     wl='-Qoption ld '
15535     ;;
15536
15537   uts4*)
15538     dll_cflags='-pic'
15539     ;;
15540
15541   *)
15542     can_build_shared=no
15543     ;;
15544   esac
15545 fi
15546
15547 if test -n "$dll_cflags"; then
15548   echo "$ac_t""${dll_cflags}" 1>&6
15549
15550   # Check to make sure the dll_cflags actually works.
15551   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
15552 echo "configure:15553: checking if PIC flag ${dll_cflags} really works" >&5
15553   save_CFLAGS="$CFLAGS"
15554   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15555   cat > conftest.$ac_ext <<EOF
15556 #line 15557 "configure"
15557 #include "confdefs.h"
15558
15559 int main() {
15560 int x=0;
15561 ; return 0; }
15562 EOF
15563 if { (eval echo configure:15564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15564   rm -rf conftest*
15565   
15566     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15567     # reports no error.  So, we need to grep stderr for (Bundled).
15568     if grep '(Bundled)' config.log >/dev/null; then
15569       echo "$ac_t""no" 1>&6
15570       can_build_shared=no
15571       dll_cflags=
15572     else
15573       echo "$ac_t""yes" 1>&6
15574     fi
15575 else
15576   echo "configure: failed program was:" >&5
15577   cat conftest.$ac_ext >&5
15578   rm -rf conftest*
15579   echo "$ac_t""no" 1>&6
15580     can_build_shared=no
15581     dll_cflags=
15582 fi
15583 rm -f conftest*
15584   CFLAGS="$save_CFLAGS"
15585 else
15586   echo "$ac_t""none" 1>&6
15587 fi
15588
15589 if test "$can_build_shared" = "yes"; then
15590 cc_produces_so=no
15591 xldf=
15592 xcldf=
15593 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15594 echo "configure:15595: checking if C compiler can produce shared libraries" >&5
15595 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15596   xcldf="-shared"
15597   xldf="-shared"
15598 else # Not using GCC
15599   case "$xehost_os" in
15600     aix[3-9]*)
15601       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15602       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15603       ;;
15604
15605     freebsd2* | netbsd* | openbsd*)
15606       xldf="-Bshareable"
15607       xcldf="${wl}-Bshareable"
15608       ;;
15609
15610     freebsd3*)
15611       xcldf="-shared"
15612       ;;
15613
15614     hpux*)
15615       xldf="-b +s"
15616       xcldf="${wl}-b ${wl}+s"
15617       ;;
15618
15619     irix[5-9]* | osf[3-9]*)
15620       xcldf="${wl}-shared"
15621       xldf="-shared"
15622       ;;
15623
15624     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15625       xcldf="-G"
15626       xldf="-G"
15627       ;;
15628
15629     sunos4*)
15630       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15631       xldf="-assert pure-text -Bstatic"
15632       ;;
15633   esac
15634 fi # End if if we are using gcc
15635
15636 if test -n "$xcldf"; then
15637   save_LDFLAGS=$LDFLAGS
15638   save_LIBS=$LIBS
15639   save_xe_libs=$xe_libs
15640   LDFLAGS="$xcldf $LDFLAGS"
15641   LIBS=
15642   xe_libs=
15643   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15644   cat > conftest.$ac_ext <<EOF
15645 #line 15646 "configure"
15646 #include "confdefs.h"
15647
15648 int main() {
15649 int x=0;
15650 ; return 0; }
15651 EOF
15652 if { (eval echo configure:15653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15653   rm -rf conftest*
15654   cc_produces_so=yes
15655 else
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   cc_produces_so=no
15660 fi
15661 rm -f conftest*
15662   LDFLAGS=$save_LDFLAGS
15663   LIBS=$save_LIBS
15664   xe_libs=$save_xe_libs
15665   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15666 else
15667   cc_produces_so=no
15668 fi
15669 echo "$ac_t""${cc_produces_so}" 1>&6
15670
15671 LTLD=$LD
15672 if test -z "$LTLD"; then
15673   ac_prog=ld
15674   if test "$XEGCC" = yes; then
15675     # Check if gcc -print-prog-name=ld gives a path.
15676     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15677 echo "configure:15678: checking for ld used by GCC" >&5
15678     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15679     case "$ac_prog" in
15680     # Accept absolute paths.
15681     /*)
15682       if test -z "$LTLD"; then
15683 #        case "$ac_prog" in
15684 #          *gcc-lib*) LTLD="$CC"
15685 #                     ;;
15686 #          *)
15687          LTLD="$ac_prog"
15688 #                     ;;
15689 #        esac
15690       fi
15691       ;;
15692     "")
15693       # If it fails, then pretend we aren't using GCC.
15694       ac_prog=ld
15695       ;;
15696     *)
15697       # If it is relative, then search for the first ld in PATH.
15698       with_gnu_ld=unknown
15699       ;;
15700     esac
15701   else
15702     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15703 echo "configure:15704: checking for GNU ld" >&5
15704   fi
15705
15706   if test -z "$LTLD"; then
15707     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15708     for ac_dir in $PATH; do
15709       test -z "$ac_dir" && ac_dir=.
15710       if test -f "$ac_dir/$ac_prog"; then
15711         LTLD="$ac_dir/$ac_prog"
15712         # Check to see if the program is GNU ld.  I'd rather use --version,
15713         # but apparently some GNU ld's only accept -v.
15714         # Break only if it was the GNU/non-GNU ld that we prefer.
15715         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15716           xe_gnu_ld=yes
15717         else
15718           xe_gnu_ld=no
15719         fi
15720       fi
15721     done
15722     IFS="$ac_save_ifs"
15723   fi
15724
15725   if test -n "$LTLD"; then
15726     echo "$ac_t""${LTLD}" 1>&6
15727   else
15728     echo "$ac_t""no" 1>&6
15729   fi
15730
15731   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15732     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15733     exit 1
15734   fi
15735 fi
15736
15737 ld_dynamic_link_flags=
15738
15739 # Check to see if it really is or isn't GNU ld.
15740 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15741 echo "configure:15742: checking if the linker is GNU ld" >&5
15742 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15743 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15744   xe_gnu_ld=yes
15745 else
15746   xe_gnu_ld=no
15747 fi
15748 echo "$ac_t""${xe_gnu_ld}" 1>&6
15749
15750 case "$xehost_os" in
15751   amigaos* | sunos4*)
15752     # On these operating systems, we should treat GNU ld like the system ld.
15753     gnu_ld_acts_native=yes
15754     ;;
15755   *)
15756     gnu_ld_acts_native=no
15757     ;;
15758 esac
15759
15760 if test "$cc_produces_so" = "yes"; then
15761   dll_ld=$CC
15762   dll_ldflags=$xcldf
15763   can_build_shared=yes
15764   ld_shlibs=yes
15765 else
15766   # OK - only NOW do we futz about with ld.
15767   # See if the linker supports building shared libraries.
15768   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15769 echo "configure:15770: checking whether the linker supports shared libraries" >&5
15770   dll_ld=$CC
15771   dll_ldflags=$LDFLAGS
15772   ld_shlibs=yes
15773   can_build_shared=yes
15774   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15775     # See if GNU ld supports shared libraries.
15776     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15777       dll_ld=$CC
15778       dll_ldflags="-shared"
15779       ld_shlibs=yes
15780     else
15781       ld_shlibs=no
15782     fi
15783   else
15784     # PORTME fill in a description of your system's linker (not GNU ld)
15785     case "$xehost_os" in
15786     aix3*)
15787       dll_ld=$LTLD
15788       dll_ldflags=$xldf
15789       ;;
15790
15791     aix[4-9]*)
15792       dll_ldflags=$xcldf
15793       ;;
15794
15795     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15796     # support.  Future versions do this automatically, but an explicit c++rt0.o
15797     # doesn't break anything, and helps significantly (at the cost of a little
15798     # extra space).
15799     freebsd2.2*)
15800       dll_ld=$LTLD
15801       dll_ldflags=$xldf
15802       dll_post="/usr/lib/c++rt0.o"
15803       ;;
15804
15805     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15806     freebsd2*)
15807       dll_ld=$LTLD
15808       dll_ldflags="-Bshareable"
15809       ;;
15810
15811     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15812     freebsd3*)
15813       dll_ldflags="-shared"
15814       ;;
15815
15816     hpux*)
15817       dll_ld=$LTLD
15818       dll_ldflags=$xldf
15819       ;;
15820
15821     irix[5-9]*)
15822       dll_ld=$LTLD
15823       dll_ldflags=$xldf
15824       ;;
15825
15826     netbsd*)
15827       # Tested with NetBSD 1.2 ld
15828       dll_ld=$LTLD
15829       dll_ldflags=$xldf
15830       ;;
15831
15832     openbsd*)
15833       dll_ld=$LTLD
15834       dll_ldflags=$xldf
15835       ;;
15836
15837     osf3* | osf4*)
15838       dll_ld=$LTLD
15839       dll_ldflags=$xldf
15840       ;;
15841
15842     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15843     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15844       dll_ld=$LTLD
15845       case "$dll_ld" in
15846         *gcc*) dll_ldflags="-shared"
15847                dll_ld=$CC
15848                ;;
15849         *)     dll_ldflags="-G"
15850                ;;
15851       esac
15852       ;;
15853
15854     sunos4*)
15855       if test "$XEGCC" = yes; then
15856         dll_ld=$CC
15857       else
15858         dll_ld=$LTLD
15859       fi
15860       dll_ldflags=$xldf
15861       ;;
15862
15863     uts4*)
15864       dll_ld=$LTLD
15865       dll_ldflags="-G"
15866       ;;
15867
15868     bsdi*)
15869       dll_ldflags="-r"
15870       dll_ld="shlicc2"
15871       ;;
15872
15873     *)
15874       ld_shlibs=no
15875       can_build_shared=no
15876       ;;
15877     esac
15878   fi
15879   echo "$ac_t""${ld_shlibs}" 1>&6
15880   if test "$ld_shlibs" = "no"; then
15881     can_build_shared=no
15882   fi
15883 fi # End of if cc_produces_so = no
15884
15885
15886 if test "$xe_gnu_ld" = yes; then
15887   if test "$ld_shlibs" = yes; then
15888     ld_dynamic_link_flags="${wl}-export-dynamic"
15889   fi
15890 fi
15891
15892 if test -z "$ld_dynamic_link_flags"; then
15893   case "$xehost_os" in
15894   aix[3-9]*)
15895     ld_dynamic_link_flags=
15896     ;;
15897
15898   freebsd2.2*)
15899     ld_dynamic_link_flags=
15900     ;;
15901
15902   freebsd2*)
15903     ld_dynamic_link_flags=
15904     ;;
15905
15906   freebsd3*)
15907     ld_dynamic_link_flags=
15908     ;;
15909
15910   hpux*)
15911     ld_dynamic_link_flags="${wl}-E"
15912     ;;
15913
15914   irix[5-9]*)
15915     ld_dynamic_link_flags=
15916     ;;
15917
15918   netbsd*)
15919     ld_dynamic_link_flags=
15920     ;;
15921
15922   openbsd*)
15923     ld_dynamic_link_flags=
15924     ;;
15925
15926   osf3* | osf4*)
15927     ld_dynamic_link_flags=
15928     ;;
15929
15930   solaris2* | solaris7*)
15931     ld_dynamic_link_flags=
15932     ;;
15933
15934   sco3.2v5* | unixware* | sysv5* | sysv4*)
15935     ld_dynamic_link_flags="${wl}-Bexport"
15936     ;;
15937
15938   sunos4*)
15939     ld_dynamic_link_flags=
15940     ;;
15941
15942   uts4*)
15943     ld_dynamic_link_flags=
15944     ;;
15945
15946   bsdi*)
15947     ld_dynamic_link_flags=
15948     ;;
15949
15950   esac
15951 fi # End of if -z ld_dynamic_link_flags
15952 fi # End of if test "$can_build_shared" = "yes"
15953
15954
15955
15956
15957
15958
15959
15960
15961   fi
15962
15963   if test "$can_build_shared" = "yes"; then
15964     { test "$extra_verbose" = "yes" && cat << \EOF
15965     Defining HAVE_SHLIB
15966 EOF
15967 cat >> confdefs.h <<\EOF
15968 #define HAVE_SHLIB 1
15969 EOF
15970 }
15971
15972     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15973    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15974  fi
15975     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15976     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15977     for ac_func in dlerror _dlerror
15978 do
15979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15980 echo "configure:15981: checking for $ac_func" >&5
15981
15982 cat > conftest.$ac_ext <<EOF
15983 #line 15984 "configure"
15984 #include "confdefs.h"
15985 /* System header to define __stub macros and hopefully few prototypes,
15986     which can conflict with char $ac_func(); below.  */
15987 #include <assert.h>
15988 /* Override any gcc2 internal prototype to avoid an error.  */
15989 /* We use char because int might match the return type of a gcc2
15990     builtin and then its argument prototype would still apply.  */
15991 char $ac_func();
15992
15993 int main() {
15994
15995 /* The GNU C library defines this for functions which it implements
15996     to always fail with ENOSYS.  Some functions are actually named
15997     something starting with __ and the normal name is an alias.  */
15998 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15999 choke me
16000 #else
16001 $ac_func();
16002 #endif
16003
16004 ; return 0; }
16005 EOF
16006 if { (eval echo configure:16007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16007   rm -rf conftest*
16008   eval "ac_cv_func_$ac_func=yes"
16009 else
16010   echo "configure: failed program was:" >&5
16011   cat conftest.$ac_ext >&5
16012   rm -rf conftest*
16013   eval "ac_cv_func_$ac_func=no"
16014 fi
16015 rm -f conftest*
16016
16017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16018   echo "$ac_t""yes" 1>&6
16019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16020   { test "$extra_verbose" = "yes" && cat << EOF
16021     Defining $ac_tr_func
16022 EOF
16023 cat >> confdefs.h <<EOF
16024 #define $ac_tr_func 1
16025 EOF
16026 }
16027  
16028 else
16029   echo "$ac_t""no" 1>&6
16030 fi
16031 done
16032
16033     with_modules=yes
16034   else
16035     if test "$with_modules" = "yes"; then
16036       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
16037     else
16038       echo "configure: warning: "Module support cannot be provided."" 1>&2
16039     fi
16040     with_modules=no
16041   fi
16042 fi
16043
16044 cat > conftest.$ac_ext <<EOF
16045 #line 16046 "configure"
16046 #include "confdefs.h"
16047 int main(int c,char *v[]){return 0;}
16048 EOF
16049 if { (eval echo configure:16050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
16050 then
16051   :
16052 else
16053   conftest_rc="$?"
16054   echo "configure: failed program was:" >&5
16055   cat conftest.$ac_ext >&5
16056   rm -fr conftest*
16057   
16058   echo ""
16059   echo "*** PANIC *** configure forgot how to build working executables!"
16060   echo ""
16061   echo "*** This is most commonly due to an unforeseen environment, causing"
16062   echo "*** configure to incorrectly compute the sequence of libraries to link."
16063   echo "*** Please examine the tail of config.log for runtime errors."
16064   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
16065   echo "*** Often adding or removing explicit options in the configure"
16066   echo "*** invocation can work around this kind of problem.  If so, please"
16067   echo "*** report it as a bug to xemacs-beta@xemacs.org."
16068   echo "***"
16069   echo "*** Other possible causes are inability to write to the file system"
16070   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
16071   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
16072   echo "*** necessary.  On other systems, try telling configure where to find"
16073   echo "*** the shared libraries using the --site-runtime-libraries option."
16074   echo "***"
16075   echo "*** Another way to shoot yourself in the foot is to specify"
16076   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
16077   echo "*** system.  Don't do that."
16078   exit 1
16079 fi
16080 rm -fr conftest*
16081
16082 if test "$win32_processes" = "yes"; then
16083   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
16084    echo "    xemacs will be linked with \"process-nt.o\""
16085  fi
16086 else
16087   { test "$extra_verbose" = "yes" && cat << \EOF
16088     Defining HAVE_UNIX_PROCESSES
16089 EOF
16090 cat >> confdefs.h <<\EOF
16091 #define HAVE_UNIX_PROCESSES 1
16092 EOF
16093 }
16094
16095   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
16096    echo "    xemacs will be linked with \"process-unix.o\""
16097  fi
16098 fi
16099
16100
16101
16102 T=""
16103 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16104 CFLAGS="$T"
16105
16106
16107 T=""
16108 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16109 extra_objs="$T"
16110
16111
16112 T=""
16113 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
16114 c_switch_general="$T"
16115
16116
16117 T=""
16118 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
16119 c_switch_window_system="$T"
16120
16121
16122 T=""
16123 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16124 c_switch_all="$T"
16125
16126
16127 T=""
16128 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
16129 ld_switch_general="$T"
16130
16131
16132 T=""
16133 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16134 ld_switch_window_system="$T"
16135
16136
16137 T=""
16138 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16139 ld_switch_all="$T"
16140
16141
16142 T=""
16143 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16144 ld_libs_general="$T"
16145
16146
16147 T=""
16148 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
16149 ld_libs_window_system="$T"
16150
16151
16152 T=""
16153 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16154 ld_libs_all="$T"
16155
16156
16157
16158 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
16159 internal_makefile_list="Makefile.in"
16160 SUBDIR_MAKEFILES=''
16161 test -d lock || mkdir lock
16162 for dir in $MAKE_SUBDIR; do
16163   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
16164         test -d "$d" || mkdir "$d"; cd "$d"
16165       done ) ;;
16166    * ) test -d "$dir" || mkdir "$dir" ;;
16167   esac
16168   
16169 T=""
16170 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16171 SUBDIR_MAKEFILES="$T"
16172
16173   
16174 T=""
16175 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16176 internal_makefile_list="$T"
16177
16178 done
16179
16180
16181
16182
16183 for dir in src/s src/m; do
16184   if test ! -d "$dir" ; then
16185     echo Making symbolic link to "$srcdir/$dir"
16186     ${LN_S} "$srcdir/$dir" "$dir"
16187   fi
16188 done
16189
16190 if test "$extra_verbose" = "yes"; then
16191   echo ""
16192   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
16193   echo ""
16194 fi
16195
16196
16197 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
16198   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
16199   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
16200 fi
16201
16202 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
16203   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
16204   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
16205 fi
16206
16207 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
16208   test "$extra_verbose" = "yes" && echo "creating TAGS"
16209   echo "\f
16210 $srcdir/TAGS,include" > "TAGS"
16211 fi
16212
16213 if test "$__SUNPRO_C" = "yes"; then
16214   test "$extra_verbose" = "yes" && echo "creating .sbinit"
16215   ( echo "# For use with Sun WorkShop's Source browser."
16216     echo "# See sbquery(1) and sbinit(4) for more information"
16217     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
16218   ) > .sbinit
16219 fi
16220
16221 rm -f core
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242 PREFIX=$prefix
16243 while true; do
16244   case "$PREFIX" in
16245     *\$* ) eval "PREFIX=$PREFIX" ;;
16246     *) break ;;
16247   esac
16248 done
16249
16250
16251
16252
16253 EXEC_PREFIX=$exec_prefix
16254 while true; do
16255   case "$EXEC_PREFIX" in
16256     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
16257     *) break ;;
16258   esac
16259 done
16260
16261
16262
16263
16264 INFODIR=$infodir
16265 while true; do
16266   case "$INFODIR" in
16267     *\$* ) eval "INFODIR=$INFODIR" ;;
16268     *) break ;;
16269   esac
16270 done
16271
16272
16273
16274
16275 INFOPATH=$infopath
16276 while true; do
16277   case "$INFOPATH" in
16278     *\$* ) eval "INFOPATH=$INFOPATH" ;;
16279     *) break ;;
16280   esac
16281 done
16282
16283
16284
16285
16286 PACKAGE_PATH=$package_path
16287 while true; do
16288   case "$PACKAGE_PATH" in
16289     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
16290     *) break ;;
16291   esac
16292 done
16293
16294
16295
16296
16297 LISPDIR=$lispdir
16298 while true; do
16299   case "$LISPDIR" in
16300     *\$* ) eval "LISPDIR=$LISPDIR" ;;
16301     *) break ;;
16302   esac
16303 done
16304
16305
16306
16307
16308 MODULEDIR=$moduledir
16309 while true; do
16310   case "$MODULEDIR" in
16311     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
16312     *) break ;;
16313   esac
16314 done
16315
16316
16317
16318
16319 SITELISPDIR=$sitelispdir
16320 while true; do
16321   case "$SITELISPDIR" in
16322     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
16323     *) break ;;
16324   esac
16325 done
16326
16327
16328
16329
16330 SITEMODULEDIR=$sitemoduledir
16331 while true; do
16332   case "$SITEMODULEDIR" in
16333     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
16334     *) break ;;
16335   esac
16336 done
16337
16338
16339
16340
16341 ETCDIR=$etcdir
16342 while true; do
16343   case "$ETCDIR" in
16344     *\$* ) eval "ETCDIR=$ETCDIR" ;;
16345     *) break ;;
16346   esac
16347 done
16348
16349
16350
16351
16352 DOCDIR=$docdir
16353 while true; do
16354   case "$DOCDIR" in
16355     *\$* ) eval "DOCDIR=$DOCDIR" ;;
16356     *) break ;;
16357   esac
16358 done
16359
16360
16361
16362
16363 ARCHLIBDIR=$archlibdir
16364 while true; do
16365   case "$ARCHLIBDIR" in
16366     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
16367     *) break ;;
16368   esac
16369 done
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
16391
16392
16393
16394
16395
16396
16397
16398 : ${XEMACS_CC:=$CC}
16399
16400
16401 if test "$with_prefix" = "yes"; then
16402   { test "$extra_verbose" = "yes" && cat << \EOF
16403     Defining PREFIX_USER_DEFINED
16404 EOF
16405 cat >> confdefs.h <<\EOF
16406 #define PREFIX_USER_DEFINED 1
16407 EOF
16408 }
16409
16410 fi
16411
16412 if test "$with_site_lisp" = "no"; then
16413   { test "$extra_verbose" = "yes" && cat << \EOF
16414     Defining INHIBIT_SITE_LISP
16415 EOF
16416 cat >> confdefs.h <<\EOF
16417 #define INHIBIT_SITE_LISP 1
16418 EOF
16419 }
16420
16421 fi
16422 if test "$with_site_modules" = "no"; then
16423   { test "$extra_verbose" = "yes" && cat << \EOF
16424     Defining INHIBIT_SITE_MODULES
16425 EOF
16426 cat >> confdefs.h <<\EOF
16427 #define INHIBIT_SITE_MODULES 1
16428 EOF
16429 }
16430
16431 fi
16432
16433
16434 T=""
16435 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16436 ac_configure_args="$T"
16437
16438 { test "$extra_verbose" = "yes" && cat << EOF
16439     Defining EMACS_CONFIGURATION = "$configuration"
16440 EOF
16441 cat >> confdefs.h <<EOF
16442 #define EMACS_CONFIGURATION "$configuration"
16443 EOF
16444 }
16445
16446 { test "$extra_verbose" = "yes" && cat << EOF
16447     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
16448 EOF
16449 cat >> confdefs.h <<EOF
16450 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
16451 EOF
16452 }
16453
16454
16455
16456 null_string=""
16457 { test "$extra_verbose" = "yes" && cat << EOF
16458     Defining LD_SWITCH_X_SITE = $null_string
16459 EOF
16460 cat >> confdefs.h <<EOF
16461 #define LD_SWITCH_X_SITE $null_string
16462 EOF
16463 }
16464
16465 { test "$extra_verbose" = "yes" && cat << EOF
16466     Defining LD_SWITCH_X_SITE_AUX = $null_string
16467 EOF
16468 cat >> confdefs.h <<EOF
16469 #define LD_SWITCH_X_SITE_AUX $null_string
16470 EOF
16471 }
16472
16473 { test "$extra_verbose" = "yes" && cat << EOF
16474     Defining C_SWITCH_X_SITE = $null_string
16475 EOF
16476 cat >> confdefs.h <<EOF
16477 #define C_SWITCH_X_SITE $null_string
16478 EOF
16479 }
16480
16481 { test "$extra_verbose" = "yes" && cat << EOF
16482     Defining LD_SWITCH_SITE = $null_string
16483 EOF
16484 cat >> confdefs.h <<EOF
16485 #define LD_SWITCH_SITE $null_string
16486 EOF
16487 }
16488
16489 { test "$extra_verbose" = "yes" && cat << EOF
16490     Defining C_SWITCH_SITE = $null_string
16491 EOF
16492 cat >> confdefs.h <<EOF
16493 #define C_SWITCH_SITE $null_string
16494 EOF
16495 }
16496
16497
16498
16499 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16500     Defining GNU_MALLOC
16501 EOF
16502 cat >> confdefs.h <<\EOF
16503 #define GNU_MALLOC 1
16504 EOF
16505 }
16506
16507 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16508     Defining USE_SYSTEM_MALLOC
16509 EOF
16510 cat >> confdefs.h <<\EOF
16511 #define USE_SYSTEM_MALLOC 1
16512 EOF
16513 }
16514
16515 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16516     Defining USE_DEBUG_MALLOC
16517 EOF
16518 cat >> confdefs.h <<\EOF
16519 #define USE_DEBUG_MALLOC 1
16520 EOF
16521 }
16522
16523                                               { test "$extra_verbose" = "yes" && cat << \EOF
16524     Defining USE_SYSTEM_MALLOC
16525 EOF
16526 cat >> confdefs.h <<\EOF
16527 #define USE_SYSTEM_MALLOC 1
16528 EOF
16529 }
16530
16531 fi
16532 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16533     Defining I18N3
16534 EOF
16535 cat >> confdefs.h <<\EOF
16536 #define I18N3 1
16537 EOF
16538 }
16539
16540 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16541     Defining USE_GCC
16542 EOF
16543 cat >> confdefs.h <<\EOF
16544 #define USE_GCC 1
16545 EOF
16546 }
16547
16548 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16549     Defining EXTERNAL_WIDGET
16550 EOF
16551 cat >> confdefs.h <<\EOF
16552 #define EXTERNAL_WIDGET 1
16553 EOF
16554 }
16555
16556 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16557     Defining QUICK_BUILD
16558 EOF
16559 cat >> confdefs.h <<\EOF
16560 #define QUICK_BUILD 1
16561 EOF
16562 }
16563
16564 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16565     Defining PURIFY
16566 EOF
16567 cat >> confdefs.h <<\EOF
16568 #define PURIFY 1
16569 EOF
16570 }
16571
16572 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16573     Defining QUANTIFY
16574 EOF
16575 cat >> confdefs.h <<\EOF
16576 #define QUANTIFY 1
16577 EOF
16578 }
16579
16580 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16581     Defining MAIL_USE_POP
16582 EOF
16583 cat >> confdefs.h <<\EOF
16584 #define MAIL_USE_POP 1
16585 EOF
16586 }
16587
16588 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16589     Defining KERBEROS
16590 EOF
16591 cat >> confdefs.h <<\EOF
16592 #define KERBEROS 1
16593 EOF
16594 }
16595
16596 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16597     Defining HESIOD
16598 EOF
16599 cat >> confdefs.h <<\EOF
16600 #define HESIOD 1
16601 EOF
16602 }
16603
16604 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16605     Defining USE_UNION_TYPE
16606 EOF
16607 cat >> confdefs.h <<\EOF
16608 #define USE_UNION_TYPE 1
16609 EOF
16610 }
16611
16612 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16613     Defining REGEX_MALLOC
16614 EOF
16615 cat >> confdefs.h <<\EOF
16616 #define REGEX_MALLOC 1
16617 EOF
16618 }
16619
16620 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16621     Defining PDUMP
16622 EOF
16623 cat >> confdefs.h <<\EOF
16624 #define PDUMP 1
16625 EOF
16626 }
16627
16628 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16629     Defining IPV6_CANONICALIZE
16630 EOF
16631 cat >> confdefs.h <<\EOF
16632 #define IPV6_CANONICALIZE 1
16633 EOF
16634 }
16635
16636
16637
16638 (
16639 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16640 else
16641   echo "uname -a: `uname -a`"
16642 fi
16643 echo ""
16644 echo "$0 $quoted_arguments"
16645 ) > Installation
16646
16647 if test ! -z ${emacs_beta_version} ; then
16648   if test -z "${emacs_is_beta}" ; then
16649         xemacs_betaname=".${emacs_beta_version}"
16650   else
16651         xemacs_betaname="-b${emacs_beta_version}"
16652   fi
16653 else
16654   xemacs_betaname=""
16655 fi
16656
16657 (
16658 echo "
16659
16660 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16661 "
16662 echo "
16663 Compilation / Installation:"
16664 echo "  Source code location:              $srcdir"
16665 echo "  Installation prefix:               $prefix"
16666 if test -n "$site_includes"; then
16667   echo "  Additional header files:           $site_includes"
16668 fi
16669 if test -n "$site_libraries"; then
16670   echo "  Additional libraries:              $site_libraries"
16671 fi
16672 if test -n "$site_prefixes"; then
16673   echo "  Additional prefixes:               $site_prefixes"
16674 fi
16675 if test -n "$runpath"; then
16676   echo "  Runtime library search path:       $runpath"
16677 fi
16678
16679 if test -n "$opsysfile"
16680 then echo "  Operating system description file: \`$opsysfile'"
16681 else echo "  Not using any operating system description file"
16682 fi
16683 if test -n "$machfile"
16684 then echo "  Machine description file:          \`$machfile'"
16685 else echo "  Not using any machine description file"
16686 fi
16687
16688 echo "  Compiler:                          $CC $CFLAGS"
16689 case "$CC" in
16690   gcc*) echo "  Compiler version:                  `$CC --version | sed 1q`"
16691         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | sed 1q`"
16692         ;;
16693   *) case "$canonical" in
16694         *-*-aix*   ) 
16695                   realcc=`which $CC`
16696                   if test -L $realcc ; then
16697             ccdir=`dirname $realcc`
16698             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16699                     case $ccprog in
16700                 */*) realcc=$ccprog;;
16701                 *) realcc=$ccdir/$ccprog;;
16702             esac
16703           fi
16704           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16705           if test ! -z "$lpp" ; then
16706             lppstr=`lslpp -Lqc $lpp`
16707             lpplev=`echo "$lppstr" | cut -f3 -d:`
16708             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16709           fi
16710           if test ! -z "$lpplev" ; then
16711             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16712           else
16713             echo "  Compiler version:                  (unknown version)"
16714           fi
16715         ;;
16716         
16717         *-*-solaris*)
16718           ccvers=`$CC -V 2>&1 | sed 1q`
16719           if test ! -z "$ccvers" ; then
16720             echo "  Compiler version:                  $ccvers"
16721           fi
16722         ;;
16723
16724         alpha*-dec-osf*)
16725           ccvers=`$CC -V | tr '\n' ' '`
16726           if test ! -z "$ccvers" ; then
16727             echo "  Compiler version:                  $ccvers"
16728           fi
16729         ;;
16730
16731         mips-sgi-irix*)
16732           ccvers=`$CC -version`
16733           if test ! -z "$ccvers" ; then
16734             echo "  Compiler version:                  $ccvers"
16735           fi
16736         ;;
16737
16738                 i[3-9]86-pc-linux)
16739           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16740           if test ! -z "$ccvers" ; then
16741             echo "  Compiler version:                  $ccvers"
16742           fi
16743         ;;
16744           
16745         *) echo "  Compiler version:                  $CC on $canonical";;
16746   esac
16747 esac
16748
16749 echo "  Relocating allocator for buffers:  $rel_alloc"
16750 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16751 case "$ld_switch_site" in
16752   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16753     - Consider configuring with --pdump." ;;
16754 esac
16755
16756 case "$canonical" in
16757         *-*-linux*) 
16758           if test -f /etc/redhat-release ; then
16759             echo "  libc:                              `rpm -q glibc`";
16760           else
16761             echo "Need to guess glibc1/2/etc here";
16762           fi
16763         ;;
16764
16765         *-*-aix*) 
16766           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16767         ;;
16768
16769         *-*-solaris*)
16770           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16771           echo "  libc:                              SUNWcsl $libc"
16772
16773         ;;
16774
16775         mips-sgi-irix*)
16776           echo "  IRIX version:                      `uname -sRm`'"
16777         ;;
16778           
16779
16780         alpha*-dec-osf*)
16781                   (cd /usr/.smdb.;
16782                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16783                 echo "  libc:                              $libc"
16784                 
16785           )
16786         ;;
16787
16788         *) echo "  libc:                              system-provided libc on $canonical" ;;
16789 esac
16790
16791
16792 echo "
16793 Window System:"
16794 if test "$with_msw" = "yes"; then
16795   echo "  Compiling in support for the Microsoft window system."
16796 fi
16797 if test "$with_x11" = "yes"; then
16798   echo "  Compiling in support for the X window system:"
16799   echo "    - X Windows headers location:                 $x_includes"
16800   echo "    - X Windows libraries location:               $x_libraries"
16801   if test "$with_xauth" != yes; then
16802     echo "    - Xau (X authority) not available."
16803   fi
16804   if test "$with_xmu" != yes; then
16805     echo "    - Xmu library not available; substituting equivalent routines."
16806   fi
16807   if test "$with_wmcommand" != no; then
16808     echo "    - Handling WM_COMMAND properly."
16809   fi
16810 fi
16811 if test "$need_motif" = "yes" ; then
16812   echo "  Compiling in support for Motif."
16813   if test "$have_lesstif" = "yes"; then
16814     echo "    - Using LessTif implementation."
16815   fi
16816   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16817   echo "             You are likely to experience slow redisplay."
16818   echo "             You may need to install vendor patches to Motif."
16819   echo "             See PROBLEMS for more information."
16820 fi
16821 if test "$need_athena" = "yes"; then
16822   echo "  Compiling in support for the Athena widget set:"
16823   echo "    - Athena headers location:                    $athena_h_path"
16824   echo "    - Athena library to link:                     $athena_lib"
16825 fi
16826 case "$with_menubars" in
16827   gtk   ) echo "  Using GTK menubars."   ;;
16828   lucid ) echo "  Using Lucid menubars." ;;
16829   motif ) echo "  Using Motif menubars."
16830           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16831           echo "             We recommend using the Lucid menubar instead."
16832           echo "             Re-run configure with --with-menubars='lucid'." ;;
16833     msw ) echo "  Using MS-Windows menubars." ;;
16834 esac
16835 case "$with_scrollbars" in
16836   gtk    ) echo "  Using GTK scrollbars."        ;;
16837   lucid  ) echo "  Using Lucid scrollbars."      ;;
16838   motif  ) echo "  Using Motif scrollbars."      ;;
16839   athena ) echo "  Using Athena scrollbars."     ;;
16840      msw ) echo "  Using MS-Windows scrollbars." ;;
16841 esac
16842 case "$with_dialogs" in
16843   gtk    ) echo "  Using GTK dialog boxes." ;;
16844   motif  ) echo "  Using Motif dialog boxes."
16845            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16846              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16847              echo "             We recommend using the Athena dialog boxes instead."
16848              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16849              echo "             Read the PROBLEMS file for more information."
16850            fi; fi ;;
16851   athena ) echo "  Using Athena dialog boxes."     ;;
16852      msw ) echo "  Using MS-Windows dialog boxes." ;;
16853 esac
16854 case "$with_widgets" in
16855   gtk    ) echo "  Using GTK native widgets."        ;;
16856   motif  ) echo "  Using Motif native widgets."      ;;
16857   athena ) echo "  Using Athena native widgets."     ;;
16858      msw ) echo "  Using MS-Windows native widgets." ;;
16859 esac
16860 if test "$with_dragndrop" = yes; then
16861   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16862   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16863 fi
16864
16865 echo "
16866 TTY:"
16867 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16868 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16869
16870 echo "
16871 Images:"
16872 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16873 if test "$with_xpm" = yes; then
16874   echo "  Compiling in support for XPM  images."
16875 elif test "$with_x11" = yes; then
16876   echo "  WARNING: -----------------------------------------------------------"
16877   echo "  WARNING: Compiling without XPM image support."
16878   if test "$xpm_problem" != ""; then
16879     echo "  Reason: $xpm_problem"
16880   fi
16881   echo "  WARNING: You should strongly consider installing XPM."
16882   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16883   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16884   echo "  WARNING: -----------------------------------------------------------"
16885 fi
16886 if test "$with_png" = yes; then
16887   echo "  Compiling in support for PNG  images."
16888 elif test "$window_system" != "none"; then
16889   echo "  WARNING: -----------------------------------------------------------"
16890   echo "  WARNING: Compiling without PNG image support."
16891   if test "$png_problem" != ""; then
16892     echo "  Reason: $png_problem"
16893   fi
16894   echo "  WARNING: You should strongly consider installing the PNG libraries."
16895   echo "  WARNING: Otherwise certain images and glyphs may not display."
16896   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16897   echo "  WARNING: -----------------------------------------------------------"
16898 fi
16899 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16900 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16901 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16902
16903 echo "
16904 Sound:"
16905 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16906 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16907 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16908 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16909
16910 echo "
16911 Databases:"
16912 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16913 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16914 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16915 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16916 if test "$with_postgresql" = yes; then
16917   echo "  Compiling in support for PostgreSQL."
16918   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16919   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16920 fi
16921 if test "$with_concord" = yes; then
16922   echo "  Compiling in support for CONCORD."
16923 fi
16924
16925 echo "
16926 Multiscriptization / Multilingualization / Internationalization:"
16927 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16928 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16929 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16930 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16931 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16932 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16933 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16934 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16935 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16936 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16937 if test "$with_wnn" = yes; then
16938   echo "  Compiling in support for the WNN input method on Mule."
16939   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16940 fi
16941 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16942
16943 echo "
16944 Mail:"
16945 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16946 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16947 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16948 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16949
16950 echo "
16951 Other Features:"
16952 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16953 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16954 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16955 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16956 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16957 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16958 if test "$use_union_type" = yes; then
16959   echo "  WARNING: ---------------------------------------------------------"
16960   echo "  Using the union type for Lisp_Objects."
16961   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16962   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16963   echo "  WARNING: ---------------------------------------------------------"
16964 fi
16965 if test "$use_regex_malloc" = no; then
16966   echo "  WARNING: -----------------------------------------------------------"
16967   echo "  Using alloca to allocate the failure stack."
16968   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16969   echo "  Do NOT use this build of XEmacs for ordinary work."
16970   echo "  WARNING: -----------------------------------------------------------"
16971 fi
16972 test "$pdump" = yes && echo "  Using the new portable dumper."
16973 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16974 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16975 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16976   != "no no no no no no"; then
16977   echo "  WARNING: ---------------------------------------------------------"
16978   echo "  WARNING: Compiling in support for runtime error checking."
16979   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16980   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16981   echo "  WARNING: ---------------------------------------------------------"
16982 fi
16983 echo ""
16984 ) | tee -a Installation
16985 echo ""
16986
16987
16988 # Remove any trailing slashes in these variables.
16989 test -n "$prefix" &&
16990   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16991 test -n "$exec_prefix" &&
16992   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16993
16994
16995 for file in $internal_makefile_list; do
16996   test "$file" = src/Makefile.in && \
16997     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16998   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16999 done
17000 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
17001 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
17002
17003 trap '' 1 2 15
17004
17005 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
17006
17007 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17008 # Let make expand exec_prefix.
17009 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17010
17011 # Any assignment to VPATH causes Sun make to only execute
17012 # the first set of double-colon rules, so remove it if not needed.
17013 # If there is a colon in the path, we need to keep it.
17014 if test "x$srcdir" = x.; then
17015   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
17016 fi
17017
17018 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
17019
17020 DEFS=-DHAVE_CONFIG_H
17021
17022 # Without the "./", some shells look in PATH for config.status.
17023 : ${CONFIG_STATUS=./config.status}
17024
17025 echo creating $CONFIG_STATUS
17026 rm -f $CONFIG_STATUS
17027 cat > $CONFIG_STATUS <<EOF
17028 #! /bin/sh
17029 # Generated automatically by configure.
17030 # Run this file to recreate the current configuration.
17031 # This directory was configured as follows,
17032 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17033 #
17034 # $0 $ac_configure_args
17035 #
17036 # Compiler output produced by configure, useful for debugging
17037 # configure, is in ./config.log if it exists.
17038
17039 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
17040 for ac_option
17041 do
17042   case "\$ac_option" in
17043   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17044     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
17045     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
17046   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
17047     echo "$CONFIG_STATUS generated by autoconf version 2.13"
17048     exit 0 ;;
17049   -help | --help | --hel | --he | --h)
17050     echo "\$ac_cs_usage"; exit 0 ;;
17051   *) echo "\$ac_cs_usage"; exit 1 ;;
17052   esac
17053 done
17054
17055 ac_given_srcdir=$srcdir
17056 ac_given_INSTALL="$INSTALL"
17057
17058 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
17059 EOF
17060 cat >> $CONFIG_STATUS <<EOF
17061
17062 # Protect against being on the right side of a sed subst in config.status.
17063 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
17064  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
17065 $ac_vpsub
17066 $extrasub
17067 s%@SHELL@%$SHELL%g
17068 s%@CFLAGS@%$CFLAGS%g
17069 s%@CPPFLAGS@%$CPPFLAGS%g
17070 s%@CXXFLAGS@%$CXXFLAGS%g
17071 s%@FFLAGS@%$FFLAGS%g
17072 s%@DEFS@%$DEFS%g
17073 s%@LDFLAGS@%$LDFLAGS%g
17074 s%@LIBS@%$LIBS%g
17075 s%@exec_prefix@%$exec_prefix%g
17076 s%@prefix@%$prefix%g
17077 s%@program_transform_name@%$program_transform_name%g
17078 s%@bindir@%$bindir%g
17079 s%@sbindir@%$sbindir%g
17080 s%@libexecdir@%$libexecdir%g
17081 s%@datadir@%$datadir%g
17082 s%@sysconfdir@%$sysconfdir%g
17083 s%@sharedstatedir@%$sharedstatedir%g
17084 s%@localstatedir@%$localstatedir%g
17085 s%@libdir@%$libdir%g
17086 s%@includedir@%$includedir%g
17087 s%@oldincludedir@%$oldincludedir%g
17088 s%@infodir@%$infodir%g
17089 s%@mandir@%$mandir%g
17090 s%@LN_S@%$LN_S%g
17091 s%@blddir@%$blddir%g
17092 s%@CC@%$CC%g
17093 s%@CPP@%$CPP%g
17094 s%@start_flags@%$start_flags%g
17095 s%@ld_switch_shared@%$ld_switch_shared%g
17096 s%@start_files@%$start_files%g
17097 s%@ld@%$ld%g
17098 s%@lib_gcc@%$lib_gcc%g
17099 s%@RANLIB@%$RANLIB%g
17100 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
17101 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
17102 s%@INSTALL_DATA@%$INSTALL_DATA%g
17103 s%@YACC@%$YACC%g
17104 s%@SET_MAKE@%$SET_MAKE%g
17105 s%@GTK_CONFIG@%$GTK_CONFIG%g
17106 s%@X_CFLAGS@%$X_CFLAGS%g
17107 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
17108 s%@X_LIBS@%$X_LIBS%g
17109 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
17110 s%@install_pp@%$install_pp%g
17111 s%@libs_xauth@%$libs_xauth%g
17112 s%@dnd_objs@%$dnd_objs%g
17113 s%@lwlib_objs@%$lwlib_objs%g
17114 s%@ALLOCA@%$ALLOCA%g
17115 s%@have_esd_config@%$have_esd_config%g
17116 s%@dll_ld@%$dll_ld%g
17117 s%@dll_cflags@%$dll_cflags%g
17118 s%@dll_ldflags@%$dll_ldflags%g
17119 s%@dll_post@%$dll_post%g
17120 s%@dll_ldo@%$dll_ldo%g
17121 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
17122 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
17123 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
17124 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
17125 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
17126 s%@PROGNAME@%$PROGNAME%g
17127 s%@version@%$version%g
17128 s%@configuration@%$configuration%g
17129 s%@canonical@%$canonical%g
17130 s%@inststaticdir@%$inststaticdir%g
17131 s%@instvardir@%$instvardir%g
17132 s%@srcdir@%$srcdir%g
17133 s%@pkgdir@%$pkgdir%g
17134 s%@statedir@%$statedir%g
17135 s%@extra_includes@%$extra_includes%g
17136 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
17137 s%@PREFIX@%$PREFIX%g
17138 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
17139 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
17140 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
17141 s%@INFODIR@%$INFODIR%g
17142 s%@infopath@%$infopath%g
17143 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
17144 s%@INFOPATH@%$INFOPATH%g
17145 s%@package_path@%$package_path%g
17146 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
17147 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
17148 s%@lispdir@%$lispdir%g
17149 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
17150 s%@LISPDIR@%$LISPDIR%g
17151 s%@moduledir@%$moduledir%g
17152 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
17153 s%@MODULEDIR@%$MODULEDIR%g
17154 s%@sitelispdir@%$sitelispdir%g
17155 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
17156 s%@SITELISPDIR@%$SITELISPDIR%g
17157 s%@sitemoduledir@%$sitemoduledir%g
17158 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
17159 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
17160 s%@etcdir@%$etcdir%g
17161 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
17162 s%@ETCDIR@%$ETCDIR%g
17163 s%@docdir@%$docdir%g
17164 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
17165 s%@DOCDIR@%$DOCDIR%g
17166 s%@archlibdir@%$archlibdir%g
17167 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
17168 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
17169 s%@bitmapdir@%$bitmapdir%g
17170 s%@extra_objs@%$extra_objs%g
17171 s%@machfile@%$machfile%g
17172 s%@opsysfile@%$opsysfile%g
17173 s%@c_switch_general@%$c_switch_general%g
17174 s%@c_switch_window_system@%$c_switch_window_system%g
17175 s%@c_switch_all@%$c_switch_all%g
17176 s%@ld_switch_general@%$ld_switch_general%g
17177 s%@ld_switch_window_system@%$ld_switch_window_system%g
17178 s%@ld_switch_all@%$ld_switch_all%g
17179 s%@ld_libs_general@%$ld_libs_general%g
17180 s%@ld_libs_window_system@%$ld_libs_window_system%g
17181 s%@ld_libs_all@%$ld_libs_all%g
17182 s%@RECURSIVE_MAKE_ARGS@%$RECURSIVE_MAKE_ARGS%g
17183 s%@native_sound_lib@%$native_sound_lib%g
17184 s%@sound_cflags@%$sound_cflags%g
17185 s%@dynodump_arch@%$dynodump_arch%g
17186 s%@XEMACS_CC@%$XEMACS_CC%g
17187 s%@internal_makefile_list@%$internal_makefile_list%g
17188
17189 CEOF
17190 EOF
17191
17192 cat >> $CONFIG_STATUS <<\EOF
17193
17194 # Split the substitutions into bite-sized pieces for seds with
17195 # small command number limits, like on Digital OSF/1 and HP-UX.
17196 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17197 ac_file=1 # Number of current file.
17198 ac_beg=1 # First line for current file.
17199 ac_end=$ac_max_sed_cmds # Line after last line for current file.
17200 ac_more_lines=:
17201 ac_sed_cmds=""
17202 while $ac_more_lines; do
17203   if test $ac_beg -gt 1; then
17204     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
17205   else
17206     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
17207   fi
17208   if test ! -s conftest.s$ac_file; then
17209     ac_more_lines=false
17210     rm -f conftest.s$ac_file
17211   else
17212     if test -z "$ac_sed_cmds"; then
17213       ac_sed_cmds="sed -f conftest.s$ac_file"
17214     else
17215       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
17216     fi
17217     ac_file=`expr $ac_file + 1`
17218     ac_beg=$ac_end
17219     ac_end=`expr $ac_end + $ac_max_sed_cmds`
17220   fi
17221 done
17222 if test -z "$ac_sed_cmds"; then
17223   ac_sed_cmds=cat
17224 fi
17225 EOF
17226
17227 cat >> $CONFIG_STATUS <<EOF
17228
17229 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
17230 EOF
17231 cat >> $CONFIG_STATUS <<\EOF
17232 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17233   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17234   case "$ac_file" in
17235   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17236        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17237   *) ac_file_in="${ac_file}.in" ;;
17238   esac
17239
17240   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17241
17242   # Remove last slash and all that follows it.  Not all systems have dirname.
17243   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17244   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17245     # The file is in a subdirectory.
17246     test ! -d "$ac_dir" && mkdir "$ac_dir"
17247     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17248     # A "../" for each directory in $ac_dir_suffix.
17249     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17250   else
17251     ac_dir_suffix= ac_dots=
17252   fi
17253
17254   case "$ac_given_srcdir" in
17255   .)  srcdir=.
17256       if test -z "$ac_dots"; then top_srcdir=.
17257       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17258   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17259   *) # Relative path.
17260     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17261     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17262   esac
17263
17264   case "$ac_given_INSTALL" in
17265   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17266   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17267   esac
17268
17269   echo creating "$ac_file"
17270   rm -f "$ac_file"
17271   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17272   case "$ac_file" in
17273   *Makefile*) ac_comsub="1i\\
17274 # $configure_input" ;;
17275   *) ac_comsub= ;;
17276   esac
17277
17278   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17279   sed -e "$ac_comsub
17280 s%@configure_input@%$configure_input%g
17281 s%@srcdir@%$srcdir%g
17282 s%@top_srcdir@%$top_srcdir%g
17283 s%@INSTALL@%$INSTALL%g
17284 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17285 fi; done
17286 rm -f conftest.s*
17287
17288 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17289 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17290 #
17291 # ac_d sets the value in "#define NAME VALUE" lines.
17292 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17293 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17294 ac_dC='\3'
17295 ac_dD='%g'
17296 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17297 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17298 ac_uB='\([      ]\)%\1#\2define\3'
17299 ac_uC=' '
17300 ac_uD='\4%g'
17301 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17302 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17303 ac_eB='$%\1#\2define\3'
17304 ac_eC=' '
17305 ac_eD='%g'
17306
17307 if test "${CONFIG_HEADERS+set}" != set; then
17308 EOF
17309 cat >> $CONFIG_STATUS <<EOF
17310   CONFIG_HEADERS="src/config.h lwlib/config.h"
17311 EOF
17312 cat >> $CONFIG_STATUS <<\EOF
17313 fi
17314 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17315   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17316   case "$ac_file" in
17317   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17318        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17319   *) ac_file_in="${ac_file}.in" ;;
17320   esac
17321
17322   echo creating $ac_file
17323
17324   rm -f conftest.frag conftest.in conftest.out
17325   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17326   cat $ac_file_inputs > conftest.in
17327
17328 EOF
17329
17330 # Transform confdefs.h into a sed script conftest.vals that substitutes
17331 # the proper values into config.h.in to produce config.h.  And first:
17332 # Protect against being on the right side of a sed subst in config.status.
17333 # Protect against being in an unquoted here document in config.status.
17334 rm -f conftest.vals
17335 cat > conftest.hdr <<\EOF
17336 s/[\\&%]/\\&/g
17337 s%[\\$`]%\\&%g
17338 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17339 s%ac_d%ac_u%gp
17340 s%ac_u%ac_e%gp
17341 EOF
17342 sed -n -f conftest.hdr confdefs.h > conftest.vals
17343 rm -f conftest.hdr
17344
17345 # This sed command replaces #undef with comments.  This is necessary, for
17346 # example, in the case of _POSIX_SOURCE, which is predefined and required
17347 # on some systems where configure will not decide to define it.
17348 cat >> conftest.vals <<\EOF
17349 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17350 EOF
17351
17352 # Break up conftest.vals because some shells have a limit on
17353 # the size of here documents, and old seds have small limits too.
17354
17355 rm -f conftest.tail
17356 while :
17357 do
17358   ac_lines=`grep -c . conftest.vals`
17359   # grep -c gives empty output for an empty file on some AIX systems.
17360   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17361   # Write a limited-size here document to conftest.frag.
17362   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17363   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17364   echo 'CEOF
17365   sed -f conftest.frag conftest.in > conftest.out
17366   rm -f conftest.in
17367   mv conftest.out conftest.in
17368 ' >> $CONFIG_STATUS
17369   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17370   rm -f conftest.vals
17371   mv conftest.tail conftest.vals
17372 done
17373 rm -f conftest.vals
17374
17375 cat >> $CONFIG_STATUS <<\EOF
17376   rm -f conftest.frag conftest.h
17377   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17378   cat conftest.in >> conftest.h
17379   rm -f conftest.in
17380   if cmp -s $ac_file conftest.h 2>/dev/null; then
17381     echo "$ac_file is unchanged"
17382     rm -f conftest.h
17383   else
17384     # Remove last slash and all that follows it.  Not all systems have dirname.
17385       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17386       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17387       # The file is in a subdirectory.
17388       test ! -d "$ac_dir" && mkdir "$ac_dir"
17389     fi
17390     rm -f $ac_file
17391     mv conftest.h $ac_file
17392   fi
17393 fi; done
17394
17395 EOF
17396 cat >> $CONFIG_STATUS <<EOF
17397 CPP="$CPP"
17398  top_srcdir="$srcdir"
17399  MAKE_SUBDIR="$MAKE_SUBDIR"
17400
17401 EOF
17402 cat >> $CONFIG_STATUS <<\EOF
17403 for dir in . $MAKE_SUBDIR; do
17404   (
17405     cd $dir
17406     rm -f junk.c
17407     < Makefile.in \
17408       sed -e '/^# Generated/d' \
17409           -e 's%/\*\*/#.*%%' \
17410           -e 's/^ *# */#/' \
17411           -e '/^##/d' \
17412           -e '/^#/ {
17413 p
17414 d
17415 }'        \
17416           -e '/./ {
17417 s/\([\"]\)/\\\1/g
17418 s/^/"/
17419 s/$/"/
17420 }'  > junk.c;
17421
17422
17423
17424     echo creating $dir/Makefile
17425 $CPP -I. -I${top_srcdir}/src  junk.c \
17426   | sed -e 's/^\#.*//'          \
17427         -e 's/^[        ][      ]*$//'\
17428         -e 's/^ /       /'              \
17429         -e '/^[ \f]*$/d' \
17430         -e '/^\"/ {
17431         s/\\\([\"]\)/\1/g
17432         s/^[    ]*\"//
17433         s/\"[   ]*$//
17434 }' > Makefile.new
17435     chmod 444 Makefile.new
17436     mv -f Makefile.new Makefile
17437
17438     echo creating $dir/GNUmakefile
17439 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
17440   | sed -e 's/^\#.*//'          \
17441         -e 's/^[        ][      ]*$//'\
17442         -e 's/^ /       /'              \
17443         -e '/^[ \f]*$/d' \
17444         -e '/^\"/ {
17445         s/\\\([\"]\)/\1/g
17446         s/^[    ]*\"//
17447         s/\"[   ]*$//
17448 }' > Makefile.new
17449     chmod 444 Makefile.new
17450     mv -f Makefile.new GNUmakefile
17451
17452     rm -f junk.c
17453   )
17454 done
17455
17456 sed < config.status >> lib-src/config.values \
17457   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
17458   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
17459   -e 's/^\([^ ]*\) $/\1 ""/' \
17460   -e 's/ 1$/ t/'
17461
17462
17463 exit 0
17464 EOF
17465 chmod +x $CONFIG_STATUS
17466 rm -fr confdefs* $ac_clean_files
17467 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1