3e6058c4ba2fd8e59797637c6cadae28afcdd315
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 use_regex_malloc='yes'
252 with_esd_sound='no'
253 native_sound_lib=''
254 with_gtk='no'
255 with_gnome='no'
256 use_assertions="yes"
257 with_toolbars=""
258 with_tty=""
259 use_union_type="no"
260 with_dnet=""
261 pdump=''
262 with_dragndrop="no"
263 with_ipv6_cname="no"
264
265
266
267
268 arguments="$@"
269
270 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
271 quoted_arguments=
272 for i in "$@"; do
273    case "$i" in
274    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275    | --no-cr | --no-c) ;;
276    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
278    *)
279    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
280    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
281    esac
282 done
283
284 while test $# != 0; do
285   arg="$1"; shift
286   case "$arg" in
287     --no-create|--no-recursion) ;;
288         -* )
289             case "$arg" in
290         -*=*)
291           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
292           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
293           valomitted=no
294         ;;
295                                                                           -*)
296                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
297           val="yes" valomitted=yes
298         ;;
299       esac
300
301             optname="$opt"
302       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
303
304             case "${valomitted}-${opt}" in yes-without_* )
305         opt=`echo $opt | sed 's/without/with/'`
306         valomitted="no" val="no" ;;
307       esac
308
309             case "$opt" in
310
311         with_site_lisp  | \
312         with_prefix     | \
313         with_site_modules | \
314         with_x          | \
315         with_x11        | \
316         with_gtk        | \
317         with_gnome      | \
318         with_msw        | \
319         with_gcc        | \
320         dynamic         | \
321         with_ncurses    | \
322         with_dnet       | \
323         with_socks      | \
324         with_dragndrop  | \
325         with_cde        | \
326         with_offix      | \
327         with_gpm        | \
328         with_xpm        | \
329         with_xface      | \
330         with_gif        | \
331         with_jpeg       | \
332         with_png        | \
333         with_tiff       | \
334         with_wmcommand  | \
335         with_xmu        | \
336         with_purify     | \
337         with_quantify   | \
338         with_toolbars   | \
339         with_tty        | \
340         with_xfs        | \
341         with_i18n3      | \
342         with_mule       | \
343         with_file_coding| \
344         with_canna      | \
345         with_wnn        | \
346         with_wnn6       | \
347         with_workshop   | \
348         with_sparcworks | \
349         with_tooltalk   | \
350         with_ldap       | \
351         with_postgresql | \
352         with_pop        | \
353         with_kerberos   | \
354         with_hesiod     | \
355         with_dnet       | \
356         with_infodock   | \
357         with_netinstall | \
358         with_ipv6_cname | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         usage_tracking  | \
363         use_union_type  | \
364         pdump           | \
365         debug           | \
366         use_assertions  | \
367         use_regex_malloc | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules    | \
371         quick_build )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 Option \`all' or \`none' must be first in the list.
476 The default is to autodetect native and NAS sound support."
477 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
478             elif test -n "$new_sdefault" ; then
479                 with_native_sound=$new_sdefault
480                 with_nas_sound=$new_sdefault
481                 with_esd_sound=$new_sdefault
482                 new_sdefault=   # reset this
483             fi
484             sound_notfirst=true
485           done
486         ;;
487
488                         "with_athena" )
489           case "$val" in
490             xa | xaw )                    val=xaw    ;;
491             3 | 3d | xaw3d )              val=3d     ;;
492                         ne | nex | next | naxtaw)     val=next   ;;
493                         9 | 95 | xaw95 )              val=95     ;;
494             xp | xpm | xawxpm )           val=xpm    ;;
495             * ) (echo "$progname: Usage error:"
496 echo " " "The \`--$optname' option must have one of these values:
497   \`xaw', \`3d', \`next', \`95', or \`xpm'."
498 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
499           esac
500           eval "$opt=\"$val\""
501         ;;
502
503                 "with_xim" )
504           case "$val" in
505             y | ye | yes )                val=yes   ;;
506             n | no | non | none )         val=no    ;;
507             x | xl | xli | xlib )         val=xlib  ;;
508             m | mo | mot | moti | motif ) val=motif ;;
509             * ) (echo "$progname: Usage error:"
510 echo " " "The \`--$optname' option must have one of these values:
511   \`motif', \`xlib', \`yes', or \`no'."
512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
513           esac
514           eval "$opt=\"$val\""
515         ;;
516
517                 "mail_locking" )
518           case "$val" in
519             lockf )     val=lockf ;;
520             flock )     val=flock ;;
521             file | dot ) val=file  ;;
522             locking )   val=locking  ;;
523             * ) (echo "$progname: Usage error:"
524 echo " " "The \`--$optname' option must have one of these values:
525   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
526 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
527           esac
528           eval "$opt=\"$val\""
529         ;;
530
531                 "error_checking" )
532                           
533           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
534             case "$x" in
535                       n | no | non | none ) new_default=no ;;
536               a | al | all )        new_default=yes ;;
537
538               extents )       error_check_extents=yes ;;
539               noextents )     error_check_extents=no ;;
540
541               typecheck )     error_check_typecheck=yes ;;
542               notypecheck )   error_check_typecheck=no ;;
543
544               bufpos )        error_check_bufpos=yes ;;
545               nobufpos )      error_check_bufpos=no ;;
546
547               gc )            error_check_gc=yes ;;
548               nogc )          error_check_gc=no ;;
549
550               malloc )        error_check_malloc=yes ;;
551               nomalloc )      error_check_malloc=no ;;
552
553               byte_code )     error_check_byte_code=yes ;;
554               nobyte_code )   error_check_byte_code=no ;;
555
556               glyphs )     error_check_glyphs=yes ;;
557               noglyphs )   error_check_glyphs=no ;;
558
559               * ) bogus_error_check=yes ;;
560             esac
561             if test "$bogus_error_check" -o \
562                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
563                 if test "$error_check_default" = yes ; then
564                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
565                 else
566                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
567                 fi
568                 (echo "$progname: Usage error:"
569 echo " " "Valid types for the \`--$optname' option are:
570   $types."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
572             elif test -n "$new_default" ; then
573                 error_check_extents=$new_default
574                 error_check_typecheck=$new_default
575                 error_check_bufpos=$new_default
576                 error_check_gc=$new_default
577                 error_check_malloc=$new_default
578                 error_check_byte_code=$new_default
579                 error_check_glyphs=$new_default
580                 new_default=    # reset this
581             fi
582             echeck_notfirst=true
583           done
584         ;;
585
586                                 
587                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
588         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
589         archlibdir | docdir | package_path | moduledir )
590                    if test "$valomitted" = "yes"; then
591              if test "$#" = 0; then
592                  (echo "$progname: Usage error:"
593 echo " " "The \`--$optname' option requires a value."
594 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
595              fi
596              val="$1"; shift
597            fi
598            eval "$opt=\"$val\""
599
600                            case "$opt" in
601                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
602     Defining EXEC_PREFIX_USER_DEFINED
603 EOF
604 cat >> confdefs.h <<\EOF
605 #define EXEC_PREFIX_USER_DEFINED 1
606 EOF
607 }
608  ;;
609              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
610     Defining LISPDIR_USER_DEFINED
611 EOF
612 cat >> confdefs.h <<\EOF
613 #define LISPDIR_USER_DEFINED 1
614 EOF
615 }
616  ;;
617              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
618     Defining SITELISPDIR_USER_DEFINED
619 EOF
620 cat >> confdefs.h <<\EOF
621 #define SITELISPDIR_USER_DEFINED 1
622 EOF
623 }
624  ;;
625              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
626     Defining MODULEDIR_USER_DEFINED
627 EOF
628 cat >> confdefs.h <<\EOF
629 #define MODULEDIR_USER_DEFINED 1
630 EOF
631 }
632  ;;
633              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
634     Defining ETCDIR_USER_DEFINED
635 EOF
636 cat >> confdefs.h <<\EOF
637 #define ETCDIR_USER_DEFINED 1
638 EOF
639 }
640  ;;
641              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
642     Defining INFODIR_USER_DEFINED
643 EOF
644 cat >> confdefs.h <<\EOF
645 #define INFODIR_USER_DEFINED 1
646 EOF
647 }
648  ;;
649              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
650     Defining INFOPATH_USER_DEFINED
651 EOF
652 cat >> confdefs.h <<\EOF
653 #define INFOPATH_USER_DEFINED 1
654 EOF
655 }
656  ;;
657              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
658     Defining PACKAGE_PATH_USER_DEFINED
659 EOF
660 cat >> confdefs.h <<\EOF
661 #define PACKAGE_PATH_USER_DEFINED 1
662 EOF
663 }
664  ;;
665              datadir )
666                 { test "$extra_verbose" = "yes" && cat << \EOF
667     Defining INFODIR_USER_DEFINED
668 EOF
669 cat >> confdefs.h <<\EOF
670 #define INFODIR_USER_DEFINED 1
671 EOF
672 }
673
674                 { test "$extra_verbose" = "yes" && cat << \EOF
675     Defining LISPDIR_USER_DEFINED
676 EOF
677 cat >> confdefs.h <<\EOF
678 #define LISPDIR_USER_DEFINED 1
679 EOF
680 }
681
682                 { test "$extra_verbose" = "yes" && cat << \EOF
683     Defining MODULEDIR_USER_DEFINED
684 EOF
685 cat >> confdefs.h <<\EOF
686 #define MODULEDIR_USER_DEFINED 1
687 EOF
688 }
689
690                 { test "$extra_verbose" = "yes" && cat << \EOF
691     Defining ETCDIR_USER_DEFINED
692 EOF
693 cat >> confdefs.h <<\EOF
694 #define ETCDIR_USER_DEFINED 1
695 EOF
696 }
697
698                 { test "$extra_verbose" = "yes" && cat << \EOF
699     Defining DOCDIR_USER_DEFINED
700 EOF
701 cat >> confdefs.h <<\EOF
702 #define DOCDIR_USER_DEFINED 1
703 EOF
704 }
705
706                 { test "$extra_verbose" = "yes" && cat << \EOF
707     Defining ARCHLIBDIR_USER_DEFINED
708 EOF
709 cat >> confdefs.h <<\EOF
710 #define ARCHLIBDIR_USER_DEFINED 1
711 EOF
712 }
713  ;;
714              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
715     Defining DOCDIR_USER_DEFINED
716 EOF
717 cat >> confdefs.h <<\EOF
718 #define DOCDIR_USER_DEFINED 1
719 EOF
720 }
721  ;;
722              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
723     Defining ARCHLIBDIR_USER_DEFINED
724 EOF
725 cat >> confdefs.h <<\EOF
726 #define ARCHLIBDIR_USER_DEFINED 1
727 EOF
728 }
729  ;;
730            esac
731         ;;
732
733                 "no_create" ) ;;
734
735                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
736
737                 "with_menubars"   | \
738         "with_scrollbars" | \
739         "with_dialogs"    | \
740         "with_widgets" )
741           case "$val" in
742             l | lu | luc | luci | lucid )               val=lucid  ;;
743             mo | mot | moti | motif )                   val=motif  ;;
744             a | at | ath | athe | athen | athena )      val=athena ;;
745             n | no | non | none )                       val=no     ;;
746             y | ye | yes )                              val=yes    ;;
747                         "")                                             val=yes    ;;
748             g | gt | gtk )                              val=gtk    ;;
749             ms | msw )                                  val=msw    ;;
750             * ) (echo "$progname: Usage error:"
751 echo " " "The \`--$optname' option must have one of these values:
752   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
753 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
754           esac
755           eval "$opt=\"$val\""
756         ;;
757
758                 "use_minimal_tagbits" | \
759         "use_indexed_lrecord_implementation" | \
760         "run_in_place"  | \
761         "const_is_losing" | \
762         "with_gnu_make" )
763           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
764         ;;
765
766                 * ) (echo "$progname: Usage error:"
767 echo " " "Unrecognized option: $arg"
768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
769
770       esac
771     ;;
772
773         *-*-*) configuration="$arg" ;;
774
775         *) (echo "$progname: Usage error:"
776 echo " " "Unrecognized argument: $arg"
777 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
778
779   esac
780 done
781
782
783 test -n "$cpp"      && CPP="$cpp"
784 test -n "$cppflags" && CPPFLAGS="$cppflags"
785 test -n "$libs"     && LIBS="$libs"
786 test -n "$ldflags"  && LDFLAGS="$ldflags"
787
788 eval set x "$quoted_arguments"; shift
789
790 test "$extra_verbose" = "yes" && verbose=yes
791
792 test -n "$with_x" && with_x11="$with_x"
793
794 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
795   test "$with_system_malloc" = "default" && with_system_malloc=yes
796 fi
797
798
799
800 if test "$with_cde $with_tooltalk" = "yes no"; then
801   (echo "$progname: Usage error:"
802 echo " " "--with-cde requires --with-tooltalk"
803 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
804 elif test "$with_tooltalk" = "no" ; then with_cde=no
805 elif test "$with_cde" = "yes"; then with_tooltalk=yes
806 fi
807
808
809 case "$srcdir" in
810
811     "" )
812     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
813       if test -f "$dir/src/lisp.h" -a \
814               -f "$dir/lisp/version.el" ; then
815         srcdir="$dir"
816         break
817       fi
818     done
819     if test -z "$srcdir" ; then
820       (echo "$progname: Usage error:"
821 echo " " "Neither the current directory nor its parent seem to
822   contain the XEmacs sources.  If you do not want to build XEmacs in its
823   source tree, you should run \`$progname' in the directory in which
824   you wish to build XEmacs, using the \`--srcdir' option to say where the
825   sources may be found."
826 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
827     fi
828   ;;
829
830     * )
831     if test ! -f "$srcdir/src/lisp.h" -o \
832             ! -f "$srcdir/lisp/version.el" ; then
833       (echo "$progname: Usage error:"
834 echo " " "The directory specified with the \`--srcdir' option,
835   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
836   either run the \`$progname' script at the top of the XEmacs source
837   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
838 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
839     fi
840   ;;
841 esac
842
843 if test -z "$configuration"; then
844     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
845   if test -z "$configuration"; then
846     (echo "$progname: Usage error:"
847 echo " " "XEmacs has not been ported to this host type.
848 Try explicitly specifying the CONFIGURATION when rerunning configure."
849 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
850   fi
851 fi
852
853 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
854 echo "configure:855: checking whether ln -s works" >&5
855
856 rm -f conftestdata
857 if ln -s X conftestdata 2>/dev/null
858 then
859   rm -f conftestdata
860   ac_cv_prog_LN_S="ln -s"
861 else
862   ac_cv_prog_LN_S=ln
863 fi
864 LN_S="$ac_cv_prog_LN_S"
865 if test "$ac_cv_prog_LN_S" = "ln -s"; then
866   echo "$ac_t""yes" 1>&6
867 else
868   echo "$ac_t""no" 1>&6
869 fi
870
871
872 for dir in lisp etc man info tests; do
873   if test ! -d "$dir" ; then
874     echo Making symbolic link to "$srcdir/$dir"
875     ${LN_S} "$srcdir/$dir" "$dir"
876   fi
877 done
878
879
880 absolute_pwd="`pwd`";
881 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
882 then blddir="$PWD"
883 else blddir="$absolute_pwd"; if test -d "/net"; then
884   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
885   blddir=`echo "$blddir" | \
886    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
887 fi
888 fi
889
890
891 case "$srcdir" in
892   /* ) ;;
893   .  ) srcdir="$blddir" ;;
894   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
895   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
896   srcdir=`echo "$srcdir" | \
897    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
898 fi ;;
899 esac
900
901 if test `pwd` != `sh -c cd $srcdir && pwd`  \
902    && test -f "$srcdir/src/config.h"; then
903   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
904    echo "   as a build directory right now; it has been configured in its own"
905    echo "   right.  To configure in another directory as well, you MUST"
906    echo "   use GNU make.  If you do not have GNU make, then you must"
907    echo "   now do \`make distclean' in $srcdir,"
908    echo "   and then run $progname again.") >&2
909   extrasub='/^VPATH[     ]*=/c\
910 vpath %.c $(srcdir)\
911 vpath %.h $(srcdir)\
912 vpath %.y $(srcdir)\
913 vpath %.l $(srcdir)\
914 vpath %.s $(srcdir)\
915 vpath %.in $(srcdir)'
916 fi
917
918 . "$srcdir/version.sh" || exit 1;
919 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
920 : "${extra_verbose=$beta}"
921 version="${emacs_major_version}.${emacs_minor_version}"
922 { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_MAJOR_VERSION = $emacs_major_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_MAJOR_VERSION $emacs_major_version
927 EOF
928 }
929
930 { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_MINOR_VERSION = $emacs_minor_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_MINOR_VERSION $emacs_minor_version
935 EOF
936 }
937
938 if test -n "$emacs_beta_version" ; then
939   if test "$beta" = "yes"; then
940         version="${version}-b${emacs_beta_version}"
941         { test "$extra_verbose" = "yes" && cat << EOF
942     Defining EMACS_BETA_VERSION = $emacs_beta_version
943 EOF
944 cat >> confdefs.h <<EOF
945 #define EMACS_BETA_VERSION $emacs_beta_version
946 EOF
947 }
948
949   else
950         version="${version}.${emacs_beta_version}"
951         { test "$extra_verbose" = "yes" && cat << EOF
952     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
953 EOF
954 cat >> confdefs.h <<EOF
955 #define EMACS_PATCH_LEVEL $emacs_beta_version
956 EOF
957 }
958
959   fi
960 fi
961 { test "$extra_verbose" = "yes" && cat << EOF
962     Defining XEMACS_CODENAME = "$xemacs_codename"
963 EOF
964 cat >> confdefs.h <<EOF
965 #define XEMACS_CODENAME "$xemacs_codename"
966 EOF
967 }
968
969 { test "$extra_verbose" = "yes" && cat << EOF
970     Defining EMACS_VERSION = "$version"
971 EOF
972 cat >> confdefs.h <<EOF
973 #define EMACS_VERSION "$version"
974 EOF
975 }
976
977
978 if test "$with_infodock" = "yes"; then
979   if test ! -f ../../ID-INSTALL; then
980     echo "Cannot build InfoDock without InfoDock sources"
981     with_infodock=no
982   fi
983 fi
984
985 if test "$with_infodock" = "yes"; then
986       { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_MAJOR_VERSION $infodock_major_version
991 EOF
992 }
993
994   { test "$extra_verbose" = "yes" && cat << EOF
995     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
996 EOF
997 cat >> confdefs.h <<EOF
998 #define INFODOCK_MINOR_VERSION $infodock_minor_version
999 EOF
1000 }
1001
1002   { test "$extra_verbose" = "yes" && cat << EOF
1003     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1004 EOF
1005 cat >> confdefs.h <<EOF
1006 #define INFODOCK_BUILD_VERSION $infodock_build_version
1007 EOF
1008 }
1009
1010   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1011   PROGNAME=infodock
1012   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1013 else
1014   PROGNAME=xemacs
1015 fi
1016
1017 { test "$extra_verbose" = "yes" && cat << EOF
1018     Defining EMACS_PROGNAME = "$PROGNAME"
1019 EOF
1020 cat >> confdefs.h <<EOF
1021 #define EMACS_PROGNAME "$PROGNAME"
1022 EOF
1023 }
1024
1025
1026 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1027 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_EXTENTS
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_EXTENTS 1
1032 EOF
1033 }
1034
1035 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_TYPECHECK
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_TYPECHECK 1
1040 EOF
1041 }
1042
1043 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_BUFPOS
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_BUFPOS 1
1048 EOF
1049 }
1050
1051 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_GC
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_GC 1
1056 EOF
1057 }
1058
1059 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_MALLOC
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_MALLOC 1
1064 EOF
1065 }
1066
1067 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining ERROR_CHECK_BYTE_CODE
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define ERROR_CHECK_BYTE_CODE 1
1072 EOF
1073 }
1074
1075 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1076     Defining ERROR_CHECK_GLYPHS
1077 EOF
1078 cat >> confdefs.h <<\EOF
1079 #define ERROR_CHECK_GLYPHS 1
1080 EOF
1081 }
1082
1083 if test "${debug:=$beta}" = "yes"; then
1084   use_assertions=yes memory_usage_stats=yes
1085   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1086    echo "    xemacs will be linked with \"debug.o\""
1087  fi
1088   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"tests.o\""
1090  fi
1091   { test "$extra_verbose" = "yes" && cat << \EOF
1092     Defining DEBUG_XEMACS
1093 EOF
1094 cat >> confdefs.h <<\EOF
1095 #define DEBUG_XEMACS 1
1096 EOF
1097 }
1098
1099 fi
1100 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1101     Defining USE_ASSERTIONS
1102 EOF
1103 cat >> confdefs.h <<\EOF
1104 #define USE_ASSERTIONS 1
1105 EOF
1106 }
1107
1108 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1109     Defining MEMORY_USAGE_STATS
1110 EOF
1111 cat >> confdefs.h <<\EOF
1112 #define MEMORY_USAGE_STATS 1
1113 EOF
1114 }
1115
1116
1117
1118 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1119 echo "configure:1120: checking "host system type"" >&5
1120 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1121 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1122 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1123 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1124 echo "$ac_t""$configuration" 1>&6
1125
1126
1127
1128
1129
1130 machine='' opsys=''
1131
1132 case "$canonical" in
1133   sparc-*-*        ) machine=sparc ;;
1134   alpha*-*-*       ) machine=alpha ;;
1135   vax-*-*          ) machine=vax ;;
1136   mips-dec-*       ) machine=pmax ;;
1137   mips-sgi-irix6*  ) machine=iris6d ;;
1138   mips-sgi-*       ) machine=iris4d ;;
1139   mips*-linux      ) machine=mips ;;
1140   romp-ibm-*       ) machine=ibmrt ;;
1141   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1142   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1143   powerpc*-*       ) machine=powerpc ;;
1144   hppa-*-*         ) machine=hp800 ;;
1145   m88k-dg-*        ) machine=aviion ;;
1146   m68*-sony-*      ) machine=news ;;
1147   mips-sony-*      ) machine=news-risc ;;
1148   clipper-*        ) machine=clipper ;;
1149   arm*             ) machine=arm ;;
1150   ns32k-*          ) machine=ns32000 ;;
1151 esac
1152
1153 case "$canonical" in
1154   *-*-linux*    ) opsys=linux ;;
1155   *-*-netbsd*   ) opsys=netbsd ;;
1156   *-*-openbsd*  ) opsys=openbsd ;;
1157   *-*-nextstep* ) opsys=nextstep ;;
1158   *-*-vms       ) opsys=vms ;;
1159
1160     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1161   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1162   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1163   *-dec-osf3*                ) opsys=decosf3-1 ;;
1164   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1165
1166     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1167   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1168   *-*-ultrix* )         opsys=ultrix4-3 ;;
1169
1170     *-*-aix3.1*     ) opsys=aix3-1   ;;
1171   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1172   *-*-aix3*       ) opsys=aix3-2   ;;
1173   *-*-aix4.0*     ) opsys=aix4     ;;
1174   *-*-aix4.1*     ) opsys=aix4-1   ;;
1175   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1176
1177     *-gnu* )                    opsys=gnu    ;;
1178   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1179   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1180   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1181   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1182   *-*-aos*   )                  opsys=bsd4-3 ;;
1183   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1184   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1185   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1186   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1187   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1188   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1189         if test -z "$NON_GNU_CPP" ; then
1190           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1191             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1192           done
1193         fi
1194         opsys=usg5-4-2 ;;
1195     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1196     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1197 esac
1198
1199 case "$canonical" in
1200
1201     *-*-netbsd* )
1202     case "$canonical" in
1203       i[3-9]86-*-netbsd*) machine=intel386 ;;
1204       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1205                                             machine=hp9000s300 ;;
1206       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1207       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1208     esac
1209   ;;
1210
1211     *-*-openbsd* )
1212     case "${canonical}" in
1213       i386-*-openbsd*)          machine=intel386 ;;
1214       m68k-*-openbsd*)          machine=hp9000s300 ;;
1215       mipsel-*-openbsd*)        machine=pmax ;;
1216      esac
1217    ;;
1218
1219     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1220   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1221
1222     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1223   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1224
1225     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1226
1227     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1228
1229     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1230
1231     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1232
1233     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1234
1235     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1236   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1237   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1238
1239   
1240     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1241
1242     *-convex-bsd* | *-convex-convexos* )
1243     machine=convex opsys=bsd4-3
1244     NON_GNU_CPP="cc -E -P"
1245   ;;
1246
1247     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1248
1249     *-*-darwin*)
1250     opsys=darwin
1251     RANLIB="ranlib -c"     ;;
1252
1253     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1254   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1255   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1256   m88k-dg-dgux*                           ) opsys=dgux     ;;
1257
1258     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1259   m88k-motorola-sysv4* )
1260                     machine=delta88k opsys=usg5-4-2
1261   ;;
1262   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1263
1264     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1265   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1266
1267     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1268
1269     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1270   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1271   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1272
1273       m88k-harris-cxux* )
1274         case "`uname -r`" in
1275        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1276        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1277     esac
1278     NON_GNU_CPP="/lib/cpp"
1279   ;;
1280     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1281     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1282
1283     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1284
1285     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1286
1287     *-hp-hpux* )
1288         case "$canonical" in
1289       m68*  ) machine=hp9000s300 ;;
1290       hppa* ) machine=hp800      ;;
1291     esac
1292
1293     case "$canonical" in
1294       *-hp-hpux7*  )  opsys=hpux   ;;
1295       *-hp-hpux8*  )  opsys=hpux8  ;;
1296       *-hp-hpux9*  )  opsys=hpux9  ;;
1297       *-hp-hpux10* )  opsys=hpux10 ;;
1298       *-hp-hpux11* )  opsys=hpux11 ;;
1299       *            )  opsys=hpux   ;;
1300     esac
1301
1302         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1303    echo "    xemacs will be linked with \"strcat.o\""
1304  fi ;; esac
1305
1306     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1307         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1308     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1309
1310     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1311   ;;
1312
1313     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1314   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1315
1316     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1317   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1318   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1319   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1320   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1321   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1322
1323     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1324   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1325
1326     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1327
1328     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1329
1330     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1331
1332     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1333
1334       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1335
1336     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1337
1338     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1339
1340     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1341
1342     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1343
1344         mips-mips-usg* ) machine=mips4 ;;
1345   mips-mips-riscos4 )
1346     machine=mips4
1347     NON_GNU_CC="cc -systype bsd43"
1348     NON_GNU_CPP="cc -systype bsd43 -E"
1349     case "$canonical" in
1350       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1351       mips-mips-riscos5* ) opsys=riscos5 ;;
1352     esac
1353   ;;
1354   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1355   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1356
1357     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1358
1359     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1360
1361     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1362   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1363
1364     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1365
1366     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1367
1368     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1369
1370     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1371
1372     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1373   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1374
1375     mips-siemens-sysv* | mips-sni-sysv*)
1376     machine=mips-siemens opsys=usg5-4
1377     NON_GNU_CC=/usr/ccs/bin/cc
1378     NON_GNU_CPP=/usr/ccs/lib/cpp
1379   ;;
1380
1381     mips-nec-sysv*)
1382     machine=mips-nec
1383     NON_GNU_CC=/usr/ccs/bin/cc
1384     NON_GNU_CPP=/usr/ccs/lib/cpp
1385   ;;
1386
1387       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1388   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1389     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1390   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1391   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1392   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1393   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1394   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1395   mips-sgi-irix*      ) opsys=irix5-0 ;;
1396
1397     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1398   *-sony-news* ) opsys=newsos5 ;;
1399
1400     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1401
1402     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1403         case "$canonical" in
1404       m68*-sunos1* )             machine=sun1     ;;
1405       m68*-sunos2* )             machine=sun2     ;;
1406       m68* )                     machine=sun3     ;;
1407       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1408       i*86-*-* )                 machine=intel386 ;;
1409       rs6000* )                  machine=rs6000   ;;
1410     esac
1411
1412         case "$canonical" in *-sunos5*)
1413       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1414     esac
1415
1416                     case "$canonical" in
1417       *-sunos4* )
1418         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1419         : ;;
1420       *-solaris2* )
1421         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1422         RANLIB=':' ;;
1423     esac
1424
1425     case "$canonical" in
1426       *-solaris* )
1427         opsys=sol2
1428         os_release_major=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1/'`
1429         os_release_minor=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/'`
1430         case "$os_release_minor" in [0-9])
1431           os_release_minor="0${os_release_minor}";;
1432         esac
1433         os_release="${os_release_major}${os_release_minor}"
1434         { test "$extra_verbose" = "yes" && cat << EOF
1435     Defining OS_RELEASE = $os_release
1436 EOF
1437 cat >> confdefs.h <<EOF
1438 #define OS_RELEASE $os_release
1439 EOF
1440 }
1441  ;;
1442
1443             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1444       *-sunos4.0*         ) opsys=sunos4-0      ;;
1445       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1446       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1447       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1448       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1449       *-mach*             ) opsys=mach-bsd4-3   ;;
1450       *                   ) opsys=bsd4-2        ;;
1451     esac
1452
1453     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1454
1455         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1456   ;;
1457
1458     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1459
1460     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1461   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1462
1463     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1464
1465     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1466
1467     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1468       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1469
1470     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1471
1472     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1473
1474     vax-dec-* )
1475     case "$canonical" in
1476       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1477       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1478       *-mach* )                         opsys=mach-bsd4-3 ;;
1479     esac
1480   ;;
1481
1482     ns16k-whitechapel-* ) machine=mg1 ;;
1483
1484     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1485
1486     i[3-9]86-*-* )
1487     machine=intel386
1488     case "$canonical" in
1489       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1490       *-isc2.2* )               opsys=isc2-2 ;;
1491       *-isc4.0* )               opsys=isc4-0 ;;
1492       *-isc4.* )                opsys=isc4-1
1493                                 GCC_TEST_OPTIONS=-posix
1494                                 NON_GCC_TEST_OPTIONS=-Xp
1495                                 ;;
1496       *-isc* )                  opsys=isc3-0 ;;
1497       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1498       *-esix* )                 opsys=esix ;;
1499       *-mach* )                 opsys=mach-bsd4-3 ;;
1500       *-xenix* )                opsys=xenix ;;
1501       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1502       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1503       *-bsdi4* )                opsys=bsdos4 ;;
1504       *-bsdi3* )                opsys=bsdos3 ;;
1505       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1506       *-bsdi2* )                opsys=bsdos2 ;;
1507       *-sco3.2v5* )             opsys=sco5 ;;
1508       *-sysv5* )                opsys=sco7 ;;
1509       *-386bsd* )               opsys=386bsd ;;
1510       *-freebsd* )              opsys=freebsd ;;
1511       *-nextstep* )             opsys=nextstep ;;
1512       *-pc-cygwin* )            opsys=cygwin32 ;;
1513       *-pc-mingw* )             opsys=mingw32 ;
1514                                 test -z "$with_tty" && with_tty="no";;
1515           esac
1516   ;;
1517
1518     m68k-*-linux* ) machine=m68k opsys=linux ;;
1519
1520 esac
1521
1522 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1523
1524 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1525
1526 if test -r "${srcdir}/src/m/${machine}.h"; then
1527   machfile="m/${machine}.h"
1528   { test "$extra_verbose" = "yes" && cat << EOF
1529     Defining config_machfile = "$machfile"
1530 EOF
1531 cat >> confdefs.h <<EOF
1532 #define config_machfile "$machfile"
1533 EOF
1534 }
1535
1536 else
1537   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1538   echo "Using configure-time autodetection only."
1539 fi
1540
1541 if test -r "${srcdir}/src/s/${opsys}.h"; then
1542   opsysfile="s/${opsys}.h"
1543   { test "$extra_verbose" = "yes" && cat << EOF
1544     Defining config_opsysfile = "$opsysfile"
1545 EOF
1546 cat >> confdefs.h <<EOF
1547 #define config_opsysfile "$opsysfile"
1548 EOF
1549 }
1550
1551 else
1552   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1553   echo "Using configure-time autodetection only."
1554 fi
1555
1556
1557 if test -z "$pdump"; then
1558   case "$opsys" in
1559     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        *)        pdump=no ;;
1560   esac
1561 fi
1562
1563 if test -z "$dynamic"; then
1564   case "$opsys" in
1565     hpux* | sunos4* ) dynamic=no ;;
1566     *) dynamic=yes ;;
1567   esac
1568 fi
1569 if test "$dynamic" = "yes"; then
1570   case "$opsys" in
1571     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1572     decosf* ) ld_call_shared="-call_shared" ;;
1573     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1574     Defining DLSYM_NEEDS_UNDERSCORE
1575 EOF
1576 cat >> confdefs.h <<\EOF
1577 #define DLSYM_NEEDS_UNDERSCORE 1
1578 EOF
1579 }
1580  ;;
1581   esac
1582 else   case "$opsys" in
1583     sol2 )
1584       echo "Static linking is not supported on Solaris 2."
1585       echo "Rerun configure without specifying --dynamic=no."
1586       exit 1 ;;
1587     linux   ) ld_call_shared="-Bstatic" ;;
1588     decosf* ) ld_call_shared="-non_shared" ;;
1589   esac
1590 fi
1591
1592 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1593
1594 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1595 { test "$extra_verbose" = "yes" && cat << EOF
1596     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1597 EOF
1598 cat >> confdefs.h <<EOF
1599 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1600 EOF
1601 }
1602
1603
1604
1605 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1606 if test "$with_workshop $with_tooltalk" = "yes no"; then
1607   (echo "$progname: Usage error:"
1608 echo " " "--with-workshop requires --with-tooltalk"
1609 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1610 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1611 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1612 fi
1613
1614 if test "$with_workshop" = "yes"; then
1615   { test "$extra_verbose" = "yes" && cat << \EOF
1616     Defining SUNPRO
1617 EOF
1618 cat >> confdefs.h <<\EOF
1619 #define SUNPRO 1
1620 EOF
1621 }
1622
1623   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1624    echo "    xemacs will be linked with \"sunpro.o\""
1625  fi
1626 fi
1627
1628 if test "$with_clash_detection" != "no"; then
1629   { test "$extra_verbose" = "yes" && cat << \EOF
1630     Defining CLASH_DETECTION
1631 EOF
1632 cat >> confdefs.h <<\EOF
1633 #define CLASH_DETECTION 1
1634 EOF
1635 }
1636
1637   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1638    echo "    xemacs will be linked with \"filelock.o\""
1639  fi
1640 fi
1641
1642 test -n "$compiler" && CC="$compiler"
1643 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1644 fi
1645
1646 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1647 if test "${CFLAGS-unset}" != unset
1648   then cflags_specified=yes;
1649   else cflags_specified=no;
1650 fi
1651
1652 xe_save_CFLAGS="$CFLAGS"
1653
1654 # Extract the first word of "gcc", so it can be a program name with args.
1655 set dummy gcc; ac_word=$2
1656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1657 echo "configure:1658: checking for $ac_word" >&5
1658
1659 if test -n "$CC"; then
1660   ac_cv_prog_CC="$CC" # Let the user override the test.
1661 else
1662   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1663   ac_dummy="$PATH"
1664   for ac_dir in $ac_dummy; do
1665     test -z "$ac_dir" && ac_dir=.
1666     if test -f $ac_dir/$ac_word; then
1667       ac_cv_prog_CC="gcc"
1668       break
1669     fi
1670   done
1671   IFS="$ac_save_ifs"
1672 fi
1673 CC="$ac_cv_prog_CC"
1674 if test -n "$CC"; then
1675   echo "$ac_t""$CC" 1>&6
1676 else
1677   echo "$ac_t""no" 1>&6
1678 fi
1679
1680 if test -z "$CC"; then
1681   # Extract the first word of "cc", so it can be a program name with args.
1682 set dummy cc; ac_word=$2
1683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1684 echo "configure:1685: checking for $ac_word" >&5
1685
1686 if test -n "$CC"; then
1687   ac_cv_prog_CC="$CC" # Let the user override the test.
1688 else
1689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1690   ac_prog_rejected=no
1691   ac_dummy="$PATH"
1692   for ac_dir in $ac_dummy; do
1693     test -z "$ac_dir" && ac_dir=.
1694     if test -f $ac_dir/$ac_word; then
1695       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1696         ac_prog_rejected=yes
1697         continue
1698       fi
1699       ac_cv_prog_CC="cc"
1700       break
1701     fi
1702   done
1703   IFS="$ac_save_ifs"
1704 if test $ac_prog_rejected = yes; then
1705   # We found a bogon in the path, so make sure we never use it.
1706   set dummy $ac_cv_prog_CC
1707   shift
1708   if test $# -gt 0; then
1709     # We chose a different compiler from the bogus one.
1710     # However, it has the same basename, so the bogon will be chosen
1711     # first if we set CC to just the basename; use the full file name.
1712     shift
1713     set dummy "$ac_dir/$ac_word" "$@"
1714     shift
1715     ac_cv_prog_CC="$@"
1716   fi
1717 fi
1718 fi
1719 CC="$ac_cv_prog_CC"
1720 if test -n "$CC"; then
1721   echo "$ac_t""$CC" 1>&6
1722 else
1723   echo "$ac_t""no" 1>&6
1724 fi
1725
1726   if test -z "$CC"; then
1727     case "`uname -s`" in
1728     *win32* | *WIN32*)
1729       # Extract the first word of "cl", so it can be a program name with args.
1730 set dummy cl; ac_word=$2
1731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1732 echo "configure:1733: checking for $ac_word" >&5
1733
1734 if test -n "$CC"; then
1735   ac_cv_prog_CC="$CC" # Let the user override the test.
1736 else
1737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1738   ac_dummy="$PATH"
1739   for ac_dir in $ac_dummy; do
1740     test -z "$ac_dir" && ac_dir=.
1741     if test -f $ac_dir/$ac_word; then
1742       ac_cv_prog_CC="cl"
1743       break
1744     fi
1745   done
1746   IFS="$ac_save_ifs"
1747 fi
1748 CC="$ac_cv_prog_CC"
1749 if test -n "$CC"; then
1750   echo "$ac_t""$CC" 1>&6
1751 else
1752   echo "$ac_t""no" 1>&6
1753 fi
1754  ;;
1755     esac
1756   fi
1757   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1758 fi
1759
1760 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1761 echo "configure:1762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1762
1763 ac_ext=c
1764 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1765 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1766 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'
1767 ac_cpp='$CPP '"$xe_cppflags"
1768 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1769 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1770 cross_compiling=no
1771
1772 cat > conftest.$ac_ext << EOF
1773
1774 #line 1775 "configure"
1775 #include "confdefs.h"
1776
1777 main(){return(0);}
1778 EOF
1779 if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1780   ac_cv_prog_cc_works=yes
1781   # If we can't run a trivial program, we are probably using a cross compiler.
1782   if (./conftest; exit) 2>/dev/null; then
1783     ac_cv_prog_cc_cross=no
1784   else
1785     ac_cv_prog_cc_cross=yes
1786   fi
1787 else
1788   echo "configure: failed program was:" >&5
1789   cat conftest.$ac_ext >&5
1790   ac_cv_prog_cc_works=no
1791 fi
1792 rm -fr conftest*
1793 ac_ext=c
1794 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1795 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1796 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'
1797 ac_cpp='$CPP '"$xe_cppflags"
1798 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1799 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1800 cross_compiling=no
1801
1802 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1803 if test $ac_cv_prog_cc_works = no; then
1804   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1805 fi
1806 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1807 echo "configure:1808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1808 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1809 cross_compiling=$ac_cv_prog_cc_cross
1810
1811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1812 echo "configure:1813: checking whether we are using GNU C" >&5
1813
1814 cat > conftest.c <<EOF
1815 #ifdef __GNUC__
1816   yes;
1817 #endif
1818 EOF
1819 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1820   ac_cv_prog_gcc=yes
1821 else
1822   ac_cv_prog_gcc=no
1823 fi
1824
1825 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1826
1827 if test $ac_cv_prog_gcc = yes; then
1828   GCC=yes
1829 else
1830   GCC=
1831 fi
1832
1833 ac_test_CFLAGS="${CFLAGS+set}"
1834 ac_save_CFLAGS="$CFLAGS"
1835 CFLAGS=
1836 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1837 echo "configure:1838: checking whether ${CC-cc} accepts -g" >&5
1838
1839 echo 'void f(){}' > conftest.c
1840 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1841   ac_cv_prog_cc_g=yes
1842 else
1843   ac_cv_prog_cc_g=no
1844 fi
1845 rm -f conftest*
1846
1847
1848 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1849 if test "$ac_test_CFLAGS" = set; then
1850   CFLAGS="$ac_save_CFLAGS"
1851 elif test $ac_cv_prog_cc_g = yes; then
1852   if test "$GCC" = yes; then
1853     CFLAGS="-g -O2"
1854   else
1855     CFLAGS="-g"
1856   fi
1857 else
1858   if test "$GCC" = yes; then
1859     CFLAGS="-O2"
1860   else
1861     CFLAGS=
1862   fi
1863 fi
1864  
1865 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1866   CC=${NON_GNU_CC-cc}
1867   # Extract the first word of "gcc", so it can be a program name with args.
1868 set dummy gcc; ac_word=$2
1869 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1870 echo "configure:1871: checking for $ac_word" >&5
1871
1872 if test -n "$CC"; then
1873   ac_cv_prog_CC="$CC" # Let the user override the test.
1874 else
1875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1876   ac_dummy="$PATH"
1877   for ac_dir in $ac_dummy; do
1878     test -z "$ac_dir" && ac_dir=.
1879     if test -f $ac_dir/$ac_word; then
1880       ac_cv_prog_CC="gcc"
1881       break
1882     fi
1883   done
1884   IFS="$ac_save_ifs"
1885 fi
1886 CC="$ac_cv_prog_CC"
1887 if test -n "$CC"; then
1888   echo "$ac_t""$CC" 1>&6
1889 else
1890   echo "$ac_t""no" 1>&6
1891 fi
1892
1893 if test -z "$CC"; then
1894   # Extract the first word of "cc", so it can be a program name with args.
1895 set dummy cc; ac_word=$2
1896 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1897 echo "configure:1898: checking for $ac_word" >&5
1898
1899 if test -n "$CC"; then
1900   ac_cv_prog_CC="$CC" # Let the user override the test.
1901 else
1902   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1903   ac_prog_rejected=no
1904   ac_dummy="$PATH"
1905   for ac_dir in $ac_dummy; do
1906     test -z "$ac_dir" && ac_dir=.
1907     if test -f $ac_dir/$ac_word; then
1908       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1909         ac_prog_rejected=yes
1910         continue
1911       fi
1912       ac_cv_prog_CC="cc"
1913       break
1914     fi
1915   done
1916   IFS="$ac_save_ifs"
1917 if test $ac_prog_rejected = yes; then
1918   # We found a bogon in the path, so make sure we never use it.
1919   set dummy $ac_cv_prog_CC
1920   shift
1921   if test $# -gt 0; then
1922     # We chose a different compiler from the bogus one.
1923     # However, it has the same basename, so the bogon will be chosen
1924     # first if we set CC to just the basename; use the full file name.
1925     shift
1926     set dummy "$ac_dir/$ac_word" "$@"
1927     shift
1928     ac_cv_prog_CC="$@"
1929   fi
1930 fi
1931 fi
1932 CC="$ac_cv_prog_CC"
1933 if test -n "$CC"; then
1934   echo "$ac_t""$CC" 1>&6
1935 else
1936   echo "$ac_t""no" 1>&6
1937 fi
1938
1939   if test -z "$CC"; then
1940     case "`uname -s`" in
1941     *win32* | *WIN32*)
1942       # Extract the first word of "cl", so it can be a program name with args.
1943 set dummy cl; ac_word=$2
1944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1945 echo "configure:1946: checking for $ac_word" >&5
1946
1947 if test -n "$CC"; then
1948   ac_cv_prog_CC="$CC" # Let the user override the test.
1949 else
1950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1951   ac_dummy="$PATH"
1952   for ac_dir in $ac_dummy; do
1953     test -z "$ac_dir" && ac_dir=.
1954     if test -f $ac_dir/$ac_word; then
1955       ac_cv_prog_CC="cl"
1956       break
1957     fi
1958   done
1959   IFS="$ac_save_ifs"
1960 fi
1961 CC="$ac_cv_prog_CC"
1962 if test -n "$CC"; then
1963   echo "$ac_t""$CC" 1>&6
1964 else
1965   echo "$ac_t""no" 1>&6
1966 fi
1967  ;;
1968     esac
1969   fi
1970   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1971 fi
1972
1973 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1974 echo "configure:1975: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1975
1976 ac_ext=c
1977 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1978 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1979 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'
1980 ac_cpp='$CPP '"$xe_cppflags"
1981 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1982 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1983 cross_compiling=no
1984
1985 cat > conftest.$ac_ext << EOF
1986
1987 #line 1988 "configure"
1988 #include "confdefs.h"
1989
1990 main(){return(0);}
1991 EOF
1992 if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993   ac_cv_prog_cc_works=yes
1994   # If we can't run a trivial program, we are probably using a cross compiler.
1995   if (./conftest; exit) 2>/dev/null; then
1996     ac_cv_prog_cc_cross=no
1997   else
1998     ac_cv_prog_cc_cross=yes
1999   fi
2000 else
2001   echo "configure: failed program was:" >&5
2002   cat conftest.$ac_ext >&5
2003   ac_cv_prog_cc_works=no
2004 fi
2005 rm -fr conftest*
2006 ac_ext=c
2007 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2008 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2009 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'
2010 ac_cpp='$CPP '"$xe_cppflags"
2011 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2012 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2013 cross_compiling=no
2014
2015 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2016 if test $ac_cv_prog_cc_works = no; then
2017   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2018 fi
2019 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2020 echo "configure:2021: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2021 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2022 cross_compiling=$ac_cv_prog_cc_cross
2023
2024 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2025 echo "configure:2026: checking whether we are using GNU C" >&5
2026
2027 cat > conftest.c <<EOF
2028 #ifdef __GNUC__
2029   yes;
2030 #endif
2031 EOF
2032 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2033   ac_cv_prog_gcc=yes
2034 else
2035   ac_cv_prog_gcc=no
2036 fi
2037
2038 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2039
2040 if test $ac_cv_prog_gcc = yes; then
2041   GCC=yes
2042 else
2043   GCC=
2044 fi
2045
2046 ac_test_CFLAGS="${CFLAGS+set}"
2047 ac_save_CFLAGS="$CFLAGS"
2048 CFLAGS=
2049 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2050 echo "configure:2051: checking whether ${CC-cc} accepts -g" >&5
2051
2052 echo 'void f(){}' > conftest.c
2053 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2054   ac_cv_prog_cc_g=yes
2055 else
2056   ac_cv_prog_cc_g=no
2057 fi
2058 rm -f conftest*
2059
2060
2061 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2062 if test "$ac_test_CFLAGS" = set; then
2063   CFLAGS="$ac_save_CFLAGS"
2064 elif test $ac_cv_prog_cc_g = yes; then
2065   if test "$GCC" = yes; then
2066     CFLAGS="-g -O2"
2067   else
2068     CFLAGS="-g"
2069   fi
2070 else
2071   if test "$GCC" = yes; then
2072     CFLAGS="-O2"
2073   else
2074     CFLAGS=
2075   fi
2076 fi
2077
2078 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2079   CC=gcc
2080   # Extract the first word of "gcc", so it can be a program name with args.
2081 set dummy gcc; ac_word=$2
2082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_word" >&5
2084
2085 if test -n "$CC"; then
2086   ac_cv_prog_CC="$CC" # Let the user override the test.
2087 else
2088   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2089   ac_dummy="$PATH"
2090   for ac_dir in $ac_dummy; do
2091     test -z "$ac_dir" && ac_dir=.
2092     if test -f $ac_dir/$ac_word; then
2093       ac_cv_prog_CC="gcc"
2094       break
2095     fi
2096   done
2097   IFS="$ac_save_ifs"
2098 fi
2099 CC="$ac_cv_prog_CC"
2100 if test -n "$CC"; then
2101   echo "$ac_t""$CC" 1>&6
2102 else
2103   echo "$ac_t""no" 1>&6
2104 fi
2105
2106 if test -z "$CC"; then
2107   # Extract the first word of "cc", so it can be a program name with args.
2108 set dummy cc; ac_word=$2
2109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2110 echo "configure:2111: checking for $ac_word" >&5
2111
2112 if test -n "$CC"; then
2113   ac_cv_prog_CC="$CC" # Let the user override the test.
2114 else
2115   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2116   ac_prog_rejected=no
2117   ac_dummy="$PATH"
2118   for ac_dir in $ac_dummy; do
2119     test -z "$ac_dir" && ac_dir=.
2120     if test -f $ac_dir/$ac_word; then
2121       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2122         ac_prog_rejected=yes
2123         continue
2124       fi
2125       ac_cv_prog_CC="cc"
2126       break
2127     fi
2128   done
2129   IFS="$ac_save_ifs"
2130 if test $ac_prog_rejected = yes; then
2131   # We found a bogon in the path, so make sure we never use it.
2132   set dummy $ac_cv_prog_CC
2133   shift
2134   if test $# -gt 0; then
2135     # We chose a different compiler from the bogus one.
2136     # However, it has the same basename, so the bogon will be chosen
2137     # first if we set CC to just the basename; use the full file name.
2138     shift
2139     set dummy "$ac_dir/$ac_word" "$@"
2140     shift
2141     ac_cv_prog_CC="$@"
2142   fi
2143 fi
2144 fi
2145 CC="$ac_cv_prog_CC"
2146 if test -n "$CC"; then
2147   echo "$ac_t""$CC" 1>&6
2148 else
2149   echo "$ac_t""no" 1>&6
2150 fi
2151
2152   if test -z "$CC"; then
2153     case "`uname -s`" in
2154     *win32* | *WIN32*)
2155       # Extract the first word of "cl", so it can be a program name with args.
2156 set dummy cl; ac_word=$2
2157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2158 echo "configure:2159: checking for $ac_word" >&5
2159
2160 if test -n "$CC"; then
2161   ac_cv_prog_CC="$CC" # Let the user override the test.
2162 else
2163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2164   ac_dummy="$PATH"
2165   for ac_dir in $ac_dummy; do
2166     test -z "$ac_dir" && ac_dir=.
2167     if test -f $ac_dir/$ac_word; then
2168       ac_cv_prog_CC="cl"
2169       break
2170     fi
2171   done
2172   IFS="$ac_save_ifs"
2173 fi
2174 CC="$ac_cv_prog_CC"
2175 if test -n "$CC"; then
2176   echo "$ac_t""$CC" 1>&6
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180  ;;
2181     esac
2182   fi
2183   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2184 fi
2185
2186 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2187 echo "configure:2188: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2188
2189 ac_ext=c
2190 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2191 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2192 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'
2193 ac_cpp='$CPP '"$xe_cppflags"
2194 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2195 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2196 cross_compiling=no
2197
2198 cat > conftest.$ac_ext << EOF
2199
2200 #line 2201 "configure"
2201 #include "confdefs.h"
2202
2203 main(){return(0);}
2204 EOF
2205 if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2206   ac_cv_prog_cc_works=yes
2207   # If we can't run a trivial program, we are probably using a cross compiler.
2208   if (./conftest; exit) 2>/dev/null; then
2209     ac_cv_prog_cc_cross=no
2210   else
2211     ac_cv_prog_cc_cross=yes
2212   fi
2213 else
2214   echo "configure: failed program was:" >&5
2215   cat conftest.$ac_ext >&5
2216   ac_cv_prog_cc_works=no
2217 fi
2218 rm -fr conftest*
2219 ac_ext=c
2220 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2221 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2222 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'
2223 ac_cpp='$CPP '"$xe_cppflags"
2224 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2225 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2226 cross_compiling=no
2227
2228 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2229 if test $ac_cv_prog_cc_works = no; then
2230   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2231 fi
2232 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2233 echo "configure:2234: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2234 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2235 cross_compiling=$ac_cv_prog_cc_cross
2236
2237 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2238 echo "configure:2239: checking whether we are using GNU C" >&5
2239
2240 cat > conftest.c <<EOF
2241 #ifdef __GNUC__
2242   yes;
2243 #endif
2244 EOF
2245 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2246   ac_cv_prog_gcc=yes
2247 else
2248   ac_cv_prog_gcc=no
2249 fi
2250
2251 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2252
2253 if test $ac_cv_prog_gcc = yes; then
2254   GCC=yes
2255 else
2256   GCC=
2257 fi
2258
2259 ac_test_CFLAGS="${CFLAGS+set}"
2260 ac_save_CFLAGS="$CFLAGS"
2261 CFLAGS=
2262 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2263 echo "configure:2264: checking whether ${CC-cc} accepts -g" >&5
2264
2265 echo 'void f(){}' > conftest.c
2266 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2267   ac_cv_prog_cc_g=yes
2268 else
2269   ac_cv_prog_cc_g=no
2270 fi
2271 rm -f conftest*
2272
2273
2274 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2275 if test "$ac_test_CFLAGS" = set; then
2276   CFLAGS="$ac_save_CFLAGS"
2277 elif test $ac_cv_prog_cc_g = yes; then
2278   if test "$GCC" = yes; then
2279     CFLAGS="-g -O2"
2280   else
2281     CFLAGS="-g"
2282   fi
2283 else
2284   if test "$GCC" = yes; then
2285     CFLAGS="-O2"
2286   else
2287     CFLAGS=
2288   fi
2289 fi
2290
2291 fi
2292 CFLAGS="$xe_save_CFLAGS"
2293
2294
2295 test -n "$CPP" -a -d "$CPP" && CPP=
2296
2297 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2298
2299 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2300 echo "configure:2301: checking how to run the C preprocessor" >&5
2301 # On Suns, sometimes $CPP names a directory.
2302 if test -n "$CPP" && test -d "$CPP"; then
2303   CPP=
2304 fi
2305 if test -z "$CPP"; then
2306
2307   # This must be in double quotes, not single quotes, because CPP may get
2308   # substituted into the Makefile and "${CC-cc}" will confuse make.
2309   CPP="${CC-cc} -E"
2310   # On the NeXT, cc -E runs the code through the compiler's parser,
2311   # not just through cpp.
2312   cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 #include <assert.h>
2316 Syntax Error
2317 EOF
2318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2319 { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321 if test -z "$ac_err"; then
2322   :
2323 else
2324   echo "$ac_err" >&5
2325   echo "configure: failed program was:" >&5
2326   cat conftest.$ac_ext >&5
2327   rm -rf conftest*
2328   CPP="${CC-cc} -E -traditional-cpp"
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <assert.h>
2333 Syntax Error
2334 EOF
2335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2336 { (eval echo configure:2337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2338 if test -z "$ac_err"; then
2339   :
2340 else
2341   echo "$ac_err" >&5
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   CPP="${CC-cc} -nologo -E"
2346   cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349 #include <assert.h>
2350 Syntax Error
2351 EOF
2352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2353 { (eval echo configure:2354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2355 if test -z "$ac_err"; then
2356   :
2357 else
2358   echo "$ac_err" >&5
2359   echo "configure: failed program was:" >&5
2360   cat conftest.$ac_ext >&5
2361   rm -rf conftest*
2362   CPP=/lib/cpp
2363 fi
2364 rm -f conftest*
2365 fi
2366 rm -f conftest*
2367 fi
2368 rm -f conftest*
2369   ac_cv_prog_CPP="$CPP"
2370   CPP="$ac_cv_prog_CPP"
2371 else
2372   ac_cv_prog_CPP="$CPP"
2373 fi
2374 echo "$ac_t""$CPP" 1>&6
2375
2376
2377
2378 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2379 echo "configure:2380: checking for AIX" >&5
2380 cat > conftest.$ac_ext <<EOF
2381 #line 2382 "configure"
2382 #include "confdefs.h"
2383 #ifdef _AIX
2384   yes
2385 #endif
2386
2387 EOF
2388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2389   egrep "yes" >/dev/null 2>&1; then
2390   rm -rf conftest*
2391   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2392     Defining _ALL_SOURCE
2393 EOF
2394 cat >> confdefs.h <<\EOF
2395 #define _ALL_SOURCE 1
2396 EOF
2397 }
2398
2399 else
2400   rm -rf conftest*
2401   echo "$ac_t""no" 1>&6
2402 fi
2403 rm -f conftest*
2404
2405  
2406
2407 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2408 echo "configure:2409: checking for GNU libc" >&5
2409 cat > conftest.$ac_ext <<EOF
2410 #line 2411 "configure"
2411 #include "confdefs.h"
2412 #include <features.h>
2413 int main() {
2414
2415 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2416 #error Not a GNU libc system :-(
2417 ******* ======= ******** &&&&&&&&
2418 #endif
2419
2420 ; return 0; }
2421 EOF
2422 if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2423   rm -rf conftest*
2424   have_glibc=yes
2425 else
2426   echo "configure: failed program was:" >&5
2427   cat conftest.$ac_ext >&5
2428   rm -rf conftest*
2429   have_glibc=no
2430 fi
2431 rm -f conftest*
2432 echo "$ac_t""$have_glibc" 1>&6
2433 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2434     Defining _GNU_SOURCE
2435 EOF
2436 cat >> confdefs.h <<\EOF
2437 #define _GNU_SOURCE 1
2438 EOF
2439 }
2440
2441
2442 case "$opsys" in
2443   sol2)
2444    { test "$extra_verbose" = "yes" && cat << \EOF
2445     Defining __EXTENSIONS__
2446 EOF
2447 cat >> confdefs.h <<\EOF
2448 #define __EXTENSIONS__ 1
2449 EOF
2450 }
2451
2452       if test "$os_release" -ge 505; then
2453      { test "$extra_verbose" = "yes" && cat << \EOF
2454     Defining _XOPEN_SOURCE = 500
2455 EOF
2456 cat >> confdefs.h <<\EOF
2457 #define _XOPEN_SOURCE 500
2458 EOF
2459 }
2460
2461      { test "$extra_verbose" = "yes" && cat << \EOF
2462     Defining _XOPEN_SOURCE_EXTENDED
2463 EOF
2464 cat >> confdefs.h <<\EOF
2465 #define _XOPEN_SOURCE_EXTENDED 1
2466 EOF
2467 }
2468
2469    fi ;;
2470   linux)
2471     { test "$extra_verbose" = "yes" && cat << \EOF
2472     Defining _POSIX_C_SOURCE = 199506L
2473 EOF
2474 cat >> confdefs.h <<\EOF
2475 #define _POSIX_C_SOURCE 199506L
2476 EOF
2477 }
2478
2479     { test "$extra_verbose" = "yes" && cat << \EOF
2480     Defining _XOPEN_SOURCE = 500
2481 EOF
2482 cat >> confdefs.h <<\EOF
2483 #define _XOPEN_SOURCE 500
2484 EOF
2485 }
2486
2487     { test "$extra_verbose" = "yes" && cat << \EOF
2488     Defining _XOPEN_SOURCE_EXTENDED
2489 EOF
2490 cat >> confdefs.h <<\EOF
2491 #define _XOPEN_SOURCE_EXTENDED 1
2492 EOF
2493 }
2494
2495     ;;
2496 esac
2497
2498 cat > conftest.$ac_ext <<EOF
2499 #line 2500 "configure"
2500 #include "confdefs.h"
2501 int main () {
2502 #if defined __SUNPRO_C
2503 return 11;
2504 #elif defined __DECC
2505 return 12;
2506 #elif defined __USLC__ && defined __SCO_VERSION__
2507 return 13;
2508 #elif defined __INTEL_COMPILER
2509 return 14;
2510 #else
2511 return 0;
2512 #endif
2513 }
2514 EOF
2515 if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2516 then
2517   :
2518 else
2519   conftest_rc="$?"
2520   echo "configure: failed program was:" >&5
2521   cat conftest.$ac_ext >&5
2522   rm -fr conftest*
2523   case "$conftest_rc" in
2524   11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
2525   12) echo "You appear to be using the DEC C compiler."    ; __DECC=yes ;;
2526   13) echo "You appear to be using the SCO C compiler."    ; __USLC__=yes ;;
2527   14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
2528             GCC=no ;;
2529 esac
2530 fi
2531 rm -fr conftest*
2532
2533
2534
2535
2536 echo "Extracting information from the machine- and system-dependent headers..."
2537
2538 tempcname="conftest.c"
2539
2540
2541
2542 cat > $tempcname < confdefs.h
2543 cat >> $tempcname <<EOF
2544 #define NOT_C_CODE
2545 #define C_SWITCH_SITE
2546 #define C_SWITCH_X_SITE
2547 #define LD_SWITCH_SITE
2548 #define LD_SWITCH_X_SITE
2549 #define LD_SWITCH_X_SITE_AUX
2550 #define OS_RELEASE $os_release
2551
2552 #ifdef config_opsysfile
2553 #include "$srcdir/src/$opsysfile"
2554 #endif
2555
2556 #ifdef config_machfile
2557 #include "$srcdir/src/$machfile"
2558 #endif
2559
2560 #ifndef LIBS_MACHINE
2561 #define LIBS_MACHINE
2562 #endif
2563 configure___ libs_machine=LIBS_MACHINE
2564
2565 #ifndef LIBS_SYSTEM
2566 #define LIBS_SYSTEM
2567 #endif
2568 configure___ libs_system=LIBS_SYSTEM
2569
2570 #ifndef LIBS_TERMCAP
2571 #define LIBS_TERMCAP
2572 #endif
2573 configure___ libs_termcap=LIBS_TERMCAP
2574
2575 #ifndef LIB_STANDARD
2576 #define LIB_STANDARD
2577 #endif
2578 configure___ libs_standard=LIB_STANDARD
2579
2580
2581 #ifndef OBJECTS_MACHINE
2582 #define OBJECTS_MACHINE
2583 #endif
2584 configure___ objects_machine=OBJECTS_MACHINE
2585
2586 #ifndef OBJECTS_SYSTEM
2587 #define OBJECTS_SYSTEM
2588 #endif
2589 configure___ objects_system=OBJECTS_SYSTEM
2590
2591
2592 #ifndef C_SWITCH_MACHINE
2593 #define C_SWITCH_MACHINE
2594 #endif
2595 configure___ c_switch_machine=C_SWITCH_MACHINE
2596
2597 #ifndef C_SWITCH_SYSTEM
2598 #define C_SWITCH_SYSTEM
2599 #endif
2600 configure___ c_switch_system=C_SWITCH_SYSTEM
2601
2602
2603 #ifndef LD_SWITCH_MACHINE
2604 #define LD_SWITCH_MACHINE
2605 #endif
2606 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2607
2608 #ifndef LD_SWITCH_SYSTEM
2609 #define LD_SWITCH_SYSTEM
2610 #endif
2611 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2612
2613
2614 #ifndef UNEXEC
2615 #define UNEXEC "unexec.o"
2616 #endif
2617 configure___ unexec=UNEXEC
2618
2619
2620 #ifndef LD_SWITCH_SHARED
2621 #define LD_SWITCH_SHARED "-c"
2622 #endif
2623 configure___ ld_switch_shared=LD_SWITCH_SHARED
2624
2625
2626 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2627 configure___ ordinary_ld=ORDINARY_LD
2628
2629 #ifdef ORDINARY_LINK
2630 #define LD ORDINARY_LD
2631 #else /* no ORDINARY LINK */
2632 #ifdef COFF_ENCAPSULATE
2633 #define LD "\$(CC) -nostdlib"
2634 #else /* not COFF_ENCAPSULATE */
2635 #ifdef LINKER
2636 #define LD LINKER
2637 #else /* ! defined (LINKER) */
2638 #define LD "ld"
2639 #endif /* ! defined (LINKER) */
2640 #endif /* ! defined (COFF_ENCAPSULATE) */
2641 #endif /* not ORDINARY_LINK */
2642 configure___ ld=LD
2643
2644 #ifndef LIB_GCC
2645 #define LIB_GCC
2646 #endif
2647 configure___ lib_gcc=LIB_GCC
2648
2649 #ifndef LD_TEXT_START_ADDR
2650 #define LD_TEXT_START_ADDR
2651 #endif
2652 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2653
2654
2655 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2656 #ifdef NO_REMAP
2657 #ifdef COFF_ENCAPSULATE
2658 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2659 #else /* ! defined (COFF_ENCAPSULATE) */
2660 #define START_FILES "pre-crt0.o /lib/crt0.o"
2661 #endif /* ! defined (COFF_ENCAPSULATE) */
2662 #else /* ! defined (NO_REMAP) */
2663 #define START_FILES "ecrt0.o"
2664 #endif /* ! defined (NO_REMAP) */
2665 #endif /* no ORDINARY_LINK */
2666 #ifndef START_FILES
2667 #define START_FILES
2668 #endif
2669 configure___ start_files=START_FILES
2670
2671 #ifdef ORDINARY_LINK
2672 configure___ ordinary_link=yes
2673 #else
2674 configure___ ordinary_link=no
2675 #endif
2676
2677 #ifdef SYSTEM_MALLOC
2678 configure___ system_malloc=yes
2679 #else
2680 configure___ system_malloc=no
2681 #endif
2682
2683 #ifdef TERMINFO
2684 configure___ have_terminfo=yes
2685 #else
2686 configure___ have_terminfo=no
2687 #endif
2688
2689 #ifdef MAIL_USE_FLOCK
2690 configure___ mail_use_flock=yes
2691 #else
2692 configure___ mail_use_flock=no
2693 #endif
2694
2695 #ifdef MAIL_USE_LOCKF
2696 configure___ mail_use_lockf=yes
2697 #else
2698 configure___ mail_use_lockf=no
2699 #endif
2700
2701 #ifdef MAIL_USE_LOCKING
2702 configure___ mail_use_locking=yes
2703 #else
2704 configure___ mail_use_locking=no
2705 #endif
2706
2707 #ifdef HAVE_WIN32_PROCESSES
2708 configure___ win32_processes=yes
2709 #else
2710 configure___ win32_processes=no
2711 #endif
2712
2713 EOF
2714
2715 CPP=`eval "echo $CPP $CPPFLAGS"`
2716 eval `$CPP -Isrc $tempcname \
2717         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2718
2719 rm $tempcname
2720
2721 if test "$pdump" = "yes"; then
2722   ordinary_link="yes"
2723   ld="${ordinary_ld}"
2724   start_files=
2725   libs_standard=
2726   unexec=
2727   lib_gcc=
2728 fi
2729
2730 test "$extra_verbose" = "yes" && \
2731   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 ""
2732
2733 case "$opsys" in mingw* | cygwin*)
2734   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2735   cygwin_include=`eval "dirname $cygwin_include"` ;
2736   cygwin_include="-I$cygwin_include/../include" ;
2737   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2738   case "$opsys" in mingw*)
2739     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2740   esac
2741   ;;
2742 esac
2743
2744 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2745
2746
2747 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2748
2749 if test "$__USLC__" = yes; then
2750   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2751 echo "configure:2752: checking for whether the -Kalloca compiler flag is needed" >&5
2752   need_kalloca=no
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756
2757 int main() {
2758 void *x = alloca(4);
2759 ; return 0; }
2760 EOF
2761 if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2762   rm -rf conftest*
2763   :
2764 else
2765   echo "configure: failed program was:" >&5
2766   cat conftest.$ac_ext >&5
2767   rm -rf conftest*
2768   
2769     xe_save_c_switch_system="$c_switch_system"
2770     c_switch_system="$c_switch_system -Kalloca"
2771     cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2774
2775 int main() {
2776 void *x = alloca(4);
2777 ; return 0; }
2778 EOF
2779 if { (eval echo configure:2780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2780   rm -rf conftest*
2781    need_kalloca=yes 
2782 else
2783   echo "configure: failed program was:" >&5
2784   cat conftest.$ac_ext >&5
2785 fi
2786 rm -f conftest*
2787     c_switch_system="$xe_save_c_switch_system"
2788 fi
2789 rm -f conftest*
2790   echo "$ac_t""$need_kalloca" 1>&6
2791   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
2792 fi
2793
2794 if test "$cflags_specified" = "no"; then
2795       if   test "$GCC" = "yes"; then
2796     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2797         CFLAGS="$CFLAGS -Wsign-compare"
2798         case "`gcc -v --help 2>&1`" in
2799       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2800     esac
2801                 if test "$xemacs_compiler" != "g++"; then
2802       CFLAGS="$CFLAGS -Wshadow"
2803     fi
2804             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2805               elif test "$__SUNPRO_C" = "yes"; then
2806     case "$opsys" in
2807       sol2    ) CFLAGS="-v -xO4" ;;
2808       sunos4* ) CFLAGS="-xO2";;
2809     esac
2810   elif test "$__DECC" = "yes"; then
2811     CFLAGS="-O3"
2812   elif test "$CC" = "xlc"; then
2813     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2814   elif test "$__ICC" = "yes"; then
2815     CFLAGS="-g -O3 -Ob2 -Wall -W1"
2816     else
2817     CFLAGS="-O" ;  fi
2818 fi
2819
2820 if test "$GCC" = "yes"; then
2821 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2822 echo "configure:2823: checking for buggy gcc versions" >&5
2823 GCC_VERSION=`$CC --version`
2824 case `uname -s`:`uname -m`:$GCC_VERSION in
2825                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2826                         case "$CFLAGS" in
2827             *-O2*|*-O3*)
2828                 case "$CFLAGS" in
2829                     *-fno-schedule-insns*) ;;
2830                     *)
2831                         echo "$ac_t""yes" 1>&6
2832                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2833                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2834                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2835                         ;;
2836                 esac
2837                 ;;
2838         esac
2839         ;;
2840                     Linux:alpha:egcs-2.91.*)
2841         echo "$ac_t""yes" 1>&6
2842         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2843         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2844         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2845         ;;
2846     *:i*86*:2.7.2*)
2847         case "$CFLAGS" in
2848             *-O2*|*-O3*)
2849                 case "$GCC_VERSION" in
2850                     2.7.2)
2851                         case "$CFLAGS" in
2852                             *-fno-strength-reduce*) ;;
2853                             *)
2854                                 echo "$ac_t""yes" 1>&6
2855                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2856                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2857                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2858                                 ;;
2859                         esac
2860                         ;;
2861                 esac
2862                 case "$CFLAGS" in
2863                  *-fno-caller-saves*) ;;
2864                  *)
2865                     echo "$ac_t""yes" 1>&6
2866                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2867                     echo "configure: warning: -fno-caller-saves." 1>&2
2868                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2869                     ;;
2870                 esac
2871                 ;;
2872         esac
2873         ;;
2874 esac
2875 echo "$ac_t""no" 1>&6
2876 fi
2877
2878 if test "$pdump" != "yes"; then
2879   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2880 echo "configure:2881: checking for \"-z nocombreloc\" linker flag" >&5
2881   case "`ld --help 2>&1`" in
2882     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2883       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2884     *) echo "$ac_t""no" 1>&6 ;;
2885   esac
2886 fi
2887
2888
2889
2890 if test "$GCC" = "yes"; then
2891   set x $ld_switch_system; shift; ld_switch_system=""
2892   while test -n "$1"; do
2893     case $1 in
2894       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2895       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2896       -Xlinker* ) ;;
2897       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2898     esac
2899     shift
2900   done
2901 fi
2902
2903 if test "$GCC" = "yes"; then
2904   set x $ld_switch_machine; shift; ld_switch_machine=""
2905   while test -n "$1"; do
2906     case $1 in
2907       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2908       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2909       -Xlinker* ) ;;
2910       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2911     esac
2912     shift
2913   done
2914 fi
2915
2916 if test "$GCC" = "yes"; then
2917   set x $ld_switch_site; shift; ld_switch_site=""
2918   while test -n "$1"; do
2919     case $1 in
2920       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2921       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2922       -Xlinker* ) ;;
2923       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2924     esac
2925     shift
2926   done
2927 fi
2928
2929 if test "$GCC" = "yes"; then
2930   set x $LDFLAGS; shift; LDFLAGS=""
2931   while test -n "$1"; do
2932     case $1 in
2933       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2934       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2935       -Xlinker* ) ;;
2936       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2937     esac
2938     shift
2939   done
2940 fi
2941
2942 if test "$GCC" = "yes"; then
2943   set x $ld_call_shared; shift; ld_call_shared=""
2944   while test -n "$1"; do
2945     case $1 in
2946       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2947       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2948       -Xlinker* ) ;;
2949       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2950     esac
2951     shift
2952   done
2953 fi
2954
2955 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2956    echo "    xemacs will be linked with \"$objects_machine\""
2957  fi
2958 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2959    echo "    xemacs will be linked with \"$objects_system\""
2960  fi
2961 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2962    echo "    xemacs will be linked with \"$unexec\""
2963  fi
2964 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2965    echo "    xemacs will be linked with \"dumper.o\""
2966  fi
2967
2968 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2969 echo "configure:2970: checking for dynodump" >&5
2970 if test "$unexec" != "unexsol2.o"; then
2971   echo "$ac_t""no" 1>&6
2972 else
2973   echo "$ac_t""yes" 1>&6
2974   { test "$extra_verbose" = "yes" && cat << \EOF
2975     Defining DYNODUMP
2976 EOF
2977 cat >> confdefs.h <<\EOF
2978 #define DYNODUMP 1
2979 EOF
2980 }
2981
2982   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2983   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2984   case "$machine" in
2985     sparc   ) dynodump_arch=sparc ;;
2986     *86*    ) dynodump_arch=i386  ;;
2987     powerpc ) dynodump_arch=ppc   ;;
2988   esac
2989     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
2990 fi
2991
2992
2993 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2994
2995 if test "$unexec" = "unexaix.o"; then
2996   if   test "$dynamic" = "no"; then
2997   start_flags="-Wl,-bnso,-bnodelcsect"
2998   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2999   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
3000     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
3001   done
3002   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3003     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3004   done
3005   
3006 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3007 echo "configure:3008: checking for terminateAndUnload in -lC" >&5
3008 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3009
3010 xe_check_libs=" -lC "
3011 cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014 /* Override any gcc2 internal prototype to avoid an error.  */
3015 /* We use char because int might match the return type of a gcc2
3016     builtin and then its argument prototype would still apply.  */
3017 char terminateAndUnload();
3018
3019 int main() {
3020 terminateAndUnload()
3021 ; return 0; }
3022 EOF
3023 if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3024   rm -rf conftest*
3025   eval "ac_cv_lib_$ac_lib_var=yes"
3026 else
3027   echo "configure: failed program was:" >&5
3028   cat conftest.$ac_ext >&5
3029   rm -rf conftest*
3030   eval "ac_cv_lib_$ac_lib_var=no"
3031 fi
3032 rm -f conftest*
3033 xe_check_libs=""
3034
3035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3036   echo "$ac_t""yes" 1>&6
3037   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3038 else
3039   echo "$ac_t""no" 1>&6
3040 fi
3041
3042
3043   fi
3044 elif test -n "$ld_text_start_addr"; then
3045   start_flags="-T $ld_text_start_addr -e __start"
3046 fi
3047
3048
3049
3050
3051 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3052  test -z "$linker" &&  linker='$(CC) -nostdlib'
3053  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3054 fi
3055 test "$GCC" != "yes" && lib_gcc=
3056
3057
3058
3059
3060
3061 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3062 if test -n "$site_libraries"; then
3063   for arg in $site_libraries; do
3064     case "$arg" in
3065      -* ) ;;
3066      * ) test -d "$arg" || \
3067            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3068        arg="-L${arg}" ;;
3069     esac
3070     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3071   done
3072 fi
3073
3074 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3075 if test -n "$site_includes"; then
3076   for arg in $site_includes; do
3077     case "$arg" in
3078       -* ) ;;
3079       * ) test -d "$arg" || \
3080            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3081       arg="-I${arg}" ;;
3082     esac
3083     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3084   done
3085 fi
3086
3087 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3088 if test -n "$site_prefixes"; then
3089   for dir in $site_prefixes; do
3090     lib_dir="${dir}/lib"
3091     inc_dir="${dir}/include"
3092     if test ! -d "$dir"; then
3093       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3094     elif test ! -d "$lib_dir"; then
3095       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3096     else
3097       if test -d "$inc_dir"; then
3098         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
3099       fi
3100       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
3101     fi
3102   done
3103 fi
3104
3105
3106 for dir in "/usr/ccs/lib"; do
3107   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
3108 done
3109
3110 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3111 if test -n "$site_runtime_libraries"; then
3112   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3113   export LD_RUN_PATH
3114 fi
3115
3116
3117
3118
3119
3120 if test -n "$add_runtime_path"; then :;
3121 elif test "$dynamic" = "no"; then add_runtime_path=no
3122 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3123 else case "$opsys" in
3124        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3125        * ) add_runtime_path=no ;;
3126      esac
3127 fi
3128
3129 if test "$add_runtime_path" = "yes"; then
3130       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3131 echo "configure:3132: checking "for runtime libraries flag"" >&5
3132   case "$opsys" in
3133     sol2 ) dash_r="-R" ;;
3134     decosf* | linux* | irix*) dash_r="-rpath " ;;
3135     *)
3136       dash_r=""
3137       for try_dash_r in "-R" "-R " "-rpath "; do
3138         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3139         
3140 if test "$GCC" = "yes"; then
3141   set x $xe_check_libs; shift; xe_check_libs=""
3142   while test -n "$1"; do
3143     case $1 in
3144       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3145       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3146       -Xlinker* ) ;;
3147       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3148     esac
3149     shift
3150   done
3151 fi
3152         cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155
3156 int main() {
3157
3158 ; return 0; }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3161   rm -rf conftest*
3162   dash_r="$try_dash_r"
3163 else
3164   echo "configure: failed program was:" >&5
3165   cat conftest.$ac_ext >&5
3166 fi
3167 rm -f conftest*
3168         xe_check_libs=""
3169         test -n "$dash_r" && break
3170       done ;;
3171   esac
3172   if test -n "$dash_r";
3173     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3174     else echo "$ac_t""NONE" 1>&6
3175   fi
3176 fi
3177
3178 xe_add_unique_runpath_dir='
3179   xe_add_p=yes
3180   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3181   done
3182   if test "$xe_add_p" = "yes"; then
3183     test -n "$runpath" && runpath="${runpath}:"
3184     runpath="${runpath}${xe_runpath_dir}"
3185     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3186   fi'
3187
3188
3189
3190
3191 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3192     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3193   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3194   
3195         runpath="" runpath_dirs=""
3196   if test -n "$LD_RUN_PATH"; then
3197     runpath="$LD_RUN_PATH"
3198   elif test "$GCC" = "yes"; then
3199         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3200     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3201     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3202     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3203       case "$arg" in P,* | -L* | -R* )
3204         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3205           {
3206 xe_runpath_dir="$dir"
3207   test "$xe_runpath_dir" != "/lib"     -a \
3208         "$xe_runpath_dir" != "/usr/lib" -a \
3209         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3210   eval "$xe_add_unique_runpath_dir"
3211 }
3212         done ;;
3213       esac
3214     done
3215     ld_switch_run="$ld_switch_run_save"
3216     rm -f conftest*
3217   else
3218         for arg in $ld_switch_site $ld_switch_x_site; do
3219       case "$arg" in -L*) {
3220 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3221   test "$xe_runpath_dir" != "/lib"     -a \
3222         "$xe_runpath_dir" != "/usr/lib" -a \
3223         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3224   eval "$xe_add_unique_runpath_dir"
3225 };; esac
3226     done
3227             if test "$opsys $need_motif" = "sol2 yes"; then
3228       xe_runpath_dir="/opt/SUNWdt/lib";
3229       eval "$xe_add_unique_runpath_dir";
3230     fi
3231   fi 
3232   if test -n "$runpath"; then
3233     ld_switch_run="${dash_r}${runpath}"
3234     
3235 if test "$GCC" = "yes"; then
3236   set x $ld_switch_run; shift; ld_switch_run=""
3237   while test -n "$1"; do
3238     case $1 in
3239       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3240       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3241       -Xlinker* ) ;;
3242       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3243     esac
3244     shift
3245   done
3246 fi
3247     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3248   fi
3249 fi
3250
3251
3252
3253 GNU_MALLOC=yes
3254 if test "$with_dlmalloc" != "no"; then
3255         doug_lea_malloc=yes
3256 else
3257         doug_lea_malloc=no
3258 fi
3259 after_morecore_hook_exists=yes
3260 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3261 echo "configure:3262: checking for malloc_set_state" >&5
3262
3263 cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 /* System header to define __stub macros and hopefully few prototypes,
3267     which can conflict with char malloc_set_state(); below.  */
3268 #include <assert.h>
3269 /* Override any gcc2 internal prototype to avoid an error.  */
3270 /* We use char because int might match the return type of a gcc2
3271     builtin and then its argument prototype would still apply.  */
3272 char malloc_set_state();
3273
3274 int main() {
3275
3276 /* The GNU C library defines this for functions which it implements
3277     to always fail with ENOSYS.  Some functions are actually named
3278     something starting with __ and the normal name is an alias.  */
3279 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3280 choke me
3281 #else
3282 malloc_set_state();
3283 #endif
3284
3285 ; return 0; }
3286 EOF
3287 if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3288   rm -rf conftest*
3289   eval "ac_cv_func_malloc_set_state=yes"
3290 else
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -rf conftest*
3294   eval "ac_cv_func_malloc_set_state=no"
3295 fi
3296 rm -f conftest*
3297
3298 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3299   echo "$ac_t""yes" 1>&6
3300   :
3301 else
3302   echo "$ac_t""no" 1>&6
3303 doug_lea_malloc=no
3304 fi
3305
3306 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3307 echo "configure:3308: checking whether __after_morecore_hook exists" >&5
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 extern void (* __after_morecore_hook)();
3312 int main() {
3313 __after_morecore_hook = 0
3314 ; return 0; }
3315 EOF
3316 if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3317   rm -rf conftest*
3318   echo "$ac_t""yes" 1>&6
3319 else
3320   echo "configure: failed program was:" >&5
3321   cat conftest.$ac_ext >&5
3322   rm -rf conftest*
3323   echo "$ac_t""no" 1>&6
3324    after_morecore_hook_exists=no
3325 fi
3326 rm -f conftest*
3327 if test "$system_malloc" = "yes" ; then
3328   GNU_MALLOC=no
3329   GNU_MALLOC_reason="
3330     - The GNU allocators don't work with this system configuration."
3331 elif test "$with_system_malloc" = "yes" ; then
3332   GNU_MALLOC=no
3333   GNU_MALLOC_reason="
3334     - User chose not to use GNU allocators."
3335 elif test "$with_debug_malloc" = "yes" ; then
3336   GNU_MALLOC=no
3337   GNU_MALLOC_reason="
3338     - User chose to use Debugging Malloc."
3339 fi
3340
3341 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3342   GNU_MALLOC_reason="
3343     - Using Doug Lea's new malloc from the GNU C Library."
3344   { test "$extra_verbose" = "yes" && cat << \EOF
3345     Defining DOUG_LEA_MALLOC
3346 EOF
3347 cat >> confdefs.h <<\EOF
3348 #define DOUG_LEA_MALLOC 1
3349 EOF
3350 }
3351
3352   if test "$after_morecore_hook_exists" = "no" ; then
3353     GNU_MALLOC_reason="
3354     - Using Doug Lea's new malloc from the Linux C Library."
3355     { test "$extra_verbose" = "yes" && cat << \EOF
3356     Defining _NO_MALLOC_WARNING_
3357 EOF
3358 cat >> confdefs.h <<\EOF
3359 #define _NO_MALLOC_WARNING_ 1
3360 EOF
3361 }
3362
3363   fi
3364 fi
3365
3366
3367
3368
3369 # Extract the first word of "ranlib", so it can be a program name with args.
3370 set dummy ranlib; ac_word=$2
3371 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3372 echo "configure:3373: checking for $ac_word" >&5
3373
3374 if test -n "$RANLIB"; then
3375   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3376 else
3377   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3378   ac_dummy="$PATH"
3379   for ac_dir in $ac_dummy; do
3380     test -z "$ac_dir" && ac_dir=.
3381     if test -f $ac_dir/$ac_word; then
3382       ac_cv_prog_RANLIB="ranlib"
3383       break
3384     fi
3385   done
3386   IFS="$ac_save_ifs"
3387   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3388 fi
3389 RANLIB="$ac_cv_prog_RANLIB"
3390 if test -n "$RANLIB"; then
3391   echo "$ac_t""$RANLIB" 1>&6
3392 else
3393   echo "$ac_t""no" 1>&6
3394 fi
3395
3396 ac_aux_dir=
3397 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3398   if test -f $ac_dir/install-sh; then
3399     ac_aux_dir=$ac_dir
3400     ac_install_sh="$ac_aux_dir/install-sh -c"
3401     break
3402   elif test -f $ac_dir/install.sh; then
3403     ac_aux_dir=$ac_dir
3404     ac_install_sh="$ac_aux_dir/install.sh -c"
3405     break
3406   fi
3407 done
3408 if test -z "$ac_aux_dir"; then
3409   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3410 fi
3411 ac_config_guess=$ac_aux_dir/config.guess
3412 ac_config_sub=$ac_aux_dir/config.sub
3413 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3414
3415 # Find a good install program.  We prefer a C program (faster),
3416 # so one script is as good as another.  But avoid the broken or
3417 # incompatible versions:
3418 # SysV /etc/install, /usr/sbin/install
3419 # SunOS /usr/etc/install
3420 # IRIX /sbin/install
3421 # AIX /bin/install
3422 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3423 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3424 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3425 # ./install, which can be erroneously created by make from ./install.sh.
3426 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3427 echo "configure:3428: checking for a BSD compatible install" >&5
3428 if test -z "$INSTALL"; then
3429
3430   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3431   for ac_dir in $PATH; do
3432     # Account for people who put trailing slashes in PATH elements.
3433     case "$ac_dir/" in
3434     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3435     *)
3436       # OSF1 and SCO ODT 3.0 have their own names for install.
3437       # Don't use installbsd from OSF since it installs stuff as root
3438       # by default.
3439       for ac_prog in ginstall scoinst install; do
3440         if test -f $ac_dir/$ac_prog; then
3441           if test $ac_prog = install &&
3442             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3443             # AIX install.  It has an incompatible calling convention.
3444             :
3445           else
3446             ac_cv_path_install="$ac_dir/$ac_prog -c"
3447             break 2
3448           fi
3449         fi
3450       done
3451       ;;
3452     esac
3453   done
3454   IFS="$ac_save_IFS"
3455
3456   if test "${ac_cv_path_install+set}" = set; then
3457     INSTALL="$ac_cv_path_install"
3458   else
3459     # As a last resort, use the slow shell script.  We don't cache a
3460     # path for INSTALL within a source directory, because that will
3461     # break other packages using the cache if that directory is
3462     # removed, or if the path is relative.
3463     INSTALL="$ac_install_sh"
3464   fi
3465 fi
3466 echo "$ac_t""$INSTALL" 1>&6
3467
3468 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3469 # It thinks the first close brace ends the variable substitution.
3470 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3471
3472 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3473
3474 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3475
3476 for ac_prog in 'bison -y' byacc
3477 do
3478 # Extract the first word of "$ac_prog", so it can be a program name with args.
3479 set dummy $ac_prog; ac_word=$2
3480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3481 echo "configure:3482: checking for $ac_word" >&5
3482
3483 if test -n "$YACC"; then
3484   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3485 else
3486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3487   ac_dummy="$PATH"
3488   for ac_dir in $ac_dummy; do
3489     test -z "$ac_dir" && ac_dir=.
3490     if test -f $ac_dir/$ac_word; then
3491       ac_cv_prog_YACC="$ac_prog"
3492       break
3493     fi
3494   done
3495   IFS="$ac_save_ifs"
3496 fi
3497 YACC="$ac_cv_prog_YACC"
3498 if test -n "$YACC"; then
3499   echo "$ac_t""$YACC" 1>&6
3500 else
3501   echo "$ac_t""no" 1>&6
3502 fi
3503
3504 test -n "$YACC" && break
3505 done
3506 test -n "$YACC" || YACC="yacc"
3507
3508
3509 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 
3510 do
3511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3513 echo "configure:3514: checking for $ac_hdr" >&5
3514
3515 cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518 #include <$ac_hdr>
3519 EOF
3520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3521 { (eval echo configure:3522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3523 if test -z "$ac_err"; then
3524   rm -rf conftest*
3525   eval "ac_cv_header_$ac_safe=yes"
3526 else
3527   echo "$ac_err" >&5
3528   echo "configure: failed program was:" >&5
3529   cat conftest.$ac_ext >&5
3530   rm -rf conftest*
3531   eval "ac_cv_header_$ac_safe=no"
3532 fi
3533 rm -f conftest*
3534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3535   echo "$ac_t""yes" 1>&6
3536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3537   { test "$extra_verbose" = "yes" && cat << EOF
3538     Defining $ac_tr_hdr
3539 EOF
3540 cat >> confdefs.h <<EOF
3541 #define $ac_tr_hdr 1
3542 EOF
3543 }
3544  
3545 else
3546   echo "$ac_t""no" 1>&6
3547 fi
3548 done
3549
3550 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3551 echo "configure:3552: checking for sys/wait.h that is POSIX.1 compatible" >&5
3552
3553 cat > conftest.$ac_ext <<EOF
3554 #line 3555 "configure"
3555 #include "confdefs.h"
3556 #include <sys/types.h>
3557 #include <sys/wait.h>
3558 #ifndef WEXITSTATUS
3559 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3560 #endif
3561 #ifndef WIFEXITED
3562 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3563 #endif
3564 int main() {
3565 int s;
3566 wait (&s);
3567 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3568 ; return 0; }
3569 EOF
3570 if { (eval echo configure:3571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3571   rm -rf conftest*
3572   ac_cv_header_sys_wait_h=yes
3573 else
3574   echo "configure: failed program was:" >&5
3575   cat conftest.$ac_ext >&5
3576   rm -rf conftest*
3577   ac_cv_header_sys_wait_h=no
3578 fi
3579 rm -f conftest*
3580
3581 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3582 if test $ac_cv_header_sys_wait_h = yes; then
3583   { test "$extra_verbose" = "yes" && cat << \EOF
3584     Defining HAVE_SYS_WAIT_H
3585 EOF
3586 cat >> confdefs.h <<\EOF
3587 #define HAVE_SYS_WAIT_H 1
3588 EOF
3589 }
3590
3591 fi
3592
3593 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3594 echo "configure:3595: checking for ANSI C header files" >&5
3595
3596 cat > conftest.$ac_ext <<EOF
3597 #line 3598 "configure"
3598 #include "confdefs.h"
3599 #include <stdlib.h>
3600 #include <stdarg.h>
3601 #include <string.h>
3602 #include <float.h>
3603 EOF
3604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3605 { (eval echo configure:3606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3607 if test -z "$ac_err"; then
3608   rm -rf conftest*
3609   ac_cv_header_stdc=yes
3610 else
3611   echo "$ac_err" >&5
3612   echo "configure: failed program was:" >&5
3613   cat conftest.$ac_ext >&5
3614   rm -rf conftest*
3615   ac_cv_header_stdc=no
3616 fi
3617 rm -f conftest*
3618
3619 if test $ac_cv_header_stdc = yes; then
3620   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3621 cat > conftest.$ac_ext <<EOF
3622 #line 3623 "configure"
3623 #include "confdefs.h"
3624 #include <string.h>
3625 EOF
3626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3627   egrep "memchr" >/dev/null 2>&1; then
3628   :
3629 else
3630   rm -rf conftest*
3631   ac_cv_header_stdc=no
3632 fi
3633 rm -f conftest*
3634
3635 fi
3636
3637 if test $ac_cv_header_stdc = yes; then
3638   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3639 cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 #include <stdlib.h>
3643 EOF
3644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3645   egrep "free" >/dev/null 2>&1; then
3646   :
3647 else
3648   rm -rf conftest*
3649   ac_cv_header_stdc=no
3650 fi
3651 rm -f conftest*
3652
3653 fi
3654
3655 if test $ac_cv_header_stdc = yes; then
3656   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3657 cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660 #include <ctype.h>
3661 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3662 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3663 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3664 int main () { int i; for (i = 0; i < 256; i++)
3665 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3666 exit (0); }
3667
3668 EOF
3669 if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3670 then
3671   :
3672 else
3673   conftest_rc="$?"
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -fr conftest*
3677   ac_cv_header_stdc=no
3678 fi
3679 rm -fr conftest*
3680 fi
3681
3682 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3683 if test $ac_cv_header_stdc = yes; then
3684   { test "$extra_verbose" = "yes" && cat << \EOF
3685     Defining STDC_HEADERS
3686 EOF
3687 cat >> confdefs.h <<\EOF
3688 #define STDC_HEADERS 1
3689 EOF
3690 }
3691
3692 fi
3693
3694 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3695 echo "configure:3696: checking whether time.h and sys/time.h may both be included" >&5
3696
3697 cat > conftest.$ac_ext <<EOF
3698 #line 3699 "configure"
3699 #include "confdefs.h"
3700 #include <sys/types.h>
3701 #include <sys/time.h>
3702 #include <time.h>
3703 int main() {
3704 struct tm *tp;
3705 ; return 0; }
3706 EOF
3707 if { (eval echo configure:3708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3708   rm -rf conftest*
3709   ac_cv_header_time=yes
3710 else
3711   echo "configure: failed program was:" >&5
3712   cat conftest.$ac_ext >&5
3713   rm -rf conftest*
3714   ac_cv_header_time=no
3715 fi
3716 rm -f conftest*
3717
3718 echo "$ac_t""$ac_cv_header_time" 1>&6
3719 if test $ac_cv_header_time = yes; then
3720   { test "$extra_verbose" = "yes" && cat << \EOF
3721     Defining TIME_WITH_SYS_TIME
3722 EOF
3723 cat >> confdefs.h <<\EOF
3724 #define TIME_WITH_SYS_TIME 1
3725 EOF
3726 }
3727
3728 fi
3729
3730 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3731 echo "configure:3732: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3732
3733 cat > conftest.$ac_ext <<EOF
3734 #line 3735 "configure"
3735 #include "confdefs.h"
3736 #include <sys/types.h>
3737 #include <signal.h>
3738 /* NetBSD declares sys_siglist in unistd.h.  */
3739 #ifdef HAVE_UNISTD_H
3740 #include <unistd.h>
3741 #endif
3742 int main() {
3743 char *msg = *(sys_siglist + 1);
3744 ; return 0; }
3745 EOF
3746 if { (eval echo configure:3747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3747   rm -rf conftest*
3748   ac_cv_decl_sys_siglist=yes
3749 else
3750   echo "configure: failed program was:" >&5
3751   cat conftest.$ac_ext >&5
3752   rm -rf conftest*
3753   ac_cv_decl_sys_siglist=no
3754 fi
3755 rm -f conftest*
3756
3757 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3758 if test $ac_cv_decl_sys_siglist = yes; then
3759   { test "$extra_verbose" = "yes" && cat << \EOF
3760     Defining SYS_SIGLIST_DECLARED
3761 EOF
3762 cat >> confdefs.h <<\EOF
3763 #define SYS_SIGLIST_DECLARED 1
3764 EOF
3765 }
3766
3767 fi
3768
3769
3770
3771 echo $ac_n "checking for utime""... $ac_c" 1>&6
3772 echo "configure:3773: checking for utime" >&5
3773 cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776 #include <sys/types.h>
3777 #include <utime.h>
3778 int main() {
3779 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3780 ; return 0; }
3781 EOF
3782 if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3783   rm -rf conftest*
3784   echo "$ac_t""yes" 1>&6
3785    { test "$extra_verbose" = "yes" && cat << \EOF
3786     Defining HAVE_UTIME
3787 EOF
3788 cat >> confdefs.h <<\EOF
3789 #define HAVE_UTIME 1
3790 EOF
3791 }
3792
3793 else
3794   echo "configure: failed program was:" >&5
3795   cat conftest.$ac_ext >&5
3796   rm -rf conftest*
3797   echo "$ac_t""no" 1>&6
3798       for ac_func in utimes
3799 do
3800 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3801 echo "configure:3802: checking for $ac_func" >&5
3802
3803 cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806 /* System header to define __stub macros and hopefully few prototypes,
3807     which can conflict with char $ac_func(); below.  */
3808 #include <assert.h>
3809 /* Override any gcc2 internal prototype to avoid an error.  */
3810 /* We use char because int might match the return type of a gcc2
3811     builtin and then its argument prototype would still apply.  */
3812 char $ac_func();
3813
3814 int main() {
3815
3816 /* The GNU C library defines this for functions which it implements
3817     to always fail with ENOSYS.  Some functions are actually named
3818     something starting with __ and the normal name is an alias.  */
3819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3820 choke me
3821 #else
3822 $ac_func();
3823 #endif
3824
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3828   rm -rf conftest*
3829   eval "ac_cv_func_$ac_func=yes"
3830 else
3831   echo "configure: failed program was:" >&5
3832   cat conftest.$ac_ext >&5
3833   rm -rf conftest*
3834   eval "ac_cv_func_$ac_func=no"
3835 fi
3836 rm -f conftest*
3837
3838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3839   echo "$ac_t""yes" 1>&6
3840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3841   { test "$extra_verbose" = "yes" && cat << EOF
3842     Defining $ac_tr_func
3843 EOF
3844 cat >> confdefs.h <<EOF
3845 #define $ac_tr_func 1
3846 EOF
3847 }
3848  
3849 else
3850   echo "$ac_t""no" 1>&6
3851 fi
3852 done
3853
3854 fi
3855 rm -f conftest*
3856
3857
3858 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3859 echo "configure:3860: checking return type of signal handlers" >&5
3860
3861 cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864 #include <sys/types.h>
3865 #include <signal.h>
3866 #ifdef signal
3867 #undef signal
3868 #endif
3869 #ifdef __cplusplus
3870 extern "C" void (*signal (int, void (*)(int)))(int);
3871 #else
3872 void (*signal ()) ();
3873 #endif
3874
3875 int main() {
3876 int i;
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880   rm -rf conftest*
3881   ac_cv_type_signal=void
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   ac_cv_type_signal=int
3887 fi
3888 rm -f conftest*
3889
3890 echo "$ac_t""$ac_cv_type_signal" 1>&6
3891 { test "$extra_verbose" = "yes" && cat << EOF
3892     Defining RETSIGTYPE = $ac_cv_type_signal
3893 EOF
3894 cat >> confdefs.h <<EOF
3895 #define RETSIGTYPE $ac_cv_type_signal
3896 EOF
3897 }
3898
3899
3900 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3901 echo "configure:3902: checking for size_t" >&5
3902
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906 #include <sys/types.h>
3907 #if STDC_HEADERS
3908 #include <stdlib.h>
3909 #include <stddef.h>
3910 #endif
3911 EOF
3912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3913   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3914   rm -rf conftest*
3915   ac_cv_type_size_t=yes
3916 else
3917   rm -rf conftest*
3918   ac_cv_type_size_t=no
3919 fi
3920 rm -f conftest*
3921
3922 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3923 if test $ac_cv_type_size_t = no; then
3924   { test "$extra_verbose" = "yes" && cat << \EOF
3925     Defining size_t = unsigned
3926 EOF
3927 cat >> confdefs.h <<\EOF
3928 #define size_t unsigned
3929 EOF
3930 }
3931
3932 fi
3933
3934 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3935 echo "configure:3936: checking for pid_t" >&5
3936
3937 cat > conftest.$ac_ext <<EOF
3938 #line 3939 "configure"
3939 #include "confdefs.h"
3940 #include <sys/types.h>
3941 #if STDC_HEADERS
3942 #include <stdlib.h>
3943 #include <stddef.h>
3944 #endif
3945 EOF
3946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3947   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3948   rm -rf conftest*
3949   ac_cv_type_pid_t=yes
3950 else
3951   rm -rf conftest*
3952   ac_cv_type_pid_t=no
3953 fi
3954 rm -f conftest*
3955
3956 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3957 if test $ac_cv_type_pid_t = no; then
3958   { test "$extra_verbose" = "yes" && cat << \EOF
3959     Defining pid_t = int
3960 EOF
3961 cat >> confdefs.h <<\EOF
3962 #define pid_t int
3963 EOF
3964 }
3965
3966 fi
3967
3968 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3969 echo "configure:3970: checking for uid_t in sys/types.h" >&5
3970
3971 cat > conftest.$ac_ext <<EOF
3972 #line 3973 "configure"
3973 #include "confdefs.h"
3974 #include <sys/types.h>
3975 EOF
3976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3977   egrep "uid_t" >/dev/null 2>&1; then
3978   rm -rf conftest*
3979   ac_cv_type_uid_t=yes
3980 else
3981   rm -rf conftest*
3982   ac_cv_type_uid_t=no
3983 fi
3984 rm -f conftest*
3985
3986
3987 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3988 if test $ac_cv_type_uid_t = no; then
3989   { test "$extra_verbose" = "yes" && cat << \EOF
3990     Defining uid_t = int
3991 EOF
3992 cat >> confdefs.h <<\EOF
3993 #define uid_t int
3994 EOF
3995 }
3996
3997   { test "$extra_verbose" = "yes" && cat << \EOF
3998     Defining gid_t = int
3999 EOF
4000 cat >> confdefs.h <<\EOF
4001 #define gid_t int
4002 EOF
4003 }
4004
4005 fi
4006
4007 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4008 echo "configure:4009: checking for mode_t" >&5
4009
4010 cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <sys/types.h>
4014 #if STDC_HEADERS
4015 #include <stdlib.h>
4016 #include <stddef.h>
4017 #endif
4018 EOF
4019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4020   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4021   rm -rf conftest*
4022   ac_cv_type_mode_t=yes
4023 else
4024   rm -rf conftest*
4025   ac_cv_type_mode_t=no
4026 fi
4027 rm -f conftest*
4028
4029 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4030 if test $ac_cv_type_mode_t = no; then
4031   { test "$extra_verbose" = "yes" && cat << \EOF
4032     Defining mode_t = int
4033 EOF
4034 cat >> confdefs.h <<\EOF
4035 #define mode_t int
4036 EOF
4037 }
4038
4039 fi
4040
4041 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4042 echo "configure:4043: checking for off_t" >&5
4043
4044 cat > conftest.$ac_ext <<EOF
4045 #line 4046 "configure"
4046 #include "confdefs.h"
4047 #include <sys/types.h>
4048 #if STDC_HEADERS
4049 #include <stdlib.h>
4050 #include <stddef.h>
4051 #endif
4052 EOF
4053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4054   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4055   rm -rf conftest*
4056   ac_cv_type_off_t=yes
4057 else
4058   rm -rf conftest*
4059   ac_cv_type_off_t=no
4060 fi
4061 rm -f conftest*
4062
4063 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4064 if test $ac_cv_type_off_t = no; then
4065   { test "$extra_verbose" = "yes" && cat << \EOF
4066     Defining off_t = long
4067 EOF
4068 cat >> confdefs.h <<\EOF
4069 #define off_t long
4070 EOF
4071 }
4072
4073 fi
4074
4075 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4076 echo "configure:4077: checking for ssize_t" >&5
4077
4078 cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081 #include <sys/types.h>
4082 #if STDC_HEADERS
4083 #include <stdlib.h>
4084 #include <stddef.h>
4085 #endif
4086 EOF
4087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4088   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4089   rm -rf conftest*
4090   ac_cv_type_ssize_t=yes
4091 else
4092   rm -rf conftest*
4093   ac_cv_type_ssize_t=no
4094 fi
4095 rm -f conftest*
4096
4097 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4098 if test $ac_cv_type_ssize_t = no; then
4099   { test "$extra_verbose" = "yes" && cat << \EOF
4100     Defining ssize_t = int
4101 EOF
4102 cat >> confdefs.h <<\EOF
4103 #define ssize_t int
4104 EOF
4105 }
4106
4107 fi
4108
4109
4110 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4111 echo "configure:4112: checking for socklen_t" >&5
4112 cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4115 #include <sys/types.h>
4116 #include <sys/socket.h>
4117 socklen_t x;
4118
4119 int main() {
4120
4121 ; return 0; }
4122 EOF
4123 if { (eval echo configure:4124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4124   rm -rf conftest*
4125   echo "$ac_t""yes" 1>&6
4126 else
4127   echo "configure: failed program was:" >&5
4128   cat conftest.$ac_ext >&5
4129   rm -rf conftest*
4130   
4131 cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <sys/types.h>
4135 #include <sys/socket.h>
4136 int accept (int, struct sockaddr *, size_t *);
4137
4138 int main() {
4139
4140 ; return 0; }
4141 EOF
4142 if { (eval echo configure:4143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4143   rm -rf conftest*
4144   
4145 echo "$ac_t""size_t" 1>&6
4146 { test "$extra_verbose" = "yes" && cat << \EOF
4147     Defining socklen_t = size_t
4148 EOF
4149 cat >> confdefs.h <<\EOF
4150 #define socklen_t size_t
4151 EOF
4152 }
4153
4154 else
4155   echo "configure: failed program was:" >&5
4156   cat conftest.$ac_ext >&5
4157   rm -rf conftest*
4158   
4159 echo "$ac_t""int" 1>&6
4160 { test "$extra_verbose" = "yes" && cat << \EOF
4161     Defining socklen_t = int
4162 EOF
4163 cat >> confdefs.h <<\EOF
4164 #define socklen_t int
4165 EOF
4166 }
4167
4168 fi
4169 rm -f conftest*
4170 fi
4171 rm -f conftest*
4172
4173 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4174 echo "configure:4175: checking for struct timeval" >&5
4175 cat > conftest.$ac_ext <<EOF
4176 #line 4177 "configure"
4177 #include "confdefs.h"
4178 #ifdef TIME_WITH_SYS_TIME
4179 #include <sys/time.h>
4180 #include <time.h>
4181 #else
4182 #ifdef HAVE_SYS_TIME_H
4183 #include <sys/time.h>
4184 #else
4185 #include <time.h>
4186 #endif
4187 #endif
4188 int main() {
4189 static struct timeval x; x.tv_sec = x.tv_usec;
4190 ; return 0; }
4191 EOF
4192 if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4193   rm -rf conftest*
4194   echo "$ac_t""yes" 1>&6
4195   HAVE_TIMEVAL=yes
4196   { test "$extra_verbose" = "yes" && cat << \EOF
4197     Defining HAVE_TIMEVAL
4198 EOF
4199 cat >> confdefs.h <<\EOF
4200 #define HAVE_TIMEVAL 1
4201 EOF
4202 }
4203
4204 else
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   echo "$ac_t""no" 1>&6
4209    HAVE_TIMEVAL=no
4210 fi
4211 rm -f conftest*
4212
4213 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4214 echo "configure:4215: checking whether struct tm is in sys/time.h or time.h" >&5
4215
4216 cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 #include <sys/types.h>
4220 #include <time.h>
4221 int main() {
4222 struct tm *tp; tp->tm_sec;
4223 ; return 0; }
4224 EOF
4225 if { (eval echo configure:4226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4226   rm -rf conftest*
4227   ac_cv_struct_tm=time.h
4228 else
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -rf conftest*
4232   ac_cv_struct_tm=sys/time.h
4233 fi
4234 rm -f conftest*
4235
4236 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4237 if test $ac_cv_struct_tm = sys/time.h; then
4238   { test "$extra_verbose" = "yes" && cat << \EOF
4239     Defining TM_IN_SYS_TIME
4240 EOF
4241 cat >> confdefs.h <<\EOF
4242 #define TM_IN_SYS_TIME 1
4243 EOF
4244 }
4245
4246 fi
4247
4248 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4249 echo "configure:4250: checking for tm_zone in struct tm" >&5
4250
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 #include <sys/types.h>
4255 #include <$ac_cv_struct_tm>
4256 int main() {
4257 struct tm tm; tm.tm_zone;
4258 ; return 0; }
4259 EOF
4260 if { (eval echo configure:4261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4261   rm -rf conftest*
4262   ac_cv_struct_tm_zone=yes
4263 else
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   ac_cv_struct_tm_zone=no
4268 fi
4269 rm -f conftest*
4270
4271 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4272 if test "$ac_cv_struct_tm_zone" = yes; then
4273   { test "$extra_verbose" = "yes" && cat << \EOF
4274     Defining HAVE_TM_ZONE
4275 EOF
4276 cat >> confdefs.h <<\EOF
4277 #define HAVE_TM_ZONE 1
4278 EOF
4279 }
4280
4281 else
4282   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4283 echo "configure:4284: checking for tzname" >&5
4284
4285 cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include <time.h>
4289 #ifndef tzname /* For SGI.  */
4290 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4291 #endif
4292 int main() {
4293 atoi(*tzname);
4294 ; return 0; }
4295 EOF
4296 if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4297   rm -rf conftest*
4298   ac_cv_var_tzname=yes
4299 else
4300   echo "configure: failed program was:" >&5
4301   cat conftest.$ac_ext >&5
4302   rm -rf conftest*
4303   ac_cv_var_tzname=no
4304 fi
4305 rm -f conftest*
4306
4307 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4308   if test $ac_cv_var_tzname = yes; then
4309     { test "$extra_verbose" = "yes" && cat << \EOF
4310     Defining HAVE_TZNAME
4311 EOF
4312 cat >> confdefs.h <<\EOF
4313 #define HAVE_TZNAME 1
4314 EOF
4315 }
4316
4317   fi
4318 fi
4319
4320
4321 echo $ac_n "checking for working const""... $ac_c" 1>&6
4322 echo "configure:4323: checking for working const" >&5
4323
4324 cat > conftest.$ac_ext <<EOF
4325 #line 4326 "configure"
4326 #include "confdefs.h"
4327
4328 int main() {
4329
4330 /* Ultrix mips cc rejects this.  */
4331 typedef int charset[2]; const charset x;
4332 /* SunOS 4.1.1 cc rejects this.  */
4333 char const *const *ccp;
4334 char **p;
4335 /* NEC SVR4.0.2 mips cc rejects this.  */
4336 struct point {int x, y;};
4337 static struct point const zero = {0,0};
4338 /* AIX XL C 1.02.0.0 rejects this.
4339    It does not let you subtract one const X* pointer from another in an arm
4340    of an if-expression whose if-part is not a constant expression */
4341 const char *g = "string";
4342 ccp = &g + (g ? g-g : 0);
4343 /* HPUX 7.0 cc rejects these. */
4344 ++ccp;
4345 p = (char**) ccp;
4346 ccp = (char const *const *) p;
4347 { /* SCO 3.2v4 cc rejects this.  */
4348   char *t;
4349   char const *s = 0 ? (char *) 0 : (char const *) 0;
4350
4351   *t++ = 0;
4352 }
4353 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4354   int x[] = {25, 17};
4355   const int *foo = &x[0];
4356   ++foo;
4357 }
4358 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4359   typedef const int *iptr;
4360   iptr p = 0;
4361   ++p;
4362 }
4363 { /* AIX XL C 1.02.0.0 rejects this saying
4364      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4365   struct s { int j; const int *ap[3]; };
4366   struct s *b; b->j = 5;
4367 }
4368 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4369   const int foo = 10;
4370 }
4371
4372 ; return 0; }
4373 EOF
4374 if { (eval echo configure:4375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4375   rm -rf conftest*
4376   ac_cv_c_const=yes
4377 else
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -rf conftest*
4381   ac_cv_c_const=no
4382 fi
4383 rm -f conftest*
4384
4385 echo "$ac_t""$ac_cv_c_const" 1>&6
4386 if test $ac_cv_c_const = no; then
4387   { test "$extra_verbose" = "yes" && cat << \EOF
4388     Defining const = 
4389 EOF
4390 cat >> confdefs.h <<\EOF
4391 #define const 
4392 EOF
4393 }
4394
4395 fi
4396
4397
4398 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4399 echo "configure:4400: checking whether ${MAKE-make} sets \${MAKE}" >&5
4400 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4401
4402 cat > conftestmake <<\EOF
4403 all:
4404         @echo 'ac_maketemp="${MAKE}"'
4405 EOF
4406 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4407 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4408 if test -n "$ac_maketemp"; then
4409   eval ac_cv_prog_make_${ac_make}_set=yes
4410 else
4411   eval ac_cv_prog_make_${ac_make}_set=no
4412 fi
4413 rm -f conftestmake
4414 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4415   echo "$ac_t""yes" 1>&6
4416   SET_MAKE=
4417 else
4418   echo "$ac_t""no" 1>&6
4419   SET_MAKE="MAKE=${MAKE-make}"
4420 fi
4421
4422
4423 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4424 echo "configure:4425: checking whether byte ordering is bigendian" >&5
4425
4426 ac_cv_c_bigendian=unknown
4427 # See if sys/param.h defines the BYTE_ORDER macro.
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 #include <sys/types.h>
4432 #include <sys/param.h>
4433 int main() {
4434
4435 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4436  bogus endian macros
4437 #endif
4438 ; return 0; }
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4441   rm -rf conftest*
4442   # It does; now see whether it defined to BIG_ENDIAN or not.
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 #include <sys/types.h>
4447 #include <sys/param.h>
4448 int main() {
4449
4450 #if BYTE_ORDER != BIG_ENDIAN
4451  not big endian
4452 #endif
4453 ; return 0; }
4454 EOF
4455 if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456   rm -rf conftest*
4457   ac_cv_c_bigendian=yes
4458 else
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -rf conftest*
4462   ac_cv_c_bigendian=no
4463 fi
4464 rm -f conftest*
4465 else
4466   echo "configure: failed program was:" >&5
4467   cat conftest.$ac_ext >&5
4468 fi
4469 rm -f conftest*
4470 if test $ac_cv_c_bigendian = unknown; then
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 main () {
4475   /* Are we little or big endian?  From Harbison&Steele.  */
4476   union
4477   {
4478     long l;
4479     char c[sizeof (long)];
4480   } u;
4481   u.l = 1;
4482   exit (u.c[sizeof (long) - 1] == 1);
4483 }
4484 EOF
4485 if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4486 then
4487   ac_cv_c_bigendian=no
4488 else
4489   conftest_rc="$?"
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -fr conftest*
4493   ac_cv_c_bigendian=yes
4494 fi
4495 rm -fr conftest*
4496 fi
4497
4498 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4499 if test $ac_cv_c_bigendian = yes; then
4500   { test "$extra_verbose" = "yes" && cat << \EOF
4501     Defining WORDS_BIGENDIAN
4502 EOF
4503 cat >> confdefs.h <<\EOF
4504 #define WORDS_BIGENDIAN 1
4505 EOF
4506 }
4507
4508 fi
4509
4510
4511 echo $ac_n "checking size of short""... $ac_c" 1>&6
4512 echo "configure:4513: checking size of short" >&5
4513
4514 cat > conftest.$ac_ext <<EOF
4515 #line 4516 "configure"
4516 #include "confdefs.h"
4517 #include <stdio.h>
4518 main()
4519 {
4520   FILE *f=fopen("conftestval", "w");
4521   if (!f) exit(1);
4522   fprintf(f, "%d\n", sizeof(short));
4523   exit(0);
4524 }
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4527 then
4528   ac_cv_sizeof_short=`cat conftestval`
4529 else
4530   conftest_rc="$?"
4531   echo "configure: failed program was:" >&5
4532   cat conftest.$ac_ext >&5
4533   rm -fr conftest*
4534   ac_cv_sizeof_short=0
4535 fi
4536 rm -fr conftest*
4537 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4538 { test "$extra_verbose" = "yes" && cat << EOF
4539     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4540 EOF
4541 cat >> confdefs.h <<EOF
4542 #define SIZEOF_SHORT $ac_cv_sizeof_short
4543 EOF
4544 }
4545
4546
4547 if test "$ac_cv_sizeof_short" = 0; then
4548   echo ""
4549   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4550   echo "*** PANIC *** Please examine config.log for compilation errors."
4551   exit 1
4552 fi
4553 echo $ac_n "checking size of int""... $ac_c" 1>&6
4554 echo "configure:4555: checking size of int" >&5
4555
4556 cat > conftest.$ac_ext <<EOF
4557 #line 4558 "configure"
4558 #include "confdefs.h"
4559 #include <stdio.h>
4560 main()
4561 {
4562   FILE *f=fopen("conftestval", "w");
4563   if (!f) exit(1);
4564   fprintf(f, "%d\n", sizeof(int));
4565   exit(0);
4566 }
4567 EOF
4568 if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4569 then
4570   ac_cv_sizeof_int=`cat conftestval`
4571 else
4572   conftest_rc="$?"
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   rm -fr conftest*
4576   ac_cv_sizeof_int=0
4577 fi
4578 rm -fr conftest*
4579 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4580 { test "$extra_verbose" = "yes" && cat << EOF
4581     Defining SIZEOF_INT = $ac_cv_sizeof_int
4582 EOF
4583 cat >> confdefs.h <<EOF
4584 #define SIZEOF_INT $ac_cv_sizeof_int
4585 EOF
4586 }
4587
4588
4589 echo $ac_n "checking size of long""... $ac_c" 1>&6
4590 echo "configure:4591: checking size of long" >&5
4591
4592 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 #include <stdio.h>
4596 main()
4597 {
4598   FILE *f=fopen("conftestval", "w");
4599   if (!f) exit(1);
4600   fprintf(f, "%d\n", sizeof(long));
4601   exit(0);
4602 }
4603 EOF
4604 if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4605 then
4606   ac_cv_sizeof_long=`cat conftestval`
4607 else
4608   conftest_rc="$?"
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -fr conftest*
4612   ac_cv_sizeof_long=0
4613 fi
4614 rm -fr conftest*
4615 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4616 { test "$extra_verbose" = "yes" && cat << EOF
4617     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4618 EOF
4619 cat >> confdefs.h <<EOF
4620 #define SIZEOF_LONG $ac_cv_sizeof_long
4621 EOF
4622 }
4623
4624
4625 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4626 echo "configure:4627: checking size of long long" >&5
4627
4628 cat > conftest.$ac_ext <<EOF
4629 #line 4630 "configure"
4630 #include "confdefs.h"
4631 #include <stdio.h>
4632 main()
4633 {
4634   FILE *f=fopen("conftestval", "w");
4635   if (!f) exit(1);
4636   fprintf(f, "%d\n", sizeof(long long));
4637   exit(0);
4638 }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4641 then
4642   ac_cv_sizeof_long_long=`cat conftestval`
4643 else
4644   conftest_rc="$?"
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -fr conftest*
4648   ac_cv_sizeof_long_long=0
4649 fi
4650 rm -fr conftest*
4651 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4652 { test "$extra_verbose" = "yes" && cat << EOF
4653     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4654 EOF
4655 cat >> confdefs.h <<EOF
4656 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4657 EOF
4658 }
4659
4660
4661 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4662 echo "configure:4663: checking size of void *" >&5
4663
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667 #include <stdio.h>
4668 main()
4669 {
4670   FILE *f=fopen("conftestval", "w");
4671   if (!f) exit(1);
4672   fprintf(f, "%d\n", sizeof(void *));
4673   exit(0);
4674 }
4675 EOF
4676 if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4677 then
4678   ac_cv_sizeof_void_p=`cat conftestval`
4679 else
4680   conftest_rc="$?"
4681   echo "configure: failed program was:" >&5
4682   cat conftest.$ac_ext >&5
4683   rm -fr conftest*
4684   ac_cv_sizeof_void_p=0
4685 fi
4686 rm -fr conftest*
4687 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4688 { test "$extra_verbose" = "yes" && cat << EOF
4689     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4690 EOF
4691 cat >> confdefs.h <<EOF
4692 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4693 EOF
4694 }
4695
4696
4697
4698 case $opsys in
4699   cygwin* ) cat > conftest.$ac_ext <<EOF
4700 #line 4701 "configure"
4701 #include "confdefs.h"
4702 #include <cygwin/types.h>
4703 EOF
4704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4705   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4706   rm -rf conftest*
4707   echo "$ac_t""yes" 1>&6
4708                              { test "$extra_verbose" = "yes" && cat << \EOF
4709     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4710 EOF
4711 cat >> confdefs.h <<\EOF
4712 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4713 EOF
4714 }
4715
4716 else
4717   rm -rf conftest*
4718   echo "$ac_t""no" 1>&6
4719 fi
4720 rm -f conftest*
4721  ;;
4722 esac
4723
4724 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4725 echo "configure:4726: checking for long file names" >&5
4726
4727 ac_cv_sys_long_file_names=yes
4728 # Test for long file names in all the places we know might matter:
4729 #      .                the current directory, where building will happen
4730 #      $prefix/lib      where we will be installing things
4731 #      $exec_prefix/lib likewise
4732 # eval it to expand exec_prefix.
4733 #      $TMPDIR          if set, where it might want to write temporary files
4734 # if $TMPDIR is not set:
4735 #      /tmp             where it might want to write temporary files
4736 #      /var/tmp         likewise
4737 #      /usr/tmp         likewise
4738 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4739   ac_tmpdirs="$TMPDIR"
4740 else
4741   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4742 fi
4743 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4744   test -d $ac_dir || continue
4745   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4746   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4747   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4748   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4749   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4750     ac_cv_sys_long_file_names=no
4751     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4752     break
4753   fi
4754   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4755 done
4756
4757 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4758 if test $ac_cv_sys_long_file_names = yes; then
4759   { test "$extra_verbose" = "yes" && cat << \EOF
4760     Defining HAVE_LONG_FILE_NAMES
4761 EOF
4762 cat >> confdefs.h <<\EOF
4763 #define HAVE_LONG_FILE_NAMES 1
4764 EOF
4765 }
4766
4767 fi
4768
4769
4770 echo $ac_n "checking for sin""... $ac_c" 1>&6
4771 echo "configure:4772: checking for sin" >&5
4772
4773 cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 /* System header to define __stub macros and hopefully few prototypes,
4777     which can conflict with char sin(); below.  */
4778 #include <assert.h>
4779 /* Override any gcc2 internal prototype to avoid an error.  */
4780 /* We use char because int might match the return type of a gcc2
4781     builtin and then its argument prototype would still apply.  */
4782 char sin();
4783
4784 int main() {
4785
4786 /* The GNU C library defines this for functions which it implements
4787     to always fail with ENOSYS.  Some functions are actually named
4788     something starting with __ and the normal name is an alias.  */
4789 #if defined (__stub_sin) || defined (__stub___sin)
4790 choke me
4791 #else
4792 sin();
4793 #endif
4794
4795 ; return 0; }
4796 EOF
4797 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4798   rm -rf conftest*
4799   eval "ac_cv_func_sin=yes"
4800 else
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -rf conftest*
4804   eval "ac_cv_func_sin=no"
4805 fi
4806 rm -f conftest*
4807
4808 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4809   echo "$ac_t""yes" 1>&6
4810   :
4811 else
4812   echo "$ac_t""no" 1>&6
4813
4814 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4815 echo "configure:4816: checking for sin in -lm" >&5
4816 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4817
4818 xe_check_libs=" -lm "
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 /* Override any gcc2 internal prototype to avoid an error.  */
4823 /* We use char because int might match the return type of a gcc2
4824     builtin and then its argument prototype would still apply.  */
4825 char sin();
4826
4827 int main() {
4828 sin()
4829 ; return 0; }
4830 EOF
4831 if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4832   rm -rf conftest*
4833   eval "ac_cv_lib_$ac_lib_var=yes"
4834 else
4835   echo "configure: failed program was:" >&5
4836   cat conftest.$ac_ext >&5
4837   rm -rf conftest*
4838   eval "ac_cv_lib_$ac_lib_var=no"
4839 fi
4840 rm -f conftest*
4841 xe_check_libs=""
4842
4843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4844   echo "$ac_t""yes" 1>&6
4845     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4846     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4847   { test "$extra_verbose" = "yes" && cat << EOF
4848     Defining $ac_tr_lib
4849 EOF
4850 cat >> confdefs.h <<EOF
4851 #define $ac_tr_lib 1
4852 EOF
4853 }
4854
4855   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4856
4857 else
4858   echo "$ac_t""no" 1>&6
4859 fi
4860
4861
4862 fi
4863
4864
4865 { test "$extra_verbose" = "yes" && cat << \EOF
4866     Defining LISP_FLOAT_TYPE
4867 EOF
4868 cat >> confdefs.h <<\EOF
4869 #define LISP_FLOAT_TYPE 1
4870 EOF
4871 }
4872
4873
4874 cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 #include <math.h>
4878 int main() {
4879 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4880 ; return 0; }
4881 EOF
4882 if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4883   rm -rf conftest*
4884   { test "$extra_verbose" = "yes" && cat << \EOF
4885     Defining HAVE_INVERSE_HYPERBOLIC
4886 EOF
4887 cat >> confdefs.h <<\EOF
4888 #define HAVE_INVERSE_HYPERBOLIC 1
4889 EOF
4890 }
4891
4892 else
4893   echo "configure: failed program was:" >&5
4894   cat conftest.$ac_ext >&5
4895 fi
4896 rm -f conftest*
4897
4898 echo "checking type of mail spool file locking" 1>&6
4899 echo "configure:4900: checking type of mail spool file locking" >&5
4900 for ac_func in lockf flock
4901 do
4902 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4903 echo "configure:4904: checking for $ac_func" >&5
4904
4905 cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 /* System header to define __stub macros and hopefully few prototypes,
4909     which can conflict with char $ac_func(); below.  */
4910 #include <assert.h>
4911 /* Override any gcc2 internal prototype to avoid an error.  */
4912 /* We use char because int might match the return type of a gcc2
4913     builtin and then its argument prototype would still apply.  */
4914 char $ac_func();
4915
4916 int main() {
4917
4918 /* The GNU C library defines this for functions which it implements
4919     to always fail with ENOSYS.  Some functions are actually named
4920     something starting with __ and the normal name is an alias.  */
4921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4922 choke me
4923 #else
4924 $ac_func();
4925 #endif
4926
4927 ; return 0; }
4928 EOF
4929 if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4930   rm -rf conftest*
4931   eval "ac_cv_func_$ac_func=yes"
4932 else
4933   echo "configure: failed program was:" >&5
4934   cat conftest.$ac_ext >&5
4935   rm -rf conftest*
4936   eval "ac_cv_func_$ac_func=no"
4937 fi
4938 rm -f conftest*
4939
4940 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4941   echo "$ac_t""yes" 1>&6
4942     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4943   { test "$extra_verbose" = "yes" && cat << EOF
4944     Defining $ac_tr_func
4945 EOF
4946 cat >> confdefs.h <<EOF
4947 #define $ac_tr_func 1
4948 EOF
4949 }
4950  
4951 else
4952   echo "$ac_t""no" 1>&6
4953 fi
4954 done
4955
4956 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4957 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4958 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4959 if   test -z "$mail_locking"; then
4960   case "$opsys" in cygwin* | mingw*)
4961     mail_locking=pop ;;
4962   esac
4963 fi
4964
4965 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4966     Defining MAIL_LOCK_LOCKF
4967 EOF
4968 cat >> confdefs.h <<\EOF
4969 #define MAIL_LOCK_LOCKF 1
4970 EOF
4971 }
4972
4973 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4974     Defining MAIL_LOCK_FLOCK
4975 EOF
4976 cat >> confdefs.h <<\EOF
4977 #define MAIL_LOCK_FLOCK 1
4978 EOF
4979 }
4980
4981 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4982     Defining MAIL_LOCK_LOCKING
4983 EOF
4984 cat >> confdefs.h <<\EOF
4985 #define MAIL_LOCK_LOCKING 1
4986 EOF
4987 }
4988
4989 elif test "$mail_locking" = "pop"; then
4990   with_pop=yes
4991   mail_locking=
4992 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4993     Defining MAIL_LOCK_DOT
4994 EOF
4995 cat >> confdefs.h <<\EOF
4996 #define MAIL_LOCK_DOT 1
4997 EOF
4998 }
4999
5000 fi
5001 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5002   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5003 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5004   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5005 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5006   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5007
5008 case "$opsys" in decosf*)
5009   
5010 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5011 echo "configure:5012: checking for cma_open in -lpthreads" >&5
5012 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5013
5014 xe_check_libs=" -lpthreads "
5015 cat > conftest.$ac_ext <<EOF
5016 #line 5017 "configure"
5017 #include "confdefs.h"
5018 /* Override any gcc2 internal prototype to avoid an error.  */
5019 /* We use char because int might match the return type of a gcc2
5020     builtin and then its argument prototype would still apply.  */
5021 char cma_open();
5022
5023 int main() {
5024 cma_open()
5025 ; return 0; }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5028   rm -rf conftest*
5029   eval "ac_cv_lib_$ac_lib_var=yes"
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   eval "ac_cv_lib_$ac_lib_var=no"
5035 fi
5036 rm -f conftest*
5037 xe_check_libs=""
5038
5039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5040   echo "$ac_t""yes" 1>&6
5041     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5042     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5043   { test "$extra_verbose" = "yes" && cat << EOF
5044     Defining $ac_tr_lib
5045 EOF
5046 cat >> confdefs.h <<EOF
5047 #define $ac_tr_lib 1
5048 EOF
5049 }
5050
5051   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5052
5053 else
5054   echo "$ac_t""no" 1>&6
5055 fi
5056
5057
5058   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5059     c_switch_site="$c_switch_site -threads" ;;
5060 esac
5061
5062
5063 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5064 echo "configure:5065: checking whether the -xildoff compiler flag is required" >&5
5065 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5066   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5067     then echo "$ac_t""no" 1>&6;
5068     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
5069   fi
5070   else echo "$ac_t""no" 1>&6
5071 fi
5072
5073 if test "$opsys" = "sol2"; then
5074   if test "$os_release" -ge 506; then
5075     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5076 echo "configure:5077: checking for \"-z ignore\" linker flag" >&5
5077     case "`ld -h 2>&1`" in
5078       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5079         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5080       *) echo "$ac_t""no" 1>&6 ;;
5081     esac
5082   fi
5083 fi
5084
5085
5086 echo "checking "for specified window system"" 1>&6
5087 echo "configure:5088: checking "for specified window system"" >&5
5088
5089
5090 GNOME_CONFIG=no
5091 GTK_CONFIG=no
5092
5093 if test "$with_gnome" != "no"; then
5094    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5095 echo "configure:5096: checking for GNOME configuration script" >&5
5096    for possible in gnome-config
5097    do
5098       possible_version=`${possible} --version 2> /dev/null`
5099       if test "x${possible_version}" != "x"; then
5100               GNOME_CONFIG="${possible}"
5101               with_gnome=yes
5102               with_gtk=yes
5103               break
5104       fi
5105    done
5106    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5107 fi
5108
5109 if test "${GNOME_CONFIG}" != "no"; then
5110       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5111       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5112       { test "$extra_verbose" = "yes" && cat << \EOF
5113     Defining HAVE_GNOME
5114 EOF
5115 cat >> confdefs.h <<\EOF
5116 #define HAVE_GNOME 1
5117 EOF
5118 }
5119
5120       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5121       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5122 fi
5123
5124 if test "$with_gtk" != "no";then
5125    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5126 echo "configure:5127: checking for GTK configuration script" >&5
5127    for possible in gtk12-config gtk14-config gtk-config
5128    do
5129       possible_version=`${possible} --version 2> /dev/null`
5130       if test "x${possible_version}" != "x"; then
5131               GTK_CONFIG="${possible}"
5132       fi
5133       case "${possible_version}" in
5134         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5135         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5136         1.2.*)
5137                 with_gtk=yes
5138                 break
5139                 ;;
5140         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5141       esac
5142    done
5143    echo "$ac_t""${GTK_CONFIG}" 1>&6
5144 fi
5145
5146 if test "${GTK_CONFIG}" != "no"; then
5147       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5148 echo "configure:5149: checking gtk version" >&5
5149       GTK_VERSION=`${GTK_CONFIG} --version`
5150       echo "$ac_t""${GTK_VERSION}" 1>&6
5151
5152       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5153 echo "configure:5154: checking gtk libs" >&5
5154       GTK_LIBS=`${GTK_CONFIG} --libs`
5155       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5156       echo "$ac_t""${GTK_LIBS}" 1>&6
5157
5158       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5159 echo "configure:5160: checking gtk cflags" >&5
5160       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5161       if test "$GCC" = "yes"; then
5162         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5163       fi
5164       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5165       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5166
5167       
5168 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5169 echo "configure:5170: checking for main in -lgdk_imlib" >&5
5170 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5171
5172 xe_check_libs=" -lgdk_imlib "
5173 cat > conftest.$ac_ext <<EOF
5174 #line 5175 "configure"
5175 #include "confdefs.h"
5176
5177 int main() {
5178 main()
5179 ; return 0; }
5180 EOF
5181 if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5182   rm -rf conftest*
5183   eval "ac_cv_lib_$ac_lib_var=yes"
5184 else
5185   echo "configure: failed program was:" >&5
5186   cat conftest.$ac_ext >&5
5187   rm -rf conftest*
5188   eval "ac_cv_lib_$ac_lib_var=no"
5189 fi
5190 rm -f conftest*
5191 xe_check_libs=""
5192
5193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5194   echo "$ac_t""yes" 1>&6
5195   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5196 else
5197   echo "$ac_t""no" 1>&6
5198 fi
5199
5200
5201       
5202 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5203 echo "configure:5204: checking for Imlib_init in -lImlib" >&5
5204 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5205
5206 xe_check_libs=" -lImlib "
5207 cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210 /* Override any gcc2 internal prototype to avoid an error.  */
5211 /* We use char because int might match the return type of a gcc2
5212     builtin and then its argument prototype would still apply.  */
5213 char Imlib_init();
5214
5215 int main() {
5216 Imlib_init()
5217 ; return 0; }
5218 EOF
5219 if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5220   rm -rf conftest*
5221   eval "ac_cv_lib_$ac_lib_var=yes"
5222 else
5223   echo "configure: failed program was:" >&5
5224   cat conftest.$ac_ext >&5
5225   rm -rf conftest*
5226   eval "ac_cv_lib_$ac_lib_var=no"
5227 fi
5228 rm -f conftest*
5229 xe_check_libs=""
5230
5231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5232   echo "$ac_t""yes" 1>&6
5233   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5234 else
5235   echo "$ac_t""no" 1>&6
5236 fi
5237
5238
5239       for ac_func in gdk_imlib_init
5240 do
5241 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5242 echo "configure:5243: checking for $ac_func" >&5
5243
5244 cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247 /* System header to define __stub macros and hopefully few prototypes,
5248     which can conflict with char $ac_func(); below.  */
5249 #include <assert.h>
5250 /* Override any gcc2 internal prototype to avoid an error.  */
5251 /* We use char because int might match the return type of a gcc2
5252     builtin and then its argument prototype would still apply.  */
5253 char $ac_func();
5254
5255 int main() {
5256
5257 /* The GNU C library defines this for functions which it implements
5258     to always fail with ENOSYS.  Some functions are actually named
5259     something starting with __ and the normal name is an alias.  */
5260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5261 choke me
5262 #else
5263 $ac_func();
5264 #endif
5265
5266 ; return 0; }
5267 EOF
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5269   rm -rf conftest*
5270   eval "ac_cv_func_$ac_func=yes"
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274   rm -rf conftest*
5275   eval "ac_cv_func_$ac_func=no"
5276 fi
5277 rm -f conftest*
5278
5279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5280   echo "$ac_t""yes" 1>&6
5281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5282   { test "$extra_verbose" = "yes" && cat << EOF
5283     Defining $ac_tr_func
5284 EOF
5285 cat >> confdefs.h <<EOF
5286 #define $ac_tr_func 1
5287 EOF
5288 }
5289  
5290 else
5291   echo "$ac_t""no" 1>&6
5292 fi
5293 done
5294
5295
5296       { test "$extra_verbose" = "yes" && cat << \EOF
5297     Defining HAVE_XPM
5298 EOF
5299 cat >> confdefs.h <<\EOF
5300 #define HAVE_XPM 1
5301 EOF
5302 }
5303
5304       { test "$extra_verbose" = "yes" && cat << \EOF
5305     Defining HAVE_GTK
5306 EOF
5307 cat >> confdefs.h <<\EOF
5308 #define HAVE_GTK 1
5309 EOF
5310 }
5311
5312       
5313
5314       window_system=gtk
5315       with_gtk=yes
5316       with_x11=no
5317
5318       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5319       test "${with_toolbars}" != no && with_toolbars=gtk
5320       test "${with_menubars}" != "no" && with_menubars=gtk
5321       test "${with_dialogs}" != "no" && with_dialogs=gtk
5322       test "${with_widgets}" != "no" && with_widgets=gtk
5323
5324       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5325    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5326  fi
5327       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5328    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5329  fi
5330       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5331    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5332  fi
5333       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5334    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5335  fi
5336
5337             OLD_CFLAGS="${CFLAGS}"
5338       OLD_CPPFLAGS="${CPPFLAGS}"
5339       OLD_LDFLAGS="${LDFLAGS}"
5340       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5341       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5342       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5343       for ac_hdr in glade/glade.h glade.h
5344 do
5345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5347 echo "configure:5348: checking for $ac_hdr" >&5
5348
5349 cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5352 #include <$ac_hdr>
5353 EOF
5354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5355 { (eval echo configure:5356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5357 if test -z "$ac_err"; then
5358   rm -rf conftest*
5359   eval "ac_cv_header_$ac_safe=yes"
5360 else
5361   echo "$ac_err" >&5
5362   echo "configure: failed program was:" >&5
5363   cat conftest.$ac_ext >&5
5364   rm -rf conftest*
5365   eval "ac_cv_header_$ac_safe=no"
5366 fi
5367 rm -f conftest*
5368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5369   echo "$ac_t""yes" 1>&6
5370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5371   { test "$extra_verbose" = "yes" && cat << EOF
5372     Defining $ac_tr_hdr
5373 EOF
5374 cat >> confdefs.h <<EOF
5375 #define $ac_tr_hdr 1
5376 EOF
5377 }
5378  
5379 else
5380   echo "$ac_t""no" 1>&6
5381 fi
5382 done
5383
5384       
5385 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5386 echo "configure:5387: checking for main in -lxml" >&5
5387 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5388
5389 xe_check_libs=" -lxml "
5390 cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393
5394 int main() {
5395 main()
5396 ; return 0; }
5397 EOF
5398 if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=yes"
5401 else
5402   echo "configure: failed program was:" >&5
5403   cat conftest.$ac_ext >&5
5404   rm -rf conftest*
5405   eval "ac_cv_lib_$ac_lib_var=no"
5406 fi
5407 rm -f conftest*
5408 xe_check_libs=""
5409
5410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5411   echo "$ac_t""yes" 1>&6
5412   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5413 else
5414   echo "$ac_t""no" 1>&6
5415 fi
5416
5417
5418       
5419 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5420 echo "configure:5421: checking for main in -lglade" >&5
5421 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5422
5423 xe_check_libs=" -lglade "
5424 cat > conftest.$ac_ext <<EOF
5425 #line 5426 "configure"
5426 #include "confdefs.h"
5427
5428 int main() {
5429 main()
5430 ; return 0; }
5431 EOF
5432 if { (eval echo configure:5433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5433   rm -rf conftest*
5434   eval "ac_cv_lib_$ac_lib_var=yes"
5435 else
5436   echo "configure: failed program was:" >&5
5437   cat conftest.$ac_ext >&5
5438   rm -rf conftest*
5439   eval "ac_cv_lib_$ac_lib_var=no"
5440 fi
5441 rm -f conftest*
5442 xe_check_libs=""
5443
5444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5445   echo "$ac_t""yes" 1>&6
5446   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5447 else
5448   echo "$ac_t""no" 1>&6
5449 fi
5450
5451
5452       
5453 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5454 echo "configure:5455: checking for main in -lglade-gnome" >&5
5455 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5456
5457 xe_check_libs=" -lglade-gnome "
5458 cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461
5462 int main() {
5463 main()
5464 ; return 0; }
5465 EOF
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467   rm -rf conftest*
5468   eval "ac_cv_lib_$ac_lib_var=yes"
5469 else
5470   echo "configure: failed program was:" >&5
5471   cat conftest.$ac_ext >&5
5472   rm -rf conftest*
5473   eval "ac_cv_lib_$ac_lib_var=no"
5474 fi
5475 rm -f conftest*
5476 xe_check_libs=""
5477
5478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5479   echo "$ac_t""yes" 1>&6
5480   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5481 else
5482   echo "$ac_t""no" 1>&6
5483 fi
5484
5485
5486       cat > conftest.$ac_ext <<EOF
5487 #line 5488 "configure"
5488 #include "confdefs.h"
5489 #include <glade/glade-xml.h>
5490 EOF
5491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5492   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5493   rm -rf conftest*
5494   echo "$ac_t""yes" 1>&6
5495                        { test "$extra_verbose" = "yes" && cat << \EOF
5496     Defining LIBGLADE_XML_TXTDOMAIN = 1
5497 EOF
5498 cat >> confdefs.h <<\EOF
5499 #define LIBGLADE_XML_TXTDOMAIN 1
5500 EOF
5501 }
5502
5503 else
5504   rm -rf conftest*
5505   echo "$ac_t""no" 1>&6
5506 fi
5507 rm -f conftest*
5508
5509       CFLAGS="${OLD_CFLAGS}"
5510       CPPFLAGS="${OLD_CPPFLAGS}"
5511       LDFLAGS="${OLD_LDFLAGS}"
5512 fi
5513
5514
5515 if test "$with_x11" != "no"; then
5516     test "$x_includes $x_libraries" != "NONE NONE" && \
5517    window_system=x11 with_x11=yes
5518
5519         
5520       if test "$x_includes $x_libraries" = "NONE NONE" \
5521     -a -n "$OPENWINHOME" \
5522     -a "$OPENWINHOME" != "/usr/openwin" \
5523     -a -d "$OPENWINHOME"; then
5524       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5525       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5526       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5527   fi
5528
5529   if test "$x_includes" = "NONE"; then
5530                     for dir in "/usr/X11" "/usr/X11R6"; do
5531       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5532     done
5533   fi
5534
5535   if test "$x_libraries" = "NONE"; then
5536     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5537       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5538     done
5539   fi
5540
5541   # If we find X, set shell vars x_includes and x_libraries to the
5542 # paths, otherwise set no_x=yes.
5543 # Uses ac_ vars as temps to allow command line to override cache and checks.
5544 # --without-x overrides everything else, but does not touch the cache.
5545 echo $ac_n "checking for X""... $ac_c" 1>&6
5546 echo "configure:5547: checking for X" >&5
5547
5548 # Check whether --with-x or --without-x was given.
5549 if test "${with_x+set}" = set; then
5550   withval="$with_x"
5551   :
5552 fi
5553
5554 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5555 if test "x$with_x" = xno; then
5556   # The user explicitly disabled X.
5557   have_x=disabled
5558 else
5559   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5560     # Both variables are already set.
5561     have_x=yes
5562   else
5563
5564 # One or both of the vars are not set, and there is no cached value.
5565 ac_x_includes=NO ac_x_libraries=NO
5566 rm -fr conftestdir
5567 if mkdir conftestdir; then
5568   cd conftestdir
5569   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5570   cat > Imakefile <<'EOF'
5571 acfindx:
5572         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5573 EOF
5574   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5575     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5576     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5577     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5578     for ac_extension in a so sl; do
5579       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5580         test -f $ac_im_libdir/libX11.$ac_extension; then
5581         ac_im_usrlibdir=$ac_im_libdir; break
5582       fi
5583     done
5584     # Screen out bogus values from the imake configuration.  They are
5585     # bogus both because they are the default anyway, and because
5586     # using them would break gcc on systems where it needs fixed includes.
5587     case "$ac_im_incroot" in
5588         /usr/include) ;;
5589         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5590     esac
5591     case "$ac_im_usrlibdir" in
5592         /usr/lib | /lib) ;;
5593         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5594     esac
5595   fi
5596   cd ..
5597   rm -fr conftestdir
5598 fi
5599
5600 if test "$ac_x_includes" = NO; then
5601   # Guess where to find include files, by looking for this one X11 .h file.
5602   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5603
5604   # First, try using that file with no special directory specified.
5605 cat > conftest.$ac_ext <<EOF
5606 #line 5607 "configure"
5607 #include "confdefs.h"
5608 #include <$x_direct_test_include>
5609 EOF
5610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5611 { (eval echo configure:5612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5613 if test -z "$ac_err"; then
5614   rm -rf conftest*
5615   # We can compile using X headers with no special include directory.
5616 ac_x_includes=
5617 else
5618   echo "$ac_err" >&5
5619   echo "configure: failed program was:" >&5
5620   cat conftest.$ac_ext >&5
5621   rm -rf conftest*
5622   # Look for the header file in a standard set of common directories.
5623 # Check X11 before X11Rn because it is often a symlink to the current release.
5624   for ac_dir in               \
5625     /usr/X11/include          \
5626     /usr/X11R6/include        \
5627     /usr/X11R5/include        \
5628     /usr/X11R4/include        \
5629                               \
5630     /usr/include/X11          \
5631     /usr/include/X11R6        \
5632     /usr/include/X11R5        \
5633     /usr/include/X11R4        \
5634                               \
5635     /usr/local/X11/include    \
5636     /usr/local/X11R6/include  \
5637     /usr/local/X11R5/include  \
5638     /usr/local/X11R4/include  \
5639                               \
5640     /usr/local/include/X11    \
5641     /usr/local/include/X11R6  \
5642     /usr/local/include/X11R5  \
5643     /usr/local/include/X11R4  \
5644                               \
5645     /usr/X386/include         \
5646     /usr/x386/include         \
5647     /usr/XFree86/include/X11  \
5648                               \
5649     /usr/include              \
5650     /usr/local/include        \
5651     /usr/unsupported/include  \
5652     /usr/athena/include       \
5653     /usr/local/x11r5/include  \
5654     /usr/lpp/Xamples/include  \
5655                               \
5656     /usr/openwin/include      \
5657     /usr/openwin/share/include \
5658     ; \
5659   do
5660     if test -r "$ac_dir/$x_direct_test_include"; then
5661       ac_x_includes=$ac_dir
5662       break
5663     fi
5664   done
5665 fi
5666 rm -f conftest*
5667 fi # $ac_x_includes = NO
5668
5669 if test "$ac_x_libraries" = NO; then
5670   # Check for the libraries.
5671
5672   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5673   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5674
5675   # See if we find them without any special options.
5676   # Don't add to $LIBS permanently.
5677   ac_save_LIBS="$LIBS"
5678   LIBS="-l$x_direct_test_library $LIBS"
5679 cat > conftest.$ac_ext <<EOF
5680 #line 5681 "configure"
5681 #include "confdefs.h"
5682
5683 int main() {
5684 ${x_direct_test_function}()
5685 ; return 0; }
5686 EOF
5687 if { (eval echo configure:5688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5688   rm -rf conftest*
5689   LIBS="$ac_save_LIBS"
5690 # We can link X programs with no special library path.
5691 ac_x_libraries=
5692 else
5693   echo "configure: failed program was:" >&5
5694   cat conftest.$ac_ext >&5
5695   rm -rf conftest*
5696   LIBS="$ac_save_LIBS"
5697 # First see if replacing the include by lib works.
5698 # Check X11 before X11Rn because it is often a symlink to the current release.
5699 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5700     /usr/X11/lib          \
5701     /usr/X11R6/lib        \
5702     /usr/X11R5/lib        \
5703     /usr/X11R4/lib        \
5704                           \
5705     /usr/lib/X11          \
5706     /usr/lib/X11R6        \
5707     /usr/lib/X11R5        \
5708     /usr/lib/X11R4        \
5709                           \
5710     /usr/local/X11/lib    \
5711     /usr/local/X11R6/lib  \
5712     /usr/local/X11R5/lib  \
5713     /usr/local/X11R4/lib  \
5714                           \
5715     /usr/local/lib/X11    \
5716     /usr/local/lib/X11R6  \
5717     /usr/local/lib/X11R5  \
5718     /usr/local/lib/X11R4  \
5719                           \
5720     /usr/X386/lib         \
5721     /usr/x386/lib         \
5722     /usr/XFree86/lib/X11  \
5723                           \
5724     /usr/lib              \
5725     /usr/local/lib        \
5726     /usr/unsupported/lib  \
5727     /usr/athena/lib       \
5728     /usr/local/x11r5/lib  \
5729     /usr/lpp/Xamples/lib  \
5730     /lib/usr/lib/X11      \
5731                           \
5732     /usr/openwin/lib      \
5733     /usr/openwin/share/lib \
5734     ; \
5735 do
5736   for ac_extension in a so sl; do
5737     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5738       ac_x_libraries=$ac_dir
5739       break 2
5740     fi
5741   done
5742 done
5743 fi
5744 rm -f conftest*
5745 fi # $ac_x_libraries = NO
5746
5747 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5748   # Didn't find X anywhere.  Cache the known absence of X.
5749   ac_cv_have_x="have_x=no"
5750 else
5751   # Record where we found X for the cache.
5752   ac_cv_have_x="have_x=yes \
5753                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5754 fi
5755   fi
5756   eval "$ac_cv_have_x"
5757 fi # $with_x != no
5758
5759 if test "$have_x" != yes; then
5760   echo "$ac_t""$have_x" 1>&6
5761   no_x=yes
5762 else
5763   # If each of the values was on the command line, it overrides each guess.
5764   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5765   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5766   # Update the cache value to reflect the command line values.
5767   ac_cv_have_x="have_x=yes \
5768                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5769   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5770 fi
5771
5772 if test "$no_x" = yes; then
5773   # Not all programs may use this symbol, but it does not hurt to define it.
5774   { test "$extra_verbose" = "yes" && cat << \EOF
5775     Defining X_DISPLAY_MISSING
5776 EOF
5777 cat >> confdefs.h <<\EOF
5778 #define X_DISPLAY_MISSING 1
5779 EOF
5780 }
5781
5782   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5783 else
5784   if test -n "$x_includes"; then
5785     X_CFLAGS="$X_CFLAGS -I$x_includes"
5786   fi
5787
5788   # It would also be nice to do this for all -L options, not just this one.
5789   if test -n "$x_libraries"; then
5790     X_LIBS="$X_LIBS -L$x_libraries"
5791     # For Solaris; some versions of Sun CC require a space after -R and
5792     # others require no space.  Words are not sufficient . . . .
5793     case "`(uname -sr) 2>/dev/null`" in
5794     "SunOS 5"*)
5795       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5796 echo "configure:5797: checking whether -R must be followed by a space" >&5
5797       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5798       cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801
5802 int main() {
5803
5804 ; return 0; }
5805 EOF
5806 if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5807   rm -rf conftest*
5808   ac_R_nospace=yes
5809 else
5810   echo "configure: failed program was:" >&5
5811   cat conftest.$ac_ext >&5
5812   rm -rf conftest*
5813   ac_R_nospace=no
5814 fi
5815 rm -f conftest*
5816       if test $ac_R_nospace = yes; then
5817         echo "$ac_t""no" 1>&6
5818         X_LIBS="$X_LIBS -R$x_libraries"
5819       else
5820         LIBS="$ac_xsave_LIBS -R $x_libraries"
5821         cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824
5825 int main() {
5826
5827 ; return 0; }
5828 EOF
5829 if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5830   rm -rf conftest*
5831   ac_R_space=yes
5832 else
5833   echo "configure: failed program was:" >&5
5834   cat conftest.$ac_ext >&5
5835   rm -rf conftest*
5836   ac_R_space=no
5837 fi
5838 rm -f conftest*
5839         if test $ac_R_space = yes; then
5840           echo "$ac_t""yes" 1>&6
5841           X_LIBS="$X_LIBS -R $x_libraries"
5842         else
5843           echo "$ac_t""neither works" 1>&6
5844         fi
5845       fi
5846       LIBS="$ac_xsave_LIBS"
5847     esac
5848   fi
5849
5850   # Check for system-dependent libraries X programs must link with.
5851   # Do this before checking for the system-independent R6 libraries
5852   # (-lICE), since we may need -lsocket or whatever for X linking.
5853
5854   if test "$ISC" = yes; then
5855     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5856   else
5857     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5858     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5859     # the Alpha needs dnet_stub (dnet does not exist).
5860     if test "$with_dnet" = "no" ; then
5861 ac_cv_lib_dnet_dnet_ntoa=no
5862 else
5863
5864 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5865 echo "configure:5866: checking for dnet_ntoa in -ldnet" >&5
5866 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5867
5868 xe_check_libs=" -ldnet "
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872 /* Override any gcc2 internal prototype to avoid an error.  */
5873 /* We use char because int might match the return type of a gcc2
5874     builtin and then its argument prototype would still apply.  */
5875 char dnet_ntoa();
5876
5877 int main() {
5878 dnet_ntoa()
5879 ; return 0; }
5880 EOF
5881 if { (eval echo configure:5882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5882   rm -rf conftest*
5883   eval "ac_cv_lib_$ac_lib_var=yes"
5884 else
5885   echo "configure: failed program was:" >&5
5886   cat conftest.$ac_ext >&5
5887   rm -rf conftest*
5888   eval "ac_cv_lib_$ac_lib_var=no"
5889 fi
5890 rm -f conftest*
5891 xe_check_libs=""
5892
5893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5894   echo "$ac_t""yes" 1>&6
5895   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5896 else
5897   echo "$ac_t""no" 1>&6
5898 fi
5899
5900 fi
5901
5902     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5903       
5904 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5905 echo "configure:5906: checking for dnet_ntoa in -ldnet_stub" >&5
5906 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5907
5908 xe_check_libs=" -ldnet_stub "
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 /* Override any gcc2 internal prototype to avoid an error.  */
5913 /* We use char because int might match the return type of a gcc2
5914     builtin and then its argument prototype would still apply.  */
5915 char dnet_ntoa();
5916
5917 int main() {
5918 dnet_ntoa()
5919 ; return 0; }
5920 EOF
5921 if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=yes"
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927   rm -rf conftest*
5928   eval "ac_cv_lib_$ac_lib_var=no"
5929 fi
5930 rm -f conftest*
5931 xe_check_libs=""
5932
5933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5934   echo "$ac_t""yes" 1>&6
5935   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5936 else
5937   echo "$ac_t""no" 1>&6
5938 fi
5939
5940
5941     fi
5942
5943     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5944     # to get the SysV transport functions.
5945     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5946     # needs -lnsl.
5947     # The nsl library prevents programs from opening the X display
5948     # on Irix 5.2, according to dickey@clark.net.
5949     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5950 echo "configure:5951: checking for gethostbyname" >&5
5951
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955 /* System header to define __stub macros and hopefully few prototypes,
5956     which can conflict with char gethostbyname(); below.  */
5957 #include <assert.h>
5958 /* Override any gcc2 internal prototype to avoid an error.  */
5959 /* We use char because int might match the return type of a gcc2
5960     builtin and then its argument prototype would still apply.  */
5961 char gethostbyname();
5962
5963 int main() {
5964
5965 /* The GNU C library defines this for functions which it implements
5966     to always fail with ENOSYS.  Some functions are actually named
5967     something starting with __ and the normal name is an alias.  */
5968 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5969 choke me
5970 #else
5971 gethostbyname();
5972 #endif
5973
5974 ; return 0; }
5975 EOF
5976 if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5977   rm -rf conftest*
5978   eval "ac_cv_func_gethostbyname=yes"
5979 else
5980   echo "configure: failed program was:" >&5
5981   cat conftest.$ac_ext >&5
5982   rm -rf conftest*
5983   eval "ac_cv_func_gethostbyname=no"
5984 fi
5985 rm -f conftest*
5986
5987 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5988   echo "$ac_t""yes" 1>&6
5989   :
5990 else
5991   echo "$ac_t""no" 1>&6
5992 fi
5993
5994     if test $ac_cv_func_gethostbyname = no; then
5995       
5996 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5997 echo "configure:5998: checking for gethostbyname in -lnsl" >&5
5998 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5999
6000 xe_check_libs=" -lnsl "
6001 cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004 /* Override any gcc2 internal prototype to avoid an error.  */
6005 /* We use char because int might match the return type of a gcc2
6006     builtin and then its argument prototype would still apply.  */
6007 char gethostbyname();
6008
6009 int main() {
6010 gethostbyname()
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6014   rm -rf conftest*
6015   eval "ac_cv_lib_$ac_lib_var=yes"
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=no"
6021 fi
6022 rm -f conftest*
6023 xe_check_libs=""
6024
6025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6026   echo "$ac_t""yes" 1>&6
6027   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031
6032
6033     fi
6034
6035     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6036     # socket/setsockopt and other routines are undefined under SCO ODT
6037     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6038     # on later versions), says simon@lia.di.epfl.ch: it contains
6039     # gethostby* variants that don't use the nameserver (or something).
6040     # -lsocket must be given before -lnsl if both are needed.
6041     # We assume that if connect needs -lnsl, so does gethostbyname.
6042     echo $ac_n "checking for connect""... $ac_c" 1>&6
6043 echo "configure:6044: checking for connect" >&5
6044
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 /* System header to define __stub macros and hopefully few prototypes,
6049     which can conflict with char connect(); below.  */
6050 #include <assert.h>
6051 /* Override any gcc2 internal prototype to avoid an error.  */
6052 /* We use char because int might match the return type of a gcc2
6053     builtin and then its argument prototype would still apply.  */
6054 char connect();
6055
6056 int main() {
6057
6058 /* The GNU C library defines this for functions which it implements
6059     to always fail with ENOSYS.  Some functions are actually named
6060     something starting with __ and the normal name is an alias.  */
6061 #if defined (__stub_connect) || defined (__stub___connect)
6062 choke me
6063 #else
6064 connect();
6065 #endif
6066
6067 ; return 0; }
6068 EOF
6069 if { (eval echo configure:6070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6070   rm -rf conftest*
6071   eval "ac_cv_func_connect=yes"
6072 else
6073   echo "configure: failed program was:" >&5
6074   cat conftest.$ac_ext >&5
6075   rm -rf conftest*
6076   eval "ac_cv_func_connect=no"
6077 fi
6078 rm -f conftest*
6079
6080 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082   :
6083 else
6084   echo "$ac_t""no" 1>&6
6085 fi
6086
6087     if test $ac_cv_func_connect = no; then
6088       
6089 xe_msg_checking="for connect in -lsocket"
6090 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6091 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6092 echo "configure:6093: checking "$xe_msg_checking"" >&5
6093 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6094
6095 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6096 cat > conftest.$ac_ext <<EOF
6097 #line 6098 "configure"
6098 #include "confdefs.h"
6099 /* Override any gcc2 internal prototype to avoid an error.  */
6100 /* We use char because int might match the return type of a gcc2
6101     builtin and then its argument prototype would still apply.  */
6102 char connect();
6103
6104 int main() {
6105 connect()
6106 ; return 0; }
6107 EOF
6108 if { (eval echo configure:6109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6109   rm -rf conftest*
6110   eval "ac_cv_lib_$ac_lib_var=yes"
6111 else
6112   echo "configure: failed program was:" >&5
6113   cat conftest.$ac_ext >&5
6114   rm -rf conftest*
6115   eval "ac_cv_lib_$ac_lib_var=no"
6116 fi
6117 rm -f conftest*
6118 xe_check_libs=""
6119
6120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6121   echo "$ac_t""yes" 1>&6
6122   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6123 else
6124   echo "$ac_t""no" 1>&6
6125 fi
6126
6127
6128     fi
6129
6130     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6131     echo $ac_n "checking for remove""... $ac_c" 1>&6
6132 echo "configure:6133: checking for remove" >&5
6133
6134 cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 /* System header to define __stub macros and hopefully few prototypes,
6138     which can conflict with char remove(); below.  */
6139 #include <assert.h>
6140 /* Override any gcc2 internal prototype to avoid an error.  */
6141 /* We use char because int might match the return type of a gcc2
6142     builtin and then its argument prototype would still apply.  */
6143 char remove();
6144
6145 int main() {
6146
6147 /* The GNU C library defines this for functions which it implements
6148     to always fail with ENOSYS.  Some functions are actually named
6149     something starting with __ and the normal name is an alias.  */
6150 #if defined (__stub_remove) || defined (__stub___remove)
6151 choke me
6152 #else
6153 remove();
6154 #endif
6155
6156 ; return 0; }
6157 EOF
6158 if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6159   rm -rf conftest*
6160   eval "ac_cv_func_remove=yes"
6161 else
6162   echo "configure: failed program was:" >&5
6163   cat conftest.$ac_ext >&5
6164   rm -rf conftest*
6165   eval "ac_cv_func_remove=no"
6166 fi
6167 rm -f conftest*
6168
6169 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6170   echo "$ac_t""yes" 1>&6
6171   :
6172 else
6173   echo "$ac_t""no" 1>&6
6174 fi
6175
6176     if test $ac_cv_func_remove = no; then
6177       
6178 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6179 echo "configure:6180: checking for remove in -lposix" >&5
6180 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6181
6182 xe_check_libs=" -lposix "
6183 cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 /* Override any gcc2 internal prototype to avoid an error.  */
6187 /* We use char because int might match the return type of a gcc2
6188     builtin and then its argument prototype would still apply.  */
6189 char remove();
6190
6191 int main() {
6192 remove()
6193 ; return 0; }
6194 EOF
6195 if { (eval echo configure:6196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6196   rm -rf conftest*
6197   eval "ac_cv_lib_$ac_lib_var=yes"
6198 else
6199   echo "configure: failed program was:" >&5
6200   cat conftest.$ac_ext >&5
6201   rm -rf conftest*
6202   eval "ac_cv_lib_$ac_lib_var=no"
6203 fi
6204 rm -f conftest*
6205 xe_check_libs=""
6206
6207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6208   echo "$ac_t""yes" 1>&6
6209   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6210 else
6211   echo "$ac_t""no" 1>&6
6212 fi
6213
6214
6215     fi
6216
6217     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6218     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6219 echo "configure:6220: checking for shmat" >&5
6220
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224 /* System header to define __stub macros and hopefully few prototypes,
6225     which can conflict with char shmat(); below.  */
6226 #include <assert.h>
6227 /* Override any gcc2 internal prototype to avoid an error.  */
6228 /* We use char because int might match the return type of a gcc2
6229     builtin and then its argument prototype would still apply.  */
6230 char shmat();
6231
6232 int main() {
6233
6234 /* The GNU C library defines this for functions which it implements
6235     to always fail with ENOSYS.  Some functions are actually named
6236     something starting with __ and the normal name is an alias.  */
6237 #if defined (__stub_shmat) || defined (__stub___shmat)
6238 choke me
6239 #else
6240 shmat();
6241 #endif
6242
6243 ; return 0; }
6244 EOF
6245 if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6246   rm -rf conftest*
6247   eval "ac_cv_func_shmat=yes"
6248 else
6249   echo "configure: failed program was:" >&5
6250   cat conftest.$ac_ext >&5
6251   rm -rf conftest*
6252   eval "ac_cv_func_shmat=no"
6253 fi
6254 rm -f conftest*
6255
6256 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6257   echo "$ac_t""yes" 1>&6
6258   :
6259 else
6260   echo "$ac_t""no" 1>&6
6261 fi
6262
6263     if test $ac_cv_func_shmat = no; then
6264       
6265 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6266 echo "configure:6267: checking for shmat in -lipc" >&5
6267 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6268
6269 xe_check_libs=" -lipc "
6270 cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6273 /* Override any gcc2 internal prototype to avoid an error.  */
6274 /* We use char because int might match the return type of a gcc2
6275     builtin and then its argument prototype would still apply.  */
6276 char shmat();
6277
6278 int main() {
6279 shmat()
6280 ; return 0; }
6281 EOF
6282 if { (eval echo configure:6283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6283   rm -rf conftest*
6284   eval "ac_cv_lib_$ac_lib_var=yes"
6285 else
6286   echo "configure: failed program was:" >&5
6287   cat conftest.$ac_ext >&5
6288   rm -rf conftest*
6289   eval "ac_cv_lib_$ac_lib_var=no"
6290 fi
6291 rm -f conftest*
6292 xe_check_libs=""
6293
6294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6295   echo "$ac_t""yes" 1>&6
6296   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6297 else
6298   echo "$ac_t""no" 1>&6
6299 fi
6300
6301
6302     fi
6303   fi
6304
6305   # Check for libraries that X11R6 Xt/Xaw programs need.
6306   ac_save_LDFLAGS="$LDFLAGS"
6307   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6308   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6309   # check for ICE first), but we must link in the order -lSM -lICE or
6310   # we get undefined symbols.  So assume we have SM if we have ICE.
6311   # These have to be linked with before -lX11, unlike the other
6312   # libraries we check for below, so use a different variable.
6313   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6314   
6315 xe_msg_checking="for IceConnectionNumber in -lICE"
6316 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6317 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6318 echo "configure:6319: checking "$xe_msg_checking"" >&5
6319 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6320
6321 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6322 cat > conftest.$ac_ext <<EOF
6323 #line 6324 "configure"
6324 #include "confdefs.h"
6325 /* Override any gcc2 internal prototype to avoid an error.  */
6326 /* We use char because int might match the return type of a gcc2
6327     builtin and then its argument prototype would still apply.  */
6328 char IceConnectionNumber();
6329
6330 int main() {
6331 IceConnectionNumber()
6332 ; return 0; }
6333 EOF
6334 if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6335   rm -rf conftest*
6336   eval "ac_cv_lib_$ac_lib_var=yes"
6337 else
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   eval "ac_cv_lib_$ac_lib_var=no"
6342 fi
6343 rm -f conftest*
6344 xe_check_libs=""
6345
6346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6347   echo "$ac_t""yes" 1>&6
6348   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6349 else
6350   echo "$ac_t""no" 1>&6
6351 fi
6352
6353
6354   LDFLAGS="$ac_save_LDFLAGS"
6355
6356 fi
6357  # Autoconf claims to find X library and include dirs for us.
6358   if test "$no_x" = "yes"
6359   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6360   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6361   fi
6362 fi
6363
6364
6365 if test "$with_x11" = "yes"; then
6366   { test "$extra_verbose" = "yes" && cat << \EOF
6367     Defining HAVE_X_WINDOWS
6368 EOF
6369 cat >> confdefs.h <<\EOF
6370 #define HAVE_X_WINDOWS 1
6371 EOF
6372 }
6373
6374   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6375   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6376
6377
6378     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6379 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6380 echo "configure:6381: checking for Xm/Xm.h" >&5
6381
6382 cat > conftest.$ac_ext <<EOF
6383 #line 6384 "configure"
6384 #include "confdefs.h"
6385 #include <Xm/Xm.h>
6386 EOF
6387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6388 { (eval echo configure:6389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6390 if test -z "$ac_err"; then
6391   rm -rf conftest*
6392   eval "ac_cv_header_$ac_safe=yes"
6393 else
6394   echo "$ac_err" >&5
6395   echo "configure: failed program was:" >&5
6396   cat conftest.$ac_ext >&5
6397   rm -rf conftest*
6398   eval "ac_cv_header_$ac_safe=no"
6399 fi
6400 rm -f conftest*
6401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6402   echo "$ac_t""yes" 1>&6
6403   
6404 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6405 echo "configure:6406: checking for XmStringFree in -lXm" >&5
6406 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6407
6408 xe_check_libs=" -lXm "
6409 cat > conftest.$ac_ext <<EOF
6410 #line 6411 "configure"
6411 #include "confdefs.h"
6412 /* Override any gcc2 internal prototype to avoid an error.  */
6413 /* We use char because int might match the return type of a gcc2
6414     builtin and then its argument prototype would still apply.  */
6415 char XmStringFree();
6416
6417 int main() {
6418 XmStringFree()
6419 ; return 0; }
6420 EOF
6421 if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6422   rm -rf conftest*
6423   eval "ac_cv_lib_$ac_lib_var=yes"
6424 else
6425   echo "configure: failed program was:" >&5
6426   cat conftest.$ac_ext >&5
6427   rm -rf conftest*
6428   eval "ac_cv_lib_$ac_lib_var=no"
6429 fi
6430 rm -f conftest*
6431 xe_check_libs=""
6432
6433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6434   echo "$ac_t""yes" 1>&6
6435   got_motif=yes
6436 else
6437   echo "$ac_t""no" 1>&6
6438 fi
6439
6440
6441 else
6442   echo "$ac_t""no" 1>&6
6443 fi
6444
6445
6446   if test "$got_motif" != "yes"; then
6447             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6448                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6449       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6450       if test -d "$lib_dir" -a -d "$inc_dir"; then
6451         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6452           x_libraries="$lib_dir $x_libraries"
6453           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6454         esac
6455         case "$x_includes" in "$inc_dir"* ) ;; *)
6456           x_includes="$inc_dir $x_includes"
6457           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6458         esac
6459         break;  fi
6460     done
6461   fi
6462
6463     for rel in "X11R6" "X11R5" "X11R4"; do
6464     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6465     if test -d "$lib_dir" -a -d "$inc_dir"; then
6466       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6467         x_libraries="$x_libraries $lib_dir"
6468         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6469       esac
6470       case "$x_includes" in "$inc_dir"* ) ;; *)
6471         x_includes="$x_includes $inc_dir"
6472         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6473       esac
6474       break;     fi
6475   done
6476
6477     case "$opsys" in
6478   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 ;;
6479   esac
6480
6481   ld_switch_x_site="$X_LIBS"
6482
6483   
6484 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6485     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6486   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6487   
6488         runpath="" runpath_dirs=""
6489   if test -n "$LD_RUN_PATH"; then
6490     runpath="$LD_RUN_PATH"
6491   elif test "$GCC" = "yes"; then
6492         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6493     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6494     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6495     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6496       case "$arg" in P,* | -L* | -R* )
6497         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6498           {
6499 xe_runpath_dir="$dir"
6500   test "$xe_runpath_dir" != "/lib"     -a \
6501         "$xe_runpath_dir" != "/usr/lib" -a \
6502         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6503   eval "$xe_add_unique_runpath_dir"
6504 }
6505         done ;;
6506       esac
6507     done
6508     ld_switch_run="$ld_switch_run_save"
6509     rm -f conftest*
6510   else
6511         for arg in $ld_switch_site $ld_switch_x_site; do
6512       case "$arg" in -L*) {
6513 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6514   test "$xe_runpath_dir" != "/lib"     -a \
6515         "$xe_runpath_dir" != "/usr/lib" -a \
6516         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6517   eval "$xe_add_unique_runpath_dir"
6518 };; esac
6519     done
6520             if test "$opsys $need_motif" = "sol2 yes"; then
6521       xe_runpath_dir="/opt/SUNWdt/lib";
6522       eval "$xe_add_unique_runpath_dir";
6523     fi
6524   fi 
6525   if test -n "$runpath"; then
6526     ld_switch_run="${dash_r}${runpath}"
6527     
6528 if test "$GCC" = "yes"; then
6529   set x $ld_switch_run; shift; ld_switch_run=""
6530   while test -n "$1"; do
6531     case $1 in
6532       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6533       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6534       -Xlinker* ) ;;
6535       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6536     esac
6537     shift
6538   done
6539 fi
6540     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6541   fi
6542 fi
6543
6544
6545   if test "$extra_verbose" = "yes"; then
6546     echo; echo "X11 compilation variables:"
6547     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6548     echo
6549   fi
6550
6551             bitmapdirs=
6552   if test "$x_includes" != NONE; then
6553     for i in $x_includes; do
6554       if test -d "$i/bitmaps"; then
6555         bitmapdirs="$i/bitmaps:$bitmapdirs"
6556       fi
6557       if test -d "$i/X11/bitmaps"; then
6558         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6559       fi
6560     done
6561     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6562   fi
6563   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6564     Defining BITMAPDIR = "$bitmapdirs"
6565 EOF
6566 cat >> confdefs.h <<EOF
6567 #define BITMAPDIR "$bitmapdirs"
6568 EOF
6569 }
6570
6571
6572     echo "checking for X defines extracted by xmkmf" 1>&6
6573 echo "configure:6574: checking for X defines extracted by xmkmf" >&5
6574   rm -fr conftestdir
6575   if mkdir conftestdir; then
6576     cd conftestdir
6577     cat > Imakefile <<'EOF'
6578 xetest:
6579         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6580 EOF
6581     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6582       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6583       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6584     fi
6585     cd ..
6586     rm -fr conftestdir
6587     for word in $xmkmf_defines; do
6588       case "$word" in 
6589       -D__STDC__*) ;;
6590       -D* )
6591         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6592         case "$word" in
6593           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6594           *     ) val=1 ;;
6595         esac
6596         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6597           if test "$val" = "1"
6598             then { test "$extra_verbose" = "yes" && cat << EOF
6599     Defining $sym
6600 EOF
6601 cat >> confdefs.h <<EOF
6602 #define $sym 1
6603 EOF
6604 }
6605
6606             else { test "$extra_verbose" = "yes" && cat << EOF
6607     Defining $sym = $val
6608 EOF
6609 cat >> confdefs.h <<EOF
6610 #define $sym $val
6611 EOF
6612 }
6613
6614           fi
6615         fi  ;;
6616       esac
6617     done
6618   fi
6619
6620     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6621 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6622 echo "configure:6623: checking for X11/Intrinsic.h" >&5
6623
6624 cat > conftest.$ac_ext <<EOF
6625 #line 6626 "configure"
6626 #include "confdefs.h"
6627 #include <X11/Intrinsic.h>
6628 EOF
6629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6630 { (eval echo configure:6631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6632 if test -z "$ac_err"; then
6633   rm -rf conftest*
6634   eval "ac_cv_header_$ac_safe=yes"
6635 else
6636   echo "$ac_err" >&5
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   eval "ac_cv_header_$ac_safe=no"
6641 fi
6642 rm -f conftest*
6643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6644   echo "$ac_t""yes" 1>&6
6645   :
6646 else
6647   echo "$ac_t""no" 1>&6
6648 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6649 fi
6650
6651
6652       
6653 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6654 echo "configure:6655: checking for XOpenDisplay in -lX11" >&5
6655 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6656
6657 xe_check_libs=" -lX11 "
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* Override any gcc2 internal prototype to avoid an error.  */
6662 /* We use char because int might match the return type of a gcc2
6663     builtin and then its argument prototype would still apply.  */
6664 char XOpenDisplay();
6665
6666 int main() {
6667 XOpenDisplay()
6668 ; return 0; }
6669 EOF
6670 if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6671   rm -rf conftest*
6672   eval "ac_cv_lib_$ac_lib_var=yes"
6673 else
6674   echo "configure: failed program was:" >&5
6675   cat conftest.$ac_ext >&5
6676   rm -rf conftest*
6677   eval "ac_cv_lib_$ac_lib_var=no"
6678 fi
6679 rm -f conftest*
6680 xe_check_libs=""
6681
6682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6683   echo "$ac_t""yes" 1>&6
6684   have_lib_x11=yes
6685 else
6686   echo "$ac_t""no" 1>&6
6687 fi
6688
6689
6690   if test "$have_lib_x11" != "yes"; then
6691     
6692 xe_msg_checking="for XGetFontProperty in -lX11"
6693 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6694 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6695 echo "configure:6696: checking "$xe_msg_checking"" >&5
6696 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6697
6698 xe_check_libs=" -lX11 -b i486-linuxaout"
6699 cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char XGetFontProperty();
6706
6707 int main() {
6708 XGetFontProperty()
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=no"
6719 fi
6720 rm -f conftest*
6721 xe_check_libs=""
6722
6723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6724   echo "$ac_t""yes" 1>&6
6725   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6726 else
6727   echo "$ac_t""no" 1>&6
6728 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6729 fi
6730
6731
6732   fi
6733   libs_x="-lX11"
6734   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6735
6736     
6737 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6738 echo "configure:6739: checking for XShapeSelectInput in -lXext" >&5
6739 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6740
6741 xe_check_libs=" -lXext "
6742 cat > conftest.$ac_ext <<EOF
6743 #line 6744 "configure"
6744 #include "confdefs.h"
6745 /* Override any gcc2 internal prototype to avoid an error.  */
6746 /* We use char because int might match the return type of a gcc2
6747     builtin and then its argument prototype would still apply.  */
6748 char XShapeSelectInput();
6749
6750 int main() {
6751 XShapeSelectInput()
6752 ; return 0; }
6753 EOF
6754 if { (eval echo configure:6755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6755   rm -rf conftest*
6756   eval "ac_cv_lib_$ac_lib_var=yes"
6757 else
6758   echo "configure: failed program was:" >&5
6759   cat conftest.$ac_ext >&5
6760   rm -rf conftest*
6761   eval "ac_cv_lib_$ac_lib_var=no"
6762 fi
6763 rm -f conftest*
6764 xe_check_libs=""
6765
6766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6767   echo "$ac_t""yes" 1>&6
6768   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6769 else
6770   echo "$ac_t""no" 1>&6
6771 fi
6772
6773
6774
6775     
6776 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6777 echo "configure:6778: checking for XtOpenDisplay in -lXt" >&5
6778 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6779
6780 xe_check_libs=" -lXt "
6781 cat > conftest.$ac_ext <<EOF
6782 #line 6783 "configure"
6783 #include "confdefs.h"
6784 /* Override any gcc2 internal prototype to avoid an error.  */
6785 /* We use char because int might match the return type of a gcc2
6786     builtin and then its argument prototype would still apply.  */
6787 char XtOpenDisplay();
6788
6789 int main() {
6790 XtOpenDisplay()
6791 ; return 0; }
6792 EOF
6793 if { (eval echo configure:6794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6794   rm -rf conftest*
6795   eval "ac_cv_lib_$ac_lib_var=yes"
6796 else
6797   echo "configure: failed program was:" >&5
6798   cat conftest.$ac_ext >&5
6799   rm -rf conftest*
6800   eval "ac_cv_lib_$ac_lib_var=no"
6801 fi
6802 rm -f conftest*
6803 xe_check_libs=""
6804
6805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6806   echo "$ac_t""yes" 1>&6
6807   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6808 else
6809   echo "$ac_t""no" 1>&6
6810 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6811 fi
6812
6813
6814
6815   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6816 echo "configure:6817: checking the version of X11 being used" >&5
6817   cat > conftest.$ac_ext <<EOF
6818 #line 6819 "configure"
6819 #include "confdefs.h"
6820 #include <X11/Intrinsic.h>
6821     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6822 EOF
6823 if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6824 then
6825   ./conftest foobar; x11_release=$?
6826 else
6827   conftest_rc="$?"
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -fr conftest*
6831   x11_release=4
6832 fi
6833 rm -fr conftest*
6834   echo "$ac_t""R${x11_release}" 1>&6
6835   { test "$extra_verbose" = "yes" && cat << EOF
6836     Defining THIS_IS_X11R${x11_release}
6837 EOF
6838 cat >> confdefs.h <<EOF
6839 #define THIS_IS_X11R${x11_release} 1
6840 EOF
6841 }
6842
6843
6844   if test "${x11_release}" = "4"; then
6845     case "$with_widgets" in
6846       "" | "no") with_widgets=no ;;
6847       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6848     esac
6849   fi
6850
6851   for ac_func in XConvertCase
6852 do
6853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6854 echo "configure:6855: checking for $ac_func" >&5
6855
6856 cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 /* System header to define __stub macros and hopefully few prototypes,
6860     which can conflict with char $ac_func(); below.  */
6861 #include <assert.h>
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char $ac_func();
6866
6867 int main() {
6868
6869 /* The GNU C library defines this for functions which it implements
6870     to always fail with ENOSYS.  Some functions are actually named
6871     something starting with __ and the normal name is an alias.  */
6872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6873 choke me
6874 #else
6875 $ac_func();
6876 #endif
6877
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6881   rm -rf conftest*
6882   eval "ac_cv_func_$ac_func=yes"
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   eval "ac_cv_func_$ac_func=no"
6888 fi
6889 rm -f conftest*
6890
6891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6894   { test "$extra_verbose" = "yes" && cat << EOF
6895     Defining $ac_tr_func
6896 EOF
6897 cat >> confdefs.h <<EOF
6898 #define $ac_tr_func 1
6899 EOF
6900 }
6901  
6902 else
6903   echo "$ac_t""no" 1>&6
6904 fi
6905 done
6906
6907
6908   for ac_hdr in X11/Xlocale.h
6909 do
6910 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6911 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6912 echo "configure:6913: checking for $ac_hdr" >&5
6913
6914 cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 #include <$ac_hdr>
6918 EOF
6919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6920 { (eval echo configure:6921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6922 if test -z "$ac_err"; then
6923   rm -rf conftest*
6924   eval "ac_cv_header_$ac_safe=yes"
6925 else
6926   echo "$ac_err" >&5
6927   echo "configure: failed program was:" >&5
6928   cat conftest.$ac_ext >&5
6929   rm -rf conftest*
6930   eval "ac_cv_header_$ac_safe=no"
6931 fi
6932 rm -f conftest*
6933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6934   echo "$ac_t""yes" 1>&6
6935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6936   { test "$extra_verbose" = "yes" && cat << EOF
6937     Defining $ac_tr_hdr
6938 EOF
6939 cat >> confdefs.h <<EOF
6940 #define $ac_tr_hdr 1
6941 EOF
6942 }
6943  
6944 else
6945   echo "$ac_t""no" 1>&6
6946 fi
6947 done
6948
6949
6950     for ac_func in XRegisterIMInstantiateCallback
6951 do
6952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6953 echo "configure:6954: checking for $ac_func" >&5
6954
6955 cat > conftest.$ac_ext <<EOF
6956 #line 6957 "configure"
6957 #include "confdefs.h"
6958 /* System header to define __stub macros and hopefully few prototypes,
6959     which can conflict with char $ac_func(); below.  */
6960 #include <assert.h>
6961 /* Override any gcc2 internal prototype to avoid an error.  */
6962 /* We use char because int might match the return type of a gcc2
6963     builtin and then its argument prototype would still apply.  */
6964 char $ac_func();
6965
6966 int main() {
6967
6968 /* The GNU C library defines this for functions which it implements
6969     to always fail with ENOSYS.  Some functions are actually named
6970     something starting with __ and the normal name is an alias.  */
6971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6972 choke me
6973 #else
6974 $ac_func();
6975 #endif
6976
6977 ; return 0; }
6978 EOF
6979 if { (eval echo configure:6980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6980   rm -rf conftest*
6981   eval "ac_cv_func_$ac_func=yes"
6982 else
6983   echo "configure: failed program was:" >&5
6984   cat conftest.$ac_ext >&5
6985   rm -rf conftest*
6986   eval "ac_cv_func_$ac_func=no"
6987 fi
6988 rm -f conftest*
6989
6990 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6991   echo "$ac_t""yes" 1>&6
6992     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6993   { test "$extra_verbose" = "yes" && cat << EOF
6994     Defining $ac_tr_func
6995 EOF
6996 cat >> confdefs.h <<EOF
6997 #define $ac_tr_func 1
6998 EOF
6999 }
7000  
7001 else
7002   echo "$ac_t""no" 1>&6
7003 fi
7004 done
7005
7006   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7007 echo "configure:7008: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7008   cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011
7012 #define NeedFunctionPrototypes 1
7013 #include <X11/Xlib.h>
7014 extern Bool XRegisterIMInstantiateCallback(
7015    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7016
7017 int main() {
7018
7019 ; return 0; }
7020 EOF
7021 if { (eval echo configure:7022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7022   rm -rf conftest*
7023   echo "$ac_t""yes" 1>&6
7024 else
7025   echo "configure: failed program was:" >&5
7026   cat conftest.$ac_ext >&5
7027   rm -rf conftest*
7028   echo "$ac_t""no" 1>&6
7029    { test "$extra_verbose" = "yes" && cat << \EOF
7030     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7031 EOF
7032 cat >> confdefs.h <<\EOF
7033 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7034 EOF
7035 }
7036
7037 fi
7038 rm -f conftest*
7039
7040     test -z "$with_xmu" && { 
7041 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7042 echo "configure:7043: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7043 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7044
7045 xe_check_libs=" -lXmu "
7046 cat > conftest.$ac_ext <<EOF
7047 #line 7048 "configure"
7048 #include "confdefs.h"
7049 /* Override any gcc2 internal prototype to avoid an error.  */
7050 /* We use char because int might match the return type of a gcc2
7051     builtin and then its argument prototype would still apply.  */
7052 char XmuReadBitmapDataFromFile();
7053
7054 int main() {
7055 XmuReadBitmapDataFromFile()
7056 ; return 0; }
7057 EOF
7058 if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7059   rm -rf conftest*
7060   eval "ac_cv_lib_$ac_lib_var=yes"
7061 else
7062   echo "configure: failed program was:" >&5
7063   cat conftest.$ac_ext >&5
7064   rm -rf conftest*
7065   eval "ac_cv_lib_$ac_lib_var=no"
7066 fi
7067 rm -f conftest*
7068 xe_check_libs=""
7069
7070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7071   echo "$ac_t""yes" 1>&6
7072   with_xmu=yes
7073 else
7074   echo "$ac_t""no" 1>&6
7075 with_xmu=no
7076 fi
7077
7078  }
7079   if test "$with_xmu" = "no"; then
7080     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7081    echo "    xemacs will be linked with \"xmu.o\""
7082  fi
7083   else
7084     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7085     { test "$extra_verbose" = "yes" && cat << \EOF
7086     Defining HAVE_XMU
7087 EOF
7088 cat >> confdefs.h <<\EOF
7089 #define HAVE_XMU 1
7090 EOF
7091 }
7092
7093   fi
7094
7095       
7096 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7097 echo "configure:7098: checking for main in -lXbsd" >&5
7098 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7099
7100 xe_check_libs=" -lXbsd "
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104
7105 int main() {
7106 main()
7107 ; return 0; }
7108 EOF
7109 if { (eval echo configure:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7110   rm -rf conftest*
7111   eval "ac_cv_lib_$ac_lib_var=yes"
7112 else
7113   echo "configure: failed program was:" >&5
7114   cat conftest.$ac_ext >&5
7115   rm -rf conftest*
7116   eval "ac_cv_lib_$ac_lib_var=no"
7117 fi
7118 rm -f conftest*
7119 xe_check_libs=""
7120
7121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7122   echo "$ac_t""yes" 1>&6
7123   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7124 else
7125   echo "$ac_t""no" 1>&6
7126 fi
7127
7128
7129
7130     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7131         if test "$GCC" = "yes"; then
7132                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7133 echo "configure:7134: checking for name of AIX gcc threads option" >&5
7134       case `$CC -v --help 2>&1` in
7135         *-mthreads*) aix_threads=-mthreads ;;
7136                   *) aix_threads=-pthread  ;;
7137       esac
7138       echo "$ac_t""$aix_threads" 1>&6
7139       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7140       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7141     else
7142             case "$CC" in *_r) : ;;
7143         *)
7144          xe_save_CC="$CC"
7145          CC="${CC}_r"
7146          echo $ac_n "checking size of short""... $ac_c" 1>&6
7147 echo "configure:7148: checking size of short" >&5
7148
7149 cat > conftest.$ac_ext <<EOF
7150 #line 7151 "configure"
7151 #include "confdefs.h"
7152 #include <stdio.h>
7153 main()
7154 {
7155   FILE *f=fopen("conftestval", "w");
7156   if (!f) exit(1);
7157   fprintf(f, "%d\n", sizeof(short));
7158   exit(0);
7159 }
7160 EOF
7161 if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7162 then
7163   ac_cv_sizeof_short=`cat conftestval`
7164 else
7165   conftest_rc="$?"
7166   echo "configure: failed program was:" >&5
7167   cat conftest.$ac_ext >&5
7168   rm -fr conftest*
7169   ac_cv_sizeof_short=0
7170 fi
7171 rm -fr conftest*
7172 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7173 { test "$extra_verbose" = "yes" && cat << EOF
7174     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7175 EOF
7176 cat >> confdefs.h <<EOF
7177 #define SIZEOF_SHORT $ac_cv_sizeof_short
7178 EOF
7179 }
7180
7181
7182          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7183       esac
7184     fi
7185   fi
7186
7187 fi 
7188 if test "$with_msw" != "no"; then
7189   echo "checking for MS-Windows" 1>&6
7190 echo "configure:7191: checking for MS-Windows" >&5
7191   
7192 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7193 echo "configure:7194: checking for main in -lgdi32" >&5
7194 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7195
7196 xe_check_libs=" -lgdi32 "
7197 cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200
7201 int main() {
7202 main()
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   eval "ac_cv_lib_$ac_lib_var=yes"
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   eval "ac_cv_lib_$ac_lib_var=no"
7213 fi
7214 rm -f conftest*
7215 xe_check_libs=""
7216
7217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7218   echo "$ac_t""yes" 1>&6
7219   with_msw=yes
7220 else
7221   echo "$ac_t""no" 1>&6
7222 fi
7223
7224
7225   if test "$with_msw" = "yes"; then
7226     { test "$extra_verbose" = "yes" && cat << \EOF
7227     Defining HAVE_MS_WINDOWS
7228 EOF
7229 cat >> confdefs.h <<\EOF
7230 #define HAVE_MS_WINDOWS 1
7231 EOF
7232 }
7233
7234
7235         if test "$with_netinstall" = "yes"; then
7236       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7237       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7238       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7239     fi
7240
7241     install_pp="$srcdir/lib-src/installexe.sh"
7242     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
7243     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7244     if test "$window_system" != x11; then
7245         window_system=msw
7246         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7247             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7248    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7249  fi
7250         test "$with_menubars"   != "no" && with_menubars=msw \
7251             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7252    echo "    xemacs will be linked with \"menubar-msw.o\""
7253  fi
7254         test "$with_toolbars"   != "no" && with_toolbars=msw \
7255             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7256    echo "    xemacs will be linked with \"toolbar-msw.o\""
7257  fi
7258         test "$with_dialogs"   != "no" && with_dialogs=msw \
7259             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7260    echo "    xemacs will be linked with \"dialog-msw.o\""
7261  fi
7262         test "$with_widgets"   != "no" && with_widgets=msw
7263     else
7264         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7265    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7266  fi
7267         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7268    echo "    xemacs will be linked with \"menubar-msw.o\""
7269  fi
7270         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7271    echo "    xemacs will be linked with \"toolbar-msw.o\""
7272  fi
7273         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7274    echo "    xemacs will be linked with \"dialog-msw.o\""
7275  fi
7276     fi
7277         cat > conftest.$ac_ext <<EOF
7278 #line 7279 "configure"
7279 #include "confdefs.h"
7280 #include <fcntl.h>
7281     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7284 then
7285   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7286     Defining HAVE_MSG_SELECT
7287 EOF
7288 cat >> confdefs.h <<\EOF
7289 #define HAVE_MSG_SELECT 1
7290 EOF
7291 }
7292
7293 else
7294   conftest_rc="$?"
7295   echo "configure: failed program was:" >&5
7296   cat conftest.$ac_ext >&5
7297 fi
7298 rm -fr conftest*
7299     with_file_coding=yes
7300     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
7301    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\""
7302  fi
7303   fi
7304 fi
7305
7306
7307
7308 test -z "$window_system" && window_system="none"
7309
7310 if test "$window_system" = "none"; then
7311   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7312   do
7313     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7314        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7315     fi
7316     eval "with_${feature}=no"
7317   done
7318 else
7319   test -z "$with_toolbars" && with_toolbars=yes
7320 fi
7321
7322 if test "$with_msw" != "yes"; then
7323   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7324   do
7325     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7326        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7327     fi
7328     eval "with_${feature}=no"
7329   done
7330 else
7331   :
7332 fi
7333
7334 if test "$with_x11" != "yes"; then
7335             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7336   do
7337     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7338        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7339     fi
7340     eval "with_${feature}=no"
7341   done
7342 fi
7343
7344 if test "$with_x11" = "yes"; then
7345   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7346 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7347 echo "configure:7348: checking for X11/extensions/shape.h" >&5
7348
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 #include <X11/extensions/shape.h>
7353 EOF
7354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7355 { (eval echo configure:7356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7357 if test -z "$ac_err"; then
7358   rm -rf conftest*
7359   eval "ac_cv_header_$ac_safe=yes"
7360 else
7361   echo "$ac_err" >&5
7362   echo "configure: failed program was:" >&5
7363   cat conftest.$ac_ext >&5
7364   rm -rf conftest*
7365   eval "ac_cv_header_$ac_safe=no"
7366 fi
7367 rm -f conftest*
7368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7369   echo "$ac_t""yes" 1>&6
7370   
7371    { test "$extra_verbose" = "yes" && cat << \EOF
7372     Defining HAVE_BALLOON_HELP
7373 EOF
7374 cat >> confdefs.h <<\EOF
7375 #define HAVE_BALLOON_HELP 1
7376 EOF
7377 }
7378
7379    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7380    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7381  fi
7382 else
7383   echo "$ac_t""no" 1>&6
7384 fi
7385
7386 fi
7387
7388 bitmapdir=
7389
7390 case "$window_system" in
7391   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7392   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7393   gtk  )
7394        HAVE_X_WINDOWS=no
7395        test "$with_gnome" = "yes" && echo "  Using GNOME."
7396        test "$with_gnome" = "no" && echo "  Using GTK."
7397        ;;
7398   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7399 esac
7400
7401 case "$x_libraries" in *X11R4* )
7402   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7403   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7404 esac
7405
7406 echo "checking for WM_COMMAND option" 1>&6
7407 echo "configure:7408: checking for WM_COMMAND option" >&5;
7408 if test "$with_wmcommand" != "no"; then
7409   { test "$extra_verbose" = "yes" && cat << \EOF
7410     Defining HAVE_WMCOMMAND
7411 EOF
7412 cat >> confdefs.h <<\EOF
7413 #define HAVE_WMCOMMAND 1
7414 EOF
7415 }
7416
7417 fi
7418
7419 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7420 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7421 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7422 echo "configure:7423: checking for X11/Xauth.h" >&5
7423
7424 cat > conftest.$ac_ext <<EOF
7425 #line 7426 "configure"
7426 #include "confdefs.h"
7427 #include <X11/Xauth.h>
7428 EOF
7429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7430 { (eval echo configure:7431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7432 if test -z "$ac_err"; then
7433   rm -rf conftest*
7434   eval "ac_cv_header_$ac_safe=yes"
7435 else
7436   echo "$ac_err" >&5
7437   echo "configure: failed program was:" >&5
7438   cat conftest.$ac_ext >&5
7439   rm -rf conftest*
7440   eval "ac_cv_header_$ac_safe=no"
7441 fi
7442 rm -f conftest*
7443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7444   echo "$ac_t""yes" 1>&6
7445   :
7446 else
7447   echo "$ac_t""no" 1>&6
7448 with_xauth=no
7449 fi
7450  }
7451 test -z "$with_xauth" && { 
7452 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7453 echo "configure:7454: checking for XauGetAuthByAddr in -lXau" >&5
7454 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7455
7456 xe_check_libs=" -lXau "
7457 cat > conftest.$ac_ext <<EOF
7458 #line 7459 "configure"
7459 #include "confdefs.h"
7460 /* Override any gcc2 internal prototype to avoid an error.  */
7461 /* We use char because int might match the return type of a gcc2
7462     builtin and then its argument prototype would still apply.  */
7463 char XauGetAuthByAddr();
7464
7465 int main() {
7466 XauGetAuthByAddr()
7467 ; return 0; }
7468 EOF
7469 if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7470   rm -rf conftest*
7471   eval "ac_cv_lib_$ac_lib_var=yes"
7472 else
7473   echo "configure: failed program was:" >&5
7474   cat conftest.$ac_ext >&5
7475   rm -rf conftest*
7476   eval "ac_cv_lib_$ac_lib_var=no"
7477 fi
7478 rm -f conftest*
7479 xe_check_libs=""
7480
7481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7482   echo "$ac_t""yes" 1>&6
7483   :
7484 else
7485   echo "$ac_t""no" 1>&6
7486 with_xauth=no
7487 fi
7488
7489  }
7490 test -z "$with_xauth" && with_xauth=yes
7491 if test "$with_xauth" = "yes"; then
7492   { test "$extra_verbose" = "yes" && cat << \EOF
7493     Defining HAVE_XAUTH
7494 EOF
7495 cat >> confdefs.h <<\EOF
7496 #define HAVE_XAUTH 1
7497 EOF
7498 }
7499
7500   
7501 T=""
7502 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
7503 libs_xauth="$T"
7504
7505 fi
7506
7507
7508
7509
7510 if test "$with_tooltalk" != "no" ; then
7511       for dir in "" "Tt/" "desktop/" ; do
7512     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7513 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7514 echo "configure:7515: checking for ${dir}tt_c.h" >&5
7515
7516 cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 #include <${dir}tt_c.h>
7520 EOF
7521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7522 { (eval echo configure:7523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7524 if test -z "$ac_err"; then
7525   rm -rf conftest*
7526   eval "ac_cv_header_$ac_safe=yes"
7527 else
7528   echo "$ac_err" >&5
7529   echo "configure: failed program was:" >&5
7530   cat conftest.$ac_ext >&5
7531   rm -rf conftest*
7532   eval "ac_cv_header_$ac_safe=no"
7533 fi
7534 rm -f conftest*
7535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7536   echo "$ac_t""yes" 1>&6
7537   tt_c_h_file="${dir}tt_c.h"; break
7538 else
7539   echo "$ac_t""no" 1>&6
7540 fi
7541
7542   done
7543   if test -z "$tt_c_h_file"; then
7544     if test "$with_tooltalk" = "yes"; then
7545       (echo "$progname: Usage error:"
7546 echo " " "Unable to find required tooltalk header files."
7547 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7548     fi
7549     with_tooltalk=no
7550   fi
7551 fi
7552 if test "$with_tooltalk" != "no" ; then
7553   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7554     
7555 xe_msg_checking="for tt_message_create in -ltt"
7556 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7557 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7558 echo "configure:7559: checking "$xe_msg_checking"" >&5
7559 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7560
7561 xe_check_libs=" -ltt $extra_libs"
7562 cat > conftest.$ac_ext <<EOF
7563 #line 7564 "configure"
7564 #include "confdefs.h"
7565 /* Override any gcc2 internal prototype to avoid an error.  */
7566 /* We use char because int might match the return type of a gcc2
7567     builtin and then its argument prototype would still apply.  */
7568 char tt_message_create();
7569
7570 int main() {
7571 tt_message_create()
7572 ; return 0; }
7573 EOF
7574 if { (eval echo configure:7575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7575   rm -rf conftest*
7576   eval "ac_cv_lib_$ac_lib_var=yes"
7577 else
7578   echo "configure: failed program was:" >&5
7579   cat conftest.$ac_ext >&5
7580   rm -rf conftest*
7581   eval "ac_cv_lib_$ac_lib_var=no"
7582 fi
7583 rm -f conftest*
7584 xe_check_libs=""
7585
7586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7587   echo "$ac_t""yes" 1>&6
7588   tt_libs="-ltt $extra_libs"; break
7589 else
7590   echo "$ac_t""no" 1>&6
7591 :
7592 fi
7593
7594
7595   done
7596   if test -z "$tt_libs"; then
7597     if test "$with_tooltalk" = "yes"; then
7598       (echo "$progname: Usage error:"
7599 echo " " "Unable to find required tooltalk libraries."
7600 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7601     fi
7602     with_tooltalk=no
7603   fi
7604 fi
7605 test -z "$with_tooltalk" && with_tooltalk=yes
7606 if test "$with_tooltalk" = "yes"; then
7607   { test "$extra_verbose" = "yes" && cat << \EOF
7608     Defining TOOLTALK
7609 EOF
7610 cat >> confdefs.h <<\EOF
7611 #define TOOLTALK 1
7612 EOF
7613 }
7614
7615   { test "$extra_verbose" = "yes" && cat << EOF
7616     Defining TT_C_H_FILE = "$tt_c_h_file"
7617 EOF
7618 cat >> confdefs.h <<EOF
7619 #define TT_C_H_FILE "$tt_c_h_file"
7620 EOF
7621 }
7622
7623   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7624   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7625    echo "    xemacs will be linked with \"tooltalk.o\""
7626  fi
7627 fi
7628
7629 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7630 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7631 echo "configure:7632: checking for Dt/Dt.h" >&5
7632
7633 cat > conftest.$ac_ext <<EOF
7634 #line 7635 "configure"
7635 #include "confdefs.h"
7636 #include <Dt/Dt.h>
7637 EOF
7638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7639 { (eval echo configure:7640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7641 if test -z "$ac_err"; then
7642   rm -rf conftest*
7643   eval "ac_cv_header_$ac_safe=yes"
7644 else
7645   echo "$ac_err" >&5
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   eval "ac_cv_header_$ac_safe=no"
7650 fi
7651 rm -f conftest*
7652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7653   echo "$ac_t""yes" 1>&6
7654   :
7655 else
7656   echo "$ac_t""no" 1>&6
7657 with_cde=no
7658 fi
7659  }
7660 test -z "$with_cde" && { 
7661 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7662 echo "configure:7663: checking for DtDndDragStart in -lDtSvc" >&5
7663 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7664
7665 xe_check_libs=" -lDtSvc "
7666 cat > conftest.$ac_ext <<EOF
7667 #line 7668 "configure"
7668 #include "confdefs.h"
7669 /* Override any gcc2 internal prototype to avoid an error.  */
7670 /* We use char because int might match the return type of a gcc2
7671     builtin and then its argument prototype would still apply.  */
7672 char DtDndDragStart();
7673
7674 int main() {
7675 DtDndDragStart()
7676 ; return 0; }
7677 EOF
7678 if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7679   rm -rf conftest*
7680   eval "ac_cv_lib_$ac_lib_var=yes"
7681 else
7682   echo "configure: failed program was:" >&5
7683   cat conftest.$ac_ext >&5
7684   rm -rf conftest*
7685   eval "ac_cv_lib_$ac_lib_var=no"
7686 fi
7687 rm -f conftest*
7688 xe_check_libs=""
7689
7690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7691   echo "$ac_t""yes" 1>&6
7692   :
7693 else
7694   echo "$ac_t""no" 1>&6
7695 with_cde=no
7696 fi
7697
7698  }
7699 test -z "$with_cde" && with_cde=yes
7700 if test "$with_dragndrop" = no; then
7701   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7702   with_cde=no
7703 fi
7704 if test "$with_cde" = "yes" ; then
7705   { test "$extra_verbose" = "yes" && cat << \EOF
7706     Defining HAVE_CDE
7707 EOF
7708 cat >> confdefs.h <<\EOF
7709 #define HAVE_CDE 1
7710 EOF
7711 }
7712
7713   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7714   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7715   with_tooltalk=yes # CDE requires Tooltalk
7716   need_motif=yes    # CDE requires Motif
7717 fi
7718
7719 test "$window_system" != "x11" && with_offix=no
7720 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7721   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7722   with_offix=no
7723 fi
7724 if test "$with_dragndrop" = no; then
7725   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7726   with_offix=no
7727 fi
7728 if test "$with_cde" = yes; then
7729   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7730   with_offix=no
7731 fi
7732 test -z "$with_offix" && with_offix=no
7733 if test "$with_offix" = "yes"; then
7734   { test "$extra_verbose" = "yes" && cat << \EOF
7735     Defining HAVE_OFFIX_DND
7736 EOF
7737 cat >> confdefs.h <<\EOF
7738 #define HAVE_OFFIX_DND 1
7739 EOF
7740 }
7741
7742   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7743   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7744 fi
7745 if test "$with_gtk" = "yes"; then
7746    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7747 fi
7748
7749 if test "$with_dragndrop" != "no" ; then
7750   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7751 echo "configure:7752: checking if drag and drop API is needed" >&5
7752   if test -n "$dragndrop_proto" ; then
7753     with_dragndrop=yes
7754     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7755     { test "$extra_verbose" = "yes" && cat << \EOF
7756     Defining HAVE_DRAGNDROP
7757 EOF
7758 cat >> confdefs.h <<\EOF
7759 #define HAVE_DRAGNDROP 1
7760 EOF
7761 }
7762
7763     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7764   else
7765     with_dragndrop=no
7766     echo "$ac_t""no" 1>&6
7767   fi
7768 fi
7769
7770 echo "checking for LDAP" 1>&6
7771 echo "configure:7772: checking for LDAP" >&5
7772 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7773 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7774 echo "configure:7775: checking for ldap.h" >&5
7775
7776 cat > conftest.$ac_ext <<EOF
7777 #line 7778 "configure"
7778 #include "confdefs.h"
7779 #include <ldap.h>
7780 EOF
7781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7782 { (eval echo configure:7783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7784 if test -z "$ac_err"; then
7785   rm -rf conftest*
7786   eval "ac_cv_header_$ac_safe=yes"
7787 else
7788   echo "$ac_err" >&5
7789   echo "configure: failed program was:" >&5
7790   cat conftest.$ac_ext >&5
7791   rm -rf conftest*
7792   eval "ac_cv_header_$ac_safe=no"
7793 fi
7794 rm -f conftest*
7795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7796   echo "$ac_t""yes" 1>&6
7797   :
7798 else
7799   echo "$ac_t""no" 1>&6
7800 with_ldap=no
7801 fi
7802  }
7803 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7804 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7805 echo "configure:7806: checking for lber.h" >&5
7806
7807 cat > conftest.$ac_ext <<EOF
7808 #line 7809 "configure"
7809 #include "confdefs.h"
7810 #include <lber.h>
7811 EOF
7812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7813 { (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7815 if test -z "$ac_err"; then
7816   rm -rf conftest*
7817   eval "ac_cv_header_$ac_safe=yes"
7818 else
7819   echo "$ac_err" >&5
7820   echo "configure: failed program was:" >&5
7821   cat conftest.$ac_ext >&5
7822   rm -rf conftest*
7823   eval "ac_cv_header_$ac_safe=no"
7824 fi
7825 rm -f conftest*
7826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7827   echo "$ac_t""yes" 1>&6
7828   :
7829 else
7830   echo "$ac_t""no" 1>&6
7831 with_ldap=no
7832 fi
7833  }
7834 if test "$with_ldap" != "no"; then
7835   
7836 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7837 echo "configure:7838: checking for ldap_search in -lldap" >&5
7838 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7839
7840 xe_check_libs=" -lldap "
7841 cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844 /* Override any gcc2 internal prototype to avoid an error.  */
7845 /* We use char because int might match the return type of a gcc2
7846     builtin and then its argument prototype would still apply.  */
7847 char ldap_search();
7848
7849 int main() {
7850 ldap_search()
7851 ; return 0; }
7852 EOF
7853 if { (eval echo configure:7854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7854   rm -rf conftest*
7855   eval "ac_cv_lib_$ac_lib_var=yes"
7856 else
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -rf conftest*
7860   eval "ac_cv_lib_$ac_lib_var=no"
7861 fi
7862 rm -f conftest*
7863 xe_check_libs=""
7864
7865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7866   echo "$ac_t""yes" 1>&6
7867   with_ldap_nolber=yes
7868 else
7869   echo "$ac_t""no" 1>&6
7870 with_ldap_nolber=no
7871 fi
7872
7873
7874   test "$with_ldap_nolber" = "no" && { 
7875 xe_msg_checking="for ldap_open in -lldap"
7876 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7877 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7878 echo "configure:7879: checking "$xe_msg_checking"" >&5
7879 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7880
7881 xe_check_libs=" -lldap -llber"
7882 cat > conftest.$ac_ext <<EOF
7883 #line 7884 "configure"
7884 #include "confdefs.h"
7885 /* Override any gcc2 internal prototype to avoid an error.  */
7886 /* We use char because int might match the return type of a gcc2
7887     builtin and then its argument prototype would still apply.  */
7888 char ldap_open();
7889
7890 int main() {
7891 ldap_open()
7892 ; return 0; }
7893 EOF
7894 if { (eval echo configure:7895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7895   rm -rf conftest*
7896   eval "ac_cv_lib_$ac_lib_var=yes"
7897 else
7898   echo "configure: failed program was:" >&5
7899   cat conftest.$ac_ext >&5
7900   rm -rf conftest*
7901   eval "ac_cv_lib_$ac_lib_var=no"
7902 fi
7903 rm -f conftest*
7904 xe_check_libs=""
7905
7906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7907   echo "$ac_t""yes" 1>&6
7908   with_ldap_lber=yes
7909 else
7910   echo "$ac_t""no" 1>&6
7911 with_ldap_lber=no
7912 fi
7913
7914  }
7915   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7916 xe_msg_checking="for ldap_open in -lldap"
7917 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7918 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7919 echo "configure:7920: checking "$xe_msg_checking"" >&5
7920 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7921
7922 xe_check_libs=" -lldap -llber -lkrb"
7923 cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 /* Override any gcc2 internal prototype to avoid an error.  */
7927 /* We use char because int might match the return type of a gcc2
7928     builtin and then its argument prototype would still apply.  */
7929 char ldap_open();
7930
7931 int main() {
7932 ldap_open()
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7936   rm -rf conftest*
7937   eval "ac_cv_lib_$ac_lib_var=yes"
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   eval "ac_cv_lib_$ac_lib_var=no"
7943 fi
7944 rm -f conftest*
7945 xe_check_libs=""
7946
7947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7948   echo "$ac_t""yes" 1>&6
7949   with_ldap_krb=yes
7950 else
7951   echo "$ac_t""no" 1>&6
7952 with_ldap_krb=no
7953 fi
7954
7955  }
7956   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7957 xe_msg_checking="for ldap_open in -lldap"
7958 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7959 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7960 echo "configure:7961: checking "$xe_msg_checking"" >&5
7961 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7962
7963 xe_check_libs=" -lldap -llber -lkrb -ldes"
7964 cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 /* Override any gcc2 internal prototype to avoid an error.  */
7968 /* We use char because int might match the return type of a gcc2
7969     builtin and then its argument prototype would still apply.  */
7970 char ldap_open();
7971
7972 int main() {
7973 ldap_open()
7974 ; return 0; }
7975 EOF
7976 if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7977   rm -rf conftest*
7978   eval "ac_cv_lib_$ac_lib_var=yes"
7979 else
7980   echo "configure: failed program was:" >&5
7981   cat conftest.$ac_ext >&5
7982   rm -rf conftest*
7983   eval "ac_cv_lib_$ac_lib_var=no"
7984 fi
7985 rm -f conftest*
7986 xe_check_libs=""
7987
7988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7989   echo "$ac_t""yes" 1>&6
7990   with_ldap_krbdes=yes
7991 else
7992   echo "$ac_t""no" 1>&6
7993 with_ldap_krbdes=no
7994 fi
7995
7996  }
7997   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
7998 fi
7999 if test "$with_ldap" = "yes"; then
8000   { test "$extra_verbose" = "yes" && cat << \EOF
8001     Defining HAVE_LDAP
8002 EOF
8003 cat >> confdefs.h <<\EOF
8004 #define HAVE_LDAP 1
8005 EOF
8006 }
8007
8008   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8009    echo "    xemacs will be linked with \"eldap.o\""
8010  fi
8011   if test "$with_ldap_nolber" = "yes" ; then
8012     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8013   else
8014     if test "$with_ldap_krb" = "yes" ; then
8015       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8016     fi
8017     if test "$with_ldap_krbdes" = "yes" ; then
8018       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8019       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8020     fi
8021     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8022     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8023   fi
8024   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8025 do
8026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8027 echo "configure:8028: checking for $ac_func" >&5
8028
8029 cat > conftest.$ac_ext <<EOF
8030 #line 8031 "configure"
8031 #include "confdefs.h"
8032 /* System header to define __stub macros and hopefully few prototypes,
8033     which can conflict with char $ac_func(); below.  */
8034 #include <assert.h>
8035 /* Override any gcc2 internal prototype to avoid an error.  */
8036 /* We use char because int might match the return type of a gcc2
8037     builtin and then its argument prototype would still apply.  */
8038 char $ac_func();
8039
8040 int main() {
8041
8042 /* The GNU C library defines this for functions which it implements
8043     to always fail with ENOSYS.  Some functions are actually named
8044     something starting with __ and the normal name is an alias.  */
8045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8046 choke me
8047 #else
8048 $ac_func();
8049 #endif
8050
8051 ; return 0; }
8052 EOF
8053 if { (eval echo configure:8054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8054   rm -rf conftest*
8055   eval "ac_cv_func_$ac_func=yes"
8056 else
8057   echo "configure: failed program was:" >&5
8058   cat conftest.$ac_ext >&5
8059   rm -rf conftest*
8060   eval "ac_cv_func_$ac_func=no"
8061 fi
8062 rm -f conftest*
8063
8064 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8065   echo "$ac_t""yes" 1>&6
8066     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8067   { test "$extra_verbose" = "yes" && cat << EOF
8068     Defining $ac_tr_func
8069 EOF
8070 cat >> confdefs.h <<EOF
8071 #define $ac_tr_func 1
8072 EOF
8073 }
8074  
8075 else
8076   echo "$ac_t""no" 1>&6
8077 fi
8078 done
8079
8080 fi
8081
8082 if test "$with_postgresql" != "no"; then
8083   echo "checking for PostgreSQL" 1>&6
8084 echo "configure:8085: checking for PostgreSQL" >&5
8085
8086   for header_dir in "" "pgsql/" "postgresql/"; do
8087     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8088 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8089 echo "configure:8090: checking for ${header_dir}libpq-fe.h" >&5
8090
8091 cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094 #include <${header_dir}libpq-fe.h>
8095 EOF
8096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8097 { (eval echo configure:8098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8099 if test -z "$ac_err"; then
8100   rm -rf conftest*
8101   eval "ac_cv_header_$ac_safe=yes"
8102 else
8103   echo "$ac_err" >&5
8104   echo "configure: failed program was:" >&5
8105   cat conftest.$ac_ext >&5
8106   rm -rf conftest*
8107   eval "ac_cv_header_$ac_safe=no"
8108 fi
8109 rm -f conftest*
8110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8111   echo "$ac_t""yes" 1>&6
8112   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8113 else
8114   echo "$ac_t""no" 1>&6
8115 fi
8116
8117   done
8118
8119   test -n "$libpq_fe_h_file" && { 
8120 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8121 echo "configure:8122: checking for PQconnectdb in -lpq" >&5
8122 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8123
8124 xe_check_libs=" -lpq "
8125 cat > conftest.$ac_ext <<EOF
8126 #line 8127 "configure"
8127 #include "confdefs.h"
8128 /* Override any gcc2 internal prototype to avoid an error.  */
8129 /* We use char because int might match the return type of a gcc2
8130     builtin and then its argument prototype would still apply.  */
8131 char PQconnectdb();
8132
8133 int main() {
8134 PQconnectdb()
8135 ; return 0; }
8136 EOF
8137 if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8138   rm -rf conftest*
8139   eval "ac_cv_lib_$ac_lib_var=yes"
8140 else
8141   echo "configure: failed program was:" >&5
8142   cat conftest.$ac_ext >&5
8143   rm -rf conftest*
8144   eval "ac_cv_lib_$ac_lib_var=no"
8145 fi
8146 rm -f conftest*
8147 xe_check_libs=""
8148
8149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8150   echo "$ac_t""yes" 1>&6
8151   have_libpq=yes
8152 else
8153   echo "$ac_t""no" 1>&6
8154 fi
8155
8156  }
8157
8158   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8159     with_postgresql=yes
8160     { test "$extra_verbose" = "yes" && cat << \EOF
8161     Defining HAVE_POSTGRESQL
8162 EOF
8163 cat >> confdefs.h <<\EOF
8164 #define HAVE_POSTGRESQL 1
8165 EOF
8166 }
8167
8168     
8169 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8170 echo "configure:8171: checking for PQconnectStart in -lpq" >&5
8171 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8172
8173 xe_check_libs=" -lpq "
8174 cat > conftest.$ac_ext <<EOF
8175 #line 8176 "configure"
8176 #include "confdefs.h"
8177 /* Override any gcc2 internal prototype to avoid an error.  */
8178 /* We use char because int might match the return type of a gcc2
8179     builtin and then its argument prototype would still apply.  */
8180 char PQconnectStart();
8181
8182 int main() {
8183 PQconnectStart()
8184 ; return 0; }
8185 EOF
8186 if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8187   rm -rf conftest*
8188   eval "ac_cv_lib_$ac_lib_var=yes"
8189 else
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192   rm -rf conftest*
8193   eval "ac_cv_lib_$ac_lib_var=no"
8194 fi
8195 rm -f conftest*
8196 xe_check_libs=""
8197
8198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8199   echo "$ac_t""yes" 1>&6
8200   with_postgresqlv7=yes;
8201                  { test "$extra_verbose" = "yes" && cat << \EOF
8202     Defining HAVE_POSTGRESQLV7
8203 EOF
8204 cat >> confdefs.h <<\EOF
8205 #define HAVE_POSTGRESQLV7 1
8206 EOF
8207 }
8208
8209 else
8210   echo "$ac_t""no" 1>&6
8211 fi
8212
8213
8214     { test "$extra_verbose" = "yes" && cat << EOF
8215     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8216 EOF
8217 cat >> confdefs.h <<EOF
8218 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8219 EOF
8220 }
8221
8222     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8223     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8224    echo "    xemacs will be linked with \"postgresql.o\""
8225  fi
8226   elif test "$with_postgresql" = "yes"; then
8227     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8228   fi
8229 fi
8230
8231
8232 if test "$window_system" != "none"; then
8233   echo "checking for graphics libraries" 1>&6
8234 echo "configure:8235: checking for graphics libraries" >&5
8235
8236       libpath_xpm=
8237   incpath_xpm=
8238   case "$opsys" in 
8239     cygwin*)
8240       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8241       cygwin_top=`eval "dirname ${cygwin_top}"`;
8242       cygwin_top="${cygwin_top}/..";
8243       case "$window_system" in
8244                 x11)  ;;
8245                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8246              incpath_xpm="-I${cygwin_top}/include/noX"
8247               ;;
8248                 gtk)  ;;
8249                 none) ;;
8250                 *)    ;;
8251       esac
8252       ;;
8253         *) ;;
8254   esac
8255     xpm_problem=""
8256   if test -z "$with_xpm"; then
8257     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8258     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8259     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8260 echo "configure:8261: checking for Xpm - no older than 3.4f" >&5
8261     xe_check_libs=-lXpm
8262     cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265 #define XPM_NUMBERS
8266 #include <X11/xpm.h>
8267     int main(int c, char **v) {
8268     return c == 1 ? 0 :
8269       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8270       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8273 then
8274   ./conftest dummy_arg; xpm_status=$?;
8275       if test "$xpm_status" = "0"; then
8276         with_xpm=yes;
8277       else
8278         with_xpm=no;
8279         if test "$xpm_status" = "1"; then
8280           xpm_problem="Xpm library version and header file version don't match!"
8281         elif test "$xpm_status" = "2"; then
8282           xpm_problem="Xpm library version is too old!"
8283         else
8284           xpm_problem="Internal xpm detection logic error!"
8285         fi
8286         echo "
8287 *** WARNING *** $xpm_problem
8288   I'm not touching that with a 10-foot pole!
8289   If you really want to use the installed version of Xpm, rerun
8290   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8291     fi
8292 else
8293   conftest_rc="$?"
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -fr conftest*
8297   with_xpm=no
8298 fi
8299 rm -fr conftest*
8300     xe_check_libs=
8301     echo "$ac_t""$with_xpm" 1>&6
8302   fi
8303   if test "$with_xpm" = "yes"; then
8304                 { test "$extra_verbose" = "yes" && cat << \EOF
8305     Defining HAVE_XPM
8306 EOF
8307 cat >> confdefs.h <<\EOF
8308 #define HAVE_XPM 1
8309 EOF
8310 }
8311
8312     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8313     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8314     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8315     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8316 echo "configure:8317: checking for \"FOR_MSW\" xpm" >&5
8317     xe_check_libs=-lXpm
8318     cat > conftest.$ac_ext <<EOF
8319 #line 8320 "configure"
8320 #include "confdefs.h"
8321
8322 int main() {
8323 XpmCreatePixmapFromData()
8324 ; return 0; }
8325 EOF
8326 if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8327   rm -rf conftest*
8328   xpm_for_msw=no
8329 else
8330   echo "configure: failed program was:" >&5
8331   cat conftest.$ac_ext >&5
8332   rm -rf conftest*
8333   xpm_for_msw=yes
8334 fi
8335 rm -f conftest*
8336     xe_check_libs=
8337     echo "$ac_t""$xpm_for_msw" 1>&6
8338     if test "$xpm_for_msw" = "yes"; then
8339       { test "$extra_verbose" = "yes" && cat << \EOF
8340     Defining FOR_MSW
8341 EOF
8342 cat >> confdefs.h <<\EOF
8343 #define FOR_MSW 1
8344 EOF
8345 }
8346
8347     fi
8348   fi
8349
8350     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8351 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8352 echo "configure:8353: checking for compface.h" >&5
8353
8354 cat > conftest.$ac_ext <<EOF
8355 #line 8356 "configure"
8356 #include "confdefs.h"
8357 #include <compface.h>
8358 EOF
8359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8360 { (eval echo configure:8361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8362 if test -z "$ac_err"; then
8363   rm -rf conftest*
8364   eval "ac_cv_header_$ac_safe=yes"
8365 else
8366   echo "$ac_err" >&5
8367   echo "configure: failed program was:" >&5
8368   cat conftest.$ac_ext >&5
8369   rm -rf conftest*
8370   eval "ac_cv_header_$ac_safe=no"
8371 fi
8372 rm -f conftest*
8373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8374   echo "$ac_t""yes" 1>&6
8375   :
8376 else
8377   echo "$ac_t""no" 1>&6
8378 with_xface=no
8379 fi
8380  }
8381   test -z "$with_xface" && { 
8382 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8383 echo "configure:8384: checking for UnGenFace in -lcompface" >&5
8384 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8385
8386 xe_check_libs=" -lcompface "
8387 cat > conftest.$ac_ext <<EOF
8388 #line 8389 "configure"
8389 #include "confdefs.h"
8390 /* Override any gcc2 internal prototype to avoid an error.  */
8391 /* We use char because int might match the return type of a gcc2
8392     builtin and then its argument prototype would still apply.  */
8393 char UnGenFace();
8394
8395 int main() {
8396 UnGenFace()
8397 ; return 0; }
8398 EOF
8399 if { (eval echo configure:8400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8400   rm -rf conftest*
8401   eval "ac_cv_lib_$ac_lib_var=yes"
8402 else
8403   echo "configure: failed program was:" >&5
8404   cat conftest.$ac_ext >&5
8405   rm -rf conftest*
8406   eval "ac_cv_lib_$ac_lib_var=no"
8407 fi
8408 rm -f conftest*
8409 xe_check_libs=""
8410
8411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8412   echo "$ac_t""yes" 1>&6
8413   : 
8414 else
8415   echo "$ac_t""no" 1>&6
8416 with_xface=no
8417 fi
8418
8419  }
8420   test -z "$with_xface" && with_xface=yes
8421   if test "$with_xface" = "yes"; then
8422     { test "$extra_verbose" = "yes" && cat << \EOF
8423     Defining HAVE_XFACE
8424 EOF
8425 cat >> confdefs.h <<\EOF
8426 #define HAVE_XFACE 1
8427 EOF
8428 }
8429
8430     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8431   fi
8432
8433         if test "$with_gif" != "no"; then
8434     with_gif="yes"
8435     { test "$extra_verbose" = "yes" && cat << \EOF
8436     Defining HAVE_GIF
8437 EOF
8438 cat >> confdefs.h <<\EOF
8439 #define HAVE_GIF 1
8440 EOF
8441 }
8442
8443     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8444    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8445  fi
8446   fi
8447
8448       if test "$with_png $with_tiff" != "no no"; then
8449     
8450 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8451 echo "configure:8452: checking for inflate in -lc" >&5
8452 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8453
8454 xe_check_libs=" -lc "
8455 cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8458 /* Override any gcc2 internal prototype to avoid an error.  */
8459 /* We use char because int might match the return type of a gcc2
8460     builtin and then its argument prototype would still apply.  */
8461 char inflate();
8462
8463 int main() {
8464 inflate()
8465 ; return 0; }
8466 EOF
8467 if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8468   rm -rf conftest*
8469   eval "ac_cv_lib_$ac_lib_var=yes"
8470 else
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -rf conftest*
8474   eval "ac_cv_lib_$ac_lib_var=no"
8475 fi
8476 rm -f conftest*
8477 xe_check_libs=""
8478
8479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8480   echo "$ac_t""yes" 1>&6
8481   :
8482 else
8483   echo "$ac_t""no" 1>&6
8484
8485 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8486 echo "configure:8487: checking for inflate in -lz" >&5
8487 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8488
8489 xe_check_libs=" -lz "
8490 cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493 /* Override any gcc2 internal prototype to avoid an error.  */
8494 /* We use char because int might match the return type of a gcc2
8495     builtin and then its argument prototype would still apply.  */
8496 char inflate();
8497
8498 int main() {
8499 inflate()
8500 ; return 0; }
8501 EOF
8502 if { (eval echo configure:8503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8503   rm -rf conftest*
8504   eval "ac_cv_lib_$ac_lib_var=yes"
8505 else
8506   echo "configure: failed program was:" >&5
8507   cat conftest.$ac_ext >&5
8508   rm -rf conftest*
8509   eval "ac_cv_lib_$ac_lib_var=no"
8510 fi
8511 rm -f conftest*
8512 xe_check_libs=""
8513
8514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8515   echo "$ac_t""yes" 1>&6
8516   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8517 else
8518   echo "$ac_t""no" 1>&6
8519
8520 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8521 echo "configure:8522: checking for inflate in -lgz" >&5
8522 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8523
8524 xe_check_libs=" -lgz "
8525 cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8528 /* Override any gcc2 internal prototype to avoid an error.  */
8529 /* We use char because int might match the return type of a gcc2
8530     builtin and then its argument prototype would still apply.  */
8531 char inflate();
8532
8533 int main() {
8534 inflate()
8535 ; return 0; }
8536 EOF
8537 if { (eval echo configure:8538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8538   rm -rf conftest*
8539   eval "ac_cv_lib_$ac_lib_var=yes"
8540 else
8541   echo "configure: failed program was:" >&5
8542   cat conftest.$ac_ext >&5
8543   rm -rf conftest*
8544   eval "ac_cv_lib_$ac_lib_var=no"
8545 fi
8546 rm -f conftest*
8547 xe_check_libs=""
8548
8549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8550   echo "$ac_t""yes" 1>&6
8551   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8552 else
8553   echo "$ac_t""no" 1>&6
8554 fi
8555
8556
8557 fi
8558
8559
8560 fi
8561
8562
8563   fi
8564
8565     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8566 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8567 echo "configure:8568: checking for jpeglib.h" >&5
8568
8569 cat > conftest.$ac_ext <<EOF
8570 #line 8571 "configure"
8571 #include "confdefs.h"
8572 #include <jpeglib.h>
8573 EOF
8574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8575 { (eval echo configure:8576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8577 if test -z "$ac_err"; then
8578   rm -rf conftest*
8579   eval "ac_cv_header_$ac_safe=yes"
8580 else
8581   echo "$ac_err" >&5
8582   echo "configure: failed program was:" >&5
8583   cat conftest.$ac_ext >&5
8584   rm -rf conftest*
8585   eval "ac_cv_header_$ac_safe=no"
8586 fi
8587 rm -f conftest*
8588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8589   echo "$ac_t""yes" 1>&6
8590   :
8591 else
8592   echo "$ac_t""no" 1>&6
8593 with_jpeg=no
8594 fi
8595  }
8596   test -z "$with_jpeg" && { 
8597 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8598 echo "configure:8599: checking for jpeg_destroy_decompress in -ljpeg" >&5
8599 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8600
8601 xe_check_libs=" -ljpeg "
8602 cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 /* Override any gcc2 internal prototype to avoid an error.  */
8606 /* We use char because int might match the return type of a gcc2
8607     builtin and then its argument prototype would still apply.  */
8608 char jpeg_destroy_decompress();
8609
8610 int main() {
8611 jpeg_destroy_decompress()
8612 ; return 0; }
8613 EOF
8614 if { (eval echo configure:8615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8615   rm -rf conftest*
8616   eval "ac_cv_lib_$ac_lib_var=yes"
8617 else
8618   echo "configure: failed program was:" >&5
8619   cat conftest.$ac_ext >&5
8620   rm -rf conftest*
8621   eval "ac_cv_lib_$ac_lib_var=no"
8622 fi
8623 rm -f conftest*
8624 xe_check_libs=""
8625
8626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8627   echo "$ac_t""yes" 1>&6
8628   :
8629 else
8630   echo "$ac_t""no" 1>&6
8631 with_jpeg=no
8632 fi
8633
8634  }
8635   test -z "$with_jpeg" && with_jpeg=yes
8636   if test "$with_jpeg" = "yes"; then
8637     { test "$extra_verbose" = "yes" && cat << \EOF
8638     Defining HAVE_JPEG
8639 EOF
8640 cat >> confdefs.h <<\EOF
8641 #define HAVE_JPEG 1
8642 EOF
8643 }
8644
8645     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8646   fi
8647
8648     png_problem=""
8649   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8650 echo "configure:8651: checking for pow" >&5
8651
8652 cat > conftest.$ac_ext <<EOF
8653 #line 8654 "configure"
8654 #include "confdefs.h"
8655 /* System header to define __stub macros and hopefully few prototypes,
8656     which can conflict with char pow(); below.  */
8657 #include <assert.h>
8658 /* Override any gcc2 internal prototype to avoid an error.  */
8659 /* We use char because int might match the return type of a gcc2
8660     builtin and then its argument prototype would still apply.  */
8661 char pow();
8662
8663 int main() {
8664
8665 /* The GNU C library defines this for functions which it implements
8666     to always fail with ENOSYS.  Some functions are actually named
8667     something starting with __ and the normal name is an alias.  */
8668 #if defined (__stub_pow) || defined (__stub___pow)
8669 choke me
8670 #else
8671 pow();
8672 #endif
8673
8674 ; return 0; }
8675 EOF
8676 if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8677   rm -rf conftest*
8678   eval "ac_cv_func_pow=yes"
8679 else
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   eval "ac_cv_func_pow=no"
8684 fi
8685 rm -f conftest*
8686
8687 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8688   echo "$ac_t""yes" 1>&6
8689   :
8690 else
8691   echo "$ac_t""no" 1>&6
8692 with_png=no
8693 fi
8694  }
8695   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8696 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8697 echo "configure:8698: checking for png.h" >&5
8698
8699 cat > conftest.$ac_ext <<EOF
8700 #line 8701 "configure"
8701 #include "confdefs.h"
8702 #include <png.h>
8703 EOF
8704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8705 { (eval echo configure:8706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8707 if test -z "$ac_err"; then
8708   rm -rf conftest*
8709   eval "ac_cv_header_$ac_safe=yes"
8710 else
8711   echo "$ac_err" >&5
8712   echo "configure: failed program was:" >&5
8713   cat conftest.$ac_ext >&5
8714   rm -rf conftest*
8715   eval "ac_cv_header_$ac_safe=no"
8716 fi
8717 rm -f conftest*
8718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8719   echo "$ac_t""yes" 1>&6
8720   :
8721 else
8722   echo "$ac_t""no" 1>&6
8723 with_png=no
8724 fi
8725  }
8726   test -z "$with_png" && { 
8727 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8728 echo "configure:8729: checking for png_read_image in -lpng" >&5
8729 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8730
8731 xe_check_libs=" -lpng "
8732 cat > conftest.$ac_ext <<EOF
8733 #line 8734 "configure"
8734 #include "confdefs.h"
8735 /* Override any gcc2 internal prototype to avoid an error.  */
8736 /* We use char because int might match the return type of a gcc2
8737     builtin and then its argument prototype would still apply.  */
8738 char png_read_image();
8739
8740 int main() {
8741 png_read_image()
8742 ; return 0; }
8743 EOF
8744 if { (eval echo configure:8745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8745   rm -rf conftest*
8746   eval "ac_cv_lib_$ac_lib_var=yes"
8747 else
8748   echo "configure: failed program was:" >&5
8749   cat conftest.$ac_ext >&5
8750   rm -rf conftest*
8751   eval "ac_cv_lib_$ac_lib_var=no"
8752 fi
8753 rm -f conftest*
8754 xe_check_libs=""
8755
8756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8757   echo "$ac_t""yes" 1>&6
8758   :
8759 else
8760   echo "$ac_t""no" 1>&6
8761 with_png=no
8762 fi
8763
8764  }
8765   if test -z "$with_png"; then
8766     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8767 echo "configure:8768: checking for workable png version information" >&5
8768     xe_check_libs="-lpng -lz"
8769     cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772 #include <png.h>
8773     int main(int c, char **v) {
8774     if (c == 1) return 0;
8775     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8776     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8777 EOF
8778 if { (eval echo configure:8779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8779 then
8780   ./conftest dummy_arg; png_status=$?;
8781       if test "$png_status" = "0"; then
8782         with_png=yes;
8783       else
8784         with_png=no;
8785         if test "$png_status" = "1"; then
8786           png_problem="PNG library version and header file don't match!"
8787         elif test "$png_status" = "2"; then
8788           png_problem="PNG library version too old (pre 1.0.2)!"
8789         fi
8790         echo "
8791 *** WARNING *** $png_problem
8792   I'm not touching that with a 10-foot pole!
8793   If you really want to use the installed version of libPNG, rerun
8794   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8795     fi
8796 else
8797   conftest_rc="$?"
8798   echo "configure: failed program was:" >&5
8799   cat conftest.$ac_ext >&5
8800   rm -fr conftest*
8801   with_png=no
8802 fi
8803 rm -fr conftest*
8804     xe_check_libs=
8805     echo "$ac_t""$with_png" 1>&6
8806   fi
8807   if test "$with_png" = "yes"; then
8808     { test "$extra_verbose" = "yes" && cat << \EOF
8809     Defining HAVE_PNG
8810 EOF
8811 cat >> confdefs.h <<\EOF
8812 #define HAVE_PNG 1
8813 EOF
8814 }
8815
8816     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8817   fi
8818
8819     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8820 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8821 echo "configure:8822: checking for tiffio.h" >&5
8822
8823 cat > conftest.$ac_ext <<EOF
8824 #line 8825 "configure"
8825 #include "confdefs.h"
8826 #include <tiffio.h>
8827 EOF
8828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8829 { (eval echo configure:8830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8831 if test -z "$ac_err"; then
8832   rm -rf conftest*
8833   eval "ac_cv_header_$ac_safe=yes"
8834 else
8835   echo "$ac_err" >&5
8836   echo "configure: failed program was:" >&5
8837   cat conftest.$ac_ext >&5
8838   rm -rf conftest*
8839   eval "ac_cv_header_$ac_safe=no"
8840 fi
8841 rm -f conftest*
8842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8843   echo "$ac_t""yes" 1>&6
8844   :
8845 else
8846   echo "$ac_t""no" 1>&6
8847 with_tiff=no
8848 fi
8849  }
8850   test -z "$with_tiff" && { 
8851 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8852 echo "configure:8853: checking for TIFFClientOpen in -ltiff" >&5
8853 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8854
8855 xe_check_libs=" -ltiff "
8856 cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* Override any gcc2 internal prototype to avoid an error.  */
8860 /* We use char because int might match the return type of a gcc2
8861     builtin and then its argument prototype would still apply.  */
8862 char TIFFClientOpen();
8863
8864 int main() {
8865 TIFFClientOpen()
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8869   rm -rf conftest*
8870   eval "ac_cv_lib_$ac_lib_var=yes"
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_lib_$ac_lib_var=no"
8876 fi
8877 rm -f conftest*
8878 xe_check_libs=""
8879
8880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8881   echo "$ac_t""yes" 1>&6
8882   :
8883 else
8884   echo "$ac_t""no" 1>&6
8885 with_tiff=no
8886 fi
8887
8888  }
8889   test -z "$with_tiff" && with_tiff=yes
8890   if test "$with_tiff" = "yes"; then
8891     { test "$extra_verbose" = "yes" && cat << \EOF
8892     Defining HAVE_TIFF
8893 EOF
8894 cat >> confdefs.h <<\EOF
8895 #define HAVE_TIFF 1
8896 EOF
8897 }
8898
8899     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8900   fi
8901 fi
8902
8903
8904 if test "$with_gtk" = "yes"; then
8905     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8906 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8907 echo "configure:8908: checking for compface.h" >&5
8908
8909 cat > conftest.$ac_ext <<EOF
8910 #line 8911 "configure"
8911 #include "confdefs.h"
8912 #include <compface.h>
8913 EOF
8914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8915 { (eval echo configure:8916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8917 if test -z "$ac_err"; then
8918   rm -rf conftest*
8919   eval "ac_cv_header_$ac_safe=yes"
8920 else
8921   echo "$ac_err" >&5
8922   echo "configure: failed program was:" >&5
8923   cat conftest.$ac_ext >&5
8924   rm -rf conftest*
8925   eval "ac_cv_header_$ac_safe=no"
8926 fi
8927 rm -f conftest*
8928 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8929   echo "$ac_t""yes" 1>&6
8930   :
8931 else
8932   echo "$ac_t""no" 1>&6
8933 with_xface=no
8934 fi
8935  }
8936   test -z "$with_xface" && { 
8937 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8938 echo "configure:8939: checking for UnGenFace in -lcompface" >&5
8939 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8940
8941 xe_check_libs=" -lcompface "
8942 cat > conftest.$ac_ext <<EOF
8943 #line 8944 "configure"
8944 #include "confdefs.h"
8945 /* Override any gcc2 internal prototype to avoid an error.  */
8946 /* We use char because int might match the return type of a gcc2
8947     builtin and then its argument prototype would still apply.  */
8948 char UnGenFace();
8949
8950 int main() {
8951 UnGenFace()
8952 ; return 0; }
8953 EOF
8954 if { (eval echo configure:8955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8955   rm -rf conftest*
8956   eval "ac_cv_lib_$ac_lib_var=yes"
8957 else
8958   echo "configure: failed program was:" >&5
8959   cat conftest.$ac_ext >&5
8960   rm -rf conftest*
8961   eval "ac_cv_lib_$ac_lib_var=no"
8962 fi
8963 rm -f conftest*
8964 xe_check_libs=""
8965
8966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8967   echo "$ac_t""yes" 1>&6
8968   : 
8969 else
8970   echo "$ac_t""no" 1>&6
8971 with_xface=no
8972 fi
8973
8974  }
8975   test -z "$with_xface" && with_xface=yes
8976   if test "$with_xface" = "yes"; then
8977     { test "$extra_verbose" = "yes" && cat << \EOF
8978     Defining HAVE_XFACE
8979 EOF
8980 cat >> confdefs.h <<\EOF
8981 #define HAVE_XFACE 1
8982 EOF
8983 }
8984
8985     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8986   fi
8987 fi
8988
8989
8990
8991 if test "$with_x11" = "yes"; then
8992   echo "checking for X11 graphics libraries" 1>&6
8993 echo "configure:8994: checking for X11 graphics libraries" >&5
8994 fi
8995
8996 if test "$with_x11" = "yes"; then
8997   echo "checking for the Athena widgets" 1>&6
8998 echo "configure:8999: checking for the Athena widgets" >&5
8999
9000     case "$with_athena" in
9001         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9002     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9003     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9004     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9005     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9006     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9007   esac
9008
9009   athena_3d_function=Xaw3dComputeBottomShadowRGB
9010
9011     if test "$athena_3d" = "no"; then
9012     
9013 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9014 echo "configure:9015: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9015 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9016
9017 xe_check_libs=" -l$athena_variant "
9018 cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 /* Override any gcc2 internal prototype to avoid an error.  */
9022 /* We use char because int might match the return type of a gcc2
9023     builtin and then its argument prototype would still apply.  */
9024 char XawScrollbarSetThumb();
9025
9026 int main() {
9027 XawScrollbarSetThumb()
9028 ; return 0; }
9029 EOF
9030 if { (eval echo configure:9031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9031   rm -rf conftest*
9032   eval "ac_cv_lib_$ac_lib_var=yes"
9033 else
9034   echo "configure: failed program was:" >&5
9035   cat conftest.$ac_ext >&5
9036   rm -rf conftest*
9037   eval "ac_cv_lib_$ac_lib_var=no"
9038 fi
9039 rm -f conftest*
9040 xe_check_libs=""
9041
9042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9043   echo "$ac_t""yes" 1>&6
9044           
9045 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9046 echo "configure:9047: checking for $athena_3d_function in -l$athena_variant" >&5
9047 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9048
9049 xe_check_libs=" -l$athena_variant "
9050 cat > conftest.$ac_ext <<EOF
9051 #line 9052 "configure"
9052 #include "confdefs.h"
9053 /* Override any gcc2 internal prototype to avoid an error.  */
9054 /* We use char because int might match the return type of a gcc2
9055     builtin and then its argument prototype would still apply.  */
9056 char $athena_3d_function();
9057
9058 int main() {
9059 $athena_3d_function()
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063   rm -rf conftest*
9064   eval "ac_cv_lib_$ac_lib_var=yes"
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   eval "ac_cv_lib_$ac_lib_var=no"
9070 fi
9071 rm -f conftest*
9072 xe_check_libs=""
9073
9074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9075   echo "$ac_t""yes" 1>&6
9076   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9077 else
9078   echo "$ac_t""no" 1>&6
9079 athena_lib=$athena_variant
9080 fi
9081
9082
9083       
9084 else
9085   echo "$ac_t""no" 1>&6
9086 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9087 fi
9088
9089
9090   else
9091         
9092 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9093 echo "configure:9094: checking for $athena_3d_function in -l$athena_variant" >&5
9094 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9095
9096 xe_check_libs=" -l$athena_variant "
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 /* Override any gcc2 internal prototype to avoid an error.  */
9101 /* We use char because int might match the return type of a gcc2
9102     builtin and then its argument prototype would still apply.  */
9103 char $athena_3d_function();
9104
9105 int main() {
9106 $athena_3d_function()
9107 ; return 0; }
9108 EOF
9109 if { (eval echo configure:9110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9110   rm -rf conftest*
9111   eval "ac_cv_lib_$ac_lib_var=yes"
9112 else
9113   echo "configure: failed program was:" >&5
9114   cat conftest.$ac_ext >&5
9115   rm -rf conftest*
9116   eval "ac_cv_lib_$ac_lib_var=no"
9117 fi
9118 rm -f conftest*
9119 xe_check_libs=""
9120
9121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9122   echo "$ac_t""yes" 1>&6
9123   athena_lib=$athena_variant
9124 else
9125   echo "$ac_t""no" 1>&6
9126 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9127 echo "configure:9128: checking for $athena_3d_function in -lXaw" >&5
9128 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9129
9130 xe_check_libs=" -lXaw "
9131 cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134 /* Override any gcc2 internal prototype to avoid an error.  */
9135 /* We use char because int might match the return type of a gcc2
9136     builtin and then its argument prototype would still apply.  */
9137 char $athena_3d_function();
9138
9139 int main() {
9140 $athena_3d_function()
9141 ; return 0; }
9142 EOF
9143 if { (eval echo configure:9144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9144   rm -rf conftest*
9145   eval "ac_cv_lib_$ac_lib_var=yes"
9146 else
9147   echo "configure: failed program was:" >&5
9148   cat conftest.$ac_ext >&5
9149   rm -rf conftest*
9150   eval "ac_cv_lib_$ac_lib_var=no"
9151 fi
9152 rm -f conftest*
9153 xe_check_libs=""
9154
9155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9156   echo "$ac_t""yes" 1>&6
9157   athena_lib=Xaw;
9158           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9159         
9160 else
9161   echo "$ac_t""no" 1>&6
9162 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9163 fi
9164
9165
9166 fi
9167
9168
9169   fi
9170
9171     if test "$athena_3d" = "no"; then
9172     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9173 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9174 echo "configure:9175: checking for X11/Xaw/ThreeD.h" >&5
9175
9176 cat > conftest.$ac_ext <<EOF
9177 #line 9178 "configure"
9178 #include "confdefs.h"
9179 #include <X11/Xaw/ThreeD.h>
9180 EOF
9181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9182 { (eval echo configure:9183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9184 if test -z "$ac_err"; then
9185   rm -rf conftest*
9186   eval "ac_cv_header_$ac_safe=yes"
9187 else
9188   echo "$ac_err" >&5
9189   echo "configure: failed program was:" >&5
9190   cat conftest.$ac_ext >&5
9191   rm -rf conftest*
9192   eval "ac_cv_header_$ac_safe=no"
9193 fi
9194 rm -f conftest*
9195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9196   echo "$ac_t""yes" 1>&6
9197   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9198 else
9199   echo "$ac_t""no" 1>&6
9200 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9201 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9202 echo "configure:9203: checking for X11/Xaw/XawInit.h" >&5
9203
9204 cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207 #include <X11/Xaw/XawInit.h>
9208 EOF
9209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9210 { (eval echo configure:9211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9212 if test -z "$ac_err"; then
9213   rm -rf conftest*
9214   eval "ac_cv_header_$ac_safe=yes"
9215 else
9216   echo "$ac_err" >&5
9217   echo "configure: failed program was:" >&5
9218   cat conftest.$ac_ext >&5
9219   rm -rf conftest*
9220   eval "ac_cv_header_$ac_safe=no"
9221 fi
9222 rm -f conftest*
9223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9224   echo "$ac_t""yes" 1>&6
9225   athena_h_path=X11/Xaw
9226 else
9227   echo "$ac_t""no" 1>&6
9228 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9229 fi
9230
9231 fi
9232
9233   else
9234             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9235 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9236 echo "configure:9237: checking for X11/$athena_variant/XawInit.h" >&5
9237
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241 #include <X11/$athena_variant/XawInit.h>
9242 EOF
9243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9244 { (eval echo configure:9245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9246 if test -z "$ac_err"; then
9247   rm -rf conftest*
9248   eval "ac_cv_header_$ac_safe=yes"
9249 else
9250   echo "$ac_err" >&5
9251   echo "configure: failed program was:" >&5
9252   cat conftest.$ac_ext >&5
9253   rm -rf conftest*
9254   eval "ac_cv_header_$ac_safe=no"
9255 fi
9256 rm -f conftest*
9257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9258   echo "$ac_t""yes" 1>&6
9259   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9260 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9261 echo "configure:9262: checking for X11/$athena_variant/ThreeD.h" >&5
9262
9263 cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 #include <X11/$athena_variant/ThreeD.h>
9267 EOF
9268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9269 { (eval echo configure:9270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9271 if test -z "$ac_err"; then
9272   rm -rf conftest*
9273   eval "ac_cv_header_$ac_safe=yes"
9274 else
9275   echo "$ac_err" >&5
9276   echo "configure: failed program was:" >&5
9277   cat conftest.$ac_ext >&5
9278   rm -rf conftest*
9279   eval "ac_cv_header_$ac_safe=no"
9280 fi
9281 rm -f conftest*
9282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9283   echo "$ac_t""yes" 1>&6
9284   athena_h_path=X11/$athena_variant
9285 else
9286   echo "$ac_t""no" 1>&6
9287 fi
9288
9289 else
9290   echo "$ac_t""no" 1>&6
9291 fi
9292
9293
9294         if test -z "$athena_h_path"; then
9295       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9296 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9297 echo "configure:9298: checking for $athena_variant/XawInit.h" >&5
9298
9299 cat > conftest.$ac_ext <<EOF
9300 #line 9301 "configure"
9301 #include "confdefs.h"
9302 #include <$athena_variant/XawInit.h>
9303 EOF
9304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9305 { (eval echo configure:9306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9307 if test -z "$ac_err"; then
9308   rm -rf conftest*
9309   eval "ac_cv_header_$ac_safe=yes"
9310 else
9311   echo "$ac_err" >&5
9312   echo "configure: failed program was:" >&5
9313   cat conftest.$ac_ext >&5
9314   rm -rf conftest*
9315   eval "ac_cv_header_$ac_safe=no"
9316 fi
9317 rm -f conftest*
9318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9319   echo "$ac_t""yes" 1>&6
9320   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9321 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9322 echo "configure:9323: checking for $athena_variant/ThreeD.h" >&5
9323
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 #include <$athena_variant/ThreeD.h>
9328 EOF
9329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9330 { (eval echo configure:9331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9332 if test -z "$ac_err"; then
9333   rm -rf conftest*
9334   eval "ac_cv_header_$ac_safe=yes"
9335 else
9336   echo "$ac_err" >&5
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -rf conftest*
9340   eval "ac_cv_header_$ac_safe=no"
9341 fi
9342 rm -f conftest*
9343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9344   echo "$ac_t""yes" 1>&6
9345   athena_h_path=$athena_variant
9346 else
9347   echo "$ac_t""no" 1>&6
9348 fi
9349
9350 else
9351   echo "$ac_t""no" 1>&6
9352 fi
9353
9354     fi
9355
9356         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9357       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9358 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9359 echo "configure:9360: checking for X11/Xaw3d/XawInit.h" >&5
9360
9361 cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364 #include <X11/Xaw3d/XawInit.h>
9365 EOF
9366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9367 { (eval echo configure:9368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9369 if test -z "$ac_err"; then
9370   rm -rf conftest*
9371   eval "ac_cv_header_$ac_safe=yes"
9372 else
9373   echo "$ac_err" >&5
9374   echo "configure: failed program was:" >&5
9375   cat conftest.$ac_ext >&5
9376   rm -rf conftest*
9377   eval "ac_cv_header_$ac_safe=no"
9378 fi
9379 rm -f conftest*
9380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9381   echo "$ac_t""yes" 1>&6
9382   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9383 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9384 echo "configure:9385: checking for X11/Xaw3d/ThreeD.h" >&5
9385
9386 cat > conftest.$ac_ext <<EOF
9387 #line 9388 "configure"
9388 #include "confdefs.h"
9389 #include <X11/Xaw3d/ThreeD.h>
9390 EOF
9391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9392 { (eval echo configure:9393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9394 if test -z "$ac_err"; then
9395   rm -rf conftest*
9396   eval "ac_cv_header_$ac_safe=yes"
9397 else
9398   echo "$ac_err" >&5
9399   echo "configure: failed program was:" >&5
9400   cat conftest.$ac_ext >&5
9401   rm -rf conftest*
9402   eval "ac_cv_header_$ac_safe=no"
9403 fi
9404 rm -f conftest*
9405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9406   echo "$ac_t""yes" 1>&6
9407   
9408             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9409             athena_h_path=X11/Xaw3d
9410           
9411 else
9412   echo "$ac_t""no" 1>&6
9413 fi
9414
9415 else
9416   echo "$ac_t""no" 1>&6
9417 fi
9418
9419     fi
9420
9421         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9422       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9423 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9424 echo "configure:9425: checking for Xaw3d/XawInit.h" >&5
9425
9426 cat > conftest.$ac_ext <<EOF
9427 #line 9428 "configure"
9428 #include "confdefs.h"
9429 #include <Xaw3d/XawInit.h>
9430 EOF
9431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9432 { (eval echo configure:9433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9434 if test -z "$ac_err"; then
9435   rm -rf conftest*
9436   eval "ac_cv_header_$ac_safe=yes"
9437 else
9438   echo "$ac_err" >&5
9439   echo "configure: failed program was:" >&5
9440   cat conftest.$ac_ext >&5
9441   rm -rf conftest*
9442   eval "ac_cv_header_$ac_safe=no"
9443 fi
9444 rm -f conftest*
9445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9446   echo "$ac_t""yes" 1>&6
9447   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9448 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9449 echo "configure:9450: checking for Xaw3d/ThreeD.h" >&5
9450
9451 cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454 #include <Xaw3d/ThreeD.h>
9455 EOF
9456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9457 { (eval echo configure:9458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9459 if test -z "$ac_err"; then
9460   rm -rf conftest*
9461   eval "ac_cv_header_$ac_safe=yes"
9462 else
9463   echo "$ac_err" >&5
9464   echo "configure: failed program was:" >&5
9465   cat conftest.$ac_ext >&5
9466   rm -rf conftest*
9467   eval "ac_cv_header_$ac_safe=no"
9468 fi
9469 rm -f conftest*
9470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9471   echo "$ac_t""yes" 1>&6
9472   
9473             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9474             athena_h_path=Xaw3d
9475           
9476 else
9477   echo "$ac_t""no" 1>&6
9478 fi
9479
9480 else
9481   echo "$ac_t""no" 1>&6
9482 fi
9483
9484     fi
9485
9486             if test -z "$athena_h_path"; then
9487       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9488 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9489 echo "configure:9490: checking for X11/Xaw/ThreeD.h" >&5
9490
9491 cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 #include <X11/Xaw/ThreeD.h>
9495 EOF
9496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9497 { (eval echo configure:9498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9499 if test -z "$ac_err"; then
9500   rm -rf conftest*
9501   eval "ac_cv_header_$ac_safe=yes"
9502 else
9503   echo "$ac_err" >&5
9504   echo "configure: failed program was:" >&5
9505   cat conftest.$ac_ext >&5
9506   rm -rf conftest*
9507   eval "ac_cv_header_$ac_safe=no"
9508 fi
9509 rm -f conftest*
9510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9511   echo "$ac_t""yes" 1>&6
9512   
9513           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9514           athena_h_path=X11/Xaw
9515         
9516 else
9517   echo "$ac_t""no" 1>&6
9518 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9519 fi
9520
9521     fi
9522   fi
9523
9524     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9525     have_xaw=yes
9526   else
9527     have_xaw=no
9528   fi
9529
9530 else
9531   have_xaw=no
9532 fi 
9533 if test "$with_x11" = "yes"; then
9534     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9535 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9536 echo "configure:9537: checking for Xm/Xm.h" >&5
9537
9538 cat > conftest.$ac_ext <<EOF
9539 #line 9540 "configure"
9540 #include "confdefs.h"
9541 #include <Xm/Xm.h>
9542 EOF
9543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9544 { (eval echo configure:9545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9546 if test -z "$ac_err"; then
9547   rm -rf conftest*
9548   eval "ac_cv_header_$ac_safe=yes"
9549 else
9550   echo "$ac_err" >&5
9551   echo "configure: failed program was:" >&5
9552   cat conftest.$ac_ext >&5
9553   rm -rf conftest*
9554   eval "ac_cv_header_$ac_safe=no"
9555 fi
9556 rm -f conftest*
9557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9558   echo "$ac_t""yes" 1>&6
9559   
9560 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9561 echo "configure:9562: checking for XmStringFree in -lXm" >&5
9562 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9563
9564 xe_check_libs=" -lXm "
9565 cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 /* Override any gcc2 internal prototype to avoid an error.  */
9569 /* We use char because int might match the return type of a gcc2
9570     builtin and then its argument prototype would still apply.  */
9571 char XmStringFree();
9572
9573 int main() {
9574 XmStringFree()
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   eval "ac_cv_lib_$ac_lib_var=yes"
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   eval "ac_cv_lib_$ac_lib_var=no"
9585 fi
9586 rm -f conftest*
9587 xe_check_libs=""
9588
9589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9590   echo "$ac_t""yes" 1>&6
9591   have_motif=yes
9592 else
9593   echo "$ac_t""no" 1>&6
9594 have_motif=no
9595 fi
9596
9597
9598 else
9599   echo "$ac_t""no" 1>&6
9600 have_motif=no
9601 fi
9602
9603
9604   if test "$have_motif" = "yes"; then
9605         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9606 echo "configure:9607: checking for Lesstif" >&5
9607     cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 #include <Xm/Xm.h>
9611 #ifdef LESSTIF_VERSION
9612 yes
9613 #endif
9614
9615 EOF
9616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9617   egrep "yes" >/dev/null 2>&1; then
9618   rm -rf conftest*
9619   have_lesstif=yes
9620 else
9621   rm -rf conftest*
9622   have_lesstif=no
9623 fi
9624 rm -f conftest*
9625
9626   echo "$ac_t""$have_lesstif" 1>&6
9627   fi
9628
9629 fi 
9630
9631 case "$opsys" in
9632   *linux* )  lucid_prefers_motif = "no"  ;;
9633   * )        lucid_prefers_motif = "yes" ;;
9634 esac
9635
9636 case "$with_menubars" in "" | "yes" | "athena" )
9637   with_menubars="lucid" ;;
9638 esac
9639 case "$with_dialogs" in "" | "yes" | "lucid" )
9640   if test "$lucid_prefers_motif" = "yes"; then
9641     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9642     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9643     else with_dialogs=no
9644     fi
9645   else
9646     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9647     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9648     else with_dialogs=no
9649     fi
9650   fi ;;
9651 esac
9652 case "$with_scrollbars" in "" | "yes" )
9653   with_scrollbars="lucid" ;;
9654 esac
9655 case "$with_widgets" in
9656   "yes" | "lucid")
9657     if test "$lucid_prefers_motif" = "yes"; then
9658       if   test "$have_motif" = "yes"; then with_widgets="motif"
9659       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9660       else with_widgets=no
9661       fi
9662     else
9663       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9664       elif test "$have_motif" = "yes"; then with_widgets="motif"
9665       else with_widgets=no
9666       fi
9667     fi ;;
9668   "" )
9669     with_widgets=no ;;
9670 esac
9671
9672 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9673
9674 case "$all_widgets" in
9675   *athena* )
9676     if test "$have_xaw" != "yes"; then
9677       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9678     fi
9679
9680         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9681
9682         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9683
9684                     { test "$extra_verbose" = "yes" && cat << EOF
9685     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9686 EOF
9687 cat >> confdefs.h <<EOF
9688 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9689 EOF
9690 }
9691
9692     { test "$extra_verbose" = "yes" && cat << EOF
9693     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9694 EOF
9695 cat >> confdefs.h <<EOF
9696 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9697 EOF
9698 }
9699
9700     { test "$extra_verbose" = "yes" && cat << EOF
9701     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9702 EOF
9703 cat >> confdefs.h <<EOF
9704 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9705 EOF
9706 }
9707
9708     { test "$extra_verbose" = "yes" && cat << EOF
9709     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9710 EOF
9711 cat >> confdefs.h <<EOF
9712 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9713 EOF
9714 }
9715
9716     { test "$extra_verbose" = "yes" && cat << EOF
9717     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9718 EOF
9719 cat >> confdefs.h <<EOF
9720 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9721 EOF
9722 }
9723
9724     { test "$extra_verbose" = "yes" && cat << EOF
9725     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9726 EOF
9727 cat >> confdefs.h <<EOF
9728 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9729 EOF
9730 }
9731
9732     { test "$extra_verbose" = "yes" && cat << EOF
9733     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9734 EOF
9735 cat >> confdefs.h <<EOF
9736 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9737 EOF
9738 }
9739
9740     { test "$extra_verbose" = "yes" && cat << EOF
9741     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9742 EOF
9743 cat >> confdefs.h <<EOF
9744 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9745 EOF
9746 }
9747
9748     { test "$extra_verbose" = "yes" && cat << EOF
9749     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9750 EOF
9751 cat >> confdefs.h <<EOF
9752 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9753 EOF
9754 }
9755
9756     { test "$extra_verbose" = "yes" && cat << EOF
9757     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9758 EOF
9759 cat >> confdefs.h <<EOF
9760 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9761 EOF
9762 }
9763
9764
9765     { test "$extra_verbose" = "yes" && cat << \EOF
9766     Defining LWLIB_USES_ATHENA
9767 EOF
9768 cat >> confdefs.h <<\EOF
9769 #define LWLIB_USES_ATHENA 1
9770 EOF
9771 }
9772
9773     { test "$extra_verbose" = "yes" && cat << \EOF
9774     Defining NEED_ATHENA
9775 EOF
9776 cat >> confdefs.h <<\EOF
9777 #define NEED_ATHENA 1
9778 EOF
9779 }
9780
9781     need_athena="yes"
9782
9783     if test "$athena_3d" = "yes"; then
9784       { test "$extra_verbose" = "yes" && cat << \EOF
9785     Defining HAVE_ATHENA_3D
9786 EOF
9787 cat >> confdefs.h <<\EOF
9788 #define HAVE_ATHENA_3D 1
9789 EOF
9790 }
9791
9792     fi
9793   ;;
9794 esac
9795
9796 case "$all_widgets" in *motif* )
9797   { test "$extra_verbose" = "yes" && cat << \EOF
9798     Defining LWLIB_USES_MOTIF
9799 EOF
9800 cat >> confdefs.h <<\EOF
9801 #define LWLIB_USES_MOTIF 1
9802 EOF
9803 }
9804
9805   { test "$extra_verbose" = "yes" && cat << \EOF
9806     Defining NEED_MOTIF
9807 EOF
9808 cat >> confdefs.h <<\EOF
9809 #define NEED_MOTIF 1
9810 EOF
9811 }
9812
9813   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9814   need_motif=yes ;;
9815 esac
9816
9817 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9818 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9819 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9820 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9821         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9822 case "$with_widgets" in athena* )
9823         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;;
9824 esac
9825 case "$all_widgets" in *lucid* )
9826   { test "$extra_verbose" = "yes" && cat << \EOF
9827     Defining NEED_LUCID
9828 EOF
9829 cat >> confdefs.h <<\EOF
9830 #define NEED_LUCID 1
9831 EOF
9832 }
9833
9834   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9835 esac
9836
9837
9838
9839 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9840     Defining LWLIB_SCROLLBARS_ATHENA
9841 EOF
9842 cat >> confdefs.h <<\EOF
9843 #define LWLIB_SCROLLBARS_ATHENA 1
9844 EOF
9845 }
9846
9847 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9848     Defining LWLIB_DIALOGS_ATHENA
9849 EOF
9850 cat >> confdefs.h <<\EOF
9851 #define LWLIB_DIALOGS_ATHENA 1
9852 EOF
9853 }
9854
9855
9856 if test "$athena_3d" = "yes"; then
9857   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9858     Defining LWLIB_SCROLLBARS_ATHENA3D
9859 EOF
9860 cat >> confdefs.h <<\EOF
9861 #define LWLIB_SCROLLBARS_ATHENA3D 1
9862 EOF
9863 }
9864
9865   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9866     Defining LWLIB_DIALOGS_ATHENA3D
9867 EOF
9868 cat >> confdefs.h <<\EOF
9869 #define LWLIB_DIALOGS_ATHENA3D 1
9870 EOF
9871 }
9872
9873 fi
9874
9875 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9876     Defining LWLIB_WIDGETS_ATHENA
9877 EOF
9878 cat >> confdefs.h <<\EOF
9879 #define LWLIB_WIDGETS_ATHENA 1
9880 EOF
9881 }
9882 ;; esac
9883 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9884         { test "$extra_verbose" = "yes" && cat << \EOF
9885     Defining LWLIB_TABS_LUCID
9886 EOF
9887 cat >> confdefs.h <<\EOF
9888 #define LWLIB_TABS_LUCID 1
9889 EOF
9890 }
9891
9892
9893 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9894     Defining HAVE_MENUBARS
9895 EOF
9896 cat >> confdefs.h <<\EOF
9897 #define HAVE_MENUBARS 1
9898 EOF
9899 }
9900
9901 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9902     Defining HAVE_SCROLLBARS
9903 EOF
9904 cat >> confdefs.h <<\EOF
9905 #define HAVE_SCROLLBARS 1
9906 EOF
9907 }
9908
9909 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9910     Defining HAVE_DIALOGS
9911 EOF
9912 cat >> confdefs.h <<\EOF
9913 #define HAVE_DIALOGS 1
9914 EOF
9915 }
9916
9917 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9918     Defining HAVE_TOOLBARS
9919 EOF
9920 cat >> confdefs.h <<\EOF
9921 #define HAVE_TOOLBARS 1
9922 EOF
9923 }
9924
9925 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9926     Defining HAVE_WIDGETS
9927 EOF
9928 cat >> confdefs.h <<\EOF
9929 #define HAVE_WIDGETS 1
9930 EOF
9931 }
9932
9933
9934 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9935     Defining LWLIB_MENUBARS_LUCID
9936 EOF
9937 cat >> confdefs.h <<\EOF
9938 #define LWLIB_MENUBARS_LUCID 1
9939 EOF
9940 }
9941
9942 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9943     Defining LWLIB_SCROLLBARS_LUCID
9944 EOF
9945 cat >> confdefs.h <<\EOF
9946 #define LWLIB_SCROLLBARS_LUCID 1
9947 EOF
9948 }
9949
9950
9951 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9952     Defining LWLIB_MENUBARS_MOTIF
9953 EOF
9954 cat >> confdefs.h <<\EOF
9955 #define LWLIB_MENUBARS_MOTIF 1
9956 EOF
9957 }
9958
9959 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9960     Defining LWLIB_SCROLLBARS_MOTIF
9961 EOF
9962 cat >> confdefs.h <<\EOF
9963 #define LWLIB_SCROLLBARS_MOTIF 1
9964 EOF
9965 }
9966
9967 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9968     Defining LWLIB_DIALOGS_MOTIF
9969 EOF
9970 cat >> confdefs.h <<\EOF
9971 #define LWLIB_DIALOGS_MOTIF 1
9972 EOF
9973 }
9974
9975 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9976     Defining LWLIB_WIDGETS_MOTIF
9977 EOF
9978 cat >> confdefs.h <<\EOF
9979 #define LWLIB_WIDGETS_MOTIF 1
9980 EOF
9981 }
9982
9983
9984 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9985    echo "    xemacs will be linked with \"menubar.o\""
9986  fi
9987 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9988    echo "    xemacs will be linked with \"scrollbar.o\""
9989  fi
9990 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9991    echo "    xemacs will be linked with \"dialog.o\""
9992  fi
9993 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9994    echo "    xemacs will be linked with \"toolbar.o\""
9995  fi
9996
9997 if test "$with_gtk" = "yes"; then
9998   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9999    echo "    xemacs will be linked with \"menubar-gtk.o\""
10000  fi
10001   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10002    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10003  fi
10004   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10005    echo "    xemacs will be linked with \"dialog-gtk.o\""
10006  fi
10007   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10008    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10009  fi
10010   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10011    echo "    xemacs will be linked with \"gui-gtk.o\""
10012  fi
10013 fi
10014
10015 if test "$with_x11" = "yes"; then
10016   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10017    echo "    xemacs will be linked with \"menubar-x.o\""
10018  fi
10019   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10020    echo "    xemacs will be linked with \"scrollbar-x.o\""
10021  fi
10022   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10023    echo "    xemacs will be linked with \"dialog-x.o\""
10024  fi
10025   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10026    echo "    xemacs will be linked with \"toolbar-x.o\""
10027  fi
10028   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10029    echo "    xemacs will be linked with \"gui-x.o\""
10030  fi
10031 fi
10032
10033
10034 test -z "$with_mule" && with_mule=no
10035 test -z "$with_file_coding" && with_file_coding=no
10036
10037
10038 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10039   { test "$extra_verbose" = "yes" && cat << \EOF
10040     Defining FILE_CODING
10041 EOF
10042 cat >> confdefs.h <<\EOF
10043 #define FILE_CODING 1
10044 EOF
10045 }
10046
10047   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10048    echo "    xemacs will be linked with \"file-coding.o\""
10049  fi
10050 fi
10051
10052 if test "$with_mule" = "yes" ; then
10053   echo "checking for Mule-related features" 1>&6
10054 echo "configure:10055: checking for Mule-related features" >&5
10055   { test "$extra_verbose" = "yes" && cat << \EOF
10056     Defining MULE
10057 EOF
10058 cat >> confdefs.h <<\EOF
10059 #define MULE 1
10060 EOF
10061 }
10062
10063   { test "$extra_verbose" = "yes" && cat << \EOF
10064     Defining FILE_CODING
10065 EOF
10066 cat >> confdefs.h <<\EOF
10067 #define FILE_CODING 1
10068 EOF
10069 }
10070
10071   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10072    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
10073  fi
10074
10075     for ac_hdr in libintl.h
10076 do
10077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10079 echo "configure:10080: checking for $ac_hdr" >&5
10080
10081 cat > conftest.$ac_ext <<EOF
10082 #line 10083 "configure"
10083 #include "confdefs.h"
10084 #include <$ac_hdr>
10085 EOF
10086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10087 { (eval echo configure:10088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10089 if test -z "$ac_err"; then
10090   rm -rf conftest*
10091   eval "ac_cv_header_$ac_safe=yes"
10092 else
10093   echo "$ac_err" >&5
10094   echo "configure: failed program was:" >&5
10095   cat conftest.$ac_ext >&5
10096   rm -rf conftest*
10097   eval "ac_cv_header_$ac_safe=no"
10098 fi
10099 rm -f conftest*
10100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10101   echo "$ac_t""yes" 1>&6
10102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10103   { test "$extra_verbose" = "yes" && cat << EOF
10104     Defining $ac_tr_hdr
10105 EOF
10106 cat >> confdefs.h <<EOF
10107 #define $ac_tr_hdr 1
10108 EOF
10109 }
10110  
10111 else
10112   echo "$ac_t""no" 1>&6
10113 fi
10114 done
10115
10116   
10117 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10118 echo "configure:10119: checking for strerror in -lintl" >&5
10119 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10120
10121 xe_check_libs=" -lintl "
10122 cat > conftest.$ac_ext <<EOF
10123 #line 10124 "configure"
10124 #include "confdefs.h"
10125 /* Override any gcc2 internal prototype to avoid an error.  */
10126 /* We use char because int might match the return type of a gcc2
10127     builtin and then its argument prototype would still apply.  */
10128 char strerror();
10129
10130 int main() {
10131 strerror()
10132 ; return 0; }
10133 EOF
10134 if { (eval echo configure:10135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10135   rm -rf conftest*
10136   eval "ac_cv_lib_$ac_lib_var=yes"
10137 else
10138   echo "configure: failed program was:" >&5
10139   cat conftest.$ac_ext >&5
10140   rm -rf conftest*
10141   eval "ac_cv_lib_$ac_lib_var=no"
10142 fi
10143 rm -f conftest*
10144 xe_check_libs=""
10145
10146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10147   echo "$ac_t""yes" 1>&6
10148     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10149     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10150   { test "$extra_verbose" = "yes" && cat << EOF
10151     Defining $ac_tr_lib
10152 EOF
10153 cat >> confdefs.h <<EOF
10154 #define $ac_tr_lib 1
10155 EOF
10156 }
10157
10158   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10159
10160 else
10161   echo "$ac_t""no" 1>&6
10162 fi
10163
10164
10165
10166   echo "checking for Mule input methods" 1>&6
10167 echo "configure:10168: checking for Mule input methods" >&5
10168         case "$with_xim" in "" | "yes" )
10169     echo "checking for XIM" 1>&6
10170 echo "configure:10171: checking for XIM" >&5
10171     
10172 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10173 echo "configure:10174: checking for XOpenIM in -lX11" >&5
10174 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10175
10176 xe_check_libs=" -lX11 "
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 /* Override any gcc2 internal prototype to avoid an error.  */
10181 /* We use char because int might match the return type of a gcc2
10182     builtin and then its argument prototype would still apply.  */
10183 char XOpenIM();
10184
10185 int main() {
10186 XOpenIM()
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=yes"
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=no"
10197 fi
10198 rm -f conftest*
10199 xe_check_libs=""
10200
10201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10202   echo "$ac_t""yes" 1>&6
10203   with_xim=xlib
10204 else
10205   echo "$ac_t""no" 1>&6
10206 with_xim=no
10207 fi
10208
10209
10210             if test "$need_motif $have_lesstif" = "yes no"; then
10211       
10212 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10213 echo "configure:10214: checking for XmImMbLookupString in -lXm" >&5
10214 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10215
10216 xe_check_libs=" -lXm "
10217 cat > conftest.$ac_ext <<EOF
10218 #line 10219 "configure"
10219 #include "confdefs.h"
10220 /* Override any gcc2 internal prototype to avoid an error.  */
10221 /* We use char because int might match the return type of a gcc2
10222     builtin and then its argument prototype would still apply.  */
10223 char XmImMbLookupString();
10224
10225 int main() {
10226 XmImMbLookupString()
10227 ; return 0; }
10228 EOF
10229 if { (eval echo configure:10230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10230   rm -rf conftest*
10231   eval "ac_cv_lib_$ac_lib_var=yes"
10232 else
10233   echo "configure: failed program was:" >&5
10234   cat conftest.$ac_ext >&5
10235   rm -rf conftest*
10236   eval "ac_cv_lib_$ac_lib_var=no"
10237 fi
10238 rm -f conftest*
10239 xe_check_libs=""
10240
10241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10242   echo "$ac_t""yes" 1>&6
10243   with_xim=motif
10244 else
10245   echo "$ac_t""no" 1>&6
10246 fi
10247
10248
10249     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10250       
10251 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10252 echo "configure:10253: checking for XmImMbLookupString in -lXm" >&5
10253 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10254
10255 xe_check_libs=" -lXm "
10256 cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 /* Override any gcc2 internal prototype to avoid an error.  */
10260 /* We use char because int might match the return type of a gcc2
10261     builtin and then its argument prototype would still apply.  */
10262 char XmImMbLookupString();
10263
10264 int main() {
10265 XmImMbLookupString()
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10269   rm -rf conftest*
10270   eval "ac_cv_lib_$ac_lib_var=yes"
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_lib_$ac_lib_var=no"
10276 fi
10277 rm -f conftest*
10278 xe_check_libs=""
10279
10280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10281   echo "$ac_t""yes" 1>&6
10282   with_xim=motif
10283 else
10284   echo "$ac_t""no" 1>&6
10285 fi
10286
10287
10288     fi ;;
10289   esac
10290   if test "$with_xim" != "no"; then
10291     { test "$extra_verbose" = "yes" && cat << \EOF
10292     Defining HAVE_XIM
10293 EOF
10294 cat >> confdefs.h <<\EOF
10295 #define HAVE_XIM 1
10296 EOF
10297 }
10298
10299     if test "$with_xim" = "xlib"; then
10300       { test "$extra_verbose" = "yes" && cat << \EOF
10301     Defining XIM_XLIB
10302 EOF
10303 cat >> confdefs.h <<\EOF
10304 #define XIM_XLIB 1
10305 EOF
10306 }
10307
10308       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10309    echo "    xemacs will be linked with \"input-method-xlib.o\""
10310  fi
10311     fi
10312     if test "$with_xim" = "motif"; then
10313       { test "$extra_verbose" = "yes" && cat << \EOF
10314     Defining XIM_MOTIF
10315 EOF
10316 cat >> confdefs.h <<\EOF
10317 #define XIM_MOTIF 1
10318 EOF
10319 }
10320
10321       need_motif=yes
10322       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10323    echo "    xemacs will be linked with \"input-method-motif.o\""
10324  fi
10325     fi
10326     if test "$with_xim" = "motif"; then
10327       with_xfs=no
10328     fi
10329   fi
10330
10331     if test "$with_xfs" = "yes" ; then
10332     echo "checking for XFontSet" 1>&6
10333 echo "configure:10334: checking for XFontSet" >&5
10334     
10335 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10336 echo "configure:10337: checking for XmbDrawString in -lX11" >&5
10337 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10338
10339 xe_check_libs=" -lX11 "
10340 cat > conftest.$ac_ext <<EOF
10341 #line 10342 "configure"
10342 #include "confdefs.h"
10343 /* Override any gcc2 internal prototype to avoid an error.  */
10344 /* We use char because int might match the return type of a gcc2
10345     builtin and then its argument prototype would still apply.  */
10346 char XmbDrawString();
10347
10348 int main() {
10349 XmbDrawString()
10350 ; return 0; }
10351 EOF
10352 if { (eval echo configure:10353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10353   rm -rf conftest*
10354   eval "ac_cv_lib_$ac_lib_var=yes"
10355 else
10356   echo "configure: failed program was:" >&5
10357   cat conftest.$ac_ext >&5
10358   rm -rf conftest*
10359   eval "ac_cv_lib_$ac_lib_var=no"
10360 fi
10361 rm -f conftest*
10362 xe_check_libs=""
10363
10364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10365   echo "$ac_t""yes" 1>&6
10366   :
10367 else
10368   echo "$ac_t""no" 1>&6
10369 with_xfs=no
10370 fi
10371
10372
10373     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10374       { test "$extra_verbose" = "yes" && cat << \EOF
10375     Defining USE_XFONTSET
10376 EOF
10377 cat >> confdefs.h <<\EOF
10378 #define USE_XFONTSET 1
10379 EOF
10380 }
10381
10382       if test "$with_xim" = "no" ; then
10383         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10384    echo "    xemacs will be linked with \"input-method-xlib.o\""
10385  fi
10386       fi
10387     fi
10388   fi 
10389     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10390   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10391 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10392 echo "configure:10393: checking for wnn/jllib.h" >&5
10393
10394 cat > conftest.$ac_ext <<EOF
10395 #line 10396 "configure"
10396 #include "confdefs.h"
10397 #include <wnn/jllib.h>
10398 EOF
10399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10400 { (eval echo configure:10401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10402 if test -z "$ac_err"; then
10403   rm -rf conftest*
10404   eval "ac_cv_header_$ac_safe=yes"
10405 else
10406   echo "$ac_err" >&5
10407   echo "configure: failed program was:" >&5
10408   cat conftest.$ac_ext >&5
10409   rm -rf conftest*
10410   eval "ac_cv_header_$ac_safe=no"
10411 fi
10412 rm -f conftest*
10413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10414   echo "$ac_t""yes" 1>&6
10415   :
10416 else
10417   echo "$ac_t""no" 1>&6
10418 with_wnn=no
10419 fi
10420  }
10421     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10422 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10423 echo "configure:10424: checking for wnn/commonhd.h" >&5
10424
10425 cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 #include <wnn/commonhd.h>
10429 EOF
10430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10431 { (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10433 if test -z "$ac_err"; then
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=yes"
10436 else
10437   echo "$ac_err" >&5
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_header_$ac_safe=no"
10442 fi
10443 rm -f conftest*
10444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446   :
10447 else
10448   echo "$ac_t""no" 1>&6
10449 with_wnn=no
10450 fi
10451  }
10452     if test "$with_wnn" != "no"; then
10453     for ac_func in crypt
10454 do
10455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10456 echo "configure:10457: checking for $ac_func" >&5
10457
10458 cat > conftest.$ac_ext <<EOF
10459 #line 10460 "configure"
10460 #include "confdefs.h"
10461 /* System header to define __stub macros and hopefully few prototypes,
10462     which can conflict with char $ac_func(); below.  */
10463 #include <assert.h>
10464 /* Override any gcc2 internal prototype to avoid an error.  */
10465 /* We use char because int might match the return type of a gcc2
10466     builtin and then its argument prototype would still apply.  */
10467 char $ac_func();
10468
10469 int main() {
10470
10471 /* The GNU C library defines this for functions which it implements
10472     to always fail with ENOSYS.  Some functions are actually named
10473     something starting with __ and the normal name is an alias.  */
10474 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10475 choke me
10476 #else
10477 $ac_func();
10478 #endif
10479
10480 ; return 0; }
10481 EOF
10482 if { (eval echo configure:10483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10483   rm -rf conftest*
10484   eval "ac_cv_func_$ac_func=yes"
10485 else
10486   echo "configure: failed program was:" >&5
10487   cat conftest.$ac_ext >&5
10488   rm -rf conftest*
10489   eval "ac_cv_func_$ac_func=no"
10490 fi
10491 rm -f conftest*
10492
10493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10494   echo "$ac_t""yes" 1>&6
10495     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10496   { test "$extra_verbose" = "yes" && cat << EOF
10497     Defining $ac_tr_func
10498 EOF
10499 cat >> confdefs.h <<EOF
10500 #define $ac_tr_func 1
10501 EOF
10502 }
10503  
10504 else
10505   echo "$ac_t""no" 1>&6
10506 fi
10507 done
10508
10509     test "$ac_cv_func_crypt" != "yes" && { 
10510 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10511 echo "configure:10512: checking for crypt in -lcrypt" >&5
10512 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10513
10514 xe_check_libs=" -lcrypt "
10515 cat > conftest.$ac_ext <<EOF
10516 #line 10517 "configure"
10517 #include "confdefs.h"
10518 /* Override any gcc2 internal prototype to avoid an error.  */
10519 /* We use char because int might match the return type of a gcc2
10520     builtin and then its argument prototype would still apply.  */
10521 char crypt();
10522
10523 int main() {
10524 crypt()
10525 ; return 0; }
10526 EOF
10527 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10528   rm -rf conftest*
10529   eval "ac_cv_lib_$ac_lib_var=yes"
10530 else
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -rf conftest*
10534   eval "ac_cv_lib_$ac_lib_var=no"
10535 fi
10536 rm -f conftest*
10537 xe_check_libs=""
10538
10539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10540   echo "$ac_t""yes" 1>&6
10541     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10542     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10543   { test "$extra_verbose" = "yes" && cat << EOF
10544     Defining $ac_tr_lib
10545 EOF
10546 cat >> confdefs.h <<EOF
10547 #define $ac_tr_lib 1
10548 EOF
10549 }
10550
10551   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10552
10553 else
10554   echo "$ac_t""no" 1>&6
10555 fi
10556
10557  }
10558   fi
10559     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10560     
10561 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10562 echo "configure:10563: checking for jl_dic_list_e in -lwnn" >&5
10563 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10564
10565 xe_check_libs=" -lwnn "
10566 cat > conftest.$ac_ext <<EOF
10567 #line 10568 "configure"
10568 #include "confdefs.h"
10569 /* Override any gcc2 internal prototype to avoid an error.  */
10570 /* We use char because int might match the return type of a gcc2
10571     builtin and then its argument prototype would still apply.  */
10572 char jl_dic_list_e();
10573
10574 int main() {
10575 jl_dic_list_e()
10576 ; return 0; }
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10579   rm -rf conftest*
10580   eval "ac_cv_lib_$ac_lib_var=yes"
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -rf conftest*
10585   eval "ac_cv_lib_$ac_lib_var=no"
10586 fi
10587 rm -f conftest*
10588 xe_check_libs=""
10589
10590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10591   echo "$ac_t""yes" 1>&6
10592   libwnn=wnn
10593 else
10594   echo "$ac_t""no" 1>&6
10595 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10596 echo "configure:10597: checking for jl_dic_list_e in -lwnn4" >&5
10597 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10598
10599 xe_check_libs=" -lwnn4 "
10600 cat > conftest.$ac_ext <<EOF
10601 #line 10602 "configure"
10602 #include "confdefs.h"
10603 /* Override any gcc2 internal prototype to avoid an error.  */
10604 /* We use char because int might match the return type of a gcc2
10605     builtin and then its argument prototype would still apply.  */
10606 char jl_dic_list_e();
10607
10608 int main() {
10609 jl_dic_list_e()
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=no"
10620 fi
10621 rm -f conftest*
10622 xe_check_libs=""
10623
10624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10625   echo "$ac_t""yes" 1>&6
10626   libwnn=wnn4
10627 else
10628   echo "$ac_t""no" 1>&6
10629 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10630 echo "configure:10631: checking for jl_dic_list_e in -lwnn6" >&5
10631 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10632
10633 xe_check_libs=" -lwnn6 "
10634 cat > conftest.$ac_ext <<EOF
10635 #line 10636 "configure"
10636 #include "confdefs.h"
10637 /* Override any gcc2 internal prototype to avoid an error.  */
10638 /* We use char because int might match the return type of a gcc2
10639     builtin and then its argument prototype would still apply.  */
10640 char jl_dic_list_e();
10641
10642 int main() {
10643 jl_dic_list_e()
10644 ; return 0; }
10645 EOF
10646 if { (eval echo configure:10647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10647   rm -rf conftest*
10648   eval "ac_cv_lib_$ac_lib_var=yes"
10649 else
10650   echo "configure: failed program was:" >&5
10651   cat conftest.$ac_ext >&5
10652   rm -rf conftest*
10653   eval "ac_cv_lib_$ac_lib_var=no"
10654 fi
10655 rm -f conftest*
10656 xe_check_libs=""
10657
10658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10659   echo "$ac_t""yes" 1>&6
10660   libwnn=wnn6
10661 else
10662   echo "$ac_t""no" 1>&6
10663 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10664 echo "configure:10665: checking for dic_list_e in -lwnn6_fromsrc" >&5
10665 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10666
10667 xe_check_libs=" -lwnn6_fromsrc "
10668 cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671 /* Override any gcc2 internal prototype to avoid an error.  */
10672 /* We use char because int might match the return type of a gcc2
10673     builtin and then its argument prototype would still apply.  */
10674 char dic_list_e();
10675
10676 int main() {
10677 dic_list_e()
10678 ; return 0; }
10679 EOF
10680 if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10681   rm -rf conftest*
10682   eval "ac_cv_lib_$ac_lib_var=yes"
10683 else
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -rf conftest*
10687   eval "ac_cv_lib_$ac_lib_var=no"
10688 fi
10689 rm -f conftest*
10690 xe_check_libs=""
10691
10692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10693   echo "$ac_t""yes" 1>&6
10694   libwnn=wnn6_fromsrc
10695 else
10696   echo "$ac_t""no" 1>&6
10697 with_wnn=no
10698 fi
10699
10700
10701 fi
10702
10703
10704 fi
10705
10706
10707 fi
10708
10709
10710   fi
10711   test -z "$with_wnn" && with_wnn=yes
10712   if test "$with_wnn" = "yes"; then
10713     { test "$extra_verbose" = "yes" && cat << \EOF
10714     Defining HAVE_WNN
10715 EOF
10716 cat >> confdefs.h <<\EOF
10717 #define HAVE_WNN 1
10718 EOF
10719 }
10720
10721     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10722     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10723    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10724  fi
10725     if test "$with_wnn6" != "no"; then
10726       
10727 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10728 echo "configure:10729: checking for jl_fi_dic_list in -l$libwnn" >&5
10729 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10730
10731 xe_check_libs=" -l$libwnn "
10732 cat > conftest.$ac_ext <<EOF
10733 #line 10734 "configure"
10734 #include "confdefs.h"
10735 /* Override any gcc2 internal prototype to avoid an error.  */
10736 /* We use char because int might match the return type of a gcc2
10737     builtin and then its argument prototype would still apply.  */
10738 char jl_fi_dic_list();
10739
10740 int main() {
10741 jl_fi_dic_list()
10742 ; return 0; }
10743 EOF
10744 if { (eval echo configure:10745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10745   rm -rf conftest*
10746   eval "ac_cv_lib_$ac_lib_var=yes"
10747 else
10748   echo "configure: failed program was:" >&5
10749   cat conftest.$ac_ext >&5
10750   rm -rf conftest*
10751   eval "ac_cv_lib_$ac_lib_var=no"
10752 fi
10753 rm -f conftest*
10754 xe_check_libs=""
10755
10756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10757   echo "$ac_t""yes" 1>&6
10758   with_wnn6=yes
10759 else
10760   echo "$ac_t""no" 1>&6
10761 fi
10762
10763
10764       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10765     Defining WNN6
10766 EOF
10767 cat >> confdefs.h <<\EOF
10768 #define WNN6 1
10769 EOF
10770 }
10771
10772     fi
10773   fi
10774
10775     canna_includes_found=no
10776   if test "$with_canna" != "no"; then
10777     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10778 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10779 echo "configure:10780: checking for canna/jrkanji.h" >&5
10780
10781 cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784 #include <canna/jrkanji.h>
10785 EOF
10786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10787 { (eval echo configure:10788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10789 if test -z "$ac_err"; then
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=yes"
10792 else
10793   echo "$ac_err" >&5
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=no"
10798 fi
10799 rm -f conftest*
10800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10801   echo "$ac_t""yes" 1>&6
10802   canna_includes_found=yes
10803 else
10804   echo "$ac_t""no" 1>&6
10805 fi
10806
10807   fi
10808   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10809       -d "/usr/local/canna/include"; then
10810     save_c_switch_site="$c_switch_site"
10811     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10812     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10813 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10814 echo "configure:10815: checking for canna/jrkanji.h" >&5
10815
10816 cat > conftest.$ac_ext <<EOF
10817 #line 10818 "configure"
10818 #include "confdefs.h"
10819 #include <canna/jrkanji.h>
10820 EOF
10821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10822 { (eval echo configure:10823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10824 if test -z "$ac_err"; then
10825   rm -rf conftest*
10826   eval "ac_cv_header_$ac_safe=yes"
10827 else
10828   echo "$ac_err" >&5
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -rf conftest*
10832   eval "ac_cv_header_$ac_safe=no"
10833 fi
10834 rm -f conftest*
10835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10836   echo "$ac_t""yes" 1>&6
10837   canna_includes_found=yes
10838 else
10839   echo "$ac_t""no" 1>&6
10840 fi
10841
10842     if test "$canna_includes_found" != "yes"; then
10843       c_switch_site="$save_c_switch_site"
10844       with_canna="no"
10845     fi
10846   fi
10847
10848   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10849 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10850 echo "configure:10851: checking for canna/RK.h" >&5
10851
10852 cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 #include <canna/RK.h>
10856 EOF
10857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10858 { (eval echo configure:10859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10860 if test -z "$ac_err"; then
10861   rm -rf conftest*
10862   eval "ac_cv_header_$ac_safe=yes"
10863 else
10864   echo "$ac_err" >&5
10865   echo "configure: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   rm -rf conftest*
10868   eval "ac_cv_header_$ac_safe=no"
10869 fi
10870 rm -f conftest*
10871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10872   echo "$ac_t""yes" 1>&6
10873   :
10874 else
10875   echo "$ac_t""no" 1>&6
10876 with_canna=no
10877 fi
10878  }
10879   test -z "$with_canna" && { 
10880 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10881 echo "configure:10882: checking for RkBgnBun in -lRKC" >&5
10882 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10883
10884 xe_check_libs=" -lRKC "
10885 cat > conftest.$ac_ext <<EOF
10886 #line 10887 "configure"
10887 #include "confdefs.h"
10888 /* Override any gcc2 internal prototype to avoid an error.  */
10889 /* We use char because int might match the return type of a gcc2
10890     builtin and then its argument prototype would still apply.  */
10891 char RkBgnBun();
10892
10893 int main() {
10894 RkBgnBun()
10895 ; return 0; }
10896 EOF
10897 if { (eval echo configure:10898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10898   rm -rf conftest*
10899   eval "ac_cv_lib_$ac_lib_var=yes"
10900 else
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -rf conftest*
10904   eval "ac_cv_lib_$ac_lib_var=no"
10905 fi
10906 rm -f conftest*
10907 xe_check_libs=""
10908
10909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10910   echo "$ac_t""yes" 1>&6
10911   :
10912 else
10913   echo "$ac_t""no" 1>&6
10914 with_canna=no
10915 fi
10916
10917  }
10918   test -z "$with_canna" && { 
10919 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10920 echo "configure:10921: checking for jrKanjiControl in -lcanna" >&5
10921 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10922
10923 xe_check_libs=" -lcanna "
10924 cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 /* Override any gcc2 internal prototype to avoid an error.  */
10928 /* We use char because int might match the return type of a gcc2
10929     builtin and then its argument prototype would still apply.  */
10930 char jrKanjiControl();
10931
10932 int main() {
10933 jrKanjiControl()
10934 ; return 0; }
10935 EOF
10936 if { (eval echo configure:10937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10937   rm -rf conftest*
10938   eval "ac_cv_lib_$ac_lib_var=yes"
10939 else
10940   echo "configure: failed program was:" >&5
10941   cat conftest.$ac_ext >&5
10942   rm -rf conftest*
10943   eval "ac_cv_lib_$ac_lib_var=no"
10944 fi
10945 rm -f conftest*
10946 xe_check_libs=""
10947
10948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10949   echo "$ac_t""yes" 1>&6
10950   :
10951 else
10952   echo "$ac_t""no" 1>&6
10953 with_canna=no
10954 fi
10955
10956  }
10957   test -z "$with_canna" && with_canna=yes
10958   if test "$with_canna" = "yes"; then
10959     { test "$extra_verbose" = "yes" && cat << \EOF
10960     Defining HAVE_CANNA
10961 EOF
10962 cat >> confdefs.h <<\EOF
10963 #define HAVE_CANNA 1
10964 EOF
10965 }
10966
10967     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10968     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10969    echo "    xemacs will be linked with \"mule-canna.o\""
10970  fi
10971   fi
10972
10973 else   for feature in xim canna wnn; do
10974     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10975       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10976     fi
10977     eval "with_${feature}=no"
10978   done
10979 fi 
10980
10981 if test "$need_motif" = "yes" ; then
10982   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10983     
10984 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10985 echo "configure:10986: checking for layout_object_getvalue in -li18n" >&5
10986 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10987
10988 xe_check_libs=" -li18n "
10989 cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 /* Override any gcc2 internal prototype to avoid an error.  */
10993 /* We use char because int might match the return type of a gcc2
10994     builtin and then its argument prototype would still apply.  */
10995 char layout_object_getvalue();
10996
10997 int main() {
10998 layout_object_getvalue()
10999 ; return 0; }
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=yes"
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=no"
11009 fi
11010 rm -f conftest*
11011 xe_check_libs=""
11012
11013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11014   echo "$ac_t""yes" 1>&6
11015   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11016 else
11017   echo "$ac_t""no" 1>&6
11018 fi
11019
11020
11021   
11022 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11023     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11024   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11025   
11026         runpath="" runpath_dirs=""
11027   if test -n "$LD_RUN_PATH"; then
11028     runpath="$LD_RUN_PATH"
11029   elif test "$GCC" = "yes"; then
11030         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11031     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11032     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11033     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11034       case "$arg" in P,* | -L* | -R* )
11035         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11036           {
11037 xe_runpath_dir="$dir"
11038   test "$xe_runpath_dir" != "/lib"     -a \
11039         "$xe_runpath_dir" != "/usr/lib" -a \
11040         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11041   eval "$xe_add_unique_runpath_dir"
11042 }
11043         done ;;
11044       esac
11045     done
11046     ld_switch_run="$ld_switch_run_save"
11047     rm -f conftest*
11048   else
11049         for arg in $ld_switch_site $ld_switch_x_site; do
11050       case "$arg" in -L*) {
11051 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11052   test "$xe_runpath_dir" != "/lib"     -a \
11053         "$xe_runpath_dir" != "/usr/lib" -a \
11054         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11055   eval "$xe_add_unique_runpath_dir"
11056 };; esac
11057     done
11058             if test "$opsys $need_motif" = "sol2 yes"; then
11059       xe_runpath_dir="/opt/SUNWdt/lib";
11060       eval "$xe_add_unique_runpath_dir";
11061     fi
11062   fi 
11063   if test -n "$runpath"; then
11064     ld_switch_run="${dash_r}${runpath}"
11065     
11066 if test "$GCC" = "yes"; then
11067   set x $ld_switch_run; shift; ld_switch_run=""
11068   while test -n "$1"; do
11069     case $1 in
11070       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11071       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11072       -Xlinker* ) ;;
11073       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11074     esac
11075     shift
11076   done
11077 fi
11078     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11079   fi
11080 fi
11081
11082 fi
11083
11084
11085 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
11086 do
11087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11088 echo "configure:11089: checking for $ac_func" >&5
11089
11090 cat > conftest.$ac_ext <<EOF
11091 #line 11092 "configure"
11092 #include "confdefs.h"
11093 /* System header to define __stub macros and hopefully few prototypes,
11094     which can conflict with char $ac_func(); below.  */
11095 #include <assert.h>
11096 /* Override any gcc2 internal prototype to avoid an error.  */
11097 /* We use char because int might match the return type of a gcc2
11098     builtin and then its argument prototype would still apply.  */
11099 char $ac_func();
11100
11101 int main() {
11102
11103 /* The GNU C library defines this for functions which it implements
11104     to always fail with ENOSYS.  Some functions are actually named
11105     something starting with __ and the normal name is an alias.  */
11106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11107 choke me
11108 #else
11109 $ac_func();
11110 #endif
11111
11112 ; return 0; }
11113 EOF
11114 if { (eval echo configure:11115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11115   rm -rf conftest*
11116   eval "ac_cv_func_$ac_func=yes"
11117 else
11118   echo "configure: failed program was:" >&5
11119   cat conftest.$ac_ext >&5
11120   rm -rf conftest*
11121   eval "ac_cv_func_$ac_func=no"
11122 fi
11123 rm -f conftest*
11124
11125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11126   echo "$ac_t""yes" 1>&6
11127     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11128   { test "$extra_verbose" = "yes" && cat << EOF
11129     Defining $ac_tr_func
11130 EOF
11131 cat >> confdefs.h <<EOF
11132 #define $ac_tr_func 1
11133 EOF
11134 }
11135  
11136 else
11137   echo "$ac_t""no" 1>&6
11138 fi
11139 done
11140
11141
11142 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11143   case "$opsys" in
11144     hpux11* )
11145       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11146       ac_cv_func_getaddrinfo=no
11147       ;;
11148   esac
11149 fi
11150
11151
11152 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11153 do
11154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11155 echo "configure:11156: checking for $ac_func" >&5
11156
11157 cat > conftest.$ac_ext <<EOF
11158 #line 11159 "configure"
11159 #include "confdefs.h"
11160 /* System header to define __stub macros and hopefully few prototypes,
11161     which can conflict with char $ac_func(); below.  */
11162 #include <assert.h>
11163 /* Override any gcc2 internal prototype to avoid an error.  */
11164 /* We use char because int might match the return type of a gcc2
11165     builtin and then its argument prototype would still apply.  */
11166 char $ac_func();
11167
11168 int main() {
11169
11170 /* The GNU C library defines this for functions which it implements
11171     to always fail with ENOSYS.  Some functions are actually named
11172     something starting with __ and the normal name is an alias.  */
11173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11174 choke me
11175 #else
11176 $ac_func();
11177 #endif
11178
11179 ; return 0; }
11180 EOF
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11182   rm -rf conftest*
11183   eval "ac_cv_func_$ac_func=yes"
11184 else
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -rf conftest*
11188   eval "ac_cv_func_$ac_func=no"
11189 fi
11190 rm -f conftest*
11191
11192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11193   echo "$ac_t""yes" 1>&6
11194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11195   { test "$extra_verbose" = "yes" && cat << EOF
11196     Defining $ac_tr_func
11197 EOF
11198 cat >> confdefs.h <<EOF
11199 #define $ac_tr_func 1
11200 EOF
11201 }
11202  
11203 else
11204   echo "$ac_t""no" 1>&6
11205 fi
11206 done
11207
11208
11209 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11210 echo "configure:11211: checking for openpty" >&5
11211
11212 cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 /* System header to define __stub macros and hopefully few prototypes,
11216     which can conflict with char openpty(); below.  */
11217 #include <assert.h>
11218 /* Override any gcc2 internal prototype to avoid an error.  */
11219 /* We use char because int might match the return type of a gcc2
11220     builtin and then its argument prototype would still apply.  */
11221 char openpty();
11222
11223 int main() {
11224
11225 /* The GNU C library defines this for functions which it implements
11226     to always fail with ENOSYS.  Some functions are actually named
11227     something starting with __ and the normal name is an alias.  */
11228 #if defined (__stub_openpty) || defined (__stub___openpty)
11229 choke me
11230 #else
11231 openpty();
11232 #endif
11233
11234 ; return 0; }
11235 EOF
11236 if { (eval echo configure:11237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11237   rm -rf conftest*
11238   eval "ac_cv_func_openpty=yes"
11239 else
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   eval "ac_cv_func_openpty=no"
11244 fi
11245 rm -f conftest*
11246
11247 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249   have_openpty=yes
11250 else
11251   echo "$ac_t""no" 1>&6
11252
11253   
11254 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11255 echo "configure:11256: checking for openpty in -lutil" >&5
11256 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11257
11258 xe_check_libs=" -lutil "
11259 cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 /* Override any gcc2 internal prototype to avoid an error.  */
11263 /* We use char because int might match the return type of a gcc2
11264     builtin and then its argument prototype would still apply.  */
11265 char openpty();
11266
11267 int main() {
11268 openpty()
11269 ; return 0; }
11270 EOF
11271 if { (eval echo configure:11272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11272   rm -rf conftest*
11273   eval "ac_cv_lib_$ac_lib_var=yes"
11274 else
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -rf conftest*
11278   eval "ac_cv_lib_$ac_lib_var=no"
11279 fi
11280 rm -f conftest*
11281 xe_check_libs=""
11282
11283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11284   echo "$ac_t""yes" 1>&6
11285   have_openpty=yes need_libutil=yes
11286 else
11287   echo "$ac_t""no" 1>&6
11288 fi
11289
11290
11291 fi
11292
11293 if test "$have_openpty" = "yes"; then
11294   { test "$extra_verbose" = "yes" && cat << \EOF
11295     Defining HAVE_OPENPTY
11296 EOF
11297 cat >> confdefs.h <<\EOF
11298 #define HAVE_OPENPTY 1
11299 EOF
11300 }
11301
11302   for ac_hdr in pty.h libutil.h util.h
11303 do
11304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11305 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11306 echo "configure:11307: checking for $ac_hdr" >&5
11307
11308 cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 #include <$ac_hdr>
11312 EOF
11313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11314 { (eval echo configure:11315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11316 if test -z "$ac_err"; then
11317   rm -rf conftest*
11318   eval "ac_cv_header_$ac_safe=yes"
11319 else
11320   echo "$ac_err" >&5
11321   echo "configure: failed program was:" >&5
11322   cat conftest.$ac_ext >&5
11323   rm -rf conftest*
11324   eval "ac_cv_header_$ac_safe=no"
11325 fi
11326 rm -f conftest*
11327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11330   { test "$extra_verbose" = "yes" && cat << EOF
11331     Defining $ac_tr_hdr
11332 EOF
11333 cat >> confdefs.h <<EOF
11334 #define $ac_tr_hdr 1
11335 EOF
11336 }
11337  break
11338 else
11339   echo "$ac_t""no" 1>&6
11340 fi
11341 done
11342
11343   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11344 fi
11345
11346 for ac_hdr in stropts.h
11347 do
11348 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11349 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11350 echo "configure:11351: checking for $ac_hdr" >&5
11351
11352 cat > conftest.$ac_ext <<EOF
11353 #line 11354 "configure"
11354 #include "confdefs.h"
11355 #include <$ac_hdr>
11356 EOF
11357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11358 { (eval echo configure:11359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11360 if test -z "$ac_err"; then
11361   rm -rf conftest*
11362   eval "ac_cv_header_$ac_safe=yes"
11363 else
11364   echo "$ac_err" >&5
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   eval "ac_cv_header_$ac_safe=no"
11369 fi
11370 rm -f conftest*
11371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11372   echo "$ac_t""yes" 1>&6
11373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11374   { test "$extra_verbose" = "yes" && cat << EOF
11375     Defining $ac_tr_hdr
11376 EOF
11377 cat >> confdefs.h <<EOF
11378 #define $ac_tr_hdr 1
11379 EOF
11380 }
11381  
11382 else
11383   echo "$ac_t""no" 1>&6
11384 fi
11385 done
11386
11387 if test "$ac_cv_header_stropts_h" = "yes"; then
11388   for ac_func in isastream
11389 do
11390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11391 echo "configure:11392: checking for $ac_func" >&5
11392
11393 cat > conftest.$ac_ext <<EOF
11394 #line 11395 "configure"
11395 #include "confdefs.h"
11396 /* System header to define __stub macros and hopefully few prototypes,
11397     which can conflict with char $ac_func(); below.  */
11398 #include <assert.h>
11399 /* Override any gcc2 internal prototype to avoid an error.  */
11400 /* We use char because int might match the return type of a gcc2
11401     builtin and then its argument prototype would still apply.  */
11402 char $ac_func();
11403
11404 int main() {
11405
11406 /* The GNU C library defines this for functions which it implements
11407     to always fail with ENOSYS.  Some functions are actually named
11408     something starting with __ and the normal name is an alias.  */
11409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11410 choke me
11411 #else
11412 $ac_func();
11413 #endif
11414
11415 ; return 0; }
11416 EOF
11417 if { (eval echo configure:11418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11418   rm -rf conftest*
11419   eval "ac_cv_func_$ac_func=yes"
11420 else
11421   echo "configure: failed program was:" >&5
11422   cat conftest.$ac_ext >&5
11423   rm -rf conftest*
11424   eval "ac_cv_func_$ac_func=no"
11425 fi
11426 rm -f conftest*
11427
11428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11429   echo "$ac_t""yes" 1>&6
11430     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11431   { test "$extra_verbose" = "yes" && cat << EOF
11432     Defining $ac_tr_func
11433 EOF
11434 cat >> confdefs.h <<EOF
11435 #define $ac_tr_func 1
11436 EOF
11437 }
11438  
11439 else
11440   echo "$ac_t""no" 1>&6
11441 fi
11442 done
11443
11444   for ac_hdr in strtio.h
11445 do
11446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11448 echo "configure:11449: checking for $ac_hdr" >&5
11449
11450 cat > conftest.$ac_ext <<EOF
11451 #line 11452 "configure"
11452 #include "confdefs.h"
11453 #include <$ac_hdr>
11454 EOF
11455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11456 { (eval echo configure:11457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11458 if test -z "$ac_err"; then
11459   rm -rf conftest*
11460   eval "ac_cv_header_$ac_safe=yes"
11461 else
11462   echo "$ac_err" >&5
11463   echo "configure: failed program was:" >&5
11464   cat conftest.$ac_ext >&5
11465   rm -rf conftest*
11466   eval "ac_cv_header_$ac_safe=no"
11467 fi
11468 rm -f conftest*
11469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11470   echo "$ac_t""yes" 1>&6
11471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11472   { test "$extra_verbose" = "yes" && cat << EOF
11473     Defining $ac_tr_hdr
11474 EOF
11475 cat >> confdefs.h <<EOF
11476 #define $ac_tr_hdr 1
11477 EOF
11478 }
11479  
11480 else
11481   echo "$ac_t""no" 1>&6
11482 fi
11483 done
11484  fi
11485
11486 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11487    echo "    xemacs will be linked with \"realpath.o\""
11488  fi
11489
11490 for ac_func in getloadavg
11491 do
11492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11493 echo "configure:11494: checking for $ac_func" >&5
11494
11495 cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 /* System header to define __stub macros and hopefully few prototypes,
11499     which can conflict with char $ac_func(); below.  */
11500 #include <assert.h>
11501 /* Override any gcc2 internal prototype to avoid an error.  */
11502 /* We use char because int might match the return type of a gcc2
11503     builtin and then its argument prototype would still apply.  */
11504 char $ac_func();
11505
11506 int main() {
11507
11508 /* The GNU C library defines this for functions which it implements
11509     to always fail with ENOSYS.  Some functions are actually named
11510     something starting with __ and the normal name is an alias.  */
11511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11512 choke me
11513 #else
11514 $ac_func();
11515 #endif
11516
11517 ; return 0; }
11518 EOF
11519 if { (eval echo configure:11520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11520   rm -rf conftest*
11521   eval "ac_cv_func_$ac_func=yes"
11522 else
11523   echo "configure: failed program was:" >&5
11524   cat conftest.$ac_ext >&5
11525   rm -rf conftest*
11526   eval "ac_cv_func_$ac_func=no"
11527 fi
11528 rm -f conftest*
11529
11530 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11531   echo "$ac_t""yes" 1>&6
11532     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11533   { test "$extra_verbose" = "yes" && cat << EOF
11534     Defining $ac_tr_func
11535 EOF
11536 cat >> confdefs.h <<EOF
11537 #define $ac_tr_func 1
11538 EOF
11539 }
11540  
11541 else
11542   echo "$ac_t""no" 1>&6
11543 fi
11544 done
11545
11546
11547 if test "$ac_cv_func_getloadavg" = "yes"; then
11548         for ac_hdr in sys/loadavg.h
11549 do
11550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11552 echo "configure:11553: checking for $ac_hdr" >&5
11553
11554 cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 #include <$ac_hdr>
11558 EOF
11559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11560 { (eval echo configure:11561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11562 if test -z "$ac_err"; then
11563   rm -rf conftest*
11564   eval "ac_cv_header_$ac_safe=yes"
11565 else
11566   echo "$ac_err" >&5
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   eval "ac_cv_header_$ac_safe=no"
11571 fi
11572 rm -f conftest*
11573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11574   echo "$ac_t""yes" 1>&6
11575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11576   { test "$extra_verbose" = "yes" && cat << EOF
11577     Defining $ac_tr_hdr
11578 EOF
11579 cat >> confdefs.h <<EOF
11580 #define $ac_tr_hdr 1
11581 EOF
11582 }
11583  
11584 else
11585   echo "$ac_t""no" 1>&6
11586 fi
11587 done
11588
11589 else
11590     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11591    echo "    xemacs will be linked with \"getloadavg.o\""
11592  fi
11593
11594     
11595 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11596 echo "configure:11597: checking for kstat_open in -lkstat" >&5
11597 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11598
11599 xe_check_libs=" -lkstat "
11600 cat > conftest.$ac_ext <<EOF
11601 #line 11602 "configure"
11602 #include "confdefs.h"
11603 /* Override any gcc2 internal prototype to avoid an error.  */
11604 /* We use char because int might match the return type of a gcc2
11605     builtin and then its argument prototype would still apply.  */
11606 char kstat_open();
11607
11608 int main() {
11609 kstat_open()
11610 ; return 0; }
11611 EOF
11612 if { (eval echo configure:11613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11613   rm -rf conftest*
11614   eval "ac_cv_lib_$ac_lib_var=yes"
11615 else
11616   echo "configure: failed program was:" >&5
11617   cat conftest.$ac_ext >&5
11618   rm -rf conftest*
11619   eval "ac_cv_lib_$ac_lib_var=no"
11620 fi
11621 rm -f conftest*
11622 xe_check_libs=""
11623
11624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11625   echo "$ac_t""yes" 1>&6
11626     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11628   { test "$extra_verbose" = "yes" && cat << EOF
11629     Defining $ac_tr_lib
11630 EOF
11631 cat >> confdefs.h <<EOF
11632 #define $ac_tr_lib 1
11633 EOF
11634 }
11635
11636   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11637
11638 else
11639   echo "$ac_t""no" 1>&6
11640 fi
11641
11642
11643   for ac_hdr in kstat.h
11644 do
11645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11647 echo "configure:11648: checking for $ac_hdr" >&5
11648
11649 cat > conftest.$ac_ext <<EOF
11650 #line 11651 "configure"
11651 #include "confdefs.h"
11652 #include <$ac_hdr>
11653 EOF
11654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11655 { (eval echo configure:11656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11657 if test -z "$ac_err"; then
11658   rm -rf conftest*
11659   eval "ac_cv_header_$ac_safe=yes"
11660 else
11661   echo "$ac_err" >&5
11662   echo "configure: failed program was:" >&5
11663   cat conftest.$ac_ext >&5
11664   rm -rf conftest*
11665   eval "ac_cv_header_$ac_safe=no"
11666 fi
11667 rm -f conftest*
11668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11669   echo "$ac_t""yes" 1>&6
11670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11671   { test "$extra_verbose" = "yes" && cat << EOF
11672     Defining $ac_tr_hdr
11673 EOF
11674 cat >> confdefs.h <<EOF
11675 #define $ac_tr_hdr 1
11676 EOF
11677 }
11678  
11679 else
11680   echo "$ac_t""no" 1>&6
11681 fi
11682 done
11683
11684
11685     
11686 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11687 echo "configure:11688: checking for kvm_read in -lkvm" >&5
11688 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11689
11690 xe_check_libs=" -lkvm "
11691 cat > conftest.$ac_ext <<EOF
11692 #line 11693 "configure"
11693 #include "confdefs.h"
11694 /* Override any gcc2 internal prototype to avoid an error.  */
11695 /* We use char because int might match the return type of a gcc2
11696     builtin and then its argument prototype would still apply.  */
11697 char kvm_read();
11698
11699 int main() {
11700 kvm_read()
11701 ; return 0; }
11702 EOF
11703 if { (eval echo configure:11704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11704   rm -rf conftest*
11705   eval "ac_cv_lib_$ac_lib_var=yes"
11706 else
11707   echo "configure: failed program was:" >&5
11708   cat conftest.$ac_ext >&5
11709   rm -rf conftest*
11710   eval "ac_cv_lib_$ac_lib_var=no"
11711 fi
11712 rm -f conftest*
11713 xe_check_libs=""
11714
11715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11716   echo "$ac_t""yes" 1>&6
11717     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11718     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11719   { test "$extra_verbose" = "yes" && cat << EOF
11720     Defining $ac_tr_lib
11721 EOF
11722 cat >> confdefs.h <<EOF
11723 #define $ac_tr_lib 1
11724 EOF
11725 }
11726
11727   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11728
11729 else
11730   echo "$ac_t""no" 1>&6
11731 fi
11732
11733
11734 fi
11735
11736 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11737 echo "configure:11738: checking whether netdb declares h_errno" >&5
11738 cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741 #include <netdb.h>
11742 int main() {
11743 return h_errno;
11744 ; return 0; }
11745 EOF
11746 if { (eval echo configure:11747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11747   rm -rf conftest*
11748   echo "$ac_t""yes" 1>&6
11749    { test "$extra_verbose" = "yes" && cat << \EOF
11750     Defining HAVE_H_ERRNO
11751 EOF
11752 cat >> confdefs.h <<\EOF
11753 #define HAVE_H_ERRNO 1
11754 EOF
11755 }
11756
11757 else
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -rf conftest*
11761   echo "$ac_t""no" 1>&6
11762 fi
11763 rm -f conftest*
11764
11765 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11766 echo "configure:11767: checking for sigsetjmp" >&5
11767 cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770 #include <setjmp.h>
11771 int main() {
11772 sigjmp_buf bar; sigsetjmp (bar, 0);
11773 ; return 0; }
11774 EOF
11775 if { (eval echo configure:11776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11776   rm -rf conftest*
11777   echo "$ac_t""yes" 1>&6
11778    { test "$extra_verbose" = "yes" && cat << \EOF
11779     Defining HAVE_SIGSETJMP
11780 EOF
11781 cat >> confdefs.h <<\EOF
11782 #define HAVE_SIGSETJMP 1
11783 EOF
11784 }
11785
11786 else
11787   echo "configure: failed program was:" >&5
11788   cat conftest.$ac_ext >&5
11789   rm -rf conftest*
11790   echo "$ac_t""no" 1>&6
11791 fi
11792 rm -f conftest*
11793
11794 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11795 echo "configure:11796: checking whether localtime caches TZ" >&5
11796
11797 if test "$ac_cv_func_tzset" = "yes"; then
11798 cat > conftest.$ac_ext <<EOF
11799 #line 11800 "configure"
11800 #include "confdefs.h"
11801 #include <time.h>
11802 #if STDC_HEADERS
11803 # include <stdlib.h>
11804 #endif
11805 extern char **environ;
11806 unset_TZ ()
11807 {
11808   char **from, **to;
11809   for (to = from = environ; (*to = *from); from++)
11810     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11811       to++;
11812 }
11813 char TZ_GMT0[] = "TZ=GMT0";
11814 char TZ_PST8[] = "TZ=PST8";
11815 main()
11816 {
11817   time_t now = time ((time_t *) 0);
11818   int hour_GMT0, hour_unset;
11819   if (putenv (TZ_GMT0) != 0)
11820     exit (1);
11821   hour_GMT0 = localtime (&now)->tm_hour;
11822   unset_TZ ();
11823   hour_unset = localtime (&now)->tm_hour;
11824   if (putenv (TZ_PST8) != 0)
11825     exit (1);
11826   if (localtime (&now)->tm_hour == hour_GMT0)
11827     exit (1);
11828   unset_TZ ();
11829   if (localtime (&now)->tm_hour != hour_unset)
11830     exit (1);
11831   exit (0);
11832 }
11833 EOF
11834 if { (eval echo configure:11835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11835 then
11836   emacs_cv_localtime_cache=no
11837 else
11838   conftest_rc="$?"
11839   echo "configure: failed program was:" >&5
11840   cat conftest.$ac_ext >&5
11841   rm -fr conftest*
11842   emacs_cv_localtime_cache=yes
11843 fi
11844 rm -fr conftest*
11845 else
11846         # If we lack tzset, report that localtime does not cache TZ,
11847         # since we can't invalidate the cache if we don't have tzset.
11848         emacs_cv_localtime_cache=no
11849 fi
11850 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11851 if test $emacs_cv_localtime_cache = yes; then
11852   { test "$extra_verbose" = "yes" && cat << \EOF
11853     Defining LOCALTIME_CACHE
11854 EOF
11855 cat >> confdefs.h <<\EOF
11856 #define LOCALTIME_CACHE 1
11857 EOF
11858 }
11859
11860 fi
11861
11862 if test "$HAVE_TIMEVAL" = "yes"; then
11863 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11864 echo "configure:11865: checking whether gettimeofday accepts one or two arguments" >&5
11865 cat > conftest.$ac_ext <<EOF
11866 #line 11867 "configure"
11867 #include "confdefs.h"
11868
11869 #ifdef TIME_WITH_SYS_TIME
11870 #include <sys/time.h>
11871 #include <time.h>
11872 #else
11873 #ifdef HAVE_SYS_TIME_H
11874 #include <sys/time.h>
11875 #else
11876 #include <time.h>
11877 #endif
11878 #endif
11879   
11880 int main() {
11881
11882   struct timeval time;
11883   gettimeofday (&time, 0);
11884
11885 ; return 0; }
11886 EOF
11887 if { (eval echo configure:11888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11888   rm -rf conftest*
11889   echo "$ac_t""two" 1>&6
11890 else
11891   echo "configure: failed program was:" >&5
11892   cat conftest.$ac_ext >&5
11893   rm -rf conftest*
11894   echo "$ac_t""one" 1>&6
11895    { test "$extra_verbose" = "yes" && cat << \EOF
11896     Defining GETTIMEOFDAY_ONE_ARGUMENT
11897 EOF
11898 cat >> confdefs.h <<\EOF
11899 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11900 EOF
11901 }
11902
11903 fi
11904 rm -f conftest*
11905 fi
11906
11907
11908 echo $ac_n "checking for inline""... $ac_c" 1>&6
11909 echo "configure:11910: checking for inline" >&5
11910
11911 ac_cv_c_inline=no
11912 for ac_kw in inline __inline__ __inline; do
11913   cat > conftest.$ac_ext <<EOF
11914 #line 11915 "configure"
11915 #include "confdefs.h"
11916
11917 int main() {
11918 } $ac_kw foo() {
11919 ; return 0; }
11920 EOF
11921 if { (eval echo configure:11922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11922   rm -rf conftest*
11923   ac_cv_c_inline=$ac_kw; break
11924 else
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927 fi
11928 rm -f conftest*
11929 done
11930
11931
11932 echo "$ac_t""$ac_cv_c_inline" 1>&6
11933 case "$ac_cv_c_inline" in
11934   inline | yes) ;;
11935   no) { test "$extra_verbose" = "yes" && cat << \EOF
11936     Defining inline = 
11937 EOF
11938 cat >> confdefs.h <<\EOF
11939 #define inline 
11940 EOF
11941 }
11942  ;;
11943   *)  { test "$extra_verbose" = "yes" && cat << EOF
11944     Defining inline = $ac_cv_c_inline
11945 EOF
11946 cat >> confdefs.h <<EOF
11947 #define inline $ac_cv_c_inline
11948 EOF
11949 }
11950  ;;
11951 esac
11952
11953 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11954    echo "    xemacs will be linked with \"inline.o\""
11955  fi
11956
11957
11958 if test "$__DECC" != "yes"; then
11959   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11960 # for constant arguments.  Useless!
11961 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11962 echo "configure:11963: checking for working alloca.h" >&5
11963
11964 cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 #include <alloca.h>
11968 int main() {
11969 char *p = alloca(2 * sizeof(int));
11970 ; return 0; }
11971 EOF
11972 if { (eval echo configure:11973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11973   rm -rf conftest*
11974   ac_cv_header_alloca_h=yes
11975 else
11976   echo "configure: failed program was:" >&5
11977   cat conftest.$ac_ext >&5
11978   rm -rf conftest*
11979   ac_cv_header_alloca_h=no
11980 fi
11981 rm -f conftest*
11982
11983 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11984 if test $ac_cv_header_alloca_h = yes; then
11985   { test "$extra_verbose" = "yes" && cat << \EOF
11986     Defining HAVE_ALLOCA_H
11987 EOF
11988 cat >> confdefs.h <<\EOF
11989 #define HAVE_ALLOCA_H 1
11990 EOF
11991 }
11992
11993 fi
11994
11995 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11996 echo "configure:11997: checking for alloca" >&5
11997
11998 cat > conftest.$ac_ext <<EOF
11999 #line 12000 "configure"
12000 #include "confdefs.h"
12001
12002 #ifdef __GNUC__
12003 # define alloca __builtin_alloca
12004 #else
12005 # ifdef _MSC_VER
12006 #  include <malloc.h>
12007 #  define alloca _alloca
12008 # else
12009 #  if HAVE_ALLOCA_H
12010 #   include <alloca.h>
12011 #  else
12012 #   ifdef _AIX
12013  #pragma alloca
12014 #   else
12015 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12016 char *alloca ();
12017 #    endif
12018 #   endif
12019 #  endif
12020 # endif
12021 #endif
12022
12023 int main() {
12024 char *p = (char *) alloca(1);
12025 ; return 0; }
12026 EOF
12027 if { (eval echo configure:12028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12028   rm -rf conftest*
12029   ac_cv_func_alloca_works=yes
12030 else
12031   echo "configure: failed program was:" >&5
12032   cat conftest.$ac_ext >&5
12033   rm -rf conftest*
12034   ac_cv_func_alloca_works=no
12035 fi
12036 rm -f conftest*
12037
12038 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12039 if test $ac_cv_func_alloca_works = yes; then
12040   { test "$extra_verbose" = "yes" && cat << \EOF
12041     Defining HAVE_ALLOCA
12042 EOF
12043 cat >> confdefs.h <<\EOF
12044 #define HAVE_ALLOCA 1
12045 EOF
12046 }
12047
12048 fi
12049
12050 if test $ac_cv_func_alloca_works = no; then
12051   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12052   # that cause trouble.  Some versions do not even contain alloca or
12053   # contain a buggy version.  If you still want to use their alloca,
12054   # use ar to extract alloca.o from them instead of compiling alloca.c.
12055   ALLOCA=alloca.${ac_objext}
12056   { test "$extra_verbose" = "yes" && cat << \EOF
12057     Defining C_ALLOCA
12058 EOF
12059 cat >> confdefs.h <<\EOF
12060 #define C_ALLOCA 1
12061 EOF
12062 }
12063
12064
12065 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12066 echo "configure:12067: checking whether alloca needs Cray hooks" >&5
12067
12068 cat > conftest.$ac_ext <<EOF
12069 #line 12070 "configure"
12070 #include "confdefs.h"
12071 #if defined(CRAY) && ! defined(CRAY2)
12072 webecray
12073 #else
12074 wenotbecray
12075 #endif
12076
12077 EOF
12078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12079   egrep "webecray" >/dev/null 2>&1; then
12080   rm -rf conftest*
12081   ac_cv_os_cray=yes
12082 else
12083   rm -rf conftest*
12084   ac_cv_os_cray=no
12085 fi
12086 rm -f conftest*
12087
12088
12089 echo "$ac_t""$ac_cv_os_cray" 1>&6
12090 if test $ac_cv_os_cray = yes; then
12091 for ac_func in _getb67 GETB67 getb67; do
12092   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12093 echo "configure:12094: checking for $ac_func" >&5
12094
12095 cat > conftest.$ac_ext <<EOF
12096 #line 12097 "configure"
12097 #include "confdefs.h"
12098 /* System header to define __stub macros and hopefully few prototypes,
12099     which can conflict with char $ac_func(); below.  */
12100 #include <assert.h>
12101 /* Override any gcc2 internal prototype to avoid an error.  */
12102 /* We use char because int might match the return type of a gcc2
12103     builtin and then its argument prototype would still apply.  */
12104 char $ac_func();
12105
12106 int main() {
12107
12108 /* The GNU C library defines this for functions which it implements
12109     to always fail with ENOSYS.  Some functions are actually named
12110     something starting with __ and the normal name is an alias.  */
12111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12112 choke me
12113 #else
12114 $ac_func();
12115 #endif
12116
12117 ; return 0; }
12118 EOF
12119 if { (eval echo configure:12120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12120   rm -rf conftest*
12121   eval "ac_cv_func_$ac_func=yes"
12122 else
12123   echo "configure: failed program was:" >&5
12124   cat conftest.$ac_ext >&5
12125   rm -rf conftest*
12126   eval "ac_cv_func_$ac_func=no"
12127 fi
12128 rm -f conftest*
12129
12130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12131   echo "$ac_t""yes" 1>&6
12132   { test "$extra_verbose" = "yes" && cat << EOF
12133     Defining CRAY_STACKSEG_END = $ac_func
12134 EOF
12135 cat >> confdefs.h <<EOF
12136 #define CRAY_STACKSEG_END $ac_func
12137 EOF
12138 }
12139
12140   break
12141 else
12142   echo "$ac_t""no" 1>&6
12143 fi
12144
12145 done
12146 fi
12147
12148 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12149 echo "configure:12150: checking stack direction for C alloca" >&5
12150
12151 cat > conftest.$ac_ext <<EOF
12152 #line 12153 "configure"
12153 #include "confdefs.h"
12154 find_stack_direction ()
12155 {
12156   static char *addr = 0;
12157   auto char dummy;
12158   if (addr == 0)
12159     {
12160       addr = &dummy;
12161       return find_stack_direction ();
12162     }
12163   else
12164     return (&dummy > addr) ? 1 : -1;
12165 }
12166 main ()
12167 {
12168   exit (find_stack_direction() < 0);
12169 }
12170 EOF
12171 if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12172 then
12173   ac_cv_c_stack_direction=1
12174 else
12175   conftest_rc="$?"
12176   echo "configure: failed program was:" >&5
12177   cat conftest.$ac_ext >&5
12178   rm -fr conftest*
12179   ac_cv_c_stack_direction=-1
12180 fi
12181 rm -fr conftest*
12182
12183 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12184 { test "$extra_verbose" = "yes" && cat << EOF
12185     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12186 EOF
12187 cat >> confdefs.h <<EOF
12188 #define STACK_DIRECTION $ac_cv_c_stack_direction
12189 EOF
12190 }
12191
12192 fi
12193
12194   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12195    echo "    xemacs will be linked with \"$ALLOCA\""
12196  fi
12197 fi
12198
12199 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12200 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12201 echo "configure:12202: checking for vfork.h" >&5
12202
12203 cat > conftest.$ac_ext <<EOF
12204 #line 12205 "configure"
12205 #include "confdefs.h"
12206 #include <vfork.h>
12207 EOF
12208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12209 { (eval echo configure:12210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12211 if test -z "$ac_err"; then
12212   rm -rf conftest*
12213   eval "ac_cv_header_$ac_safe=yes"
12214 else
12215   echo "$ac_err" >&5
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -rf conftest*
12219   eval "ac_cv_header_$ac_safe=no"
12220 fi
12221 rm -f conftest*
12222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12223   echo "$ac_t""yes" 1>&6
12224   { test "$extra_verbose" = "yes" && cat << \EOF
12225     Defining HAVE_VFORK_H
12226 EOF
12227 cat >> confdefs.h <<\EOF
12228 #define HAVE_VFORK_H 1
12229 EOF
12230 }
12231
12232 else
12233   echo "$ac_t""no" 1>&6
12234 fi
12235
12236 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12237 echo "configure:12238: checking for working vfork" >&5
12238
12239 cat > conftest.$ac_ext <<EOF
12240 #line 12241 "configure"
12241 #include "confdefs.h"
12242 /* Thanks to Paul Eggert for this test.  */
12243 #include <stdio.h>
12244 #include <sys/types.h>
12245 #include <sys/stat.h>
12246 #ifdef HAVE_UNISTD_H
12247 #include <unistd.h>
12248 #endif
12249 #ifdef HAVE_VFORK_H
12250 #include <vfork.h>
12251 #endif
12252 /* On some sparc systems, changes by the child to local and incoming
12253    argument registers are propagated back to the parent.
12254    The compiler is told about this with #include <vfork.h>,
12255    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12256    Test for this by using a static variable whose address
12257    is put into a register that is clobbered by the vfork.  */
12258 static
12259 #ifdef __cplusplus
12260 sparc_address_test (int arg)
12261 #else
12262 sparc_address_test (arg) int arg;
12263 #endif
12264 {
12265   static pid_t child;
12266   if (!child) {
12267     child = vfork ();
12268     if (child < 0) {
12269       perror ("vfork");
12270       _exit(2);
12271     }
12272     if (!child) {
12273       arg = getpid();
12274       write(-1, "", 0);
12275       _exit (arg);
12276     }
12277   }
12278 }
12279 main() {
12280   pid_t parent = getpid ();
12281   pid_t child;
12282
12283   sparc_address_test ();
12284
12285   child = vfork ();
12286
12287   if (child == 0) {
12288     /* Here is another test for sparc vfork register problems.
12289        This test uses lots of local variables, at least
12290        as many local variables as main has allocated so far
12291        including compiler temporaries.  4 locals are enough for
12292        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12293        A buggy compiler should reuse the register of parent
12294        for one of the local variables, since it will think that
12295        parent can't possibly be used any more in this routine.
12296        Assigning to the local variable will thus munge parent
12297        in the parent process.  */
12298     pid_t
12299       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12300       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12301     /* Convince the compiler that p..p7 are live; otherwise, it might
12302        use the same hardware register for all 8 local variables.  */
12303     if (p != p1 || p != p2 || p != p3 || p != p4
12304         || p != p5 || p != p6 || p != p7)
12305       _exit(1);
12306
12307     /* On some systems (e.g. IRIX 3.3),
12308        vfork doesn't separate parent from child file descriptors.
12309        If the child closes a descriptor before it execs or exits,
12310        this munges the parent's descriptor as well.
12311        Test for this by closing stdout in the child.  */
12312     _exit(close(fileno(stdout)) != 0);
12313   } else {
12314     int status;
12315     struct stat st;
12316
12317     while (wait(&status) != child)
12318       ;
12319     exit(
12320          /* Was there some problem with vforking?  */
12321          child < 0
12322
12323          /* Did the child fail?  (This shouldn't happen.)  */
12324          || status
12325
12326          /* Did the vfork/compiler bug occur?  */
12327          || parent != getpid()
12328
12329          /* Did the file descriptor bug occur?  */
12330          || fstat(fileno(stdout), &st) != 0
12331          );
12332   }
12333 }
12334 EOF
12335 if { (eval echo configure:12336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12336 then
12337   ac_cv_func_vfork_works=yes
12338 else
12339   conftest_rc="$?"
12340   echo "configure: failed program was:" >&5
12341   cat conftest.$ac_ext >&5
12342   rm -fr conftest*
12343   ac_cv_func_vfork_works=no
12344 fi
12345 rm -fr conftest*
12346
12347 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12348 if test $ac_cv_func_vfork_works = no; then
12349   { test "$extra_verbose" = "yes" && cat << \EOF
12350     Defining vfork = fork
12351 EOF
12352 cat >> confdefs.h <<\EOF
12353 #define vfork fork
12354 EOF
12355 }
12356
12357 fi
12358
12359
12360 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12361 echo "configure:12362: checking for working strcoll" >&5
12362
12363 cat > conftest.$ac_ext <<EOF
12364 #line 12365 "configure"
12365 #include "confdefs.h"
12366 #include <string.h>
12367 main ()
12368 {
12369   exit (strcoll ("abc", "def") >= 0 ||
12370         strcoll ("ABC", "DEF") >= 0 ||
12371         strcoll ("123", "456") >= 0);
12372 }
12373 EOF
12374 if { (eval echo configure:12375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12375 then
12376   ac_cv_func_strcoll_works=yes
12377 else
12378   conftest_rc="$?"
12379   echo "configure: failed program was:" >&5
12380   cat conftest.$ac_ext >&5
12381   rm -fr conftest*
12382   ac_cv_func_strcoll_works=no
12383 fi
12384 rm -fr conftest*
12385
12386 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12387 if test $ac_cv_func_strcoll_works = yes; then
12388   { test "$extra_verbose" = "yes" && cat << \EOF
12389     Defining HAVE_STRCOLL
12390 EOF
12391 cat >> confdefs.h <<\EOF
12392 #define HAVE_STRCOLL 1
12393 EOF
12394 }
12395
12396 fi
12397
12398
12399 for ac_func in getpgrp
12400 do
12401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12402 echo "configure:12403: checking for $ac_func" >&5
12403
12404 cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407 /* System header to define __stub macros and hopefully few prototypes,
12408     which can conflict with char $ac_func(); below.  */
12409 #include <assert.h>
12410 /* Override any gcc2 internal prototype to avoid an error.  */
12411 /* We use char because int might match the return type of a gcc2
12412     builtin and then its argument prototype would still apply.  */
12413 char $ac_func();
12414
12415 int main() {
12416
12417 /* The GNU C library defines this for functions which it implements
12418     to always fail with ENOSYS.  Some functions are actually named
12419     something starting with __ and the normal name is an alias.  */
12420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12421 choke me
12422 #else
12423 $ac_func();
12424 #endif
12425
12426 ; return 0; }
12427 EOF
12428 if { (eval echo configure:12429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12429   rm -rf conftest*
12430   eval "ac_cv_func_$ac_func=yes"
12431 else
12432   echo "configure: failed program was:" >&5
12433   cat conftest.$ac_ext >&5
12434   rm -rf conftest*
12435   eval "ac_cv_func_$ac_func=no"
12436 fi
12437 rm -f conftest*
12438
12439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12440   echo "$ac_t""yes" 1>&6
12441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12442   { test "$extra_verbose" = "yes" && cat << EOF
12443     Defining $ac_tr_func
12444 EOF
12445 cat >> confdefs.h <<EOF
12446 #define $ac_tr_func 1
12447 EOF
12448 }
12449  
12450 else
12451   echo "$ac_t""no" 1>&6
12452 fi
12453 done
12454
12455 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12456 echo "configure:12457: checking whether getpgrp takes no argument" >&5
12457
12458 cat > conftest.$ac_ext <<EOF
12459 #line 12460 "configure"
12460 #include "confdefs.h"
12461
12462 /*
12463  * If this system has a BSD-style getpgrp(),
12464  * which takes a pid argument, exit unsuccessfully.
12465  *
12466  * Snarfed from Chet Ramey's bash pgrp.c test program
12467  */
12468 #include <stdio.h>
12469 #include <sys/types.h>
12470
12471 int     pid;
12472 int     pg1, pg2, pg3, pg4;
12473 int     ng, np, s, child;
12474
12475 main()
12476 {
12477         pid = getpid();
12478         pg1 = getpgrp(0);
12479         pg2 = getpgrp();
12480         pg3 = getpgrp(pid);
12481         pg4 = getpgrp(1);
12482
12483         /*
12484          * If all of these values are the same, it's pretty sure that
12485          * we're on a system that ignores getpgrp's first argument.
12486          */
12487         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12488                 exit(0);
12489
12490         child = fork();
12491         if (child < 0)
12492                 exit(1);
12493         else if (child == 0) {
12494                 np = getpid();
12495                 /*
12496                  * If this is Sys V, this will not work; pgrp will be
12497                  * set to np because setpgrp just changes a pgrp to be
12498                  * the same as the pid.
12499                  */
12500                 setpgrp(np, pg1);
12501                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12502                 if (ng == pg1) {
12503                         exit(1);
12504                 } else {
12505                         exit(0);
12506                 }
12507         } else {
12508                 wait(&s);
12509                 exit(s>>8);
12510         }
12511 }
12512
12513 EOF
12514 if { (eval echo configure:12515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12515 then
12516   ac_cv_func_getpgrp_void=yes
12517 else
12518   conftest_rc="$?"
12519   echo "configure: failed program was:" >&5
12520   cat conftest.$ac_ext >&5
12521   rm -fr conftest*
12522   ac_cv_func_getpgrp_void=no
12523 fi
12524 rm -fr conftest*
12525
12526
12527 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12528 if test $ac_cv_func_getpgrp_void = yes; then
12529   { test "$extra_verbose" = "yes" && cat << \EOF
12530     Defining GETPGRP_VOID
12531 EOF
12532 cat >> confdefs.h <<\EOF
12533 #define GETPGRP_VOID 1
12534 EOF
12535 }
12536
12537 fi
12538
12539
12540 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12541 echo "configure:12542: checking for working mmap" >&5
12542 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12543 cat > conftest.$ac_ext <<EOF
12544 #line 12545 "configure"
12545 #include "confdefs.h"
12546 #include <stdio.h>
12547 #include <unistd.h>
12548 #include <fcntl.h>
12549 #include <sys/mman.h>
12550
12551 #ifndef MAP_VARIABLE
12552 #define MAP_VARIABLE 0
12553 #endif
12554
12555 #ifndef MAP_FAILED
12556 #define MAP_FAILED -1
12557 #endif
12558
12559 int main (int argc, char *argv[])
12560 {
12561   int fd = -1;
12562   caddr_t p;
12563 #ifndef MAP_ANONYMOUS
12564   fd = open ("/dev/zero", O_RDWR);
12565   if (fd < 0)
12566     return 1;
12567 #define MAP_ANONYMOUS 0
12568 #endif
12569   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12570            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12571            fd, 0) != (void *) MAP_FAILED)
12572     return 0;
12573   perror ("conftest: mmap failed");
12574   return 1;
12575 }
12576 EOF
12577 if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12578 then
12579   have_mmap=yes
12580 else
12581   conftest_rc="$?"
12582   echo "configure: failed program was:" >&5
12583   cat conftest.$ac_ext >&5
12584   rm -fr conftest*
12585   have_mmap=no
12586 fi
12587 rm -fr conftest* ;;
12588 esac
12589 echo "$ac_t""$have_mmap" 1>&6
12590 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12591     Defining HAVE_MMAP
12592 EOF
12593 cat >> confdefs.h <<\EOF
12594 #define HAVE_MMAP 1
12595 EOF
12596 }
12597
12598
12599 case "$opsys" in cygwin*) 
12600         test "$rel_alloc" = "default" && rel_alloc=no ;;
12601 esac
12602 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12603 if test "$rel_alloc $have_mmap" = "default yes"; then
12604   if test "$doug_lea_malloc" = "yes"; then
12605         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12606 echo "configure:12607: checking for M_MMAP_THRESHOLD" >&5
12607     cat > conftest.$ac_ext <<EOF
12608 #line 12609 "configure"
12609 #include "confdefs.h"
12610 #include <malloc.h>
12611 int main() {
12612
12613 #ifndef M_MMAP_THRESHOLD
12614 #error No M_MMAP_THRESHOLD :-(
12615 !@+$%^&*_)(_ - unlikely to compile...
12616 #endif
12617
12618 ; return 0; }
12619 EOF
12620 if { (eval echo configure:12621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12621   rm -rf conftest*
12622   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12623 else
12624   echo "configure: failed program was:" >&5
12625   cat conftest.$ac_ext >&5
12626   rm -rf conftest*
12627   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12628 fi
12629 rm -f conftest*
12630   else
12631     rel_alloc=yes
12632   fi
12633 fi
12634 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12635     Defining REL_ALLOC
12636 EOF
12637 cat >> confdefs.h <<\EOF
12638 #define REL_ALLOC 1
12639 EOF
12640 }
12641
12642
12643 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12644 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12645 echo "configure:12646: checking for termios.h" >&5
12646
12647 cat > conftest.$ac_ext <<EOF
12648 #line 12649 "configure"
12649 #include "confdefs.h"
12650 #include <termios.h>
12651 EOF
12652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12653 { (eval echo configure:12654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12655 if test -z "$ac_err"; then
12656   rm -rf conftest*
12657   eval "ac_cv_header_$ac_safe=yes"
12658 else
12659   echo "$ac_err" >&5
12660   echo "configure: failed program was:" >&5
12661   cat conftest.$ac_ext >&5
12662   rm -rf conftest*
12663   eval "ac_cv_header_$ac_safe=no"
12664 fi
12665 rm -f conftest*
12666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12667   echo "$ac_t""yes" 1>&6
12668   { test "$extra_verbose" = "yes" && cat << \EOF
12669     Defining HAVE_TERMIOS
12670 EOF
12671 cat >> confdefs.h <<\EOF
12672 #define HAVE_TERMIOS 1
12673 EOF
12674 }
12675
12676   { test "$extra_verbose" = "yes" && cat << \EOF
12677     Defining SIGNALS_VIA_CHARACTERS
12678 EOF
12679 cat >> confdefs.h <<\EOF
12680 #define SIGNALS_VIA_CHARACTERS 1
12681 EOF
12682 }
12683
12684   { test "$extra_verbose" = "yes" && cat << \EOF
12685     Defining NO_TERMIO
12686 EOF
12687 cat >> confdefs.h <<\EOF
12688 #define NO_TERMIO 1
12689 EOF
12690 }
12691
12692 else
12693   echo "$ac_t""no" 1>&6
12694 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12695 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12696 echo "configure:12697: checking for termio.h" >&5
12697
12698 cat > conftest.$ac_ext <<EOF
12699 #line 12700 "configure"
12700 #include "confdefs.h"
12701 #include <termio.h>
12702 EOF
12703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12704 { (eval echo configure:12705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12706 if test -z "$ac_err"; then
12707   rm -rf conftest*
12708   eval "ac_cv_header_$ac_safe=yes"
12709 else
12710   echo "$ac_err" >&5
12711   echo "configure: failed program was:" >&5
12712   cat conftest.$ac_ext >&5
12713   rm -rf conftest*
12714   eval "ac_cv_header_$ac_safe=no"
12715 fi
12716 rm -f conftest*
12717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12718   echo "$ac_t""yes" 1>&6
12719   { test "$extra_verbose" = "yes" && cat << \EOF
12720     Defining HAVE_TERMIO
12721 EOF
12722 cat >> confdefs.h <<\EOF
12723 #define HAVE_TERMIO 1
12724 EOF
12725 }
12726
12727 else
12728   echo "$ac_t""no" 1>&6
12729 fi
12730
12731 fi
12732
12733
12734
12735 echo $ac_n "checking for socket""... $ac_c" 1>&6
12736 echo "configure:12737: checking for socket" >&5
12737
12738 cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 /* System header to define __stub macros and hopefully few prototypes,
12742     which can conflict with char socket(); below.  */
12743 #include <assert.h>
12744 /* Override any gcc2 internal prototype to avoid an error.  */
12745 /* We use char because int might match the return type of a gcc2
12746     builtin and then its argument prototype would still apply.  */
12747 char socket();
12748
12749 int main() {
12750
12751 /* The GNU C library defines this for functions which it implements
12752     to always fail with ENOSYS.  Some functions are actually named
12753     something starting with __ and the normal name is an alias.  */
12754 #if defined (__stub_socket) || defined (__stub___socket)
12755 choke me
12756 #else
12757 socket();
12758 #endif
12759
12760 ; return 0; }
12761 EOF
12762 if { (eval echo configure:12763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12763   rm -rf conftest*
12764   eval "ac_cv_func_socket=yes"
12765 else
12766   echo "configure: failed program was:" >&5
12767   cat conftest.$ac_ext >&5
12768   rm -rf conftest*
12769   eval "ac_cv_func_socket=no"
12770 fi
12771 rm -f conftest*
12772
12773 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12774   echo "$ac_t""yes" 1>&6
12775   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12776 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12777 echo "configure:12778: checking for netinet/in.h" >&5
12778
12779 cat > conftest.$ac_ext <<EOF
12780 #line 12781 "configure"
12781 #include "confdefs.h"
12782 #include <netinet/in.h>
12783 EOF
12784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12785 { (eval echo configure:12786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12787 if test -z "$ac_err"; then
12788   rm -rf conftest*
12789   eval "ac_cv_header_$ac_safe=yes"
12790 else
12791   echo "$ac_err" >&5
12792   echo "configure: failed program was:" >&5
12793   cat conftest.$ac_ext >&5
12794   rm -rf conftest*
12795   eval "ac_cv_header_$ac_safe=no"
12796 fi
12797 rm -f conftest*
12798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12799   echo "$ac_t""yes" 1>&6
12800   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12801 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12802 echo "configure:12803: checking for arpa/inet.h" >&5
12803
12804 cat > conftest.$ac_ext <<EOF
12805 #line 12806 "configure"
12806 #include "confdefs.h"
12807 #include <arpa/inet.h>
12808 EOF
12809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12810 { (eval echo configure:12811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12812 if test -z "$ac_err"; then
12813   rm -rf conftest*
12814   eval "ac_cv_header_$ac_safe=yes"
12815 else
12816   echo "$ac_err" >&5
12817   echo "configure: failed program was:" >&5
12818   cat conftest.$ac_ext >&5
12819   rm -rf conftest*
12820   eval "ac_cv_header_$ac_safe=no"
12821 fi
12822 rm -f conftest*
12823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12824   echo "$ac_t""yes" 1>&6
12825   
12826   { test "$extra_verbose" = "yes" && cat << \EOF
12827     Defining HAVE_SOCKETS
12828 EOF
12829 cat >> confdefs.h <<\EOF
12830 #define HAVE_SOCKETS 1
12831 EOF
12832 }
12833
12834       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12835 echo "configure:12836: checking "for sun_len member in struct sockaddr_un"" >&5
12836       cat > conftest.$ac_ext <<EOF
12837 #line 12838 "configure"
12838 #include "confdefs.h"
12839
12840 #include <sys/types.h>
12841 #include <sys/socket.h>
12842 #include <sys/un.h>
12843       
12844 int main() {
12845 static struct sockaddr_un x; x.sun_len = 1;
12846 ; return 0; }
12847 EOF
12848 if { (eval echo configure:12849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12849   rm -rf conftest*
12850   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12851     Defining HAVE_SOCKADDR_SUN_LEN
12852 EOF
12853 cat >> confdefs.h <<\EOF
12854 #define HAVE_SOCKADDR_SUN_LEN 1
12855 EOF
12856 }
12857
12858 else
12859   echo "configure: failed program was:" >&5
12860   cat conftest.$ac_ext >&5
12861   rm -rf conftest*
12862   echo "$ac_t""no" 1>&6
12863 fi
12864 rm -f conftest*
12865       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12866 echo "configure:12867: checking "for ip_mreq struct in netinet/in.h"" >&5
12867       cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870
12871 #include <sys/types.h>
12872 #include <netinet/in.h>
12873       
12874 int main() {
12875 static struct ip_mreq x;
12876 ; return 0; }
12877 EOF
12878 if { (eval echo configure:12879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12879   rm -rf conftest*
12880   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12881     Defining HAVE_MULTICAST
12882 EOF
12883 cat >> confdefs.h <<\EOF
12884 #define HAVE_MULTICAST 1
12885 EOF
12886 }
12887
12888 else
12889   echo "configure: failed program was:" >&5
12890   cat conftest.$ac_ext >&5
12891   rm -rf conftest*
12892   echo "$ac_t""no" 1>&6
12893 fi
12894 rm -f conftest*
12895 else
12896   echo "$ac_t""no" 1>&6
12897 fi
12898
12899 else
12900   echo "$ac_t""no" 1>&6
12901 fi
12902
12903 else
12904   echo "$ac_t""no" 1>&6
12905 fi
12906
12907
12908 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12909 echo "configure:12910: checking for msgget" >&5
12910
12911 cat > conftest.$ac_ext <<EOF
12912 #line 12913 "configure"
12913 #include "confdefs.h"
12914 /* System header to define __stub macros and hopefully few prototypes,
12915     which can conflict with char msgget(); below.  */
12916 #include <assert.h>
12917 /* Override any gcc2 internal prototype to avoid an error.  */
12918 /* We use char because int might match the return type of a gcc2
12919     builtin and then its argument prototype would still apply.  */
12920 char msgget();
12921
12922 int main() {
12923
12924 /* The GNU C library defines this for functions which it implements
12925     to always fail with ENOSYS.  Some functions are actually named
12926     something starting with __ and the normal name is an alias.  */
12927 #if defined (__stub_msgget) || defined (__stub___msgget)
12928 choke me
12929 #else
12930 msgget();
12931 #endif
12932
12933 ; return 0; }
12934 EOF
12935 if { (eval echo configure:12936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12936   rm -rf conftest*
12937   eval "ac_cv_func_msgget=yes"
12938 else
12939   echo "configure: failed program was:" >&5
12940   cat conftest.$ac_ext >&5
12941   rm -rf conftest*
12942   eval "ac_cv_func_msgget=no"
12943 fi
12944 rm -f conftest*
12945
12946 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12947   echo "$ac_t""yes" 1>&6
12948   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12949 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12950 echo "configure:12951: checking for sys/ipc.h" >&5
12951
12952 cat > conftest.$ac_ext <<EOF
12953 #line 12954 "configure"
12954 #include "confdefs.h"
12955 #include <sys/ipc.h>
12956 EOF
12957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12958 { (eval echo configure:12959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12960 if test -z "$ac_err"; then
12961   rm -rf conftest*
12962   eval "ac_cv_header_$ac_safe=yes"
12963 else
12964   echo "$ac_err" >&5
12965   echo "configure: failed program was:" >&5
12966   cat conftest.$ac_ext >&5
12967   rm -rf conftest*
12968   eval "ac_cv_header_$ac_safe=no"
12969 fi
12970 rm -f conftest*
12971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12972   echo "$ac_t""yes" 1>&6
12973   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12974 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12975 echo "configure:12976: checking for sys/msg.h" >&5
12976
12977 cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 #include <sys/msg.h>
12981 EOF
12982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12983 { (eval echo configure:12984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12985 if test -z "$ac_err"; then
12986   rm -rf conftest*
12987   eval "ac_cv_header_$ac_safe=yes"
12988 else
12989   echo "$ac_err" >&5
12990   echo "configure: failed program was:" >&5
12991   cat conftest.$ac_ext >&5
12992   rm -rf conftest*
12993   eval "ac_cv_header_$ac_safe=no"
12994 fi
12995 rm -f conftest*
12996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12997   echo "$ac_t""yes" 1>&6
12998   { test "$extra_verbose" = "yes" && cat << \EOF
12999     Defining HAVE_SYSVIPC
13000 EOF
13001 cat >> confdefs.h <<\EOF
13002 #define HAVE_SYSVIPC 1
13003 EOF
13004 }
13005
13006 else
13007   echo "$ac_t""no" 1>&6
13008 fi
13009
13010 else
13011   echo "$ac_t""no" 1>&6
13012 fi
13013
13014 else
13015   echo "$ac_t""no" 1>&6
13016 fi
13017
13018
13019 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13020 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13021 echo "configure:13022: checking for dirent.h" >&5
13022
13023 cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 #include <dirent.h>
13027 EOF
13028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13029 { (eval echo configure:13030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13031 if test -z "$ac_err"; then
13032   rm -rf conftest*
13033   eval "ac_cv_header_$ac_safe=yes"
13034 else
13035   echo "$ac_err" >&5
13036   echo "configure: failed program was:" >&5
13037   cat conftest.$ac_ext >&5
13038   rm -rf conftest*
13039   eval "ac_cv_header_$ac_safe=no"
13040 fi
13041 rm -f conftest*
13042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13043   echo "$ac_t""yes" 1>&6
13044   { test "$extra_verbose" = "yes" && cat << \EOF
13045     Defining SYSV_SYSTEM_DIR
13046 EOF
13047 cat >> confdefs.h <<\EOF
13048 #define SYSV_SYSTEM_DIR 1
13049 EOF
13050 }
13051
13052 else
13053   echo "$ac_t""no" 1>&6
13054 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13055 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13056 echo "configure:13057: checking for sys/dir.h" >&5
13057
13058 cat > conftest.$ac_ext <<EOF
13059 #line 13060 "configure"
13060 #include "confdefs.h"
13061 #include <sys/dir.h>
13062 EOF
13063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13064 { (eval echo configure:13065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13066 if test -z "$ac_err"; then
13067   rm -rf conftest*
13068   eval "ac_cv_header_$ac_safe=yes"
13069 else
13070   echo "$ac_err" >&5
13071   echo "configure: failed program was:" >&5
13072   cat conftest.$ac_ext >&5
13073   rm -rf conftest*
13074   eval "ac_cv_header_$ac_safe=no"
13075 fi
13076 rm -f conftest*
13077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13078   echo "$ac_t""yes" 1>&6
13079   :
13080 else
13081   echo "$ac_t""no" 1>&6
13082 { test "$extra_verbose" = "yes" && cat << \EOF
13083     Defining NONSYSTEM_DIR_LIBRARY
13084 EOF
13085 cat >> confdefs.h <<\EOF
13086 #define NONSYSTEM_DIR_LIBRARY 1
13087 EOF
13088 }
13089
13090 fi
13091
13092 fi
13093
13094
13095 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13096 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13097 echo "configure:13098: checking for nlist.h" >&5
13098
13099 cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102 #include <nlist.h>
13103 EOF
13104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13105 { (eval echo configure:13106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13107 if test -z "$ac_err"; then
13108   rm -rf conftest*
13109   eval "ac_cv_header_$ac_safe=yes"
13110 else
13111   echo "$ac_err" >&5
13112   echo "configure: failed program was:" >&5
13113   cat conftest.$ac_ext >&5
13114   rm -rf conftest*
13115   eval "ac_cv_header_$ac_safe=no"
13116 fi
13117 rm -f conftest*
13118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13119   echo "$ac_t""yes" 1>&6
13120   { test "$extra_verbose" = "yes" && cat << \EOF
13121     Defining NLIST_STRUCT
13122 EOF
13123 cat >> confdefs.h <<\EOF
13124 #define NLIST_STRUCT 1
13125 EOF
13126 }
13127
13128 else
13129   echo "$ac_t""no" 1>&6
13130 fi
13131
13132
13133
13134 echo "checking "for sound support"" 1>&6
13135 echo "configure:13136: checking "for sound support"" >&5
13136 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13137
13138 if test "$with_native_sound" != "no"; then
13139     if test -n "$native_sound_lib"; then
13140     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13141 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13142 echo "configure:13143: checking for multimedia/audio_device.h" >&5
13143
13144 cat > conftest.$ac_ext <<EOF
13145 #line 13146 "configure"
13146 #include "confdefs.h"
13147 #include <multimedia/audio_device.h>
13148 EOF
13149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13150 { (eval echo configure:13151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13152 if test -z "$ac_err"; then
13153   rm -rf conftest*
13154   eval "ac_cv_header_$ac_safe=yes"
13155 else
13156   echo "$ac_err" >&5
13157   echo "configure: failed program was:" >&5
13158   cat conftest.$ac_ext >&5
13159   rm -rf conftest*
13160   eval "ac_cv_header_$ac_safe=no"
13161 fi
13162 rm -f conftest*
13163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13164   echo "$ac_t""yes" 1>&6
13165   sound_found=yes sound_cflags=""
13166       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13167    echo "    xemacs will be linked with \"sunplay.o\""
13168  fi
13169 else
13170   echo "$ac_t""no" 1>&6
13171 fi
13172
13173   fi
13174
13175     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13176     if test -d "/usr/demo/SOUND/include/multimedia"; then
13177       sun_sound_cflags="-I/usr/demo/SOUND/include"
13178     elif test -d "/usr/demo/SOUND/multimedia"; then
13179       sun_sound_cflags="-I/usr/demo/SOUND"
13180     fi
13181
13182     if test -n "$native_sound_lib"; then
13183       sun_sound_lib="$native_sound_lib"
13184     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13185       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13186     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13187       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13188     fi
13189
13190     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13191       native_sound_lib="$sun_sound_lib"
13192       sound_cflags="$sun_sound_cflags"
13193       sound_found=yes
13194       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13195    echo "    xemacs will be linked with \"sunplay.o\""
13196  fi
13197     fi
13198   fi
13199
13200     if test -z "$sound_found"; then
13201     case "$canonical" in
13202     *-sgi-* )
13203       if test -z "$native_sound_lib"; then
13204         
13205 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13206 echo "configure:13207: checking for ALopenport in -laudio" >&5
13207 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13208
13209 xe_check_libs=" -laudio "
13210 cat > conftest.$ac_ext <<EOF
13211 #line 13212 "configure"
13212 #include "confdefs.h"
13213 /* Override any gcc2 internal prototype to avoid an error.  */
13214 /* We use char because int might match the return type of a gcc2
13215     builtin and then its argument prototype would still apply.  */
13216 char ALopenport();
13217
13218 int main() {
13219 ALopenport()
13220 ; return 0; }
13221 EOF
13222 if { (eval echo configure:13223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13223   rm -rf conftest*
13224   eval "ac_cv_lib_$ac_lib_var=yes"
13225 else
13226   echo "configure: failed program was:" >&5
13227   cat conftest.$ac_ext >&5
13228   rm -rf conftest*
13229   eval "ac_cv_lib_$ac_lib_var=no"
13230 fi
13231 rm -f conftest*
13232 xe_check_libs=""
13233
13234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13235   echo "$ac_t""yes" 1>&6
13236   native_sound_lib="-laudio"
13237 else
13238   echo "$ac_t""no" 1>&6
13239 fi
13240
13241
13242       fi
13243       if test -n "$native_sound_lib"; then
13244         sound_found=yes sound_cflags=""
13245         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13246    echo "    xemacs will be linked with \"sgiplay.o\""
13247  fi
13248       fi ;;
13249     hppa*-hp-hpux* )
13250       if test -z "$native_sound_lib"; then
13251         
13252 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13253 echo "configure:13254: checking for AOpenAudio in -lAlib" >&5
13254 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13255
13256 xe_check_libs=" -lAlib "
13257 cat > conftest.$ac_ext <<EOF
13258 #line 13259 "configure"
13259 #include "confdefs.h"
13260 /* Override any gcc2 internal prototype to avoid an error.  */
13261 /* We use char because int might match the return type of a gcc2
13262     builtin and then its argument prototype would still apply.  */
13263 char AOpenAudio();
13264
13265 int main() {
13266 AOpenAudio()
13267 ; return 0; }
13268 EOF
13269 if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13270   rm -rf conftest*
13271   eval "ac_cv_lib_$ac_lib_var=yes"
13272 else
13273   echo "configure: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275   rm -rf conftest*
13276   eval "ac_cv_lib_$ac_lib_var=no"
13277 fi
13278 rm -f conftest*
13279 xe_check_libs=""
13280
13281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13282   echo "$ac_t""yes" 1>&6
13283   native_sound_lib="-lAlib"
13284 else
13285   echo "$ac_t""no" 1>&6
13286 fi
13287
13288
13289       fi
13290       if test -n "$native_sound_lib"; then
13291         sound_found=yes
13292         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13293    echo "    xemacs will be linked with \"hpplay.o\""
13294  fi
13295         if test "$GCC" = "yes" # Kludge city
13296           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13297           else sound_cflags="+e -I/usr/audio/examples"
13298         fi
13299       fi ;;
13300     esac
13301   fi
13302
13303     if test -z "$sound_found"; then
13304     if test "$with_msw" = "yes"; then
13305     sound_found=yes
13306     native_sound_lib=
13307     fi
13308   fi
13309
13310     if test -z "$sound_found"; then
13311     for dir in "machine" "sys" "linux"; do
13312       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13313 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13314 echo "configure:13315: checking for ${dir}/soundcard.h" >&5
13315
13316 cat > conftest.$ac_ext <<EOF
13317 #line 13318 "configure"
13318 #include "confdefs.h"
13319 #include <${dir}/soundcard.h>
13320 EOF
13321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13322 { (eval echo configure:13323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13324 if test -z "$ac_err"; then
13325   rm -rf conftest*
13326   eval "ac_cv_header_$ac_safe=yes"
13327 else
13328   echo "$ac_err" >&5
13329   echo "configure: failed program was:" >&5
13330   cat conftest.$ac_ext >&5
13331   rm -rf conftest*
13332   eval "ac_cv_header_$ac_safe=no"
13333 fi
13334 rm -f conftest*
13335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13336   echo "$ac_t""yes" 1>&6
13337   sound_found=yes
13338        need_miscplay=yes
13339         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13340    echo "    xemacs will be linked with \"linuxplay.o\""
13341  fi
13342         { test "$extra_verbose" = "yes" && cat << EOF
13343     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13344 EOF
13345 cat >> confdefs.h <<EOF
13346 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13347 EOF
13348 }
13349
13350         break
13351 else
13352   echo "$ac_t""no" 1>&6
13353 fi
13354
13355     done
13356   fi
13357
13358   test "$sound_found" = "yes" && with_native_sound=yes
13359 fi
13360
13361 if test "$with_native_sound" = "yes"; then
13362   { test "$extra_verbose" = "yes" && cat << \EOF
13363     Defining HAVE_NATIVE_SOUND
13364 EOF
13365 cat >> confdefs.h <<\EOF
13366 #define HAVE_NATIVE_SOUND 1
13367 EOF
13368 }
13369
13370   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13371 fi
13372
13373 if test "$with_nas_sound" != "no"; then
13374   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13375 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13376 echo "configure:13377: checking for audio/audiolib.h" >&5
13377
13378 cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 #include <audio/audiolib.h>
13382 EOF
13383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13384 { (eval echo configure:13385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13386 if test -z "$ac_err"; then
13387   rm -rf conftest*
13388   eval "ac_cv_header_$ac_safe=yes"
13389 else
13390   echo "$ac_err" >&5
13391   echo "configure: failed program was:" >&5
13392   cat conftest.$ac_ext >&5
13393   rm -rf conftest*
13394   eval "ac_cv_header_$ac_safe=no"
13395 fi
13396 rm -f conftest*
13397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13398   echo "$ac_t""yes" 1>&6
13399   
13400     
13401 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13402 echo "configure:13403: checking for AuOpenServer in -laudio" >&5
13403 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13404
13405 xe_check_libs=" -laudio "
13406 cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409 /* Override any gcc2 internal prototype to avoid an error.  */
13410 /* We use char because int might match the return type of a gcc2
13411     builtin and then its argument prototype would still apply.  */
13412 char AuOpenServer();
13413
13414 int main() {
13415 AuOpenServer()
13416 ; return 0; }
13417 EOF
13418 if { (eval echo configure:13419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13419   rm -rf conftest*
13420   eval "ac_cv_lib_$ac_lib_var=yes"
13421 else
13422   echo "configure: failed program was:" >&5
13423   cat conftest.$ac_ext >&5
13424   rm -rf conftest*
13425   eval "ac_cv_lib_$ac_lib_var=no"
13426 fi
13427 rm -f conftest*
13428 xe_check_libs=""
13429
13430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13431   echo "$ac_t""yes" 1>&6
13432   have_nas_sound=yes
13433 else
13434   echo "$ac_t""no" 1>&6
13435 fi
13436
13437
13438 else
13439   echo "$ac_t""no" 1>&6
13440 fi
13441
13442   if test "$have_nas_sound" = "yes"; then
13443     with_nas_sound=yes
13444     { test "$extra_verbose" = "yes" && cat << \EOF
13445     Defining HAVE_NAS_SOUND
13446 EOF
13447 cat >> confdefs.h <<\EOF
13448 #define HAVE_NAS_SOUND 1
13449 EOF
13450 }
13451
13452     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13453    echo "    xemacs will be linked with \"nas.o\""
13454  fi
13455     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13456             cat > conftest.$ac_ext <<EOF
13457 #line 13458 "configure"
13458 #include "confdefs.h"
13459 #include <audio/Xtutil.h>
13460 EOF
13461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13462   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13463   :
13464 else
13465   rm -rf conftest*
13466   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13467     Defining NAS_NO_ERROR_JUMP
13468 EOF
13469 cat >> confdefs.h <<\EOF
13470 #define NAS_NO_ERROR_JUMP 1
13471 EOF
13472 }
13473
13474 fi
13475 rm -f conftest*
13476
13477   else
13478     test "$with_nas_sound" = "yes" && \
13479       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13480     with_nas_sound=no
13481   fi
13482 fi
13483
13484 if test "$with_esd_sound" != "no"; then
13485   # Extract the first word of "esd-config", so it can be a program name with args.
13486 set dummy esd-config; ac_word=$2
13487 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13488 echo "configure:13489: checking for $ac_word" >&5
13489
13490 if test -n "$have_esd_config"; then
13491   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13492 else
13493   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13494   ac_dummy="$PATH"
13495   for ac_dir in $ac_dummy; do
13496     test -z "$ac_dir" && ac_dir=.
13497     if test -f $ac_dir/$ac_word; then
13498       ac_cv_prog_have_esd_config="yes"
13499       break
13500     fi
13501   done
13502   IFS="$ac_save_ifs"
13503   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13504 fi
13505 have_esd_config="$ac_cv_prog_have_esd_config"
13506 if test -n "$have_esd_config"; then
13507   echo "$ac_t""$have_esd_config" 1>&6
13508 else
13509   echo "$ac_t""no" 1>&6
13510 fi
13511
13512   if test "$have_esd_config" = "yes"; then
13513     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13514     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
13515     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13516     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13517 echo "configure:13518: checking for esd_play_stream" >&5
13518
13519 cat > conftest.$ac_ext <<EOF
13520 #line 13521 "configure"
13521 #include "confdefs.h"
13522 /* System header to define __stub macros and hopefully few prototypes,
13523     which can conflict with char esd_play_stream(); below.  */
13524 #include <assert.h>
13525 /* Override any gcc2 internal prototype to avoid an error.  */
13526 /* We use char because int might match the return type of a gcc2
13527     builtin and then its argument prototype would still apply.  */
13528 char esd_play_stream();
13529
13530 int main() {
13531
13532 /* The GNU C library defines this for functions which it implements
13533     to always fail with ENOSYS.  Some functions are actually named
13534     something starting with __ and the normal name is an alias.  */
13535 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13536 choke me
13537 #else
13538 esd_play_stream();
13539 #endif
13540
13541 ; return 0; }
13542 EOF
13543 if { (eval echo configure:13544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13544   rm -rf conftest*
13545   eval "ac_cv_func_esd_play_stream=yes"
13546 else
13547   echo "configure: failed program was:" >&5
13548   cat conftest.$ac_ext >&5
13549   rm -rf conftest*
13550   eval "ac_cv_func_esd_play_stream=no"
13551 fi
13552 rm -f conftest*
13553
13554 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13555   echo "$ac_t""yes" 1>&6
13556   have_esd_sound=yes
13557 else
13558   echo "$ac_t""no" 1>&6
13559 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13560 fi
13561
13562   fi
13563
13564   if test "$have_esd_sound" = "yes"; then
13565     with_esd_sound=yes
13566     need_miscplay=yes
13567     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13568    echo "    xemacs will be linked with \"esd.o\""
13569  fi
13570     { test "$extra_verbose" = "yes" && cat << \EOF
13571     Defining HAVE_ESD_SOUND
13572 EOF
13573 cat >> confdefs.h <<\EOF
13574 #define HAVE_ESD_SOUND 1
13575 EOF
13576 }
13577
13578   else
13579     test "$with_esd_sound" = "yes" && \
13580       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13581     with_esd_sound=no
13582   fi
13583 fi
13584
13585 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13586    echo "    xemacs will be linked with \"miscplay.o\""
13587  fi
13588
13589
13590 test -z "$with_tty" && with_tty=yes
13591
13592 if test "$with_tty" = "yes"  ; then
13593   echo "checking for TTY-related features" 1>&6
13594 echo "configure:13595: checking for TTY-related features" >&5
13595   { test "$extra_verbose" = "yes" && cat << \EOF
13596     Defining HAVE_TTY
13597 EOF
13598 cat >> confdefs.h <<\EOF
13599 #define HAVE_TTY 1
13600 EOF
13601 }
13602
13603   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
13604    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\""
13605  fi
13606
13607     if test -z "$with_ncurses"; then
13608     
13609 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13610 echo "configure:13611: checking for tgetent in -lncurses" >&5
13611 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13612
13613 xe_check_libs=" -lncurses "
13614 cat > conftest.$ac_ext <<EOF
13615 #line 13616 "configure"
13616 #include "confdefs.h"
13617 /* Override any gcc2 internal prototype to avoid an error.  */
13618 /* We use char because int might match the return type of a gcc2
13619     builtin and then its argument prototype would still apply.  */
13620 char tgetent();
13621
13622 int main() {
13623 tgetent()
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13627   rm -rf conftest*
13628   eval "ac_cv_lib_$ac_lib_var=yes"
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   eval "ac_cv_lib_$ac_lib_var=no"
13634 fi
13635 rm -f conftest*
13636 xe_check_libs=""
13637
13638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13639   echo "$ac_t""yes" 1>&6
13640   with_ncurses=yes
13641 else
13642   echo "$ac_t""no" 1>&6
13643 with_ncurses=no
13644 fi
13645
13646
13647   fi
13648   if test "$with_ncurses" = "yes"; then
13649     { test "$extra_verbose" = "yes" && cat << \EOF
13650     Defining HAVE_NCURSES
13651 EOF
13652 cat >> confdefs.h <<\EOF
13653 #define HAVE_NCURSES 1
13654 EOF
13655 }
13656
13657     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13658 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13659 echo "configure:13660: checking for ncurses/curses.h" >&5
13660
13661 cat > conftest.$ac_ext <<EOF
13662 #line 13663 "configure"
13663 #include "confdefs.h"
13664 #include <ncurses/curses.h>
13665 EOF
13666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13667 { (eval echo configure:13668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13669 if test -z "$ac_err"; then
13670   rm -rf conftest*
13671   eval "ac_cv_header_$ac_safe=yes"
13672 else
13673   echo "$ac_err" >&5
13674   echo "configure: failed program was:" >&5
13675   cat conftest.$ac_ext >&5
13676   rm -rf conftest*
13677   eval "ac_cv_header_$ac_safe=no"
13678 fi
13679 rm -f conftest*
13680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13681   echo "$ac_t""yes" 1>&6
13682   curses_h_file=ncurses/curses.h
13683 else
13684   echo "$ac_t""no" 1>&6
13685 fi
13686
13687     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13688 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13689 echo "configure:13690: checking for ncurses/term.h" >&5
13690
13691 cat > conftest.$ac_ext <<EOF
13692 #line 13693 "configure"
13693 #include "confdefs.h"
13694 #include <ncurses/term.h>
13695 EOF
13696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13697 { (eval echo configure:13698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13699 if test -z "$ac_err"; then
13700   rm -rf conftest*
13701   eval "ac_cv_header_$ac_safe=yes"
13702 else
13703   echo "$ac_err" >&5
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   eval "ac_cv_header_$ac_safe=no"
13708 fi
13709 rm -f conftest*
13710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13711   echo "$ac_t""yes" 1>&6
13712   term_h_file=ncurses/term.h
13713 else
13714   echo "$ac_t""no" 1>&6
13715 fi
13716
13717     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13718    echo "    xemacs will be linked with \"terminfo.o\""
13719  fi
13720     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13721
13722     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13723                         save_c_switch_site="$c_switch_site"
13724       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13725       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13726 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13727 echo "configure:13728: checking for ncurses/curses.h" >&5
13728
13729 cat > conftest.$ac_ext <<EOF
13730 #line 13731 "configure"
13731 #include "confdefs.h"
13732 #include <ncurses/curses.h>
13733 EOF
13734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13735 { (eval echo configure:13736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13737 if test -z "$ac_err"; then
13738   rm -rf conftest*
13739   eval "ac_cv_header_$ac_safe=yes"
13740 else
13741   echo "$ac_err" >&5
13742   echo "configure: failed program was:" >&5
13743   cat conftest.$ac_ext >&5
13744   rm -rf conftest*
13745   eval "ac_cv_header_$ac_safe=no"
13746 fi
13747 rm -f conftest*
13748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13749   echo "$ac_t""yes" 1>&6
13750   curses_h_file=ncurses/curses.h
13751 else
13752   echo "$ac_t""no" 1>&6
13753 fi
13754
13755       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13756         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13757         else c_switch_site="$save_c_switch_site"
13758       fi
13759     fi
13760   else         if test "$have_terminfo" = "yes"; then
13761       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13762    echo "    xemacs will be linked with \"terminfo.o\""
13763  fi
13764       if test -n "$libs_termcap"; then
13765         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13766       else
13767         for lib in curses termlib termcap; do
13768           
13769 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13770 echo "configure:13771: checking for tgetent in -l$lib" >&5
13771 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13772
13773 xe_check_libs=" -l$lib "
13774 cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 /* Override any gcc2 internal prototype to avoid an error.  */
13778 /* We use char because int might match the return type of a gcc2
13779     builtin and then its argument prototype would still apply.  */
13780 char tgetent();
13781
13782 int main() {
13783 tgetent()
13784 ; return 0; }
13785 EOF
13786 if { (eval echo configure:13787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13787   rm -rf conftest*
13788   eval "ac_cv_lib_$ac_lib_var=yes"
13789 else
13790   echo "configure: failed program was:" >&5
13791   cat conftest.$ac_ext >&5
13792   rm -rf conftest*
13793   eval "ac_cv_lib_$ac_lib_var=no"
13794 fi
13795 rm -f conftest*
13796 xe_check_libs=""
13797
13798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13799   echo "$ac_t""yes" 1>&6
13800   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13801 else
13802   echo "$ac_t""no" 1>&6
13803 fi
13804
13805
13806         done
13807       fi
13808     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13809                                 
13810 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13811 echo "configure:13812: checking for tgoto in -ltermcap" >&5
13812 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13813
13814 xe_check_libs=" -ltermcap "
13815 cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 /* Override any gcc2 internal prototype to avoid an error.  */
13819 /* We use char because int might match the return type of a gcc2
13820     builtin and then its argument prototype would still apply.  */
13821 char tgoto();
13822
13823 int main() {
13824 tgoto()
13825 ; return 0; }
13826 EOF
13827 if { (eval echo configure:13828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13828   rm -rf conftest*
13829   eval "ac_cv_lib_$ac_lib_var=yes"
13830 else
13831   echo "configure: failed program was:" >&5
13832   cat conftest.$ac_ext >&5
13833   rm -rf conftest*
13834   eval "ac_cv_lib_$ac_lib_var=no"
13835 fi
13836 rm -f conftest*
13837 xe_check_libs=""
13838
13839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13840   echo "$ac_t""yes" 1>&6
13841     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13842     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13843   { test "$extra_verbose" = "yes" && cat << EOF
13844     Defining $ac_tr_lib
13845 EOF
13846 cat >> confdefs.h <<EOF
13847 #define $ac_tr_lib 1
13848 EOF
13849 }
13850
13851   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13852
13853 else
13854   echo "$ac_t""no" 1>&6
13855 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13856    echo "    xemacs will be linked with \"tparam.o\""
13857  fi
13858 fi
13859
13860
13861       else
13862         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13863    echo "    xemacs will be linked with \"tparam.o\""
13864  fi
13865       fi
13866                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13867       if test -n "$libs_termcap"; then
13868         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13869       else
13870         
13871 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13872 echo "configure:13873: checking for tgetent in -lcurses" >&5
13873 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13874
13875 xe_check_libs=" -lcurses "
13876 cat > conftest.$ac_ext <<EOF
13877 #line 13878 "configure"
13878 #include "confdefs.h"
13879 /* Override any gcc2 internal prototype to avoid an error.  */
13880 /* We use char because int might match the return type of a gcc2
13881     builtin and then its argument prototype would still apply.  */
13882 char tgetent();
13883
13884 int main() {
13885 tgetent()
13886 ; return 0; }
13887 EOF
13888 if { (eval echo configure:13889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13889   rm -rf conftest*
13890   eval "ac_cv_lib_$ac_lib_var=yes"
13891 else
13892   echo "configure: failed program was:" >&5
13893   cat conftest.$ac_ext >&5
13894   rm -rf conftest*
13895   eval "ac_cv_lib_$ac_lib_var=no"
13896 fi
13897 rm -f conftest*
13898 xe_check_libs=""
13899
13900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13901   echo "$ac_t""yes" 1>&6
13902   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13903 else
13904   echo "$ac_t""no" 1>&6
13905 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13906 echo "configure:13907: checking for tgetent in -ltermcap" >&5
13907 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13908
13909 xe_check_libs=" -ltermcap "
13910 cat > conftest.$ac_ext <<EOF
13911 #line 13912 "configure"
13912 #include "confdefs.h"
13913 /* Override any gcc2 internal prototype to avoid an error.  */
13914 /* We use char because int might match the return type of a gcc2
13915     builtin and then its argument prototype would still apply.  */
13916 char tgetent();
13917
13918 int main() {
13919 tgetent()
13920 ; return 0; }
13921 EOF
13922 if { (eval echo configure:13923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13923   rm -rf conftest*
13924   eval "ac_cv_lib_$ac_lib_var=yes"
13925 else
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -rf conftest*
13929   eval "ac_cv_lib_$ac_lib_var=no"
13930 fi
13931 rm -f conftest*
13932 xe_check_libs=""
13933
13934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13935   echo "$ac_t""yes" 1>&6
13936   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13937 else
13938   echo "$ac_t""no" 1>&6
13939 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13940    echo "    xemacs will be linked with \"termcap.o\""
13941  fi
13942 fi
13943
13944
13945 fi
13946
13947
13948       fi
13949     fi
13950   fi
13951   { test "$extra_verbose" = "yes" && cat << EOF
13952     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13953 EOF
13954 cat >> confdefs.h <<EOF
13955 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13956 EOF
13957 }
13958
13959   { test "$extra_verbose" = "yes" && cat << EOF
13960     Defining TERM_H_FILE = "${term_h_file-term.h}"
13961 EOF
13962 cat >> confdefs.h <<EOF
13963 #define TERM_H_FILE "${term_h_file-term.h}"
13964 EOF
13965 }
13966
13967
13968     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13969 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13970 echo "configure:13971: checking for gpm.h" >&5
13971
13972 cat > conftest.$ac_ext <<EOF
13973 #line 13974 "configure"
13974 #include "confdefs.h"
13975 #include <gpm.h>
13976 EOF
13977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13978 { (eval echo configure:13979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13980 if test -z "$ac_err"; then
13981   rm -rf conftest*
13982   eval "ac_cv_header_$ac_safe=yes"
13983 else
13984   echo "$ac_err" >&5
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -rf conftest*
13988   eval "ac_cv_header_$ac_safe=no"
13989 fi
13990 rm -f conftest*
13991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13992   echo "$ac_t""yes" 1>&6
13993   :
13994 else
13995   echo "$ac_t""no" 1>&6
13996 with_gpm=no
13997 fi
13998  }
13999   test -z "$with_gpm" && { 
14000 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14001 echo "configure:14002: checking for Gpm_Open in -lgpm" >&5
14002 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14003
14004 xe_check_libs=" -lgpm "
14005 cat > conftest.$ac_ext <<EOF
14006 #line 14007 "configure"
14007 #include "confdefs.h"
14008 /* Override any gcc2 internal prototype to avoid an error.  */
14009 /* We use char because int might match the return type of a gcc2
14010     builtin and then its argument prototype would still apply.  */
14011 char Gpm_Open();
14012
14013 int main() {
14014 Gpm_Open()
14015 ; return 0; }
14016 EOF
14017 if { (eval echo configure:14018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14018   rm -rf conftest*
14019   eval "ac_cv_lib_$ac_lib_var=yes"
14020 else
14021   echo "configure: failed program was:" >&5
14022   cat conftest.$ac_ext >&5
14023   rm -rf conftest*
14024   eval "ac_cv_lib_$ac_lib_var=no"
14025 fi
14026 rm -f conftest*
14027 xe_check_libs=""
14028
14029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14030   echo "$ac_t""yes" 1>&6
14031   with_gpm=yes
14032 else
14033   echo "$ac_t""no" 1>&6
14034 with_gpm=no
14035 fi
14036
14037  }
14038   if test "$with_gpm" = "yes"; then
14039     { test "$extra_verbose" = "yes" && cat << \EOF
14040     Defining HAVE_GPM
14041 EOF
14042 cat >> confdefs.h <<\EOF
14043 #define HAVE_GPM 1
14044 EOF
14045 }
14046
14047     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14048    echo "    xemacs will be linked with \"gpmevent.o\""
14049  fi
14050     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14051   fi
14052
14053 else   for feature in ncurses gpm; do
14054     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14055       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14056     fi
14057     eval "with_${feature}=no"
14058   done
14059 fi 
14060 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
14061    echo "    xemacs will be linked with \"event-unixoid.o\""
14062  fi
14063
14064
14065 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14066   != "no no no" && echo "checking for database support" 1>&6
14067 echo "configure:14068: checking for database support" >&5
14068
14069 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14070   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14071 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14072 echo "configure:14073: checking for ndbm.h" >&5
14073
14074 cat > conftest.$ac_ext <<EOF
14075 #line 14076 "configure"
14076 #include "confdefs.h"
14077 #include <ndbm.h>
14078 EOF
14079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14080 { (eval echo configure:14081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14082 if test -z "$ac_err"; then
14083   rm -rf conftest*
14084   eval "ac_cv_header_$ac_safe=yes"
14085 else
14086   echo "$ac_err" >&5
14087   echo "configure: failed program was:" >&5
14088   cat conftest.$ac_ext >&5
14089   rm -rf conftest*
14090   eval "ac_cv_header_$ac_safe=no"
14091 fi
14092 rm -f conftest*
14093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14094   echo "$ac_t""yes" 1>&6
14095   :
14096 else
14097   echo "$ac_t""no" 1>&6
14098
14099     test "$with_database_gdbm" = "yes" -o \
14100          "$with_database_dbm"  = "yes" && \
14101       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14102     with_database_gdbm=no with_database_dbm=no
14103 fi
14104
14105 fi
14106
14107 if test "$with_database_gdbm" != "no"; then
14108   
14109 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14110 echo "configure:14111: checking for dbm_open in -lgdbm" >&5
14111 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14112
14113 xe_check_libs=" -lgdbm "
14114 cat > conftest.$ac_ext <<EOF
14115 #line 14116 "configure"
14116 #include "confdefs.h"
14117 /* Override any gcc2 internal prototype to avoid an error.  */
14118 /* We use char because int might match the return type of a gcc2
14119     builtin and then its argument prototype would still apply.  */
14120 char dbm_open();
14121
14122 int main() {
14123 dbm_open()
14124 ; return 0; }
14125 EOF
14126 if { (eval echo configure:14127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14127   rm -rf conftest*
14128   eval "ac_cv_lib_$ac_lib_var=yes"
14129 else
14130   echo "configure: failed program was:" >&5
14131   cat conftest.$ac_ext >&5
14132   rm -rf conftest*
14133   eval "ac_cv_lib_$ac_lib_var=no"
14134 fi
14135 rm -f conftest*
14136 xe_check_libs=""
14137
14138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14139   echo "$ac_t""yes" 1>&6
14140   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14141 else
14142   echo "$ac_t""no" 1>&6
14143 if test "$with_database_gdbm" = "yes"; then
14144      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14145    fi
14146    with_database_gdbm=no
14147 fi
14148
14149
14150 fi
14151
14152 if test "$with_database_dbm" != "no"; then
14153   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14154 echo "configure:14155: checking for dbm_open" >&5
14155
14156 cat > conftest.$ac_ext <<EOF
14157 #line 14158 "configure"
14158 #include "confdefs.h"
14159 /* System header to define __stub macros and hopefully few prototypes,
14160     which can conflict with char dbm_open(); below.  */
14161 #include <assert.h>
14162 /* Override any gcc2 internal prototype to avoid an error.  */
14163 /* We use char because int might match the return type of a gcc2
14164     builtin and then its argument prototype would still apply.  */
14165 char dbm_open();
14166
14167 int main() {
14168
14169 /* The GNU C library defines this for functions which it implements
14170     to always fail with ENOSYS.  Some functions are actually named
14171     something starting with __ and the normal name is an alias.  */
14172 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14173 choke me
14174 #else
14175 dbm_open();
14176 #endif
14177
14178 ; return 0; }
14179 EOF
14180 if { (eval echo configure:14181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14181   rm -rf conftest*
14182   eval "ac_cv_func_dbm_open=yes"
14183 else
14184   echo "configure: failed program was:" >&5
14185   cat conftest.$ac_ext >&5
14186   rm -rf conftest*
14187   eval "ac_cv_func_dbm_open=no"
14188 fi
14189 rm -f conftest*
14190
14191 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14192   echo "$ac_t""yes" 1>&6
14193   with_database_dbm=yes libdbm=
14194 else
14195   echo "$ac_t""no" 1>&6
14196
14197     
14198 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14199 echo "configure:14200: checking for dbm_open in -ldbm" >&5
14200 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14201
14202 xe_check_libs=" -ldbm "
14203 cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 /* Override any gcc2 internal prototype to avoid an error.  */
14207 /* We use char because int might match the return type of a gcc2
14208     builtin and then its argument prototype would still apply.  */
14209 char dbm_open();
14210
14211 int main() {
14212 dbm_open()
14213 ; return 0; }
14214 EOF
14215 if { (eval echo configure:14216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14216   rm -rf conftest*
14217   eval "ac_cv_lib_$ac_lib_var=yes"
14218 else
14219   echo "configure: failed program was:" >&5
14220   cat conftest.$ac_ext >&5
14221   rm -rf conftest*
14222   eval "ac_cv_lib_$ac_lib_var=no"
14223 fi
14224 rm -f conftest*
14225 xe_check_libs=""
14226
14227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14228   echo "$ac_t""yes" 1>&6
14229   with_database_dbm=yes libdbm=-ldbm
14230 else
14231   echo "$ac_t""no" 1>&6
14232 test "$with_database_dbm" = "yes" && \
14233         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14234       with_database_dbm=no
14235 fi
14236
14237
14238 fi
14239
14240 fi
14241
14242 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14243 test "$with_database_gdbm" = "yes" -o \
14244      "$with_database_dbm"  = "yes" && \
14245   { test "$extra_verbose" = "yes" && cat << \EOF
14246     Defining HAVE_DBM
14247 EOF
14248 cat >> confdefs.h <<\EOF
14249 #define HAVE_DBM 1
14250 EOF
14251 }
14252
14253
14254 if test "$with_database_berkdb" != "no"; then
14255   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14256 echo "configure:14257: checking for Berkeley db.h" >&5
14257   for header in "db/db.h" "db.h"; do
14258     case "$opsys" in
14259         *freebsd*)
14260     cat > conftest.$ac_ext <<EOF
14261 #line 14262 "configure"
14262 #include "confdefs.h"
14263
14264 #include <stdlib.h>
14265 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14266 #ifdef HAVE_INTTYPES_H
14267 #define __BIT_TYPES_DEFINED__
14268 #include <inttypes.h>
14269 #endif
14270 #endif
14271 #include <$header>
14272
14273 int main() {
14274
14275 ; return 0; }
14276 EOF
14277 if { (eval echo configure:14278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14278   rm -rf conftest*
14279   db_h_file="$header"; break
14280 else
14281   echo "configure: failed program was:" >&5
14282   cat conftest.$ac_ext >&5
14283 fi
14284 rm -f conftest*
14285         ;;
14286         *)
14287     cat > conftest.$ac_ext <<EOF
14288 #line 14289 "configure"
14289 #include "confdefs.h"
14290
14291 #include <stdlib.h>
14292 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14293 #ifdef HAVE_INTTYPES_H
14294 #define __BIT_TYPES_DEFINED__
14295 #include <inttypes.h>
14296 typedef uint8_t  u_int8_t;
14297 typedef uint16_t u_int16_t;
14298 typedef uint32_t u_int32_t;
14299 #ifdef WE_DONT_NEED_QUADS
14300 typedef uint64_t u_int64_t;
14301 #endif
14302 #endif
14303 #endif
14304 #include <$header>
14305
14306 int main() {
14307
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14311   rm -rf conftest*
14312   db_h_file="$header"; break
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316 fi
14317 rm -f conftest*
14318         ;;
14319         esac
14320   done
14321   if test -z "$db_h_file"
14322   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14323   else echo "$ac_t""$db_h_file" 1>&6
14324   fi
14325
14326   if test "$with_database_berkdb" != "no"; then
14327     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14328 echo "configure:14329: checking for Berkeley DB version" >&5
14329     cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 #include <$db_h_file>
14333 #if DB_VERSION_MAJOR > 1
14334 yes
14335 #endif
14336
14337 EOF
14338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14339   egrep "yes" >/dev/null 2>&1; then
14340   rm -rf conftest*
14341   cat > conftest.$ac_ext <<EOF
14342 #line 14343 "configure"
14343 #include "confdefs.h"
14344 #include <$db_h_file>
14345 #if DB_VERSION_MAJOR > 2
14346 yes
14347 #endif
14348
14349 EOF
14350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14351   egrep "yes" >/dev/null 2>&1; then
14352   rm -rf conftest*
14353   echo "$ac_t""3" 1>&6; dbfunc=db_create
14354 else
14355   rm -rf conftest*
14356   
14357     echo "$ac_t""2" 1>&6; dbfunc=db_open
14358 fi
14359 rm -f conftest*
14360
14361 else
14362   rm -rf conftest*
14363   
14364     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14365 fi
14366 rm -f conftest*
14367
14368     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14369 echo "configure:14370: checking for $dbfunc" >&5
14370
14371 cat > conftest.$ac_ext <<EOF
14372 #line 14373 "configure"
14373 #include "confdefs.h"
14374 /* System header to define __stub macros and hopefully few prototypes,
14375     which can conflict with char $dbfunc(); below.  */
14376 #include <assert.h>
14377 /* Override any gcc2 internal prototype to avoid an error.  */
14378 /* We use char because int might match the return type of a gcc2
14379     builtin and then its argument prototype would still apply.  */
14380 char $dbfunc();
14381
14382 int main() {
14383
14384 /* The GNU C library defines this for functions which it implements
14385     to always fail with ENOSYS.  Some functions are actually named
14386     something starting with __ and the normal name is an alias.  */
14387 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14388 choke me
14389 #else
14390 $dbfunc();
14391 #endif
14392
14393 ; return 0; }
14394 EOF
14395 if { (eval echo configure:14396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14396   rm -rf conftest*
14397   eval "ac_cv_func_$dbfunc=yes"
14398 else
14399   echo "configure: failed program was:" >&5
14400   cat conftest.$ac_ext >&5
14401   rm -rf conftest*
14402   eval "ac_cv_func_$dbfunc=no"
14403 fi
14404 rm -f conftest*
14405
14406 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14407   echo "$ac_t""yes" 1>&6
14408   with_database_berkdb=yes need_libdb=no
14409 else
14410   echo "$ac_t""no" 1>&6
14411
14412     
14413 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14414 echo "configure:14415: checking for $dbfunc in -ldb" >&5
14415 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14416
14417 xe_check_libs=" -ldb "
14418 cat > conftest.$ac_ext <<EOF
14419 #line 14420 "configure"
14420 #include "confdefs.h"
14421 /* Override any gcc2 internal prototype to avoid an error.  */
14422 /* We use char because int might match the return type of a gcc2
14423     builtin and then its argument prototype would still apply.  */
14424 char $dbfunc();
14425
14426 int main() {
14427 $dbfunc()
14428 ; return 0; }
14429 EOF
14430 if { (eval echo configure:14431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14431   rm -rf conftest*
14432   eval "ac_cv_lib_$ac_lib_var=yes"
14433 else
14434   echo "configure: failed program was:" >&5
14435   cat conftest.$ac_ext >&5
14436   rm -rf conftest*
14437   eval "ac_cv_lib_$ac_lib_var=no"
14438 fi
14439 rm -f conftest*
14440 xe_check_libs=""
14441
14442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14443   echo "$ac_t""yes" 1>&6
14444   with_database_berkdb=yes need_libdb=yes
14445 else
14446   echo "$ac_t""no" 1>&6
14447 fi
14448
14449
14450 fi
14451
14452   fi
14453
14454   if test "$with_database_berkdb" = "yes"; then
14455     { test "$extra_verbose" = "yes" && cat << EOF
14456     Defining DB_H_FILE = "$db_h_file"
14457 EOF
14458 cat >> confdefs.h <<EOF
14459 #define DB_H_FILE "$db_h_file"
14460 EOF
14461 }
14462
14463     { test "$extra_verbose" = "yes" && cat << \EOF
14464     Defining HAVE_BERKELEY_DB
14465 EOF
14466 cat >> confdefs.h <<\EOF
14467 #define HAVE_BERKELEY_DB 1
14468 EOF
14469 }
14470
14471     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14472   else with_database_berkdb=no
14473   fi
14474 fi
14475
14476 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14477      != "no no no"; then
14478   { test "$extra_verbose" = "yes" && cat << \EOF
14479     Defining HAVE_DATABASE
14480 EOF
14481 cat >> confdefs.h <<\EOF
14482 #define HAVE_DATABASE 1
14483 EOF
14484 }
14485
14486   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14487    echo "    xemacs will be linked with \"database.o\""
14488  fi
14489 fi
14490
14491 if test "$with_socks" = "yes"; then
14492   
14493 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14494 echo "configure:14495: checking for SOCKSinit in -lsocks" >&5
14495 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14496
14497 xe_check_libs=" -lsocks "
14498 cat > conftest.$ac_ext <<EOF
14499 #line 14500 "configure"
14500 #include "confdefs.h"
14501 /* Override any gcc2 internal prototype to avoid an error.  */
14502 /* We use char because int might match the return type of a gcc2
14503     builtin and then its argument prototype would still apply.  */
14504 char SOCKSinit();
14505
14506 int main() {
14507 SOCKSinit()
14508 ; return 0; }
14509 EOF
14510 if { (eval echo configure:14511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14511   rm -rf conftest*
14512   eval "ac_cv_lib_$ac_lib_var=yes"
14513 else
14514   echo "configure: failed program was:" >&5
14515   cat conftest.$ac_ext >&5
14516   rm -rf conftest*
14517   eval "ac_cv_lib_$ac_lib_var=no"
14518 fi
14519 rm -f conftest*
14520 xe_check_libs=""
14521
14522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14523   echo "$ac_t""yes" 1>&6
14524     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14525     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14526   { test "$extra_verbose" = "yes" && cat << EOF
14527     Defining $ac_tr_lib
14528 EOF
14529 cat >> confdefs.h <<EOF
14530 #define $ac_tr_lib 1
14531 EOF
14532 }
14533
14534   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14535
14536 else
14537   echo "$ac_t""no" 1>&6
14538 fi
14539
14540
14541   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14542     Defining HAVE_SOCKS
14543 EOF
14544 cat >> confdefs.h <<\EOF
14545 #define HAVE_SOCKS 1
14546 EOF
14547 }
14548
14549 fi
14550
14551 if test "$usage_tracking" = "yes"; then
14552   { test "$extra_verbose" = "yes" && cat << \EOF
14553     Defining USAGE_TRACKING
14554 EOF
14555 cat >> confdefs.h <<\EOF
14556 #define USAGE_TRACKING 1
14557 EOF
14558 }
14559
14560   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14561 fi
14562
14563 if test "$with_modules" != "no"; then
14564   echo "checking for module support" 1>&6
14565 echo "configure:14566: checking for module support" >&5
14566
14567     if test "$with_msw" = "yes"; then
14568     have_dl=yes;
14569   else
14570         case "$opsys" in
14571       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14572     Defining HAVE_DYLD
14573 EOF
14574 cat >> confdefs.h <<\EOF
14575 #define HAVE_DYLD 1
14576 EOF
14577 }
14578  ;;
14579       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14580 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14581 echo "configure:14582: checking for dlfcn.h" >&5
14582
14583 cat > conftest.$ac_ext <<EOF
14584 #line 14585 "configure"
14585 #include "confdefs.h"
14586 #include <dlfcn.h>
14587 EOF
14588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14589 { (eval echo configure:14590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14591 if test -z "$ac_err"; then
14592   rm -rf conftest*
14593   eval "ac_cv_header_$ac_safe=yes"
14594 else
14595   echo "$ac_err" >&5
14596   echo "configure: failed program was:" >&5
14597   cat conftest.$ac_ext >&5
14598   rm -rf conftest*
14599   eval "ac_cv_header_$ac_safe=no"
14600 fi
14601 rm -f conftest*
14602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14603   echo "$ac_t""yes" 1>&6
14604   
14605            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14606 echo "configure:14607: checking for dlopen in -lc" >&5
14607            cat > conftest.$ac_ext <<EOF
14608 #line 14609 "configure"
14609 #include "confdefs.h"
14610 #include <dlfcn.h>
14611 int main() {
14612               dlopen ("", 0);
14613 ; return 0; }
14614 EOF
14615 if { (eval echo configure:14616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14616   rm -rf conftest*
14617    have_dl=yes 
14618 else
14619   echo "configure: failed program was:" >&5
14620   cat conftest.$ac_ext >&5
14621   rm -rf conftest*
14622   
14623                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14624 echo "configure:14625: checking for dlopen in -ldl" >&5
14625                ac_save_LIBS="$LIBS"
14626                LIBS="-ldl $LIBS"
14627                cat > conftest.$ac_ext <<EOF
14628 #line 14629 "configure"
14629 #include "confdefs.h"
14630 #include <dlfcn.h>
14631 int main() {
14632                  dlopen ("", 0);
14633 ; return 0; }
14634 EOF
14635 if { (eval echo configure:14636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14636   rm -rf conftest*
14637    have_dl=yes 
14638 else
14639   echo "configure: failed program was:" >&5
14640   cat conftest.$ac_ext >&5
14641   rm -rf conftest*
14642   LIBS="$ac_save_LIBS"
14643 fi
14644 rm -f conftest*
14645                ac_save_LIBS=
14646 fi
14647 rm -f conftest*
14648 else
14649   echo "$ac_t""no" 1>&6
14650 fi
14651
14652         if test -n "$have_dl"; then
14653            { test "$extra_verbose" = "yes" && cat << \EOF
14654     Defining HAVE_DLOPEN
14655 EOF
14656 cat >> confdefs.h <<\EOF
14657 #define HAVE_DLOPEN 1
14658 EOF
14659 }
14660
14661         else
14662            
14663 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14664 echo "configure:14665: checking for shl_load in -ldld" >&5
14665 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14666
14667 xe_check_libs=" -ldld "
14668 cat > conftest.$ac_ext <<EOF
14669 #line 14670 "configure"
14670 #include "confdefs.h"
14671 /* Override any gcc2 internal prototype to avoid an error.  */
14672 /* We use char because int might match the return type of a gcc2
14673     builtin and then its argument prototype would still apply.  */
14674 char shl_load();
14675
14676 int main() {
14677 shl_load()
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   eval "ac_cv_lib_$ac_lib_var=yes"
14683 else
14684   echo "configure: failed program was:" >&5
14685   cat conftest.$ac_ext >&5
14686   rm -rf conftest*
14687   eval "ac_cv_lib_$ac_lib_var=no"
14688 fi
14689 rm -f conftest*
14690 xe_check_libs=""
14691
14692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14693   echo "$ac_t""yes" 1>&6
14694   libdl=dld have_dl=yes;
14695            { test "$extra_verbose" = "yes" && cat << \EOF
14696     Defining HAVE_SHL_LOAD
14697 EOF
14698 cat >> confdefs.h <<\EOF
14699 #define HAVE_SHL_LOAD 1
14700 EOF
14701 }
14702
14703 else
14704   echo "$ac_t""no" 1>&6
14705
14706 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14707 echo "configure:14708: checking for dld_init in -ldld" >&5
14708 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14709
14710 xe_check_libs=" -ldld "
14711 cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 /* Override any gcc2 internal prototype to avoid an error.  */
14715 /* We use char because int might match the return type of a gcc2
14716     builtin and then its argument prototype would still apply.  */
14717 char dld_init();
14718
14719 int main() {
14720 dld_init()
14721 ; return 0; }
14722 EOF
14723 if { (eval echo configure:14724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14724   rm -rf conftest*
14725   eval "ac_cv_lib_$ac_lib_var=yes"
14726 else
14727   echo "configure: failed program was:" >&5
14728   cat conftest.$ac_ext >&5
14729   rm -rf conftest*
14730   eval "ac_cv_lib_$ac_lib_var=no"
14731 fi
14732 rm -f conftest*
14733 xe_check_libs=""
14734
14735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14736   echo "$ac_t""yes" 1>&6
14737   libdl=dld have_dl=yes;
14738            { test "$extra_verbose" = "yes" && cat << \EOF
14739     Defining HAVE_DLD_INIT
14740 EOF
14741 cat >> confdefs.h <<\EOF
14742 #define HAVE_DLD_INIT 1
14743 EOF
14744 }
14745
14746 else
14747   echo "$ac_t""no" 1>&6
14748 fi
14749
14750
14751 fi
14752
14753
14754         fi
14755     ;;
14756     esac
14757   fi 
14758   if test -n "$have_dl"; then
14759         
14760 dll_ld=
14761 dll_ldflags=
14762 dll_cflags=
14763 dll_post=
14764 dll_ldo="-o"
14765 ld_dynamic_link_flags=
14766 xehost=$canonical
14767 xealias=$internal_configuration
14768
14769 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14770 echo "configure:14771: checking how to build dynamic libraries for ${xehost}" >&5
14771 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14772 case "$xehost" in
14773 *-*-linux-gnu*) ;;
14774 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14775 esac
14776
14777 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14778 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14779 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14780
14781 case "$xehost_os" in
14782 aix3*)
14783   # AIX sometimes has problems with the GCC collect2 program.  For some
14784   # reason, if we set the COLLECT_NAMES environment variable, the problems
14785   # vanish in a puff of smoke.
14786   if test "${COLLECT_NAMES+set}" != set; then
14787     COLLECT_NAMES=
14788     export COLLECT_NAMES
14789   fi
14790   ;;
14791 esac
14792
14793 # Now see if the compiler is really GCC.
14794 if test "$GCC" = "yes"; then
14795   XEGCC=yes
14796 else
14797   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14798 echo "configure:14799: checking checking whether we are using GNU C" >&5
14799   cat > conftest.$ac_ext <<EOF
14800 #line 14801 "configure"
14801 #include "confdefs.h"
14802
14803 #ifdef __GNUC__
14804   yes;
14805 #endif
14806
14807 EOF
14808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14809   egrep "yes" >/dev/null 2>&1; then
14810   rm -rf conftest*
14811   XEGCC=yes
14812 else
14813   rm -rf conftest*
14814   XEGCC=no
14815 fi
14816 rm -f conftest*
14817
14818   echo "$ac_t""${XEGCC}" 1>&6
14819 fi
14820
14821 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14822 echo "configure:14823: checking how to produce PIC code" >&5
14823 wl=
14824
14825 can_build_shared=yes
14826 if test "$XEGCC" = yes -o "$__ICC" = yes; then
14827   wl='-Wl,'
14828
14829   case "$xehost_os" in
14830   aix[3-9]* | irix[5-9]* | osf[3-9])
14831     # PIC is the default for these OSes.
14832     ;;
14833
14834   os2*)
14835     # We can build DLLs from non-PIC.
14836     ;;
14837   amigaos*)
14838     # FIXME: we need at least 68020 code to build shared libraries, but
14839     # adding the `-m68020' flag to GCC prevents building anything better,
14840     # like `-m68040'.
14841     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14842     ;;
14843   *cygwin* | *mingw* )
14844     # PIC is the default
14845     ;;
14846   *)
14847     dll_cflags='-fPIC'
14848     ;;
14849   esac
14850 else
14851   # PORTME Check for PIC flags for the system compiler.
14852   case "$xehost_os" in
14853   hpux9* | hpux1[0-9]*)
14854     # Is there a better link_static_flag that works with the bundled CC?
14855     wl='-Wl,'
14856     dll_cflags='+Z'
14857     ;;
14858
14859   irix[5-9]*)
14860     wl='-Wl,'
14861     # PIC (with -KPIC) is the default.
14862     ;;
14863
14864   os2*)
14865     # We can build DLLs from non-PIC.
14866     ;;
14867
14868   osf[3-9]*)
14869     # All OSF/1 code is PIC.
14870     wl='-Wl,'
14871     ;;
14872
14873   aix[3-9]*)
14874     # All AIX code is PIC.
14875     wl='-Wl,'
14876     ;;
14877
14878   sco3.2v5*)
14879     dll_cflags='-belf -Kpic'
14880     wl='-Wl,'
14881     ;;
14882
14883   unixware*)
14884     dll_cflags="-KPIC"
14885     wl="-Wl,"
14886     ;;
14887
14888   sysv4*)
14889     dll_cflags="-KPIC"
14890     wl="-Wl,"
14891     ;;
14892
14893   sysv5*)
14894     dll_cflags="-KPIC"
14895     wl="-Wl,"
14896     ;;
14897
14898   solaris2*)
14899     dll_cflags='-KPIC'
14900     wl='-Wl,'
14901     ;;
14902
14903   sunos4*)
14904     dll_cflags='-PIC'
14905     wl='-Qoption ld '
14906     ;;
14907
14908   uts4*)
14909     dll_cflags='-pic'
14910     ;;
14911
14912   *)
14913     can_build_shared=no
14914     ;;
14915   esac
14916 fi
14917
14918 if test -n "$dll_cflags"; then
14919   echo "$ac_t""${dll_cflags}" 1>&6
14920
14921   # Check to make sure the dll_cflags actually works.
14922   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14923 echo "configure:14924: checking if PIC flag ${dll_cflags} really works" >&5
14924   save_CFLAGS="$CFLAGS"
14925   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14926   cat > conftest.$ac_ext <<EOF
14927 #line 14928 "configure"
14928 #include "confdefs.h"
14929
14930 int main() {
14931 int x=0;
14932 ; return 0; }
14933 EOF
14934 if { (eval echo configure:14935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14935   rm -rf conftest*
14936   
14937     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14938     # reports no error.  So, we need to grep stderr for (Bundled).
14939     if grep '(Bundled)' config.log >/dev/null; then
14940       echo "$ac_t""no" 1>&6
14941       can_build_shared=no
14942       dll_cflags=
14943     else
14944       echo "$ac_t""yes" 1>&6
14945     fi
14946 else
14947   echo "configure: failed program was:" >&5
14948   cat conftest.$ac_ext >&5
14949   rm -rf conftest*
14950   echo "$ac_t""no" 1>&6
14951     can_build_shared=no
14952     dll_cflags=
14953 fi
14954 rm -f conftest*
14955   CFLAGS="$save_CFLAGS"
14956 else
14957   echo "$ac_t""none" 1>&6
14958 fi
14959
14960 if test "$can_build_shared" = "yes"; then
14961 cc_produces_so=no
14962 xldf=
14963 xcldf=
14964 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14965 echo "configure:14966: checking if C compiler can produce shared libraries" >&5
14966 if test "$XEGCC" = yes -o "$__ICC" = yes; then
14967   xcldf="-shared"
14968   xldf="-shared"
14969 else # Not using GCC
14970   case "$xehost_os" in
14971     aix[3-9]*)
14972       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14973       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14974       ;;
14975
14976     freebsd2* | netbsd* | openbsd*)
14977       xldf="-Bshareable"
14978       xcldf="${wl}-Bshareable"
14979       ;;
14980
14981     freebsd3*)
14982       xcldf="-shared"
14983       ;;
14984
14985     hpux*)
14986       xldf="-b +s"
14987       xcldf="${wl}-b ${wl}+s"
14988       ;;
14989
14990     irix[5-9]* | osf[3-9]*)
14991       xcldf="${wl}-shared"
14992       xldf="-shared"
14993       ;;
14994
14995     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14996       xcldf="-G"
14997       xldf="-G"
14998       ;;
14999
15000     sunos4*)
15001       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15002       xldf="-assert pure-text -Bstatic"
15003       ;;
15004   esac
15005 fi # End if if we are using gcc
15006
15007 if test -n "$xcldf"; then
15008   save_LDFLAGS=$LDFLAGS
15009   save_LIBS=$LIBS
15010   save_xe_libs=$xe_libs
15011   LDFLAGS="$xcldf $LDFLAGS"
15012   LIBS=
15013   xe_libs=
15014   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15015   cat > conftest.$ac_ext <<EOF
15016 #line 15017 "configure"
15017 #include "confdefs.h"
15018
15019 int main() {
15020 int x=0;
15021 ; return 0; }
15022 EOF
15023 if { (eval echo configure:15024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15024   rm -rf conftest*
15025   cc_produces_so=yes
15026 else
15027   echo "configure: failed program was:" >&5
15028   cat conftest.$ac_ext >&5
15029   rm -rf conftest*
15030   cc_produces_so=no
15031 fi
15032 rm -f conftest*
15033   LDFLAGS=$save_LDFLAGS
15034   LIBS=$save_LIBS
15035   xe_libs=$save_xe_libs
15036   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15037 else
15038   cc_produces_so=no
15039 fi
15040 echo "$ac_t""${cc_produces_so}" 1>&6
15041
15042 LTLD=$LD
15043 if test -z "$LTLD"; then
15044   ac_prog=ld
15045   if test "$XEGCC" = yes; then
15046     # Check if gcc -print-prog-name=ld gives a path.
15047     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15048 echo "configure:15049: checking for ld used by GCC" >&5
15049     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15050     case "$ac_prog" in
15051     # Accept absolute paths.
15052     /*)
15053       if test -z "$LTLD"; then
15054 #        case "$ac_prog" in
15055 #          *gcc-lib*) LTLD="$CC"
15056 #                     ;;
15057 #          *)
15058          LTLD="$ac_prog"
15059 #                     ;;
15060 #        esac
15061       fi
15062       ;;
15063     "")
15064       # If it fails, then pretend we aren't using GCC.
15065       ac_prog=ld
15066       ;;
15067     *)
15068       # If it is relative, then search for the first ld in PATH.
15069       with_gnu_ld=unknown
15070       ;;
15071     esac
15072   else
15073     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15074 echo "configure:15075: checking for GNU ld" >&5
15075   fi
15076
15077   if test -z "$LTLD"; then
15078     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15079     for ac_dir in $PATH; do
15080       test -z "$ac_dir" && ac_dir=.
15081       if test -f "$ac_dir/$ac_prog"; then
15082         LTLD="$ac_dir/$ac_prog"
15083         # Check to see if the program is GNU ld.  I'd rather use --version,
15084         # but apparently some GNU ld's only accept -v.
15085         # Break only if it was the GNU/non-GNU ld that we prefer.
15086         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15087           xe_gnu_ld=yes
15088         else
15089           xe_gnu_ld=no
15090         fi
15091       fi
15092     done
15093     IFS="$ac_save_ifs"
15094   fi
15095
15096   if test -n "$LTLD"; then
15097     echo "$ac_t""${LTLD}" 1>&6
15098   else
15099     echo "$ac_t""no" 1>&6
15100   fi
15101
15102   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15103     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15104     exit 1
15105   fi
15106 fi
15107
15108 ld_dynamic_link_flags=
15109
15110 # Check to see if it really is or isn't GNU ld.
15111 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15112 echo "configure:15113: checking if the linker is GNU ld" >&5
15113 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15114 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15115   xe_gnu_ld=yes
15116 else
15117   xe_gnu_ld=no
15118 fi
15119 echo "$ac_t""${xe_gnu_ld}" 1>&6
15120
15121 case "$xehost_os" in
15122   amigaos* | sunos4*)
15123     # On these operating systems, we should treat GNU ld like the system ld.
15124     gnu_ld_acts_native=yes
15125     ;;
15126   *)
15127     gnu_ld_acts_native=no
15128     ;;
15129 esac
15130
15131 if test "$cc_produces_so" = "yes"; then
15132   dll_ld=$CC
15133   dll_ldflags=$xcldf
15134   can_build_shared=yes
15135   ld_shlibs=yes
15136 else
15137   # OK - only NOW do we futz about with ld.
15138   # See if the linker supports building shared libraries.
15139   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15140 echo "configure:15141: checking whether the linker supports shared libraries" >&5
15141   dll_ld=$CC
15142   dll_ldflags=$LDFLAGS
15143   ld_shlibs=yes
15144   can_build_shared=yes
15145   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15146     # See if GNU ld supports shared libraries.
15147     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15148       dll_ld=$CC
15149       dll_ldflags="-shared"
15150       ld_shlibs=yes
15151     else
15152       ld_shlibs=no
15153     fi
15154   else
15155     # PORTME fill in a description of your system's linker (not GNU ld)
15156     case "$xehost_os" in
15157     aix3*)
15158       dll_ld=$LTLD
15159       dll_ldflags=$xldf
15160       ;;
15161
15162     aix[4-9]*)
15163       dll_ldflags=$xcldf
15164       ;;
15165
15166     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15167     # support.  Future versions do this automatically, but an explicit c++rt0.o
15168     # doesn't break anything, and helps significantly (at the cost of a little
15169     # extra space).
15170     freebsd2.2*)
15171       dll_ld=$LTLD
15172       dll_ldflags=$xldf
15173       dll_post="/usr/lib/c++rt0.o"
15174       ;;
15175
15176     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15177     freebsd2*)
15178       dll_ld=$LTLD
15179       dll_ldflags="-Bshareable"
15180       ;;
15181
15182     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15183     freebsd3*)
15184       dll_ldflags="-shared"
15185       ;;
15186
15187     hpux*)
15188       dll_ld=$LTLD
15189       dll_ldflags=$xldf
15190       ;;
15191
15192     irix[5-9]*)
15193       dll_ld=$LTLD
15194       dll_ldflags=$xldf
15195       ;;
15196
15197     netbsd*)
15198       # Tested with NetBSD 1.2 ld
15199       dll_ld=$LTLD
15200       dll_ldflags=$xldf
15201       ;;
15202
15203     openbsd*)
15204       dll_ld=$LTLD
15205       dll_ldflags=$xldf
15206       ;;
15207
15208     osf3* | osf4*)
15209       dll_ld=$LTLD
15210       dll_ldflags=$xldf
15211       ;;
15212
15213     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15214     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15215       dll_ld=$LTLD
15216       case "$dll_ld" in
15217         *gcc*) dll_ldflags="-shared"
15218                dll_ld=$CC
15219                ;;
15220         *)     dll_ldflags="-G"
15221                ;;
15222       esac
15223       ;;
15224
15225     sunos4*)
15226       if test "$XEGCC" = yes; then
15227         dll_ld=$CC
15228       else
15229         dll_ld=$LTLD
15230       fi
15231       dll_ldflags=$xldf
15232       ;;
15233
15234     uts4*)
15235       dll_ld=$LTLD
15236       dll_ldflags="-G"
15237       ;;
15238
15239     bsdi*)
15240       dll_ldflags="-r"
15241       dll_ld="shlicc2"
15242       ;;
15243
15244     *)
15245       ld_shlibs=no
15246       can_build_shared=no
15247       ;;
15248     esac
15249   fi
15250   echo "$ac_t""${ld_shlibs}" 1>&6
15251   if test "$ld_shlibs" = "no"; then
15252     can_build_shared=no
15253   fi
15254 fi # End of if cc_produces_so = no
15255
15256
15257 if test "$xe_gnu_ld" = yes; then
15258   if test "$ld_shlibs" = yes; then
15259     ld_dynamic_link_flags="${wl}-export-dynamic"
15260   fi
15261 fi
15262
15263 if test -z "$ld_dynamic_link_flags"; then
15264   case "$xehost_os" in
15265   aix[3-9]*)
15266     ld_dynamic_link_flags=
15267     ;;
15268
15269   freebsd2.2*)
15270     ld_dynamic_link_flags=
15271     ;;
15272
15273   freebsd2*)
15274     ld_dynamic_link_flags=
15275     ;;
15276
15277   freebsd3*)
15278     ld_dynamic_link_flags=
15279     ;;
15280
15281   hpux*)
15282     ld_dynamic_link_flags="${wl}-E"
15283     ;;
15284
15285   irix[5-9]*)
15286     ld_dynamic_link_flags=
15287     ;;
15288
15289   netbsd*)
15290     ld_dynamic_link_flags=
15291     ;;
15292
15293   openbsd*)
15294     ld_dynamic_link_flags=
15295     ;;
15296
15297   osf3* | osf4*)
15298     ld_dynamic_link_flags=
15299     ;;
15300
15301   solaris2* | solaris7*)
15302     ld_dynamic_link_flags=
15303     ;;
15304
15305   sco3.2v5* | unixware* | sysv5* | sysv4*)
15306     ld_dynamic_link_flags="${wl}-Bexport"
15307     ;;
15308
15309   sunos4*)
15310     ld_dynamic_link_flags=
15311     ;;
15312
15313   uts4*)
15314     ld_dynamic_link_flags=
15315     ;;
15316
15317   bsdi*)
15318     ld_dynamic_link_flags=
15319     ;;
15320
15321   esac
15322 fi # End of if -z ld_dynamic_link_flags
15323 fi # End of if test "$can_build_shared" = "yes"
15324
15325
15326
15327
15328
15329
15330
15331
15332   fi
15333
15334   if test "$can_build_shared" = "yes"; then
15335     { test "$extra_verbose" = "yes" && cat << \EOF
15336     Defining HAVE_SHLIB
15337 EOF
15338 cat >> confdefs.h <<\EOF
15339 #define HAVE_SHLIB 1
15340 EOF
15341 }
15342
15343     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15344    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15345  fi
15346     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15347     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15348     for ac_func in dlerror _dlerror
15349 do
15350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15351 echo "configure:15352: checking for $ac_func" >&5
15352
15353 cat > conftest.$ac_ext <<EOF
15354 #line 15355 "configure"
15355 #include "confdefs.h"
15356 /* System header to define __stub macros and hopefully few prototypes,
15357     which can conflict with char $ac_func(); below.  */
15358 #include <assert.h>
15359 /* Override any gcc2 internal prototype to avoid an error.  */
15360 /* We use char because int might match the return type of a gcc2
15361     builtin and then its argument prototype would still apply.  */
15362 char $ac_func();
15363
15364 int main() {
15365
15366 /* The GNU C library defines this for functions which it implements
15367     to always fail with ENOSYS.  Some functions are actually named
15368     something starting with __ and the normal name is an alias.  */
15369 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15370 choke me
15371 #else
15372 $ac_func();
15373 #endif
15374
15375 ; return 0; }
15376 EOF
15377 if { (eval echo configure:15378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15378   rm -rf conftest*
15379   eval "ac_cv_func_$ac_func=yes"
15380 else
15381   echo "configure: failed program was:" >&5
15382   cat conftest.$ac_ext >&5
15383   rm -rf conftest*
15384   eval "ac_cv_func_$ac_func=no"
15385 fi
15386 rm -f conftest*
15387
15388 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15389   echo "$ac_t""yes" 1>&6
15390     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15391   { test "$extra_verbose" = "yes" && cat << EOF
15392     Defining $ac_tr_func
15393 EOF
15394 cat >> confdefs.h <<EOF
15395 #define $ac_tr_func 1
15396 EOF
15397 }
15398  
15399 else
15400   echo "$ac_t""no" 1>&6
15401 fi
15402 done
15403
15404     with_modules=yes
15405   else
15406     if test "$with_modules" = "yes"; then
15407       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15408     else
15409       echo "configure: warning: "Module support cannot be provided."" 1>&2
15410     fi
15411     with_modules=no
15412   fi
15413 fi
15414
15415 cat > conftest.$ac_ext <<EOF
15416 #line 15417 "configure"
15417 #include "confdefs.h"
15418 int main(int c,char *v[]){return 0;}
15419 EOF
15420 if { (eval echo configure:15421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15421 then
15422   :
15423 else
15424   conftest_rc="$?"
15425   echo "configure: failed program was:" >&5
15426   cat conftest.$ac_ext >&5
15427   rm -fr conftest*
15428   
15429   echo ""
15430   echo "*** PANIC *** configure forgot how to build working executables!"
15431   echo ""
15432   echo "*** This is most commonly due to an unforeseen environment, causing"
15433   echo "*** configure to incorrectly compute the sequence of libraries to link."
15434   echo "*** Please examine the tail of config.log for runtime errors."
15435   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15436   echo "*** Often adding or removing explicit options in the configure"
15437   echo "*** invocation can work around this kind of problem.  If so, please"
15438   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15439   echo "***"
15440   echo "*** Other possible causes are inability to write to the file system"
15441   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15442   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15443   echo "*** necessary.  On other systems, try telling configure where to find"
15444   echo "*** the shared libraries using the --site-runtime-libraries option."
15445   echo "***"
15446   echo "*** Another way to shoot yourself in the foot is to specify"
15447   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15448   echo "*** system.  Don't do that."
15449   exit 1
15450 fi
15451 rm -fr conftest*
15452
15453 if test "$win32_processes" = "yes"; then
15454   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15455    echo "    xemacs will be linked with \"process-nt.o\""
15456  fi
15457 else
15458   { test "$extra_verbose" = "yes" && cat << \EOF
15459     Defining HAVE_UNIX_PROCESSES
15460 EOF
15461 cat >> confdefs.h <<\EOF
15462 #define HAVE_UNIX_PROCESSES 1
15463 EOF
15464 }
15465
15466   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15467    echo "    xemacs will be linked with \"process-unix.o\""
15468  fi
15469 fi
15470
15471
15472
15473 T=""
15474 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15475 CFLAGS="$T"
15476
15477
15478 T=""
15479 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15480 extra_objs="$T"
15481
15482
15483 T=""
15484 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
15485 c_switch_general="$T"
15486
15487
15488 T=""
15489 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
15490 c_switch_window_system="$T"
15491
15492
15493 T=""
15494 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15495 c_switch_all="$T"
15496
15497
15498 T=""
15499 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
15500 ld_switch_general="$T"
15501
15502
15503 T=""
15504 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15505 ld_switch_window_system="$T"
15506
15507
15508 T=""
15509 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15510 ld_switch_all="$T"
15511
15512
15513 T=""
15514 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15515 ld_libs_general="$T"
15516
15517
15518 T=""
15519 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
15520 ld_libs_window_system="$T"
15521
15522
15523 T=""
15524 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15525 ld_libs_all="$T"
15526
15527
15528
15529 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15530 internal_makefile_list="Makefile.in"
15531 SUBDIR_MAKEFILES=''
15532 test -d lock || mkdir lock
15533 for dir in $MAKE_SUBDIR; do
15534   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15535         test -d "$d" || mkdir "$d"; cd "$d"
15536       done ) ;;
15537    * ) test -d "$dir" || mkdir "$dir" ;;
15538   esac
15539   
15540 T=""
15541 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15542 SUBDIR_MAKEFILES="$T"
15543
15544   
15545 T=""
15546 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15547 internal_makefile_list="$T"
15548
15549 done
15550
15551
15552
15553
15554 for dir in src/s src/m; do
15555   if test ! -d "$dir" ; then
15556     echo Making symbolic link to "$srcdir/$dir"
15557     ${LN_S} "$srcdir/$dir" "$dir"
15558   fi
15559 done
15560
15561 if test "$extra_verbose" = "yes"; then
15562   echo ""
15563   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
15564   echo ""
15565 fi
15566
15567
15568 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15569   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15570   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15571 fi
15572
15573 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15574   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15575   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15576 fi
15577
15578 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15579   test "$extra_verbose" = "yes" && echo "creating TAGS"
15580   echo "\f
15581 $srcdir/TAGS,include" > "TAGS"
15582 fi
15583
15584 if test "$__SUNPRO_C" = "yes"; then
15585   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15586   ( echo "# For use with Sun WorkShop's Source browser."
15587     echo "# See sbquery(1) and sbinit(4) for more information"
15588     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15589   ) > .sbinit
15590 fi
15591
15592 rm -f core
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613 PREFIX=$prefix
15614 while true; do
15615   case "$PREFIX" in
15616     *\$* ) eval "PREFIX=$PREFIX" ;;
15617     *) break ;;
15618   esac
15619 done
15620
15621
15622
15623
15624 EXEC_PREFIX=$exec_prefix
15625 while true; do
15626   case "$EXEC_PREFIX" in
15627     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15628     *) break ;;
15629   esac
15630 done
15631
15632
15633
15634
15635 INFODIR=$infodir
15636 while true; do
15637   case "$INFODIR" in
15638     *\$* ) eval "INFODIR=$INFODIR" ;;
15639     *) break ;;
15640   esac
15641 done
15642
15643
15644
15645
15646 INFOPATH=$infopath
15647 while true; do
15648   case "$INFOPATH" in
15649     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15650     *) break ;;
15651   esac
15652 done
15653
15654
15655
15656
15657 PACKAGE_PATH=$package_path
15658 while true; do
15659   case "$PACKAGE_PATH" in
15660     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15661     *) break ;;
15662   esac
15663 done
15664
15665
15666
15667
15668 LISPDIR=$lispdir
15669 while true; do
15670   case "$LISPDIR" in
15671     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15672     *) break ;;
15673   esac
15674 done
15675
15676
15677
15678
15679 MODULEDIR=$moduledir
15680 while true; do
15681   case "$MODULEDIR" in
15682     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15683     *) break ;;
15684   esac
15685 done
15686
15687
15688
15689
15690 SITELISPDIR=$sitelispdir
15691 while true; do
15692   case "$SITELISPDIR" in
15693     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15694     *) break ;;
15695   esac
15696 done
15697
15698
15699
15700
15701 SITEMODULEDIR=$sitemoduledir
15702 while true; do
15703   case "$SITEMODULEDIR" in
15704     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15705     *) break ;;
15706   esac
15707 done
15708
15709
15710
15711
15712 ETCDIR=$etcdir
15713 while true; do
15714   case "$ETCDIR" in
15715     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15716     *) break ;;
15717   esac
15718 done
15719
15720
15721
15722
15723 DOCDIR=$docdir
15724 while true; do
15725   case "$DOCDIR" in
15726     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15727     *) break ;;
15728   esac
15729 done
15730
15731
15732
15733
15734 ARCHLIBDIR=$archlibdir
15735 while true; do
15736   case "$ARCHLIBDIR" in
15737     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15738     *) break ;;
15739   esac
15740 done
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15762
15763
15764
15765
15766
15767
15768
15769 : ${XEMACS_CC:=$CC}
15770
15771
15772 if test "$with_prefix" = "yes"; then
15773   { test "$extra_verbose" = "yes" && cat << \EOF
15774     Defining PREFIX_USER_DEFINED
15775 EOF
15776 cat >> confdefs.h <<\EOF
15777 #define PREFIX_USER_DEFINED 1
15778 EOF
15779 }
15780
15781 fi
15782
15783 if test "$with_site_lisp" = "no"; then
15784   { test "$extra_verbose" = "yes" && cat << \EOF
15785     Defining INHIBIT_SITE_LISP
15786 EOF
15787 cat >> confdefs.h <<\EOF
15788 #define INHIBIT_SITE_LISP 1
15789 EOF
15790 }
15791
15792 fi
15793 if test "$with_site_modules" = "no"; then
15794   { test "$extra_verbose" = "yes" && cat << \EOF
15795     Defining INHIBIT_SITE_MODULES
15796 EOF
15797 cat >> confdefs.h <<\EOF
15798 #define INHIBIT_SITE_MODULES 1
15799 EOF
15800 }
15801
15802 fi
15803
15804
15805 T=""
15806 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15807 ac_configure_args="$T"
15808
15809 { test "$extra_verbose" = "yes" && cat << EOF
15810     Defining EMACS_CONFIGURATION = "$configuration"
15811 EOF
15812 cat >> confdefs.h <<EOF
15813 #define EMACS_CONFIGURATION "$configuration"
15814 EOF
15815 }
15816
15817 { test "$extra_verbose" = "yes" && cat << EOF
15818     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15819 EOF
15820 cat >> confdefs.h <<EOF
15821 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15822 EOF
15823 }
15824
15825
15826
15827 null_string=""
15828 { test "$extra_verbose" = "yes" && cat << EOF
15829     Defining LD_SWITCH_X_SITE = $null_string
15830 EOF
15831 cat >> confdefs.h <<EOF
15832 #define LD_SWITCH_X_SITE $null_string
15833 EOF
15834 }
15835
15836 { test "$extra_verbose" = "yes" && cat << EOF
15837     Defining LD_SWITCH_X_SITE_AUX = $null_string
15838 EOF
15839 cat >> confdefs.h <<EOF
15840 #define LD_SWITCH_X_SITE_AUX $null_string
15841 EOF
15842 }
15843
15844 { test "$extra_verbose" = "yes" && cat << EOF
15845     Defining C_SWITCH_X_SITE = $null_string
15846 EOF
15847 cat >> confdefs.h <<EOF
15848 #define C_SWITCH_X_SITE $null_string
15849 EOF
15850 }
15851
15852 { test "$extra_verbose" = "yes" && cat << EOF
15853     Defining LD_SWITCH_SITE = $null_string
15854 EOF
15855 cat >> confdefs.h <<EOF
15856 #define LD_SWITCH_SITE $null_string
15857 EOF
15858 }
15859
15860 { test "$extra_verbose" = "yes" && cat << EOF
15861     Defining C_SWITCH_SITE = $null_string
15862 EOF
15863 cat >> confdefs.h <<EOF
15864 #define C_SWITCH_SITE $null_string
15865 EOF
15866 }
15867
15868
15869
15870 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15871     Defining GNU_MALLOC
15872 EOF
15873 cat >> confdefs.h <<\EOF
15874 #define GNU_MALLOC 1
15875 EOF
15876 }
15877
15878 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15879     Defining USE_SYSTEM_MALLOC
15880 EOF
15881 cat >> confdefs.h <<\EOF
15882 #define USE_SYSTEM_MALLOC 1
15883 EOF
15884 }
15885
15886 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15887     Defining USE_DEBUG_MALLOC
15888 EOF
15889 cat >> confdefs.h <<\EOF
15890 #define USE_DEBUG_MALLOC 1
15891 EOF
15892 }
15893
15894                                               { test "$extra_verbose" = "yes" && cat << \EOF
15895     Defining USE_SYSTEM_MALLOC
15896 EOF
15897 cat >> confdefs.h <<\EOF
15898 #define USE_SYSTEM_MALLOC 1
15899 EOF
15900 }
15901
15902 fi
15903 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15904     Defining I18N3
15905 EOF
15906 cat >> confdefs.h <<\EOF
15907 #define I18N3 1
15908 EOF
15909 }
15910
15911 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15912     Defining USE_GCC
15913 EOF
15914 cat >> confdefs.h <<\EOF
15915 #define USE_GCC 1
15916 EOF
15917 }
15918
15919 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15920     Defining EXTERNAL_WIDGET
15921 EOF
15922 cat >> confdefs.h <<\EOF
15923 #define EXTERNAL_WIDGET 1
15924 EOF
15925 }
15926
15927 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15928     Defining QUICK_BUILD
15929 EOF
15930 cat >> confdefs.h <<\EOF
15931 #define QUICK_BUILD 1
15932 EOF
15933 }
15934
15935 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15936     Defining PURIFY
15937 EOF
15938 cat >> confdefs.h <<\EOF
15939 #define PURIFY 1
15940 EOF
15941 }
15942
15943 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15944     Defining QUANTIFY
15945 EOF
15946 cat >> confdefs.h <<\EOF
15947 #define QUANTIFY 1
15948 EOF
15949 }
15950
15951 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15952     Defining MAIL_USE_POP
15953 EOF
15954 cat >> confdefs.h <<\EOF
15955 #define MAIL_USE_POP 1
15956 EOF
15957 }
15958
15959 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15960     Defining KERBEROS
15961 EOF
15962 cat >> confdefs.h <<\EOF
15963 #define KERBEROS 1
15964 EOF
15965 }
15966
15967 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15968     Defining HESIOD
15969 EOF
15970 cat >> confdefs.h <<\EOF
15971 #define HESIOD 1
15972 EOF
15973 }
15974
15975 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15976     Defining USE_UNION_TYPE
15977 EOF
15978 cat >> confdefs.h <<\EOF
15979 #define USE_UNION_TYPE 1
15980 EOF
15981 }
15982
15983 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15984     Defining REGEX_MALLOC
15985 EOF
15986 cat >> confdefs.h <<\EOF
15987 #define REGEX_MALLOC 1
15988 EOF
15989 }
15990
15991 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15992     Defining PDUMP
15993 EOF
15994 cat >> confdefs.h <<\EOF
15995 #define PDUMP 1
15996 EOF
15997 }
15998
15999 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16000     Defining IPV6_CANONICALIZE
16001 EOF
16002 cat >> confdefs.h <<\EOF
16003 #define IPV6_CANONICALIZE 1
16004 EOF
16005 }
16006
16007
16008
16009 (
16010 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16011 else
16012   echo "uname -a: `uname -a`"
16013 fi
16014 echo ""
16015 echo "$0 $quoted_arguments"
16016 ) > Installation
16017
16018 if test ! -z ${emacs_beta_version} ; then
16019   if test -z "${emacs_is_beta}" ; then
16020         xemacs_betaname=".${emacs_beta_version}"
16021   else
16022         xemacs_betaname="-b${emacs_beta_version}"
16023   fi
16024 else
16025   xemacs_betaname=""
16026 fi
16027
16028 (
16029 echo "
16030
16031 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16032 "
16033 echo "
16034 Compilation / Installation:"
16035 echo "  Source code location:              $srcdir"
16036 echo "  Installation prefix:               $prefix"
16037 if test -n "$site_includes"; then
16038   echo "  Additional header files:           $site_includes"
16039 fi
16040 if test -n "$site_libraries"; then
16041   echo "  Additional libraries:              $site_libraries"
16042 fi
16043 if test -n "$site_prefixes"; then
16044   echo "  Additional prefixes:               $site_prefixes"
16045 fi
16046 if test -n "$runpath"; then
16047   echo "  Runtime library search path:       $runpath"
16048 fi
16049
16050 if test -n "$opsysfile"
16051 then echo "  Operating system description file: \`$opsysfile'"
16052 else echo "  Not using any operating system description file"
16053 fi
16054 if test -n "$machfile"
16055 then echo "  Machine description file:          \`$machfile'"
16056 else echo "  Not using any machine description file"
16057 fi
16058
16059 echo "  Compiler:                          $CC $CFLAGS"
16060 case "$CC" in
16061   gcc*) echo "  Compiler version:                  `$CC --version | head -1`"
16062         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | head -1`"
16063         ;;
16064   *) case "$canonical" in
16065         *-*-aix*   ) 
16066                   realcc=`which $CC`
16067                   if test -L $realcc ; then
16068             ccdir=`dirname $realcc`
16069             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16070                     case $ccprog in
16071                 */*) realcc=$ccprog;;
16072                 *) realcc=$ccdir/$ccprog;;
16073             esac
16074           fi
16075           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16076           if test ! -z "$lpp" ; then
16077             lppstr=`lslpp -Lqc $lpp`
16078             lpplev=`echo "$lppstr" | cut -f3 -d:`
16079             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16080           fi
16081           if test ! -z "$lpplev" ; then
16082             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16083           else
16084             echo "  Compiler version:                  (unknown version)"
16085           fi
16086         ;;
16087         
16088         *-*-solaris*)
16089           ccvers=`$CC -V 2>&1 | head -1`
16090           if test ! -z "$ccvers" ; then
16091             echo "  Compiler version:                  $ccvers"
16092           fi
16093         ;;
16094
16095         alpha*-dec-osf*)
16096           ccvers=`$CC -V | tr '\n' ' '`
16097           if test ! -z "$ccvers" ; then
16098             echo "  Compiler version:                  $ccvers"
16099           fi
16100         ;;
16101
16102         mips-sgi-irix*)
16103           ccvers=`$CC -version`
16104           if test ! -z "$ccvers" ; then
16105             echo "  Compiler version:                  $ccvers"
16106           fi
16107         ;;
16108
16109                 i[3-9]86-pc-linux)
16110           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16111           if test ! -z "$ccvers" ; then
16112             echo "  Compiler version:                  $ccvers"
16113           fi
16114         ;;
16115           
16116         *) echo "  Compiler version:                  $CC on $canonical";;
16117   esac
16118 esac
16119
16120 echo "  Relocating allocator for buffers:  $rel_alloc"
16121 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16122 case "$ld_switch_site" in
16123   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16124     - Consider configuring with --pdump." ;;
16125 esac
16126
16127 case "$canonical" in
16128         *-*-linux*) 
16129           if test -f /etc/redhat-release ; then
16130             echo "  libc:                              `rpm -q glibc`";
16131           else
16132             echo "Need to guess glibc1/2/etc here";
16133           fi
16134         ;;
16135
16136         *-*-aix*) 
16137           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16138         ;;
16139
16140         *-*-solaris*)
16141           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16142           echo "  libc:                              SUNWcsl $libc"
16143
16144         ;;
16145
16146         mips-sgi-irix*)
16147           echo "  IRIX version:                      `uname -sRm`'"
16148         ;;
16149           
16150
16151         alpha*-dec-osf*)
16152                   (cd /usr/.smdb.;
16153                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16154                 echo "  libc:                              $libc"
16155                 
16156           )
16157         ;;
16158
16159         *) echo "  libc:                              system-provided libc on $canonical" ;;
16160 esac
16161
16162
16163 echo "
16164 Window System:"
16165 if test "$with_msw" = "yes"; then
16166   echo "  Compiling in support for the Microsoft window system."
16167 fi
16168 if test "$with_x11" = "yes"; then
16169   echo "  Compiling in support for the X window system:"
16170   echo "    - X Windows headers location:                 $x_includes"
16171   echo "    - X Windows libraries location:               $x_libraries"
16172   if test "$with_xauth" != yes; then
16173     echo "    - Xau (X authority) not available."
16174   fi
16175   if test "$with_xmu" != yes; then
16176     echo "    - Xmu library not available; substituting equivalent routines."
16177   fi
16178   if test "$with_wmcommand" != no; then
16179     echo "    - Handling WM_COMMAND properly."
16180   fi
16181 fi
16182 if test "$need_motif" = "yes" ; then
16183   echo "  Compiling in support for Motif."
16184   if test "$have_lesstif" = "yes"; then
16185     echo "    - Using LessTif implementation."
16186   fi
16187   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16188   echo "             You are likely to experience slow redisplay."
16189   echo "             You may need to install vendor patches to Motif."
16190   echo "             See PROBLEMS for more information."
16191 fi
16192 if test "$need_athena" = "yes"; then
16193   echo "  Compiling in support for the Athena widget set:"
16194   echo "    - Athena headers location:                    $athena_h_path"
16195   echo "    - Athena library to link:                     $athena_lib"
16196 fi
16197 case "$with_menubars" in
16198   gtk   ) echo "  Using GTK menubars."   ;;
16199   lucid ) echo "  Using Lucid menubars." ;;
16200   motif ) echo "  Using Motif menubars."
16201           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16202           echo "             We recommend using the Lucid menubar instead."
16203           echo "             Re-run configure with --with-menubars='lucid'." ;;
16204     msw ) echo "  Using MS-Windows menubars." ;;
16205 esac
16206 case "$with_scrollbars" in
16207   gtk    ) echo "  Using GTK scrollbars."        ;;
16208   lucid  ) echo "  Using Lucid scrollbars."      ;;
16209   motif  ) echo "  Using Motif scrollbars."      ;;
16210   athena ) echo "  Using Athena scrollbars."     ;;
16211      msw ) echo "  Using MS-Windows scrollbars." ;;
16212 esac
16213 case "$with_dialogs" in
16214   gtk    ) echo "  Using GTK dialog boxes." ;;
16215   motif  ) echo "  Using Motif dialog boxes."
16216            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16217              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16218              echo "             We recommend using the Athena dialog boxes instead."
16219              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16220              echo "             Read the PROBLEMS file for more information."
16221            fi; fi ;;
16222   athena ) echo "  Using Athena dialog boxes."     ;;
16223      msw ) echo "  Using MS-Windows dialog boxes." ;;
16224 esac
16225 case "$with_widgets" in
16226   gtk    ) echo "  Using GTK native widgets."        ;;
16227   motif  ) echo "  Using Motif native widgets."      ;;
16228   athena ) echo "  Using Athena native widgets."     ;;
16229      msw ) echo "  Using MS-Windows native widgets." ;;
16230 esac
16231 if test "$with_dragndrop" = yes; then
16232   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16233   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16234 fi
16235
16236 echo "
16237 TTY:"
16238 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16239 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16240
16241 echo "
16242 Images:"
16243 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16244 if test "$with_xpm" = yes; then
16245   echo "  Compiling in support for XPM  images."
16246 elif test "$with_x11" = yes; then
16247   echo "  WARNING: -----------------------------------------------------------"
16248   echo "  WARNING: Compiling without XPM image support."
16249   if test "$xpm_problem" != ""; then
16250     echo "  Reason: $xpm_problem"
16251   fi
16252   echo "  WARNING: You should strongly consider installing XPM."
16253   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16254   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16255   echo "  WARNING: -----------------------------------------------------------"
16256 fi
16257 if test "$with_png" = yes; then
16258   echo "  Compiling in support for PNG  images."
16259 elif test "$window_system" != "none"; then
16260   echo "  WARNING: -----------------------------------------------------------"
16261   echo "  WARNING: Compiling without PNG image support."
16262   if test "$png_problem" != ""; then
16263     echo "  Reason: $png_problem"
16264   fi
16265   echo "  WARNING: You should strongly consider installing the PNG libraries."
16266   echo "  WARNING: Otherwise certain images and glyphs may not display."
16267   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16268   echo "  WARNING: -----------------------------------------------------------"
16269 fi
16270 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16271 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16272 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16273
16274 echo "
16275 Sound:"
16276 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16277 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16278 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16279 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16280
16281 echo "
16282 Databases:"
16283 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16284 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16285 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16286 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16287 if test "$with_postgresql" = yes; then
16288   echo "  Compiling in support for PostgreSQL."
16289   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16290   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16291 fi
16292
16293 echo "
16294 Internationalization:"
16295 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16296 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16297 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16298 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16299 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16300 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16301 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16302 if test "$with_wnn" = yes; then
16303   echo "  Compiling in support for the WNN input method on Mule."
16304   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16305 fi
16306 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16307
16308 echo "
16309 Mail:"
16310 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16311 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16312 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16313 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16314
16315 echo "
16316 Other Features:"
16317 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16318 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16319 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16320 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16321 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16322 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16323 if test "$use_union_type" = yes; then
16324   echo "  WARNING: ---------------------------------------------------------"
16325   echo "  Using the union type for Lisp_Objects."
16326   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16327   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16328   echo "  WARNING: ---------------------------------------------------------"
16329 fi
16330 if test "$use_regex_malloc" = no; then
16331   echo "  WARNING: -----------------------------------------------------------"
16332   echo "  Using alloca to allocate the failure stack."
16333   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16334   echo "  Do NOT use this build of XEmacs for ordinary work."
16335   echo "  WARNING: -----------------------------------------------------------"
16336 fi
16337 test "$pdump" = yes && echo "  Using the new portable dumper."
16338 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16339 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16340 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16341   != "no no no no no no"; then
16342   echo "  WARNING: ---------------------------------------------------------"
16343   echo "  WARNING: Compiling in support for runtime error checking."
16344   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16345   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16346   echo "  WARNING: ---------------------------------------------------------"
16347 fi
16348 echo ""
16349 ) | tee -a Installation
16350 echo ""
16351
16352
16353 # Remove any trailing slashes in these variables.
16354 test -n "$prefix" &&
16355   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16356 test -n "$exec_prefix" &&
16357   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16358
16359
16360 for file in $internal_makefile_list; do
16361   test "$file" = src/Makefile.in && \
16362     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16363   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16364 done
16365 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16366 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
16367
16368 trap '' 1 2 15
16369
16370 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16371
16372 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16373 # Let make expand exec_prefix.
16374 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16375
16376 # Any assignment to VPATH causes Sun make to only execute
16377 # the first set of double-colon rules, so remove it if not needed.
16378 # If there is a colon in the path, we need to keep it.
16379 if test "x$srcdir" = x.; then
16380   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16381 fi
16382
16383 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16384
16385 DEFS=-DHAVE_CONFIG_H
16386
16387 # Without the "./", some shells look in PATH for config.status.
16388 : ${CONFIG_STATUS=./config.status}
16389
16390 echo creating $CONFIG_STATUS
16391 rm -f $CONFIG_STATUS
16392 cat > $CONFIG_STATUS <<EOF
16393 #! /bin/sh
16394 # Generated automatically by configure.
16395 # Run this file to recreate the current configuration.
16396 # This directory was configured as follows,
16397 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16398 #
16399 # $0 $ac_configure_args
16400 #
16401 # Compiler output produced by configure, useful for debugging
16402 # configure, is in ./config.log if it exists.
16403
16404 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16405 for ac_option
16406 do
16407   case "\$ac_option" in
16408   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16409     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16410     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16411   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16412     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16413     exit 0 ;;
16414   -help | --help | --hel | --he | --h)
16415     echo "\$ac_cs_usage"; exit 0 ;;
16416   *) echo "\$ac_cs_usage"; exit 1 ;;
16417   esac
16418 done
16419
16420 ac_given_srcdir=$srcdir
16421 ac_given_INSTALL="$INSTALL"
16422
16423 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16424 EOF
16425 cat >> $CONFIG_STATUS <<EOF
16426
16427 # Protect against being on the right side of a sed subst in config.status.
16428 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16429  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16430 $ac_vpsub
16431 $extrasub
16432 s%@SHELL@%$SHELL%g
16433 s%@CFLAGS@%$CFLAGS%g
16434 s%@CPPFLAGS@%$CPPFLAGS%g
16435 s%@CXXFLAGS@%$CXXFLAGS%g
16436 s%@FFLAGS@%$FFLAGS%g
16437 s%@DEFS@%$DEFS%g
16438 s%@LDFLAGS@%$LDFLAGS%g
16439 s%@LIBS@%$LIBS%g
16440 s%@exec_prefix@%$exec_prefix%g
16441 s%@prefix@%$prefix%g
16442 s%@program_transform_name@%$program_transform_name%g
16443 s%@bindir@%$bindir%g
16444 s%@sbindir@%$sbindir%g
16445 s%@libexecdir@%$libexecdir%g
16446 s%@datadir@%$datadir%g
16447 s%@sysconfdir@%$sysconfdir%g
16448 s%@sharedstatedir@%$sharedstatedir%g
16449 s%@localstatedir@%$localstatedir%g
16450 s%@libdir@%$libdir%g
16451 s%@includedir@%$includedir%g
16452 s%@oldincludedir@%$oldincludedir%g
16453 s%@infodir@%$infodir%g
16454 s%@mandir@%$mandir%g
16455 s%@LN_S@%$LN_S%g
16456 s%@blddir@%$blddir%g
16457 s%@CC@%$CC%g
16458 s%@CPP@%$CPP%g
16459 s%@start_flags@%$start_flags%g
16460 s%@ld_switch_shared@%$ld_switch_shared%g
16461 s%@start_files@%$start_files%g
16462 s%@ld@%$ld%g
16463 s%@lib_gcc@%$lib_gcc%g
16464 s%@RANLIB@%$RANLIB%g
16465 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16466 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16467 s%@INSTALL_DATA@%$INSTALL_DATA%g
16468 s%@YACC@%$YACC%g
16469 s%@SET_MAKE@%$SET_MAKE%g
16470 s%@GTK_CONFIG@%$GTK_CONFIG%g
16471 s%@X_CFLAGS@%$X_CFLAGS%g
16472 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16473 s%@X_LIBS@%$X_LIBS%g
16474 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16475 s%@install_pp@%$install_pp%g
16476 s%@libs_xauth@%$libs_xauth%g
16477 s%@dnd_objs@%$dnd_objs%g
16478 s%@lwlib_objs@%$lwlib_objs%g
16479 s%@ALLOCA@%$ALLOCA%g
16480 s%@have_esd_config@%$have_esd_config%g
16481 s%@dll_ld@%$dll_ld%g
16482 s%@dll_cflags@%$dll_cflags%g
16483 s%@dll_ldflags@%$dll_ldflags%g
16484 s%@dll_post@%$dll_post%g
16485 s%@dll_ldo@%$dll_ldo%g
16486 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16487 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16488 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16489 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16490 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16491 s%@PROGNAME@%$PROGNAME%g
16492 s%@version@%$version%g
16493 s%@configuration@%$configuration%g
16494 s%@canonical@%$canonical%g
16495 s%@inststaticdir@%$inststaticdir%g
16496 s%@instvardir@%$instvardir%g
16497 s%@srcdir@%$srcdir%g
16498 s%@pkgdir@%$pkgdir%g
16499 s%@statedir@%$statedir%g
16500 s%@extra_includes@%$extra_includes%g
16501 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16502 s%@PREFIX@%$PREFIX%g
16503 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16504 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16505 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16506 s%@INFODIR@%$INFODIR%g
16507 s%@infopath@%$infopath%g
16508 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16509 s%@INFOPATH@%$INFOPATH%g
16510 s%@package_path@%$package_path%g
16511 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16512 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16513 s%@lispdir@%$lispdir%g
16514 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16515 s%@LISPDIR@%$LISPDIR%g
16516 s%@moduledir@%$moduledir%g
16517 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16518 s%@MODULEDIR@%$MODULEDIR%g
16519 s%@sitelispdir@%$sitelispdir%g
16520 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16521 s%@SITELISPDIR@%$SITELISPDIR%g
16522 s%@sitemoduledir@%$sitemoduledir%g
16523 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16524 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16525 s%@etcdir@%$etcdir%g
16526 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16527 s%@ETCDIR@%$ETCDIR%g
16528 s%@docdir@%$docdir%g
16529 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16530 s%@DOCDIR@%$DOCDIR%g
16531 s%@archlibdir@%$archlibdir%g
16532 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16533 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16534 s%@bitmapdir@%$bitmapdir%g
16535 s%@extra_objs@%$extra_objs%g
16536 s%@machfile@%$machfile%g
16537 s%@opsysfile@%$opsysfile%g
16538 s%@c_switch_general@%$c_switch_general%g
16539 s%@c_switch_window_system@%$c_switch_window_system%g
16540 s%@c_switch_all@%$c_switch_all%g
16541 s%@ld_switch_general@%$ld_switch_general%g
16542 s%@ld_switch_window_system@%$ld_switch_window_system%g
16543 s%@ld_switch_all@%$ld_switch_all%g
16544 s%@ld_libs_general@%$ld_libs_general%g
16545 s%@ld_libs_window_system@%$ld_libs_window_system%g
16546 s%@ld_libs_all@%$ld_libs_all%g
16547 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16548 s%@native_sound_lib@%$native_sound_lib%g
16549 s%@sound_cflags@%$sound_cflags%g
16550 s%@dynodump_arch@%$dynodump_arch%g
16551 s%@XEMACS_CC@%$XEMACS_CC%g
16552 s%@internal_makefile_list@%$internal_makefile_list%g
16553
16554 CEOF
16555 EOF
16556
16557 cat >> $CONFIG_STATUS <<\EOF
16558
16559 # Split the substitutions into bite-sized pieces for seds with
16560 # small command number limits, like on Digital OSF/1 and HP-UX.
16561 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16562 ac_file=1 # Number of current file.
16563 ac_beg=1 # First line for current file.
16564 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16565 ac_more_lines=:
16566 ac_sed_cmds=""
16567 while $ac_more_lines; do
16568   if test $ac_beg -gt 1; then
16569     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16570   else
16571     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16572   fi
16573   if test ! -s conftest.s$ac_file; then
16574     ac_more_lines=false
16575     rm -f conftest.s$ac_file
16576   else
16577     if test -z "$ac_sed_cmds"; then
16578       ac_sed_cmds="sed -f conftest.s$ac_file"
16579     else
16580       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16581     fi
16582     ac_file=`expr $ac_file + 1`
16583     ac_beg=$ac_end
16584     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16585   fi
16586 done
16587 if test -z "$ac_sed_cmds"; then
16588   ac_sed_cmds=cat
16589 fi
16590 EOF
16591
16592 cat >> $CONFIG_STATUS <<EOF
16593
16594 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16595 EOF
16596 cat >> $CONFIG_STATUS <<\EOF
16597 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16598   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16599   case "$ac_file" in
16600   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16601        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16602   *) ac_file_in="${ac_file}.in" ;;
16603   esac
16604
16605   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16606
16607   # Remove last slash and all that follows it.  Not all systems have dirname.
16608   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16609   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16610     # The file is in a subdirectory.
16611     test ! -d "$ac_dir" && mkdir "$ac_dir"
16612     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16613     # A "../" for each directory in $ac_dir_suffix.
16614     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16615   else
16616     ac_dir_suffix= ac_dots=
16617   fi
16618
16619   case "$ac_given_srcdir" in
16620   .)  srcdir=.
16621       if test -z "$ac_dots"; then top_srcdir=.
16622       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16623   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16624   *) # Relative path.
16625     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16626     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16627   esac
16628
16629   case "$ac_given_INSTALL" in
16630   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16631   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16632   esac
16633
16634   echo creating "$ac_file"
16635   rm -f "$ac_file"
16636   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16637   case "$ac_file" in
16638   *Makefile*) ac_comsub="1i\\
16639 # $configure_input" ;;
16640   *) ac_comsub= ;;
16641   esac
16642
16643   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16644   sed -e "$ac_comsub
16645 s%@configure_input@%$configure_input%g
16646 s%@srcdir@%$srcdir%g
16647 s%@top_srcdir@%$top_srcdir%g
16648 s%@INSTALL@%$INSTALL%g
16649 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16650 fi; done
16651 rm -f conftest.s*
16652
16653 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16654 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16655 #
16656 # ac_d sets the value in "#define NAME VALUE" lines.
16657 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16658 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16659 ac_dC='\3'
16660 ac_dD='%g'
16661 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16662 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16663 ac_uB='\([      ]\)%\1#\2define\3'
16664 ac_uC=' '
16665 ac_uD='\4%g'
16666 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16667 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16668 ac_eB='$%\1#\2define\3'
16669 ac_eC=' '
16670 ac_eD='%g'
16671
16672 if test "${CONFIG_HEADERS+set}" != set; then
16673 EOF
16674 cat >> $CONFIG_STATUS <<EOF
16675   CONFIG_HEADERS="src/config.h lwlib/config.h"
16676 EOF
16677 cat >> $CONFIG_STATUS <<\EOF
16678 fi
16679 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16680   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16681   case "$ac_file" in
16682   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16683        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16684   *) ac_file_in="${ac_file}.in" ;;
16685   esac
16686
16687   echo creating $ac_file
16688
16689   rm -f conftest.frag conftest.in conftest.out
16690   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16691   cat $ac_file_inputs > conftest.in
16692
16693 EOF
16694
16695 # Transform confdefs.h into a sed script conftest.vals that substitutes
16696 # the proper values into config.h.in to produce config.h.  And first:
16697 # Protect against being on the right side of a sed subst in config.status.
16698 # Protect against being in an unquoted here document in config.status.
16699 rm -f conftest.vals
16700 cat > conftest.hdr <<\EOF
16701 s/[\\&%]/\\&/g
16702 s%[\\$`]%\\&%g
16703 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16704 s%ac_d%ac_u%gp
16705 s%ac_u%ac_e%gp
16706 EOF
16707 sed -n -f conftest.hdr confdefs.h > conftest.vals
16708 rm -f conftest.hdr
16709
16710 # This sed command replaces #undef with comments.  This is necessary, for
16711 # example, in the case of _POSIX_SOURCE, which is predefined and required
16712 # on some systems where configure will not decide to define it.
16713 cat >> conftest.vals <<\EOF
16714 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16715 EOF
16716
16717 # Break up conftest.vals because some shells have a limit on
16718 # the size of here documents, and old seds have small limits too.
16719
16720 rm -f conftest.tail
16721 while :
16722 do
16723   ac_lines=`grep -c . conftest.vals`
16724   # grep -c gives empty output for an empty file on some AIX systems.
16725   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16726   # Write a limited-size here document to conftest.frag.
16727   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16728   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16729   echo 'CEOF
16730   sed -f conftest.frag conftest.in > conftest.out
16731   rm -f conftest.in
16732   mv conftest.out conftest.in
16733 ' >> $CONFIG_STATUS
16734   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16735   rm -f conftest.vals
16736   mv conftest.tail conftest.vals
16737 done
16738 rm -f conftest.vals
16739
16740 cat >> $CONFIG_STATUS <<\EOF
16741   rm -f conftest.frag conftest.h
16742   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16743   cat conftest.in >> conftest.h
16744   rm -f conftest.in
16745   if cmp -s $ac_file conftest.h 2>/dev/null; then
16746     echo "$ac_file is unchanged"
16747     rm -f conftest.h
16748   else
16749     # Remove last slash and all that follows it.  Not all systems have dirname.
16750       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16751       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16752       # The file is in a subdirectory.
16753       test ! -d "$ac_dir" && mkdir "$ac_dir"
16754     fi
16755     rm -f $ac_file
16756     mv conftest.h $ac_file
16757   fi
16758 fi; done
16759
16760 EOF
16761 cat >> $CONFIG_STATUS <<EOF
16762 CPP="$CPP"
16763  top_srcdir="$srcdir"
16764  MAKE_SUBDIR="$MAKE_SUBDIR"
16765
16766 EOF
16767 cat >> $CONFIG_STATUS <<\EOF
16768 for dir in . $MAKE_SUBDIR; do
16769   (
16770     cd $dir
16771     rm -f junk.c
16772     < Makefile.in \
16773       sed -e '/^# Generated/d' \
16774           -e 's%/\*\*/#.*%%' \
16775           -e 's/^ *# */#/' \
16776           -e '/^##/d' \
16777           -e '/^#/ {
16778 p
16779 d
16780 }'        \
16781           -e '/./ {
16782 s/\([\"]\)/\\\1/g
16783 s/^/"/
16784 s/$/"/
16785 }'  > junk.c;
16786
16787
16788
16789     echo creating $dir/Makefile
16790 $CPP -I. -I${top_srcdir}/src  junk.c \
16791   | sed -e 's/^\#.*//'          \
16792         -e 's/^[        ][      ]*$//'\
16793         -e 's/^ /       /'              \
16794         -e '/^[ \f]*$/d' \
16795         -e '/^\"/ {
16796         s/\\\([\"]\)/\1/g
16797         s/^[    ]*\"//
16798         s/\"[   ]*$//
16799 }' > Makefile.new
16800     chmod 444 Makefile.new
16801     mv -f Makefile.new Makefile
16802
16803     echo creating $dir/GNUmakefile
16804 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16805   | sed -e 's/^\#.*//'          \
16806         -e 's/^[        ][      ]*$//'\
16807         -e 's/^ /       /'              \
16808         -e '/^[ \f]*$/d' \
16809         -e '/^\"/ {
16810         s/\\\([\"]\)/\1/g
16811         s/^[    ]*\"//
16812         s/\"[   ]*$//
16813 }' > Makefile.new
16814     chmod 444 Makefile.new
16815     mv -f Makefile.new GNUmakefile
16816
16817     rm -f junk.c
16818   )
16819 done
16820
16821 sed < config.status >> lib-src/config.values \
16822   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16823   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16824   -e 's/^\([^ ]*\) $/\1 ""/' \
16825   -e 's/ 1$/ t/'
16826
16827
16828 exit 0
16829 EOF
16830 chmod +x $CONFIG_STATUS
16831 rm -fr confdefs* $ac_clean_files
16832 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1