Merge r21-4-13-chise-b1.
[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 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump=''
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_utf_2000   | \
343         with_chise      | \
344         with_text_coding| \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_postgresql | \
354         with_pop        | \
355         with_kerberos   | \
356         with_hesiod     | \
357         with_dnet       | \
358         with_infodock   | \
359         with_netinstall | \
360         with_ipv6_cname | \
361         external_widget | \
362         verbose         | \
363         extra_verbose   | \
364         usage_tracking  | \
365         use_union_type  | \
366         pdump           | \
367         debug           | \
368         use_assertions  | \
369         memory_usage_stats | \
370         with_clash_detection | \
371         with_modules | \
372         quick_build )
373                   case "$val" in
374             y | ye | yes )      val=yes ;;
375             n | no )            val=no  ;;
376             * ) (echo "$progname: Usage error:"
377 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
378 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
379           esac
380           eval "$opt=\"$val\"" ;;
381
382
383                         srcdir          | \
384         compiler        | \
385         cflags          | \
386         cpp             | \
387         cppflags        | \
388         libs            | \
389         ldflags         | \
390         cache_file      | \
391         native_sound_lib| \
392         site_lisp       | \
393         x_includes      | \
394         x_libraries     | \
395         site_includes   | \
396         site_libraries  | \
397         site_prefixes   | \
398         site_runtime_libraries )
399                   if test "$valomitted" = "yes" ; then
400                     if test "$#" = 0 ; then
401               (echo "$progname: Usage error:"
402 echo " " "The \`--$optname' option requires a value."
403 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
404             fi
405             val="$1"; shift
406           fi
407           eval "$opt=\"$val\""
408         ;;
409
410                 rel_alloc | \
411         with_dlmalloc | \
412         with_debug_malloc  | use_debug_malloc | \
413         with_system_malloc | use_system_malloc )
414           case "$val" in
415             y | ye | yes )      val=yes ;;
416             n | no )            val=no  ;;
417             d | de | def | defa | defau | defaul | default ) val=default ;;
418             * ) (echo "$progname: Usage error:"
419 echo " " "The \`--$optname' option requires one of these values:
420   \`yes', \`no', or \`default'."
421 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
422           esac
423           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
424           eval "$opt=\"$val\""
425         ;;
426
427                 "with_database" )
428           with_database_berkdb=no
429           with_database_dbm=no
430           with_database_gdbm=no
431           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
432             case "$x" in
433               no ) ;;
434               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
435               d | db | dbm )                               with_database_dbm=yes    ;;
436               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
437               * ) (echo "$progname: Usage error:"
438 echo " " "The \`--$optname' option value
439   must be either \`no' or a comma-separated list
440   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
441 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
442             esac
443           done
444           if test "$with_database_dbm"  = "yes" -a \
445                   "$with_database_gdbm" = "yes"; then
446           (echo "$progname: Usage error:"
447 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
448   with the \`--$optname' option."
449 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
450           fi
451         ;;
452
453                 "with_sound" )
454                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
455             case "$x" in
456                       n | no | non | none ) new_sdefault=no ;;
457               a | al | all | both ) new_sdefault=yes ;;
458
459               native )       with_native_sound=yes ;;
460               nonative )     with_native_sound=no ;;
461
462               nas )          with_nas_sound=yes ;;
463               nonas )        with_nas_sound=no ;;
464
465               esd )          with_esd_sound=yes ;;
466               noesd )        with_esd_sound=no ;;
467
468               * ) bogus_sound=yes ;;
469             esac
470             if test "$bogus_sound" -o \
471                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
472                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
473                 (echo "$progname: Usage error:"
474 echo " " "Valid types for the \`--$optname' option are:
475   $types.
476 Option \`all' or \`none' must be first in the list.
477 The default is to autodetect native and NAS sound support."
478 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
479             elif test -n "$new_sdefault" ; then
480                 with_native_sound=$new_sdefault
481                 with_nas_sound=$new_sdefault
482                 with_esd_sound=$new_sdefault
483                 new_sdefault=   # reset this
484             fi
485             sound_notfirst=true
486           done
487         ;;
488
489                         "with_athena" )
490           case "$val" in
491             xa | xaw )                    val=xaw    ;;
492             3 | 3d | xaw3d )              val=3d     ;;
493                         ne | nex | next | naxtaw)     val=next   ;;
494                         9 | 95 | xaw95 )              val=95     ;;
495             xp | xpm | xawxpm )           val=xpm    ;;
496             * ) (echo "$progname: Usage error:"
497 echo " " "The \`--$optname' option must have one of these values:
498   \`xaw', \`3d', \`next', \`95', or \`xpm'."
499 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
500           esac
501           eval "$opt=\"$val\""
502         ;;
503
504                 "with_xim" )
505           case "$val" in
506             y | ye | yes )                val=yes   ;;
507             n | no | non | none )         val=no    ;;
508             x | xl | xli | xlib )         val=xlib  ;;
509             m | mo | mot | moti | motif ) val=motif ;;
510             * ) (echo "$progname: Usage error:"
511 echo " " "The \`--$optname' option must have one of these values:
512   \`motif', \`xlib', \`yes', or \`no'."
513 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
514           esac
515           eval "$opt=\"$val\""
516         ;;
517
518                 "mail_locking" )
519           case "$val" in
520             lockf )     val=lockf ;;
521             flock )     val=flock ;;
522             file | dot ) val=file  ;;
523             locking )   val=locking  ;;
524             * ) (echo "$progname: Usage error:"
525 echo " " "The \`--$optname' option must have one of these values:
526   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
527 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
528           esac
529           eval "$opt=\"$val\""
530         ;;
531
532                 "error_checking" )
533                           
534           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
535             case "$x" in
536                       n | no | non | none ) new_default=no ;;
537               a | al | all )        new_default=yes ;;
538
539               extents )       error_check_extents=yes ;;
540               noextents )     error_check_extents=no ;;
541
542               typecheck )     error_check_typecheck=yes ;;
543               notypecheck )   error_check_typecheck=no ;;
544
545               bufpos )        error_check_bufpos=yes ;;
546               nobufpos )      error_check_bufpos=no ;;
547
548               gc )            error_check_gc=yes ;;
549               nogc )          error_check_gc=no ;;
550
551               malloc )        error_check_malloc=yes ;;
552               nomalloc )      error_check_malloc=no ;;
553
554               byte_code )     error_check_byte_code=yes ;;
555               nobyte_code )   error_check_byte_code=no ;;
556
557               glyphs )     error_check_glyphs=yes ;;
558               noglyphs )   error_check_glyphs=no ;;
559
560               * ) bogus_error_check=yes ;;
561             esac
562             if test "$bogus_error_check" -o \
563                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
564                 if test "$error_check_default" = yes ; then
565                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
566                 else
567                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
568                 fi
569                 (echo "$progname: Usage error:"
570 echo " " "Valid types for the \`--$optname' option are:
571   $types."
572 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
573             elif test -n "$new_default" ; then
574                 error_check_extents=$new_default
575                 error_check_typecheck=$new_default
576                 error_check_bufpos=$new_default
577                 error_check_gc=$new_default
578                 error_check_malloc=$new_default
579                 error_check_byte_code=$new_default
580                 error_check_glyphs=$new_default
581                 new_default=    # reset this
582             fi
583             echeck_notfirst=true
584           done
585         ;;
586
587                                 
588                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
589         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
590         archlibdir | docdir | package_path | moduledir )
591                    if test "$valomitted" = "yes"; then
592              if test "$#" = 0; then
593                  (echo "$progname: Usage error:"
594 echo " " "The \`--$optname' option requires a value."
595 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
596              fi
597              val="$1"; shift
598            fi
599            eval "$opt=\"$val\""
600
601                            case "$opt" in
602                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining EXEC_PREFIX_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define EXEC_PREFIX_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining LISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define LISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining SITELISPDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define SITELISPDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining MODULEDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define MODULEDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining ETCDIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define ETCDIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFODIR_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFODIR_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining INFOPATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define INFOPATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
659     Defining PACKAGE_PATH_USER_DEFINED
660 EOF
661 cat >> confdefs.h <<\EOF
662 #define PACKAGE_PATH_USER_DEFINED 1
663 EOF
664 }
665  ;;
666              datadir )
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining INFODIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define INFODIR_USER_DEFINED 1
672 EOF
673 }
674
675                 { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining LISPDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define LISPDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining MODULEDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define MODULEDIR_USER_DEFINED 1
688 EOF
689 }
690
691                 { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining ETCDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define ETCDIR_USER_DEFINED 1
696 EOF
697 }
698
699                 { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining DOCDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define DOCDIR_USER_DEFINED 1
704 EOF
705 }
706
707                 { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining ARCHLIBDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define ARCHLIBDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
716     Defining DOCDIR_USER_DEFINED
717 EOF
718 cat >> confdefs.h <<\EOF
719 #define DOCDIR_USER_DEFINED 1
720 EOF
721 }
722  ;;
723              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
724     Defining ARCHLIBDIR_USER_DEFINED
725 EOF
726 cat >> confdefs.h <<\EOF
727 #define ARCHLIBDIR_USER_DEFINED 1
728 EOF
729 }
730  ;;
731            esac
732         ;;
733
734                 "no_create" ) ;;
735
736                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
737
738                 "with_menubars"   | \
739         "with_scrollbars" | \
740         "with_dialogs"    | \
741         "with_widgets" )
742           case "$val" in
743             l | lu | luc | luci | lucid )               val=lucid  ;;
744             mo | mot | moti | motif )                   val=motif  ;;
745             a | at | ath | athe | athen | athena )      val=athena ;;
746             n | no | non | none )                       val=no     ;;
747             y | ye | yes )                              val=yes    ;;
748                         "")                                             val=yes    ;;
749             g | gt | gtk )                              val=gtk    ;;
750             ms | msw )                                  val=msw    ;;
751             * ) (echo "$progname: Usage error:"
752 echo " " "The \`--$optname' option must have one of these values:
753   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
754 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
755           esac
756           eval "$opt=\"$val\""
757         ;;
758
759                 "use_minimal_tagbits" | \
760         "use_indexed_lrecord_implementation" | \
761         "run_in_place"  | \
762         "const_is_losing" | \
763         "with_gnu_make" )
764           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
765         ;;
766
767                 * ) (echo "$progname: Usage error:"
768 echo " " "Unrecognized option: $arg"
769 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
770
771       esac
772     ;;
773
774         *-*-*) configuration="$arg" ;;
775
776         *) (echo "$progname: Usage error:"
777 echo " " "Unrecognized argument: $arg"
778 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
779
780   esac
781 done
782
783
784 test -n "$cpp"      && CPP="$cpp"
785 test -n "$cppflags" && CPPFLAGS="$cppflags"
786 test -n "$libs"     && LIBS="$libs"
787 test -n "$ldflags"  && LDFLAGS="$ldflags"
788
789 eval set x "$quoted_arguments"; shift
790
791 test "$extra_verbose" = "yes" && verbose=yes
792
793 test -n "$with_x" && with_x11="$with_x"
794
795 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
796   test "$with_system_malloc" = "default" && with_system_malloc=yes
797 fi
798
799
800
801 if test "$with_cde $with_tooltalk" = "yes no"; then
802   (echo "$progname: Usage error:"
803 echo " " "--with-cde requires --with-tooltalk"
804 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
805 elif test "$with_tooltalk" = "no" ; then with_cde=no
806 elif test "$with_cde" = "yes"; then with_tooltalk=yes
807 fi
808
809
810 case "$srcdir" in
811
812     "" )
813     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
814       if test -f "$dir/src/lisp.h" -a \
815               -f "$dir/lisp/version.el" ; then
816         srcdir="$dir"
817         break
818       fi
819     done
820     if test -z "$srcdir" ; then
821       (echo "$progname: Usage error:"
822 echo " " "Neither the current directory nor its parent seem to
823   contain the XEmacs sources.  If you do not want to build XEmacs in its
824   source tree, you should run \`$progname' in the directory in which
825   you wish to build XEmacs, using the \`--srcdir' option to say where the
826   sources may be found."
827 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
828     fi
829   ;;
830
831     * )
832     if test ! -f "$srcdir/src/lisp.h" -o \
833             ! -f "$srcdir/lisp/version.el" ; then
834       (echo "$progname: Usage error:"
835 echo " " "The directory specified with the \`--srcdir' option,
836   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
837   either run the \`$progname' script at the top of the XEmacs source
838   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
839 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
840     fi
841   ;;
842 esac
843
844 if test -z "$configuration"; then
845     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
846   if test -z "$configuration"; then
847     (echo "$progname: Usage error:"
848 echo " " "XEmacs has not been ported to this host type.
849 Try explicitly specifying the CONFIGURATION when rerunning configure."
850 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
851   fi
852 fi
853
854 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
855 echo "configure:856: checking whether ln -s works" >&5
856
857 rm -f conftestdata
858 if ln -s X conftestdata 2>/dev/null
859 then
860   rm -f conftestdata
861   ac_cv_prog_LN_S="ln -s"
862 else
863   ac_cv_prog_LN_S=ln
864 fi
865 LN_S="$ac_cv_prog_LN_S"
866 if test "$ac_cv_prog_LN_S" = "ln -s"; then
867   echo "$ac_t""yes" 1>&6
868 else
869   echo "$ac_t""no" 1>&6
870 fi
871
872
873 for dir in lisp etc man info tests; do
874   if test ! -d "$dir" ; then
875     echo Making symbolic link to "$srcdir/$dir"
876     ${LN_S} "$srcdir/$dir" "$dir"
877   fi
878 done
879
880
881 absolute_pwd="`pwd`";
882 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
883 then blddir="$PWD"
884 else blddir="$absolute_pwd"; if test -d "/net"; then
885   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
886   blddir=`echo "$blddir" | \
887    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
888 fi
889 fi
890
891
892 case "$srcdir" in
893   /* ) ;;
894   .  ) srcdir="$blddir" ;;
895   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
896   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
897   srcdir=`echo "$srcdir" | \
898    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
899 fi ;;
900 esac
901
902 if test `pwd` != `sh -c cd $srcdir && pwd`  \
903    && test -f "$srcdir/src/config.h"; then
904   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
905    echo "   as a build directory right now; it has been configured in its own"
906    echo "   right.  To configure in another directory as well, you MUST"
907    echo "   use GNU make.  If you do not have GNU make, then you must"
908    echo "   now do \`make distclean' in $srcdir,"
909    echo "   and then run $progname again.") >&2
910   extrasub='/^VPATH[     ]*=/c\
911 vpath %.c $(srcdir)\
912 vpath %.h $(srcdir)\
913 vpath %.y $(srcdir)\
914 vpath %.l $(srcdir)\
915 vpath %.s $(srcdir)\
916 vpath %.in $(srcdir)'
917 fi
918
919 . "$srcdir/version.sh" || exit 1;
920 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
921 : "${extra_verbose=$beta}"
922 version="${emacs_major_version}.${emacs_minor_version}"
923 { test "$extra_verbose" = "yes" && cat << EOF
924     Defining EMACS_MAJOR_VERSION = $emacs_major_version
925 EOF
926 cat >> confdefs.h <<EOF
927 #define EMACS_MAJOR_VERSION $emacs_major_version
928 EOF
929 }
930
931 { test "$extra_verbose" = "yes" && cat << EOF
932     Defining EMACS_MINOR_VERSION = $emacs_minor_version
933 EOF
934 cat >> confdefs.h <<EOF
935 #define EMACS_MINOR_VERSION $emacs_minor_version
936 EOF
937 }
938
939 if test -n "$emacs_beta_version" ; then
940   if test "$beta" = "yes"; then
941         version="${version}-b${emacs_beta_version}"
942         { test "$extra_verbose" = "yes" && cat << EOF
943     Defining EMACS_BETA_VERSION = $emacs_beta_version
944 EOF
945 cat >> confdefs.h <<EOF
946 #define EMACS_BETA_VERSION $emacs_beta_version
947 EOF
948 }
949
950   else
951         version="${version}.${emacs_beta_version}"
952         { test "$extra_verbose" = "yes" && cat << EOF
953     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
954 EOF
955 cat >> confdefs.h <<EOF
956 #define EMACS_PATCH_LEVEL $emacs_beta_version
957 EOF
958 }
959
960   fi
961 fi
962 { test "$extra_verbose" = "yes" && cat << EOF
963     Defining XEMACS_CODENAME = "$xemacs_codename"
964 EOF
965 cat >> confdefs.h <<EOF
966 #define XEMACS_CODENAME "$xemacs_codename"
967 EOF
968 }
969
970 { test "$extra_verbose" = "yes" && cat << EOF
971     Defining EMACS_VERSION = "$version"
972 EOF
973 cat >> confdefs.h <<EOF
974 #define EMACS_VERSION "$version"
975 EOF
976 }
977
978
979 if test "$with_infodock" = "yes"; then
980   if test ! -f ../../ID-INSTALL; then
981     echo "Cannot build InfoDock without InfoDock sources"
982     with_infodock=no
983   fi
984 fi
985
986 if test "$with_infodock" = "yes"; then
987       { test "$extra_verbose" = "yes" && cat << EOF
988     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
989 EOF
990 cat >> confdefs.h <<EOF
991 #define INFODOCK_MAJOR_VERSION $infodock_major_version
992 EOF
993 }
994
995   { test "$extra_verbose" = "yes" && cat << EOF
996     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
997 EOF
998 cat >> confdefs.h <<EOF
999 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1000 EOF
1001 }
1002
1003   { test "$extra_verbose" = "yes" && cat << EOF
1004     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1005 EOF
1006 cat >> confdefs.h <<EOF
1007 #define INFODOCK_BUILD_VERSION $infodock_build_version
1008 EOF
1009 }
1010
1011   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1012   PROGNAME=infodock
1013   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1014 else
1015   PROGNAME=xemacs
1016 fi
1017
1018 { test "$extra_verbose" = "yes" && cat << EOF
1019     Defining EMACS_PROGNAME = "$PROGNAME"
1020 EOF
1021 cat >> confdefs.h <<EOF
1022 #define EMACS_PROGNAME "$PROGNAME"
1023 EOF
1024 }
1025
1026
1027 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1028 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1029     Defining ERROR_CHECK_EXTENTS
1030 EOF
1031 cat >> confdefs.h <<\EOF
1032 #define ERROR_CHECK_EXTENTS 1
1033 EOF
1034 }
1035
1036 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1037     Defining ERROR_CHECK_TYPECHECK
1038 EOF
1039 cat >> confdefs.h <<\EOF
1040 #define ERROR_CHECK_TYPECHECK 1
1041 EOF
1042 }
1043
1044 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1045     Defining ERROR_CHECK_BUFPOS
1046 EOF
1047 cat >> confdefs.h <<\EOF
1048 #define ERROR_CHECK_BUFPOS 1
1049 EOF
1050 }
1051
1052 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1053     Defining ERROR_CHECK_GC
1054 EOF
1055 cat >> confdefs.h <<\EOF
1056 #define ERROR_CHECK_GC 1
1057 EOF
1058 }
1059
1060 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1061     Defining ERROR_CHECK_MALLOC
1062 EOF
1063 cat >> confdefs.h <<\EOF
1064 #define ERROR_CHECK_MALLOC 1
1065 EOF
1066 }
1067
1068 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1069     Defining ERROR_CHECK_BYTE_CODE
1070 EOF
1071 cat >> confdefs.h <<\EOF
1072 #define ERROR_CHECK_BYTE_CODE 1
1073 EOF
1074 }
1075
1076 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1077     Defining ERROR_CHECK_GLYPHS
1078 EOF
1079 cat >> confdefs.h <<\EOF
1080 #define ERROR_CHECK_GLYPHS 1
1081 EOF
1082 }
1083
1084 if test "${debug:=$beta}" = "yes"; then
1085   use_assertions=yes memory_usage_stats=yes
1086   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1087    echo "    xemacs will be linked with \"debug.o\""
1088  fi
1089   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1090    echo "    xemacs will be linked with \"tests.o\""
1091  fi
1092   { test "$extra_verbose" = "yes" && cat << \EOF
1093     Defining DEBUG_XEMACS
1094 EOF
1095 cat >> confdefs.h <<\EOF
1096 #define DEBUG_XEMACS 1
1097 EOF
1098 }
1099
1100 fi
1101 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1102     Defining USE_ASSERTIONS
1103 EOF
1104 cat >> confdefs.h <<\EOF
1105 #define USE_ASSERTIONS 1
1106 EOF
1107 }
1108
1109 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1110     Defining MEMORY_USAGE_STATS
1111 EOF
1112 cat >> confdefs.h <<\EOF
1113 #define MEMORY_USAGE_STATS 1
1114 EOF
1115 }
1116
1117
1118
1119 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1120 echo "configure:1121: checking "host system type"" >&5
1121 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1122 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1123 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1124 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1125 echo "$ac_t""$configuration" 1>&6
1126
1127
1128
1129
1130
1131 machine='' opsys=''
1132
1133 case "$canonical" in
1134   sparc-*-*        ) machine=sparc ;;
1135   alpha*-*-*       ) machine=alpha ;;
1136   vax-*-*          ) machine=vax ;;
1137   mips-dec-*       ) machine=pmax ;;
1138   mips-sgi-irix6*  ) machine=iris6d ;;
1139   mips-sgi-*       ) machine=iris4d ;;
1140   mips*-linux      ) machine=mips ;;
1141   romp-ibm-*       ) machine=ibmrt ;;
1142   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1143   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1144   powerpc*-*       ) machine=powerpc ;;
1145   hppa-*-*         ) machine=hp800 ;;
1146   m88k-dg-*        ) machine=aviion ;;
1147   m68*-sony-*      ) machine=news ;;
1148   mips-sony-*      ) machine=news-risc ;;
1149   clipper-*        ) machine=clipper ;;
1150   arm*             ) machine=arm ;;
1151   ns32k-*          ) machine=ns32000 ;;
1152 esac
1153
1154 case "$canonical" in
1155   *-*-linux*    ) opsys=linux ;;
1156   *-*-netbsd*   ) opsys=netbsd ;;
1157   *-*-openbsd*  ) opsys=openbsd ;;
1158   *-*-nextstep* ) opsys=nextstep ;;
1159   *-*-vms       ) opsys=vms ;;
1160
1161     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1162   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1163   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1164   *-dec-osf3*                ) opsys=decosf3-1 ;;
1165   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1166
1167     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1168   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1169   *-*-ultrix* )         opsys=ultrix4-3 ;;
1170
1171     *-*-aix3.1*     ) opsys=aix3-1   ;;
1172   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1173   *-*-aix3*       ) opsys=aix3-2   ;;
1174   *-*-aix4.0*     ) opsys=aix4     ;;
1175   *-*-aix4.1*     ) opsys=aix4-1   ;;
1176   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1177
1178     *-gnu* )                    opsys=gnu    ;;
1179   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1180   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1181   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1182   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1183   *-*-aos*   )                  opsys=bsd4-3 ;;
1184   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1185   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1186   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1187   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1188   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1189   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1190         if test -z "$NON_GNU_CPP" ; then
1191           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1192             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1193           done
1194         fi
1195         opsys=usg5-4-2 ;;
1196     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1197     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1198 esac
1199
1200 case "$canonical" in
1201
1202     *-*-netbsd* )
1203     case "$canonical" in
1204       i[3-9]86-*-netbsd*) machine=intel386 ;;
1205       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1206                                             machine=hp9000s300 ;;
1207       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1208       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1209     esac
1210   ;;
1211
1212     *-*-openbsd* )
1213     case "${canonical}" in
1214       i386-*-openbsd*)          machine=intel386 ;;
1215       m68k-*-openbsd*)          machine=hp9000s300 ;;
1216       mipsel-*-openbsd*)        machine=pmax ;;
1217      esac
1218    ;;
1219
1220     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1221   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1222
1223     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1224   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1225
1226     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1227
1228     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1229
1230     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1231
1232     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1233
1234     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1235
1236     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1237   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1238   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1239
1240   
1241     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1242
1243     *-convex-bsd* | *-convex-convexos* )
1244     machine=convex opsys=bsd4-3
1245     NON_GNU_CPP="cc -E -P"
1246   ;;
1247
1248     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1249
1250     *-*-darwin*)
1251     opsys=darwin
1252     RANLIB="ranlib -c"     ;;
1253
1254     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1255   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1256   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1257   m88k-dg-dgux*                           ) opsys=dgux     ;;
1258
1259     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1260   m88k-motorola-sysv4* )
1261                     machine=delta88k opsys=usg5-4-2
1262   ;;
1263   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1264
1265     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1266   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1267
1268     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1269
1270     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1271   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1272   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1273
1274       m88k-harris-cxux* )
1275         case "`uname -r`" in
1276        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1277        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1278     esac
1279     NON_GNU_CPP="/lib/cpp"
1280   ;;
1281     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1282     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1283
1284     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1285
1286     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1287
1288     *-hp-hpux* )
1289         case "$canonical" in
1290       m68*  ) machine=hp9000s300 ;;
1291       hppa* ) machine=hp800      ;;
1292     esac
1293
1294     case "$canonical" in
1295       *-hp-hpux7*  )  opsys=hpux   ;;
1296       *-hp-hpux8*  )  opsys=hpux8  ;;
1297       *-hp-hpux9*  )  opsys=hpux9  ;;
1298       *-hp-hpux10* )  opsys=hpux10 ;;
1299       *-hp-hpux11* )  opsys=hpux11 ;;
1300       *            )  opsys=hpux   ;;
1301     esac
1302
1303         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1304    echo "    xemacs will be linked with \"strcat.o\""
1305  fi ;; esac
1306
1307     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1308         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1309     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1310
1311     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1312   ;;
1313
1314     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1315   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1316
1317     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1318   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1319   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1320   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1321   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1322   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1323
1324     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1325   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1326
1327     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1328
1329     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1330
1331     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1332
1333     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1334
1335       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1336
1337     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1338
1339     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1340
1341     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1342
1343     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1344
1345         mips-mips-usg* ) machine=mips4 ;;
1346   mips-mips-riscos4 )
1347     machine=mips4
1348     NON_GNU_CC="cc -systype bsd43"
1349     NON_GNU_CPP="cc -systype bsd43 -E"
1350     case "$canonical" in
1351       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1352       mips-mips-riscos5* ) opsys=riscos5 ;;
1353     esac
1354   ;;
1355   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1356   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1357
1358     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1359
1360     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1361
1362     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1363   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1364
1365     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1366
1367     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1368
1369     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1370
1371     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1372
1373     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1374   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1375
1376     mips-siemens-sysv* | mips-sni-sysv*)
1377     machine=mips-siemens opsys=usg5-4
1378     NON_GNU_CC=/usr/ccs/bin/cc
1379     NON_GNU_CPP=/usr/ccs/lib/cpp
1380   ;;
1381
1382     mips-nec-sysv*)
1383     machine=mips-nec
1384     NON_GNU_CC=/usr/ccs/bin/cc
1385     NON_GNU_CPP=/usr/ccs/lib/cpp
1386   ;;
1387
1388       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1389   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1390     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1391   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1392   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1393   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1394   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1395   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1396   mips-sgi-irix*      ) opsys=irix5-0 ;;
1397
1398     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1399   *-sony-news* ) opsys=newsos5 ;;
1400
1401     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1402
1403     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1404         case "$canonical" in
1405       m68*-sunos1* )             machine=sun1     ;;
1406       m68*-sunos2* )             machine=sun2     ;;
1407       m68* )                     machine=sun3     ;;
1408       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1409       i*86-*-* )                 machine=intel386 ;;
1410       rs6000* )                  machine=rs6000   ;;
1411     esac
1412
1413         case "$canonical" in *-sunos5*)
1414       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1415     esac
1416
1417                     case "$canonical" in
1418       *-sunos4* )
1419         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1420         : ;;
1421       *-solaris2* )
1422         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1423         RANLIB=':' ;;
1424     esac
1425
1426     case "$canonical" in
1427       *-solaris*          )
1428         opsys=sol2
1429         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1430         { test "$extra_verbose" = "yes" && cat << EOF
1431     Defining OS_RELEASE = $os_release
1432 EOF
1433 cat >> confdefs.h <<EOF
1434 #define OS_RELEASE $os_release
1435 EOF
1436 }
1437  ;;
1438
1439             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1440       *-sunos4.0*         ) opsys=sunos4-0      ;;
1441       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1442       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1443       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1444       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1445       *-mach*             ) opsys=mach-bsd4-3   ;;
1446       *                   ) opsys=bsd4-2        ;;
1447     esac
1448
1449     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1450
1451         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1452   ;;
1453
1454     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1455
1456     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1457   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1458
1459     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1460
1461     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1462
1463     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1464       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1465
1466     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1467
1468     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1469
1470     vax-dec-* )
1471     case "$canonical" in
1472       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1473       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1474       *-mach* )                         opsys=mach-bsd4-3 ;;
1475     esac
1476   ;;
1477
1478     ns16k-whitechapel-* ) machine=mg1 ;;
1479
1480     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1481
1482     i[3-9]86-*-* )
1483     machine=intel386
1484     case "$canonical" in
1485       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1486       *-isc2.2* )               opsys=isc2-2 ;;
1487       *-isc4.0* )               opsys=isc4-0 ;;
1488       *-isc4.* )                opsys=isc4-1
1489                                 GCC_TEST_OPTIONS=-posix
1490                                 NON_GCC_TEST_OPTIONS=-Xp
1491                                 ;;
1492       *-isc* )                  opsys=isc3-0 ;;
1493       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1494       *-esix* )                 opsys=esix ;;
1495       *-mach* )                 opsys=mach-bsd4-3 ;;
1496       *-xenix* )                opsys=xenix ;;
1497       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1498       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1499       *-bsdi4* )                opsys=bsdos4 ;;
1500       *-bsdi3* )                opsys=bsdos3 ;;
1501       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1502       *-bsdi2* )                opsys=bsdos2 ;;
1503       *-sco3.2v5* )             opsys=sco5 ;;
1504       *-sysv5* )                opsys=sco7 ;;
1505       *-386bsd* )               opsys=386bsd ;;
1506       *-freebsd* )              opsys=freebsd ;;
1507       *-nextstep* )             opsys=nextstep ;;
1508       *-pc-cygwin* )            opsys=cygwin32 ;;
1509       *-pc-mingw* )             opsys=mingw32 ;
1510                                 test -z "$with_tty" && with_tty="no";;
1511           esac
1512   ;;
1513
1514     m68k-*-linux* ) machine=m68k opsys=linux ;;
1515
1516 esac
1517
1518 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1519
1520 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1521
1522 if test -r "${srcdir}/src/m/${machine}.h"; then
1523   machfile="m/${machine}.h"
1524   { test "$extra_verbose" = "yes" && cat << EOF
1525     Defining config_machfile = "$machfile"
1526 EOF
1527 cat >> confdefs.h <<EOF
1528 #define config_machfile "$machfile"
1529 EOF
1530 }
1531
1532 else
1533   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1534   echo "Using configure-time autodetection only."
1535 fi
1536
1537 if test -r "${srcdir}/src/s/${opsys}.h"; then
1538   opsysfile="s/${opsys}.h"
1539   { test "$extra_verbose" = "yes" && cat << EOF
1540     Defining config_opsysfile = "$opsysfile"
1541 EOF
1542 cat >> confdefs.h <<EOF
1543 #define config_opsysfile "$opsysfile"
1544 EOF
1545 }
1546
1547 else
1548   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1549   echo "Using configure-time autodetection only."
1550 fi
1551
1552
1553 if test -z "$pdump"; then
1554   case "$opsys" in
1555     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        *)        pdump=no ;;
1556   esac
1557 fi
1558
1559 if test -z "$dynamic"; then
1560   case "$opsys" in
1561     hpux* | sunos4* ) dynamic=no ;;
1562     *) dynamic=yes ;;
1563   esac
1564 fi
1565 if test "$dynamic" = "yes"; then
1566   case "$opsys" in
1567     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1568     decosf* ) ld_call_shared="-call_shared" ;;
1569     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1570     Defining DLSYM_NEEDS_UNDERSCORE
1571 EOF
1572 cat >> confdefs.h <<\EOF
1573 #define DLSYM_NEEDS_UNDERSCORE 1
1574 EOF
1575 }
1576  ;;
1577   esac
1578 else   case "$opsys" in
1579     sol2 )
1580       echo "Static linking is not supported on Solaris 2."
1581       echo "Rerun configure without specifying --dynamic=no."
1582       exit 1 ;;
1583     linux   ) ld_call_shared="-Bstatic" ;;
1584     decosf* ) ld_call_shared="-non_shared" ;;
1585   esac
1586 fi
1587
1588 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1589
1590 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1591 { test "$extra_verbose" = "yes" && cat << EOF
1592     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1593 EOF
1594 cat >> confdefs.h <<EOF
1595 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1596 EOF
1597 }
1598
1599
1600
1601 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1602 if test "$with_workshop $with_tooltalk" = "yes no"; then
1603   (echo "$progname: Usage error:"
1604 echo " " "--with-workshop requires --with-tooltalk"
1605 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1606 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1607 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1608 fi
1609
1610 if test "$with_workshop" = "yes"; then
1611   { test "$extra_verbose" = "yes" && cat << \EOF
1612     Defining SUNPRO
1613 EOF
1614 cat >> confdefs.h <<\EOF
1615 #define SUNPRO 1
1616 EOF
1617 }
1618
1619   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1620    echo "    xemacs will be linked with \"sunpro.o\""
1621  fi
1622 fi
1623
1624 if test "$with_clash_detection" != "no"; then
1625   { test "$extra_verbose" = "yes" && cat << \EOF
1626     Defining CLASH_DETECTION
1627 EOF
1628 cat >> confdefs.h <<\EOF
1629 #define CLASH_DETECTION 1
1630 EOF
1631 }
1632
1633   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1634    echo "    xemacs will be linked with \"filelock.o\""
1635  fi
1636 fi
1637
1638 test -n "$compiler" && CC="$compiler"
1639 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1640 fi
1641
1642 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1643 if test "${CFLAGS-unset}" != unset
1644   then cflags_specified=yes;
1645   else cflags_specified=no;
1646 fi
1647
1648 xe_save_CFLAGS="$CFLAGS"
1649
1650 # Extract the first word of "gcc", so it can be a program name with args.
1651 set dummy gcc; ac_word=$2
1652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1653 echo "configure:1654: checking for $ac_word" >&5
1654
1655 if test -n "$CC"; then
1656   ac_cv_prog_CC="$CC" # Let the user override the test.
1657 else
1658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1659   ac_dummy="$PATH"
1660   for ac_dir in $ac_dummy; do
1661     test -z "$ac_dir" && ac_dir=.
1662     if test -f $ac_dir/$ac_word; then
1663       ac_cv_prog_CC="gcc"
1664       break
1665     fi
1666   done
1667   IFS="$ac_save_ifs"
1668 fi
1669 CC="$ac_cv_prog_CC"
1670 if test -n "$CC"; then
1671   echo "$ac_t""$CC" 1>&6
1672 else
1673   echo "$ac_t""no" 1>&6
1674 fi
1675
1676 if test -z "$CC"; then
1677   # Extract the first word of "cc", so it can be a program name with args.
1678 set dummy cc; ac_word=$2
1679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1680 echo "configure:1681: checking for $ac_word" >&5
1681
1682 if test -n "$CC"; then
1683   ac_cv_prog_CC="$CC" # Let the user override the test.
1684 else
1685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1686   ac_prog_rejected=no
1687   ac_dummy="$PATH"
1688   for ac_dir in $ac_dummy; do
1689     test -z "$ac_dir" && ac_dir=.
1690     if test -f $ac_dir/$ac_word; then
1691       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1692         ac_prog_rejected=yes
1693         continue
1694       fi
1695       ac_cv_prog_CC="cc"
1696       break
1697     fi
1698   done
1699   IFS="$ac_save_ifs"
1700 if test $ac_prog_rejected = yes; then
1701   # We found a bogon in the path, so make sure we never use it.
1702   set dummy $ac_cv_prog_CC
1703   shift
1704   if test $# -gt 0; then
1705     # We chose a different compiler from the bogus one.
1706     # However, it has the same basename, so the bogon will be chosen
1707     # first if we set CC to just the basename; use the full file name.
1708     shift
1709     set dummy "$ac_dir/$ac_word" "$@"
1710     shift
1711     ac_cv_prog_CC="$@"
1712   fi
1713 fi
1714 fi
1715 CC="$ac_cv_prog_CC"
1716 if test -n "$CC"; then
1717   echo "$ac_t""$CC" 1>&6
1718 else
1719   echo "$ac_t""no" 1>&6
1720 fi
1721
1722   if test -z "$CC"; then
1723     case "`uname -s`" in
1724     *win32* | *WIN32*)
1725       # Extract the first word of "cl", so it can be a program name with args.
1726 set dummy cl; ac_word=$2
1727 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1728 echo "configure:1729: checking for $ac_word" >&5
1729
1730 if test -n "$CC"; then
1731   ac_cv_prog_CC="$CC" # Let the user override the test.
1732 else
1733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1734   ac_dummy="$PATH"
1735   for ac_dir in $ac_dummy; do
1736     test -z "$ac_dir" && ac_dir=.
1737     if test -f $ac_dir/$ac_word; then
1738       ac_cv_prog_CC="cl"
1739       break
1740     fi
1741   done
1742   IFS="$ac_save_ifs"
1743 fi
1744 CC="$ac_cv_prog_CC"
1745 if test -n "$CC"; then
1746   echo "$ac_t""$CC" 1>&6
1747 else
1748   echo "$ac_t""no" 1>&6
1749 fi
1750  ;;
1751     esac
1752   fi
1753   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1754 fi
1755
1756 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1757 echo "configure:1758: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1758
1759 ac_ext=c
1760 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1761 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1762 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'
1763 ac_cpp='$CPP '"$xe_cppflags"
1764 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1765 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1766 cross_compiling=no
1767
1768 cat > conftest.$ac_ext << EOF
1769
1770 #line 1771 "configure"
1771 #include "confdefs.h"
1772
1773 main(){return(0);}
1774 EOF
1775 if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1776   ac_cv_prog_cc_works=yes
1777   # If we can't run a trivial program, we are probably using a cross compiler.
1778   if (./conftest; exit) 2>/dev/null; then
1779     ac_cv_prog_cc_cross=no
1780   else
1781     ac_cv_prog_cc_cross=yes
1782   fi
1783 else
1784   echo "configure: failed program was:" >&5
1785   cat conftest.$ac_ext >&5
1786   ac_cv_prog_cc_works=no
1787 fi
1788 rm -fr conftest*
1789 ac_ext=c
1790 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1791 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1792 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'
1793 ac_cpp='$CPP '"$xe_cppflags"
1794 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1795 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1796 cross_compiling=no
1797
1798 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1799 if test $ac_cv_prog_cc_works = no; then
1800   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1801 fi
1802 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1803 echo "configure:1804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1804 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1805 cross_compiling=$ac_cv_prog_cc_cross
1806
1807 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1808 echo "configure:1809: checking whether we are using GNU C" >&5
1809
1810 cat > conftest.c <<EOF
1811 #ifdef __GNUC__
1812   yes;
1813 #endif
1814 EOF
1815 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1816   ac_cv_prog_gcc=yes
1817 else
1818   ac_cv_prog_gcc=no
1819 fi
1820
1821 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1822
1823 if test $ac_cv_prog_gcc = yes; then
1824   GCC=yes
1825 else
1826   GCC=
1827 fi
1828
1829 ac_test_CFLAGS="${CFLAGS+set}"
1830 ac_save_CFLAGS="$CFLAGS"
1831 CFLAGS=
1832 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1833 echo "configure:1834: checking whether ${CC-cc} accepts -g" >&5
1834
1835 echo 'void f(){}' > conftest.c
1836 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1837   ac_cv_prog_cc_g=yes
1838 else
1839   ac_cv_prog_cc_g=no
1840 fi
1841 rm -f conftest*
1842
1843
1844 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1845 if test "$ac_test_CFLAGS" = set; then
1846   CFLAGS="$ac_save_CFLAGS"
1847 elif test $ac_cv_prog_cc_g = yes; then
1848   if test "$GCC" = yes; then
1849     CFLAGS="-g -O2"
1850   else
1851     CFLAGS="-g"
1852   fi
1853 else
1854   if test "$GCC" = yes; then
1855     CFLAGS="-O2"
1856   else
1857     CFLAGS=
1858   fi
1859 fi
1860  
1861 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1862   CC=${NON_GNU_CC-cc}
1863   # Extract the first word of "gcc", so it can be a program name with args.
1864 set dummy gcc; ac_word=$2
1865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1866 echo "configure:1867: checking for $ac_word" >&5
1867
1868 if test -n "$CC"; then
1869   ac_cv_prog_CC="$CC" # Let the user override the test.
1870 else
1871   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1872   ac_dummy="$PATH"
1873   for ac_dir in $ac_dummy; do
1874     test -z "$ac_dir" && ac_dir=.
1875     if test -f $ac_dir/$ac_word; then
1876       ac_cv_prog_CC="gcc"
1877       break
1878     fi
1879   done
1880   IFS="$ac_save_ifs"
1881 fi
1882 CC="$ac_cv_prog_CC"
1883 if test -n "$CC"; then
1884   echo "$ac_t""$CC" 1>&6
1885 else
1886   echo "$ac_t""no" 1>&6
1887 fi
1888
1889 if test -z "$CC"; then
1890   # Extract the first word of "cc", so it can be a program name with args.
1891 set dummy cc; ac_word=$2
1892 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1893 echo "configure:1894: checking for $ac_word" >&5
1894
1895 if test -n "$CC"; then
1896   ac_cv_prog_CC="$CC" # Let the user override the test.
1897 else
1898   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1899   ac_prog_rejected=no
1900   ac_dummy="$PATH"
1901   for ac_dir in $ac_dummy; do
1902     test -z "$ac_dir" && ac_dir=.
1903     if test -f $ac_dir/$ac_word; then
1904       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1905         ac_prog_rejected=yes
1906         continue
1907       fi
1908       ac_cv_prog_CC="cc"
1909       break
1910     fi
1911   done
1912   IFS="$ac_save_ifs"
1913 if test $ac_prog_rejected = yes; then
1914   # We found a bogon in the path, so make sure we never use it.
1915   set dummy $ac_cv_prog_CC
1916   shift
1917   if test $# -gt 0; then
1918     # We chose a different compiler from the bogus one.
1919     # However, it has the same basename, so the bogon will be chosen
1920     # first if we set CC to just the basename; use the full file name.
1921     shift
1922     set dummy "$ac_dir/$ac_word" "$@"
1923     shift
1924     ac_cv_prog_CC="$@"
1925   fi
1926 fi
1927 fi
1928 CC="$ac_cv_prog_CC"
1929 if test -n "$CC"; then
1930   echo "$ac_t""$CC" 1>&6
1931 else
1932   echo "$ac_t""no" 1>&6
1933 fi
1934
1935   if test -z "$CC"; then
1936     case "`uname -s`" in
1937     *win32* | *WIN32*)
1938       # Extract the first word of "cl", so it can be a program name with args.
1939 set dummy cl; ac_word=$2
1940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1941 echo "configure:1942: checking for $ac_word" >&5
1942
1943 if test -n "$CC"; then
1944   ac_cv_prog_CC="$CC" # Let the user override the test.
1945 else
1946   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1947   ac_dummy="$PATH"
1948   for ac_dir in $ac_dummy; do
1949     test -z "$ac_dir" && ac_dir=.
1950     if test -f $ac_dir/$ac_word; then
1951       ac_cv_prog_CC="cl"
1952       break
1953     fi
1954   done
1955   IFS="$ac_save_ifs"
1956 fi
1957 CC="$ac_cv_prog_CC"
1958 if test -n "$CC"; then
1959   echo "$ac_t""$CC" 1>&6
1960 else
1961   echo "$ac_t""no" 1>&6
1962 fi
1963  ;;
1964     esac
1965   fi
1966   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1967 fi
1968
1969 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1970 echo "configure:1971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1971
1972 ac_ext=c
1973 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1974 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1975 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'
1976 ac_cpp='$CPP '"$xe_cppflags"
1977 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1978 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1979 cross_compiling=no
1980
1981 cat > conftest.$ac_ext << EOF
1982
1983 #line 1984 "configure"
1984 #include "confdefs.h"
1985
1986 main(){return(0);}
1987 EOF
1988 if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1989   ac_cv_prog_cc_works=yes
1990   # If we can't run a trivial program, we are probably using a cross compiler.
1991   if (./conftest; exit) 2>/dev/null; then
1992     ac_cv_prog_cc_cross=no
1993   else
1994     ac_cv_prog_cc_cross=yes
1995   fi
1996 else
1997   echo "configure: failed program was:" >&5
1998   cat conftest.$ac_ext >&5
1999   ac_cv_prog_cc_works=no
2000 fi
2001 rm -fr conftest*
2002 ac_ext=c
2003 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2004 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2005 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'
2006 ac_cpp='$CPP '"$xe_cppflags"
2007 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2008 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2009 cross_compiling=no
2010
2011 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2012 if test $ac_cv_prog_cc_works = no; then
2013   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2014 fi
2015 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2016 echo "configure:2017: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2017 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2018 cross_compiling=$ac_cv_prog_cc_cross
2019
2020 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2021 echo "configure:2022: checking whether we are using GNU C" >&5
2022
2023 cat > conftest.c <<EOF
2024 #ifdef __GNUC__
2025   yes;
2026 #endif
2027 EOF
2028 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2029   ac_cv_prog_gcc=yes
2030 else
2031   ac_cv_prog_gcc=no
2032 fi
2033
2034 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2035
2036 if test $ac_cv_prog_gcc = yes; then
2037   GCC=yes
2038 else
2039   GCC=
2040 fi
2041
2042 ac_test_CFLAGS="${CFLAGS+set}"
2043 ac_save_CFLAGS="$CFLAGS"
2044 CFLAGS=
2045 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2046 echo "configure:2047: checking whether ${CC-cc} accepts -g" >&5
2047
2048 echo 'void f(){}' > conftest.c
2049 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2050   ac_cv_prog_cc_g=yes
2051 else
2052   ac_cv_prog_cc_g=no
2053 fi
2054 rm -f conftest*
2055
2056
2057 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2058 if test "$ac_test_CFLAGS" = set; then
2059   CFLAGS="$ac_save_CFLAGS"
2060 elif test $ac_cv_prog_cc_g = yes; then
2061   if test "$GCC" = yes; then
2062     CFLAGS="-g -O2"
2063   else
2064     CFLAGS="-g"
2065   fi
2066 else
2067   if test "$GCC" = yes; then
2068     CFLAGS="-O2"
2069   else
2070     CFLAGS=
2071   fi
2072 fi
2073
2074 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2075   CC=gcc
2076   # Extract the first word of "gcc", so it can be a program name with args.
2077 set dummy gcc; ac_word=$2
2078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2079 echo "configure:2080: checking for $ac_word" >&5
2080
2081 if test -n "$CC"; then
2082   ac_cv_prog_CC="$CC" # Let the user override the test.
2083 else
2084   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2085   ac_dummy="$PATH"
2086   for ac_dir in $ac_dummy; do
2087     test -z "$ac_dir" && ac_dir=.
2088     if test -f $ac_dir/$ac_word; then
2089       ac_cv_prog_CC="gcc"
2090       break
2091     fi
2092   done
2093   IFS="$ac_save_ifs"
2094 fi
2095 CC="$ac_cv_prog_CC"
2096 if test -n "$CC"; then
2097   echo "$ac_t""$CC" 1>&6
2098 else
2099   echo "$ac_t""no" 1>&6
2100 fi
2101
2102 if test -z "$CC"; then
2103   # Extract the first word of "cc", so it can be a program name with args.
2104 set dummy cc; ac_word=$2
2105 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2106 echo "configure:2107: checking for $ac_word" >&5
2107
2108 if test -n "$CC"; then
2109   ac_cv_prog_CC="$CC" # Let the user override the test.
2110 else
2111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2112   ac_prog_rejected=no
2113   ac_dummy="$PATH"
2114   for ac_dir in $ac_dummy; do
2115     test -z "$ac_dir" && ac_dir=.
2116     if test -f $ac_dir/$ac_word; then
2117       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2118         ac_prog_rejected=yes
2119         continue
2120       fi
2121       ac_cv_prog_CC="cc"
2122       break
2123     fi
2124   done
2125   IFS="$ac_save_ifs"
2126 if test $ac_prog_rejected = yes; then
2127   # We found a bogon in the path, so make sure we never use it.
2128   set dummy $ac_cv_prog_CC
2129   shift
2130   if test $# -gt 0; then
2131     # We chose a different compiler from the bogus one.
2132     # However, it has the same basename, so the bogon will be chosen
2133     # first if we set CC to just the basename; use the full file name.
2134     shift
2135     set dummy "$ac_dir/$ac_word" "$@"
2136     shift
2137     ac_cv_prog_CC="$@"
2138   fi
2139 fi
2140 fi
2141 CC="$ac_cv_prog_CC"
2142 if test -n "$CC"; then
2143   echo "$ac_t""$CC" 1>&6
2144 else
2145   echo "$ac_t""no" 1>&6
2146 fi
2147
2148   if test -z "$CC"; then
2149     case "`uname -s`" in
2150     *win32* | *WIN32*)
2151       # Extract the first word of "cl", so it can be a program name with args.
2152 set dummy cl; ac_word=$2
2153 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2154 echo "configure:2155: checking for $ac_word" >&5
2155
2156 if test -n "$CC"; then
2157   ac_cv_prog_CC="$CC" # Let the user override the test.
2158 else
2159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2160   ac_dummy="$PATH"
2161   for ac_dir in $ac_dummy; do
2162     test -z "$ac_dir" && ac_dir=.
2163     if test -f $ac_dir/$ac_word; then
2164       ac_cv_prog_CC="cl"
2165       break
2166     fi
2167   done
2168   IFS="$ac_save_ifs"
2169 fi
2170 CC="$ac_cv_prog_CC"
2171 if test -n "$CC"; then
2172   echo "$ac_t""$CC" 1>&6
2173 else
2174   echo "$ac_t""no" 1>&6
2175 fi
2176  ;;
2177     esac
2178   fi
2179   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2180 fi
2181
2182 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2183 echo "configure:2184: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2184
2185 ac_ext=c
2186 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2187 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2188 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'
2189 ac_cpp='$CPP '"$xe_cppflags"
2190 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2191 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2192 cross_compiling=no
2193
2194 cat > conftest.$ac_ext << EOF
2195
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198
2199 main(){return(0);}
2200 EOF
2201 if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2202   ac_cv_prog_cc_works=yes
2203   # If we can't run a trivial program, we are probably using a cross compiler.
2204   if (./conftest; exit) 2>/dev/null; then
2205     ac_cv_prog_cc_cross=no
2206   else
2207     ac_cv_prog_cc_cross=yes
2208   fi
2209 else
2210   echo "configure: failed program was:" >&5
2211   cat conftest.$ac_ext >&5
2212   ac_cv_prog_cc_works=no
2213 fi
2214 rm -fr conftest*
2215 ac_ext=c
2216 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2217 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2218 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'
2219 ac_cpp='$CPP '"$xe_cppflags"
2220 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2221 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2222 cross_compiling=no
2223
2224 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2225 if test $ac_cv_prog_cc_works = no; then
2226   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2227 fi
2228 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2229 echo "configure:2230: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2230 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2231 cross_compiling=$ac_cv_prog_cc_cross
2232
2233 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2234 echo "configure:2235: checking whether we are using GNU C" >&5
2235
2236 cat > conftest.c <<EOF
2237 #ifdef __GNUC__
2238   yes;
2239 #endif
2240 EOF
2241 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2242   ac_cv_prog_gcc=yes
2243 else
2244   ac_cv_prog_gcc=no
2245 fi
2246
2247 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2248
2249 if test $ac_cv_prog_gcc = yes; then
2250   GCC=yes
2251 else
2252   GCC=
2253 fi
2254
2255 ac_test_CFLAGS="${CFLAGS+set}"
2256 ac_save_CFLAGS="$CFLAGS"
2257 CFLAGS=
2258 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2259 echo "configure:2260: checking whether ${CC-cc} accepts -g" >&5
2260
2261 echo 'void f(){}' > conftest.c
2262 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2263   ac_cv_prog_cc_g=yes
2264 else
2265   ac_cv_prog_cc_g=no
2266 fi
2267 rm -f conftest*
2268
2269
2270 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2271 if test "$ac_test_CFLAGS" = set; then
2272   CFLAGS="$ac_save_CFLAGS"
2273 elif test $ac_cv_prog_cc_g = yes; then
2274   if test "$GCC" = yes; then
2275     CFLAGS="-g -O2"
2276   else
2277     CFLAGS="-g"
2278   fi
2279 else
2280   if test "$GCC" = yes; then
2281     CFLAGS="-O2"
2282   else
2283     CFLAGS=
2284   fi
2285 fi
2286
2287 fi
2288 CFLAGS="$xe_save_CFLAGS"
2289
2290
2291 test -n "$CPP" -a -d "$CPP" && CPP=
2292
2293 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2294
2295 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2296 echo "configure:2297: checking how to run the C preprocessor" >&5
2297 # On Suns, sometimes $CPP names a directory.
2298 if test -n "$CPP" && test -d "$CPP"; then
2299   CPP=
2300 fi
2301 if test -z "$CPP"; then
2302
2303   # This must be in double quotes, not single quotes, because CPP may get
2304   # substituted into the Makefile and "${CC-cc}" will confuse make.
2305   CPP="${CC-cc} -E"
2306   # On the NeXT, cc -E runs the code through the compiler's parser,
2307   # not just through cpp.
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <assert.h>
2312 Syntax Error
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   :
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   CPP="${CC-cc} -E -traditional-cpp"
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <assert.h>
2329 Syntax Error
2330 EOF
2331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2332 { (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2334 if test -z "$ac_err"; then
2335   :
2336 else
2337   echo "$ac_err" >&5
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   CPP="${CC-cc} -nologo -E"
2342   cat > conftest.$ac_ext <<EOF
2343 #line 2344 "configure"
2344 #include "confdefs.h"
2345 #include <assert.h>
2346 Syntax Error
2347 EOF
2348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2349 { (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2351 if test -z "$ac_err"; then
2352   :
2353 else
2354   echo "$ac_err" >&5
2355   echo "configure: failed program was:" >&5
2356   cat conftest.$ac_ext >&5
2357   rm -rf conftest*
2358   CPP=/lib/cpp
2359 fi
2360 rm -f conftest*
2361 fi
2362 rm -f conftest*
2363 fi
2364 rm -f conftest*
2365   ac_cv_prog_CPP="$CPP"
2366   CPP="$ac_cv_prog_CPP"
2367 else
2368   ac_cv_prog_CPP="$CPP"
2369 fi
2370 echo "$ac_t""$CPP" 1>&6
2371
2372
2373
2374 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2375 echo "configure:2376: checking for AIX" >&5
2376 cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 #ifdef _AIX
2380   yes
2381 #endif
2382
2383 EOF
2384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2385   egrep "yes" >/dev/null 2>&1; then
2386   rm -rf conftest*
2387   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2388     Defining _ALL_SOURCE
2389 EOF
2390 cat >> confdefs.h <<\EOF
2391 #define _ALL_SOURCE 1
2392 EOF
2393 }
2394
2395 else
2396   rm -rf conftest*
2397   echo "$ac_t""no" 1>&6
2398 fi
2399 rm -f conftest*
2400
2401  
2402
2403 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2404 echo "configure:2405: checking for GNU libc" >&5
2405 cat > conftest.$ac_ext <<EOF
2406 #line 2407 "configure"
2407 #include "confdefs.h"
2408 #include <features.h>
2409 int main() {
2410
2411 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2412 #error Not a GNU libc system :-(
2413 ******* ======= ******** &&&&&&&&
2414 #endif
2415
2416 ; return 0; }
2417 EOF
2418 if { (eval echo configure:2419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2419   rm -rf conftest*
2420   have_glibc=yes
2421 else
2422   echo "configure: failed program was:" >&5
2423   cat conftest.$ac_ext >&5
2424   rm -rf conftest*
2425   have_glibc=no
2426 fi
2427 rm -f conftest*
2428 echo "$ac_t""$have_glibc" 1>&6
2429 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining _GNU_SOURCE
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define _GNU_SOURCE 1
2434 EOF
2435 }
2436
2437
2438 case "$opsys" in
2439   sol2)
2440    { test "$extra_verbose" = "yes" && cat << \EOF
2441     Defining __EXTENSIONS__
2442 EOF
2443 cat >> confdefs.h <<\EOF
2444 #define __EXTENSIONS__ 1
2445 EOF
2446 }
2447
2448       if test "$os_release" -ge 55; then
2449      { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE = 500
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE 500
2454 EOF
2455 }
2456
2457      { test "$extra_verbose" = "yes" && cat << \EOF
2458     Defining _XOPEN_SOURCE_EXTENDED
2459 EOF
2460 cat >> confdefs.h <<\EOF
2461 #define _XOPEN_SOURCE_EXTENDED 1
2462 EOF
2463 }
2464
2465    fi ;;
2466   linux)
2467     { test "$extra_verbose" = "yes" && cat << \EOF
2468     Defining _POSIX_C_SOURCE = 199506L
2469 EOF
2470 cat >> confdefs.h <<\EOF
2471 #define _POSIX_C_SOURCE 199506L
2472 EOF
2473 }
2474
2475     { test "$extra_verbose" = "yes" && cat << \EOF
2476     Defining _XOPEN_SOURCE = 500
2477 EOF
2478 cat >> confdefs.h <<\EOF
2479 #define _XOPEN_SOURCE 500
2480 EOF
2481 }
2482
2483     { test "$extra_verbose" = "yes" && cat << \EOF
2484     Defining _XOPEN_SOURCE_EXTENDED
2485 EOF
2486 cat >> confdefs.h <<\EOF
2487 #define _XOPEN_SOURCE_EXTENDED 1
2488 EOF
2489 }
2490
2491     ;;
2492 esac
2493
2494 cat > conftest.$ac_ext <<EOF
2495 #line 2496 "configure"
2496 #include "confdefs.h"
2497 int main () {
2498 #if defined __SUNPRO_C
2499 return 11;
2500 #elif defined __DECC
2501 return 12;
2502 #elif defined __USLC__ && defined __SCO_VERSION__
2503 return 13;
2504 #else
2505 return 0;
2506 #endif
2507 }
2508 EOF
2509 if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2510 then
2511   :
2512 else
2513   conftest_rc="$?"
2514   echo "configure: failed program was:" >&5
2515   cat conftest.$ac_ext >&5
2516   rm -fr conftest*
2517   case "$conftest_rc" in
2518   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2519   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2520   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2521 esac
2522 fi
2523 rm -fr conftest*
2524
2525
2526
2527
2528 echo "Extracting information from the machine- and system-dependent headers..."
2529
2530 tempcname="conftest.c"
2531
2532
2533
2534 cat > $tempcname < confdefs.h
2535 cat >> $tempcname <<EOF
2536 #define NOT_C_CODE
2537 #define C_SWITCH_SITE
2538 #define C_SWITCH_X_SITE
2539 #define LD_SWITCH_SITE
2540 #define LD_SWITCH_X_SITE
2541 #define LD_SWITCH_X_SITE_AUX
2542 #define OS_RELEASE $os_release
2543
2544 #ifdef config_opsysfile
2545 #include "$srcdir/src/$opsysfile"
2546 #endif
2547
2548 #ifdef config_machfile
2549 #include "$srcdir/src/$machfile"
2550 #endif
2551
2552 #ifndef LIBS_MACHINE
2553 #define LIBS_MACHINE
2554 #endif
2555 configure___ libs_machine=LIBS_MACHINE
2556
2557 #ifndef LIBS_SYSTEM
2558 #define LIBS_SYSTEM
2559 #endif
2560 configure___ libs_system=LIBS_SYSTEM
2561
2562 #ifndef LIBS_TERMCAP
2563 #define LIBS_TERMCAP
2564 #endif
2565 configure___ libs_termcap=LIBS_TERMCAP
2566
2567 #ifndef LIB_STANDARD
2568 #define LIB_STANDARD
2569 #endif
2570 configure___ libs_standard=LIB_STANDARD
2571
2572
2573 #ifndef OBJECTS_MACHINE
2574 #define OBJECTS_MACHINE
2575 #endif
2576 configure___ objects_machine=OBJECTS_MACHINE
2577
2578 #ifndef OBJECTS_SYSTEM
2579 #define OBJECTS_SYSTEM
2580 #endif
2581 configure___ objects_system=OBJECTS_SYSTEM
2582
2583
2584 #ifndef C_SWITCH_MACHINE
2585 #define C_SWITCH_MACHINE
2586 #endif
2587 configure___ c_switch_machine=C_SWITCH_MACHINE
2588
2589 #ifndef C_SWITCH_SYSTEM
2590 #define C_SWITCH_SYSTEM
2591 #endif
2592 configure___ c_switch_system=C_SWITCH_SYSTEM
2593
2594
2595 #ifndef LD_SWITCH_MACHINE
2596 #define LD_SWITCH_MACHINE
2597 #endif
2598 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2599
2600 #ifndef LD_SWITCH_SYSTEM
2601 #define LD_SWITCH_SYSTEM
2602 #endif
2603 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2604
2605
2606 #ifndef UNEXEC
2607 #define UNEXEC "unexec.o"
2608 #endif
2609 configure___ unexec=UNEXEC
2610
2611
2612 #ifndef LD_SWITCH_SHARED
2613 #define LD_SWITCH_SHARED "-c"
2614 #endif
2615 configure___ ld_switch_shared=LD_SWITCH_SHARED
2616
2617
2618 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2619 configure___ ordinary_ld=ORDINARY_LD
2620
2621 #ifdef ORDINARY_LINK
2622 #define LD ORDINARY_LD
2623 #else /* no ORDINARY LINK */
2624 #ifdef COFF_ENCAPSULATE
2625 #define LD "\$(CC) -nostdlib"
2626 #else /* not COFF_ENCAPSULATE */
2627 #ifdef LINKER
2628 #define LD LINKER
2629 #else /* ! defined (LINKER) */
2630 #define LD "ld"
2631 #endif /* ! defined (LINKER) */
2632 #endif /* ! defined (COFF_ENCAPSULATE) */
2633 #endif /* not ORDINARY_LINK */
2634 configure___ ld=LD
2635
2636 #ifndef LIB_GCC
2637 #define LIB_GCC
2638 #endif
2639 configure___ lib_gcc=LIB_GCC
2640
2641 #ifndef LD_TEXT_START_ADDR
2642 #define LD_TEXT_START_ADDR
2643 #endif
2644 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2645
2646
2647 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2648 #ifdef NO_REMAP
2649 #ifdef COFF_ENCAPSULATE
2650 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2651 #else /* ! defined (COFF_ENCAPSULATE) */
2652 #define START_FILES "pre-crt0.o /lib/crt0.o"
2653 #endif /* ! defined (COFF_ENCAPSULATE) */
2654 #else /* ! defined (NO_REMAP) */
2655 #define START_FILES "ecrt0.o"
2656 #endif /* ! defined (NO_REMAP) */
2657 #endif /* no ORDINARY_LINK */
2658 #ifndef START_FILES
2659 #define START_FILES
2660 #endif
2661 configure___ start_files=START_FILES
2662
2663 #ifdef ORDINARY_LINK
2664 configure___ ordinary_link=yes
2665 #else
2666 configure___ ordinary_link=no
2667 #endif
2668
2669 #ifdef SYSTEM_MALLOC
2670 configure___ system_malloc=yes
2671 #else
2672 configure___ system_malloc=no
2673 #endif
2674
2675 #ifdef TERMINFO
2676 configure___ have_terminfo=yes
2677 #else
2678 configure___ have_terminfo=no
2679 #endif
2680
2681 #ifdef MAIL_USE_FLOCK
2682 configure___ mail_use_flock=yes
2683 #else
2684 configure___ mail_use_flock=no
2685 #endif
2686
2687 #ifdef MAIL_USE_LOCKF
2688 configure___ mail_use_lockf=yes
2689 #else
2690 configure___ mail_use_lockf=no
2691 #endif
2692
2693 #ifdef MAIL_USE_LOCKING
2694 configure___ mail_use_locking=yes
2695 #else
2696 configure___ mail_use_locking=no
2697 #endif
2698
2699 #ifdef HAVE_WIN32_PROCESSES
2700 configure___ win32_processes=yes
2701 #else
2702 configure___ win32_processes=no
2703 #endif
2704
2705 EOF
2706
2707 CPP=`eval "echo $CPP $CPPFLAGS"`
2708 eval `$CPP -Isrc $tempcname \
2709         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2710
2711 rm $tempcname
2712
2713 if test "$pdump" = "yes"; then
2714   ordinary_link="yes"
2715   ld="${ordinary_ld}"
2716   start_files=
2717   libs_standard=
2718   unexec=
2719   lib_gcc=
2720 fi
2721
2722 test "$extra_verbose" = "yes" && \
2723   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 ""
2724
2725 case "$opsys" in mingw* | cygwin*)
2726   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2727   cygwin_include=`eval "dirname $cygwin_include"` ;
2728   cygwin_include="-I$cygwin_include/../include" ;
2729   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2730   case "$opsys" in mingw*)
2731     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2732   esac
2733   ;;
2734 esac
2735
2736 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2737
2738
2739 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2740
2741 if test "$__USLC__" = yes; then
2742   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2743 echo "configure:2744: checking for whether the -Kalloca compiler flag is needed" >&5
2744   need_kalloca=no
2745   cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748
2749 int main() {
2750 void *x = alloca(4);
2751 ; return 0; }
2752 EOF
2753 if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2754   rm -rf conftest*
2755   :
2756 else
2757   echo "configure: failed program was:" >&5
2758   cat conftest.$ac_ext >&5
2759   rm -rf conftest*
2760   
2761     xe_save_c_switch_system="$c_switch_system"
2762     c_switch_system="$c_switch_system -Kalloca"
2763     cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2766
2767 int main() {
2768 void *x = alloca(4);
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2772   rm -rf conftest*
2773    need_kalloca=yes 
2774 else
2775   echo "configure: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777 fi
2778 rm -f conftest*
2779     c_switch_system="$xe_save_c_switch_system"
2780 fi
2781 rm -f conftest*
2782   echo "$ac_t""$need_kalloca" 1>&6
2783   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
2784 fi
2785
2786 if test "$cflags_specified" = "no"; then
2787       if   test "$GCC" = "yes"; then
2788     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2789         CFLAGS="$CFLAGS -Wsign-compare"
2790                 if test "$xemacs_compiler" != "g++"; then
2791       CFLAGS="$CFLAGS -Wshadow"
2792     fi
2793             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2794               elif test "$__SUNPRO_C" = "yes"; then
2795     case "$opsys" in
2796       sol2    ) CFLAGS="-v -xO4" ;;
2797       sunos4* ) CFLAGS="-xO2";;
2798     esac
2799   elif test "$__DECC" = "yes"; then
2800     CFLAGS="-O3"
2801   elif test "$CC" = "xlc"; then
2802     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2803     else
2804     CFLAGS="-O" ;  fi
2805 fi
2806
2807 if test "$GCC" = "yes"; then
2808 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2809 echo "configure:2810: checking for buggy gcc versions" >&5
2810 GCC_VERSION=`$CC --version`
2811 case `uname -s`:`uname -m`:$GCC_VERSION in
2812                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2813                         case "$CFLAGS" in
2814             *-O2*|*-O3*)
2815                 case "$CFLAGS" in
2816                     *-fno-schedule-insns*) ;;
2817                     *)
2818                         echo "$ac_t""yes" 1>&6
2819                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2820                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2821                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2822                         ;;
2823                 esac
2824                 ;;
2825         esac
2826         ;;
2827                     Linux:alpha:egcs-2.91.*)
2828         echo "$ac_t""yes" 1>&6
2829         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2830         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2831         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2832         ;;
2833     *:i*86*:2.7.2*)
2834         case "$CFLAGS" in
2835             *-O2*|*-O3*)
2836                 case "$GCC_VERSION" in
2837                     2.7.2)
2838                         case "$CFLAGS" in
2839                             *-fno-strength-reduce*) ;;
2840                             *)
2841                                 echo "$ac_t""yes" 1>&6
2842                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2843                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2844                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2845                                 ;;
2846                         esac
2847                         ;;
2848                 esac
2849                 case "$CFLAGS" in
2850                  *-fno-caller-saves*) ;;
2851                  *)
2852                     echo "$ac_t""yes" 1>&6
2853                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2854                     echo "configure: warning: -fno-caller-saves." 1>&2
2855                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2856                     ;;
2857                 esac
2858                 ;;
2859         esac
2860         ;;
2861 esac
2862 echo "$ac_t""no" 1>&6
2863 fi
2864
2865 if test "$pdump" != "yes"; then
2866   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2867 echo "configure:2868: checking for \"-z nocombreloc\" linker flag" >&5
2868   case "`ld --help 2>&1`" in
2869     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2870       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2871     *) echo "$ac_t""no" 1>&6 ;;
2872   esac
2873 fi
2874
2875
2876
2877 if test "$GCC" = "yes"; then
2878   set x $ld_switch_system; shift; ld_switch_system=""
2879   while test -n "$1"; do
2880     case $1 in
2881       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2882       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2883       -Xlinker* ) ;;
2884       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2885     esac
2886     shift
2887   done
2888 fi
2889
2890 if test "$GCC" = "yes"; then
2891   set x $ld_switch_machine; shift; ld_switch_machine=""
2892   while test -n "$1"; do
2893     case $1 in
2894       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2895       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2896       -Xlinker* ) ;;
2897       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2898     esac
2899     shift
2900   done
2901 fi
2902
2903 if test "$GCC" = "yes"; then
2904   set x $ld_switch_site; shift; ld_switch_site=""
2905   while test -n "$1"; do
2906     case $1 in
2907       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2908       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2909       -Xlinker* ) ;;
2910       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2911     esac
2912     shift
2913   done
2914 fi
2915
2916 if test "$GCC" = "yes"; then
2917   set x $LDFLAGS; shift; LDFLAGS=""
2918   while test -n "$1"; do
2919     case $1 in
2920       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2921       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2922       -Xlinker* ) ;;
2923       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2924     esac
2925     shift
2926   done
2927 fi
2928
2929 if test "$GCC" = "yes"; then
2930   set x $ld_call_shared; shift; ld_call_shared=""
2931   while test -n "$1"; do
2932     case $1 in
2933       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2934       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2935       -Xlinker* ) ;;
2936       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2937     esac
2938     shift
2939   done
2940 fi
2941
2942 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2943    echo "    xemacs will be linked with \"$objects_machine\""
2944  fi
2945 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2946    echo "    xemacs will be linked with \"$objects_system\""
2947  fi
2948 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2949    echo "    xemacs will be linked with \"$unexec\""
2950  fi
2951 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2952    echo "    xemacs will be linked with \"dumper.o\""
2953  fi
2954
2955 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2956 echo "configure:2957: checking for dynodump" >&5
2957 if test "$unexec" != "unexsol2.o"; then
2958   echo "$ac_t""no" 1>&6
2959 else
2960   echo "$ac_t""yes" 1>&6
2961   { test "$extra_verbose" = "yes" && cat << \EOF
2962     Defining DYNODUMP
2963 EOF
2964 cat >> confdefs.h <<\EOF
2965 #define DYNODUMP 1
2966 EOF
2967 }
2968
2969   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2970   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2971   case "$machine" in
2972     sparc   ) dynodump_arch=sparc ;;
2973     *86*    ) dynodump_arch=i386  ;;
2974     powerpc ) dynodump_arch=ppc   ;;
2975   esac
2976     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
2977 fi
2978
2979
2980 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2981
2982 if test "$unexec" = "unexaix.o"; then
2983   if   test "$dynamic" = "no"; then
2984   start_flags="-Wl,-bnso,-bnodelcsect"
2985   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2986   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2987     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2988   done
2989   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2990     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2991   done
2992   
2993 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2994 echo "configure:2995: checking for terminateAndUnload in -lC" >&5
2995 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2996
2997 xe_check_libs=" -lC "
2998 cat > conftest.$ac_ext <<EOF
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001 /* Override any gcc2 internal prototype to avoid an error.  */
3002 /* We use char because int might match the return type of a gcc2
3003     builtin and then its argument prototype would still apply.  */
3004 char terminateAndUnload();
3005
3006 int main() {
3007 terminateAndUnload()
3008 ; return 0; }
3009 EOF
3010 if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3011   rm -rf conftest*
3012   eval "ac_cv_lib_$ac_lib_var=yes"
3013 else
3014   echo "configure: failed program was:" >&5
3015   cat conftest.$ac_ext >&5
3016   rm -rf conftest*
3017   eval "ac_cv_lib_$ac_lib_var=no"
3018 fi
3019 rm -f conftest*
3020 xe_check_libs=""
3021
3022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3023   echo "$ac_t""yes" 1>&6
3024   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3025 else
3026   echo "$ac_t""no" 1>&6
3027 fi
3028
3029
3030   fi
3031 elif test -n "$ld_text_start_addr"; then
3032   start_flags="-T $ld_text_start_addr -e __start"
3033 fi
3034
3035
3036
3037
3038 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3039  test -z "$linker" &&  linker='$(CC) -nostdlib'
3040  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3041 fi
3042 test "$GCC" != "yes" && lib_gcc=
3043
3044
3045
3046
3047
3048 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3049 if test -n "$site_libraries"; then
3050   for arg in $site_libraries; do
3051     case "$arg" in
3052      -* ) ;;
3053      * ) test -d "$arg" || \
3054            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3055        arg="-L${arg}" ;;
3056     esac
3057     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3058   done
3059 fi
3060
3061 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3062 if test -n "$site_includes"; then
3063   for arg in $site_includes; do
3064     case "$arg" in
3065       -* ) ;;
3066       * ) test -d "$arg" || \
3067            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3068       arg="-I${arg}" ;;
3069     esac
3070     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3071   done
3072 fi
3073
3074 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3075 if test -n "$site_prefixes"; then
3076   for dir in $site_prefixes; do
3077     lib_dir="${dir}/lib"
3078     inc_dir="${dir}/include"
3079     if test ! -d "$dir"; then
3080       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3081     elif test ! -d "$lib_dir"; then
3082       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3083     else
3084       if test -d "$inc_dir"; then
3085         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
3086       fi
3087       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
3088     fi
3089   done
3090 fi
3091
3092
3093 for dir in "/usr/ccs/lib"; do
3094   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
3095 done
3096
3097 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3098 if test -n "$site_runtime_libraries"; then
3099   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3100   export LD_RUN_PATH
3101 fi
3102
3103
3104
3105
3106
3107 if test -n "$add_runtime_path"; then :;
3108 elif test "$dynamic" = "no"; then add_runtime_path=no
3109 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3110 else case "$opsys" in
3111        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3112        * ) add_runtime_path=no ;;
3113      esac
3114 fi
3115
3116 if test "$add_runtime_path" = "yes"; then
3117       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3118 echo "configure:3119: checking "for runtime libraries flag"" >&5
3119   case "$opsys" in
3120     sol2 ) dash_r="-R" ;;
3121     decosf* | linux* | irix*) dash_r="-rpath " ;;
3122     *)
3123       dash_r=""
3124       for try_dash_r in "-R" "-R " "-rpath "; do
3125         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3126         
3127 if test "$GCC" = "yes"; then
3128   set x $xe_check_libs; shift; xe_check_libs=""
3129   while test -n "$1"; do
3130     case $1 in
3131       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3132       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3133       -Xlinker* ) ;;
3134       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3135     esac
3136     shift
3137   done
3138 fi
3139         cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142
3143 int main() {
3144
3145 ; return 0; }
3146 EOF
3147 if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3148   rm -rf conftest*
3149   dash_r="$try_dash_r"
3150 else
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153 fi
3154 rm -f conftest*
3155         xe_check_libs=""
3156         test -n "$dash_r" && break
3157       done ;;
3158   esac
3159   if test -n "$dash_r";
3160     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3161     else echo "$ac_t""NONE" 1>&6
3162   fi
3163 fi
3164
3165 xe_add_unique_runpath_dir='
3166   xe_add_p=yes
3167   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3168   done
3169   if test "$xe_add_p" = "yes"; then
3170     test -n "$runpath" && runpath="${runpath}:"
3171     runpath="${runpath}${xe_runpath_dir}"
3172     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3173   fi'
3174
3175
3176
3177
3178 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3179     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3180   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3181   
3182         runpath="" runpath_dirs=""
3183   if test -n "$LD_RUN_PATH"; then
3184     runpath="$LD_RUN_PATH"
3185   elif test "$GCC" = "yes"; then
3186         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3187     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3188     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3189     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3190       case "$arg" in P,* | -L* | -R* )
3191         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3192           {
3193 xe_runpath_dir="$dir"
3194   test "$xe_runpath_dir" != "/lib"     -a \
3195         "$xe_runpath_dir" != "/usr/lib" -a \
3196         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3197   eval "$xe_add_unique_runpath_dir"
3198 }
3199         done ;;
3200       esac
3201     done
3202     ld_switch_run="$ld_switch_run_save"
3203     rm -f conftest*
3204   else
3205         for arg in $ld_switch_site $ld_switch_x_site; do
3206       case "$arg" in -L*) {
3207 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3208   test "$xe_runpath_dir" != "/lib"     -a \
3209         "$xe_runpath_dir" != "/usr/lib" -a \
3210         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3211   eval "$xe_add_unique_runpath_dir"
3212 };; esac
3213     done
3214         if test "$opsys $need_motif" = "sol2 yes"; then
3215       xe_runpath_dir="/opt/SUNWdt/lib";
3216       eval "$xe_add_unique_runpath_dir";
3217     fi
3218   fi 
3219   if test -n "$runpath"; then
3220     ld_switch_run="${dash_r}${runpath}"
3221     
3222 if test "$GCC" = "yes"; then
3223   set x $ld_switch_run; shift; ld_switch_run=""
3224   while test -n "$1"; do
3225     case $1 in
3226       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3227       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3228       -Xlinker* ) ;;
3229       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3230     esac
3231     shift
3232   done
3233 fi
3234     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3235   fi
3236 fi
3237
3238
3239
3240 GNU_MALLOC=yes
3241 if test "$with_dlmalloc" != "no"; then
3242         doug_lea_malloc=yes
3243 else
3244         doug_lea_malloc=no
3245 fi
3246 after_morecore_hook_exists=yes
3247 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3248 echo "configure:3249: checking for malloc_set_state" >&5
3249
3250 cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 /* System header to define __stub macros and hopefully few prototypes,
3254     which can conflict with char malloc_set_state(); below.  */
3255 #include <assert.h>
3256 /* Override any gcc2 internal prototype to avoid an error.  */
3257 /* We use char because int might match the return type of a gcc2
3258     builtin and then its argument prototype would still apply.  */
3259 char malloc_set_state();
3260
3261 int main() {
3262
3263 /* The GNU C library defines this for functions which it implements
3264     to always fail with ENOSYS.  Some functions are actually named
3265     something starting with __ and the normal name is an alias.  */
3266 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3267 choke me
3268 #else
3269 malloc_set_state();
3270 #endif
3271
3272 ; return 0; }
3273 EOF
3274 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3275   rm -rf conftest*
3276   eval "ac_cv_func_malloc_set_state=yes"
3277 else
3278   echo "configure: failed program was:" >&5
3279   cat conftest.$ac_ext >&5
3280   rm -rf conftest*
3281   eval "ac_cv_func_malloc_set_state=no"
3282 fi
3283 rm -f conftest*
3284
3285 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3286   echo "$ac_t""yes" 1>&6
3287   :
3288 else
3289   echo "$ac_t""no" 1>&6
3290 doug_lea_malloc=no
3291 fi
3292
3293 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3294 echo "configure:3295: checking whether __after_morecore_hook exists" >&5
3295 cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298 extern void (* __after_morecore_hook)();
3299 int main() {
3300 __after_morecore_hook = 0
3301 ; return 0; }
3302 EOF
3303 if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3304   rm -rf conftest*
3305   echo "$ac_t""yes" 1>&6
3306 else
3307   echo "configure: failed program was:" >&5
3308   cat conftest.$ac_ext >&5
3309   rm -rf conftest*
3310   echo "$ac_t""no" 1>&6
3311    after_morecore_hook_exists=no
3312 fi
3313 rm -f conftest*
3314 if test "$system_malloc" = "yes" ; then
3315   GNU_MALLOC=no
3316   GNU_MALLOC_reason="
3317     - The GNU allocators don't work with this system configuration."
3318 elif test "$with_system_malloc" = "yes" ; then
3319   GNU_MALLOC=no
3320   GNU_MALLOC_reason="
3321     - User chose not to use GNU allocators."
3322 elif test "$with_debug_malloc" = "yes" ; then
3323   GNU_MALLOC=no
3324   GNU_MALLOC_reason="
3325     - User chose to use Debugging Malloc."
3326 fi
3327
3328 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3329   GNU_MALLOC_reason="
3330     - Using Doug Lea's new malloc from the GNU C Library."
3331   { test "$extra_verbose" = "yes" && cat << \EOF
3332     Defining DOUG_LEA_MALLOC
3333 EOF
3334 cat >> confdefs.h <<\EOF
3335 #define DOUG_LEA_MALLOC 1
3336 EOF
3337 }
3338
3339   if test "$after_morecore_hook_exists" = "no" ; then
3340     GNU_MALLOC_reason="
3341     - Using Doug Lea's new malloc from the Linux C Library."
3342     { test "$extra_verbose" = "yes" && cat << \EOF
3343     Defining _NO_MALLOC_WARNING_
3344 EOF
3345 cat >> confdefs.h <<\EOF
3346 #define _NO_MALLOC_WARNING_ 1
3347 EOF
3348 }
3349
3350   fi
3351 fi
3352
3353
3354
3355
3356 # Extract the first word of "ranlib", so it can be a program name with args.
3357 set dummy ranlib; ac_word=$2
3358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3359 echo "configure:3360: checking for $ac_word" >&5
3360
3361 if test -n "$RANLIB"; then
3362   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3363 else
3364   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3365   ac_dummy="$PATH"
3366   for ac_dir in $ac_dummy; do
3367     test -z "$ac_dir" && ac_dir=.
3368     if test -f $ac_dir/$ac_word; then
3369       ac_cv_prog_RANLIB="ranlib"
3370       break
3371     fi
3372   done
3373   IFS="$ac_save_ifs"
3374   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3375 fi
3376 RANLIB="$ac_cv_prog_RANLIB"
3377 if test -n "$RANLIB"; then
3378   echo "$ac_t""$RANLIB" 1>&6
3379 else
3380   echo "$ac_t""no" 1>&6
3381 fi
3382
3383 ac_aux_dir=
3384 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3385   if test -f $ac_dir/install-sh; then
3386     ac_aux_dir=$ac_dir
3387     ac_install_sh="$ac_aux_dir/install-sh -c"
3388     break
3389   elif test -f $ac_dir/install.sh; then
3390     ac_aux_dir=$ac_dir
3391     ac_install_sh="$ac_aux_dir/install.sh -c"
3392     break
3393   fi
3394 done
3395 if test -z "$ac_aux_dir"; then
3396   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3397 fi
3398 ac_config_guess=$ac_aux_dir/config.guess
3399 ac_config_sub=$ac_aux_dir/config.sub
3400 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3401
3402 # Find a good install program.  We prefer a C program (faster),
3403 # so one script is as good as another.  But avoid the broken or
3404 # incompatible versions:
3405 # SysV /etc/install, /usr/sbin/install
3406 # SunOS /usr/etc/install
3407 # IRIX /sbin/install
3408 # AIX /bin/install
3409 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3410 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3411 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3412 # ./install, which can be erroneously created by make from ./install.sh.
3413 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3414 echo "configure:3415: checking for a BSD compatible install" >&5
3415 if test -z "$INSTALL"; then
3416
3417   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3418   for ac_dir in $PATH; do
3419     # Account for people who put trailing slashes in PATH elements.
3420     case "$ac_dir/" in
3421     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3422     *)
3423       # OSF1 and SCO ODT 3.0 have their own names for install.
3424       # Don't use installbsd from OSF since it installs stuff as root
3425       # by default.
3426       for ac_prog in ginstall scoinst install; do
3427         if test -f $ac_dir/$ac_prog; then
3428           if test $ac_prog = install &&
3429             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3430             # AIX install.  It has an incompatible calling convention.
3431             :
3432           else
3433             ac_cv_path_install="$ac_dir/$ac_prog -c"
3434             break 2
3435           fi
3436         fi
3437       done
3438       ;;
3439     esac
3440   done
3441   IFS="$ac_save_IFS"
3442
3443   if test "${ac_cv_path_install+set}" = set; then
3444     INSTALL="$ac_cv_path_install"
3445   else
3446     # As a last resort, use the slow shell script.  We don't cache a
3447     # path for INSTALL within a source directory, because that will
3448     # break other packages using the cache if that directory is
3449     # removed, or if the path is relative.
3450     INSTALL="$ac_install_sh"
3451   fi
3452 fi
3453 echo "$ac_t""$INSTALL" 1>&6
3454
3455 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3456 # It thinks the first close brace ends the variable substitution.
3457 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3458
3459 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3460
3461 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3462
3463 for ac_prog in 'bison -y' byacc
3464 do
3465 # Extract the first word of "$ac_prog", so it can be a program name with args.
3466 set dummy $ac_prog; ac_word=$2
3467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3468 echo "configure:3469: checking for $ac_word" >&5
3469
3470 if test -n "$YACC"; then
3471   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3472 else
3473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3474   ac_dummy="$PATH"
3475   for ac_dir in $ac_dummy; do
3476     test -z "$ac_dir" && ac_dir=.
3477     if test -f $ac_dir/$ac_word; then
3478       ac_cv_prog_YACC="$ac_prog"
3479       break
3480     fi
3481   done
3482   IFS="$ac_save_ifs"
3483 fi
3484 YACC="$ac_cv_prog_YACC"
3485 if test -n "$YACC"; then
3486   echo "$ac_t""$YACC" 1>&6
3487 else
3488   echo "$ac_t""no" 1>&6
3489 fi
3490
3491 test -n "$YACC" && break
3492 done
3493 test -n "$YACC" || YACC="yacc"
3494
3495
3496 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 
3497 do
3498 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3499 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3500 echo "configure:3501: checking for $ac_hdr" >&5
3501
3502 cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 #include <$ac_hdr>
3506 EOF
3507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3508 { (eval echo configure:3509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3510 if test -z "$ac_err"; then
3511   rm -rf conftest*
3512   eval "ac_cv_header_$ac_safe=yes"
3513 else
3514   echo "$ac_err" >&5
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517   rm -rf conftest*
3518   eval "ac_cv_header_$ac_safe=no"
3519 fi
3520 rm -f conftest*
3521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3522   echo "$ac_t""yes" 1>&6
3523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3524   { test "$extra_verbose" = "yes" && cat << EOF
3525     Defining $ac_tr_hdr
3526 EOF
3527 cat >> confdefs.h <<EOF
3528 #define $ac_tr_hdr 1
3529 EOF
3530 }
3531  
3532 else
3533   echo "$ac_t""no" 1>&6
3534 fi
3535 done
3536
3537 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3538 echo "configure:3539: checking for sys/wait.h that is POSIX.1 compatible" >&5
3539
3540 cat > conftest.$ac_ext <<EOF
3541 #line 3542 "configure"
3542 #include "confdefs.h"
3543 #include <sys/types.h>
3544 #include <sys/wait.h>
3545 #ifndef WEXITSTATUS
3546 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3547 #endif
3548 #ifndef WIFEXITED
3549 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3550 #endif
3551 int main() {
3552 int s;
3553 wait (&s);
3554 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3555 ; return 0; }
3556 EOF
3557 if { (eval echo configure:3558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3558   rm -rf conftest*
3559   ac_cv_header_sys_wait_h=yes
3560 else
3561   echo "configure: failed program was:" >&5
3562   cat conftest.$ac_ext >&5
3563   rm -rf conftest*
3564   ac_cv_header_sys_wait_h=no
3565 fi
3566 rm -f conftest*
3567
3568 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3569 if test $ac_cv_header_sys_wait_h = yes; then
3570   { test "$extra_verbose" = "yes" && cat << \EOF
3571     Defining HAVE_SYS_WAIT_H
3572 EOF
3573 cat >> confdefs.h <<\EOF
3574 #define HAVE_SYS_WAIT_H 1
3575 EOF
3576 }
3577
3578 fi
3579
3580 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3581 echo "configure:3582: checking for ANSI C header files" >&5
3582
3583 cat > conftest.$ac_ext <<EOF
3584 #line 3585 "configure"
3585 #include "confdefs.h"
3586 #include <stdlib.h>
3587 #include <stdarg.h>
3588 #include <string.h>
3589 #include <float.h>
3590 EOF
3591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3592 { (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3594 if test -z "$ac_err"; then
3595   rm -rf conftest*
3596   ac_cv_header_stdc=yes
3597 else
3598   echo "$ac_err" >&5
3599   echo "configure: failed program was:" >&5
3600   cat conftest.$ac_ext >&5
3601   rm -rf conftest*
3602   ac_cv_header_stdc=no
3603 fi
3604 rm -f conftest*
3605
3606 if test $ac_cv_header_stdc = yes; then
3607   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3608 cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611 #include <string.h>
3612 EOF
3613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3614   egrep "memchr" >/dev/null 2>&1; then
3615   :
3616 else
3617   rm -rf conftest*
3618   ac_cv_header_stdc=no
3619 fi
3620 rm -f conftest*
3621
3622 fi
3623
3624 if test $ac_cv_header_stdc = yes; then
3625   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3626 cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629 #include <stdlib.h>
3630 EOF
3631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3632   egrep "free" >/dev/null 2>&1; then
3633   :
3634 else
3635   rm -rf conftest*
3636   ac_cv_header_stdc=no
3637 fi
3638 rm -f conftest*
3639
3640 fi
3641
3642 if test $ac_cv_header_stdc = yes; then
3643   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3644 cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 #include <ctype.h>
3648 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3649 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3650 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3651 int main () { int i; for (i = 0; i < 256; i++)
3652 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3653 exit (0); }
3654
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3657 then
3658   :
3659 else
3660   conftest_rc="$?"
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663   rm -fr conftest*
3664   ac_cv_header_stdc=no
3665 fi
3666 rm -fr conftest*
3667 fi
3668
3669 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3670 if test $ac_cv_header_stdc = yes; then
3671   { test "$extra_verbose" = "yes" && cat << \EOF
3672     Defining STDC_HEADERS
3673 EOF
3674 cat >> confdefs.h <<\EOF
3675 #define STDC_HEADERS 1
3676 EOF
3677 }
3678
3679 fi
3680
3681 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3682 echo "configure:3683: checking whether time.h and sys/time.h may both be included" >&5
3683
3684 cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
3686 #include "confdefs.h"
3687 #include <sys/types.h>
3688 #include <sys/time.h>
3689 #include <time.h>
3690 int main() {
3691 struct tm *tp;
3692 ; return 0; }
3693 EOF
3694 if { (eval echo configure:3695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3695   rm -rf conftest*
3696   ac_cv_header_time=yes
3697 else
3698   echo "configure: failed program was:" >&5
3699   cat conftest.$ac_ext >&5
3700   rm -rf conftest*
3701   ac_cv_header_time=no
3702 fi
3703 rm -f conftest*
3704
3705 echo "$ac_t""$ac_cv_header_time" 1>&6
3706 if test $ac_cv_header_time = yes; then
3707   { test "$extra_verbose" = "yes" && cat << \EOF
3708     Defining TIME_WITH_SYS_TIME
3709 EOF
3710 cat >> confdefs.h <<\EOF
3711 #define TIME_WITH_SYS_TIME 1
3712 EOF
3713 }
3714
3715 fi
3716
3717 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3718 echo "configure:3719: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3719
3720 cat > conftest.$ac_ext <<EOF
3721 #line 3722 "configure"
3722 #include "confdefs.h"
3723 #include <sys/types.h>
3724 #include <signal.h>
3725 /* NetBSD declares sys_siglist in unistd.h.  */
3726 #ifdef HAVE_UNISTD_H
3727 #include <unistd.h>
3728 #endif
3729 int main() {
3730 char *msg = *(sys_siglist + 1);
3731 ; return 0; }
3732 EOF
3733 if { (eval echo configure:3734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3734   rm -rf conftest*
3735   ac_cv_decl_sys_siglist=yes
3736 else
3737   echo "configure: failed program was:" >&5
3738   cat conftest.$ac_ext >&5
3739   rm -rf conftest*
3740   ac_cv_decl_sys_siglist=no
3741 fi
3742 rm -f conftest*
3743
3744 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3745 if test $ac_cv_decl_sys_siglist = yes; then
3746   { test "$extra_verbose" = "yes" && cat << \EOF
3747     Defining SYS_SIGLIST_DECLARED
3748 EOF
3749 cat >> confdefs.h <<\EOF
3750 #define SYS_SIGLIST_DECLARED 1
3751 EOF
3752 }
3753
3754 fi
3755
3756
3757
3758 echo $ac_n "checking for utime""... $ac_c" 1>&6
3759 echo "configure:3760: checking for utime" >&5
3760 cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763 #include <sys/types.h>
3764 #include <utime.h>
3765 int main() {
3766 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3767 ; return 0; }
3768 EOF
3769 if { (eval echo configure:3770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3770   rm -rf conftest*
3771   echo "$ac_t""yes" 1>&6
3772    { test "$extra_verbose" = "yes" && cat << \EOF
3773     Defining HAVE_UTIME
3774 EOF
3775 cat >> confdefs.h <<\EOF
3776 #define HAVE_UTIME 1
3777 EOF
3778 }
3779
3780 else
3781   echo "configure: failed program was:" >&5
3782   cat conftest.$ac_ext >&5
3783   rm -rf conftest*
3784   echo "$ac_t""no" 1>&6
3785       for ac_func in utimes
3786 do
3787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3788 echo "configure:3789: checking for $ac_func" >&5
3789
3790 cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793 /* System header to define __stub macros and hopefully few prototypes,
3794     which can conflict with char $ac_func(); below.  */
3795 #include <assert.h>
3796 /* Override any gcc2 internal prototype to avoid an error.  */
3797 /* We use char because int might match the return type of a gcc2
3798     builtin and then its argument prototype would still apply.  */
3799 char $ac_func();
3800
3801 int main() {
3802
3803 /* The GNU C library defines this for functions which it implements
3804     to always fail with ENOSYS.  Some functions are actually named
3805     something starting with __ and the normal name is an alias.  */
3806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3807 choke me
3808 #else
3809 $ac_func();
3810 #endif
3811
3812 ; return 0; }
3813 EOF
3814 if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3815   rm -rf conftest*
3816   eval "ac_cv_func_$ac_func=yes"
3817 else
3818   echo "configure: failed program was:" >&5
3819   cat conftest.$ac_ext >&5
3820   rm -rf conftest*
3821   eval "ac_cv_func_$ac_func=no"
3822 fi
3823 rm -f conftest*
3824
3825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3826   echo "$ac_t""yes" 1>&6
3827     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3828   { test "$extra_verbose" = "yes" && cat << EOF
3829     Defining $ac_tr_func
3830 EOF
3831 cat >> confdefs.h <<EOF
3832 #define $ac_tr_func 1
3833 EOF
3834 }
3835  
3836 else
3837   echo "$ac_t""no" 1>&6
3838 fi
3839 done
3840
3841 fi
3842 rm -f conftest*
3843
3844
3845 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3846 echo "configure:3847: checking return type of signal handlers" >&5
3847
3848 cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851 #include <sys/types.h>
3852 #include <signal.h>
3853 #ifdef signal
3854 #undef signal
3855 #endif
3856 #ifdef __cplusplus
3857 extern "C" void (*signal (int, void (*)(int)))(int);
3858 #else
3859 void (*signal ()) ();
3860 #endif
3861
3862 int main() {
3863 int i;
3864 ; return 0; }
3865 EOF
3866 if { (eval echo configure:3867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3867   rm -rf conftest*
3868   ac_cv_type_signal=void
3869 else
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -rf conftest*
3873   ac_cv_type_signal=int
3874 fi
3875 rm -f conftest*
3876
3877 echo "$ac_t""$ac_cv_type_signal" 1>&6
3878 { test "$extra_verbose" = "yes" && cat << EOF
3879     Defining RETSIGTYPE = $ac_cv_type_signal
3880 EOF
3881 cat >> confdefs.h <<EOF
3882 #define RETSIGTYPE $ac_cv_type_signal
3883 EOF
3884 }
3885
3886
3887 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3888 echo "configure:3889: checking for size_t" >&5
3889
3890 cat > conftest.$ac_ext <<EOF
3891 #line 3892 "configure"
3892 #include "confdefs.h"
3893 #include <sys/types.h>
3894 #if STDC_HEADERS
3895 #include <stdlib.h>
3896 #include <stddef.h>
3897 #endif
3898 EOF
3899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3900   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3901   rm -rf conftest*
3902   ac_cv_type_size_t=yes
3903 else
3904   rm -rf conftest*
3905   ac_cv_type_size_t=no
3906 fi
3907 rm -f conftest*
3908
3909 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3910 if test $ac_cv_type_size_t = no; then
3911   { test "$extra_verbose" = "yes" && cat << \EOF
3912     Defining size_t = unsigned
3913 EOF
3914 cat >> confdefs.h <<\EOF
3915 #define size_t unsigned
3916 EOF
3917 }
3918
3919 fi
3920
3921 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3922 echo "configure:3923: checking for pid_t" >&5
3923
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 #include <sys/types.h>
3928 #if STDC_HEADERS
3929 #include <stdlib.h>
3930 #include <stddef.h>
3931 #endif
3932 EOF
3933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3934   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3935   rm -rf conftest*
3936   ac_cv_type_pid_t=yes
3937 else
3938   rm -rf conftest*
3939   ac_cv_type_pid_t=no
3940 fi
3941 rm -f conftest*
3942
3943 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3944 if test $ac_cv_type_pid_t = no; then
3945   { test "$extra_verbose" = "yes" && cat << \EOF
3946     Defining pid_t = int
3947 EOF
3948 cat >> confdefs.h <<\EOF
3949 #define pid_t int
3950 EOF
3951 }
3952
3953 fi
3954
3955 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3956 echo "configure:3957: checking for uid_t in sys/types.h" >&5
3957
3958 cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961 #include <sys/types.h>
3962 EOF
3963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3964   egrep "uid_t" >/dev/null 2>&1; then
3965   rm -rf conftest*
3966   ac_cv_type_uid_t=yes
3967 else
3968   rm -rf conftest*
3969   ac_cv_type_uid_t=no
3970 fi
3971 rm -f conftest*
3972
3973
3974 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3975 if test $ac_cv_type_uid_t = no; then
3976   { test "$extra_verbose" = "yes" && cat << \EOF
3977     Defining uid_t = int
3978 EOF
3979 cat >> confdefs.h <<\EOF
3980 #define uid_t int
3981 EOF
3982 }
3983
3984   { test "$extra_verbose" = "yes" && cat << \EOF
3985     Defining gid_t = int
3986 EOF
3987 cat >> confdefs.h <<\EOF
3988 #define gid_t int
3989 EOF
3990 }
3991
3992 fi
3993
3994 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3995 echo "configure:3996: checking for mode_t" >&5
3996
3997 cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <sys/types.h>
4001 #if STDC_HEADERS
4002 #include <stdlib.h>
4003 #include <stddef.h>
4004 #endif
4005 EOF
4006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4007   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4008   rm -rf conftest*
4009   ac_cv_type_mode_t=yes
4010 else
4011   rm -rf conftest*
4012   ac_cv_type_mode_t=no
4013 fi
4014 rm -f conftest*
4015
4016 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4017 if test $ac_cv_type_mode_t = no; then
4018   { test "$extra_verbose" = "yes" && cat << \EOF
4019     Defining mode_t = int
4020 EOF
4021 cat >> confdefs.h <<\EOF
4022 #define mode_t int
4023 EOF
4024 }
4025
4026 fi
4027
4028 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4029 echo "configure:4030: checking for off_t" >&5
4030
4031 cat > conftest.$ac_ext <<EOF
4032 #line 4033 "configure"
4033 #include "confdefs.h"
4034 #include <sys/types.h>
4035 #if STDC_HEADERS
4036 #include <stdlib.h>
4037 #include <stddef.h>
4038 #endif
4039 EOF
4040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4041   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4042   rm -rf conftest*
4043   ac_cv_type_off_t=yes
4044 else
4045   rm -rf conftest*
4046   ac_cv_type_off_t=no
4047 fi
4048 rm -f conftest*
4049
4050 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4051 if test $ac_cv_type_off_t = no; then
4052   { test "$extra_verbose" = "yes" && cat << \EOF
4053     Defining off_t = long
4054 EOF
4055 cat >> confdefs.h <<\EOF
4056 #define off_t long
4057 EOF
4058 }
4059
4060 fi
4061
4062 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4063 echo "configure:4064: checking for ssize_t" >&5
4064
4065 cat > conftest.$ac_ext <<EOF
4066 #line 4067 "configure"
4067 #include "confdefs.h"
4068 #include <sys/types.h>
4069 #if STDC_HEADERS
4070 #include <stdlib.h>
4071 #include <stddef.h>
4072 #endif
4073 EOF
4074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4075   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4076   rm -rf conftest*
4077   ac_cv_type_ssize_t=yes
4078 else
4079   rm -rf conftest*
4080   ac_cv_type_ssize_t=no
4081 fi
4082 rm -f conftest*
4083
4084 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4085 if test $ac_cv_type_ssize_t = no; then
4086   { test "$extra_verbose" = "yes" && cat << \EOF
4087     Defining ssize_t = int
4088 EOF
4089 cat >> confdefs.h <<\EOF
4090 #define ssize_t int
4091 EOF
4092 }
4093
4094 fi
4095
4096
4097 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4098 echo "configure:4099: checking for socklen_t" >&5
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4102 #include <sys/types.h>
4103 #include <sys/socket.h>
4104 socklen_t x;
4105
4106 int main() {
4107
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4111   rm -rf conftest*
4112   echo "$ac_t""yes" 1>&6
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   
4118 cat > conftest.$ac_ext <<EOF
4119 #line 4120 "configure"
4120 #include "confdefs.h"
4121 #include <sys/types.h>
4122 #include <sys/socket.h>
4123 int accept (int, struct sockaddr *, size_t *);
4124
4125 int main() {
4126
4127 ; return 0; }
4128 EOF
4129 if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4130   rm -rf conftest*
4131   
4132 echo "$ac_t""size_t" 1>&6
4133 { test "$extra_verbose" = "yes" && cat << \EOF
4134     Defining socklen_t = size_t
4135 EOF
4136 cat >> confdefs.h <<\EOF
4137 #define socklen_t size_t
4138 EOF
4139 }
4140
4141 else
4142   echo "configure: failed program was:" >&5
4143   cat conftest.$ac_ext >&5
4144   rm -rf conftest*
4145   
4146 echo "$ac_t""int" 1>&6
4147 { test "$extra_verbose" = "yes" && cat << \EOF
4148     Defining socklen_t = int
4149 EOF
4150 cat >> confdefs.h <<\EOF
4151 #define socklen_t int
4152 EOF
4153 }
4154
4155 fi
4156 rm -f conftest*
4157 fi
4158 rm -f conftest*
4159
4160 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4161 echo "configure:4162: checking for struct timeval" >&5
4162 cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 #ifdef TIME_WITH_SYS_TIME
4166 #include <sys/time.h>
4167 #include <time.h>
4168 #else
4169 #ifdef HAVE_SYS_TIME_H
4170 #include <sys/time.h>
4171 #else
4172 #include <time.h>
4173 #endif
4174 #endif
4175 int main() {
4176 static struct timeval x; x.tv_sec = x.tv_usec;
4177 ; return 0; }
4178 EOF
4179 if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4180   rm -rf conftest*
4181   echo "$ac_t""yes" 1>&6
4182   HAVE_TIMEVAL=yes
4183   { test "$extra_verbose" = "yes" && cat << \EOF
4184     Defining HAVE_TIMEVAL
4185 EOF
4186 cat >> confdefs.h <<\EOF
4187 #define HAVE_TIMEVAL 1
4188 EOF
4189 }
4190
4191 else
4192   echo "configure: failed program was:" >&5
4193   cat conftest.$ac_ext >&5
4194   rm -rf conftest*
4195   echo "$ac_t""no" 1>&6
4196    HAVE_TIMEVAL=no
4197 fi
4198 rm -f conftest*
4199
4200 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4201 echo "configure:4202: checking whether struct tm is in sys/time.h or time.h" >&5
4202
4203 cat > conftest.$ac_ext <<EOF
4204 #line 4205 "configure"
4205 #include "confdefs.h"
4206 #include <sys/types.h>
4207 #include <time.h>
4208 int main() {
4209 struct tm *tp; tp->tm_sec;
4210 ; return 0; }
4211 EOF
4212 if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4213   rm -rf conftest*
4214   ac_cv_struct_tm=time.h
4215 else
4216   echo "configure: failed program was:" >&5
4217   cat conftest.$ac_ext >&5
4218   rm -rf conftest*
4219   ac_cv_struct_tm=sys/time.h
4220 fi
4221 rm -f conftest*
4222
4223 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4224 if test $ac_cv_struct_tm = sys/time.h; then
4225   { test "$extra_verbose" = "yes" && cat << \EOF
4226     Defining TM_IN_SYS_TIME
4227 EOF
4228 cat >> confdefs.h <<\EOF
4229 #define TM_IN_SYS_TIME 1
4230 EOF
4231 }
4232
4233 fi
4234
4235 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4236 echo "configure:4237: checking for tm_zone in struct tm" >&5
4237
4238 cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241 #include <sys/types.h>
4242 #include <$ac_cv_struct_tm>
4243 int main() {
4244 struct tm tm; tm.tm_zone;
4245 ; return 0; }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4248   rm -rf conftest*
4249   ac_cv_struct_tm_zone=yes
4250 else
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   ac_cv_struct_tm_zone=no
4255 fi
4256 rm -f conftest*
4257
4258 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4259 if test "$ac_cv_struct_tm_zone" = yes; then
4260   { test "$extra_verbose" = "yes" && cat << \EOF
4261     Defining HAVE_TM_ZONE
4262 EOF
4263 cat >> confdefs.h <<\EOF
4264 #define HAVE_TM_ZONE 1
4265 EOF
4266 }
4267
4268 else
4269   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4270 echo "configure:4271: checking for tzname" >&5
4271
4272 cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 #include <time.h>
4276 #ifndef tzname /* For SGI.  */
4277 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4278 #endif
4279 int main() {
4280 atoi(*tzname);
4281 ; return 0; }
4282 EOF
4283 if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4284   rm -rf conftest*
4285   ac_cv_var_tzname=yes
4286 else
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   ac_cv_var_tzname=no
4291 fi
4292 rm -f conftest*
4293
4294 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4295   if test $ac_cv_var_tzname = yes; then
4296     { test "$extra_verbose" = "yes" && cat << \EOF
4297     Defining HAVE_TZNAME
4298 EOF
4299 cat >> confdefs.h <<\EOF
4300 #define HAVE_TZNAME 1
4301 EOF
4302 }
4303
4304   fi
4305 fi
4306
4307
4308 echo $ac_n "checking for working const""... $ac_c" 1>&6
4309 echo "configure:4310: checking for working const" >&5
4310
4311 cat > conftest.$ac_ext <<EOF
4312 #line 4313 "configure"
4313 #include "confdefs.h"
4314
4315 int main() {
4316
4317 /* Ultrix mips cc rejects this.  */
4318 typedef int charset[2]; const charset x;
4319 /* SunOS 4.1.1 cc rejects this.  */
4320 char const *const *ccp;
4321 char **p;
4322 /* NEC SVR4.0.2 mips cc rejects this.  */
4323 struct point {int x, y;};
4324 static struct point const zero = {0,0};
4325 /* AIX XL C 1.02.0.0 rejects this.
4326    It does not let you subtract one const X* pointer from another in an arm
4327    of an if-expression whose if-part is not a constant expression */
4328 const char *g = "string";
4329 ccp = &g + (g ? g-g : 0);
4330 /* HPUX 7.0 cc rejects these. */
4331 ++ccp;
4332 p = (char**) ccp;
4333 ccp = (char const *const *) p;
4334 { /* SCO 3.2v4 cc rejects this.  */
4335   char *t;
4336   char const *s = 0 ? (char *) 0 : (char const *) 0;
4337
4338   *t++ = 0;
4339 }
4340 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4341   int x[] = {25, 17};
4342   const int *foo = &x[0];
4343   ++foo;
4344 }
4345 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4346   typedef const int *iptr;
4347   iptr p = 0;
4348   ++p;
4349 }
4350 { /* AIX XL C 1.02.0.0 rejects this saying
4351      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4352   struct s { int j; const int *ap[3]; };
4353   struct s *b; b->j = 5;
4354 }
4355 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4356   const int foo = 10;
4357 }
4358
4359 ; return 0; }
4360 EOF
4361 if { (eval echo configure:4362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4362   rm -rf conftest*
4363   ac_cv_c_const=yes
4364 else
4365   echo "configure: failed program was:" >&5
4366   cat conftest.$ac_ext >&5
4367   rm -rf conftest*
4368   ac_cv_c_const=no
4369 fi
4370 rm -f conftest*
4371
4372 echo "$ac_t""$ac_cv_c_const" 1>&6
4373 if test $ac_cv_c_const = no; then
4374   { test "$extra_verbose" = "yes" && cat << \EOF
4375     Defining const = 
4376 EOF
4377 cat >> confdefs.h <<\EOF
4378 #define const 
4379 EOF
4380 }
4381
4382 fi
4383
4384
4385 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4386 echo "configure:4387: checking whether ${MAKE-make} sets \${MAKE}" >&5
4387 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4388
4389 cat > conftestmake <<\EOF
4390 all:
4391         @echo 'ac_maketemp="${MAKE}"'
4392 EOF
4393 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4394 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4395 if test -n "$ac_maketemp"; then
4396   eval ac_cv_prog_make_${ac_make}_set=yes
4397 else
4398   eval ac_cv_prog_make_${ac_make}_set=no
4399 fi
4400 rm -f conftestmake
4401 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4402   echo "$ac_t""yes" 1>&6
4403   SET_MAKE=
4404 else
4405   echo "$ac_t""no" 1>&6
4406   SET_MAKE="MAKE=${MAKE-make}"
4407 fi
4408
4409
4410 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4411 echo "configure:4412: checking whether byte ordering is bigendian" >&5
4412
4413 ac_cv_c_bigendian=unknown
4414 # See if sys/param.h defines the BYTE_ORDER macro.
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 #include <sys/types.h>
4419 #include <sys/param.h>
4420 int main() {
4421
4422 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4423  bogus endian macros
4424 #endif
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4428   rm -rf conftest*
4429   # It does; now see whether it defined to BIG_ENDIAN or not.
4430 cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #include <sys/param.h>
4435 int main() {
4436
4437 #if BYTE_ORDER != BIG_ENDIAN
4438  not big endian
4439 #endif
4440 ; return 0; }
4441 EOF
4442 if { (eval echo configure:4443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4443   rm -rf conftest*
4444   ac_cv_c_bigendian=yes
4445 else
4446   echo "configure: failed program was:" >&5
4447   cat conftest.$ac_ext >&5
4448   rm -rf conftest*
4449   ac_cv_c_bigendian=no
4450 fi
4451 rm -f conftest*
4452 else
4453   echo "configure: failed program was:" >&5
4454   cat conftest.$ac_ext >&5
4455 fi
4456 rm -f conftest*
4457 if test $ac_cv_c_bigendian = unknown; then
4458 cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 main () {
4462   /* Are we little or big endian?  From Harbison&Steele.  */
4463   union
4464   {
4465     long l;
4466     char c[sizeof (long)];
4467   } u;
4468   u.l = 1;
4469   exit (u.c[sizeof (long) - 1] == 1);
4470 }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4473 then
4474   ac_cv_c_bigendian=no
4475 else
4476   conftest_rc="$?"
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -fr conftest*
4480   ac_cv_c_bigendian=yes
4481 fi
4482 rm -fr conftest*
4483 fi
4484
4485 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4486 if test $ac_cv_c_bigendian = yes; then
4487   { test "$extra_verbose" = "yes" && cat << \EOF
4488     Defining WORDS_BIGENDIAN
4489 EOF
4490 cat >> confdefs.h <<\EOF
4491 #define WORDS_BIGENDIAN 1
4492 EOF
4493 }
4494
4495 fi
4496
4497
4498 echo $ac_n "checking size of short""... $ac_c" 1>&6
4499 echo "configure:4500: checking size of short" >&5
4500
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504 #include <stdio.h>
4505 #include <sys/types.h>
4506 main()
4507 {
4508   FILE *f=fopen("conftestval", "w");
4509   if (!f) exit(1);
4510   fprintf(f, "%d\n", sizeof(short));
4511   exit(0);
4512 }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4515 then
4516   ac_cv_sizeof_short=`cat conftestval`
4517 else
4518   conftest_rc="$?"
4519   echo "configure: failed program was:" >&5
4520   cat conftest.$ac_ext >&5
4521   rm -fr conftest*
4522   ac_cv_sizeof_short=0
4523 fi
4524 rm -fr conftest*
4525 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4526 { test "$extra_verbose" = "yes" && cat << EOF
4527     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4528 EOF
4529 cat >> confdefs.h <<EOF
4530 #define SIZEOF_SHORT $ac_cv_sizeof_short
4531 EOF
4532 }
4533
4534
4535 if test "$ac_cv_sizeof_short" = 0; then
4536   echo ""
4537   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4538   echo "*** PANIC *** Please examine config.log for compilation errors."
4539   exit 1
4540 fi
4541 echo $ac_n "checking size of int""... $ac_c" 1>&6
4542 echo "configure:4543: checking size of int" >&5
4543
4544 cat > conftest.$ac_ext <<EOF
4545 #line 4546 "configure"
4546 #include "confdefs.h"
4547 #include <stdio.h>
4548 #include <sys/types.h>
4549 main()
4550 {
4551   FILE *f=fopen("conftestval", "w");
4552   if (!f) exit(1);
4553   fprintf(f, "%d\n", sizeof(int));
4554   exit(0);
4555 }
4556 EOF
4557 if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4558 then
4559   ac_cv_sizeof_int=`cat conftestval`
4560 else
4561   conftest_rc="$?"
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -fr conftest*
4565   ac_cv_sizeof_int=0
4566 fi
4567 rm -fr conftest*
4568 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4569 { test "$extra_verbose" = "yes" && cat << EOF
4570     Defining SIZEOF_INT = $ac_cv_sizeof_int
4571 EOF
4572 cat >> confdefs.h <<EOF
4573 #define SIZEOF_INT $ac_cv_sizeof_int
4574 EOF
4575 }
4576
4577
4578 echo $ac_n "checking size of long""... $ac_c" 1>&6
4579 echo "configure:4580: checking size of long" >&5
4580
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 #include <stdio.h>
4585 #include <sys/types.h>
4586 main()
4587 {
4588   FILE *f=fopen("conftestval", "w");
4589   if (!f) exit(1);
4590   fprintf(f, "%d\n", sizeof(long));
4591   exit(0);
4592 }
4593 EOF
4594 if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4595 then
4596   ac_cv_sizeof_long=`cat conftestval`
4597 else
4598   conftest_rc="$?"
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -fr conftest*
4602   ac_cv_sizeof_long=0
4603 fi
4604 rm -fr conftest*
4605 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4606 { test "$extra_verbose" = "yes" && cat << EOF
4607     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4608 EOF
4609 cat >> confdefs.h <<EOF
4610 #define SIZEOF_LONG $ac_cv_sizeof_long
4611 EOF
4612 }
4613
4614
4615 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4616 echo "configure:4617: checking size of long long" >&5
4617
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 #include <stdio.h>
4622 #include <sys/types.h>
4623 main()
4624 {
4625   FILE *f=fopen("conftestval", "w");
4626   if (!f) exit(1);
4627   fprintf(f, "%d\n", sizeof(long long));
4628   exit(0);
4629 }
4630 EOF
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4632 then
4633   ac_cv_sizeof_long_long=`cat conftestval`
4634 else
4635   conftest_rc="$?"
4636   echo "configure: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   rm -fr conftest*
4639   ac_cv_sizeof_long_long=0
4640 fi
4641 rm -fr conftest*
4642 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4643 { test "$extra_verbose" = "yes" && cat << EOF
4644     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4645 EOF
4646 cat >> confdefs.h <<EOF
4647 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4648 EOF
4649 }
4650
4651
4652 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4653 echo "configure:4654: checking size of void *" >&5
4654
4655 cat > conftest.$ac_ext <<EOF
4656 #line 4657 "configure"
4657 #include "confdefs.h"
4658 #include <stdio.h>
4659 #include <sys/types.h>
4660 main()
4661 {
4662   FILE *f=fopen("conftestval", "w");
4663   if (!f) exit(1);
4664   fprintf(f, "%d\n", sizeof(void *));
4665   exit(0);
4666 }
4667 EOF
4668 if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4669 then
4670   ac_cv_sizeof_void_p=`cat conftestval`
4671 else
4672   conftest_rc="$?"
4673   echo "configure: failed program was:" >&5
4674   cat conftest.$ac_ext >&5
4675   rm -fr conftest*
4676   ac_cv_sizeof_void_p=0
4677 fi
4678 rm -fr conftest*
4679 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4680 { test "$extra_verbose" = "yes" && cat << EOF
4681     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4682 EOF
4683 cat >> confdefs.h <<EOF
4684 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4685 EOF
4686 }
4687
4688
4689
4690 case $opsys in
4691   cygwin* ) cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 #include <cygwin/types.h>
4695 EOF
4696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4697   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4698   rm -rf conftest*
4699   echo "$ac_t""yes" 1>&6
4700                              { test "$extra_verbose" = "yes" && cat << \EOF
4701     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4702 EOF
4703 cat >> confdefs.h <<\EOF
4704 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4705 EOF
4706 }
4707
4708 else
4709   rm -rf conftest*
4710   echo "$ac_t""no" 1>&6
4711 fi
4712 rm -f conftest*
4713  ;;
4714 esac
4715
4716 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4717 echo "configure:4718: checking for long file names" >&5
4718
4719 ac_cv_sys_long_file_names=yes
4720 # Test for long file names in all the places we know might matter:
4721 #      .                the current directory, where building will happen
4722 #      $prefix/lib      where we will be installing things
4723 #      $exec_prefix/lib likewise
4724 # eval it to expand exec_prefix.
4725 #      $TMPDIR          if set, where it might want to write temporary files
4726 # if $TMPDIR is not set:
4727 #      /tmp             where it might want to write temporary files
4728 #      /var/tmp         likewise
4729 #      /usr/tmp         likewise
4730 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4731   ac_tmpdirs="$TMPDIR"
4732 else
4733   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4734 fi
4735 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4736   test -d $ac_dir || continue
4737   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4738   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4739   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4740   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4741   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4742     ac_cv_sys_long_file_names=no
4743     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4744     break
4745   fi
4746   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4747 done
4748
4749 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4750 if test $ac_cv_sys_long_file_names = yes; then
4751   { test "$extra_verbose" = "yes" && cat << \EOF
4752     Defining HAVE_LONG_FILE_NAMES
4753 EOF
4754 cat >> confdefs.h <<\EOF
4755 #define HAVE_LONG_FILE_NAMES 1
4756 EOF
4757 }
4758
4759 fi
4760
4761
4762 echo $ac_n "checking for sin""... $ac_c" 1>&6
4763 echo "configure:4764: checking for sin" >&5
4764
4765 cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 /* System header to define __stub macros and hopefully few prototypes,
4769     which can conflict with char sin(); below.  */
4770 #include <assert.h>
4771 /* Override any gcc2 internal prototype to avoid an error.  */
4772 /* We use char because int might match the return type of a gcc2
4773     builtin and then its argument prototype would still apply.  */
4774 char sin();
4775
4776 int main() {
4777
4778 /* The GNU C library defines this for functions which it implements
4779     to always fail with ENOSYS.  Some functions are actually named
4780     something starting with __ and the normal name is an alias.  */
4781 #if defined (__stub_sin) || defined (__stub___sin)
4782 choke me
4783 #else
4784 sin();
4785 #endif
4786
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   eval "ac_cv_func_sin=yes"
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_func_sin=no"
4797 fi
4798 rm -f conftest*
4799
4800 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802   :
4803 else
4804   echo "$ac_t""no" 1>&6
4805
4806 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4807 echo "configure:4808: checking for sin in -lm" >&5
4808 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4809
4810 xe_check_libs=" -lm "
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4814 /* Override any gcc2 internal prototype to avoid an error.  */
4815 /* We use char because int might match the return type of a gcc2
4816     builtin and then its argument prototype would still apply.  */
4817 char sin();
4818
4819 int main() {
4820 sin()
4821 ; return 0; }
4822 EOF
4823 if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4824   rm -rf conftest*
4825   eval "ac_cv_lib_$ac_lib_var=yes"
4826 else
4827   echo "configure: failed program was:" >&5
4828   cat conftest.$ac_ext >&5
4829   rm -rf conftest*
4830   eval "ac_cv_lib_$ac_lib_var=no"
4831 fi
4832 rm -f conftest*
4833 xe_check_libs=""
4834
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4836   echo "$ac_t""yes" 1>&6
4837     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839   { test "$extra_verbose" = "yes" && cat << EOF
4840     Defining $ac_tr_lib
4841 EOF
4842 cat >> confdefs.h <<EOF
4843 #define $ac_tr_lib 1
4844 EOF
4845 }
4846
4847   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4848
4849 else
4850   echo "$ac_t""no" 1>&6
4851 fi
4852
4853
4854 fi
4855
4856
4857 { test "$extra_verbose" = "yes" && cat << \EOF
4858     Defining LISP_FLOAT_TYPE
4859 EOF
4860 cat >> confdefs.h <<\EOF
4861 #define LISP_FLOAT_TYPE 1
4862 EOF
4863 }
4864
4865
4866 cat > conftest.$ac_ext <<EOF
4867 #line 4868 "configure"
4868 #include "confdefs.h"
4869 #include <math.h>
4870 int main() {
4871 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4872 ; return 0; }
4873 EOF
4874 if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4875   rm -rf conftest*
4876   { test "$extra_verbose" = "yes" && cat << \EOF
4877     Defining HAVE_INVERSE_HYPERBOLIC
4878 EOF
4879 cat >> confdefs.h <<\EOF
4880 #define HAVE_INVERSE_HYPERBOLIC 1
4881 EOF
4882 }
4883
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887 fi
4888 rm -f conftest*
4889
4890 echo "checking type of mail spool file locking" 1>&6
4891 echo "configure:4892: checking type of mail spool file locking" >&5
4892 for ac_func in lockf flock
4893 do
4894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4895 echo "configure:4896: checking for $ac_func" >&5
4896
4897 cat > conftest.$ac_ext <<EOF
4898 #line 4899 "configure"
4899 #include "confdefs.h"
4900 /* System header to define __stub macros and hopefully few prototypes,
4901     which can conflict with char $ac_func(); below.  */
4902 #include <assert.h>
4903 /* Override any gcc2 internal prototype to avoid an error.  */
4904 /* We use char because int might match the return type of a gcc2
4905     builtin and then its argument prototype would still apply.  */
4906 char $ac_func();
4907
4908 int main() {
4909
4910 /* The GNU C library defines this for functions which it implements
4911     to always fail with ENOSYS.  Some functions are actually named
4912     something starting with __ and the normal name is an alias.  */
4913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4914 choke me
4915 #else
4916 $ac_func();
4917 #endif
4918
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_func_$ac_func=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_func_$ac_func=no"
4929 fi
4930 rm -f conftest*
4931
4932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4933   echo "$ac_t""yes" 1>&6
4934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4935   { test "$extra_verbose" = "yes" && cat << EOF
4936     Defining $ac_tr_func
4937 EOF
4938 cat >> confdefs.h <<EOF
4939 #define $ac_tr_func 1
4940 EOF
4941 }
4942  
4943 else
4944   echo "$ac_t""no" 1>&6
4945 fi
4946 done
4947
4948 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4949 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4950 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4951 if   test -z "$mail_locking"; then
4952   case "$opsys" in cygwin* | mingw*)
4953     mail_locking=pop ;;
4954   esac
4955 fi
4956
4957 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4958     Defining MAIL_LOCK_LOCKF
4959 EOF
4960 cat >> confdefs.h <<\EOF
4961 #define MAIL_LOCK_LOCKF 1
4962 EOF
4963 }
4964
4965 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4966     Defining MAIL_LOCK_FLOCK
4967 EOF
4968 cat >> confdefs.h <<\EOF
4969 #define MAIL_LOCK_FLOCK 1
4970 EOF
4971 }
4972
4973 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4974     Defining MAIL_LOCK_LOCKING
4975 EOF
4976 cat >> confdefs.h <<\EOF
4977 #define MAIL_LOCK_LOCKING 1
4978 EOF
4979 }
4980
4981 elif test "$mail_locking" = "pop"; then
4982   with_pop=yes
4983   mail_locking=
4984 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4985     Defining MAIL_LOCK_DOT
4986 EOF
4987 cat >> confdefs.h <<\EOF
4988 #define MAIL_LOCK_DOT 1
4989 EOF
4990 }
4991
4992 fi
4993 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4994   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4995 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4996   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4997 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4998   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4999
5000 case "$opsys" in decosf*)
5001   
5002 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5003 echo "configure:5004: checking for cma_open in -lpthreads" >&5
5004 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5005
5006 xe_check_libs=" -lpthreads "
5007 cat > conftest.$ac_ext <<EOF
5008 #line 5009 "configure"
5009 #include "confdefs.h"
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 /* We use char because int might match the return type of a gcc2
5012     builtin and then its argument prototype would still apply.  */
5013 char cma_open();
5014
5015 int main() {
5016 cma_open()
5017 ; return 0; }
5018 EOF
5019 if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5020   rm -rf conftest*
5021   eval "ac_cv_lib_$ac_lib_var=yes"
5022 else
5023   echo "configure: failed program was:" >&5
5024   cat conftest.$ac_ext >&5
5025   rm -rf conftest*
5026   eval "ac_cv_lib_$ac_lib_var=no"
5027 fi
5028 rm -f conftest*
5029 xe_check_libs=""
5030
5031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5032   echo "$ac_t""yes" 1>&6
5033     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5035   { test "$extra_verbose" = "yes" && cat << EOF
5036     Defining $ac_tr_lib
5037 EOF
5038 cat >> confdefs.h <<EOF
5039 #define $ac_tr_lib 1
5040 EOF
5041 }
5042
5043   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5044
5045 else
5046   echo "$ac_t""no" 1>&6
5047 fi
5048
5049
5050   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5051     c_switch_site="$c_switch_site -threads" ;;
5052 esac
5053
5054
5055 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5056 echo "configure:5057: checking whether the -xildoff compiler flag is required" >&5
5057 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5058   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5059     then echo "$ac_t""no" 1>&6;
5060     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
5061   fi
5062   else echo "$ac_t""no" 1>&6
5063 fi
5064
5065 if test "$opsys" = "sol2"; then
5066   if test "$os_release" -ge 56; then
5067     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5068 echo "configure:5069: checking for \"-z ignore\" linker flag" >&5
5069     case "`ld -h 2>&1`" in
5070       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5071         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5072       *) echo "$ac_t""no" 1>&6 ;;
5073     esac
5074   fi
5075 fi
5076
5077
5078 echo "checking "for specified window system"" 1>&6
5079 echo "configure:5080: checking "for specified window system"" >&5
5080
5081
5082 GNOME_CONFIG=no
5083 GTK_CONFIG=no
5084
5085 if test "$with_gnome" != "no"; then
5086    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5087 echo "configure:5088: checking for GNOME configuration script" >&5
5088    for possible in gnome-config
5089    do
5090       possible_version=`${possible} --version 2> /dev/null`
5091       if test "x${possible_version}" != "x"; then
5092               GNOME_CONFIG="${possible}"
5093               with_gnome=yes
5094               with_gtk=yes
5095               break
5096       fi
5097    done
5098    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5099 fi
5100
5101 if test "${GNOME_CONFIG}" != "no"; then
5102       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5103       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5104       { test "$extra_verbose" = "yes" && cat << \EOF
5105     Defining HAVE_GNOME
5106 EOF
5107 cat >> confdefs.h <<\EOF
5108 #define HAVE_GNOME 1
5109 EOF
5110 }
5111
5112       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5113       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5114 fi
5115
5116 if test "$with_gtk" != "no";then
5117    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5118 echo "configure:5119: checking for GTK configuration script" >&5
5119    for possible in gtk12-config gtk14-config gtk-config
5120    do
5121       possible_version=`${possible} --version 2> /dev/null`
5122       if test "x${possible_version}" != "x"; then
5123               GTK_CONFIG="${possible}"
5124       fi
5125       case "${possible_version}" in
5126         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5127         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5128         1.2.*)
5129                 with_gtk=yes
5130                 break
5131                 ;;
5132         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5133       esac
5134    done
5135    echo "$ac_t""${GTK_CONFIG}" 1>&6
5136 fi
5137
5138 if test "${GTK_CONFIG}" != "no"; then
5139       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5140 echo "configure:5141: checking gtk version" >&5
5141       GTK_VERSION=`${GTK_CONFIG} --version`
5142       echo "$ac_t""${GTK_VERSION}" 1>&6
5143
5144       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5145 echo "configure:5146: checking gtk libs" >&5
5146       GTK_LIBS=`${GTK_CONFIG} --libs`
5147       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5148       echo "$ac_t""${GTK_LIBS}" 1>&6
5149
5150       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5151 echo "configure:5152: checking gtk cflags" >&5
5152       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5153       if test "$GCC" = "yes"; then
5154         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5155       fi
5156       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5157       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5158
5159       
5160 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5161 echo "configure:5162: checking for main in -lgdk_imlib" >&5
5162 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5163
5164 xe_check_libs=" -lgdk_imlib "
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168
5169 int main() {
5170 main()
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   eval "ac_cv_lib_$ac_lib_var=yes"
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_lib_$ac_lib_var=no"
5181 fi
5182 rm -f conftest*
5183 xe_check_libs=""
5184
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5186   echo "$ac_t""yes" 1>&6
5187   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5188 else
5189   echo "$ac_t""no" 1>&6
5190 fi
5191
5192
5193       
5194 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5195 echo "configure:5196: checking for Imlib_init in -lImlib" >&5
5196 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5197
5198 xe_check_libs=" -lImlib "
5199 cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 /* Override any gcc2 internal prototype to avoid an error.  */
5203 /* We use char because int might match the return type of a gcc2
5204     builtin and then its argument prototype would still apply.  */
5205 char Imlib_init();
5206
5207 int main() {
5208 Imlib_init()
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   eval "ac_cv_lib_$ac_lib_var=yes"
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217   rm -rf conftest*
5218   eval "ac_cv_lib_$ac_lib_var=no"
5219 fi
5220 rm -f conftest*
5221 xe_check_libs=""
5222
5223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5224   echo "$ac_t""yes" 1>&6
5225   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5226 else
5227   echo "$ac_t""no" 1>&6
5228 fi
5229
5230
5231       for ac_func in gdk_imlib_init
5232 do
5233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5234 echo "configure:5235: checking for $ac_func" >&5
5235
5236 cat > conftest.$ac_ext <<EOF
5237 #line 5238 "configure"
5238 #include "confdefs.h"
5239 /* System header to define __stub macros and hopefully few prototypes,
5240     which can conflict with char $ac_func(); below.  */
5241 #include <assert.h>
5242 /* Override any gcc2 internal prototype to avoid an error.  */
5243 /* We use char because int might match the return type of a gcc2
5244     builtin and then its argument prototype would still apply.  */
5245 char $ac_func();
5246
5247 int main() {
5248
5249 /* The GNU C library defines this for functions which it implements
5250     to always fail with ENOSYS.  Some functions are actually named
5251     something starting with __ and the normal name is an alias.  */
5252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5253 choke me
5254 #else
5255 $ac_func();
5256 #endif
5257
5258 ; return 0; }
5259 EOF
5260 if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261   rm -rf conftest*
5262   eval "ac_cv_func_$ac_func=yes"
5263 else
5264   echo "configure: failed program was:" >&5
5265   cat conftest.$ac_ext >&5
5266   rm -rf conftest*
5267   eval "ac_cv_func_$ac_func=no"
5268 fi
5269 rm -f conftest*
5270
5271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5272   echo "$ac_t""yes" 1>&6
5273     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5274   { test "$extra_verbose" = "yes" && cat << EOF
5275     Defining $ac_tr_func
5276 EOF
5277 cat >> confdefs.h <<EOF
5278 #define $ac_tr_func 1
5279 EOF
5280 }
5281  
5282 else
5283   echo "$ac_t""no" 1>&6
5284 fi
5285 done
5286
5287
5288       { test "$extra_verbose" = "yes" && cat << \EOF
5289     Defining HAVE_XPM
5290 EOF
5291 cat >> confdefs.h <<\EOF
5292 #define HAVE_XPM 1
5293 EOF
5294 }
5295
5296       { test "$extra_verbose" = "yes" && cat << \EOF
5297     Defining HAVE_GTK
5298 EOF
5299 cat >> confdefs.h <<\EOF
5300 #define HAVE_GTK 1
5301 EOF
5302 }
5303
5304       
5305
5306       window_system=gtk
5307       with_gtk=yes
5308       with_x11=no
5309
5310       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5311       test "${with_toolbars}" != no && with_toolbars=gtk
5312       test "${with_menubars}" != "no" && with_menubars=gtk
5313       test "${with_dialogs}" != "no" && with_dialogs=gtk
5314       test "${with_widgets}" != "no" && with_widgets=gtk
5315
5316       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5317    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5318  fi
5319       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5320    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5321  fi
5322       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5323    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5324  fi
5325       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5326    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5327  fi
5328
5329             OLD_CFLAGS="${CFLAGS}"
5330       OLD_CPPFLAGS="${CPPFLAGS}"
5331       OLD_LDFLAGS="${LDFLAGS}"
5332       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5333       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5334       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5335       for ac_hdr in glade/glade.h glade.h
5336 do
5337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5339 echo "configure:5340: checking for $ac_hdr" >&5
5340
5341 cat > conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 #include "confdefs.h"
5344 #include <$ac_hdr>
5345 EOF
5346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5347 { (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5349 if test -z "$ac_err"; then
5350   rm -rf conftest*
5351   eval "ac_cv_header_$ac_safe=yes"
5352 else
5353   echo "$ac_err" >&5
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_header_$ac_safe=no"
5358 fi
5359 rm -f conftest*
5360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5361   echo "$ac_t""yes" 1>&6
5362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5363   { test "$extra_verbose" = "yes" && cat << EOF
5364     Defining $ac_tr_hdr
5365 EOF
5366 cat >> confdefs.h <<EOF
5367 #define $ac_tr_hdr 1
5368 EOF
5369 }
5370  
5371 else
5372   echo "$ac_t""no" 1>&6
5373 fi
5374 done
5375
5376       
5377 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5378 echo "configure:5379: checking for main in -lxml" >&5
5379 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5380
5381 xe_check_libs=" -lxml "
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385
5386 int main() {
5387 main()
5388 ; return 0; }
5389 EOF
5390 if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5391   rm -rf conftest*
5392   eval "ac_cv_lib_$ac_lib_var=yes"
5393 else
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_lib_$ac_lib_var=no"
5398 fi
5399 rm -f conftest*
5400 xe_check_libs=""
5401
5402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5403   echo "$ac_t""yes" 1>&6
5404   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5405 else
5406   echo "$ac_t""no" 1>&6
5407 fi
5408
5409
5410       
5411 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5412 echo "configure:5413: checking for main in -lglade" >&5
5413 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5414
5415 xe_check_libs=" -lglade "
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419
5420 int main() {
5421 main()
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425   rm -rf conftest*
5426   eval "ac_cv_lib_$ac_lib_var=yes"
5427 else
5428   echo "configure: failed program was:" >&5
5429   cat conftest.$ac_ext >&5
5430   rm -rf conftest*
5431   eval "ac_cv_lib_$ac_lib_var=no"
5432 fi
5433 rm -f conftest*
5434 xe_check_libs=""
5435
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5437   echo "$ac_t""yes" 1>&6
5438   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5439 else
5440   echo "$ac_t""no" 1>&6
5441 fi
5442
5443
5444       
5445 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5446 echo "configure:5447: checking for main in -lglade-gnome" >&5
5447 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5448
5449 xe_check_libs=" -lglade-gnome "
5450 cat > conftest.$ac_ext <<EOF
5451 #line 5452 "configure"
5452 #include "confdefs.h"
5453
5454 int main() {
5455 main()
5456 ; return 0; }
5457 EOF
5458 if { (eval echo configure:5459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5459   rm -rf conftest*
5460   eval "ac_cv_lib_$ac_lib_var=yes"
5461 else
5462   echo "configure: failed program was:" >&5
5463   cat conftest.$ac_ext >&5
5464   rm -rf conftest*
5465   eval "ac_cv_lib_$ac_lib_var=no"
5466 fi
5467 rm -f conftest*
5468 xe_check_libs=""
5469
5470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5471   echo "$ac_t""yes" 1>&6
5472   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5473 else
5474   echo "$ac_t""no" 1>&6
5475 fi
5476
5477
5478       cat > conftest.$ac_ext <<EOF
5479 #line 5480 "configure"
5480 #include "confdefs.h"
5481 #include <glade/glade-xml.h>
5482 EOF
5483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5484   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5485   rm -rf conftest*
5486   echo "$ac_t""yes" 1>&6
5487                        { test "$extra_verbose" = "yes" && cat << \EOF
5488     Defining LIBGLADE_XML_TXTDOMAIN = 1
5489 EOF
5490 cat >> confdefs.h <<\EOF
5491 #define LIBGLADE_XML_TXTDOMAIN 1
5492 EOF
5493 }
5494
5495 else
5496   rm -rf conftest*
5497   echo "$ac_t""no" 1>&6
5498 fi
5499 rm -f conftest*
5500
5501       CFLAGS="${OLD_CFLAGS}"
5502       CPPFLAGS="${OLD_CPPFLAGS}"
5503       LDFLAGS="${OLD_LDFLAGS}"
5504 fi
5505
5506
5507 if test "$with_x11" != "no"; then
5508     test "$x_includes $x_libraries" != "NONE NONE" && \
5509    window_system=x11 with_x11=yes
5510
5511         
5512       if test "$x_includes $x_libraries" = "NONE NONE" \
5513     -a -n "$OPENWINHOME" \
5514     -a "$OPENWINHOME" != "/usr/openwin" \
5515     -a -d "$OPENWINHOME"; then
5516       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5517       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5518       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5519   fi
5520
5521   if test "$x_includes" = "NONE"; then
5522                     for dir in "/usr/X11" "/usr/X11R6"; do
5523       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5524     done
5525   fi
5526
5527   if test "$x_libraries" = "NONE"; then
5528     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5529       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5530     done
5531   fi
5532
5533   # If we find X, set shell vars x_includes and x_libraries to the
5534 # paths, otherwise set no_x=yes.
5535 # Uses ac_ vars as temps to allow command line to override cache and checks.
5536 # --without-x overrides everything else, but does not touch the cache.
5537 echo $ac_n "checking for X""... $ac_c" 1>&6
5538 echo "configure:5539: checking for X" >&5
5539
5540 # Check whether --with-x or --without-x was given.
5541 if test "${with_x+set}" = set; then
5542   withval="$with_x"
5543   :
5544 fi
5545
5546 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5547 if test "x$with_x" = xno; then
5548   # The user explicitly disabled X.
5549   have_x=disabled
5550 else
5551   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5552     # Both variables are already set.
5553     have_x=yes
5554   else
5555
5556 # One or both of the vars are not set, and there is no cached value.
5557 ac_x_includes=NO ac_x_libraries=NO
5558 rm -fr conftestdir
5559 if mkdir conftestdir; then
5560   cd conftestdir
5561   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5562   cat > Imakefile <<'EOF'
5563 acfindx:
5564         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5565 EOF
5566   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5567     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5568     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5569     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5570     for ac_extension in a so sl; do
5571       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5572         test -f $ac_im_libdir/libX11.$ac_extension; then
5573         ac_im_usrlibdir=$ac_im_libdir; break
5574       fi
5575     done
5576     # Screen out bogus values from the imake configuration.  They are
5577     # bogus both because they are the default anyway, and because
5578     # using them would break gcc on systems where it needs fixed includes.
5579     case "$ac_im_incroot" in
5580         /usr/include) ;;
5581         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5582     esac
5583     case "$ac_im_usrlibdir" in
5584         /usr/lib | /lib) ;;
5585         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5586     esac
5587   fi
5588   cd ..
5589   rm -fr conftestdir
5590 fi
5591
5592 if test "$ac_x_includes" = NO; then
5593   # Guess where to find include files, by looking for this one X11 .h file.
5594   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5595
5596   # First, try using that file with no special directory specified.
5597 cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 #include <$x_direct_test_include>
5601 EOF
5602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5603 { (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5605 if test -z "$ac_err"; then
5606   rm -rf conftest*
5607   # We can compile using X headers with no special include directory.
5608 ac_x_includes=
5609 else
5610   echo "$ac_err" >&5
5611   echo "configure: failed program was:" >&5
5612   cat conftest.$ac_ext >&5
5613   rm -rf conftest*
5614   # Look for the header file in a standard set of common directories.
5615 # Check X11 before X11Rn because it is often a symlink to the current release.
5616   for ac_dir in               \
5617     /usr/X11/include          \
5618     /usr/X11R6/include        \
5619     /usr/X11R5/include        \
5620     /usr/X11R4/include        \
5621                               \
5622     /usr/include/X11          \
5623     /usr/include/X11R6        \
5624     /usr/include/X11R5        \
5625     /usr/include/X11R4        \
5626                               \
5627     /usr/local/X11/include    \
5628     /usr/local/X11R6/include  \
5629     /usr/local/X11R5/include  \
5630     /usr/local/X11R4/include  \
5631                               \
5632     /usr/local/include/X11    \
5633     /usr/local/include/X11R6  \
5634     /usr/local/include/X11R5  \
5635     /usr/local/include/X11R4  \
5636                               \
5637     /usr/X386/include         \
5638     /usr/x386/include         \
5639     /usr/XFree86/include/X11  \
5640                               \
5641     /usr/include              \
5642     /usr/local/include        \
5643     /usr/unsupported/include  \
5644     /usr/athena/include       \
5645     /usr/local/x11r5/include  \
5646     /usr/lpp/Xamples/include  \
5647                               \
5648     /usr/openwin/include      \
5649     /usr/openwin/share/include \
5650     ; \
5651   do
5652     if test -r "$ac_dir/$x_direct_test_include"; then
5653       ac_x_includes=$ac_dir
5654       break
5655     fi
5656   done
5657 fi
5658 rm -f conftest*
5659 fi # $ac_x_includes = NO
5660
5661 if test "$ac_x_libraries" = NO; then
5662   # Check for the libraries.
5663
5664   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5665   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5666
5667   # See if we find them without any special options.
5668   # Don't add to $LIBS permanently.
5669   ac_save_LIBS="$LIBS"
5670   LIBS="-l$x_direct_test_library $LIBS"
5671 cat > conftest.$ac_ext <<EOF
5672 #line 5673 "configure"
5673 #include "confdefs.h"
5674
5675 int main() {
5676 ${x_direct_test_function}()
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   LIBS="$ac_save_LIBS"
5682 # We can link X programs with no special library path.
5683 ac_x_libraries=
5684 else
5685   echo "configure: failed program was:" >&5
5686   cat conftest.$ac_ext >&5
5687   rm -rf conftest*
5688   LIBS="$ac_save_LIBS"
5689 # First see if replacing the include by lib works.
5690 # Check X11 before X11Rn because it is often a symlink to the current release.
5691 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5692     /usr/X11/lib          \
5693     /usr/X11R6/lib        \
5694     /usr/X11R5/lib        \
5695     /usr/X11R4/lib        \
5696                           \
5697     /usr/lib/X11          \
5698     /usr/lib/X11R6        \
5699     /usr/lib/X11R5        \
5700     /usr/lib/X11R4        \
5701                           \
5702     /usr/local/X11/lib    \
5703     /usr/local/X11R6/lib  \
5704     /usr/local/X11R5/lib  \
5705     /usr/local/X11R4/lib  \
5706                           \
5707     /usr/local/lib/X11    \
5708     /usr/local/lib/X11R6  \
5709     /usr/local/lib/X11R5  \
5710     /usr/local/lib/X11R4  \
5711                           \
5712     /usr/X386/lib         \
5713     /usr/x386/lib         \
5714     /usr/XFree86/lib/X11  \
5715                           \
5716     /usr/lib              \
5717     /usr/local/lib        \
5718     /usr/unsupported/lib  \
5719     /usr/athena/lib       \
5720     /usr/local/x11r5/lib  \
5721     /usr/lpp/Xamples/lib  \
5722     /lib/usr/lib/X11      \
5723                           \
5724     /usr/openwin/lib      \
5725     /usr/openwin/share/lib \
5726     ; \
5727 do
5728   for ac_extension in a so sl; do
5729     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5730       ac_x_libraries=$ac_dir
5731       break 2
5732     fi
5733   done
5734 done
5735 fi
5736 rm -f conftest*
5737 fi # $ac_x_libraries = NO
5738
5739 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5740   # Didn't find X anywhere.  Cache the known absence of X.
5741   ac_cv_have_x="have_x=no"
5742 else
5743   # Record where we found X for the cache.
5744   ac_cv_have_x="have_x=yes \
5745                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5746 fi
5747   fi
5748   eval "$ac_cv_have_x"
5749 fi # $with_x != no
5750
5751 if test "$have_x" != yes; then
5752   echo "$ac_t""$have_x" 1>&6
5753   no_x=yes
5754 else
5755   # If each of the values was on the command line, it overrides each guess.
5756   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5757   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5758   # Update the cache value to reflect the command line values.
5759   ac_cv_have_x="have_x=yes \
5760                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5761   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5762 fi
5763
5764 if test "$no_x" = yes; then
5765   # Not all programs may use this symbol, but it does not hurt to define it.
5766   { test "$extra_verbose" = "yes" && cat << \EOF
5767     Defining X_DISPLAY_MISSING
5768 EOF
5769 cat >> confdefs.h <<\EOF
5770 #define X_DISPLAY_MISSING 1
5771 EOF
5772 }
5773
5774   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5775 else
5776   if test -n "$x_includes"; then
5777     X_CFLAGS="$X_CFLAGS -I$x_includes"
5778   fi
5779
5780   # It would also be nice to do this for all -L options, not just this one.
5781   if test -n "$x_libraries"; then
5782     X_LIBS="$X_LIBS -L$x_libraries"
5783     # For Solaris; some versions of Sun CC require a space after -R and
5784     # others require no space.  Words are not sufficient . . . .
5785     case "`(uname -sr) 2>/dev/null`" in
5786     "SunOS 5"*)
5787       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5788 echo "configure:5789: checking whether -R must be followed by a space" >&5
5789       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5790       cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5793
5794 int main() {
5795
5796 ; return 0; }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799   rm -rf conftest*
5800   ac_R_nospace=yes
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   ac_R_nospace=no
5806 fi
5807 rm -f conftest*
5808       if test $ac_R_nospace = yes; then
5809         echo "$ac_t""no" 1>&6
5810         X_LIBS="$X_LIBS -R$x_libraries"
5811       else
5812         LIBS="$ac_xsave_LIBS -R $x_libraries"
5813         cat > conftest.$ac_ext <<EOF
5814 #line 5815 "configure"
5815 #include "confdefs.h"
5816
5817 int main() {
5818
5819 ; return 0; }
5820 EOF
5821 if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5822   rm -rf conftest*
5823   ac_R_space=yes
5824 else
5825   echo "configure: failed program was:" >&5
5826   cat conftest.$ac_ext >&5
5827   rm -rf conftest*
5828   ac_R_space=no
5829 fi
5830 rm -f conftest*
5831         if test $ac_R_space = yes; then
5832           echo "$ac_t""yes" 1>&6
5833           X_LIBS="$X_LIBS -R $x_libraries"
5834         else
5835           echo "$ac_t""neither works" 1>&6
5836         fi
5837       fi
5838       LIBS="$ac_xsave_LIBS"
5839     esac
5840   fi
5841
5842   # Check for system-dependent libraries X programs must link with.
5843   # Do this before checking for the system-independent R6 libraries
5844   # (-lICE), since we may need -lsocket or whatever for X linking.
5845
5846   if test "$ISC" = yes; then
5847     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5848   else
5849     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5850     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5851     # the Alpha needs dnet_stub (dnet does not exist).
5852     if test "$with_dnet" = "no" ; then
5853 ac_cv_lib_dnet_dnet_ntoa=no
5854 else
5855
5856 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5857 echo "configure:5858: checking for dnet_ntoa in -ldnet" >&5
5858 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5859
5860 xe_check_libs=" -ldnet "
5861 cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 /* Override any gcc2 internal prototype to avoid an error.  */
5865 /* We use char because int might match the return type of a gcc2
5866     builtin and then its argument prototype would still apply.  */
5867 char dnet_ntoa();
5868
5869 int main() {
5870 dnet_ntoa()
5871 ; return 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5874   rm -rf conftest*
5875   eval "ac_cv_lib_$ac_lib_var=yes"
5876 else
5877   echo "configure: failed program was:" >&5
5878   cat conftest.$ac_ext >&5
5879   rm -rf conftest*
5880   eval "ac_cv_lib_$ac_lib_var=no"
5881 fi
5882 rm -f conftest*
5883 xe_check_libs=""
5884
5885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5886   echo "$ac_t""yes" 1>&6
5887   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5888 else
5889   echo "$ac_t""no" 1>&6
5890 fi
5891
5892 fi
5893
5894     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5895       
5896 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5897 echo "configure:5898: checking for dnet_ntoa in -ldnet_stub" >&5
5898 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5899
5900 xe_check_libs=" -ldnet_stub "
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 /* Override any gcc2 internal prototype to avoid an error.  */
5905 /* We use char because int might match the return type of a gcc2
5906     builtin and then its argument prototype would still apply.  */
5907 char dnet_ntoa();
5908
5909 int main() {
5910 dnet_ntoa()
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_lib_$ac_lib_var=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_lib_$ac_lib_var=no"
5921 fi
5922 rm -f conftest*
5923 xe_check_libs=""
5924
5925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5926   echo "$ac_t""yes" 1>&6
5927   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5928 else
5929   echo "$ac_t""no" 1>&6
5930 fi
5931
5932
5933     fi
5934
5935     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5936     # to get the SysV transport functions.
5937     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5938     # needs -lnsl.
5939     # The nsl library prevents programs from opening the X display
5940     # on Irix 5.2, according to dickey@clark.net.
5941     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5942 echo "configure:5943: checking for gethostbyname" >&5
5943
5944 cat > conftest.$ac_ext <<EOF
5945 #line 5946 "configure"
5946 #include "confdefs.h"
5947 /* System header to define __stub macros and hopefully few prototypes,
5948     which can conflict with char gethostbyname(); below.  */
5949 #include <assert.h>
5950 /* Override any gcc2 internal prototype to avoid an error.  */
5951 /* We use char because int might match the return type of a gcc2
5952     builtin and then its argument prototype would still apply.  */
5953 char gethostbyname();
5954
5955 int main() {
5956
5957 /* The GNU C library defines this for functions which it implements
5958     to always fail with ENOSYS.  Some functions are actually named
5959     something starting with __ and the normal name is an alias.  */
5960 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5961 choke me
5962 #else
5963 gethostbyname();
5964 #endif
5965
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969   rm -rf conftest*
5970   eval "ac_cv_func_gethostbyname=yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_func_gethostbyname=no"
5976 fi
5977 rm -f conftest*
5978
5979 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5980   echo "$ac_t""yes" 1>&6
5981   :
5982 else
5983   echo "$ac_t""no" 1>&6
5984 fi
5985
5986     if test $ac_cv_func_gethostbyname = no; then
5987       
5988 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5989 echo "configure:5990: checking for gethostbyname in -lnsl" >&5
5990 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5991
5992 xe_check_libs=" -lnsl "
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error.  */
5997 /* We use char because int might match the return type of a gcc2
5998     builtin and then its argument prototype would still apply.  */
5999 char gethostbyname();
6000
6001 int main() {
6002 gethostbyname()
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_lib_$ac_lib_var=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=no"
6013 fi
6014 rm -f conftest*
6015 xe_check_libs=""
6016
6017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6018   echo "$ac_t""yes" 1>&6
6019   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6020 else
6021   echo "$ac_t""no" 1>&6
6022 fi
6023
6024
6025     fi
6026
6027     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6028     # socket/setsockopt and other routines are undefined under SCO ODT
6029     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6030     # on later versions), says simon@lia.di.epfl.ch: it contains
6031     # gethostby* variants that don't use the nameserver (or something).
6032     # -lsocket must be given before -lnsl if both are needed.
6033     # We assume that if connect needs -lnsl, so does gethostbyname.
6034     echo $ac_n "checking for connect""... $ac_c" 1>&6
6035 echo "configure:6036: checking for connect" >&5
6036
6037 cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040 /* System header to define __stub macros and hopefully few prototypes,
6041     which can conflict with char connect(); below.  */
6042 #include <assert.h>
6043 /* Override any gcc2 internal prototype to avoid an error.  */
6044 /* We use char because int might match the return type of a gcc2
6045     builtin and then its argument prototype would still apply.  */
6046 char connect();
6047
6048 int main() {
6049
6050 /* The GNU C library defines this for functions which it implements
6051     to always fail with ENOSYS.  Some functions are actually named
6052     something starting with __ and the normal name is an alias.  */
6053 #if defined (__stub_connect) || defined (__stub___connect)
6054 choke me
6055 #else
6056 connect();
6057 #endif
6058
6059 ; return 0; }
6060 EOF
6061 if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062   rm -rf conftest*
6063   eval "ac_cv_func_connect=yes"
6064 else
6065   echo "configure: failed program was:" >&5
6066   cat conftest.$ac_ext >&5
6067   rm -rf conftest*
6068   eval "ac_cv_func_connect=no"
6069 fi
6070 rm -f conftest*
6071
6072 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6073   echo "$ac_t""yes" 1>&6
6074   :
6075 else
6076   echo "$ac_t""no" 1>&6
6077 fi
6078
6079     if test $ac_cv_func_connect = no; then
6080       
6081 xe_msg_checking="for connect in -lsocket"
6082 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6083 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6084 echo "configure:6085: checking "$xe_msg_checking"" >&5
6085 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6086
6087 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6088 cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 /* Override any gcc2 internal prototype to avoid an error.  */
6092 /* We use char because int might match the return type of a gcc2
6093     builtin and then its argument prototype would still apply.  */
6094 char connect();
6095
6096 int main() {
6097 connect()
6098 ; return 0; }
6099 EOF
6100 if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6101   rm -rf conftest*
6102   eval "ac_cv_lib_$ac_lib_var=yes"
6103 else
6104   echo "configure: failed program was:" >&5
6105   cat conftest.$ac_ext >&5
6106   rm -rf conftest*
6107   eval "ac_cv_lib_$ac_lib_var=no"
6108 fi
6109 rm -f conftest*
6110 xe_check_libs=""
6111
6112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6113   echo "$ac_t""yes" 1>&6
6114   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6115 else
6116   echo "$ac_t""no" 1>&6
6117 fi
6118
6119
6120     fi
6121
6122     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6123     echo $ac_n "checking for remove""... $ac_c" 1>&6
6124 echo "configure:6125: checking for remove" >&5
6125
6126 cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 /* System header to define __stub macros and hopefully few prototypes,
6130     which can conflict with char remove(); below.  */
6131 #include <assert.h>
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char remove();
6136
6137 int main() {
6138
6139 /* The GNU C library defines this for functions which it implements
6140     to always fail with ENOSYS.  Some functions are actually named
6141     something starting with __ and the normal name is an alias.  */
6142 #if defined (__stub_remove) || defined (__stub___remove)
6143 choke me
6144 #else
6145 remove();
6146 #endif
6147
6148 ; return 0; }
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151   rm -rf conftest*
6152   eval "ac_cv_func_remove=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_func_remove=no"
6158 fi
6159 rm -f conftest*
6160
6161 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6162   echo "$ac_t""yes" 1>&6
6163   :
6164 else
6165   echo "$ac_t""no" 1>&6
6166 fi
6167
6168     if test $ac_cv_func_remove = no; then
6169       
6170 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6171 echo "configure:6172: checking for remove in -lposix" >&5
6172 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6173
6174 xe_check_libs=" -lposix "
6175 cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178 /* Override any gcc2 internal prototype to avoid an error.  */
6179 /* We use char because int might match the return type of a gcc2
6180     builtin and then its argument prototype would still apply.  */
6181 char remove();
6182
6183 int main() {
6184 remove()
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   eval "ac_cv_lib_$ac_lib_var=yes"
6190 else
6191   echo "configure: failed program was:" >&5
6192   cat conftest.$ac_ext >&5
6193   rm -rf conftest*
6194   eval "ac_cv_lib_$ac_lib_var=no"
6195 fi
6196 rm -f conftest*
6197 xe_check_libs=""
6198
6199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6200   echo "$ac_t""yes" 1>&6
6201   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205
6206
6207     fi
6208
6209     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6210     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6211 echo "configure:6212: checking for shmat" >&5
6212
6213 cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 /* System header to define __stub macros and hopefully few prototypes,
6217     which can conflict with char shmat(); below.  */
6218 #include <assert.h>
6219 /* Override any gcc2 internal prototype to avoid an error.  */
6220 /* We use char because int might match the return type of a gcc2
6221     builtin and then its argument prototype would still apply.  */
6222 char shmat();
6223
6224 int main() {
6225
6226 /* The GNU C library defines this for functions which it implements
6227     to always fail with ENOSYS.  Some functions are actually named
6228     something starting with __ and the normal name is an alias.  */
6229 #if defined (__stub_shmat) || defined (__stub___shmat)
6230 choke me
6231 #else
6232 shmat();
6233 #endif
6234
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238   rm -rf conftest*
6239   eval "ac_cv_func_shmat=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_func_shmat=no"
6245 fi
6246 rm -f conftest*
6247
6248 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6249   echo "$ac_t""yes" 1>&6
6250   :
6251 else
6252   echo "$ac_t""no" 1>&6
6253 fi
6254
6255     if test $ac_cv_func_shmat = no; then
6256       
6257 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6258 echo "configure:6259: checking for shmat in -lipc" >&5
6259 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6260
6261 xe_check_libs=" -lipc "
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 /* Override any gcc2 internal prototype to avoid an error.  */
6266 /* We use char because int might match the return type of a gcc2
6267     builtin and then its argument prototype would still apply.  */
6268 char shmat();
6269
6270 int main() {
6271 shmat()
6272 ; return 0; }
6273 EOF
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=yes"
6277 else
6278   echo "configure: failed program was:" >&5
6279   cat conftest.$ac_ext >&5
6280   rm -rf conftest*
6281   eval "ac_cv_lib_$ac_lib_var=no"
6282 fi
6283 rm -f conftest*
6284 xe_check_libs=""
6285
6286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6287   echo "$ac_t""yes" 1>&6
6288   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6289 else
6290   echo "$ac_t""no" 1>&6
6291 fi
6292
6293
6294     fi
6295   fi
6296
6297   # Check for libraries that X11R6 Xt/Xaw programs need.
6298   ac_save_LDFLAGS="$LDFLAGS"
6299   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6300   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6301   # check for ICE first), but we must link in the order -lSM -lICE or
6302   # we get undefined symbols.  So assume we have SM if we have ICE.
6303   # These have to be linked with before -lX11, unlike the other
6304   # libraries we check for below, so use a different variable.
6305   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6306   
6307 xe_msg_checking="for IceConnectionNumber in -lICE"
6308 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6309 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6310 echo "configure:6311: checking "$xe_msg_checking"" >&5
6311 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6312
6313 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6314 cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317 /* Override any gcc2 internal prototype to avoid an error.  */
6318 /* We use char because int might match the return type of a gcc2
6319     builtin and then its argument prototype would still apply.  */
6320 char IceConnectionNumber();
6321
6322 int main() {
6323 IceConnectionNumber()
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6327   rm -rf conftest*
6328   eval "ac_cv_lib_$ac_lib_var=yes"
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   eval "ac_cv_lib_$ac_lib_var=no"
6334 fi
6335 rm -f conftest*
6336 xe_check_libs=""
6337
6338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6339   echo "$ac_t""yes" 1>&6
6340   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6341 else
6342   echo "$ac_t""no" 1>&6
6343 fi
6344
6345
6346   LDFLAGS="$ac_save_LDFLAGS"
6347
6348 fi
6349  # Autoconf claims to find X library and include dirs for us.
6350   if test "$no_x" = "yes"
6351   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6352   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6353   fi
6354 fi
6355
6356
6357 if test "$with_x11" = "yes"; then
6358   { test "$extra_verbose" = "yes" && cat << \EOF
6359     Defining HAVE_X_WINDOWS
6360 EOF
6361 cat >> confdefs.h <<\EOF
6362 #define HAVE_X_WINDOWS 1
6363 EOF
6364 }
6365
6366   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6367   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6368
6369
6370     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6371 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6372 echo "configure:6373: checking for Xm/Xm.h" >&5
6373
6374 cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 #include <Xm/Xm.h>
6378 EOF
6379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6380 { (eval echo configure:6381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6382 if test -z "$ac_err"; then
6383   rm -rf conftest*
6384   eval "ac_cv_header_$ac_safe=yes"
6385 else
6386   echo "$ac_err" >&5
6387   echo "configure: failed program was:" >&5
6388   cat conftest.$ac_ext >&5
6389   rm -rf conftest*
6390   eval "ac_cv_header_$ac_safe=no"
6391 fi
6392 rm -f conftest*
6393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6394   echo "$ac_t""yes" 1>&6
6395   
6396 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6397 echo "configure:6398: checking for XmStringFree in -lXm" >&5
6398 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6399
6400 xe_check_libs=" -lXm "
6401 cat > conftest.$ac_ext <<EOF
6402 #line 6403 "configure"
6403 #include "confdefs.h"
6404 /* Override any gcc2 internal prototype to avoid an error.  */
6405 /* We use char because int might match the return type of a gcc2
6406     builtin and then its argument prototype would still apply.  */
6407 char XmStringFree();
6408
6409 int main() {
6410 XmStringFree()
6411 ; return 0; }
6412 EOF
6413 if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6414   rm -rf conftest*
6415   eval "ac_cv_lib_$ac_lib_var=yes"
6416 else
6417   echo "configure: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=no"
6421 fi
6422 rm -f conftest*
6423 xe_check_libs=""
6424
6425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6426   echo "$ac_t""yes" 1>&6
6427   got_motif=yes
6428 else
6429   echo "$ac_t""no" 1>&6
6430 fi
6431
6432
6433 else
6434   echo "$ac_t""no" 1>&6
6435 fi
6436
6437
6438   if test "$got_motif" != "yes"; then
6439             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6440                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6441       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6442       if test -d "$lib_dir" -a -d "$inc_dir"; then
6443         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6444           x_libraries="$lib_dir $x_libraries"
6445           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6446         esac
6447         case "$x_includes" in "$inc_dir"* ) ;; *)
6448           x_includes="$inc_dir $x_includes"
6449           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6450         esac
6451         break;  fi
6452     done
6453   fi
6454
6455     for rel in "X11R6" "X11R5" "X11R4"; do
6456     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6457     if test -d "$lib_dir" -a -d "$inc_dir"; then
6458       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6459         x_libraries="$x_libraries $lib_dir"
6460         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6461       esac
6462       case "$x_includes" in "$inc_dir"* ) ;; *)
6463         x_includes="$x_includes $inc_dir"
6464         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6465       esac
6466       break;     fi
6467   done
6468
6469     case "$opsys" in
6470   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 ;;
6471   esac
6472
6473   ld_switch_x_site="$X_LIBS"
6474
6475   
6476 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6477     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6478   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6479   
6480         runpath="" runpath_dirs=""
6481   if test -n "$LD_RUN_PATH"; then
6482     runpath="$LD_RUN_PATH"
6483   elif test "$GCC" = "yes"; then
6484         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6485     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6486     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6487     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6488       case "$arg" in P,* | -L* | -R* )
6489         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6490           {
6491 xe_runpath_dir="$dir"
6492   test "$xe_runpath_dir" != "/lib"     -a \
6493         "$xe_runpath_dir" != "/usr/lib" -a \
6494         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6495   eval "$xe_add_unique_runpath_dir"
6496 }
6497         done ;;
6498       esac
6499     done
6500     ld_switch_run="$ld_switch_run_save"
6501     rm -f conftest*
6502   else
6503         for arg in $ld_switch_site $ld_switch_x_site; do
6504       case "$arg" in -L*) {
6505 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6506   test "$xe_runpath_dir" != "/lib"     -a \
6507         "$xe_runpath_dir" != "/usr/lib" -a \
6508         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6509   eval "$xe_add_unique_runpath_dir"
6510 };; esac
6511     done
6512         if test "$opsys $need_motif" = "sol2 yes"; then
6513       xe_runpath_dir="/opt/SUNWdt/lib";
6514       eval "$xe_add_unique_runpath_dir";
6515     fi
6516   fi 
6517   if test -n "$runpath"; then
6518     ld_switch_run="${dash_r}${runpath}"
6519     
6520 if test "$GCC" = "yes"; then
6521   set x $ld_switch_run; shift; ld_switch_run=""
6522   while test -n "$1"; do
6523     case $1 in
6524       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6525       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6526       -Xlinker* ) ;;
6527       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6528     esac
6529     shift
6530   done
6531 fi
6532     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6533   fi
6534 fi
6535
6536
6537   if test "$extra_verbose" = "yes"; then
6538     echo; echo "X11 compilation variables:"
6539     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6540     echo
6541   fi
6542
6543             bitmapdirs=
6544   if test "$x_includes" != NONE; then
6545     for i in $x_includes; do
6546       if test -d "$i/bitmaps"; then
6547         bitmapdirs="$i/bitmaps:$bitmapdirs"
6548       fi
6549       if test -d "$i/X11/bitmaps"; then
6550         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6551       fi
6552     done
6553     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6554   fi
6555   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6556     Defining BITMAPDIR = "$bitmapdirs"
6557 EOF
6558 cat >> confdefs.h <<EOF
6559 #define BITMAPDIR "$bitmapdirs"
6560 EOF
6561 }
6562
6563
6564     echo "checking for X defines extracted by xmkmf" 1>&6
6565 echo "configure:6566: checking for X defines extracted by xmkmf" >&5
6566   rm -fr conftestdir
6567   if mkdir conftestdir; then
6568     cd conftestdir
6569     cat > Imakefile <<'EOF'
6570 xetest:
6571         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6572 EOF
6573     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6574       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6575       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6576     fi
6577     cd ..
6578     rm -fr conftestdir
6579     for word in $xmkmf_defines; do
6580       case "$word" in 
6581       -D__STDC__*) ;;
6582       -D* )
6583         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6584         case "$word" in
6585           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6586           *     ) val=1 ;;
6587         esac
6588         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6589           if test "$val" = "1"
6590             then { test "$extra_verbose" = "yes" && cat << EOF
6591     Defining $sym
6592 EOF
6593 cat >> confdefs.h <<EOF
6594 #define $sym 1
6595 EOF
6596 }
6597
6598             else { test "$extra_verbose" = "yes" && cat << EOF
6599     Defining $sym = $val
6600 EOF
6601 cat >> confdefs.h <<EOF
6602 #define $sym $val
6603 EOF
6604 }
6605
6606           fi
6607         fi  ;;
6608       esac
6609     done
6610   fi
6611
6612     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6613 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6614 echo "configure:6615: checking for X11/Intrinsic.h" >&5
6615
6616 cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6619 #include <X11/Intrinsic.h>
6620 EOF
6621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6622 { (eval echo configure:6623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6624 if test -z "$ac_err"; then
6625   rm -rf conftest*
6626   eval "ac_cv_header_$ac_safe=yes"
6627 else
6628   echo "$ac_err" >&5
6629   echo "configure: failed program was:" >&5
6630   cat conftest.$ac_ext >&5
6631   rm -rf conftest*
6632   eval "ac_cv_header_$ac_safe=no"
6633 fi
6634 rm -f conftest*
6635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6636   echo "$ac_t""yes" 1>&6
6637   :
6638 else
6639   echo "$ac_t""no" 1>&6
6640 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6641 fi
6642
6643
6644       
6645 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6646 echo "configure:6647: checking for XOpenDisplay in -lX11" >&5
6647 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6648
6649 xe_check_libs=" -lX11 "
6650 cat > conftest.$ac_ext <<EOF
6651 #line 6652 "configure"
6652 #include "confdefs.h"
6653 /* Override any gcc2 internal prototype to avoid an error.  */
6654 /* We use char because int might match the return type of a gcc2
6655     builtin and then its argument prototype would still apply.  */
6656 char XOpenDisplay();
6657
6658 int main() {
6659 XOpenDisplay()
6660 ; return 0; }
6661 EOF
6662 if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6663   rm -rf conftest*
6664   eval "ac_cv_lib_$ac_lib_var=yes"
6665 else
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   eval "ac_cv_lib_$ac_lib_var=no"
6670 fi
6671 rm -f conftest*
6672 xe_check_libs=""
6673
6674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6675   echo "$ac_t""yes" 1>&6
6676   have_lib_x11=yes
6677 else
6678   echo "$ac_t""no" 1>&6
6679 fi
6680
6681
6682   if test "$have_lib_x11" != "yes"; then
6683     
6684 xe_msg_checking="for XGetFontProperty in -lX11"
6685 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6686 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6687 echo "configure:6688: checking "$xe_msg_checking"" >&5
6688 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6689
6690 xe_check_libs=" -lX11 -b i486-linuxaout"
6691 cat > conftest.$ac_ext <<EOF
6692 #line 6693 "configure"
6693 #include "confdefs.h"
6694 /* Override any gcc2 internal prototype to avoid an error.  */
6695 /* We use char because int might match the return type of a gcc2
6696     builtin and then its argument prototype would still apply.  */
6697 char XGetFontProperty();
6698
6699 int main() {
6700 XGetFontProperty()
6701 ; return 0; }
6702 EOF
6703 if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6704   rm -rf conftest*
6705   eval "ac_cv_lib_$ac_lib_var=yes"
6706 else
6707   echo "configure: failed program was:" >&5
6708   cat conftest.$ac_ext >&5
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=no"
6711 fi
6712 rm -f conftest*
6713 xe_check_libs=""
6714
6715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6716   echo "$ac_t""yes" 1>&6
6717   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6718 else
6719   echo "$ac_t""no" 1>&6
6720 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6721 fi
6722
6723
6724   fi
6725   libs_x="-lX11"
6726   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6727
6728     
6729 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6730 echo "configure:6731: checking for XShapeSelectInput in -lXext" >&5
6731 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6732
6733 xe_check_libs=" -lXext "
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char XShapeSelectInput();
6741
6742 int main() {
6743 XShapeSelectInput()
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   eval "ac_cv_lib_$ac_lib_var=yes"
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_lib_$ac_lib_var=no"
6754 fi
6755 rm -f conftest*
6756 xe_check_libs=""
6757
6758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6759   echo "$ac_t""yes" 1>&6
6760   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6761 else
6762   echo "$ac_t""no" 1>&6
6763 fi
6764
6765
6766
6767     
6768 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6769 echo "configure:6770: checking for XtOpenDisplay in -lXt" >&5
6770 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6771
6772 xe_check_libs=" -lXt "
6773 cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char XtOpenDisplay();
6780
6781 int main() {
6782 XtOpenDisplay()
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6786   rm -rf conftest*
6787   eval "ac_cv_lib_$ac_lib_var=yes"
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -rf conftest*
6792   eval "ac_cv_lib_$ac_lib_var=no"
6793 fi
6794 rm -f conftest*
6795 xe_check_libs=""
6796
6797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6798   echo "$ac_t""yes" 1>&6
6799   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6800 else
6801   echo "$ac_t""no" 1>&6
6802 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6803 fi
6804
6805
6806
6807   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6808 echo "configure:6809: checking the version of X11 being used" >&5
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 #include <X11/Intrinsic.h>
6813     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6814 EOF
6815 if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6816 then
6817   ./conftest foobar; x11_release=$?
6818 else
6819   conftest_rc="$?"
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -fr conftest*
6823   x11_release=4
6824 fi
6825 rm -fr conftest*
6826   echo "$ac_t""R${x11_release}" 1>&6
6827   { test "$extra_verbose" = "yes" && cat << EOF
6828     Defining THIS_IS_X11R${x11_release}
6829 EOF
6830 cat >> confdefs.h <<EOF
6831 #define THIS_IS_X11R${x11_release} 1
6832 EOF
6833 }
6834
6835
6836   if test "${x11_release}" = "4"; then
6837     case "$with_widgets" in
6838       "" | "no") with_widgets=no ;;
6839       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6840     esac
6841   fi
6842
6843   for ac_func in XConvertCase
6844 do
6845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6846 echo "configure:6847: checking for $ac_func" >&5
6847
6848 cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851 /* System header to define __stub macros and hopefully few prototypes,
6852     which can conflict with char $ac_func(); below.  */
6853 #include <assert.h>
6854 /* Override any gcc2 internal prototype to avoid an error.  */
6855 /* We use char because int might match the return type of a gcc2
6856     builtin and then its argument prototype would still apply.  */
6857 char $ac_func();
6858
6859 int main() {
6860
6861 /* The GNU C library defines this for functions which it implements
6862     to always fail with ENOSYS.  Some functions are actually named
6863     something starting with __ and the normal name is an alias.  */
6864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6865 choke me
6866 #else
6867 $ac_func();
6868 #endif
6869
6870 ; return 0; }
6871 EOF
6872 if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6873   rm -rf conftest*
6874   eval "ac_cv_func_$ac_func=yes"
6875 else
6876   echo "configure: failed program was:" >&5
6877   cat conftest.$ac_ext >&5
6878   rm -rf conftest*
6879   eval "ac_cv_func_$ac_func=no"
6880 fi
6881 rm -f conftest*
6882
6883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6884   echo "$ac_t""yes" 1>&6
6885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6886   { test "$extra_verbose" = "yes" && cat << EOF
6887     Defining $ac_tr_func
6888 EOF
6889 cat >> confdefs.h <<EOF
6890 #define $ac_tr_func 1
6891 EOF
6892 }
6893  
6894 else
6895   echo "$ac_t""no" 1>&6
6896 fi
6897 done
6898
6899
6900   for ac_hdr in X11/Xlocale.h
6901 do
6902 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6903 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6904 echo "configure:6905: checking for $ac_hdr" >&5
6905
6906 cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909 #include <$ac_hdr>
6910 EOF
6911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6912 { (eval echo configure:6913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6914 if test -z "$ac_err"; then
6915   rm -rf conftest*
6916   eval "ac_cv_header_$ac_safe=yes"
6917 else
6918   echo "$ac_err" >&5
6919   echo "configure: failed program was:" >&5
6920   cat conftest.$ac_ext >&5
6921   rm -rf conftest*
6922   eval "ac_cv_header_$ac_safe=no"
6923 fi
6924 rm -f conftest*
6925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6926   echo "$ac_t""yes" 1>&6
6927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6928   { test "$extra_verbose" = "yes" && cat << EOF
6929     Defining $ac_tr_hdr
6930 EOF
6931 cat >> confdefs.h <<EOF
6932 #define $ac_tr_hdr 1
6933 EOF
6934 }
6935  
6936 else
6937   echo "$ac_t""no" 1>&6
6938 fi
6939 done
6940
6941
6942     for ac_func in XRegisterIMInstantiateCallback
6943 do
6944 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6945 echo "configure:6946: checking for $ac_func" >&5
6946
6947 cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 /* System header to define __stub macros and hopefully few prototypes,
6951     which can conflict with char $ac_func(); below.  */
6952 #include <assert.h>
6953 /* Override any gcc2 internal prototype to avoid an error.  */
6954 /* We use char because int might match the return type of a gcc2
6955     builtin and then its argument prototype would still apply.  */
6956 char $ac_func();
6957
6958 int main() {
6959
6960 /* The GNU C library defines this for functions which it implements
6961     to always fail with ENOSYS.  Some functions are actually named
6962     something starting with __ and the normal name is an alias.  */
6963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6964 choke me
6965 #else
6966 $ac_func();
6967 #endif
6968
6969 ; return 0; }
6970 EOF
6971 if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6972   rm -rf conftest*
6973   eval "ac_cv_func_$ac_func=yes"
6974 else
6975   echo "configure: failed program was:" >&5
6976   cat conftest.$ac_ext >&5
6977   rm -rf conftest*
6978   eval "ac_cv_func_$ac_func=no"
6979 fi
6980 rm -f conftest*
6981
6982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6983   echo "$ac_t""yes" 1>&6
6984     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6985   { test "$extra_verbose" = "yes" && cat << EOF
6986     Defining $ac_tr_func
6987 EOF
6988 cat >> confdefs.h <<EOF
6989 #define $ac_tr_func 1
6990 EOF
6991 }
6992  
6993 else
6994   echo "$ac_t""no" 1>&6
6995 fi
6996 done
6997
6998   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6999 echo "configure:7000: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7000   cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003
7004 #define NeedFunctionPrototypes 1
7005 #include <X11/Xlib.h>
7006 extern Bool XRegisterIMInstantiateCallback(
7007    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7008
7009 int main() {
7010
7011 ; return 0; }
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7014   rm -rf conftest*
7015   echo "$ac_t""yes" 1>&6
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019   rm -rf conftest*
7020   echo "$ac_t""no" 1>&6
7021    { test "$extra_verbose" = "yes" && cat << \EOF
7022     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7023 EOF
7024 cat >> confdefs.h <<\EOF
7025 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7026 EOF
7027 }
7028
7029 fi
7030 rm -f conftest*
7031
7032     test -z "$with_xmu" && { 
7033 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7034 echo "configure:7035: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7035 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7036
7037 xe_check_libs=" -lXmu "
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* Override any gcc2 internal prototype to avoid an error.  */
7042 /* We use char because int might match the return type of a gcc2
7043     builtin and then its argument prototype would still apply.  */
7044 char XmuReadBitmapDataFromFile();
7045
7046 int main() {
7047 XmuReadBitmapDataFromFile()
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_lib_$ac_lib_var=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=no"
7058 fi
7059 rm -f conftest*
7060 xe_check_libs=""
7061
7062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7063   echo "$ac_t""yes" 1>&6
7064   with_xmu=yes
7065 else
7066   echo "$ac_t""no" 1>&6
7067 with_xmu=no
7068 fi
7069
7070  }
7071   if test "$with_xmu" = "no"; then
7072     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7073    echo "    xemacs will be linked with \"xmu.o\""
7074  fi
7075   else
7076     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7077     { test "$extra_verbose" = "yes" && cat << \EOF
7078     Defining HAVE_XMU
7079 EOF
7080 cat >> confdefs.h <<\EOF
7081 #define HAVE_XMU 1
7082 EOF
7083 }
7084
7085   fi
7086
7087       
7088 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7089 echo "configure:7090: checking for main in -lXbsd" >&5
7090 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7091
7092 xe_check_libs=" -lXbsd "
7093 cat > conftest.$ac_ext <<EOF
7094 #line 7095 "configure"
7095 #include "confdefs.h"
7096
7097 int main() {
7098 main()
7099 ; return 0; }
7100 EOF
7101 if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7102   rm -rf conftest*
7103   eval "ac_cv_lib_$ac_lib_var=yes"
7104 else
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   eval "ac_cv_lib_$ac_lib_var=no"
7109 fi
7110 rm -f conftest*
7111 xe_check_libs=""
7112
7113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7114   echo "$ac_t""yes" 1>&6
7115   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7116 else
7117   echo "$ac_t""no" 1>&6
7118 fi
7119
7120
7121
7122     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7123         if test "$GCC" = "yes"; then
7124                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7125 echo "configure:7126: checking for name of AIX gcc threads option" >&5
7126       case `$CC -v --help 2>&1` in
7127         *-mthreads*) aix_threads=-mthreads ;;
7128                   *) aix_threads=-pthread  ;;
7129       esac
7130       echo "$ac_t""$aix_threads" 1>&6
7131       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7132       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7133     else
7134             case "$CC" in *_r) : ;;
7135         *)
7136          xe_save_CC="$CC"
7137          CC="${CC}_r"
7138          echo $ac_n "checking size of short""... $ac_c" 1>&6
7139 echo "configure:7140: checking size of short" >&5
7140
7141 cat > conftest.$ac_ext <<EOF
7142 #line 7143 "configure"
7143 #include "confdefs.h"
7144 #include <stdio.h>
7145 #include <sys/types.h>
7146 main()
7147 {
7148   FILE *f=fopen("conftestval", "w");
7149   if (!f) exit(1);
7150   fprintf(f, "%d\n", sizeof(short));
7151   exit(0);
7152 }
7153 EOF
7154 if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7155 then
7156   ac_cv_sizeof_short=`cat conftestval`
7157 else
7158   conftest_rc="$?"
7159   echo "configure: failed program was:" >&5
7160   cat conftest.$ac_ext >&5
7161   rm -fr conftest*
7162   ac_cv_sizeof_short=0
7163 fi
7164 rm -fr conftest*
7165 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7166 { test "$extra_verbose" = "yes" && cat << EOF
7167     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7168 EOF
7169 cat >> confdefs.h <<EOF
7170 #define SIZEOF_SHORT $ac_cv_sizeof_short
7171 EOF
7172 }
7173
7174
7175          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7176       esac
7177     fi
7178   fi
7179
7180 fi 
7181 if test "$with_msw" != "no"; then
7182   echo "checking for MS-Windows" 1>&6
7183 echo "configure:7184: checking for MS-Windows" >&5
7184   
7185 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7186 echo "configure:7187: checking for main in -lgdi32" >&5
7187 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7188
7189 xe_check_libs=" -lgdi32 "
7190 cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193
7194 int main() {
7195 main()
7196 ; return 0; }
7197 EOF
7198 if { (eval echo configure:7199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7199   rm -rf conftest*
7200   eval "ac_cv_lib_$ac_lib_var=yes"
7201 else
7202   echo "configure: failed program was:" >&5
7203   cat conftest.$ac_ext >&5
7204   rm -rf conftest*
7205   eval "ac_cv_lib_$ac_lib_var=no"
7206 fi
7207 rm -f conftest*
7208 xe_check_libs=""
7209
7210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7211   echo "$ac_t""yes" 1>&6
7212   with_msw=yes
7213 else
7214   echo "$ac_t""no" 1>&6
7215 fi
7216
7217
7218   if test "$with_msw" = "yes"; then
7219     { test "$extra_verbose" = "yes" && cat << \EOF
7220     Defining HAVE_MS_WINDOWS
7221 EOF
7222 cat >> confdefs.h <<\EOF
7223 #define HAVE_MS_WINDOWS 1
7224 EOF
7225 }
7226
7227
7228         if test "$with_netinstall" = "yes"; then
7229       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7230       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7231       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7232     fi
7233
7234     install_pp="$blddir/lib-src/installexe.sh"
7235     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
7236     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7237     if test "$window_system" != x11; then
7238         window_system=msw
7239         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7240             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7241    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7242  fi
7243         test "$with_menubars"   != "no" && with_menubars=msw \
7244             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7245    echo "    xemacs will be linked with \"menubar-msw.o\""
7246  fi
7247         test "$with_toolbars"   != "no" && with_toolbars=msw \
7248             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7249    echo "    xemacs will be linked with \"toolbar-msw.o\""
7250  fi
7251         test "$with_dialogs"   != "no" && with_dialogs=msw \
7252             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7253    echo "    xemacs will be linked with \"dialog-msw.o\""
7254  fi
7255         test "$with_widgets"   != "no" && with_widgets=msw
7256     else
7257         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7258    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7259  fi
7260         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7261    echo "    xemacs will be linked with \"menubar-msw.o\""
7262  fi
7263         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7264    echo "    xemacs will be linked with \"toolbar-msw.o\""
7265  fi
7266         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7267    echo "    xemacs will be linked with \"dialog-msw.o\""
7268  fi
7269     fi
7270         cat > conftest.$ac_ext <<EOF
7271 #line 7272 "configure"
7272 #include "confdefs.h"
7273 #include <fcntl.h>
7274     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7275 EOF
7276 if { (eval echo configure:7277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7277 then
7278   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7279     Defining HAVE_MSG_SELECT
7280 EOF
7281 cat >> confdefs.h <<\EOF
7282 #define HAVE_MSG_SELECT 1
7283 EOF
7284 }
7285
7286 else
7287   conftest_rc="$?"
7288   echo "configure: failed program was:" >&5
7289   cat conftest.$ac_ext >&5
7290 fi
7291 rm -fr conftest*
7292     with_file_coding=yes
7293     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
7294    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\""
7295  fi
7296   fi
7297 fi
7298
7299
7300
7301 test -z "$window_system" && window_system="none"
7302
7303 if test "$window_system" = "none"; then
7304   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7305   do
7306     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7307        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7308     fi
7309     eval "with_${feature}=no"
7310   done
7311 else
7312   test -z "$with_toolbars" && with_toolbars=yes
7313 fi
7314
7315 if test "$with_msw" != "yes"; then
7316   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7317   do
7318     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7319        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7320     fi
7321     eval "with_${feature}=no"
7322   done
7323 else
7324   :
7325 fi
7326
7327 if test "$with_x11" != "yes"; then
7328             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7329   do
7330     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7331        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7332     fi
7333     eval "with_${feature}=no"
7334   done
7335 fi
7336
7337 if test "$with_x11" = "yes"; then
7338   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7339 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7340 echo "configure:7341: checking for X11/extensions/shape.h" >&5
7341
7342 cat > conftest.$ac_ext <<EOF
7343 #line 7344 "configure"
7344 #include "confdefs.h"
7345 #include <X11/extensions/shape.h>
7346 EOF
7347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7348 { (eval echo configure:7349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7350 if test -z "$ac_err"; then
7351   rm -rf conftest*
7352   eval "ac_cv_header_$ac_safe=yes"
7353 else
7354   echo "$ac_err" >&5
7355   echo "configure: failed program was:" >&5
7356   cat conftest.$ac_ext >&5
7357   rm -rf conftest*
7358   eval "ac_cv_header_$ac_safe=no"
7359 fi
7360 rm -f conftest*
7361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7362   echo "$ac_t""yes" 1>&6
7363   
7364    { test "$extra_verbose" = "yes" && cat << \EOF
7365     Defining HAVE_BALLOON_HELP
7366 EOF
7367 cat >> confdefs.h <<\EOF
7368 #define HAVE_BALLOON_HELP 1
7369 EOF
7370 }
7371
7372    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7373    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7374  fi
7375 else
7376   echo "$ac_t""no" 1>&6
7377 fi
7378
7379 fi
7380
7381 bitmapdir=
7382
7383 case "$window_system" in
7384   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7385   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7386   gtk  )
7387        HAVE_X_WINDOWS=no
7388        test "$with_gnome" = "yes" && echo "  Using GNOME."
7389        test "$with_gnome" = "no" && echo "  Using GTK."
7390        ;;
7391   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7392 esac
7393
7394 case "$x_libraries" in *X11R4* )
7395   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7396   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7397 esac
7398
7399 echo "checking for WM_COMMAND option" 1>&6
7400 echo "configure:7401: checking for WM_COMMAND option" >&5;
7401 if test "$with_wmcommand" != "no"; then
7402   { test "$extra_verbose" = "yes" && cat << \EOF
7403     Defining HAVE_WMCOMMAND
7404 EOF
7405 cat >> confdefs.h <<\EOF
7406 #define HAVE_WMCOMMAND 1
7407 EOF
7408 }
7409
7410 fi
7411
7412 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7413 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7414 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7415 echo "configure:7416: checking for X11/Xauth.h" >&5
7416
7417 cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 #include <X11/Xauth.h>
7421 EOF
7422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7423 { (eval echo configure:7424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7425 if test -z "$ac_err"; then
7426   rm -rf conftest*
7427   eval "ac_cv_header_$ac_safe=yes"
7428 else
7429   echo "$ac_err" >&5
7430   echo "configure: failed program was:" >&5
7431   cat conftest.$ac_ext >&5
7432   rm -rf conftest*
7433   eval "ac_cv_header_$ac_safe=no"
7434 fi
7435 rm -f conftest*
7436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438   :
7439 else
7440   echo "$ac_t""no" 1>&6
7441 with_xauth=no
7442 fi
7443  }
7444 test -z "$with_xauth" && { 
7445 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7446 echo "configure:7447: checking for XauGetAuthByAddr in -lXau" >&5
7447 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7448
7449 xe_check_libs=" -lXau "
7450 cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 /* Override any gcc2 internal prototype to avoid an error.  */
7454 /* We use char because int might match the return type of a gcc2
7455     builtin and then its argument prototype would still apply.  */
7456 char XauGetAuthByAddr();
7457
7458 int main() {
7459 XauGetAuthByAddr()
7460 ; return 0; }
7461 EOF
7462 if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7463   rm -rf conftest*
7464   eval "ac_cv_lib_$ac_lib_var=yes"
7465 else
7466   echo "configure: failed program was:" >&5
7467   cat conftest.$ac_ext >&5
7468   rm -rf conftest*
7469   eval "ac_cv_lib_$ac_lib_var=no"
7470 fi
7471 rm -f conftest*
7472 xe_check_libs=""
7473
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7475   echo "$ac_t""yes" 1>&6
7476   :
7477 else
7478   echo "$ac_t""no" 1>&6
7479 with_xauth=no
7480 fi
7481
7482  }
7483 test -z "$with_xauth" && with_xauth=yes
7484 if test "$with_xauth" = "yes"; then
7485   { test "$extra_verbose" = "yes" && cat << \EOF
7486     Defining HAVE_XAUTH
7487 EOF
7488 cat >> confdefs.h <<\EOF
7489 #define HAVE_XAUTH 1
7490 EOF
7491 }
7492
7493   
7494 T=""
7495 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
7496 libs_xauth="$T"
7497
7498 fi
7499
7500
7501
7502
7503 if test "$with_tooltalk" != "no" ; then
7504       for dir in "" "Tt/" "desktop/" ; do
7505     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7506 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7507 echo "configure:7508: checking for ${dir}tt_c.h" >&5
7508
7509 cat > conftest.$ac_ext <<EOF
7510 #line 7511 "configure"
7511 #include "confdefs.h"
7512 #include <${dir}tt_c.h>
7513 EOF
7514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7515 { (eval echo configure:7516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7517 if test -z "$ac_err"; then
7518   rm -rf conftest*
7519   eval "ac_cv_header_$ac_safe=yes"
7520 else
7521   echo "$ac_err" >&5
7522   echo "configure: failed program was:" >&5
7523   cat conftest.$ac_ext >&5
7524   rm -rf conftest*
7525   eval "ac_cv_header_$ac_safe=no"
7526 fi
7527 rm -f conftest*
7528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7529   echo "$ac_t""yes" 1>&6
7530   tt_c_h_file="${dir}tt_c.h"; break
7531 else
7532   echo "$ac_t""no" 1>&6
7533 fi
7534
7535   done
7536   if test -z "$tt_c_h_file"; then
7537     if test "$with_tooltalk" = "yes"; then
7538       (echo "$progname: Usage error:"
7539 echo " " "Unable to find required tooltalk header files."
7540 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7541     fi
7542     with_tooltalk=no
7543   fi
7544 fi
7545 if test "$with_tooltalk" != "no" ; then
7546   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7547     
7548 xe_msg_checking="for tt_message_create in -ltt"
7549 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7550 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7551 echo "configure:7552: checking "$xe_msg_checking"" >&5
7552 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7553
7554 xe_check_libs=" -ltt $extra_libs"
7555 cat > conftest.$ac_ext <<EOF
7556 #line 7557 "configure"
7557 #include "confdefs.h"
7558 /* Override any gcc2 internal prototype to avoid an error.  */
7559 /* We use char because int might match the return type of a gcc2
7560     builtin and then its argument prototype would still apply.  */
7561 char tt_message_create();
7562
7563 int main() {
7564 tt_message_create()
7565 ; return 0; }
7566 EOF
7567 if { (eval echo configure:7568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7568   rm -rf conftest*
7569   eval "ac_cv_lib_$ac_lib_var=yes"
7570 else
7571   echo "configure: failed program was:" >&5
7572   cat conftest.$ac_ext >&5
7573   rm -rf conftest*
7574   eval "ac_cv_lib_$ac_lib_var=no"
7575 fi
7576 rm -f conftest*
7577 xe_check_libs=""
7578
7579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7580   echo "$ac_t""yes" 1>&6
7581   tt_libs="-ltt $extra_libs"; break
7582 else
7583   echo "$ac_t""no" 1>&6
7584 :
7585 fi
7586
7587
7588   done
7589   if test -z "$tt_libs"; then
7590     if test "$with_tooltalk" = "yes"; then
7591       (echo "$progname: Usage error:"
7592 echo " " "Unable to find required tooltalk libraries."
7593 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7594     fi
7595     with_tooltalk=no
7596   fi
7597 fi
7598 test -z "$with_tooltalk" && with_tooltalk=yes
7599 if test "$with_tooltalk" = "yes"; then
7600   { test "$extra_verbose" = "yes" && cat << \EOF
7601     Defining TOOLTALK
7602 EOF
7603 cat >> confdefs.h <<\EOF
7604 #define TOOLTALK 1
7605 EOF
7606 }
7607
7608   { test "$extra_verbose" = "yes" && cat << EOF
7609     Defining TT_C_H_FILE = "$tt_c_h_file"
7610 EOF
7611 cat >> confdefs.h <<EOF
7612 #define TT_C_H_FILE "$tt_c_h_file"
7613 EOF
7614 }
7615
7616   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7617   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7618    echo "    xemacs will be linked with \"tooltalk.o\""
7619  fi
7620 fi
7621
7622 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7623 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7624 echo "configure:7625: checking for Dt/Dt.h" >&5
7625
7626 cat > conftest.$ac_ext <<EOF
7627 #line 7628 "configure"
7628 #include "confdefs.h"
7629 #include <Dt/Dt.h>
7630 EOF
7631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7632 { (eval echo configure:7633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7634 if test -z "$ac_err"; then
7635   rm -rf conftest*
7636   eval "ac_cv_header_$ac_safe=yes"
7637 else
7638   echo "$ac_err" >&5
7639   echo "configure: failed program was:" >&5
7640   cat conftest.$ac_ext >&5
7641   rm -rf conftest*
7642   eval "ac_cv_header_$ac_safe=no"
7643 fi
7644 rm -f conftest*
7645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7646   echo "$ac_t""yes" 1>&6
7647   :
7648 else
7649   echo "$ac_t""no" 1>&6
7650 with_cde=no
7651 fi
7652  }
7653 test -z "$with_cde" && { 
7654 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7655 echo "configure:7656: checking for DtDndDragStart in -lDtSvc" >&5
7656 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7657
7658 xe_check_libs=" -lDtSvc "
7659 cat > conftest.$ac_ext <<EOF
7660 #line 7661 "configure"
7661 #include "confdefs.h"
7662 /* Override any gcc2 internal prototype to avoid an error.  */
7663 /* We use char because int might match the return type of a gcc2
7664     builtin and then its argument prototype would still apply.  */
7665 char DtDndDragStart();
7666
7667 int main() {
7668 DtDndDragStart()
7669 ; return 0; }
7670 EOF
7671 if { (eval echo configure:7672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7672   rm -rf conftest*
7673   eval "ac_cv_lib_$ac_lib_var=yes"
7674 else
7675   echo "configure: failed program was:" >&5
7676   cat conftest.$ac_ext >&5
7677   rm -rf conftest*
7678   eval "ac_cv_lib_$ac_lib_var=no"
7679 fi
7680 rm -f conftest*
7681 xe_check_libs=""
7682
7683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7684   echo "$ac_t""yes" 1>&6
7685   :
7686 else
7687   echo "$ac_t""no" 1>&6
7688 with_cde=no
7689 fi
7690
7691  }
7692 test -z "$with_cde" && with_cde=yes
7693 if test "$with_dragndrop" = no; then
7694   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7695   with_cde=no
7696 fi
7697 if test "$with_cde" = "yes" ; then
7698   { test "$extra_verbose" = "yes" && cat << \EOF
7699     Defining HAVE_CDE
7700 EOF
7701 cat >> confdefs.h <<\EOF
7702 #define HAVE_CDE 1
7703 EOF
7704 }
7705
7706   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7707   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7708   with_tooltalk=yes # CDE requires Tooltalk
7709   need_motif=yes    # CDE requires Motif
7710 fi
7711
7712 test "$window_system" != "x11" && with_offix=no
7713 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7714   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7715   with_offix=no
7716 fi
7717 if test "$with_dragndrop" = no; then
7718   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7719   with_offix=no
7720 fi
7721 if test "$with_cde" = yes; then
7722   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7723   with_offix=no
7724 fi
7725 test -z "$with_offix" && with_offix=no
7726 if test "$with_offix" = "yes"; then
7727   { test "$extra_verbose" = "yes" && cat << \EOF
7728     Defining HAVE_OFFIX_DND
7729 EOF
7730 cat >> confdefs.h <<\EOF
7731 #define HAVE_OFFIX_DND 1
7732 EOF
7733 }
7734
7735   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7736   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7737 fi
7738 if test "$with_gtk" = "yes"; then
7739    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7740 fi
7741
7742 if test "$with_dragndrop" != "no" ; then
7743   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7744 echo "configure:7745: checking if drag and drop API is needed" >&5
7745   if test -n "$dragndrop_proto" ; then
7746     with_dragndrop=yes
7747     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7748     { test "$extra_verbose" = "yes" && cat << \EOF
7749     Defining HAVE_DRAGNDROP
7750 EOF
7751 cat >> confdefs.h <<\EOF
7752 #define HAVE_DRAGNDROP 1
7753 EOF
7754 }
7755
7756     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7757   else
7758     with_dragndrop=no
7759     echo "$ac_t""no" 1>&6
7760   fi
7761 fi
7762
7763 echo "checking for LDAP" 1>&6
7764 echo "configure:7765: checking for LDAP" >&5
7765 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7766 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7767 echo "configure:7768: checking for ldap.h" >&5
7768
7769 cat > conftest.$ac_ext <<EOF
7770 #line 7771 "configure"
7771 #include "confdefs.h"
7772 #include <ldap.h>
7773 EOF
7774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7775 { (eval echo configure:7776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7777 if test -z "$ac_err"; then
7778   rm -rf conftest*
7779   eval "ac_cv_header_$ac_safe=yes"
7780 else
7781   echo "$ac_err" >&5
7782   echo "configure: failed program was:" >&5
7783   cat conftest.$ac_ext >&5
7784   rm -rf conftest*
7785   eval "ac_cv_header_$ac_safe=no"
7786 fi
7787 rm -f conftest*
7788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7789   echo "$ac_t""yes" 1>&6
7790   :
7791 else
7792   echo "$ac_t""no" 1>&6
7793 with_ldap=no
7794 fi
7795  }
7796 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7797 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7798 echo "configure:7799: checking for lber.h" >&5
7799
7800 cat > conftest.$ac_ext <<EOF
7801 #line 7802 "configure"
7802 #include "confdefs.h"
7803 #include <lber.h>
7804 EOF
7805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7806 { (eval echo configure:7807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7808 if test -z "$ac_err"; then
7809   rm -rf conftest*
7810   eval "ac_cv_header_$ac_safe=yes"
7811 else
7812   echo "$ac_err" >&5
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -rf conftest*
7816   eval "ac_cv_header_$ac_safe=no"
7817 fi
7818 rm -f conftest*
7819 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7820   echo "$ac_t""yes" 1>&6
7821   :
7822 else
7823   echo "$ac_t""no" 1>&6
7824 with_ldap=no
7825 fi
7826  }
7827 if test "$with_ldap" != "no"; then
7828   
7829 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7830 echo "configure:7831: checking for ldap_search in -lldap" >&5
7831 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7832
7833 xe_check_libs=" -lldap "
7834 cat > conftest.$ac_ext <<EOF
7835 #line 7836 "configure"
7836 #include "confdefs.h"
7837 /* Override any gcc2 internal prototype to avoid an error.  */
7838 /* We use char because int might match the return type of a gcc2
7839     builtin and then its argument prototype would still apply.  */
7840 char ldap_search();
7841
7842 int main() {
7843 ldap_search()
7844 ; return 0; }
7845 EOF
7846 if { (eval echo configure:7847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7847   rm -rf conftest*
7848   eval "ac_cv_lib_$ac_lib_var=yes"
7849 else
7850   echo "configure: failed program was:" >&5
7851   cat conftest.$ac_ext >&5
7852   rm -rf conftest*
7853   eval "ac_cv_lib_$ac_lib_var=no"
7854 fi
7855 rm -f conftest*
7856 xe_check_libs=""
7857
7858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7859   echo "$ac_t""yes" 1>&6
7860   with_ldap_nolber=yes
7861 else
7862   echo "$ac_t""no" 1>&6
7863 with_ldap_nolber=no
7864 fi
7865
7866
7867   test "$with_ldap_nolber" = "no" && { 
7868 xe_msg_checking="for ldap_open in -lldap"
7869 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7870 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7871 echo "configure:7872: checking "$xe_msg_checking"" >&5
7872 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7873
7874 xe_check_libs=" -lldap -llber"
7875 cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 /* Override any gcc2 internal prototype to avoid an error.  */
7879 /* We use char because int might match the return type of a gcc2
7880     builtin and then its argument prototype would still apply.  */
7881 char ldap_open();
7882
7883 int main() {
7884 ldap_open()
7885 ; return 0; }
7886 EOF
7887 if { (eval echo configure:7888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7888   rm -rf conftest*
7889   eval "ac_cv_lib_$ac_lib_var=yes"
7890 else
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   eval "ac_cv_lib_$ac_lib_var=no"
7895 fi
7896 rm -f conftest*
7897 xe_check_libs=""
7898
7899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7900   echo "$ac_t""yes" 1>&6
7901   with_ldap_lber=yes
7902 else
7903   echo "$ac_t""no" 1>&6
7904 with_ldap_lber=no
7905 fi
7906
7907  }
7908   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7909 xe_msg_checking="for ldap_open in -lldap"
7910 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7911 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7912 echo "configure:7913: checking "$xe_msg_checking"" >&5
7913 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7914
7915 xe_check_libs=" -lldap -llber -lkrb"
7916 cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919 /* Override any gcc2 internal prototype to avoid an error.  */
7920 /* We use char because int might match the return type of a gcc2
7921     builtin and then its argument prototype would still apply.  */
7922 char ldap_open();
7923
7924 int main() {
7925 ldap_open()
7926 ; return 0; }
7927 EOF
7928 if { (eval echo configure:7929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7929   rm -rf conftest*
7930   eval "ac_cv_lib_$ac_lib_var=yes"
7931 else
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   eval "ac_cv_lib_$ac_lib_var=no"
7936 fi
7937 rm -f conftest*
7938 xe_check_libs=""
7939
7940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7941   echo "$ac_t""yes" 1>&6
7942   with_ldap_krb=yes
7943 else
7944   echo "$ac_t""no" 1>&6
7945 with_ldap_krb=no
7946 fi
7947
7948  }
7949   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7950 xe_msg_checking="for ldap_open in -lldap"
7951 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7952 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7953 echo "configure:7954: checking "$xe_msg_checking"" >&5
7954 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7955
7956 xe_check_libs=" -lldap -llber -lkrb -ldes"
7957 cat > conftest.$ac_ext <<EOF
7958 #line 7959 "configure"
7959 #include "confdefs.h"
7960 /* Override any gcc2 internal prototype to avoid an error.  */
7961 /* We use char because int might match the return type of a gcc2
7962     builtin and then its argument prototype would still apply.  */
7963 char ldap_open();
7964
7965 int main() {
7966 ldap_open()
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7970   rm -rf conftest*
7971   eval "ac_cv_lib_$ac_lib_var=yes"
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   eval "ac_cv_lib_$ac_lib_var=no"
7977 fi
7978 rm -f conftest*
7979 xe_check_libs=""
7980
7981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7982   echo "$ac_t""yes" 1>&6
7983   with_ldap_krbdes=yes
7984 else
7985   echo "$ac_t""no" 1>&6
7986 with_ldap_krbdes=no
7987 fi
7988
7989  }
7990   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
7991 fi
7992 if test "$with_ldap" = "yes"; then
7993   { test "$extra_verbose" = "yes" && cat << \EOF
7994     Defining HAVE_LDAP
7995 EOF
7996 cat >> confdefs.h <<\EOF
7997 #define HAVE_LDAP 1
7998 EOF
7999 }
8000
8001   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8002    echo "    xemacs will be linked with \"eldap.o\""
8003  fi
8004   if test "$with_ldap_nolber" = "yes" ; then
8005     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8006   else
8007     if test "$with_ldap_krb" = "yes" ; then
8008       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8009     fi
8010     if test "$with_ldap_krbdes" = "yes" ; then
8011       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8012       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8013     fi
8014     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8015     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8016   fi
8017   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8018 do
8019 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8020 echo "configure:8021: checking for $ac_func" >&5
8021
8022 cat > conftest.$ac_ext <<EOF
8023 #line 8024 "configure"
8024 #include "confdefs.h"
8025 /* System header to define __stub macros and hopefully few prototypes,
8026     which can conflict with char $ac_func(); below.  */
8027 #include <assert.h>
8028 /* Override any gcc2 internal prototype to avoid an error.  */
8029 /* We use char because int might match the return type of a gcc2
8030     builtin and then its argument prototype would still apply.  */
8031 char $ac_func();
8032
8033 int main() {
8034
8035 /* The GNU C library defines this for functions which it implements
8036     to always fail with ENOSYS.  Some functions are actually named
8037     something starting with __ and the normal name is an alias.  */
8038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8039 choke me
8040 #else
8041 $ac_func();
8042 #endif
8043
8044 ; return 0; }
8045 EOF
8046 if { (eval echo configure:8047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8047   rm -rf conftest*
8048   eval "ac_cv_func_$ac_func=yes"
8049 else
8050   echo "configure: failed program was:" >&5
8051   cat conftest.$ac_ext >&5
8052   rm -rf conftest*
8053   eval "ac_cv_func_$ac_func=no"
8054 fi
8055 rm -f conftest*
8056
8057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8058   echo "$ac_t""yes" 1>&6
8059     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8060   { test "$extra_verbose" = "yes" && cat << EOF
8061     Defining $ac_tr_func
8062 EOF
8063 cat >> confdefs.h <<EOF
8064 #define $ac_tr_func 1
8065 EOF
8066 }
8067  
8068 else
8069   echo "$ac_t""no" 1>&6
8070 fi
8071 done
8072
8073 fi
8074
8075 if test "$with_postgresql" != "no"; then
8076   echo "checking for PostgreSQL" 1>&6
8077 echo "configure:8078: checking for PostgreSQL" >&5
8078
8079   for header_dir in "" "pgsql/" "postgresql/"; do
8080     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8081 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8082 echo "configure:8083: checking for ${header_dir}libpq-fe.h" >&5
8083
8084 cat > conftest.$ac_ext <<EOF
8085 #line 8086 "configure"
8086 #include "confdefs.h"
8087 #include <${header_dir}libpq-fe.h>
8088 EOF
8089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8090 { (eval echo configure:8091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8092 if test -z "$ac_err"; then
8093   rm -rf conftest*
8094   eval "ac_cv_header_$ac_safe=yes"
8095 else
8096   echo "$ac_err" >&5
8097   echo "configure: failed program was:" >&5
8098   cat conftest.$ac_ext >&5
8099   rm -rf conftest*
8100   eval "ac_cv_header_$ac_safe=no"
8101 fi
8102 rm -f conftest*
8103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8104   echo "$ac_t""yes" 1>&6
8105   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8106 else
8107   echo "$ac_t""no" 1>&6
8108 fi
8109
8110   done
8111
8112   test -n "$libpq_fe_h_file" && { 
8113 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8114 echo "configure:8115: checking for PQconnectdb in -lpq" >&5
8115 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8116
8117 xe_check_libs=" -lpq "
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 /* Override any gcc2 internal prototype to avoid an error.  */
8122 /* We use char because int might match the return type of a gcc2
8123     builtin and then its argument prototype would still apply.  */
8124 char PQconnectdb();
8125
8126 int main() {
8127 PQconnectdb()
8128 ; return 0; }
8129 EOF
8130 if { (eval echo configure:8131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8131   rm -rf conftest*
8132   eval "ac_cv_lib_$ac_lib_var=yes"
8133 else
8134   echo "configure: failed program was:" >&5
8135   cat conftest.$ac_ext >&5
8136   rm -rf conftest*
8137   eval "ac_cv_lib_$ac_lib_var=no"
8138 fi
8139 rm -f conftest*
8140 xe_check_libs=""
8141
8142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8143   echo "$ac_t""yes" 1>&6
8144   have_libpq=yes
8145 else
8146   echo "$ac_t""no" 1>&6
8147 fi
8148
8149  }
8150
8151   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8152     with_postgresql=yes
8153     { test "$extra_verbose" = "yes" && cat << \EOF
8154     Defining HAVE_POSTGRESQL
8155 EOF
8156 cat >> confdefs.h <<\EOF
8157 #define HAVE_POSTGRESQL 1
8158 EOF
8159 }
8160
8161     
8162 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8163 echo "configure:8164: checking for PQconnectStart in -lpq" >&5
8164 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8165
8166 xe_check_libs=" -lpq "
8167 cat > conftest.$ac_ext <<EOF
8168 #line 8169 "configure"
8169 #include "confdefs.h"
8170 /* Override any gcc2 internal prototype to avoid an error.  */
8171 /* We use char because int might match the return type of a gcc2
8172     builtin and then its argument prototype would still apply.  */
8173 char PQconnectStart();
8174
8175 int main() {
8176 PQconnectStart()
8177 ; return 0; }
8178 EOF
8179 if { (eval echo configure:8180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8180   rm -rf conftest*
8181   eval "ac_cv_lib_$ac_lib_var=yes"
8182 else
8183   echo "configure: failed program was:" >&5
8184   cat conftest.$ac_ext >&5
8185   rm -rf conftest*
8186   eval "ac_cv_lib_$ac_lib_var=no"
8187 fi
8188 rm -f conftest*
8189 xe_check_libs=""
8190
8191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8192   echo "$ac_t""yes" 1>&6
8193   with_postgresqlv7=yes;
8194                  { test "$extra_verbose" = "yes" && cat << \EOF
8195     Defining HAVE_POSTGRESQLV7
8196 EOF
8197 cat >> confdefs.h <<\EOF
8198 #define HAVE_POSTGRESQLV7 1
8199 EOF
8200 }
8201
8202 else
8203   echo "$ac_t""no" 1>&6
8204 fi
8205
8206
8207     { test "$extra_verbose" = "yes" && cat << EOF
8208     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8209 EOF
8210 cat >> confdefs.h <<EOF
8211 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8212 EOF
8213 }
8214
8215     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8216     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8217    echo "    xemacs will be linked with \"postgresql.o\""
8218  fi
8219   elif test "$with_postgresql" = "yes"; then
8220     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8221   fi
8222 fi
8223
8224
8225 if test "$window_system" != "none"; then
8226   echo "checking for graphics libraries" 1>&6
8227 echo "configure:8228: checking for graphics libraries" >&5
8228
8229       libpath_xpm=
8230   incpath_xpm=
8231   case "$opsys" in 
8232     cygwin*)
8233       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8234       cygwin_top=`eval "dirname ${cygwin_top}"`;
8235       cygwin_top="${cygwin_top}/..";
8236       case "$window_system" in
8237                 x11)  ;;
8238                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8239              incpath_xpm="-I${cygwin_top}/include/noX"
8240               ;;
8241                 gtk)  ;;
8242                 none) ;;
8243                 *)    ;;
8244       esac
8245       ;;
8246         *) ;;
8247   esac
8248     xpm_problem=""
8249   if test -z "$with_xpm"; then
8250     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8251     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8252     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8253 echo "configure:8254: checking for Xpm - no older than 3.4f" >&5
8254     xe_check_libs=-lXpm
8255     cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 #define XPM_NUMBERS
8259 #include <X11/xpm.h>
8260     int main(int c, char **v) {
8261     return c == 1 ? 0 :
8262       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8263       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8264 EOF
8265 if { (eval echo configure:8266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8266 then
8267   ./conftest dummy_arg; xpm_status=$?;
8268       if test "$xpm_status" = "0"; then
8269         with_xpm=yes;
8270       else
8271         with_xpm=no;
8272         if test "$xpm_status" = "1"; then
8273           xpm_problem="Xpm library version and header file version don't match!"
8274         elif test "$xpm_status" = "2"; then
8275           xpm_problem="Xpm library version is too old!"
8276         else
8277           xpm_problem="Internal xpm detection logic error!"
8278         fi
8279         echo "
8280 *** WARNING *** $xpm_problem
8281   I'm not touching that with a 10-foot pole!
8282   If you really want to use the installed version of Xpm, rerun
8283   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8284     fi
8285 else
8286   conftest_rc="$?"
8287   echo "configure: failed program was:" >&5
8288   cat conftest.$ac_ext >&5
8289   rm -fr conftest*
8290   with_xpm=no
8291 fi
8292 rm -fr conftest*
8293     xe_check_libs=
8294     echo "$ac_t""$with_xpm" 1>&6
8295   fi
8296   if test "$with_xpm" = "yes"; then
8297                 { test "$extra_verbose" = "yes" && cat << \EOF
8298     Defining HAVE_XPM
8299 EOF
8300 cat >> confdefs.h <<\EOF
8301 #define HAVE_XPM 1
8302 EOF
8303 }
8304
8305     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8306     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8307     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8308     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8309 echo "configure:8310: checking for \"FOR_MSW\" xpm" >&5
8310     xe_check_libs=-lXpm
8311     cat > conftest.$ac_ext <<EOF
8312 #line 8313 "configure"
8313 #include "confdefs.h"
8314
8315 int main() {
8316 XpmCreatePixmapFromData()
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8320   rm -rf conftest*
8321   xpm_for_msw=no
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   xpm_for_msw=yes
8327 fi
8328 rm -f conftest*
8329     xe_check_libs=
8330     echo "$ac_t""$xpm_for_msw" 1>&6
8331     if test "$xpm_for_msw" = "yes"; then
8332       { test "$extra_verbose" = "yes" && cat << \EOF
8333     Defining FOR_MSW
8334 EOF
8335 cat >> confdefs.h <<\EOF
8336 #define FOR_MSW 1
8337 EOF
8338 }
8339
8340     fi
8341   fi
8342
8343     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8344 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8345 echo "configure:8346: checking for compface.h" >&5
8346
8347 cat > conftest.$ac_ext <<EOF
8348 #line 8349 "configure"
8349 #include "confdefs.h"
8350 #include <compface.h>
8351 EOF
8352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8353 { (eval echo configure:8354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8355 if test -z "$ac_err"; then
8356   rm -rf conftest*
8357   eval "ac_cv_header_$ac_safe=yes"
8358 else
8359   echo "$ac_err" >&5
8360   echo "configure: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   rm -rf conftest*
8363   eval "ac_cv_header_$ac_safe=no"
8364 fi
8365 rm -f conftest*
8366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8367   echo "$ac_t""yes" 1>&6
8368   :
8369 else
8370   echo "$ac_t""no" 1>&6
8371 with_xface=no
8372 fi
8373  }
8374   test -z "$with_xface" && { 
8375 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8376 echo "configure:8377: checking for UnGenFace in -lcompface" >&5
8377 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8378
8379 xe_check_libs=" -lcompface "
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* Override any gcc2 internal prototype to avoid an error.  */
8384 /* We use char because int might match the return type of a gcc2
8385     builtin and then its argument prototype would still apply.  */
8386 char UnGenFace();
8387
8388 int main() {
8389 UnGenFace()
8390 ; return 0; }
8391 EOF
8392 if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8393   rm -rf conftest*
8394   eval "ac_cv_lib_$ac_lib_var=yes"
8395 else
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -rf conftest*
8399   eval "ac_cv_lib_$ac_lib_var=no"
8400 fi
8401 rm -f conftest*
8402 xe_check_libs=""
8403
8404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8405   echo "$ac_t""yes" 1>&6
8406   : 
8407 else
8408   echo "$ac_t""no" 1>&6
8409 with_xface=no
8410 fi
8411
8412  }
8413   test -z "$with_xface" && with_xface=yes
8414   if test "$with_xface" = "yes"; then
8415     { test "$extra_verbose" = "yes" && cat << \EOF
8416     Defining HAVE_XFACE
8417 EOF
8418 cat >> confdefs.h <<\EOF
8419 #define HAVE_XFACE 1
8420 EOF
8421 }
8422
8423     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8424   fi
8425
8426         if test "$with_gif" != "no"; then
8427     with_gif="yes"
8428     { test "$extra_verbose" = "yes" && cat << \EOF
8429     Defining HAVE_GIF
8430 EOF
8431 cat >> confdefs.h <<\EOF
8432 #define HAVE_GIF 1
8433 EOF
8434 }
8435
8436     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8437    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8438  fi
8439   fi
8440
8441       if test "$with_png $with_tiff" != "no no"; then
8442     
8443 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8444 echo "configure:8445: checking for inflate in -lc" >&5
8445 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8446
8447 xe_check_libs=" -lc "
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 /* Override any gcc2 internal prototype to avoid an error.  */
8452 /* We use char because int might match the return type of a gcc2
8453     builtin and then its argument prototype would still apply.  */
8454 char inflate();
8455
8456 int main() {
8457 inflate()
8458 ; return 0; }
8459 EOF
8460 if { (eval echo configure:8461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8461   rm -rf conftest*
8462   eval "ac_cv_lib_$ac_lib_var=yes"
8463 else
8464   echo "configure: failed program was:" >&5
8465   cat conftest.$ac_ext >&5
8466   rm -rf conftest*
8467   eval "ac_cv_lib_$ac_lib_var=no"
8468 fi
8469 rm -f conftest*
8470 xe_check_libs=""
8471
8472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8473   echo "$ac_t""yes" 1>&6
8474   :
8475 else
8476   echo "$ac_t""no" 1>&6
8477
8478 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8479 echo "configure:8480: checking for inflate in -lz" >&5
8480 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8481
8482 xe_check_libs=" -lz "
8483 cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 /* Override any gcc2 internal prototype to avoid an error.  */
8487 /* We use char because int might match the return type of a gcc2
8488     builtin and then its argument prototype would still apply.  */
8489 char inflate();
8490
8491 int main() {
8492 inflate()
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8496   rm -rf conftest*
8497   eval "ac_cv_lib_$ac_lib_var=yes"
8498 else
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   eval "ac_cv_lib_$ac_lib_var=no"
8503 fi
8504 rm -f conftest*
8505 xe_check_libs=""
8506
8507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8508   echo "$ac_t""yes" 1>&6
8509   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8510 else
8511   echo "$ac_t""no" 1>&6
8512
8513 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8514 echo "configure:8515: checking for inflate in -lgz" >&5
8515 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8516
8517 xe_check_libs=" -lgz "
8518 cat > conftest.$ac_ext <<EOF
8519 #line 8520 "configure"
8520 #include "confdefs.h"
8521 /* Override any gcc2 internal prototype to avoid an error.  */
8522 /* We use char because int might match the return type of a gcc2
8523     builtin and then its argument prototype would still apply.  */
8524 char inflate();
8525
8526 int main() {
8527 inflate()
8528 ; return 0; }
8529 EOF
8530 if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8531   rm -rf conftest*
8532   eval "ac_cv_lib_$ac_lib_var=yes"
8533 else
8534   echo "configure: failed program was:" >&5
8535   cat conftest.$ac_ext >&5
8536   rm -rf conftest*
8537   eval "ac_cv_lib_$ac_lib_var=no"
8538 fi
8539 rm -f conftest*
8540 xe_check_libs=""
8541
8542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8543   echo "$ac_t""yes" 1>&6
8544   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8545 else
8546   echo "$ac_t""no" 1>&6
8547 fi
8548
8549
8550 fi
8551
8552
8553 fi
8554
8555
8556   fi
8557
8558     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8559 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8560 echo "configure:8561: checking for jpeglib.h" >&5
8561
8562 cat > conftest.$ac_ext <<EOF
8563 #line 8564 "configure"
8564 #include "confdefs.h"
8565 #include <jpeglib.h>
8566 EOF
8567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8568 { (eval echo configure:8569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8570 if test -z "$ac_err"; then
8571   rm -rf conftest*
8572   eval "ac_cv_header_$ac_safe=yes"
8573 else
8574   echo "$ac_err" >&5
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   eval "ac_cv_header_$ac_safe=no"
8579 fi
8580 rm -f conftest*
8581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8582   echo "$ac_t""yes" 1>&6
8583   :
8584 else
8585   echo "$ac_t""no" 1>&6
8586 with_jpeg=no
8587 fi
8588  }
8589   test -z "$with_jpeg" && { 
8590 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8591 echo "configure:8592: checking for jpeg_destroy_decompress in -ljpeg" >&5
8592 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8593
8594 xe_check_libs=" -ljpeg "
8595 cat > conftest.$ac_ext <<EOF
8596 #line 8597 "configure"
8597 #include "confdefs.h"
8598 /* Override any gcc2 internal prototype to avoid an error.  */
8599 /* We use char because int might match the return type of a gcc2
8600     builtin and then its argument prototype would still apply.  */
8601 char jpeg_destroy_decompress();
8602
8603 int main() {
8604 jpeg_destroy_decompress()
8605 ; return 0; }
8606 EOF
8607 if { (eval echo configure:8608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8608   rm -rf conftest*
8609   eval "ac_cv_lib_$ac_lib_var=yes"
8610 else
8611   echo "configure: failed program was:" >&5
8612   cat conftest.$ac_ext >&5
8613   rm -rf conftest*
8614   eval "ac_cv_lib_$ac_lib_var=no"
8615 fi
8616 rm -f conftest*
8617 xe_check_libs=""
8618
8619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8620   echo "$ac_t""yes" 1>&6
8621   :
8622 else
8623   echo "$ac_t""no" 1>&6
8624 with_jpeg=no
8625 fi
8626
8627  }
8628   test -z "$with_jpeg" && with_jpeg=yes
8629   if test "$with_jpeg" = "yes"; then
8630     { test "$extra_verbose" = "yes" && cat << \EOF
8631     Defining HAVE_JPEG
8632 EOF
8633 cat >> confdefs.h <<\EOF
8634 #define HAVE_JPEG 1
8635 EOF
8636 }
8637
8638     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8639   fi
8640
8641     png_problem=""
8642   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8643 echo "configure:8644: checking for pow" >&5
8644
8645 cat > conftest.$ac_ext <<EOF
8646 #line 8647 "configure"
8647 #include "confdefs.h"
8648 /* System header to define __stub macros and hopefully few prototypes,
8649     which can conflict with char pow(); below.  */
8650 #include <assert.h>
8651 /* Override any gcc2 internal prototype to avoid an error.  */
8652 /* We use char because int might match the return type of a gcc2
8653     builtin and then its argument prototype would still apply.  */
8654 char pow();
8655
8656 int main() {
8657
8658 /* The GNU C library defines this for functions which it implements
8659     to always fail with ENOSYS.  Some functions are actually named
8660     something starting with __ and the normal name is an alias.  */
8661 #if defined (__stub_pow) || defined (__stub___pow)
8662 choke me
8663 #else
8664 pow();
8665 #endif
8666
8667 ; return 0; }
8668 EOF
8669 if { (eval echo configure:8670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8670   rm -rf conftest*
8671   eval "ac_cv_func_pow=yes"
8672 else
8673   echo "configure: failed program was:" >&5
8674   cat conftest.$ac_ext >&5
8675   rm -rf conftest*
8676   eval "ac_cv_func_pow=no"
8677 fi
8678 rm -f conftest*
8679
8680 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8681   echo "$ac_t""yes" 1>&6
8682   :
8683 else
8684   echo "$ac_t""no" 1>&6
8685 with_png=no
8686 fi
8687  }
8688   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8689 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8690 echo "configure:8691: checking for png.h" >&5
8691
8692 cat > conftest.$ac_ext <<EOF
8693 #line 8694 "configure"
8694 #include "confdefs.h"
8695 #include <png.h>
8696 EOF
8697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8698 { (eval echo configure:8699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8700 if test -z "$ac_err"; then
8701   rm -rf conftest*
8702   eval "ac_cv_header_$ac_safe=yes"
8703 else
8704   echo "$ac_err" >&5
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   eval "ac_cv_header_$ac_safe=no"
8709 fi
8710 rm -f conftest*
8711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8712   echo "$ac_t""yes" 1>&6
8713   :
8714 else
8715   echo "$ac_t""no" 1>&6
8716 with_png=no
8717 fi
8718  }
8719   test -z "$with_png" && { 
8720 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8721 echo "configure:8722: checking for png_read_image in -lpng" >&5
8722 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8723
8724 xe_check_libs=" -lpng "
8725 cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 /* Override any gcc2 internal prototype to avoid an error.  */
8729 /* We use char because int might match the return type of a gcc2
8730     builtin and then its argument prototype would still apply.  */
8731 char png_read_image();
8732
8733 int main() {
8734 png_read_image()
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8738   rm -rf conftest*
8739   eval "ac_cv_lib_$ac_lib_var=yes"
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=no"
8745 fi
8746 rm -f conftest*
8747 xe_check_libs=""
8748
8749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8750   echo "$ac_t""yes" 1>&6
8751   :
8752 else
8753   echo "$ac_t""no" 1>&6
8754 with_png=no
8755 fi
8756
8757  }
8758   if test -z "$with_png"; then
8759     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8760 echo "configure:8761: checking for workable png version information" >&5
8761     xe_check_libs="-lpng -lz"
8762     cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 #include <png.h>
8766     int main(int c, char **v) {
8767     if (c == 1) return 0;
8768     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8769     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8770 EOF
8771 if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8772 then
8773   ./conftest dummy_arg; png_status=$?;
8774       if test "$png_status" = "0"; then
8775         with_png=yes;
8776       else
8777         with_png=no;
8778         if test "$png_status" = "1"; then
8779           png_problem="PNG library version and header file don't match!"
8780         elif test "$png_status" = "2"; then
8781           png_problem="PNG library version too old (pre 1.0.2)!"
8782         fi
8783         echo "
8784 *** WARNING *** $png_problem
8785   I'm not touching that with a 10-foot pole!
8786   If you really want to use the installed version of libPNG, rerun
8787   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8788     fi
8789 else
8790   conftest_rc="$?"
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -fr conftest*
8794   with_png=no
8795 fi
8796 rm -fr conftest*
8797     xe_check_libs=
8798     echo "$ac_t""$with_png" 1>&6
8799   fi
8800   if test "$with_png" = "yes"; then
8801     { test "$extra_verbose" = "yes" && cat << \EOF
8802     Defining HAVE_PNG
8803 EOF
8804 cat >> confdefs.h <<\EOF
8805 #define HAVE_PNG 1
8806 EOF
8807 }
8808
8809     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8810   fi
8811
8812     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8813 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8814 echo "configure:8815: checking for tiffio.h" >&5
8815
8816 cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 #include <tiffio.h>
8820 EOF
8821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8822 { (eval echo configure:8823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8824 if test -z "$ac_err"; then
8825   rm -rf conftest*
8826   eval "ac_cv_header_$ac_safe=yes"
8827 else
8828   echo "$ac_err" >&5
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -rf conftest*
8832   eval "ac_cv_header_$ac_safe=no"
8833 fi
8834 rm -f conftest*
8835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8836   echo "$ac_t""yes" 1>&6
8837   :
8838 else
8839   echo "$ac_t""no" 1>&6
8840 with_tiff=no
8841 fi
8842  }
8843   test -z "$with_tiff" && { 
8844 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8845 echo "configure:8846: checking for TIFFClientOpen in -ltiff" >&5
8846 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8847
8848 xe_check_libs=" -ltiff "
8849 cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 /* Override any gcc2 internal prototype to avoid an error.  */
8853 /* We use char because int might match the return type of a gcc2
8854     builtin and then its argument prototype would still apply.  */
8855 char TIFFClientOpen();
8856
8857 int main() {
8858 TIFFClientOpen()
8859 ; return 0; }
8860 EOF
8861 if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8862   rm -rf conftest*
8863   eval "ac_cv_lib_$ac_lib_var=yes"
8864 else
8865   echo "configure: failed program was:" >&5
8866   cat conftest.$ac_ext >&5
8867   rm -rf conftest*
8868   eval "ac_cv_lib_$ac_lib_var=no"
8869 fi
8870 rm -f conftest*
8871 xe_check_libs=""
8872
8873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8874   echo "$ac_t""yes" 1>&6
8875   :
8876 else
8877   echo "$ac_t""no" 1>&6
8878 with_tiff=no
8879 fi
8880
8881  }
8882   test -z "$with_tiff" && with_tiff=yes
8883   if test "$with_tiff" = "yes"; then
8884     { test "$extra_verbose" = "yes" && cat << \EOF
8885     Defining HAVE_TIFF
8886 EOF
8887 cat >> confdefs.h <<\EOF
8888 #define HAVE_TIFF 1
8889 EOF
8890 }
8891
8892     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8893   fi
8894 fi
8895
8896
8897 if test "$with_gtk" = "yes"; then
8898     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8899 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8900 echo "configure:8901: checking for compface.h" >&5
8901
8902 cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 #include <compface.h>
8906 EOF
8907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8908 { (eval echo configure:8909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8910 if test -z "$ac_err"; then
8911   rm -rf conftest*
8912   eval "ac_cv_header_$ac_safe=yes"
8913 else
8914   echo "$ac_err" >&5
8915   echo "configure: failed program was:" >&5
8916   cat conftest.$ac_ext >&5
8917   rm -rf conftest*
8918   eval "ac_cv_header_$ac_safe=no"
8919 fi
8920 rm -f conftest*
8921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8922   echo "$ac_t""yes" 1>&6
8923   :
8924 else
8925   echo "$ac_t""no" 1>&6
8926 with_xface=no
8927 fi
8928  }
8929   test -z "$with_xface" && { 
8930 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8931 echo "configure:8932: checking for UnGenFace in -lcompface" >&5
8932 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8933
8934 xe_check_libs=" -lcompface "
8935 cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 /* Override any gcc2 internal prototype to avoid an error.  */
8939 /* We use char because int might match the return type of a gcc2
8940     builtin and then its argument prototype would still apply.  */
8941 char UnGenFace();
8942
8943 int main() {
8944 UnGenFace()
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   eval "ac_cv_lib_$ac_lib_var=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_lib_$ac_lib_var=no"
8955 fi
8956 rm -f conftest*
8957 xe_check_libs=""
8958
8959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8960   echo "$ac_t""yes" 1>&6
8961   : 
8962 else
8963   echo "$ac_t""no" 1>&6
8964 with_xface=no
8965 fi
8966
8967  }
8968   test -z "$with_xface" && with_xface=yes
8969   if test "$with_xface" = "yes"; then
8970     { test "$extra_verbose" = "yes" && cat << \EOF
8971     Defining HAVE_XFACE
8972 EOF
8973 cat >> confdefs.h <<\EOF
8974 #define HAVE_XFACE 1
8975 EOF
8976 }
8977
8978     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8979   fi
8980 fi
8981
8982
8983
8984 if test "$with_x11" = "yes"; then
8985   echo "checking for X11 graphics libraries" 1>&6
8986 echo "configure:8987: checking for X11 graphics libraries" >&5
8987 fi
8988
8989 if test "$with_x11" = "yes"; then
8990   echo "checking for the Athena widgets" 1>&6
8991 echo "configure:8992: checking for the Athena widgets" >&5
8992
8993     case "$with_athena" in
8994         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8995     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8996     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8997     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8998     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8999     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9000   esac
9001
9002   athena_3d_function=Xaw3dComputeBottomShadowRGB
9003
9004     if test "$athena_3d" = "no"; then
9005     
9006 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9007 echo "configure:9008: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9008 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9009
9010 xe_check_libs=" -l$athena_variant "
9011 cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 /* Override any gcc2 internal prototype to avoid an error.  */
9015 /* We use char because int might match the return type of a gcc2
9016     builtin and then its argument prototype would still apply.  */
9017 char XawScrollbarSetThumb();
9018
9019 int main() {
9020 XawScrollbarSetThumb()
9021 ; return 0; }
9022 EOF
9023 if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9024   rm -rf conftest*
9025   eval "ac_cv_lib_$ac_lib_var=yes"
9026 else
9027   echo "configure: failed program was:" >&5
9028   cat conftest.$ac_ext >&5
9029   rm -rf conftest*
9030   eval "ac_cv_lib_$ac_lib_var=no"
9031 fi
9032 rm -f conftest*
9033 xe_check_libs=""
9034
9035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9036   echo "$ac_t""yes" 1>&6
9037           
9038 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9039 echo "configure:9040: checking for $athena_3d_function in -l$athena_variant" >&5
9040 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9041
9042 xe_check_libs=" -l$athena_variant "
9043 cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046 /* Override any gcc2 internal prototype to avoid an error.  */
9047 /* We use char because int might match the return type of a gcc2
9048     builtin and then its argument prototype would still apply.  */
9049 char $athena_3d_function();
9050
9051 int main() {
9052 $athena_3d_function()
9053 ; return 0; }
9054 EOF
9055 if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9056   rm -rf conftest*
9057   eval "ac_cv_lib_$ac_lib_var=yes"
9058 else
9059   echo "configure: failed program was:" >&5
9060   cat conftest.$ac_ext >&5
9061   rm -rf conftest*
9062   eval "ac_cv_lib_$ac_lib_var=no"
9063 fi
9064 rm -f conftest*
9065 xe_check_libs=""
9066
9067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9068   echo "$ac_t""yes" 1>&6
9069   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9070 else
9071   echo "$ac_t""no" 1>&6
9072 athena_lib=$athena_variant
9073 fi
9074
9075
9076       
9077 else
9078   echo "$ac_t""no" 1>&6
9079 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9080 fi
9081
9082
9083   else
9084         
9085 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9086 echo "configure:9087: checking for $athena_3d_function in -l$athena_variant" >&5
9087 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9088
9089 xe_check_libs=" -l$athena_variant "
9090 cat > conftest.$ac_ext <<EOF
9091 #line 9092 "configure"
9092 #include "confdefs.h"
9093 /* Override any gcc2 internal prototype to avoid an error.  */
9094 /* We use char because int might match the return type of a gcc2
9095     builtin and then its argument prototype would still apply.  */
9096 char $athena_3d_function();
9097
9098 int main() {
9099 $athena_3d_function()
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=yes"
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   eval "ac_cv_lib_$ac_lib_var=no"
9110 fi
9111 rm -f conftest*
9112 xe_check_libs=""
9113
9114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9115   echo "$ac_t""yes" 1>&6
9116   athena_lib=$athena_variant
9117 else
9118   echo "$ac_t""no" 1>&6
9119 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9120 echo "configure:9121: checking for $athena_3d_function in -lXaw" >&5
9121 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9122
9123 xe_check_libs=" -lXaw "
9124 cat > conftest.$ac_ext <<EOF
9125 #line 9126 "configure"
9126 #include "confdefs.h"
9127 /* Override any gcc2 internal prototype to avoid an error.  */
9128 /* We use char because int might match the return type of a gcc2
9129     builtin and then its argument prototype would still apply.  */
9130 char $athena_3d_function();
9131
9132 int main() {
9133 $athena_3d_function()
9134 ; return 0; }
9135 EOF
9136 if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9137   rm -rf conftest*
9138   eval "ac_cv_lib_$ac_lib_var=yes"
9139 else
9140   echo "configure: failed program was:" >&5
9141   cat conftest.$ac_ext >&5
9142   rm -rf conftest*
9143   eval "ac_cv_lib_$ac_lib_var=no"
9144 fi
9145 rm -f conftest*
9146 xe_check_libs=""
9147
9148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9149   echo "$ac_t""yes" 1>&6
9150   athena_lib=Xaw;
9151           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9152         
9153 else
9154   echo "$ac_t""no" 1>&6
9155 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9156 fi
9157
9158
9159 fi
9160
9161
9162   fi
9163
9164     if test "$athena_3d" = "no"; then
9165     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9166 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9167 echo "configure:9168: checking for X11/Xaw/ThreeD.h" >&5
9168
9169 cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172 #include <X11/Xaw/ThreeD.h>
9173 EOF
9174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9175 { (eval echo configure:9176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9177 if test -z "$ac_err"; then
9178   rm -rf conftest*
9179   eval "ac_cv_header_$ac_safe=yes"
9180 else
9181   echo "$ac_err" >&5
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   eval "ac_cv_header_$ac_safe=no"
9186 fi
9187 rm -f conftest*
9188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9189   echo "$ac_t""yes" 1>&6
9190   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9191 else
9192   echo "$ac_t""no" 1>&6
9193 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9194 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9195 echo "configure:9196: checking for X11/Xaw/XawInit.h" >&5
9196
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 #include <X11/Xaw/XawInit.h>
9201 EOF
9202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9203 { (eval echo configure:9204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9205 if test -z "$ac_err"; then
9206   rm -rf conftest*
9207   eval "ac_cv_header_$ac_safe=yes"
9208 else
9209   echo "$ac_err" >&5
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_header_$ac_safe=no"
9214 fi
9215 rm -f conftest*
9216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218   athena_h_path=X11/Xaw
9219 else
9220   echo "$ac_t""no" 1>&6
9221 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9222 fi
9223
9224 fi
9225
9226   else
9227             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9228 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9229 echo "configure:9230: checking for X11/$athena_variant/XawInit.h" >&5
9230
9231 cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 #include <X11/$athena_variant/XawInit.h>
9235 EOF
9236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9237 { (eval echo configure:9238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9239 if test -z "$ac_err"; then
9240   rm -rf conftest*
9241   eval "ac_cv_header_$ac_safe=yes"
9242 else
9243   echo "$ac_err" >&5
9244   echo "configure: failed program was:" >&5
9245   cat conftest.$ac_ext >&5
9246   rm -rf conftest*
9247   eval "ac_cv_header_$ac_safe=no"
9248 fi
9249 rm -f conftest*
9250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9251   echo "$ac_t""yes" 1>&6
9252   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9253 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9254 echo "configure:9255: checking for X11/$athena_variant/ThreeD.h" >&5
9255
9256 cat > conftest.$ac_ext <<EOF
9257 #line 9258 "configure"
9258 #include "confdefs.h"
9259 #include <X11/$athena_variant/ThreeD.h>
9260 EOF
9261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9262 { (eval echo configure:9263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9264 if test -z "$ac_err"; then
9265   rm -rf conftest*
9266   eval "ac_cv_header_$ac_safe=yes"
9267 else
9268   echo "$ac_err" >&5
9269   echo "configure: failed program was:" >&5
9270   cat conftest.$ac_ext >&5
9271   rm -rf conftest*
9272   eval "ac_cv_header_$ac_safe=no"
9273 fi
9274 rm -f conftest*
9275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9276   echo "$ac_t""yes" 1>&6
9277   athena_h_path=X11/$athena_variant
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281
9282 else
9283   echo "$ac_t""no" 1>&6
9284 fi
9285
9286
9287         if test -z "$athena_h_path"; then
9288       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9289 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9290 echo "configure:9291: checking for $athena_variant/XawInit.h" >&5
9291
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 #include <$athena_variant/XawInit.h>
9296 EOF
9297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9298 { (eval echo configure:9299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9300 if test -z "$ac_err"; then
9301   rm -rf conftest*
9302   eval "ac_cv_header_$ac_safe=yes"
9303 else
9304   echo "$ac_err" >&5
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_header_$ac_safe=no"
9309 fi
9310 rm -f conftest*
9311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9314 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9315 echo "configure:9316: checking for $athena_variant/ThreeD.h" >&5
9316
9317 cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 #include <$athena_variant/ThreeD.h>
9321 EOF
9322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9323 { (eval echo configure:9324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9325 if test -z "$ac_err"; then
9326   rm -rf conftest*
9327   eval "ac_cv_header_$ac_safe=yes"
9328 else
9329   echo "$ac_err" >&5
9330   echo "configure: failed program was:" >&5
9331   cat conftest.$ac_ext >&5
9332   rm -rf conftest*
9333   eval "ac_cv_header_$ac_safe=no"
9334 fi
9335 rm -f conftest*
9336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9337   echo "$ac_t""yes" 1>&6
9338   athena_h_path=$athena_variant
9339 else
9340   echo "$ac_t""no" 1>&6
9341 fi
9342
9343 else
9344   echo "$ac_t""no" 1>&6
9345 fi
9346
9347     fi
9348
9349         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9350       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9351 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9352 echo "configure:9353: checking for X11/Xaw3d/XawInit.h" >&5
9353
9354 cat > conftest.$ac_ext <<EOF
9355 #line 9356 "configure"
9356 #include "confdefs.h"
9357 #include <X11/Xaw3d/XawInit.h>
9358 EOF
9359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9360 { (eval echo configure:9361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9362 if test -z "$ac_err"; then
9363   rm -rf conftest*
9364   eval "ac_cv_header_$ac_safe=yes"
9365 else
9366   echo "$ac_err" >&5
9367   echo "configure: failed program was:" >&5
9368   cat conftest.$ac_ext >&5
9369   rm -rf conftest*
9370   eval "ac_cv_header_$ac_safe=no"
9371 fi
9372 rm -f conftest*
9373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9374   echo "$ac_t""yes" 1>&6
9375   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9376 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9377 echo "configure:9378: checking for X11/Xaw3d/ThreeD.h" >&5
9378
9379 cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382 #include <X11/Xaw3d/ThreeD.h>
9383 EOF
9384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9385 { (eval echo configure:9386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9387 if test -z "$ac_err"; then
9388   rm -rf conftest*
9389   eval "ac_cv_header_$ac_safe=yes"
9390 else
9391   echo "$ac_err" >&5
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -rf conftest*
9395   eval "ac_cv_header_$ac_safe=no"
9396 fi
9397 rm -f conftest*
9398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9399   echo "$ac_t""yes" 1>&6
9400   
9401             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9402             athena_h_path=X11/Xaw3d
9403           
9404 else
9405   echo "$ac_t""no" 1>&6
9406 fi
9407
9408 else
9409   echo "$ac_t""no" 1>&6
9410 fi
9411
9412     fi
9413
9414         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9415       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9416 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9417 echo "configure:9418: checking for Xaw3d/XawInit.h" >&5
9418
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 #include <Xaw3d/XawInit.h>
9423 EOF
9424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9425 { (eval echo configure:9426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9427 if test -z "$ac_err"; then
9428   rm -rf conftest*
9429   eval "ac_cv_header_$ac_safe=yes"
9430 else
9431   echo "$ac_err" >&5
9432   echo "configure: failed program was:" >&5
9433   cat conftest.$ac_ext >&5
9434   rm -rf conftest*
9435   eval "ac_cv_header_$ac_safe=no"
9436 fi
9437 rm -f conftest*
9438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9439   echo "$ac_t""yes" 1>&6
9440   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9441 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9442 echo "configure:9443: checking for Xaw3d/ThreeD.h" >&5
9443
9444 cat > conftest.$ac_ext <<EOF
9445 #line 9446 "configure"
9446 #include "confdefs.h"
9447 #include <Xaw3d/ThreeD.h>
9448 EOF
9449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9450 { (eval echo configure:9451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9452 if test -z "$ac_err"; then
9453   rm -rf conftest*
9454   eval "ac_cv_header_$ac_safe=yes"
9455 else
9456   echo "$ac_err" >&5
9457   echo "configure: failed program was:" >&5
9458   cat conftest.$ac_ext >&5
9459   rm -rf conftest*
9460   eval "ac_cv_header_$ac_safe=no"
9461 fi
9462 rm -f conftest*
9463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9464   echo "$ac_t""yes" 1>&6
9465   
9466             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9467             athena_h_path=Xaw3d
9468           
9469 else
9470   echo "$ac_t""no" 1>&6
9471 fi
9472
9473 else
9474   echo "$ac_t""no" 1>&6
9475 fi
9476
9477     fi
9478
9479             if test -z "$athena_h_path"; then
9480       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9481 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9482 echo "configure:9483: checking for X11/Xaw/ThreeD.h" >&5
9483
9484 cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 #include <X11/Xaw/ThreeD.h>
9488 EOF
9489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9490 { (eval echo configure:9491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9492 if test -z "$ac_err"; then
9493   rm -rf conftest*
9494   eval "ac_cv_header_$ac_safe=yes"
9495 else
9496   echo "$ac_err" >&5
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   eval "ac_cv_header_$ac_safe=no"
9501 fi
9502 rm -f conftest*
9503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9504   echo "$ac_t""yes" 1>&6
9505   
9506           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9507           athena_h_path=X11/Xaw
9508         
9509 else
9510   echo "$ac_t""no" 1>&6
9511 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9512 fi
9513
9514     fi
9515   fi
9516
9517     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9518     have_xaw=yes
9519   else
9520     have_xaw=no
9521   fi
9522
9523 else
9524   have_xaw=no
9525 fi 
9526 if test "$with_x11" = "yes"; then
9527     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9528 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9529 echo "configure:9530: checking for Xm/Xm.h" >&5
9530
9531 cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 #include <Xm/Xm.h>
9535 EOF
9536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9537 { (eval echo configure:9538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9539 if test -z "$ac_err"; then
9540   rm -rf conftest*
9541   eval "ac_cv_header_$ac_safe=yes"
9542 else
9543   echo "$ac_err" >&5
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -rf conftest*
9547   eval "ac_cv_header_$ac_safe=no"
9548 fi
9549 rm -f conftest*
9550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9551   echo "$ac_t""yes" 1>&6
9552   
9553 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9554 echo "configure:9555: checking for XmStringFree in -lXm" >&5
9555 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9556
9557 xe_check_libs=" -lXm "
9558 cat > conftest.$ac_ext <<EOF
9559 #line 9560 "configure"
9560 #include "confdefs.h"
9561 /* Override any gcc2 internal prototype to avoid an error.  */
9562 /* We use char because int might match the return type of a gcc2
9563     builtin and then its argument prototype would still apply.  */
9564 char XmStringFree();
9565
9566 int main() {
9567 XmStringFree()
9568 ; return 0; }
9569 EOF
9570 if { (eval echo configure:9571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9571   rm -rf conftest*
9572   eval "ac_cv_lib_$ac_lib_var=yes"
9573 else
9574   echo "configure: failed program was:" >&5
9575   cat conftest.$ac_ext >&5
9576   rm -rf conftest*
9577   eval "ac_cv_lib_$ac_lib_var=no"
9578 fi
9579 rm -f conftest*
9580 xe_check_libs=""
9581
9582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9583   echo "$ac_t""yes" 1>&6
9584   have_motif=yes
9585 else
9586   echo "$ac_t""no" 1>&6
9587 have_motif=no
9588 fi
9589
9590
9591 else
9592   echo "$ac_t""no" 1>&6
9593 have_motif=no
9594 fi
9595
9596
9597   if test "$have_motif" = "yes"; then
9598         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9599 echo "configure:9600: checking for Lesstif" >&5
9600     cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 #include <Xm/Xm.h>
9604 #ifdef LESSTIF_VERSION
9605 yes
9606 #endif
9607
9608 EOF
9609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9610   egrep "yes" >/dev/null 2>&1; then
9611   rm -rf conftest*
9612   have_lesstif=yes
9613 else
9614   rm -rf conftest*
9615   have_lesstif=no
9616 fi
9617 rm -f conftest*
9618
9619   echo "$ac_t""$have_lesstif" 1>&6
9620   fi
9621
9622 fi 
9623
9624 case "$with_menubars" in "" | "yes" | "athena" )
9625   with_menubars="lucid" ;;
9626 esac
9627 case "$with_dialogs" in "" | "yes" | "lucid" )
9628   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9629   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9630   else with_dialogs=no
9631   fi ;;
9632 esac
9633 case "$with_scrollbars" in "" | "yes" )
9634   with_scrollbars="lucid" ;;
9635 esac
9636 case "$with_widgets" in "" | "yes" | "lucid")
9637   if   test "$have_motif" = "yes"; then with_widgets="motif"
9638   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9639   else with_widgets=no
9640   fi ;;
9641 esac
9642
9643 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9644
9645 case "$all_widgets" in
9646   *athena* )
9647     if test "$have_xaw" != "yes"; then
9648       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9649     fi
9650
9651         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9652
9653         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9654
9655                     { test "$extra_verbose" = "yes" && cat << EOF
9656     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9657 EOF
9658 cat >> confdefs.h <<EOF
9659 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9660 EOF
9661 }
9662
9663     { test "$extra_verbose" = "yes" && cat << EOF
9664     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9665 EOF
9666 cat >> confdefs.h <<EOF
9667 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9668 EOF
9669 }
9670
9671     { test "$extra_verbose" = "yes" && cat << EOF
9672     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9673 EOF
9674 cat >> confdefs.h <<EOF
9675 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9676 EOF
9677 }
9678
9679     { test "$extra_verbose" = "yes" && cat << EOF
9680     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9681 EOF
9682 cat >> confdefs.h <<EOF
9683 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9684 EOF
9685 }
9686
9687     { test "$extra_verbose" = "yes" && cat << EOF
9688     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9689 EOF
9690 cat >> confdefs.h <<EOF
9691 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9692 EOF
9693 }
9694
9695     { test "$extra_verbose" = "yes" && cat << EOF
9696     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9697 EOF
9698 cat >> confdefs.h <<EOF
9699 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9700 EOF
9701 }
9702
9703     { test "$extra_verbose" = "yes" && cat << EOF
9704     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9705 EOF
9706 cat >> confdefs.h <<EOF
9707 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9708 EOF
9709 }
9710
9711     { test "$extra_verbose" = "yes" && cat << EOF
9712     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9713 EOF
9714 cat >> confdefs.h <<EOF
9715 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9716 EOF
9717 }
9718
9719     { test "$extra_verbose" = "yes" && cat << EOF
9720     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9721 EOF
9722 cat >> confdefs.h <<EOF
9723 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9724 EOF
9725 }
9726
9727     { test "$extra_verbose" = "yes" && cat << EOF
9728     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9729 EOF
9730 cat >> confdefs.h <<EOF
9731 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9732 EOF
9733 }
9734
9735
9736     { test "$extra_verbose" = "yes" && cat << \EOF
9737     Defining LWLIB_USES_ATHENA
9738 EOF
9739 cat >> confdefs.h <<\EOF
9740 #define LWLIB_USES_ATHENA 1
9741 EOF
9742 }
9743
9744     { test "$extra_verbose" = "yes" && cat << \EOF
9745     Defining NEED_ATHENA
9746 EOF
9747 cat >> confdefs.h <<\EOF
9748 #define NEED_ATHENA 1
9749 EOF
9750 }
9751
9752     need_athena="yes"
9753
9754     if test "$athena_3d" = "yes"; then
9755       { test "$extra_verbose" = "yes" && cat << \EOF
9756     Defining HAVE_ATHENA_3D
9757 EOF
9758 cat >> confdefs.h <<\EOF
9759 #define HAVE_ATHENA_3D 1
9760 EOF
9761 }
9762
9763     fi
9764   ;;
9765 esac
9766
9767 case "$all_widgets" in *motif* )
9768   { test "$extra_verbose" = "yes" && cat << \EOF
9769     Defining LWLIB_USES_MOTIF
9770 EOF
9771 cat >> confdefs.h <<\EOF
9772 #define LWLIB_USES_MOTIF 1
9773 EOF
9774 }
9775
9776   { test "$extra_verbose" = "yes" && cat << \EOF
9777     Defining NEED_MOTIF
9778 EOF
9779 cat >> confdefs.h <<\EOF
9780 #define NEED_MOTIF 1
9781 EOF
9782 }
9783
9784   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9785   need_motif=yes ;;
9786 esac
9787
9788 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9789 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9790 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9791 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9792         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9793 case "$with_widgets" in athena* )
9794         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;;
9795 esac
9796 case "$all_widgets" in *lucid* )
9797   { test "$extra_verbose" = "yes" && cat << \EOF
9798     Defining NEED_LUCID
9799 EOF
9800 cat >> confdefs.h <<\EOF
9801 #define NEED_LUCID 1
9802 EOF
9803 }
9804
9805   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9806 esac
9807
9808
9809
9810 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9811     Defining LWLIB_SCROLLBARS_ATHENA
9812 EOF
9813 cat >> confdefs.h <<\EOF
9814 #define LWLIB_SCROLLBARS_ATHENA 1
9815 EOF
9816 }
9817
9818 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9819     Defining LWLIB_DIALOGS_ATHENA
9820 EOF
9821 cat >> confdefs.h <<\EOF
9822 #define LWLIB_DIALOGS_ATHENA 1
9823 EOF
9824 }
9825
9826
9827 if test "$athena_3d" = "yes"; then
9828   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9829     Defining LWLIB_SCROLLBARS_ATHENA3D
9830 EOF
9831 cat >> confdefs.h <<\EOF
9832 #define LWLIB_SCROLLBARS_ATHENA3D 1
9833 EOF
9834 }
9835
9836   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9837     Defining LWLIB_DIALOGS_ATHENA3D
9838 EOF
9839 cat >> confdefs.h <<\EOF
9840 #define LWLIB_DIALOGS_ATHENA3D 1
9841 EOF
9842 }
9843
9844 fi
9845
9846 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9847     Defining LWLIB_WIDGETS_ATHENA
9848 EOF
9849 cat >> confdefs.h <<\EOF
9850 #define LWLIB_WIDGETS_ATHENA 1
9851 EOF
9852 }
9853 ;; esac
9854 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9855         { test "$extra_verbose" = "yes" && cat << \EOF
9856     Defining LWLIB_TABS_LUCID
9857 EOF
9858 cat >> confdefs.h <<\EOF
9859 #define LWLIB_TABS_LUCID 1
9860 EOF
9861 }
9862
9863
9864 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9865     Defining HAVE_MENUBARS
9866 EOF
9867 cat >> confdefs.h <<\EOF
9868 #define HAVE_MENUBARS 1
9869 EOF
9870 }
9871
9872 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9873     Defining HAVE_SCROLLBARS
9874 EOF
9875 cat >> confdefs.h <<\EOF
9876 #define HAVE_SCROLLBARS 1
9877 EOF
9878 }
9879
9880 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9881     Defining HAVE_DIALOGS
9882 EOF
9883 cat >> confdefs.h <<\EOF
9884 #define HAVE_DIALOGS 1
9885 EOF
9886 }
9887
9888 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9889     Defining HAVE_TOOLBARS
9890 EOF
9891 cat >> confdefs.h <<\EOF
9892 #define HAVE_TOOLBARS 1
9893 EOF
9894 }
9895
9896 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9897     Defining HAVE_WIDGETS
9898 EOF
9899 cat >> confdefs.h <<\EOF
9900 #define HAVE_WIDGETS 1
9901 EOF
9902 }
9903
9904
9905 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9906     Defining LWLIB_MENUBARS_LUCID
9907 EOF
9908 cat >> confdefs.h <<\EOF
9909 #define LWLIB_MENUBARS_LUCID 1
9910 EOF
9911 }
9912
9913 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9914     Defining LWLIB_SCROLLBARS_LUCID
9915 EOF
9916 cat >> confdefs.h <<\EOF
9917 #define LWLIB_SCROLLBARS_LUCID 1
9918 EOF
9919 }
9920
9921
9922 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9923     Defining LWLIB_MENUBARS_MOTIF
9924 EOF
9925 cat >> confdefs.h <<\EOF
9926 #define LWLIB_MENUBARS_MOTIF 1
9927 EOF
9928 }
9929
9930 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9931     Defining LWLIB_SCROLLBARS_MOTIF
9932 EOF
9933 cat >> confdefs.h <<\EOF
9934 #define LWLIB_SCROLLBARS_MOTIF 1
9935 EOF
9936 }
9937
9938 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9939     Defining LWLIB_DIALOGS_MOTIF
9940 EOF
9941 cat >> confdefs.h <<\EOF
9942 #define LWLIB_DIALOGS_MOTIF 1
9943 EOF
9944 }
9945
9946 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9947     Defining LWLIB_WIDGETS_MOTIF
9948 EOF
9949 cat >> confdefs.h <<\EOF
9950 #define LWLIB_WIDGETS_MOTIF 1
9951 EOF
9952 }
9953
9954
9955 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9956    echo "    xemacs will be linked with \"menubar.o\""
9957  fi
9958 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9959    echo "    xemacs will be linked with \"scrollbar.o\""
9960  fi
9961 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9962    echo "    xemacs will be linked with \"dialog.o\""
9963  fi
9964 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9965    echo "    xemacs will be linked with \"toolbar.o\""
9966  fi
9967
9968 if test "$with_gtk" = "yes"; then
9969   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9970    echo "    xemacs will be linked with \"menubar-gtk.o\""
9971  fi
9972   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9973    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9974  fi
9975   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9976    echo "    xemacs will be linked with \"dialog-gtk.o\""
9977  fi
9978   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9979    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9980  fi
9981   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9982    echo "    xemacs will be linked with \"gui-gtk.o\""
9983  fi
9984 fi
9985
9986 if test "$with_x11" = "yes"; then
9987   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9988    echo "    xemacs will be linked with \"menubar-x.o\""
9989  fi
9990   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9991    echo "    xemacs will be linked with \"scrollbar-x.o\""
9992  fi
9993   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9994    echo "    xemacs will be linked with \"dialog-x.o\""
9995  fi
9996   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9997    echo "    xemacs will be linked with \"toolbar-x.o\""
9998  fi
9999   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10000    echo "    xemacs will be linked with \"gui-x.o\""
10001  fi
10002 fi
10003
10004
10005 test -z "$with_mule" && with_mule=no
10006 test -z "$with_file_coding" && with_file_coding=no
10007
10008
10009 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10010   { test "$extra_verbose" = "yes" && cat << \EOF
10011     Defining FILE_CODING
10012 EOF
10013 cat >> confdefs.h <<\EOF
10014 #define FILE_CODING 1
10015 EOF
10016 }
10017
10018   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10019    echo "    xemacs will be linked with \"file-coding.o\""
10020  fi
10021 fi
10022
10023 test -z "$with_chise" && with_chise=yes
10024 if test "$with_chise" = "yes"; then
10025     with_mule=yes
10026     with_utf_2000=yes
10027     with_text_coding=yes
10028 fi
10029
10030 if test "$with_mule" = "yes" ; then
10031   echo "checking for Mule-related features" 1>&6
10032 echo "configure:10033: checking for Mule-related features" >&5
10033   { test "$extra_verbose" = "yes" && cat << \EOF
10034     Defining MULE
10035 EOF
10036 cat >> confdefs.h <<\EOF
10037 #define MULE 1
10038 EOF
10039 }
10040
10041
10042     chise_includes_found=no
10043   if test "$with_chise" != "no"; then
10044     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10045 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10046 echo "configure:10047: checking for chise.h" >&5
10047
10048 cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051 #include <chise.h>
10052 EOF
10053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10054 { (eval echo configure:10055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10056 if test -z "$ac_err"; then
10057   rm -rf conftest*
10058   eval "ac_cv_header_$ac_safe=yes"
10059 else
10060   echo "$ac_err" >&5
10061   echo "configure: failed program was:" >&5
10062   cat conftest.$ac_ext >&5
10063   rm -rf conftest*
10064   eval "ac_cv_header_$ac_safe=no"
10065 fi
10066 rm -f conftest*
10067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10068   echo "$ac_t""yes" 1>&6
10069   :
10070 else
10071   echo "$ac_t""no" 1>&6
10072 with_chise=no
10073 fi
10074
10075   fi
10076   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10077       -d "/usr/local/chise/include"; then
10078     save_c_switch_site="$c_switch_site"
10079     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10080     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10081 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10082 echo "configure:10083: checking for chise.h" >&5
10083
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <chise.h>
10088 EOF
10089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10090 { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10092 if test -z "$ac_err"; then
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=yes"
10095 else
10096   echo "$ac_err" >&5
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=no"
10101 fi
10102 rm -f conftest*
10103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10104   echo "$ac_t""yes" 1>&6
10105   chise_includes_found=yes
10106 else
10107   echo "$ac_t""no" 1>&6
10108 fi
10109
10110     if test "$chise_includes_found" != "yes"; then
10111       c_switch_site="$save_c_switch_site"
10112       with_chise="no"
10113     fi
10114   fi
10115
10116   test -z "$with_chise" && with_chise=yes
10117   if test "$with_chise" = "yes"; then
10118     { test "$extra_verbose" = "yes" && cat << \EOF
10119     Defining HAVE_CHISE
10120 EOF
10121 cat >> confdefs.h <<\EOF
10122 #define HAVE_CHISE 1
10123 EOF
10124 }
10125
10126     { test "$extra_verbose" = "yes" && cat << \EOF
10127     Defining HAVE_LIBCHISE
10128 EOF
10129 cat >> confdefs.h <<\EOF
10130 #define HAVE_LIBCHISE 1
10131 EOF
10132 }
10133
10134     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10135   fi
10136
10137   { test "$extra_verbose" = "yes" && cat << \EOF
10138     Defining FILE_CODING
10139 EOF
10140 cat >> confdefs.h <<\EOF
10141 #define FILE_CODING 1
10142 EOF
10143 }
10144
10145   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10146    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10147  fi
10148   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10149     { test "$extra_verbose" = "yes" && cat << \EOF
10150     Defining TEXT_CODING
10151 EOF
10152 cat >> confdefs.h <<\EOF
10153 #define TEXT_CODING 1
10154 EOF
10155 }
10156
10157     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10158    echo "    xemacs will be linked with \"text-coding.o\""
10159  fi
10160   else
10161     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10162    echo "    xemacs will be linked with \"file-coding.o\""
10163  fi
10164   fi
10165     for ac_hdr in libintl.h
10166 do
10167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10169 echo "configure:10170: checking for $ac_hdr" >&5
10170
10171 cat > conftest.$ac_ext <<EOF
10172 #line 10173 "configure"
10173 #include "confdefs.h"
10174 #include <$ac_hdr>
10175 EOF
10176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10177 { (eval echo configure:10178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10179 if test -z "$ac_err"; then
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=yes"
10182 else
10183   echo "$ac_err" >&5
10184   echo "configure: failed program was:" >&5
10185   cat conftest.$ac_ext >&5
10186   rm -rf conftest*
10187   eval "ac_cv_header_$ac_safe=no"
10188 fi
10189 rm -f conftest*
10190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10191   echo "$ac_t""yes" 1>&6
10192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10193   { test "$extra_verbose" = "yes" && cat << EOF
10194     Defining $ac_tr_hdr
10195 EOF
10196 cat >> confdefs.h <<EOF
10197 #define $ac_tr_hdr 1
10198 EOF
10199 }
10200  
10201 else
10202   echo "$ac_t""no" 1>&6
10203 fi
10204 done
10205
10206   
10207 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10208 echo "configure:10209: checking for strerror in -lintl" >&5
10209 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10210
10211 xe_check_libs=" -lintl "
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 /* Override any gcc2 internal prototype to avoid an error.  */
10216 /* We use char because int might match the return type of a gcc2
10217     builtin and then its argument prototype would still apply.  */
10218 char strerror();
10219
10220 int main() {
10221 strerror()
10222 ; return 0; }
10223 EOF
10224 if { (eval echo configure:10225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10225   rm -rf conftest*
10226   eval "ac_cv_lib_$ac_lib_var=yes"
10227 else
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230   rm -rf conftest*
10231   eval "ac_cv_lib_$ac_lib_var=no"
10232 fi
10233 rm -f conftest*
10234 xe_check_libs=""
10235
10236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10237   echo "$ac_t""yes" 1>&6
10238     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10239     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10240   { test "$extra_verbose" = "yes" && cat << EOF
10241     Defining $ac_tr_lib
10242 EOF
10243 cat >> confdefs.h <<EOF
10244 #define $ac_tr_lib 1
10245 EOF
10246 }
10247
10248   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10249
10250 else
10251   echo "$ac_t""no" 1>&6
10252 fi
10253
10254
10255
10256   if test "$with_utf_2000" = "yes" ; then
10257     { test "$extra_verbose" = "yes" && cat << \EOF
10258     Defining CHAR_IS_UCS4
10259 EOF
10260 cat >> confdefs.h <<\EOF
10261 #define CHAR_IS_UCS4 1
10262 EOF
10263 }
10264
10265     { test "$extra_verbose" = "yes" && cat << \EOF
10266     Defining UTF2000
10267 EOF
10268 cat >> confdefs.h <<\EOF
10269 #define UTF2000 1
10270 EOF
10271 }
10272
10273     with_wnn=no
10274     with_wnn6=no
10275   fi
10276
10277   echo "checking for Mule input methods" 1>&6
10278 echo "configure:10279: checking for Mule input methods" >&5
10279         case "$with_xim" in "" | "yes" )
10280     echo "checking for XIM" 1>&6
10281 echo "configure:10282: checking for XIM" >&5
10282     
10283 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10284 echo "configure:10285: checking for XOpenIM in -lX11" >&5
10285 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10286
10287 xe_check_libs=" -lX11 "
10288 cat > conftest.$ac_ext <<EOF
10289 #line 10290 "configure"
10290 #include "confdefs.h"
10291 /* Override any gcc2 internal prototype to avoid an error.  */
10292 /* We use char because int might match the return type of a gcc2
10293     builtin and then its argument prototype would still apply.  */
10294 char XOpenIM();
10295
10296 int main() {
10297 XOpenIM()
10298 ; return 0; }
10299 EOF
10300 if { (eval echo configure:10301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10301   rm -rf conftest*
10302   eval "ac_cv_lib_$ac_lib_var=yes"
10303 else
10304   echo "configure: failed program was:" >&5
10305   cat conftest.$ac_ext >&5
10306   rm -rf conftest*
10307   eval "ac_cv_lib_$ac_lib_var=no"
10308 fi
10309 rm -f conftest*
10310 xe_check_libs=""
10311
10312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10313   echo "$ac_t""yes" 1>&6
10314   with_xim=xlib
10315 else
10316   echo "$ac_t""no" 1>&6
10317 with_xim=no
10318 fi
10319
10320
10321         if test "$have_motif $have_lesstif" = "yes no"; then
10322       
10323 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10324 echo "configure:10325: checking for XmImMbLookupString in -lXm" >&5
10325 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10326
10327 xe_check_libs=" -lXm "
10328 cat > conftest.$ac_ext <<EOF
10329 #line 10330 "configure"
10330 #include "confdefs.h"
10331 /* Override any gcc2 internal prototype to avoid an error.  */
10332 /* We use char because int might match the return type of a gcc2
10333     builtin and then its argument prototype would still apply.  */
10334 char XmImMbLookupString();
10335
10336 int main() {
10337 XmImMbLookupString()
10338 ; return 0; }
10339 EOF
10340 if { (eval echo configure:10341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10341   rm -rf conftest*
10342   eval "ac_cv_lib_$ac_lib_var=yes"
10343 else
10344   echo "configure: failed program was:" >&5
10345   cat conftest.$ac_ext >&5
10346   rm -rf conftest*
10347   eval "ac_cv_lib_$ac_lib_var=no"
10348 fi
10349 rm -f conftest*
10350 xe_check_libs=""
10351
10352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10353   echo "$ac_t""yes" 1>&6
10354   with_xim=motif
10355 else
10356   echo "$ac_t""no" 1>&6
10357 fi
10358
10359
10360     fi ;;
10361   esac
10362   if test "$with_xim" != "no"; then
10363     { test "$extra_verbose" = "yes" && cat << \EOF
10364     Defining HAVE_XIM
10365 EOF
10366 cat >> confdefs.h <<\EOF
10367 #define HAVE_XIM 1
10368 EOF
10369 }
10370
10371     if test "$with_xim" = "xlib"; then
10372       { test "$extra_verbose" = "yes" && cat << \EOF
10373     Defining XIM_XLIB
10374 EOF
10375 cat >> confdefs.h <<\EOF
10376 #define XIM_XLIB 1
10377 EOF
10378 }
10379
10380       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10381    echo "    xemacs will be linked with \"input-method-xlib.o\""
10382  fi
10383     fi
10384     if test "$with_xim" = "motif"; then
10385       { test "$extra_verbose" = "yes" && cat << \EOF
10386     Defining XIM_MOTIF
10387 EOF
10388 cat >> confdefs.h <<\EOF
10389 #define XIM_MOTIF 1
10390 EOF
10391 }
10392
10393       need_motif=yes
10394       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10395    echo "    xemacs will be linked with \"input-method-motif.o\""
10396  fi
10397     fi
10398     if test "$with_xim" = "motif"; then
10399       with_xfs=no
10400     fi
10401   fi
10402
10403     if test "$with_xfs" = "yes" ; then
10404     echo "checking for XFontSet" 1>&6
10405 echo "configure:10406: checking for XFontSet" >&5
10406     
10407 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10408 echo "configure:10409: checking for XmbDrawString in -lX11" >&5
10409 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10410
10411 xe_check_libs=" -lX11 "
10412 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 /* Override any gcc2 internal prototype to avoid an error.  */
10416 /* We use char because int might match the return type of a gcc2
10417     builtin and then its argument prototype would still apply.  */
10418 char XmbDrawString();
10419
10420 int main() {
10421 XmbDrawString()
10422 ; return 0; }
10423 EOF
10424 if { (eval echo configure:10425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10425   rm -rf conftest*
10426   eval "ac_cv_lib_$ac_lib_var=yes"
10427 else
10428   echo "configure: failed program was:" >&5
10429   cat conftest.$ac_ext >&5
10430   rm -rf conftest*
10431   eval "ac_cv_lib_$ac_lib_var=no"
10432 fi
10433 rm -f conftest*
10434 xe_check_libs=""
10435
10436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10437   echo "$ac_t""yes" 1>&6
10438   :
10439 else
10440   echo "$ac_t""no" 1>&6
10441 with_xfs=no
10442 fi
10443
10444
10445     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10446       { test "$extra_verbose" = "yes" && cat << \EOF
10447     Defining USE_XFONTSET
10448 EOF
10449 cat >> confdefs.h <<\EOF
10450 #define USE_XFONTSET 1
10451 EOF
10452 }
10453
10454       if test "$with_xim" = "no" ; then
10455         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10456    echo "    xemacs will be linked with \"input-method-xlib.o\""
10457  fi
10458       fi
10459     fi
10460   fi 
10461     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10462   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10463 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10464 echo "configure:10465: checking for wnn/jllib.h" >&5
10465
10466 cat > conftest.$ac_ext <<EOF
10467 #line 10468 "configure"
10468 #include "confdefs.h"
10469 #include <wnn/jllib.h>
10470 EOF
10471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10472 { (eval echo configure:10473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10474 if test -z "$ac_err"; then
10475   rm -rf conftest*
10476   eval "ac_cv_header_$ac_safe=yes"
10477 else
10478   echo "$ac_err" >&5
10479   echo "configure: failed program was:" >&5
10480   cat conftest.$ac_ext >&5
10481   rm -rf conftest*
10482   eval "ac_cv_header_$ac_safe=no"
10483 fi
10484 rm -f conftest*
10485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10486   echo "$ac_t""yes" 1>&6
10487   :
10488 else
10489   echo "$ac_t""no" 1>&6
10490 with_wnn=no
10491 fi
10492  }
10493     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10494 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10495 echo "configure:10496: checking for wnn/commonhd.h" >&5
10496
10497 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 #include <wnn/commonhd.h>
10501 EOF
10502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10503 { (eval echo configure:10504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10505 if test -z "$ac_err"; then
10506   rm -rf conftest*
10507   eval "ac_cv_header_$ac_safe=yes"
10508 else
10509   echo "$ac_err" >&5
10510   echo "configure: failed program was:" >&5
10511   cat conftest.$ac_ext >&5
10512   rm -rf conftest*
10513   eval "ac_cv_header_$ac_safe=no"
10514 fi
10515 rm -f conftest*
10516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10517   echo "$ac_t""yes" 1>&6
10518   :
10519 else
10520   echo "$ac_t""no" 1>&6
10521 with_wnn=no
10522 fi
10523  }
10524     if test "$with_wnn" != "no"; then
10525     for ac_func in crypt
10526 do
10527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10528 echo "configure:10529: checking for $ac_func" >&5
10529
10530 cat > conftest.$ac_ext <<EOF
10531 #line 10532 "configure"
10532 #include "confdefs.h"
10533 /* System header to define __stub macros and hopefully few prototypes,
10534     which can conflict with char $ac_func(); below.  */
10535 #include <assert.h>
10536 /* Override any gcc2 internal prototype to avoid an error.  */
10537 /* We use char because int might match the return type of a gcc2
10538     builtin and then its argument prototype would still apply.  */
10539 char $ac_func();
10540
10541 int main() {
10542
10543 /* The GNU C library defines this for functions which it implements
10544     to always fail with ENOSYS.  Some functions are actually named
10545     something starting with __ and the normal name is an alias.  */
10546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10547 choke me
10548 #else
10549 $ac_func();
10550 #endif
10551
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   eval "ac_cv_func_$ac_func=yes"
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_func_$ac_func=no"
10562 fi
10563 rm -f conftest*
10564
10565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10566   echo "$ac_t""yes" 1>&6
10567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10568   { test "$extra_verbose" = "yes" && cat << EOF
10569     Defining $ac_tr_func
10570 EOF
10571 cat >> confdefs.h <<EOF
10572 #define $ac_tr_func 1
10573 EOF
10574 }
10575  
10576 else
10577   echo "$ac_t""no" 1>&6
10578 fi
10579 done
10580
10581     test "$ac_cv_func_crypt" != "yes" && { 
10582 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10583 echo "configure:10584: checking for crypt in -lcrypt" >&5
10584 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10585
10586 xe_check_libs=" -lcrypt "
10587 cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590 /* Override any gcc2 internal prototype to avoid an error.  */
10591 /* We use char because int might match the return type of a gcc2
10592     builtin and then its argument prototype would still apply.  */
10593 char crypt();
10594
10595 int main() {
10596 crypt()
10597 ; return 0; }
10598 EOF
10599 if { (eval echo configure:10600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10600   rm -rf conftest*
10601   eval "ac_cv_lib_$ac_lib_var=yes"
10602 else
10603   echo "configure: failed program was:" >&5
10604   cat conftest.$ac_ext >&5
10605   rm -rf conftest*
10606   eval "ac_cv_lib_$ac_lib_var=no"
10607 fi
10608 rm -f conftest*
10609 xe_check_libs=""
10610
10611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10612   echo "$ac_t""yes" 1>&6
10613     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10614     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10615   { test "$extra_verbose" = "yes" && cat << EOF
10616     Defining $ac_tr_lib
10617 EOF
10618 cat >> confdefs.h <<EOF
10619 #define $ac_tr_lib 1
10620 EOF
10621 }
10622
10623   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10624
10625 else
10626   echo "$ac_t""no" 1>&6
10627 fi
10628
10629  }
10630   fi
10631     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10632     
10633 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10634 echo "configure:10635: checking for jl_dic_list_e in -lwnn" >&5
10635 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10636
10637 xe_check_libs=" -lwnn "
10638 cat > conftest.$ac_ext <<EOF
10639 #line 10640 "configure"
10640 #include "confdefs.h"
10641 /* Override any gcc2 internal prototype to avoid an error.  */
10642 /* We use char because int might match the return type of a gcc2
10643     builtin and then its argument prototype would still apply.  */
10644 char jl_dic_list_e();
10645
10646 int main() {
10647 jl_dic_list_e()
10648 ; return 0; }
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10651   rm -rf conftest*
10652   eval "ac_cv_lib_$ac_lib_var=yes"
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -rf conftest*
10657   eval "ac_cv_lib_$ac_lib_var=no"
10658 fi
10659 rm -f conftest*
10660 xe_check_libs=""
10661
10662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10663   echo "$ac_t""yes" 1>&6
10664   libwnn=wnn
10665 else
10666   echo "$ac_t""no" 1>&6
10667 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10668 echo "configure:10669: checking for jl_dic_list_e in -lwnn4" >&5
10669 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10670
10671 xe_check_libs=" -lwnn4 "
10672 cat > conftest.$ac_ext <<EOF
10673 #line 10674 "configure"
10674 #include "confdefs.h"
10675 /* Override any gcc2 internal prototype to avoid an error.  */
10676 /* We use char because int might match the return type of a gcc2
10677     builtin and then its argument prototype would still apply.  */
10678 char jl_dic_list_e();
10679
10680 int main() {
10681 jl_dic_list_e()
10682 ; return 0; }
10683 EOF
10684 if { (eval echo configure:10685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10685   rm -rf conftest*
10686   eval "ac_cv_lib_$ac_lib_var=yes"
10687 else
10688   echo "configure: failed program was:" >&5
10689   cat conftest.$ac_ext >&5
10690   rm -rf conftest*
10691   eval "ac_cv_lib_$ac_lib_var=no"
10692 fi
10693 rm -f conftest*
10694 xe_check_libs=""
10695
10696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10697   echo "$ac_t""yes" 1>&6
10698   libwnn=wnn4
10699 else
10700   echo "$ac_t""no" 1>&6
10701 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10702 echo "configure:10703: checking for jl_dic_list_e in -lwnn6" >&5
10703 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10704
10705 xe_check_libs=" -lwnn6 "
10706 cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709 /* Override any gcc2 internal prototype to avoid an error.  */
10710 /* We use char because int might match the return type of a gcc2
10711     builtin and then its argument prototype would still apply.  */
10712 char jl_dic_list_e();
10713
10714 int main() {
10715 jl_dic_list_e()
10716 ; return 0; }
10717 EOF
10718 if { (eval echo configure:10719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10719   rm -rf conftest*
10720   eval "ac_cv_lib_$ac_lib_var=yes"
10721 else
10722   echo "configure: failed program was:" >&5
10723   cat conftest.$ac_ext >&5
10724   rm -rf conftest*
10725   eval "ac_cv_lib_$ac_lib_var=no"
10726 fi
10727 rm -f conftest*
10728 xe_check_libs=""
10729
10730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10731   echo "$ac_t""yes" 1>&6
10732   libwnn=wnn6
10733 else
10734   echo "$ac_t""no" 1>&6
10735 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10736 echo "configure:10737: checking for dic_list_e in -lwnn6_fromsrc" >&5
10737 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10738
10739 xe_check_libs=" -lwnn6_fromsrc "
10740 cat > conftest.$ac_ext <<EOF
10741 #line 10742 "configure"
10742 #include "confdefs.h"
10743 /* Override any gcc2 internal prototype to avoid an error.  */
10744 /* We use char because int might match the return type of a gcc2
10745     builtin and then its argument prototype would still apply.  */
10746 char dic_list_e();
10747
10748 int main() {
10749 dic_list_e()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 xe_check_libs=""
10763
10764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10765   echo "$ac_t""yes" 1>&6
10766   libwnn=wnn6_fromsrc
10767 else
10768   echo "$ac_t""no" 1>&6
10769 with_wnn=no
10770 fi
10771
10772
10773 fi
10774
10775
10776 fi
10777
10778
10779 fi
10780
10781
10782   fi
10783   test -z "$with_wnn" && with_wnn=yes
10784   if test "$with_wnn" = "yes"; then
10785     { test "$extra_verbose" = "yes" && cat << \EOF
10786     Defining HAVE_WNN
10787 EOF
10788 cat >> confdefs.h <<\EOF
10789 #define HAVE_WNN 1
10790 EOF
10791 }
10792
10793     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10794     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10795    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10796  fi
10797     if test "$with_wnn6" != "no"; then
10798       
10799 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10800 echo "configure:10801: checking for jl_fi_dic_list in -l$libwnn" >&5
10801 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10802
10803 xe_check_libs=" -l$libwnn "
10804 cat > conftest.$ac_ext <<EOF
10805 #line 10806 "configure"
10806 #include "confdefs.h"
10807 /* Override any gcc2 internal prototype to avoid an error.  */
10808 /* We use char because int might match the return type of a gcc2
10809     builtin and then its argument prototype would still apply.  */
10810 char jl_fi_dic_list();
10811
10812 int main() {
10813 jl_fi_dic_list()
10814 ; return 0; }
10815 EOF
10816 if { (eval echo configure:10817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=yes"
10819 else
10820   echo "configure: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   rm -rf conftest*
10823   eval "ac_cv_lib_$ac_lib_var=no"
10824 fi
10825 rm -f conftest*
10826 xe_check_libs=""
10827
10828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10829   echo "$ac_t""yes" 1>&6
10830   with_wnn6=yes
10831 else
10832   echo "$ac_t""no" 1>&6
10833 fi
10834
10835
10836       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10837     Defining WNN6
10838 EOF
10839 cat >> confdefs.h <<\EOF
10840 #define WNN6 1
10841 EOF
10842 }
10843
10844     fi
10845   fi
10846
10847     canna_includes_found=no
10848   if test "$with_canna" != "no"; then
10849     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10850 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10851 echo "configure:10852: checking for canna/jrkanji.h" >&5
10852
10853 cat > conftest.$ac_ext <<EOF
10854 #line 10855 "configure"
10855 #include "confdefs.h"
10856 #include <canna/jrkanji.h>
10857 EOF
10858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10859 { (eval echo configure:10860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10861 if test -z "$ac_err"; then
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=yes"
10864 else
10865   echo "$ac_err" >&5
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=no"
10870 fi
10871 rm -f conftest*
10872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10873   echo "$ac_t""yes" 1>&6
10874   canna_includes_found=yes
10875 else
10876   echo "$ac_t""no" 1>&6
10877 fi
10878
10879   fi
10880   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10881       -d "/usr/local/canna/include"; then
10882     save_c_switch_site="$c_switch_site"
10883     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10884     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10885 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10886 echo "configure:10887: checking for canna/jrkanji.h" >&5
10887
10888 cat > conftest.$ac_ext <<EOF
10889 #line 10890 "configure"
10890 #include "confdefs.h"
10891 #include <canna/jrkanji.h>
10892 EOF
10893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10894 { (eval echo configure:10895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10896 if test -z "$ac_err"; then
10897   rm -rf conftest*
10898   eval "ac_cv_header_$ac_safe=yes"
10899 else
10900   echo "$ac_err" >&5
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -rf conftest*
10904   eval "ac_cv_header_$ac_safe=no"
10905 fi
10906 rm -f conftest*
10907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10908   echo "$ac_t""yes" 1>&6
10909   canna_includes_found=yes
10910 else
10911   echo "$ac_t""no" 1>&6
10912 fi
10913
10914     if test "$canna_includes_found" != "yes"; then
10915       c_switch_site="$save_c_switch_site"
10916       with_canna="no"
10917     fi
10918   fi
10919
10920   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10921 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10922 echo "configure:10923: checking for canna/RK.h" >&5
10923
10924 cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 #include <canna/RK.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   :
10946 else
10947   echo "$ac_t""no" 1>&6
10948 with_canna=no
10949 fi
10950  }
10951   test -z "$with_canna" && { 
10952 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10953 echo "configure:10954: checking for RkBgnBun in -lRKC" >&5
10954 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10955
10956 xe_check_libs=" -lRKC "
10957 cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 /* Override any gcc2 internal prototype to avoid an error.  */
10961 /* We use char because int might match the return type of a gcc2
10962     builtin and then its argument prototype would still apply.  */
10963 char RkBgnBun();
10964
10965 int main() {
10966 RkBgnBun()
10967 ; return 0; }
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10970   rm -rf conftest*
10971   eval "ac_cv_lib_$ac_lib_var=yes"
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   eval "ac_cv_lib_$ac_lib_var=no"
10977 fi
10978 rm -f conftest*
10979 xe_check_libs=""
10980
10981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10982   echo "$ac_t""yes" 1>&6
10983   :
10984 else
10985   echo "$ac_t""no" 1>&6
10986 with_canna=no
10987 fi
10988
10989  }
10990   test -z "$with_canna" && { 
10991 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10992 echo "configure:10993: checking for jrKanjiControl in -lcanna" >&5
10993 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10994
10995 xe_check_libs=" -lcanna "
10996 cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 /* Override any gcc2 internal prototype to avoid an error.  */
11000 /* We use char because int might match the return type of a gcc2
11001     builtin and then its argument prototype would still apply.  */
11002 char jrKanjiControl();
11003
11004 int main() {
11005 jrKanjiControl()
11006 ; return 0; }
11007 EOF
11008 if { (eval echo configure:11009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11009   rm -rf conftest*
11010   eval "ac_cv_lib_$ac_lib_var=yes"
11011 else
11012   echo "configure: failed program was:" >&5
11013   cat conftest.$ac_ext >&5
11014   rm -rf conftest*
11015   eval "ac_cv_lib_$ac_lib_var=no"
11016 fi
11017 rm -f conftest*
11018 xe_check_libs=""
11019
11020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11021   echo "$ac_t""yes" 1>&6
11022   :
11023 else
11024   echo "$ac_t""no" 1>&6
11025 with_canna=no
11026 fi
11027
11028  }
11029   test -z "$with_canna" && with_canna=yes
11030   if test "$with_canna" = "yes"; then
11031     { test "$extra_verbose" = "yes" && cat << \EOF
11032     Defining HAVE_CANNA
11033 EOF
11034 cat >> confdefs.h <<\EOF
11035 #define HAVE_CANNA 1
11036 EOF
11037 }
11038
11039     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11040     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11041    echo "    xemacs will be linked with \"mule-canna.o\""
11042  fi
11043   fi
11044
11045 else   for feature in xim canna wnn; do
11046     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11047       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11048     fi
11049     eval "with_${feature}=no"
11050   done
11051 fi 
11052
11053 if test "$need_motif" = "yes" ; then
11054   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11055     
11056 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11057 echo "configure:11058: checking for layout_object_getvalue in -li18n" >&5
11058 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11059
11060 xe_check_libs=" -li18n "
11061 cat > conftest.$ac_ext <<EOF
11062 #line 11063 "configure"
11063 #include "confdefs.h"
11064 /* Override any gcc2 internal prototype to avoid an error.  */
11065 /* We use char because int might match the return type of a gcc2
11066     builtin and then its argument prototype would still apply.  */
11067 char layout_object_getvalue();
11068
11069 int main() {
11070 layout_object_getvalue()
11071 ; return 0; }
11072 EOF
11073 if { (eval echo configure:11074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11074   rm -rf conftest*
11075   eval "ac_cv_lib_$ac_lib_var=yes"
11076 else
11077   echo "configure: failed program was:" >&5
11078   cat conftest.$ac_ext >&5
11079   rm -rf conftest*
11080   eval "ac_cv_lib_$ac_lib_var=no"
11081 fi
11082 rm -f conftest*
11083 xe_check_libs=""
11084
11085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11086   echo "$ac_t""yes" 1>&6
11087   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11088 else
11089   echo "$ac_t""no" 1>&6
11090 fi
11091
11092
11093   
11094 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11095     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11096   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11097   
11098         runpath="" runpath_dirs=""
11099   if test -n "$LD_RUN_PATH"; then
11100     runpath="$LD_RUN_PATH"
11101   elif test "$GCC" = "yes"; then
11102         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11103     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11104     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11105     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11106       case "$arg" in P,* | -L* | -R* )
11107         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11108           {
11109 xe_runpath_dir="$dir"
11110   test "$xe_runpath_dir" != "/lib"     -a \
11111         "$xe_runpath_dir" != "/usr/lib" -a \
11112         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11113   eval "$xe_add_unique_runpath_dir"
11114 }
11115         done ;;
11116       esac
11117     done
11118     ld_switch_run="$ld_switch_run_save"
11119     rm -f conftest*
11120   else
11121         for arg in $ld_switch_site $ld_switch_x_site; do
11122       case "$arg" in -L*) {
11123 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11124   test "$xe_runpath_dir" != "/lib"     -a \
11125         "$xe_runpath_dir" != "/usr/lib" -a \
11126         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11127   eval "$xe_add_unique_runpath_dir"
11128 };; esac
11129     done
11130         if test "$opsys $need_motif" = "sol2 yes"; then
11131       xe_runpath_dir="/opt/SUNWdt/lib";
11132       eval "$xe_add_unique_runpath_dir";
11133     fi
11134   fi 
11135   if test -n "$runpath"; then
11136     ld_switch_run="${dash_r}${runpath}"
11137     
11138 if test "$GCC" = "yes"; then
11139   set x $ld_switch_run; shift; ld_switch_run=""
11140   while test -n "$1"; do
11141     case $1 in
11142       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11143       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11144       -Xlinker* ) ;;
11145       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11146     esac
11147     shift
11148   done
11149 fi
11150     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11151   fi
11152 fi
11153
11154 fi
11155
11156
11157 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
11158 do
11159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11160 echo "configure:11161: checking for $ac_func" >&5
11161
11162 cat > conftest.$ac_ext <<EOF
11163 #line 11164 "configure"
11164 #include "confdefs.h"
11165 /* System header to define __stub macros and hopefully few prototypes,
11166     which can conflict with char $ac_func(); below.  */
11167 #include <assert.h>
11168 /* Override any gcc2 internal prototype to avoid an error.  */
11169 /* We use char because int might match the return type of a gcc2
11170     builtin and then its argument prototype would still apply.  */
11171 char $ac_func();
11172
11173 int main() {
11174
11175 /* The GNU C library defines this for functions which it implements
11176     to always fail with ENOSYS.  Some functions are actually named
11177     something starting with __ and the normal name is an alias.  */
11178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11179 choke me
11180 #else
11181 $ac_func();
11182 #endif
11183
11184 ; return 0; }
11185 EOF
11186 if { (eval echo configure:11187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11187   rm -rf conftest*
11188   eval "ac_cv_func_$ac_func=yes"
11189 else
11190   echo "configure: failed program was:" >&5
11191   cat conftest.$ac_ext >&5
11192   rm -rf conftest*
11193   eval "ac_cv_func_$ac_func=no"
11194 fi
11195 rm -f conftest*
11196
11197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11198   echo "$ac_t""yes" 1>&6
11199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11200   { test "$extra_verbose" = "yes" && cat << EOF
11201     Defining $ac_tr_func
11202 EOF
11203 cat >> confdefs.h <<EOF
11204 #define $ac_tr_func 1
11205 EOF
11206 }
11207  
11208 else
11209   echo "$ac_t""no" 1>&6
11210 fi
11211 done
11212
11213
11214 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11215   case "$opsys" in
11216     hpux11* )
11217       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11218       ac_cv_func_getaddrinfo=no
11219       ;;
11220   esac
11221 fi
11222
11223
11224 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11225 do
11226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11227 echo "configure:11228: checking for $ac_func" >&5
11228
11229 cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232 /* System header to define __stub macros and hopefully few prototypes,
11233     which can conflict with char $ac_func(); below.  */
11234 #include <assert.h>
11235 /* Override any gcc2 internal prototype to avoid an error.  */
11236 /* We use char because int might match the return type of a gcc2
11237     builtin and then its argument prototype would still apply.  */
11238 char $ac_func();
11239
11240 int main() {
11241
11242 /* The GNU C library defines this for functions which it implements
11243     to always fail with ENOSYS.  Some functions are actually named
11244     something starting with __ and the normal name is an alias.  */
11245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11246 choke me
11247 #else
11248 $ac_func();
11249 #endif
11250
11251 ; return 0; }
11252 EOF
11253 if { (eval echo configure:11254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11254   rm -rf conftest*
11255   eval "ac_cv_func_$ac_func=yes"
11256 else
11257   echo "configure: failed program was:" >&5
11258   cat conftest.$ac_ext >&5
11259   rm -rf conftest*
11260   eval "ac_cv_func_$ac_func=no"
11261 fi
11262 rm -f conftest*
11263
11264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11265   echo "$ac_t""yes" 1>&6
11266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11267   { test "$extra_verbose" = "yes" && cat << EOF
11268     Defining $ac_tr_func
11269 EOF
11270 cat >> confdefs.h <<EOF
11271 #define $ac_tr_func 1
11272 EOF
11273 }
11274  
11275 else
11276   echo "$ac_t""no" 1>&6
11277 fi
11278 done
11279
11280
11281 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11282 echo "configure:11283: checking for openpty" >&5
11283
11284 cat > conftest.$ac_ext <<EOF
11285 #line 11286 "configure"
11286 #include "confdefs.h"
11287 /* System header to define __stub macros and hopefully few prototypes,
11288     which can conflict with char openpty(); below.  */
11289 #include <assert.h>
11290 /* Override any gcc2 internal prototype to avoid an error.  */
11291 /* We use char because int might match the return type of a gcc2
11292     builtin and then its argument prototype would still apply.  */
11293 char openpty();
11294
11295 int main() {
11296
11297 /* The GNU C library defines this for functions which it implements
11298     to always fail with ENOSYS.  Some functions are actually named
11299     something starting with __ and the normal name is an alias.  */
11300 #if defined (__stub_openpty) || defined (__stub___openpty)
11301 choke me
11302 #else
11303 openpty();
11304 #endif
11305
11306 ; return 0; }
11307 EOF
11308 if { (eval echo configure:11309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11309   rm -rf conftest*
11310   eval "ac_cv_func_openpty=yes"
11311 else
11312   echo "configure: failed program was:" >&5
11313   cat conftest.$ac_ext >&5
11314   rm -rf conftest*
11315   eval "ac_cv_func_openpty=no"
11316 fi
11317 rm -f conftest*
11318
11319 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11320   echo "$ac_t""yes" 1>&6
11321   have_openpty=yes
11322 else
11323   echo "$ac_t""no" 1>&6
11324
11325   
11326 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11327 echo "configure:11328: checking for openpty in -lutil" >&5
11328 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11329
11330 xe_check_libs=" -lutil "
11331 cat > conftest.$ac_ext <<EOF
11332 #line 11333 "configure"
11333 #include "confdefs.h"
11334 /* Override any gcc2 internal prototype to avoid an error.  */
11335 /* We use char because int might match the return type of a gcc2
11336     builtin and then its argument prototype would still apply.  */
11337 char openpty();
11338
11339 int main() {
11340 openpty()
11341 ; return 0; }
11342 EOF
11343 if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11344   rm -rf conftest*
11345   eval "ac_cv_lib_$ac_lib_var=yes"
11346 else
11347   echo "configure: failed program was:" >&5
11348   cat conftest.$ac_ext >&5
11349   rm -rf conftest*
11350   eval "ac_cv_lib_$ac_lib_var=no"
11351 fi
11352 rm -f conftest*
11353 xe_check_libs=""
11354
11355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11356   echo "$ac_t""yes" 1>&6
11357   have_openpty=yes need_libutil=yes
11358 else
11359   echo "$ac_t""no" 1>&6
11360 fi
11361
11362
11363 fi
11364
11365 if test "$have_openpty" = "yes"; then
11366   { test "$extra_verbose" = "yes" && cat << \EOF
11367     Defining HAVE_OPENPTY
11368 EOF
11369 cat >> confdefs.h <<\EOF
11370 #define HAVE_OPENPTY 1
11371 EOF
11372 }
11373
11374   for ac_hdr in pty.h libutil.h util.h
11375 do
11376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11378 echo "configure:11379: checking for $ac_hdr" >&5
11379
11380 cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383 #include <$ac_hdr>
11384 EOF
11385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11386 { (eval echo configure:11387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11388 if test -z "$ac_err"; then
11389   rm -rf conftest*
11390   eval "ac_cv_header_$ac_safe=yes"
11391 else
11392   echo "$ac_err" >&5
11393   echo "configure: failed program was:" >&5
11394   cat conftest.$ac_ext >&5
11395   rm -rf conftest*
11396   eval "ac_cv_header_$ac_safe=no"
11397 fi
11398 rm -f conftest*
11399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11400   echo "$ac_t""yes" 1>&6
11401     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11402   { test "$extra_verbose" = "yes" && cat << EOF
11403     Defining $ac_tr_hdr
11404 EOF
11405 cat >> confdefs.h <<EOF
11406 #define $ac_tr_hdr 1
11407 EOF
11408 }
11409  break
11410 else
11411   echo "$ac_t""no" 1>&6
11412 fi
11413 done
11414
11415   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11416 fi
11417
11418 for ac_hdr in stropts.h
11419 do
11420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11422 echo "configure:11423: checking for $ac_hdr" >&5
11423
11424 cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 #include <$ac_hdr>
11428 EOF
11429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11430 { (eval echo configure:11431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11432 if test -z "$ac_err"; then
11433   rm -rf conftest*
11434   eval "ac_cv_header_$ac_safe=yes"
11435 else
11436   echo "$ac_err" >&5
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -rf conftest*
11440   eval "ac_cv_header_$ac_safe=no"
11441 fi
11442 rm -f conftest*
11443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11444   echo "$ac_t""yes" 1>&6
11445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11446   { test "$extra_verbose" = "yes" && cat << EOF
11447     Defining $ac_tr_hdr
11448 EOF
11449 cat >> confdefs.h <<EOF
11450 #define $ac_tr_hdr 1
11451 EOF
11452 }
11453  
11454 else
11455   echo "$ac_t""no" 1>&6
11456 fi
11457 done
11458
11459 if test "$ac_cv_header_stropts_h" = "yes"; then
11460   for ac_func in isastream
11461 do
11462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11463 echo "configure:11464: checking for $ac_func" >&5
11464
11465 cat > conftest.$ac_ext <<EOF
11466 #line 11467 "configure"
11467 #include "confdefs.h"
11468 /* System header to define __stub macros and hopefully few prototypes,
11469     which can conflict with char $ac_func(); below.  */
11470 #include <assert.h>
11471 /* Override any gcc2 internal prototype to avoid an error.  */
11472 /* We use char because int might match the return type of a gcc2
11473     builtin and then its argument prototype would still apply.  */
11474 char $ac_func();
11475
11476 int main() {
11477
11478 /* The GNU C library defines this for functions which it implements
11479     to always fail with ENOSYS.  Some functions are actually named
11480     something starting with __ and the normal name is an alias.  */
11481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11482 choke me
11483 #else
11484 $ac_func();
11485 #endif
11486
11487 ; return 0; }
11488 EOF
11489 if { (eval echo configure:11490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11490   rm -rf conftest*
11491   eval "ac_cv_func_$ac_func=yes"
11492 else
11493   echo "configure: failed program was:" >&5
11494   cat conftest.$ac_ext >&5
11495   rm -rf conftest*
11496   eval "ac_cv_func_$ac_func=no"
11497 fi
11498 rm -f conftest*
11499
11500 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11501   echo "$ac_t""yes" 1>&6
11502     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11503   { test "$extra_verbose" = "yes" && cat << EOF
11504     Defining $ac_tr_func
11505 EOF
11506 cat >> confdefs.h <<EOF
11507 #define $ac_tr_func 1
11508 EOF
11509 }
11510  
11511 else
11512   echo "$ac_t""no" 1>&6
11513 fi
11514 done
11515
11516   for ac_hdr in strtio.h
11517 do
11518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11520 echo "configure:11521: checking for $ac_hdr" >&5
11521
11522 cat > conftest.$ac_ext <<EOF
11523 #line 11524 "configure"
11524 #include "confdefs.h"
11525 #include <$ac_hdr>
11526 EOF
11527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11528 { (eval echo configure:11529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11530 if test -z "$ac_err"; then
11531   rm -rf conftest*
11532   eval "ac_cv_header_$ac_safe=yes"
11533 else
11534   echo "$ac_err" >&5
11535   echo "configure: failed program was:" >&5
11536   cat conftest.$ac_ext >&5
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=no"
11539 fi
11540 rm -f conftest*
11541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11542   echo "$ac_t""yes" 1>&6
11543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11544   { test "$extra_verbose" = "yes" && cat << EOF
11545     Defining $ac_tr_hdr
11546 EOF
11547 cat >> confdefs.h <<EOF
11548 #define $ac_tr_hdr 1
11549 EOF
11550 }
11551  
11552 else
11553   echo "$ac_t""no" 1>&6
11554 fi
11555 done
11556  fi
11557
11558 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11559    echo "    xemacs will be linked with \"realpath.o\""
11560  fi
11561
11562 for ac_func in getloadavg
11563 do
11564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11565 echo "configure:11566: checking for $ac_func" >&5
11566
11567 cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 /* System header to define __stub macros and hopefully few prototypes,
11571     which can conflict with char $ac_func(); below.  */
11572 #include <assert.h>
11573 /* Override any gcc2 internal prototype to avoid an error.  */
11574 /* We use char because int might match the return type of a gcc2
11575     builtin and then its argument prototype would still apply.  */
11576 char $ac_func();
11577
11578 int main() {
11579
11580 /* The GNU C library defines this for functions which it implements
11581     to always fail with ENOSYS.  Some functions are actually named
11582     something starting with __ and the normal name is an alias.  */
11583 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11584 choke me
11585 #else
11586 $ac_func();
11587 #endif
11588
11589 ; return 0; }
11590 EOF
11591 if { (eval echo configure:11592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11592   rm -rf conftest*
11593   eval "ac_cv_func_$ac_func=yes"
11594 else
11595   echo "configure: failed program was:" >&5
11596   cat conftest.$ac_ext >&5
11597   rm -rf conftest*
11598   eval "ac_cv_func_$ac_func=no"
11599 fi
11600 rm -f conftest*
11601
11602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11603   echo "$ac_t""yes" 1>&6
11604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11605   { test "$extra_verbose" = "yes" && cat << EOF
11606     Defining $ac_tr_func
11607 EOF
11608 cat >> confdefs.h <<EOF
11609 #define $ac_tr_func 1
11610 EOF
11611 }
11612  
11613 else
11614   echo "$ac_t""no" 1>&6
11615 fi
11616 done
11617
11618
11619 if test "$ac_cv_func_getloadavg" = "yes"; then
11620         for ac_hdr in sys/loadavg.h
11621 do
11622 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11623 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11624 echo "configure:11625: checking for $ac_hdr" >&5
11625
11626 cat > conftest.$ac_ext <<EOF
11627 #line 11628 "configure"
11628 #include "confdefs.h"
11629 #include <$ac_hdr>
11630 EOF
11631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11632 { (eval echo configure:11633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11634 if test -z "$ac_err"; then
11635   rm -rf conftest*
11636   eval "ac_cv_header_$ac_safe=yes"
11637 else
11638   echo "$ac_err" >&5
11639   echo "configure: failed program was:" >&5
11640   cat conftest.$ac_ext >&5
11641   rm -rf conftest*
11642   eval "ac_cv_header_$ac_safe=no"
11643 fi
11644 rm -f conftest*
11645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11646   echo "$ac_t""yes" 1>&6
11647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11648   { test "$extra_verbose" = "yes" && cat << EOF
11649     Defining $ac_tr_hdr
11650 EOF
11651 cat >> confdefs.h <<EOF
11652 #define $ac_tr_hdr 1
11653 EOF
11654 }
11655  
11656 else
11657   echo "$ac_t""no" 1>&6
11658 fi
11659 done
11660
11661 else
11662     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11663    echo "    xemacs will be linked with \"getloadavg.o\""
11664  fi
11665
11666     
11667 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11668 echo "configure:11669: checking for kstat_open in -lkstat" >&5
11669 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11670
11671 xe_check_libs=" -lkstat "
11672 cat > conftest.$ac_ext <<EOF
11673 #line 11674 "configure"
11674 #include "confdefs.h"
11675 /* Override any gcc2 internal prototype to avoid an error.  */
11676 /* We use char because int might match the return type of a gcc2
11677     builtin and then its argument prototype would still apply.  */
11678 char kstat_open();
11679
11680 int main() {
11681 kstat_open()
11682 ; return 0; }
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11685   rm -rf conftest*
11686   eval "ac_cv_lib_$ac_lib_var=yes"
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   eval "ac_cv_lib_$ac_lib_var=no"
11692 fi
11693 rm -f conftest*
11694 xe_check_libs=""
11695
11696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11697   echo "$ac_t""yes" 1>&6
11698     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11699     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11700   { test "$extra_verbose" = "yes" && cat << EOF
11701     Defining $ac_tr_lib
11702 EOF
11703 cat >> confdefs.h <<EOF
11704 #define $ac_tr_lib 1
11705 EOF
11706 }
11707
11708   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11709
11710 else
11711   echo "$ac_t""no" 1>&6
11712 fi
11713
11714
11715   for ac_hdr in kstat.h
11716 do
11717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11719 echo "configure:11720: checking for $ac_hdr" >&5
11720
11721 cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724 #include <$ac_hdr>
11725 EOF
11726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11727 { (eval echo configure:11728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11729 if test -z "$ac_err"; then
11730   rm -rf conftest*
11731   eval "ac_cv_header_$ac_safe=yes"
11732 else
11733   echo "$ac_err" >&5
11734   echo "configure: failed program was:" >&5
11735   cat conftest.$ac_ext >&5
11736   rm -rf conftest*
11737   eval "ac_cv_header_$ac_safe=no"
11738 fi
11739 rm -f conftest*
11740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11741   echo "$ac_t""yes" 1>&6
11742     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11743   { test "$extra_verbose" = "yes" && cat << EOF
11744     Defining $ac_tr_hdr
11745 EOF
11746 cat >> confdefs.h <<EOF
11747 #define $ac_tr_hdr 1
11748 EOF
11749 }
11750  
11751 else
11752   echo "$ac_t""no" 1>&6
11753 fi
11754 done
11755
11756
11757     
11758 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11759 echo "configure:11760: checking for kvm_read in -lkvm" >&5
11760 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11761
11762 xe_check_libs=" -lkvm "
11763 cat > conftest.$ac_ext <<EOF
11764 #line 11765 "configure"
11765 #include "confdefs.h"
11766 /* Override any gcc2 internal prototype to avoid an error.  */
11767 /* We use char because int might match the return type of a gcc2
11768     builtin and then its argument prototype would still apply.  */
11769 char kvm_read();
11770
11771 int main() {
11772 kvm_read()
11773 ; return 0; }
11774 EOF
11775 if { (eval echo configure:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11776   rm -rf conftest*
11777   eval "ac_cv_lib_$ac_lib_var=yes"
11778 else
11779   echo "configure: failed program was:" >&5
11780   cat conftest.$ac_ext >&5
11781   rm -rf conftest*
11782   eval "ac_cv_lib_$ac_lib_var=no"
11783 fi
11784 rm -f conftest*
11785 xe_check_libs=""
11786
11787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11788   echo "$ac_t""yes" 1>&6
11789     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11790     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11791   { test "$extra_verbose" = "yes" && cat << EOF
11792     Defining $ac_tr_lib
11793 EOF
11794 cat >> confdefs.h <<EOF
11795 #define $ac_tr_lib 1
11796 EOF
11797 }
11798
11799   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11800
11801 else
11802   echo "$ac_t""no" 1>&6
11803 fi
11804
11805
11806 fi
11807
11808 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11809 echo "configure:11810: checking whether netdb declares h_errno" >&5
11810 cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813 #include <netdb.h>
11814 int main() {
11815 return h_errno;
11816 ; return 0; }
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11819   rm -rf conftest*
11820   echo "$ac_t""yes" 1>&6
11821    { test "$extra_verbose" = "yes" && cat << \EOF
11822     Defining HAVE_H_ERRNO
11823 EOF
11824 cat >> confdefs.h <<\EOF
11825 #define HAVE_H_ERRNO 1
11826 EOF
11827 }
11828
11829 else
11830   echo "configure: failed program was:" >&5
11831   cat conftest.$ac_ext >&5
11832   rm -rf conftest*
11833   echo "$ac_t""no" 1>&6
11834 fi
11835 rm -f conftest*
11836
11837 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11838 echo "configure:11839: checking for sigsetjmp" >&5
11839 cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842 #include <setjmp.h>
11843 int main() {
11844 sigjmp_buf bar; sigsetjmp (bar, 0);
11845 ; return 0; }
11846 EOF
11847 if { (eval echo configure:11848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11848   rm -rf conftest*
11849   echo "$ac_t""yes" 1>&6
11850    { test "$extra_verbose" = "yes" && cat << \EOF
11851     Defining HAVE_SIGSETJMP
11852 EOF
11853 cat >> confdefs.h <<\EOF
11854 #define HAVE_SIGSETJMP 1
11855 EOF
11856 }
11857
11858 else
11859   echo "configure: failed program was:" >&5
11860   cat conftest.$ac_ext >&5
11861   rm -rf conftest*
11862   echo "$ac_t""no" 1>&6
11863 fi
11864 rm -f conftest*
11865
11866 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11867 echo "configure:11868: checking whether localtime caches TZ" >&5
11868
11869 if test "$ac_cv_func_tzset" = "yes"; then
11870 cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 #include <time.h>
11874 #if STDC_HEADERS
11875 # include <stdlib.h>
11876 #endif
11877 extern char **environ;
11878 unset_TZ ()
11879 {
11880   char **from, **to;
11881   for (to = from = environ; (*to = *from); from++)
11882     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11883       to++;
11884 }
11885 char TZ_GMT0[] = "TZ=GMT0";
11886 char TZ_PST8[] = "TZ=PST8";
11887 main()
11888 {
11889   time_t now = time ((time_t *) 0);
11890   int hour_GMT0, hour_unset;
11891   if (putenv (TZ_GMT0) != 0)
11892     exit (1);
11893   hour_GMT0 = localtime (&now)->tm_hour;
11894   unset_TZ ();
11895   hour_unset = localtime (&now)->tm_hour;
11896   if (putenv (TZ_PST8) != 0)
11897     exit (1);
11898   if (localtime (&now)->tm_hour == hour_GMT0)
11899     exit (1);
11900   unset_TZ ();
11901   if (localtime (&now)->tm_hour != hour_unset)
11902     exit (1);
11903   exit (0);
11904 }
11905 EOF
11906 if { (eval echo configure:11907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11907 then
11908   emacs_cv_localtime_cache=no
11909 else
11910   conftest_rc="$?"
11911   echo "configure: failed program was:" >&5
11912   cat conftest.$ac_ext >&5
11913   rm -fr conftest*
11914   emacs_cv_localtime_cache=yes
11915 fi
11916 rm -fr conftest*
11917 else
11918         # If we lack tzset, report that localtime does not cache TZ,
11919         # since we can't invalidate the cache if we don't have tzset.
11920         emacs_cv_localtime_cache=no
11921 fi
11922 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11923 if test $emacs_cv_localtime_cache = yes; then
11924   { test "$extra_verbose" = "yes" && cat << \EOF
11925     Defining LOCALTIME_CACHE
11926 EOF
11927 cat >> confdefs.h <<\EOF
11928 #define LOCALTIME_CACHE 1
11929 EOF
11930 }
11931
11932 fi
11933
11934 if test "$HAVE_TIMEVAL" = "yes"; then
11935 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11936 echo "configure:11937: checking whether gettimeofday accepts one or two arguments" >&5
11937 cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940
11941 #ifdef TIME_WITH_SYS_TIME
11942 #include <sys/time.h>
11943 #include <time.h>
11944 #else
11945 #ifdef HAVE_SYS_TIME_H
11946 #include <sys/time.h>
11947 #else
11948 #include <time.h>
11949 #endif
11950 #endif
11951   
11952 int main() {
11953
11954   struct timeval time;
11955   gettimeofday (&time, 0);
11956
11957 ; return 0; }
11958 EOF
11959 if { (eval echo configure:11960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11960   rm -rf conftest*
11961   echo "$ac_t""two" 1>&6
11962 else
11963   echo "configure: failed program was:" >&5
11964   cat conftest.$ac_ext >&5
11965   rm -rf conftest*
11966   echo "$ac_t""one" 1>&6
11967    { test "$extra_verbose" = "yes" && cat << \EOF
11968     Defining GETTIMEOFDAY_ONE_ARGUMENT
11969 EOF
11970 cat >> confdefs.h <<\EOF
11971 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11972 EOF
11973 }
11974
11975 fi
11976 rm -f conftest*
11977 fi
11978
11979
11980 echo $ac_n "checking for inline""... $ac_c" 1>&6
11981 echo "configure:11982: checking for inline" >&5
11982
11983 ac_cv_c_inline=no
11984 for ac_kw in inline __inline__ __inline; do
11985   cat > conftest.$ac_ext <<EOF
11986 #line 11987 "configure"
11987 #include "confdefs.h"
11988
11989 int main() {
11990 } $ac_kw foo() {
11991 ; return 0; }
11992 EOF
11993 if { (eval echo configure:11994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11994   rm -rf conftest*
11995   ac_cv_c_inline=$ac_kw; break
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999 fi
12000 rm -f conftest*
12001 done
12002
12003
12004 echo "$ac_t""$ac_cv_c_inline" 1>&6
12005 case "$ac_cv_c_inline" in
12006   inline | yes) ;;
12007   no) { test "$extra_verbose" = "yes" && cat << \EOF
12008     Defining inline = 
12009 EOF
12010 cat >> confdefs.h <<\EOF
12011 #define inline 
12012 EOF
12013 }
12014  ;;
12015   *)  { test "$extra_verbose" = "yes" && cat << EOF
12016     Defining inline = $ac_cv_c_inline
12017 EOF
12018 cat >> confdefs.h <<EOF
12019 #define inline $ac_cv_c_inline
12020 EOF
12021 }
12022  ;;
12023 esac
12024
12025 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12026    echo "    xemacs will be linked with \"inline.o\""
12027  fi
12028
12029
12030 if test "$__DECC" != "yes"; then
12031   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12032 # for constant arguments.  Useless!
12033 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12034 echo "configure:12035: checking for working alloca.h" >&5
12035
12036 cat > conftest.$ac_ext <<EOF
12037 #line 12038 "configure"
12038 #include "confdefs.h"
12039 #include <alloca.h>
12040 int main() {
12041 char *p = alloca(2 * sizeof(int));
12042 ; return 0; }
12043 EOF
12044 if { (eval echo configure:12045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12045   rm -rf conftest*
12046   ac_cv_header_alloca_h=yes
12047 else
12048   echo "configure: failed program was:" >&5
12049   cat conftest.$ac_ext >&5
12050   rm -rf conftest*
12051   ac_cv_header_alloca_h=no
12052 fi
12053 rm -f conftest*
12054
12055 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12056 if test $ac_cv_header_alloca_h = yes; then
12057   { test "$extra_verbose" = "yes" && cat << \EOF
12058     Defining HAVE_ALLOCA_H
12059 EOF
12060 cat >> confdefs.h <<\EOF
12061 #define HAVE_ALLOCA_H 1
12062 EOF
12063 }
12064
12065 fi
12066
12067 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12068 echo "configure:12069: checking for alloca" >&5
12069
12070 cat > conftest.$ac_ext <<EOF
12071 #line 12072 "configure"
12072 #include "confdefs.h"
12073
12074 #ifdef __GNUC__
12075 # define alloca __builtin_alloca
12076 #else
12077 # ifdef _MSC_VER
12078 #  include <malloc.h>
12079 #  define alloca _alloca
12080 # else
12081 #  if HAVE_ALLOCA_H
12082 #   include <alloca.h>
12083 #  else
12084 #   ifdef _AIX
12085  #pragma alloca
12086 #   else
12087 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12088 char *alloca ();
12089 #    endif
12090 #   endif
12091 #  endif
12092 # endif
12093 #endif
12094
12095 int main() {
12096 char *p = (char *) alloca(1);
12097 ; return 0; }
12098 EOF
12099 if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12100   rm -rf conftest*
12101   ac_cv_func_alloca_works=yes
12102 else
12103   echo "configure: failed program was:" >&5
12104   cat conftest.$ac_ext >&5
12105   rm -rf conftest*
12106   ac_cv_func_alloca_works=no
12107 fi
12108 rm -f conftest*
12109
12110 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12111 if test $ac_cv_func_alloca_works = yes; then
12112   { test "$extra_verbose" = "yes" && cat << \EOF
12113     Defining HAVE_ALLOCA
12114 EOF
12115 cat >> confdefs.h <<\EOF
12116 #define HAVE_ALLOCA 1
12117 EOF
12118 }
12119
12120 fi
12121
12122 if test $ac_cv_func_alloca_works = no; then
12123   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12124   # that cause trouble.  Some versions do not even contain alloca or
12125   # contain a buggy version.  If you still want to use their alloca,
12126   # use ar to extract alloca.o from them instead of compiling alloca.c.
12127   ALLOCA=alloca.${ac_objext}
12128   { test "$extra_verbose" = "yes" && cat << \EOF
12129     Defining C_ALLOCA
12130 EOF
12131 cat >> confdefs.h <<\EOF
12132 #define C_ALLOCA 1
12133 EOF
12134 }
12135
12136
12137 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12138 echo "configure:12139: checking whether alloca needs Cray hooks" >&5
12139
12140 cat > conftest.$ac_ext <<EOF
12141 #line 12142 "configure"
12142 #include "confdefs.h"
12143 #if defined(CRAY) && ! defined(CRAY2)
12144 webecray
12145 #else
12146 wenotbecray
12147 #endif
12148
12149 EOF
12150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12151   egrep "webecray" >/dev/null 2>&1; then
12152   rm -rf conftest*
12153   ac_cv_os_cray=yes
12154 else
12155   rm -rf conftest*
12156   ac_cv_os_cray=no
12157 fi
12158 rm -f conftest*
12159
12160
12161 echo "$ac_t""$ac_cv_os_cray" 1>&6
12162 if test $ac_cv_os_cray = yes; then
12163 for ac_func in _getb67 GETB67 getb67; do
12164   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12165 echo "configure:12166: checking for $ac_func" >&5
12166
12167 cat > conftest.$ac_ext <<EOF
12168 #line 12169 "configure"
12169 #include "confdefs.h"
12170 /* System header to define __stub macros and hopefully few prototypes,
12171     which can conflict with char $ac_func(); below.  */
12172 #include <assert.h>
12173 /* Override any gcc2 internal prototype to avoid an error.  */
12174 /* We use char because int might match the return type of a gcc2
12175     builtin and then its argument prototype would still apply.  */
12176 char $ac_func();
12177
12178 int main() {
12179
12180 /* The GNU C library defines this for functions which it implements
12181     to always fail with ENOSYS.  Some functions are actually named
12182     something starting with __ and the normal name is an alias.  */
12183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12184 choke me
12185 #else
12186 $ac_func();
12187 #endif
12188
12189 ; return 0; }
12190 EOF
12191 if { (eval echo configure:12192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12192   rm -rf conftest*
12193   eval "ac_cv_func_$ac_func=yes"
12194 else
12195   echo "configure: failed program was:" >&5
12196   cat conftest.$ac_ext >&5
12197   rm -rf conftest*
12198   eval "ac_cv_func_$ac_func=no"
12199 fi
12200 rm -f conftest*
12201
12202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12203   echo "$ac_t""yes" 1>&6
12204   { test "$extra_verbose" = "yes" && cat << EOF
12205     Defining CRAY_STACKSEG_END = $ac_func
12206 EOF
12207 cat >> confdefs.h <<EOF
12208 #define CRAY_STACKSEG_END $ac_func
12209 EOF
12210 }
12211
12212   break
12213 else
12214   echo "$ac_t""no" 1>&6
12215 fi
12216
12217 done
12218 fi
12219
12220 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12221 echo "configure:12222: checking stack direction for C alloca" >&5
12222
12223 cat > conftest.$ac_ext <<EOF
12224 #line 12225 "configure"
12225 #include "confdefs.h"
12226 find_stack_direction ()
12227 {
12228   static char *addr = 0;
12229   auto char dummy;
12230   if (addr == 0)
12231     {
12232       addr = &dummy;
12233       return find_stack_direction ();
12234     }
12235   else
12236     return (&dummy > addr) ? 1 : -1;
12237 }
12238 main ()
12239 {
12240   exit (find_stack_direction() < 0);
12241 }
12242 EOF
12243 if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12244 then
12245   ac_cv_c_stack_direction=1
12246 else
12247   conftest_rc="$?"
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -fr conftest*
12251   ac_cv_c_stack_direction=-1
12252 fi
12253 rm -fr conftest*
12254
12255 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12256 { test "$extra_verbose" = "yes" && cat << EOF
12257     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12258 EOF
12259 cat >> confdefs.h <<EOF
12260 #define STACK_DIRECTION $ac_cv_c_stack_direction
12261 EOF
12262 }
12263
12264 fi
12265
12266   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12267    echo "    xemacs will be linked with \"$ALLOCA\""
12268  fi
12269 fi
12270
12271 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12272 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12273 echo "configure:12274: checking for vfork.h" >&5
12274
12275 cat > conftest.$ac_ext <<EOF
12276 #line 12277 "configure"
12277 #include "confdefs.h"
12278 #include <vfork.h>
12279 EOF
12280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12281 { (eval echo configure:12282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12283 if test -z "$ac_err"; then
12284   rm -rf conftest*
12285   eval "ac_cv_header_$ac_safe=yes"
12286 else
12287   echo "$ac_err" >&5
12288   echo "configure: failed program was:" >&5
12289   cat conftest.$ac_ext >&5
12290   rm -rf conftest*
12291   eval "ac_cv_header_$ac_safe=no"
12292 fi
12293 rm -f conftest*
12294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12295   echo "$ac_t""yes" 1>&6
12296   { test "$extra_verbose" = "yes" && cat << \EOF
12297     Defining HAVE_VFORK_H
12298 EOF
12299 cat >> confdefs.h <<\EOF
12300 #define HAVE_VFORK_H 1
12301 EOF
12302 }
12303
12304 else
12305   echo "$ac_t""no" 1>&6
12306 fi
12307
12308 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12309 echo "configure:12310: checking for working vfork" >&5
12310
12311 cat > conftest.$ac_ext <<EOF
12312 #line 12313 "configure"
12313 #include "confdefs.h"
12314 /* Thanks to Paul Eggert for this test.  */
12315 #include <stdio.h>
12316 #include <sys/types.h>
12317 #include <sys/stat.h>
12318 #ifdef HAVE_UNISTD_H
12319 #include <unistd.h>
12320 #endif
12321 #ifdef HAVE_VFORK_H
12322 #include <vfork.h>
12323 #endif
12324 /* On some sparc systems, changes by the child to local and incoming
12325    argument registers are propagated back to the parent.
12326    The compiler is told about this with #include <vfork.h>,
12327    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12328    Test for this by using a static variable whose address
12329    is put into a register that is clobbered by the vfork.  */
12330 static
12331 #ifdef __cplusplus
12332 sparc_address_test (int arg)
12333 #else
12334 sparc_address_test (arg) int arg;
12335 #endif
12336 {
12337   static pid_t child;
12338   if (!child) {
12339     child = vfork ();
12340     if (child < 0) {
12341       perror ("vfork");
12342       _exit(2);
12343     }
12344     if (!child) {
12345       arg = getpid();
12346       write(-1, "", 0);
12347       _exit (arg);
12348     }
12349   }
12350 }
12351 main() {
12352   pid_t parent = getpid ();
12353   pid_t child;
12354
12355   sparc_address_test ();
12356
12357   child = vfork ();
12358
12359   if (child == 0) {
12360     /* Here is another test for sparc vfork register problems.
12361        This test uses lots of local variables, at least
12362        as many local variables as main has allocated so far
12363        including compiler temporaries.  4 locals are enough for
12364        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12365        A buggy compiler should reuse the register of parent
12366        for one of the local variables, since it will think that
12367        parent can't possibly be used any more in this routine.
12368        Assigning to the local variable will thus munge parent
12369        in the parent process.  */
12370     pid_t
12371       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12372       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12373     /* Convince the compiler that p..p7 are live; otherwise, it might
12374        use the same hardware register for all 8 local variables.  */
12375     if (p != p1 || p != p2 || p != p3 || p != p4
12376         || p != p5 || p != p6 || p != p7)
12377       _exit(1);
12378
12379     /* On some systems (e.g. IRIX 3.3),
12380        vfork doesn't separate parent from child file descriptors.
12381        If the child closes a descriptor before it execs or exits,
12382        this munges the parent's descriptor as well.
12383        Test for this by closing stdout in the child.  */
12384     _exit(close(fileno(stdout)) != 0);
12385   } else {
12386     int status;
12387     struct stat st;
12388
12389     while (wait(&status) != child)
12390       ;
12391     exit(
12392          /* Was there some problem with vforking?  */
12393          child < 0
12394
12395          /* Did the child fail?  (This shouldn't happen.)  */
12396          || status
12397
12398          /* Did the vfork/compiler bug occur?  */
12399          || parent != getpid()
12400
12401          /* Did the file descriptor bug occur?  */
12402          || fstat(fileno(stdout), &st) != 0
12403          );
12404   }
12405 }
12406 EOF
12407 if { (eval echo configure:12408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12408 then
12409   ac_cv_func_vfork_works=yes
12410 else
12411   conftest_rc="$?"
12412   echo "configure: failed program was:" >&5
12413   cat conftest.$ac_ext >&5
12414   rm -fr conftest*
12415   ac_cv_func_vfork_works=no
12416 fi
12417 rm -fr conftest*
12418
12419 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12420 if test $ac_cv_func_vfork_works = no; then
12421   { test "$extra_verbose" = "yes" && cat << \EOF
12422     Defining vfork = fork
12423 EOF
12424 cat >> confdefs.h <<\EOF
12425 #define vfork fork
12426 EOF
12427 }
12428
12429 fi
12430
12431
12432 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12433 echo "configure:12434: checking for working strcoll" >&5
12434
12435 cat > conftest.$ac_ext <<EOF
12436 #line 12437 "configure"
12437 #include "confdefs.h"
12438 #include <string.h>
12439 main ()
12440 {
12441   exit (strcoll ("abc", "def") >= 0 ||
12442         strcoll ("ABC", "DEF") >= 0 ||
12443         strcoll ("123", "456") >= 0);
12444 }
12445 EOF
12446 if { (eval echo configure:12447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12447 then
12448   ac_cv_func_strcoll_works=yes
12449 else
12450   conftest_rc="$?"
12451   echo "configure: failed program was:" >&5
12452   cat conftest.$ac_ext >&5
12453   rm -fr conftest*
12454   ac_cv_func_strcoll_works=no
12455 fi
12456 rm -fr conftest*
12457
12458 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12459 if test $ac_cv_func_strcoll_works = yes; then
12460   { test "$extra_verbose" = "yes" && cat << \EOF
12461     Defining HAVE_STRCOLL
12462 EOF
12463 cat >> confdefs.h <<\EOF
12464 #define HAVE_STRCOLL 1
12465 EOF
12466 }
12467
12468 fi
12469
12470
12471 for ac_func in getpgrp
12472 do
12473 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12474 echo "configure:12475: checking for $ac_func" >&5
12475
12476 cat > conftest.$ac_ext <<EOF
12477 #line 12478 "configure"
12478 #include "confdefs.h"
12479 /* System header to define __stub macros and hopefully few prototypes,
12480     which can conflict with char $ac_func(); below.  */
12481 #include <assert.h>
12482 /* Override any gcc2 internal prototype to avoid an error.  */
12483 /* We use char because int might match the return type of a gcc2
12484     builtin and then its argument prototype would still apply.  */
12485 char $ac_func();
12486
12487 int main() {
12488
12489 /* The GNU C library defines this for functions which it implements
12490     to always fail with ENOSYS.  Some functions are actually named
12491     something starting with __ and the normal name is an alias.  */
12492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12493 choke me
12494 #else
12495 $ac_func();
12496 #endif
12497
12498 ; return 0; }
12499 EOF
12500 if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12501   rm -rf conftest*
12502   eval "ac_cv_func_$ac_func=yes"
12503 else
12504   echo "configure: failed program was:" >&5
12505   cat conftest.$ac_ext >&5
12506   rm -rf conftest*
12507   eval "ac_cv_func_$ac_func=no"
12508 fi
12509 rm -f conftest*
12510
12511 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12512   echo "$ac_t""yes" 1>&6
12513     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12514   { test "$extra_verbose" = "yes" && cat << EOF
12515     Defining $ac_tr_func
12516 EOF
12517 cat >> confdefs.h <<EOF
12518 #define $ac_tr_func 1
12519 EOF
12520 }
12521  
12522 else
12523   echo "$ac_t""no" 1>&6
12524 fi
12525 done
12526
12527 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12528 echo "configure:12529: checking whether getpgrp takes no argument" >&5
12529
12530 cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533
12534 /*
12535  * If this system has a BSD-style getpgrp(),
12536  * which takes a pid argument, exit unsuccessfully.
12537  *
12538  * Snarfed from Chet Ramey's bash pgrp.c test program
12539  */
12540 #include <stdio.h>
12541 #include <sys/types.h>
12542
12543 int     pid;
12544 int     pg1, pg2, pg3, pg4;
12545 int     ng, np, s, child;
12546
12547 main()
12548 {
12549         pid = getpid();
12550         pg1 = getpgrp(0);
12551         pg2 = getpgrp();
12552         pg3 = getpgrp(pid);
12553         pg4 = getpgrp(1);
12554
12555         /*
12556          * If all of these values are the same, it's pretty sure that
12557          * we're on a system that ignores getpgrp's first argument.
12558          */
12559         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12560                 exit(0);
12561
12562         child = fork();
12563         if (child < 0)
12564                 exit(1);
12565         else if (child == 0) {
12566                 np = getpid();
12567                 /*
12568                  * If this is Sys V, this will not work; pgrp will be
12569                  * set to np because setpgrp just changes a pgrp to be
12570                  * the same as the pid.
12571                  */
12572                 setpgrp(np, pg1);
12573                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12574                 if (ng == pg1) {
12575                         exit(1);
12576                 } else {
12577                         exit(0);
12578                 }
12579         } else {
12580                 wait(&s);
12581                 exit(s>>8);
12582         }
12583 }
12584
12585 EOF
12586 if { (eval echo configure:12587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12587 then
12588   ac_cv_func_getpgrp_void=yes
12589 else
12590   conftest_rc="$?"
12591   echo "configure: failed program was:" >&5
12592   cat conftest.$ac_ext >&5
12593   rm -fr conftest*
12594   ac_cv_func_getpgrp_void=no
12595 fi
12596 rm -fr conftest*
12597
12598
12599 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12600 if test $ac_cv_func_getpgrp_void = yes; then
12601   { test "$extra_verbose" = "yes" && cat << \EOF
12602     Defining GETPGRP_VOID
12603 EOF
12604 cat >> confdefs.h <<\EOF
12605 #define GETPGRP_VOID 1
12606 EOF
12607 }
12608
12609 fi
12610
12611
12612 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12613 echo "configure:12614: checking for working mmap" >&5
12614 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12615 cat > conftest.$ac_ext <<EOF
12616 #line 12617 "configure"
12617 #include "confdefs.h"
12618 #include <stdio.h>
12619 #include <unistd.h>
12620 #include <fcntl.h>
12621 #include <sys/mman.h>
12622
12623 #ifndef MAP_VARIABLE
12624 #define MAP_VARIABLE 0
12625 #endif
12626
12627 #ifndef MAP_FAILED
12628 #define MAP_FAILED -1
12629 #endif
12630
12631 int main (int argc, char *argv[])
12632 {
12633   int fd = -1;
12634   caddr_t p;
12635 #ifndef MAP_ANONYMOUS
12636   fd = open ("/dev/zero", O_RDWR);
12637   if (fd < 0)
12638     return 1;
12639 #define MAP_ANONYMOUS 0
12640 #endif
12641   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12642            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12643            fd, 0) != (void *) MAP_FAILED)
12644     return 0;
12645   perror ("conftest: mmap failed");
12646   return 1;
12647 }
12648 EOF
12649 if { (eval echo configure:12650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12650 then
12651   have_mmap=yes
12652 else
12653   conftest_rc="$?"
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -fr conftest*
12657   have_mmap=no
12658 fi
12659 rm -fr conftest* ;;
12660 esac
12661 echo "$ac_t""$have_mmap" 1>&6
12662 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12663     Defining HAVE_MMAP
12664 EOF
12665 cat >> confdefs.h <<\EOF
12666 #define HAVE_MMAP 1
12667 EOF
12668 }
12669
12670
12671 case "$opsys" in cygwin*) 
12672         test "$rel_alloc" = "default" && rel_alloc=no ;;
12673 esac
12674 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12675 if test "$rel_alloc $have_mmap" = "default yes"; then
12676   if test "$doug_lea_malloc" = "yes"; then
12677         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12678 echo "configure:12679: checking for M_MMAP_THRESHOLD" >&5
12679     cat > conftest.$ac_ext <<EOF
12680 #line 12681 "configure"
12681 #include "confdefs.h"
12682 #include <malloc.h>
12683 int main() {
12684
12685 #ifndef M_MMAP_THRESHOLD
12686 #error No M_MMAP_THRESHOLD :-(
12687 !@+$%^&*_)(_ - unlikely to compile...
12688 #endif
12689
12690 ; return 0; }
12691 EOF
12692 if { (eval echo configure:12693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12693   rm -rf conftest*
12694   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12695 else
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -rf conftest*
12699   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12700 fi
12701 rm -f conftest*
12702   else
12703     rel_alloc=yes
12704   fi
12705 fi
12706 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12707     Defining REL_ALLOC
12708 EOF
12709 cat >> confdefs.h <<\EOF
12710 #define REL_ALLOC 1
12711 EOF
12712 }
12713
12714
12715 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12716 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12717 echo "configure:12718: checking for termios.h" >&5
12718
12719 cat > conftest.$ac_ext <<EOF
12720 #line 12721 "configure"
12721 #include "confdefs.h"
12722 #include <termios.h>
12723 EOF
12724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12725 { (eval echo configure:12726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12727 if test -z "$ac_err"; then
12728   rm -rf conftest*
12729   eval "ac_cv_header_$ac_safe=yes"
12730 else
12731   echo "$ac_err" >&5
12732   echo "configure: failed program was:" >&5
12733   cat conftest.$ac_ext >&5
12734   rm -rf conftest*
12735   eval "ac_cv_header_$ac_safe=no"
12736 fi
12737 rm -f conftest*
12738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12739   echo "$ac_t""yes" 1>&6
12740   { test "$extra_verbose" = "yes" && cat << \EOF
12741     Defining HAVE_TERMIOS
12742 EOF
12743 cat >> confdefs.h <<\EOF
12744 #define HAVE_TERMIOS 1
12745 EOF
12746 }
12747
12748   { test "$extra_verbose" = "yes" && cat << \EOF
12749     Defining SIGNALS_VIA_CHARACTERS
12750 EOF
12751 cat >> confdefs.h <<\EOF
12752 #define SIGNALS_VIA_CHARACTERS 1
12753 EOF
12754 }
12755
12756   { test "$extra_verbose" = "yes" && cat << \EOF
12757     Defining NO_TERMIO
12758 EOF
12759 cat >> confdefs.h <<\EOF
12760 #define NO_TERMIO 1
12761 EOF
12762 }
12763
12764 else
12765   echo "$ac_t""no" 1>&6
12766 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12767 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12768 echo "configure:12769: checking for termio.h" >&5
12769
12770 cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773 #include <termio.h>
12774 EOF
12775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12776 { (eval echo configure:12777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12778 if test -z "$ac_err"; then
12779   rm -rf conftest*
12780   eval "ac_cv_header_$ac_safe=yes"
12781 else
12782   echo "$ac_err" >&5
12783   echo "configure: failed program was:" >&5
12784   cat conftest.$ac_ext >&5
12785   rm -rf conftest*
12786   eval "ac_cv_header_$ac_safe=no"
12787 fi
12788 rm -f conftest*
12789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12790   echo "$ac_t""yes" 1>&6
12791   { test "$extra_verbose" = "yes" && cat << \EOF
12792     Defining HAVE_TERMIO
12793 EOF
12794 cat >> confdefs.h <<\EOF
12795 #define HAVE_TERMIO 1
12796 EOF
12797 }
12798
12799 else
12800   echo "$ac_t""no" 1>&6
12801 fi
12802
12803 fi
12804
12805
12806
12807 echo $ac_n "checking for socket""... $ac_c" 1>&6
12808 echo "configure:12809: checking for socket" >&5
12809
12810 cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 /* System header to define __stub macros and hopefully few prototypes,
12814     which can conflict with char socket(); below.  */
12815 #include <assert.h>
12816 /* Override any gcc2 internal prototype to avoid an error.  */
12817 /* We use char because int might match the return type of a gcc2
12818     builtin and then its argument prototype would still apply.  */
12819 char socket();
12820
12821 int main() {
12822
12823 /* The GNU C library defines this for functions which it implements
12824     to always fail with ENOSYS.  Some functions are actually named
12825     something starting with __ and the normal name is an alias.  */
12826 #if defined (__stub_socket) || defined (__stub___socket)
12827 choke me
12828 #else
12829 socket();
12830 #endif
12831
12832 ; return 0; }
12833 EOF
12834 if { (eval echo configure:12835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12835   rm -rf conftest*
12836   eval "ac_cv_func_socket=yes"
12837 else
12838   echo "configure: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   rm -rf conftest*
12841   eval "ac_cv_func_socket=no"
12842 fi
12843 rm -f conftest*
12844
12845 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12846   echo "$ac_t""yes" 1>&6
12847   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12848 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12849 echo "configure:12850: checking for netinet/in.h" >&5
12850
12851 cat > conftest.$ac_ext <<EOF
12852 #line 12853 "configure"
12853 #include "confdefs.h"
12854 #include <netinet/in.h>
12855 EOF
12856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12857 { (eval echo configure:12858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12859 if test -z "$ac_err"; then
12860   rm -rf conftest*
12861   eval "ac_cv_header_$ac_safe=yes"
12862 else
12863   echo "$ac_err" >&5
12864   echo "configure: failed program was:" >&5
12865   cat conftest.$ac_ext >&5
12866   rm -rf conftest*
12867   eval "ac_cv_header_$ac_safe=no"
12868 fi
12869 rm -f conftest*
12870 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12871   echo "$ac_t""yes" 1>&6
12872   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12873 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12874 echo "configure:12875: checking for arpa/inet.h" >&5
12875
12876 cat > conftest.$ac_ext <<EOF
12877 #line 12878 "configure"
12878 #include "confdefs.h"
12879 #include <arpa/inet.h>
12880 EOF
12881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12882 { (eval echo configure:12883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12884 if test -z "$ac_err"; then
12885   rm -rf conftest*
12886   eval "ac_cv_header_$ac_safe=yes"
12887 else
12888   echo "$ac_err" >&5
12889   echo "configure: failed program was:" >&5
12890   cat conftest.$ac_ext >&5
12891   rm -rf conftest*
12892   eval "ac_cv_header_$ac_safe=no"
12893 fi
12894 rm -f conftest*
12895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12896   echo "$ac_t""yes" 1>&6
12897   
12898   { test "$extra_verbose" = "yes" && cat << \EOF
12899     Defining HAVE_SOCKETS
12900 EOF
12901 cat >> confdefs.h <<\EOF
12902 #define HAVE_SOCKETS 1
12903 EOF
12904 }
12905
12906       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12907 echo "configure:12908: checking "for sun_len member in struct sockaddr_un"" >&5
12908       cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911
12912 #include <sys/types.h>
12913 #include <sys/socket.h>
12914 #include <sys/un.h>
12915       
12916 int main() {
12917 static struct sockaddr_un x; x.sun_len = 1;
12918 ; return 0; }
12919 EOF
12920 if { (eval echo configure:12921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12921   rm -rf conftest*
12922   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12923     Defining HAVE_SOCKADDR_SUN_LEN
12924 EOF
12925 cat >> confdefs.h <<\EOF
12926 #define HAVE_SOCKADDR_SUN_LEN 1
12927 EOF
12928 }
12929
12930 else
12931   echo "configure: failed program was:" >&5
12932   cat conftest.$ac_ext >&5
12933   rm -rf conftest*
12934   echo "$ac_t""no" 1>&6
12935 fi
12936 rm -f conftest*
12937       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12938 echo "configure:12939: checking "for ip_mreq struct in netinet/in.h"" >&5
12939       cat > conftest.$ac_ext <<EOF
12940 #line 12941 "configure"
12941 #include "confdefs.h"
12942
12943 #include <sys/types.h>
12944 #include <netinet/in.h>
12945       
12946 int main() {
12947 static struct ip_mreq x;
12948 ; return 0; }
12949 EOF
12950 if { (eval echo configure:12951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12951   rm -rf conftest*
12952   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12953     Defining HAVE_MULTICAST
12954 EOF
12955 cat >> confdefs.h <<\EOF
12956 #define HAVE_MULTICAST 1
12957 EOF
12958 }
12959
12960 else
12961   echo "configure: failed program was:" >&5
12962   cat conftest.$ac_ext >&5
12963   rm -rf conftest*
12964   echo "$ac_t""no" 1>&6
12965 fi
12966 rm -f conftest*
12967 else
12968   echo "$ac_t""no" 1>&6
12969 fi
12970
12971 else
12972   echo "$ac_t""no" 1>&6
12973 fi
12974
12975 else
12976   echo "$ac_t""no" 1>&6
12977 fi
12978
12979
12980 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12981 echo "configure:12982: checking for msgget" >&5
12982
12983 cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 /* System header to define __stub macros and hopefully few prototypes,
12987     which can conflict with char msgget(); below.  */
12988 #include <assert.h>
12989 /* Override any gcc2 internal prototype to avoid an error.  */
12990 /* We use char because int might match the return type of a gcc2
12991     builtin and then its argument prototype would still apply.  */
12992 char msgget();
12993
12994 int main() {
12995
12996 /* The GNU C library defines this for functions which it implements
12997     to always fail with ENOSYS.  Some functions are actually named
12998     something starting with __ and the normal name is an alias.  */
12999 #if defined (__stub_msgget) || defined (__stub___msgget)
13000 choke me
13001 #else
13002 msgget();
13003 #endif
13004
13005 ; return 0; }
13006 EOF
13007 if { (eval echo configure:13008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13008   rm -rf conftest*
13009   eval "ac_cv_func_msgget=yes"
13010 else
13011   echo "configure: failed program was:" >&5
13012   cat conftest.$ac_ext >&5
13013   rm -rf conftest*
13014   eval "ac_cv_func_msgget=no"
13015 fi
13016 rm -f conftest*
13017
13018 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13019   echo "$ac_t""yes" 1>&6
13020   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13021 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13022 echo "configure:13023: checking for sys/ipc.h" >&5
13023
13024 cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027 #include <sys/ipc.h>
13028 EOF
13029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13030 { (eval echo configure:13031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13032 if test -z "$ac_err"; then
13033   rm -rf conftest*
13034   eval "ac_cv_header_$ac_safe=yes"
13035 else
13036   echo "$ac_err" >&5
13037   echo "configure: failed program was:" >&5
13038   cat conftest.$ac_ext >&5
13039   rm -rf conftest*
13040   eval "ac_cv_header_$ac_safe=no"
13041 fi
13042 rm -f conftest*
13043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13044   echo "$ac_t""yes" 1>&6
13045   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13046 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13047 echo "configure:13048: checking for sys/msg.h" >&5
13048
13049 cat > conftest.$ac_ext <<EOF
13050 #line 13051 "configure"
13051 #include "confdefs.h"
13052 #include <sys/msg.h>
13053 EOF
13054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13055 { (eval echo configure:13056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13057 if test -z "$ac_err"; then
13058   rm -rf conftest*
13059   eval "ac_cv_header_$ac_safe=yes"
13060 else
13061   echo "$ac_err" >&5
13062   echo "configure: failed program was:" >&5
13063   cat conftest.$ac_ext >&5
13064   rm -rf conftest*
13065   eval "ac_cv_header_$ac_safe=no"
13066 fi
13067 rm -f conftest*
13068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13069   echo "$ac_t""yes" 1>&6
13070   { test "$extra_verbose" = "yes" && cat << \EOF
13071     Defining HAVE_SYSVIPC
13072 EOF
13073 cat >> confdefs.h <<\EOF
13074 #define HAVE_SYSVIPC 1
13075 EOF
13076 }
13077
13078 else
13079   echo "$ac_t""no" 1>&6
13080 fi
13081
13082 else
13083   echo "$ac_t""no" 1>&6
13084 fi
13085
13086 else
13087   echo "$ac_t""no" 1>&6
13088 fi
13089
13090
13091 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13092 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13093 echo "configure:13094: checking for dirent.h" >&5
13094
13095 cat > conftest.$ac_ext <<EOF
13096 #line 13097 "configure"
13097 #include "confdefs.h"
13098 #include <dirent.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   { test "$extra_verbose" = "yes" && cat << \EOF
13117     Defining SYSV_SYSTEM_DIR
13118 EOF
13119 cat >> confdefs.h <<\EOF
13120 #define SYSV_SYSTEM_DIR 1
13121 EOF
13122 }
13123
13124 else
13125   echo "$ac_t""no" 1>&6
13126 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13127 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13128 echo "configure:13129: checking for sys/dir.h" >&5
13129
13130 cat > conftest.$ac_ext <<EOF
13131 #line 13132 "configure"
13132 #include "confdefs.h"
13133 #include <sys/dir.h>
13134 EOF
13135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13136 { (eval echo configure:13137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13138 if test -z "$ac_err"; then
13139   rm -rf conftest*
13140   eval "ac_cv_header_$ac_safe=yes"
13141 else
13142   echo "$ac_err" >&5
13143   echo "configure: failed program was:" >&5
13144   cat conftest.$ac_ext >&5
13145   rm -rf conftest*
13146   eval "ac_cv_header_$ac_safe=no"
13147 fi
13148 rm -f conftest*
13149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13150   echo "$ac_t""yes" 1>&6
13151   :
13152 else
13153   echo "$ac_t""no" 1>&6
13154 { test "$extra_verbose" = "yes" && cat << \EOF
13155     Defining NONSYSTEM_DIR_LIBRARY
13156 EOF
13157 cat >> confdefs.h <<\EOF
13158 #define NONSYSTEM_DIR_LIBRARY 1
13159 EOF
13160 }
13161
13162 fi
13163
13164 fi
13165
13166
13167 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13168 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13169 echo "configure:13170: checking for nlist.h" >&5
13170
13171 cat > conftest.$ac_ext <<EOF
13172 #line 13173 "configure"
13173 #include "confdefs.h"
13174 #include <nlist.h>
13175 EOF
13176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13177 { (eval echo configure:13178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13179 if test -z "$ac_err"; then
13180   rm -rf conftest*
13181   eval "ac_cv_header_$ac_safe=yes"
13182 else
13183   echo "$ac_err" >&5
13184   echo "configure: failed program was:" >&5
13185   cat conftest.$ac_ext >&5
13186   rm -rf conftest*
13187   eval "ac_cv_header_$ac_safe=no"
13188 fi
13189 rm -f conftest*
13190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13191   echo "$ac_t""yes" 1>&6
13192   { test "$extra_verbose" = "yes" && cat << \EOF
13193     Defining NLIST_STRUCT
13194 EOF
13195 cat >> confdefs.h <<\EOF
13196 #define NLIST_STRUCT 1
13197 EOF
13198 }
13199
13200 else
13201   echo "$ac_t""no" 1>&6
13202 fi
13203
13204
13205
13206 echo "checking "for sound support"" 1>&6
13207 echo "configure:13208: checking "for sound support"" >&5
13208 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13209
13210 if test "$with_native_sound" != "no"; then
13211     if test -n "$native_sound_lib"; then
13212     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13213 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13214 echo "configure:13215: checking for multimedia/audio_device.h" >&5
13215
13216 cat > conftest.$ac_ext <<EOF
13217 #line 13218 "configure"
13218 #include "confdefs.h"
13219 #include <multimedia/audio_device.h>
13220 EOF
13221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13222 { (eval echo configure:13223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13224 if test -z "$ac_err"; then
13225   rm -rf conftest*
13226   eval "ac_cv_header_$ac_safe=yes"
13227 else
13228   echo "$ac_err" >&5
13229   echo "configure: failed program was:" >&5
13230   cat conftest.$ac_ext >&5
13231   rm -rf conftest*
13232   eval "ac_cv_header_$ac_safe=no"
13233 fi
13234 rm -f conftest*
13235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13236   echo "$ac_t""yes" 1>&6
13237   sound_found=yes sound_cflags=""
13238       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13239    echo "    xemacs will be linked with \"sunplay.o\""
13240  fi
13241 else
13242   echo "$ac_t""no" 1>&6
13243 fi
13244
13245   fi
13246
13247     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13248     sound_found=yes
13249     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13250    echo "    xemacs will be linked with \"sunplay.o\""
13251  fi
13252     if test -d "/usr/demo/SOUND/include"
13253       then sound_cflags="-I/usr/demo/SOUND/include"
13254       else sound_cflags="-I/usr/demo/SOUND"
13255     fi
13256     if test -z "$native_sound_lib" ; then
13257       if test -r "/usr/demo/SOUND/lib/libaudio.a"
13258         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13259         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
13260       fi
13261     fi
13262   fi
13263
13264     if test -z "$sound_found"; then
13265     case "$canonical" in
13266     *-sgi-* )
13267       if test -z "$native_sound_lib"; then
13268         
13269 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13270 echo "configure:13271: checking for ALopenport in -laudio" >&5
13271 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13272
13273 xe_check_libs=" -laudio "
13274 cat > conftest.$ac_ext <<EOF
13275 #line 13276 "configure"
13276 #include "confdefs.h"
13277 /* Override any gcc2 internal prototype to avoid an error.  */
13278 /* We use char because int might match the return type of a gcc2
13279     builtin and then its argument prototype would still apply.  */
13280 char ALopenport();
13281
13282 int main() {
13283 ALopenport()
13284 ; return 0; }
13285 EOF
13286 if { (eval echo configure:13287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13287   rm -rf conftest*
13288   eval "ac_cv_lib_$ac_lib_var=yes"
13289 else
13290   echo "configure: failed program was:" >&5
13291   cat conftest.$ac_ext >&5
13292   rm -rf conftest*
13293   eval "ac_cv_lib_$ac_lib_var=no"
13294 fi
13295 rm -f conftest*
13296 xe_check_libs=""
13297
13298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13299   echo "$ac_t""yes" 1>&6
13300   native_sound_lib="-laudio"
13301 else
13302   echo "$ac_t""no" 1>&6
13303 fi
13304
13305
13306       fi
13307       if test -n "$native_sound_lib"; then
13308         sound_found=yes sound_cflags=""
13309         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13310    echo "    xemacs will be linked with \"sgiplay.o\""
13311  fi
13312       fi ;;
13313     hppa*-hp-hpux* )
13314       if test -z "$native_sound_lib"; then
13315         
13316 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13317 echo "configure:13318: checking for AOpenAudio in -lAlib" >&5
13318 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13319
13320 xe_check_libs=" -lAlib "
13321 cat > conftest.$ac_ext <<EOF
13322 #line 13323 "configure"
13323 #include "confdefs.h"
13324 /* Override any gcc2 internal prototype to avoid an error.  */
13325 /* We use char because int might match the return type of a gcc2
13326     builtin and then its argument prototype would still apply.  */
13327 char AOpenAudio();
13328
13329 int main() {
13330 AOpenAudio()
13331 ; return 0; }
13332 EOF
13333 if { (eval echo configure:13334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13334   rm -rf conftest*
13335   eval "ac_cv_lib_$ac_lib_var=yes"
13336 else
13337   echo "configure: failed program was:" >&5
13338   cat conftest.$ac_ext >&5
13339   rm -rf conftest*
13340   eval "ac_cv_lib_$ac_lib_var=no"
13341 fi
13342 rm -f conftest*
13343 xe_check_libs=""
13344
13345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13346   echo "$ac_t""yes" 1>&6
13347   native_sound_lib="-lAlib"
13348 else
13349   echo "$ac_t""no" 1>&6
13350 fi
13351
13352
13353       fi
13354       if test -n "$native_sound_lib"; then
13355         sound_found=yes
13356         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13357    echo "    xemacs will be linked with \"hpplay.o\""
13358  fi
13359         if test "$GCC" = "yes" # Kludge city
13360           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13361           else sound_cflags="+e -I/usr/audio/examples"
13362         fi
13363       fi ;;
13364     esac
13365   fi
13366
13367     if test -z "$sound_found"; then
13368     if test "$with_msw" = "yes"; then
13369     sound_found=yes
13370     native_sound_lib=
13371     fi
13372   fi
13373
13374     if test -z "$sound_found"; then
13375     for dir in "machine" "sys" "linux"; do
13376       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13377 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13378 echo "configure:13379: checking for ${dir}/soundcard.h" >&5
13379
13380 cat > conftest.$ac_ext <<EOF
13381 #line 13382 "configure"
13382 #include "confdefs.h"
13383 #include <${dir}/soundcard.h>
13384 EOF
13385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13386 { (eval echo configure:13387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13388 if test -z "$ac_err"; then
13389   rm -rf conftest*
13390   eval "ac_cv_header_$ac_safe=yes"
13391 else
13392   echo "$ac_err" >&5
13393   echo "configure: failed program was:" >&5
13394   cat conftest.$ac_ext >&5
13395   rm -rf conftest*
13396   eval "ac_cv_header_$ac_safe=no"
13397 fi
13398 rm -f conftest*
13399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13400   echo "$ac_t""yes" 1>&6
13401   sound_found=yes
13402        need_miscplay=yes
13403         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13404    echo "    xemacs will be linked with \"linuxplay.o\""
13405  fi
13406         { test "$extra_verbose" = "yes" && cat << EOF
13407     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13408 EOF
13409 cat >> confdefs.h <<EOF
13410 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13411 EOF
13412 }
13413
13414         break
13415 else
13416   echo "$ac_t""no" 1>&6
13417 fi
13418
13419     done
13420   fi
13421
13422   test "$sound_found" = "yes" && with_native_sound=yes
13423 fi
13424
13425 if test "$with_native_sound" = "yes"; then
13426   { test "$extra_verbose" = "yes" && cat << \EOF
13427     Defining HAVE_NATIVE_SOUND
13428 EOF
13429 cat >> confdefs.h <<\EOF
13430 #define HAVE_NATIVE_SOUND 1
13431 EOF
13432 }
13433
13434   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13435 fi
13436
13437 if test "$with_nas_sound" != "no"; then
13438   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13439 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13440 echo "configure:13441: checking for audio/audiolib.h" >&5
13441
13442 cat > conftest.$ac_ext <<EOF
13443 #line 13444 "configure"
13444 #include "confdefs.h"
13445 #include <audio/audiolib.h>
13446 EOF
13447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13448 { (eval echo configure:13449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13450 if test -z "$ac_err"; then
13451   rm -rf conftest*
13452   eval "ac_cv_header_$ac_safe=yes"
13453 else
13454   echo "$ac_err" >&5
13455   echo "configure: failed program was:" >&5
13456   cat conftest.$ac_ext >&5
13457   rm -rf conftest*
13458   eval "ac_cv_header_$ac_safe=no"
13459 fi
13460 rm -f conftest*
13461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13462   echo "$ac_t""yes" 1>&6
13463   
13464     
13465 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13466 echo "configure:13467: checking for AuOpenServer in -laudio" >&5
13467 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13468
13469 xe_check_libs=" -laudio "
13470 cat > conftest.$ac_ext <<EOF
13471 #line 13472 "configure"
13472 #include "confdefs.h"
13473 /* Override any gcc2 internal prototype to avoid an error.  */
13474 /* We use char because int might match the return type of a gcc2
13475     builtin and then its argument prototype would still apply.  */
13476 char AuOpenServer();
13477
13478 int main() {
13479 AuOpenServer()
13480 ; return 0; }
13481 EOF
13482 if { (eval echo configure:13483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13483   rm -rf conftest*
13484   eval "ac_cv_lib_$ac_lib_var=yes"
13485 else
13486   echo "configure: failed program was:" >&5
13487   cat conftest.$ac_ext >&5
13488   rm -rf conftest*
13489   eval "ac_cv_lib_$ac_lib_var=no"
13490 fi
13491 rm -f conftest*
13492 xe_check_libs=""
13493
13494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13495   echo "$ac_t""yes" 1>&6
13496   have_nas_sound=yes
13497 else
13498   echo "$ac_t""no" 1>&6
13499 fi
13500
13501
13502 else
13503   echo "$ac_t""no" 1>&6
13504 fi
13505
13506   if test "$have_nas_sound" = "yes"; then
13507     with_nas_sound=yes
13508     { test "$extra_verbose" = "yes" && cat << \EOF
13509     Defining HAVE_NAS_SOUND
13510 EOF
13511 cat >> confdefs.h <<\EOF
13512 #define HAVE_NAS_SOUND 1
13513 EOF
13514 }
13515
13516     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13517    echo "    xemacs will be linked with \"nas.o\""
13518  fi
13519     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13520             cat > conftest.$ac_ext <<EOF
13521 #line 13522 "configure"
13522 #include "confdefs.h"
13523 #include <audio/Xtutil.h>
13524 EOF
13525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13526   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13527   :
13528 else
13529   rm -rf conftest*
13530   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13531     Defining NAS_NO_ERROR_JUMP
13532 EOF
13533 cat >> confdefs.h <<\EOF
13534 #define NAS_NO_ERROR_JUMP 1
13535 EOF
13536 }
13537
13538 fi
13539 rm -f conftest*
13540
13541   else
13542     test "$with_nas_sound" = "yes" && \
13543       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13544     with_nas_sound=no
13545   fi
13546 fi
13547
13548 if test "$with_esd_sound" != "no"; then
13549   # Extract the first word of "esd-config", so it can be a program name with args.
13550 set dummy esd-config; ac_word=$2
13551 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13552 echo "configure:13553: checking for $ac_word" >&5
13553
13554 if test -n "$have_esd_config"; then
13555   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13556 else
13557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13558   ac_dummy="$PATH"
13559   for ac_dir in $ac_dummy; do
13560     test -z "$ac_dir" && ac_dir=.
13561     if test -f $ac_dir/$ac_word; then
13562       ac_cv_prog_have_esd_config="yes"
13563       break
13564     fi
13565   done
13566   IFS="$ac_save_ifs"
13567   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13568 fi
13569 have_esd_config="$ac_cv_prog_have_esd_config"
13570 if test -n "$have_esd_config"; then
13571   echo "$ac_t""$have_esd_config" 1>&6
13572 else
13573   echo "$ac_t""no" 1>&6
13574 fi
13575
13576   if test "$have_esd_config" = "yes"; then
13577     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13578     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
13579     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13580     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13581 echo "configure:13582: checking for esd_play_stream" >&5
13582
13583 cat > conftest.$ac_ext <<EOF
13584 #line 13585 "configure"
13585 #include "confdefs.h"
13586 /* System header to define __stub macros and hopefully few prototypes,
13587     which can conflict with char esd_play_stream(); below.  */
13588 #include <assert.h>
13589 /* Override any gcc2 internal prototype to avoid an error.  */
13590 /* We use char because int might match the return type of a gcc2
13591     builtin and then its argument prototype would still apply.  */
13592 char esd_play_stream();
13593
13594 int main() {
13595
13596 /* The GNU C library defines this for functions which it implements
13597     to always fail with ENOSYS.  Some functions are actually named
13598     something starting with __ and the normal name is an alias.  */
13599 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13600 choke me
13601 #else
13602 esd_play_stream();
13603 #endif
13604
13605 ; return 0; }
13606 EOF
13607 if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13608   rm -rf conftest*
13609   eval "ac_cv_func_esd_play_stream=yes"
13610 else
13611   echo "configure: failed program was:" >&5
13612   cat conftest.$ac_ext >&5
13613   rm -rf conftest*
13614   eval "ac_cv_func_esd_play_stream=no"
13615 fi
13616 rm -f conftest*
13617
13618 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13619   echo "$ac_t""yes" 1>&6
13620   have_esd_sound=yes
13621 else
13622   echo "$ac_t""no" 1>&6
13623 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13624 fi
13625
13626   fi
13627
13628   if test "$have_esd_sound" = "yes"; then
13629     with_esd_sound=yes
13630     need_miscplay=yes
13631     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13632    echo "    xemacs will be linked with \"esd.o\""
13633  fi
13634     { test "$extra_verbose" = "yes" && cat << \EOF
13635     Defining HAVE_ESD_SOUND
13636 EOF
13637 cat >> confdefs.h <<\EOF
13638 #define HAVE_ESD_SOUND 1
13639 EOF
13640 }
13641
13642   else
13643     test "$with_esd_sound" = "yes" && \
13644       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13645     with_esd_sound=no
13646   fi
13647 fi
13648
13649 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13650    echo "    xemacs will be linked with \"miscplay.o\""
13651  fi
13652
13653
13654 test -z "$with_tty" && with_tty=yes
13655
13656 if test "$with_tty" = "yes"  ; then
13657   echo "checking for TTY-related features" 1>&6
13658 echo "configure:13659: checking for TTY-related features" >&5
13659   { test "$extra_verbose" = "yes" && cat << \EOF
13660     Defining HAVE_TTY
13661 EOF
13662 cat >> confdefs.h <<\EOF
13663 #define HAVE_TTY 1
13664 EOF
13665 }
13666
13667   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
13668    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\""
13669  fi
13670
13671     if test -z "$with_ncurses"; then
13672     
13673 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13674 echo "configure:13675: checking for tgetent in -lncurses" >&5
13675 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13676
13677 xe_check_libs=" -lncurses "
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* Override any gcc2 internal prototype to avoid an error.  */
13682 /* We use char because int might match the return type of a gcc2
13683     builtin and then its argument prototype would still apply.  */
13684 char tgetent();
13685
13686 int main() {
13687 tgetent()
13688 ; return 0; }
13689 EOF
13690 if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13691   rm -rf conftest*
13692   eval "ac_cv_lib_$ac_lib_var=yes"
13693 else
13694   echo "configure: failed program was:" >&5
13695   cat conftest.$ac_ext >&5
13696   rm -rf conftest*
13697   eval "ac_cv_lib_$ac_lib_var=no"
13698 fi
13699 rm -f conftest*
13700 xe_check_libs=""
13701
13702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13703   echo "$ac_t""yes" 1>&6
13704   with_ncurses=yes
13705 else
13706   echo "$ac_t""no" 1>&6
13707 with_ncurses=no
13708 fi
13709
13710
13711   fi
13712   if test "$with_ncurses" = "yes"; then
13713     { test "$extra_verbose" = "yes" && cat << \EOF
13714     Defining HAVE_NCURSES
13715 EOF
13716 cat >> confdefs.h <<\EOF
13717 #define HAVE_NCURSES 1
13718 EOF
13719 }
13720
13721     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13722 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13723 echo "configure:13724: checking for ncurses/curses.h" >&5
13724
13725 cat > conftest.$ac_ext <<EOF
13726 #line 13727 "configure"
13727 #include "confdefs.h"
13728 #include <ncurses/curses.h>
13729 EOF
13730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13731 { (eval echo configure:13732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13733 if test -z "$ac_err"; then
13734   rm -rf conftest*
13735   eval "ac_cv_header_$ac_safe=yes"
13736 else
13737   echo "$ac_err" >&5
13738   echo "configure: failed program was:" >&5
13739   cat conftest.$ac_ext >&5
13740   rm -rf conftest*
13741   eval "ac_cv_header_$ac_safe=no"
13742 fi
13743 rm -f conftest*
13744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13745   echo "$ac_t""yes" 1>&6
13746   curses_h_file=ncurses/curses.h
13747 else
13748   echo "$ac_t""no" 1>&6
13749 fi
13750
13751     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13752 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13753 echo "configure:13754: checking for ncurses/term.h" >&5
13754
13755 cat > conftest.$ac_ext <<EOF
13756 #line 13757 "configure"
13757 #include "confdefs.h"
13758 #include <ncurses/term.h>
13759 EOF
13760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13761 { (eval echo configure:13762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13763 if test -z "$ac_err"; then
13764   rm -rf conftest*
13765   eval "ac_cv_header_$ac_safe=yes"
13766 else
13767   echo "$ac_err" >&5
13768   echo "configure: failed program was:" >&5
13769   cat conftest.$ac_ext >&5
13770   rm -rf conftest*
13771   eval "ac_cv_header_$ac_safe=no"
13772 fi
13773 rm -f conftest*
13774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13775   echo "$ac_t""yes" 1>&6
13776   term_h_file=ncurses/term.h
13777 else
13778   echo "$ac_t""no" 1>&6
13779 fi
13780
13781     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13782    echo "    xemacs will be linked with \"terminfo.o\""
13783  fi
13784     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13785
13786     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13787                         save_c_switch_site="$c_switch_site"
13788       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13789       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13790 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13791 echo "configure:13792: checking for ncurses/curses.h" >&5
13792
13793 cat > conftest.$ac_ext <<EOF
13794 #line 13795 "configure"
13795 #include "confdefs.h"
13796 #include <ncurses/curses.h>
13797 EOF
13798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13799 { (eval echo configure:13800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13801 if test -z "$ac_err"; then
13802   rm -rf conftest*
13803   eval "ac_cv_header_$ac_safe=yes"
13804 else
13805   echo "$ac_err" >&5
13806   echo "configure: failed program was:" >&5
13807   cat conftest.$ac_ext >&5
13808   rm -rf conftest*
13809   eval "ac_cv_header_$ac_safe=no"
13810 fi
13811 rm -f conftest*
13812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13813   echo "$ac_t""yes" 1>&6
13814   curses_h_file=ncurses/curses.h
13815 else
13816   echo "$ac_t""no" 1>&6
13817 fi
13818
13819       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13820         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13821         else c_switch_site="$save_c_switch_site"
13822       fi
13823     fi
13824   else         if test "$have_terminfo" = "yes"; then
13825       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13826    echo "    xemacs will be linked with \"terminfo.o\""
13827  fi
13828       if test -n "$libs_termcap"; then
13829         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13830       else
13831         for lib in curses termlib termcap; do
13832           
13833 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13834 echo "configure:13835: checking for tgetent in -l$lib" >&5
13835 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13836
13837 xe_check_libs=" -l$lib "
13838 cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 /* Override any gcc2 internal prototype to avoid an error.  */
13842 /* We use char because int might match the return type of a gcc2
13843     builtin and then its argument prototype would still apply.  */
13844 char tgetent();
13845
13846 int main() {
13847 tgetent()
13848 ; return 0; }
13849 EOF
13850 if { (eval echo configure:13851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13851   rm -rf conftest*
13852   eval "ac_cv_lib_$ac_lib_var=yes"
13853 else
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   eval "ac_cv_lib_$ac_lib_var=no"
13858 fi
13859 rm -f conftest*
13860 xe_check_libs=""
13861
13862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13863   echo "$ac_t""yes" 1>&6
13864   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13865 else
13866   echo "$ac_t""no" 1>&6
13867 fi
13868
13869
13870         done
13871       fi
13872     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13873                                 
13874 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13875 echo "configure:13876: checking for tgoto in -ltermcap" >&5
13876 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13877
13878 xe_check_libs=" -ltermcap "
13879 cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 /* Override any gcc2 internal prototype to avoid an error.  */
13883 /* We use char because int might match the return type of a gcc2
13884     builtin and then its argument prototype would still apply.  */
13885 char tgoto();
13886
13887 int main() {
13888 tgoto()
13889 ; return 0; }
13890 EOF
13891 if { (eval echo configure:13892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13892   rm -rf conftest*
13893   eval "ac_cv_lib_$ac_lib_var=yes"
13894 else
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -rf conftest*
13898   eval "ac_cv_lib_$ac_lib_var=no"
13899 fi
13900 rm -f conftest*
13901 xe_check_libs=""
13902
13903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13904   echo "$ac_t""yes" 1>&6
13905     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13906     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13907   { test "$extra_verbose" = "yes" && cat << EOF
13908     Defining $ac_tr_lib
13909 EOF
13910 cat >> confdefs.h <<EOF
13911 #define $ac_tr_lib 1
13912 EOF
13913 }
13914
13915   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13916
13917 else
13918   echo "$ac_t""no" 1>&6
13919 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13920    echo "    xemacs will be linked with \"tparam.o\""
13921  fi
13922 fi
13923
13924
13925       else
13926         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13927    echo "    xemacs will be linked with \"tparam.o\""
13928  fi
13929       fi
13930                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13931       if test -n "$libs_termcap"; then
13932         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13933       else
13934         
13935 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13936 echo "configure:13937: checking for tgetent in -lcurses" >&5
13937 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13938
13939 xe_check_libs=" -lcurses "
13940 cat > conftest.$ac_ext <<EOF
13941 #line 13942 "configure"
13942 #include "confdefs.h"
13943 /* Override any gcc2 internal prototype to avoid an error.  */
13944 /* We use char because int might match the return type of a gcc2
13945     builtin and then its argument prototype would still apply.  */
13946 char tgetent();
13947
13948 int main() {
13949 tgetent()
13950 ; return 0; }
13951 EOF
13952 if { (eval echo configure:13953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13953   rm -rf conftest*
13954   eval "ac_cv_lib_$ac_lib_var=yes"
13955 else
13956   echo "configure: failed program was:" >&5
13957   cat conftest.$ac_ext >&5
13958   rm -rf conftest*
13959   eval "ac_cv_lib_$ac_lib_var=no"
13960 fi
13961 rm -f conftest*
13962 xe_check_libs=""
13963
13964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13965   echo "$ac_t""yes" 1>&6
13966   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13967 else
13968   echo "$ac_t""no" 1>&6
13969 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13970 echo "configure:13971: checking for tgetent in -ltermcap" >&5
13971 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13972
13973 xe_check_libs=" -ltermcap "
13974 cat > conftest.$ac_ext <<EOF
13975 #line 13976 "configure"
13976 #include "confdefs.h"
13977 /* Override any gcc2 internal prototype to avoid an error.  */
13978 /* We use char because int might match the return type of a gcc2
13979     builtin and then its argument prototype would still apply.  */
13980 char tgetent();
13981
13982 int main() {
13983 tgetent()
13984 ; return 0; }
13985 EOF
13986 if { (eval echo configure:13987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13987   rm -rf conftest*
13988   eval "ac_cv_lib_$ac_lib_var=yes"
13989 else
13990   echo "configure: failed program was:" >&5
13991   cat conftest.$ac_ext >&5
13992   rm -rf conftest*
13993   eval "ac_cv_lib_$ac_lib_var=no"
13994 fi
13995 rm -f conftest*
13996 xe_check_libs=""
13997
13998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13999   echo "$ac_t""yes" 1>&6
14000   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14001 else
14002   echo "$ac_t""no" 1>&6
14003 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14004    echo "    xemacs will be linked with \"termcap.o\""
14005  fi
14006 fi
14007
14008
14009 fi
14010
14011
14012       fi
14013     fi
14014   fi
14015   { test "$extra_verbose" = "yes" && cat << EOF
14016     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14017 EOF
14018 cat >> confdefs.h <<EOF
14019 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14020 EOF
14021 }
14022
14023   { test "$extra_verbose" = "yes" && cat << EOF
14024     Defining TERM_H_FILE = "${term_h_file-term.h}"
14025 EOF
14026 cat >> confdefs.h <<EOF
14027 #define TERM_H_FILE "${term_h_file-term.h}"
14028 EOF
14029 }
14030
14031
14032     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14033 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14034 echo "configure:14035: checking for gpm.h" >&5
14035
14036 cat > conftest.$ac_ext <<EOF
14037 #line 14038 "configure"
14038 #include "confdefs.h"
14039 #include <gpm.h>
14040 EOF
14041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14042 { (eval echo configure:14043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14044 if test -z "$ac_err"; then
14045   rm -rf conftest*
14046   eval "ac_cv_header_$ac_safe=yes"
14047 else
14048   echo "$ac_err" >&5
14049   echo "configure: failed program was:" >&5
14050   cat conftest.$ac_ext >&5
14051   rm -rf conftest*
14052   eval "ac_cv_header_$ac_safe=no"
14053 fi
14054 rm -f conftest*
14055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14056   echo "$ac_t""yes" 1>&6
14057   :
14058 else
14059   echo "$ac_t""no" 1>&6
14060 with_gpm=no
14061 fi
14062  }
14063   test -z "$with_gpm" && { 
14064 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14065 echo "configure:14066: checking for Gpm_Open in -lgpm" >&5
14066 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14067
14068 xe_check_libs=" -lgpm "
14069 cat > conftest.$ac_ext <<EOF
14070 #line 14071 "configure"
14071 #include "confdefs.h"
14072 /* Override any gcc2 internal prototype to avoid an error.  */
14073 /* We use char because int might match the return type of a gcc2
14074     builtin and then its argument prototype would still apply.  */
14075 char Gpm_Open();
14076
14077 int main() {
14078 Gpm_Open()
14079 ; return 0; }
14080 EOF
14081 if { (eval echo configure:14082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14082   rm -rf conftest*
14083   eval "ac_cv_lib_$ac_lib_var=yes"
14084 else
14085   echo "configure: failed program was:" >&5
14086   cat conftest.$ac_ext >&5
14087   rm -rf conftest*
14088   eval "ac_cv_lib_$ac_lib_var=no"
14089 fi
14090 rm -f conftest*
14091 xe_check_libs=""
14092
14093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14094   echo "$ac_t""yes" 1>&6
14095   with_gpm=yes
14096 else
14097   echo "$ac_t""no" 1>&6
14098 with_gpm=no
14099 fi
14100
14101  }
14102   if test "$with_gpm" = "yes"; then
14103     { test "$extra_verbose" = "yes" && cat << \EOF
14104     Defining HAVE_GPM
14105 EOF
14106 cat >> confdefs.h <<\EOF
14107 #define HAVE_GPM 1
14108 EOF
14109 }
14110
14111     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14112    echo "    xemacs will be linked with \"gpmevent.o\""
14113  fi
14114     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14115   fi
14116
14117 else   for feature in ncurses gpm; do
14118     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14119       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14120     fi
14121     eval "with_${feature}=no"
14122   done
14123 fi 
14124 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
14125    echo "    xemacs will be linked with \"event-unixoid.o\""
14126  fi
14127
14128
14129 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14130   != "no no no" && echo "checking for database support" 1>&6
14131 echo "configure:14132: checking for database support" >&5
14132
14133 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14134   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14135 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14136 echo "configure:14137: checking for ndbm.h" >&5
14137
14138 cat > conftest.$ac_ext <<EOF
14139 #line 14140 "configure"
14140 #include "confdefs.h"
14141 #include <ndbm.h>
14142 EOF
14143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14144 { (eval echo configure:14145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14146 if test -z "$ac_err"; then
14147   rm -rf conftest*
14148   eval "ac_cv_header_$ac_safe=yes"
14149 else
14150   echo "$ac_err" >&5
14151   echo "configure: failed program was:" >&5
14152   cat conftest.$ac_ext >&5
14153   rm -rf conftest*
14154   eval "ac_cv_header_$ac_safe=no"
14155 fi
14156 rm -f conftest*
14157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14158   echo "$ac_t""yes" 1>&6
14159   :
14160 else
14161   echo "$ac_t""no" 1>&6
14162
14163     test "$with_database_gdbm" = "yes" -o \
14164          "$with_database_dbm"  = "yes" && \
14165       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14166     with_database_gdbm=no with_database_dbm=no
14167 fi
14168
14169 fi
14170
14171 if test "$with_database_gdbm" != "no"; then
14172   
14173 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14174 echo "configure:14175: checking for dbm_open in -lgdbm" >&5
14175 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14176
14177 xe_check_libs=" -lgdbm "
14178 cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 /* Override any gcc2 internal prototype to avoid an error.  */
14182 /* We use char because int might match the return type of a gcc2
14183     builtin and then its argument prototype would still apply.  */
14184 char dbm_open();
14185
14186 int main() {
14187 dbm_open()
14188 ; return 0; }
14189 EOF
14190 if { (eval echo configure:14191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14191   rm -rf conftest*
14192   eval "ac_cv_lib_$ac_lib_var=yes"
14193 else
14194   echo "configure: failed program was:" >&5
14195   cat conftest.$ac_ext >&5
14196   rm -rf conftest*
14197   eval "ac_cv_lib_$ac_lib_var=no"
14198 fi
14199 rm -f conftest*
14200 xe_check_libs=""
14201
14202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14203   echo "$ac_t""yes" 1>&6
14204   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14205 else
14206   echo "$ac_t""no" 1>&6
14207 if test "$with_database_gdbm" = "yes"; then
14208      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14209    fi
14210    with_database_gdbm=no
14211 fi
14212
14213
14214 fi
14215
14216 if test "$with_database_dbm" != "no"; then
14217   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14218 echo "configure:14219: checking for dbm_open" >&5
14219
14220 cat > conftest.$ac_ext <<EOF
14221 #line 14222 "configure"
14222 #include "confdefs.h"
14223 /* System header to define __stub macros and hopefully few prototypes,
14224     which can conflict with char dbm_open(); below.  */
14225 #include <assert.h>
14226 /* Override any gcc2 internal prototype to avoid an error.  */
14227 /* We use char because int might match the return type of a gcc2
14228     builtin and then its argument prototype would still apply.  */
14229 char dbm_open();
14230
14231 int main() {
14232
14233 /* The GNU C library defines this for functions which it implements
14234     to always fail with ENOSYS.  Some functions are actually named
14235     something starting with __ and the normal name is an alias.  */
14236 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14237 choke me
14238 #else
14239 dbm_open();
14240 #endif
14241
14242 ; return 0; }
14243 EOF
14244 if { (eval echo configure:14245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14245   rm -rf conftest*
14246   eval "ac_cv_func_dbm_open=yes"
14247 else
14248   echo "configure: failed program was:" >&5
14249   cat conftest.$ac_ext >&5
14250   rm -rf conftest*
14251   eval "ac_cv_func_dbm_open=no"
14252 fi
14253 rm -f conftest*
14254
14255 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14256   echo "$ac_t""yes" 1>&6
14257   with_database_dbm=yes libdbm=
14258 else
14259   echo "$ac_t""no" 1>&6
14260
14261     
14262 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14263 echo "configure:14264: checking for dbm_open in -ldbm" >&5
14264 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14265
14266 xe_check_libs=" -ldbm "
14267 cat > conftest.$ac_ext <<EOF
14268 #line 14269 "configure"
14269 #include "confdefs.h"
14270 /* Override any gcc2 internal prototype to avoid an error.  */
14271 /* We use char because int might match the return type of a gcc2
14272     builtin and then its argument prototype would still apply.  */
14273 char dbm_open();
14274
14275 int main() {
14276 dbm_open()
14277 ; return 0; }
14278 EOF
14279 if { (eval echo configure:14280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14280   rm -rf conftest*
14281   eval "ac_cv_lib_$ac_lib_var=yes"
14282 else
14283   echo "configure: failed program was:" >&5
14284   cat conftest.$ac_ext >&5
14285   rm -rf conftest*
14286   eval "ac_cv_lib_$ac_lib_var=no"
14287 fi
14288 rm -f conftest*
14289 xe_check_libs=""
14290
14291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14292   echo "$ac_t""yes" 1>&6
14293   with_database_dbm=yes libdbm=-ldbm
14294 else
14295   echo "$ac_t""no" 1>&6
14296 test "$with_database_dbm" = "yes" && \
14297         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14298       with_database_dbm=no
14299 fi
14300
14301
14302 fi
14303
14304 fi
14305
14306 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14307 test "$with_database_gdbm" = "yes" -o \
14308      "$with_database_dbm"  = "yes" && \
14309   { test "$extra_verbose" = "yes" && cat << \EOF
14310     Defining HAVE_DBM
14311 EOF
14312 cat >> confdefs.h <<\EOF
14313 #define HAVE_DBM 1
14314 EOF
14315 }
14316
14317
14318 if test "$with_database_berkdb" != "no"; then
14319   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14320 echo "configure:14321: checking for Berkeley db.h" >&5
14321   for header in "db/db.h" "db.h"; do
14322     case "$opsys" in
14323         *freebsd*)
14324     cat > conftest.$ac_ext <<EOF
14325 #line 14326 "configure"
14326 #include "confdefs.h"
14327
14328 #include <stdlib.h>
14329 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14330 #ifdef HAVE_INTTYPES_H
14331 #define __BIT_TYPES_DEFINED__
14332 #include <inttypes.h>
14333 #endif
14334 #endif
14335 #include <$header>
14336
14337 int main() {
14338
14339 ; return 0; }
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14342   rm -rf conftest*
14343   db_h_file="$header"; break
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347 fi
14348 rm -f conftest*
14349         ;;
14350         *)
14351     cat > conftest.$ac_ext <<EOF
14352 #line 14353 "configure"
14353 #include "confdefs.h"
14354
14355 #include <stdlib.h>
14356 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14357 #ifdef HAVE_INTTYPES_H
14358 #define __BIT_TYPES_DEFINED__
14359 #include <inttypes.h>
14360 typedef uint8_t  u_int8_t;
14361 typedef uint16_t u_int16_t;
14362 typedef uint32_t u_int32_t;
14363 #ifdef WE_DONT_NEED_QUADS
14364 typedef uint64_t u_int64_t;
14365 #endif
14366 #endif
14367 #endif
14368 #include <$header>
14369
14370 int main() {
14371
14372 ; return 0; }
14373 EOF
14374 if { (eval echo configure:14375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14375   rm -rf conftest*
14376   db_h_file="$header"; break
14377 else
14378   echo "configure: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380 fi
14381 rm -f conftest*
14382         ;;
14383         esac
14384   done
14385   if test -z "$db_h_file"
14386   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14387   else echo "$ac_t""$db_h_file" 1>&6
14388   fi
14389
14390   if test "$with_database_berkdb" != "no"; then
14391     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14392 echo "configure:14393: checking for Berkeley DB version" >&5
14393     cat > conftest.$ac_ext <<EOF
14394 #line 14395 "configure"
14395 #include "confdefs.h"
14396 #include <$db_h_file>
14397 #if DB_VERSION_MAJOR > 1
14398 yes
14399 #endif
14400
14401 EOF
14402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14403   egrep "yes" >/dev/null 2>&1; then
14404   rm -rf conftest*
14405   cat > conftest.$ac_ext <<EOF
14406 #line 14407 "configure"
14407 #include "confdefs.h"
14408 #include <$db_h_file>
14409 #if DB_VERSION_MAJOR > 2
14410 yes
14411 #endif
14412
14413 EOF
14414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14415   egrep "yes" >/dev/null 2>&1; then
14416   rm -rf conftest*
14417   echo "$ac_t""3" 1>&6; dbfunc=db_create
14418 else
14419   rm -rf conftest*
14420   
14421     echo "$ac_t""2" 1>&6; dbfunc=db_open
14422 fi
14423 rm -f conftest*
14424
14425 else
14426   rm -rf conftest*
14427   
14428     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14429 fi
14430 rm -f conftest*
14431
14432     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14433 echo "configure:14434: checking for $dbfunc" >&5
14434
14435 cat > conftest.$ac_ext <<EOF
14436 #line 14437 "configure"
14437 #include "confdefs.h"
14438 /* System header to define __stub macros and hopefully few prototypes,
14439     which can conflict with char $dbfunc(); below.  */
14440 #include <assert.h>
14441 /* Override any gcc2 internal prototype to avoid an error.  */
14442 /* We use char because int might match the return type of a gcc2
14443     builtin and then its argument prototype would still apply.  */
14444 char $dbfunc();
14445
14446 int main() {
14447
14448 /* The GNU C library defines this for functions which it implements
14449     to always fail with ENOSYS.  Some functions are actually named
14450     something starting with __ and the normal name is an alias.  */
14451 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14452 choke me
14453 #else
14454 $dbfunc();
14455 #endif
14456
14457 ; return 0; }
14458 EOF
14459 if { (eval echo configure:14460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14460   rm -rf conftest*
14461   eval "ac_cv_func_$dbfunc=yes"
14462 else
14463   echo "configure: failed program was:" >&5
14464   cat conftest.$ac_ext >&5
14465   rm -rf conftest*
14466   eval "ac_cv_func_$dbfunc=no"
14467 fi
14468 rm -f conftest*
14469
14470 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14471   echo "$ac_t""yes" 1>&6
14472   with_database_berkdb=yes need_libdb=no
14473 else
14474   echo "$ac_t""no" 1>&6
14475
14476     
14477 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14478 echo "configure:14479: checking for $dbfunc in -ldb" >&5
14479 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14480
14481 xe_check_libs=" -ldb "
14482 cat > conftest.$ac_ext <<EOF
14483 #line 14484 "configure"
14484 #include "confdefs.h"
14485 /* Override any gcc2 internal prototype to avoid an error.  */
14486 /* We use char because int might match the return type of a gcc2
14487     builtin and then its argument prototype would still apply.  */
14488 char $dbfunc();
14489
14490 int main() {
14491 $dbfunc()
14492 ; return 0; }
14493 EOF
14494 if { (eval echo configure:14495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14495   rm -rf conftest*
14496   eval "ac_cv_lib_$ac_lib_var=yes"
14497 else
14498   echo "configure: failed program was:" >&5
14499   cat conftest.$ac_ext >&5
14500   rm -rf conftest*
14501   eval "ac_cv_lib_$ac_lib_var=no"
14502 fi
14503 rm -f conftest*
14504 xe_check_libs=""
14505
14506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14507   echo "$ac_t""yes" 1>&6
14508   with_database_berkdb=yes need_libdb=yes
14509 else
14510   echo "$ac_t""no" 1>&6
14511 fi
14512
14513
14514 fi
14515
14516   fi
14517
14518   if test "$with_database_berkdb" = "yes"; then
14519     { test "$extra_verbose" = "yes" && cat << EOF
14520     Defining DB_H_FILE = "$db_h_file"
14521 EOF
14522 cat >> confdefs.h <<EOF
14523 #define DB_H_FILE "$db_h_file"
14524 EOF
14525 }
14526
14527     { test "$extra_verbose" = "yes" && cat << \EOF
14528     Defining HAVE_BERKELEY_DB
14529 EOF
14530 cat >> confdefs.h <<\EOF
14531 #define HAVE_BERKELEY_DB 1
14532 EOF
14533 }
14534
14535     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14536   else with_database_berkdb=no
14537   fi
14538 fi
14539
14540 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14541      != "no no no"; then
14542   { test "$extra_verbose" = "yes" && cat << \EOF
14543     Defining HAVE_DATABASE
14544 EOF
14545 cat >> confdefs.h <<\EOF
14546 #define HAVE_DATABASE 1
14547 EOF
14548 }
14549
14550   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14551    echo "    xemacs will be linked with \"database.o\""
14552  fi
14553   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
14554     { test "$extra_verbose" = "yes" && cat << \EOF
14555     Defining HAVE_CHISE
14556 EOF
14557 cat >> confdefs.h <<\EOF
14558 #define HAVE_CHISE 1
14559 EOF
14560 }
14561
14562   fi
14563 fi
14564
14565 if test "$with_socks" = "yes"; then
14566   
14567 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14568 echo "configure:14569: checking for SOCKSinit in -lsocks" >&5
14569 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14570
14571 xe_check_libs=" -lsocks "
14572 cat > conftest.$ac_ext <<EOF
14573 #line 14574 "configure"
14574 #include "confdefs.h"
14575 /* Override any gcc2 internal prototype to avoid an error.  */
14576 /* We use char because int might match the return type of a gcc2
14577     builtin and then its argument prototype would still apply.  */
14578 char SOCKSinit();
14579
14580 int main() {
14581 SOCKSinit()
14582 ; return 0; }
14583 EOF
14584 if { (eval echo configure:14585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14585   rm -rf conftest*
14586   eval "ac_cv_lib_$ac_lib_var=yes"
14587 else
14588   echo "configure: failed program was:" >&5
14589   cat conftest.$ac_ext >&5
14590   rm -rf conftest*
14591   eval "ac_cv_lib_$ac_lib_var=no"
14592 fi
14593 rm -f conftest*
14594 xe_check_libs=""
14595
14596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14597   echo "$ac_t""yes" 1>&6
14598     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14599     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14600   { test "$extra_verbose" = "yes" && cat << EOF
14601     Defining $ac_tr_lib
14602 EOF
14603 cat >> confdefs.h <<EOF
14604 #define $ac_tr_lib 1
14605 EOF
14606 }
14607
14608   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14609
14610 else
14611   echo "$ac_t""no" 1>&6
14612 fi
14613
14614
14615   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14616     Defining HAVE_SOCKS
14617 EOF
14618 cat >> confdefs.h <<\EOF
14619 #define HAVE_SOCKS 1
14620 EOF
14621 }
14622
14623 fi
14624
14625 if test "$usage_tracking" = "yes"; then
14626   { test "$extra_verbose" = "yes" && cat << \EOF
14627     Defining USAGE_TRACKING
14628 EOF
14629 cat >> confdefs.h <<\EOF
14630 #define USAGE_TRACKING 1
14631 EOF
14632 }
14633
14634   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14635 fi
14636
14637 if test "$with_modules" != "no"; then
14638   echo "checking for module support" 1>&6
14639 echo "configure:14640: checking for module support" >&5
14640
14641     if test "$with_msw" = "yes"; then
14642     have_dl=yes;
14643   else
14644         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14645 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14646 echo "configure:14647: checking for dlfcn.h" >&5
14647
14648 cat > conftest.$ac_ext <<EOF
14649 #line 14650 "configure"
14650 #include "confdefs.h"
14651 #include <dlfcn.h>
14652 EOF
14653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14654 { (eval echo configure:14655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14656 if test -z "$ac_err"; then
14657   rm -rf conftest*
14658   eval "ac_cv_header_$ac_safe=yes"
14659 else
14660   echo "$ac_err" >&5
14661   echo "configure: failed program was:" >&5
14662   cat conftest.$ac_ext >&5
14663   rm -rf conftest*
14664   eval "ac_cv_header_$ac_safe=no"
14665 fi
14666 rm -f conftest*
14667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14668   echo "$ac_t""yes" 1>&6
14669   
14670       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14671 echo "configure:14672: checking for dlopen in -lc" >&5
14672       cat > conftest.$ac_ext <<EOF
14673 #line 14674 "configure"
14674 #include "confdefs.h"
14675 #include <dlfcn.h>
14676 int main() {
14677         dlopen ("", 0);
14678 ; return 0; }
14679 EOF
14680 if { (eval echo configure:14681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14681   rm -rf conftest*
14682    have_dl=yes 
14683 else
14684   echo "configure: failed program was:" >&5
14685   cat conftest.$ac_ext >&5
14686   rm -rf conftest*
14687   
14688       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14689 echo "configure:14690: checking for dlopen in -ldl" >&5
14690       ac_save_LIBS="$LIBS"
14691       LIBS="-ldl $LIBS"
14692       cat > conftest.$ac_ext <<EOF
14693 #line 14694 "configure"
14694 #include "confdefs.h"
14695 #include <dlfcn.h>
14696 int main() {
14697         dlopen ("", 0);
14698 ; return 0; }
14699 EOF
14700 if { (eval echo configure:14701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14701   rm -rf conftest*
14702    have_dl=yes 
14703 else
14704   echo "configure: failed program was:" >&5
14705   cat conftest.$ac_ext >&5
14706   rm -rf conftest*
14707   LIBS="$ac_save_LIBS"
14708 fi
14709 rm -f conftest*
14710       ac_save_LIBS=
14711 fi
14712 rm -f conftest*
14713 else
14714   echo "$ac_t""no" 1>&6
14715 fi
14716
14717     if test -n "$have_dl"; then
14718       { test "$extra_verbose" = "yes" && cat << \EOF
14719     Defining HAVE_DLOPEN
14720 EOF
14721 cat >> confdefs.h <<\EOF
14722 #define HAVE_DLOPEN 1
14723 EOF
14724 }
14725
14726     else
14727       
14728 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14729 echo "configure:14730: checking for shl_load in -ldld" >&5
14730 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14731
14732 xe_check_libs=" -ldld "
14733 cat > conftest.$ac_ext <<EOF
14734 #line 14735 "configure"
14735 #include "confdefs.h"
14736 /* Override any gcc2 internal prototype to avoid an error.  */
14737 /* We use char because int might match the return type of a gcc2
14738     builtin and then its argument prototype would still apply.  */
14739 char shl_load();
14740
14741 int main() {
14742 shl_load()
14743 ; return 0; }
14744 EOF
14745 if { (eval echo configure:14746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14746   rm -rf conftest*
14747   eval "ac_cv_lib_$ac_lib_var=yes"
14748 else
14749   echo "configure: failed program was:" >&5
14750   cat conftest.$ac_ext >&5
14751   rm -rf conftest*
14752   eval "ac_cv_lib_$ac_lib_var=no"
14753 fi
14754 rm -f conftest*
14755 xe_check_libs=""
14756
14757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14758   echo "$ac_t""yes" 1>&6
14759   libdl=dld have_dl=yes;
14760         { test "$extra_verbose" = "yes" && cat << \EOF
14761     Defining HAVE_SHL_LOAD
14762 EOF
14763 cat >> confdefs.h <<\EOF
14764 #define HAVE_SHL_LOAD 1
14765 EOF
14766 }
14767
14768 else
14769   echo "$ac_t""no" 1>&6
14770
14771 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14772 echo "configure:14773: checking for dld_init in -ldld" >&5
14773 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14774
14775 xe_check_libs=" -ldld "
14776 cat > conftest.$ac_ext <<EOF
14777 #line 14778 "configure"
14778 #include "confdefs.h"
14779 /* Override any gcc2 internal prototype to avoid an error.  */
14780 /* We use char because int might match the return type of a gcc2
14781     builtin and then its argument prototype would still apply.  */
14782 char dld_init();
14783
14784 int main() {
14785 dld_init()
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   eval "ac_cv_lib_$ac_lib_var=yes"
14791 else
14792   echo "configure: failed program was:" >&5
14793   cat conftest.$ac_ext >&5
14794   rm -rf conftest*
14795   eval "ac_cv_lib_$ac_lib_var=no"
14796 fi
14797 rm -f conftest*
14798 xe_check_libs=""
14799
14800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14801   echo "$ac_t""yes" 1>&6
14802   libdl=dld have_dl=yes;
14803         { test "$extra_verbose" = "yes" && cat << \EOF
14804     Defining HAVE_DLD_INIT
14805 EOF
14806 cat >> confdefs.h <<\EOF
14807 #define HAVE_DLD_INIT 1
14808 EOF
14809 }
14810
14811 else
14812   echo "$ac_t""no" 1>&6
14813 fi
14814
14815
14816 fi
14817
14818
14819     fi
14820   fi 
14821   if test -n "$have_dl"; then
14822         
14823 dll_ld=
14824 dll_ldflags=
14825 dll_cflags=
14826 dll_post=
14827 dll_ldo="-o"
14828 ld_dynamic_link_flags=
14829 xehost=$canonical
14830 xealias=$internal_configuration
14831
14832 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14833 echo "configure:14834: checking how to build dynamic libraries for ${xehost}" >&5
14834 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14835 case "$xehost" in
14836 *-*-linux-gnu*) ;;
14837 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14838 esac
14839
14840 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14841 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14842 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14843
14844 case "$xehost_os" in
14845 aix3*)
14846   # AIX sometimes has problems with the GCC collect2 program.  For some
14847   # reason, if we set the COLLECT_NAMES environment variable, the problems
14848   # vanish in a puff of smoke.
14849   if test "${COLLECT_NAMES+set}" != set; then
14850     COLLECT_NAMES=
14851     export COLLECT_NAMES
14852   fi
14853   ;;
14854 esac
14855
14856 # Now see if the compiler is really GCC.
14857 if test "$GCC" = "yes"; then
14858   XEGCC=yes
14859 else
14860   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14861 echo "configure:14862: checking checking whether we are using GNU C" >&5
14862   cat > conftest.$ac_ext <<EOF
14863 #line 14864 "configure"
14864 #include "confdefs.h"
14865
14866 #ifdef __GNUC__
14867   yes;
14868 #endif
14869
14870 EOF
14871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14872   egrep "yes" >/dev/null 2>&1; then
14873   rm -rf conftest*
14874   XEGCC=yes
14875 else
14876   rm -rf conftest*
14877   XEGCC=no
14878 fi
14879 rm -f conftest*
14880
14881   echo "$ac_t""${XEGCC}" 1>&6
14882 fi
14883
14884 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14885 echo "configure:14886: checking how to produce PIC code" >&5
14886 wl=
14887
14888 can_build_shared=yes
14889 if test "$XEGCC" = yes; then
14890   wl='-Wl,'
14891
14892   case "$xehost_os" in
14893   aix[3-9]* | irix[5-9]* | osf[3-9])
14894     # PIC is the default for these OSes.
14895     ;;
14896
14897   os2*)
14898     # We can build DLLs from non-PIC.
14899     ;;
14900   amigaos*)
14901     # FIXME: we need at least 68020 code to build shared libraries, but
14902     # adding the `-m68020' flag to GCC prevents building anything better,
14903     # like `-m68040'.
14904     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14905     ;;
14906   *cygwin* | *mingw* )
14907     # PIC is the default
14908     ;;
14909   *)
14910     dll_cflags='-fPIC'
14911     ;;
14912   esac
14913 else
14914   # PORTME Check for PIC flags for the system compiler.
14915   case "$xehost_os" in
14916   hpux9* | hpux1[0-9]*)
14917     # Is there a better link_static_flag that works with the bundled CC?
14918     wl='-Wl,'
14919     dll_cflags='+Z'
14920     ;;
14921
14922   irix[5-9]*)
14923     wl='-Wl,'
14924     # PIC (with -KPIC) is the default.
14925     ;;
14926
14927   os2*)
14928     # We can build DLLs from non-PIC.
14929     ;;
14930
14931   osf[3-9]*)
14932     # All OSF/1 code is PIC.
14933     wl='-Wl,'
14934     ;;
14935
14936   aix[3-9]*)
14937     # All AIX code is PIC.
14938     wl='-Wl,'
14939     ;;
14940
14941   sco3.2v5*)
14942     dll_cflags='-belf -Kpic'
14943     wl='-Wl,'
14944     ;;
14945
14946   unixware*)
14947     dll_cflags="-KPIC"
14948     wl="-Wl,"
14949     ;;
14950
14951   sysv4*)
14952     dll_cflags="-KPIC"
14953     wl="-Wl,"
14954     ;;
14955
14956   sysv5*)
14957     dll_cflags="-KPIC"
14958     wl="-Wl,"
14959     ;;
14960
14961   solaris2*)
14962     dll_cflags='-KPIC'
14963     wl='-Wl,'
14964     ;;
14965
14966   sunos4*)
14967     dll_cflags='-PIC'
14968     wl='-Qoption ld '
14969     ;;
14970
14971   uts4*)
14972     dll_cflags='-pic'
14973     ;;
14974
14975   *)
14976     can_build_shared=no
14977     ;;
14978   esac
14979 fi
14980
14981 if test -n "$dll_cflags"; then
14982   echo "$ac_t""${dll_cflags}" 1>&6
14983
14984   # Check to make sure the dll_cflags actually works.
14985   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14986 echo "configure:14987: checking if PIC flag ${dll_cflags} really works" >&5
14987   save_CFLAGS="$CFLAGS"
14988   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14989   cat > conftest.$ac_ext <<EOF
14990 #line 14991 "configure"
14991 #include "confdefs.h"
14992
14993 int main() {
14994 int x=0;
14995 ; return 0; }
14996 EOF
14997 if { (eval echo configure:14998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14998   rm -rf conftest*
14999   
15000     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15001     # reports no error.  So, we need to grep stderr for (Bundled).
15002     if grep '(Bundled)' config.log >/dev/null; then
15003       echo "$ac_t""no" 1>&6
15004       can_build_shared=no
15005       dll_cflags=
15006     else
15007       echo "$ac_t""yes" 1>&6
15008     fi
15009 else
15010   echo "configure: failed program was:" >&5
15011   cat conftest.$ac_ext >&5
15012   rm -rf conftest*
15013   echo "$ac_t""no" 1>&6
15014     can_build_shared=no
15015     dll_cflags=
15016 fi
15017 rm -f conftest*
15018   CFLAGS="$save_CFLAGS"
15019 else
15020   echo "$ac_t""none" 1>&6
15021 fi
15022
15023 if test "$can_build_shared" = "yes"; then
15024 cc_produces_so=no
15025 xldf=
15026 xcldf=
15027 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15028 echo "configure:15029: checking if C compiler can produce shared libraries" >&5
15029 if test "$XEGCC" = yes; then
15030   xcldf="-shared"
15031   xldf="-shared"
15032 else # Not using GCC
15033   case "$xehost_os" in
15034     aix[3-9]*)
15035       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15036       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15037       ;;
15038
15039     freebsd2* | netbsd* | openbsd*)
15040       xldf="-Bshareable"
15041       xcldf="${wl}-Bshareable"
15042       ;;
15043
15044     freebsd3*)
15045       xcldf="-shared"
15046       ;;
15047
15048     hpux*)
15049       xldf="-b +s"
15050       xcldf="${wl}-b ${wl}+s"
15051       ;;
15052
15053     irix[5-9]* | osf[3-9]*)
15054       xcldf="${wl}-shared"
15055       xldf="-shared"
15056       ;;
15057
15058     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15059       xcldf="-G"
15060       xldf="-G"
15061       ;;
15062
15063     sunos4*)
15064       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15065       xldf="-assert pure-text -Bstatic"
15066       ;;
15067   esac
15068 fi # End if if we are using gcc
15069
15070 if test -n "$xcldf"; then
15071   save_LDFLAGS=$LDFLAGS
15072   save_LIBS=$LIBS
15073   save_xe_libs=$xe_libs
15074   LDFLAGS="$xcldf $LDFLAGS"
15075   LIBS=
15076   xe_libs=
15077   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15078   cat > conftest.$ac_ext <<EOF
15079 #line 15080 "configure"
15080 #include "confdefs.h"
15081
15082 int main() {
15083 int x=0;
15084 ; return 0; }
15085 EOF
15086 if { (eval echo configure:15087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15087   rm -rf conftest*
15088   cc_produces_so=yes
15089 else
15090   echo "configure: failed program was:" >&5
15091   cat conftest.$ac_ext >&5
15092   rm -rf conftest*
15093   cc_produces_so=no
15094 fi
15095 rm -f conftest*
15096   LDFLAGS=$save_LDFLAGS
15097   LIBS=$save_LIBS
15098   xe_libs=$save_xe_libs
15099   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15100 else
15101   cc_produces_so=no
15102 fi
15103 echo "$ac_t""${cc_produces_so}" 1>&6
15104
15105 LTLD=$LD
15106 if test -z "$LTLD"; then
15107   ac_prog=ld
15108   if test "$XEGCC" = yes; then
15109     # Check if gcc -print-prog-name=ld gives a path.
15110     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15111 echo "configure:15112: checking for ld used by GCC" >&5
15112     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15113     case "$ac_prog" in
15114     # Accept absolute paths.
15115     /*)
15116       if test -z "$LTLD"; then
15117 #        case "$ac_prog" in
15118 #          *gcc-lib*) LTLD="$CC"
15119 #                     ;;
15120 #          *)
15121          LTLD="$ac_prog"
15122 #                     ;;
15123 #        esac
15124       fi
15125       ;;
15126     "")
15127       # If it fails, then pretend we aren't using GCC.
15128       ac_prog=ld
15129       ;;
15130     *)
15131       # If it is relative, then search for the first ld in PATH.
15132       with_gnu_ld=unknown
15133       ;;
15134     esac
15135   else
15136     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15137 echo "configure:15138: checking for GNU ld" >&5
15138   fi
15139
15140   if test -z "$LTLD"; then
15141     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15142     for ac_dir in $PATH; do
15143       test -z "$ac_dir" && ac_dir=.
15144       if test -f "$ac_dir/$ac_prog"; then
15145         LTLD="$ac_dir/$ac_prog"
15146         # Check to see if the program is GNU ld.  I'd rather use --version,
15147         # but apparently some GNU ld's only accept -v.
15148         # Break only if it was the GNU/non-GNU ld that we prefer.
15149         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15150           xe_gnu_ld=yes
15151         else
15152           xe_gnu_ld=no
15153         fi
15154       fi
15155     done
15156     IFS="$ac_save_ifs"
15157   fi
15158
15159   if test -n "$LTLD"; then
15160     echo "$ac_t""${LTLD}" 1>&6
15161   else
15162     echo "$ac_t""no" 1>&6
15163   fi
15164
15165   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15166     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15167     exit 1
15168   fi
15169 fi
15170
15171 ld_dynamic_link_flags=
15172
15173 # Check to see if it really is or isn't GNU ld.
15174 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15175 echo "configure:15176: checking if the linker is GNU ld" >&5
15176 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15177 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15178   xe_gnu_ld=yes
15179 else
15180   xe_gnu_ld=no
15181 fi
15182 echo "$ac_t""${xe_gnu_ld}" 1>&6
15183
15184 case "$xehost_os" in
15185   amigaos* | sunos4*)
15186     # On these operating systems, we should treat GNU ld like the system ld.
15187     gnu_ld_acts_native=yes
15188     ;;
15189   *)
15190     gnu_ld_acts_native=no
15191     ;;
15192 esac
15193
15194 if test "$cc_produces_so" = "yes"; then
15195   dll_ld=$CC
15196   dll_ldflags=$xcldf
15197   can_build_shared=yes
15198   ld_shlibs=yes
15199 else
15200   # OK - only NOW do we futz about with ld.
15201   # See if the linker supports building shared libraries.
15202   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15203 echo "configure:15204: checking whether the linker supports shared libraries" >&5
15204   dll_ld=$CC
15205   dll_ldflags=$LDFLAGS
15206   ld_shlibs=yes
15207   can_build_shared=yes
15208   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15209     # See if GNU ld supports shared libraries.
15210     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15211       dll_ld=$CC
15212       dll_ldflags="-shared"
15213       ld_shlibs=yes
15214     else
15215       ld_shlibs=no
15216     fi
15217   else
15218     # PORTME fill in a description of your system's linker (not GNU ld)
15219     case "$xehost_os" in
15220     aix3*)
15221       dll_ld=$LTLD
15222       dll_ldflags=$xldf
15223       ;;
15224
15225     aix[4-9]*)
15226       dll_ldflags=$xcldf
15227       ;;
15228
15229     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15230     # support.  Future versions do this automatically, but an explicit c++rt0.o
15231     # doesn't break anything, and helps significantly (at the cost of a little
15232     # extra space).
15233     freebsd2.2*)
15234       dll_ld=$LTLD
15235       dll_ldflags=$xldf
15236       dll_post="/usr/lib/c++rt0.o"
15237       ;;
15238
15239     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15240     freebsd2*)
15241       dll_ld=$LTLD
15242       dll_ldflags="-Bshareable"
15243       ;;
15244
15245     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15246     freebsd3*)
15247       dll_ldflags="-shared"
15248       ;;
15249
15250     hpux*)
15251       dll_ld=$LTLD
15252       dll_ldflags=$xldf
15253       ;;
15254
15255     irix[5-9]*)
15256       dll_ld=$LTLD
15257       dll_ldflags=$xldf
15258       ;;
15259
15260     netbsd*)
15261       # Tested with NetBSD 1.2 ld
15262       dll_ld=$LTLD
15263       dll_ldflags=$xldf
15264       ;;
15265
15266     openbsd*)
15267       dll_ld=$LTLD
15268       dll_ldflags=$xldf
15269       ;;
15270
15271     osf3* | osf4*)
15272       dll_ld=$LTLD
15273       dll_ldflags=$xldf
15274       ;;
15275
15276     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15277     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15278       dll_ld=$LTLD
15279       case "$dll_ld" in
15280         *gcc*) dll_ldflags="-shared"
15281                dll_ld=$CC
15282                ;;
15283         *)     dll_ldflags="-G"
15284                ;;
15285       esac
15286       ;;
15287
15288     sunos4*)
15289       if test "$XEGCC" = yes; then
15290         dll_ld=$CC
15291       else
15292         dll_ld=$LTLD
15293       fi
15294       dll_ldflags=$xldf
15295       ;;
15296
15297     uts4*)
15298       dll_ld=$LTLD
15299       dll_ldflags="-G"
15300       ;;
15301
15302     bsdi*)
15303       dll_ldflags="-r"
15304       dll_ld="shlicc2"
15305       ;;
15306
15307     *)
15308       ld_shlibs=no
15309       can_build_shared=no
15310       ;;
15311     esac
15312   fi
15313   echo "$ac_t""${ld_shlibs}" 1>&6
15314   if test "$ld_shlibs" = "no"; then
15315     can_build_shared=no
15316   fi
15317 fi # End of if cc_produces_so = no
15318
15319
15320 if test "$xe_gnu_ld" = yes; then
15321   if test "$ld_shlibs" = yes; then
15322     ld_dynamic_link_flags="${wl}-export-dynamic"
15323   fi
15324 fi
15325
15326 if test -z "$ld_dynamic_link_flags"; then
15327   case "$xehost_os" in
15328   aix[3-9]*)
15329     ld_dynamic_link_flags=
15330     ;;
15331
15332   freebsd2.2*)
15333     ld_dynamic_link_flags=
15334     ;;
15335
15336   freebsd2*)
15337     ld_dynamic_link_flags=
15338     ;;
15339
15340   freebsd3*)
15341     ld_dynamic_link_flags=
15342     ;;
15343
15344   hpux*)
15345     ld_dynamic_link_flags="${wl}-E"
15346     ;;
15347
15348   irix[5-9]*)
15349     ld_dynamic_link_flags=
15350     ;;
15351
15352   netbsd*)
15353     ld_dynamic_link_flags=
15354     ;;
15355
15356   openbsd*)
15357     ld_dynamic_link_flags=
15358     ;;
15359
15360   osf3* | osf4*)
15361     ld_dynamic_link_flags=
15362     ;;
15363
15364   solaris2* | solaris7*)
15365     ld_dynamic_link_flags=
15366     ;;
15367
15368   sco3.2v5* | unixware* | sysv5* | sysv4*)
15369     ld_dynamic_link_flags="${wl}-Bexport"
15370     ;;
15371
15372   sunos4*)
15373     ld_dynamic_link_flags=
15374     ;;
15375
15376   uts4*)
15377     ld_dynamic_link_flags=
15378     ;;
15379
15380   bsdi*)
15381     ld_dynamic_link_flags=
15382     ;;
15383
15384   esac
15385 fi # End of if -z ld_dynamic_link_flags
15386 fi # End of if test "$can_build_shared" = "yes"
15387
15388
15389
15390
15391
15392
15393
15394
15395   fi
15396
15397   if test "$can_build_shared" = "yes"; then
15398     { test "$extra_verbose" = "yes" && cat << \EOF
15399     Defining HAVE_SHLIB
15400 EOF
15401 cat >> confdefs.h <<\EOF
15402 #define HAVE_SHLIB 1
15403 EOF
15404 }
15405
15406     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15407    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15408  fi
15409     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15410     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15411     for ac_func in dlerror _dlerror
15412 do
15413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15414 echo "configure:15415: checking for $ac_func" >&5
15415
15416 cat > conftest.$ac_ext <<EOF
15417 #line 15418 "configure"
15418 #include "confdefs.h"
15419 /* System header to define __stub macros and hopefully few prototypes,
15420     which can conflict with char $ac_func(); below.  */
15421 #include <assert.h>
15422 /* Override any gcc2 internal prototype to avoid an error.  */
15423 /* We use char because int might match the return type of a gcc2
15424     builtin and then its argument prototype would still apply.  */
15425 char $ac_func();
15426
15427 int main() {
15428
15429 /* The GNU C library defines this for functions which it implements
15430     to always fail with ENOSYS.  Some functions are actually named
15431     something starting with __ and the normal name is an alias.  */
15432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15433 choke me
15434 #else
15435 $ac_func();
15436 #endif
15437
15438 ; return 0; }
15439 EOF
15440 if { (eval echo configure:15441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15441   rm -rf conftest*
15442   eval "ac_cv_func_$ac_func=yes"
15443 else
15444   echo "configure: failed program was:" >&5
15445   cat conftest.$ac_ext >&5
15446   rm -rf conftest*
15447   eval "ac_cv_func_$ac_func=no"
15448 fi
15449 rm -f conftest*
15450
15451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15452   echo "$ac_t""yes" 1>&6
15453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15454   { test "$extra_verbose" = "yes" && cat << EOF
15455     Defining $ac_tr_func
15456 EOF
15457 cat >> confdefs.h <<EOF
15458 #define $ac_tr_func 1
15459 EOF
15460 }
15461  
15462 else
15463   echo "$ac_t""no" 1>&6
15464 fi
15465 done
15466
15467     with_modules=yes
15468   else
15469     if test "$with_modules" = "yes"; then
15470       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15471     else
15472       echo "configure: warning: "Module support cannot be provided."" 1>&2
15473     fi
15474     with_modules=no
15475   fi
15476 fi
15477
15478 cat > conftest.$ac_ext <<EOF
15479 #line 15480 "configure"
15480 #include "confdefs.h"
15481 int main(int c,char *v[]){return 0;}
15482 EOF
15483 if { (eval echo configure:15484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15484 then
15485   :
15486 else
15487   conftest_rc="$?"
15488   echo "configure: failed program was:" >&5
15489   cat conftest.$ac_ext >&5
15490   rm -fr conftest*
15491   
15492   echo ""
15493   echo "*** PANIC *** configure forgot how to build working executables!"
15494   echo ""
15495   echo "*** This is most commonly due to an unforeseen environment, causing"
15496   echo "*** configure to incorrectly compute the sequence of libraries to link."
15497   echo "*** Please examine the tail of config.log for runtime errors."
15498   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15499   echo "*** Often adding or removing explicit options in the configure"
15500   echo "*** invocation can work around this kind of problem.  If so, please"
15501   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15502   echo "***"
15503   echo "*** Other possible causes are inability to write to the file system"
15504   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15505   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15506   echo "*** necessary.  On other systems, try telling configure where to find"
15507   echo "*** the shared libraries using the --site-runtime-libraries option."
15508   echo "***"
15509   echo "*** Another way to shoot yourself in the foot is to specify"
15510   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15511   echo "*** system.  Don't do that."
15512   exit 1
15513 fi
15514 rm -fr conftest*
15515
15516 if test "$win32_processes" = "yes"; then
15517   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15518    echo "    xemacs will be linked with \"process-nt.o\""
15519  fi
15520 else
15521   { test "$extra_verbose" = "yes" && cat << \EOF
15522     Defining HAVE_UNIX_PROCESSES
15523 EOF
15524 cat >> confdefs.h <<\EOF
15525 #define HAVE_UNIX_PROCESSES 1
15526 EOF
15527 }
15528
15529   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15530    echo "    xemacs will be linked with \"process-unix.o\""
15531  fi
15532 fi
15533
15534
15535
15536 T=""
15537 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15538 CFLAGS="$T"
15539
15540
15541 T=""
15542 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15543 extra_objs="$T"
15544
15545
15546 T=""
15547 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
15548 c_switch_general="$T"
15549
15550
15551 T=""
15552 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
15553 c_switch_window_system="$T"
15554
15555
15556 T=""
15557 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15558 c_switch_all="$T"
15559
15560
15561 T=""
15562 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
15563 ld_switch_general="$T"
15564
15565
15566 T=""
15567 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15568 ld_switch_window_system="$T"
15569
15570
15571 T=""
15572 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15573 ld_switch_all="$T"
15574
15575
15576 T=""
15577 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15578 ld_libs_general="$T"
15579
15580
15581 T=""
15582 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
15583 ld_libs_window_system="$T"
15584
15585
15586 T=""
15587 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15588 ld_libs_all="$T"
15589
15590
15591
15592 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15593 internal_makefile_list="Makefile.in"
15594 SUBDIR_MAKEFILES=''
15595 test -d lock || mkdir lock
15596 for dir in $MAKE_SUBDIR; do
15597   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15598         test -d "$d" || mkdir "$d"; cd "$d"
15599       done ) ;;
15600    * ) test -d "$dir" || mkdir "$dir" ;;
15601   esac
15602   
15603 T=""
15604 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15605 SUBDIR_MAKEFILES="$T"
15606
15607   
15608 T=""
15609 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15610 internal_makefile_list="$T"
15611
15612 done
15613
15614
15615
15616
15617 for dir in src/s src/m; do
15618   if test ! -d "$dir" ; then
15619     echo Making symbolic link to "$srcdir/$dir"
15620     ${LN_S} "$srcdir/$dir" "$dir"
15621   fi
15622 done
15623
15624 if test "$extra_verbose" = "yes"; then
15625   echo ""
15626   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
15627   echo ""
15628 fi
15629
15630
15631 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15632   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15633   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15634 fi
15635
15636 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15637   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15638   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15639 fi
15640
15641 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15642   test "$extra_verbose" = "yes" && echo "creating TAGS"
15643   echo "\f
15644 $srcdir/TAGS,include" > "TAGS"
15645 fi
15646
15647 if test "$__SUNPRO_C" = "yes"; then
15648   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15649   ( echo "# For use with Sun WorkShop's Source browser."
15650     echo "# See sbquery(1) and sbinit(4) for more information"
15651     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15652   ) > .sbinit
15653 fi
15654
15655 rm -f core
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676 PREFIX=$prefix
15677 while true; do
15678   case "$PREFIX" in
15679     *\$* ) eval "PREFIX=$PREFIX" ;;
15680     *) break ;;
15681   esac
15682 done
15683
15684
15685
15686
15687 EXEC_PREFIX=$exec_prefix
15688 while true; do
15689   case "$EXEC_PREFIX" in
15690     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15691     *) break ;;
15692   esac
15693 done
15694
15695
15696
15697
15698 INFODIR=$infodir
15699 while true; do
15700   case "$INFODIR" in
15701     *\$* ) eval "INFODIR=$INFODIR" ;;
15702     *) break ;;
15703   esac
15704 done
15705
15706
15707
15708
15709 INFOPATH=$infopath
15710 while true; do
15711   case "$INFOPATH" in
15712     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15713     *) break ;;
15714   esac
15715 done
15716
15717
15718
15719
15720 PACKAGE_PATH=$package_path
15721 while true; do
15722   case "$PACKAGE_PATH" in
15723     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15724     *) break ;;
15725   esac
15726 done
15727
15728
15729
15730
15731 LISPDIR=$lispdir
15732 while true; do
15733   case "$LISPDIR" in
15734     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15735     *) break ;;
15736   esac
15737 done
15738
15739
15740
15741
15742 MODULEDIR=$moduledir
15743 while true; do
15744   case "$MODULEDIR" in
15745     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15746     *) break ;;
15747   esac
15748 done
15749
15750
15751
15752
15753 SITELISPDIR=$sitelispdir
15754 while true; do
15755   case "$SITELISPDIR" in
15756     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15757     *) break ;;
15758   esac
15759 done
15760
15761
15762
15763
15764 SITEMODULEDIR=$sitemoduledir
15765 while true; do
15766   case "$SITEMODULEDIR" in
15767     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15768     *) break ;;
15769   esac
15770 done
15771
15772
15773
15774
15775 ETCDIR=$etcdir
15776 while true; do
15777   case "$ETCDIR" in
15778     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15779     *) break ;;
15780   esac
15781 done
15782
15783
15784
15785
15786 DOCDIR=$docdir
15787 while true; do
15788   case "$DOCDIR" in
15789     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15790     *) break ;;
15791   esac
15792 done
15793
15794
15795
15796
15797 ARCHLIBDIR=$archlibdir
15798 while true; do
15799   case "$ARCHLIBDIR" in
15800     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15801     *) break ;;
15802   esac
15803 done
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15825
15826
15827
15828
15829
15830
15831
15832 : ${XEMACS_CC:=$CC}
15833
15834
15835 if test "$with_prefix" = "yes"; then
15836   { test "$extra_verbose" = "yes" && cat << \EOF
15837     Defining PREFIX_USER_DEFINED
15838 EOF
15839 cat >> confdefs.h <<\EOF
15840 #define PREFIX_USER_DEFINED 1
15841 EOF
15842 }
15843
15844 fi
15845
15846 if test "$with_site_lisp" = "no"; then
15847   { test "$extra_verbose" = "yes" && cat << \EOF
15848     Defining INHIBIT_SITE_LISP
15849 EOF
15850 cat >> confdefs.h <<\EOF
15851 #define INHIBIT_SITE_LISP 1
15852 EOF
15853 }
15854
15855 fi
15856 if test "$with_site_modules" = "no"; then
15857   { test "$extra_verbose" = "yes" && cat << \EOF
15858     Defining INHIBIT_SITE_MODULES
15859 EOF
15860 cat >> confdefs.h <<\EOF
15861 #define INHIBIT_SITE_MODULES 1
15862 EOF
15863 }
15864
15865 fi
15866
15867
15868 T=""
15869 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15870 ac_configure_args="$T"
15871
15872 { test "$extra_verbose" = "yes" && cat << EOF
15873     Defining EMACS_CONFIGURATION = "$configuration"
15874 EOF
15875 cat >> confdefs.h <<EOF
15876 #define EMACS_CONFIGURATION "$configuration"
15877 EOF
15878 }
15879
15880 { test "$extra_verbose" = "yes" && cat << EOF
15881     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15882 EOF
15883 cat >> confdefs.h <<EOF
15884 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15885 EOF
15886 }
15887
15888
15889
15890 null_string=""
15891 { test "$extra_verbose" = "yes" && cat << EOF
15892     Defining LD_SWITCH_X_SITE = $null_string
15893 EOF
15894 cat >> confdefs.h <<EOF
15895 #define LD_SWITCH_X_SITE $null_string
15896 EOF
15897 }
15898
15899 { test "$extra_verbose" = "yes" && cat << EOF
15900     Defining LD_SWITCH_X_SITE_AUX = $null_string
15901 EOF
15902 cat >> confdefs.h <<EOF
15903 #define LD_SWITCH_X_SITE_AUX $null_string
15904 EOF
15905 }
15906
15907 { test "$extra_verbose" = "yes" && cat << EOF
15908     Defining C_SWITCH_X_SITE = $null_string
15909 EOF
15910 cat >> confdefs.h <<EOF
15911 #define C_SWITCH_X_SITE $null_string
15912 EOF
15913 }
15914
15915 { test "$extra_verbose" = "yes" && cat << EOF
15916     Defining LD_SWITCH_SITE = $null_string
15917 EOF
15918 cat >> confdefs.h <<EOF
15919 #define LD_SWITCH_SITE $null_string
15920 EOF
15921 }
15922
15923 { test "$extra_verbose" = "yes" && cat << EOF
15924     Defining C_SWITCH_SITE = $null_string
15925 EOF
15926 cat >> confdefs.h <<EOF
15927 #define C_SWITCH_SITE $null_string
15928 EOF
15929 }
15930
15931
15932
15933 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15934     Defining GNU_MALLOC
15935 EOF
15936 cat >> confdefs.h <<\EOF
15937 #define GNU_MALLOC 1
15938 EOF
15939 }
15940
15941 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15942     Defining USE_SYSTEM_MALLOC
15943 EOF
15944 cat >> confdefs.h <<\EOF
15945 #define USE_SYSTEM_MALLOC 1
15946 EOF
15947 }
15948
15949 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15950     Defining USE_DEBUG_MALLOC
15951 EOF
15952 cat >> confdefs.h <<\EOF
15953 #define USE_DEBUG_MALLOC 1
15954 EOF
15955 }
15956
15957                                               { test "$extra_verbose" = "yes" && cat << \EOF
15958     Defining USE_SYSTEM_MALLOC
15959 EOF
15960 cat >> confdefs.h <<\EOF
15961 #define USE_SYSTEM_MALLOC 1
15962 EOF
15963 }
15964
15965 fi
15966 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15967     Defining I18N3
15968 EOF
15969 cat >> confdefs.h <<\EOF
15970 #define I18N3 1
15971 EOF
15972 }
15973
15974 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15975     Defining USE_GCC
15976 EOF
15977 cat >> confdefs.h <<\EOF
15978 #define USE_GCC 1
15979 EOF
15980 }
15981
15982 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15983     Defining EXTERNAL_WIDGET
15984 EOF
15985 cat >> confdefs.h <<\EOF
15986 #define EXTERNAL_WIDGET 1
15987 EOF
15988 }
15989
15990 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15991     Defining QUICK_BUILD
15992 EOF
15993 cat >> confdefs.h <<\EOF
15994 #define QUICK_BUILD 1
15995 EOF
15996 }
15997
15998 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15999     Defining PURIFY
16000 EOF
16001 cat >> confdefs.h <<\EOF
16002 #define PURIFY 1
16003 EOF
16004 }
16005
16006 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16007     Defining QUANTIFY
16008 EOF
16009 cat >> confdefs.h <<\EOF
16010 #define QUANTIFY 1
16011 EOF
16012 }
16013
16014 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16015     Defining MAIL_USE_POP
16016 EOF
16017 cat >> confdefs.h <<\EOF
16018 #define MAIL_USE_POP 1
16019 EOF
16020 }
16021
16022 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16023     Defining KERBEROS
16024 EOF
16025 cat >> confdefs.h <<\EOF
16026 #define KERBEROS 1
16027 EOF
16028 }
16029
16030 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16031     Defining HESIOD
16032 EOF
16033 cat >> confdefs.h <<\EOF
16034 #define HESIOD 1
16035 EOF
16036 }
16037
16038 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16039     Defining USE_UNION_TYPE
16040 EOF
16041 cat >> confdefs.h <<\EOF
16042 #define USE_UNION_TYPE 1
16043 EOF
16044 }
16045
16046 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16047     Defining PDUMP
16048 EOF
16049 cat >> confdefs.h <<\EOF
16050 #define PDUMP 1
16051 EOF
16052 }
16053
16054 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16055     Defining IPV6_CANONICALIZE
16056 EOF
16057 cat >> confdefs.h <<\EOF
16058 #define IPV6_CANONICALIZE 1
16059 EOF
16060 }
16061
16062
16063
16064 (
16065 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16066 else
16067   echo "uname -a: `uname -a`"
16068 fi
16069 echo ""
16070 echo "$0 $quoted_arguments"
16071 ) > Installation
16072
16073 if test ! -z ${emacs_beta_version} ; then
16074   if test -z "${emacs_is_beta}" ; then
16075         xemacs_betaname=".${emacs_beta_version}"
16076   else
16077         xemacs_betaname="-b${emacs_beta_version}"
16078   fi
16079 else
16080   xemacs_betaname=""
16081 fi
16082
16083 (
16084 echo "
16085
16086 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16087 "
16088 echo "
16089 Compilation / Installation:"
16090 echo "  Source code location:              $srcdir"
16091 echo "  Installation prefix:               $prefix"
16092 if test -n "$site_includes"; then
16093   echo "  Additional header files:           $site_includes"
16094 fi
16095 if test -n "$site_libraries"; then
16096   echo "  Additional libraries:              $site_libraries"
16097 fi
16098 if test -n "$site_prefixes"; then
16099   echo "  Additional prefixes:               $site_prefixes"
16100 fi
16101 if test -n "$runpath"; then
16102   echo "  Runtime library search path:       $runpath"
16103 fi
16104
16105 if test -n "$opsysfile"
16106 then echo "  Operating system description file: \`$opsysfile'"
16107 else echo "  Not using any operating system description file"
16108 fi
16109 if test -n "$machfile"
16110 then echo "  Machine description file:          \`$machfile'"
16111 else echo "  Not using any machine description file"
16112 fi
16113
16114 echo "  Compiler:                          $CC $CFLAGS"
16115 echo "  Relocating allocator for buffers:  $rel_alloc"
16116 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16117 case "$ld_switch_site" in
16118   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16119     - Consider configuring with --pdump." ;;
16120 esac
16121
16122 echo "
16123 Window System:"
16124 if test "$with_msw" = "yes"; then
16125   echo "  Compiling in support for the Microsoft window system."
16126 fi
16127 if test "$with_x11" = "yes"; then
16128   echo "  Compiling in support for the X window system:"
16129   echo "    - X Windows headers location:                 $x_includes"
16130   echo "    - X Windows libraries location:               $x_libraries"
16131   if test "$with_xauth" != yes; then
16132     echo "    - Xau (X authority) not available."
16133   fi
16134   if test "$with_xmu" != yes; then
16135     echo "    - Xmu library not available; substituting equivalent routines."
16136   fi
16137   if test "$with_wmcommand" != no; then
16138     echo "    - Handling WM_COMMAND properly."
16139   fi
16140 fi
16141 if test "$need_athena" = "yes"; then
16142   echo "  Compiling in support for the Athena widget set:"
16143   echo "    - Athena headers location:                    $athena_h_path"
16144   echo "    - Athena library to link:                     $athena_lib"
16145 fi
16146 case "$with_menubars" in
16147   gtk   ) echo "  Using GTK menubars."   ;;
16148   lucid ) echo "  Using Lucid menubars." ;;
16149   motif ) echo "  Using Motif menubars."
16150           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16151           echo "             We recommend using the Lucid menubar instead."
16152           echo "             Re-run configure with --with-menubars='lucid'." ;;
16153     msw ) echo "  Using MS-Windows menubars." ;;
16154 esac
16155 case "$with_scrollbars" in
16156   gtk    ) echo "  Using GTK scrollbars."        ;;
16157   lucid  ) echo "  Using Lucid scrollbars."      ;;
16158   motif  ) echo "  Using Motif scrollbars."      ;;
16159   athena ) echo "  Using Athena scrollbars."     ;;
16160      msw ) echo "  Using MS-Windows scrollbars." ;;
16161 esac
16162 case "$with_dialogs" in
16163   gtk    ) echo "  Using GTK dialog boxes." ;;
16164   motif  ) echo "  Using Motif dialog boxes."
16165            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16166              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16167              echo "             We recommend using the Athena dialog boxes instead."
16168              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16169              echo "             Read the PROBLEMS file for more information."
16170            fi; fi ;;
16171   athena ) echo "  Using Athena dialog boxes."     ;;
16172      msw ) echo "  Using MS-Windows dialog boxes." ;;
16173 esac
16174 case "$with_widgets" in
16175   gtk    ) echo "  Using GTK native widgets."        ;;
16176   motif  ) echo "  Using Motif native widgets."      ;;
16177   athena ) echo "  Using Athena native widgets."     ;;
16178      msw ) echo "  Using MS-Windows native widgets." ;;
16179 esac
16180 if test "$with_dragndrop" = yes; then
16181   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16182   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16183 fi
16184
16185 echo "
16186 TTY:"
16187 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16188 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16189
16190 echo "
16191 Images:"
16192 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16193 if test "$with_xpm" = yes; then
16194   echo "  Compiling in support for XPM  images."
16195 elif test "$with_x11" = yes; then
16196   echo "  WARNING: -----------------------------------------------------------"
16197   echo "  WARNING: Compiling without XPM image support."
16198   if test "$xpm_problem" != ""; then
16199     echo "  Reason: $xpm_problem"
16200   fi
16201   echo "  WARNING: You should strongly consider installing XPM."
16202   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16203   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16204   echo "  WARNING: -----------------------------------------------------------"
16205 fi
16206 if test "$with_png" = yes; then
16207   echo "  Compiling in support for PNG  images."
16208 elif test "$window_system" != "none"; then
16209   echo "  WARNING: -----------------------------------------------------------"
16210   echo "  WARNING: Compiling without PNG image support."
16211   if test "$png_problem" != ""; then
16212     echo "  Reason: $png_problem"
16213   fi
16214   echo "  WARNING: You should strongly consider installing the PNG libraries."
16215   echo "  WARNING: Otherwise certain images and glyphs may not display."
16216   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16217   echo "  WARNING: -----------------------------------------------------------"
16218 fi
16219 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16220 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16221 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16222
16223 echo "
16224 Sound:"
16225 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16226 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16227 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16228 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16229
16230 echo "
16231 Databases:"
16232 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16233 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16234 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16235 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16236 if test "$with_postgresql" = yes; then
16237   echo "  Compiling in support for PostgreSQL."
16238   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16239   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16240 fi
16241
16242 echo "
16243 Multiscriptization / Multilingualization / Internationalization:"
16244 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16245 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16246 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16247 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16248 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16249 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16250 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16251 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16252 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16253 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16254 if test "$with_wnn" = yes; then
16255   echo "  Compiling in support for the WNN input method on Mule."
16256   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16257 fi
16258 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16259
16260 echo "
16261 Mail:"
16262 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16263 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16264 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16265 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16266
16267 echo "
16268 Other Features:"
16269 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16270 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16271 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16272 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16273 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16274 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16275 if test "$use_union_type" = yes; then
16276   echo "  WARNING: ---------------------------------------------------------"
16277   echo "  Using the union type for Lisp_Objects."
16278   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16279   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16280   echo "  WARNING: ---------------------------------------------------------"
16281 fi
16282 test "$pdump" = yes && echo "  Using the new portable dumper."
16283 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16284 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16285 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16286   != "no no no no no no"; then
16287   echo "  WARNING: ---------------------------------------------------------"
16288   echo "  WARNING: Compiling in support for runtime error checking."
16289   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16290   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16291   echo "  WARNING: ---------------------------------------------------------"
16292 fi
16293 echo ""
16294 ) | tee -a Installation
16295 echo ""
16296
16297
16298 # Remove any trailing slashes in these variables.
16299 test -n "$prefix" &&
16300   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16301 test -n "$exec_prefix" &&
16302   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16303
16304
16305 for file in $internal_makefile_list; do
16306   test "$file" = src/Makefile.in && \
16307     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16308   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16309 done
16310 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16311 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
16312
16313 trap '' 1 2 15
16314
16315 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16316
16317 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16318 # Let make expand exec_prefix.
16319 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16320
16321 # Any assignment to VPATH causes Sun make to only execute
16322 # the first set of double-colon rules, so remove it if not needed.
16323 # If there is a colon in the path, we need to keep it.
16324 if test "x$srcdir" = x.; then
16325   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16326 fi
16327
16328 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16329
16330 DEFS=-DHAVE_CONFIG_H
16331
16332 # Without the "./", some shells look in PATH for config.status.
16333 : ${CONFIG_STATUS=./config.status}
16334
16335 echo creating $CONFIG_STATUS
16336 rm -f $CONFIG_STATUS
16337 cat > $CONFIG_STATUS <<EOF
16338 #! /bin/sh
16339 # Generated automatically by configure.
16340 # Run this file to recreate the current configuration.
16341 # This directory was configured as follows,
16342 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16343 #
16344 # $0 $ac_configure_args
16345 #
16346 # Compiler output produced by configure, useful for debugging
16347 # configure, is in ./config.log if it exists.
16348
16349 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16350 for ac_option
16351 do
16352   case "\$ac_option" in
16353   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16354     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16355     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16356   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16357     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16358     exit 0 ;;
16359   -help | --help | --hel | --he | --h)
16360     echo "\$ac_cs_usage"; exit 0 ;;
16361   *) echo "\$ac_cs_usage"; exit 1 ;;
16362   esac
16363 done
16364
16365 ac_given_srcdir=$srcdir
16366 ac_given_INSTALL="$INSTALL"
16367
16368 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16369 EOF
16370 cat >> $CONFIG_STATUS <<EOF
16371
16372 # Protect against being on the right side of a sed subst in config.status.
16373 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16374  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16375 $ac_vpsub
16376 $extrasub
16377 s%@SHELL@%$SHELL%g
16378 s%@CFLAGS@%$CFLAGS%g
16379 s%@CPPFLAGS@%$CPPFLAGS%g
16380 s%@CXXFLAGS@%$CXXFLAGS%g
16381 s%@FFLAGS@%$FFLAGS%g
16382 s%@DEFS@%$DEFS%g
16383 s%@LDFLAGS@%$LDFLAGS%g
16384 s%@LIBS@%$LIBS%g
16385 s%@exec_prefix@%$exec_prefix%g
16386 s%@prefix@%$prefix%g
16387 s%@program_transform_name@%$program_transform_name%g
16388 s%@bindir@%$bindir%g
16389 s%@sbindir@%$sbindir%g
16390 s%@libexecdir@%$libexecdir%g
16391 s%@datadir@%$datadir%g
16392 s%@sysconfdir@%$sysconfdir%g
16393 s%@sharedstatedir@%$sharedstatedir%g
16394 s%@localstatedir@%$localstatedir%g
16395 s%@libdir@%$libdir%g
16396 s%@includedir@%$includedir%g
16397 s%@oldincludedir@%$oldincludedir%g
16398 s%@infodir@%$infodir%g
16399 s%@mandir@%$mandir%g
16400 s%@LN_S@%$LN_S%g
16401 s%@blddir@%$blddir%g
16402 s%@CC@%$CC%g
16403 s%@CPP@%$CPP%g
16404 s%@start_flags@%$start_flags%g
16405 s%@ld_switch_shared@%$ld_switch_shared%g
16406 s%@start_files@%$start_files%g
16407 s%@ld@%$ld%g
16408 s%@lib_gcc@%$lib_gcc%g
16409 s%@RANLIB@%$RANLIB%g
16410 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16411 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16412 s%@INSTALL_DATA@%$INSTALL_DATA%g
16413 s%@YACC@%$YACC%g
16414 s%@SET_MAKE@%$SET_MAKE%g
16415 s%@GTK_CONFIG@%$GTK_CONFIG%g
16416 s%@X_CFLAGS@%$X_CFLAGS%g
16417 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16418 s%@X_LIBS@%$X_LIBS%g
16419 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16420 s%@install_pp@%$install_pp%g
16421 s%@libs_xauth@%$libs_xauth%g
16422 s%@dnd_objs@%$dnd_objs%g
16423 s%@lwlib_objs@%$lwlib_objs%g
16424 s%@ALLOCA@%$ALLOCA%g
16425 s%@have_esd_config@%$have_esd_config%g
16426 s%@dll_ld@%$dll_ld%g
16427 s%@dll_cflags@%$dll_cflags%g
16428 s%@dll_ldflags@%$dll_ldflags%g
16429 s%@dll_post@%$dll_post%g
16430 s%@dll_ldo@%$dll_ldo%g
16431 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16432 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16433 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16434 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16435 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16436 s%@PROGNAME@%$PROGNAME%g
16437 s%@version@%$version%g
16438 s%@configuration@%$configuration%g
16439 s%@canonical@%$canonical%g
16440 s%@inststaticdir@%$inststaticdir%g
16441 s%@instvardir@%$instvardir%g
16442 s%@srcdir@%$srcdir%g
16443 s%@pkgdir@%$pkgdir%g
16444 s%@statedir@%$statedir%g
16445 s%@extra_includes@%$extra_includes%g
16446 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16447 s%@PREFIX@%$PREFIX%g
16448 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16449 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16450 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16451 s%@INFODIR@%$INFODIR%g
16452 s%@infopath@%$infopath%g
16453 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16454 s%@INFOPATH@%$INFOPATH%g
16455 s%@package_path@%$package_path%g
16456 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16457 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16458 s%@lispdir@%$lispdir%g
16459 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16460 s%@LISPDIR@%$LISPDIR%g
16461 s%@moduledir@%$moduledir%g
16462 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16463 s%@MODULEDIR@%$MODULEDIR%g
16464 s%@sitelispdir@%$sitelispdir%g
16465 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16466 s%@SITELISPDIR@%$SITELISPDIR%g
16467 s%@sitemoduledir@%$sitemoduledir%g
16468 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16469 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16470 s%@etcdir@%$etcdir%g
16471 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16472 s%@ETCDIR@%$ETCDIR%g
16473 s%@docdir@%$docdir%g
16474 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16475 s%@DOCDIR@%$DOCDIR%g
16476 s%@archlibdir@%$archlibdir%g
16477 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16478 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16479 s%@bitmapdir@%$bitmapdir%g
16480 s%@extra_objs@%$extra_objs%g
16481 s%@machfile@%$machfile%g
16482 s%@opsysfile@%$opsysfile%g
16483 s%@c_switch_general@%$c_switch_general%g
16484 s%@c_switch_window_system@%$c_switch_window_system%g
16485 s%@c_switch_all@%$c_switch_all%g
16486 s%@ld_switch_general@%$ld_switch_general%g
16487 s%@ld_switch_window_system@%$ld_switch_window_system%g
16488 s%@ld_switch_all@%$ld_switch_all%g
16489 s%@ld_libs_general@%$ld_libs_general%g
16490 s%@ld_libs_window_system@%$ld_libs_window_system%g
16491 s%@ld_libs_all@%$ld_libs_all%g
16492 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16493 s%@native_sound_lib@%$native_sound_lib%g
16494 s%@sound_cflags@%$sound_cflags%g
16495 s%@dynodump_arch@%$dynodump_arch%g
16496 s%@XEMACS_CC@%$XEMACS_CC%g
16497 s%@internal_makefile_list@%$internal_makefile_list%g
16498
16499 CEOF
16500 EOF
16501
16502 cat >> $CONFIG_STATUS <<\EOF
16503
16504 # Split the substitutions into bite-sized pieces for seds with
16505 # small command number limits, like on Digital OSF/1 and HP-UX.
16506 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16507 ac_file=1 # Number of current file.
16508 ac_beg=1 # First line for current file.
16509 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16510 ac_more_lines=:
16511 ac_sed_cmds=""
16512 while $ac_more_lines; do
16513   if test $ac_beg -gt 1; then
16514     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16515   else
16516     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16517   fi
16518   if test ! -s conftest.s$ac_file; then
16519     ac_more_lines=false
16520     rm -f conftest.s$ac_file
16521   else
16522     if test -z "$ac_sed_cmds"; then
16523       ac_sed_cmds="sed -f conftest.s$ac_file"
16524     else
16525       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16526     fi
16527     ac_file=`expr $ac_file + 1`
16528     ac_beg=$ac_end
16529     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16530   fi
16531 done
16532 if test -z "$ac_sed_cmds"; then
16533   ac_sed_cmds=cat
16534 fi
16535 EOF
16536
16537 cat >> $CONFIG_STATUS <<EOF
16538
16539 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16540 EOF
16541 cat >> $CONFIG_STATUS <<\EOF
16542 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16543   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16544   case "$ac_file" in
16545   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16546        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16547   *) ac_file_in="${ac_file}.in" ;;
16548   esac
16549
16550   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16551
16552   # Remove last slash and all that follows it.  Not all systems have dirname.
16553   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16554   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16555     # The file is in a subdirectory.
16556     test ! -d "$ac_dir" && mkdir "$ac_dir"
16557     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16558     # A "../" for each directory in $ac_dir_suffix.
16559     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16560   else
16561     ac_dir_suffix= ac_dots=
16562   fi
16563
16564   case "$ac_given_srcdir" in
16565   .)  srcdir=.
16566       if test -z "$ac_dots"; then top_srcdir=.
16567       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16568   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16569   *) # Relative path.
16570     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16571     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16572   esac
16573
16574   case "$ac_given_INSTALL" in
16575   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16576   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16577   esac
16578
16579   echo creating "$ac_file"
16580   rm -f "$ac_file"
16581   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16582   case "$ac_file" in
16583   *Makefile*) ac_comsub="1i\\
16584 # $configure_input" ;;
16585   *) ac_comsub= ;;
16586   esac
16587
16588   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16589   sed -e "$ac_comsub
16590 s%@configure_input@%$configure_input%g
16591 s%@srcdir@%$srcdir%g
16592 s%@top_srcdir@%$top_srcdir%g
16593 s%@INSTALL@%$INSTALL%g
16594 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16595 fi; done
16596 rm -f conftest.s*
16597
16598 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16599 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16600 #
16601 # ac_d sets the value in "#define NAME VALUE" lines.
16602 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16603 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16604 ac_dC='\3'
16605 ac_dD='%g'
16606 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16607 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16608 ac_uB='\([      ]\)%\1#\2define\3'
16609 ac_uC=' '
16610 ac_uD='\4%g'
16611 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16612 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16613 ac_eB='$%\1#\2define\3'
16614 ac_eC=' '
16615 ac_eD='%g'
16616
16617 if test "${CONFIG_HEADERS+set}" != set; then
16618 EOF
16619 cat >> $CONFIG_STATUS <<EOF
16620   CONFIG_HEADERS="src/config.h lwlib/config.h"
16621 EOF
16622 cat >> $CONFIG_STATUS <<\EOF
16623 fi
16624 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16625   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16626   case "$ac_file" in
16627   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16628        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16629   *) ac_file_in="${ac_file}.in" ;;
16630   esac
16631
16632   echo creating $ac_file
16633
16634   rm -f conftest.frag conftest.in conftest.out
16635   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16636   cat $ac_file_inputs > conftest.in
16637
16638 EOF
16639
16640 # Transform confdefs.h into a sed script conftest.vals that substitutes
16641 # the proper values into config.h.in to produce config.h.  And first:
16642 # Protect against being on the right side of a sed subst in config.status.
16643 # Protect against being in an unquoted here document in config.status.
16644 rm -f conftest.vals
16645 cat > conftest.hdr <<\EOF
16646 s/[\\&%]/\\&/g
16647 s%[\\$`]%\\&%g
16648 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16649 s%ac_d%ac_u%gp
16650 s%ac_u%ac_e%gp
16651 EOF
16652 sed -n -f conftest.hdr confdefs.h > conftest.vals
16653 rm -f conftest.hdr
16654
16655 # This sed command replaces #undef with comments.  This is necessary, for
16656 # example, in the case of _POSIX_SOURCE, which is predefined and required
16657 # on some systems where configure will not decide to define it.
16658 cat >> conftest.vals <<\EOF
16659 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16660 EOF
16661
16662 # Break up conftest.vals because some shells have a limit on
16663 # the size of here documents, and old seds have small limits too.
16664
16665 rm -f conftest.tail
16666 while :
16667 do
16668   ac_lines=`grep -c . conftest.vals`
16669   # grep -c gives empty output for an empty file on some AIX systems.
16670   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16671   # Write a limited-size here document to conftest.frag.
16672   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16673   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16674   echo 'CEOF
16675   sed -f conftest.frag conftest.in > conftest.out
16676   rm -f conftest.in
16677   mv conftest.out conftest.in
16678 ' >> $CONFIG_STATUS
16679   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16680   rm -f conftest.vals
16681   mv conftest.tail conftest.vals
16682 done
16683 rm -f conftest.vals
16684
16685 cat >> $CONFIG_STATUS <<\EOF
16686   rm -f conftest.frag conftest.h
16687   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16688   cat conftest.in >> conftest.h
16689   rm -f conftest.in
16690   if cmp -s $ac_file conftest.h 2>/dev/null; then
16691     echo "$ac_file is unchanged"
16692     rm -f conftest.h
16693   else
16694     # Remove last slash and all that follows it.  Not all systems have dirname.
16695       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16696       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16697       # The file is in a subdirectory.
16698       test ! -d "$ac_dir" && mkdir "$ac_dir"
16699     fi
16700     rm -f $ac_file
16701     mv conftest.h $ac_file
16702   fi
16703 fi; done
16704
16705 EOF
16706 cat >> $CONFIG_STATUS <<EOF
16707 CPP="$CPP"
16708  top_srcdir="$srcdir"
16709  MAKE_SUBDIR="$MAKE_SUBDIR"
16710
16711 EOF
16712 cat >> $CONFIG_STATUS <<\EOF
16713 for dir in . $MAKE_SUBDIR; do
16714   (
16715     cd $dir
16716     rm -f junk.c
16717     < Makefile.in \
16718       sed -e '/^# Generated/d' \
16719           -e 's%/\*\*/#.*%%' \
16720           -e 's/^ *# */#/' \
16721           -e '/^##/d' \
16722           -e '/^#/ {
16723 p
16724 d
16725 }'        \
16726           -e '/./ {
16727 s/\([\"]\)/\\\1/g
16728 s/^/"/
16729 s/$/"/
16730 }'  > junk.c;
16731
16732
16733
16734     echo creating $dir/Makefile
16735 $CPP -I. -I${top_srcdir}/src  junk.c \
16736   | sed -e 's/^\#.*//'          \
16737         -e 's/^[        ][      ]*$//'\
16738         -e 's/^ /       /'              \
16739         -e '/^[ \f]*$/d' \
16740         -e '/^\"/ {
16741         s/\\\([\"]\)/\1/g
16742         s/^[    ]*\"//
16743         s/\"[   ]*$//
16744 }' > Makefile.new
16745     chmod 444 Makefile.new
16746     mv -f Makefile.new Makefile
16747
16748     echo creating $dir/GNUmakefile
16749 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16750   | sed -e 's/^\#.*//'          \
16751         -e 's/^[        ][      ]*$//'\
16752         -e 's/^ /       /'              \
16753         -e '/^[ \f]*$/d' \
16754         -e '/^\"/ {
16755         s/\\\([\"]\)/\1/g
16756         s/^[    ]*\"//
16757         s/\"[   ]*$//
16758 }' > Makefile.new
16759     chmod 444 Makefile.new
16760     mv -f Makefile.new GNUmakefile
16761
16762     rm -f junk.c
16763   )
16764 done
16765
16766 sed < config.status >> lib-src/config.values \
16767   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16768   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16769   -e 's/^\([^ ]*\) $/\1 ""/' \
16770   -e 's/ 1$/ t/'
16771
16772
16773 exit 0
16774 EOF
16775 chmod +x $CONFIG_STATUS
16776 rm -fr confdefs* $ac_clean_files
16777 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1