Sync up with r21-4-15.
[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 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_ldap       | \
354         with_postgresql | \
355         with_pop        | \
356         with_kerberos   | \
357         with_hesiod     | \
358         with_dnet       | \
359         with_infodock   | \
360         with_netinstall | \
361         with_ipv6_cname | \
362         external_widget | \
363         verbose         | \
364         extra_verbose   | \
365         usage_tracking  | \
366         use_union_type  | \
367         pdump           | \
368         debug           | \
369         use_assertions  | \
370         use_regex_malloc | \
371         memory_usage_stats | \
372         with_clash_detection | \
373         with_modules    | \
374         quick_build )
375                   case "$val" in
376             y | ye | yes )      val=yes ;;
377             n | no )            val=no  ;;
378             * ) (echo "$progname: Usage error:"
379 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
380 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
381           esac
382           eval "$opt=\"$val\"" ;;
383
384
385                         srcdir          | \
386         compiler        | \
387         cflags          | \
388         cpp             | \
389         cppflags        | \
390         libs            | \
391         ldflags         | \
392         cache_file      | \
393         native_sound_lib| \
394         site_lisp       | \
395         x_includes      | \
396         x_libraries     | \
397         site_includes   | \
398         site_libraries  | \
399         site_prefixes   | \
400         site_runtime_libraries )
401                   if test "$valomitted" = "yes" ; then
402                     if test "$#" = 0 ; then
403               (echo "$progname: Usage error:"
404 echo " " "The \`--$optname' option requires a value."
405 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
406             fi
407             val="$1"; shift
408           fi
409           eval "$opt=\"$val\""
410         ;;
411
412                 rel_alloc | \
413         with_dlmalloc | \
414         with_debug_malloc  | use_debug_malloc | \
415         with_system_malloc | use_system_malloc )
416           case "$val" in
417             y | ye | yes )      val=yes ;;
418             n | no )            val=no  ;;
419             d | de | def | defa | defau | defaul | default ) val=default ;;
420             * ) (echo "$progname: Usage error:"
421 echo " " "The \`--$optname' option requires one of these values:
422   \`yes', \`no', or \`default'."
423 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
424           esac
425           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
426           eval "$opt=\"$val\""
427         ;;
428
429                 "with_database" )
430           with_database_berkdb=no
431           with_database_dbm=no
432           with_database_gdbm=no
433           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
434             case "$x" in
435               no ) ;;
436               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
437               d | db | dbm )                               with_database_dbm=yes    ;;
438               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
439               * ) (echo "$progname: Usage error:"
440 echo " " "The \`--$optname' option value
441   must be either \`no' or a comma-separated list
442   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
443 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
444             esac
445           done
446           if test "$with_database_dbm"  = "yes" -a \
447                   "$with_database_gdbm" = "yes"; then
448           (echo "$progname: Usage error:"
449 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
450   with the \`--$optname' option."
451 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
452           fi
453         ;;
454
455                 "with_sound" )
456                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
457             case "$x" in
458                       n | no | non | none ) new_sdefault=no ;;
459               a | al | all | both ) new_sdefault=yes ;;
460
461               native )       with_native_sound=yes ;;
462               nonative )     with_native_sound=no ;;
463
464               nas )          with_nas_sound=yes ;;
465               nonas )        with_nas_sound=no ;;
466
467               esd )          with_esd_sound=yes ;;
468               noesd )        with_esd_sound=no ;;
469
470               * ) bogus_sound=yes ;;
471             esac
472             if test "$bogus_sound" -o \
473                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
474                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
475                 (echo "$progname: Usage error:"
476 echo " " "Valid types for the \`--$optname' option are:
477   $types.
478 Option \`all' or \`none' must be first in the list.
479 The default is to autodetect native and NAS sound support."
480 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
481             elif test -n "$new_sdefault" ; then
482                 with_native_sound=$new_sdefault
483                 with_nas_sound=$new_sdefault
484                 with_esd_sound=$new_sdefault
485                 new_sdefault=   # reset this
486             fi
487             sound_notfirst=true
488           done
489         ;;
490
491                         "with_athena" )
492           case "$val" in
493             xa | xaw )                    val=xaw    ;;
494             3 | 3d | xaw3d )              val=3d     ;;
495                         ne | nex | next | naxtaw)     val=next   ;;
496                         9 | 95 | xaw95 )              val=95     ;;
497             xp | xpm | xawxpm )           val=xpm    ;;
498             * ) (echo "$progname: Usage error:"
499 echo " " "The \`--$optname' option must have one of these values:
500   \`xaw', \`3d', \`next', \`95', or \`xpm'."
501 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
502           esac
503           eval "$opt=\"$val\""
504         ;;
505
506                 "with_xim" )
507           case "$val" in
508             y | ye | yes )                val=yes   ;;
509             n | no | non | none )         val=no    ;;
510             x | xl | xli | xlib )         val=xlib  ;;
511             m | mo | mot | moti | motif ) val=motif ;;
512             * ) (echo "$progname: Usage error:"
513 echo " " "The \`--$optname' option must have one of these values:
514   \`motif', \`xlib', \`yes', or \`no'."
515 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
516           esac
517           eval "$opt=\"$val\""
518         ;;
519
520                 "mail_locking" )
521           case "$val" in
522             lockf )     val=lockf ;;
523             flock )     val=flock ;;
524             file | dot ) val=file  ;;
525             locking )   val=locking  ;;
526             * ) (echo "$progname: Usage error:"
527 echo " " "The \`--$optname' option must have one of these values:
528   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
529 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
530           esac
531           eval "$opt=\"$val\""
532         ;;
533
534                 "error_checking" )
535                           
536           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
537             case "$x" in
538                       n | no | non | none ) new_default=no ;;
539               a | al | all )        new_default=yes ;;
540
541               extents )       error_check_extents=yes ;;
542               noextents )     error_check_extents=no ;;
543
544               typecheck )     error_check_typecheck=yes ;;
545               notypecheck )   error_check_typecheck=no ;;
546
547               bufpos )        error_check_bufpos=yes ;;
548               nobufpos )      error_check_bufpos=no ;;
549
550               gc )            error_check_gc=yes ;;
551               nogc )          error_check_gc=no ;;
552
553               malloc )        error_check_malloc=yes ;;
554               nomalloc )      error_check_malloc=no ;;
555
556               byte_code )     error_check_byte_code=yes ;;
557               nobyte_code )   error_check_byte_code=no ;;
558
559               glyphs )     error_check_glyphs=yes ;;
560               noglyphs )   error_check_glyphs=no ;;
561
562               * ) bogus_error_check=yes ;;
563             esac
564             if test "$bogus_error_check" -o \
565                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
566                 if test "$error_check_default" = yes ; then
567                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
568                 else
569                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
570                 fi
571                 (echo "$progname: Usage error:"
572 echo " " "Valid types for the \`--$optname' option are:
573   $types."
574 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
575             elif test -n "$new_default" ; then
576                 error_check_extents=$new_default
577                 error_check_typecheck=$new_default
578                 error_check_bufpos=$new_default
579                 error_check_gc=$new_default
580                 error_check_malloc=$new_default
581                 error_check_byte_code=$new_default
582                 error_check_glyphs=$new_default
583                 new_default=    # reset this
584             fi
585             echeck_notfirst=true
586           done
587         ;;
588
589                                 
590                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
591         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
592         archlibdir | docdir | package_path | moduledir )
593                    if test "$valomitted" = "yes"; then
594              if test "$#" = 0; then
595                  (echo "$progname: Usage error:"
596 echo " " "The \`--$optname' option requires a value."
597 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
598              fi
599              val="$1"; shift
600            fi
601            eval "$opt=\"$val\""
602
603                            case "$opt" in
604                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining EXEC_PREFIX_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define EXEC_PREFIX_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining LISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define LISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining SITELISPDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define SITELISPDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining MODULEDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define MODULEDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining ETCDIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define ETCDIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFODIR_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFODIR_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining INFOPATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define INFOPATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
661     Defining PACKAGE_PATH_USER_DEFINED
662 EOF
663 cat >> confdefs.h <<\EOF
664 #define PACKAGE_PATH_USER_DEFINED 1
665 EOF
666 }
667  ;;
668              datadir )
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining INFODIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define INFODIR_USER_DEFINED 1
674 EOF
675 }
676
677                 { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining LISPDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define LISPDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining MODULEDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define MODULEDIR_USER_DEFINED 1
690 EOF
691 }
692
693                 { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining ETCDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define ETCDIR_USER_DEFINED 1
698 EOF
699 }
700
701                 { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining DOCDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define DOCDIR_USER_DEFINED 1
706 EOF
707 }
708
709                 { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining ARCHLIBDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define ARCHLIBDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
718     Defining DOCDIR_USER_DEFINED
719 EOF
720 cat >> confdefs.h <<\EOF
721 #define DOCDIR_USER_DEFINED 1
722 EOF
723 }
724  ;;
725              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
726     Defining ARCHLIBDIR_USER_DEFINED
727 EOF
728 cat >> confdefs.h <<\EOF
729 #define ARCHLIBDIR_USER_DEFINED 1
730 EOF
731 }
732  ;;
733            esac
734         ;;
735
736                 "no_create" ) ;;
737
738                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
739
740                 "with_menubars"   | \
741         "with_scrollbars" | \
742         "with_dialogs"    | \
743         "with_widgets" )
744           case "$val" in
745             l | lu | luc | luci | lucid )               val=lucid  ;;
746             mo | mot | moti | motif )                   val=motif  ;;
747             a | at | ath | athe | athen | athena )      val=athena ;;
748             n | no | non | none )                       val=no     ;;
749             y | ye | yes )                              val=yes    ;;
750                         "")                                             val=yes    ;;
751             g | gt | gtk )                              val=gtk    ;;
752             ms | msw )                                  val=msw    ;;
753             * ) (echo "$progname: Usage error:"
754 echo " " "The \`--$optname' option must have one of these values:
755   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
756 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
757           esac
758           eval "$opt=\"$val\""
759         ;;
760
761                 "use_minimal_tagbits" | \
762         "use_indexed_lrecord_implementation" | \
763         "run_in_place"  | \
764         "const_is_losing" | \
765         "with_gnu_make" )
766           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
767         ;;
768
769                 * ) (echo "$progname: Usage error:"
770 echo " " "Unrecognized option: $arg"
771 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
772
773       esac
774     ;;
775
776         *-*-*) configuration="$arg" ;;
777
778         *) (echo "$progname: Usage error:"
779 echo " " "Unrecognized argument: $arg"
780 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
781
782   esac
783 done
784
785
786 test -n "$cpp"      && CPP="$cpp"
787 test -n "$cppflags" && CPPFLAGS="$cppflags"
788 test -n "$libs"     && LIBS="$libs"
789 test -n "$ldflags"  && LDFLAGS="$ldflags"
790
791 eval set x "$quoted_arguments"; shift
792
793 test "$extra_verbose" = "yes" && verbose=yes
794
795 test -n "$with_x" && with_x11="$with_x"
796
797 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
798   test "$with_system_malloc" = "default" && with_system_malloc=yes
799 fi
800
801
802
803 if test "$with_cde $with_tooltalk" = "yes no"; then
804   (echo "$progname: Usage error:"
805 echo " " "--with-cde requires --with-tooltalk"
806 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
807 elif test "$with_tooltalk" = "no" ; then with_cde=no
808 elif test "$with_cde" = "yes"; then with_tooltalk=yes
809 fi
810
811
812 case "$srcdir" in
813
814     "" )
815     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
816       if test -f "$dir/src/lisp.h" -a \
817               -f "$dir/lisp/version.el" ; then
818         srcdir="$dir"
819         break
820       fi
821     done
822     if test -z "$srcdir" ; then
823       (echo "$progname: Usage error:"
824 echo " " "Neither the current directory nor its parent seem to
825   contain the XEmacs sources.  If you do not want to build XEmacs in its
826   source tree, you should run \`$progname' in the directory in which
827   you wish to build XEmacs, using the \`--srcdir' option to say where the
828   sources may be found."
829 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
830     fi
831   ;;
832
833     * )
834     if test ! -f "$srcdir/src/lisp.h" -o \
835             ! -f "$srcdir/lisp/version.el" ; then
836       (echo "$progname: Usage error:"
837 echo " " "The directory specified with the \`--srcdir' option,
838   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
839   either run the \`$progname' script at the top of the XEmacs source
840   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
841 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
842     fi
843   ;;
844 esac
845
846 if test -z "$configuration"; then
847     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
848   if test -z "$configuration"; then
849     (echo "$progname: Usage error:"
850 echo " " "XEmacs has not been ported to this host type.
851 Try explicitly specifying the CONFIGURATION when rerunning configure."
852 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
853   fi
854 fi
855
856 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
857 echo "configure:858: checking whether ln -s works" >&5
858
859 rm -f conftestdata
860 if ln -s X conftestdata 2>/dev/null
861 then
862   rm -f conftestdata
863   ac_cv_prog_LN_S="ln -s"
864 else
865   ac_cv_prog_LN_S=ln
866 fi
867 LN_S="$ac_cv_prog_LN_S"
868 if test "$ac_cv_prog_LN_S" = "ln -s"; then
869   echo "$ac_t""yes" 1>&6
870 else
871   echo "$ac_t""no" 1>&6
872 fi
873
874
875 for dir in lisp etc man info tests; do
876   if test ! -d "$dir" ; then
877     echo Making symbolic link to "$srcdir/$dir"
878     ${LN_S} "$srcdir/$dir" "$dir"
879   fi
880 done
881
882
883 absolute_pwd="`pwd`";
884 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
885 then blddir="$PWD"
886 else blddir="$absolute_pwd"; if test -d "/net"; then
887   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
888   blddir=`echo "$blddir" | \
889    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
890 fi
891 fi
892
893
894 case "$srcdir" in
895   /* ) ;;
896   .  ) srcdir="$blddir" ;;
897   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
898   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
899   srcdir=`echo "$srcdir" | \
900    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
901 fi ;;
902 esac
903
904 if test `pwd` != `sh -c cd $srcdir && pwd`  \
905    && test -f "$srcdir/src/config.h"; then
906   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
907    echo "   as a build directory right now; it has been configured in its own"
908    echo "   right.  To configure in another directory as well, you MUST"
909    echo "   use GNU make.  If you do not have GNU make, then you must"
910    echo "   now do \`make distclean' in $srcdir,"
911    echo "   and then run $progname again.") >&2
912   extrasub='/^VPATH[     ]*=/c\
913 vpath %.c $(srcdir)\
914 vpath %.h $(srcdir)\
915 vpath %.y $(srcdir)\
916 vpath %.l $(srcdir)\
917 vpath %.s $(srcdir)\
918 vpath %.in $(srcdir)'
919 fi
920
921 . "$srcdir/version.sh" || exit 1;
922 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
923 : "${extra_verbose=$beta}"
924 version="${emacs_major_version}.${emacs_minor_version}"
925 { test "$extra_verbose" = "yes" && cat << EOF
926     Defining EMACS_MAJOR_VERSION = $emacs_major_version
927 EOF
928 cat >> confdefs.h <<EOF
929 #define EMACS_MAJOR_VERSION $emacs_major_version
930 EOF
931 }
932
933 { test "$extra_verbose" = "yes" && cat << EOF
934     Defining EMACS_MINOR_VERSION = $emacs_minor_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define EMACS_MINOR_VERSION $emacs_minor_version
938 EOF
939 }
940
941 if test -n "$emacs_beta_version" ; then
942   if test "$beta" = "yes"; then
943         version="${version}-b${emacs_beta_version}"
944         { test "$extra_verbose" = "yes" && cat << EOF
945     Defining EMACS_BETA_VERSION = $emacs_beta_version
946 EOF
947 cat >> confdefs.h <<EOF
948 #define EMACS_BETA_VERSION $emacs_beta_version
949 EOF
950 }
951
952   else
953         version="${version}.${emacs_beta_version}"
954         { test "$extra_verbose" = "yes" && cat << EOF
955     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
956 EOF
957 cat >> confdefs.h <<EOF
958 #define EMACS_PATCH_LEVEL $emacs_beta_version
959 EOF
960 }
961
962   fi
963 fi
964 { test "$extra_verbose" = "yes" && cat << EOF
965     Defining XEMACS_CODENAME = "$xemacs_codename"
966 EOF
967 cat >> confdefs.h <<EOF
968 #define XEMACS_CODENAME "$xemacs_codename"
969 EOF
970 }
971
972 { test "$extra_verbose" = "yes" && cat << EOF
973     Defining EMACS_VERSION = "$version"
974 EOF
975 cat >> confdefs.h <<EOF
976 #define EMACS_VERSION "$version"
977 EOF
978 }
979
980
981 if test "$with_infodock" = "yes"; then
982   if test ! -f ../../ID-INSTALL; then
983     echo "Cannot build InfoDock without InfoDock sources"
984     with_infodock=no
985   fi
986 fi
987
988 if test "$with_infodock" = "yes"; then
989       { test "$extra_verbose" = "yes" && cat << EOF
990     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
991 EOF
992 cat >> confdefs.h <<EOF
993 #define INFODOCK_MAJOR_VERSION $infodock_major_version
994 EOF
995 }
996
997   { test "$extra_verbose" = "yes" && cat << EOF
998     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
999 EOF
1000 cat >> confdefs.h <<EOF
1001 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1002 EOF
1003 }
1004
1005   { test "$extra_verbose" = "yes" && cat << EOF
1006     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1007 EOF
1008 cat >> confdefs.h <<EOF
1009 #define INFODOCK_BUILD_VERSION $infodock_build_version
1010 EOF
1011 }
1012
1013   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1014   PROGNAME=infodock
1015   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1016 else
1017   PROGNAME=xemacs
1018 fi
1019
1020 { test "$extra_verbose" = "yes" && cat << EOF
1021     Defining EMACS_PROGNAME = "$PROGNAME"
1022 EOF
1023 cat >> confdefs.h <<EOF
1024 #define EMACS_PROGNAME "$PROGNAME"
1025 EOF
1026 }
1027
1028
1029 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1030 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_EXTENTS
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_EXTENTS 1
1035 EOF
1036 }
1037
1038 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_TYPECHECK
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_TYPECHECK 1
1043 EOF
1044 }
1045
1046 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1047     Defining ERROR_CHECK_BUFPOS
1048 EOF
1049 cat >> confdefs.h <<\EOF
1050 #define ERROR_CHECK_BUFPOS 1
1051 EOF
1052 }
1053
1054 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1055     Defining ERROR_CHECK_GC
1056 EOF
1057 cat >> confdefs.h <<\EOF
1058 #define ERROR_CHECK_GC 1
1059 EOF
1060 }
1061
1062 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1063     Defining ERROR_CHECK_MALLOC
1064 EOF
1065 cat >> confdefs.h <<\EOF
1066 #define ERROR_CHECK_MALLOC 1
1067 EOF
1068 }
1069
1070 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1071     Defining ERROR_CHECK_BYTE_CODE
1072 EOF
1073 cat >> confdefs.h <<\EOF
1074 #define ERROR_CHECK_BYTE_CODE 1
1075 EOF
1076 }
1077
1078 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1079     Defining ERROR_CHECK_GLYPHS
1080 EOF
1081 cat >> confdefs.h <<\EOF
1082 #define ERROR_CHECK_GLYPHS 1
1083 EOF
1084 }
1085
1086 if test "${debug:=$beta}" = "yes"; then
1087   use_assertions=yes memory_usage_stats=yes
1088   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"debug.o\""
1090  fi
1091   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1092    echo "    xemacs will be linked with \"tests.o\""
1093  fi
1094   { test "$extra_verbose" = "yes" && cat << \EOF
1095     Defining DEBUG_XEMACS
1096 EOF
1097 cat >> confdefs.h <<\EOF
1098 #define DEBUG_XEMACS 1
1099 EOF
1100 }
1101
1102 fi
1103 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1104     Defining USE_ASSERTIONS
1105 EOF
1106 cat >> confdefs.h <<\EOF
1107 #define USE_ASSERTIONS 1
1108 EOF
1109 }
1110
1111 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1112     Defining MEMORY_USAGE_STATS
1113 EOF
1114 cat >> confdefs.h <<\EOF
1115 #define MEMORY_USAGE_STATS 1
1116 EOF
1117 }
1118
1119
1120
1121 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1122 echo "configure:1123: checking "host system type"" >&5
1123 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1124 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1125 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1126 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1127 echo "$ac_t""$configuration" 1>&6
1128
1129
1130
1131
1132
1133 machine='' opsys=''
1134
1135 case "$canonical" in
1136   sparc-*-*        ) machine=sparc ;;
1137   alpha*-*-*       ) machine=alpha ;;
1138   vax-*-*          ) machine=vax ;;
1139   mips-dec-*       ) machine=pmax ;;
1140   mips-sgi-irix6*  ) machine=iris6d ;;
1141   mips-sgi-*       ) machine=iris4d ;;
1142   mips*-linux      ) machine=mips ;;
1143   romp-ibm-*       ) machine=ibmrt ;;
1144   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1145   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1146   powerpc*-*       ) machine=powerpc ;;
1147   hppa-*-*         ) machine=hp800 ;;
1148   m88k-dg-*        ) machine=aviion ;;
1149   m68*-sony-*      ) machine=news ;;
1150   mips-sony-*      ) machine=news-risc ;;
1151   clipper-*        ) machine=clipper ;;
1152   arm*             ) machine=arm ;;
1153   ns32k-*          ) machine=ns32000 ;;
1154 esac
1155
1156 case "$canonical" in
1157   *-*-linux*    ) opsys=linux ;;
1158   *-*-netbsd*   ) opsys=netbsd ;;
1159   *-*-openbsd*  ) opsys=openbsd ;;
1160   *-*-nextstep* ) opsys=nextstep ;;
1161   *-*-vms       ) opsys=vms ;;
1162
1163     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1164   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1165   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1166   *-dec-osf3*                ) opsys=decosf3-1 ;;
1167   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1168
1169     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1170   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1171   *-*-ultrix* )         opsys=ultrix4-3 ;;
1172
1173     *-*-aix3.1*     ) opsys=aix3-1   ;;
1174   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1175   *-*-aix3*       ) opsys=aix3-2   ;;
1176   *-*-aix4.0*     ) opsys=aix4     ;;
1177   *-*-aix4.1*     ) opsys=aix4-1   ;;
1178   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1179
1180     *-gnu* )                    opsys=gnu    ;;
1181   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1182   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1183   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1184   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1185   *-*-aos*   )                  opsys=bsd4-3 ;;
1186   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1187   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1188   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1189   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1190   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1191   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1192         if test -z "$NON_GNU_CPP" ; then
1193           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1194             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1195           done
1196         fi
1197         opsys=usg5-4-2 ;;
1198     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1199     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1200 esac
1201
1202 case "$canonical" in
1203
1204     *-*-netbsd* )
1205     case "$canonical" in
1206       i[3-9]86-*-netbsd*) machine=intel386 ;;
1207       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1208                                             machine=hp9000s300 ;;
1209       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1210       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1211     esac
1212   ;;
1213
1214     *-*-openbsd* )
1215     case "${canonical}" in
1216       i386-*-openbsd*)          machine=intel386 ;;
1217       m68k-*-openbsd*)          machine=hp9000s300 ;;
1218       mipsel-*-openbsd*)        machine=pmax ;;
1219      esac
1220    ;;
1221
1222     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1223   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1224
1225     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1226   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1227
1228     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1229
1230     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1231
1232     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1233
1234     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1235
1236     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1237
1238     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1239   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1240   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1241
1242   
1243     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1244
1245     *-convex-bsd* | *-convex-convexos* )
1246     machine=convex opsys=bsd4-3
1247     NON_GNU_CPP="cc -E -P"
1248   ;;
1249
1250     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1251
1252     *-*-darwin*)
1253     opsys=darwin
1254     RANLIB="ranlib -c"     ;;
1255
1256     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1257   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1258   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1259   m88k-dg-dgux*                           ) opsys=dgux     ;;
1260
1261     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1262   m88k-motorola-sysv4* )
1263                     machine=delta88k opsys=usg5-4-2
1264   ;;
1265   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1266
1267     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1268   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1269
1270     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1271
1272     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1273   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1274   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1275
1276       m88k-harris-cxux* )
1277         case "`uname -r`" in
1278        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1279        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1280     esac
1281     NON_GNU_CPP="/lib/cpp"
1282   ;;
1283     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1284     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1285
1286     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1287
1288     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1289
1290     *-hp-hpux* )
1291         case "$canonical" in
1292       m68*  ) machine=hp9000s300 ;;
1293       hppa* ) machine=hp800      ;;
1294     esac
1295
1296     case "$canonical" in
1297       *-hp-hpux7*  )  opsys=hpux   ;;
1298       *-hp-hpux8*  )  opsys=hpux8  ;;
1299       *-hp-hpux9*  )  opsys=hpux9  ;;
1300       *-hp-hpux10* )  opsys=hpux10 ;;
1301       *-hp-hpux11* )  opsys=hpux11 ;;
1302       *            )  opsys=hpux   ;;
1303     esac
1304
1305         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1306    echo "    xemacs will be linked with \"strcat.o\""
1307  fi ;; esac
1308
1309     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1310         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1311     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1312
1313     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1314   ;;
1315
1316     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1317   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1318
1319     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1320   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1321   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1322   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1323   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1324   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1325
1326     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1327   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1328
1329     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1330
1331     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1332
1333     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1334
1335     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1336
1337       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1338
1339     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1340
1341     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1342
1343     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1344
1345     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1346
1347         mips-mips-usg* ) machine=mips4 ;;
1348   mips-mips-riscos4 )
1349     machine=mips4
1350     NON_GNU_CC="cc -systype bsd43"
1351     NON_GNU_CPP="cc -systype bsd43 -E"
1352     case "$canonical" in
1353       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1354       mips-mips-riscos5* ) opsys=riscos5 ;;
1355     esac
1356   ;;
1357   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1358   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1359
1360     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1361
1362     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1363
1364     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1365   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1366
1367     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1368
1369     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1370
1371     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1372
1373     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1374
1375     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1376   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1377
1378     mips-siemens-sysv* | mips-sni-sysv*)
1379     machine=mips-siemens opsys=usg5-4
1380     NON_GNU_CC=/usr/ccs/bin/cc
1381     NON_GNU_CPP=/usr/ccs/lib/cpp
1382   ;;
1383
1384     mips-nec-sysv*)
1385     machine=mips-nec
1386     NON_GNU_CC=/usr/ccs/bin/cc
1387     NON_GNU_CPP=/usr/ccs/lib/cpp
1388   ;;
1389
1390       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1391   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1392     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1393   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1394   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1395   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1396   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1397   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1398   mips-sgi-irix*      ) opsys=irix5-0 ;;
1399
1400     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1401   *-sony-news* ) opsys=newsos5 ;;
1402
1403     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1404
1405     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1406         case "$canonical" in
1407       m68*-sunos1* )             machine=sun1     ;;
1408       m68*-sunos2* )             machine=sun2     ;;
1409       m68* )                     machine=sun3     ;;
1410       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1411       i*86-*-* )                 machine=intel386 ;;
1412       rs6000* )                  machine=rs6000   ;;
1413     esac
1414
1415         case "$canonical" in *-sunos5*)
1416       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1417     esac
1418
1419                     case "$canonical" in
1420       *-sunos4* )
1421         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1422         : ;;
1423       *-solaris2* )
1424         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1425         RANLIB=':' ;;
1426     esac
1427
1428     case "$canonical" in
1429       *-solaris* )
1430         opsys=sol2
1431         os_release_major=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1/'`
1432         os_release_minor=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/'`
1433         case "$os_release_minor" in [0-9])
1434           os_release_minor="0${os_release_minor}";;
1435         esac
1436         os_release="${os_release_major}${os_release_minor}"
1437         { test "$extra_verbose" = "yes" && cat << EOF
1438     Defining OS_RELEASE = $os_release
1439 EOF
1440 cat >> confdefs.h <<EOF
1441 #define OS_RELEASE $os_release
1442 EOF
1443 }
1444  ;;
1445
1446             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1447       *-sunos4.0*         ) opsys=sunos4-0      ;;
1448       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1449       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1450       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1451       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1452       *-mach*             ) opsys=mach-bsd4-3   ;;
1453       *                   ) opsys=bsd4-2        ;;
1454     esac
1455
1456     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1457
1458         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1459   ;;
1460
1461     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1462
1463     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1464   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1465
1466     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1467
1468     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1469
1470     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1471       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1472
1473     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1474
1475     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1476
1477     vax-dec-* )
1478     case "$canonical" in
1479       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1480       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1481       *-mach* )                         opsys=mach-bsd4-3 ;;
1482     esac
1483   ;;
1484
1485     ns16k-whitechapel-* ) machine=mg1 ;;
1486
1487     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1488
1489     i[3-9]86-*-* )
1490     machine=intel386
1491     case "$canonical" in
1492       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1493       *-isc2.2* )               opsys=isc2-2 ;;
1494       *-isc4.0* )               opsys=isc4-0 ;;
1495       *-isc4.* )                opsys=isc4-1
1496                                 GCC_TEST_OPTIONS=-posix
1497                                 NON_GCC_TEST_OPTIONS=-Xp
1498                                 ;;
1499       *-isc* )                  opsys=isc3-0 ;;
1500       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1501       *-esix* )                 opsys=esix ;;
1502       *-mach* )                 opsys=mach-bsd4-3 ;;
1503       *-xenix* )                opsys=xenix ;;
1504       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1505       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1506       *-bsdi4* )                opsys=bsdos4 ;;
1507       *-bsdi3* )                opsys=bsdos3 ;;
1508       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1509       *-bsdi2* )                opsys=bsdos2 ;;
1510       *-sco3.2v5* )             opsys=sco5 ;;
1511       *-sysv5* )                opsys=sco7 ;;
1512       *-386bsd* )               opsys=386bsd ;;
1513       *-freebsd* )              opsys=freebsd ;;
1514       *-nextstep* )             opsys=nextstep ;;
1515       *-pc-cygwin* )            opsys=cygwin32 ;;
1516       *-pc-mingw* )             opsys=mingw32 ;
1517                                 test -z "$with_tty" && with_tty="no";;
1518           esac
1519   ;;
1520
1521     m68k-*-linux* ) machine=m68k opsys=linux ;;
1522
1523 esac
1524
1525 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1526
1527 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1528
1529 if test -r "${srcdir}/src/m/${machine}.h"; then
1530   machfile="m/${machine}.h"
1531   { test "$extra_verbose" = "yes" && cat << EOF
1532     Defining config_machfile = "$machfile"
1533 EOF
1534 cat >> confdefs.h <<EOF
1535 #define config_machfile "$machfile"
1536 EOF
1537 }
1538
1539 else
1540   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1541   echo "Using configure-time autodetection only."
1542 fi
1543
1544 if test -r "${srcdir}/src/s/${opsys}.h"; then
1545   opsysfile="s/${opsys}.h"
1546   { test "$extra_verbose" = "yes" && cat << EOF
1547     Defining config_opsysfile = "$opsysfile"
1548 EOF
1549 cat >> confdefs.h <<EOF
1550 #define config_opsysfile "$opsysfile"
1551 EOF
1552 }
1553
1554 else
1555   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1556   echo "Using configure-time autodetection only."
1557 fi
1558
1559
1560 if test -z "$pdump"; then
1561   case "$opsys" in
1562     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        *)        pdump=no ;;
1563   esac
1564 fi
1565
1566 if test -z "$dynamic"; then
1567   case "$opsys" in
1568     hpux* | sunos4* ) dynamic=no ;;
1569     *) dynamic=yes ;;
1570   esac
1571 fi
1572 if test "$dynamic" = "yes"; then
1573   case "$opsys" in
1574     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1575     decosf* ) ld_call_shared="-call_shared" ;;
1576     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1577     Defining DLSYM_NEEDS_UNDERSCORE
1578 EOF
1579 cat >> confdefs.h <<\EOF
1580 #define DLSYM_NEEDS_UNDERSCORE 1
1581 EOF
1582 }
1583  ;;
1584   esac
1585 else   case "$opsys" in
1586     sol2 )
1587       echo "Static linking is not supported on Solaris 2."
1588       echo "Rerun configure without specifying --dynamic=no."
1589       exit 1 ;;
1590     linux   ) ld_call_shared="-Bstatic" ;;
1591     decosf* ) ld_call_shared="-non_shared" ;;
1592   esac
1593 fi
1594
1595 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1596
1597 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1598 { test "$extra_verbose" = "yes" && cat << EOF
1599     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1600 EOF
1601 cat >> confdefs.h <<EOF
1602 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1603 EOF
1604 }
1605
1606
1607
1608 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1609 if test "$with_workshop $with_tooltalk" = "yes no"; then
1610   (echo "$progname: Usage error:"
1611 echo " " "--with-workshop requires --with-tooltalk"
1612 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1613 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1614 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1615 fi
1616
1617 if test "$with_workshop" = "yes"; then
1618   { test "$extra_verbose" = "yes" && cat << \EOF
1619     Defining SUNPRO
1620 EOF
1621 cat >> confdefs.h <<\EOF
1622 #define SUNPRO 1
1623 EOF
1624 }
1625
1626   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1627    echo "    xemacs will be linked with \"sunpro.o\""
1628  fi
1629 fi
1630
1631 if test "$with_clash_detection" != "no"; then
1632   { test "$extra_verbose" = "yes" && cat << \EOF
1633     Defining CLASH_DETECTION
1634 EOF
1635 cat >> confdefs.h <<\EOF
1636 #define CLASH_DETECTION 1
1637 EOF
1638 }
1639
1640   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1641    echo "    xemacs will be linked with \"filelock.o\""
1642  fi
1643 fi
1644
1645 test -n "$compiler" && CC="$compiler"
1646 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1647 fi
1648
1649 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1650 if test "${CFLAGS-unset}" != unset
1651   then cflags_specified=yes;
1652   else cflags_specified=no;
1653 fi
1654
1655 xe_save_CFLAGS="$CFLAGS"
1656
1657 # Extract the first word of "gcc", so it can be a program name with args.
1658 set dummy gcc; ac_word=$2
1659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1660 echo "configure:1661: checking for $ac_word" >&5
1661
1662 if test -n "$CC"; then
1663   ac_cv_prog_CC="$CC" # Let the user override the test.
1664 else
1665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1666   ac_dummy="$PATH"
1667   for ac_dir in $ac_dummy; do
1668     test -z "$ac_dir" && ac_dir=.
1669     if test -f $ac_dir/$ac_word; then
1670       ac_cv_prog_CC="gcc"
1671       break
1672     fi
1673   done
1674   IFS="$ac_save_ifs"
1675 fi
1676 CC="$ac_cv_prog_CC"
1677 if test -n "$CC"; then
1678   echo "$ac_t""$CC" 1>&6
1679 else
1680   echo "$ac_t""no" 1>&6
1681 fi
1682
1683 if test -z "$CC"; then
1684   # Extract the first word of "cc", so it can be a program name with args.
1685 set dummy cc; ac_word=$2
1686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1687 echo "configure:1688: checking for $ac_word" >&5
1688
1689 if test -n "$CC"; then
1690   ac_cv_prog_CC="$CC" # Let the user override the test.
1691 else
1692   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1693   ac_prog_rejected=no
1694   ac_dummy="$PATH"
1695   for ac_dir in $ac_dummy; do
1696     test -z "$ac_dir" && ac_dir=.
1697     if test -f $ac_dir/$ac_word; then
1698       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1699         ac_prog_rejected=yes
1700         continue
1701       fi
1702       ac_cv_prog_CC="cc"
1703       break
1704     fi
1705   done
1706   IFS="$ac_save_ifs"
1707 if test $ac_prog_rejected = yes; then
1708   # We found a bogon in the path, so make sure we never use it.
1709   set dummy $ac_cv_prog_CC
1710   shift
1711   if test $# -gt 0; then
1712     # We chose a different compiler from the bogus one.
1713     # However, it has the same basename, so the bogon will be chosen
1714     # first if we set CC to just the basename; use the full file name.
1715     shift
1716     set dummy "$ac_dir/$ac_word" "$@"
1717     shift
1718     ac_cv_prog_CC="$@"
1719   fi
1720 fi
1721 fi
1722 CC="$ac_cv_prog_CC"
1723 if test -n "$CC"; then
1724   echo "$ac_t""$CC" 1>&6
1725 else
1726   echo "$ac_t""no" 1>&6
1727 fi
1728
1729   if test -z "$CC"; then
1730     case "`uname -s`" in
1731     *win32* | *WIN32*)
1732       # Extract the first word of "cl", so it can be a program name with args.
1733 set dummy cl; ac_word=$2
1734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1735 echo "configure:1736: checking for $ac_word" >&5
1736
1737 if test -n "$CC"; then
1738   ac_cv_prog_CC="$CC" # Let the user override the test.
1739 else
1740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1741   ac_dummy="$PATH"
1742   for ac_dir in $ac_dummy; do
1743     test -z "$ac_dir" && ac_dir=.
1744     if test -f $ac_dir/$ac_word; then
1745       ac_cv_prog_CC="cl"
1746       break
1747     fi
1748   done
1749   IFS="$ac_save_ifs"
1750 fi
1751 CC="$ac_cv_prog_CC"
1752 if test -n "$CC"; then
1753   echo "$ac_t""$CC" 1>&6
1754 else
1755   echo "$ac_t""no" 1>&6
1756 fi
1757  ;;
1758     esac
1759   fi
1760   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1761 fi
1762
1763 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1764 echo "configure:1765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1765
1766 ac_ext=c
1767 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1768 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1769 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'
1770 ac_cpp='$CPP '"$xe_cppflags"
1771 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1772 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1773 cross_compiling=no
1774
1775 cat > conftest.$ac_ext << EOF
1776
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779
1780 main(){return(0);}
1781 EOF
1782 if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1783   ac_cv_prog_cc_works=yes
1784   # If we can't run a trivial program, we are probably using a cross compiler.
1785   if (./conftest; exit) 2>/dev/null; then
1786     ac_cv_prog_cc_cross=no
1787   else
1788     ac_cv_prog_cc_cross=yes
1789   fi
1790 else
1791   echo "configure: failed program was:" >&5
1792   cat conftest.$ac_ext >&5
1793   ac_cv_prog_cc_works=no
1794 fi
1795 rm -fr conftest*
1796 ac_ext=c
1797 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1798 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1799 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'
1800 ac_cpp='$CPP '"$xe_cppflags"
1801 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1802 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1803 cross_compiling=no
1804
1805 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1806 if test $ac_cv_prog_cc_works = no; then
1807   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1808 fi
1809 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1810 echo "configure:1811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1811 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1812 cross_compiling=$ac_cv_prog_cc_cross
1813
1814 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1815 echo "configure:1816: checking whether we are using GNU C" >&5
1816
1817 cat > conftest.c <<EOF
1818 #ifdef __GNUC__
1819   yes;
1820 #endif
1821 EOF
1822 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1823   ac_cv_prog_gcc=yes
1824 else
1825   ac_cv_prog_gcc=no
1826 fi
1827
1828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1829
1830 if test $ac_cv_prog_gcc = yes; then
1831   GCC=yes
1832 else
1833   GCC=
1834 fi
1835
1836 ac_test_CFLAGS="${CFLAGS+set}"
1837 ac_save_CFLAGS="$CFLAGS"
1838 CFLAGS=
1839 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1840 echo "configure:1841: checking whether ${CC-cc} accepts -g" >&5
1841
1842 echo 'void f(){}' > conftest.c
1843 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1844   ac_cv_prog_cc_g=yes
1845 else
1846   ac_cv_prog_cc_g=no
1847 fi
1848 rm -f conftest*
1849
1850
1851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1852 if test "$ac_test_CFLAGS" = set; then
1853   CFLAGS="$ac_save_CFLAGS"
1854 elif test $ac_cv_prog_cc_g = yes; then
1855   if test "$GCC" = yes; then
1856     CFLAGS="-g -O2"
1857   else
1858     CFLAGS="-g"
1859   fi
1860 else
1861   if test "$GCC" = yes; then
1862     CFLAGS="-O2"
1863   else
1864     CFLAGS=
1865   fi
1866 fi
1867  
1868 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1869   CC=${NON_GNU_CC-cc}
1870   # Extract the first word of "gcc", so it can be a program name with args.
1871 set dummy gcc; ac_word=$2
1872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1873 echo "configure:1874: checking for $ac_word" >&5
1874
1875 if test -n "$CC"; then
1876   ac_cv_prog_CC="$CC" # Let the user override the test.
1877 else
1878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1879   ac_dummy="$PATH"
1880   for ac_dir in $ac_dummy; do
1881     test -z "$ac_dir" && ac_dir=.
1882     if test -f $ac_dir/$ac_word; then
1883       ac_cv_prog_CC="gcc"
1884       break
1885     fi
1886   done
1887   IFS="$ac_save_ifs"
1888 fi
1889 CC="$ac_cv_prog_CC"
1890 if test -n "$CC"; then
1891   echo "$ac_t""$CC" 1>&6
1892 else
1893   echo "$ac_t""no" 1>&6
1894 fi
1895
1896 if test -z "$CC"; then
1897   # Extract the first word of "cc", so it can be a program name with args.
1898 set dummy cc; ac_word=$2
1899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1900 echo "configure:1901: checking for $ac_word" >&5
1901
1902 if test -n "$CC"; then
1903   ac_cv_prog_CC="$CC" # Let the user override the test.
1904 else
1905   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1906   ac_prog_rejected=no
1907   ac_dummy="$PATH"
1908   for ac_dir in $ac_dummy; do
1909     test -z "$ac_dir" && ac_dir=.
1910     if test -f $ac_dir/$ac_word; then
1911       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1912         ac_prog_rejected=yes
1913         continue
1914       fi
1915       ac_cv_prog_CC="cc"
1916       break
1917     fi
1918   done
1919   IFS="$ac_save_ifs"
1920 if test $ac_prog_rejected = yes; then
1921   # We found a bogon in the path, so make sure we never use it.
1922   set dummy $ac_cv_prog_CC
1923   shift
1924   if test $# -gt 0; then
1925     # We chose a different compiler from the bogus one.
1926     # However, it has the same basename, so the bogon will be chosen
1927     # first if we set CC to just the basename; use the full file name.
1928     shift
1929     set dummy "$ac_dir/$ac_word" "$@"
1930     shift
1931     ac_cv_prog_CC="$@"
1932   fi
1933 fi
1934 fi
1935 CC="$ac_cv_prog_CC"
1936 if test -n "$CC"; then
1937   echo "$ac_t""$CC" 1>&6
1938 else
1939   echo "$ac_t""no" 1>&6
1940 fi
1941
1942   if test -z "$CC"; then
1943     case "`uname -s`" in
1944     *win32* | *WIN32*)
1945       # Extract the first word of "cl", so it can be a program name with args.
1946 set dummy cl; ac_word=$2
1947 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1948 echo "configure:1949: checking for $ac_word" >&5
1949
1950 if test -n "$CC"; then
1951   ac_cv_prog_CC="$CC" # Let the user override the test.
1952 else
1953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1954   ac_dummy="$PATH"
1955   for ac_dir in $ac_dummy; do
1956     test -z "$ac_dir" && ac_dir=.
1957     if test -f $ac_dir/$ac_word; then
1958       ac_cv_prog_CC="cl"
1959       break
1960     fi
1961   done
1962   IFS="$ac_save_ifs"
1963 fi
1964 CC="$ac_cv_prog_CC"
1965 if test -n "$CC"; then
1966   echo "$ac_t""$CC" 1>&6
1967 else
1968   echo "$ac_t""no" 1>&6
1969 fi
1970  ;;
1971     esac
1972   fi
1973   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1974 fi
1975
1976 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1977 echo "configure:1978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1978
1979 ac_ext=c
1980 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1981 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1982 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'
1983 ac_cpp='$CPP '"$xe_cppflags"
1984 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1985 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1986 cross_compiling=no
1987
1988 cat > conftest.$ac_ext << EOF
1989
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1992
1993 main(){return(0);}
1994 EOF
1995 if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1996   ac_cv_prog_cc_works=yes
1997   # If we can't run a trivial program, we are probably using a cross compiler.
1998   if (./conftest; exit) 2>/dev/null; then
1999     ac_cv_prog_cc_cross=no
2000   else
2001     ac_cv_prog_cc_cross=yes
2002   fi
2003 else
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   ac_cv_prog_cc_works=no
2007 fi
2008 rm -fr conftest*
2009 ac_ext=c
2010 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2011 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2012 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'
2013 ac_cpp='$CPP '"$xe_cppflags"
2014 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2015 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2016 cross_compiling=no
2017
2018 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2019 if test $ac_cv_prog_cc_works = no; then
2020   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2021 fi
2022 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2023 echo "configure:2024: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2024 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2025 cross_compiling=$ac_cv_prog_cc_cross
2026
2027 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2028 echo "configure:2029: checking whether we are using GNU C" >&5
2029
2030 cat > conftest.c <<EOF
2031 #ifdef __GNUC__
2032   yes;
2033 #endif
2034 EOF
2035 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2036   ac_cv_prog_gcc=yes
2037 else
2038   ac_cv_prog_gcc=no
2039 fi
2040
2041 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2042
2043 if test $ac_cv_prog_gcc = yes; then
2044   GCC=yes
2045 else
2046   GCC=
2047 fi
2048
2049 ac_test_CFLAGS="${CFLAGS+set}"
2050 ac_save_CFLAGS="$CFLAGS"
2051 CFLAGS=
2052 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2053 echo "configure:2054: checking whether ${CC-cc} accepts -g" >&5
2054
2055 echo 'void f(){}' > conftest.c
2056 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2057   ac_cv_prog_cc_g=yes
2058 else
2059   ac_cv_prog_cc_g=no
2060 fi
2061 rm -f conftest*
2062
2063
2064 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2065 if test "$ac_test_CFLAGS" = set; then
2066   CFLAGS="$ac_save_CFLAGS"
2067 elif test $ac_cv_prog_cc_g = yes; then
2068   if test "$GCC" = yes; then
2069     CFLAGS="-g -O2"
2070   else
2071     CFLAGS="-g"
2072   fi
2073 else
2074   if test "$GCC" = yes; then
2075     CFLAGS="-O2"
2076   else
2077     CFLAGS=
2078   fi
2079 fi
2080
2081 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2082   CC=gcc
2083   # Extract the first word of "gcc", so it can be a program name with args.
2084 set dummy gcc; ac_word=$2
2085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2086 echo "configure:2087: checking for $ac_word" >&5
2087
2088 if test -n "$CC"; then
2089   ac_cv_prog_CC="$CC" # Let the user override the test.
2090 else
2091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2092   ac_dummy="$PATH"
2093   for ac_dir in $ac_dummy; do
2094     test -z "$ac_dir" && ac_dir=.
2095     if test -f $ac_dir/$ac_word; then
2096       ac_cv_prog_CC="gcc"
2097       break
2098     fi
2099   done
2100   IFS="$ac_save_ifs"
2101 fi
2102 CC="$ac_cv_prog_CC"
2103 if test -n "$CC"; then
2104   echo "$ac_t""$CC" 1>&6
2105 else
2106   echo "$ac_t""no" 1>&6
2107 fi
2108
2109 if test -z "$CC"; then
2110   # Extract the first word of "cc", so it can be a program name with args.
2111 set dummy cc; ac_word=$2
2112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2113 echo "configure:2114: checking for $ac_word" >&5
2114
2115 if test -n "$CC"; then
2116   ac_cv_prog_CC="$CC" # Let the user override the test.
2117 else
2118   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2119   ac_prog_rejected=no
2120   ac_dummy="$PATH"
2121   for ac_dir in $ac_dummy; do
2122     test -z "$ac_dir" && ac_dir=.
2123     if test -f $ac_dir/$ac_word; then
2124       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2125         ac_prog_rejected=yes
2126         continue
2127       fi
2128       ac_cv_prog_CC="cc"
2129       break
2130     fi
2131   done
2132   IFS="$ac_save_ifs"
2133 if test $ac_prog_rejected = yes; then
2134   # We found a bogon in the path, so make sure we never use it.
2135   set dummy $ac_cv_prog_CC
2136   shift
2137   if test $# -gt 0; then
2138     # We chose a different compiler from the bogus one.
2139     # However, it has the same basename, so the bogon will be chosen
2140     # first if we set CC to just the basename; use the full file name.
2141     shift
2142     set dummy "$ac_dir/$ac_word" "$@"
2143     shift
2144     ac_cv_prog_CC="$@"
2145   fi
2146 fi
2147 fi
2148 CC="$ac_cv_prog_CC"
2149 if test -n "$CC"; then
2150   echo "$ac_t""$CC" 1>&6
2151 else
2152   echo "$ac_t""no" 1>&6
2153 fi
2154
2155   if test -z "$CC"; then
2156     case "`uname -s`" in
2157     *win32* | *WIN32*)
2158       # Extract the first word of "cl", so it can be a program name with args.
2159 set dummy cl; ac_word=$2
2160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2161 echo "configure:2162: checking for $ac_word" >&5
2162
2163 if test -n "$CC"; then
2164   ac_cv_prog_CC="$CC" # Let the user override the test.
2165 else
2166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2167   ac_dummy="$PATH"
2168   for ac_dir in $ac_dummy; do
2169     test -z "$ac_dir" && ac_dir=.
2170     if test -f $ac_dir/$ac_word; then
2171       ac_cv_prog_CC="cl"
2172       break
2173     fi
2174   done
2175   IFS="$ac_save_ifs"
2176 fi
2177 CC="$ac_cv_prog_CC"
2178 if test -n "$CC"; then
2179   echo "$ac_t""$CC" 1>&6
2180 else
2181   echo "$ac_t""no" 1>&6
2182 fi
2183  ;;
2184     esac
2185   fi
2186   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2187 fi
2188
2189 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2190 echo "configure:2191: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2191
2192 ac_ext=c
2193 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2194 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2195 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'
2196 ac_cpp='$CPP '"$xe_cppflags"
2197 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2198 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2199 cross_compiling=no
2200
2201 cat > conftest.$ac_ext << EOF
2202
2203 #line 2204 "configure"
2204 #include "confdefs.h"
2205
2206 main(){return(0);}
2207 EOF
2208 if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2209   ac_cv_prog_cc_works=yes
2210   # If we can't run a trivial program, we are probably using a cross compiler.
2211   if (./conftest; exit) 2>/dev/null; then
2212     ac_cv_prog_cc_cross=no
2213   else
2214     ac_cv_prog_cc_cross=yes
2215   fi
2216 else
2217   echo "configure: failed program was:" >&5
2218   cat conftest.$ac_ext >&5
2219   ac_cv_prog_cc_works=no
2220 fi
2221 rm -fr conftest*
2222 ac_ext=c
2223 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2224 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2225 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'
2226 ac_cpp='$CPP '"$xe_cppflags"
2227 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2228 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2229 cross_compiling=no
2230
2231 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2232 if test $ac_cv_prog_cc_works = no; then
2233   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2234 fi
2235 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2236 echo "configure:2237: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2237 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2238 cross_compiling=$ac_cv_prog_cc_cross
2239
2240 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2241 echo "configure:2242: checking whether we are using GNU C" >&5
2242
2243 cat > conftest.c <<EOF
2244 #ifdef __GNUC__
2245   yes;
2246 #endif
2247 EOF
2248 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2249   ac_cv_prog_gcc=yes
2250 else
2251   ac_cv_prog_gcc=no
2252 fi
2253
2254 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2255
2256 if test $ac_cv_prog_gcc = yes; then
2257   GCC=yes
2258 else
2259   GCC=
2260 fi
2261
2262 ac_test_CFLAGS="${CFLAGS+set}"
2263 ac_save_CFLAGS="$CFLAGS"
2264 CFLAGS=
2265 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2266 echo "configure:2267: checking whether ${CC-cc} accepts -g" >&5
2267
2268 echo 'void f(){}' > conftest.c
2269 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2270   ac_cv_prog_cc_g=yes
2271 else
2272   ac_cv_prog_cc_g=no
2273 fi
2274 rm -f conftest*
2275
2276
2277 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2278 if test "$ac_test_CFLAGS" = set; then
2279   CFLAGS="$ac_save_CFLAGS"
2280 elif test $ac_cv_prog_cc_g = yes; then
2281   if test "$GCC" = yes; then
2282     CFLAGS="-g -O2"
2283   else
2284     CFLAGS="-g"
2285   fi
2286 else
2287   if test "$GCC" = yes; then
2288     CFLAGS="-O2"
2289   else
2290     CFLAGS=
2291   fi
2292 fi
2293
2294 fi
2295 CFLAGS="$xe_save_CFLAGS"
2296
2297
2298 test -n "$CPP" -a -d "$CPP" && CPP=
2299
2300 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2301
2302 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2303 echo "configure:2304: checking how to run the C preprocessor" >&5
2304 # On Suns, sometimes $CPP names a directory.
2305 if test -n "$CPP" && test -d "$CPP"; then
2306   CPP=
2307 fi
2308 if test -z "$CPP"; then
2309
2310   # This must be in double quotes, not single quotes, because CPP may get
2311   # substituted into the Makefile and "${CC-cc}" will confuse make.
2312   CPP="${CC-cc} -E"
2313   # On the NeXT, cc -E runs the code through the compiler's parser,
2314   # not just through cpp.
2315   cat > conftest.$ac_ext <<EOF
2316 #line 2317 "configure"
2317 #include "confdefs.h"
2318 #include <assert.h>
2319 Syntax Error
2320 EOF
2321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2322 { (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2324 if test -z "$ac_err"; then
2325   :
2326 else
2327   echo "$ac_err" >&5
2328   echo "configure: failed program was:" >&5
2329   cat conftest.$ac_ext >&5
2330   rm -rf conftest*
2331   CPP="${CC-cc} -E -traditional-cpp"
2332   cat > conftest.$ac_ext <<EOF
2333 #line 2334 "configure"
2334 #include "confdefs.h"
2335 #include <assert.h>
2336 Syntax Error
2337 EOF
2338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2339 { (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2341 if test -z "$ac_err"; then
2342   :
2343 else
2344   echo "$ac_err" >&5
2345   echo "configure: failed program was:" >&5
2346   cat conftest.$ac_ext >&5
2347   rm -rf conftest*
2348   CPP="${CC-cc} -nologo -E"
2349   cat > conftest.$ac_ext <<EOF
2350 #line 2351 "configure"
2351 #include "confdefs.h"
2352 #include <assert.h>
2353 Syntax Error
2354 EOF
2355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2356 { (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2358 if test -z "$ac_err"; then
2359   :
2360 else
2361   echo "$ac_err" >&5
2362   echo "configure: failed program was:" >&5
2363   cat conftest.$ac_ext >&5
2364   rm -rf conftest*
2365   CPP=/lib/cpp
2366 fi
2367 rm -f conftest*
2368 fi
2369 rm -f conftest*
2370 fi
2371 rm -f conftest*
2372   ac_cv_prog_CPP="$CPP"
2373   CPP="$ac_cv_prog_CPP"
2374 else
2375   ac_cv_prog_CPP="$CPP"
2376 fi
2377 echo "$ac_t""$CPP" 1>&6
2378
2379
2380
2381 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2382 echo "configure:2383: checking for AIX" >&5
2383 cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #ifdef _AIX
2387   yes
2388 #endif
2389
2390 EOF
2391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2392   egrep "yes" >/dev/null 2>&1; then
2393   rm -rf conftest*
2394   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2395     Defining _ALL_SOURCE
2396 EOF
2397 cat >> confdefs.h <<\EOF
2398 #define _ALL_SOURCE 1
2399 EOF
2400 }
2401
2402 else
2403   rm -rf conftest*
2404   echo "$ac_t""no" 1>&6
2405 fi
2406 rm -f conftest*
2407
2408  
2409
2410 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2411 echo "configure:2412: checking for GNU libc" >&5
2412 cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.h"
2415 #include <features.h>
2416 int main() {
2417
2418 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2419 #error Not a GNU libc system :-(
2420 ******* ======= ******** &&&&&&&&
2421 #endif
2422
2423 ; return 0; }
2424 EOF
2425 if { (eval echo configure:2426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2426   rm -rf conftest*
2427   have_glibc=yes
2428 else
2429   echo "configure: failed program was:" >&5
2430   cat conftest.$ac_ext >&5
2431   rm -rf conftest*
2432   have_glibc=no
2433 fi
2434 rm -f conftest*
2435 echo "$ac_t""$have_glibc" 1>&6
2436 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2437     Defining _GNU_SOURCE
2438 EOF
2439 cat >> confdefs.h <<\EOF
2440 #define _GNU_SOURCE 1
2441 EOF
2442 }
2443
2444
2445 case "$opsys" in
2446   sol2)
2447    { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining __EXTENSIONS__
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define __EXTENSIONS__ 1
2452 EOF
2453 }
2454
2455       if test "$os_release" -ge 505; then
2456      { test "$extra_verbose" = "yes" && cat << \EOF
2457     Defining _XOPEN_SOURCE = 500
2458 EOF
2459 cat >> confdefs.h <<\EOF
2460 #define _XOPEN_SOURCE 500
2461 EOF
2462 }
2463
2464      { test "$extra_verbose" = "yes" && cat << \EOF
2465     Defining _XOPEN_SOURCE_EXTENDED
2466 EOF
2467 cat >> confdefs.h <<\EOF
2468 #define _XOPEN_SOURCE_EXTENDED 1
2469 EOF
2470 }
2471
2472    fi ;;
2473   linux)
2474     { test "$extra_verbose" = "yes" && cat << \EOF
2475     Defining _POSIX_C_SOURCE = 199506L
2476 EOF
2477 cat >> confdefs.h <<\EOF
2478 #define _POSIX_C_SOURCE 199506L
2479 EOF
2480 }
2481
2482     { test "$extra_verbose" = "yes" && cat << \EOF
2483     Defining _XOPEN_SOURCE = 500
2484 EOF
2485 cat >> confdefs.h <<\EOF
2486 #define _XOPEN_SOURCE 500
2487 EOF
2488 }
2489
2490     { test "$extra_verbose" = "yes" && cat << \EOF
2491     Defining _XOPEN_SOURCE_EXTENDED
2492 EOF
2493 cat >> confdefs.h <<\EOF
2494 #define _XOPEN_SOURCE_EXTENDED 1
2495 EOF
2496 }
2497
2498     ;;
2499 esac
2500
2501 cat > conftest.$ac_ext <<EOF
2502 #line 2503 "configure"
2503 #include "confdefs.h"
2504 int main () {
2505 #if defined __SUNPRO_C
2506 return 11;
2507 #elif defined __DECC
2508 return 12;
2509 #elif defined __USLC__ && defined __SCO_VERSION__
2510 return 13;
2511 #elif defined __INTEL_COMPILER
2512 return 14;
2513 #else
2514 return 0;
2515 #endif
2516 }
2517 EOF
2518 if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2519 then
2520   :
2521 else
2522   conftest_rc="$?"
2523   echo "configure: failed program was:" >&5
2524   cat conftest.$ac_ext >&5
2525   rm -fr conftest*
2526   case "$conftest_rc" in
2527   11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
2528   12) echo "You appear to be using the DEC C compiler."    ; __DECC=yes ;;
2529   13) echo "You appear to be using the SCO C compiler."    ; __USLC__=yes ;;
2530   14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
2531             GCC=no ;;
2532 esac
2533 fi
2534 rm -fr conftest*
2535
2536
2537
2538
2539 echo "Extracting information from the machine- and system-dependent headers..."
2540
2541 tempcname="conftest.c"
2542
2543
2544
2545 cat > $tempcname < confdefs.h
2546 cat >> $tempcname <<EOF
2547 #define NOT_C_CODE
2548 #define C_SWITCH_SITE
2549 #define C_SWITCH_X_SITE
2550 #define LD_SWITCH_SITE
2551 #define LD_SWITCH_X_SITE
2552 #define LD_SWITCH_X_SITE_AUX
2553 #define OS_RELEASE $os_release
2554
2555 #ifdef config_opsysfile
2556 #include "$srcdir/src/$opsysfile"
2557 #endif
2558
2559 #ifdef config_machfile
2560 #include "$srcdir/src/$machfile"
2561 #endif
2562
2563 #ifndef LIBS_MACHINE
2564 #define LIBS_MACHINE
2565 #endif
2566 configure___ libs_machine=LIBS_MACHINE
2567
2568 #ifndef LIBS_SYSTEM
2569 #define LIBS_SYSTEM
2570 #endif
2571 configure___ libs_system=LIBS_SYSTEM
2572
2573 #ifndef LIBS_TERMCAP
2574 #define LIBS_TERMCAP
2575 #endif
2576 configure___ libs_termcap=LIBS_TERMCAP
2577
2578 #ifndef LIB_STANDARD
2579 #define LIB_STANDARD
2580 #endif
2581 configure___ libs_standard=LIB_STANDARD
2582
2583
2584 #ifndef OBJECTS_MACHINE
2585 #define OBJECTS_MACHINE
2586 #endif
2587 configure___ objects_machine=OBJECTS_MACHINE
2588
2589 #ifndef OBJECTS_SYSTEM
2590 #define OBJECTS_SYSTEM
2591 #endif
2592 configure___ objects_system=OBJECTS_SYSTEM
2593
2594
2595 #ifndef C_SWITCH_MACHINE
2596 #define C_SWITCH_MACHINE
2597 #endif
2598 configure___ c_switch_machine=C_SWITCH_MACHINE
2599
2600 #ifndef C_SWITCH_SYSTEM
2601 #define C_SWITCH_SYSTEM
2602 #endif
2603 configure___ c_switch_system=C_SWITCH_SYSTEM
2604
2605
2606 #ifndef LD_SWITCH_MACHINE
2607 #define LD_SWITCH_MACHINE
2608 #endif
2609 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2610
2611 #ifndef LD_SWITCH_SYSTEM
2612 #define LD_SWITCH_SYSTEM
2613 #endif
2614 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2615
2616
2617 #ifndef UNEXEC
2618 #define UNEXEC "unexec.o"
2619 #endif
2620 configure___ unexec=UNEXEC
2621
2622
2623 #ifndef LD_SWITCH_SHARED
2624 #define LD_SWITCH_SHARED "-c"
2625 #endif
2626 configure___ ld_switch_shared=LD_SWITCH_SHARED
2627
2628
2629 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2630 configure___ ordinary_ld=ORDINARY_LD
2631
2632 #ifdef ORDINARY_LINK
2633 #define LD ORDINARY_LD
2634 #else /* no ORDINARY LINK */
2635 #ifdef COFF_ENCAPSULATE
2636 #define LD "\$(CC) -nostdlib"
2637 #else /* not COFF_ENCAPSULATE */
2638 #ifdef LINKER
2639 #define LD LINKER
2640 #else /* ! defined (LINKER) */
2641 #define LD "ld"
2642 #endif /* ! defined (LINKER) */
2643 #endif /* ! defined (COFF_ENCAPSULATE) */
2644 #endif /* not ORDINARY_LINK */
2645 configure___ ld=LD
2646
2647 #ifndef LIB_GCC
2648 #define LIB_GCC
2649 #endif
2650 configure___ lib_gcc=LIB_GCC
2651
2652 #ifndef LD_TEXT_START_ADDR
2653 #define LD_TEXT_START_ADDR
2654 #endif
2655 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2656
2657
2658 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2659 #ifdef NO_REMAP
2660 #ifdef COFF_ENCAPSULATE
2661 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2662 #else /* ! defined (COFF_ENCAPSULATE) */
2663 #define START_FILES "pre-crt0.o /lib/crt0.o"
2664 #endif /* ! defined (COFF_ENCAPSULATE) */
2665 #else /* ! defined (NO_REMAP) */
2666 #define START_FILES "ecrt0.o"
2667 #endif /* ! defined (NO_REMAP) */
2668 #endif /* no ORDINARY_LINK */
2669 #ifndef START_FILES
2670 #define START_FILES
2671 #endif
2672 configure___ start_files=START_FILES
2673
2674 #ifdef ORDINARY_LINK
2675 configure___ ordinary_link=yes
2676 #else
2677 configure___ ordinary_link=no
2678 #endif
2679
2680 #ifdef SYSTEM_MALLOC
2681 configure___ system_malloc=yes
2682 #else
2683 configure___ system_malloc=no
2684 #endif
2685
2686 #ifdef TERMINFO
2687 configure___ have_terminfo=yes
2688 #else
2689 configure___ have_terminfo=no
2690 #endif
2691
2692 #ifdef MAIL_USE_FLOCK
2693 configure___ mail_use_flock=yes
2694 #else
2695 configure___ mail_use_flock=no
2696 #endif
2697
2698 #ifdef MAIL_USE_LOCKF
2699 configure___ mail_use_lockf=yes
2700 #else
2701 configure___ mail_use_lockf=no
2702 #endif
2703
2704 #ifdef MAIL_USE_LOCKING
2705 configure___ mail_use_locking=yes
2706 #else
2707 configure___ mail_use_locking=no
2708 #endif
2709
2710 #ifdef HAVE_WIN32_PROCESSES
2711 configure___ win32_processes=yes
2712 #else
2713 configure___ win32_processes=no
2714 #endif
2715
2716 EOF
2717
2718 CPP=`eval "echo $CPP $CPPFLAGS"`
2719 eval `$CPP -Isrc $tempcname \
2720         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2721
2722 rm $tempcname
2723
2724 if test "$pdump" = "yes"; then
2725   ordinary_link="yes"
2726   ld="${ordinary_ld}"
2727   start_files=
2728   libs_standard=
2729   unexec=
2730   lib_gcc=
2731 fi
2732
2733 test "$extra_verbose" = "yes" && \
2734   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 ""
2735
2736 case "$opsys" in mingw* | cygwin*)
2737   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2738   cygwin_include=`eval "dirname $cygwin_include"` ;
2739   cygwin_include="-I$cygwin_include/../include" ;
2740   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2741   case "$opsys" in mingw*)
2742     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2743   esac
2744   ;;
2745 esac
2746
2747 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2748
2749
2750 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2751
2752 if test "$__USLC__" = yes; then
2753   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2754 echo "configure:2755: checking for whether the -Kalloca compiler flag is needed" >&5
2755   need_kalloca=no
2756   cat > conftest.$ac_ext <<EOF
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759
2760 int main() {
2761 void *x = alloca(4);
2762 ; return 0; }
2763 EOF
2764 if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2765   rm -rf conftest*
2766   :
2767 else
2768   echo "configure: failed program was:" >&5
2769   cat conftest.$ac_ext >&5
2770   rm -rf conftest*
2771   
2772     xe_save_c_switch_system="$c_switch_system"
2773     c_switch_system="$c_switch_system -Kalloca"
2774     cat > conftest.$ac_ext <<EOF
2775 #line 2776 "configure"
2776 #include "confdefs.h"
2777
2778 int main() {
2779 void *x = alloca(4);
2780 ; return 0; }
2781 EOF
2782 if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2783   rm -rf conftest*
2784    need_kalloca=yes 
2785 else
2786   echo "configure: failed program was:" >&5
2787   cat conftest.$ac_ext >&5
2788 fi
2789 rm -f conftest*
2790     c_switch_system="$xe_save_c_switch_system"
2791 fi
2792 rm -f conftest*
2793   echo "$ac_t""$need_kalloca" 1>&6
2794   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
2795 fi
2796
2797 if test "$cflags_specified" = "no"; then
2798       if   test "$GCC" = "yes"; then
2799     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2800         CFLAGS="$CFLAGS -Wsign-compare"
2801         case "`gcc -v --help 2>&1`" in
2802       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2803     esac
2804                 if test "$xemacs_compiler" != "g++"; then
2805       CFLAGS="$CFLAGS -Wshadow"
2806     fi
2807             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2808               elif test "$__SUNPRO_C" = "yes"; then
2809     case "$opsys" in
2810       sol2    ) CFLAGS="-v -xO4" ;;
2811       sunos4* ) CFLAGS="-xO2";;
2812     esac
2813   elif test "$__DECC" = "yes"; then
2814     CFLAGS="-O3"
2815   elif test "$CC" = "xlc"; then
2816     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2817   elif test "$__ICC" = "yes"; then
2818     CFLAGS="-g -O3 -Ob2 -Wall -W1"
2819     else
2820     CFLAGS="-O" ;  fi
2821 fi
2822
2823 if test "$GCC" = "yes"; then
2824 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2825 echo "configure:2826: checking for buggy gcc versions" >&5
2826 GCC_VERSION=`$CC --version`
2827 case `uname -s`:`uname -m`:$GCC_VERSION in
2828                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2829                         case "$CFLAGS" in
2830             *-O2*|*-O3*)
2831                 case "$CFLAGS" in
2832                     *-fno-schedule-insns*) ;;
2833                     *)
2834                         echo "$ac_t""yes" 1>&6
2835                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2836                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2837                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2838                         ;;
2839                 esac
2840                 ;;
2841         esac
2842         ;;
2843                     Linux:alpha:egcs-2.91.*)
2844         echo "$ac_t""yes" 1>&6
2845         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2846         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2847         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2848         ;;
2849     *:i*86*:2.7.2*)
2850         case "$CFLAGS" in
2851             *-O2*|*-O3*)
2852                 case "$GCC_VERSION" in
2853                     2.7.2)
2854                         case "$CFLAGS" in
2855                             *-fno-strength-reduce*) ;;
2856                             *)
2857                                 echo "$ac_t""yes" 1>&6
2858                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2859                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2860                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2861                                 ;;
2862                         esac
2863                         ;;
2864                 esac
2865                 case "$CFLAGS" in
2866                  *-fno-caller-saves*) ;;
2867                  *)
2868                     echo "$ac_t""yes" 1>&6
2869                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2870                     echo "configure: warning: -fno-caller-saves." 1>&2
2871                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2872                     ;;
2873                 esac
2874                 ;;
2875         esac
2876         ;;
2877 esac
2878 echo "$ac_t""no" 1>&6
2879 fi
2880
2881 if test "$pdump" != "yes"; then
2882   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2883 echo "configure:2884: checking for \"-z nocombreloc\" linker flag" >&5
2884   case "`ld --help 2>&1`" in
2885     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2886       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2887     *) echo "$ac_t""no" 1>&6 ;;
2888   esac
2889 fi
2890
2891
2892
2893 if test "$GCC" = "yes"; then
2894   set x $ld_switch_system; shift; ld_switch_system=""
2895   while test -n "$1"; do
2896     case $1 in
2897       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2898       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2899       -Xlinker* ) ;;
2900       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2901     esac
2902     shift
2903   done
2904 fi
2905
2906 if test "$GCC" = "yes"; then
2907   set x $ld_switch_machine; shift; ld_switch_machine=""
2908   while test -n "$1"; do
2909     case $1 in
2910       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2911       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2912       -Xlinker* ) ;;
2913       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2914     esac
2915     shift
2916   done
2917 fi
2918
2919 if test "$GCC" = "yes"; then
2920   set x $ld_switch_site; shift; ld_switch_site=""
2921   while test -n "$1"; do
2922     case $1 in
2923       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2924       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2925       -Xlinker* ) ;;
2926       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2927     esac
2928     shift
2929   done
2930 fi
2931
2932 if test "$GCC" = "yes"; then
2933   set x $LDFLAGS; shift; LDFLAGS=""
2934   while test -n "$1"; do
2935     case $1 in
2936       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2937       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2938       -Xlinker* ) ;;
2939       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2940     esac
2941     shift
2942   done
2943 fi
2944
2945 if test "$GCC" = "yes"; then
2946   set x $ld_call_shared; shift; ld_call_shared=""
2947   while test -n "$1"; do
2948     case $1 in
2949       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2950       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2951       -Xlinker* ) ;;
2952       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2953     esac
2954     shift
2955   done
2956 fi
2957
2958 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2959    echo "    xemacs will be linked with \"$objects_machine\""
2960  fi
2961 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2962    echo "    xemacs will be linked with \"$objects_system\""
2963  fi
2964 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2965    echo "    xemacs will be linked with \"$unexec\""
2966  fi
2967 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2968    echo "    xemacs will be linked with \"dumper.o\""
2969  fi
2970
2971 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2972 echo "configure:2973: checking for dynodump" >&5
2973 if test "$unexec" != "unexsol2.o"; then
2974   echo "$ac_t""no" 1>&6
2975 else
2976   echo "$ac_t""yes" 1>&6
2977   { test "$extra_verbose" = "yes" && cat << \EOF
2978     Defining DYNODUMP
2979 EOF
2980 cat >> confdefs.h <<\EOF
2981 #define DYNODUMP 1
2982 EOF
2983 }
2984
2985   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2986   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2987   case "$machine" in
2988     sparc   ) dynodump_arch=sparc ;;
2989     *86*    ) dynodump_arch=i386  ;;
2990     powerpc ) dynodump_arch=ppc   ;;
2991   esac
2992     test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
2993 fi
2994
2995
2996 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2997
2998 if test "$unexec" = "unexaix.o"; then
2999   if   test "$dynamic" = "no"; then
3000   start_flags="-Wl,-bnso,-bnodelcsect"
3001   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
3002   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
3003     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
3004   done
3005   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3006     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3007   done
3008   
3009 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3010 echo "configure:3011: checking for terminateAndUnload in -lC" >&5
3011 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3012
3013 xe_check_libs=" -lC "
3014 cat > conftest.$ac_ext <<EOF
3015 #line 3016 "configure"
3016 #include "confdefs.h"
3017 /* Override any gcc2 internal prototype to avoid an error.  */
3018 /* We use char because int might match the return type of a gcc2
3019     builtin and then its argument prototype would still apply.  */
3020 char terminateAndUnload();
3021
3022 int main() {
3023 terminateAndUnload()
3024 ; return 0; }
3025 EOF
3026 if { (eval echo configure:3027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3027   rm -rf conftest*
3028   eval "ac_cv_lib_$ac_lib_var=yes"
3029 else
3030   echo "configure: failed program was:" >&5
3031   cat conftest.$ac_ext >&5
3032   rm -rf conftest*
3033   eval "ac_cv_lib_$ac_lib_var=no"
3034 fi
3035 rm -f conftest*
3036 xe_check_libs=""
3037
3038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3039   echo "$ac_t""yes" 1>&6
3040   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3041 else
3042   echo "$ac_t""no" 1>&6
3043 fi
3044
3045
3046   fi
3047 elif test -n "$ld_text_start_addr"; then
3048   start_flags="-T $ld_text_start_addr -e __start"
3049 fi
3050
3051
3052
3053
3054 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3055  test -z "$linker" &&  linker='$(CC) -nostdlib'
3056  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3057 fi
3058 test "$GCC" != "yes" && lib_gcc=
3059
3060
3061
3062
3063
3064 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3065 if test -n "$site_libraries"; then
3066   for arg in $site_libraries; do
3067     case "$arg" in
3068      -* ) ;;
3069      * ) test -d "$arg" || \
3070            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3071        arg="-L${arg}" ;;
3072     esac
3073     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3074   done
3075 fi
3076
3077 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3078 if test -n "$site_includes"; then
3079   for arg in $site_includes; do
3080     case "$arg" in
3081       -* ) ;;
3082       * ) test -d "$arg" || \
3083            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3084       arg="-I${arg}" ;;
3085     esac
3086     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3087   done
3088 fi
3089
3090 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3091 if test -n "$site_prefixes"; then
3092   for dir in $site_prefixes; do
3093     lib_dir="${dir}/lib"
3094     inc_dir="${dir}/include"
3095     if test ! -d "$dir"; then
3096       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3097     elif test ! -d "$lib_dir"; then
3098       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3099     else
3100       if test -d "$inc_dir"; then
3101         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
3102       fi
3103       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
3104     fi
3105   done
3106 fi
3107
3108
3109 for dir in "/usr/ccs/lib"; do
3110   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
3111 done
3112
3113 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3114 if test -n "$site_runtime_libraries"; then
3115   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3116   export LD_RUN_PATH
3117 fi
3118
3119
3120
3121
3122
3123 if test -n "$add_runtime_path"; then :;
3124 elif test "$dynamic" = "no"; then add_runtime_path=no
3125 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3126 else case "$opsys" in
3127        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3128        * ) add_runtime_path=no ;;
3129      esac
3130 fi
3131
3132 if test "$add_runtime_path" = "yes"; then
3133       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3134 echo "configure:3135: checking "for runtime libraries flag"" >&5
3135   case "$opsys" in
3136     sol2 ) dash_r="-R" ;;
3137     decosf* | linux* | irix*) dash_r="-rpath " ;;
3138     *)
3139       dash_r=""
3140       for try_dash_r in "-R" "-R " "-rpath "; do
3141         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3142         
3143 if test "$GCC" = "yes"; then
3144   set x $xe_check_libs; shift; xe_check_libs=""
3145   while test -n "$1"; do
3146     case $1 in
3147       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3148       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3149       -Xlinker* ) ;;
3150       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3151     esac
3152     shift
3153   done
3154 fi
3155         cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158
3159 int main() {
3160
3161 ; return 0; }
3162 EOF
3163 if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164   rm -rf conftest*
3165   dash_r="$try_dash_r"
3166 else
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169 fi
3170 rm -f conftest*
3171         xe_check_libs=""
3172         test -n "$dash_r" && break
3173       done ;;
3174   esac
3175   if test -n "$dash_r";
3176     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3177     else echo "$ac_t""NONE" 1>&6
3178   fi
3179 fi
3180
3181 xe_add_unique_runpath_dir='
3182   xe_add_p=yes
3183   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3184   done
3185   if test "$xe_add_p" = "yes"; then
3186     test -n "$runpath" && runpath="${runpath}:"
3187     runpath="${runpath}${xe_runpath_dir}"
3188     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3189   fi'
3190
3191
3192
3193
3194 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3195     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3196   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3197   
3198         runpath="" runpath_dirs=""
3199   if test -n "$LD_RUN_PATH"; then
3200     runpath="$LD_RUN_PATH"
3201   elif test "$GCC" = "yes"; then
3202         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3203     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3204     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3205     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3206       case "$arg" in P,* | -L* | -R* )
3207         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3208           {
3209 xe_runpath_dir="$dir"
3210   test "$xe_runpath_dir" != "/lib"     -a \
3211         "$xe_runpath_dir" != "/usr/lib" -a \
3212         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3213   eval "$xe_add_unique_runpath_dir"
3214 }
3215         done ;;
3216       esac
3217     done
3218     ld_switch_run="$ld_switch_run_save"
3219     rm -f conftest*
3220   else
3221         for arg in $ld_switch_site $ld_switch_x_site; do
3222       case "$arg" in -L*) {
3223 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3224   test "$xe_runpath_dir" != "/lib"     -a \
3225         "$xe_runpath_dir" != "/usr/lib" -a \
3226         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3227   eval "$xe_add_unique_runpath_dir"
3228 };; esac
3229     done
3230             if test "$opsys $need_motif" = "sol2 yes"; then
3231       xe_runpath_dir="/opt/SUNWdt/lib";
3232       eval "$xe_add_unique_runpath_dir";
3233     fi
3234   fi 
3235   if test -n "$runpath"; then
3236     ld_switch_run="${dash_r}${runpath}"
3237     
3238 if test "$GCC" = "yes"; then
3239   set x $ld_switch_run; shift; ld_switch_run=""
3240   while test -n "$1"; do
3241     case $1 in
3242       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3243       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3244       -Xlinker* ) ;;
3245       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3246     esac
3247     shift
3248   done
3249 fi
3250     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3251   fi
3252 fi
3253
3254
3255
3256 GNU_MALLOC=yes
3257 if test "$with_dlmalloc" != "no"; then
3258         doug_lea_malloc=yes
3259 else
3260         doug_lea_malloc=no
3261 fi
3262 after_morecore_hook_exists=yes
3263 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3264 echo "configure:3265: checking for malloc_set_state" >&5
3265
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 /* System header to define __stub macros and hopefully few prototypes,
3270     which can conflict with char malloc_set_state(); below.  */
3271 #include <assert.h>
3272 /* Override any gcc2 internal prototype to avoid an error.  */
3273 /* We use char because int might match the return type of a gcc2
3274     builtin and then its argument prototype would still apply.  */
3275 char malloc_set_state();
3276
3277 int main() {
3278
3279 /* The GNU C library defines this for functions which it implements
3280     to always fail with ENOSYS.  Some functions are actually named
3281     something starting with __ and the normal name is an alias.  */
3282 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3283 choke me
3284 #else
3285 malloc_set_state();
3286 #endif
3287
3288 ; return 0; }
3289 EOF
3290 if { (eval echo configure:3291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3291   rm -rf conftest*
3292   eval "ac_cv_func_malloc_set_state=yes"
3293 else
3294   echo "configure: failed program was:" >&5
3295   cat conftest.$ac_ext >&5
3296   rm -rf conftest*
3297   eval "ac_cv_func_malloc_set_state=no"
3298 fi
3299 rm -f conftest*
3300
3301 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3302   echo "$ac_t""yes" 1>&6
3303   :
3304 else
3305   echo "$ac_t""no" 1>&6
3306 doug_lea_malloc=no
3307 fi
3308
3309 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3310 echo "configure:3311: checking whether __after_morecore_hook exists" >&5
3311 cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 extern void (* __after_morecore_hook)();
3315 int main() {
3316 __after_morecore_hook = 0
3317 ; return 0; }
3318 EOF
3319 if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3320   rm -rf conftest*
3321   echo "$ac_t""yes" 1>&6
3322 else
3323   echo "configure: failed program was:" >&5
3324   cat conftest.$ac_ext >&5
3325   rm -rf conftest*
3326   echo "$ac_t""no" 1>&6
3327    after_morecore_hook_exists=no
3328 fi
3329 rm -f conftest*
3330 if test "$system_malloc" = "yes" ; then
3331   GNU_MALLOC=no
3332   GNU_MALLOC_reason="
3333     - The GNU allocators don't work with this system configuration."
3334 elif test "$with_system_malloc" = "yes" ; then
3335   GNU_MALLOC=no
3336   GNU_MALLOC_reason="
3337     - User chose not to use GNU allocators."
3338 elif test "$with_debug_malloc" = "yes" ; then
3339   GNU_MALLOC=no
3340   GNU_MALLOC_reason="
3341     - User chose to use Debugging Malloc."
3342 fi
3343
3344 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3345   GNU_MALLOC_reason="
3346     - Using Doug Lea's new malloc from the GNU C Library."
3347   { test "$extra_verbose" = "yes" && cat << \EOF
3348     Defining DOUG_LEA_MALLOC
3349 EOF
3350 cat >> confdefs.h <<\EOF
3351 #define DOUG_LEA_MALLOC 1
3352 EOF
3353 }
3354
3355   if test "$after_morecore_hook_exists" = "no" ; then
3356     GNU_MALLOC_reason="
3357     - Using Doug Lea's new malloc from the Linux C Library."
3358     { test "$extra_verbose" = "yes" && cat << \EOF
3359     Defining _NO_MALLOC_WARNING_
3360 EOF
3361 cat >> confdefs.h <<\EOF
3362 #define _NO_MALLOC_WARNING_ 1
3363 EOF
3364 }
3365
3366   fi
3367 fi
3368
3369
3370
3371
3372 # Extract the first word of "ranlib", so it can be a program name with args.
3373 set dummy ranlib; ac_word=$2
3374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3375 echo "configure:3376: checking for $ac_word" >&5
3376
3377 if test -n "$RANLIB"; then
3378   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3379 else
3380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3381   ac_dummy="$PATH"
3382   for ac_dir in $ac_dummy; do
3383     test -z "$ac_dir" && ac_dir=.
3384     if test -f $ac_dir/$ac_word; then
3385       ac_cv_prog_RANLIB="ranlib"
3386       break
3387     fi
3388   done
3389   IFS="$ac_save_ifs"
3390   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3391 fi
3392 RANLIB="$ac_cv_prog_RANLIB"
3393 if test -n "$RANLIB"; then
3394   echo "$ac_t""$RANLIB" 1>&6
3395 else
3396   echo "$ac_t""no" 1>&6
3397 fi
3398
3399 ac_aux_dir=
3400 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3401   if test -f $ac_dir/install-sh; then
3402     ac_aux_dir=$ac_dir
3403     ac_install_sh="$ac_aux_dir/install-sh -c"
3404     break
3405   elif test -f $ac_dir/install.sh; then
3406     ac_aux_dir=$ac_dir
3407     ac_install_sh="$ac_aux_dir/install.sh -c"
3408     break
3409   fi
3410 done
3411 if test -z "$ac_aux_dir"; then
3412   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3413 fi
3414 ac_config_guess=$ac_aux_dir/config.guess
3415 ac_config_sub=$ac_aux_dir/config.sub
3416 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3417
3418 # Find a good install program.  We prefer a C program (faster),
3419 # so one script is as good as another.  But avoid the broken or
3420 # incompatible versions:
3421 # SysV /etc/install, /usr/sbin/install
3422 # SunOS /usr/etc/install
3423 # IRIX /sbin/install
3424 # AIX /bin/install
3425 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3426 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3427 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3428 # ./install, which can be erroneously created by make from ./install.sh.
3429 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3430 echo "configure:3431: checking for a BSD compatible install" >&5
3431 if test -z "$INSTALL"; then
3432
3433   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3434   for ac_dir in $PATH; do
3435     # Account for people who put trailing slashes in PATH elements.
3436     case "$ac_dir/" in
3437     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3438     *)
3439       # OSF1 and SCO ODT 3.0 have their own names for install.
3440       # Don't use installbsd from OSF since it installs stuff as root
3441       # by default.
3442       for ac_prog in ginstall scoinst install; do
3443         if test -f $ac_dir/$ac_prog; then
3444           if test $ac_prog = install &&
3445             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3446             # AIX install.  It has an incompatible calling convention.
3447             :
3448           else
3449             ac_cv_path_install="$ac_dir/$ac_prog -c"
3450             break 2
3451           fi
3452         fi
3453       done
3454       ;;
3455     esac
3456   done
3457   IFS="$ac_save_IFS"
3458
3459   if test "${ac_cv_path_install+set}" = set; then
3460     INSTALL="$ac_cv_path_install"
3461   else
3462     # As a last resort, use the slow shell script.  We don't cache a
3463     # path for INSTALL within a source directory, because that will
3464     # break other packages using the cache if that directory is
3465     # removed, or if the path is relative.
3466     INSTALL="$ac_install_sh"
3467   fi
3468 fi
3469 echo "$ac_t""$INSTALL" 1>&6
3470
3471 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3472 # It thinks the first close brace ends the variable substitution.
3473 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3474
3475 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3476
3477 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3478
3479 for ac_prog in 'bison -y' byacc
3480 do
3481 # Extract the first word of "$ac_prog", so it can be a program name with args.
3482 set dummy $ac_prog; ac_word=$2
3483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3484 echo "configure:3485: checking for $ac_word" >&5
3485
3486 if test -n "$YACC"; then
3487   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3488 else
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH"
3491   for ac_dir in $ac_dummy; do
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_prog_YACC="$ac_prog"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499 fi
3500 YACC="$ac_cv_prog_YACC"
3501 if test -n "$YACC"; then
3502   echo "$ac_t""$YACC" 1>&6
3503 else
3504   echo "$ac_t""no" 1>&6
3505 fi
3506
3507 test -n "$YACC" && break
3508 done
3509 test -n "$YACC" || YACC="yacc"
3510
3511
3512 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 
3513 do
3514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3516 echo "configure:3517: checking for $ac_hdr" >&5
3517
3518 cat > conftest.$ac_ext <<EOF
3519 #line 3520 "configure"
3520 #include "confdefs.h"
3521 #include <$ac_hdr>
3522 EOF
3523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3524 { (eval echo configure:3525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3526 if test -z "$ac_err"; then
3527   rm -rf conftest*
3528   eval "ac_cv_header_$ac_safe=yes"
3529 else
3530   echo "$ac_err" >&5
3531   echo "configure: failed program was:" >&5
3532   cat conftest.$ac_ext >&5
3533   rm -rf conftest*
3534   eval "ac_cv_header_$ac_safe=no"
3535 fi
3536 rm -f conftest*
3537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3538   echo "$ac_t""yes" 1>&6
3539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3540   { test "$extra_verbose" = "yes" && cat << EOF
3541     Defining $ac_tr_hdr
3542 EOF
3543 cat >> confdefs.h <<EOF
3544 #define $ac_tr_hdr 1
3545 EOF
3546 }
3547  
3548 else
3549   echo "$ac_t""no" 1>&6
3550 fi
3551 done
3552
3553 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3554 echo "configure:3555: checking for sys/wait.h that is POSIX.1 compatible" >&5
3555
3556 cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559 #include <sys/types.h>
3560 #include <sys/wait.h>
3561 #ifndef WEXITSTATUS
3562 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3563 #endif
3564 #ifndef WIFEXITED
3565 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3566 #endif
3567 int main() {
3568 int s;
3569 wait (&s);
3570 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3571 ; return 0; }
3572 EOF
3573 if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3574   rm -rf conftest*
3575   ac_cv_header_sys_wait_h=yes
3576 else
3577   echo "configure: failed program was:" >&5
3578   cat conftest.$ac_ext >&5
3579   rm -rf conftest*
3580   ac_cv_header_sys_wait_h=no
3581 fi
3582 rm -f conftest*
3583
3584 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3585 if test $ac_cv_header_sys_wait_h = yes; then
3586   { test "$extra_verbose" = "yes" && cat << \EOF
3587     Defining HAVE_SYS_WAIT_H
3588 EOF
3589 cat >> confdefs.h <<\EOF
3590 #define HAVE_SYS_WAIT_H 1
3591 EOF
3592 }
3593
3594 fi
3595
3596 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3597 echo "configure:3598: checking for ANSI C header files" >&5
3598
3599 cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <stdlib.h>
3603 #include <stdarg.h>
3604 #include <string.h>
3605 #include <float.h>
3606 EOF
3607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3608 { (eval echo configure:3609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3610 if test -z "$ac_err"; then
3611   rm -rf conftest*
3612   ac_cv_header_stdc=yes
3613 else
3614   echo "$ac_err" >&5
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -rf conftest*
3618   ac_cv_header_stdc=no
3619 fi
3620 rm -f conftest*
3621
3622 if test $ac_cv_header_stdc = yes; then
3623   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3624 cat > conftest.$ac_ext <<EOF
3625 #line 3626 "configure"
3626 #include "confdefs.h"
3627 #include <string.h>
3628 EOF
3629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3630   egrep "memchr" >/dev/null 2>&1; then
3631   :
3632 else
3633   rm -rf conftest*
3634   ac_cv_header_stdc=no
3635 fi
3636 rm -f conftest*
3637
3638 fi
3639
3640 if test $ac_cv_header_stdc = yes; then
3641   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3642 cat > conftest.$ac_ext <<EOF
3643 #line 3644 "configure"
3644 #include "confdefs.h"
3645 #include <stdlib.h>
3646 EOF
3647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3648   egrep "free" >/dev/null 2>&1; then
3649   :
3650 else
3651   rm -rf conftest*
3652   ac_cv_header_stdc=no
3653 fi
3654 rm -f conftest*
3655
3656 fi
3657
3658 if test $ac_cv_header_stdc = yes; then
3659   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 #include <ctype.h>
3664 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3665 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3666 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3667 int main () { int i; for (i = 0; i < 256; i++)
3668 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3669 exit (0); }
3670
3671 EOF
3672 if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3673 then
3674   :
3675 else
3676   conftest_rc="$?"
3677   echo "configure: failed program was:" >&5
3678   cat conftest.$ac_ext >&5
3679   rm -fr conftest*
3680   ac_cv_header_stdc=no
3681 fi
3682 rm -fr conftest*
3683 fi
3684
3685 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3686 if test $ac_cv_header_stdc = yes; then
3687   { test "$extra_verbose" = "yes" && cat << \EOF
3688     Defining STDC_HEADERS
3689 EOF
3690 cat >> confdefs.h <<\EOF
3691 #define STDC_HEADERS 1
3692 EOF
3693 }
3694
3695 fi
3696
3697 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3698 echo "configure:3699: checking whether time.h and sys/time.h may both be included" >&5
3699
3700 cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703 #include <sys/types.h>
3704 #include <sys/time.h>
3705 #include <time.h>
3706 int main() {
3707 struct tm *tp;
3708 ; return 0; }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3711   rm -rf conftest*
3712   ac_cv_header_time=yes
3713 else
3714   echo "configure: failed program was:" >&5
3715   cat conftest.$ac_ext >&5
3716   rm -rf conftest*
3717   ac_cv_header_time=no
3718 fi
3719 rm -f conftest*
3720
3721 echo "$ac_t""$ac_cv_header_time" 1>&6
3722 if test $ac_cv_header_time = yes; then
3723   { test "$extra_verbose" = "yes" && cat << \EOF
3724     Defining TIME_WITH_SYS_TIME
3725 EOF
3726 cat >> confdefs.h <<\EOF
3727 #define TIME_WITH_SYS_TIME 1
3728 EOF
3729 }
3730
3731 fi
3732
3733 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3734 echo "configure:3735: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3735
3736 cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 #include <sys/types.h>
3740 #include <signal.h>
3741 /* NetBSD declares sys_siglist in unistd.h.  */
3742 #ifdef HAVE_UNISTD_H
3743 #include <unistd.h>
3744 #endif
3745 int main() {
3746 char *msg = *(sys_siglist + 1);
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3750   rm -rf conftest*
3751   ac_cv_decl_sys_siglist=yes
3752 else
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   ac_cv_decl_sys_siglist=no
3757 fi
3758 rm -f conftest*
3759
3760 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3761 if test $ac_cv_decl_sys_siglist = yes; then
3762   { test "$extra_verbose" = "yes" && cat << \EOF
3763     Defining SYS_SIGLIST_DECLARED
3764 EOF
3765 cat >> confdefs.h <<\EOF
3766 #define SYS_SIGLIST_DECLARED 1
3767 EOF
3768 }
3769
3770 fi
3771
3772
3773
3774 echo $ac_n "checking for utime""... $ac_c" 1>&6
3775 echo "configure:3776: checking for utime" >&5
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <sys/types.h>
3780 #include <utime.h>
3781 int main() {
3782 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3786   rm -rf conftest*
3787   echo "$ac_t""yes" 1>&6
3788    { test "$extra_verbose" = "yes" && cat << \EOF
3789     Defining HAVE_UTIME
3790 EOF
3791 cat >> confdefs.h <<\EOF
3792 #define HAVE_UTIME 1
3793 EOF
3794 }
3795
3796 else
3797   echo "configure: failed program was:" >&5
3798   cat conftest.$ac_ext >&5
3799   rm -rf conftest*
3800   echo "$ac_t""no" 1>&6
3801       for ac_func in utimes
3802 do
3803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $ac_func" >&5
3805
3806 cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809 /* System header to define __stub macros and hopefully few prototypes,
3810     which can conflict with char $ac_func(); below.  */
3811 #include <assert.h>
3812 /* Override any gcc2 internal prototype to avoid an error.  */
3813 /* We use char because int might match the return type of a gcc2
3814     builtin and then its argument prototype would still apply.  */
3815 char $ac_func();
3816
3817 int main() {
3818
3819 /* The GNU C library defines this for functions which it implements
3820     to always fail with ENOSYS.  Some functions are actually named
3821     something starting with __ and the normal name is an alias.  */
3822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3823 choke me
3824 #else
3825 $ac_func();
3826 #endif
3827
3828 ; return 0; }
3829 EOF
3830 if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3831   rm -rf conftest*
3832   eval "ac_cv_func_$ac_func=yes"
3833 else
3834   echo "configure: failed program was:" >&5
3835   cat conftest.$ac_ext >&5
3836   rm -rf conftest*
3837   eval "ac_cv_func_$ac_func=no"
3838 fi
3839 rm -f conftest*
3840
3841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3844   { test "$extra_verbose" = "yes" && cat << EOF
3845     Defining $ac_tr_func
3846 EOF
3847 cat >> confdefs.h <<EOF
3848 #define $ac_tr_func 1
3849 EOF
3850 }
3851  
3852 else
3853   echo "$ac_t""no" 1>&6
3854 fi
3855 done
3856
3857 fi
3858 rm -f conftest*
3859
3860
3861 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3862 echo "configure:3863: checking return type of signal handlers" >&5
3863
3864 cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 #include <sys/types.h>
3868 #include <signal.h>
3869 #ifdef signal
3870 #undef signal
3871 #endif
3872 #ifdef __cplusplus
3873 extern "C" void (*signal (int, void (*)(int)))(int);
3874 #else
3875 void (*signal ()) ();
3876 #endif
3877
3878 int main() {
3879 int i;
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   rm -rf conftest*
3884   ac_cv_type_signal=void
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   ac_cv_type_signal=int
3890 fi
3891 rm -f conftest*
3892
3893 echo "$ac_t""$ac_cv_type_signal" 1>&6
3894 { test "$extra_verbose" = "yes" && cat << EOF
3895     Defining RETSIGTYPE = $ac_cv_type_signal
3896 EOF
3897 cat >> confdefs.h <<EOF
3898 #define RETSIGTYPE $ac_cv_type_signal
3899 EOF
3900 }
3901
3902
3903 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3904 echo "configure:3905: checking for size_t" >&5
3905
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <sys/types.h>
3910 #if STDC_HEADERS
3911 #include <stdlib.h>
3912 #include <stddef.h>
3913 #endif
3914 EOF
3915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3916   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3917   rm -rf conftest*
3918   ac_cv_type_size_t=yes
3919 else
3920   rm -rf conftest*
3921   ac_cv_type_size_t=no
3922 fi
3923 rm -f conftest*
3924
3925 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3926 if test $ac_cv_type_size_t = no; then
3927   { test "$extra_verbose" = "yes" && cat << \EOF
3928     Defining size_t = unsigned
3929 EOF
3930 cat >> confdefs.h <<\EOF
3931 #define size_t unsigned
3932 EOF
3933 }
3934
3935 fi
3936
3937 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3938 echo "configure:3939: checking for pid_t" >&5
3939
3940 cat > conftest.$ac_ext <<EOF
3941 #line 3942 "configure"
3942 #include "confdefs.h"
3943 #include <sys/types.h>
3944 #if STDC_HEADERS
3945 #include <stdlib.h>
3946 #include <stddef.h>
3947 #endif
3948 EOF
3949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3950   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3951   rm -rf conftest*
3952   ac_cv_type_pid_t=yes
3953 else
3954   rm -rf conftest*
3955   ac_cv_type_pid_t=no
3956 fi
3957 rm -f conftest*
3958
3959 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3960 if test $ac_cv_type_pid_t = no; then
3961   { test "$extra_verbose" = "yes" && cat << \EOF
3962     Defining pid_t = int
3963 EOF
3964 cat >> confdefs.h <<\EOF
3965 #define pid_t int
3966 EOF
3967 }
3968
3969 fi
3970
3971 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3972 echo "configure:3973: checking for uid_t in sys/types.h" >&5
3973
3974 cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977 #include <sys/types.h>
3978 EOF
3979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3980   egrep "uid_t" >/dev/null 2>&1; then
3981   rm -rf conftest*
3982   ac_cv_type_uid_t=yes
3983 else
3984   rm -rf conftest*
3985   ac_cv_type_uid_t=no
3986 fi
3987 rm -f conftest*
3988
3989
3990 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3991 if test $ac_cv_type_uid_t = no; then
3992   { test "$extra_verbose" = "yes" && cat << \EOF
3993     Defining uid_t = int
3994 EOF
3995 cat >> confdefs.h <<\EOF
3996 #define uid_t int
3997 EOF
3998 }
3999
4000   { test "$extra_verbose" = "yes" && cat << \EOF
4001     Defining gid_t = int
4002 EOF
4003 cat >> confdefs.h <<\EOF
4004 #define gid_t int
4005 EOF
4006 }
4007
4008 fi
4009
4010 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4011 echo "configure:4012: checking for mode_t" >&5
4012
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 #include <sys/types.h>
4017 #if STDC_HEADERS
4018 #include <stdlib.h>
4019 #include <stddef.h>
4020 #endif
4021 EOF
4022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4023   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4024   rm -rf conftest*
4025   ac_cv_type_mode_t=yes
4026 else
4027   rm -rf conftest*
4028   ac_cv_type_mode_t=no
4029 fi
4030 rm -f conftest*
4031
4032 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4033 if test $ac_cv_type_mode_t = no; then
4034   { test "$extra_verbose" = "yes" && cat << \EOF
4035     Defining mode_t = int
4036 EOF
4037 cat >> confdefs.h <<\EOF
4038 #define mode_t int
4039 EOF
4040 }
4041
4042 fi
4043
4044 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4045 echo "configure:4046: checking for off_t" >&5
4046
4047 cat > conftest.$ac_ext <<EOF
4048 #line 4049 "configure"
4049 #include "confdefs.h"
4050 #include <sys/types.h>
4051 #if STDC_HEADERS
4052 #include <stdlib.h>
4053 #include <stddef.h>
4054 #endif
4055 EOF
4056 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4057   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4058   rm -rf conftest*
4059   ac_cv_type_off_t=yes
4060 else
4061   rm -rf conftest*
4062   ac_cv_type_off_t=no
4063 fi
4064 rm -f conftest*
4065
4066 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4067 if test $ac_cv_type_off_t = no; then
4068   { test "$extra_verbose" = "yes" && cat << \EOF
4069     Defining off_t = long
4070 EOF
4071 cat >> confdefs.h <<\EOF
4072 #define off_t long
4073 EOF
4074 }
4075
4076 fi
4077
4078 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4079 echo "configure:4080: checking for ssize_t" >&5
4080
4081 cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4084 #include <sys/types.h>
4085 #if STDC_HEADERS
4086 #include <stdlib.h>
4087 #include <stddef.h>
4088 #endif
4089 EOF
4090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4091   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4092   rm -rf conftest*
4093   ac_cv_type_ssize_t=yes
4094 else
4095   rm -rf conftest*
4096   ac_cv_type_ssize_t=no
4097 fi
4098 rm -f conftest*
4099
4100 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4101 if test $ac_cv_type_ssize_t = no; then
4102   { test "$extra_verbose" = "yes" && cat << \EOF
4103     Defining ssize_t = int
4104 EOF
4105 cat >> confdefs.h <<\EOF
4106 #define ssize_t int
4107 EOF
4108 }
4109
4110 fi
4111
4112
4113 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4114 echo "configure:4115: checking for socklen_t" >&5
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 #include <sys/types.h>
4119 #include <sys/socket.h>
4120 socklen_t x;
4121
4122 int main() {
4123
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4127   rm -rf conftest*
4128   echo "$ac_t""yes" 1>&6
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   
4134 cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <sys/types.h>
4138 #include <sys/socket.h>
4139 int accept (int, struct sockaddr *, size_t *);
4140
4141 int main() {
4142
4143 ; return 0; }
4144 EOF
4145 if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146   rm -rf conftest*
4147   
4148 echo "$ac_t""size_t" 1>&6
4149 { test "$extra_verbose" = "yes" && cat << \EOF
4150     Defining socklen_t = size_t
4151 EOF
4152 cat >> confdefs.h <<\EOF
4153 #define socklen_t size_t
4154 EOF
4155 }
4156
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160   rm -rf conftest*
4161   
4162 echo "$ac_t""int" 1>&6
4163 { test "$extra_verbose" = "yes" && cat << \EOF
4164     Defining socklen_t = int
4165 EOF
4166 cat >> confdefs.h <<\EOF
4167 #define socklen_t int
4168 EOF
4169 }
4170
4171 fi
4172 rm -f conftest*
4173 fi
4174 rm -f conftest*
4175
4176 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4177 echo "configure:4178: checking for struct timeval" >&5
4178 cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 #ifdef TIME_WITH_SYS_TIME
4182 #include <sys/time.h>
4183 #include <time.h>
4184 #else
4185 #ifdef HAVE_SYS_TIME_H
4186 #include <sys/time.h>
4187 #else
4188 #include <time.h>
4189 #endif
4190 #endif
4191 int main() {
4192 static struct timeval x; x.tv_sec = x.tv_usec;
4193 ; return 0; }
4194 EOF
4195 if { (eval echo configure:4196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4196   rm -rf conftest*
4197   echo "$ac_t""yes" 1>&6
4198   HAVE_TIMEVAL=yes
4199   { test "$extra_verbose" = "yes" && cat << \EOF
4200     Defining HAVE_TIMEVAL
4201 EOF
4202 cat >> confdefs.h <<\EOF
4203 #define HAVE_TIMEVAL 1
4204 EOF
4205 }
4206
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   echo "$ac_t""no" 1>&6
4212    HAVE_TIMEVAL=no
4213 fi
4214 rm -f conftest*
4215
4216 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4217 echo "configure:4218: checking whether struct tm is in sys/time.h or time.h" >&5
4218
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 #include <sys/types.h>
4223 #include <time.h>
4224 int main() {
4225 struct tm *tp; tp->tm_sec;
4226 ; return 0; }
4227 EOF
4228 if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4229   rm -rf conftest*
4230   ac_cv_struct_tm=time.h
4231 else
4232   echo "configure: failed program was:" >&5
4233   cat conftest.$ac_ext >&5
4234   rm -rf conftest*
4235   ac_cv_struct_tm=sys/time.h
4236 fi
4237 rm -f conftest*
4238
4239 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4240 if test $ac_cv_struct_tm = sys/time.h; then
4241   { test "$extra_verbose" = "yes" && cat << \EOF
4242     Defining TM_IN_SYS_TIME
4243 EOF
4244 cat >> confdefs.h <<\EOF
4245 #define TM_IN_SYS_TIME 1
4246 EOF
4247 }
4248
4249 fi
4250
4251 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4252 echo "configure:4253: checking for tm_zone in struct tm" >&5
4253
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <sys/types.h>
4258 #include <$ac_cv_struct_tm>
4259 int main() {
4260 struct tm tm; tm.tm_zone;
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4264   rm -rf conftest*
4265   ac_cv_struct_tm_zone=yes
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   ac_cv_struct_tm_zone=no
4271 fi
4272 rm -f conftest*
4273
4274 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4275 if test "$ac_cv_struct_tm_zone" = yes; then
4276   { test "$extra_verbose" = "yes" && cat << \EOF
4277     Defining HAVE_TM_ZONE
4278 EOF
4279 cat >> confdefs.h <<\EOF
4280 #define HAVE_TM_ZONE 1
4281 EOF
4282 }
4283
4284 else
4285   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4286 echo "configure:4287: checking for tzname" >&5
4287
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <time.h>
4292 #ifndef tzname /* For SGI.  */
4293 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4294 #endif
4295 int main() {
4296 atoi(*tzname);
4297 ; return 0; }
4298 EOF
4299 if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4300   rm -rf conftest*
4301   ac_cv_var_tzname=yes
4302 else
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -rf conftest*
4306   ac_cv_var_tzname=no
4307 fi
4308 rm -f conftest*
4309
4310 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4311   if test $ac_cv_var_tzname = yes; then
4312     { test "$extra_verbose" = "yes" && cat << \EOF
4313     Defining HAVE_TZNAME
4314 EOF
4315 cat >> confdefs.h <<\EOF
4316 #define HAVE_TZNAME 1
4317 EOF
4318 }
4319
4320   fi
4321 fi
4322
4323
4324 echo $ac_n "checking for working const""... $ac_c" 1>&6
4325 echo "configure:4326: checking for working const" >&5
4326
4327 cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330
4331 int main() {
4332
4333 /* Ultrix mips cc rejects this.  */
4334 typedef int charset[2]; const charset x;
4335 /* SunOS 4.1.1 cc rejects this.  */
4336 char const *const *ccp;
4337 char **p;
4338 /* NEC SVR4.0.2 mips cc rejects this.  */
4339 struct point {int x, y;};
4340 static struct point const zero = {0,0};
4341 /* AIX XL C 1.02.0.0 rejects this.
4342    It does not let you subtract one const X* pointer from another in an arm
4343    of an if-expression whose if-part is not a constant expression */
4344 const char *g = "string";
4345 ccp = &g + (g ? g-g : 0);
4346 /* HPUX 7.0 cc rejects these. */
4347 ++ccp;
4348 p = (char**) ccp;
4349 ccp = (char const *const *) p;
4350 { /* SCO 3.2v4 cc rejects this.  */
4351   char *t;
4352   char const *s = 0 ? (char *) 0 : (char const *) 0;
4353
4354   *t++ = 0;
4355 }
4356 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4357   int x[] = {25, 17};
4358   const int *foo = &x[0];
4359   ++foo;
4360 }
4361 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4362   typedef const int *iptr;
4363   iptr p = 0;
4364   ++p;
4365 }
4366 { /* AIX XL C 1.02.0.0 rejects this saying
4367      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4368   struct s { int j; const int *ap[3]; };
4369   struct s *b; b->j = 5;
4370 }
4371 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4372   const int foo = 10;
4373 }
4374
4375 ; return 0; }
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4378   rm -rf conftest*
4379   ac_cv_c_const=yes
4380 else
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -rf conftest*
4384   ac_cv_c_const=no
4385 fi
4386 rm -f conftest*
4387
4388 echo "$ac_t""$ac_cv_c_const" 1>&6
4389 if test $ac_cv_c_const = no; then
4390   { test "$extra_verbose" = "yes" && cat << \EOF
4391     Defining const = 
4392 EOF
4393 cat >> confdefs.h <<\EOF
4394 #define const 
4395 EOF
4396 }
4397
4398 fi
4399
4400
4401 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4402 echo "configure:4403: checking whether ${MAKE-make} sets \${MAKE}" >&5
4403 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4404
4405 cat > conftestmake <<\EOF
4406 all:
4407         @echo 'ac_maketemp="${MAKE}"'
4408 EOF
4409 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4410 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4411 if test -n "$ac_maketemp"; then
4412   eval ac_cv_prog_make_${ac_make}_set=yes
4413 else
4414   eval ac_cv_prog_make_${ac_make}_set=no
4415 fi
4416 rm -f conftestmake
4417 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4418   echo "$ac_t""yes" 1>&6
4419   SET_MAKE=
4420 else
4421   echo "$ac_t""no" 1>&6
4422   SET_MAKE="MAKE=${MAKE-make}"
4423 fi
4424
4425
4426 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4427 echo "configure:4428: checking whether byte ordering is bigendian" >&5
4428
4429 ac_cv_c_bigendian=unknown
4430 # See if sys/param.h defines the BYTE_ORDER macro.
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 #include <sys/types.h>
4435 #include <sys/param.h>
4436 int main() {
4437
4438 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4439  bogus endian macros
4440 #endif
4441 ; return 0; }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4444   rm -rf conftest*
4445   # It does; now see whether it defined to BIG_ENDIAN or not.
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449 #include <sys/types.h>
4450 #include <sys/param.h>
4451 int main() {
4452
4453 #if BYTE_ORDER != BIG_ENDIAN
4454  not big endian
4455 #endif
4456 ; return 0; }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4459   rm -rf conftest*
4460   ac_cv_c_bigendian=yes
4461 else
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -rf conftest*
4465   ac_cv_c_bigendian=no
4466 fi
4467 rm -f conftest*
4468 else
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471 fi
4472 rm -f conftest*
4473 if test $ac_cv_c_bigendian = unknown; then
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 main () {
4478   /* Are we little or big endian?  From Harbison&Steele.  */
4479   union
4480   {
4481     long l;
4482     char c[sizeof (long)];
4483   } u;
4484   u.l = 1;
4485   exit (u.c[sizeof (long) - 1] == 1);
4486 }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4489 then
4490   ac_cv_c_bigendian=no
4491 else
4492   conftest_rc="$?"
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -fr conftest*
4496   ac_cv_c_bigendian=yes
4497 fi
4498 rm -fr conftest*
4499 fi
4500
4501 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4502 if test $ac_cv_c_bigendian = yes; then
4503   { test "$extra_verbose" = "yes" && cat << \EOF
4504     Defining WORDS_BIGENDIAN
4505 EOF
4506 cat >> confdefs.h <<\EOF
4507 #define WORDS_BIGENDIAN 1
4508 EOF
4509 }
4510
4511 fi
4512
4513
4514 echo $ac_n "checking size of short""... $ac_c" 1>&6
4515 echo "configure:4516: checking size of short" >&5
4516
4517 cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 #include <stdio.h>
4521 main()
4522 {
4523   FILE *f=fopen("conftestval", "w");
4524   if (!f) exit(1);
4525   fprintf(f, "%d\n", sizeof(short));
4526   exit(0);
4527 }
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4530 then
4531   ac_cv_sizeof_short=`cat conftestval`
4532 else
4533   conftest_rc="$?"
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -fr conftest*
4537   ac_cv_sizeof_short=0
4538 fi
4539 rm -fr conftest*
4540 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4541 { test "$extra_verbose" = "yes" && cat << EOF
4542     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4543 EOF
4544 cat >> confdefs.h <<EOF
4545 #define SIZEOF_SHORT $ac_cv_sizeof_short
4546 EOF
4547 }
4548
4549
4550 if test "$ac_cv_sizeof_short" = 0; then
4551   echo ""
4552   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4553   echo "*** PANIC *** Please examine config.log for compilation errors."
4554   exit 1
4555 fi
4556 echo $ac_n "checking size of int""... $ac_c" 1>&6
4557 echo "configure:4558: checking size of int" >&5
4558
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <stdio.h>
4563 main()
4564 {
4565   FILE *f=fopen("conftestval", "w");
4566   if (!f) exit(1);
4567   fprintf(f, "%d\n", sizeof(int));
4568   exit(0);
4569 }
4570 EOF
4571 if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4572 then
4573   ac_cv_sizeof_int=`cat conftestval`
4574 else
4575   conftest_rc="$?"
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -fr conftest*
4579   ac_cv_sizeof_int=0
4580 fi
4581 rm -fr conftest*
4582 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4583 { test "$extra_verbose" = "yes" && cat << EOF
4584     Defining SIZEOF_INT = $ac_cv_sizeof_int
4585 EOF
4586 cat >> confdefs.h <<EOF
4587 #define SIZEOF_INT $ac_cv_sizeof_int
4588 EOF
4589 }
4590
4591
4592 echo $ac_n "checking size of long""... $ac_c" 1>&6
4593 echo "configure:4594: checking size of long" >&5
4594
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <stdio.h>
4599 main()
4600 {
4601   FILE *f=fopen("conftestval", "w");
4602   if (!f) exit(1);
4603   fprintf(f, "%d\n", sizeof(long));
4604   exit(0);
4605 }
4606 EOF
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4608 then
4609   ac_cv_sizeof_long=`cat conftestval`
4610 else
4611   conftest_rc="$?"
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -fr conftest*
4615   ac_cv_sizeof_long=0
4616 fi
4617 rm -fr conftest*
4618 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4619 { test "$extra_verbose" = "yes" && cat << EOF
4620     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4621 EOF
4622 cat >> confdefs.h <<EOF
4623 #define SIZEOF_LONG $ac_cv_sizeof_long
4624 EOF
4625 }
4626
4627
4628 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4629 echo "configure:4630: checking size of long long" >&5
4630
4631 cat > conftest.$ac_ext <<EOF
4632 #line 4633 "configure"
4633 #include "confdefs.h"
4634 #include <stdio.h>
4635 main()
4636 {
4637   FILE *f=fopen("conftestval", "w");
4638   if (!f) exit(1);
4639   fprintf(f, "%d\n", sizeof(long long));
4640   exit(0);
4641 }
4642 EOF
4643 if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4644 then
4645   ac_cv_sizeof_long_long=`cat conftestval`
4646 else
4647   conftest_rc="$?"
4648   echo "configure: failed program was:" >&5
4649   cat conftest.$ac_ext >&5
4650   rm -fr conftest*
4651   ac_cv_sizeof_long_long=0
4652 fi
4653 rm -fr conftest*
4654 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4655 { test "$extra_verbose" = "yes" && cat << EOF
4656     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4657 EOF
4658 cat >> confdefs.h <<EOF
4659 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4660 EOF
4661 }
4662
4663
4664 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4665 echo "configure:4666: checking size of void *" >&5
4666
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 #include <stdio.h>
4671 main()
4672 {
4673   FILE *f=fopen("conftestval", "w");
4674   if (!f) exit(1);
4675   fprintf(f, "%d\n", sizeof(void *));
4676   exit(0);
4677 }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4680 then
4681   ac_cv_sizeof_void_p=`cat conftestval`
4682 else
4683   conftest_rc="$?"
4684   echo "configure: failed program was:" >&5
4685   cat conftest.$ac_ext >&5
4686   rm -fr conftest*
4687   ac_cv_sizeof_void_p=0
4688 fi
4689 rm -fr conftest*
4690 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4691 { test "$extra_verbose" = "yes" && cat << EOF
4692     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4693 EOF
4694 cat >> confdefs.h <<EOF
4695 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4696 EOF
4697 }
4698
4699
4700
4701 case $opsys in
4702   cygwin* ) cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <cygwin/types.h>
4706 EOF
4707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4708   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4709   rm -rf conftest*
4710   echo "$ac_t""yes" 1>&6
4711                              { test "$extra_verbose" = "yes" && cat << \EOF
4712     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4713 EOF
4714 cat >> confdefs.h <<\EOF
4715 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4716 EOF
4717 }
4718
4719 else
4720   rm -rf conftest*
4721   echo "$ac_t""no" 1>&6
4722 fi
4723 rm -f conftest*
4724  ;;
4725 esac
4726
4727 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4728 echo "configure:4729: checking for long file names" >&5
4729
4730 ac_cv_sys_long_file_names=yes
4731 # Test for long file names in all the places we know might matter:
4732 #      .                the current directory, where building will happen
4733 #      $prefix/lib      where we will be installing things
4734 #      $exec_prefix/lib likewise
4735 # eval it to expand exec_prefix.
4736 #      $TMPDIR          if set, where it might want to write temporary files
4737 # if $TMPDIR is not set:
4738 #      /tmp             where it might want to write temporary files
4739 #      /var/tmp         likewise
4740 #      /usr/tmp         likewise
4741 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4742   ac_tmpdirs="$TMPDIR"
4743 else
4744   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4745 fi
4746 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4747   test -d $ac_dir || continue
4748   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4749   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4750   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4751   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4752   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4753     ac_cv_sys_long_file_names=no
4754     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4755     break
4756   fi
4757   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4758 done
4759
4760 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4761 if test $ac_cv_sys_long_file_names = yes; then
4762   { test "$extra_verbose" = "yes" && cat << \EOF
4763     Defining HAVE_LONG_FILE_NAMES
4764 EOF
4765 cat >> confdefs.h <<\EOF
4766 #define HAVE_LONG_FILE_NAMES 1
4767 EOF
4768 }
4769
4770 fi
4771
4772
4773 echo $ac_n "checking for sin""... $ac_c" 1>&6
4774 echo "configure:4775: checking for sin" >&5
4775
4776 cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* System header to define __stub macros and hopefully few prototypes,
4780     which can conflict with char sin(); below.  */
4781 #include <assert.h>
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 /* We use char because int might match the return type of a gcc2
4784     builtin and then its argument prototype would still apply.  */
4785 char sin();
4786
4787 int main() {
4788
4789 /* The GNU C library defines this for functions which it implements
4790     to always fail with ENOSYS.  Some functions are actually named
4791     something starting with __ and the normal name is an alias.  */
4792 #if defined (__stub_sin) || defined (__stub___sin)
4793 choke me
4794 #else
4795 sin();
4796 #endif
4797
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   eval "ac_cv_func_sin=yes"
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   eval "ac_cv_func_sin=no"
4808 fi
4809 rm -f conftest*
4810
4811 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4812   echo "$ac_t""yes" 1>&6
4813   :
4814 else
4815   echo "$ac_t""no" 1>&6
4816
4817 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4818 echo "configure:4819: checking for sin in -lm" >&5
4819 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4820
4821 xe_check_libs=" -lm "
4822 cat > conftest.$ac_ext <<EOF
4823 #line 4824 "configure"
4824 #include "confdefs.h"
4825 /* Override any gcc2 internal prototype to avoid an error.  */
4826 /* We use char because int might match the return type of a gcc2
4827     builtin and then its argument prototype would still apply.  */
4828 char sin();
4829
4830 int main() {
4831 sin()
4832 ; return 0; }
4833 EOF
4834 if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4835   rm -rf conftest*
4836   eval "ac_cv_lib_$ac_lib_var=yes"
4837 else
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_lib_$ac_lib_var=no"
4842 fi
4843 rm -f conftest*
4844 xe_check_libs=""
4845
4846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4847   echo "$ac_t""yes" 1>&6
4848     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4849     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4850   { test "$extra_verbose" = "yes" && cat << EOF
4851     Defining $ac_tr_lib
4852 EOF
4853 cat >> confdefs.h <<EOF
4854 #define $ac_tr_lib 1
4855 EOF
4856 }
4857
4858   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4859
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863
4864
4865 fi
4866
4867
4868 { test "$extra_verbose" = "yes" && cat << \EOF
4869     Defining LISP_FLOAT_TYPE
4870 EOF
4871 cat >> confdefs.h <<\EOF
4872 #define LISP_FLOAT_TYPE 1
4873 EOF
4874 }
4875
4876
4877 cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 #include <math.h>
4881 int main() {
4882 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   { test "$extra_verbose" = "yes" && cat << \EOF
4888     Defining HAVE_INVERSE_HYPERBOLIC
4889 EOF
4890 cat >> confdefs.h <<\EOF
4891 #define HAVE_INVERSE_HYPERBOLIC 1
4892 EOF
4893 }
4894
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898 fi
4899 rm -f conftest*
4900
4901 echo "checking type of mail spool file locking" 1>&6
4902 echo "configure:4903: checking type of mail spool file locking" >&5
4903 for ac_func in lockf flock
4904 do
4905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4906 echo "configure:4907: checking for $ac_func" >&5
4907
4908 cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 /* System header to define __stub macros and hopefully few prototypes,
4912     which can conflict with char $ac_func(); below.  */
4913 #include <assert.h>
4914 /* Override any gcc2 internal prototype to avoid an error.  */
4915 /* We use char because int might match the return type of a gcc2
4916     builtin and then its argument prototype would still apply.  */
4917 char $ac_func();
4918
4919 int main() {
4920
4921 /* The GNU C library defines this for functions which it implements
4922     to always fail with ENOSYS.  Some functions are actually named
4923     something starting with __ and the normal name is an alias.  */
4924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4925 choke me
4926 #else
4927 $ac_func();
4928 #endif
4929
4930 ; return 0; }
4931 EOF
4932 if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4933   rm -rf conftest*
4934   eval "ac_cv_func_$ac_func=yes"
4935 else
4936   echo "configure: failed program was:" >&5
4937   cat conftest.$ac_ext >&5
4938   rm -rf conftest*
4939   eval "ac_cv_func_$ac_func=no"
4940 fi
4941 rm -f conftest*
4942
4943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4946   { test "$extra_verbose" = "yes" && cat << EOF
4947     Defining $ac_tr_func
4948 EOF
4949 cat >> confdefs.h <<EOF
4950 #define $ac_tr_func 1
4951 EOF
4952 }
4953  
4954 else
4955   echo "$ac_t""no" 1>&6
4956 fi
4957 done
4958
4959 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4960 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4961 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4962 if   test -z "$mail_locking"; then
4963   case "$opsys" in cygwin* | mingw*)
4964     mail_locking=pop ;;
4965   esac
4966 fi
4967
4968 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4969     Defining MAIL_LOCK_LOCKF
4970 EOF
4971 cat >> confdefs.h <<\EOF
4972 #define MAIL_LOCK_LOCKF 1
4973 EOF
4974 }
4975
4976 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4977     Defining MAIL_LOCK_FLOCK
4978 EOF
4979 cat >> confdefs.h <<\EOF
4980 #define MAIL_LOCK_FLOCK 1
4981 EOF
4982 }
4983
4984 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4985     Defining MAIL_LOCK_LOCKING
4986 EOF
4987 cat >> confdefs.h <<\EOF
4988 #define MAIL_LOCK_LOCKING 1
4989 EOF
4990 }
4991
4992 elif test "$mail_locking" = "pop"; then
4993   with_pop=yes
4994   mail_locking=
4995 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4996     Defining MAIL_LOCK_DOT
4997 EOF
4998 cat >> confdefs.h <<\EOF
4999 #define MAIL_LOCK_DOT 1
5000 EOF
5001 }
5002
5003 fi
5004 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5005   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5006 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5007   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5008 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5009   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5010
5011 case "$opsys" in decosf*)
5012   
5013 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5014 echo "configure:5015: checking for cma_open in -lpthreads" >&5
5015 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5016
5017 xe_check_libs=" -lpthreads "
5018 cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021 /* Override any gcc2 internal prototype to avoid an error.  */
5022 /* We use char because int might match the return type of a gcc2
5023     builtin and then its argument prototype would still apply.  */
5024 char cma_open();
5025
5026 int main() {
5027 cma_open()
5028 ; return 0; }
5029 EOF
5030 if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5031   rm -rf conftest*
5032   eval "ac_cv_lib_$ac_lib_var=yes"
5033 else
5034   echo "configure: failed program was:" >&5
5035   cat conftest.$ac_ext >&5
5036   rm -rf conftest*
5037   eval "ac_cv_lib_$ac_lib_var=no"
5038 fi
5039 rm -f conftest*
5040 xe_check_libs=""
5041
5042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5043   echo "$ac_t""yes" 1>&6
5044     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5046   { test "$extra_verbose" = "yes" && cat << EOF
5047     Defining $ac_tr_lib
5048 EOF
5049 cat >> confdefs.h <<EOF
5050 #define $ac_tr_lib 1
5051 EOF
5052 }
5053
5054   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5055
5056 else
5057   echo "$ac_t""no" 1>&6
5058 fi
5059
5060
5061   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5062     c_switch_site="$c_switch_site -threads" ;;
5063 esac
5064
5065
5066 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5067 echo "configure:5068: checking whether the -xildoff compiler flag is required" >&5
5068 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5069   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5070     then echo "$ac_t""no" 1>&6;
5071     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
5072   fi
5073   else echo "$ac_t""no" 1>&6
5074 fi
5075
5076 if test "$opsys" = "sol2"; then
5077   if test "$os_release" -ge 506; then
5078     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5079 echo "configure:5080: checking for \"-z ignore\" linker flag" >&5
5080     case "`ld -h 2>&1`" in
5081       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5082         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5083       *) echo "$ac_t""no" 1>&6 ;;
5084     esac
5085   fi
5086 fi
5087
5088
5089 echo "checking "for specified window system"" 1>&6
5090 echo "configure:5091: checking "for specified window system"" >&5
5091
5092
5093 GNOME_CONFIG=no
5094 GTK_CONFIG=no
5095
5096 if test "$with_gnome" != "no"; then
5097    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5098 echo "configure:5099: checking for GNOME configuration script" >&5
5099    for possible in gnome-config
5100    do
5101       possible_version=`${possible} --version 2> /dev/null`
5102       if test "x${possible_version}" != "x"; then
5103               GNOME_CONFIG="${possible}"
5104               with_gnome=yes
5105               with_gtk=yes
5106               break
5107       fi
5108    done
5109    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5110 fi
5111
5112 if test "${GNOME_CONFIG}" != "no"; then
5113       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5114       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5115       { test "$extra_verbose" = "yes" && cat << \EOF
5116     Defining HAVE_GNOME
5117 EOF
5118 cat >> confdefs.h <<\EOF
5119 #define HAVE_GNOME 1
5120 EOF
5121 }
5122
5123       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5124       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5125 fi
5126
5127 if test "$with_gtk" != "no";then
5128    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5129 echo "configure:5130: checking for GTK configuration script" >&5
5130    for possible in gtk12-config gtk14-config gtk-config
5131    do
5132       possible_version=`${possible} --version 2> /dev/null`
5133       if test "x${possible_version}" != "x"; then
5134               GTK_CONFIG="${possible}"
5135       fi
5136       case "${possible_version}" in
5137         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5138         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5139         1.2.*)
5140                 with_gtk=yes
5141                 break
5142                 ;;
5143         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5144       esac
5145    done
5146    echo "$ac_t""${GTK_CONFIG}" 1>&6
5147 fi
5148
5149 if test "${GTK_CONFIG}" != "no"; then
5150       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5151 echo "configure:5152: checking gtk version" >&5
5152       GTK_VERSION=`${GTK_CONFIG} --version`
5153       echo "$ac_t""${GTK_VERSION}" 1>&6
5154
5155       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5156 echo "configure:5157: checking gtk libs" >&5
5157       GTK_LIBS=`${GTK_CONFIG} --libs`
5158       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5159       echo "$ac_t""${GTK_LIBS}" 1>&6
5160
5161       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5162 echo "configure:5163: checking gtk cflags" >&5
5163       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5164       if test "$GCC" = "yes"; then
5165         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5166       fi
5167       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5168       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5169
5170       
5171 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5172 echo "configure:5173: checking for main in -lgdk_imlib" >&5
5173 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5174
5175 xe_check_libs=" -lgdk_imlib "
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179
5180 int main() {
5181 main()
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5185   rm -rf conftest*
5186   eval "ac_cv_lib_$ac_lib_var=yes"
5187 else
5188   echo "configure: failed program was:" >&5
5189   cat conftest.$ac_ext >&5
5190   rm -rf conftest*
5191   eval "ac_cv_lib_$ac_lib_var=no"
5192 fi
5193 rm -f conftest*
5194 xe_check_libs=""
5195
5196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5197   echo "$ac_t""yes" 1>&6
5198   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5199 else
5200   echo "$ac_t""no" 1>&6
5201 fi
5202
5203
5204       
5205 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5206 echo "configure:5207: checking for Imlib_init in -lImlib" >&5
5207 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5208
5209 xe_check_libs=" -lImlib "
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 /* Override any gcc2 internal prototype to avoid an error.  */
5214 /* We use char because int might match the return type of a gcc2
5215     builtin and then its argument prototype would still apply.  */
5216 char Imlib_init();
5217
5218 int main() {
5219 Imlib_init()
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=no"
5230 fi
5231 rm -f conftest*
5232 xe_check_libs=""
5233
5234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5235   echo "$ac_t""yes" 1>&6
5236   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5237 else
5238   echo "$ac_t""no" 1>&6
5239 fi
5240
5241
5242       for ac_func in gdk_imlib_init
5243 do
5244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5245 echo "configure:5246: checking for $ac_func" >&5
5246
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* System header to define __stub macros and hopefully few prototypes,
5251     which can conflict with char $ac_func(); below.  */
5252 #include <assert.h>
5253 /* Override any gcc2 internal prototype to avoid an error.  */
5254 /* We use char because int might match the return type of a gcc2
5255     builtin and then its argument prototype would still apply.  */
5256 char $ac_func();
5257
5258 int main() {
5259
5260 /* The GNU C library defines this for functions which it implements
5261     to always fail with ENOSYS.  Some functions are actually named
5262     something starting with __ and the normal name is an alias.  */
5263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5264 choke me
5265 #else
5266 $ac_func();
5267 #endif
5268
5269 ; return 0; }
5270 EOF
5271 if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5272   rm -rf conftest*
5273   eval "ac_cv_func_$ac_func=yes"
5274 else
5275   echo "configure: failed program was:" >&5
5276   cat conftest.$ac_ext >&5
5277   rm -rf conftest*
5278   eval "ac_cv_func_$ac_func=no"
5279 fi
5280 rm -f conftest*
5281
5282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5283   echo "$ac_t""yes" 1>&6
5284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5285   { test "$extra_verbose" = "yes" && cat << EOF
5286     Defining $ac_tr_func
5287 EOF
5288 cat >> confdefs.h <<EOF
5289 #define $ac_tr_func 1
5290 EOF
5291 }
5292  
5293 else
5294   echo "$ac_t""no" 1>&6
5295 fi
5296 done
5297
5298
5299       { test "$extra_verbose" = "yes" && cat << \EOF
5300     Defining HAVE_XPM
5301 EOF
5302 cat >> confdefs.h <<\EOF
5303 #define HAVE_XPM 1
5304 EOF
5305 }
5306
5307       { test "$extra_verbose" = "yes" && cat << \EOF
5308     Defining HAVE_GTK
5309 EOF
5310 cat >> confdefs.h <<\EOF
5311 #define HAVE_GTK 1
5312 EOF
5313 }
5314
5315       
5316
5317       window_system=gtk
5318       with_gtk=yes
5319       with_x11=no
5320
5321       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5322       test "${with_toolbars}" != no && with_toolbars=gtk
5323       test "${with_menubars}" != "no" && with_menubars=gtk
5324       test "${with_dialogs}" != "no" && with_dialogs=gtk
5325       test "${with_widgets}" != "no" && with_widgets=gtk
5326
5327       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5328    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5329  fi
5330       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5331    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5332  fi
5333       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5334    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5335  fi
5336       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5337    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5338  fi
5339
5340             OLD_CFLAGS="${CFLAGS}"
5341       OLD_CPPFLAGS="${CPPFLAGS}"
5342       OLD_LDFLAGS="${LDFLAGS}"
5343       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5344       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5345       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5346       for ac_hdr in glade/glade.h glade.h
5347 do
5348 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5349 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5350 echo "configure:5351: checking for $ac_hdr" >&5
5351
5352 cat > conftest.$ac_ext <<EOF
5353 #line 5354 "configure"
5354 #include "confdefs.h"
5355 #include <$ac_hdr>
5356 EOF
5357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5358 { (eval echo configure:5359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5360 if test -z "$ac_err"; then
5361   rm -rf conftest*
5362   eval "ac_cv_header_$ac_safe=yes"
5363 else
5364   echo "$ac_err" >&5
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367   rm -rf conftest*
5368   eval "ac_cv_header_$ac_safe=no"
5369 fi
5370 rm -f conftest*
5371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5372   echo "$ac_t""yes" 1>&6
5373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5374   { test "$extra_verbose" = "yes" && cat << EOF
5375     Defining $ac_tr_hdr
5376 EOF
5377 cat >> confdefs.h <<EOF
5378 #define $ac_tr_hdr 1
5379 EOF
5380 }
5381  
5382 else
5383   echo "$ac_t""no" 1>&6
5384 fi
5385 done
5386
5387       
5388 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5389 echo "configure:5390: checking for main in -lxml" >&5
5390 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5391
5392 xe_check_libs=" -lxml "
5393 cat > conftest.$ac_ext <<EOF
5394 #line 5395 "configure"
5395 #include "confdefs.h"
5396
5397 int main() {
5398 main()
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5402   rm -rf conftest*
5403   eval "ac_cv_lib_$ac_lib_var=yes"
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=no"
5409 fi
5410 rm -f conftest*
5411 xe_check_libs=""
5412
5413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5414   echo "$ac_t""yes" 1>&6
5415   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5416 else
5417   echo "$ac_t""no" 1>&6
5418 fi
5419
5420
5421       
5422 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5423 echo "configure:5424: checking for main in -lglade" >&5
5424 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5425
5426 xe_check_libs=" -lglade "
5427 cat > conftest.$ac_ext <<EOF
5428 #line 5429 "configure"
5429 #include "confdefs.h"
5430
5431 int main() {
5432 main()
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5436   rm -rf conftest*
5437   eval "ac_cv_lib_$ac_lib_var=yes"
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   eval "ac_cv_lib_$ac_lib_var=no"
5443 fi
5444 rm -f conftest*
5445 xe_check_libs=""
5446
5447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5448   echo "$ac_t""yes" 1>&6
5449   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5450 else
5451   echo "$ac_t""no" 1>&6
5452 fi
5453
5454
5455       
5456 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5457 echo "configure:5458: checking for main in -lglade-gnome" >&5
5458 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5459
5460 xe_check_libs=" -lglade-gnome "
5461 cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464
5465 int main() {
5466 main()
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=yes"
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   eval "ac_cv_lib_$ac_lib_var=no"
5477 fi
5478 rm -f conftest*
5479 xe_check_libs=""
5480
5481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5482   echo "$ac_t""yes" 1>&6
5483   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5484 else
5485   echo "$ac_t""no" 1>&6
5486 fi
5487
5488
5489       cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 #include <glade/glade-xml.h>
5493 EOF
5494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5495   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5496   rm -rf conftest*
5497   echo "$ac_t""yes" 1>&6
5498                        { test "$extra_verbose" = "yes" && cat << \EOF
5499     Defining LIBGLADE_XML_TXTDOMAIN = 1
5500 EOF
5501 cat >> confdefs.h <<\EOF
5502 #define LIBGLADE_XML_TXTDOMAIN 1
5503 EOF
5504 }
5505
5506 else
5507   rm -rf conftest*
5508   echo "$ac_t""no" 1>&6
5509 fi
5510 rm -f conftest*
5511
5512       CFLAGS="${OLD_CFLAGS}"
5513       CPPFLAGS="${OLD_CPPFLAGS}"
5514       LDFLAGS="${OLD_LDFLAGS}"
5515 fi
5516
5517
5518 if test "$with_x11" != "no"; then
5519     test "$x_includes $x_libraries" != "NONE NONE" && \
5520    window_system=x11 with_x11=yes
5521
5522         
5523       if test "$x_includes $x_libraries" = "NONE NONE" \
5524     -a -n "$OPENWINHOME" \
5525     -a "$OPENWINHOME" != "/usr/openwin" \
5526     -a -d "$OPENWINHOME"; then
5527       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5528       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5529       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5530   fi
5531
5532   if test "$x_includes" = "NONE"; then
5533                     for dir in "/usr/X11" "/usr/X11R6"; do
5534       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5535     done
5536   fi
5537
5538   if test "$x_libraries" = "NONE"; then
5539     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5540       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5541     done
5542   fi
5543
5544   # If we find X, set shell vars x_includes and x_libraries to the
5545 # paths, otherwise set no_x=yes.
5546 # Uses ac_ vars as temps to allow command line to override cache and checks.
5547 # --without-x overrides everything else, but does not touch the cache.
5548 echo $ac_n "checking for X""... $ac_c" 1>&6
5549 echo "configure:5550: checking for X" >&5
5550
5551 # Check whether --with-x or --without-x was given.
5552 if test "${with_x+set}" = set; then
5553   withval="$with_x"
5554   :
5555 fi
5556
5557 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5558 if test "x$with_x" = xno; then
5559   # The user explicitly disabled X.
5560   have_x=disabled
5561 else
5562   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5563     # Both variables are already set.
5564     have_x=yes
5565   else
5566
5567 # One or both of the vars are not set, and there is no cached value.
5568 ac_x_includes=NO ac_x_libraries=NO
5569 rm -fr conftestdir
5570 if mkdir conftestdir; then
5571   cd conftestdir
5572   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5573   cat > Imakefile <<'EOF'
5574 acfindx:
5575         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5576 EOF
5577   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5578     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5579     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5580     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5581     for ac_extension in a so sl; do
5582       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5583         test -f $ac_im_libdir/libX11.$ac_extension; then
5584         ac_im_usrlibdir=$ac_im_libdir; break
5585       fi
5586     done
5587     # Screen out bogus values from the imake configuration.  They are
5588     # bogus both because they are the default anyway, and because
5589     # using them would break gcc on systems where it needs fixed includes.
5590     case "$ac_im_incroot" in
5591         /usr/include) ;;
5592         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5593     esac
5594     case "$ac_im_usrlibdir" in
5595         /usr/lib | /lib) ;;
5596         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5597     esac
5598   fi
5599   cd ..
5600   rm -fr conftestdir
5601 fi
5602
5603 if test "$ac_x_includes" = NO; then
5604   # Guess where to find include files, by looking for this one X11 .h file.
5605   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5606
5607   # First, try using that file with no special directory specified.
5608 cat > conftest.$ac_ext <<EOF
5609 #line 5610 "configure"
5610 #include "confdefs.h"
5611 #include <$x_direct_test_include>
5612 EOF
5613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5614 { (eval echo configure:5615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5616 if test -z "$ac_err"; then
5617   rm -rf conftest*
5618   # We can compile using X headers with no special include directory.
5619 ac_x_includes=
5620 else
5621   echo "$ac_err" >&5
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   # Look for the header file in a standard set of common directories.
5626 # Check X11 before X11Rn because it is often a symlink to the current release.
5627   for ac_dir in               \
5628     /usr/X11/include          \
5629     /usr/X11R6/include        \
5630     /usr/X11R5/include        \
5631     /usr/X11R4/include        \
5632                               \
5633     /usr/include/X11          \
5634     /usr/include/X11R6        \
5635     /usr/include/X11R5        \
5636     /usr/include/X11R4        \
5637                               \
5638     /usr/local/X11/include    \
5639     /usr/local/X11R6/include  \
5640     /usr/local/X11R5/include  \
5641     /usr/local/X11R4/include  \
5642                               \
5643     /usr/local/include/X11    \
5644     /usr/local/include/X11R6  \
5645     /usr/local/include/X11R5  \
5646     /usr/local/include/X11R4  \
5647                               \
5648     /usr/X386/include         \
5649     /usr/x386/include         \
5650     /usr/XFree86/include/X11  \
5651                               \
5652     /usr/include              \
5653     /usr/local/include        \
5654     /usr/unsupported/include  \
5655     /usr/athena/include       \
5656     /usr/local/x11r5/include  \
5657     /usr/lpp/Xamples/include  \
5658                               \
5659     /usr/openwin/include      \
5660     /usr/openwin/share/include \
5661     ; \
5662   do
5663     if test -r "$ac_dir/$x_direct_test_include"; then
5664       ac_x_includes=$ac_dir
5665       break
5666     fi
5667   done
5668 fi
5669 rm -f conftest*
5670 fi # $ac_x_includes = NO
5671
5672 if test "$ac_x_libraries" = NO; then
5673   # Check for the libraries.
5674
5675   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5676   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5677
5678   # See if we find them without any special options.
5679   # Don't add to $LIBS permanently.
5680   ac_save_LIBS="$LIBS"
5681   LIBS="-l$x_direct_test_library $LIBS"
5682 cat > conftest.$ac_ext <<EOF
5683 #line 5684 "configure"
5684 #include "confdefs.h"
5685
5686 int main() {
5687 ${x_direct_test_function}()
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   LIBS="$ac_save_LIBS"
5693 # We can link X programs with no special library path.
5694 ac_x_libraries=
5695 else
5696   echo "configure: failed program was:" >&5
5697   cat conftest.$ac_ext >&5
5698   rm -rf conftest*
5699   LIBS="$ac_save_LIBS"
5700 # First see if replacing the include by lib works.
5701 # Check X11 before X11Rn because it is often a symlink to the current release.
5702 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5703     /usr/X11/lib          \
5704     /usr/X11R6/lib        \
5705     /usr/X11R5/lib        \
5706     /usr/X11R4/lib        \
5707                           \
5708     /usr/lib/X11          \
5709     /usr/lib/X11R6        \
5710     /usr/lib/X11R5        \
5711     /usr/lib/X11R4        \
5712                           \
5713     /usr/local/X11/lib    \
5714     /usr/local/X11R6/lib  \
5715     /usr/local/X11R5/lib  \
5716     /usr/local/X11R4/lib  \
5717                           \
5718     /usr/local/lib/X11    \
5719     /usr/local/lib/X11R6  \
5720     /usr/local/lib/X11R5  \
5721     /usr/local/lib/X11R4  \
5722                           \
5723     /usr/X386/lib         \
5724     /usr/x386/lib         \
5725     /usr/XFree86/lib/X11  \
5726                           \
5727     /usr/lib              \
5728     /usr/local/lib        \
5729     /usr/unsupported/lib  \
5730     /usr/athena/lib       \
5731     /usr/local/x11r5/lib  \
5732     /usr/lpp/Xamples/lib  \
5733     /lib/usr/lib/X11      \
5734                           \
5735     /usr/openwin/lib      \
5736     /usr/openwin/share/lib \
5737     ; \
5738 do
5739   for ac_extension in a so sl; do
5740     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5741       ac_x_libraries=$ac_dir
5742       break 2
5743     fi
5744   done
5745 done
5746 fi
5747 rm -f conftest*
5748 fi # $ac_x_libraries = NO
5749
5750 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5751   # Didn't find X anywhere.  Cache the known absence of X.
5752   ac_cv_have_x="have_x=no"
5753 else
5754   # Record where we found X for the cache.
5755   ac_cv_have_x="have_x=yes \
5756                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5757 fi
5758   fi
5759   eval "$ac_cv_have_x"
5760 fi # $with_x != no
5761
5762 if test "$have_x" != yes; then
5763   echo "$ac_t""$have_x" 1>&6
5764   no_x=yes
5765 else
5766   # If each of the values was on the command line, it overrides each guess.
5767   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5768   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5769   # Update the cache value to reflect the command line values.
5770   ac_cv_have_x="have_x=yes \
5771                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5772   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5773 fi
5774
5775 if test "$no_x" = yes; then
5776   # Not all programs may use this symbol, but it does not hurt to define it.
5777   { test "$extra_verbose" = "yes" && cat << \EOF
5778     Defining X_DISPLAY_MISSING
5779 EOF
5780 cat >> confdefs.h <<\EOF
5781 #define X_DISPLAY_MISSING 1
5782 EOF
5783 }
5784
5785   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5786 else
5787   if test -n "$x_includes"; then
5788     X_CFLAGS="$X_CFLAGS -I$x_includes"
5789   fi
5790
5791   # It would also be nice to do this for all -L options, not just this one.
5792   if test -n "$x_libraries"; then
5793     X_LIBS="$X_LIBS -L$x_libraries"
5794     # For Solaris; some versions of Sun CC require a space after -R and
5795     # others require no space.  Words are not sufficient . . . .
5796     case "`(uname -sr) 2>/dev/null`" in
5797     "SunOS 5"*)
5798       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5799 echo "configure:5800: checking whether -R must be followed by a space" >&5
5800       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5801       cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804
5805 int main() {
5806
5807 ; return 0; }
5808 EOF
5809 if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5810   rm -rf conftest*
5811   ac_R_nospace=yes
5812 else
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -rf conftest*
5816   ac_R_nospace=no
5817 fi
5818 rm -f conftest*
5819       if test $ac_R_nospace = yes; then
5820         echo "$ac_t""no" 1>&6
5821         X_LIBS="$X_LIBS -R$x_libraries"
5822       else
5823         LIBS="$ac_xsave_LIBS -R $x_libraries"
5824         cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827
5828 int main() {
5829
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5833   rm -rf conftest*
5834   ac_R_space=yes
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   ac_R_space=no
5840 fi
5841 rm -f conftest*
5842         if test $ac_R_space = yes; then
5843           echo "$ac_t""yes" 1>&6
5844           X_LIBS="$X_LIBS -R $x_libraries"
5845         else
5846           echo "$ac_t""neither works" 1>&6
5847         fi
5848       fi
5849       LIBS="$ac_xsave_LIBS"
5850     esac
5851   fi
5852
5853   # Check for system-dependent libraries X programs must link with.
5854   # Do this before checking for the system-independent R6 libraries
5855   # (-lICE), since we may need -lsocket or whatever for X linking.
5856
5857   if test "$ISC" = yes; then
5858     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5859   else
5860     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5861     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5862     # the Alpha needs dnet_stub (dnet does not exist).
5863     if test "$with_dnet" = "no" ; then
5864 ac_cv_lib_dnet_dnet_ntoa=no
5865 else
5866
5867 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5868 echo "configure:5869: checking for dnet_ntoa in -ldnet" >&5
5869 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5870
5871 xe_check_libs=" -ldnet "
5872 cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 /* Override any gcc2 internal prototype to avoid an error.  */
5876 /* We use char because int might match the return type of a gcc2
5877     builtin and then its argument prototype would still apply.  */
5878 char dnet_ntoa();
5879
5880 int main() {
5881 dnet_ntoa()
5882 ; return 0; }
5883 EOF
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=yes"
5887 else
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890   rm -rf conftest*
5891   eval "ac_cv_lib_$ac_lib_var=no"
5892 fi
5893 rm -f conftest*
5894 xe_check_libs=""
5895
5896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5897   echo "$ac_t""yes" 1>&6
5898   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5899 else
5900   echo "$ac_t""no" 1>&6
5901 fi
5902
5903 fi
5904
5905     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5906       
5907 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5908 echo "configure:5909: checking for dnet_ntoa in -ldnet_stub" >&5
5909 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5910
5911 xe_check_libs=" -ldnet_stub "
5912 cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915 /* Override any gcc2 internal prototype to avoid an error.  */
5916 /* We use char because int might match the return type of a gcc2
5917     builtin and then its argument prototype would still apply.  */
5918 char dnet_ntoa();
5919
5920 int main() {
5921 dnet_ntoa()
5922 ; return 0; }
5923 EOF
5924 if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5925   rm -rf conftest*
5926   eval "ac_cv_lib_$ac_lib_var=yes"
5927 else
5928   echo "configure: failed program was:" >&5
5929   cat conftest.$ac_ext >&5
5930   rm -rf conftest*
5931   eval "ac_cv_lib_$ac_lib_var=no"
5932 fi
5933 rm -f conftest*
5934 xe_check_libs=""
5935
5936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5937   echo "$ac_t""yes" 1>&6
5938   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5939 else
5940   echo "$ac_t""no" 1>&6
5941 fi
5942
5943
5944     fi
5945
5946     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5947     # to get the SysV transport functions.
5948     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5949     # needs -lnsl.
5950     # The nsl library prevents programs from opening the X display
5951     # on Irix 5.2, according to dickey@clark.net.
5952     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5953 echo "configure:5954: checking for gethostbyname" >&5
5954
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5958 /* System header to define __stub macros and hopefully few prototypes,
5959     which can conflict with char gethostbyname(); below.  */
5960 #include <assert.h>
5961 /* Override any gcc2 internal prototype to avoid an error.  */
5962 /* We use char because int might match the return type of a gcc2
5963     builtin and then its argument prototype would still apply.  */
5964 char gethostbyname();
5965
5966 int main() {
5967
5968 /* The GNU C library defines this for functions which it implements
5969     to always fail with ENOSYS.  Some functions are actually named
5970     something starting with __ and the normal name is an alias.  */
5971 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5972 choke me
5973 #else
5974 gethostbyname();
5975 #endif
5976
5977 ; return 0; }
5978 EOF
5979 if { (eval echo configure:5980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5980   rm -rf conftest*
5981   eval "ac_cv_func_gethostbyname=yes"
5982 else
5983   echo "configure: failed program was:" >&5
5984   cat conftest.$ac_ext >&5
5985   rm -rf conftest*
5986   eval "ac_cv_func_gethostbyname=no"
5987 fi
5988 rm -f conftest*
5989
5990 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5991   echo "$ac_t""yes" 1>&6
5992   :
5993 else
5994   echo "$ac_t""no" 1>&6
5995 fi
5996
5997     if test $ac_cv_func_gethostbyname = no; then
5998       
5999 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6000 echo "configure:6001: checking for gethostbyname in -lnsl" >&5
6001 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6002
6003 xe_check_libs=" -lnsl "
6004 cat > conftest.$ac_ext <<EOF
6005 #line 6006 "configure"
6006 #include "confdefs.h"
6007 /* Override any gcc2 internal prototype to avoid an error.  */
6008 /* We use char because int might match the return type of a gcc2
6009     builtin and then its argument prototype would still apply.  */
6010 char gethostbyname();
6011
6012 int main() {
6013 gethostbyname()
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6017   rm -rf conftest*
6018   eval "ac_cv_lib_$ac_lib_var=yes"
6019 else
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   eval "ac_cv_lib_$ac_lib_var=no"
6024 fi
6025 rm -f conftest*
6026 xe_check_libs=""
6027
6028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6029   echo "$ac_t""yes" 1>&6
6030   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6031 else
6032   echo "$ac_t""no" 1>&6
6033 fi
6034
6035
6036     fi
6037
6038     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6039     # socket/setsockopt and other routines are undefined under SCO ODT
6040     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6041     # on later versions), says simon@lia.di.epfl.ch: it contains
6042     # gethostby* variants that don't use the nameserver (or something).
6043     # -lsocket must be given before -lnsl if both are needed.
6044     # We assume that if connect needs -lnsl, so does gethostbyname.
6045     echo $ac_n "checking for connect""... $ac_c" 1>&6
6046 echo "configure:6047: checking for connect" >&5
6047
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 /* System header to define __stub macros and hopefully few prototypes,
6052     which can conflict with char connect(); below.  */
6053 #include <assert.h>
6054 /* Override any gcc2 internal prototype to avoid an error.  */
6055 /* We use char because int might match the return type of a gcc2
6056     builtin and then its argument prototype would still apply.  */
6057 char connect();
6058
6059 int main() {
6060
6061 /* The GNU C library defines this for functions which it implements
6062     to always fail with ENOSYS.  Some functions are actually named
6063     something starting with __ and the normal name is an alias.  */
6064 #if defined (__stub_connect) || defined (__stub___connect)
6065 choke me
6066 #else
6067 connect();
6068 #endif
6069
6070 ; return 0; }
6071 EOF
6072 if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6073   rm -rf conftest*
6074   eval "ac_cv_func_connect=yes"
6075 else
6076   echo "configure: failed program was:" >&5
6077   cat conftest.$ac_ext >&5
6078   rm -rf conftest*
6079   eval "ac_cv_func_connect=no"
6080 fi
6081 rm -f conftest*
6082
6083 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085   :
6086 else
6087   echo "$ac_t""no" 1>&6
6088 fi
6089
6090     if test $ac_cv_func_connect = no; then
6091       
6092 xe_msg_checking="for connect in -lsocket"
6093 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6094 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6095 echo "configure:6096: checking "$xe_msg_checking"" >&5
6096 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6097
6098 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6099 cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 /* Override any gcc2 internal prototype to avoid an error.  */
6103 /* We use char because int might match the return type of a gcc2
6104     builtin and then its argument prototype would still apply.  */
6105 char connect();
6106
6107 int main() {
6108 connect()
6109 ; return 0; }
6110 EOF
6111 if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112   rm -rf conftest*
6113   eval "ac_cv_lib_$ac_lib_var=yes"
6114 else
6115   echo "configure: failed program was:" >&5
6116   cat conftest.$ac_ext >&5
6117   rm -rf conftest*
6118   eval "ac_cv_lib_$ac_lib_var=no"
6119 fi
6120 rm -f conftest*
6121 xe_check_libs=""
6122
6123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6124   echo "$ac_t""yes" 1>&6
6125   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6126 else
6127   echo "$ac_t""no" 1>&6
6128 fi
6129
6130
6131     fi
6132
6133     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6134     echo $ac_n "checking for remove""... $ac_c" 1>&6
6135 echo "configure:6136: checking for remove" >&5
6136
6137 cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141     which can conflict with char remove(); below.  */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char remove();
6147
6148 int main() {
6149
6150 /* The GNU C library defines this for functions which it implements
6151     to always fail with ENOSYS.  Some functions are actually named
6152     something starting with __ and the normal name is an alias.  */
6153 #if defined (__stub_remove) || defined (__stub___remove)
6154 choke me
6155 #else
6156 remove();
6157 #endif
6158
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162   rm -rf conftest*
6163   eval "ac_cv_func_remove=yes"
6164 else
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -rf conftest*
6168   eval "ac_cv_func_remove=no"
6169 fi
6170 rm -f conftest*
6171
6172 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6173   echo "$ac_t""yes" 1>&6
6174   :
6175 else
6176   echo "$ac_t""no" 1>&6
6177 fi
6178
6179     if test $ac_cv_func_remove = no; then
6180       
6181 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6182 echo "configure:6183: checking for remove in -lposix" >&5
6183 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6184
6185 xe_check_libs=" -lposix "
6186 cat > conftest.$ac_ext <<EOF
6187 #line 6188 "configure"
6188 #include "confdefs.h"
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 /* We use char because int might match the return type of a gcc2
6191     builtin and then its argument prototype would still apply.  */
6192 char remove();
6193
6194 int main() {
6195 remove()
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=no"
6206 fi
6207 rm -f conftest*
6208 xe_check_libs=""
6209
6210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6211   echo "$ac_t""yes" 1>&6
6212   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6213 else
6214   echo "$ac_t""no" 1>&6
6215 fi
6216
6217
6218     fi
6219
6220     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6221     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6222 echo "configure:6223: checking for shmat" >&5
6223
6224 cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227 /* System header to define __stub macros and hopefully few prototypes,
6228     which can conflict with char shmat(); below.  */
6229 #include <assert.h>
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 /* We use char because int might match the return type of a gcc2
6232     builtin and then its argument prototype would still apply.  */
6233 char shmat();
6234
6235 int main() {
6236
6237 /* The GNU C library defines this for functions which it implements
6238     to always fail with ENOSYS.  Some functions are actually named
6239     something starting with __ and the normal name is an alias.  */
6240 #if defined (__stub_shmat) || defined (__stub___shmat)
6241 choke me
6242 #else
6243 shmat();
6244 #endif
6245
6246 ; return 0; }
6247 EOF
6248 if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6249   rm -rf conftest*
6250   eval "ac_cv_func_shmat=yes"
6251 else
6252   echo "configure: failed program was:" >&5
6253   cat conftest.$ac_ext >&5
6254   rm -rf conftest*
6255   eval "ac_cv_func_shmat=no"
6256 fi
6257 rm -f conftest*
6258
6259 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261   :
6262 else
6263   echo "$ac_t""no" 1>&6
6264 fi
6265
6266     if test $ac_cv_func_shmat = no; then
6267       
6268 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6269 echo "configure:6270: checking for shmat in -lipc" >&5
6270 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6271
6272 xe_check_libs=" -lipc "
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char shmat();
6280
6281 int main() {
6282 shmat()
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=no"
6293 fi
6294 rm -f conftest*
6295 xe_check_libs=""
6296
6297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6298   echo "$ac_t""yes" 1>&6
6299   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6300 else
6301   echo "$ac_t""no" 1>&6
6302 fi
6303
6304
6305     fi
6306   fi
6307
6308   # Check for libraries that X11R6 Xt/Xaw programs need.
6309   ac_save_LDFLAGS="$LDFLAGS"
6310   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6311   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6312   # check for ICE first), but we must link in the order -lSM -lICE or
6313   # we get undefined symbols.  So assume we have SM if we have ICE.
6314   # These have to be linked with before -lX11, unlike the other
6315   # libraries we check for below, so use a different variable.
6316   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6317   
6318 xe_msg_checking="for IceConnectionNumber in -lICE"
6319 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6320 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6321 echo "configure:6322: checking "$xe_msg_checking"" >&5
6322 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6323
6324 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6325 cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 /* Override any gcc2 internal prototype to avoid an error.  */
6329 /* We use char because int might match the return type of a gcc2
6330     builtin and then its argument prototype would still apply.  */
6331 char IceConnectionNumber();
6332
6333 int main() {
6334 IceConnectionNumber()
6335 ; return 0; }
6336 EOF
6337 if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6338   rm -rf conftest*
6339   eval "ac_cv_lib_$ac_lib_var=yes"
6340 else
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_lib_$ac_lib_var=no"
6345 fi
6346 rm -f conftest*
6347 xe_check_libs=""
6348
6349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6350   echo "$ac_t""yes" 1>&6
6351   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6352 else
6353   echo "$ac_t""no" 1>&6
6354 fi
6355
6356
6357   LDFLAGS="$ac_save_LDFLAGS"
6358
6359 fi
6360  # Autoconf claims to find X library and include dirs for us.
6361   if test "$no_x" = "yes"
6362   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6363   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6364   fi
6365 fi
6366
6367
6368 if test "$with_x11" = "yes"; then
6369   { test "$extra_verbose" = "yes" && cat << \EOF
6370     Defining HAVE_X_WINDOWS
6371 EOF
6372 cat >> confdefs.h <<\EOF
6373 #define HAVE_X_WINDOWS 1
6374 EOF
6375 }
6376
6377   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6378   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6379
6380
6381     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6382 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6383 echo "configure:6384: checking for Xm/Xm.h" >&5
6384
6385 cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 #include <Xm/Xm.h>
6389 EOF
6390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6391 { (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6393 if test -z "$ac_err"; then
6394   rm -rf conftest*
6395   eval "ac_cv_header_$ac_safe=yes"
6396 else
6397   echo "$ac_err" >&5
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -rf conftest*
6401   eval "ac_cv_header_$ac_safe=no"
6402 fi
6403 rm -f conftest*
6404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6405   echo "$ac_t""yes" 1>&6
6406   
6407 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6408 echo "configure:6409: checking for XmStringFree in -lXm" >&5
6409 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6410
6411 xe_check_libs=" -lXm "
6412 cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415 /* Override any gcc2 internal prototype to avoid an error.  */
6416 /* We use char because int might match the return type of a gcc2
6417     builtin and then its argument prototype would still apply.  */
6418 char XmStringFree();
6419
6420 int main() {
6421 XmStringFree()
6422 ; return 0; }
6423 EOF
6424 if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6425   rm -rf conftest*
6426   eval "ac_cv_lib_$ac_lib_var=yes"
6427 else
6428   echo "configure: failed program was:" >&5
6429   cat conftest.$ac_ext >&5
6430   rm -rf conftest*
6431   eval "ac_cv_lib_$ac_lib_var=no"
6432 fi
6433 rm -f conftest*
6434 xe_check_libs=""
6435
6436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6437   echo "$ac_t""yes" 1>&6
6438   got_motif=yes
6439 else
6440   echo "$ac_t""no" 1>&6
6441 fi
6442
6443
6444 else
6445   echo "$ac_t""no" 1>&6
6446 fi
6447
6448
6449   if test "$got_motif" != "yes"; then
6450             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6451                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6452       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6453       if test -d "$lib_dir" -a -d "$inc_dir"; then
6454         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6455           x_libraries="$lib_dir $x_libraries"
6456           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6457         esac
6458         case "$x_includes" in "$inc_dir"* ) ;; *)
6459           x_includes="$inc_dir $x_includes"
6460           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6461         esac
6462         break;  fi
6463     done
6464   fi
6465
6466     for rel in "X11R6" "X11R5" "X11R4"; do
6467     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6468     if test -d "$lib_dir" -a -d "$inc_dir"; then
6469       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6470         x_libraries="$x_libraries $lib_dir"
6471         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6472       esac
6473       case "$x_includes" in "$inc_dir"* ) ;; *)
6474         x_includes="$x_includes $inc_dir"
6475         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6476       esac
6477       break;     fi
6478   done
6479
6480     case "$opsys" in
6481   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 ;;
6482   esac
6483
6484   ld_switch_x_site="$X_LIBS"
6485
6486   
6487 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6488     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6489   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6490   
6491         runpath="" runpath_dirs=""
6492   if test -n "$LD_RUN_PATH"; then
6493     runpath="$LD_RUN_PATH"
6494   elif test "$GCC" = "yes"; then
6495         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6496     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6497     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6498     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6499       case "$arg" in P,* | -L* | -R* )
6500         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6501           {
6502 xe_runpath_dir="$dir"
6503   test "$xe_runpath_dir" != "/lib"     -a \
6504         "$xe_runpath_dir" != "/usr/lib" -a \
6505         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6506   eval "$xe_add_unique_runpath_dir"
6507 }
6508         done ;;
6509       esac
6510     done
6511     ld_switch_run="$ld_switch_run_save"
6512     rm -f conftest*
6513   else
6514         for arg in $ld_switch_site $ld_switch_x_site; do
6515       case "$arg" in -L*) {
6516 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6517   test "$xe_runpath_dir" != "/lib"     -a \
6518         "$xe_runpath_dir" != "/usr/lib" -a \
6519         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6520   eval "$xe_add_unique_runpath_dir"
6521 };; esac
6522     done
6523             if test "$opsys $need_motif" = "sol2 yes"; then
6524       xe_runpath_dir="/opt/SUNWdt/lib";
6525       eval "$xe_add_unique_runpath_dir";
6526     fi
6527   fi 
6528   if test -n "$runpath"; then
6529     ld_switch_run="${dash_r}${runpath}"
6530     
6531 if test "$GCC" = "yes"; then
6532   set x $ld_switch_run; shift; ld_switch_run=""
6533   while test -n "$1"; do
6534     case $1 in
6535       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6536       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6537       -Xlinker* ) ;;
6538       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6539     esac
6540     shift
6541   done
6542 fi
6543     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6544   fi
6545 fi
6546
6547
6548   if test "$extra_verbose" = "yes"; then
6549     echo; echo "X11 compilation variables:"
6550     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6551     echo
6552   fi
6553
6554             bitmapdirs=
6555   if test "$x_includes" != NONE; then
6556     for i in $x_includes; do
6557       if test -d "$i/bitmaps"; then
6558         bitmapdirs="$i/bitmaps:$bitmapdirs"
6559       fi
6560       if test -d "$i/X11/bitmaps"; then
6561         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6562       fi
6563     done
6564     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6565   fi
6566   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6567     Defining BITMAPDIR = "$bitmapdirs"
6568 EOF
6569 cat >> confdefs.h <<EOF
6570 #define BITMAPDIR "$bitmapdirs"
6571 EOF
6572 }
6573
6574
6575     echo "checking for X defines extracted by xmkmf" 1>&6
6576 echo "configure:6577: checking for X defines extracted by xmkmf" >&5
6577   rm -fr conftestdir
6578   if mkdir conftestdir; then
6579     cd conftestdir
6580     cat > Imakefile <<'EOF'
6581 xetest:
6582         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6583 EOF
6584     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6585       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6586       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6587     fi
6588     cd ..
6589     rm -fr conftestdir
6590     for word in $xmkmf_defines; do
6591       case "$word" in 
6592       -D__STDC__*) ;;
6593       -D* )
6594         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6595         case "$word" in
6596           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6597           *     ) val=1 ;;
6598         esac
6599         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6600           if test "$val" = "1"
6601             then { test "$extra_verbose" = "yes" && cat << EOF
6602     Defining $sym
6603 EOF
6604 cat >> confdefs.h <<EOF
6605 #define $sym 1
6606 EOF
6607 }
6608
6609             else { test "$extra_verbose" = "yes" && cat << EOF
6610     Defining $sym = $val
6611 EOF
6612 cat >> confdefs.h <<EOF
6613 #define $sym $val
6614 EOF
6615 }
6616
6617           fi
6618         fi  ;;
6619       esac
6620     done
6621   fi
6622
6623     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6624 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6625 echo "configure:6626: checking for X11/Intrinsic.h" >&5
6626
6627 cat > conftest.$ac_ext <<EOF
6628 #line 6629 "configure"
6629 #include "confdefs.h"
6630 #include <X11/Intrinsic.h>
6631 EOF
6632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6633 { (eval echo configure:6634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6635 if test -z "$ac_err"; then
6636   rm -rf conftest*
6637   eval "ac_cv_header_$ac_safe=yes"
6638 else
6639   echo "$ac_err" >&5
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   eval "ac_cv_header_$ac_safe=no"
6644 fi
6645 rm -f conftest*
6646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6647   echo "$ac_t""yes" 1>&6
6648   :
6649 else
6650   echo "$ac_t""no" 1>&6
6651 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6652 fi
6653
6654
6655       
6656 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6657 echo "configure:6658: checking for XOpenDisplay in -lX11" >&5
6658 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6659
6660 xe_check_libs=" -lX11 "
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char XOpenDisplay();
6668
6669 int main() {
6670 XOpenDisplay()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 xe_check_libs=""
6684
6685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6686   echo "$ac_t""yes" 1>&6
6687   have_lib_x11=yes
6688 else
6689   echo "$ac_t""no" 1>&6
6690 fi
6691
6692
6693   if test "$have_lib_x11" != "yes"; then
6694     
6695 xe_msg_checking="for XGetFontProperty in -lX11"
6696 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6697 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6698 echo "configure:6699: checking "$xe_msg_checking"" >&5
6699 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6700
6701 xe_check_libs=" -lX11 -b i486-linuxaout"
6702 cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705 /* Override any gcc2 internal prototype to avoid an error.  */
6706 /* We use char because int might match the return type of a gcc2
6707     builtin and then its argument prototype would still apply.  */
6708 char XGetFontProperty();
6709
6710 int main() {
6711 XGetFontProperty()
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   eval "ac_cv_lib_$ac_lib_var=yes"
6717 else
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720   rm -rf conftest*
6721   eval "ac_cv_lib_$ac_lib_var=no"
6722 fi
6723 rm -f conftest*
6724 xe_check_libs=""
6725
6726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6727   echo "$ac_t""yes" 1>&6
6728   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6729 else
6730   echo "$ac_t""no" 1>&6
6731 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6732 fi
6733
6734
6735   fi
6736   libs_x="-lX11"
6737   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6738
6739     
6740 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6741 echo "configure:6742: checking for XShapeSelectInput in -lXext" >&5
6742 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6743
6744 xe_check_libs=" -lXext "
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* Override any gcc2 internal prototype to avoid an error.  */
6749 /* We use char because int might match the return type of a gcc2
6750     builtin and then its argument prototype would still apply.  */
6751 char XShapeSelectInput();
6752
6753 int main() {
6754 XShapeSelectInput()
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6758   rm -rf conftest*
6759   eval "ac_cv_lib_$ac_lib_var=yes"
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=no"
6765 fi
6766 rm -f conftest*
6767 xe_check_libs=""
6768
6769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6770   echo "$ac_t""yes" 1>&6
6771   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6772 else
6773   echo "$ac_t""no" 1>&6
6774 fi
6775
6776
6777
6778     
6779 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6780 echo "configure:6781: checking for XtOpenDisplay in -lXt" >&5
6781 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6782
6783 xe_check_libs=" -lXt "
6784 cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787 /* Override any gcc2 internal prototype to avoid an error.  */
6788 /* We use char because int might match the return type of a gcc2
6789     builtin and then its argument prototype would still apply.  */
6790 char XtOpenDisplay();
6791
6792 int main() {
6793 XtOpenDisplay()
6794 ; return 0; }
6795 EOF
6796 if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6797   rm -rf conftest*
6798   eval "ac_cv_lib_$ac_lib_var=yes"
6799 else
6800   echo "configure: failed program was:" >&5
6801   cat conftest.$ac_ext >&5
6802   rm -rf conftest*
6803   eval "ac_cv_lib_$ac_lib_var=no"
6804 fi
6805 rm -f conftest*
6806 xe_check_libs=""
6807
6808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6809   echo "$ac_t""yes" 1>&6
6810   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6811 else
6812   echo "$ac_t""no" 1>&6
6813 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6814 fi
6815
6816
6817
6818   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6819 echo "configure:6820: checking the version of X11 being used" >&5
6820   cat > conftest.$ac_ext <<EOF
6821 #line 6822 "configure"
6822 #include "confdefs.h"
6823 #include <X11/Intrinsic.h>
6824     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6825 EOF
6826 if { (eval echo configure:6827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6827 then
6828   ./conftest foobar; x11_release=$?
6829 else
6830   conftest_rc="$?"
6831   echo "configure: failed program was:" >&5
6832   cat conftest.$ac_ext >&5
6833   rm -fr conftest*
6834   x11_release=4
6835 fi
6836 rm -fr conftest*
6837   echo "$ac_t""R${x11_release}" 1>&6
6838   { test "$extra_verbose" = "yes" && cat << EOF
6839     Defining THIS_IS_X11R${x11_release}
6840 EOF
6841 cat >> confdefs.h <<EOF
6842 #define THIS_IS_X11R${x11_release} 1
6843 EOF
6844 }
6845
6846
6847   if test "${x11_release}" = "4"; then
6848     case "$with_widgets" in
6849       "" | "no") with_widgets=no ;;
6850       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6851     esac
6852   fi
6853
6854   for ac_func in XConvertCase
6855 do
6856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6857 echo "configure:6858: checking for $ac_func" >&5
6858
6859 cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 /* System header to define __stub macros and hopefully few prototypes,
6863     which can conflict with char $ac_func(); below.  */
6864 #include <assert.h>
6865 /* Override any gcc2 internal prototype to avoid an error.  */
6866 /* We use char because int might match the return type of a gcc2
6867     builtin and then its argument prototype would still apply.  */
6868 char $ac_func();
6869
6870 int main() {
6871
6872 /* The GNU C library defines this for functions which it implements
6873     to always fail with ENOSYS.  Some functions are actually named
6874     something starting with __ and the normal name is an alias.  */
6875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6876 choke me
6877 #else
6878 $ac_func();
6879 #endif
6880
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6884   rm -rf conftest*
6885   eval "ac_cv_func_$ac_func=yes"
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   eval "ac_cv_func_$ac_func=no"
6891 fi
6892 rm -f conftest*
6893
6894 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6895   echo "$ac_t""yes" 1>&6
6896     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6897   { test "$extra_verbose" = "yes" && cat << EOF
6898     Defining $ac_tr_func
6899 EOF
6900 cat >> confdefs.h <<EOF
6901 #define $ac_tr_func 1
6902 EOF
6903 }
6904  
6905 else
6906   echo "$ac_t""no" 1>&6
6907 fi
6908 done
6909
6910
6911   for ac_hdr in X11/Xlocale.h
6912 do
6913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6915 echo "configure:6916: checking for $ac_hdr" >&5
6916
6917 cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 #include <$ac_hdr>
6921 EOF
6922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6923 { (eval echo configure:6924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6925 if test -z "$ac_err"; then
6926   rm -rf conftest*
6927   eval "ac_cv_header_$ac_safe=yes"
6928 else
6929   echo "$ac_err" >&5
6930   echo "configure: failed program was:" >&5
6931   cat conftest.$ac_ext >&5
6932   rm -rf conftest*
6933   eval "ac_cv_header_$ac_safe=no"
6934 fi
6935 rm -f conftest*
6936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6937   echo "$ac_t""yes" 1>&6
6938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6939   { test "$extra_verbose" = "yes" && cat << EOF
6940     Defining $ac_tr_hdr
6941 EOF
6942 cat >> confdefs.h <<EOF
6943 #define $ac_tr_hdr 1
6944 EOF
6945 }
6946  
6947 else
6948   echo "$ac_t""no" 1>&6
6949 fi
6950 done
6951
6952
6953     for ac_func in XRegisterIMInstantiateCallback
6954 do
6955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6956 echo "configure:6957: checking for $ac_func" >&5
6957
6958 cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961 /* System header to define __stub macros and hopefully few prototypes,
6962     which can conflict with char $ac_func(); below.  */
6963 #include <assert.h>
6964 /* Override any gcc2 internal prototype to avoid an error.  */
6965 /* We use char because int might match the return type of a gcc2
6966     builtin and then its argument prototype would still apply.  */
6967 char $ac_func();
6968
6969 int main() {
6970
6971 /* The GNU C library defines this for functions which it implements
6972     to always fail with ENOSYS.  Some functions are actually named
6973     something starting with __ and the normal name is an alias.  */
6974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6975 choke me
6976 #else
6977 $ac_func();
6978 #endif
6979
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   eval "ac_cv_func_$ac_func=yes"
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_func_$ac_func=no"
6990 fi
6991 rm -f conftest*
6992
6993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6994   echo "$ac_t""yes" 1>&6
6995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6996   { test "$extra_verbose" = "yes" && cat << EOF
6997     Defining $ac_tr_func
6998 EOF
6999 cat >> confdefs.h <<EOF
7000 #define $ac_tr_func 1
7001 EOF
7002 }
7003  
7004 else
7005   echo "$ac_t""no" 1>&6
7006 fi
7007 done
7008
7009   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7010 echo "configure:7011: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014
7015 #define NeedFunctionPrototypes 1
7016 #include <X11/Xlib.h>
7017 extern Bool XRegisterIMInstantiateCallback(
7018    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7019
7020 int main() {
7021
7022 ; return 0; }
7023 EOF
7024 if { (eval echo configure:7025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7025   rm -rf conftest*
7026   echo "$ac_t""yes" 1>&6
7027 else
7028   echo "configure: failed program was:" >&5
7029   cat conftest.$ac_ext >&5
7030   rm -rf conftest*
7031   echo "$ac_t""no" 1>&6
7032    { test "$extra_verbose" = "yes" && cat << \EOF
7033     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7034 EOF
7035 cat >> confdefs.h <<\EOF
7036 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7037 EOF
7038 }
7039
7040 fi
7041 rm -f conftest*
7042
7043     test -z "$with_xmu" && { 
7044 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7045 echo "configure:7046: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7046 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7047
7048 xe_check_libs=" -lXmu "
7049 cat > conftest.$ac_ext <<EOF
7050 #line 7051 "configure"
7051 #include "confdefs.h"
7052 /* Override any gcc2 internal prototype to avoid an error.  */
7053 /* We use char because int might match the return type of a gcc2
7054     builtin and then its argument prototype would still apply.  */
7055 char XmuReadBitmapDataFromFile();
7056
7057 int main() {
7058 XmuReadBitmapDataFromFile()
7059 ; return 0; }
7060 EOF
7061 if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7062   rm -rf conftest*
7063   eval "ac_cv_lib_$ac_lib_var=yes"
7064 else
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068   eval "ac_cv_lib_$ac_lib_var=no"
7069 fi
7070 rm -f conftest*
7071 xe_check_libs=""
7072
7073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7074   echo "$ac_t""yes" 1>&6
7075   with_xmu=yes
7076 else
7077   echo "$ac_t""no" 1>&6
7078 with_xmu=no
7079 fi
7080
7081  }
7082   if test "$with_xmu" = "no"; then
7083     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7084    echo "    xemacs will be linked with \"xmu.o\""
7085  fi
7086   else
7087     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7088     { test "$extra_verbose" = "yes" && cat << \EOF
7089     Defining HAVE_XMU
7090 EOF
7091 cat >> confdefs.h <<\EOF
7092 #define HAVE_XMU 1
7093 EOF
7094 }
7095
7096   fi
7097
7098       
7099 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7100 echo "configure:7101: checking for main in -lXbsd" >&5
7101 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7102
7103 xe_check_libs=" -lXbsd "
7104 cat > conftest.$ac_ext <<EOF
7105 #line 7106 "configure"
7106 #include "confdefs.h"
7107
7108 int main() {
7109 main()
7110 ; return 0; }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=yes"
7115 else
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   eval "ac_cv_lib_$ac_lib_var=no"
7120 fi
7121 rm -f conftest*
7122 xe_check_libs=""
7123
7124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7125   echo "$ac_t""yes" 1>&6
7126   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7127 else
7128   echo "$ac_t""no" 1>&6
7129 fi
7130
7131
7132
7133     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7134         if test "$GCC" = "yes"; then
7135                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7136 echo "configure:7137: checking for name of AIX gcc threads option" >&5
7137       case `$CC -v --help 2>&1` in
7138         *-mthreads*) aix_threads=-mthreads ;;
7139                   *) aix_threads=-pthread  ;;
7140       esac
7141       echo "$ac_t""$aix_threads" 1>&6
7142       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7143       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7144     else
7145             case "$CC" in *_r) : ;;
7146         *)
7147          xe_save_CC="$CC"
7148          CC="${CC}_r"
7149          echo $ac_n "checking size of short""... $ac_c" 1>&6
7150 echo "configure:7151: checking size of short" >&5
7151
7152 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 #include <stdio.h>
7156 main()
7157 {
7158   FILE *f=fopen("conftestval", "w");
7159   if (!f) exit(1);
7160   fprintf(f, "%d\n", sizeof(short));
7161   exit(0);
7162 }
7163 EOF
7164 if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7165 then
7166   ac_cv_sizeof_short=`cat conftestval`
7167 else
7168   conftest_rc="$?"
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -fr conftest*
7172   ac_cv_sizeof_short=0
7173 fi
7174 rm -fr conftest*
7175 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7176 { test "$extra_verbose" = "yes" && cat << EOF
7177     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7178 EOF
7179 cat >> confdefs.h <<EOF
7180 #define SIZEOF_SHORT $ac_cv_sizeof_short
7181 EOF
7182 }
7183
7184
7185          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7186       esac
7187     fi
7188   fi
7189
7190 fi 
7191 if test "$with_msw" != "no"; then
7192   echo "checking for MS-Windows" 1>&6
7193 echo "configure:7194: checking for MS-Windows" >&5
7194   
7195 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7196 echo "configure:7197: checking for main in -lgdi32" >&5
7197 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7198
7199 xe_check_libs=" -lgdi32 "
7200 cat > conftest.$ac_ext <<EOF
7201 #line 7202 "configure"
7202 #include "confdefs.h"
7203
7204 int main() {
7205 main()
7206 ; return 0; }
7207 EOF
7208 if { (eval echo configure:7209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7209   rm -rf conftest*
7210   eval "ac_cv_lib_$ac_lib_var=yes"
7211 else
7212   echo "configure: failed program was:" >&5
7213   cat conftest.$ac_ext >&5
7214   rm -rf conftest*
7215   eval "ac_cv_lib_$ac_lib_var=no"
7216 fi
7217 rm -f conftest*
7218 xe_check_libs=""
7219
7220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7221   echo "$ac_t""yes" 1>&6
7222   with_msw=yes
7223 else
7224   echo "$ac_t""no" 1>&6
7225 fi
7226
7227
7228   if test "$with_msw" = "yes"; then
7229     { test "$extra_verbose" = "yes" && cat << \EOF
7230     Defining HAVE_MS_WINDOWS
7231 EOF
7232 cat >> confdefs.h <<\EOF
7233 #define HAVE_MS_WINDOWS 1
7234 EOF
7235 }
7236
7237
7238         if test "$with_netinstall" = "yes"; then
7239       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7240       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7241       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7242     fi
7243
7244     install_pp="$srcdir/lib-src/installexe.sh"
7245     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
7246     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7247     if test "$window_system" != x11; then
7248         window_system=msw
7249         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7250             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7251    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7252  fi
7253         test "$with_menubars"   != "no" && with_menubars=msw \
7254             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7255    echo "    xemacs will be linked with \"menubar-msw.o\""
7256  fi
7257         test "$with_toolbars"   != "no" && with_toolbars=msw \
7258             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7259    echo "    xemacs will be linked with \"toolbar-msw.o\""
7260  fi
7261         test "$with_dialogs"   != "no" && with_dialogs=msw \
7262             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7263    echo "    xemacs will be linked with \"dialog-msw.o\""
7264  fi
7265         test "$with_widgets"   != "no" && with_widgets=msw
7266     else
7267         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7268    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7269  fi
7270         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7271    echo "    xemacs will be linked with \"menubar-msw.o\""
7272  fi
7273         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7274    echo "    xemacs will be linked with \"toolbar-msw.o\""
7275  fi
7276         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7277    echo "    xemacs will be linked with \"dialog-msw.o\""
7278  fi
7279     fi
7280         cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 #include <fcntl.h>
7284     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7285 EOF
7286 if { (eval echo configure:7287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7287 then
7288   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7289     Defining HAVE_MSG_SELECT
7290 EOF
7291 cat >> confdefs.h <<\EOF
7292 #define HAVE_MSG_SELECT 1
7293 EOF
7294 }
7295
7296 else
7297   conftest_rc="$?"
7298   echo "configure: failed program was:" >&5
7299   cat conftest.$ac_ext >&5
7300 fi
7301 rm -fr conftest*
7302     with_file_coding=yes
7303     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
7304    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\""
7305  fi
7306   fi
7307 fi
7308
7309
7310
7311 test -z "$window_system" && window_system="none"
7312
7313 if test "$window_system" = "none"; then
7314   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7315   do
7316     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7317        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7318     fi
7319     eval "with_${feature}=no"
7320   done
7321 else
7322   test -z "$with_toolbars" && with_toolbars=yes
7323 fi
7324
7325 if test "$with_msw" != "yes"; then
7326   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7327   do
7328     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7329        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7330     fi
7331     eval "with_${feature}=no"
7332   done
7333 else
7334   :
7335 fi
7336
7337 if test "$with_x11" != "yes"; then
7338             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7339   do
7340     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7341        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7342     fi
7343     eval "with_${feature}=no"
7344   done
7345 fi
7346
7347 if test "$with_x11" = "yes"; then
7348   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7349 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7350 echo "configure:7351: checking for X11/extensions/shape.h" >&5
7351
7352 cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 #include <X11/extensions/shape.h>
7356 EOF
7357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7358 { (eval echo configure:7359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7360 if test -z "$ac_err"; then
7361   rm -rf conftest*
7362   eval "ac_cv_header_$ac_safe=yes"
7363 else
7364   echo "$ac_err" >&5
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_header_$ac_safe=no"
7369 fi
7370 rm -f conftest*
7371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7372   echo "$ac_t""yes" 1>&6
7373   
7374    { test "$extra_verbose" = "yes" && cat << \EOF
7375     Defining HAVE_BALLOON_HELP
7376 EOF
7377 cat >> confdefs.h <<\EOF
7378 #define HAVE_BALLOON_HELP 1
7379 EOF
7380 }
7381
7382    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7383    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7384  fi
7385 else
7386   echo "$ac_t""no" 1>&6
7387 fi
7388
7389 fi
7390
7391 bitmapdir=
7392
7393 case "$window_system" in
7394   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7395   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7396   gtk  )
7397        HAVE_X_WINDOWS=no
7398        test "$with_gnome" = "yes" && echo "  Using GNOME."
7399        test "$with_gnome" = "no" && echo "  Using GTK."
7400        ;;
7401   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7402 esac
7403
7404 case "$x_libraries" in *X11R4* )
7405   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7406   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7407 esac
7408
7409 echo "checking for WM_COMMAND option" 1>&6
7410 echo "configure:7411: checking for WM_COMMAND option" >&5;
7411 if test "$with_wmcommand" != "no"; then
7412   { test "$extra_verbose" = "yes" && cat << \EOF
7413     Defining HAVE_WMCOMMAND
7414 EOF
7415 cat >> confdefs.h <<\EOF
7416 #define HAVE_WMCOMMAND 1
7417 EOF
7418 }
7419
7420 fi
7421
7422 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7423 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7424 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7425 echo "configure:7426: checking for X11/Xauth.h" >&5
7426
7427 cat > conftest.$ac_ext <<EOF
7428 #line 7429 "configure"
7429 #include "confdefs.h"
7430 #include <X11/Xauth.h>
7431 EOF
7432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7433 { (eval echo configure:7434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7435 if test -z "$ac_err"; then
7436   rm -rf conftest*
7437   eval "ac_cv_header_$ac_safe=yes"
7438 else
7439   echo "$ac_err" >&5
7440   echo "configure: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   rm -rf conftest*
7443   eval "ac_cv_header_$ac_safe=no"
7444 fi
7445 rm -f conftest*
7446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7447   echo "$ac_t""yes" 1>&6
7448   :
7449 else
7450   echo "$ac_t""no" 1>&6
7451 with_xauth=no
7452 fi
7453  }
7454 test -z "$with_xauth" && { 
7455 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7456 echo "configure:7457: checking for XauGetAuthByAddr in -lXau" >&5
7457 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7458
7459 xe_check_libs=" -lXau "
7460 cat > conftest.$ac_ext <<EOF
7461 #line 7462 "configure"
7462 #include "confdefs.h"
7463 /* Override any gcc2 internal prototype to avoid an error.  */
7464 /* We use char because int might match the return type of a gcc2
7465     builtin and then its argument prototype would still apply.  */
7466 char XauGetAuthByAddr();
7467
7468 int main() {
7469 XauGetAuthByAddr()
7470 ; return 0; }
7471 EOF
7472 if { (eval echo configure:7473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7473   rm -rf conftest*
7474   eval "ac_cv_lib_$ac_lib_var=yes"
7475 else
7476   echo "configure: failed program was:" >&5
7477   cat conftest.$ac_ext >&5
7478   rm -rf conftest*
7479   eval "ac_cv_lib_$ac_lib_var=no"
7480 fi
7481 rm -f conftest*
7482 xe_check_libs=""
7483
7484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7485   echo "$ac_t""yes" 1>&6
7486   :
7487 else
7488   echo "$ac_t""no" 1>&6
7489 with_xauth=no
7490 fi
7491
7492  }
7493 test -z "$with_xauth" && with_xauth=yes
7494 if test "$with_xauth" = "yes"; then
7495   { test "$extra_verbose" = "yes" && cat << \EOF
7496     Defining HAVE_XAUTH
7497 EOF
7498 cat >> confdefs.h <<\EOF
7499 #define HAVE_XAUTH 1
7500 EOF
7501 }
7502
7503   
7504 T=""
7505 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
7506 libs_xauth="$T"
7507
7508 fi
7509
7510
7511
7512
7513 if test "$with_tooltalk" != "no" ; then
7514       for dir in "" "Tt/" "desktop/" ; do
7515     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7516 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7517 echo "configure:7518: checking for ${dir}tt_c.h" >&5
7518
7519 cat > conftest.$ac_ext <<EOF
7520 #line 7521 "configure"
7521 #include "confdefs.h"
7522 #include <${dir}tt_c.h>
7523 EOF
7524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7525 { (eval echo configure:7526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7527 if test -z "$ac_err"; then
7528   rm -rf conftest*
7529   eval "ac_cv_header_$ac_safe=yes"
7530 else
7531   echo "$ac_err" >&5
7532   echo "configure: failed program was:" >&5
7533   cat conftest.$ac_ext >&5
7534   rm -rf conftest*
7535   eval "ac_cv_header_$ac_safe=no"
7536 fi
7537 rm -f conftest*
7538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7539   echo "$ac_t""yes" 1>&6
7540   tt_c_h_file="${dir}tt_c.h"; break
7541 else
7542   echo "$ac_t""no" 1>&6
7543 fi
7544
7545   done
7546   if test -z "$tt_c_h_file"; then
7547     if test "$with_tooltalk" = "yes"; then
7548       (echo "$progname: Usage error:"
7549 echo " " "Unable to find required tooltalk header files."
7550 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7551     fi
7552     with_tooltalk=no
7553   fi
7554 fi
7555 if test "$with_tooltalk" != "no" ; then
7556   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7557     
7558 xe_msg_checking="for tt_message_create in -ltt"
7559 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7560 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7561 echo "configure:7562: checking "$xe_msg_checking"" >&5
7562 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7563
7564 xe_check_libs=" -ltt $extra_libs"
7565 cat > conftest.$ac_ext <<EOF
7566 #line 7567 "configure"
7567 #include "confdefs.h"
7568 /* Override any gcc2 internal prototype to avoid an error.  */
7569 /* We use char because int might match the return type of a gcc2
7570     builtin and then its argument prototype would still apply.  */
7571 char tt_message_create();
7572
7573 int main() {
7574 tt_message_create()
7575 ; return 0; }
7576 EOF
7577 if { (eval echo configure:7578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7578   rm -rf conftest*
7579   eval "ac_cv_lib_$ac_lib_var=yes"
7580 else
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   eval "ac_cv_lib_$ac_lib_var=no"
7585 fi
7586 rm -f conftest*
7587 xe_check_libs=""
7588
7589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7590   echo "$ac_t""yes" 1>&6
7591   tt_libs="-ltt $extra_libs"; break
7592 else
7593   echo "$ac_t""no" 1>&6
7594 :
7595 fi
7596
7597
7598   done
7599   if test -z "$tt_libs"; then
7600     if test "$with_tooltalk" = "yes"; then
7601       (echo "$progname: Usage error:"
7602 echo " " "Unable to find required tooltalk libraries."
7603 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7604     fi
7605     with_tooltalk=no
7606   fi
7607 fi
7608 test -z "$with_tooltalk" && with_tooltalk=yes
7609 if test "$with_tooltalk" = "yes"; then
7610   { test "$extra_verbose" = "yes" && cat << \EOF
7611     Defining TOOLTALK
7612 EOF
7613 cat >> confdefs.h <<\EOF
7614 #define TOOLTALK 1
7615 EOF
7616 }
7617
7618   { test "$extra_verbose" = "yes" && cat << EOF
7619     Defining TT_C_H_FILE = "$tt_c_h_file"
7620 EOF
7621 cat >> confdefs.h <<EOF
7622 #define TT_C_H_FILE "$tt_c_h_file"
7623 EOF
7624 }
7625
7626   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7627   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7628    echo "    xemacs will be linked with \"tooltalk.o\""
7629  fi
7630 fi
7631
7632 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7633 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7634 echo "configure:7635: checking for Dt/Dt.h" >&5
7635
7636 cat > conftest.$ac_ext <<EOF
7637 #line 7638 "configure"
7638 #include "confdefs.h"
7639 #include <Dt/Dt.h>
7640 EOF
7641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7642 { (eval echo configure:7643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7644 if test -z "$ac_err"; then
7645   rm -rf conftest*
7646   eval "ac_cv_header_$ac_safe=yes"
7647 else
7648   echo "$ac_err" >&5
7649   echo "configure: failed program was:" >&5
7650   cat conftest.$ac_ext >&5
7651   rm -rf conftest*
7652   eval "ac_cv_header_$ac_safe=no"
7653 fi
7654 rm -f conftest*
7655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7656   echo "$ac_t""yes" 1>&6
7657   :
7658 else
7659   echo "$ac_t""no" 1>&6
7660 with_cde=no
7661 fi
7662  }
7663 test -z "$with_cde" && { 
7664 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7665 echo "configure:7666: checking for DtDndDragStart in -lDtSvc" >&5
7666 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7667
7668 xe_check_libs=" -lDtSvc "
7669 cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 /* Override any gcc2 internal prototype to avoid an error.  */
7673 /* We use char because int might match the return type of a gcc2
7674     builtin and then its argument prototype would still apply.  */
7675 char DtDndDragStart();
7676
7677 int main() {
7678 DtDndDragStart()
7679 ; return 0; }
7680 EOF
7681 if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7682   rm -rf conftest*
7683   eval "ac_cv_lib_$ac_lib_var=yes"
7684 else
7685   echo "configure: failed program was:" >&5
7686   cat conftest.$ac_ext >&5
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=no"
7689 fi
7690 rm -f conftest*
7691 xe_check_libs=""
7692
7693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7694   echo "$ac_t""yes" 1>&6
7695   :
7696 else
7697   echo "$ac_t""no" 1>&6
7698 with_cde=no
7699 fi
7700
7701  }
7702 test -z "$with_cde" && with_cde=yes
7703 if test "$with_dragndrop" = no; then
7704   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7705   with_cde=no
7706 fi
7707 if test "$with_cde" = "yes" ; then
7708   { test "$extra_verbose" = "yes" && cat << \EOF
7709     Defining HAVE_CDE
7710 EOF
7711 cat >> confdefs.h <<\EOF
7712 #define HAVE_CDE 1
7713 EOF
7714 }
7715
7716   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7717   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7718   with_tooltalk=yes # CDE requires Tooltalk
7719   need_motif=yes    # CDE requires Motif
7720 fi
7721
7722 test "$window_system" != "x11" && with_offix=no
7723 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7724   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7725   with_offix=no
7726 fi
7727 if test "$with_dragndrop" = no; then
7728   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7729   with_offix=no
7730 fi
7731 if test "$with_cde" = yes; then
7732   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7733   with_offix=no
7734 fi
7735 test -z "$with_offix" && with_offix=no
7736 if test "$with_offix" = "yes"; then
7737   { test "$extra_verbose" = "yes" && cat << \EOF
7738     Defining HAVE_OFFIX_DND
7739 EOF
7740 cat >> confdefs.h <<\EOF
7741 #define HAVE_OFFIX_DND 1
7742 EOF
7743 }
7744
7745   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7746   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7747 fi
7748 if test "$with_gtk" = "yes"; then
7749    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7750 fi
7751
7752 if test "$with_dragndrop" != "no" ; then
7753   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7754 echo "configure:7755: checking if drag and drop API is needed" >&5
7755   if test -n "$dragndrop_proto" ; then
7756     with_dragndrop=yes
7757     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7758     { test "$extra_verbose" = "yes" && cat << \EOF
7759     Defining HAVE_DRAGNDROP
7760 EOF
7761 cat >> confdefs.h <<\EOF
7762 #define HAVE_DRAGNDROP 1
7763 EOF
7764 }
7765
7766     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7767   else
7768     with_dragndrop=no
7769     echo "$ac_t""no" 1>&6
7770   fi
7771 fi
7772
7773 echo "checking for LDAP" 1>&6
7774 echo "configure:7775: checking for LDAP" >&5
7775 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7776 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7777 echo "configure:7778: checking for ldap.h" >&5
7778
7779 cat > conftest.$ac_ext <<EOF
7780 #line 7781 "configure"
7781 #include "confdefs.h"
7782 #include <ldap.h>
7783 EOF
7784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7785 { (eval echo configure:7786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7787 if test -z "$ac_err"; then
7788   rm -rf conftest*
7789   eval "ac_cv_header_$ac_safe=yes"
7790 else
7791   echo "$ac_err" >&5
7792   echo "configure: failed program was:" >&5
7793   cat conftest.$ac_ext >&5
7794   rm -rf conftest*
7795   eval "ac_cv_header_$ac_safe=no"
7796 fi
7797 rm -f conftest*
7798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7799   echo "$ac_t""yes" 1>&6
7800   :
7801 else
7802   echo "$ac_t""no" 1>&6
7803 with_ldap=no
7804 fi
7805  }
7806 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7807 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7808 echo "configure:7809: checking for lber.h" >&5
7809
7810 cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 #include <lber.h>
7814 EOF
7815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7816 { (eval echo configure:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7818 if test -z "$ac_err"; then
7819   rm -rf conftest*
7820   eval "ac_cv_header_$ac_safe=yes"
7821 else
7822   echo "$ac_err" >&5
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826   eval "ac_cv_header_$ac_safe=no"
7827 fi
7828 rm -f conftest*
7829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7830   echo "$ac_t""yes" 1>&6
7831   :
7832 else
7833   echo "$ac_t""no" 1>&6
7834 with_ldap=no
7835 fi
7836  }
7837 if test "$with_ldap" != "no"; then
7838   
7839 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7840 echo "configure:7841: checking for ldap_search in -lldap" >&5
7841 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7842
7843 xe_check_libs=" -lldap "
7844 cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 /* Override any gcc2 internal prototype to avoid an error.  */
7848 /* We use char because int might match the return type of a gcc2
7849     builtin and then its argument prototype would still apply.  */
7850 char ldap_search();
7851
7852 int main() {
7853 ldap_search()
7854 ; return 0; }
7855 EOF
7856 if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7857   rm -rf conftest*
7858   eval "ac_cv_lib_$ac_lib_var=yes"
7859 else
7860   echo "configure: failed program was:" >&5
7861   cat conftest.$ac_ext >&5
7862   rm -rf conftest*
7863   eval "ac_cv_lib_$ac_lib_var=no"
7864 fi
7865 rm -f conftest*
7866 xe_check_libs=""
7867
7868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7869   echo "$ac_t""yes" 1>&6
7870   with_ldap_nolber=yes
7871 else
7872   echo "$ac_t""no" 1>&6
7873 with_ldap_nolber=no
7874 fi
7875
7876
7877   test "$with_ldap_nolber" = "no" && { 
7878 xe_msg_checking="for ldap_open in -lldap"
7879 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7880 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7881 echo "configure:7882: checking "$xe_msg_checking"" >&5
7882 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7883
7884 xe_check_libs=" -lldap -llber"
7885 cat > conftest.$ac_ext <<EOF
7886 #line 7887 "configure"
7887 #include "confdefs.h"
7888 /* Override any gcc2 internal prototype to avoid an error.  */
7889 /* We use char because int might match the return type of a gcc2
7890     builtin and then its argument prototype would still apply.  */
7891 char ldap_open();
7892
7893 int main() {
7894 ldap_open()
7895 ; return 0; }
7896 EOF
7897 if { (eval echo configure:7898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7898   rm -rf conftest*
7899   eval "ac_cv_lib_$ac_lib_var=yes"
7900 else
7901   echo "configure: failed program was:" >&5
7902   cat conftest.$ac_ext >&5
7903   rm -rf conftest*
7904   eval "ac_cv_lib_$ac_lib_var=no"
7905 fi
7906 rm -f conftest*
7907 xe_check_libs=""
7908
7909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7910   echo "$ac_t""yes" 1>&6
7911   with_ldap_lber=yes
7912 else
7913   echo "$ac_t""no" 1>&6
7914 with_ldap_lber=no
7915 fi
7916
7917  }
7918   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7919 xe_msg_checking="for ldap_open in -lldap"
7920 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7921 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7922 echo "configure:7923: checking "$xe_msg_checking"" >&5
7923 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7924
7925 xe_check_libs=" -lldap -llber -lkrb"
7926 cat > conftest.$ac_ext <<EOF
7927 #line 7928 "configure"
7928 #include "confdefs.h"
7929 /* Override any gcc2 internal prototype to avoid an error.  */
7930 /* We use char because int might match the return type of a gcc2
7931     builtin and then its argument prototype would still apply.  */
7932 char ldap_open();
7933
7934 int main() {
7935 ldap_open()
7936 ; return 0; }
7937 EOF
7938 if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7939   rm -rf conftest*
7940   eval "ac_cv_lib_$ac_lib_var=yes"
7941 else
7942   echo "configure: failed program was:" >&5
7943   cat conftest.$ac_ext >&5
7944   rm -rf conftest*
7945   eval "ac_cv_lib_$ac_lib_var=no"
7946 fi
7947 rm -f conftest*
7948 xe_check_libs=""
7949
7950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7951   echo "$ac_t""yes" 1>&6
7952   with_ldap_krb=yes
7953 else
7954   echo "$ac_t""no" 1>&6
7955 with_ldap_krb=no
7956 fi
7957
7958  }
7959   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7960 xe_msg_checking="for ldap_open in -lldap"
7961 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7962 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7963 echo "configure:7964: checking "$xe_msg_checking"" >&5
7964 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7965
7966 xe_check_libs=" -lldap -llber -lkrb -ldes"
7967 cat > conftest.$ac_ext <<EOF
7968 #line 7969 "configure"
7969 #include "confdefs.h"
7970 /* Override any gcc2 internal prototype to avoid an error.  */
7971 /* We use char because int might match the return type of a gcc2
7972     builtin and then its argument prototype would still apply.  */
7973 char ldap_open();
7974
7975 int main() {
7976 ldap_open()
7977 ; return 0; }
7978 EOF
7979 if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7980   rm -rf conftest*
7981   eval "ac_cv_lib_$ac_lib_var=yes"
7982 else
7983   echo "configure: failed program was:" >&5
7984   cat conftest.$ac_ext >&5
7985   rm -rf conftest*
7986   eval "ac_cv_lib_$ac_lib_var=no"
7987 fi
7988 rm -f conftest*
7989 xe_check_libs=""
7990
7991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7992   echo "$ac_t""yes" 1>&6
7993   with_ldap_krbdes=yes
7994 else
7995   echo "$ac_t""no" 1>&6
7996 with_ldap_krbdes=no
7997 fi
7998
7999  }
8000   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
8001 fi
8002 if test "$with_ldap" = "yes"; then
8003   { test "$extra_verbose" = "yes" && cat << \EOF
8004     Defining HAVE_LDAP
8005 EOF
8006 cat >> confdefs.h <<\EOF
8007 #define HAVE_LDAP 1
8008 EOF
8009 }
8010
8011   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8012    echo "    xemacs will be linked with \"eldap.o\""
8013  fi
8014   if test "$with_ldap_nolber" = "yes" ; then
8015     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8016   else
8017     if test "$with_ldap_krb" = "yes" ; then
8018       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8019     fi
8020     if test "$with_ldap_krbdes" = "yes" ; then
8021       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8022       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8023     fi
8024     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8025     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8026   fi
8027   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8028 do
8029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8030 echo "configure:8031: checking for $ac_func" >&5
8031
8032 cat > conftest.$ac_ext <<EOF
8033 #line 8034 "configure"
8034 #include "confdefs.h"
8035 /* System header to define __stub macros and hopefully few prototypes,
8036     which can conflict with char $ac_func(); below.  */
8037 #include <assert.h>
8038 /* Override any gcc2 internal prototype to avoid an error.  */
8039 /* We use char because int might match the return type of a gcc2
8040     builtin and then its argument prototype would still apply.  */
8041 char $ac_func();
8042
8043 int main() {
8044
8045 /* The GNU C library defines this for functions which it implements
8046     to always fail with ENOSYS.  Some functions are actually named
8047     something starting with __ and the normal name is an alias.  */
8048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8049 choke me
8050 #else
8051 $ac_func();
8052 #endif
8053
8054 ; return 0; }
8055 EOF
8056 if { (eval echo configure:8057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8057   rm -rf conftest*
8058   eval "ac_cv_func_$ac_func=yes"
8059 else
8060   echo "configure: failed program was:" >&5
8061   cat conftest.$ac_ext >&5
8062   rm -rf conftest*
8063   eval "ac_cv_func_$ac_func=no"
8064 fi
8065 rm -f conftest*
8066
8067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8068   echo "$ac_t""yes" 1>&6
8069     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8070   { test "$extra_verbose" = "yes" && cat << EOF
8071     Defining $ac_tr_func
8072 EOF
8073 cat >> confdefs.h <<EOF
8074 #define $ac_tr_func 1
8075 EOF
8076 }
8077  
8078 else
8079   echo "$ac_t""no" 1>&6
8080 fi
8081 done
8082
8083 fi
8084
8085 if test "$with_postgresql" != "no"; then
8086   echo "checking for PostgreSQL" 1>&6
8087 echo "configure:8088: checking for PostgreSQL" >&5
8088
8089   for header_dir in "" "pgsql/" "postgresql/"; do
8090     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8091 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8092 echo "configure:8093: checking for ${header_dir}libpq-fe.h" >&5
8093
8094 cat > conftest.$ac_ext <<EOF
8095 #line 8096 "configure"
8096 #include "confdefs.h"
8097 #include <${header_dir}libpq-fe.h>
8098 EOF
8099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8100 { (eval echo configure:8101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8102 if test -z "$ac_err"; then
8103   rm -rf conftest*
8104   eval "ac_cv_header_$ac_safe=yes"
8105 else
8106   echo "$ac_err" >&5
8107   echo "configure: failed program was:" >&5
8108   cat conftest.$ac_ext >&5
8109   rm -rf conftest*
8110   eval "ac_cv_header_$ac_safe=no"
8111 fi
8112 rm -f conftest*
8113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8114   echo "$ac_t""yes" 1>&6
8115   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8116 else
8117   echo "$ac_t""no" 1>&6
8118 fi
8119
8120   done
8121
8122   test -n "$libpq_fe_h_file" && { 
8123 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8124 echo "configure:8125: checking for PQconnectdb in -lpq" >&5
8125 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8126
8127 xe_check_libs=" -lpq "
8128 cat > conftest.$ac_ext <<EOF
8129 #line 8130 "configure"
8130 #include "confdefs.h"
8131 /* Override any gcc2 internal prototype to avoid an error.  */
8132 /* We use char because int might match the return type of a gcc2
8133     builtin and then its argument prototype would still apply.  */
8134 char PQconnectdb();
8135
8136 int main() {
8137 PQconnectdb()
8138 ; return 0; }
8139 EOF
8140 if { (eval echo configure:8141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8141   rm -rf conftest*
8142   eval "ac_cv_lib_$ac_lib_var=yes"
8143 else
8144   echo "configure: failed program was:" >&5
8145   cat conftest.$ac_ext >&5
8146   rm -rf conftest*
8147   eval "ac_cv_lib_$ac_lib_var=no"
8148 fi
8149 rm -f conftest*
8150 xe_check_libs=""
8151
8152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8153   echo "$ac_t""yes" 1>&6
8154   have_libpq=yes
8155 else
8156   echo "$ac_t""no" 1>&6
8157 fi
8158
8159  }
8160
8161   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8162     with_postgresql=yes
8163     { test "$extra_verbose" = "yes" && cat << \EOF
8164     Defining HAVE_POSTGRESQL
8165 EOF
8166 cat >> confdefs.h <<\EOF
8167 #define HAVE_POSTGRESQL 1
8168 EOF
8169 }
8170
8171     
8172 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8173 echo "configure:8174: checking for PQconnectStart in -lpq" >&5
8174 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8175
8176 xe_check_libs=" -lpq "
8177 cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 /* Override any gcc2 internal prototype to avoid an error.  */
8181 /* We use char because int might match the return type of a gcc2
8182     builtin and then its argument prototype would still apply.  */
8183 char PQconnectStart();
8184
8185 int main() {
8186 PQconnectStart()
8187 ; return 0; }
8188 EOF
8189 if { (eval echo configure:8190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8190   rm -rf conftest*
8191   eval "ac_cv_lib_$ac_lib_var=yes"
8192 else
8193   echo "configure: failed program was:" >&5
8194   cat conftest.$ac_ext >&5
8195   rm -rf conftest*
8196   eval "ac_cv_lib_$ac_lib_var=no"
8197 fi
8198 rm -f conftest*
8199 xe_check_libs=""
8200
8201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8202   echo "$ac_t""yes" 1>&6
8203   with_postgresqlv7=yes;
8204                  { test "$extra_verbose" = "yes" && cat << \EOF
8205     Defining HAVE_POSTGRESQLV7
8206 EOF
8207 cat >> confdefs.h <<\EOF
8208 #define HAVE_POSTGRESQLV7 1
8209 EOF
8210 }
8211
8212 else
8213   echo "$ac_t""no" 1>&6
8214 fi
8215
8216
8217     { test "$extra_verbose" = "yes" && cat << EOF
8218     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8219 EOF
8220 cat >> confdefs.h <<EOF
8221 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8222 EOF
8223 }
8224
8225     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8226     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8227    echo "    xemacs will be linked with \"postgresql.o\""
8228  fi
8229   elif test "$with_postgresql" = "yes"; then
8230     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8231   fi
8232 fi
8233
8234
8235 if test "$window_system" != "none"; then
8236   echo "checking for graphics libraries" 1>&6
8237 echo "configure:8238: checking for graphics libraries" >&5
8238
8239       libpath_xpm=
8240   incpath_xpm=
8241   case "$opsys" in 
8242     cygwin*)
8243       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8244       cygwin_top=`eval "dirname ${cygwin_top}"`;
8245       cygwin_top="${cygwin_top}/..";
8246       case "$window_system" in
8247                 x11)  ;;
8248                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8249              incpath_xpm="-I${cygwin_top}/include/noX"
8250               ;;
8251                 gtk)  ;;
8252                 none) ;;
8253                 *)    ;;
8254       esac
8255       ;;
8256         *) ;;
8257   esac
8258     xpm_problem=""
8259   if test -z "$with_xpm"; then
8260     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8261     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8262     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8263 echo "configure:8264: checking for Xpm - no older than 3.4f" >&5
8264     xe_check_libs=-lXpm
8265     cat > conftest.$ac_ext <<EOF
8266 #line 8267 "configure"
8267 #include "confdefs.h"
8268 #define XPM_NUMBERS
8269 #include <X11/xpm.h>
8270     int main(int c, char **v) {
8271     return c == 1 ? 0 :
8272       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8273       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8274 EOF
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8276 then
8277   ./conftest dummy_arg; xpm_status=$?;
8278       if test "$xpm_status" = "0"; then
8279         with_xpm=yes;
8280       else
8281         with_xpm=no;
8282         if test "$xpm_status" = "1"; then
8283           xpm_problem="Xpm library version and header file version don't match!"
8284         elif test "$xpm_status" = "2"; then
8285           xpm_problem="Xpm library version is too old!"
8286         else
8287           xpm_problem="Internal xpm detection logic error!"
8288         fi
8289         echo "
8290 *** WARNING *** $xpm_problem
8291   I'm not touching that with a 10-foot pole!
8292   If you really want to use the installed version of Xpm, rerun
8293   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8294     fi
8295 else
8296   conftest_rc="$?"
8297   echo "configure: failed program was:" >&5
8298   cat conftest.$ac_ext >&5
8299   rm -fr conftest*
8300   with_xpm=no
8301 fi
8302 rm -fr conftest*
8303     xe_check_libs=
8304     echo "$ac_t""$with_xpm" 1>&6
8305   fi
8306   if test "$with_xpm" = "yes"; then
8307                 { test "$extra_verbose" = "yes" && cat << \EOF
8308     Defining HAVE_XPM
8309 EOF
8310 cat >> confdefs.h <<\EOF
8311 #define HAVE_XPM 1
8312 EOF
8313 }
8314
8315     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8316     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8317     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8318     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8319 echo "configure:8320: checking for \"FOR_MSW\" xpm" >&5
8320     xe_check_libs=-lXpm
8321     cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324
8325 int main() {
8326 XpmCreatePixmapFromData()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   xpm_for_msw=no
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   xpm_for_msw=yes
8337 fi
8338 rm -f conftest*
8339     xe_check_libs=
8340     echo "$ac_t""$xpm_for_msw" 1>&6
8341     if test "$xpm_for_msw" = "yes"; then
8342       { test "$extra_verbose" = "yes" && cat << \EOF
8343     Defining FOR_MSW
8344 EOF
8345 cat >> confdefs.h <<\EOF
8346 #define FOR_MSW 1
8347 EOF
8348 }
8349
8350     fi
8351   fi
8352
8353     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8354 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8355 echo "configure:8356: checking for compface.h" >&5
8356
8357 cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 #include <compface.h>
8361 EOF
8362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8363 { (eval echo configure:8364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8365 if test -z "$ac_err"; then
8366   rm -rf conftest*
8367   eval "ac_cv_header_$ac_safe=yes"
8368 else
8369   echo "$ac_err" >&5
8370   echo "configure: failed program was:" >&5
8371   cat conftest.$ac_ext >&5
8372   rm -rf conftest*
8373   eval "ac_cv_header_$ac_safe=no"
8374 fi
8375 rm -f conftest*
8376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8377   echo "$ac_t""yes" 1>&6
8378   :
8379 else
8380   echo "$ac_t""no" 1>&6
8381 with_xface=no
8382 fi
8383  }
8384   test -z "$with_xface" && { 
8385 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8386 echo "configure:8387: checking for UnGenFace in -lcompface" >&5
8387 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8388
8389 xe_check_libs=" -lcompface "
8390 cat > conftest.$ac_ext <<EOF
8391 #line 8392 "configure"
8392 #include "confdefs.h"
8393 /* Override any gcc2 internal prototype to avoid an error.  */
8394 /* We use char because int might match the return type of a gcc2
8395     builtin and then its argument prototype would still apply.  */
8396 char UnGenFace();
8397
8398 int main() {
8399 UnGenFace()
8400 ; return 0; }
8401 EOF
8402 if { (eval echo configure:8403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8403   rm -rf conftest*
8404   eval "ac_cv_lib_$ac_lib_var=yes"
8405 else
8406   echo "configure: failed program was:" >&5
8407   cat conftest.$ac_ext >&5
8408   rm -rf conftest*
8409   eval "ac_cv_lib_$ac_lib_var=no"
8410 fi
8411 rm -f conftest*
8412 xe_check_libs=""
8413
8414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8415   echo "$ac_t""yes" 1>&6
8416   : 
8417 else
8418   echo "$ac_t""no" 1>&6
8419 with_xface=no
8420 fi
8421
8422  }
8423   test -z "$with_xface" && with_xface=yes
8424   if test "$with_xface" = "yes"; then
8425     { test "$extra_verbose" = "yes" && cat << \EOF
8426     Defining HAVE_XFACE
8427 EOF
8428 cat >> confdefs.h <<\EOF
8429 #define HAVE_XFACE 1
8430 EOF
8431 }
8432
8433     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8434   fi
8435
8436         if test "$with_gif" != "no"; then
8437     with_gif="yes"
8438     { test "$extra_verbose" = "yes" && cat << \EOF
8439     Defining HAVE_GIF
8440 EOF
8441 cat >> confdefs.h <<\EOF
8442 #define HAVE_GIF 1
8443 EOF
8444 }
8445
8446     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8447    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8448  fi
8449   fi
8450
8451       if test "$with_png $with_tiff" != "no no"; then
8452     
8453 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8454 echo "configure:8455: checking for inflate in -lc" >&5
8455 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8456
8457 xe_check_libs=" -lc "
8458 cat > conftest.$ac_ext <<EOF
8459 #line 8460 "configure"
8460 #include "confdefs.h"
8461 /* Override any gcc2 internal prototype to avoid an error.  */
8462 /* We use char because int might match the return type of a gcc2
8463     builtin and then its argument prototype would still apply.  */
8464 char inflate();
8465
8466 int main() {
8467 inflate()
8468 ; return 0; }
8469 EOF
8470 if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8471   rm -rf conftest*
8472   eval "ac_cv_lib_$ac_lib_var=yes"
8473 else
8474   echo "configure: failed program was:" >&5
8475   cat conftest.$ac_ext >&5
8476   rm -rf conftest*
8477   eval "ac_cv_lib_$ac_lib_var=no"
8478 fi
8479 rm -f conftest*
8480 xe_check_libs=""
8481
8482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8483   echo "$ac_t""yes" 1>&6
8484   :
8485 else
8486   echo "$ac_t""no" 1>&6
8487
8488 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8489 echo "configure:8490: checking for inflate in -lz" >&5
8490 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8491
8492 xe_check_libs=" -lz "
8493 cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* Override any gcc2 internal prototype to avoid an error.  */
8497 /* We use char because int might match the return type of a gcc2
8498     builtin and then its argument prototype would still apply.  */
8499 char inflate();
8500
8501 int main() {
8502 inflate()
8503 ; return 0; }
8504 EOF
8505 if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8506   rm -rf conftest*
8507   eval "ac_cv_lib_$ac_lib_var=yes"
8508 else
8509   echo "configure: failed program was:" >&5
8510   cat conftest.$ac_ext >&5
8511   rm -rf conftest*
8512   eval "ac_cv_lib_$ac_lib_var=no"
8513 fi
8514 rm -f conftest*
8515 xe_check_libs=""
8516
8517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8518   echo "$ac_t""yes" 1>&6
8519   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8520 else
8521   echo "$ac_t""no" 1>&6
8522
8523 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8524 echo "configure:8525: checking for inflate in -lgz" >&5
8525 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8526
8527 xe_check_libs=" -lgz "
8528 cat > conftest.$ac_ext <<EOF
8529 #line 8530 "configure"
8530 #include "confdefs.h"
8531 /* Override any gcc2 internal prototype to avoid an error.  */
8532 /* We use char because int might match the return type of a gcc2
8533     builtin and then its argument prototype would still apply.  */
8534 char inflate();
8535
8536 int main() {
8537 inflate()
8538 ; return 0; }
8539 EOF
8540 if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8541   rm -rf conftest*
8542   eval "ac_cv_lib_$ac_lib_var=yes"
8543 else
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   eval "ac_cv_lib_$ac_lib_var=no"
8548 fi
8549 rm -f conftest*
8550 xe_check_libs=""
8551
8552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8553   echo "$ac_t""yes" 1>&6
8554   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8555 else
8556   echo "$ac_t""no" 1>&6
8557 fi
8558
8559
8560 fi
8561
8562
8563 fi
8564
8565
8566   fi
8567
8568     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8569 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8570 echo "configure:8571: checking for jpeglib.h" >&5
8571
8572 cat > conftest.$ac_ext <<EOF
8573 #line 8574 "configure"
8574 #include "confdefs.h"
8575 #include <jpeglib.h>
8576 EOF
8577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8578 { (eval echo configure:8579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8580 if test -z "$ac_err"; then
8581   rm -rf conftest*
8582   eval "ac_cv_header_$ac_safe=yes"
8583 else
8584   echo "$ac_err" >&5
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -rf conftest*
8588   eval "ac_cv_header_$ac_safe=no"
8589 fi
8590 rm -f conftest*
8591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8592   echo "$ac_t""yes" 1>&6
8593   :
8594 else
8595   echo "$ac_t""no" 1>&6
8596 with_jpeg=no
8597 fi
8598  }
8599   test -z "$with_jpeg" && { 
8600 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8601 echo "configure:8602: checking for jpeg_destroy_decompress in -ljpeg" >&5
8602 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8603
8604 xe_check_libs=" -ljpeg "
8605 cat > conftest.$ac_ext <<EOF
8606 #line 8607 "configure"
8607 #include "confdefs.h"
8608 /* Override any gcc2 internal prototype to avoid an error.  */
8609 /* We use char because int might match the return type of a gcc2
8610     builtin and then its argument prototype would still apply.  */
8611 char jpeg_destroy_decompress();
8612
8613 int main() {
8614 jpeg_destroy_decompress()
8615 ; return 0; }
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8618   rm -rf conftest*
8619   eval "ac_cv_lib_$ac_lib_var=yes"
8620 else
8621   echo "configure: failed program was:" >&5
8622   cat conftest.$ac_ext >&5
8623   rm -rf conftest*
8624   eval "ac_cv_lib_$ac_lib_var=no"
8625 fi
8626 rm -f conftest*
8627 xe_check_libs=""
8628
8629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8630   echo "$ac_t""yes" 1>&6
8631   :
8632 else
8633   echo "$ac_t""no" 1>&6
8634 with_jpeg=no
8635 fi
8636
8637  }
8638   test -z "$with_jpeg" && with_jpeg=yes
8639   if test "$with_jpeg" = "yes"; then
8640     { test "$extra_verbose" = "yes" && cat << \EOF
8641     Defining HAVE_JPEG
8642 EOF
8643 cat >> confdefs.h <<\EOF
8644 #define HAVE_JPEG 1
8645 EOF
8646 }
8647
8648     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8649   fi
8650
8651     png_problem=""
8652   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8653 echo "configure:8654: checking for pow" >&5
8654
8655 cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 /* System header to define __stub macros and hopefully few prototypes,
8659     which can conflict with char pow(); below.  */
8660 #include <assert.h>
8661 /* Override any gcc2 internal prototype to avoid an error.  */
8662 /* We use char because int might match the return type of a gcc2
8663     builtin and then its argument prototype would still apply.  */
8664 char pow();
8665
8666 int main() {
8667
8668 /* The GNU C library defines this for functions which it implements
8669     to always fail with ENOSYS.  Some functions are actually named
8670     something starting with __ and the normal name is an alias.  */
8671 #if defined (__stub_pow) || defined (__stub___pow)
8672 choke me
8673 #else
8674 pow();
8675 #endif
8676
8677 ; return 0; }
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8680   rm -rf conftest*
8681   eval "ac_cv_func_pow=yes"
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   eval "ac_cv_func_pow=no"
8687 fi
8688 rm -f conftest*
8689
8690 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8691   echo "$ac_t""yes" 1>&6
8692   :
8693 else
8694   echo "$ac_t""no" 1>&6
8695 with_png=no
8696 fi
8697  }
8698   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8699 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8700 echo "configure:8701: checking for png.h" >&5
8701
8702 cat > conftest.$ac_ext <<EOF
8703 #line 8704 "configure"
8704 #include "confdefs.h"
8705 #include <png.h>
8706 EOF
8707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8708 { (eval echo configure:8709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8710 if test -z "$ac_err"; then
8711   rm -rf conftest*
8712   eval "ac_cv_header_$ac_safe=yes"
8713 else
8714   echo "$ac_err" >&5
8715   echo "configure: failed program was:" >&5
8716   cat conftest.$ac_ext >&5
8717   rm -rf conftest*
8718   eval "ac_cv_header_$ac_safe=no"
8719 fi
8720 rm -f conftest*
8721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8722   echo "$ac_t""yes" 1>&6
8723   :
8724 else
8725   echo "$ac_t""no" 1>&6
8726 with_png=no
8727 fi
8728  }
8729   test -z "$with_png" && { 
8730 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8731 echo "configure:8732: checking for png_read_image in -lpng" >&5
8732 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8733
8734 xe_check_libs=" -lpng "
8735 cat > conftest.$ac_ext <<EOF
8736 #line 8737 "configure"
8737 #include "confdefs.h"
8738 /* Override any gcc2 internal prototype to avoid an error.  */
8739 /* We use char because int might match the return type of a gcc2
8740     builtin and then its argument prototype would still apply.  */
8741 char png_read_image();
8742
8743 int main() {
8744 png_read_image()
8745 ; return 0; }
8746 EOF
8747 if { (eval echo configure:8748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8748   rm -rf conftest*
8749   eval "ac_cv_lib_$ac_lib_var=yes"
8750 else
8751   echo "configure: failed program was:" >&5
8752   cat conftest.$ac_ext >&5
8753   rm -rf conftest*
8754   eval "ac_cv_lib_$ac_lib_var=no"
8755 fi
8756 rm -f conftest*
8757 xe_check_libs=""
8758
8759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8760   echo "$ac_t""yes" 1>&6
8761   :
8762 else
8763   echo "$ac_t""no" 1>&6
8764 with_png=no
8765 fi
8766
8767  }
8768   if test -z "$with_png"; then
8769     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8770 echo "configure:8771: checking for workable png version information" >&5
8771     xe_check_libs="-lpng -lz"
8772     cat > conftest.$ac_ext <<EOF
8773 #line 8774 "configure"
8774 #include "confdefs.h"
8775 #include <png.h>
8776     int main(int c, char **v) {
8777     if (c == 1) return 0;
8778     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8779     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8782 then
8783   ./conftest dummy_arg; png_status=$?;
8784       if test "$png_status" = "0"; then
8785         with_png=yes;
8786       else
8787         with_png=no;
8788         if test "$png_status" = "1"; then
8789           png_problem="PNG library version and header file don't match!"
8790         elif test "$png_status" = "2"; then
8791           png_problem="PNG library version too old (pre 1.0.2)!"
8792         fi
8793         echo "
8794 *** WARNING *** $png_problem
8795   I'm not touching that with a 10-foot pole!
8796   If you really want to use the installed version of libPNG, rerun
8797   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8798     fi
8799 else
8800   conftest_rc="$?"
8801   echo "configure: failed program was:" >&5
8802   cat conftest.$ac_ext >&5
8803   rm -fr conftest*
8804   with_png=no
8805 fi
8806 rm -fr conftest*
8807     xe_check_libs=
8808     echo "$ac_t""$with_png" 1>&6
8809   fi
8810   if test "$with_png" = "yes"; then
8811     { test "$extra_verbose" = "yes" && cat << \EOF
8812     Defining HAVE_PNG
8813 EOF
8814 cat >> confdefs.h <<\EOF
8815 #define HAVE_PNG 1
8816 EOF
8817 }
8818
8819     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8820   fi
8821
8822     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8823 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8824 echo "configure:8825: checking for tiffio.h" >&5
8825
8826 cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829 #include <tiffio.h>
8830 EOF
8831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8832 { (eval echo configure:8833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8834 if test -z "$ac_err"; then
8835   rm -rf conftest*
8836   eval "ac_cv_header_$ac_safe=yes"
8837 else
8838   echo "$ac_err" >&5
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -rf conftest*
8842   eval "ac_cv_header_$ac_safe=no"
8843 fi
8844 rm -f conftest*
8845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8846   echo "$ac_t""yes" 1>&6
8847   :
8848 else
8849   echo "$ac_t""no" 1>&6
8850 with_tiff=no
8851 fi
8852  }
8853   test -z "$with_tiff" && { 
8854 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8855 echo "configure:8856: checking for TIFFClientOpen in -ltiff" >&5
8856 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8857
8858 xe_check_libs=" -ltiff "
8859 cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 /* Override any gcc2 internal prototype to avoid an error.  */
8863 /* We use char because int might match the return type of a gcc2
8864     builtin and then its argument prototype would still apply.  */
8865 char TIFFClientOpen();
8866
8867 int main() {
8868 TIFFClientOpen()
8869 ; return 0; }
8870 EOF
8871 if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8872   rm -rf conftest*
8873   eval "ac_cv_lib_$ac_lib_var=yes"
8874 else
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -rf conftest*
8878   eval "ac_cv_lib_$ac_lib_var=no"
8879 fi
8880 rm -f conftest*
8881 xe_check_libs=""
8882
8883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8884   echo "$ac_t""yes" 1>&6
8885   :
8886 else
8887   echo "$ac_t""no" 1>&6
8888 with_tiff=no
8889 fi
8890
8891  }
8892   test -z "$with_tiff" && with_tiff=yes
8893   if test "$with_tiff" = "yes"; then
8894     { test "$extra_verbose" = "yes" && cat << \EOF
8895     Defining HAVE_TIFF
8896 EOF
8897 cat >> confdefs.h <<\EOF
8898 #define HAVE_TIFF 1
8899 EOF
8900 }
8901
8902     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8903   fi
8904 fi
8905
8906
8907 if test "$with_gtk" = "yes"; then
8908     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8909 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8910 echo "configure:8911: checking for compface.h" >&5
8911
8912 cat > conftest.$ac_ext <<EOF
8913 #line 8914 "configure"
8914 #include "confdefs.h"
8915 #include <compface.h>
8916 EOF
8917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8918 { (eval echo configure:8919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8920 if test -z "$ac_err"; then
8921   rm -rf conftest*
8922   eval "ac_cv_header_$ac_safe=yes"
8923 else
8924   echo "$ac_err" >&5
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -rf conftest*
8928   eval "ac_cv_header_$ac_safe=no"
8929 fi
8930 rm -f conftest*
8931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8932   echo "$ac_t""yes" 1>&6
8933   :
8934 else
8935   echo "$ac_t""no" 1>&6
8936 with_xface=no
8937 fi
8938  }
8939   test -z "$with_xface" && { 
8940 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8941 echo "configure:8942: checking for UnGenFace in -lcompface" >&5
8942 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8943
8944 xe_check_libs=" -lcompface "
8945 cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8948 /* Override any gcc2 internal prototype to avoid an error.  */
8949 /* We use char because int might match the return type of a gcc2
8950     builtin and then its argument prototype would still apply.  */
8951 char UnGenFace();
8952
8953 int main() {
8954 UnGenFace()
8955 ; return 0; }
8956 EOF
8957 if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8958   rm -rf conftest*
8959   eval "ac_cv_lib_$ac_lib_var=yes"
8960 else
8961   echo "configure: failed program was:" >&5
8962   cat conftest.$ac_ext >&5
8963   rm -rf conftest*
8964   eval "ac_cv_lib_$ac_lib_var=no"
8965 fi
8966 rm -f conftest*
8967 xe_check_libs=""
8968
8969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8970   echo "$ac_t""yes" 1>&6
8971   : 
8972 else
8973   echo "$ac_t""no" 1>&6
8974 with_xface=no
8975 fi
8976
8977  }
8978   test -z "$with_xface" && with_xface=yes
8979   if test "$with_xface" = "yes"; then
8980     { test "$extra_verbose" = "yes" && cat << \EOF
8981     Defining HAVE_XFACE
8982 EOF
8983 cat >> confdefs.h <<\EOF
8984 #define HAVE_XFACE 1
8985 EOF
8986 }
8987
8988     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8989   fi
8990 fi
8991
8992
8993
8994 if test "$with_x11" = "yes"; then
8995   echo "checking for X11 graphics libraries" 1>&6
8996 echo "configure:8997: checking for X11 graphics libraries" >&5
8997 fi
8998
8999 if test "$with_x11" = "yes"; then
9000   echo "checking for the Athena widgets" 1>&6
9001 echo "configure:9002: checking for the Athena widgets" >&5
9002
9003     case "$with_athena" in
9004         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9005     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9006     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9007     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9008     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9009     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9010   esac
9011
9012   athena_3d_function=Xaw3dComputeBottomShadowRGB
9013
9014     if test "$athena_3d" = "no"; then
9015     
9016 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9017 echo "configure:9018: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9018 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9019
9020 xe_check_libs=" -l$athena_variant "
9021 cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024 /* Override any gcc2 internal prototype to avoid an error.  */
9025 /* We use char because int might match the return type of a gcc2
9026     builtin and then its argument prototype would still apply.  */
9027 char XawScrollbarSetThumb();
9028
9029 int main() {
9030 XawScrollbarSetThumb()
9031 ; return 0; }
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9034   rm -rf conftest*
9035   eval "ac_cv_lib_$ac_lib_var=yes"
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   eval "ac_cv_lib_$ac_lib_var=no"
9041 fi
9042 rm -f conftest*
9043 xe_check_libs=""
9044
9045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9046   echo "$ac_t""yes" 1>&6
9047           
9048 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9049 echo "configure:9050: checking for $athena_3d_function in -l$athena_variant" >&5
9050 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9051
9052 xe_check_libs=" -l$athena_variant "
9053 cat > conftest.$ac_ext <<EOF
9054 #line 9055 "configure"
9055 #include "confdefs.h"
9056 /* Override any gcc2 internal prototype to avoid an error.  */
9057 /* We use char because int might match the return type of a gcc2
9058     builtin and then its argument prototype would still apply.  */
9059 char $athena_3d_function();
9060
9061 int main() {
9062 $athena_3d_function()
9063 ; return 0; }
9064 EOF
9065 if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9066   rm -rf conftest*
9067   eval "ac_cv_lib_$ac_lib_var=yes"
9068 else
9069   echo "configure: failed program was:" >&5
9070   cat conftest.$ac_ext >&5
9071   rm -rf conftest*
9072   eval "ac_cv_lib_$ac_lib_var=no"
9073 fi
9074 rm -f conftest*
9075 xe_check_libs=""
9076
9077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9078   echo "$ac_t""yes" 1>&6
9079   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9080 else
9081   echo "$ac_t""no" 1>&6
9082 athena_lib=$athena_variant
9083 fi
9084
9085
9086       
9087 else
9088   echo "$ac_t""no" 1>&6
9089 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9090 fi
9091
9092
9093   else
9094         
9095 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9096 echo "configure:9097: checking for $athena_3d_function in -l$athena_variant" >&5
9097 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9098
9099 xe_check_libs=" -l$athena_variant "
9100 cat > conftest.$ac_ext <<EOF
9101 #line 9102 "configure"
9102 #include "confdefs.h"
9103 /* Override any gcc2 internal prototype to avoid an error.  */
9104 /* We use char because int might match the return type of a gcc2
9105     builtin and then its argument prototype would still apply.  */
9106 char $athena_3d_function();
9107
9108 int main() {
9109 $athena_3d_function()
9110 ; return 0; }
9111 EOF
9112 if { (eval echo configure:9113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9113   rm -rf conftest*
9114   eval "ac_cv_lib_$ac_lib_var=yes"
9115 else
9116   echo "configure: failed program was:" >&5
9117   cat conftest.$ac_ext >&5
9118   rm -rf conftest*
9119   eval "ac_cv_lib_$ac_lib_var=no"
9120 fi
9121 rm -f conftest*
9122 xe_check_libs=""
9123
9124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9125   echo "$ac_t""yes" 1>&6
9126   athena_lib=$athena_variant
9127 else
9128   echo "$ac_t""no" 1>&6
9129 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9130 echo "configure:9131: checking for $athena_3d_function in -lXaw" >&5
9131 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9132
9133 xe_check_libs=" -lXaw "
9134 cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 /* Override any gcc2 internal prototype to avoid an error.  */
9138 /* We use char because int might match the return type of a gcc2
9139     builtin and then its argument prototype would still apply.  */
9140 char $athena_3d_function();
9141
9142 int main() {
9143 $athena_3d_function()
9144 ; return 0; }
9145 EOF
9146 if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9147   rm -rf conftest*
9148   eval "ac_cv_lib_$ac_lib_var=yes"
9149 else
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -rf conftest*
9153   eval "ac_cv_lib_$ac_lib_var=no"
9154 fi
9155 rm -f conftest*
9156 xe_check_libs=""
9157
9158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9159   echo "$ac_t""yes" 1>&6
9160   athena_lib=Xaw;
9161           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9162         
9163 else
9164   echo "$ac_t""no" 1>&6
9165 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9166 fi
9167
9168
9169 fi
9170
9171
9172   fi
9173
9174     if test "$athena_3d" = "no"; then
9175     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9176 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9177 echo "configure:9178: checking for X11/Xaw/ThreeD.h" >&5
9178
9179 cat > conftest.$ac_ext <<EOF
9180 #line 9181 "configure"
9181 #include "confdefs.h"
9182 #include <X11/Xaw/ThreeD.h>
9183 EOF
9184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9185 { (eval echo configure:9186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9187 if test -z "$ac_err"; then
9188   rm -rf conftest*
9189   eval "ac_cv_header_$ac_safe=yes"
9190 else
9191   echo "$ac_err" >&5
9192   echo "configure: failed program was:" >&5
9193   cat conftest.$ac_ext >&5
9194   rm -rf conftest*
9195   eval "ac_cv_header_$ac_safe=no"
9196 fi
9197 rm -f conftest*
9198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9199   echo "$ac_t""yes" 1>&6
9200   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9201 else
9202   echo "$ac_t""no" 1>&6
9203 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9204 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9205 echo "configure:9206: checking for X11/Xaw/XawInit.h" >&5
9206
9207 cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 #include <X11/Xaw/XawInit.h>
9211 EOF
9212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9213 { (eval echo configure:9214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9215 if test -z "$ac_err"; then
9216   rm -rf conftest*
9217   eval "ac_cv_header_$ac_safe=yes"
9218 else
9219   echo "$ac_err" >&5
9220   echo "configure: failed program was:" >&5
9221   cat conftest.$ac_ext >&5
9222   rm -rf conftest*
9223   eval "ac_cv_header_$ac_safe=no"
9224 fi
9225 rm -f conftest*
9226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9227   echo "$ac_t""yes" 1>&6
9228   athena_h_path=X11/Xaw
9229 else
9230   echo "$ac_t""no" 1>&6
9231 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9232 fi
9233
9234 fi
9235
9236   else
9237             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9238 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9239 echo "configure:9240: checking for X11/$athena_variant/XawInit.h" >&5
9240
9241 cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244 #include <X11/$athena_variant/XawInit.h>
9245 EOF
9246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9247 { (eval echo configure:9248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9249 if test -z "$ac_err"; then
9250   rm -rf conftest*
9251   eval "ac_cv_header_$ac_safe=yes"
9252 else
9253   echo "$ac_err" >&5
9254   echo "configure: failed program was:" >&5
9255   cat conftest.$ac_ext >&5
9256   rm -rf conftest*
9257   eval "ac_cv_header_$ac_safe=no"
9258 fi
9259 rm -f conftest*
9260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9261   echo "$ac_t""yes" 1>&6
9262   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9263 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9264 echo "configure:9265: checking for X11/$athena_variant/ThreeD.h" >&5
9265
9266 cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269 #include <X11/$athena_variant/ThreeD.h>
9270 EOF
9271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9272 { (eval echo configure:9273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9274 if test -z "$ac_err"; then
9275   rm -rf conftest*
9276   eval "ac_cv_header_$ac_safe=yes"
9277 else
9278   echo "$ac_err" >&5
9279   echo "configure: failed program was:" >&5
9280   cat conftest.$ac_ext >&5
9281   rm -rf conftest*
9282   eval "ac_cv_header_$ac_safe=no"
9283 fi
9284 rm -f conftest*
9285 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9286   echo "$ac_t""yes" 1>&6
9287   athena_h_path=X11/$athena_variant
9288 else
9289   echo "$ac_t""no" 1>&6
9290 fi
9291
9292 else
9293   echo "$ac_t""no" 1>&6
9294 fi
9295
9296
9297         if test -z "$athena_h_path"; then
9298       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9299 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9300 echo "configure:9301: checking for $athena_variant/XawInit.h" >&5
9301
9302 cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305 #include <$athena_variant/XawInit.h>
9306 EOF
9307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9308 { (eval echo configure:9309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9310 if test -z "$ac_err"; then
9311   rm -rf conftest*
9312   eval "ac_cv_header_$ac_safe=yes"
9313 else
9314   echo "$ac_err" >&5
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -rf conftest*
9318   eval "ac_cv_header_$ac_safe=no"
9319 fi
9320 rm -f conftest*
9321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9322   echo "$ac_t""yes" 1>&6
9323   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9324 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9325 echo "configure:9326: checking for $athena_variant/ThreeD.h" >&5
9326
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330 #include <$athena_variant/ThreeD.h>
9331 EOF
9332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9333 { (eval echo configure:9334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9335 if test -z "$ac_err"; then
9336   rm -rf conftest*
9337   eval "ac_cv_header_$ac_safe=yes"
9338 else
9339   echo "$ac_err" >&5
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_header_$ac_safe=no"
9344 fi
9345 rm -f conftest*
9346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348   athena_h_path=$athena_variant
9349 else
9350   echo "$ac_t""no" 1>&6
9351 fi
9352
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356
9357     fi
9358
9359         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9360       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9361 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9362 echo "configure:9363: checking for X11/Xaw3d/XawInit.h" >&5
9363
9364 cat > conftest.$ac_ext <<EOF
9365 #line 9366 "configure"
9366 #include "confdefs.h"
9367 #include <X11/Xaw3d/XawInit.h>
9368 EOF
9369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9370 { (eval echo configure:9371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9372 if test -z "$ac_err"; then
9373   rm -rf conftest*
9374   eval "ac_cv_header_$ac_safe=yes"
9375 else
9376   echo "$ac_err" >&5
9377   echo "configure: failed program was:" >&5
9378   cat conftest.$ac_ext >&5
9379   rm -rf conftest*
9380   eval "ac_cv_header_$ac_safe=no"
9381 fi
9382 rm -f conftest*
9383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9384   echo "$ac_t""yes" 1>&6
9385   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9386 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9387 echo "configure:9388: checking for X11/Xaw3d/ThreeD.h" >&5
9388
9389 cat > conftest.$ac_ext <<EOF
9390 #line 9391 "configure"
9391 #include "confdefs.h"
9392 #include <X11/Xaw3d/ThreeD.h>
9393 EOF
9394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9395 { (eval echo configure:9396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9397 if test -z "$ac_err"; then
9398   rm -rf conftest*
9399   eval "ac_cv_header_$ac_safe=yes"
9400 else
9401   echo "$ac_err" >&5
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -rf conftest*
9405   eval "ac_cv_header_$ac_safe=no"
9406 fi
9407 rm -f conftest*
9408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9409   echo "$ac_t""yes" 1>&6
9410   
9411             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9412             athena_h_path=X11/Xaw3d
9413           
9414 else
9415   echo "$ac_t""no" 1>&6
9416 fi
9417
9418 else
9419   echo "$ac_t""no" 1>&6
9420 fi
9421
9422     fi
9423
9424         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9425       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9426 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9427 echo "configure:9428: checking for Xaw3d/XawInit.h" >&5
9428
9429 cat > conftest.$ac_ext <<EOF
9430 #line 9431 "configure"
9431 #include "confdefs.h"
9432 #include <Xaw3d/XawInit.h>
9433 EOF
9434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9435 { (eval echo configure:9436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9437 if test -z "$ac_err"; then
9438   rm -rf conftest*
9439   eval "ac_cv_header_$ac_safe=yes"
9440 else
9441   echo "$ac_err" >&5
9442   echo "configure: failed program was:" >&5
9443   cat conftest.$ac_ext >&5
9444   rm -rf conftest*
9445   eval "ac_cv_header_$ac_safe=no"
9446 fi
9447 rm -f conftest*
9448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9449   echo "$ac_t""yes" 1>&6
9450   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9451 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9452 echo "configure:9453: checking for Xaw3d/ThreeD.h" >&5
9453
9454 cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 #include <Xaw3d/ThreeD.h>
9458 EOF
9459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9460 { (eval echo configure:9461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9462 if test -z "$ac_err"; then
9463   rm -rf conftest*
9464   eval "ac_cv_header_$ac_safe=yes"
9465 else
9466   echo "$ac_err" >&5
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   eval "ac_cv_header_$ac_safe=no"
9471 fi
9472 rm -f conftest*
9473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9474   echo "$ac_t""yes" 1>&6
9475   
9476             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9477             athena_h_path=Xaw3d
9478           
9479 else
9480   echo "$ac_t""no" 1>&6
9481 fi
9482
9483 else
9484   echo "$ac_t""no" 1>&6
9485 fi
9486
9487     fi
9488
9489             if test -z "$athena_h_path"; then
9490       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9491 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9492 echo "configure:9493: checking for X11/Xaw/ThreeD.h" >&5
9493
9494 cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497 #include <X11/Xaw/ThreeD.h>
9498 EOF
9499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9500 { (eval echo configure:9501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9502 if test -z "$ac_err"; then
9503   rm -rf conftest*
9504   eval "ac_cv_header_$ac_safe=yes"
9505 else
9506   echo "$ac_err" >&5
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   eval "ac_cv_header_$ac_safe=no"
9511 fi
9512 rm -f conftest*
9513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9514   echo "$ac_t""yes" 1>&6
9515   
9516           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9517           athena_h_path=X11/Xaw
9518         
9519 else
9520   echo "$ac_t""no" 1>&6
9521 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9522 fi
9523
9524     fi
9525   fi
9526
9527     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9528     have_xaw=yes
9529   else
9530     have_xaw=no
9531   fi
9532
9533 else
9534   have_xaw=no
9535 fi 
9536 if test "$with_x11" = "yes"; then
9537     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9538 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9539 echo "configure:9540: checking for Xm/Xm.h" >&5
9540
9541 cat > conftest.$ac_ext <<EOF
9542 #line 9543 "configure"
9543 #include "confdefs.h"
9544 #include <Xm/Xm.h>
9545 EOF
9546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9547 { (eval echo configure:9548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9549 if test -z "$ac_err"; then
9550   rm -rf conftest*
9551   eval "ac_cv_header_$ac_safe=yes"
9552 else
9553   echo "$ac_err" >&5
9554   echo "configure: failed program was:" >&5
9555   cat conftest.$ac_ext >&5
9556   rm -rf conftest*
9557   eval "ac_cv_header_$ac_safe=no"
9558 fi
9559 rm -f conftest*
9560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9561   echo "$ac_t""yes" 1>&6
9562   
9563 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9564 echo "configure:9565: checking for XmStringFree in -lXm" >&5
9565 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9566
9567 xe_check_libs=" -lXm "
9568 cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571 /* Override any gcc2 internal prototype to avoid an error.  */
9572 /* We use char because int might match the return type of a gcc2
9573     builtin and then its argument prototype would still apply.  */
9574 char XmStringFree();
9575
9576 int main() {
9577 XmStringFree()
9578 ; return 0; }
9579 EOF
9580 if { (eval echo configure:9581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9581   rm -rf conftest*
9582   eval "ac_cv_lib_$ac_lib_var=yes"
9583 else
9584   echo "configure: failed program was:" >&5
9585   cat conftest.$ac_ext >&5
9586   rm -rf conftest*
9587   eval "ac_cv_lib_$ac_lib_var=no"
9588 fi
9589 rm -f conftest*
9590 xe_check_libs=""
9591
9592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9593   echo "$ac_t""yes" 1>&6
9594   have_motif=yes
9595 else
9596   echo "$ac_t""no" 1>&6
9597 have_motif=no
9598 fi
9599
9600
9601 else
9602   echo "$ac_t""no" 1>&6
9603 have_motif=no
9604 fi
9605
9606
9607   if test "$have_motif" = "yes"; then
9608         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9609 echo "configure:9610: checking for Lesstif" >&5
9610     cat > conftest.$ac_ext <<EOF
9611 #line 9612 "configure"
9612 #include "confdefs.h"
9613 #include <Xm/Xm.h>
9614 #ifdef LESSTIF_VERSION
9615 yes
9616 #endif
9617
9618 EOF
9619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9620   egrep "yes" >/dev/null 2>&1; then
9621   rm -rf conftest*
9622   have_lesstif=yes
9623 else
9624   rm -rf conftest*
9625   have_lesstif=no
9626 fi
9627 rm -f conftest*
9628
9629   echo "$ac_t""$have_lesstif" 1>&6
9630   fi
9631
9632 fi 
9633
9634 case "$opsys" in
9635   *linux* )  lucid_prefers_motif = "no"  ;;
9636   * )        lucid_prefers_motif = "yes" ;;
9637 esac
9638
9639 case "$with_menubars" in "" | "yes" | "athena" )
9640   with_menubars="lucid" ;;
9641 esac
9642 case "$with_dialogs" in "" | "yes" | "lucid" )
9643   if test "$lucid_prefers_motif" = "yes"; then
9644     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9645     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9646     else with_dialogs=no
9647     fi
9648   else
9649     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9650     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9651     else with_dialogs=no
9652     fi
9653   fi ;;
9654 esac
9655 case "$with_scrollbars" in "" | "yes" )
9656   with_scrollbars="lucid" ;;
9657 esac
9658 case "$with_widgets" in
9659   "yes" | "lucid")
9660     if test "$lucid_prefers_motif" = "yes"; then
9661       if   test "$have_motif" = "yes"; then with_widgets="motif"
9662       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9663       else with_widgets=no
9664       fi
9665     else
9666       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9667       elif test "$have_motif" = "yes"; then with_widgets="motif"
9668       else with_widgets=no
9669       fi
9670     fi ;;
9671   "" )
9672     with_widgets=no ;;
9673 esac
9674
9675 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9676
9677 case "$all_widgets" in
9678   *athena* )
9679     if test "$have_xaw" != "yes"; then
9680       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9681     fi
9682
9683         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9684
9685         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9686
9687                     { test "$extra_verbose" = "yes" && cat << EOF
9688     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9689 EOF
9690 cat >> confdefs.h <<EOF
9691 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9692 EOF
9693 }
9694
9695     { test "$extra_verbose" = "yes" && cat << EOF
9696     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9697 EOF
9698 cat >> confdefs.h <<EOF
9699 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9700 EOF
9701 }
9702
9703     { test "$extra_verbose" = "yes" && cat << EOF
9704     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9705 EOF
9706 cat >> confdefs.h <<EOF
9707 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9708 EOF
9709 }
9710
9711     { test "$extra_verbose" = "yes" && cat << EOF
9712     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9713 EOF
9714 cat >> confdefs.h <<EOF
9715 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9716 EOF
9717 }
9718
9719     { test "$extra_verbose" = "yes" && cat << EOF
9720     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9721 EOF
9722 cat >> confdefs.h <<EOF
9723 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9724 EOF
9725 }
9726
9727     { test "$extra_verbose" = "yes" && cat << EOF
9728     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9729 EOF
9730 cat >> confdefs.h <<EOF
9731 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9732 EOF
9733 }
9734
9735     { test "$extra_verbose" = "yes" && cat << EOF
9736     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9737 EOF
9738 cat >> confdefs.h <<EOF
9739 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9740 EOF
9741 }
9742
9743     { test "$extra_verbose" = "yes" && cat << EOF
9744     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9745 EOF
9746 cat >> confdefs.h <<EOF
9747 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9748 EOF
9749 }
9750
9751     { test "$extra_verbose" = "yes" && cat << EOF
9752     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9753 EOF
9754 cat >> confdefs.h <<EOF
9755 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9756 EOF
9757 }
9758
9759     { test "$extra_verbose" = "yes" && cat << EOF
9760     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9761 EOF
9762 cat >> confdefs.h <<EOF
9763 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9764 EOF
9765 }
9766
9767
9768     { test "$extra_verbose" = "yes" && cat << \EOF
9769     Defining LWLIB_USES_ATHENA
9770 EOF
9771 cat >> confdefs.h <<\EOF
9772 #define LWLIB_USES_ATHENA 1
9773 EOF
9774 }
9775
9776     { test "$extra_verbose" = "yes" && cat << \EOF
9777     Defining NEED_ATHENA
9778 EOF
9779 cat >> confdefs.h <<\EOF
9780 #define NEED_ATHENA 1
9781 EOF
9782 }
9783
9784     need_athena="yes"
9785
9786     if test "$athena_3d" = "yes"; then
9787       { test "$extra_verbose" = "yes" && cat << \EOF
9788     Defining HAVE_ATHENA_3D
9789 EOF
9790 cat >> confdefs.h <<\EOF
9791 #define HAVE_ATHENA_3D 1
9792 EOF
9793 }
9794
9795     fi
9796   ;;
9797 esac
9798
9799 case "$all_widgets" in *motif* )
9800   { test "$extra_verbose" = "yes" && cat << \EOF
9801     Defining LWLIB_USES_MOTIF
9802 EOF
9803 cat >> confdefs.h <<\EOF
9804 #define LWLIB_USES_MOTIF 1
9805 EOF
9806 }
9807
9808   { test "$extra_verbose" = "yes" && cat << \EOF
9809     Defining NEED_MOTIF
9810 EOF
9811 cat >> confdefs.h <<\EOF
9812 #define NEED_MOTIF 1
9813 EOF
9814 }
9815
9816   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9817   need_motif=yes ;;
9818 esac
9819
9820 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9821 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9822 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9823 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9824         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9825 case "$with_widgets" in athena* )
9826         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;;
9827 esac
9828 case "$all_widgets" in *lucid* )
9829   { test "$extra_verbose" = "yes" && cat << \EOF
9830     Defining NEED_LUCID
9831 EOF
9832 cat >> confdefs.h <<\EOF
9833 #define NEED_LUCID 1
9834 EOF
9835 }
9836
9837   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9838 esac
9839
9840
9841
9842 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9843     Defining LWLIB_SCROLLBARS_ATHENA
9844 EOF
9845 cat >> confdefs.h <<\EOF
9846 #define LWLIB_SCROLLBARS_ATHENA 1
9847 EOF
9848 }
9849
9850 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9851     Defining LWLIB_DIALOGS_ATHENA
9852 EOF
9853 cat >> confdefs.h <<\EOF
9854 #define LWLIB_DIALOGS_ATHENA 1
9855 EOF
9856 }
9857
9858
9859 if test "$athena_3d" = "yes"; then
9860   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9861     Defining LWLIB_SCROLLBARS_ATHENA3D
9862 EOF
9863 cat >> confdefs.h <<\EOF
9864 #define LWLIB_SCROLLBARS_ATHENA3D 1
9865 EOF
9866 }
9867
9868   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9869     Defining LWLIB_DIALOGS_ATHENA3D
9870 EOF
9871 cat >> confdefs.h <<\EOF
9872 #define LWLIB_DIALOGS_ATHENA3D 1
9873 EOF
9874 }
9875
9876 fi
9877
9878 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9879     Defining LWLIB_WIDGETS_ATHENA
9880 EOF
9881 cat >> confdefs.h <<\EOF
9882 #define LWLIB_WIDGETS_ATHENA 1
9883 EOF
9884 }
9885 ;; esac
9886 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9887         { test "$extra_verbose" = "yes" && cat << \EOF
9888     Defining LWLIB_TABS_LUCID
9889 EOF
9890 cat >> confdefs.h <<\EOF
9891 #define LWLIB_TABS_LUCID 1
9892 EOF
9893 }
9894
9895
9896 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9897     Defining HAVE_MENUBARS
9898 EOF
9899 cat >> confdefs.h <<\EOF
9900 #define HAVE_MENUBARS 1
9901 EOF
9902 }
9903
9904 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9905     Defining HAVE_SCROLLBARS
9906 EOF
9907 cat >> confdefs.h <<\EOF
9908 #define HAVE_SCROLLBARS 1
9909 EOF
9910 }
9911
9912 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9913     Defining HAVE_DIALOGS
9914 EOF
9915 cat >> confdefs.h <<\EOF
9916 #define HAVE_DIALOGS 1
9917 EOF
9918 }
9919
9920 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9921     Defining HAVE_TOOLBARS
9922 EOF
9923 cat >> confdefs.h <<\EOF
9924 #define HAVE_TOOLBARS 1
9925 EOF
9926 }
9927
9928 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9929     Defining HAVE_WIDGETS
9930 EOF
9931 cat >> confdefs.h <<\EOF
9932 #define HAVE_WIDGETS 1
9933 EOF
9934 }
9935
9936
9937 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9938     Defining LWLIB_MENUBARS_LUCID
9939 EOF
9940 cat >> confdefs.h <<\EOF
9941 #define LWLIB_MENUBARS_LUCID 1
9942 EOF
9943 }
9944
9945 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9946     Defining LWLIB_SCROLLBARS_LUCID
9947 EOF
9948 cat >> confdefs.h <<\EOF
9949 #define LWLIB_SCROLLBARS_LUCID 1
9950 EOF
9951 }
9952
9953
9954 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9955     Defining LWLIB_MENUBARS_MOTIF
9956 EOF
9957 cat >> confdefs.h <<\EOF
9958 #define LWLIB_MENUBARS_MOTIF 1
9959 EOF
9960 }
9961
9962 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9963     Defining LWLIB_SCROLLBARS_MOTIF
9964 EOF
9965 cat >> confdefs.h <<\EOF
9966 #define LWLIB_SCROLLBARS_MOTIF 1
9967 EOF
9968 }
9969
9970 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9971     Defining LWLIB_DIALOGS_MOTIF
9972 EOF
9973 cat >> confdefs.h <<\EOF
9974 #define LWLIB_DIALOGS_MOTIF 1
9975 EOF
9976 }
9977
9978 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9979     Defining LWLIB_WIDGETS_MOTIF
9980 EOF
9981 cat >> confdefs.h <<\EOF
9982 #define LWLIB_WIDGETS_MOTIF 1
9983 EOF
9984 }
9985
9986
9987 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9988    echo "    xemacs will be linked with \"menubar.o\""
9989  fi
9990 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9991    echo "    xemacs will be linked with \"scrollbar.o\""
9992  fi
9993 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9994    echo "    xemacs will be linked with \"dialog.o\""
9995  fi
9996 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9997    echo "    xemacs will be linked with \"toolbar.o\""
9998  fi
9999
10000 if test "$with_gtk" = "yes"; then
10001   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10002    echo "    xemacs will be linked with \"menubar-gtk.o\""
10003  fi
10004   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10005    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10006  fi
10007   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10008    echo "    xemacs will be linked with \"dialog-gtk.o\""
10009  fi
10010   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10011    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10012  fi
10013   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10014    echo "    xemacs will be linked with \"gui-gtk.o\""
10015  fi
10016 fi
10017
10018 if test "$with_x11" = "yes"; then
10019   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10020    echo "    xemacs will be linked with \"menubar-x.o\""
10021  fi
10022   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10023    echo "    xemacs will be linked with \"scrollbar-x.o\""
10024  fi
10025   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10026    echo "    xemacs will be linked with \"dialog-x.o\""
10027  fi
10028   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10029    echo "    xemacs will be linked with \"toolbar-x.o\""
10030  fi
10031   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10032    echo "    xemacs will be linked with \"gui-x.o\""
10033  fi
10034 fi
10035
10036
10037 test -z "$with_mule" && with_mule=no
10038 test -z "$with_file_coding" && with_file_coding=no
10039
10040
10041 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10042   { test "$extra_verbose" = "yes" && cat << \EOF
10043     Defining FILE_CODING
10044 EOF
10045 cat >> confdefs.h <<\EOF
10046 #define FILE_CODING 1
10047 EOF
10048 }
10049
10050   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10051    echo "    xemacs will be linked with \"file-coding.o\""
10052  fi
10053 fi
10054
10055 test -z "$with_chise" && with_chise=yes
10056 if test "$with_chise" = "yes"; then
10057     with_mule=yes
10058     with_utf_2000=yes
10059     with_text_coding=yes
10060 fi
10061
10062 if test "$with_mule" = "yes" ; then
10063   echo "checking for Mule-related features" 1>&6
10064 echo "configure:10065: checking for Mule-related features" >&5
10065   { test "$extra_verbose" = "yes" && cat << \EOF
10066     Defining MULE
10067 EOF
10068 cat >> confdefs.h <<\EOF
10069 #define MULE 1
10070 EOF
10071 }
10072
10073
10074     chise_includes_found=no
10075   if test "$with_chise" != "no"; then
10076     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10077 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10078 echo "configure:10079: checking for chise.h" >&5
10079
10080 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 #include <chise.h>
10084 EOF
10085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10086 { (eval echo configure:10087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10088 if test -z "$ac_err"; then
10089   rm -rf conftest*
10090   eval "ac_cv_header_$ac_safe=yes"
10091 else
10092   echo "$ac_err" >&5
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   eval "ac_cv_header_$ac_safe=no"
10097 fi
10098 rm -f conftest*
10099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10100   echo "$ac_t""yes" 1>&6
10101   :
10102 else
10103   echo "$ac_t""no" 1>&6
10104 with_chise=no
10105 fi
10106
10107   fi
10108   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10109       -d "/usr/local/chise/include"; then
10110     save_c_switch_site="$c_switch_site"
10111     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10112     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10113 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10114 echo "configure:10115: checking for chise.h" >&5
10115
10116 cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 #include <chise.h>
10120 EOF
10121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10122 { (eval echo configure:10123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10124 if test -z "$ac_err"; then
10125   rm -rf conftest*
10126   eval "ac_cv_header_$ac_safe=yes"
10127 else
10128   echo "$ac_err" >&5
10129   echo "configure: failed program was:" >&5
10130   cat conftest.$ac_ext >&5
10131   rm -rf conftest*
10132   eval "ac_cv_header_$ac_safe=no"
10133 fi
10134 rm -f conftest*
10135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137   chise_includes_found=yes
10138 else
10139   echo "$ac_t""no" 1>&6
10140 fi
10141
10142     if test "$chise_includes_found" != "yes"; then
10143       c_switch_site="$save_c_switch_site"
10144       with_chise="no"
10145     fi
10146   fi
10147
10148   test -z "$with_chise" && with_chise=yes
10149   if test "$with_chise" = "yes"; then
10150     { test "$extra_verbose" = "yes" && cat << \EOF
10151     Defining HAVE_CHISE
10152 EOF
10153 cat >> confdefs.h <<\EOF
10154 #define HAVE_CHISE 1
10155 EOF
10156 }
10157
10158     { test "$extra_verbose" = "yes" && cat << \EOF
10159     Defining HAVE_LIBCHISE
10160 EOF
10161 cat >> confdefs.h <<\EOF
10162 #define HAVE_LIBCHISE 1
10163 EOF
10164 }
10165
10166     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10167   fi
10168
10169   { test "$extra_verbose" = "yes" && cat << \EOF
10170     Defining FILE_CODING
10171 EOF
10172 cat >> confdefs.h <<\EOF
10173 #define FILE_CODING 1
10174 EOF
10175 }
10176
10177   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10178    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10179  fi
10180   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10181     { test "$extra_verbose" = "yes" && cat << \EOF
10182     Defining TEXT_CODING
10183 EOF
10184 cat >> confdefs.h <<\EOF
10185 #define TEXT_CODING 1
10186 EOF
10187 }
10188
10189     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10190    echo "    xemacs will be linked with \"text-coding.o\""
10191  fi
10192   else
10193     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10194    echo "    xemacs will be linked with \"file-coding.o\""
10195  fi
10196   fi
10197     for ac_hdr in libintl.h
10198 do
10199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10201 echo "configure:10202: checking for $ac_hdr" >&5
10202
10203 cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206 #include <$ac_hdr>
10207 EOF
10208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10209 { (eval echo configure:10210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10211 if test -z "$ac_err"; then
10212   rm -rf conftest*
10213   eval "ac_cv_header_$ac_safe=yes"
10214 else
10215   echo "$ac_err" >&5
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   eval "ac_cv_header_$ac_safe=no"
10220 fi
10221 rm -f conftest*
10222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10223   echo "$ac_t""yes" 1>&6
10224     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10225   { test "$extra_verbose" = "yes" && cat << EOF
10226     Defining $ac_tr_hdr
10227 EOF
10228 cat >> confdefs.h <<EOF
10229 #define $ac_tr_hdr 1
10230 EOF
10231 }
10232  
10233 else
10234   echo "$ac_t""no" 1>&6
10235 fi
10236 done
10237
10238   
10239 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10240 echo "configure:10241: checking for strerror in -lintl" >&5
10241 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10242
10243 xe_check_libs=" -lintl "
10244 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247 /* Override any gcc2 internal prototype to avoid an error.  */
10248 /* We use char because int might match the return type of a gcc2
10249     builtin and then its argument prototype would still apply.  */
10250 char strerror();
10251
10252 int main() {
10253 strerror()
10254 ; return 0; }
10255 EOF
10256 if { (eval echo configure:10257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10257   rm -rf conftest*
10258   eval "ac_cv_lib_$ac_lib_var=yes"
10259 else
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -rf conftest*
10263   eval "ac_cv_lib_$ac_lib_var=no"
10264 fi
10265 rm -f conftest*
10266 xe_check_libs=""
10267
10268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10269   echo "$ac_t""yes" 1>&6
10270     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10272   { test "$extra_verbose" = "yes" && cat << EOF
10273     Defining $ac_tr_lib
10274 EOF
10275 cat >> confdefs.h <<EOF
10276 #define $ac_tr_lib 1
10277 EOF
10278 }
10279
10280   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10281
10282 else
10283   echo "$ac_t""no" 1>&6
10284 fi
10285
10286
10287
10288   if test "$with_utf_2000" = "yes" ; then
10289     { test "$extra_verbose" = "yes" && cat << \EOF
10290     Defining CHAR_IS_UCS4
10291 EOF
10292 cat >> confdefs.h <<\EOF
10293 #define CHAR_IS_UCS4 1
10294 EOF
10295 }
10296
10297     { test "$extra_verbose" = "yes" && cat << \EOF
10298     Defining UTF2000
10299 EOF
10300 cat >> confdefs.h <<\EOF
10301 #define UTF2000 1
10302 EOF
10303 }
10304
10305     with_wnn=no
10306     with_wnn6=no
10307   fi
10308
10309   echo "checking for Mule input methods" 1>&6
10310 echo "configure:10311: checking for Mule input methods" >&5
10311         case "$with_xim" in "" | "yes" )
10312     echo "checking for XIM" 1>&6
10313 echo "configure:10314: checking for XIM" >&5
10314     
10315 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10316 echo "configure:10317: checking for XOpenIM in -lX11" >&5
10317 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10318
10319 xe_check_libs=" -lX11 "
10320 cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 /* Override any gcc2 internal prototype to avoid an error.  */
10324 /* We use char because int might match the return type of a gcc2
10325     builtin and then its argument prototype would still apply.  */
10326 char XOpenIM();
10327
10328 int main() {
10329 XOpenIM()
10330 ; return 0; }
10331 EOF
10332 if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10333   rm -rf conftest*
10334   eval "ac_cv_lib_$ac_lib_var=yes"
10335 else
10336   echo "configure: failed program was:" >&5
10337   cat conftest.$ac_ext >&5
10338   rm -rf conftest*
10339   eval "ac_cv_lib_$ac_lib_var=no"
10340 fi
10341 rm -f conftest*
10342 xe_check_libs=""
10343
10344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10345   echo "$ac_t""yes" 1>&6
10346   with_xim=xlib
10347 else
10348   echo "$ac_t""no" 1>&6
10349 with_xim=no
10350 fi
10351
10352
10353             if test "$need_motif $have_lesstif" = "yes no"; then
10354       
10355 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10356 echo "configure:10357: checking for XmImMbLookupString in -lXm" >&5
10357 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10358
10359 xe_check_libs=" -lXm "
10360 cat > conftest.$ac_ext <<EOF
10361 #line 10362 "configure"
10362 #include "confdefs.h"
10363 /* Override any gcc2 internal prototype to avoid an error.  */
10364 /* We use char because int might match the return type of a gcc2
10365     builtin and then its argument prototype would still apply.  */
10366 char XmImMbLookupString();
10367
10368 int main() {
10369 XmImMbLookupString()
10370 ; return 0; }
10371 EOF
10372 if { (eval echo configure:10373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10373   rm -rf conftest*
10374   eval "ac_cv_lib_$ac_lib_var=yes"
10375 else
10376   echo "configure: failed program was:" >&5
10377   cat conftest.$ac_ext >&5
10378   rm -rf conftest*
10379   eval "ac_cv_lib_$ac_lib_var=no"
10380 fi
10381 rm -f conftest*
10382 xe_check_libs=""
10383
10384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10385   echo "$ac_t""yes" 1>&6
10386   with_xim=motif
10387 else
10388   echo "$ac_t""no" 1>&6
10389 fi
10390
10391
10392     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10393       
10394 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10395 echo "configure:10396: checking for XmImMbLookupString in -lXm" >&5
10396 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10397
10398 xe_check_libs=" -lXm "
10399 cat > conftest.$ac_ext <<EOF
10400 #line 10401 "configure"
10401 #include "confdefs.h"
10402 /* Override any gcc2 internal prototype to avoid an error.  */
10403 /* We use char because int might match the return type of a gcc2
10404     builtin and then its argument prototype would still apply.  */
10405 char XmImMbLookupString();
10406
10407 int main() {
10408 XmImMbLookupString()
10409 ; return 0; }
10410 EOF
10411 if { (eval echo configure:10412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10412   rm -rf conftest*
10413   eval "ac_cv_lib_$ac_lib_var=yes"
10414 else
10415   echo "configure: failed program was:" >&5
10416   cat conftest.$ac_ext >&5
10417   rm -rf conftest*
10418   eval "ac_cv_lib_$ac_lib_var=no"
10419 fi
10420 rm -f conftest*
10421 xe_check_libs=""
10422
10423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10424   echo "$ac_t""yes" 1>&6
10425   with_xim=motif
10426 else
10427   echo "$ac_t""no" 1>&6
10428 fi
10429
10430
10431     fi ;;
10432   esac
10433   if test "$with_xim" != "no"; then
10434     { test "$extra_verbose" = "yes" && cat << \EOF
10435     Defining HAVE_XIM
10436 EOF
10437 cat >> confdefs.h <<\EOF
10438 #define HAVE_XIM 1
10439 EOF
10440 }
10441
10442     if test "$with_xim" = "xlib"; then
10443       { test "$extra_verbose" = "yes" && cat << \EOF
10444     Defining XIM_XLIB
10445 EOF
10446 cat >> confdefs.h <<\EOF
10447 #define XIM_XLIB 1
10448 EOF
10449 }
10450
10451       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10452    echo "    xemacs will be linked with \"input-method-xlib.o\""
10453  fi
10454     fi
10455     if test "$with_xim" = "motif"; then
10456       { test "$extra_verbose" = "yes" && cat << \EOF
10457     Defining XIM_MOTIF
10458 EOF
10459 cat >> confdefs.h <<\EOF
10460 #define XIM_MOTIF 1
10461 EOF
10462 }
10463
10464       need_motif=yes
10465       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10466    echo "    xemacs will be linked with \"input-method-motif.o\""
10467  fi
10468     fi
10469     if test "$with_xim" = "motif"; then
10470       with_xfs=no
10471     fi
10472   fi
10473
10474     if test "$with_xfs" = "yes" ; then
10475     echo "checking for XFontSet" 1>&6
10476 echo "configure:10477: checking for XFontSet" >&5
10477     
10478 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10479 echo "configure:10480: checking for XmbDrawString in -lX11" >&5
10480 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10481
10482 xe_check_libs=" -lX11 "
10483 cat > conftest.$ac_ext <<EOF
10484 #line 10485 "configure"
10485 #include "confdefs.h"
10486 /* Override any gcc2 internal prototype to avoid an error.  */
10487 /* We use char because int might match the return type of a gcc2
10488     builtin and then its argument prototype would still apply.  */
10489 char XmbDrawString();
10490
10491 int main() {
10492 XmbDrawString()
10493 ; return 0; }
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10496   rm -rf conftest*
10497   eval "ac_cv_lib_$ac_lib_var=yes"
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_lib_$ac_lib_var=no"
10503 fi
10504 rm -f conftest*
10505 xe_check_libs=""
10506
10507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10508   echo "$ac_t""yes" 1>&6
10509   :
10510 else
10511   echo "$ac_t""no" 1>&6
10512 with_xfs=no
10513 fi
10514
10515
10516     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10517       { test "$extra_verbose" = "yes" && cat << \EOF
10518     Defining USE_XFONTSET
10519 EOF
10520 cat >> confdefs.h <<\EOF
10521 #define USE_XFONTSET 1
10522 EOF
10523 }
10524
10525       if test "$with_xim" = "no" ; then
10526         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10527    echo "    xemacs will be linked with \"input-method-xlib.o\""
10528  fi
10529       fi
10530     fi
10531   fi 
10532     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10533   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10534 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10535 echo "configure:10536: checking for wnn/jllib.h" >&5
10536
10537 cat > conftest.$ac_ext <<EOF
10538 #line 10539 "configure"
10539 #include "confdefs.h"
10540 #include <wnn/jllib.h>
10541 EOF
10542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10543 { (eval echo configure:10544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10545 if test -z "$ac_err"; then
10546   rm -rf conftest*
10547   eval "ac_cv_header_$ac_safe=yes"
10548 else
10549   echo "$ac_err" >&5
10550   echo "configure: failed program was:" >&5
10551   cat conftest.$ac_ext >&5
10552   rm -rf conftest*
10553   eval "ac_cv_header_$ac_safe=no"
10554 fi
10555 rm -f conftest*
10556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558   :
10559 else
10560   echo "$ac_t""no" 1>&6
10561 with_wnn=no
10562 fi
10563  }
10564     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10565 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10566 echo "configure:10567: checking for wnn/commonhd.h" >&5
10567
10568 cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571 #include <wnn/commonhd.h>
10572 EOF
10573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10574 { (eval echo configure:10575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10576 if test -z "$ac_err"; then
10577   rm -rf conftest*
10578   eval "ac_cv_header_$ac_safe=yes"
10579 else
10580   echo "$ac_err" >&5
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_header_$ac_safe=no"
10585 fi
10586 rm -f conftest*
10587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589   :
10590 else
10591   echo "$ac_t""no" 1>&6
10592 with_wnn=no
10593 fi
10594  }
10595     if test "$with_wnn" != "no"; then
10596     for ac_func in crypt
10597 do
10598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10599 echo "configure:10600: checking for $ac_func" >&5
10600
10601 cat > conftest.$ac_ext <<EOF
10602 #line 10603 "configure"
10603 #include "confdefs.h"
10604 /* System header to define __stub macros and hopefully few prototypes,
10605     which can conflict with char $ac_func(); below.  */
10606 #include <assert.h>
10607 /* Override any gcc2 internal prototype to avoid an error.  */
10608 /* We use char because int might match the return type of a gcc2
10609     builtin and then its argument prototype would still apply.  */
10610 char $ac_func();
10611
10612 int main() {
10613
10614 /* The GNU C library defines this for functions which it implements
10615     to always fail with ENOSYS.  Some functions are actually named
10616     something starting with __ and the normal name is an alias.  */
10617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10618 choke me
10619 #else
10620 $ac_func();
10621 #endif
10622
10623 ; return 0; }
10624 EOF
10625 if { (eval echo configure:10626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10626   rm -rf conftest*
10627   eval "ac_cv_func_$ac_func=yes"
10628 else
10629   echo "configure: failed program was:" >&5
10630   cat conftest.$ac_ext >&5
10631   rm -rf conftest*
10632   eval "ac_cv_func_$ac_func=no"
10633 fi
10634 rm -f conftest*
10635
10636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10637   echo "$ac_t""yes" 1>&6
10638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10639   { test "$extra_verbose" = "yes" && cat << EOF
10640     Defining $ac_tr_func
10641 EOF
10642 cat >> confdefs.h <<EOF
10643 #define $ac_tr_func 1
10644 EOF
10645 }
10646  
10647 else
10648   echo "$ac_t""no" 1>&6
10649 fi
10650 done
10651
10652     test "$ac_cv_func_crypt" != "yes" && { 
10653 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10654 echo "configure:10655: checking for crypt in -lcrypt" >&5
10655 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10656
10657 xe_check_libs=" -lcrypt "
10658 cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661 /* Override any gcc2 internal prototype to avoid an error.  */
10662 /* We use char because int might match the return type of a gcc2
10663     builtin and then its argument prototype would still apply.  */
10664 char crypt();
10665
10666 int main() {
10667 crypt()
10668 ; return 0; }
10669 EOF
10670 if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10671   rm -rf conftest*
10672   eval "ac_cv_lib_$ac_lib_var=yes"
10673 else
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -rf conftest*
10677   eval "ac_cv_lib_$ac_lib_var=no"
10678 fi
10679 rm -f conftest*
10680 xe_check_libs=""
10681
10682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10683   echo "$ac_t""yes" 1>&6
10684     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10685     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10686   { test "$extra_verbose" = "yes" && cat << EOF
10687     Defining $ac_tr_lib
10688 EOF
10689 cat >> confdefs.h <<EOF
10690 #define $ac_tr_lib 1
10691 EOF
10692 }
10693
10694   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10695
10696 else
10697   echo "$ac_t""no" 1>&6
10698 fi
10699
10700  }
10701   fi
10702     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10703     
10704 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10705 echo "configure:10706: checking for jl_dic_list_e in -lwnn" >&5
10706 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10707
10708 xe_check_libs=" -lwnn "
10709 cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712 /* Override any gcc2 internal prototype to avoid an error.  */
10713 /* We use char because int might match the return type of a gcc2
10714     builtin and then its argument prototype would still apply.  */
10715 char jl_dic_list_e();
10716
10717 int main() {
10718 jl_dic_list_e()
10719 ; return 0; }
10720 EOF
10721 if { (eval echo configure:10722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10722   rm -rf conftest*
10723   eval "ac_cv_lib_$ac_lib_var=yes"
10724 else
10725   echo "configure: failed program was:" >&5
10726   cat conftest.$ac_ext >&5
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=no"
10729 fi
10730 rm -f conftest*
10731 xe_check_libs=""
10732
10733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10734   echo "$ac_t""yes" 1>&6
10735   libwnn=wnn
10736 else
10737   echo "$ac_t""no" 1>&6
10738 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10739 echo "configure:10740: checking for jl_dic_list_e in -lwnn4" >&5
10740 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10741
10742 xe_check_libs=" -lwnn4 "
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 /* Override any gcc2 internal prototype to avoid an error.  */
10747 /* We use char because int might match the return type of a gcc2
10748     builtin and then its argument prototype would still apply.  */
10749 char jl_dic_list_e();
10750
10751 int main() {
10752 jl_dic_list_e()
10753 ; return 0; }
10754 EOF
10755 if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10756   rm -rf conftest*
10757   eval "ac_cv_lib_$ac_lib_var=yes"
10758 else
10759   echo "configure: failed program was:" >&5
10760   cat conftest.$ac_ext >&5
10761   rm -rf conftest*
10762   eval "ac_cv_lib_$ac_lib_var=no"
10763 fi
10764 rm -f conftest*
10765 xe_check_libs=""
10766
10767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10768   echo "$ac_t""yes" 1>&6
10769   libwnn=wnn4
10770 else
10771   echo "$ac_t""no" 1>&6
10772 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10773 echo "configure:10774: checking for jl_dic_list_e in -lwnn6" >&5
10774 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10775
10776 xe_check_libs=" -lwnn6 "
10777 cat > conftest.$ac_ext <<EOF
10778 #line 10779 "configure"
10779 #include "confdefs.h"
10780 /* Override any gcc2 internal prototype to avoid an error.  */
10781 /* We use char because int might match the return type of a gcc2
10782     builtin and then its argument prototype would still apply.  */
10783 char jl_dic_list_e();
10784
10785 int main() {
10786 jl_dic_list_e()
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10790   rm -rf conftest*
10791   eval "ac_cv_lib_$ac_lib_var=yes"
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   eval "ac_cv_lib_$ac_lib_var=no"
10797 fi
10798 rm -f conftest*
10799 xe_check_libs=""
10800
10801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10802   echo "$ac_t""yes" 1>&6
10803   libwnn=wnn6
10804 else
10805   echo "$ac_t""no" 1>&6
10806 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10807 echo "configure:10808: checking for dic_list_e in -lwnn6_fromsrc" >&5
10808 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10809
10810 xe_check_libs=" -lwnn6_fromsrc "
10811 cat > conftest.$ac_ext <<EOF
10812 #line 10813 "configure"
10813 #include "confdefs.h"
10814 /* Override any gcc2 internal prototype to avoid an error.  */
10815 /* We use char because int might match the return type of a gcc2
10816     builtin and then its argument prototype would still apply.  */
10817 char dic_list_e();
10818
10819 int main() {
10820 dic_list_e()
10821 ; return 0; }
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=yes"
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -rf conftest*
10830   eval "ac_cv_lib_$ac_lib_var=no"
10831 fi
10832 rm -f conftest*
10833 xe_check_libs=""
10834
10835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10836   echo "$ac_t""yes" 1>&6
10837   libwnn=wnn6_fromsrc
10838 else
10839   echo "$ac_t""no" 1>&6
10840 with_wnn=no
10841 fi
10842
10843
10844 fi
10845
10846
10847 fi
10848
10849
10850 fi
10851
10852
10853   fi
10854   test -z "$with_wnn" && with_wnn=yes
10855   if test "$with_wnn" = "yes"; then
10856     { test "$extra_verbose" = "yes" && cat << \EOF
10857     Defining HAVE_WNN
10858 EOF
10859 cat >> confdefs.h <<\EOF
10860 #define HAVE_WNN 1
10861 EOF
10862 }
10863
10864     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10865     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10866    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10867  fi
10868     if test "$with_wnn6" != "no"; then
10869       
10870 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10871 echo "configure:10872: checking for jl_fi_dic_list in -l$libwnn" >&5
10872 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10873
10874 xe_check_libs=" -l$libwnn "
10875 cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 /* Override any gcc2 internal prototype to avoid an error.  */
10879 /* We use char because int might match the return type of a gcc2
10880     builtin and then its argument prototype would still apply.  */
10881 char jl_fi_dic_list();
10882
10883 int main() {
10884 jl_fi_dic_list()
10885 ; return 0; }
10886 EOF
10887 if { (eval echo configure:10888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10888   rm -rf conftest*
10889   eval "ac_cv_lib_$ac_lib_var=yes"
10890 else
10891   echo "configure: failed program was:" >&5
10892   cat conftest.$ac_ext >&5
10893   rm -rf conftest*
10894   eval "ac_cv_lib_$ac_lib_var=no"
10895 fi
10896 rm -f conftest*
10897 xe_check_libs=""
10898
10899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10900   echo "$ac_t""yes" 1>&6
10901   with_wnn6=yes
10902 else
10903   echo "$ac_t""no" 1>&6
10904 fi
10905
10906
10907       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10908     Defining WNN6
10909 EOF
10910 cat >> confdefs.h <<\EOF
10911 #define WNN6 1
10912 EOF
10913 }
10914
10915     fi
10916   fi
10917
10918     canna_includes_found=no
10919   if test "$with_canna" != "no"; then
10920     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10921 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10922 echo "configure:10923: checking for canna/jrkanji.h" >&5
10923
10924 cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 #include <canna/jrkanji.h>
10928 EOF
10929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10930 { (eval echo configure:10931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10932 if test -z "$ac_err"; then
10933   rm -rf conftest*
10934   eval "ac_cv_header_$ac_safe=yes"
10935 else
10936   echo "$ac_err" >&5
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -rf conftest*
10940   eval "ac_cv_header_$ac_safe=no"
10941 fi
10942 rm -f conftest*
10943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10944   echo "$ac_t""yes" 1>&6
10945   canna_includes_found=yes
10946 else
10947   echo "$ac_t""no" 1>&6
10948 fi
10949
10950   fi
10951   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10952       -d "/usr/local/canna/include"; then
10953     save_c_switch_site="$c_switch_site"
10954     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10955     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10956 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10957 echo "configure:10958: checking for canna/jrkanji.h" >&5
10958
10959 cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962 #include <canna/jrkanji.h>
10963 EOF
10964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10965 { (eval echo configure:10966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10967 if test -z "$ac_err"; then
10968   rm -rf conftest*
10969   eval "ac_cv_header_$ac_safe=yes"
10970 else
10971   echo "$ac_err" >&5
10972   echo "configure: failed program was:" >&5
10973   cat conftest.$ac_ext >&5
10974   rm -rf conftest*
10975   eval "ac_cv_header_$ac_safe=no"
10976 fi
10977 rm -f conftest*
10978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10979   echo "$ac_t""yes" 1>&6
10980   canna_includes_found=yes
10981 else
10982   echo "$ac_t""no" 1>&6
10983 fi
10984
10985     if test "$canna_includes_found" != "yes"; then
10986       c_switch_site="$save_c_switch_site"
10987       with_canna="no"
10988     fi
10989   fi
10990
10991   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10992 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10993 echo "configure:10994: checking for canna/RK.h" >&5
10994
10995 cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 #include <canna/RK.h>
10999 EOF
11000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11001 { (eval echo configure:11002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11003 if test -z "$ac_err"; then
11004   rm -rf conftest*
11005   eval "ac_cv_header_$ac_safe=yes"
11006 else
11007   echo "$ac_err" >&5
11008   echo "configure: failed program was:" >&5
11009   cat conftest.$ac_ext >&5
11010   rm -rf conftest*
11011   eval "ac_cv_header_$ac_safe=no"
11012 fi
11013 rm -f conftest*
11014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11015   echo "$ac_t""yes" 1>&6
11016   :
11017 else
11018   echo "$ac_t""no" 1>&6
11019 with_canna=no
11020 fi
11021  }
11022   test -z "$with_canna" && { 
11023 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
11024 echo "configure:11025: checking for RkBgnBun in -lRKC" >&5
11025 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
11026
11027 xe_check_libs=" -lRKC "
11028 cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 /* Override any gcc2 internal prototype to avoid an error.  */
11032 /* We use char because int might match the return type of a gcc2
11033     builtin and then its argument prototype would still apply.  */
11034 char RkBgnBun();
11035
11036 int main() {
11037 RkBgnBun()
11038 ; return 0; }
11039 EOF
11040 if { (eval echo configure:11041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11041   rm -rf conftest*
11042   eval "ac_cv_lib_$ac_lib_var=yes"
11043 else
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_lib_$ac_lib_var=no"
11048 fi
11049 rm -f conftest*
11050 xe_check_libs=""
11051
11052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11053   echo "$ac_t""yes" 1>&6
11054   :
11055 else
11056   echo "$ac_t""no" 1>&6
11057 with_canna=no
11058 fi
11059
11060  }
11061   test -z "$with_canna" && { 
11062 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
11063 echo "configure:11064: checking for jrKanjiControl in -lcanna" >&5
11064 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
11065
11066 xe_check_libs=" -lcanna "
11067 cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070 /* Override any gcc2 internal prototype to avoid an error.  */
11071 /* We use char because int might match the return type of a gcc2
11072     builtin and then its argument prototype would still apply.  */
11073 char jrKanjiControl();
11074
11075 int main() {
11076 jrKanjiControl()
11077 ; return 0; }
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11080   rm -rf conftest*
11081   eval "ac_cv_lib_$ac_lib_var=yes"
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=no"
11087 fi
11088 rm -f conftest*
11089 xe_check_libs=""
11090
11091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11092   echo "$ac_t""yes" 1>&6
11093   :
11094 else
11095   echo "$ac_t""no" 1>&6
11096 with_canna=no
11097 fi
11098
11099  }
11100   test -z "$with_canna" && with_canna=yes
11101   if test "$with_canna" = "yes"; then
11102     { test "$extra_verbose" = "yes" && cat << \EOF
11103     Defining HAVE_CANNA
11104 EOF
11105 cat >> confdefs.h <<\EOF
11106 #define HAVE_CANNA 1
11107 EOF
11108 }
11109
11110     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11111     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11112    echo "    xemacs will be linked with \"mule-canna.o\""
11113  fi
11114   fi
11115
11116 else   for feature in xim canna wnn; do
11117     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11118       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11119     fi
11120     eval "with_${feature}=no"
11121   done
11122 fi 
11123
11124 if test "$need_motif" = "yes" ; then
11125   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11126     
11127 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11128 echo "configure:11129: checking for layout_object_getvalue in -li18n" >&5
11129 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11130
11131 xe_check_libs=" -li18n "
11132 cat > conftest.$ac_ext <<EOF
11133 #line 11134 "configure"
11134 #include "confdefs.h"
11135 /* Override any gcc2 internal prototype to avoid an error.  */
11136 /* We use char because int might match the return type of a gcc2
11137     builtin and then its argument prototype would still apply.  */
11138 char layout_object_getvalue();
11139
11140 int main() {
11141 layout_object_getvalue()
11142 ; return 0; }
11143 EOF
11144 if { (eval echo configure:11145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11145   rm -rf conftest*
11146   eval "ac_cv_lib_$ac_lib_var=yes"
11147 else
11148   echo "configure: failed program was:" >&5
11149   cat conftest.$ac_ext >&5
11150   rm -rf conftest*
11151   eval "ac_cv_lib_$ac_lib_var=no"
11152 fi
11153 rm -f conftest*
11154 xe_check_libs=""
11155
11156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11157   echo "$ac_t""yes" 1>&6
11158   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11159 else
11160   echo "$ac_t""no" 1>&6
11161 fi
11162
11163
11164   
11165 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11166     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11167   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11168   
11169         runpath="" runpath_dirs=""
11170   if test -n "$LD_RUN_PATH"; then
11171     runpath="$LD_RUN_PATH"
11172   elif test "$GCC" = "yes"; then
11173         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11174     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11175     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11176     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11177       case "$arg" in P,* | -L* | -R* )
11178         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11179           {
11180 xe_runpath_dir="$dir"
11181   test "$xe_runpath_dir" != "/lib"     -a \
11182         "$xe_runpath_dir" != "/usr/lib" -a \
11183         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11184   eval "$xe_add_unique_runpath_dir"
11185 }
11186         done ;;
11187       esac
11188     done
11189     ld_switch_run="$ld_switch_run_save"
11190     rm -f conftest*
11191   else
11192         for arg in $ld_switch_site $ld_switch_x_site; do
11193       case "$arg" in -L*) {
11194 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11195   test "$xe_runpath_dir" != "/lib"     -a \
11196         "$xe_runpath_dir" != "/usr/lib" -a \
11197         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11198   eval "$xe_add_unique_runpath_dir"
11199 };; esac
11200     done
11201             if test "$opsys $need_motif" = "sol2 yes"; then
11202       xe_runpath_dir="/opt/SUNWdt/lib";
11203       eval "$xe_add_unique_runpath_dir";
11204     fi
11205   fi 
11206   if test -n "$runpath"; then
11207     ld_switch_run="${dash_r}${runpath}"
11208     
11209 if test "$GCC" = "yes"; then
11210   set x $ld_switch_run; shift; ld_switch_run=""
11211   while test -n "$1"; do
11212     case $1 in
11213       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11214       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11215       -Xlinker* ) ;;
11216       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11217     esac
11218     shift
11219   done
11220 fi
11221     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11222   fi
11223 fi
11224
11225 fi
11226
11227
11228 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
11229 do
11230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11231 echo "configure:11232: checking for $ac_func" >&5
11232
11233 cat > conftest.$ac_ext <<EOF
11234 #line 11235 "configure"
11235 #include "confdefs.h"
11236 /* System header to define __stub macros and hopefully few prototypes,
11237     which can conflict with char $ac_func(); below.  */
11238 #include <assert.h>
11239 /* Override any gcc2 internal prototype to avoid an error.  */
11240 /* We use char because int might match the return type of a gcc2
11241     builtin and then its argument prototype would still apply.  */
11242 char $ac_func();
11243
11244 int main() {
11245
11246 /* The GNU C library defines this for functions which it implements
11247     to always fail with ENOSYS.  Some functions are actually named
11248     something starting with __ and the normal name is an alias.  */
11249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11250 choke me
11251 #else
11252 $ac_func();
11253 #endif
11254
11255 ; return 0; }
11256 EOF
11257 if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11258   rm -rf conftest*
11259   eval "ac_cv_func_$ac_func=yes"
11260 else
11261   echo "configure: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   rm -rf conftest*
11264   eval "ac_cv_func_$ac_func=no"
11265 fi
11266 rm -f conftest*
11267
11268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11269   echo "$ac_t""yes" 1>&6
11270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11271   { test "$extra_verbose" = "yes" && cat << EOF
11272     Defining $ac_tr_func
11273 EOF
11274 cat >> confdefs.h <<EOF
11275 #define $ac_tr_func 1
11276 EOF
11277 }
11278  
11279 else
11280   echo "$ac_t""no" 1>&6
11281 fi
11282 done
11283
11284
11285 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11286   case "$opsys" in
11287     hpux11* )
11288       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11289       ac_cv_func_getaddrinfo=no
11290       ;;
11291   esac
11292 fi
11293
11294
11295 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11296 do
11297 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11298 echo "configure:11299: checking for $ac_func" >&5
11299
11300 cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 /* System header to define __stub macros and hopefully few prototypes,
11304     which can conflict with char $ac_func(); below.  */
11305 #include <assert.h>
11306 /* Override any gcc2 internal prototype to avoid an error.  */
11307 /* We use char because int might match the return type of a gcc2
11308     builtin and then its argument prototype would still apply.  */
11309 char $ac_func();
11310
11311 int main() {
11312
11313 /* The GNU C library defines this for functions which it implements
11314     to always fail with ENOSYS.  Some functions are actually named
11315     something starting with __ and the normal name is an alias.  */
11316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11317 choke me
11318 #else
11319 $ac_func();
11320 #endif
11321
11322 ; return 0; }
11323 EOF
11324 if { (eval echo configure:11325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11325   rm -rf conftest*
11326   eval "ac_cv_func_$ac_func=yes"
11327 else
11328   echo "configure: failed program was:" >&5
11329   cat conftest.$ac_ext >&5
11330   rm -rf conftest*
11331   eval "ac_cv_func_$ac_func=no"
11332 fi
11333 rm -f conftest*
11334
11335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11336   echo "$ac_t""yes" 1>&6
11337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11338   { test "$extra_verbose" = "yes" && cat << EOF
11339     Defining $ac_tr_func
11340 EOF
11341 cat >> confdefs.h <<EOF
11342 #define $ac_tr_func 1
11343 EOF
11344 }
11345  
11346 else
11347   echo "$ac_t""no" 1>&6
11348 fi
11349 done
11350
11351
11352 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11353 echo "configure:11354: checking for openpty" >&5
11354
11355 cat > conftest.$ac_ext <<EOF
11356 #line 11357 "configure"
11357 #include "confdefs.h"
11358 /* System header to define __stub macros and hopefully few prototypes,
11359     which can conflict with char openpty(); below.  */
11360 #include <assert.h>
11361 /* Override any gcc2 internal prototype to avoid an error.  */
11362 /* We use char because int might match the return type of a gcc2
11363     builtin and then its argument prototype would still apply.  */
11364 char openpty();
11365
11366 int main() {
11367
11368 /* The GNU C library defines this for functions which it implements
11369     to always fail with ENOSYS.  Some functions are actually named
11370     something starting with __ and the normal name is an alias.  */
11371 #if defined (__stub_openpty) || defined (__stub___openpty)
11372 choke me
11373 #else
11374 openpty();
11375 #endif
11376
11377 ; return 0; }
11378 EOF
11379 if { (eval echo configure:11380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11380   rm -rf conftest*
11381   eval "ac_cv_func_openpty=yes"
11382 else
11383   echo "configure: failed program was:" >&5
11384   cat conftest.$ac_ext >&5
11385   rm -rf conftest*
11386   eval "ac_cv_func_openpty=no"
11387 fi
11388 rm -f conftest*
11389
11390 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11391   echo "$ac_t""yes" 1>&6
11392   have_openpty=yes
11393 else
11394   echo "$ac_t""no" 1>&6
11395
11396   
11397 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11398 echo "configure:11399: checking for openpty in -lutil" >&5
11399 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11400
11401 xe_check_libs=" -lutil "
11402 cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 /* Override any gcc2 internal prototype to avoid an error.  */
11406 /* We use char because int might match the return type of a gcc2
11407     builtin and then its argument prototype would still apply.  */
11408 char openpty();
11409
11410 int main() {
11411 openpty()
11412 ; return 0; }
11413 EOF
11414 if { (eval echo configure:11415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11415   rm -rf conftest*
11416   eval "ac_cv_lib_$ac_lib_var=yes"
11417 else
11418   echo "configure: failed program was:" >&5
11419   cat conftest.$ac_ext >&5
11420   rm -rf conftest*
11421   eval "ac_cv_lib_$ac_lib_var=no"
11422 fi
11423 rm -f conftest*
11424 xe_check_libs=""
11425
11426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11427   echo "$ac_t""yes" 1>&6
11428   have_openpty=yes need_libutil=yes
11429 else
11430   echo "$ac_t""no" 1>&6
11431 fi
11432
11433
11434 fi
11435
11436 if test "$have_openpty" = "yes"; then
11437   { test "$extra_verbose" = "yes" && cat << \EOF
11438     Defining HAVE_OPENPTY
11439 EOF
11440 cat >> confdefs.h <<\EOF
11441 #define HAVE_OPENPTY 1
11442 EOF
11443 }
11444
11445   for ac_hdr in pty.h libutil.h util.h
11446 do
11447 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11448 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11449 echo "configure:11450: checking for $ac_hdr" >&5
11450
11451 cat > conftest.$ac_ext <<EOF
11452 #line 11453 "configure"
11453 #include "confdefs.h"
11454 #include <$ac_hdr>
11455 EOF
11456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11457 { (eval echo configure:11458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11459 if test -z "$ac_err"; then
11460   rm -rf conftest*
11461   eval "ac_cv_header_$ac_safe=yes"
11462 else
11463   echo "$ac_err" >&5
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   eval "ac_cv_header_$ac_safe=no"
11468 fi
11469 rm -f conftest*
11470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11471   echo "$ac_t""yes" 1>&6
11472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11473   { test "$extra_verbose" = "yes" && cat << EOF
11474     Defining $ac_tr_hdr
11475 EOF
11476 cat >> confdefs.h <<EOF
11477 #define $ac_tr_hdr 1
11478 EOF
11479 }
11480  break
11481 else
11482   echo "$ac_t""no" 1>&6
11483 fi
11484 done
11485
11486   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11487 fi
11488
11489 for ac_hdr in stropts.h
11490 do
11491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11493 echo "configure:11494: checking for $ac_hdr" >&5
11494
11495 cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 #include <$ac_hdr>
11499 EOF
11500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11501 { (eval echo configure:11502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11503 if test -z "$ac_err"; then
11504   rm -rf conftest*
11505   eval "ac_cv_header_$ac_safe=yes"
11506 else
11507   echo "$ac_err" >&5
11508   echo "configure: failed program was:" >&5
11509   cat conftest.$ac_ext >&5
11510   rm -rf conftest*
11511   eval "ac_cv_header_$ac_safe=no"
11512 fi
11513 rm -f conftest*
11514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11515   echo "$ac_t""yes" 1>&6
11516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11517   { test "$extra_verbose" = "yes" && cat << EOF
11518     Defining $ac_tr_hdr
11519 EOF
11520 cat >> confdefs.h <<EOF
11521 #define $ac_tr_hdr 1
11522 EOF
11523 }
11524  
11525 else
11526   echo "$ac_t""no" 1>&6
11527 fi
11528 done
11529
11530 if test "$ac_cv_header_stropts_h" = "yes"; then
11531   for ac_func in isastream
11532 do
11533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11534 echo "configure:11535: checking for $ac_func" >&5
11535
11536 cat > conftest.$ac_ext <<EOF
11537 #line 11538 "configure"
11538 #include "confdefs.h"
11539 /* System header to define __stub macros and hopefully few prototypes,
11540     which can conflict with char $ac_func(); below.  */
11541 #include <assert.h>
11542 /* Override any gcc2 internal prototype to avoid an error.  */
11543 /* We use char because int might match the return type of a gcc2
11544     builtin and then its argument prototype would still apply.  */
11545 char $ac_func();
11546
11547 int main() {
11548
11549 /* The GNU C library defines this for functions which it implements
11550     to always fail with ENOSYS.  Some functions are actually named
11551     something starting with __ and the normal name is an alias.  */
11552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11553 choke me
11554 #else
11555 $ac_func();
11556 #endif
11557
11558 ; return 0; }
11559 EOF
11560 if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561   rm -rf conftest*
11562   eval "ac_cv_func_$ac_func=yes"
11563 else
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -rf conftest*
11567   eval "ac_cv_func_$ac_func=no"
11568 fi
11569 rm -f conftest*
11570
11571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11572   echo "$ac_t""yes" 1>&6
11573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11574   { test "$extra_verbose" = "yes" && cat << EOF
11575     Defining $ac_tr_func
11576 EOF
11577 cat >> confdefs.h <<EOF
11578 #define $ac_tr_func 1
11579 EOF
11580 }
11581  
11582 else
11583   echo "$ac_t""no" 1>&6
11584 fi
11585 done
11586
11587   for ac_hdr in strtio.h
11588 do
11589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11591 echo "configure:11592: checking for $ac_hdr" >&5
11592
11593 cat > conftest.$ac_ext <<EOF
11594 #line 11595 "configure"
11595 #include "confdefs.h"
11596 #include <$ac_hdr>
11597 EOF
11598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11599 { (eval echo configure:11600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11601 if test -z "$ac_err"; then
11602   rm -rf conftest*
11603   eval "ac_cv_header_$ac_safe=yes"
11604 else
11605   echo "$ac_err" >&5
11606   echo "configure: failed program was:" >&5
11607   cat conftest.$ac_ext >&5
11608   rm -rf conftest*
11609   eval "ac_cv_header_$ac_safe=no"
11610 fi
11611 rm -f conftest*
11612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11613   echo "$ac_t""yes" 1>&6
11614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11615   { test "$extra_verbose" = "yes" && cat << EOF
11616     Defining $ac_tr_hdr
11617 EOF
11618 cat >> confdefs.h <<EOF
11619 #define $ac_tr_hdr 1
11620 EOF
11621 }
11622  
11623 else
11624   echo "$ac_t""no" 1>&6
11625 fi
11626 done
11627  fi
11628
11629 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11630    echo "    xemacs will be linked with \"realpath.o\""
11631  fi
11632
11633 for ac_func in getloadavg
11634 do
11635 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11636 echo "configure:11637: checking for $ac_func" >&5
11637
11638 cat > conftest.$ac_ext <<EOF
11639 #line 11640 "configure"
11640 #include "confdefs.h"
11641 /* System header to define __stub macros and hopefully few prototypes,
11642     which can conflict with char $ac_func(); below.  */
11643 #include <assert.h>
11644 /* Override any gcc2 internal prototype to avoid an error.  */
11645 /* We use char because int might match the return type of a gcc2
11646     builtin and then its argument prototype would still apply.  */
11647 char $ac_func();
11648
11649 int main() {
11650
11651 /* The GNU C library defines this for functions which it implements
11652     to always fail with ENOSYS.  Some functions are actually named
11653     something starting with __ and the normal name is an alias.  */
11654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11655 choke me
11656 #else
11657 $ac_func();
11658 #endif
11659
11660 ; return 0; }
11661 EOF
11662 if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11663   rm -rf conftest*
11664   eval "ac_cv_func_$ac_func=yes"
11665 else
11666   echo "configure: failed program was:" >&5
11667   cat conftest.$ac_ext >&5
11668   rm -rf conftest*
11669   eval "ac_cv_func_$ac_func=no"
11670 fi
11671 rm -f conftest*
11672
11673 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11674   echo "$ac_t""yes" 1>&6
11675     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11676   { test "$extra_verbose" = "yes" && cat << EOF
11677     Defining $ac_tr_func
11678 EOF
11679 cat >> confdefs.h <<EOF
11680 #define $ac_tr_func 1
11681 EOF
11682 }
11683  
11684 else
11685   echo "$ac_t""no" 1>&6
11686 fi
11687 done
11688
11689
11690 if test "$ac_cv_func_getloadavg" = "yes"; then
11691         for ac_hdr in sys/loadavg.h
11692 do
11693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11695 echo "configure:11696: checking for $ac_hdr" >&5
11696
11697 cat > conftest.$ac_ext <<EOF
11698 #line 11699 "configure"
11699 #include "confdefs.h"
11700 #include <$ac_hdr>
11701 EOF
11702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11703 { (eval echo configure:11704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11705 if test -z "$ac_err"; then
11706   rm -rf conftest*
11707   eval "ac_cv_header_$ac_safe=yes"
11708 else
11709   echo "$ac_err" >&5
11710   echo "configure: failed program was:" >&5
11711   cat conftest.$ac_ext >&5
11712   rm -rf conftest*
11713   eval "ac_cv_header_$ac_safe=no"
11714 fi
11715 rm -f conftest*
11716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11717   echo "$ac_t""yes" 1>&6
11718     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11719   { test "$extra_verbose" = "yes" && cat << EOF
11720     Defining $ac_tr_hdr
11721 EOF
11722 cat >> confdefs.h <<EOF
11723 #define $ac_tr_hdr 1
11724 EOF
11725 }
11726  
11727 else
11728   echo "$ac_t""no" 1>&6
11729 fi
11730 done
11731
11732 else
11733     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11734    echo "    xemacs will be linked with \"getloadavg.o\""
11735  fi
11736
11737     
11738 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11739 echo "configure:11740: checking for kstat_open in -lkstat" >&5
11740 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11741
11742 xe_check_libs=" -lkstat "
11743 cat > conftest.$ac_ext <<EOF
11744 #line 11745 "configure"
11745 #include "confdefs.h"
11746 /* Override any gcc2 internal prototype to avoid an error.  */
11747 /* We use char because int might match the return type of a gcc2
11748     builtin and then its argument prototype would still apply.  */
11749 char kstat_open();
11750
11751 int main() {
11752 kstat_open()
11753 ; return 0; }
11754 EOF
11755 if { (eval echo configure:11756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11756   rm -rf conftest*
11757   eval "ac_cv_lib_$ac_lib_var=yes"
11758 else
11759   echo "configure: failed program was:" >&5
11760   cat conftest.$ac_ext >&5
11761   rm -rf conftest*
11762   eval "ac_cv_lib_$ac_lib_var=no"
11763 fi
11764 rm -f conftest*
11765 xe_check_libs=""
11766
11767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11768   echo "$ac_t""yes" 1>&6
11769     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11770     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11771   { test "$extra_verbose" = "yes" && cat << EOF
11772     Defining $ac_tr_lib
11773 EOF
11774 cat >> confdefs.h <<EOF
11775 #define $ac_tr_lib 1
11776 EOF
11777 }
11778
11779   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11780
11781 else
11782   echo "$ac_t""no" 1>&6
11783 fi
11784
11785
11786   for ac_hdr in kstat.h
11787 do
11788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11790 echo "configure:11791: checking for $ac_hdr" >&5
11791
11792 cat > conftest.$ac_ext <<EOF
11793 #line 11794 "configure"
11794 #include "confdefs.h"
11795 #include <$ac_hdr>
11796 EOF
11797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11798 { (eval echo configure:11799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11800 if test -z "$ac_err"; then
11801   rm -rf conftest*
11802   eval "ac_cv_header_$ac_safe=yes"
11803 else
11804   echo "$ac_err" >&5
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -rf conftest*
11808   eval "ac_cv_header_$ac_safe=no"
11809 fi
11810 rm -f conftest*
11811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11812   echo "$ac_t""yes" 1>&6
11813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11814   { test "$extra_verbose" = "yes" && cat << EOF
11815     Defining $ac_tr_hdr
11816 EOF
11817 cat >> confdefs.h <<EOF
11818 #define $ac_tr_hdr 1
11819 EOF
11820 }
11821  
11822 else
11823   echo "$ac_t""no" 1>&6
11824 fi
11825 done
11826
11827
11828     
11829 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11830 echo "configure:11831: checking for kvm_read in -lkvm" >&5
11831 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11832
11833 xe_check_libs=" -lkvm "
11834 cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837 /* Override any gcc2 internal prototype to avoid an error.  */
11838 /* We use char because int might match the return type of a gcc2
11839     builtin and then its argument prototype would still apply.  */
11840 char kvm_read();
11841
11842 int main() {
11843 kvm_read()
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_lib_$ac_lib_var=yes"
11849 else
11850   echo "configure: failed program was:" >&5
11851   cat conftest.$ac_ext >&5
11852   rm -rf conftest*
11853   eval "ac_cv_lib_$ac_lib_var=no"
11854 fi
11855 rm -f conftest*
11856 xe_check_libs=""
11857
11858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11859   echo "$ac_t""yes" 1>&6
11860     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11861     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11862   { test "$extra_verbose" = "yes" && cat << EOF
11863     Defining $ac_tr_lib
11864 EOF
11865 cat >> confdefs.h <<EOF
11866 #define $ac_tr_lib 1
11867 EOF
11868 }
11869
11870   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11871
11872 else
11873   echo "$ac_t""no" 1>&6
11874 fi
11875
11876
11877 fi
11878
11879 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11880 echo "configure:11881: checking whether netdb declares h_errno" >&5
11881 cat > conftest.$ac_ext <<EOF
11882 #line 11883 "configure"
11883 #include "confdefs.h"
11884 #include <netdb.h>
11885 int main() {
11886 return h_errno;
11887 ; return 0; }
11888 EOF
11889 if { (eval echo configure:11890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11890   rm -rf conftest*
11891   echo "$ac_t""yes" 1>&6
11892    { test "$extra_verbose" = "yes" && cat << \EOF
11893     Defining HAVE_H_ERRNO
11894 EOF
11895 cat >> confdefs.h <<\EOF
11896 #define HAVE_H_ERRNO 1
11897 EOF
11898 }
11899
11900 else
11901   echo "configure: failed program was:" >&5
11902   cat conftest.$ac_ext >&5
11903   rm -rf conftest*
11904   echo "$ac_t""no" 1>&6
11905 fi
11906 rm -f conftest*
11907
11908 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11909 echo "configure:11910: checking for sigsetjmp" >&5
11910 cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 #include <setjmp.h>
11914 int main() {
11915 sigjmp_buf bar; sigsetjmp (bar, 0);
11916 ; return 0; }
11917 EOF
11918 if { (eval echo configure:11919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11919   rm -rf conftest*
11920   echo "$ac_t""yes" 1>&6
11921    { test "$extra_verbose" = "yes" && cat << \EOF
11922     Defining HAVE_SIGSETJMP
11923 EOF
11924 cat >> confdefs.h <<\EOF
11925 #define HAVE_SIGSETJMP 1
11926 EOF
11927 }
11928
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -rf conftest*
11933   echo "$ac_t""no" 1>&6
11934 fi
11935 rm -f conftest*
11936
11937 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11938 echo "configure:11939: checking whether localtime caches TZ" >&5
11939
11940 if test "$ac_cv_func_tzset" = "yes"; then
11941 cat > conftest.$ac_ext <<EOF
11942 #line 11943 "configure"
11943 #include "confdefs.h"
11944 #include <time.h>
11945 #if STDC_HEADERS
11946 # include <stdlib.h>
11947 #endif
11948 extern char **environ;
11949 unset_TZ ()
11950 {
11951   char **from, **to;
11952   for (to = from = environ; (*to = *from); from++)
11953     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11954       to++;
11955 }
11956 char TZ_GMT0[] = "TZ=GMT0";
11957 char TZ_PST8[] = "TZ=PST8";
11958 main()
11959 {
11960   time_t now = time ((time_t *) 0);
11961   int hour_GMT0, hour_unset;
11962   if (putenv (TZ_GMT0) != 0)
11963     exit (1);
11964   hour_GMT0 = localtime (&now)->tm_hour;
11965   unset_TZ ();
11966   hour_unset = localtime (&now)->tm_hour;
11967   if (putenv (TZ_PST8) != 0)
11968     exit (1);
11969   if (localtime (&now)->tm_hour == hour_GMT0)
11970     exit (1);
11971   unset_TZ ();
11972   if (localtime (&now)->tm_hour != hour_unset)
11973     exit (1);
11974   exit (0);
11975 }
11976 EOF
11977 if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11978 then
11979   emacs_cv_localtime_cache=no
11980 else
11981   conftest_rc="$?"
11982   echo "configure: failed program was:" >&5
11983   cat conftest.$ac_ext >&5
11984   rm -fr conftest*
11985   emacs_cv_localtime_cache=yes
11986 fi
11987 rm -fr conftest*
11988 else
11989         # If we lack tzset, report that localtime does not cache TZ,
11990         # since we can't invalidate the cache if we don't have tzset.
11991         emacs_cv_localtime_cache=no
11992 fi
11993 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11994 if test $emacs_cv_localtime_cache = yes; then
11995   { test "$extra_verbose" = "yes" && cat << \EOF
11996     Defining LOCALTIME_CACHE
11997 EOF
11998 cat >> confdefs.h <<\EOF
11999 #define LOCALTIME_CACHE 1
12000 EOF
12001 }
12002
12003 fi
12004
12005 if test "$HAVE_TIMEVAL" = "yes"; then
12006 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
12007 echo "configure:12008: checking whether gettimeofday accepts one or two arguments" >&5
12008 cat > conftest.$ac_ext <<EOF
12009 #line 12010 "configure"
12010 #include "confdefs.h"
12011
12012 #ifdef TIME_WITH_SYS_TIME
12013 #include <sys/time.h>
12014 #include <time.h>
12015 #else
12016 #ifdef HAVE_SYS_TIME_H
12017 #include <sys/time.h>
12018 #else
12019 #include <time.h>
12020 #endif
12021 #endif
12022   
12023 int main() {
12024
12025   struct timeval time;
12026   gettimeofday (&time, 0);
12027
12028 ; return 0; }
12029 EOF
12030 if { (eval echo configure:12031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12031   rm -rf conftest*
12032   echo "$ac_t""two" 1>&6
12033 else
12034   echo "configure: failed program was:" >&5
12035   cat conftest.$ac_ext >&5
12036   rm -rf conftest*
12037   echo "$ac_t""one" 1>&6
12038    { test "$extra_verbose" = "yes" && cat << \EOF
12039     Defining GETTIMEOFDAY_ONE_ARGUMENT
12040 EOF
12041 cat >> confdefs.h <<\EOF
12042 #define GETTIMEOFDAY_ONE_ARGUMENT 1
12043 EOF
12044 }
12045
12046 fi
12047 rm -f conftest*
12048 fi
12049
12050
12051 echo $ac_n "checking for inline""... $ac_c" 1>&6
12052 echo "configure:12053: checking for inline" >&5
12053
12054 ac_cv_c_inline=no
12055 for ac_kw in inline __inline__ __inline; do
12056   cat > conftest.$ac_ext <<EOF
12057 #line 12058 "configure"
12058 #include "confdefs.h"
12059
12060 int main() {
12061 } $ac_kw foo() {
12062 ; return 0; }
12063 EOF
12064 if { (eval echo configure:12065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12065   rm -rf conftest*
12066   ac_cv_c_inline=$ac_kw; break
12067 else
12068   echo "configure: failed program was:" >&5
12069   cat conftest.$ac_ext >&5
12070 fi
12071 rm -f conftest*
12072 done
12073
12074
12075 echo "$ac_t""$ac_cv_c_inline" 1>&6
12076 case "$ac_cv_c_inline" in
12077   inline | yes) ;;
12078   no) { test "$extra_verbose" = "yes" && cat << \EOF
12079     Defining inline = 
12080 EOF
12081 cat >> confdefs.h <<\EOF
12082 #define inline 
12083 EOF
12084 }
12085  ;;
12086   *)  { test "$extra_verbose" = "yes" && cat << EOF
12087     Defining inline = $ac_cv_c_inline
12088 EOF
12089 cat >> confdefs.h <<EOF
12090 #define inline $ac_cv_c_inline
12091 EOF
12092 }
12093  ;;
12094 esac
12095
12096 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12097    echo "    xemacs will be linked with \"inline.o\""
12098  fi
12099
12100
12101 if test "$__DECC" != "yes"; then
12102   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12103 # for constant arguments.  Useless!
12104 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12105 echo "configure:12106: checking for working alloca.h" >&5
12106
12107 cat > conftest.$ac_ext <<EOF
12108 #line 12109 "configure"
12109 #include "confdefs.h"
12110 #include <alloca.h>
12111 int main() {
12112 char *p = alloca(2 * sizeof(int));
12113 ; return 0; }
12114 EOF
12115 if { (eval echo configure:12116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12116   rm -rf conftest*
12117   ac_cv_header_alloca_h=yes
12118 else
12119   echo "configure: failed program was:" >&5
12120   cat conftest.$ac_ext >&5
12121   rm -rf conftest*
12122   ac_cv_header_alloca_h=no
12123 fi
12124 rm -f conftest*
12125
12126 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12127 if test $ac_cv_header_alloca_h = yes; then
12128   { test "$extra_verbose" = "yes" && cat << \EOF
12129     Defining HAVE_ALLOCA_H
12130 EOF
12131 cat >> confdefs.h <<\EOF
12132 #define HAVE_ALLOCA_H 1
12133 EOF
12134 }
12135
12136 fi
12137
12138 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12139 echo "configure:12140: checking for alloca" >&5
12140
12141 cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144
12145 #ifdef __GNUC__
12146 # define alloca __builtin_alloca
12147 #else
12148 # ifdef _MSC_VER
12149 #  include <malloc.h>
12150 #  define alloca _alloca
12151 # else
12152 #  if HAVE_ALLOCA_H
12153 #   include <alloca.h>
12154 #  else
12155 #   ifdef _AIX
12156  #pragma alloca
12157 #   else
12158 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12159 char *alloca ();
12160 #    endif
12161 #   endif
12162 #  endif
12163 # endif
12164 #endif
12165
12166 int main() {
12167 char *p = (char *) alloca(1);
12168 ; return 0; }
12169 EOF
12170 if { (eval echo configure:12171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12171   rm -rf conftest*
12172   ac_cv_func_alloca_works=yes
12173 else
12174   echo "configure: failed program was:" >&5
12175   cat conftest.$ac_ext >&5
12176   rm -rf conftest*
12177   ac_cv_func_alloca_works=no
12178 fi
12179 rm -f conftest*
12180
12181 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12182 if test $ac_cv_func_alloca_works = yes; then
12183   { test "$extra_verbose" = "yes" && cat << \EOF
12184     Defining HAVE_ALLOCA
12185 EOF
12186 cat >> confdefs.h <<\EOF
12187 #define HAVE_ALLOCA 1
12188 EOF
12189 }
12190
12191 fi
12192
12193 if test $ac_cv_func_alloca_works = no; then
12194   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12195   # that cause trouble.  Some versions do not even contain alloca or
12196   # contain a buggy version.  If you still want to use their alloca,
12197   # use ar to extract alloca.o from them instead of compiling alloca.c.
12198   ALLOCA=alloca.${ac_objext}
12199   { test "$extra_verbose" = "yes" && cat << \EOF
12200     Defining C_ALLOCA
12201 EOF
12202 cat >> confdefs.h <<\EOF
12203 #define C_ALLOCA 1
12204 EOF
12205 }
12206
12207
12208 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12209 echo "configure:12210: checking whether alloca needs Cray hooks" >&5
12210
12211 cat > conftest.$ac_ext <<EOF
12212 #line 12213 "configure"
12213 #include "confdefs.h"
12214 #if defined(CRAY) && ! defined(CRAY2)
12215 webecray
12216 #else
12217 wenotbecray
12218 #endif
12219
12220 EOF
12221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12222   egrep "webecray" >/dev/null 2>&1; then
12223   rm -rf conftest*
12224   ac_cv_os_cray=yes
12225 else
12226   rm -rf conftest*
12227   ac_cv_os_cray=no
12228 fi
12229 rm -f conftest*
12230
12231
12232 echo "$ac_t""$ac_cv_os_cray" 1>&6
12233 if test $ac_cv_os_cray = yes; then
12234 for ac_func in _getb67 GETB67 getb67; do
12235   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12236 echo "configure:12237: checking for $ac_func" >&5
12237
12238 cat > conftest.$ac_ext <<EOF
12239 #line 12240 "configure"
12240 #include "confdefs.h"
12241 /* System header to define __stub macros and hopefully few prototypes,
12242     which can conflict with char $ac_func(); below.  */
12243 #include <assert.h>
12244 /* Override any gcc2 internal prototype to avoid an error.  */
12245 /* We use char because int might match the return type of a gcc2
12246     builtin and then its argument prototype would still apply.  */
12247 char $ac_func();
12248
12249 int main() {
12250
12251 /* The GNU C library defines this for functions which it implements
12252     to always fail with ENOSYS.  Some functions are actually named
12253     something starting with __ and the normal name is an alias.  */
12254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12255 choke me
12256 #else
12257 $ac_func();
12258 #endif
12259
12260 ; return 0; }
12261 EOF
12262 if { (eval echo configure:12263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12263   rm -rf conftest*
12264   eval "ac_cv_func_$ac_func=yes"
12265 else
12266   echo "configure: failed program was:" >&5
12267   cat conftest.$ac_ext >&5
12268   rm -rf conftest*
12269   eval "ac_cv_func_$ac_func=no"
12270 fi
12271 rm -f conftest*
12272
12273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12274   echo "$ac_t""yes" 1>&6
12275   { test "$extra_verbose" = "yes" && cat << EOF
12276     Defining CRAY_STACKSEG_END = $ac_func
12277 EOF
12278 cat >> confdefs.h <<EOF
12279 #define CRAY_STACKSEG_END $ac_func
12280 EOF
12281 }
12282
12283   break
12284 else
12285   echo "$ac_t""no" 1>&6
12286 fi
12287
12288 done
12289 fi
12290
12291 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12292 echo "configure:12293: checking stack direction for C alloca" >&5
12293
12294 cat > conftest.$ac_ext <<EOF
12295 #line 12296 "configure"
12296 #include "confdefs.h"
12297 find_stack_direction ()
12298 {
12299   static char *addr = 0;
12300   auto char dummy;
12301   if (addr == 0)
12302     {
12303       addr = &dummy;
12304       return find_stack_direction ();
12305     }
12306   else
12307     return (&dummy > addr) ? 1 : -1;
12308 }
12309 main ()
12310 {
12311   exit (find_stack_direction() < 0);
12312 }
12313 EOF
12314 if { (eval echo configure:12315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12315 then
12316   ac_cv_c_stack_direction=1
12317 else
12318   conftest_rc="$?"
12319   echo "configure: failed program was:" >&5
12320   cat conftest.$ac_ext >&5
12321   rm -fr conftest*
12322   ac_cv_c_stack_direction=-1
12323 fi
12324 rm -fr conftest*
12325
12326 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12327 { test "$extra_verbose" = "yes" && cat << EOF
12328     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12329 EOF
12330 cat >> confdefs.h <<EOF
12331 #define STACK_DIRECTION $ac_cv_c_stack_direction
12332 EOF
12333 }
12334
12335 fi
12336
12337   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12338    echo "    xemacs will be linked with \"$ALLOCA\""
12339  fi
12340 fi
12341
12342 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12343 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12344 echo "configure:12345: checking for vfork.h" >&5
12345
12346 cat > conftest.$ac_ext <<EOF
12347 #line 12348 "configure"
12348 #include "confdefs.h"
12349 #include <vfork.h>
12350 EOF
12351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12352 { (eval echo configure:12353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12354 if test -z "$ac_err"; then
12355   rm -rf conftest*
12356   eval "ac_cv_header_$ac_safe=yes"
12357 else
12358   echo "$ac_err" >&5
12359   echo "configure: failed program was:" >&5
12360   cat conftest.$ac_ext >&5
12361   rm -rf conftest*
12362   eval "ac_cv_header_$ac_safe=no"
12363 fi
12364 rm -f conftest*
12365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12366   echo "$ac_t""yes" 1>&6
12367   { test "$extra_verbose" = "yes" && cat << \EOF
12368     Defining HAVE_VFORK_H
12369 EOF
12370 cat >> confdefs.h <<\EOF
12371 #define HAVE_VFORK_H 1
12372 EOF
12373 }
12374
12375 else
12376   echo "$ac_t""no" 1>&6
12377 fi
12378
12379 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12380 echo "configure:12381: checking for working vfork" >&5
12381
12382 cat > conftest.$ac_ext <<EOF
12383 #line 12384 "configure"
12384 #include "confdefs.h"
12385 /* Thanks to Paul Eggert for this test.  */
12386 #include <stdio.h>
12387 #include <sys/types.h>
12388 #include <sys/stat.h>
12389 #ifdef HAVE_UNISTD_H
12390 #include <unistd.h>
12391 #endif
12392 #ifdef HAVE_VFORK_H
12393 #include <vfork.h>
12394 #endif
12395 /* On some sparc systems, changes by the child to local and incoming
12396    argument registers are propagated back to the parent.
12397    The compiler is told about this with #include <vfork.h>,
12398    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12399    Test for this by using a static variable whose address
12400    is put into a register that is clobbered by the vfork.  */
12401 static
12402 #ifdef __cplusplus
12403 sparc_address_test (int arg)
12404 #else
12405 sparc_address_test (arg) int arg;
12406 #endif
12407 {
12408   static pid_t child;
12409   if (!child) {
12410     child = vfork ();
12411     if (child < 0) {
12412       perror ("vfork");
12413       _exit(2);
12414     }
12415     if (!child) {
12416       arg = getpid();
12417       write(-1, "", 0);
12418       _exit (arg);
12419     }
12420   }
12421 }
12422 main() {
12423   pid_t parent = getpid ();
12424   pid_t child;
12425
12426   sparc_address_test ();
12427
12428   child = vfork ();
12429
12430   if (child == 0) {
12431     /* Here is another test for sparc vfork register problems.
12432        This test uses lots of local variables, at least
12433        as many local variables as main has allocated so far
12434        including compiler temporaries.  4 locals are enough for
12435        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12436        A buggy compiler should reuse the register of parent
12437        for one of the local variables, since it will think that
12438        parent can't possibly be used any more in this routine.
12439        Assigning to the local variable will thus munge parent
12440        in the parent process.  */
12441     pid_t
12442       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12443       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12444     /* Convince the compiler that p..p7 are live; otherwise, it might
12445        use the same hardware register for all 8 local variables.  */
12446     if (p != p1 || p != p2 || p != p3 || p != p4
12447         || p != p5 || p != p6 || p != p7)
12448       _exit(1);
12449
12450     /* On some systems (e.g. IRIX 3.3),
12451        vfork doesn't separate parent from child file descriptors.
12452        If the child closes a descriptor before it execs or exits,
12453        this munges the parent's descriptor as well.
12454        Test for this by closing stdout in the child.  */
12455     _exit(close(fileno(stdout)) != 0);
12456   } else {
12457     int status;
12458     struct stat st;
12459
12460     while (wait(&status) != child)
12461       ;
12462     exit(
12463          /* Was there some problem with vforking?  */
12464          child < 0
12465
12466          /* Did the child fail?  (This shouldn't happen.)  */
12467          || status
12468
12469          /* Did the vfork/compiler bug occur?  */
12470          || parent != getpid()
12471
12472          /* Did the file descriptor bug occur?  */
12473          || fstat(fileno(stdout), &st) != 0
12474          );
12475   }
12476 }
12477 EOF
12478 if { (eval echo configure:12479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12479 then
12480   ac_cv_func_vfork_works=yes
12481 else
12482   conftest_rc="$?"
12483   echo "configure: failed program was:" >&5
12484   cat conftest.$ac_ext >&5
12485   rm -fr conftest*
12486   ac_cv_func_vfork_works=no
12487 fi
12488 rm -fr conftest*
12489
12490 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12491 if test $ac_cv_func_vfork_works = no; then
12492   { test "$extra_verbose" = "yes" && cat << \EOF
12493     Defining vfork = fork
12494 EOF
12495 cat >> confdefs.h <<\EOF
12496 #define vfork fork
12497 EOF
12498 }
12499
12500 fi
12501
12502
12503 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12504 echo "configure:12505: checking for working strcoll" >&5
12505
12506 cat > conftest.$ac_ext <<EOF
12507 #line 12508 "configure"
12508 #include "confdefs.h"
12509 #include <string.h>
12510 main ()
12511 {
12512   exit (strcoll ("abc", "def") >= 0 ||
12513         strcoll ("ABC", "DEF") >= 0 ||
12514         strcoll ("123", "456") >= 0);
12515 }
12516 EOF
12517 if { (eval echo configure:12518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12518 then
12519   ac_cv_func_strcoll_works=yes
12520 else
12521   conftest_rc="$?"
12522   echo "configure: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   rm -fr conftest*
12525   ac_cv_func_strcoll_works=no
12526 fi
12527 rm -fr conftest*
12528
12529 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12530 if test $ac_cv_func_strcoll_works = yes; then
12531   { test "$extra_verbose" = "yes" && cat << \EOF
12532     Defining HAVE_STRCOLL
12533 EOF
12534 cat >> confdefs.h <<\EOF
12535 #define HAVE_STRCOLL 1
12536 EOF
12537 }
12538
12539 fi
12540
12541
12542 for ac_func in getpgrp
12543 do
12544 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12545 echo "configure:12546: checking for $ac_func" >&5
12546
12547 cat > conftest.$ac_ext <<EOF
12548 #line 12549 "configure"
12549 #include "confdefs.h"
12550 /* System header to define __stub macros and hopefully few prototypes,
12551     which can conflict with char $ac_func(); below.  */
12552 #include <assert.h>
12553 /* Override any gcc2 internal prototype to avoid an error.  */
12554 /* We use char because int might match the return type of a gcc2
12555     builtin and then its argument prototype would still apply.  */
12556 char $ac_func();
12557
12558 int main() {
12559
12560 /* The GNU C library defines this for functions which it implements
12561     to always fail with ENOSYS.  Some functions are actually named
12562     something starting with __ and the normal name is an alias.  */
12563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12564 choke me
12565 #else
12566 $ac_func();
12567 #endif
12568
12569 ; return 0; }
12570 EOF
12571 if { (eval echo configure:12572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12572   rm -rf conftest*
12573   eval "ac_cv_func_$ac_func=yes"
12574 else
12575   echo "configure: failed program was:" >&5
12576   cat conftest.$ac_ext >&5
12577   rm -rf conftest*
12578   eval "ac_cv_func_$ac_func=no"
12579 fi
12580 rm -f conftest*
12581
12582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12583   echo "$ac_t""yes" 1>&6
12584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12585   { test "$extra_verbose" = "yes" && cat << EOF
12586     Defining $ac_tr_func
12587 EOF
12588 cat >> confdefs.h <<EOF
12589 #define $ac_tr_func 1
12590 EOF
12591 }
12592  
12593 else
12594   echo "$ac_t""no" 1>&6
12595 fi
12596 done
12597
12598 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12599 echo "configure:12600: checking whether getpgrp takes no argument" >&5
12600
12601 cat > conftest.$ac_ext <<EOF
12602 #line 12603 "configure"
12603 #include "confdefs.h"
12604
12605 /*
12606  * If this system has a BSD-style getpgrp(),
12607  * which takes a pid argument, exit unsuccessfully.
12608  *
12609  * Snarfed from Chet Ramey's bash pgrp.c test program
12610  */
12611 #include <stdio.h>
12612 #include <sys/types.h>
12613
12614 int     pid;
12615 int     pg1, pg2, pg3, pg4;
12616 int     ng, np, s, child;
12617
12618 main()
12619 {
12620         pid = getpid();
12621         pg1 = getpgrp(0);
12622         pg2 = getpgrp();
12623         pg3 = getpgrp(pid);
12624         pg4 = getpgrp(1);
12625
12626         /*
12627          * If all of these values are the same, it's pretty sure that
12628          * we're on a system that ignores getpgrp's first argument.
12629          */
12630         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12631                 exit(0);
12632
12633         child = fork();
12634         if (child < 0)
12635                 exit(1);
12636         else if (child == 0) {
12637                 np = getpid();
12638                 /*
12639                  * If this is Sys V, this will not work; pgrp will be
12640                  * set to np because setpgrp just changes a pgrp to be
12641                  * the same as the pid.
12642                  */
12643                 setpgrp(np, pg1);
12644                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12645                 if (ng == pg1) {
12646                         exit(1);
12647                 } else {
12648                         exit(0);
12649                 }
12650         } else {
12651                 wait(&s);
12652                 exit(s>>8);
12653         }
12654 }
12655
12656 EOF
12657 if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12658 then
12659   ac_cv_func_getpgrp_void=yes
12660 else
12661   conftest_rc="$?"
12662   echo "configure: failed program was:" >&5
12663   cat conftest.$ac_ext >&5
12664   rm -fr conftest*
12665   ac_cv_func_getpgrp_void=no
12666 fi
12667 rm -fr conftest*
12668
12669
12670 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12671 if test $ac_cv_func_getpgrp_void = yes; then
12672   { test "$extra_verbose" = "yes" && cat << \EOF
12673     Defining GETPGRP_VOID
12674 EOF
12675 cat >> confdefs.h <<\EOF
12676 #define GETPGRP_VOID 1
12677 EOF
12678 }
12679
12680 fi
12681
12682
12683 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12684 echo "configure:12685: checking for working mmap" >&5
12685 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12686 cat > conftest.$ac_ext <<EOF
12687 #line 12688 "configure"
12688 #include "confdefs.h"
12689 #include <stdio.h>
12690 #include <unistd.h>
12691 #include <fcntl.h>
12692 #include <sys/mman.h>
12693
12694 #ifndef MAP_VARIABLE
12695 #define MAP_VARIABLE 0
12696 #endif
12697
12698 #ifndef MAP_FAILED
12699 #define MAP_FAILED -1
12700 #endif
12701
12702 int main (int argc, char *argv[])
12703 {
12704   int fd = -1;
12705   caddr_t p;
12706 #ifndef MAP_ANONYMOUS
12707   fd = open ("/dev/zero", O_RDWR);
12708   if (fd < 0)
12709     return 1;
12710 #define MAP_ANONYMOUS 0
12711 #endif
12712   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12713            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12714            fd, 0) != (void *) MAP_FAILED)
12715     return 0;
12716   perror ("conftest: mmap failed");
12717   return 1;
12718 }
12719 EOF
12720 if { (eval echo configure:12721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12721 then
12722   have_mmap=yes
12723 else
12724   conftest_rc="$?"
12725   echo "configure: failed program was:" >&5
12726   cat conftest.$ac_ext >&5
12727   rm -fr conftest*
12728   have_mmap=no
12729 fi
12730 rm -fr conftest* ;;
12731 esac
12732 echo "$ac_t""$have_mmap" 1>&6
12733 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12734     Defining HAVE_MMAP
12735 EOF
12736 cat >> confdefs.h <<\EOF
12737 #define HAVE_MMAP 1
12738 EOF
12739 }
12740
12741
12742 case "$opsys" in cygwin*) 
12743         test "$rel_alloc" = "default" && rel_alloc=no ;;
12744 esac
12745 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12746 if test "$rel_alloc $have_mmap" = "default yes"; then
12747   if test "$doug_lea_malloc" = "yes"; then
12748         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12749 echo "configure:12750: checking for M_MMAP_THRESHOLD" >&5
12750     cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753 #include <malloc.h>
12754 int main() {
12755
12756 #ifndef M_MMAP_THRESHOLD
12757 #error No M_MMAP_THRESHOLD :-(
12758 !@+$%^&*_)(_ - unlikely to compile...
12759 #endif
12760
12761 ; return 0; }
12762 EOF
12763 if { (eval echo configure:12764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12764   rm -rf conftest*
12765   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12766 else
12767   echo "configure: failed program was:" >&5
12768   cat conftest.$ac_ext >&5
12769   rm -rf conftest*
12770   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12771 fi
12772 rm -f conftest*
12773   else
12774     rel_alloc=yes
12775   fi
12776 fi
12777 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12778     Defining REL_ALLOC
12779 EOF
12780 cat >> confdefs.h <<\EOF
12781 #define REL_ALLOC 1
12782 EOF
12783 }
12784
12785
12786 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12787 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12788 echo "configure:12789: checking for termios.h" >&5
12789
12790 cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793 #include <termios.h>
12794 EOF
12795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12796 { (eval echo configure:12797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12798 if test -z "$ac_err"; then
12799   rm -rf conftest*
12800   eval "ac_cv_header_$ac_safe=yes"
12801 else
12802   echo "$ac_err" >&5
12803   echo "configure: failed program was:" >&5
12804   cat conftest.$ac_ext >&5
12805   rm -rf conftest*
12806   eval "ac_cv_header_$ac_safe=no"
12807 fi
12808 rm -f conftest*
12809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12810   echo "$ac_t""yes" 1>&6
12811   { test "$extra_verbose" = "yes" && cat << \EOF
12812     Defining HAVE_TERMIOS
12813 EOF
12814 cat >> confdefs.h <<\EOF
12815 #define HAVE_TERMIOS 1
12816 EOF
12817 }
12818
12819   { test "$extra_verbose" = "yes" && cat << \EOF
12820     Defining SIGNALS_VIA_CHARACTERS
12821 EOF
12822 cat >> confdefs.h <<\EOF
12823 #define SIGNALS_VIA_CHARACTERS 1
12824 EOF
12825 }
12826
12827   { test "$extra_verbose" = "yes" && cat << \EOF
12828     Defining NO_TERMIO
12829 EOF
12830 cat >> confdefs.h <<\EOF
12831 #define NO_TERMIO 1
12832 EOF
12833 }
12834
12835 else
12836   echo "$ac_t""no" 1>&6
12837 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12838 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12839 echo "configure:12840: checking for termio.h" >&5
12840
12841 cat > conftest.$ac_ext <<EOF
12842 #line 12843 "configure"
12843 #include "confdefs.h"
12844 #include <termio.h>
12845 EOF
12846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12847 { (eval echo configure:12848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12849 if test -z "$ac_err"; then
12850   rm -rf conftest*
12851   eval "ac_cv_header_$ac_safe=yes"
12852 else
12853   echo "$ac_err" >&5
12854   echo "configure: failed program was:" >&5
12855   cat conftest.$ac_ext >&5
12856   rm -rf conftest*
12857   eval "ac_cv_header_$ac_safe=no"
12858 fi
12859 rm -f conftest*
12860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12861   echo "$ac_t""yes" 1>&6
12862   { test "$extra_verbose" = "yes" && cat << \EOF
12863     Defining HAVE_TERMIO
12864 EOF
12865 cat >> confdefs.h <<\EOF
12866 #define HAVE_TERMIO 1
12867 EOF
12868 }
12869
12870 else
12871   echo "$ac_t""no" 1>&6
12872 fi
12873
12874 fi
12875
12876
12877
12878 echo $ac_n "checking for socket""... $ac_c" 1>&6
12879 echo "configure:12880: checking for socket" >&5
12880
12881 cat > conftest.$ac_ext <<EOF
12882 #line 12883 "configure"
12883 #include "confdefs.h"
12884 /* System header to define __stub macros and hopefully few prototypes,
12885     which can conflict with char socket(); below.  */
12886 #include <assert.h>
12887 /* Override any gcc2 internal prototype to avoid an error.  */
12888 /* We use char because int might match the return type of a gcc2
12889     builtin and then its argument prototype would still apply.  */
12890 char socket();
12891
12892 int main() {
12893
12894 /* The GNU C library defines this for functions which it implements
12895     to always fail with ENOSYS.  Some functions are actually named
12896     something starting with __ and the normal name is an alias.  */
12897 #if defined (__stub_socket) || defined (__stub___socket)
12898 choke me
12899 #else
12900 socket();
12901 #endif
12902
12903 ; return 0; }
12904 EOF
12905 if { (eval echo configure:12906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12906   rm -rf conftest*
12907   eval "ac_cv_func_socket=yes"
12908 else
12909   echo "configure: failed program was:" >&5
12910   cat conftest.$ac_ext >&5
12911   rm -rf conftest*
12912   eval "ac_cv_func_socket=no"
12913 fi
12914 rm -f conftest*
12915
12916 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12917   echo "$ac_t""yes" 1>&6
12918   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12919 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12920 echo "configure:12921: checking for netinet/in.h" >&5
12921
12922 cat > conftest.$ac_ext <<EOF
12923 #line 12924 "configure"
12924 #include "confdefs.h"
12925 #include <netinet/in.h>
12926 EOF
12927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12928 { (eval echo configure:12929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12930 if test -z "$ac_err"; then
12931   rm -rf conftest*
12932   eval "ac_cv_header_$ac_safe=yes"
12933 else
12934   echo "$ac_err" >&5
12935   echo "configure: failed program was:" >&5
12936   cat conftest.$ac_ext >&5
12937   rm -rf conftest*
12938   eval "ac_cv_header_$ac_safe=no"
12939 fi
12940 rm -f conftest*
12941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12942   echo "$ac_t""yes" 1>&6
12943   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12944 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12945 echo "configure:12946: checking for arpa/inet.h" >&5
12946
12947 cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950 #include <arpa/inet.h>
12951 EOF
12952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12953 { (eval echo configure:12954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12955 if test -z "$ac_err"; then
12956   rm -rf conftest*
12957   eval "ac_cv_header_$ac_safe=yes"
12958 else
12959   echo "$ac_err" >&5
12960   echo "configure: failed program was:" >&5
12961   cat conftest.$ac_ext >&5
12962   rm -rf conftest*
12963   eval "ac_cv_header_$ac_safe=no"
12964 fi
12965 rm -f conftest*
12966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12967   echo "$ac_t""yes" 1>&6
12968   
12969   { test "$extra_verbose" = "yes" && cat << \EOF
12970     Defining HAVE_SOCKETS
12971 EOF
12972 cat >> confdefs.h <<\EOF
12973 #define HAVE_SOCKETS 1
12974 EOF
12975 }
12976
12977       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12978 echo "configure:12979: checking "for sun_len member in struct sockaddr_un"" >&5
12979       cat > conftest.$ac_ext <<EOF
12980 #line 12981 "configure"
12981 #include "confdefs.h"
12982
12983 #include <sys/types.h>
12984 #include <sys/socket.h>
12985 #include <sys/un.h>
12986       
12987 int main() {
12988 static struct sockaddr_un x; x.sun_len = 1;
12989 ; return 0; }
12990 EOF
12991 if { (eval echo configure:12992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12992   rm -rf conftest*
12993   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12994     Defining HAVE_SOCKADDR_SUN_LEN
12995 EOF
12996 cat >> confdefs.h <<\EOF
12997 #define HAVE_SOCKADDR_SUN_LEN 1
12998 EOF
12999 }
13000
13001 else
13002   echo "configure: failed program was:" >&5
13003   cat conftest.$ac_ext >&5
13004   rm -rf conftest*
13005   echo "$ac_t""no" 1>&6
13006 fi
13007 rm -f conftest*
13008       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
13009 echo "configure:13010: checking "for ip_mreq struct in netinet/in.h"" >&5
13010       cat > conftest.$ac_ext <<EOF
13011 #line 13012 "configure"
13012 #include "confdefs.h"
13013
13014 #include <sys/types.h>
13015 #include <netinet/in.h>
13016       
13017 int main() {
13018 static struct ip_mreq x;
13019 ; return 0; }
13020 EOF
13021 if { (eval echo configure:13022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13022   rm -rf conftest*
13023   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13024     Defining HAVE_MULTICAST
13025 EOF
13026 cat >> confdefs.h <<\EOF
13027 #define HAVE_MULTICAST 1
13028 EOF
13029 }
13030
13031 else
13032   echo "configure: failed program was:" >&5
13033   cat conftest.$ac_ext >&5
13034   rm -rf conftest*
13035   echo "$ac_t""no" 1>&6
13036 fi
13037 rm -f conftest*
13038 else
13039   echo "$ac_t""no" 1>&6
13040 fi
13041
13042 else
13043   echo "$ac_t""no" 1>&6
13044 fi
13045
13046 else
13047   echo "$ac_t""no" 1>&6
13048 fi
13049
13050
13051 echo $ac_n "checking for msgget""... $ac_c" 1>&6
13052 echo "configure:13053: checking for msgget" >&5
13053
13054 cat > conftest.$ac_ext <<EOF
13055 #line 13056 "configure"
13056 #include "confdefs.h"
13057 /* System header to define __stub macros and hopefully few prototypes,
13058     which can conflict with char msgget(); below.  */
13059 #include <assert.h>
13060 /* Override any gcc2 internal prototype to avoid an error.  */
13061 /* We use char because int might match the return type of a gcc2
13062     builtin and then its argument prototype would still apply.  */
13063 char msgget();
13064
13065 int main() {
13066
13067 /* The GNU C library defines this for functions which it implements
13068     to always fail with ENOSYS.  Some functions are actually named
13069     something starting with __ and the normal name is an alias.  */
13070 #if defined (__stub_msgget) || defined (__stub___msgget)
13071 choke me
13072 #else
13073 msgget();
13074 #endif
13075
13076 ; return 0; }
13077 EOF
13078 if { (eval echo configure:13079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13079   rm -rf conftest*
13080   eval "ac_cv_func_msgget=yes"
13081 else
13082   echo "configure: failed program was:" >&5
13083   cat conftest.$ac_ext >&5
13084   rm -rf conftest*
13085   eval "ac_cv_func_msgget=no"
13086 fi
13087 rm -f conftest*
13088
13089 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13090   echo "$ac_t""yes" 1>&6
13091   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13092 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13093 echo "configure:13094: checking for sys/ipc.h" >&5
13094
13095 cat > conftest.$ac_ext <<EOF
13096 #line 13097 "configure"
13097 #include "confdefs.h"
13098 #include <sys/ipc.h>
13099 EOF
13100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13101 { (eval echo configure:13102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13103 if test -z "$ac_err"; then
13104   rm -rf conftest*
13105   eval "ac_cv_header_$ac_safe=yes"
13106 else
13107   echo "$ac_err" >&5
13108   echo "configure: failed program was:" >&5
13109   cat conftest.$ac_ext >&5
13110   rm -rf conftest*
13111   eval "ac_cv_header_$ac_safe=no"
13112 fi
13113 rm -f conftest*
13114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13115   echo "$ac_t""yes" 1>&6
13116   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13117 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13118 echo "configure:13119: checking for sys/msg.h" >&5
13119
13120 cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 #include <sys/msg.h>
13124 EOF
13125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13126 { (eval echo configure:13127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13128 if test -z "$ac_err"; then
13129   rm -rf conftest*
13130   eval "ac_cv_header_$ac_safe=yes"
13131 else
13132   echo "$ac_err" >&5
13133   echo "configure: failed program was:" >&5
13134   cat conftest.$ac_ext >&5
13135   rm -rf conftest*
13136   eval "ac_cv_header_$ac_safe=no"
13137 fi
13138 rm -f conftest*
13139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13140   echo "$ac_t""yes" 1>&6
13141   { test "$extra_verbose" = "yes" && cat << \EOF
13142     Defining HAVE_SYSVIPC
13143 EOF
13144 cat >> confdefs.h <<\EOF
13145 #define HAVE_SYSVIPC 1
13146 EOF
13147 }
13148
13149 else
13150   echo "$ac_t""no" 1>&6
13151 fi
13152
13153 else
13154   echo "$ac_t""no" 1>&6
13155 fi
13156
13157 else
13158   echo "$ac_t""no" 1>&6
13159 fi
13160
13161
13162 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13163 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13164 echo "configure:13165: checking for dirent.h" >&5
13165
13166 cat > conftest.$ac_ext <<EOF
13167 #line 13168 "configure"
13168 #include "confdefs.h"
13169 #include <dirent.h>
13170 EOF
13171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13172 { (eval echo configure:13173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13174 if test -z "$ac_err"; then
13175   rm -rf conftest*
13176   eval "ac_cv_header_$ac_safe=yes"
13177 else
13178   echo "$ac_err" >&5
13179   echo "configure: failed program was:" >&5
13180   cat conftest.$ac_ext >&5
13181   rm -rf conftest*
13182   eval "ac_cv_header_$ac_safe=no"
13183 fi
13184 rm -f conftest*
13185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13186   echo "$ac_t""yes" 1>&6
13187   { test "$extra_verbose" = "yes" && cat << \EOF
13188     Defining SYSV_SYSTEM_DIR
13189 EOF
13190 cat >> confdefs.h <<\EOF
13191 #define SYSV_SYSTEM_DIR 1
13192 EOF
13193 }
13194
13195 else
13196   echo "$ac_t""no" 1>&6
13197 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13198 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13199 echo "configure:13200: checking for sys/dir.h" >&5
13200
13201 cat > conftest.$ac_ext <<EOF
13202 #line 13203 "configure"
13203 #include "confdefs.h"
13204 #include <sys/dir.h>
13205 EOF
13206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13207 { (eval echo configure:13208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13209 if test -z "$ac_err"; then
13210   rm -rf conftest*
13211   eval "ac_cv_header_$ac_safe=yes"
13212 else
13213   echo "$ac_err" >&5
13214   echo "configure: failed program was:" >&5
13215   cat conftest.$ac_ext >&5
13216   rm -rf conftest*
13217   eval "ac_cv_header_$ac_safe=no"
13218 fi
13219 rm -f conftest*
13220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13221   echo "$ac_t""yes" 1>&6
13222   :
13223 else
13224   echo "$ac_t""no" 1>&6
13225 { test "$extra_verbose" = "yes" && cat << \EOF
13226     Defining NONSYSTEM_DIR_LIBRARY
13227 EOF
13228 cat >> confdefs.h <<\EOF
13229 #define NONSYSTEM_DIR_LIBRARY 1
13230 EOF
13231 }
13232
13233 fi
13234
13235 fi
13236
13237
13238 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13239 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13240 echo "configure:13241: checking for nlist.h" >&5
13241
13242 cat > conftest.$ac_ext <<EOF
13243 #line 13244 "configure"
13244 #include "confdefs.h"
13245 #include <nlist.h>
13246 EOF
13247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13248 { (eval echo configure:13249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13250 if test -z "$ac_err"; then
13251   rm -rf conftest*
13252   eval "ac_cv_header_$ac_safe=yes"
13253 else
13254   echo "$ac_err" >&5
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -rf conftest*
13258   eval "ac_cv_header_$ac_safe=no"
13259 fi
13260 rm -f conftest*
13261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13262   echo "$ac_t""yes" 1>&6
13263   { test "$extra_verbose" = "yes" && cat << \EOF
13264     Defining NLIST_STRUCT
13265 EOF
13266 cat >> confdefs.h <<\EOF
13267 #define NLIST_STRUCT 1
13268 EOF
13269 }
13270
13271 else
13272   echo "$ac_t""no" 1>&6
13273 fi
13274
13275
13276
13277 echo "checking "for sound support"" 1>&6
13278 echo "configure:13279: checking "for sound support"" >&5
13279 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13280
13281 if test "$with_native_sound" != "no"; then
13282     if test -n "$native_sound_lib"; then
13283     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13284 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13285 echo "configure:13286: checking for multimedia/audio_device.h" >&5
13286
13287 cat > conftest.$ac_ext <<EOF
13288 #line 13289 "configure"
13289 #include "confdefs.h"
13290 #include <multimedia/audio_device.h>
13291 EOF
13292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13293 { (eval echo configure:13294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13295 if test -z "$ac_err"; then
13296   rm -rf conftest*
13297   eval "ac_cv_header_$ac_safe=yes"
13298 else
13299   echo "$ac_err" >&5
13300   echo "configure: failed program was:" >&5
13301   cat conftest.$ac_ext >&5
13302   rm -rf conftest*
13303   eval "ac_cv_header_$ac_safe=no"
13304 fi
13305 rm -f conftest*
13306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13307   echo "$ac_t""yes" 1>&6
13308   sound_found=yes sound_cflags=""
13309       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13310    echo "    xemacs will be linked with \"sunplay.o\""
13311  fi
13312 else
13313   echo "$ac_t""no" 1>&6
13314 fi
13315
13316   fi
13317
13318     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13319     if test -d "/usr/demo/SOUND/include/multimedia"; then
13320       sun_sound_cflags="-I/usr/demo/SOUND/include"
13321     elif test -d "/usr/demo/SOUND/multimedia"; then
13322       sun_sound_cflags="-I/usr/demo/SOUND"
13323     fi
13324
13325     if test -n "$native_sound_lib"; then
13326       sun_sound_lib="$native_sound_lib"
13327     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13328       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13329     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13330       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13331     fi
13332
13333     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13334       native_sound_lib="$sun_sound_lib"
13335       sound_cflags="$sun_sound_cflags"
13336       sound_found=yes
13337       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13338    echo "    xemacs will be linked with \"sunplay.o\""
13339  fi
13340     fi
13341   fi
13342
13343     if test -z "$sound_found"; then
13344     case "$canonical" in
13345     *-sgi-* )
13346       if test -z "$native_sound_lib"; then
13347         
13348 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13349 echo "configure:13350: checking for ALopenport in -laudio" >&5
13350 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13351
13352 xe_check_libs=" -laudio "
13353 cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 /* Override any gcc2 internal prototype to avoid an error.  */
13357 /* We use char because int might match the return type of a gcc2
13358     builtin and then its argument prototype would still apply.  */
13359 char ALopenport();
13360
13361 int main() {
13362 ALopenport()
13363 ; return 0; }
13364 EOF
13365 if { (eval echo configure:13366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13366   rm -rf conftest*
13367   eval "ac_cv_lib_$ac_lib_var=yes"
13368 else
13369   echo "configure: failed program was:" >&5
13370   cat conftest.$ac_ext >&5
13371   rm -rf conftest*
13372   eval "ac_cv_lib_$ac_lib_var=no"
13373 fi
13374 rm -f conftest*
13375 xe_check_libs=""
13376
13377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13378   echo "$ac_t""yes" 1>&6
13379   native_sound_lib="-laudio"
13380 else
13381   echo "$ac_t""no" 1>&6
13382 fi
13383
13384
13385       fi
13386       if test -n "$native_sound_lib"; then
13387         sound_found=yes sound_cflags=""
13388         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13389    echo "    xemacs will be linked with \"sgiplay.o\""
13390  fi
13391       fi ;;
13392     hppa*-hp-hpux* )
13393       if test -z "$native_sound_lib"; then
13394         
13395 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13396 echo "configure:13397: checking for AOpenAudio in -lAlib" >&5
13397 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13398
13399 xe_check_libs=" -lAlib "
13400 cat > conftest.$ac_ext <<EOF
13401 #line 13402 "configure"
13402 #include "confdefs.h"
13403 /* Override any gcc2 internal prototype to avoid an error.  */
13404 /* We use char because int might match the return type of a gcc2
13405     builtin and then its argument prototype would still apply.  */
13406 char AOpenAudio();
13407
13408 int main() {
13409 AOpenAudio()
13410 ; return 0; }
13411 EOF
13412 if { (eval echo configure:13413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13413   rm -rf conftest*
13414   eval "ac_cv_lib_$ac_lib_var=yes"
13415 else
13416   echo "configure: failed program was:" >&5
13417   cat conftest.$ac_ext >&5
13418   rm -rf conftest*
13419   eval "ac_cv_lib_$ac_lib_var=no"
13420 fi
13421 rm -f conftest*
13422 xe_check_libs=""
13423
13424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13425   echo "$ac_t""yes" 1>&6
13426   native_sound_lib="-lAlib"
13427 else
13428   echo "$ac_t""no" 1>&6
13429 fi
13430
13431
13432       fi
13433       if test -n "$native_sound_lib"; then
13434         sound_found=yes
13435         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13436    echo "    xemacs will be linked with \"hpplay.o\""
13437  fi
13438         if test "$GCC" = "yes" # Kludge city
13439           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13440           else sound_cflags="+e -I/usr/audio/examples"
13441         fi
13442       fi ;;
13443     esac
13444   fi
13445
13446     if test -z "$sound_found"; then
13447     if test "$with_msw" = "yes"; then
13448     sound_found=yes
13449     native_sound_lib=
13450     fi
13451   fi
13452
13453     if test -z "$sound_found"; then
13454     for dir in "machine" "sys" "linux"; do
13455       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13456 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13457 echo "configure:13458: checking for ${dir}/soundcard.h" >&5
13458
13459 cat > conftest.$ac_ext <<EOF
13460 #line 13461 "configure"
13461 #include "confdefs.h"
13462 #include <${dir}/soundcard.h>
13463 EOF
13464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13465 { (eval echo configure:13466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13467 if test -z "$ac_err"; then
13468   rm -rf conftest*
13469   eval "ac_cv_header_$ac_safe=yes"
13470 else
13471   echo "$ac_err" >&5
13472   echo "configure: failed program was:" >&5
13473   cat conftest.$ac_ext >&5
13474   rm -rf conftest*
13475   eval "ac_cv_header_$ac_safe=no"
13476 fi
13477 rm -f conftest*
13478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13479   echo "$ac_t""yes" 1>&6
13480   sound_found=yes
13481        need_miscplay=yes
13482         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13483    echo "    xemacs will be linked with \"linuxplay.o\""
13484  fi
13485         { test "$extra_verbose" = "yes" && cat << EOF
13486     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13487 EOF
13488 cat >> confdefs.h <<EOF
13489 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13490 EOF
13491 }
13492
13493         break
13494 else
13495   echo "$ac_t""no" 1>&6
13496 fi
13497
13498     done
13499   fi
13500
13501   test "$sound_found" = "yes" && with_native_sound=yes
13502 fi
13503
13504 if test "$with_native_sound" = "yes"; then
13505   { test "$extra_verbose" = "yes" && cat << \EOF
13506     Defining HAVE_NATIVE_SOUND
13507 EOF
13508 cat >> confdefs.h <<\EOF
13509 #define HAVE_NATIVE_SOUND 1
13510 EOF
13511 }
13512
13513   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13514 fi
13515
13516 if test "$with_nas_sound" != "no"; then
13517   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13518 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13519 echo "configure:13520: checking for audio/audiolib.h" >&5
13520
13521 cat > conftest.$ac_ext <<EOF
13522 #line 13523 "configure"
13523 #include "confdefs.h"
13524 #include <audio/audiolib.h>
13525 EOF
13526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13527 { (eval echo configure:13528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13529 if test -z "$ac_err"; then
13530   rm -rf conftest*
13531   eval "ac_cv_header_$ac_safe=yes"
13532 else
13533   echo "$ac_err" >&5
13534   echo "configure: failed program was:" >&5
13535   cat conftest.$ac_ext >&5
13536   rm -rf conftest*
13537   eval "ac_cv_header_$ac_safe=no"
13538 fi
13539 rm -f conftest*
13540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13541   echo "$ac_t""yes" 1>&6
13542   
13543     
13544 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13545 echo "configure:13546: checking for AuOpenServer in -laudio" >&5
13546 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13547
13548 xe_check_libs=" -laudio "
13549 cat > conftest.$ac_ext <<EOF
13550 #line 13551 "configure"
13551 #include "confdefs.h"
13552 /* Override any gcc2 internal prototype to avoid an error.  */
13553 /* We use char because int might match the return type of a gcc2
13554     builtin and then its argument prototype would still apply.  */
13555 char AuOpenServer();
13556
13557 int main() {
13558 AuOpenServer()
13559 ; return 0; }
13560 EOF
13561 if { (eval echo configure:13562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13562   rm -rf conftest*
13563   eval "ac_cv_lib_$ac_lib_var=yes"
13564 else
13565   echo "configure: failed program was:" >&5
13566   cat conftest.$ac_ext >&5
13567   rm -rf conftest*
13568   eval "ac_cv_lib_$ac_lib_var=no"
13569 fi
13570 rm -f conftest*
13571 xe_check_libs=""
13572
13573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13574   echo "$ac_t""yes" 1>&6
13575   have_nas_sound=yes
13576 else
13577   echo "$ac_t""no" 1>&6
13578 fi
13579
13580
13581 else
13582   echo "$ac_t""no" 1>&6
13583 fi
13584
13585   if test "$have_nas_sound" = "yes"; then
13586     with_nas_sound=yes
13587     { test "$extra_verbose" = "yes" && cat << \EOF
13588     Defining HAVE_NAS_SOUND
13589 EOF
13590 cat >> confdefs.h <<\EOF
13591 #define HAVE_NAS_SOUND 1
13592 EOF
13593 }
13594
13595     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13596    echo "    xemacs will be linked with \"nas.o\""
13597  fi
13598     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13599             cat > conftest.$ac_ext <<EOF
13600 #line 13601 "configure"
13601 #include "confdefs.h"
13602 #include <audio/Xtutil.h>
13603 EOF
13604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13605   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13606   :
13607 else
13608   rm -rf conftest*
13609   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13610     Defining NAS_NO_ERROR_JUMP
13611 EOF
13612 cat >> confdefs.h <<\EOF
13613 #define NAS_NO_ERROR_JUMP 1
13614 EOF
13615 }
13616
13617 fi
13618 rm -f conftest*
13619
13620   else
13621     test "$with_nas_sound" = "yes" && \
13622       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13623     with_nas_sound=no
13624   fi
13625 fi
13626
13627 if test "$with_esd_sound" != "no"; then
13628   # Extract the first word of "esd-config", so it can be a program name with args.
13629 set dummy esd-config; ac_word=$2
13630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13631 echo "configure:13632: checking for $ac_word" >&5
13632
13633 if test -n "$have_esd_config"; then
13634   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13635 else
13636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13637   ac_dummy="$PATH"
13638   for ac_dir in $ac_dummy; do
13639     test -z "$ac_dir" && ac_dir=.
13640     if test -f $ac_dir/$ac_word; then
13641       ac_cv_prog_have_esd_config="yes"
13642       break
13643     fi
13644   done
13645   IFS="$ac_save_ifs"
13646   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13647 fi
13648 have_esd_config="$ac_cv_prog_have_esd_config"
13649 if test -n "$have_esd_config"; then
13650   echo "$ac_t""$have_esd_config" 1>&6
13651 else
13652   echo "$ac_t""no" 1>&6
13653 fi
13654
13655   if test "$have_esd_config" = "yes"; then
13656     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13657     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
13658     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13659     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13660 echo "configure:13661: checking for esd_play_stream" >&5
13661
13662 cat > conftest.$ac_ext <<EOF
13663 #line 13664 "configure"
13664 #include "confdefs.h"
13665 /* System header to define __stub macros and hopefully few prototypes,
13666     which can conflict with char esd_play_stream(); below.  */
13667 #include <assert.h>
13668 /* Override any gcc2 internal prototype to avoid an error.  */
13669 /* We use char because int might match the return type of a gcc2
13670     builtin and then its argument prototype would still apply.  */
13671 char esd_play_stream();
13672
13673 int main() {
13674
13675 /* The GNU C library defines this for functions which it implements
13676     to always fail with ENOSYS.  Some functions are actually named
13677     something starting with __ and the normal name is an alias.  */
13678 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13679 choke me
13680 #else
13681 esd_play_stream();
13682 #endif
13683
13684 ; return 0; }
13685 EOF
13686 if { (eval echo configure:13687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13687   rm -rf conftest*
13688   eval "ac_cv_func_esd_play_stream=yes"
13689 else
13690   echo "configure: failed program was:" >&5
13691   cat conftest.$ac_ext >&5
13692   rm -rf conftest*
13693   eval "ac_cv_func_esd_play_stream=no"
13694 fi
13695 rm -f conftest*
13696
13697 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13698   echo "$ac_t""yes" 1>&6
13699   have_esd_sound=yes
13700 else
13701   echo "$ac_t""no" 1>&6
13702 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13703 fi
13704
13705   fi
13706
13707   if test "$have_esd_sound" = "yes"; then
13708     with_esd_sound=yes
13709     need_miscplay=yes
13710     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13711    echo "    xemacs will be linked with \"esd.o\""
13712  fi
13713     { test "$extra_verbose" = "yes" && cat << \EOF
13714     Defining HAVE_ESD_SOUND
13715 EOF
13716 cat >> confdefs.h <<\EOF
13717 #define HAVE_ESD_SOUND 1
13718 EOF
13719 }
13720
13721   else
13722     test "$with_esd_sound" = "yes" && \
13723       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13724     with_esd_sound=no
13725   fi
13726 fi
13727
13728 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13729    echo "    xemacs will be linked with \"miscplay.o\""
13730  fi
13731
13732
13733 test -z "$with_tty" && with_tty=yes
13734
13735 if test "$with_tty" = "yes"  ; then
13736   echo "checking for TTY-related features" 1>&6
13737 echo "configure:13738: checking for TTY-related features" >&5
13738   { test "$extra_verbose" = "yes" && cat << \EOF
13739     Defining HAVE_TTY
13740 EOF
13741 cat >> confdefs.h <<\EOF
13742 #define HAVE_TTY 1
13743 EOF
13744 }
13745
13746   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
13747    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\""
13748  fi
13749
13750     if test -z "$with_ncurses"; then
13751     
13752 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13753 echo "configure:13754: checking for tgetent in -lncurses" >&5
13754 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13755
13756 xe_check_libs=" -lncurses "
13757 cat > conftest.$ac_ext <<EOF
13758 #line 13759 "configure"
13759 #include "confdefs.h"
13760 /* Override any gcc2 internal prototype to avoid an error.  */
13761 /* We use char because int might match the return type of a gcc2
13762     builtin and then its argument prototype would still apply.  */
13763 char tgetent();
13764
13765 int main() {
13766 tgetent()
13767 ; return 0; }
13768 EOF
13769 if { (eval echo configure:13770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13770   rm -rf conftest*
13771   eval "ac_cv_lib_$ac_lib_var=yes"
13772 else
13773   echo "configure: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   rm -rf conftest*
13776   eval "ac_cv_lib_$ac_lib_var=no"
13777 fi
13778 rm -f conftest*
13779 xe_check_libs=""
13780
13781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13782   echo "$ac_t""yes" 1>&6
13783   with_ncurses=yes
13784 else
13785   echo "$ac_t""no" 1>&6
13786 with_ncurses=no
13787 fi
13788
13789
13790   fi
13791   if test "$with_ncurses" = "yes"; then
13792     { test "$extra_verbose" = "yes" && cat << \EOF
13793     Defining HAVE_NCURSES
13794 EOF
13795 cat >> confdefs.h <<\EOF
13796 #define HAVE_NCURSES 1
13797 EOF
13798 }
13799
13800     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13801 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13802 echo "configure:13803: checking for ncurses/curses.h" >&5
13803
13804 cat > conftest.$ac_ext <<EOF
13805 #line 13806 "configure"
13806 #include "confdefs.h"
13807 #include <ncurses/curses.h>
13808 EOF
13809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13810 { (eval echo configure:13811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13812 if test -z "$ac_err"; then
13813   rm -rf conftest*
13814   eval "ac_cv_header_$ac_safe=yes"
13815 else
13816   echo "$ac_err" >&5
13817   echo "configure: failed program was:" >&5
13818   cat conftest.$ac_ext >&5
13819   rm -rf conftest*
13820   eval "ac_cv_header_$ac_safe=no"
13821 fi
13822 rm -f conftest*
13823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13824   echo "$ac_t""yes" 1>&6
13825   curses_h_file=ncurses/curses.h
13826 else
13827   echo "$ac_t""no" 1>&6
13828 fi
13829
13830     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13831 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13832 echo "configure:13833: checking for ncurses/term.h" >&5
13833
13834 cat > conftest.$ac_ext <<EOF
13835 #line 13836 "configure"
13836 #include "confdefs.h"
13837 #include <ncurses/term.h>
13838 EOF
13839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13840 { (eval echo configure:13841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13842 if test -z "$ac_err"; then
13843   rm -rf conftest*
13844   eval "ac_cv_header_$ac_safe=yes"
13845 else
13846   echo "$ac_err" >&5
13847   echo "configure: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   rm -rf conftest*
13850   eval "ac_cv_header_$ac_safe=no"
13851 fi
13852 rm -f conftest*
13853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13854   echo "$ac_t""yes" 1>&6
13855   term_h_file=ncurses/term.h
13856 else
13857   echo "$ac_t""no" 1>&6
13858 fi
13859
13860     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13861    echo "    xemacs will be linked with \"terminfo.o\""
13862  fi
13863     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13864
13865     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13866                         save_c_switch_site="$c_switch_site"
13867       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13868       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13869 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13870 echo "configure:13871: checking for ncurses/curses.h" >&5
13871
13872 cat > conftest.$ac_ext <<EOF
13873 #line 13874 "configure"
13874 #include "confdefs.h"
13875 #include <ncurses/curses.h>
13876 EOF
13877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13878 { (eval echo configure:13879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13880 if test -z "$ac_err"; then
13881   rm -rf conftest*
13882   eval "ac_cv_header_$ac_safe=yes"
13883 else
13884   echo "$ac_err" >&5
13885   echo "configure: failed program was:" >&5
13886   cat conftest.$ac_ext >&5
13887   rm -rf conftest*
13888   eval "ac_cv_header_$ac_safe=no"
13889 fi
13890 rm -f conftest*
13891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13892   echo "$ac_t""yes" 1>&6
13893   curses_h_file=ncurses/curses.h
13894 else
13895   echo "$ac_t""no" 1>&6
13896 fi
13897
13898       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13899         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13900         else c_switch_site="$save_c_switch_site"
13901       fi
13902     fi
13903   else         if test "$have_terminfo" = "yes"; then
13904       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13905    echo "    xemacs will be linked with \"terminfo.o\""
13906  fi
13907       if test -n "$libs_termcap"; then
13908         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13909       else
13910         for lib in curses termlib termcap; do
13911           
13912 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13913 echo "configure:13914: checking for tgetent in -l$lib" >&5
13914 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13915
13916 xe_check_libs=" -l$lib "
13917 cat > conftest.$ac_ext <<EOF
13918 #line 13919 "configure"
13919 #include "confdefs.h"
13920 /* Override any gcc2 internal prototype to avoid an error.  */
13921 /* We use char because int might match the return type of a gcc2
13922     builtin and then its argument prototype would still apply.  */
13923 char tgetent();
13924
13925 int main() {
13926 tgetent()
13927 ; return 0; }
13928 EOF
13929 if { (eval echo configure:13930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13930   rm -rf conftest*
13931   eval "ac_cv_lib_$ac_lib_var=yes"
13932 else
13933   echo "configure: failed program was:" >&5
13934   cat conftest.$ac_ext >&5
13935   rm -rf conftest*
13936   eval "ac_cv_lib_$ac_lib_var=no"
13937 fi
13938 rm -f conftest*
13939 xe_check_libs=""
13940
13941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13942   echo "$ac_t""yes" 1>&6
13943   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13944 else
13945   echo "$ac_t""no" 1>&6
13946 fi
13947
13948
13949         done
13950       fi
13951     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13952                                 
13953 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13954 echo "configure:13955: checking for tgoto in -ltermcap" >&5
13955 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13956
13957 xe_check_libs=" -ltermcap "
13958 cat > conftest.$ac_ext <<EOF
13959 #line 13960 "configure"
13960 #include "confdefs.h"
13961 /* Override any gcc2 internal prototype to avoid an error.  */
13962 /* We use char because int might match the return type of a gcc2
13963     builtin and then its argument prototype would still apply.  */
13964 char tgoto();
13965
13966 int main() {
13967 tgoto()
13968 ; return 0; }
13969 EOF
13970 if { (eval echo configure:13971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13971   rm -rf conftest*
13972   eval "ac_cv_lib_$ac_lib_var=yes"
13973 else
13974   echo "configure: failed program was:" >&5
13975   cat conftest.$ac_ext >&5
13976   rm -rf conftest*
13977   eval "ac_cv_lib_$ac_lib_var=no"
13978 fi
13979 rm -f conftest*
13980 xe_check_libs=""
13981
13982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13983   echo "$ac_t""yes" 1>&6
13984     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13986   { test "$extra_verbose" = "yes" && cat << EOF
13987     Defining $ac_tr_lib
13988 EOF
13989 cat >> confdefs.h <<EOF
13990 #define $ac_tr_lib 1
13991 EOF
13992 }
13993
13994   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13995
13996 else
13997   echo "$ac_t""no" 1>&6
13998 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13999    echo "    xemacs will be linked with \"tparam.o\""
14000  fi
14001 fi
14002
14003
14004       else
14005         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14006    echo "    xemacs will be linked with \"tparam.o\""
14007  fi
14008       fi
14009                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
14010       if test -n "$libs_termcap"; then
14011         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14012       else
14013         
14014 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
14015 echo "configure:14016: checking for tgetent in -lcurses" >&5
14016 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
14017
14018 xe_check_libs=" -lcurses "
14019 cat > conftest.$ac_ext <<EOF
14020 #line 14021 "configure"
14021 #include "confdefs.h"
14022 /* Override any gcc2 internal prototype to avoid an error.  */
14023 /* We use char because int might match the return type of a gcc2
14024     builtin and then its argument prototype would still apply.  */
14025 char tgetent();
14026
14027 int main() {
14028 tgetent()
14029 ; return 0; }
14030 EOF
14031 if { (eval echo configure:14032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14032   rm -rf conftest*
14033   eval "ac_cv_lib_$ac_lib_var=yes"
14034 else
14035   echo "configure: failed program was:" >&5
14036   cat conftest.$ac_ext >&5
14037   rm -rf conftest*
14038   eval "ac_cv_lib_$ac_lib_var=no"
14039 fi
14040 rm -f conftest*
14041 xe_check_libs=""
14042
14043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14044   echo "$ac_t""yes" 1>&6
14045   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
14046 else
14047   echo "$ac_t""no" 1>&6
14048 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
14049 echo "configure:14050: checking for tgetent in -ltermcap" >&5
14050 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
14051
14052 xe_check_libs=" -ltermcap "
14053 cat > conftest.$ac_ext <<EOF
14054 #line 14055 "configure"
14055 #include "confdefs.h"
14056 /* Override any gcc2 internal prototype to avoid an error.  */
14057 /* We use char because int might match the return type of a gcc2
14058     builtin and then its argument prototype would still apply.  */
14059 char tgetent();
14060
14061 int main() {
14062 tgetent()
14063 ; return 0; }
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14066   rm -rf conftest*
14067   eval "ac_cv_lib_$ac_lib_var=yes"
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071   rm -rf conftest*
14072   eval "ac_cv_lib_$ac_lib_var=no"
14073 fi
14074 rm -f conftest*
14075 xe_check_libs=""
14076
14077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14078   echo "$ac_t""yes" 1>&6
14079   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14080 else
14081   echo "$ac_t""no" 1>&6
14082 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14083    echo "    xemacs will be linked with \"termcap.o\""
14084  fi
14085 fi
14086
14087
14088 fi
14089
14090
14091       fi
14092     fi
14093   fi
14094   { test "$extra_verbose" = "yes" && cat << EOF
14095     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14096 EOF
14097 cat >> confdefs.h <<EOF
14098 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14099 EOF
14100 }
14101
14102   { test "$extra_verbose" = "yes" && cat << EOF
14103     Defining TERM_H_FILE = "${term_h_file-term.h}"
14104 EOF
14105 cat >> confdefs.h <<EOF
14106 #define TERM_H_FILE "${term_h_file-term.h}"
14107 EOF
14108 }
14109
14110
14111     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14112 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14113 echo "configure:14114: checking for gpm.h" >&5
14114
14115 cat > conftest.$ac_ext <<EOF
14116 #line 14117 "configure"
14117 #include "confdefs.h"
14118 #include <gpm.h>
14119 EOF
14120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14121 { (eval echo configure:14122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14123 if test -z "$ac_err"; then
14124   rm -rf conftest*
14125   eval "ac_cv_header_$ac_safe=yes"
14126 else
14127   echo "$ac_err" >&5
14128   echo "configure: failed program was:" >&5
14129   cat conftest.$ac_ext >&5
14130   rm -rf conftest*
14131   eval "ac_cv_header_$ac_safe=no"
14132 fi
14133 rm -f conftest*
14134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14135   echo "$ac_t""yes" 1>&6
14136   :
14137 else
14138   echo "$ac_t""no" 1>&6
14139 with_gpm=no
14140 fi
14141  }
14142   test -z "$with_gpm" && { 
14143 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14144 echo "configure:14145: checking for Gpm_Open in -lgpm" >&5
14145 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14146
14147 xe_check_libs=" -lgpm "
14148 cat > conftest.$ac_ext <<EOF
14149 #line 14150 "configure"
14150 #include "confdefs.h"
14151 /* Override any gcc2 internal prototype to avoid an error.  */
14152 /* We use char because int might match the return type of a gcc2
14153     builtin and then its argument prototype would still apply.  */
14154 char Gpm_Open();
14155
14156 int main() {
14157 Gpm_Open()
14158 ; return 0; }
14159 EOF
14160 if { (eval echo configure:14161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14161   rm -rf conftest*
14162   eval "ac_cv_lib_$ac_lib_var=yes"
14163 else
14164   echo "configure: failed program was:" >&5
14165   cat conftest.$ac_ext >&5
14166   rm -rf conftest*
14167   eval "ac_cv_lib_$ac_lib_var=no"
14168 fi
14169 rm -f conftest*
14170 xe_check_libs=""
14171
14172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14173   echo "$ac_t""yes" 1>&6
14174   with_gpm=yes
14175 else
14176   echo "$ac_t""no" 1>&6
14177 with_gpm=no
14178 fi
14179
14180  }
14181   if test "$with_gpm" = "yes"; then
14182     { test "$extra_verbose" = "yes" && cat << \EOF
14183     Defining HAVE_GPM
14184 EOF
14185 cat >> confdefs.h <<\EOF
14186 #define HAVE_GPM 1
14187 EOF
14188 }
14189
14190     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14191    echo "    xemacs will be linked with \"gpmevent.o\""
14192  fi
14193     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14194   fi
14195
14196 else   for feature in ncurses gpm; do
14197     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14198       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14199     fi
14200     eval "with_${feature}=no"
14201   done
14202 fi 
14203 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
14204    echo "    xemacs will be linked with \"event-unixoid.o\""
14205  fi
14206
14207
14208 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14209   != "no no no" && echo "checking for database support" 1>&6
14210 echo "configure:14211: checking for database support" >&5
14211
14212 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14213   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14214 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14215 echo "configure:14216: checking for ndbm.h" >&5
14216
14217 cat > conftest.$ac_ext <<EOF
14218 #line 14219 "configure"
14219 #include "confdefs.h"
14220 #include <ndbm.h>
14221 EOF
14222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14223 { (eval echo configure:14224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14225 if test -z "$ac_err"; then
14226   rm -rf conftest*
14227   eval "ac_cv_header_$ac_safe=yes"
14228 else
14229   echo "$ac_err" >&5
14230   echo "configure: failed program was:" >&5
14231   cat conftest.$ac_ext >&5
14232   rm -rf conftest*
14233   eval "ac_cv_header_$ac_safe=no"
14234 fi
14235 rm -f conftest*
14236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14237   echo "$ac_t""yes" 1>&6
14238   :
14239 else
14240   echo "$ac_t""no" 1>&6
14241
14242     test "$with_database_gdbm" = "yes" -o \
14243          "$with_database_dbm"  = "yes" && \
14244       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14245     with_database_gdbm=no with_database_dbm=no
14246 fi
14247
14248 fi
14249
14250 if test "$with_database_gdbm" != "no"; then
14251   
14252 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14253 echo "configure:14254: checking for dbm_open in -lgdbm" >&5
14254 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14255
14256 xe_check_libs=" -lgdbm "
14257 cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 /* Override any gcc2 internal prototype to avoid an error.  */
14261 /* We use char because int might match the return type of a gcc2
14262     builtin and then its argument prototype would still apply.  */
14263 char dbm_open();
14264
14265 int main() {
14266 dbm_open()
14267 ; return 0; }
14268 EOF
14269 if { (eval echo configure:14270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14270   rm -rf conftest*
14271   eval "ac_cv_lib_$ac_lib_var=yes"
14272 else
14273   echo "configure: failed program was:" >&5
14274   cat conftest.$ac_ext >&5
14275   rm -rf conftest*
14276   eval "ac_cv_lib_$ac_lib_var=no"
14277 fi
14278 rm -f conftest*
14279 xe_check_libs=""
14280
14281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14282   echo "$ac_t""yes" 1>&6
14283   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14284 else
14285   echo "$ac_t""no" 1>&6
14286 if test "$with_database_gdbm" = "yes"; then
14287      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14288    fi
14289    with_database_gdbm=no
14290 fi
14291
14292
14293 fi
14294
14295 if test "$with_database_dbm" != "no"; then
14296   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14297 echo "configure:14298: checking for dbm_open" >&5
14298
14299 cat > conftest.$ac_ext <<EOF
14300 #line 14301 "configure"
14301 #include "confdefs.h"
14302 /* System header to define __stub macros and hopefully few prototypes,
14303     which can conflict with char dbm_open(); below.  */
14304 #include <assert.h>
14305 /* Override any gcc2 internal prototype to avoid an error.  */
14306 /* We use char because int might match the return type of a gcc2
14307     builtin and then its argument prototype would still apply.  */
14308 char dbm_open();
14309
14310 int main() {
14311
14312 /* The GNU C library defines this for functions which it implements
14313     to always fail with ENOSYS.  Some functions are actually named
14314     something starting with __ and the normal name is an alias.  */
14315 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14316 choke me
14317 #else
14318 dbm_open();
14319 #endif
14320
14321 ; return 0; }
14322 EOF
14323 if { (eval echo configure:14324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14324   rm -rf conftest*
14325   eval "ac_cv_func_dbm_open=yes"
14326 else
14327   echo "configure: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329   rm -rf conftest*
14330   eval "ac_cv_func_dbm_open=no"
14331 fi
14332 rm -f conftest*
14333
14334 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14335   echo "$ac_t""yes" 1>&6
14336   with_database_dbm=yes libdbm=
14337 else
14338   echo "$ac_t""no" 1>&6
14339
14340     
14341 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14342 echo "configure:14343: checking for dbm_open in -ldbm" >&5
14343 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14344
14345 xe_check_libs=" -ldbm "
14346 cat > conftest.$ac_ext <<EOF
14347 #line 14348 "configure"
14348 #include "confdefs.h"
14349 /* Override any gcc2 internal prototype to avoid an error.  */
14350 /* We use char because int might match the return type of a gcc2
14351     builtin and then its argument prototype would still apply.  */
14352 char dbm_open();
14353
14354 int main() {
14355 dbm_open()
14356 ; return 0; }
14357 EOF
14358 if { (eval echo configure:14359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14359   rm -rf conftest*
14360   eval "ac_cv_lib_$ac_lib_var=yes"
14361 else
14362   echo "configure: failed program was:" >&5
14363   cat conftest.$ac_ext >&5
14364   rm -rf conftest*
14365   eval "ac_cv_lib_$ac_lib_var=no"
14366 fi
14367 rm -f conftest*
14368 xe_check_libs=""
14369
14370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14371   echo "$ac_t""yes" 1>&6
14372   with_database_dbm=yes libdbm=-ldbm
14373 else
14374   echo "$ac_t""no" 1>&6
14375 test "$with_database_dbm" = "yes" && \
14376         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14377       with_database_dbm=no
14378 fi
14379
14380
14381 fi
14382
14383 fi
14384
14385 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14386 test "$with_database_gdbm" = "yes" -o \
14387      "$with_database_dbm"  = "yes" && \
14388   { test "$extra_verbose" = "yes" && cat << \EOF
14389     Defining HAVE_DBM
14390 EOF
14391 cat >> confdefs.h <<\EOF
14392 #define HAVE_DBM 1
14393 EOF
14394 }
14395
14396
14397 if test "$with_database_berkdb" != "no"; then
14398   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14399 echo "configure:14400: checking for Berkeley db.h" >&5
14400   for header in "db/db.h" "db.h"; do
14401     case "$opsys" in
14402         *freebsd*)
14403     cat > conftest.$ac_ext <<EOF
14404 #line 14405 "configure"
14405 #include "confdefs.h"
14406
14407 #include <stdlib.h>
14408 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14409 #ifdef HAVE_INTTYPES_H
14410 #define __BIT_TYPES_DEFINED__
14411 #include <inttypes.h>
14412 #endif
14413 #endif
14414 #include <$header>
14415
14416 int main() {
14417
14418 ; return 0; }
14419 EOF
14420 if { (eval echo configure:14421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14421   rm -rf conftest*
14422   db_h_file="$header"; break
14423 else
14424   echo "configure: failed program was:" >&5
14425   cat conftest.$ac_ext >&5
14426 fi
14427 rm -f conftest*
14428         ;;
14429         *)
14430     cat > conftest.$ac_ext <<EOF
14431 #line 14432 "configure"
14432 #include "confdefs.h"
14433
14434 #include <stdlib.h>
14435 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14436 #ifdef HAVE_INTTYPES_H
14437 #define __BIT_TYPES_DEFINED__
14438 #include <inttypes.h>
14439 typedef uint8_t  u_int8_t;
14440 typedef uint16_t u_int16_t;
14441 typedef uint32_t u_int32_t;
14442 #ifdef WE_DONT_NEED_QUADS
14443 typedef uint64_t u_int64_t;
14444 #endif
14445 #endif
14446 #endif
14447 #include <$header>
14448
14449 int main() {
14450
14451 ; return 0; }
14452 EOF
14453 if { (eval echo configure:14454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14454   rm -rf conftest*
14455   db_h_file="$header"; break
14456 else
14457   echo "configure: failed program was:" >&5
14458   cat conftest.$ac_ext >&5
14459 fi
14460 rm -f conftest*
14461         ;;
14462         esac
14463   done
14464   if test -z "$db_h_file"
14465   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14466   else echo "$ac_t""$db_h_file" 1>&6
14467   fi
14468
14469   if test "$with_database_berkdb" != "no"; then
14470     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14471 echo "configure:14472: checking for Berkeley DB version" >&5
14472     cat > conftest.$ac_ext <<EOF
14473 #line 14474 "configure"
14474 #include "confdefs.h"
14475 #include <$db_h_file>
14476 #if DB_VERSION_MAJOR > 1
14477 yes
14478 #endif
14479
14480 EOF
14481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14482   egrep "yes" >/dev/null 2>&1; then
14483   rm -rf conftest*
14484   cat > conftest.$ac_ext <<EOF
14485 #line 14486 "configure"
14486 #include "confdefs.h"
14487 #include <$db_h_file>
14488 #if DB_VERSION_MAJOR > 2
14489 yes
14490 #endif
14491
14492 EOF
14493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14494   egrep "yes" >/dev/null 2>&1; then
14495   rm -rf conftest*
14496   echo "$ac_t""3" 1>&6; dbfunc=db_create
14497 else
14498   rm -rf conftest*
14499   
14500     echo "$ac_t""2" 1>&6; dbfunc=db_open
14501 fi
14502 rm -f conftest*
14503
14504 else
14505   rm -rf conftest*
14506   
14507     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14508 fi
14509 rm -f conftest*
14510
14511     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14512 echo "configure:14513: checking for $dbfunc" >&5
14513
14514 cat > conftest.$ac_ext <<EOF
14515 #line 14516 "configure"
14516 #include "confdefs.h"
14517 /* System header to define __stub macros and hopefully few prototypes,
14518     which can conflict with char $dbfunc(); below.  */
14519 #include <assert.h>
14520 /* Override any gcc2 internal prototype to avoid an error.  */
14521 /* We use char because int might match the return type of a gcc2
14522     builtin and then its argument prototype would still apply.  */
14523 char $dbfunc();
14524
14525 int main() {
14526
14527 /* The GNU C library defines this for functions which it implements
14528     to always fail with ENOSYS.  Some functions are actually named
14529     something starting with __ and the normal name is an alias.  */
14530 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14531 choke me
14532 #else
14533 $dbfunc();
14534 #endif
14535
14536 ; return 0; }
14537 EOF
14538 if { (eval echo configure:14539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14539   rm -rf conftest*
14540   eval "ac_cv_func_$dbfunc=yes"
14541 else
14542   echo "configure: failed program was:" >&5
14543   cat conftest.$ac_ext >&5
14544   rm -rf conftest*
14545   eval "ac_cv_func_$dbfunc=no"
14546 fi
14547 rm -f conftest*
14548
14549 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14550   echo "$ac_t""yes" 1>&6
14551   with_database_berkdb=yes need_libdb=no
14552 else
14553   echo "$ac_t""no" 1>&6
14554
14555     
14556 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14557 echo "configure:14558: checking for $dbfunc in -ldb" >&5
14558 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14559
14560 xe_check_libs=" -ldb "
14561 cat > conftest.$ac_ext <<EOF
14562 #line 14563 "configure"
14563 #include "confdefs.h"
14564 /* Override any gcc2 internal prototype to avoid an error.  */
14565 /* We use char because int might match the return type of a gcc2
14566     builtin and then its argument prototype would still apply.  */
14567 char $dbfunc();
14568
14569 int main() {
14570 $dbfunc()
14571 ; return 0; }
14572 EOF
14573 if { (eval echo configure:14574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14574   rm -rf conftest*
14575   eval "ac_cv_lib_$ac_lib_var=yes"
14576 else
14577   echo "configure: failed program was:" >&5
14578   cat conftest.$ac_ext >&5
14579   rm -rf conftest*
14580   eval "ac_cv_lib_$ac_lib_var=no"
14581 fi
14582 rm -f conftest*
14583 xe_check_libs=""
14584
14585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14586   echo "$ac_t""yes" 1>&6
14587   with_database_berkdb=yes need_libdb=yes
14588 else
14589   echo "$ac_t""no" 1>&6
14590 fi
14591
14592
14593 fi
14594
14595   fi
14596
14597   if test "$with_database_berkdb" = "yes"; then
14598     { test "$extra_verbose" = "yes" && cat << EOF
14599     Defining DB_H_FILE = "$db_h_file"
14600 EOF
14601 cat >> confdefs.h <<EOF
14602 #define DB_H_FILE "$db_h_file"
14603 EOF
14604 }
14605
14606     { test "$extra_verbose" = "yes" && cat << \EOF
14607     Defining HAVE_BERKELEY_DB
14608 EOF
14609 cat >> confdefs.h <<\EOF
14610 #define HAVE_BERKELEY_DB 1
14611 EOF
14612 }
14613
14614     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14615   else with_database_berkdb=no
14616   fi
14617 fi
14618
14619 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14620      != "no no no"; then
14621   { test "$extra_verbose" = "yes" && cat << \EOF
14622     Defining HAVE_DATABASE
14623 EOF
14624 cat >> confdefs.h <<\EOF
14625 #define HAVE_DATABASE 1
14626 EOF
14627 }
14628
14629   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14630    echo "    xemacs will be linked with \"database.o\""
14631  fi
14632   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
14633     { test "$extra_verbose" = "yes" && cat << \EOF
14634     Defining HAVE_CHISE
14635 EOF
14636 cat >> confdefs.h <<\EOF
14637 #define HAVE_CHISE 1
14638 EOF
14639 }
14640
14641   fi
14642 fi
14643
14644 if test "$with_socks" = "yes"; then
14645   
14646 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14647 echo "configure:14648: checking for SOCKSinit in -lsocks" >&5
14648 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14649
14650 xe_check_libs=" -lsocks "
14651 cat > conftest.$ac_ext <<EOF
14652 #line 14653 "configure"
14653 #include "confdefs.h"
14654 /* Override any gcc2 internal prototype to avoid an error.  */
14655 /* We use char because int might match the return type of a gcc2
14656     builtin and then its argument prototype would still apply.  */
14657 char SOCKSinit();
14658
14659 int main() {
14660 SOCKSinit()
14661 ; return 0; }
14662 EOF
14663 if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14664   rm -rf conftest*
14665   eval "ac_cv_lib_$ac_lib_var=yes"
14666 else
14667   echo "configure: failed program was:" >&5
14668   cat conftest.$ac_ext >&5
14669   rm -rf conftest*
14670   eval "ac_cv_lib_$ac_lib_var=no"
14671 fi
14672 rm -f conftest*
14673 xe_check_libs=""
14674
14675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14676   echo "$ac_t""yes" 1>&6
14677     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14678     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14679   { test "$extra_verbose" = "yes" && cat << EOF
14680     Defining $ac_tr_lib
14681 EOF
14682 cat >> confdefs.h <<EOF
14683 #define $ac_tr_lib 1
14684 EOF
14685 }
14686
14687   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14688
14689 else
14690   echo "$ac_t""no" 1>&6
14691 fi
14692
14693
14694   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14695     Defining HAVE_SOCKS
14696 EOF
14697 cat >> confdefs.h <<\EOF
14698 #define HAVE_SOCKS 1
14699 EOF
14700 }
14701
14702 fi
14703
14704 if test "$usage_tracking" = "yes"; then
14705   { test "$extra_verbose" = "yes" && cat << \EOF
14706     Defining USAGE_TRACKING
14707 EOF
14708 cat >> confdefs.h <<\EOF
14709 #define USAGE_TRACKING 1
14710 EOF
14711 }
14712
14713   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14714 fi
14715
14716 if test "$with_modules" != "no"; then
14717   echo "checking for module support" 1>&6
14718 echo "configure:14719: checking for module support" >&5
14719
14720     if test "$with_msw" = "yes"; then
14721     have_dl=yes;
14722   else
14723         case "$opsys" in
14724       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14725     Defining HAVE_DYLD
14726 EOF
14727 cat >> confdefs.h <<\EOF
14728 #define HAVE_DYLD 1
14729 EOF
14730 }
14731  ;;
14732       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14733 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14734 echo "configure:14735: checking for dlfcn.h" >&5
14735
14736 cat > conftest.$ac_ext <<EOF
14737 #line 14738 "configure"
14738 #include "confdefs.h"
14739 #include <dlfcn.h>
14740 EOF
14741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14742 { (eval echo configure:14743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14744 if test -z "$ac_err"; then
14745   rm -rf conftest*
14746   eval "ac_cv_header_$ac_safe=yes"
14747 else
14748   echo "$ac_err" >&5
14749   echo "configure: failed program was:" >&5
14750   cat conftest.$ac_ext >&5
14751   rm -rf conftest*
14752   eval "ac_cv_header_$ac_safe=no"
14753 fi
14754 rm -f conftest*
14755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14756   echo "$ac_t""yes" 1>&6
14757   
14758            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14759 echo "configure:14760: checking for dlopen in -lc" >&5
14760            cat > conftest.$ac_ext <<EOF
14761 #line 14762 "configure"
14762 #include "confdefs.h"
14763 #include <dlfcn.h>
14764 int main() {
14765               dlopen ("", 0);
14766 ; return 0; }
14767 EOF
14768 if { (eval echo configure:14769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14769   rm -rf conftest*
14770    have_dl=yes 
14771 else
14772   echo "configure: failed program was:" >&5
14773   cat conftest.$ac_ext >&5
14774   rm -rf conftest*
14775   
14776                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14777 echo "configure:14778: checking for dlopen in -ldl" >&5
14778                ac_save_LIBS="$LIBS"
14779                LIBS="-ldl $LIBS"
14780                cat > conftest.$ac_ext <<EOF
14781 #line 14782 "configure"
14782 #include "confdefs.h"
14783 #include <dlfcn.h>
14784 int main() {
14785                  dlopen ("", 0);
14786 ; return 0; }
14787 EOF
14788 if { (eval echo configure:14789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14789   rm -rf conftest*
14790    have_dl=yes 
14791 else
14792   echo "configure: failed program was:" >&5
14793   cat conftest.$ac_ext >&5
14794   rm -rf conftest*
14795   LIBS="$ac_save_LIBS"
14796 fi
14797 rm -f conftest*
14798                ac_save_LIBS=
14799 fi
14800 rm -f conftest*
14801 else
14802   echo "$ac_t""no" 1>&6
14803 fi
14804
14805         if test -n "$have_dl"; then
14806            { test "$extra_verbose" = "yes" && cat << \EOF
14807     Defining HAVE_DLOPEN
14808 EOF
14809 cat >> confdefs.h <<\EOF
14810 #define HAVE_DLOPEN 1
14811 EOF
14812 }
14813
14814         else
14815            
14816 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14817 echo "configure:14818: checking for shl_load in -ldld" >&5
14818 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14819
14820 xe_check_libs=" -ldld "
14821 cat > conftest.$ac_ext <<EOF
14822 #line 14823 "configure"
14823 #include "confdefs.h"
14824 /* Override any gcc2 internal prototype to avoid an error.  */
14825 /* We use char because int might match the return type of a gcc2
14826     builtin and then its argument prototype would still apply.  */
14827 char shl_load();
14828
14829 int main() {
14830 shl_load()
14831 ; return 0; }
14832 EOF
14833 if { (eval echo configure:14834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14834   rm -rf conftest*
14835   eval "ac_cv_lib_$ac_lib_var=yes"
14836 else
14837   echo "configure: failed program was:" >&5
14838   cat conftest.$ac_ext >&5
14839   rm -rf conftest*
14840   eval "ac_cv_lib_$ac_lib_var=no"
14841 fi
14842 rm -f conftest*
14843 xe_check_libs=""
14844
14845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14846   echo "$ac_t""yes" 1>&6
14847   libdl=dld have_dl=yes;
14848            { test "$extra_verbose" = "yes" && cat << \EOF
14849     Defining HAVE_SHL_LOAD
14850 EOF
14851 cat >> confdefs.h <<\EOF
14852 #define HAVE_SHL_LOAD 1
14853 EOF
14854 }
14855
14856 else
14857   echo "$ac_t""no" 1>&6
14858
14859 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14860 echo "configure:14861: checking for dld_init in -ldld" >&5
14861 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14862
14863 xe_check_libs=" -ldld "
14864 cat > conftest.$ac_ext <<EOF
14865 #line 14866 "configure"
14866 #include "confdefs.h"
14867 /* Override any gcc2 internal prototype to avoid an error.  */
14868 /* We use char because int might match the return type of a gcc2
14869     builtin and then its argument prototype would still apply.  */
14870 char dld_init();
14871
14872 int main() {
14873 dld_init()
14874 ; return 0; }
14875 EOF
14876 if { (eval echo configure:14877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14877   rm -rf conftest*
14878   eval "ac_cv_lib_$ac_lib_var=yes"
14879 else
14880   echo "configure: failed program was:" >&5
14881   cat conftest.$ac_ext >&5
14882   rm -rf conftest*
14883   eval "ac_cv_lib_$ac_lib_var=no"
14884 fi
14885 rm -f conftest*
14886 xe_check_libs=""
14887
14888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14889   echo "$ac_t""yes" 1>&6
14890   libdl=dld have_dl=yes;
14891            { test "$extra_verbose" = "yes" && cat << \EOF
14892     Defining HAVE_DLD_INIT
14893 EOF
14894 cat >> confdefs.h <<\EOF
14895 #define HAVE_DLD_INIT 1
14896 EOF
14897 }
14898
14899 else
14900   echo "$ac_t""no" 1>&6
14901 fi
14902
14903
14904 fi
14905
14906
14907         fi
14908     ;;
14909     esac
14910   fi 
14911   if test -n "$have_dl"; then
14912         
14913 dll_ld=
14914 dll_ldflags=
14915 dll_cflags=
14916 dll_post=
14917 dll_ldo="-o"
14918 ld_dynamic_link_flags=
14919 xehost=$canonical
14920 xealias=$internal_configuration
14921
14922 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14923 echo "configure:14924: checking how to build dynamic libraries for ${xehost}" >&5
14924 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14925 case "$xehost" in
14926 *-*-linux-gnu*) ;;
14927 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14928 esac
14929
14930 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14931 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14932 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14933
14934 case "$xehost_os" in
14935 aix3*)
14936   # AIX sometimes has problems with the GCC collect2 program.  For some
14937   # reason, if we set the COLLECT_NAMES environment variable, the problems
14938   # vanish in a puff of smoke.
14939   if test "${COLLECT_NAMES+set}" != set; then
14940     COLLECT_NAMES=
14941     export COLLECT_NAMES
14942   fi
14943   ;;
14944 esac
14945
14946 # Now see if the compiler is really GCC.
14947 if test "$GCC" = "yes"; then
14948   XEGCC=yes
14949 else
14950   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14951 echo "configure:14952: checking checking whether we are using GNU C" >&5
14952   cat > conftest.$ac_ext <<EOF
14953 #line 14954 "configure"
14954 #include "confdefs.h"
14955
14956 #ifdef __GNUC__
14957   yes;
14958 #endif
14959
14960 EOF
14961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14962   egrep "yes" >/dev/null 2>&1; then
14963   rm -rf conftest*
14964   XEGCC=yes
14965 else
14966   rm -rf conftest*
14967   XEGCC=no
14968 fi
14969 rm -f conftest*
14970
14971   echo "$ac_t""${XEGCC}" 1>&6
14972 fi
14973
14974 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14975 echo "configure:14976: checking how to produce PIC code" >&5
14976 wl=
14977
14978 can_build_shared=yes
14979 if test "$XEGCC" = yes -o "$__ICC" = yes; then
14980   wl='-Wl,'
14981
14982   case "$xehost_os" in
14983   aix[3-9]* | irix[5-9]* | osf[3-9])
14984     # PIC is the default for these OSes.
14985     ;;
14986
14987   os2*)
14988     # We can build DLLs from non-PIC.
14989     ;;
14990   amigaos*)
14991     # FIXME: we need at least 68020 code to build shared libraries, but
14992     # adding the `-m68020' flag to GCC prevents building anything better,
14993     # like `-m68040'.
14994     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14995     ;;
14996   *cygwin* | *mingw* )
14997     # PIC is the default
14998     ;;
14999   *)
15000     dll_cflags='-fPIC'
15001     ;;
15002   esac
15003 else
15004   # PORTME Check for PIC flags for the system compiler.
15005   case "$xehost_os" in
15006   hpux9* | hpux1[0-9]*)
15007     # Is there a better link_static_flag that works with the bundled CC?
15008     wl='-Wl,'
15009     dll_cflags='+Z'
15010     ;;
15011
15012   irix[5-9]*)
15013     wl='-Wl,'
15014     # PIC (with -KPIC) is the default.
15015     ;;
15016
15017   os2*)
15018     # We can build DLLs from non-PIC.
15019     ;;
15020
15021   osf[3-9]*)
15022     # All OSF/1 code is PIC.
15023     wl='-Wl,'
15024     ;;
15025
15026   aix[3-9]*)
15027     # All AIX code is PIC.
15028     wl='-Wl,'
15029     ;;
15030
15031   sco3.2v5*)
15032     dll_cflags='-belf -Kpic'
15033     wl='-Wl,'
15034     ;;
15035
15036   unixware*)
15037     dll_cflags="-KPIC"
15038     wl="-Wl,"
15039     ;;
15040
15041   sysv4*)
15042     dll_cflags="-KPIC"
15043     wl="-Wl,"
15044     ;;
15045
15046   sysv5*)
15047     dll_cflags="-KPIC"
15048     wl="-Wl,"
15049     ;;
15050
15051   solaris2*)
15052     dll_cflags='-KPIC'
15053     wl='-Wl,'
15054     ;;
15055
15056   sunos4*)
15057     dll_cflags='-PIC'
15058     wl='-Qoption ld '
15059     ;;
15060
15061   uts4*)
15062     dll_cflags='-pic'
15063     ;;
15064
15065   *)
15066     can_build_shared=no
15067     ;;
15068   esac
15069 fi
15070
15071 if test -n "$dll_cflags"; then
15072   echo "$ac_t""${dll_cflags}" 1>&6
15073
15074   # Check to make sure the dll_cflags actually works.
15075   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
15076 echo "configure:15077: checking if PIC flag ${dll_cflags} really works" >&5
15077   save_CFLAGS="$CFLAGS"
15078   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15079   cat > conftest.$ac_ext <<EOF
15080 #line 15081 "configure"
15081 #include "confdefs.h"
15082
15083 int main() {
15084 int x=0;
15085 ; return 0; }
15086 EOF
15087 if { (eval echo configure:15088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15088   rm -rf conftest*
15089   
15090     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15091     # reports no error.  So, we need to grep stderr for (Bundled).
15092     if grep '(Bundled)' config.log >/dev/null; then
15093       echo "$ac_t""no" 1>&6
15094       can_build_shared=no
15095       dll_cflags=
15096     else
15097       echo "$ac_t""yes" 1>&6
15098     fi
15099 else
15100   echo "configure: failed program was:" >&5
15101   cat conftest.$ac_ext >&5
15102   rm -rf conftest*
15103   echo "$ac_t""no" 1>&6
15104     can_build_shared=no
15105     dll_cflags=
15106 fi
15107 rm -f conftest*
15108   CFLAGS="$save_CFLAGS"
15109 else
15110   echo "$ac_t""none" 1>&6
15111 fi
15112
15113 if test "$can_build_shared" = "yes"; then
15114 cc_produces_so=no
15115 xldf=
15116 xcldf=
15117 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15118 echo "configure:15119: checking if C compiler can produce shared libraries" >&5
15119 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15120   xcldf="-shared"
15121   xldf="-shared"
15122 else # Not using GCC
15123   case "$xehost_os" in
15124     aix[3-9]*)
15125       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15126       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15127       ;;
15128
15129     freebsd2* | netbsd* | openbsd*)
15130       xldf="-Bshareable"
15131       xcldf="${wl}-Bshareable"
15132       ;;
15133
15134     freebsd3*)
15135       xcldf="-shared"
15136       ;;
15137
15138     hpux*)
15139       xldf="-b +s"
15140       xcldf="${wl}-b ${wl}+s"
15141       ;;
15142
15143     irix[5-9]* | osf[3-9]*)
15144       xcldf="${wl}-shared"
15145       xldf="-shared"
15146       ;;
15147
15148     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15149       xcldf="-G"
15150       xldf="-G"
15151       ;;
15152
15153     sunos4*)
15154       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15155       xldf="-assert pure-text -Bstatic"
15156       ;;
15157   esac
15158 fi # End if if we are using gcc
15159
15160 if test -n "$xcldf"; then
15161   save_LDFLAGS=$LDFLAGS
15162   save_LIBS=$LIBS
15163   save_xe_libs=$xe_libs
15164   LDFLAGS="$xcldf $LDFLAGS"
15165   LIBS=
15166   xe_libs=
15167   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15168   cat > conftest.$ac_ext <<EOF
15169 #line 15170 "configure"
15170 #include "confdefs.h"
15171
15172 int main() {
15173 int x=0;
15174 ; return 0; }
15175 EOF
15176 if { (eval echo configure:15177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15177   rm -rf conftest*
15178   cc_produces_so=yes
15179 else
15180   echo "configure: failed program was:" >&5
15181   cat conftest.$ac_ext >&5
15182   rm -rf conftest*
15183   cc_produces_so=no
15184 fi
15185 rm -f conftest*
15186   LDFLAGS=$save_LDFLAGS
15187   LIBS=$save_LIBS
15188   xe_libs=$save_xe_libs
15189   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15190 else
15191   cc_produces_so=no
15192 fi
15193 echo "$ac_t""${cc_produces_so}" 1>&6
15194
15195 LTLD=$LD
15196 if test -z "$LTLD"; then
15197   ac_prog=ld
15198   if test "$XEGCC" = yes; then
15199     # Check if gcc -print-prog-name=ld gives a path.
15200     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15201 echo "configure:15202: checking for ld used by GCC" >&5
15202     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15203     case "$ac_prog" in
15204     # Accept absolute paths.
15205     /*)
15206       if test -z "$LTLD"; then
15207 #        case "$ac_prog" in
15208 #          *gcc-lib*) LTLD="$CC"
15209 #                     ;;
15210 #          *)
15211          LTLD="$ac_prog"
15212 #                     ;;
15213 #        esac
15214       fi
15215       ;;
15216     "")
15217       # If it fails, then pretend we aren't using GCC.
15218       ac_prog=ld
15219       ;;
15220     *)
15221       # If it is relative, then search for the first ld in PATH.
15222       with_gnu_ld=unknown
15223       ;;
15224     esac
15225   else
15226     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15227 echo "configure:15228: checking for GNU ld" >&5
15228   fi
15229
15230   if test -z "$LTLD"; then
15231     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15232     for ac_dir in $PATH; do
15233       test -z "$ac_dir" && ac_dir=.
15234       if test -f "$ac_dir/$ac_prog"; then
15235         LTLD="$ac_dir/$ac_prog"
15236         # Check to see if the program is GNU ld.  I'd rather use --version,
15237         # but apparently some GNU ld's only accept -v.
15238         # Break only if it was the GNU/non-GNU ld that we prefer.
15239         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15240           xe_gnu_ld=yes
15241         else
15242           xe_gnu_ld=no
15243         fi
15244       fi
15245     done
15246     IFS="$ac_save_ifs"
15247   fi
15248
15249   if test -n "$LTLD"; then
15250     echo "$ac_t""${LTLD}" 1>&6
15251   else
15252     echo "$ac_t""no" 1>&6
15253   fi
15254
15255   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15256     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15257     exit 1
15258   fi
15259 fi
15260
15261 ld_dynamic_link_flags=
15262
15263 # Check to see if it really is or isn't GNU ld.
15264 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15265 echo "configure:15266: checking if the linker is GNU ld" >&5
15266 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15267 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15268   xe_gnu_ld=yes
15269 else
15270   xe_gnu_ld=no
15271 fi
15272 echo "$ac_t""${xe_gnu_ld}" 1>&6
15273
15274 case "$xehost_os" in
15275   amigaos* | sunos4*)
15276     # On these operating systems, we should treat GNU ld like the system ld.
15277     gnu_ld_acts_native=yes
15278     ;;
15279   *)
15280     gnu_ld_acts_native=no
15281     ;;
15282 esac
15283
15284 if test "$cc_produces_so" = "yes"; then
15285   dll_ld=$CC
15286   dll_ldflags=$xcldf
15287   can_build_shared=yes
15288   ld_shlibs=yes
15289 else
15290   # OK - only NOW do we futz about with ld.
15291   # See if the linker supports building shared libraries.
15292   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15293 echo "configure:15294: checking whether the linker supports shared libraries" >&5
15294   dll_ld=$CC
15295   dll_ldflags=$LDFLAGS
15296   ld_shlibs=yes
15297   can_build_shared=yes
15298   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15299     # See if GNU ld supports shared libraries.
15300     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15301       dll_ld=$CC
15302       dll_ldflags="-shared"
15303       ld_shlibs=yes
15304     else
15305       ld_shlibs=no
15306     fi
15307   else
15308     # PORTME fill in a description of your system's linker (not GNU ld)
15309     case "$xehost_os" in
15310     aix3*)
15311       dll_ld=$LTLD
15312       dll_ldflags=$xldf
15313       ;;
15314
15315     aix[4-9]*)
15316       dll_ldflags=$xcldf
15317       ;;
15318
15319     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15320     # support.  Future versions do this automatically, but an explicit c++rt0.o
15321     # doesn't break anything, and helps significantly (at the cost of a little
15322     # extra space).
15323     freebsd2.2*)
15324       dll_ld=$LTLD
15325       dll_ldflags=$xldf
15326       dll_post="/usr/lib/c++rt0.o"
15327       ;;
15328
15329     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15330     freebsd2*)
15331       dll_ld=$LTLD
15332       dll_ldflags="-Bshareable"
15333       ;;
15334
15335     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15336     freebsd3*)
15337       dll_ldflags="-shared"
15338       ;;
15339
15340     hpux*)
15341       dll_ld=$LTLD
15342       dll_ldflags=$xldf
15343       ;;
15344
15345     irix[5-9]*)
15346       dll_ld=$LTLD
15347       dll_ldflags=$xldf
15348       ;;
15349
15350     netbsd*)
15351       # Tested with NetBSD 1.2 ld
15352       dll_ld=$LTLD
15353       dll_ldflags=$xldf
15354       ;;
15355
15356     openbsd*)
15357       dll_ld=$LTLD
15358       dll_ldflags=$xldf
15359       ;;
15360
15361     osf3* | osf4*)
15362       dll_ld=$LTLD
15363       dll_ldflags=$xldf
15364       ;;
15365
15366     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15367     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15368       dll_ld=$LTLD
15369       case "$dll_ld" in
15370         *gcc*) dll_ldflags="-shared"
15371                dll_ld=$CC
15372                ;;
15373         *)     dll_ldflags="-G"
15374                ;;
15375       esac
15376       ;;
15377
15378     sunos4*)
15379       if test "$XEGCC" = yes; then
15380         dll_ld=$CC
15381       else
15382         dll_ld=$LTLD
15383       fi
15384       dll_ldflags=$xldf
15385       ;;
15386
15387     uts4*)
15388       dll_ld=$LTLD
15389       dll_ldflags="-G"
15390       ;;
15391
15392     bsdi*)
15393       dll_ldflags="-r"
15394       dll_ld="shlicc2"
15395       ;;
15396
15397     *)
15398       ld_shlibs=no
15399       can_build_shared=no
15400       ;;
15401     esac
15402   fi
15403   echo "$ac_t""${ld_shlibs}" 1>&6
15404   if test "$ld_shlibs" = "no"; then
15405     can_build_shared=no
15406   fi
15407 fi # End of if cc_produces_so = no
15408
15409
15410 if test "$xe_gnu_ld" = yes; then
15411   if test "$ld_shlibs" = yes; then
15412     ld_dynamic_link_flags="${wl}-export-dynamic"
15413   fi
15414 fi
15415
15416 if test -z "$ld_dynamic_link_flags"; then
15417   case "$xehost_os" in
15418   aix[3-9]*)
15419     ld_dynamic_link_flags=
15420     ;;
15421
15422   freebsd2.2*)
15423     ld_dynamic_link_flags=
15424     ;;
15425
15426   freebsd2*)
15427     ld_dynamic_link_flags=
15428     ;;
15429
15430   freebsd3*)
15431     ld_dynamic_link_flags=
15432     ;;
15433
15434   hpux*)
15435     ld_dynamic_link_flags="${wl}-E"
15436     ;;
15437
15438   irix[5-9]*)
15439     ld_dynamic_link_flags=
15440     ;;
15441
15442   netbsd*)
15443     ld_dynamic_link_flags=
15444     ;;
15445
15446   openbsd*)
15447     ld_dynamic_link_flags=
15448     ;;
15449
15450   osf3* | osf4*)
15451     ld_dynamic_link_flags=
15452     ;;
15453
15454   solaris2* | solaris7*)
15455     ld_dynamic_link_flags=
15456     ;;
15457
15458   sco3.2v5* | unixware* | sysv5* | sysv4*)
15459     ld_dynamic_link_flags="${wl}-Bexport"
15460     ;;
15461
15462   sunos4*)
15463     ld_dynamic_link_flags=
15464     ;;
15465
15466   uts4*)
15467     ld_dynamic_link_flags=
15468     ;;
15469
15470   bsdi*)
15471     ld_dynamic_link_flags=
15472     ;;
15473
15474   esac
15475 fi # End of if -z ld_dynamic_link_flags
15476 fi # End of if test "$can_build_shared" = "yes"
15477
15478
15479
15480
15481
15482
15483
15484
15485   fi
15486
15487   if test "$can_build_shared" = "yes"; then
15488     { test "$extra_verbose" = "yes" && cat << \EOF
15489     Defining HAVE_SHLIB
15490 EOF
15491 cat >> confdefs.h <<\EOF
15492 #define HAVE_SHLIB 1
15493 EOF
15494 }
15495
15496     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15497    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15498  fi
15499     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15500     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15501     for ac_func in dlerror _dlerror
15502 do
15503 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15504 echo "configure:15505: checking for $ac_func" >&5
15505
15506 cat > conftest.$ac_ext <<EOF
15507 #line 15508 "configure"
15508 #include "confdefs.h"
15509 /* System header to define __stub macros and hopefully few prototypes,
15510     which can conflict with char $ac_func(); below.  */
15511 #include <assert.h>
15512 /* Override any gcc2 internal prototype to avoid an error.  */
15513 /* We use char because int might match the return type of a gcc2
15514     builtin and then its argument prototype would still apply.  */
15515 char $ac_func();
15516
15517 int main() {
15518
15519 /* The GNU C library defines this for functions which it implements
15520     to always fail with ENOSYS.  Some functions are actually named
15521     something starting with __ and the normal name is an alias.  */
15522 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15523 choke me
15524 #else
15525 $ac_func();
15526 #endif
15527
15528 ; return 0; }
15529 EOF
15530 if { (eval echo configure:15531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15531   rm -rf conftest*
15532   eval "ac_cv_func_$ac_func=yes"
15533 else
15534   echo "configure: failed program was:" >&5
15535   cat conftest.$ac_ext >&5
15536   rm -rf conftest*
15537   eval "ac_cv_func_$ac_func=no"
15538 fi
15539 rm -f conftest*
15540
15541 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15542   echo "$ac_t""yes" 1>&6
15543     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15544   { test "$extra_verbose" = "yes" && cat << EOF
15545     Defining $ac_tr_func
15546 EOF
15547 cat >> confdefs.h <<EOF
15548 #define $ac_tr_func 1
15549 EOF
15550 }
15551  
15552 else
15553   echo "$ac_t""no" 1>&6
15554 fi
15555 done
15556
15557     with_modules=yes
15558   else
15559     if test "$with_modules" = "yes"; then
15560       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15561     else
15562       echo "configure: warning: "Module support cannot be provided."" 1>&2
15563     fi
15564     with_modules=no
15565   fi
15566 fi
15567
15568 cat > conftest.$ac_ext <<EOF
15569 #line 15570 "configure"
15570 #include "confdefs.h"
15571 int main(int c,char *v[]){return 0;}
15572 EOF
15573 if { (eval echo configure:15574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15574 then
15575   :
15576 else
15577   conftest_rc="$?"
15578   echo "configure: failed program was:" >&5
15579   cat conftest.$ac_ext >&5
15580   rm -fr conftest*
15581   
15582   echo ""
15583   echo "*** PANIC *** configure forgot how to build working executables!"
15584   echo ""
15585   echo "*** This is most commonly due to an unforeseen environment, causing"
15586   echo "*** configure to incorrectly compute the sequence of libraries to link."
15587   echo "*** Please examine the tail of config.log for runtime errors."
15588   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15589   echo "*** Often adding or removing explicit options in the configure"
15590   echo "*** invocation can work around this kind of problem.  If so, please"
15591   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15592   echo "***"
15593   echo "*** Other possible causes are inability to write to the file system"
15594   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15595   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15596   echo "*** necessary.  On other systems, try telling configure where to find"
15597   echo "*** the shared libraries using the --site-runtime-libraries option."
15598   echo "***"
15599   echo "*** Another way to shoot yourself in the foot is to specify"
15600   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15601   echo "*** system.  Don't do that."
15602   exit 1
15603 fi
15604 rm -fr conftest*
15605
15606 if test "$win32_processes" = "yes"; then
15607   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15608    echo "    xemacs will be linked with \"process-nt.o\""
15609  fi
15610 else
15611   { test "$extra_verbose" = "yes" && cat << \EOF
15612     Defining HAVE_UNIX_PROCESSES
15613 EOF
15614 cat >> confdefs.h <<\EOF
15615 #define HAVE_UNIX_PROCESSES 1
15616 EOF
15617 }
15618
15619   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15620    echo "    xemacs will be linked with \"process-unix.o\""
15621  fi
15622 fi
15623
15624
15625
15626 T=""
15627 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15628 CFLAGS="$T"
15629
15630
15631 T=""
15632 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15633 extra_objs="$T"
15634
15635
15636 T=""
15637 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
15638 c_switch_general="$T"
15639
15640
15641 T=""
15642 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
15643 c_switch_window_system="$T"
15644
15645
15646 T=""
15647 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15648 c_switch_all="$T"
15649
15650
15651 T=""
15652 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
15653 ld_switch_general="$T"
15654
15655
15656 T=""
15657 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15658 ld_switch_window_system="$T"
15659
15660
15661 T=""
15662 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15663 ld_switch_all="$T"
15664
15665
15666 T=""
15667 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15668 ld_libs_general="$T"
15669
15670
15671 T=""
15672 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
15673 ld_libs_window_system="$T"
15674
15675
15676 T=""
15677 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15678 ld_libs_all="$T"
15679
15680
15681
15682 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15683 internal_makefile_list="Makefile.in"
15684 SUBDIR_MAKEFILES=''
15685 test -d lock || mkdir lock
15686 for dir in $MAKE_SUBDIR; do
15687   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15688         test -d "$d" || mkdir "$d"; cd "$d"
15689       done ) ;;
15690    * ) test -d "$dir" || mkdir "$dir" ;;
15691   esac
15692   
15693 T=""
15694 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15695 SUBDIR_MAKEFILES="$T"
15696
15697   
15698 T=""
15699 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15700 internal_makefile_list="$T"
15701
15702 done
15703
15704
15705
15706
15707 for dir in src/s src/m; do
15708   if test ! -d "$dir" ; then
15709     echo Making symbolic link to "$srcdir/$dir"
15710     ${LN_S} "$srcdir/$dir" "$dir"
15711   fi
15712 done
15713
15714 if test "$extra_verbose" = "yes"; then
15715   echo ""
15716   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
15717   echo ""
15718 fi
15719
15720
15721 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15722   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15723   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15724 fi
15725
15726 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15727   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15728   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15729 fi
15730
15731 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15732   test "$extra_verbose" = "yes" && echo "creating TAGS"
15733   echo "\f
15734 $srcdir/TAGS,include" > "TAGS"
15735 fi
15736
15737 if test "$__SUNPRO_C" = "yes"; then
15738   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15739   ( echo "# For use with Sun WorkShop's Source browser."
15740     echo "# See sbquery(1) and sbinit(4) for more information"
15741     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15742   ) > .sbinit
15743 fi
15744
15745 rm -f core
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766 PREFIX=$prefix
15767 while true; do
15768   case "$PREFIX" in
15769     *\$* ) eval "PREFIX=$PREFIX" ;;
15770     *) break ;;
15771   esac
15772 done
15773
15774
15775
15776
15777 EXEC_PREFIX=$exec_prefix
15778 while true; do
15779   case "$EXEC_PREFIX" in
15780     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15781     *) break ;;
15782   esac
15783 done
15784
15785
15786
15787
15788 INFODIR=$infodir
15789 while true; do
15790   case "$INFODIR" in
15791     *\$* ) eval "INFODIR=$INFODIR" ;;
15792     *) break ;;
15793   esac
15794 done
15795
15796
15797
15798
15799 INFOPATH=$infopath
15800 while true; do
15801   case "$INFOPATH" in
15802     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15803     *) break ;;
15804   esac
15805 done
15806
15807
15808
15809
15810 PACKAGE_PATH=$package_path
15811 while true; do
15812   case "$PACKAGE_PATH" in
15813     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15814     *) break ;;
15815   esac
15816 done
15817
15818
15819
15820
15821 LISPDIR=$lispdir
15822 while true; do
15823   case "$LISPDIR" in
15824     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15825     *) break ;;
15826   esac
15827 done
15828
15829
15830
15831
15832 MODULEDIR=$moduledir
15833 while true; do
15834   case "$MODULEDIR" in
15835     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15836     *) break ;;
15837   esac
15838 done
15839
15840
15841
15842
15843 SITELISPDIR=$sitelispdir
15844 while true; do
15845   case "$SITELISPDIR" in
15846     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15847     *) break ;;
15848   esac
15849 done
15850
15851
15852
15853
15854 SITEMODULEDIR=$sitemoduledir
15855 while true; do
15856   case "$SITEMODULEDIR" in
15857     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15858     *) break ;;
15859   esac
15860 done
15861
15862
15863
15864
15865 ETCDIR=$etcdir
15866 while true; do
15867   case "$ETCDIR" in
15868     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15869     *) break ;;
15870   esac
15871 done
15872
15873
15874
15875
15876 DOCDIR=$docdir
15877 while true; do
15878   case "$DOCDIR" in
15879     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15880     *) break ;;
15881   esac
15882 done
15883
15884
15885
15886
15887 ARCHLIBDIR=$archlibdir
15888 while true; do
15889   case "$ARCHLIBDIR" in
15890     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15891     *) break ;;
15892   esac
15893 done
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15915
15916
15917
15918
15919
15920
15921
15922 : ${XEMACS_CC:=$CC}
15923
15924
15925 if test "$with_prefix" = "yes"; then
15926   { test "$extra_verbose" = "yes" && cat << \EOF
15927     Defining PREFIX_USER_DEFINED
15928 EOF
15929 cat >> confdefs.h <<\EOF
15930 #define PREFIX_USER_DEFINED 1
15931 EOF
15932 }
15933
15934 fi
15935
15936 if test "$with_site_lisp" = "no"; then
15937   { test "$extra_verbose" = "yes" && cat << \EOF
15938     Defining INHIBIT_SITE_LISP
15939 EOF
15940 cat >> confdefs.h <<\EOF
15941 #define INHIBIT_SITE_LISP 1
15942 EOF
15943 }
15944
15945 fi
15946 if test "$with_site_modules" = "no"; then
15947   { test "$extra_verbose" = "yes" && cat << \EOF
15948     Defining INHIBIT_SITE_MODULES
15949 EOF
15950 cat >> confdefs.h <<\EOF
15951 #define INHIBIT_SITE_MODULES 1
15952 EOF
15953 }
15954
15955 fi
15956
15957
15958 T=""
15959 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15960 ac_configure_args="$T"
15961
15962 { test "$extra_verbose" = "yes" && cat << EOF
15963     Defining EMACS_CONFIGURATION = "$configuration"
15964 EOF
15965 cat >> confdefs.h <<EOF
15966 #define EMACS_CONFIGURATION "$configuration"
15967 EOF
15968 }
15969
15970 { test "$extra_verbose" = "yes" && cat << EOF
15971     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15972 EOF
15973 cat >> confdefs.h <<EOF
15974 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15975 EOF
15976 }
15977
15978
15979
15980 null_string=""
15981 { test "$extra_verbose" = "yes" && cat << EOF
15982     Defining LD_SWITCH_X_SITE = $null_string
15983 EOF
15984 cat >> confdefs.h <<EOF
15985 #define LD_SWITCH_X_SITE $null_string
15986 EOF
15987 }
15988
15989 { test "$extra_verbose" = "yes" && cat << EOF
15990     Defining LD_SWITCH_X_SITE_AUX = $null_string
15991 EOF
15992 cat >> confdefs.h <<EOF
15993 #define LD_SWITCH_X_SITE_AUX $null_string
15994 EOF
15995 }
15996
15997 { test "$extra_verbose" = "yes" && cat << EOF
15998     Defining C_SWITCH_X_SITE = $null_string
15999 EOF
16000 cat >> confdefs.h <<EOF
16001 #define C_SWITCH_X_SITE $null_string
16002 EOF
16003 }
16004
16005 { test "$extra_verbose" = "yes" && cat << EOF
16006     Defining LD_SWITCH_SITE = $null_string
16007 EOF
16008 cat >> confdefs.h <<EOF
16009 #define LD_SWITCH_SITE $null_string
16010 EOF
16011 }
16012
16013 { test "$extra_verbose" = "yes" && cat << EOF
16014     Defining C_SWITCH_SITE = $null_string
16015 EOF
16016 cat >> confdefs.h <<EOF
16017 #define C_SWITCH_SITE $null_string
16018 EOF
16019 }
16020
16021
16022
16023 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16024     Defining GNU_MALLOC
16025 EOF
16026 cat >> confdefs.h <<\EOF
16027 #define GNU_MALLOC 1
16028 EOF
16029 }
16030
16031 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16032     Defining USE_SYSTEM_MALLOC
16033 EOF
16034 cat >> confdefs.h <<\EOF
16035 #define USE_SYSTEM_MALLOC 1
16036 EOF
16037 }
16038
16039 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16040     Defining USE_DEBUG_MALLOC
16041 EOF
16042 cat >> confdefs.h <<\EOF
16043 #define USE_DEBUG_MALLOC 1
16044 EOF
16045 }
16046
16047                                               { test "$extra_verbose" = "yes" && cat << \EOF
16048     Defining USE_SYSTEM_MALLOC
16049 EOF
16050 cat >> confdefs.h <<\EOF
16051 #define USE_SYSTEM_MALLOC 1
16052 EOF
16053 }
16054
16055 fi
16056 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16057     Defining I18N3
16058 EOF
16059 cat >> confdefs.h <<\EOF
16060 #define I18N3 1
16061 EOF
16062 }
16063
16064 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16065     Defining USE_GCC
16066 EOF
16067 cat >> confdefs.h <<\EOF
16068 #define USE_GCC 1
16069 EOF
16070 }
16071
16072 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16073     Defining EXTERNAL_WIDGET
16074 EOF
16075 cat >> confdefs.h <<\EOF
16076 #define EXTERNAL_WIDGET 1
16077 EOF
16078 }
16079
16080 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16081     Defining QUICK_BUILD
16082 EOF
16083 cat >> confdefs.h <<\EOF
16084 #define QUICK_BUILD 1
16085 EOF
16086 }
16087
16088 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16089     Defining PURIFY
16090 EOF
16091 cat >> confdefs.h <<\EOF
16092 #define PURIFY 1
16093 EOF
16094 }
16095
16096 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16097     Defining QUANTIFY
16098 EOF
16099 cat >> confdefs.h <<\EOF
16100 #define QUANTIFY 1
16101 EOF
16102 }
16103
16104 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16105     Defining MAIL_USE_POP
16106 EOF
16107 cat >> confdefs.h <<\EOF
16108 #define MAIL_USE_POP 1
16109 EOF
16110 }
16111
16112 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16113     Defining KERBEROS
16114 EOF
16115 cat >> confdefs.h <<\EOF
16116 #define KERBEROS 1
16117 EOF
16118 }
16119
16120 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16121     Defining HESIOD
16122 EOF
16123 cat >> confdefs.h <<\EOF
16124 #define HESIOD 1
16125 EOF
16126 }
16127
16128 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16129     Defining USE_UNION_TYPE
16130 EOF
16131 cat >> confdefs.h <<\EOF
16132 #define USE_UNION_TYPE 1
16133 EOF
16134 }
16135
16136 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16137     Defining REGEX_MALLOC
16138 EOF
16139 cat >> confdefs.h <<\EOF
16140 #define REGEX_MALLOC 1
16141 EOF
16142 }
16143
16144 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16145     Defining PDUMP
16146 EOF
16147 cat >> confdefs.h <<\EOF
16148 #define PDUMP 1
16149 EOF
16150 }
16151
16152 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16153     Defining IPV6_CANONICALIZE
16154 EOF
16155 cat >> confdefs.h <<\EOF
16156 #define IPV6_CANONICALIZE 1
16157 EOF
16158 }
16159
16160
16161
16162 (
16163 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16164 else
16165   echo "uname -a: `uname -a`"
16166 fi
16167 echo ""
16168 echo "$0 $quoted_arguments"
16169 ) > Installation
16170
16171 if test ! -z ${emacs_beta_version} ; then
16172   if test -z "${emacs_is_beta}" ; then
16173         xemacs_betaname=".${emacs_beta_version}"
16174   else
16175         xemacs_betaname="-b${emacs_beta_version}"
16176   fi
16177 else
16178   xemacs_betaname=""
16179 fi
16180
16181 (
16182 echo "
16183
16184 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16185 "
16186 echo "
16187 Compilation / Installation:"
16188 echo "  Source code location:              $srcdir"
16189 echo "  Installation prefix:               $prefix"
16190 if test -n "$site_includes"; then
16191   echo "  Additional header files:           $site_includes"
16192 fi
16193 if test -n "$site_libraries"; then
16194   echo "  Additional libraries:              $site_libraries"
16195 fi
16196 if test -n "$site_prefixes"; then
16197   echo "  Additional prefixes:               $site_prefixes"
16198 fi
16199 if test -n "$runpath"; then
16200   echo "  Runtime library search path:       $runpath"
16201 fi
16202
16203 if test -n "$opsysfile"
16204 then echo "  Operating system description file: \`$opsysfile'"
16205 else echo "  Not using any operating system description file"
16206 fi
16207 if test -n "$machfile"
16208 then echo "  Machine description file:          \`$machfile'"
16209 else echo "  Not using any machine description file"
16210 fi
16211
16212 echo "  Compiler:                          $CC $CFLAGS"
16213 case "$CC" in
16214   gcc*) echo "  Compiler version:                  `$CC --version | head -1`"
16215         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | head -1`"
16216         ;;
16217   *) case "$canonical" in
16218         *-*-aix*   ) 
16219                   realcc=`which $CC`
16220                   if test -L $realcc ; then
16221             ccdir=`dirname $realcc`
16222             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16223                     case $ccprog in
16224                 */*) realcc=$ccprog;;
16225                 *) realcc=$ccdir/$ccprog;;
16226             esac
16227           fi
16228           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16229           if test ! -z "$lpp" ; then
16230             lppstr=`lslpp -Lqc $lpp`
16231             lpplev=`echo "$lppstr" | cut -f3 -d:`
16232             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16233           fi
16234           if test ! -z "$lpplev" ; then
16235             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16236           else
16237             echo "  Compiler version:                  (unknown version)"
16238           fi
16239         ;;
16240         
16241         *-*-solaris*)
16242           ccvers=`$CC -V 2>&1 | head -1`
16243           if test ! -z "$ccvers" ; then
16244             echo "  Compiler version:                  $ccvers"
16245           fi
16246         ;;
16247
16248         alpha*-dec-osf*)
16249           ccvers=`$CC -V | tr '\n' ' '`
16250           if test ! -z "$ccvers" ; then
16251             echo "  Compiler version:                  $ccvers"
16252           fi
16253         ;;
16254
16255         mips-sgi-irix*)
16256           ccvers=`$CC -version`
16257           if test ! -z "$ccvers" ; then
16258             echo "  Compiler version:                  $ccvers"
16259           fi
16260         ;;
16261
16262                 i[3-9]86-pc-linux)
16263           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16264           if test ! -z "$ccvers" ; then
16265             echo "  Compiler version:                  $ccvers"
16266           fi
16267         ;;
16268           
16269         *) echo "  Compiler version:                  $CC on $canonical";;
16270   esac
16271 esac
16272
16273 echo "  Relocating allocator for buffers:  $rel_alloc"
16274 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16275 case "$ld_switch_site" in
16276   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16277     - Consider configuring with --pdump." ;;
16278 esac
16279
16280 case "$canonical" in
16281         *-*-linux*) 
16282           if test -f /etc/redhat-release ; then
16283             echo "  libc:                              `rpm -q glibc`";
16284           else
16285             echo "Need to guess glibc1/2/etc here";
16286           fi
16287         ;;
16288
16289         *-*-aix*) 
16290           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16291         ;;
16292
16293         *-*-solaris*)
16294           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16295           echo "  libc:                              SUNWcsl $libc"
16296
16297         ;;
16298
16299         mips-sgi-irix*)
16300           echo "  IRIX version:                      `uname -sRm`'"
16301         ;;
16302           
16303
16304         alpha*-dec-osf*)
16305                   (cd /usr/.smdb.;
16306                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16307                 echo "  libc:                              $libc"
16308                 
16309           )
16310         ;;
16311
16312         *) echo "  libc:                              system-provided libc on $canonical" ;;
16313 esac
16314
16315
16316 echo "
16317 Window System:"
16318 if test "$with_msw" = "yes"; then
16319   echo "  Compiling in support for the Microsoft window system."
16320 fi
16321 if test "$with_x11" = "yes"; then
16322   echo "  Compiling in support for the X window system:"
16323   echo "    - X Windows headers location:                 $x_includes"
16324   echo "    - X Windows libraries location:               $x_libraries"
16325   if test "$with_xauth" != yes; then
16326     echo "    - Xau (X authority) not available."
16327   fi
16328   if test "$with_xmu" != yes; then
16329     echo "    - Xmu library not available; substituting equivalent routines."
16330   fi
16331   if test "$with_wmcommand" != no; then
16332     echo "    - Handling WM_COMMAND properly."
16333   fi
16334 fi
16335 if test "$need_motif" = "yes" ; then
16336   echo "  Compiling in support for Motif."
16337   if test "$have_lesstif" = "yes"; then
16338     echo "    - Using LessTif implementation."
16339   fi
16340   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16341   echo "             You are likely to experience slow redisplay."
16342   echo "             You may need to install vendor patches to Motif."
16343   echo "             See PROBLEMS for more information."
16344 fi
16345 if test "$need_athena" = "yes"; then
16346   echo "  Compiling in support for the Athena widget set:"
16347   echo "    - Athena headers location:                    $athena_h_path"
16348   echo "    - Athena library to link:                     $athena_lib"
16349 fi
16350 case "$with_menubars" in
16351   gtk   ) echo "  Using GTK menubars."   ;;
16352   lucid ) echo "  Using Lucid menubars." ;;
16353   motif ) echo "  Using Motif menubars."
16354           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16355           echo "             We recommend using the Lucid menubar instead."
16356           echo "             Re-run configure with --with-menubars='lucid'." ;;
16357     msw ) echo "  Using MS-Windows menubars." ;;
16358 esac
16359 case "$with_scrollbars" in
16360   gtk    ) echo "  Using GTK scrollbars."        ;;
16361   lucid  ) echo "  Using Lucid scrollbars."      ;;
16362   motif  ) echo "  Using Motif scrollbars."      ;;
16363   athena ) echo "  Using Athena scrollbars."     ;;
16364      msw ) echo "  Using MS-Windows scrollbars." ;;
16365 esac
16366 case "$with_dialogs" in
16367   gtk    ) echo "  Using GTK dialog boxes." ;;
16368   motif  ) echo "  Using Motif dialog boxes."
16369            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16370              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16371              echo "             We recommend using the Athena dialog boxes instead."
16372              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16373              echo "             Read the PROBLEMS file for more information."
16374            fi; fi ;;
16375   athena ) echo "  Using Athena dialog boxes."     ;;
16376      msw ) echo "  Using MS-Windows dialog boxes." ;;
16377 esac
16378 case "$with_widgets" in
16379   gtk    ) echo "  Using GTK native widgets."        ;;
16380   motif  ) echo "  Using Motif native widgets."      ;;
16381   athena ) echo "  Using Athena native widgets."     ;;
16382      msw ) echo "  Using MS-Windows native widgets." ;;
16383 esac
16384 if test "$with_dragndrop" = yes; then
16385   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16386   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16387 fi
16388
16389 echo "
16390 TTY:"
16391 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16392 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16393
16394 echo "
16395 Images:"
16396 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16397 if test "$with_xpm" = yes; then
16398   echo "  Compiling in support for XPM  images."
16399 elif test "$with_x11" = yes; then
16400   echo "  WARNING: -----------------------------------------------------------"
16401   echo "  WARNING: Compiling without XPM image support."
16402   if test "$xpm_problem" != ""; then
16403     echo "  Reason: $xpm_problem"
16404   fi
16405   echo "  WARNING: You should strongly consider installing XPM."
16406   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16407   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16408   echo "  WARNING: -----------------------------------------------------------"
16409 fi
16410 if test "$with_png" = yes; then
16411   echo "  Compiling in support for PNG  images."
16412 elif test "$window_system" != "none"; then
16413   echo "  WARNING: -----------------------------------------------------------"
16414   echo "  WARNING: Compiling without PNG image support."
16415   if test "$png_problem" != ""; then
16416     echo "  Reason: $png_problem"
16417   fi
16418   echo "  WARNING: You should strongly consider installing the PNG libraries."
16419   echo "  WARNING: Otherwise certain images and glyphs may not display."
16420   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16421   echo "  WARNING: -----------------------------------------------------------"
16422 fi
16423 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16424 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16425 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16426
16427 echo "
16428 Sound:"
16429 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16430 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16431 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16432 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16433
16434 echo "
16435 Databases:"
16436 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16437 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16438 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16439 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16440 if test "$with_postgresql" = yes; then
16441   echo "  Compiling in support for PostgreSQL."
16442   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16443   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16444 fi
16445
16446 echo "
16447 Multiscriptization / Multilingualization / Internationalization:"
16448 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16449 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16450 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16451 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16452 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16453 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16454 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16455 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16456 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16457 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16458 if test "$with_wnn" = yes; then
16459   echo "  Compiling in support for the WNN input method on Mule."
16460   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16461 fi
16462 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16463
16464 echo "
16465 Mail:"
16466 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16467 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16468 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16469 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16470
16471 echo "
16472 Other Features:"
16473 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16474 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16475 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16476 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16477 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16478 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16479 if test "$use_union_type" = yes; then
16480   echo "  WARNING: ---------------------------------------------------------"
16481   echo "  Using the union type for Lisp_Objects."
16482   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16483   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16484   echo "  WARNING: ---------------------------------------------------------"
16485 fi
16486 if test "$use_regex_malloc" = no; then
16487   echo "  WARNING: -----------------------------------------------------------"
16488   echo "  Using alloca to allocate the failure stack."
16489   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16490   echo "  Do NOT use this build of XEmacs for ordinary work."
16491   echo "  WARNING: -----------------------------------------------------------"
16492 fi
16493 test "$pdump" = yes && echo "  Using the new portable dumper."
16494 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16495 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16496 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16497   != "no no no no no no"; then
16498   echo "  WARNING: ---------------------------------------------------------"
16499   echo "  WARNING: Compiling in support for runtime error checking."
16500   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16501   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16502   echo "  WARNING: ---------------------------------------------------------"
16503 fi
16504 echo ""
16505 ) | tee -a Installation
16506 echo ""
16507
16508
16509 # Remove any trailing slashes in these variables.
16510 test -n "$prefix" &&
16511   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16512 test -n "$exec_prefix" &&
16513   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16514
16515
16516 for file in $internal_makefile_list; do
16517   test "$file" = src/Makefile.in && \
16518     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16519   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16520 done
16521 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16522 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
16523
16524 trap '' 1 2 15
16525
16526 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16527
16528 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16529 # Let make expand exec_prefix.
16530 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16531
16532 # Any assignment to VPATH causes Sun make to only execute
16533 # the first set of double-colon rules, so remove it if not needed.
16534 # If there is a colon in the path, we need to keep it.
16535 if test "x$srcdir" = x.; then
16536   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16537 fi
16538
16539 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16540
16541 DEFS=-DHAVE_CONFIG_H
16542
16543 # Without the "./", some shells look in PATH for config.status.
16544 : ${CONFIG_STATUS=./config.status}
16545
16546 echo creating $CONFIG_STATUS
16547 rm -f $CONFIG_STATUS
16548 cat > $CONFIG_STATUS <<EOF
16549 #! /bin/sh
16550 # Generated automatically by configure.
16551 # Run this file to recreate the current configuration.
16552 # This directory was configured as follows,
16553 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16554 #
16555 # $0 $ac_configure_args
16556 #
16557 # Compiler output produced by configure, useful for debugging
16558 # configure, is in ./config.log if it exists.
16559
16560 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16561 for ac_option
16562 do
16563   case "\$ac_option" in
16564   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16565     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16566     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16567   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16568     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16569     exit 0 ;;
16570   -help | --help | --hel | --he | --h)
16571     echo "\$ac_cs_usage"; exit 0 ;;
16572   *) echo "\$ac_cs_usage"; exit 1 ;;
16573   esac
16574 done
16575
16576 ac_given_srcdir=$srcdir
16577 ac_given_INSTALL="$INSTALL"
16578
16579 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16580 EOF
16581 cat >> $CONFIG_STATUS <<EOF
16582
16583 # Protect against being on the right side of a sed subst in config.status.
16584 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16585  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16586 $ac_vpsub
16587 $extrasub
16588 s%@SHELL@%$SHELL%g
16589 s%@CFLAGS@%$CFLAGS%g
16590 s%@CPPFLAGS@%$CPPFLAGS%g
16591 s%@CXXFLAGS@%$CXXFLAGS%g
16592 s%@FFLAGS@%$FFLAGS%g
16593 s%@DEFS@%$DEFS%g
16594 s%@LDFLAGS@%$LDFLAGS%g
16595 s%@LIBS@%$LIBS%g
16596 s%@exec_prefix@%$exec_prefix%g
16597 s%@prefix@%$prefix%g
16598 s%@program_transform_name@%$program_transform_name%g
16599 s%@bindir@%$bindir%g
16600 s%@sbindir@%$sbindir%g
16601 s%@libexecdir@%$libexecdir%g
16602 s%@datadir@%$datadir%g
16603 s%@sysconfdir@%$sysconfdir%g
16604 s%@sharedstatedir@%$sharedstatedir%g
16605 s%@localstatedir@%$localstatedir%g
16606 s%@libdir@%$libdir%g
16607 s%@includedir@%$includedir%g
16608 s%@oldincludedir@%$oldincludedir%g
16609 s%@infodir@%$infodir%g
16610 s%@mandir@%$mandir%g
16611 s%@LN_S@%$LN_S%g
16612 s%@blddir@%$blddir%g
16613 s%@CC@%$CC%g
16614 s%@CPP@%$CPP%g
16615 s%@start_flags@%$start_flags%g
16616 s%@ld_switch_shared@%$ld_switch_shared%g
16617 s%@start_files@%$start_files%g
16618 s%@ld@%$ld%g
16619 s%@lib_gcc@%$lib_gcc%g
16620 s%@RANLIB@%$RANLIB%g
16621 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16622 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16623 s%@INSTALL_DATA@%$INSTALL_DATA%g
16624 s%@YACC@%$YACC%g
16625 s%@SET_MAKE@%$SET_MAKE%g
16626 s%@GTK_CONFIG@%$GTK_CONFIG%g
16627 s%@X_CFLAGS@%$X_CFLAGS%g
16628 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16629 s%@X_LIBS@%$X_LIBS%g
16630 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16631 s%@install_pp@%$install_pp%g
16632 s%@libs_xauth@%$libs_xauth%g
16633 s%@dnd_objs@%$dnd_objs%g
16634 s%@lwlib_objs@%$lwlib_objs%g
16635 s%@ALLOCA@%$ALLOCA%g
16636 s%@have_esd_config@%$have_esd_config%g
16637 s%@dll_ld@%$dll_ld%g
16638 s%@dll_cflags@%$dll_cflags%g
16639 s%@dll_ldflags@%$dll_ldflags%g
16640 s%@dll_post@%$dll_post%g
16641 s%@dll_ldo@%$dll_ldo%g
16642 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16643 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16644 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16645 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16646 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16647 s%@PROGNAME@%$PROGNAME%g
16648 s%@version@%$version%g
16649 s%@configuration@%$configuration%g
16650 s%@canonical@%$canonical%g
16651 s%@inststaticdir@%$inststaticdir%g
16652 s%@instvardir@%$instvardir%g
16653 s%@srcdir@%$srcdir%g
16654 s%@pkgdir@%$pkgdir%g
16655 s%@statedir@%$statedir%g
16656 s%@extra_includes@%$extra_includes%g
16657 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16658 s%@PREFIX@%$PREFIX%g
16659 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16660 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16661 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16662 s%@INFODIR@%$INFODIR%g
16663 s%@infopath@%$infopath%g
16664 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16665 s%@INFOPATH@%$INFOPATH%g
16666 s%@package_path@%$package_path%g
16667 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16668 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16669 s%@lispdir@%$lispdir%g
16670 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16671 s%@LISPDIR@%$LISPDIR%g
16672 s%@moduledir@%$moduledir%g
16673 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16674 s%@MODULEDIR@%$MODULEDIR%g
16675 s%@sitelispdir@%$sitelispdir%g
16676 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16677 s%@SITELISPDIR@%$SITELISPDIR%g
16678 s%@sitemoduledir@%$sitemoduledir%g
16679 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16680 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16681 s%@etcdir@%$etcdir%g
16682 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16683 s%@ETCDIR@%$ETCDIR%g
16684 s%@docdir@%$docdir%g
16685 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16686 s%@DOCDIR@%$DOCDIR%g
16687 s%@archlibdir@%$archlibdir%g
16688 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16689 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16690 s%@bitmapdir@%$bitmapdir%g
16691 s%@extra_objs@%$extra_objs%g
16692 s%@machfile@%$machfile%g
16693 s%@opsysfile@%$opsysfile%g
16694 s%@c_switch_general@%$c_switch_general%g
16695 s%@c_switch_window_system@%$c_switch_window_system%g
16696 s%@c_switch_all@%$c_switch_all%g
16697 s%@ld_switch_general@%$ld_switch_general%g
16698 s%@ld_switch_window_system@%$ld_switch_window_system%g
16699 s%@ld_switch_all@%$ld_switch_all%g
16700 s%@ld_libs_general@%$ld_libs_general%g
16701 s%@ld_libs_window_system@%$ld_libs_window_system%g
16702 s%@ld_libs_all@%$ld_libs_all%g
16703 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16704 s%@native_sound_lib@%$native_sound_lib%g
16705 s%@sound_cflags@%$sound_cflags%g
16706 s%@dynodump_arch@%$dynodump_arch%g
16707 s%@XEMACS_CC@%$XEMACS_CC%g
16708 s%@internal_makefile_list@%$internal_makefile_list%g
16709
16710 CEOF
16711 EOF
16712
16713 cat >> $CONFIG_STATUS <<\EOF
16714
16715 # Split the substitutions into bite-sized pieces for seds with
16716 # small command number limits, like on Digital OSF/1 and HP-UX.
16717 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16718 ac_file=1 # Number of current file.
16719 ac_beg=1 # First line for current file.
16720 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16721 ac_more_lines=:
16722 ac_sed_cmds=""
16723 while $ac_more_lines; do
16724   if test $ac_beg -gt 1; then
16725     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16726   else
16727     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16728   fi
16729   if test ! -s conftest.s$ac_file; then
16730     ac_more_lines=false
16731     rm -f conftest.s$ac_file
16732   else
16733     if test -z "$ac_sed_cmds"; then
16734       ac_sed_cmds="sed -f conftest.s$ac_file"
16735     else
16736       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16737     fi
16738     ac_file=`expr $ac_file + 1`
16739     ac_beg=$ac_end
16740     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16741   fi
16742 done
16743 if test -z "$ac_sed_cmds"; then
16744   ac_sed_cmds=cat
16745 fi
16746 EOF
16747
16748 cat >> $CONFIG_STATUS <<EOF
16749
16750 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16751 EOF
16752 cat >> $CONFIG_STATUS <<\EOF
16753 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16754   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16755   case "$ac_file" in
16756   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16757        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16758   *) ac_file_in="${ac_file}.in" ;;
16759   esac
16760
16761   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16762
16763   # Remove last slash and all that follows it.  Not all systems have dirname.
16764   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16765   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16766     # The file is in a subdirectory.
16767     test ! -d "$ac_dir" && mkdir "$ac_dir"
16768     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16769     # A "../" for each directory in $ac_dir_suffix.
16770     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16771   else
16772     ac_dir_suffix= ac_dots=
16773   fi
16774
16775   case "$ac_given_srcdir" in
16776   .)  srcdir=.
16777       if test -z "$ac_dots"; then top_srcdir=.
16778       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16779   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16780   *) # Relative path.
16781     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16782     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16783   esac
16784
16785   case "$ac_given_INSTALL" in
16786   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16787   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16788   esac
16789
16790   echo creating "$ac_file"
16791   rm -f "$ac_file"
16792   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16793   case "$ac_file" in
16794   *Makefile*) ac_comsub="1i\\
16795 # $configure_input" ;;
16796   *) ac_comsub= ;;
16797   esac
16798
16799   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16800   sed -e "$ac_comsub
16801 s%@configure_input@%$configure_input%g
16802 s%@srcdir@%$srcdir%g
16803 s%@top_srcdir@%$top_srcdir%g
16804 s%@INSTALL@%$INSTALL%g
16805 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16806 fi; done
16807 rm -f conftest.s*
16808
16809 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16810 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16811 #
16812 # ac_d sets the value in "#define NAME VALUE" lines.
16813 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16814 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16815 ac_dC='\3'
16816 ac_dD='%g'
16817 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16818 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16819 ac_uB='\([      ]\)%\1#\2define\3'
16820 ac_uC=' '
16821 ac_uD='\4%g'
16822 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16823 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16824 ac_eB='$%\1#\2define\3'
16825 ac_eC=' '
16826 ac_eD='%g'
16827
16828 if test "${CONFIG_HEADERS+set}" != set; then
16829 EOF
16830 cat >> $CONFIG_STATUS <<EOF
16831   CONFIG_HEADERS="src/config.h lwlib/config.h"
16832 EOF
16833 cat >> $CONFIG_STATUS <<\EOF
16834 fi
16835 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16836   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16837   case "$ac_file" in
16838   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16839        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16840   *) ac_file_in="${ac_file}.in" ;;
16841   esac
16842
16843   echo creating $ac_file
16844
16845   rm -f conftest.frag conftest.in conftest.out
16846   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16847   cat $ac_file_inputs > conftest.in
16848
16849 EOF
16850
16851 # Transform confdefs.h into a sed script conftest.vals that substitutes
16852 # the proper values into config.h.in to produce config.h.  And first:
16853 # Protect against being on the right side of a sed subst in config.status.
16854 # Protect against being in an unquoted here document in config.status.
16855 rm -f conftest.vals
16856 cat > conftest.hdr <<\EOF
16857 s/[\\&%]/\\&/g
16858 s%[\\$`]%\\&%g
16859 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16860 s%ac_d%ac_u%gp
16861 s%ac_u%ac_e%gp
16862 EOF
16863 sed -n -f conftest.hdr confdefs.h > conftest.vals
16864 rm -f conftest.hdr
16865
16866 # This sed command replaces #undef with comments.  This is necessary, for
16867 # example, in the case of _POSIX_SOURCE, which is predefined and required
16868 # on some systems where configure will not decide to define it.
16869 cat >> conftest.vals <<\EOF
16870 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16871 EOF
16872
16873 # Break up conftest.vals because some shells have a limit on
16874 # the size of here documents, and old seds have small limits too.
16875
16876 rm -f conftest.tail
16877 while :
16878 do
16879   ac_lines=`grep -c . conftest.vals`
16880   # grep -c gives empty output for an empty file on some AIX systems.
16881   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16882   # Write a limited-size here document to conftest.frag.
16883   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16884   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16885   echo 'CEOF
16886   sed -f conftest.frag conftest.in > conftest.out
16887   rm -f conftest.in
16888   mv conftest.out conftest.in
16889 ' >> $CONFIG_STATUS
16890   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16891   rm -f conftest.vals
16892   mv conftest.tail conftest.vals
16893 done
16894 rm -f conftest.vals
16895
16896 cat >> $CONFIG_STATUS <<\EOF
16897   rm -f conftest.frag conftest.h
16898   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16899   cat conftest.in >> conftest.h
16900   rm -f conftest.in
16901   if cmp -s $ac_file conftest.h 2>/dev/null; then
16902     echo "$ac_file is unchanged"
16903     rm -f conftest.h
16904   else
16905     # Remove last slash and all that follows it.  Not all systems have dirname.
16906       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16907       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16908       # The file is in a subdirectory.
16909       test ! -d "$ac_dir" && mkdir "$ac_dir"
16910     fi
16911     rm -f $ac_file
16912     mv conftest.h $ac_file
16913   fi
16914 fi; done
16915
16916 EOF
16917 cat >> $CONFIG_STATUS <<EOF
16918 CPP="$CPP"
16919  top_srcdir="$srcdir"
16920  MAKE_SUBDIR="$MAKE_SUBDIR"
16921
16922 EOF
16923 cat >> $CONFIG_STATUS <<\EOF
16924 for dir in . $MAKE_SUBDIR; do
16925   (
16926     cd $dir
16927     rm -f junk.c
16928     < Makefile.in \
16929       sed -e '/^# Generated/d' \
16930           -e 's%/\*\*/#.*%%' \
16931           -e 's/^ *# */#/' \
16932           -e '/^##/d' \
16933           -e '/^#/ {
16934 p
16935 d
16936 }'        \
16937           -e '/./ {
16938 s/\([\"]\)/\\\1/g
16939 s/^/"/
16940 s/$/"/
16941 }'  > junk.c;
16942
16943
16944
16945     echo creating $dir/Makefile
16946 $CPP -I. -I${top_srcdir}/src  junk.c \
16947   | sed -e 's/^\#.*//'          \
16948         -e 's/^[        ][      ]*$//'\
16949         -e 's/^ /       /'              \
16950         -e '/^[ \f]*$/d' \
16951         -e '/^\"/ {
16952         s/\\\([\"]\)/\1/g
16953         s/^[    ]*\"//
16954         s/\"[   ]*$//
16955 }' > Makefile.new
16956     chmod 444 Makefile.new
16957     mv -f Makefile.new Makefile
16958
16959     echo creating $dir/GNUmakefile
16960 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16961   | sed -e 's/^\#.*//'          \
16962         -e 's/^[        ][      ]*$//'\
16963         -e 's/^ /       /'              \
16964         -e '/^[ \f]*$/d' \
16965         -e '/^\"/ {
16966         s/\\\([\"]\)/\1/g
16967         s/^[    ]*\"//
16968         s/\"[   ]*$//
16969 }' > Makefile.new
16970     chmod 444 Makefile.new
16971     mv -f Makefile.new GNUmakefile
16972
16973     rm -f junk.c
16974   )
16975 done
16976
16977 sed < config.status >> lib-src/config.values \
16978   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16979   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16980   -e 's/^\([^ ]*\) $/\1 ""/' \
16981   -e 's/ 1$/ t/'
16982
16983
16984 exit 0
16985 EOF
16986 chmod +x $CONFIG_STATUS
16987 rm -fr confdefs* $ac_clean_files
16988 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1