(J97-4A7E): Unify U+670B.
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996, 2005 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 use_regex_malloc='yes'
252 with_esd_sound='no'
253 native_sound_lib=''
254 with_gtk='no'
255 with_gnome='no'
256 use_assertions="yes"
257 with_toolbars=""
258 with_tty=""
259 use_union_type="no"
260 with_dnet=""
261 pdump=''
262 with_dragndrop="no"
263 with_ipv6_cname="no"
264
265
266
267
268 arguments="$@"
269
270 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
271 quoted_arguments=
272 for i in "$@"; do
273    case "$i" in
274    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275    | --no-cr | --no-c) ;;
276    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
278    *)
279    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
280    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
281    esac
282 done
283
284 while test $# != 0; do
285   arg="$1"; shift
286   case "$arg" in
287     --no-create|--no-recursion) ;;
288         -* )
289             case "$arg" in
290         -*=*)
291           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
292           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
293           valomitted=no
294         ;;
295                                                                           -*)
296                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
297           val="yes" valomitted=yes
298         ;;
299       esac
300
301             optname="$opt"
302       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
303
304             case "${valomitted}-${opt}" in yes-without_* )
305         opt=`echo $opt | sed 's/without/with/'`
306         valomitted="no" val="no" ;;
307       esac
308
309             case "$opt" in
310
311         with_site_lisp  | \
312         with_prefix     | \
313         with_site_modules | \
314         with_x          | \
315         with_x11        | \
316         with_gtk        | \
317         with_gnome      | \
318         with_msw        | \
319         with_gcc        | \
320         dynamic         | \
321         with_ncurses    | \
322         with_dnet       | \
323         with_socks      | \
324         with_dragndrop  | \
325         with_cde        | \
326         with_offix      | \
327         with_gpm        | \
328         with_xpm        | \
329         with_xface      | \
330         with_gif        | \
331         with_jpeg       | \
332         with_png        | \
333         with_tiff       | \
334         with_wmcommand  | \
335         with_xmu        | \
336         with_purify     | \
337         with_quantify   | \
338         with_toolbars   | \
339         with_tty        | \
340         with_xfs        | \
341         with_i18n3      | \
342         with_mule       | \
343         with_utf_2000   | \
344         with_chise      | \
345         with_text_coding| \
346         with_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_ldap       | \
354         with_postgresql | \
355         with_pop        | \
356         with_kerberos   | \
357         with_hesiod     | \
358         with_dnet       | \
359         with_infodock   | \
360         with_netinstall | \
361         with_ipv6_cname | \
362         external_widget | \
363         verbose         | \
364         extra_verbose   | \
365         usage_tracking  | \
366         use_union_type  | \
367         pdump           | \
368         debug           | \
369         use_assertions  | \
370         use_regex_malloc | \
371         memory_usage_stats | \
372         with_clash_detection | \
373         with_modules    | \
374         quick_build )
375                   case "$val" in
376             y | ye | yes )      val=yes ;;
377             n | no )            val=no  ;;
378             * ) (echo "$progname: Usage error:"
379 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
380 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
381           esac
382           eval "$opt=\"$val\"" ;;
383
384
385                         srcdir          | \
386         compiler        | \
387         cflags          | \
388         cpp             | \
389         cppflags        | \
390         libs            | \
391         ldflags         | \
392         cache_file      | \
393         native_sound_lib| \
394         site_lisp       | \
395         x_includes      | \
396         x_libraries     | \
397         site_includes   | \
398         site_libraries  | \
399         site_prefixes   | \
400         site_runtime_libraries )
401                   if test "$valomitted" = "yes" ; then
402                     if test "$#" = 0 ; then
403               (echo "$progname: Usage error:"
404 echo " " "The \`--$optname' option requires a value."
405 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
406             fi
407             val="$1"; shift
408           fi
409           eval "$opt=\"$val\""
410         ;;
411
412                 rel_alloc | \
413         with_dlmalloc | \
414         with_debug_malloc  | use_debug_malloc | \
415         with_system_malloc | use_system_malloc )
416           case "$val" in
417             y | ye | yes )      val=yes ;;
418             n | no )            val=no  ;;
419             d | de | def | defa | defau | defaul | default ) val=default ;;
420             * ) (echo "$progname: Usage error:"
421 echo " " "The \`--$optname' option requires one of these values:
422   \`yes', \`no', or \`default'."
423 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
424           esac
425           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
426           eval "$opt=\"$val\""
427         ;;
428
429                 "with_database" )
430           with_database_berkdb=no
431           with_database_dbm=no
432           with_database_gdbm=no
433           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
434             case "$x" in
435               no ) ;;
436               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
437               d | db | dbm )                               with_database_dbm=yes    ;;
438               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
439               * ) (echo "$progname: Usage error:"
440 echo " " "The \`--$optname' option value
441   must be either \`no' or a comma-separated list
442   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
443 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
444             esac
445           done
446           if test "$with_database_dbm"  = "yes" -a \
447                   "$with_database_gdbm" = "yes"; then
448           (echo "$progname: Usage error:"
449 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
450   with the \`--$optname' option."
451 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
452           fi
453         ;;
454
455                 "with_sound" )
456                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
457             case "$x" in
458                       n | no | non | none ) new_sdefault=no ;;
459               a | al | all | both ) new_sdefault=yes ;;
460
461               native )       with_native_sound=yes ;;
462               nonative )     with_native_sound=no ;;
463
464               nas )          with_nas_sound=yes ;;
465               nonas )        with_nas_sound=no ;;
466
467               esd )          with_esd_sound=yes ;;
468               noesd )        with_esd_sound=no ;;
469
470               * ) bogus_sound=yes ;;
471             esac
472             if test "$bogus_sound" -o \
473                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
474                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
475                 (echo "$progname: Usage error:"
476 echo " " "Valid types for the \`--$optname' option are:
477   $types.
478 Option \`all' or \`none' must be first in the list.
479 The default is to autodetect native and NAS sound support."
480 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
481             elif test -n "$new_sdefault" ; then
482                 with_native_sound=$new_sdefault
483                 with_nas_sound=$new_sdefault
484                 with_esd_sound=$new_sdefault
485                 new_sdefault=   # reset this
486             fi
487             sound_notfirst=true
488           done
489         ;;
490
491                         "with_athena" )
492           case "$val" in
493             xa | xaw )                    val=xaw    ;;
494             3 | 3d | xaw3d )              val=3d     ;;
495                         ne | nex | next | naxtaw)     val=next   ;;
496                         9 | 95 | xaw95 )              val=95     ;;
497             xp | xpm | xawxpm )           val=xpm    ;;
498             * ) (echo "$progname: Usage error:"
499 echo " " "The \`--$optname' option must have one of these values:
500   \`xaw', \`3d', \`next', \`95', or \`xpm'."
501 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
502           esac
503           eval "$opt=\"$val\""
504         ;;
505
506                 "with_xim" )
507           case "$val" in
508             y | ye | yes )                val=yes   ;;
509             n | no | non | none )         val=no    ;;
510             x | xl | xli | xlib )         val=xlib  ;;
511             m | mo | mot | moti | motif ) val=motif ;;
512             * ) (echo "$progname: Usage error:"
513 echo " " "The \`--$optname' option must have one of these values:
514   \`motif', \`xlib', \`yes', or \`no'."
515 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
516           esac
517           eval "$opt=\"$val\""
518         ;;
519
520                 "mail_locking" )
521           case "$val" in
522             lockf )     val=lockf ;;
523             flock )     val=flock ;;
524             file | dot ) val=file  ;;
525             locking )   val=locking  ;;
526             * ) (echo "$progname: Usage error:"
527 echo " " "The \`--$optname' option must have one of these values:
528   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
529 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
530           esac
531           eval "$opt=\"$val\""
532         ;;
533
534                 "error_checking" )
535                           
536           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
537             case "$x" in
538                       n | no | non | none ) new_default=no ;;
539               a | al | all )        new_default=yes ;;
540
541               extents )       error_check_extents=yes ;;
542               noextents )     error_check_extents=no ;;
543
544               typecheck )     error_check_typecheck=yes ;;
545               notypecheck )   error_check_typecheck=no ;;
546
547               bufpos )        error_check_bufpos=yes ;;
548               nobufpos )      error_check_bufpos=no ;;
549
550               gc )            error_check_gc=yes ;;
551               nogc )          error_check_gc=no ;;
552
553               malloc )        error_check_malloc=yes ;;
554               nomalloc )      error_check_malloc=no ;;
555
556               byte_code )     error_check_byte_code=yes ;;
557               nobyte_code )   error_check_byte_code=no ;;
558
559               glyphs )     error_check_glyphs=yes ;;
560               noglyphs )   error_check_glyphs=no ;;
561
562               * ) bogus_error_check=yes ;;
563             esac
564             if test "$bogus_error_check" -o \
565                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
566                 if test "$error_check_default" = yes ; then
567                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
568                 else
569                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
570                 fi
571                 (echo "$progname: Usage error:"
572 echo " " "Valid types for the \`--$optname' option are:
573   $types."
574 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
575             elif test -n "$new_default" ; then
576                 error_check_extents=$new_default
577                 error_check_typecheck=$new_default
578                 error_check_bufpos=$new_default
579                 error_check_gc=$new_default
580                 error_check_malloc=$new_default
581                 error_check_byte_code=$new_default
582                 error_check_glyphs=$new_default
583                 new_default=    # reset this
584             fi
585             echeck_notfirst=true
586           done
587         ;;
588
589                                 
590                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
591         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
592         archlibdir | docdir | package_path | moduledir )
593                    if test "$valomitted" = "yes"; then
594              if test "$#" = 0; then
595                  (echo "$progname: Usage error:"
596 echo " " "The \`--$optname' option requires a value."
597 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
598              fi
599              val="$1"; shift
600            fi
601            eval "$opt=\"$val\""
602
603                            case "$opt" in
604                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining EXEC_PREFIX_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define EXEC_PREFIX_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining LISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define LISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining SITELISPDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define SITELISPDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining MODULEDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define MODULEDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining ETCDIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define ETCDIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFODIR_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFODIR_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining INFOPATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define INFOPATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
661     Defining PACKAGE_PATH_USER_DEFINED
662 EOF
663 cat >> confdefs.h <<\EOF
664 #define PACKAGE_PATH_USER_DEFINED 1
665 EOF
666 }
667  ;;
668              datadir )
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining INFODIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define INFODIR_USER_DEFINED 1
674 EOF
675 }
676
677                 { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining LISPDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define LISPDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining MODULEDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define MODULEDIR_USER_DEFINED 1
690 EOF
691 }
692
693                 { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining ETCDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define ETCDIR_USER_DEFINED 1
698 EOF
699 }
700
701                 { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining DOCDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define DOCDIR_USER_DEFINED 1
706 EOF
707 }
708
709                 { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining ARCHLIBDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define ARCHLIBDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
718     Defining DOCDIR_USER_DEFINED
719 EOF
720 cat >> confdefs.h <<\EOF
721 #define DOCDIR_USER_DEFINED 1
722 EOF
723 }
724  ;;
725              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
726     Defining ARCHLIBDIR_USER_DEFINED
727 EOF
728 cat >> confdefs.h <<\EOF
729 #define ARCHLIBDIR_USER_DEFINED 1
730 EOF
731 }
732  ;;
733            esac
734         ;;
735
736                 "no_create" ) ;;
737
738                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
739
740                 "with_menubars"   | \
741         "with_scrollbars" | \
742         "with_dialogs"    | \
743         "with_widgets" )
744           case "$val" in
745             l | lu | luc | luci | lucid )               val=lucid  ;;
746             mo | mot | moti | motif )                   val=motif  ;;
747             a | at | ath | athe | athen | athena )      val=athena ;;
748             n | no | non | none )                       val=no     ;;
749             y | ye | yes )                              val=yes    ;;
750                         "")                                             val=yes    ;;
751             g | gt | gtk )                              val=gtk    ;;
752             ms | msw )                                  val=msw    ;;
753             * ) (echo "$progname: Usage error:"
754 echo " " "The \`--$optname' option must have one of these values:
755   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
756 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
757           esac
758           eval "$opt=\"$val\""
759         ;;
760
761                 "use_minimal_tagbits" | \
762         "use_indexed_lrecord_implementation" | \
763         "run_in_place"  | \
764         "const_is_losing" | \
765         "with_gnu_make" )
766           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
767         ;;
768
769                 * ) (echo "$progname: Usage error:"
770 echo " " "Unrecognized option: $arg"
771 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
772
773       esac
774     ;;
775
776         *-*-*) configuration="$arg" ;;
777
778         *) (echo "$progname: Usage error:"
779 echo " " "Unrecognized argument: $arg"
780 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
781
782   esac
783 done
784
785
786 test -n "$cpp"      && CPP="$cpp"
787 test -n "$cppflags" && CPPFLAGS="$cppflags"
788 test -n "$libs"     && LIBS="$libs"
789 test -n "$ldflags"  && LDFLAGS="$ldflags"
790
791 eval set x "$quoted_arguments"; shift
792
793 test "$extra_verbose" = "yes" && verbose=yes
794
795 test -n "$with_x" && with_x11="$with_x"
796
797 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
798   test "$with_system_malloc" = "default" && with_system_malloc=yes
799 fi
800
801
802
803 if test "$with_cde $with_tooltalk" = "yes no"; then
804   (echo "$progname: Usage error:"
805 echo " " "--with-cde requires --with-tooltalk"
806 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
807 elif test "$with_tooltalk" = "no" ; then with_cde=no
808 elif test "$with_cde" = "yes"; then with_tooltalk=yes
809 fi
810
811
812 case "$srcdir" in
813
814     "" )
815     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
816       if test -f "$dir/src/lisp.h" -a \
817               -f "$dir/lisp/version.el" ; then
818         srcdir="$dir"
819         break
820       fi
821     done
822     if test -z "$srcdir" ; then
823       (echo "$progname: Usage error:"
824 echo " " "Neither the current directory nor its parent seem to
825   contain the XEmacs sources.  If you do not want to build XEmacs in its
826   source tree, you should run \`$progname' in the directory in which
827   you wish to build XEmacs, using the \`--srcdir' option to say where the
828   sources may be found."
829 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
830     fi
831   ;;
832
833     * )
834     if test ! -f "$srcdir/src/lisp.h" -o \
835             ! -f "$srcdir/lisp/version.el" ; then
836       (echo "$progname: Usage error:"
837 echo " " "The directory specified with the \`--srcdir' option,
838   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
839   either run the \`$progname' script at the top of the XEmacs source
840   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
841 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
842     fi
843   ;;
844 esac
845
846 if test -z "$configuration"; then
847     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
848   if test -z "$configuration"; then
849     (echo "$progname: Usage error:"
850 echo " " "XEmacs has not been ported to this host type.
851 Try explicitly specifying the CONFIGURATION when rerunning configure."
852 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
853   fi
854 fi
855
856 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
857 echo "configure:858: checking whether ln -s works" >&5
858
859 rm -f conftestdata
860 if ln -s X conftestdata 2>/dev/null
861 then
862   rm -f conftestdata
863   ac_cv_prog_LN_S="ln -s"
864 else
865   ac_cv_prog_LN_S=ln
866 fi
867 LN_S="$ac_cv_prog_LN_S"
868 if test "$ac_cv_prog_LN_S" = "ln -s"; then
869   echo "$ac_t""yes" 1>&6
870 else
871   echo "$ac_t""no" 1>&6
872 fi
873
874
875 for dir in lisp etc man info tests; do
876   if test ! -d "$dir" ; then
877     echo Making symbolic link to "$srcdir/$dir"
878     ${LN_S} "$srcdir/$dir" "$dir"
879   fi
880 done
881
882
883 absolute_pwd="`pwd`";
884 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
885 then blddir="$PWD"
886 else blddir="$absolute_pwd"; if test -d "/net"; then
887   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
888   blddir=`echo "$blddir" | \
889    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
890 fi
891 fi
892
893
894 case "$srcdir" in
895   /* ) ;;
896   .  ) srcdir="$blddir" ;;
897   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
898   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
899   srcdir=`echo "$srcdir" | \
900    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
901 fi ;;
902 esac
903
904 if test `pwd` != `sh -c cd $srcdir && pwd`  \
905    && test -f "$srcdir/src/config.h"; then
906   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
907    echo "   as a build directory right now; it has been configured in its own"
908    echo "   right.  To configure in another directory as well, you MUST"
909    echo "   use GNU make.  If you do not have GNU make, then you must"
910    echo "   now do \`make distclean' in $srcdir,"
911    echo "   and then run $progname again.") >&2
912   extrasub='/^VPATH[     ]*=/c\
913 vpath %.c $(srcdir)\
914 vpath %.h $(srcdir)\
915 vpath %.y $(srcdir)\
916 vpath %.l $(srcdir)\
917 vpath %.s $(srcdir)\
918 vpath %.in $(srcdir)'
919 fi
920
921 . "$srcdir/version.sh" || exit 1;
922 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
923 : "${extra_verbose=$beta}"
924 version="${emacs_major_version}.${emacs_minor_version}"
925 { test "$extra_verbose" = "yes" && cat << EOF
926     Defining EMACS_MAJOR_VERSION = $emacs_major_version
927 EOF
928 cat >> confdefs.h <<EOF
929 #define EMACS_MAJOR_VERSION $emacs_major_version
930 EOF
931 }
932
933 { test "$extra_verbose" = "yes" && cat << EOF
934     Defining EMACS_MINOR_VERSION = $emacs_minor_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define EMACS_MINOR_VERSION $emacs_minor_version
938 EOF
939 }
940
941 if test -n "$emacs_beta_version" ; then
942   if test "$beta" = "yes"; then
943         version="${version}-b${emacs_beta_version}"
944         { test "$extra_verbose" = "yes" && cat << EOF
945     Defining EMACS_BETA_VERSION = $emacs_beta_version
946 EOF
947 cat >> confdefs.h <<EOF
948 #define EMACS_BETA_VERSION $emacs_beta_version
949 EOF
950 }
951
952   else
953         version="${version}.${emacs_beta_version}"
954         { test "$extra_verbose" = "yes" && cat << EOF
955     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
956 EOF
957 cat >> confdefs.h <<EOF
958 #define EMACS_PATCH_LEVEL $emacs_beta_version
959 EOF
960 }
961
962   fi
963 fi
964 { test "$extra_verbose" = "yes" && cat << EOF
965     Defining XEMACS_CODENAME = "$xemacs_codename"
966 EOF
967 cat >> confdefs.h <<EOF
968 #define XEMACS_CODENAME "$xemacs_codename"
969 EOF
970 }
971
972 { test "$extra_verbose" = "yes" && cat << EOF
973     Defining EMACS_VERSION = "$version"
974 EOF
975 cat >> confdefs.h <<EOF
976 #define EMACS_VERSION "$version"
977 EOF
978 }
979
980
981 if test "$with_infodock" = "yes"; then
982   if test ! -f ../../ID-INSTALL; then
983     echo "Cannot build InfoDock without InfoDock sources"
984     with_infodock=no
985   fi
986 fi
987
988 if test "$with_infodock" = "yes"; then
989       { test "$extra_verbose" = "yes" && cat << EOF
990     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
991 EOF
992 cat >> confdefs.h <<EOF
993 #define INFODOCK_MAJOR_VERSION $infodock_major_version
994 EOF
995 }
996
997   { test "$extra_verbose" = "yes" && cat << EOF
998     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
999 EOF
1000 cat >> confdefs.h <<EOF
1001 #define INFODOCK_MINOR_VERSION $infodock_minor_version
1002 EOF
1003 }
1004
1005   { test "$extra_verbose" = "yes" && cat << EOF
1006     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1007 EOF
1008 cat >> confdefs.h <<EOF
1009 #define INFODOCK_BUILD_VERSION $infodock_build_version
1010 EOF
1011 }
1012
1013   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1014   PROGNAME=infodock
1015   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1016 else
1017   PROGNAME=xemacs
1018 fi
1019
1020 { test "$extra_verbose" = "yes" && cat << EOF
1021     Defining EMACS_PROGNAME = "$PROGNAME"
1022 EOF
1023 cat >> confdefs.h <<EOF
1024 #define EMACS_PROGNAME "$PROGNAME"
1025 EOF
1026 }
1027
1028
1029 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1030 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_EXTENTS
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_EXTENTS 1
1035 EOF
1036 }
1037
1038 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_TYPECHECK
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_TYPECHECK 1
1043 EOF
1044 }
1045
1046 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1047     Defining ERROR_CHECK_BUFPOS
1048 EOF
1049 cat >> confdefs.h <<\EOF
1050 #define ERROR_CHECK_BUFPOS 1
1051 EOF
1052 }
1053
1054 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1055     Defining ERROR_CHECK_GC
1056 EOF
1057 cat >> confdefs.h <<\EOF
1058 #define ERROR_CHECK_GC 1
1059 EOF
1060 }
1061
1062 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1063     Defining ERROR_CHECK_MALLOC
1064 EOF
1065 cat >> confdefs.h <<\EOF
1066 #define ERROR_CHECK_MALLOC 1
1067 EOF
1068 }
1069
1070 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1071     Defining ERROR_CHECK_BYTE_CODE
1072 EOF
1073 cat >> confdefs.h <<\EOF
1074 #define ERROR_CHECK_BYTE_CODE 1
1075 EOF
1076 }
1077
1078 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1079     Defining ERROR_CHECK_GLYPHS
1080 EOF
1081 cat >> confdefs.h <<\EOF
1082 #define ERROR_CHECK_GLYPHS 1
1083 EOF
1084 }
1085
1086 if test "${debug:=$beta}" = "yes"; then
1087   use_assertions=yes memory_usage_stats=yes
1088   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"debug.o\""
1090  fi
1091   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1092    echo "    xemacs will be linked with \"tests.o\""
1093  fi
1094   { test "$extra_verbose" = "yes" && cat << \EOF
1095     Defining DEBUG_XEMACS
1096 EOF
1097 cat >> confdefs.h <<\EOF
1098 #define DEBUG_XEMACS 1
1099 EOF
1100 }
1101
1102 fi
1103 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1104     Defining USE_ASSERTIONS
1105 EOF
1106 cat >> confdefs.h <<\EOF
1107 #define USE_ASSERTIONS 1
1108 EOF
1109 }
1110
1111 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1112     Defining MEMORY_USAGE_STATS
1113 EOF
1114 cat >> confdefs.h <<\EOF
1115 #define MEMORY_USAGE_STATS 1
1116 EOF
1117 }
1118
1119
1120
1121 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1122 echo "configure:1123: checking "host system type"" >&5
1123 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1124 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1125 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1126 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1127 echo "$ac_t""$configuration" 1>&6
1128
1129
1130
1131
1132
1133 machine='' opsys=''
1134
1135 case "$canonical" in
1136   sparc-*-*        ) machine=sparc ;;
1137   alpha*-*-*       ) machine=alpha ;;
1138   vax-*-*          ) machine=vax ;;
1139   mips-dec-*       ) machine=pmax ;;
1140   mips-sgi-irix6*  ) machine=iris6d ;;
1141   mips-sgi-*       ) machine=iris4d ;;
1142   mips*-linux      ) machine=mips ;;
1143   romp-ibm-*       ) machine=ibmrt ;;
1144   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1145   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1146   powerpc*-*       ) machine=powerpc ;;
1147   hppa-*-*         ) machine=hp800 ;;
1148   m88k-dg-*        ) machine=aviion ;;
1149   m68*-sony-*      ) machine=news ;;
1150   mips-sony-*      ) machine=news-risc ;;
1151   clipper-*        ) machine=clipper ;;
1152   arm*             ) machine=arm ;;
1153   ns32k-*          ) machine=ns32000 ;;
1154 esac
1155
1156 case "$canonical" in
1157   *-*-linux*    ) opsys=linux ;;
1158   *-*-netbsd*   ) opsys=netbsd ;;
1159   *-*-openbsd*  ) opsys=openbsd ;;
1160   *-*-nextstep* ) opsys=nextstep ;;
1161   *-*-vms       ) opsys=vms ;;
1162
1163     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1164   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1165   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1166   *-dec-osf3*                ) opsys=decosf3-1 ;;
1167   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1168
1169     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1170   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1171   *-*-ultrix* )         opsys=ultrix4-3 ;;
1172
1173     *-*-aix3.1*     ) opsys=aix3-1   ;;
1174   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1175   *-*-aix3*       ) opsys=aix3-2   ;;
1176   *-*-aix4.0*     ) opsys=aix4     ;;
1177   *-*-aix4.1*     ) opsys=aix4-1   ;;
1178   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1179
1180     *-gnu* )                    opsys=gnu    ;;
1181   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1182   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1183   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1184   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1185   *-*-aos*   )                  opsys=bsd4-3 ;;
1186   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1187   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1188   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1189   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1190   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1191   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1192         if test -z "$NON_GNU_CPP" ; then
1193           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1194             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1195           done
1196         fi
1197         opsys=usg5-4-2 ;;
1198     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1199     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1200 esac
1201
1202 case "$canonical" in
1203
1204     *-*-netbsd* )
1205     case "$canonical" in
1206       i[3-9]86-*-netbsd*) machine=intel386 ;;
1207       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1208                                             machine=hp9000s300 ;;
1209       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1210       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1211     esac
1212   ;;
1213
1214     *-*-openbsd* )
1215     case "${canonical}" in
1216       i386-*-openbsd*)          machine=intel386 ;;
1217       m68k-*-openbsd*)          machine=hp9000s300 ;;
1218       mipsel-*-openbsd*)        machine=pmax ;;
1219      esac
1220    ;;
1221
1222     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1223   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1224
1225     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1226   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1227
1228     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1229
1230     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1231
1232     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1233
1234     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1235
1236     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1237
1238     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1239   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1240   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1241
1242   
1243     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1244
1245     *-convex-bsd* | *-convex-convexos* )
1246     machine=convex opsys=bsd4-3
1247     NON_GNU_CPP="cc -E -P"
1248   ;;
1249
1250     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1251
1252     *-*-darwin*)
1253     opsys=darwin
1254     RANLIB="ranlib -c"     ;;
1255
1256     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1257   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1258   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1259   m88k-dg-dgux*                           ) opsys=dgux     ;;
1260
1261     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1262   m88k-motorola-sysv4* )
1263                     machine=delta88k opsys=usg5-4-2
1264   ;;
1265   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1266
1267     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1268   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1269
1270     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1271
1272     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1273   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1274   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1275
1276       m88k-harris-cxux* )
1277         case "`uname -r`" in
1278        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1279        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1280     esac
1281     NON_GNU_CPP="/lib/cpp"
1282   ;;
1283     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1284     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1285
1286     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1287
1288     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1289
1290     *-hp-hpux* )
1291         case "$canonical" in
1292       m68*  ) machine=hp9000s300 ;;
1293       hppa* ) machine=hp800      ;;
1294     esac
1295
1296     case "$canonical" in
1297       *-hp-hpux7*  )  opsys=hpux   ;;
1298       *-hp-hpux8*  )  opsys=hpux8  ;;
1299       *-hp-hpux9*  )  opsys=hpux9  ;;
1300       *-hp-hpux10* )  opsys=hpux10 ;;
1301       *-hp-hpux11* )  opsys=hpux11 ;;
1302       *            )  opsys=hpux   ;;
1303     esac
1304
1305         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1306    echo "    xemacs will be linked with \"strcat.o\""
1307  fi ;; esac
1308
1309     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1310         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1311     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1312
1313     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1314   ;;
1315
1316     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1317   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1318
1319     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1320   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1321   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1322   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1323   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1324   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1325
1326     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1327   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1328
1329     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1330
1331     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1332
1333     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1334
1335     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1336
1337       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1338
1339     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1340
1341     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1342
1343     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1344
1345     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1346
1347         mips-mips-usg* ) machine=mips4 ;;
1348   mips-mips-riscos4 )
1349     machine=mips4
1350     NON_GNU_CC="cc -systype bsd43"
1351     NON_GNU_CPP="cc -systype bsd43 -E"
1352     case "$canonical" in
1353       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1354       mips-mips-riscos5* ) opsys=riscos5 ;;
1355     esac
1356   ;;
1357   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1358   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1359
1360     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1361
1362     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1363
1364     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1365   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1366
1367     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1368
1369     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1370
1371     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1372
1373     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1374
1375     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1376   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1377
1378     mips-siemens-sysv* | mips-sni-sysv*)
1379     machine=mips-siemens opsys=usg5-4
1380     NON_GNU_CC=/usr/ccs/bin/cc
1381     NON_GNU_CPP=/usr/ccs/lib/cpp
1382   ;;
1383
1384     mips-nec-sysv*)
1385     machine=mips-nec
1386     NON_GNU_CC=/usr/ccs/bin/cc
1387     NON_GNU_CPP=/usr/ccs/lib/cpp
1388   ;;
1389
1390       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1391   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1392     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1393   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1394   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1395   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1396   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1397   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1398   mips-sgi-irix*      ) opsys=irix5-0 ;;
1399
1400     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1401   *-sony-news* ) opsys=newsos5 ;;
1402
1403     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1404
1405     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1406         case "$canonical" in
1407       m68*-sunos1* )             machine=sun1     ;;
1408       m68*-sunos2* )             machine=sun2     ;;
1409       m68* )                     machine=sun3     ;;
1410       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1411       i*86-*-* )                 machine=intel386 ;;
1412       rs6000* )                  machine=rs6000   ;;
1413     esac
1414
1415         case "$canonical" in *-sunos5*)
1416       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1417     esac
1418
1419                     case "$canonical" in
1420       *-sunos4* )
1421         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1422         : ;;
1423       *-solaris2* )
1424         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1425         RANLIB=':' ;;
1426     esac
1427
1428     case "$canonical" in
1429       *-solaris* )
1430         opsys=sol2
1431         os_release_major=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1/'`
1432         os_release_minor=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/'`
1433         case "$os_release_minor" in [0-9])
1434           os_release_minor="0${os_release_minor}";;
1435         esac
1436         os_release="${os_release_major}${os_release_minor}"
1437         { test "$extra_verbose" = "yes" && cat << EOF
1438     Defining OS_RELEASE = $os_release
1439 EOF
1440 cat >> confdefs.h <<EOF
1441 #define OS_RELEASE $os_release
1442 EOF
1443 }
1444  ;;
1445
1446             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1447       *-sunos4.0*         ) opsys=sunos4-0      ;;
1448       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1449       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1450       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1451       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1452       *-mach*             ) opsys=mach-bsd4-3   ;;
1453       *                   ) opsys=bsd4-2        ;;
1454     esac
1455
1456     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1457
1458         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1459   ;;
1460
1461     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1462
1463     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1464   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1465
1466     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1467
1468     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1469
1470     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1471       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1472
1473     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1474
1475     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1476
1477     vax-dec-* )
1478     case "$canonical" in
1479       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1480       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1481       *-mach* )                         opsys=mach-bsd4-3 ;;
1482     esac
1483   ;;
1484
1485     ns16k-whitechapel-* ) machine=mg1 ;;
1486
1487     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1488
1489     i[3-9]86-*-* )
1490     machine=intel386
1491     case "$canonical" in
1492       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1493       *-isc2.2* )               opsys=isc2-2 ;;
1494       *-isc4.0* )               opsys=isc4-0 ;;
1495       *-isc4.* )                opsys=isc4-1
1496                                 GCC_TEST_OPTIONS=-posix
1497                                 NON_GCC_TEST_OPTIONS=-Xp
1498                                 ;;
1499       *-isc* )                  opsys=isc3-0 ;;
1500       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1501       *-esix* )                 opsys=esix ;;
1502       *-mach* )                 opsys=mach-bsd4-3 ;;
1503       *-xenix* )                opsys=xenix ;;
1504       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1505       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1506       *-bsdi4* )                opsys=bsdos4 ;;
1507       *-bsdi3* )                opsys=bsdos3 ;;
1508       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1509       *-bsdi2* )                opsys=bsdos2 ;;
1510       *-sco3.2v5* )             opsys=sco5 ;;
1511       *-sysv5* )                opsys=sco7 ;;
1512       *-386bsd* )               opsys=386bsd ;;
1513       *-freebsd* )              opsys=freebsd ;;
1514       *-nextstep* )             opsys=nextstep ;;
1515       *-pc-cygwin* )            opsys=cygwin32 ;;
1516       *-pc-mingw* )             opsys=mingw32 ;
1517                                 test -z "$with_tty" && with_tty="no";;
1518           esac
1519   ;;
1520
1521     m68k-*-linux* ) machine=m68k opsys=linux ;;
1522
1523 esac
1524
1525 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1526
1527 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1528
1529 if test -r "${srcdir}/src/m/${machine}.h"; then
1530   machfile="m/${machine}.h"
1531   { test "$extra_verbose" = "yes" && cat << EOF
1532     Defining config_machfile = "$machfile"
1533 EOF
1534 cat >> confdefs.h <<EOF
1535 #define config_machfile "$machfile"
1536 EOF
1537 }
1538
1539 else
1540   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1541   echo "Using configure-time autodetection only."
1542 fi
1543
1544 if test -r "${srcdir}/src/s/${opsys}.h"; then
1545   opsysfile="s/${opsys}.h"
1546   { test "$extra_verbose" = "yes" && cat << EOF
1547     Defining config_opsysfile = "$opsysfile"
1548 EOF
1549 cat >> confdefs.h <<EOF
1550 #define config_opsysfile "$opsysfile"
1551 EOF
1552 }
1553
1554 else
1555   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1556   echo "Using configure-time autodetection only."
1557 fi
1558
1559
1560 if test -z "$pdump"; then
1561   case "$opsys" in
1562     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        cygwin* ) pdump=yes ;;        *)        pdump=no ;;
1563   esac
1564 fi
1565
1566 if test -z "$dynamic"; then
1567   case "$opsys" in
1568     hpux* | sunos4* ) dynamic=no ;;
1569     *) dynamic=yes ;;
1570   esac
1571 fi
1572 if test "$dynamic" = "yes"; then
1573   case "$opsys" in
1574     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1575     decosf* ) ld_call_shared="-call_shared" ;;
1576     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1577     Defining DLSYM_NEEDS_UNDERSCORE
1578 EOF
1579 cat >> confdefs.h <<\EOF
1580 #define DLSYM_NEEDS_UNDERSCORE 1
1581 EOF
1582 }
1583  ;;
1584   esac
1585 else   case "$opsys" in
1586     sol2 )
1587       echo "Static linking is not supported on Solaris 2."
1588       echo "Rerun configure without specifying --dynamic=no."
1589       exit 1 ;;
1590     linux   ) ld_call_shared="-Bstatic" ;;
1591     decosf* ) ld_call_shared="-non_shared" ;;
1592   esac
1593 fi
1594
1595 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1596
1597 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1598 { test "$extra_verbose" = "yes" && cat << EOF
1599     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1600 EOF
1601 cat >> confdefs.h <<EOF
1602 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1603 EOF
1604 }
1605
1606
1607
1608 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1609 if test "$with_workshop $with_tooltalk" = "yes no"; then
1610   (echo "$progname: Usage error:"
1611 echo " " "--with-workshop requires --with-tooltalk"
1612 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1613 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1614 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1615 fi
1616
1617 if test "$with_workshop" = "yes"; then
1618   { test "$extra_verbose" = "yes" && cat << \EOF
1619     Defining SUNPRO
1620 EOF
1621 cat >> confdefs.h <<\EOF
1622 #define SUNPRO 1
1623 EOF
1624 }
1625
1626   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1627    echo "    xemacs will be linked with \"sunpro.o\""
1628  fi
1629 fi
1630
1631 if test "$with_clash_detection" != "no"; then
1632   { test "$extra_verbose" = "yes" && cat << \EOF
1633     Defining CLASH_DETECTION
1634 EOF
1635 cat >> confdefs.h <<\EOF
1636 #define CLASH_DETECTION 1
1637 EOF
1638 }
1639
1640   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1641    echo "    xemacs will be linked with \"filelock.o\""
1642  fi
1643 fi
1644
1645 test -n "$compiler" && CC="$compiler"
1646 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1647 fi
1648
1649 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1650 if test "${CFLAGS-unset}" != unset
1651   then cflags_specified=yes;
1652   else cflags_specified=no;
1653 fi
1654
1655 xe_save_CFLAGS="$CFLAGS"
1656
1657 # Extract the first word of "gcc", so it can be a program name with args.
1658 set dummy gcc; ac_word=$2
1659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1660 echo "configure:1661: checking for $ac_word" >&5
1661
1662 if test -n "$CC"; then
1663   ac_cv_prog_CC="$CC" # Let the user override the test.
1664 else
1665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1666   ac_dummy="$PATH"
1667   for ac_dir in $ac_dummy; do
1668     test -z "$ac_dir" && ac_dir=.
1669     if test -f $ac_dir/$ac_word; then
1670       ac_cv_prog_CC="gcc"
1671       break
1672     fi
1673   done
1674   IFS="$ac_save_ifs"
1675 fi
1676 CC="$ac_cv_prog_CC"
1677 if test -n "$CC"; then
1678   echo "$ac_t""$CC" 1>&6
1679 else
1680   echo "$ac_t""no" 1>&6
1681 fi
1682
1683 if test -z "$CC"; then
1684   # Extract the first word of "cc", so it can be a program name with args.
1685 set dummy cc; ac_word=$2
1686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1687 echo "configure:1688: checking for $ac_word" >&5
1688
1689 if test -n "$CC"; then
1690   ac_cv_prog_CC="$CC" # Let the user override the test.
1691 else
1692   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1693   ac_prog_rejected=no
1694   ac_dummy="$PATH"
1695   for ac_dir in $ac_dummy; do
1696     test -z "$ac_dir" && ac_dir=.
1697     if test -f $ac_dir/$ac_word; then
1698       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1699         ac_prog_rejected=yes
1700         continue
1701       fi
1702       ac_cv_prog_CC="cc"
1703       break
1704     fi
1705   done
1706   IFS="$ac_save_ifs"
1707 if test $ac_prog_rejected = yes; then
1708   # We found a bogon in the path, so make sure we never use it.
1709   set dummy $ac_cv_prog_CC
1710   shift
1711   if test $# -gt 0; then
1712     # We chose a different compiler from the bogus one.
1713     # However, it has the same basename, so the bogon will be chosen
1714     # first if we set CC to just the basename; use the full file name.
1715     shift
1716     set dummy "$ac_dir/$ac_word" "$@"
1717     shift
1718     ac_cv_prog_CC="$@"
1719   fi
1720 fi
1721 fi
1722 CC="$ac_cv_prog_CC"
1723 if test -n "$CC"; then
1724   echo "$ac_t""$CC" 1>&6
1725 else
1726   echo "$ac_t""no" 1>&6
1727 fi
1728
1729   if test -z "$CC"; then
1730     case "`uname -s`" in
1731     *win32* | *WIN32*)
1732       # Extract the first word of "cl", so it can be a program name with args.
1733 set dummy cl; ac_word=$2
1734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1735 echo "configure:1736: checking for $ac_word" >&5
1736
1737 if test -n "$CC"; then
1738   ac_cv_prog_CC="$CC" # Let the user override the test.
1739 else
1740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1741   ac_dummy="$PATH"
1742   for ac_dir in $ac_dummy; do
1743     test -z "$ac_dir" && ac_dir=.
1744     if test -f $ac_dir/$ac_word; then
1745       ac_cv_prog_CC="cl"
1746       break
1747     fi
1748   done
1749   IFS="$ac_save_ifs"
1750 fi
1751 CC="$ac_cv_prog_CC"
1752 if test -n "$CC"; then
1753   echo "$ac_t""$CC" 1>&6
1754 else
1755   echo "$ac_t""no" 1>&6
1756 fi
1757  ;;
1758     esac
1759   fi
1760   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1761 fi
1762
1763 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1764 echo "configure:1765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1765
1766 ac_ext=c
1767 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1768 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1769 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1770 ac_cpp='$CPP '"$xe_cppflags"
1771 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1772 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1773 cross_compiling=no
1774
1775 cat > conftest.$ac_ext << EOF
1776
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779
1780 main(){return(0);}
1781 EOF
1782 if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1783   ac_cv_prog_cc_works=yes
1784   # If we can't run a trivial program, we are probably using a cross compiler.
1785   if (./conftest; exit) 2>/dev/null; then
1786     ac_cv_prog_cc_cross=no
1787   else
1788     ac_cv_prog_cc_cross=yes
1789   fi
1790 else
1791   echo "configure: failed program was:" >&5
1792   cat conftest.$ac_ext >&5
1793   ac_cv_prog_cc_works=no
1794 fi
1795 rm -fr conftest*
1796 ac_ext=c
1797 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1798 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1799 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1800 ac_cpp='$CPP '"$xe_cppflags"
1801 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1802 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1803 cross_compiling=no
1804
1805 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1806 if test $ac_cv_prog_cc_works = no; then
1807   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1808 fi
1809 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1810 echo "configure:1811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1811 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1812 cross_compiling=$ac_cv_prog_cc_cross
1813
1814 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1815 echo "configure:1816: checking whether we are using GNU C" >&5
1816
1817 cat > conftest.c <<EOF
1818 #ifdef __GNUC__
1819   yes;
1820 #endif
1821 EOF
1822 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1823   ac_cv_prog_gcc=yes
1824 else
1825   ac_cv_prog_gcc=no
1826 fi
1827
1828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1829
1830 if test $ac_cv_prog_gcc = yes; then
1831   GCC=yes
1832 else
1833   GCC=
1834 fi
1835
1836 ac_test_CFLAGS="${CFLAGS+set}"
1837 ac_save_CFLAGS="$CFLAGS"
1838 CFLAGS=
1839 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1840 echo "configure:1841: checking whether ${CC-cc} accepts -g" >&5
1841
1842 echo 'void f(){}' > conftest.c
1843 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1844   ac_cv_prog_cc_g=yes
1845 else
1846   ac_cv_prog_cc_g=no
1847 fi
1848 rm -f conftest*
1849
1850
1851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1852 if test "$ac_test_CFLAGS" = set; then
1853   CFLAGS="$ac_save_CFLAGS"
1854 elif test $ac_cv_prog_cc_g = yes; then
1855   if test "$GCC" = yes; then
1856     CFLAGS="-g -O2"
1857   else
1858     CFLAGS="-g"
1859   fi
1860 else
1861   if test "$GCC" = yes; then
1862     CFLAGS="-O2"
1863   else
1864     CFLAGS=
1865   fi
1866 fi
1867  
1868 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1869   CC=${NON_GNU_CC-cc}
1870   # Extract the first word of "gcc", so it can be a program name with args.
1871 set dummy gcc; ac_word=$2
1872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1873 echo "configure:1874: checking for $ac_word" >&5
1874
1875 if test -n "$CC"; then
1876   ac_cv_prog_CC="$CC" # Let the user override the test.
1877 else
1878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1879   ac_dummy="$PATH"
1880   for ac_dir in $ac_dummy; do
1881     test -z "$ac_dir" && ac_dir=.
1882     if test -f $ac_dir/$ac_word; then
1883       ac_cv_prog_CC="gcc"
1884       break
1885     fi
1886   done
1887   IFS="$ac_save_ifs"
1888 fi
1889 CC="$ac_cv_prog_CC"
1890 if test -n "$CC"; then
1891   echo "$ac_t""$CC" 1>&6
1892 else
1893   echo "$ac_t""no" 1>&6
1894 fi
1895
1896 if test -z "$CC"; then
1897   # Extract the first word of "cc", so it can be a program name with args.
1898 set dummy cc; ac_word=$2
1899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1900 echo "configure:1901: checking for $ac_word" >&5
1901
1902 if test -n "$CC"; then
1903   ac_cv_prog_CC="$CC" # Let the user override the test.
1904 else
1905   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1906   ac_prog_rejected=no
1907   ac_dummy="$PATH"
1908   for ac_dir in $ac_dummy; do
1909     test -z "$ac_dir" && ac_dir=.
1910     if test -f $ac_dir/$ac_word; then
1911       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1912         ac_prog_rejected=yes
1913         continue
1914       fi
1915       ac_cv_prog_CC="cc"
1916       break
1917     fi
1918   done
1919   IFS="$ac_save_ifs"
1920 if test $ac_prog_rejected = yes; then
1921   # We found a bogon in the path, so make sure we never use it.
1922   set dummy $ac_cv_prog_CC
1923   shift
1924   if test $# -gt 0; then
1925     # We chose a different compiler from the bogus one.
1926     # However, it has the same basename, so the bogon will be chosen
1927     # first if we set CC to just the basename; use the full file name.
1928     shift
1929     set dummy "$ac_dir/$ac_word" "$@"
1930     shift
1931     ac_cv_prog_CC="$@"
1932   fi
1933 fi
1934 fi
1935 CC="$ac_cv_prog_CC"
1936 if test -n "$CC"; then
1937   echo "$ac_t""$CC" 1>&6
1938 else
1939   echo "$ac_t""no" 1>&6
1940 fi
1941
1942   if test -z "$CC"; then
1943     case "`uname -s`" in
1944     *win32* | *WIN32*)
1945       # Extract the first word of "cl", so it can be a program name with args.
1946 set dummy cl; ac_word=$2
1947 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1948 echo "configure:1949: checking for $ac_word" >&5
1949
1950 if test -n "$CC"; then
1951   ac_cv_prog_CC="$CC" # Let the user override the test.
1952 else
1953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1954   ac_dummy="$PATH"
1955   for ac_dir in $ac_dummy; do
1956     test -z "$ac_dir" && ac_dir=.
1957     if test -f $ac_dir/$ac_word; then
1958       ac_cv_prog_CC="cl"
1959       break
1960     fi
1961   done
1962   IFS="$ac_save_ifs"
1963 fi
1964 CC="$ac_cv_prog_CC"
1965 if test -n "$CC"; then
1966   echo "$ac_t""$CC" 1>&6
1967 else
1968   echo "$ac_t""no" 1>&6
1969 fi
1970  ;;
1971     esac
1972   fi
1973   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1974 fi
1975
1976 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1977 echo "configure:1978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1978
1979 ac_ext=c
1980 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1981 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1982 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1983 ac_cpp='$CPP '"$xe_cppflags"
1984 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1985 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1986 cross_compiling=no
1987
1988 cat > conftest.$ac_ext << EOF
1989
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1992
1993 main(){return(0);}
1994 EOF
1995 if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1996   ac_cv_prog_cc_works=yes
1997   # If we can't run a trivial program, we are probably using a cross compiler.
1998   if (./conftest; exit) 2>/dev/null; then
1999     ac_cv_prog_cc_cross=no
2000   else
2001     ac_cv_prog_cc_cross=yes
2002   fi
2003 else
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   ac_cv_prog_cc_works=no
2007 fi
2008 rm -fr conftest*
2009 ac_ext=c
2010 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2011 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2012 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2013 ac_cpp='$CPP '"$xe_cppflags"
2014 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2015 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2016 cross_compiling=no
2017
2018 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2019 if test $ac_cv_prog_cc_works = no; then
2020   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2021 fi
2022 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2023 echo "configure:2024: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2024 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2025 cross_compiling=$ac_cv_prog_cc_cross
2026
2027 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2028 echo "configure:2029: checking whether we are using GNU C" >&5
2029
2030 cat > conftest.c <<EOF
2031 #ifdef __GNUC__
2032   yes;
2033 #endif
2034 EOF
2035 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2036   ac_cv_prog_gcc=yes
2037 else
2038   ac_cv_prog_gcc=no
2039 fi
2040
2041 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2042
2043 if test $ac_cv_prog_gcc = yes; then
2044   GCC=yes
2045 else
2046   GCC=
2047 fi
2048
2049 ac_test_CFLAGS="${CFLAGS+set}"
2050 ac_save_CFLAGS="$CFLAGS"
2051 CFLAGS=
2052 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2053 echo "configure:2054: checking whether ${CC-cc} accepts -g" >&5
2054
2055 echo 'void f(){}' > conftest.c
2056 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2057   ac_cv_prog_cc_g=yes
2058 else
2059   ac_cv_prog_cc_g=no
2060 fi
2061 rm -f conftest*
2062
2063
2064 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2065 if test "$ac_test_CFLAGS" = set; then
2066   CFLAGS="$ac_save_CFLAGS"
2067 elif test $ac_cv_prog_cc_g = yes; then
2068   if test "$GCC" = yes; then
2069     CFLAGS="-g -O2"
2070   else
2071     CFLAGS="-g"
2072   fi
2073 else
2074   if test "$GCC" = yes; then
2075     CFLAGS="-O2"
2076   else
2077     CFLAGS=
2078   fi
2079 fi
2080
2081 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2082   CC=gcc
2083   # Extract the first word of "gcc", so it can be a program name with args.
2084 set dummy gcc; ac_word=$2
2085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2086 echo "configure:2087: checking for $ac_word" >&5
2087
2088 if test -n "$CC"; then
2089   ac_cv_prog_CC="$CC" # Let the user override the test.
2090 else
2091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2092   ac_dummy="$PATH"
2093   for ac_dir in $ac_dummy; do
2094     test -z "$ac_dir" && ac_dir=.
2095     if test -f $ac_dir/$ac_word; then
2096       ac_cv_prog_CC="gcc"
2097       break
2098     fi
2099   done
2100   IFS="$ac_save_ifs"
2101 fi
2102 CC="$ac_cv_prog_CC"
2103 if test -n "$CC"; then
2104   echo "$ac_t""$CC" 1>&6
2105 else
2106   echo "$ac_t""no" 1>&6
2107 fi
2108
2109 if test -z "$CC"; then
2110   # Extract the first word of "cc", so it can be a program name with args.
2111 set dummy cc; ac_word=$2
2112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2113 echo "configure:2114: checking for $ac_word" >&5
2114
2115 if test -n "$CC"; then
2116   ac_cv_prog_CC="$CC" # Let the user override the test.
2117 else
2118   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2119   ac_prog_rejected=no
2120   ac_dummy="$PATH"
2121   for ac_dir in $ac_dummy; do
2122     test -z "$ac_dir" && ac_dir=.
2123     if test -f $ac_dir/$ac_word; then
2124       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2125         ac_prog_rejected=yes
2126         continue
2127       fi
2128       ac_cv_prog_CC="cc"
2129       break
2130     fi
2131   done
2132   IFS="$ac_save_ifs"
2133 if test $ac_prog_rejected = yes; then
2134   # We found a bogon in the path, so make sure we never use it.
2135   set dummy $ac_cv_prog_CC
2136   shift
2137   if test $# -gt 0; then
2138     # We chose a different compiler from the bogus one.
2139     # However, it has the same basename, so the bogon will be chosen
2140     # first if we set CC to just the basename; use the full file name.
2141     shift
2142     set dummy "$ac_dir/$ac_word" "$@"
2143     shift
2144     ac_cv_prog_CC="$@"
2145   fi
2146 fi
2147 fi
2148 CC="$ac_cv_prog_CC"
2149 if test -n "$CC"; then
2150   echo "$ac_t""$CC" 1>&6
2151 else
2152   echo "$ac_t""no" 1>&6
2153 fi
2154
2155   if test -z "$CC"; then
2156     case "`uname -s`" in
2157     *win32* | *WIN32*)
2158       # Extract the first word of "cl", so it can be a program name with args.
2159 set dummy cl; ac_word=$2
2160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2161 echo "configure:2162: checking for $ac_word" >&5
2162
2163 if test -n "$CC"; then
2164   ac_cv_prog_CC="$CC" # Let the user override the test.
2165 else
2166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2167   ac_dummy="$PATH"
2168   for ac_dir in $ac_dummy; do
2169     test -z "$ac_dir" && ac_dir=.
2170     if test -f $ac_dir/$ac_word; then
2171       ac_cv_prog_CC="cl"
2172       break
2173     fi
2174   done
2175   IFS="$ac_save_ifs"
2176 fi
2177 CC="$ac_cv_prog_CC"
2178 if test -n "$CC"; then
2179   echo "$ac_t""$CC" 1>&6
2180 else
2181   echo "$ac_t""no" 1>&6
2182 fi
2183  ;;
2184     esac
2185   fi
2186   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2187 fi
2188
2189 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2190 echo "configure:2191: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2191
2192 ac_ext=c
2193 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2194 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2195 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2196 ac_cpp='$CPP '"$xe_cppflags"
2197 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2198 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2199 cross_compiling=no
2200
2201 cat > conftest.$ac_ext << EOF
2202
2203 #line 2204 "configure"
2204 #include "confdefs.h"
2205
2206 main(){return(0);}
2207 EOF
2208 if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2209   ac_cv_prog_cc_works=yes
2210   # If we can't run a trivial program, we are probably using a cross compiler.
2211   if (./conftest; exit) 2>/dev/null; then
2212     ac_cv_prog_cc_cross=no
2213   else
2214     ac_cv_prog_cc_cross=yes
2215   fi
2216 else
2217   echo "configure: failed program was:" >&5
2218   cat conftest.$ac_ext >&5
2219   ac_cv_prog_cc_works=no
2220 fi
2221 rm -fr conftest*
2222 ac_ext=c
2223 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2224 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2225 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2226 ac_cpp='$CPP '"$xe_cppflags"
2227 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2228 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2229 cross_compiling=no
2230
2231 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2232 if test $ac_cv_prog_cc_works = no; then
2233   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2234 fi
2235 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2236 echo "configure:2237: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2237 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2238 cross_compiling=$ac_cv_prog_cc_cross
2239
2240 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2241 echo "configure:2242: checking whether we are using GNU C" >&5
2242
2243 cat > conftest.c <<EOF
2244 #ifdef __GNUC__
2245   yes;
2246 #endif
2247 EOF
2248 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2249   ac_cv_prog_gcc=yes
2250 else
2251   ac_cv_prog_gcc=no
2252 fi
2253
2254 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2255
2256 if test $ac_cv_prog_gcc = yes; then
2257   GCC=yes
2258 else
2259   GCC=
2260 fi
2261
2262 ac_test_CFLAGS="${CFLAGS+set}"
2263 ac_save_CFLAGS="$CFLAGS"
2264 CFLAGS=
2265 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2266 echo "configure:2267: checking whether ${CC-cc} accepts -g" >&5
2267
2268 echo 'void f(){}' > conftest.c
2269 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2270   ac_cv_prog_cc_g=yes
2271 else
2272   ac_cv_prog_cc_g=no
2273 fi
2274 rm -f conftest*
2275
2276
2277 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2278 if test "$ac_test_CFLAGS" = set; then
2279   CFLAGS="$ac_save_CFLAGS"
2280 elif test $ac_cv_prog_cc_g = yes; then
2281   if test "$GCC" = yes; then
2282     CFLAGS="-g -O2"
2283   else
2284     CFLAGS="-g"
2285   fi
2286 else
2287   if test "$GCC" = yes; then
2288     CFLAGS="-O2"
2289   else
2290     CFLAGS=
2291   fi
2292 fi
2293
2294 fi
2295 CFLAGS="$xe_save_CFLAGS"
2296
2297
2298 test -n "$CPP" -a -d "$CPP" && CPP=
2299
2300 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2301
2302 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2303 echo "configure:2304: checking how to run the C preprocessor" >&5
2304 # On Suns, sometimes $CPP names a directory.
2305 if test -n "$CPP" && test -d "$CPP"; then
2306   CPP=
2307 fi
2308 if test -z "$CPP"; then
2309
2310   # This must be in double quotes, not single quotes, because CPP may get
2311   # substituted into the Makefile and "${CC-cc}" will confuse make.
2312   CPP="${CC-cc} -E"
2313   # On the NeXT, cc -E runs the code through the compiler's parser,
2314   # not just through cpp.
2315   cat > conftest.$ac_ext <<EOF
2316 #line 2317 "configure"
2317 #include "confdefs.h"
2318 #include <assert.h>
2319 Syntax Error
2320 EOF
2321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2322 { (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2324 if test -z "$ac_err"; then
2325   :
2326 else
2327   echo "$ac_err" >&5
2328   echo "configure: failed program was:" >&5
2329   cat conftest.$ac_ext >&5
2330   rm -rf conftest*
2331   CPP="${CC-cc} -E -traditional-cpp"
2332   cat > conftest.$ac_ext <<EOF
2333 #line 2334 "configure"
2334 #include "confdefs.h"
2335 #include <assert.h>
2336 Syntax Error
2337 EOF
2338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2339 { (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2341 if test -z "$ac_err"; then
2342   :
2343 else
2344   echo "$ac_err" >&5
2345   echo "configure: failed program was:" >&5
2346   cat conftest.$ac_ext >&5
2347   rm -rf conftest*
2348   CPP="${CC-cc} -nologo -E"
2349   cat > conftest.$ac_ext <<EOF
2350 #line 2351 "configure"
2351 #include "confdefs.h"
2352 #include <assert.h>
2353 Syntax Error
2354 EOF
2355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2356 { (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2358 if test -z "$ac_err"; then
2359   :
2360 else
2361   echo "$ac_err" >&5
2362   echo "configure: failed program was:" >&5
2363   cat conftest.$ac_ext >&5
2364   rm -rf conftest*
2365   CPP=/lib/cpp
2366 fi
2367 rm -f conftest*
2368 fi
2369 rm -f conftest*
2370 fi
2371 rm -f conftest*
2372   ac_cv_prog_CPP="$CPP"
2373   CPP="$ac_cv_prog_CPP"
2374 else
2375   ac_cv_prog_CPP="$CPP"
2376 fi
2377 echo "$ac_t""$CPP" 1>&6
2378
2379
2380
2381 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2382 echo "configure:2383: checking for AIX" >&5
2383 cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #ifdef _AIX
2387   yes
2388 #endif
2389
2390 EOF
2391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2392   egrep "yes" >/dev/null 2>&1; then
2393   rm -rf conftest*
2394   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2395     Defining _ALL_SOURCE
2396 EOF
2397 cat >> confdefs.h <<\EOF
2398 #define _ALL_SOURCE 1
2399 EOF
2400 }
2401
2402 else
2403   rm -rf conftest*
2404   echo "$ac_t""no" 1>&6
2405 fi
2406 rm -f conftest*
2407
2408  
2409
2410 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2411 echo "configure:2412: checking for GNU libc" >&5
2412 cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.h"
2415 #include <features.h>
2416 int main() {
2417
2418 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2419 #error Not a GNU libc system :-(
2420 ******* ======= ******** &&&&&&&&
2421 #endif
2422
2423 ; return 0; }
2424 EOF
2425 if { (eval echo configure:2426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2426   rm -rf conftest*
2427   have_glibc=yes
2428 else
2429   echo "configure: failed program was:" >&5
2430   cat conftest.$ac_ext >&5
2431   rm -rf conftest*
2432   have_glibc=no
2433 fi
2434 rm -f conftest*
2435 echo "$ac_t""$have_glibc" 1>&6
2436 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2437     Defining _GNU_SOURCE
2438 EOF
2439 cat >> confdefs.h <<\EOF
2440 #define _GNU_SOURCE 1
2441 EOF
2442 }
2443
2444
2445 case "$opsys" in
2446   sol2)
2447    { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining __EXTENSIONS__
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define __EXTENSIONS__ 1
2452 EOF
2453 }
2454
2455       if test "$os_release" -ge 505; then
2456      { test "$extra_verbose" = "yes" && cat << \EOF
2457     Defining _XOPEN_SOURCE = 500
2458 EOF
2459 cat >> confdefs.h <<\EOF
2460 #define _XOPEN_SOURCE 500
2461 EOF
2462 }
2463
2464      { test "$extra_verbose" = "yes" && cat << \EOF
2465     Defining _XOPEN_SOURCE_EXTENDED
2466 EOF
2467 cat >> confdefs.h <<\EOF
2468 #define _XOPEN_SOURCE_EXTENDED 1
2469 EOF
2470 }
2471
2472    fi ;;
2473   linux)
2474     { test "$extra_verbose" = "yes" && cat << \EOF
2475     Defining _POSIX_C_SOURCE = 199506L
2476 EOF
2477 cat >> confdefs.h <<\EOF
2478 #define _POSIX_C_SOURCE 199506L
2479 EOF
2480 }
2481
2482     { test "$extra_verbose" = "yes" && cat << \EOF
2483     Defining _XOPEN_SOURCE = 500
2484 EOF
2485 cat >> confdefs.h <<\EOF
2486 #define _XOPEN_SOURCE 500
2487 EOF
2488 }
2489
2490     { test "$extra_verbose" = "yes" && cat << \EOF
2491     Defining _XOPEN_SOURCE_EXTENDED
2492 EOF
2493 cat >> confdefs.h <<\EOF
2494 #define _XOPEN_SOURCE_EXTENDED 1
2495 EOF
2496 }
2497
2498     ;;
2499 esac
2500
2501 cat > conftest.$ac_ext <<EOF
2502 #line 2503 "configure"
2503 #include "confdefs.h"
2504 int main () {
2505 #if defined __SUNPRO_C
2506 return 11;
2507 #elif defined __DECC
2508 return 12;
2509 #elif defined __USLC__ && defined __SCO_VERSION__
2510 return 13;
2511 #elif defined __INTEL_COMPILER
2512 return 14;
2513 #else
2514 return 0;
2515 #endif
2516 }
2517 EOF
2518 if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2519 then
2520   :
2521 else
2522   conftest_rc="$?"
2523   echo "configure: failed program was:" >&5
2524   cat conftest.$ac_ext >&5
2525   rm -fr conftest*
2526   case "$conftest_rc" in
2527   11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
2528   12) echo "You appear to be using the DEC C compiler."    ; __DECC=yes ;;
2529   13) echo "You appear to be using the SCO C compiler."    ; __USLC__=yes ;;
2530   14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
2531             GCC=no ;;
2532 esac
2533 fi
2534 rm -fr conftest*
2535
2536
2537
2538
2539 echo "Extracting information from the machine- and system-dependent headers..."
2540
2541 tempcname="conftest.c"
2542
2543
2544
2545 cat > $tempcname < confdefs.h
2546 cat >> $tempcname <<EOF
2547 #define NOT_C_CODE
2548 #define C_SWITCH_SITE
2549 #define C_SWITCH_X_SITE
2550 #define LD_SWITCH_SITE
2551 #define LD_SWITCH_X_SITE
2552 #define LD_SWITCH_X_SITE_AUX
2553 #define OS_RELEASE $os_release
2554
2555 #ifdef config_opsysfile
2556 #include "$srcdir/src/$opsysfile"
2557 #endif
2558
2559 #ifdef config_machfile
2560 #include "$srcdir/src/$machfile"
2561 #endif
2562
2563 #ifndef LIBS_MACHINE
2564 #define LIBS_MACHINE
2565 #endif
2566 configure___ libs_machine=LIBS_MACHINE
2567
2568 #ifndef LIBS_SYSTEM
2569 #define LIBS_SYSTEM
2570 #endif
2571 configure___ libs_system=LIBS_SYSTEM
2572
2573 #ifndef LIBS_TERMCAP
2574 #define LIBS_TERMCAP
2575 #endif
2576 configure___ libs_termcap=LIBS_TERMCAP
2577
2578 #ifndef LIB_STANDARD
2579 #define LIB_STANDARD
2580 #endif
2581 configure___ libs_standard=LIB_STANDARD
2582
2583
2584 #ifndef OBJECTS_MACHINE
2585 #define OBJECTS_MACHINE
2586 #endif
2587 configure___ objects_machine=OBJECTS_MACHINE
2588
2589 #ifndef OBJECTS_SYSTEM
2590 #define OBJECTS_SYSTEM
2591 #endif
2592 configure___ objects_system=OBJECTS_SYSTEM
2593
2594
2595 #ifndef C_SWITCH_MACHINE
2596 #define C_SWITCH_MACHINE
2597 #endif
2598 configure___ c_switch_machine=C_SWITCH_MACHINE
2599
2600 #ifndef C_SWITCH_SYSTEM
2601 #define C_SWITCH_SYSTEM
2602 #endif
2603 configure___ c_switch_system=C_SWITCH_SYSTEM
2604
2605
2606 #ifndef LD_SWITCH_MACHINE
2607 #define LD_SWITCH_MACHINE
2608 #endif
2609 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2610
2611 #ifndef LD_SWITCH_SYSTEM
2612 #define LD_SWITCH_SYSTEM
2613 #endif
2614 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2615
2616
2617 #ifndef UNEXEC
2618 #define UNEXEC "unexec.o"
2619 #endif
2620 configure___ unexec=UNEXEC
2621
2622
2623 #ifndef LD_SWITCH_SHARED
2624 #define LD_SWITCH_SHARED "-c"
2625 #endif
2626 configure___ ld_switch_shared=LD_SWITCH_SHARED
2627
2628
2629 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2630 configure___ ordinary_ld=ORDINARY_LD
2631
2632 #ifdef ORDINARY_LINK
2633 #define LD ORDINARY_LD
2634 #else /* no ORDINARY LINK */
2635 #ifdef COFF_ENCAPSULATE
2636 #define LD "\$(CC) -nostdlib"
2637 #else /* not COFF_ENCAPSULATE */
2638 #ifdef LINKER
2639 #define LD LINKER
2640 #else /* ! defined (LINKER) */
2641 #define LD "ld"
2642 #endif /* ! defined (LINKER) */
2643 #endif /* ! defined (COFF_ENCAPSULATE) */
2644 #endif /* not ORDINARY_LINK */
2645 configure___ ld=LD
2646
2647 #ifndef LIB_GCC
2648 #define LIB_GCC
2649 #endif
2650 configure___ lib_gcc=LIB_GCC
2651
2652 #ifndef LD_TEXT_START_ADDR
2653 #define LD_TEXT_START_ADDR
2654 #endif
2655 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2656
2657
2658 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2659 #ifdef NO_REMAP
2660 #ifdef COFF_ENCAPSULATE
2661 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2662 #else /* ! defined (COFF_ENCAPSULATE) */
2663 #define START_FILES "pre-crt0.o /lib/crt0.o"
2664 #endif /* ! defined (COFF_ENCAPSULATE) */
2665 #else /* ! defined (NO_REMAP) */
2666 #define START_FILES "ecrt0.o"
2667 #endif /* ! defined (NO_REMAP) */
2668 #endif /* no ORDINARY_LINK */
2669 #ifndef START_FILES
2670 #define START_FILES
2671 #endif
2672 configure___ start_files=START_FILES
2673
2674 #ifdef ORDINARY_LINK
2675 configure___ ordinary_link=yes
2676 #else
2677 configure___ ordinary_link=no
2678 #endif
2679
2680 #ifdef SYSTEM_MALLOC
2681 configure___ system_malloc=yes
2682 #else
2683 configure___ system_malloc=no
2684 #endif
2685
2686 #ifdef TERMINFO
2687 configure___ have_terminfo=yes
2688 #else
2689 configure___ have_terminfo=no
2690 #endif
2691
2692 #ifdef MAIL_USE_FLOCK
2693 configure___ mail_use_flock=yes
2694 #else
2695 configure___ mail_use_flock=no
2696 #endif
2697
2698 #ifdef MAIL_USE_LOCKF
2699 configure___ mail_use_lockf=yes
2700 #else
2701 configure___ mail_use_lockf=no
2702 #endif
2703
2704 #ifdef MAIL_USE_LOCKING
2705 configure___ mail_use_locking=yes
2706 #else
2707 configure___ mail_use_locking=no
2708 #endif
2709
2710 #ifdef HAVE_WIN32_PROCESSES
2711 configure___ win32_processes=yes
2712 #else
2713 configure___ win32_processes=no
2714 #endif
2715
2716 EOF
2717
2718 CPP=`eval "echo $CPP $CPPFLAGS"`
2719 eval `$CPP -Isrc $tempcname \
2720         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2721
2722 rm $tempcname
2723
2724 if test "$pdump" = "yes"; then
2725   ordinary_link="yes"
2726   ld="${ordinary_ld}"
2727   start_files=
2728   libs_standard=
2729   unexec=
2730   lib_gcc=
2731 fi
2732
2733 test "$extra_verbose" = "yes" && \
2734   for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   ld_switch_machine ld_switch_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
2735
2736 case "$opsys" in mingw* | cygwin*)
2737   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2738   cygwin_include=`eval "dirname $cygwin_include"` ;
2739   cygwin_include="-I$cygwin_include/../include" ;
2740   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2741   case "$opsys" in mingw*)
2742     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2743   esac
2744   ;;
2745 esac
2746
2747 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2748
2749
2750 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2751
2752 if test "$__USLC__" = yes; then
2753   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2754 echo "configure:2755: checking for whether the -Kalloca compiler flag is needed" >&5
2755   need_kalloca=no
2756   cat > conftest.$ac_ext <<EOF
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759
2760 int main() {
2761 void *x = alloca(4);
2762 ; return 0; }
2763 EOF
2764 if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2765   rm -rf conftest*
2766   :
2767 else
2768   echo "configure: failed program was:" >&5
2769   cat conftest.$ac_ext >&5
2770   rm -rf conftest*
2771   
2772     xe_save_c_switch_system="$c_switch_system"
2773     c_switch_system="$c_switch_system -Kalloca"
2774     cat > conftest.$ac_ext <<EOF
2775 #line 2776 "configure"
2776 #include "confdefs.h"
2777
2778 int main() {
2779 void *x = alloca(4);
2780 ; return 0; }
2781 EOF
2782 if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2783   rm -rf conftest*
2784    need_kalloca=yes 
2785 else
2786   echo "configure: failed program was:" >&5
2787   cat conftest.$ac_ext >&5
2788 fi
2789 rm -f conftest*
2790     c_switch_system="$xe_save_c_switch_system"
2791 fi
2792 rm -f conftest*
2793   echo "$ac_t""$need_kalloca" 1>&6
2794   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2795 fi
2796
2797 if test "$cflags_specified" = "no"; then
2798       if   test "$GCC" = "yes"; then
2799     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2800         CFLAGS="$CFLAGS -Wsign-compare"
2801         case "`gcc -v --help 2>&1`" in
2802       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2803     esac
2804                 if test "$xemacs_compiler" != "g++"; then
2805       CFLAGS="$CFLAGS -Wshadow"
2806     fi
2807             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2808               elif test "$__SUNPRO_C" = "yes"; then
2809     case "$opsys" in
2810       sol2    ) CFLAGS="-v -xO4" ;;
2811       sunos4* ) CFLAGS="-xO2";;
2812     esac
2813   elif test "$__DECC" = "yes"; then
2814     CFLAGS="-O3"
2815   elif test "$CC" = "xlc"; then
2816     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2817   elif test "$__ICC" = "yes"; then
2818     CFLAGS="-g -O3 -Ob2 -Wall -W1"
2819     else
2820     CFLAGS="-O" ;  fi
2821 fi
2822
2823 if test "$GCC" = "yes"; then
2824 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2825 echo "configure:2826: checking for buggy gcc versions" >&5
2826 GCC_VERSION=`$CC --version`
2827 case `uname -s`:`uname -m`:$GCC_VERSION in
2828                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2829                         case "$CFLAGS" in
2830             *-O2*|*-O3*)
2831                 case "$CFLAGS" in
2832                     *-fno-schedule-insns*) ;;
2833                     *)
2834                         echo "$ac_t""yes" 1>&6
2835                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2836                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2837                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2838                         ;;
2839                 esac
2840                 ;;
2841         esac
2842         ;;
2843                     Linux:alpha:egcs-2.91.*)
2844         echo "$ac_t""yes" 1>&6
2845         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2846         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2847         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2848         ;;
2849     *:i*86*:2.7.2*)
2850         case "$CFLAGS" in
2851             *-O2*|*-O3*)
2852                 case "$GCC_VERSION" in
2853                     2.7.2)
2854                         case "$CFLAGS" in
2855                             *-fno-strength-reduce*) ;;
2856                             *)
2857                                 echo "$ac_t""yes" 1>&6
2858                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2859                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2860                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2861                                 ;;
2862                         esac
2863                         ;;
2864                 esac
2865                 case "$CFLAGS" in
2866                  *-fno-caller-saves*) ;;
2867                  *)
2868                     echo "$ac_t""yes" 1>&6
2869                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2870                     echo "configure: warning: -fno-caller-saves." 1>&2
2871                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2872                     ;;
2873                 esac
2874                 ;;
2875         esac
2876         ;;
2877 esac
2878 echo "$ac_t""no" 1>&6
2879 fi
2880
2881 if test "$pdump" != "yes"; then
2882   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2883 echo "configure:2884: checking for \"-z nocombreloc\" linker flag" >&5
2884   case "`ld --help 2>&1`" in
2885     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2886       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2887     *) echo "$ac_t""no" 1>&6 ;;
2888   esac
2889 fi
2890
2891
2892
2893 if test "$GCC" = "yes"; then
2894   set x $ld_switch_system; shift; ld_switch_system=""
2895   while test -n "$1"; do
2896     case $1 in
2897       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2898       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2899       -Xlinker* ) ;;
2900       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2901     esac
2902     shift
2903   done
2904 fi
2905
2906 if test "$GCC" = "yes"; then
2907   set x $ld_switch_machine; shift; ld_switch_machine=""
2908   while test -n "$1"; do
2909     case $1 in
2910       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2911       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2912       -Xlinker* ) ;;
2913       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2914     esac
2915     shift
2916   done
2917 fi
2918
2919 if test "$GCC" = "yes"; then
2920   set x $ld_switch_site; shift; ld_switch_site=""
2921   while test -n "$1"; do
2922     case $1 in
2923       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2924       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2925       -Xlinker* ) ;;
2926       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2927     esac
2928     shift
2929   done
2930 fi
2931
2932 if test "$GCC" = "yes"; then
2933   set x $LDFLAGS; shift; LDFLAGS=""
2934   while test -n "$1"; do
2935     case $1 in
2936       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2937       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2938       -Xlinker* ) ;;
2939       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2940     esac
2941     shift
2942   done
2943 fi
2944
2945 if test "$GCC" = "yes"; then
2946   set x $ld_call_shared; shift; ld_call_shared=""
2947   while test -n "$1"; do
2948     case $1 in
2949       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2950       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2951       -Xlinker* ) ;;
2952       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2953     esac
2954     shift
2955   done
2956 fi
2957
2958 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2959    echo "    xemacs will be linked with \"$objects_machine\""
2960  fi
2961 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2962    echo "    xemacs will be linked with \"$objects_system\""
2963  fi
2964 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2965    echo "    xemacs will be linked with \"$unexec\""
2966  fi
2967 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2968    echo "    xemacs will be linked with \"dumper.o\""
2969  fi
2970
2971 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2972 echo "configure:2973: checking for dynodump" >&5
2973 if test "$unexec" != "unexsol2.o"; then
2974   echo "$ac_t""no" 1>&6
2975 else
2976   echo "$ac_t""yes" 1>&6
2977   { test "$extra_verbose" = "yes" && cat << \EOF
2978     Defining DYNODUMP
2979 EOF
2980 cat >> confdefs.h <<\EOF
2981 #define DYNODUMP 1
2982 EOF
2983 }
2984
2985   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2986   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2987   case "$machine" in
2988     sparc   ) dynodump_arch=sparc ;;
2989     *86*    ) dynodump_arch=i386  ;;
2990     powerpc ) dynodump_arch=ppc   ;;
2991   esac
2992     test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
2993 fi
2994
2995
2996
2997 if test "$unexec" = "unexaix.o"; then
2998   if   test "$dynamic" = "no"; then
2999   start_flags="-Wl,-bnso,-bnodelcsect"
3000   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
3001   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
3002     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
3003   done
3004   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3005     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3006   done
3007   
3008 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3009 echo "configure:3010: checking for terminateAndUnload in -lC" >&5
3010 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3011
3012 xe_check_libs=" -lC "
3013 cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 /* Override any gcc2 internal prototype to avoid an error.  */
3017 /* We use char because int might match the return type of a gcc2
3018     builtin and then its argument prototype would still apply.  */
3019 char terminateAndUnload();
3020
3021 int main() {
3022 terminateAndUnload()
3023 ; return 0; }
3024 EOF
3025 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3026   rm -rf conftest*
3027   eval "ac_cv_lib_$ac_lib_var=yes"
3028 else
3029   echo "configure: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   rm -rf conftest*
3032   eval "ac_cv_lib_$ac_lib_var=no"
3033 fi
3034 rm -f conftest*
3035 xe_check_libs=""
3036
3037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3038   echo "$ac_t""yes" 1>&6
3039   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3040 else
3041   echo "$ac_t""no" 1>&6
3042 fi
3043
3044
3045   fi
3046 elif test -n "$ld_text_start_addr"; then
3047   start_flags="-T $ld_text_start_addr -e __start"
3048 fi
3049
3050
3051
3052
3053 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3054  test -z "$linker" &&  linker='$(CC) -nostdlib'
3055  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3056 fi
3057 test "$GCC" != "yes" && lib_gcc=
3058
3059
3060
3061
3062
3063 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3064 if test -n "$site_libraries"; then
3065   for arg in $site_libraries; do
3066     case "$arg" in
3067      -* ) ;;
3068      * ) test -d "$arg" || \
3069            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3070        arg="-L${arg}" ;;
3071     esac
3072     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3073   done
3074 fi
3075
3076 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3077 if test -n "$site_includes"; then
3078   for arg in $site_includes; do
3079     case "$arg" in
3080       -* ) ;;
3081       * ) test -d "$arg" || \
3082            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3083       arg="-I${arg}" ;;
3084     esac
3085     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3086   done
3087 fi
3088
3089 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3090 if test -n "$site_prefixes"; then
3091   for dir in $site_prefixes; do
3092     lib_dir="${dir}/lib"
3093     inc_dir="${dir}/include"
3094     if test ! -d "$dir"; then
3095       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3096     elif test ! -d "$lib_dir"; then
3097       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3098     else
3099       if test -d "$inc_dir"; then
3100         c_switch_site="$c_switch_site "-I$inc_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I$inc_dir"\" to \$c_switch_site"; fi
3101       fi
3102       ld_switch_site="$ld_switch_site "-L$lib_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi
3103     fi
3104   done
3105 fi
3106
3107
3108 for dir in "/usr/ccs/lib"; do
3109   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3110 done
3111
3112 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3113 if test -n "$site_runtime_libraries"; then
3114   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3115   export LD_RUN_PATH
3116 fi
3117
3118
3119
3120
3121
3122 if test -n "$add_runtime_path"; then :;
3123 elif test "$dynamic" = "no"; then add_runtime_path=no
3124 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3125 else case "$opsys" in
3126        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3127        * ) add_runtime_path=no ;;
3128      esac
3129 fi
3130
3131 if test "$add_runtime_path" = "yes"; then
3132       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3133 echo "configure:3134: checking "for runtime libraries flag"" >&5
3134   case "$opsys" in
3135     sol2 ) dash_r="-R" ;;
3136     decosf* | linux* | irix*) dash_r="-rpath " ;;
3137     *)
3138       dash_r=""
3139       for try_dash_r in "-R" "-R " "-rpath "; do
3140         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3141         
3142 if test "$GCC" = "yes"; then
3143   set x $xe_check_libs; shift; xe_check_libs=""
3144   while test -n "$1"; do
3145     case $1 in
3146       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3147       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3148       -Xlinker* ) ;;
3149       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3150     esac
3151     shift
3152   done
3153 fi
3154         cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157
3158 int main() {
3159
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3163   rm -rf conftest*
3164   dash_r="$try_dash_r"
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168 fi
3169 rm -f conftest*
3170         xe_check_libs=""
3171         test -n "$dash_r" && break
3172       done ;;
3173   esac
3174   if test -n "$dash_r";
3175     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3176     else echo "$ac_t""NONE" 1>&6
3177   fi
3178 fi
3179
3180 xe_add_unique_runpath_dir='
3181   xe_add_p=yes
3182   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3183   done
3184   if test "$xe_add_p" = "yes"; then
3185     test -n "$runpath" && runpath="${runpath}:"
3186     runpath="${runpath}${xe_runpath_dir}"
3187     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3188   fi'
3189
3190
3191
3192
3193 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3194     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3195   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3196   
3197         runpath="" runpath_dirs=""
3198   if test -n "$LD_RUN_PATH"; then
3199     runpath="$LD_RUN_PATH"
3200   elif test "$GCC" = "yes"; then
3201         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3202     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3203     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3204     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3205       case "$arg" in P,* | -L* | -R* )
3206         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3207           {
3208 xe_runpath_dir="$dir"
3209   test "$xe_runpath_dir" != "/lib"     -a \
3210         "$xe_runpath_dir" != "/usr/lib" -a \
3211         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3212   eval "$xe_add_unique_runpath_dir"
3213 }
3214         done ;;
3215       esac
3216     done
3217     ld_switch_run="$ld_switch_run_save"
3218     rm -f conftest*
3219   else
3220         for arg in $ld_switch_site $ld_switch_x_site; do
3221       case "$arg" in -L*) {
3222 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3223   test "$xe_runpath_dir" != "/lib"     -a \
3224         "$xe_runpath_dir" != "/usr/lib" -a \
3225         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3226   eval "$xe_add_unique_runpath_dir"
3227 };; esac
3228     done
3229             if test "$opsys $need_motif" = "sol2 yes"; then
3230       xe_runpath_dir="/opt/SUNWdt/lib";
3231       eval "$xe_add_unique_runpath_dir";
3232     fi
3233   fi 
3234   if test -n "$runpath"; then
3235     ld_switch_run="${dash_r}${runpath}"
3236     
3237 if test "$GCC" = "yes"; then
3238   set x $ld_switch_run; shift; ld_switch_run=""
3239   while test -n "$1"; do
3240     case $1 in
3241       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3242       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3243       -Xlinker* ) ;;
3244       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3245     esac
3246     shift
3247   done
3248 fi
3249     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3250   fi
3251 fi
3252
3253
3254
3255 GNU_MALLOC=yes
3256 if test "$with_dlmalloc" != "no"; then
3257         doug_lea_malloc=yes
3258 else
3259         doug_lea_malloc=no
3260 fi
3261 after_morecore_hook_exists=yes
3262 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3263 echo "configure:3264: checking for malloc_set_state" >&5
3264
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 /* System header to define __stub macros and hopefully few prototypes,
3269     which can conflict with char malloc_set_state(); below.  */
3270 #include <assert.h>
3271 /* Override any gcc2 internal prototype to avoid an error.  */
3272 /* We use char because int might match the return type of a gcc2
3273     builtin and then its argument prototype would still apply.  */
3274 char malloc_set_state();
3275
3276 int main() {
3277
3278 /* The GNU C library defines this for functions which it implements
3279     to always fail with ENOSYS.  Some functions are actually named
3280     something starting with __ and the normal name is an alias.  */
3281 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3282 choke me
3283 #else
3284 malloc_set_state();
3285 #endif
3286
3287 ; return 0; }
3288 EOF
3289 if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3290   rm -rf conftest*
3291   eval "ac_cv_func_malloc_set_state=yes"
3292 else
3293   echo "configure: failed program was:" >&5
3294   cat conftest.$ac_ext >&5
3295   rm -rf conftest*
3296   eval "ac_cv_func_malloc_set_state=no"
3297 fi
3298 rm -f conftest*
3299
3300 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3301   echo "$ac_t""yes" 1>&6
3302   :
3303 else
3304   echo "$ac_t""no" 1>&6
3305 doug_lea_malloc=no
3306 fi
3307
3308 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3309 echo "configure:3310: checking whether __after_morecore_hook exists" >&5
3310 cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 extern void (* __after_morecore_hook)();
3314 int main() {
3315 __after_morecore_hook = 0
3316 ; return 0; }
3317 EOF
3318 if { (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3319   rm -rf conftest*
3320   echo "$ac_t""yes" 1>&6
3321 else
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   echo "$ac_t""no" 1>&6
3326    after_morecore_hook_exists=no
3327 fi
3328 rm -f conftest*
3329 if test "$system_malloc" = "yes" ; then
3330   GNU_MALLOC=no
3331   GNU_MALLOC_reason="
3332     - The GNU allocators don't work with this system configuration."
3333 elif test "$with_system_malloc" = "yes" ; then
3334   GNU_MALLOC=no
3335   GNU_MALLOC_reason="
3336     - User chose not to use GNU allocators."
3337 elif test "$with_debug_malloc" = "yes" ; then
3338   GNU_MALLOC=no
3339   GNU_MALLOC_reason="
3340     - User chose to use Debugging Malloc."
3341 fi
3342
3343 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3344   GNU_MALLOC_reason="
3345     - Using Doug Lea's new malloc from the GNU C Library."
3346   { test "$extra_verbose" = "yes" && cat << \EOF
3347     Defining DOUG_LEA_MALLOC
3348 EOF
3349 cat >> confdefs.h <<\EOF
3350 #define DOUG_LEA_MALLOC 1
3351 EOF
3352 }
3353
3354   if test "$after_morecore_hook_exists" = "no" ; then
3355     GNU_MALLOC_reason="
3356     - Using Doug Lea's new malloc from the Linux C Library."
3357     { test "$extra_verbose" = "yes" && cat << \EOF
3358     Defining _NO_MALLOC_WARNING_
3359 EOF
3360 cat >> confdefs.h <<\EOF
3361 #define _NO_MALLOC_WARNING_ 1
3362 EOF
3363 }
3364
3365   fi
3366 fi
3367
3368
3369
3370
3371 # Extract the first word of "ranlib", so it can be a program name with args.
3372 set dummy ranlib; ac_word=$2
3373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3374 echo "configure:3375: checking for $ac_word" >&5
3375
3376 if test -n "$RANLIB"; then
3377   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3378 else
3379   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3380   ac_dummy="$PATH"
3381   for ac_dir in $ac_dummy; do
3382     test -z "$ac_dir" && ac_dir=.
3383     if test -f $ac_dir/$ac_word; then
3384       ac_cv_prog_RANLIB="ranlib"
3385       break
3386     fi
3387   done
3388   IFS="$ac_save_ifs"
3389   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3390 fi
3391 RANLIB="$ac_cv_prog_RANLIB"
3392 if test -n "$RANLIB"; then
3393   echo "$ac_t""$RANLIB" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398 ac_aux_dir=
3399 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3400   if test -f $ac_dir/install-sh; then
3401     ac_aux_dir=$ac_dir
3402     ac_install_sh="$ac_aux_dir/install-sh -c"
3403     break
3404   elif test -f $ac_dir/install.sh; then
3405     ac_aux_dir=$ac_dir
3406     ac_install_sh="$ac_aux_dir/install.sh -c"
3407     break
3408   fi
3409 done
3410 if test -z "$ac_aux_dir"; then
3411   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3412 fi
3413 ac_config_guess=$ac_aux_dir/config.guess
3414 ac_config_sub=$ac_aux_dir/config.sub
3415 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3416
3417 # Find a good install program.  We prefer a C program (faster),
3418 # so one script is as good as another.  But avoid the broken or
3419 # incompatible versions:
3420 # SysV /etc/install, /usr/sbin/install
3421 # SunOS /usr/etc/install
3422 # IRIX /sbin/install
3423 # AIX /bin/install
3424 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3425 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3426 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3427 # ./install, which can be erroneously created by make from ./install.sh.
3428 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3429 echo "configure:3430: checking for a BSD compatible install" >&5
3430 if test -z "$INSTALL"; then
3431
3432   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3433   for ac_dir in $PATH; do
3434     # Account for people who put trailing slashes in PATH elements.
3435     case "$ac_dir/" in
3436     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3437     *)
3438       # OSF1 and SCO ODT 3.0 have their own names for install.
3439       # Don't use installbsd from OSF since it installs stuff as root
3440       # by default.
3441       for ac_prog in ginstall scoinst install; do
3442         if test -f $ac_dir/$ac_prog; then
3443           if test $ac_prog = install &&
3444             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3445             # AIX install.  It has an incompatible calling convention.
3446             :
3447           else
3448             ac_cv_path_install="$ac_dir/$ac_prog -c"
3449             break 2
3450           fi
3451         fi
3452       done
3453       ;;
3454     esac
3455   done
3456   IFS="$ac_save_IFS"
3457
3458   if test "${ac_cv_path_install+set}" = set; then
3459     INSTALL="$ac_cv_path_install"
3460   else
3461     # As a last resort, use the slow shell script.  We don't cache a
3462     # path for INSTALL within a source directory, because that will
3463     # break other packages using the cache if that directory is
3464     # removed, or if the path is relative.
3465     INSTALL="$ac_install_sh"
3466   fi
3467 fi
3468 echo "$ac_t""$INSTALL" 1>&6
3469
3470 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3471 # It thinks the first close brace ends the variable substitution.
3472 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3473
3474 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3475
3476 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3477
3478 for ac_prog in 'bison -y' byacc
3479 do
3480 # Extract the first word of "$ac_prog", so it can be a program name with args.
3481 set dummy $ac_prog; ac_word=$2
3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_word" >&5
3484
3485 if test -n "$YACC"; then
3486   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3487 else
3488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3489   ac_dummy="$PATH"
3490   for ac_dir in $ac_dummy; do
3491     test -z "$ac_dir" && ac_dir=.
3492     if test -f $ac_dir/$ac_word; then
3493       ac_cv_prog_YACC="$ac_prog"
3494       break
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498 fi
3499 YACC="$ac_cv_prog_YACC"
3500 if test -n "$YACC"; then
3501   echo "$ac_t""$YACC" 1>&6
3502 else
3503   echo "$ac_t""no" 1>&6
3504 fi
3505
3506 test -n "$YACC" && break
3507 done
3508 test -n "$YACC" || YACC="yacc"
3509
3510
3511 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h 
3512 do
3513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_hdr" >&5
3516
3517 cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <$ac_hdr>
3521 EOF
3522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3523 { (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3525 if test -z "$ac_err"; then
3526   rm -rf conftest*
3527   eval "ac_cv_header_$ac_safe=yes"
3528 else
3529   echo "$ac_err" >&5
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   eval "ac_cv_header_$ac_safe=no"
3534 fi
3535 rm -f conftest*
3536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3537   echo "$ac_t""yes" 1>&6
3538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3539   { test "$extra_verbose" = "yes" && cat << EOF
3540     Defining $ac_tr_hdr
3541 EOF
3542 cat >> confdefs.h <<EOF
3543 #define $ac_tr_hdr 1
3544 EOF
3545 }
3546  
3547 else
3548   echo "$ac_t""no" 1>&6
3549 fi
3550 done
3551
3552 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3553 echo "configure:3554: checking for sys/wait.h that is POSIX.1 compatible" >&5
3554
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <sys/types.h>
3559 #include <sys/wait.h>
3560 #ifndef WEXITSTATUS
3561 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3562 #endif
3563 #ifndef WIFEXITED
3564 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3565 #endif
3566 int main() {
3567 int s;
3568 wait (&s);
3569 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3570 ; return 0; }
3571 EOF
3572 if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3573   rm -rf conftest*
3574   ac_cv_header_sys_wait_h=yes
3575 else
3576   echo "configure: failed program was:" >&5
3577   cat conftest.$ac_ext >&5
3578   rm -rf conftest*
3579   ac_cv_header_sys_wait_h=no
3580 fi
3581 rm -f conftest*
3582
3583 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3584 if test $ac_cv_header_sys_wait_h = yes; then
3585   { test "$extra_verbose" = "yes" && cat << \EOF
3586     Defining HAVE_SYS_WAIT_H
3587 EOF
3588 cat >> confdefs.h <<\EOF
3589 #define HAVE_SYS_WAIT_H 1
3590 EOF
3591 }
3592
3593 fi
3594
3595 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ANSI C header files" >&5
3597
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #include <stdlib.h>
3602 #include <stdarg.h>
3603 #include <string.h>
3604 #include <float.h>
3605 EOF
3606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3607 { (eval echo configure:3608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3609 if test -z "$ac_err"; then
3610   rm -rf conftest*
3611   ac_cv_header_stdc=yes
3612 else
3613   echo "$ac_err" >&5
3614   echo "configure: failed program was:" >&5
3615   cat conftest.$ac_ext >&5
3616   rm -rf conftest*
3617   ac_cv_header_stdc=no
3618 fi
3619 rm -f conftest*
3620
3621 if test $ac_cv_header_stdc = yes; then
3622   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <string.h>
3627 EOF
3628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3629   egrep "memchr" >/dev/null 2>&1; then
3630   :
3631 else
3632   rm -rf conftest*
3633   ac_cv_header_stdc=no
3634 fi
3635 rm -f conftest*
3636
3637 fi
3638
3639 if test $ac_cv_header_stdc = yes; then
3640   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <stdlib.h>
3645 EOF
3646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3647   egrep "free" >/dev/null 2>&1; then
3648   :
3649 else
3650   rm -rf conftest*
3651   ac_cv_header_stdc=no
3652 fi
3653 rm -f conftest*
3654
3655 fi
3656
3657 if test $ac_cv_header_stdc = yes; then
3658   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <ctype.h>
3663 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3664 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3665 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3666 int main () { int i; for (i = 0; i < 256; i++)
3667 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3668 exit (0); }
3669
3670 EOF
3671 if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3672 then
3673   :
3674 else
3675   conftest_rc="$?"
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -fr conftest*
3679   ac_cv_header_stdc=no
3680 fi
3681 rm -fr conftest*
3682 fi
3683
3684 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3685 if test $ac_cv_header_stdc = yes; then
3686   { test "$extra_verbose" = "yes" && cat << \EOF
3687     Defining STDC_HEADERS
3688 EOF
3689 cat >> confdefs.h <<\EOF
3690 #define STDC_HEADERS 1
3691 EOF
3692 }
3693
3694 fi
3695
3696 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3697 echo "configure:3698: checking whether time.h and sys/time.h may both be included" >&5
3698
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 #include <sys/types.h>
3703 #include <sys/time.h>
3704 #include <time.h>
3705 int main() {
3706 struct tm *tp;
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3710   rm -rf conftest*
3711   ac_cv_header_time=yes
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   ac_cv_header_time=no
3717 fi
3718 rm -f conftest*
3719
3720 echo "$ac_t""$ac_cv_header_time" 1>&6
3721 if test $ac_cv_header_time = yes; then
3722   { test "$extra_verbose" = "yes" && cat << \EOF
3723     Defining TIME_WITH_SYS_TIME
3724 EOF
3725 cat >> confdefs.h <<\EOF
3726 #define TIME_WITH_SYS_TIME 1
3727 EOF
3728 }
3729
3730 fi
3731
3732 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3733 echo "configure:3734: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3734
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 #include <sys/types.h>
3739 #include <signal.h>
3740 /* NetBSD declares sys_siglist in unistd.h.  */
3741 #ifdef HAVE_UNISTD_H
3742 #include <unistd.h>
3743 #endif
3744 int main() {
3745 char *msg = *(sys_siglist + 1);
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3749   rm -rf conftest*
3750   ac_cv_decl_sys_siglist=yes
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -rf conftest*
3755   ac_cv_decl_sys_siglist=no
3756 fi
3757 rm -f conftest*
3758
3759 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3760 if test $ac_cv_decl_sys_siglist = yes; then
3761   { test "$extra_verbose" = "yes" && cat << \EOF
3762     Defining SYS_SIGLIST_DECLARED
3763 EOF
3764 cat >> confdefs.h <<\EOF
3765 #define SYS_SIGLIST_DECLARED 1
3766 EOF
3767 }
3768
3769 fi
3770
3771
3772
3773 echo $ac_n "checking for utime""... $ac_c" 1>&6
3774 echo "configure:3775: checking for utime" >&5
3775 cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 #include <sys/types.h>
3779 #include <utime.h>
3780 int main() {
3781 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3782 ; return 0; }
3783 EOF
3784 if { (eval echo configure:3785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3785   rm -rf conftest*
3786   echo "$ac_t""yes" 1>&6
3787    { test "$extra_verbose" = "yes" && cat << \EOF
3788     Defining HAVE_UTIME
3789 EOF
3790 cat >> confdefs.h <<\EOF
3791 #define HAVE_UTIME 1
3792 EOF
3793 }
3794
3795 else
3796   echo "configure: failed program was:" >&5
3797   cat conftest.$ac_ext >&5
3798   rm -rf conftest*
3799   echo "$ac_t""no" 1>&6
3800       for ac_func in utimes
3801 do
3802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_func" >&5
3804
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808 /* System header to define __stub macros and hopefully few prototypes,
3809     which can conflict with char $ac_func(); below.  */
3810 #include <assert.h>
3811 /* Override any gcc2 internal prototype to avoid an error.  */
3812 /* We use char because int might match the return type of a gcc2
3813     builtin and then its argument prototype would still apply.  */
3814 char $ac_func();
3815
3816 int main() {
3817
3818 /* The GNU C library defines this for functions which it implements
3819     to always fail with ENOSYS.  Some functions are actually named
3820     something starting with __ and the normal name is an alias.  */
3821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3822 choke me
3823 #else
3824 $ac_func();
3825 #endif
3826
3827 ; return 0; }
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3830   rm -rf conftest*
3831   eval "ac_cv_func_$ac_func=yes"
3832 else
3833   echo "configure: failed program was:" >&5
3834   cat conftest.$ac_ext >&5
3835   rm -rf conftest*
3836   eval "ac_cv_func_$ac_func=no"
3837 fi
3838 rm -f conftest*
3839
3840 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3841   echo "$ac_t""yes" 1>&6
3842     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3843   { test "$extra_verbose" = "yes" && cat << EOF
3844     Defining $ac_tr_func
3845 EOF
3846 cat >> confdefs.h <<EOF
3847 #define $ac_tr_func 1
3848 EOF
3849 }
3850  
3851 else
3852   echo "$ac_t""no" 1>&6
3853 fi
3854 done
3855
3856 fi
3857 rm -f conftest*
3858
3859
3860 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3861 echo "configure:3862: checking return type of signal handlers" >&5
3862
3863 cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866 #include <sys/types.h>
3867 #include <signal.h>
3868 #ifdef signal
3869 #undef signal
3870 #endif
3871 #ifdef __cplusplus
3872 extern "C" void (*signal (int, void (*)(int)))(int);
3873 #else
3874 void (*signal ()) ();
3875 #endif
3876
3877 int main() {
3878 int i;
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   ac_cv_type_signal=void
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   ac_cv_type_signal=int
3889 fi
3890 rm -f conftest*
3891
3892 echo "$ac_t""$ac_cv_type_signal" 1>&6
3893 { test "$extra_verbose" = "yes" && cat << EOF
3894     Defining RETSIGTYPE = $ac_cv_type_signal
3895 EOF
3896 cat >> confdefs.h <<EOF
3897 #define RETSIGTYPE $ac_cv_type_signal
3898 EOF
3899 }
3900
3901
3902 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3903 echo "configure:3904: checking for size_t" >&5
3904
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 #include <sys/types.h>
3909 #if STDC_HEADERS
3910 #include <stdlib.h>
3911 #include <stddef.h>
3912 #endif
3913 EOF
3914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3915   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3916   rm -rf conftest*
3917   ac_cv_type_size_t=yes
3918 else
3919   rm -rf conftest*
3920   ac_cv_type_size_t=no
3921 fi
3922 rm -f conftest*
3923
3924 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3925 if test $ac_cv_type_size_t = no; then
3926   { test "$extra_verbose" = "yes" && cat << \EOF
3927     Defining size_t = unsigned
3928 EOF
3929 cat >> confdefs.h <<\EOF
3930 #define size_t unsigned
3931 EOF
3932 }
3933
3934 fi
3935
3936 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3937 echo "configure:3938: checking for pid_t" >&5
3938
3939 cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <sys/types.h>
3943 #if STDC_HEADERS
3944 #include <stdlib.h>
3945 #include <stddef.h>
3946 #endif
3947 EOF
3948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3949   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3950   rm -rf conftest*
3951   ac_cv_type_pid_t=yes
3952 else
3953   rm -rf conftest*
3954   ac_cv_type_pid_t=no
3955 fi
3956 rm -f conftest*
3957
3958 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3959 if test $ac_cv_type_pid_t = no; then
3960   { test "$extra_verbose" = "yes" && cat << \EOF
3961     Defining pid_t = int
3962 EOF
3963 cat >> confdefs.h <<\EOF
3964 #define pid_t int
3965 EOF
3966 }
3967
3968 fi
3969
3970 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3971 echo "configure:3972: checking for uid_t in sys/types.h" >&5
3972
3973 cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976 #include <sys/types.h>
3977 EOF
3978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3979   egrep "uid_t" >/dev/null 2>&1; then
3980   rm -rf conftest*
3981   ac_cv_type_uid_t=yes
3982 else
3983   rm -rf conftest*
3984   ac_cv_type_uid_t=no
3985 fi
3986 rm -f conftest*
3987
3988
3989 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3990 if test $ac_cv_type_uid_t = no; then
3991   { test "$extra_verbose" = "yes" && cat << \EOF
3992     Defining uid_t = int
3993 EOF
3994 cat >> confdefs.h <<\EOF
3995 #define uid_t int
3996 EOF
3997 }
3998
3999   { test "$extra_verbose" = "yes" && cat << \EOF
4000     Defining gid_t = int
4001 EOF
4002 cat >> confdefs.h <<\EOF
4003 #define gid_t int
4004 EOF
4005 }
4006
4007 fi
4008
4009 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4010 echo "configure:4011: checking for mode_t" >&5
4011
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <sys/types.h>
4016 #if STDC_HEADERS
4017 #include <stdlib.h>
4018 #include <stddef.h>
4019 #endif
4020 EOF
4021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4022   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4023   rm -rf conftest*
4024   ac_cv_type_mode_t=yes
4025 else
4026   rm -rf conftest*
4027   ac_cv_type_mode_t=no
4028 fi
4029 rm -f conftest*
4030
4031 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4032 if test $ac_cv_type_mode_t = no; then
4033   { test "$extra_verbose" = "yes" && cat << \EOF
4034     Defining mode_t = int
4035 EOF
4036 cat >> confdefs.h <<\EOF
4037 #define mode_t int
4038 EOF
4039 }
4040
4041 fi
4042
4043 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4044 echo "configure:4045: checking for off_t" >&5
4045
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <sys/types.h>
4050 #if STDC_HEADERS
4051 #include <stdlib.h>
4052 #include <stddef.h>
4053 #endif
4054 EOF
4055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4056   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4057   rm -rf conftest*
4058   ac_cv_type_off_t=yes
4059 else
4060   rm -rf conftest*
4061   ac_cv_type_off_t=no
4062 fi
4063 rm -f conftest*
4064
4065 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4066 if test $ac_cv_type_off_t = no; then
4067   { test "$extra_verbose" = "yes" && cat << \EOF
4068     Defining off_t = long
4069 EOF
4070 cat >> confdefs.h <<\EOF
4071 #define off_t long
4072 EOF
4073 }
4074
4075 fi
4076
4077 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4078 echo "configure:4079: checking for ssize_t" >&5
4079
4080 cat > conftest.$ac_ext <<EOF
4081 #line 4082 "configure"
4082 #include "confdefs.h"
4083 #include <sys/types.h>
4084 #if STDC_HEADERS
4085 #include <stdlib.h>
4086 #include <stddef.h>
4087 #endif
4088 EOF
4089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4090   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4091   rm -rf conftest*
4092   ac_cv_type_ssize_t=yes
4093 else
4094   rm -rf conftest*
4095   ac_cv_type_ssize_t=no
4096 fi
4097 rm -f conftest*
4098
4099 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4100 if test $ac_cv_type_ssize_t = no; then
4101   { test "$extra_verbose" = "yes" && cat << \EOF
4102     Defining ssize_t = int
4103 EOF
4104 cat >> confdefs.h <<\EOF
4105 #define ssize_t int
4106 EOF
4107 }
4108
4109 fi
4110
4111
4112 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4113 echo "configure:4114: checking for socklen_t" >&5
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <sys/types.h>
4118 #include <sys/socket.h>
4119 socklen_t x;
4120
4121 int main() {
4122
4123 ; return 0; }
4124 EOF
4125 if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4126   rm -rf conftest*
4127   echo "$ac_t""yes" 1>&6
4128 else
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   
4133 cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 #include <sys/types.h>
4137 #include <sys/socket.h>
4138 int accept (int, struct sockaddr *, size_t *);
4139
4140 int main() {
4141
4142 ; return 0; }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4145   rm -rf conftest*
4146   
4147 echo "$ac_t""size_t" 1>&6
4148 { test "$extra_verbose" = "yes" && cat << \EOF
4149     Defining socklen_t = size_t
4150 EOF
4151 cat >> confdefs.h <<\EOF
4152 #define socklen_t size_t
4153 EOF
4154 }
4155
4156 else
4157   echo "configure: failed program was:" >&5
4158   cat conftest.$ac_ext >&5
4159   rm -rf conftest*
4160   
4161 echo "$ac_t""int" 1>&6
4162 { test "$extra_verbose" = "yes" && cat << \EOF
4163     Defining socklen_t = int
4164 EOF
4165 cat >> confdefs.h <<\EOF
4166 #define socklen_t int
4167 EOF
4168 }
4169
4170 fi
4171 rm -f conftest*
4172 fi
4173 rm -f conftest*
4174
4175 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4176 echo "configure:4177: checking for struct timeval" >&5
4177 cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 #ifdef TIME_WITH_SYS_TIME
4181 #include <sys/time.h>
4182 #include <time.h>
4183 #else
4184 #ifdef HAVE_SYS_TIME_H
4185 #include <sys/time.h>
4186 #else
4187 #include <time.h>
4188 #endif
4189 #endif
4190 int main() {
4191 static struct timeval x; x.tv_sec = x.tv_usec;
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4195   rm -rf conftest*
4196   echo "$ac_t""yes" 1>&6
4197   HAVE_TIMEVAL=yes
4198   { test "$extra_verbose" = "yes" && cat << \EOF
4199     Defining HAVE_TIMEVAL
4200 EOF
4201 cat >> confdefs.h <<\EOF
4202 #define HAVE_TIMEVAL 1
4203 EOF
4204 }
4205
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   echo "$ac_t""no" 1>&6
4211    HAVE_TIMEVAL=no
4212 fi
4213 rm -f conftest*
4214
4215 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4216 echo "configure:4217: checking whether struct tm is in sys/time.h or time.h" >&5
4217
4218 cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <sys/types.h>
4222 #include <time.h>
4223 int main() {
4224 struct tm *tp; tp->tm_sec;
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4228   rm -rf conftest*
4229   ac_cv_struct_tm=time.h
4230 else
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   ac_cv_struct_tm=sys/time.h
4235 fi
4236 rm -f conftest*
4237
4238 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4239 if test $ac_cv_struct_tm = sys/time.h; then
4240   { test "$extra_verbose" = "yes" && cat << \EOF
4241     Defining TM_IN_SYS_TIME
4242 EOF
4243 cat >> confdefs.h <<\EOF
4244 #define TM_IN_SYS_TIME 1
4245 EOF
4246 }
4247
4248 fi
4249
4250 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4251 echo "configure:4252: checking for tm_zone in struct tm" >&5
4252
4253 cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <sys/types.h>
4257 #include <$ac_cv_struct_tm>
4258 int main() {
4259 struct tm tm; tm.tm_zone;
4260 ; return 0; }
4261 EOF
4262 if { (eval echo configure:4263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4263   rm -rf conftest*
4264   ac_cv_struct_tm_zone=yes
4265 else
4266   echo "configure: failed program was:" >&5
4267   cat conftest.$ac_ext >&5
4268   rm -rf conftest*
4269   ac_cv_struct_tm_zone=no
4270 fi
4271 rm -f conftest*
4272
4273 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4274 if test "$ac_cv_struct_tm_zone" = yes; then
4275   { test "$extra_verbose" = "yes" && cat << \EOF
4276     Defining HAVE_TM_ZONE
4277 EOF
4278 cat >> confdefs.h <<\EOF
4279 #define HAVE_TM_ZONE 1
4280 EOF
4281 }
4282
4283 else
4284   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4285 echo "configure:4286: checking for tzname" >&5
4286
4287 cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <time.h>
4291 #ifndef tzname /* For SGI.  */
4292 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4293 #endif
4294 int main() {
4295 atoi(*tzname);
4296 ; return 0; }
4297 EOF
4298 if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4299   rm -rf conftest*
4300   ac_cv_var_tzname=yes
4301 else
4302   echo "configure: failed program was:" >&5
4303   cat conftest.$ac_ext >&5
4304   rm -rf conftest*
4305   ac_cv_var_tzname=no
4306 fi
4307 rm -f conftest*
4308
4309 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4310   if test $ac_cv_var_tzname = yes; then
4311     { test "$extra_verbose" = "yes" && cat << \EOF
4312     Defining HAVE_TZNAME
4313 EOF
4314 cat >> confdefs.h <<\EOF
4315 #define HAVE_TZNAME 1
4316 EOF
4317 }
4318
4319   fi
4320 fi
4321
4322
4323 echo $ac_n "checking for working const""... $ac_c" 1>&6
4324 echo "configure:4325: checking for working const" >&5
4325
4326 cat > conftest.$ac_ext <<EOF
4327 #line 4328 "configure"
4328 #include "confdefs.h"
4329
4330 int main() {
4331
4332 /* Ultrix mips cc rejects this.  */
4333 typedef int charset[2]; const charset x;
4334 /* SunOS 4.1.1 cc rejects this.  */
4335 char const *const *ccp;
4336 char **p;
4337 /* NEC SVR4.0.2 mips cc rejects this.  */
4338 struct point {int x, y;};
4339 static struct point const zero = {0,0};
4340 /* AIX XL C 1.02.0.0 rejects this.
4341    It does not let you subtract one const X* pointer from another in an arm
4342    of an if-expression whose if-part is not a constant expression */
4343 const char *g = "string";
4344 ccp = &g + (g ? g-g : 0);
4345 /* HPUX 7.0 cc rejects these. */
4346 ++ccp;
4347 p = (char**) ccp;
4348 ccp = (char const *const *) p;
4349 { /* SCO 3.2v4 cc rejects this.  */
4350   char *t;
4351   char const *s = 0 ? (char *) 0 : (char const *) 0;
4352
4353   *t++ = 0;
4354 }
4355 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4356   int x[] = {25, 17};
4357   const int *foo = &x[0];
4358   ++foo;
4359 }
4360 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4361   typedef const int *iptr;
4362   iptr p = 0;
4363   ++p;
4364 }
4365 { /* AIX XL C 1.02.0.0 rejects this saying
4366      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4367   struct s { int j; const int *ap[3]; };
4368   struct s *b; b->j = 5;
4369 }
4370 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4371   const int foo = 10;
4372 }
4373
4374 ; return 0; }
4375 EOF
4376 if { (eval echo configure:4377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4377   rm -rf conftest*
4378   ac_cv_c_const=yes
4379 else
4380   echo "configure: failed program was:" >&5
4381   cat conftest.$ac_ext >&5
4382   rm -rf conftest*
4383   ac_cv_c_const=no
4384 fi
4385 rm -f conftest*
4386
4387 echo "$ac_t""$ac_cv_c_const" 1>&6
4388 if test $ac_cv_c_const = no; then
4389   { test "$extra_verbose" = "yes" && cat << \EOF
4390     Defining const = 
4391 EOF
4392 cat >> confdefs.h <<\EOF
4393 #define const 
4394 EOF
4395 }
4396
4397 fi
4398
4399
4400 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4401 echo "configure:4402: checking whether ${MAKE-make} sets \${MAKE}" >&5
4402 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4403
4404 cat > conftestmake <<\EOF
4405 all:
4406         @echo 'ac_maketemp="${MAKE}"'
4407 EOF
4408 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4409 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4410 if test -n "$ac_maketemp"; then
4411   eval ac_cv_prog_make_${ac_make}_set=yes
4412 else
4413   eval ac_cv_prog_make_${ac_make}_set=no
4414 fi
4415 rm -f conftestmake
4416 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4417   echo "$ac_t""yes" 1>&6
4418   SET_MAKE=
4419 else
4420   echo "$ac_t""no" 1>&6
4421   SET_MAKE="MAKE=${MAKE-make}"
4422 fi
4423
4424
4425 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4426 echo "configure:4427: checking whether byte ordering is bigendian" >&5
4427
4428 ac_cv_c_bigendian=unknown
4429 # See if sys/param.h defines the BYTE_ORDER macro.
4430 cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #include <sys/param.h>
4435 int main() {
4436
4437 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4438  bogus endian macros
4439 #endif
4440 ; return 0; }
4441 EOF
4442 if { (eval echo configure:4443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4443   rm -rf conftest*
4444   # It does; now see whether it defined to BIG_ENDIAN or not.
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 #include <sys/types.h>
4449 #include <sys/param.h>
4450 int main() {
4451
4452 #if BYTE_ORDER != BIG_ENDIAN
4453  not big endian
4454 #endif
4455 ; return 0; }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4458   rm -rf conftest*
4459   ac_cv_c_bigendian=yes
4460 else
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   ac_cv_c_bigendian=no
4465 fi
4466 rm -f conftest*
4467 else
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470 fi
4471 rm -f conftest*
4472 if test $ac_cv_c_bigendian = unknown; then
4473 cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 main () {
4477   /* Are we little or big endian?  From Harbison&Steele.  */
4478   union
4479   {
4480     long l;
4481     char c[sizeof (long)];
4482   } u;
4483   u.l = 1;
4484   exit (u.c[sizeof (long) - 1] == 1);
4485 }
4486 EOF
4487 if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4488 then
4489   ac_cv_c_bigendian=no
4490 else
4491   conftest_rc="$?"
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -fr conftest*
4495   ac_cv_c_bigendian=yes
4496 fi
4497 rm -fr conftest*
4498 fi
4499
4500 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4501 if test $ac_cv_c_bigendian = yes; then
4502   { test "$extra_verbose" = "yes" && cat << \EOF
4503     Defining WORDS_BIGENDIAN
4504 EOF
4505 cat >> confdefs.h <<\EOF
4506 #define WORDS_BIGENDIAN 1
4507 EOF
4508 }
4509
4510 fi
4511
4512
4513 echo $ac_n "checking size of short""... $ac_c" 1>&6
4514 echo "configure:4515: checking size of short" >&5
4515
4516 cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <stdio.h>
4520 main()
4521 {
4522   FILE *f=fopen("conftestval", "w");
4523   if (!f) exit(1);
4524   fprintf(f, "%d\n", sizeof(short));
4525   exit(0);
4526 }
4527 EOF
4528 if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4529 then
4530   ac_cv_sizeof_short=`cat conftestval`
4531 else
4532   conftest_rc="$?"
4533   echo "configure: failed program was:" >&5
4534   cat conftest.$ac_ext >&5
4535   rm -fr conftest*
4536   ac_cv_sizeof_short=0
4537 fi
4538 rm -fr conftest*
4539 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4540 { test "$extra_verbose" = "yes" && cat << EOF
4541     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4542 EOF
4543 cat >> confdefs.h <<EOF
4544 #define SIZEOF_SHORT $ac_cv_sizeof_short
4545 EOF
4546 }
4547
4548
4549 if test "$ac_cv_sizeof_short" = 0; then
4550   echo ""
4551   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4552   echo "*** PANIC *** Please examine config.log for compilation errors."
4553   exit 1
4554 fi
4555 echo $ac_n "checking size of int""... $ac_c" 1>&6
4556 echo "configure:4557: checking size of int" >&5
4557
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 #include <stdio.h>
4562 main()
4563 {
4564   FILE *f=fopen("conftestval", "w");
4565   if (!f) exit(1);
4566   fprintf(f, "%d\n", sizeof(int));
4567   exit(0);
4568 }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4571 then
4572   ac_cv_sizeof_int=`cat conftestval`
4573 else
4574   conftest_rc="$?"
4575   echo "configure: failed program was:" >&5
4576   cat conftest.$ac_ext >&5
4577   rm -fr conftest*
4578   ac_cv_sizeof_int=0
4579 fi
4580 rm -fr conftest*
4581 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4582 { test "$extra_verbose" = "yes" && cat << EOF
4583     Defining SIZEOF_INT = $ac_cv_sizeof_int
4584 EOF
4585 cat >> confdefs.h <<EOF
4586 #define SIZEOF_INT $ac_cv_sizeof_int
4587 EOF
4588 }
4589
4590
4591 echo $ac_n "checking size of long""... $ac_c" 1>&6
4592 echo "configure:4593: checking size of long" >&5
4593
4594 cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597 #include <stdio.h>
4598 main()
4599 {
4600   FILE *f=fopen("conftestval", "w");
4601   if (!f) exit(1);
4602   fprintf(f, "%d\n", sizeof(long));
4603   exit(0);
4604 }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4607 then
4608   ac_cv_sizeof_long=`cat conftestval`
4609 else
4610   conftest_rc="$?"
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -fr conftest*
4614   ac_cv_sizeof_long=0
4615 fi
4616 rm -fr conftest*
4617 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4618 { test "$extra_verbose" = "yes" && cat << EOF
4619     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4620 EOF
4621 cat >> confdefs.h <<EOF
4622 #define SIZEOF_LONG $ac_cv_sizeof_long
4623 EOF
4624 }
4625
4626
4627 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4628 echo "configure:4629: checking size of long long" >&5
4629
4630 cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 #include <stdio.h>
4634 main()
4635 {
4636   FILE *f=fopen("conftestval", "w");
4637   if (!f) exit(1);
4638   fprintf(f, "%d\n", sizeof(long long));
4639   exit(0);
4640 }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4643 then
4644   ac_cv_sizeof_long_long=`cat conftestval`
4645 else
4646   conftest_rc="$?"
4647   echo "configure: failed program was:" >&5
4648   cat conftest.$ac_ext >&5
4649   rm -fr conftest*
4650   ac_cv_sizeof_long_long=0
4651 fi
4652 rm -fr conftest*
4653 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4654 { test "$extra_verbose" = "yes" && cat << EOF
4655     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4656 EOF
4657 cat >> confdefs.h <<EOF
4658 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4659 EOF
4660 }
4661
4662
4663 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4664 echo "configure:4665: checking size of void *" >&5
4665
4666 cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4669 #include <stdio.h>
4670 main()
4671 {
4672   FILE *f=fopen("conftestval", "w");
4673   if (!f) exit(1);
4674   fprintf(f, "%d\n", sizeof(void *));
4675   exit(0);
4676 }
4677 EOF
4678 if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4679 then
4680   ac_cv_sizeof_void_p=`cat conftestval`
4681 else
4682   conftest_rc="$?"
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -fr conftest*
4686   ac_cv_sizeof_void_p=0
4687 fi
4688 rm -fr conftest*
4689 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4690 { test "$extra_verbose" = "yes" && cat << EOF
4691     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4692 EOF
4693 cat >> confdefs.h <<EOF
4694 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4695 EOF
4696 }
4697
4698
4699
4700 case $opsys in
4701   cygwin* ) cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704 #include <cygwin/types.h>
4705 EOF
4706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4707   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4708   rm -rf conftest*
4709   echo "$ac_t""yes" 1>&6
4710                              { test "$extra_verbose" = "yes" && cat << \EOF
4711     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4712 EOF
4713 cat >> confdefs.h <<\EOF
4714 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4715 EOF
4716 }
4717
4718 else
4719   rm -rf conftest*
4720   echo "$ac_t""no" 1>&6
4721 fi
4722 rm -f conftest*
4723  ;;
4724 esac
4725
4726 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4727 echo "configure:4728: checking for long file names" >&5
4728
4729 ac_cv_sys_long_file_names=yes
4730 # Test for long file names in all the places we know might matter:
4731 #      .                the current directory, where building will happen
4732 #      $prefix/lib      where we will be installing things
4733 #      $exec_prefix/lib likewise
4734 # eval it to expand exec_prefix.
4735 #      $TMPDIR          if set, where it might want to write temporary files
4736 # if $TMPDIR is not set:
4737 #      /tmp             where it might want to write temporary files
4738 #      /var/tmp         likewise
4739 #      /usr/tmp         likewise
4740 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4741   ac_tmpdirs="$TMPDIR"
4742 else
4743   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4744 fi
4745 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4746   test -d $ac_dir || continue
4747   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4748   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4749   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4750   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4751   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4752     ac_cv_sys_long_file_names=no
4753     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4754     break
4755   fi
4756   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4757 done
4758
4759 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4760 if test $ac_cv_sys_long_file_names = yes; then
4761   { test "$extra_verbose" = "yes" && cat << \EOF
4762     Defining HAVE_LONG_FILE_NAMES
4763 EOF
4764 cat >> confdefs.h <<\EOF
4765 #define HAVE_LONG_FILE_NAMES 1
4766 EOF
4767 }
4768
4769 fi
4770
4771
4772 echo $ac_n "checking for sin""... $ac_c" 1>&6
4773 echo "configure:4774: checking for sin" >&5
4774
4775 cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778 /* System header to define __stub macros and hopefully few prototypes,
4779     which can conflict with char sin(); below.  */
4780 #include <assert.h>
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 /* We use char because int might match the return type of a gcc2
4783     builtin and then its argument prototype would still apply.  */
4784 char sin();
4785
4786 int main() {
4787
4788 /* The GNU C library defines this for functions which it implements
4789     to always fail with ENOSYS.  Some functions are actually named
4790     something starting with __ and the normal name is an alias.  */
4791 #if defined (__stub_sin) || defined (__stub___sin)
4792 choke me
4793 #else
4794 sin();
4795 #endif
4796
4797 ; return 0; }
4798 EOF
4799 if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4800   rm -rf conftest*
4801   eval "ac_cv_func_sin=yes"
4802 else
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   eval "ac_cv_func_sin=no"
4807 fi
4808 rm -f conftest*
4809
4810 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812   :
4813 else
4814   echo "$ac_t""no" 1>&6
4815
4816 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4817 echo "configure:4818: checking for sin in -lm" >&5
4818 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4819
4820 xe_check_libs=" -lm "
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* Override any gcc2 internal prototype to avoid an error.  */
4825 /* We use char because int might match the return type of a gcc2
4826     builtin and then its argument prototype would still apply.  */
4827 char sin();
4828
4829 int main() {
4830 sin()
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   eval "ac_cv_lib_$ac_lib_var=yes"
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=no"
4841 fi
4842 rm -f conftest*
4843 xe_check_libs=""
4844
4845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4846   echo "$ac_t""yes" 1>&6
4847     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4848     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4849   { test "$extra_verbose" = "yes" && cat << EOF
4850     Defining $ac_tr_lib
4851 EOF
4852 cat >> confdefs.h <<EOF
4853 #define $ac_tr_lib 1
4854 EOF
4855 }
4856
4857   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4858
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862
4863
4864 fi
4865
4866
4867 { test "$extra_verbose" = "yes" && cat << \EOF
4868     Defining LISP_FLOAT_TYPE
4869 EOF
4870 cat >> confdefs.h <<\EOF
4871 #define LISP_FLOAT_TYPE 1
4872 EOF
4873 }
4874
4875
4876 cat > conftest.$ac_ext <<EOF
4877 #line 4878 "configure"
4878 #include "confdefs.h"
4879 #include <math.h>
4880 int main() {
4881 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4882 ; return 0; }
4883 EOF
4884 if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4885   rm -rf conftest*
4886   { test "$extra_verbose" = "yes" && cat << \EOF
4887     Defining HAVE_INVERSE_HYPERBOLIC
4888 EOF
4889 cat >> confdefs.h <<\EOF
4890 #define HAVE_INVERSE_HYPERBOLIC 1
4891 EOF
4892 }
4893
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897 fi
4898 rm -f conftest*
4899
4900 echo "checking type of mail spool file locking" 1>&6
4901 echo "configure:4902: checking type of mail spool file locking" >&5
4902 for ac_func in lockf flock
4903 do
4904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4905 echo "configure:4906: checking for $ac_func" >&5
4906
4907 cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910 /* System header to define __stub macros and hopefully few prototypes,
4911     which can conflict with char $ac_func(); below.  */
4912 #include <assert.h>
4913 /* Override any gcc2 internal prototype to avoid an error.  */
4914 /* We use char because int might match the return type of a gcc2
4915     builtin and then its argument prototype would still apply.  */
4916 char $ac_func();
4917
4918 int main() {
4919
4920 /* The GNU C library defines this for functions which it implements
4921     to always fail with ENOSYS.  Some functions are actually named
4922     something starting with __ and the normal name is an alias.  */
4923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4924 choke me
4925 #else
4926 $ac_func();
4927 #endif
4928
4929 ; return 0; }
4930 EOF
4931 if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932   rm -rf conftest*
4933   eval "ac_cv_func_$ac_func=yes"
4934 else
4935   echo "configure: failed program was:" >&5
4936   cat conftest.$ac_ext >&5
4937   rm -rf conftest*
4938   eval "ac_cv_func_$ac_func=no"
4939 fi
4940 rm -f conftest*
4941
4942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4943   echo "$ac_t""yes" 1>&6
4944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4945   { test "$extra_verbose" = "yes" && cat << EOF
4946     Defining $ac_tr_func
4947 EOF
4948 cat >> confdefs.h <<EOF
4949 #define $ac_tr_func 1
4950 EOF
4951 }
4952  
4953 else
4954   echo "$ac_t""no" 1>&6
4955 fi
4956 done
4957
4958 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4959 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4960 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4961 if   test -z "$mail_locking"; then
4962   case "$opsys" in cygwin* | mingw*)
4963     mail_locking=pop ;;
4964   esac
4965 fi
4966
4967 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4968     Defining MAIL_LOCK_LOCKF
4969 EOF
4970 cat >> confdefs.h <<\EOF
4971 #define MAIL_LOCK_LOCKF 1
4972 EOF
4973 }
4974
4975 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4976     Defining MAIL_LOCK_FLOCK
4977 EOF
4978 cat >> confdefs.h <<\EOF
4979 #define MAIL_LOCK_FLOCK 1
4980 EOF
4981 }
4982
4983 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4984     Defining MAIL_LOCK_LOCKING
4985 EOF
4986 cat >> confdefs.h <<\EOF
4987 #define MAIL_LOCK_LOCKING 1
4988 EOF
4989 }
4990
4991 elif test "$mail_locking" = "pop"; then
4992   with_pop=yes
4993   mail_locking=
4994 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4995     Defining MAIL_LOCK_DOT
4996 EOF
4997 cat >> confdefs.h <<\EOF
4998 #define MAIL_LOCK_DOT 1
4999 EOF
5000 }
5001
5002 fi
5003 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5004   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5005 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5006   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5007 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5008   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5009
5010 case "$opsys" in decosf*)
5011   
5012 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5013 echo "configure:5014: checking for cma_open in -lpthreads" >&5
5014 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5015
5016 xe_check_libs=" -lpthreads "
5017 cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* Override any gcc2 internal prototype to avoid an error.  */
5021 /* We use char because int might match the return type of a gcc2
5022     builtin and then its argument prototype would still apply.  */
5023 char cma_open();
5024
5025 int main() {
5026 cma_open()
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_lib_$ac_lib_var=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=no"
5037 fi
5038 rm -f conftest*
5039 xe_check_libs=""
5040
5041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5045   { test "$extra_verbose" = "yes" && cat << EOF
5046     Defining $ac_tr_lib
5047 EOF
5048 cat >> confdefs.h <<EOF
5049 #define $ac_tr_lib 1
5050 EOF
5051 }
5052
5053   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5054
5055 else
5056   echo "$ac_t""no" 1>&6
5057 fi
5058
5059
5060   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5061     c_switch_site="$c_switch_site -threads" ;;
5062 esac
5063
5064
5065 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5066 echo "configure:5067: checking whether the -xildoff compiler flag is required" >&5
5067 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5068   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5069     then echo "$ac_t""no" 1>&6;
5070     else echo "$ac_t""yes" 1>&6; ld_switch_site="$ld_switch_site -xildoff" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-xildoff\" to \$ld_switch_site"; fi
5071   fi
5072   else echo "$ac_t""no" 1>&6
5073 fi
5074
5075 if test "$opsys" = "sol2"; then
5076   if test "$os_release" -ge 506; then
5077     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5078 echo "configure:5079: checking for \"-z ignore\" linker flag" >&5
5079     case "`ld -h 2>&1`" in
5080       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5081         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5082       *) echo "$ac_t""no" 1>&6 ;;
5083     esac
5084   fi
5085 fi
5086
5087
5088 echo "checking "for specified window system"" 1>&6
5089 echo "configure:5090: checking "for specified window system"" >&5
5090
5091
5092 GNOME_CONFIG=no
5093 GTK_CONFIG=no
5094
5095 if test "$with_gnome" != "no"; then
5096    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5097 echo "configure:5098: checking for GNOME configuration script" >&5
5098    for possible in gnome-config
5099    do
5100       possible_version=`${possible} --version 2> /dev/null`
5101       if test "x${possible_version}" != "x"; then
5102               GNOME_CONFIG="${possible}"
5103               with_gnome=yes
5104               with_gtk=yes
5105               break
5106       fi
5107    done
5108    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5109 fi
5110
5111 if test "${GNOME_CONFIG}" != "no"; then
5112       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5113       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5114       { test "$extra_verbose" = "yes" && cat << \EOF
5115     Defining HAVE_GNOME
5116 EOF
5117 cat >> confdefs.h <<\EOF
5118 #define HAVE_GNOME 1
5119 EOF
5120 }
5121
5122       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5123       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5124 fi
5125
5126 if test "$with_gtk" != "no";then
5127    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5128 echo "configure:5129: checking for GTK configuration script" >&5
5129    for possible in gtk12-config gtk14-config gtk-config
5130    do
5131       possible_version=`${possible} --version 2> /dev/null`
5132       if test "x${possible_version}" != "x"; then
5133               GTK_CONFIG="${possible}"
5134               case "${possible_version}" in
5135                 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5136                 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5137                 1.2.*)
5138                         with_gtk=yes
5139                         break
5140                         ;;
5141                 *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5142               esac
5143       fi
5144    done
5145    echo "$ac_t""${GTK_CONFIG}" 1>&6
5146 fi
5147
5148 if test "${GTK_CONFIG}" != "no"; then
5149       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5150 echo "configure:5151: checking gtk version" >&5
5151       GTK_VERSION=`${GTK_CONFIG} --version`
5152       echo "$ac_t""${GTK_VERSION}" 1>&6
5153
5154       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5155 echo "configure:5156: checking gtk libs" >&5
5156       GTK_LIBS=`${GTK_CONFIG} --libs`
5157       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5158       echo "$ac_t""${GTK_LIBS}" 1>&6
5159
5160       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5161 echo "configure:5162: checking gtk cflags" >&5
5162       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5163       if test "$GCC" = "yes"; then
5164         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5165       fi
5166       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5167       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5168
5169       
5170 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5171 echo "configure:5172: checking for main in -lgdk_imlib" >&5
5172 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5173
5174 xe_check_libs=" -lgdk_imlib "
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178
5179 int main() {
5180 main()
5181 ; return 0; }
5182 EOF
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5184   rm -rf conftest*
5185   eval "ac_cv_lib_$ac_lib_var=yes"
5186 else
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=no"
5191 fi
5192 rm -f conftest*
5193 xe_check_libs=""
5194
5195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5196   echo "$ac_t""yes" 1>&6
5197   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201
5202
5203       
5204 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5205 echo "configure:5206: checking for Imlib_init in -lImlib" >&5
5206 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5207
5208 xe_check_libs=" -lImlib "
5209 cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 /* Override any gcc2 internal prototype to avoid an error.  */
5213 /* We use char because int might match the return type of a gcc2
5214     builtin and then its argument prototype would still apply.  */
5215 char Imlib_init();
5216
5217 int main() {
5218 Imlib_init()
5219 ; return 0; }
5220 EOF
5221 if { (eval echo configure:5222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5222   rm -rf conftest*
5223   eval "ac_cv_lib_$ac_lib_var=yes"
5224 else
5225   echo "configure: failed program was:" >&5
5226   cat conftest.$ac_ext >&5
5227   rm -rf conftest*
5228   eval "ac_cv_lib_$ac_lib_var=no"
5229 fi
5230 rm -f conftest*
5231 xe_check_libs=""
5232
5233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5234   echo "$ac_t""yes" 1>&6
5235   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5236 else
5237   echo "$ac_t""no" 1>&6
5238 fi
5239
5240
5241       for ac_func in gdk_imlib_init
5242 do
5243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5244 echo "configure:5245: checking for $ac_func" >&5
5245
5246 cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5249 /* System header to define __stub macros and hopefully few prototypes,
5250     which can conflict with char $ac_func(); below.  */
5251 #include <assert.h>
5252 /* Override any gcc2 internal prototype to avoid an error.  */
5253 /* We use char because int might match the return type of a gcc2
5254     builtin and then its argument prototype would still apply.  */
5255 char $ac_func();
5256
5257 int main() {
5258
5259 /* The GNU C library defines this for functions which it implements
5260     to always fail with ENOSYS.  Some functions are actually named
5261     something starting with __ and the normal name is an alias.  */
5262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5263 choke me
5264 #else
5265 $ac_func();
5266 #endif
5267
5268 ; return 0; }
5269 EOF
5270 if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5271   rm -rf conftest*
5272   eval "ac_cv_func_$ac_func=yes"
5273 else
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_func_$ac_func=no"
5278 fi
5279 rm -f conftest*
5280
5281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5284   { test "$extra_verbose" = "yes" && cat << EOF
5285     Defining $ac_tr_func
5286 EOF
5287 cat >> confdefs.h <<EOF
5288 #define $ac_tr_func 1
5289 EOF
5290 }
5291  
5292 else
5293   echo "$ac_t""no" 1>&6
5294 fi
5295 done
5296
5297
5298       { test "$extra_verbose" = "yes" && cat << \EOF
5299     Defining HAVE_XPM
5300 EOF
5301 cat >> confdefs.h <<\EOF
5302 #define HAVE_XPM 1
5303 EOF
5304 }
5305
5306       { test "$extra_verbose" = "yes" && cat << \EOF
5307     Defining HAVE_GTK
5308 EOF
5309 cat >> confdefs.h <<\EOF
5310 #define HAVE_GTK 1
5311 EOF
5312 }
5313
5314       
5315
5316       window_system=gtk
5317       with_gtk=yes
5318       with_x11=no
5319
5320       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5321       test "${with_toolbars}" != no && with_toolbars=gtk
5322       test "${with_menubars}" != "no" && with_menubars=gtk
5323       test "${with_dialogs}" != "no" && with_dialogs=gtk
5324       test "${with_widgets}" != "no" && with_widgets=gtk
5325
5326       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5327    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5328  fi
5329       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5330    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5331  fi
5332       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5333    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5334  fi
5335       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5336    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5337  fi
5338
5339             OLD_CFLAGS="${CFLAGS}"
5340       OLD_CPPFLAGS="${CPPFLAGS}"
5341       OLD_LDFLAGS="${LDFLAGS}"
5342       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5343       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5344       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5345       for ac_hdr in glade/glade.h glade.h
5346 do
5347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5349 echo "configure:5350: checking for $ac_hdr" >&5
5350
5351 cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354 #include <$ac_hdr>
5355 EOF
5356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5357 { (eval echo configure:5358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5359 if test -z "$ac_err"; then
5360   rm -rf conftest*
5361   eval "ac_cv_header_$ac_safe=yes"
5362 else
5363   echo "$ac_err" >&5
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_header_$ac_safe=no"
5368 fi
5369 rm -f conftest*
5370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5371   echo "$ac_t""yes" 1>&6
5372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5373   { test "$extra_verbose" = "yes" && cat << EOF
5374     Defining $ac_tr_hdr
5375 EOF
5376 cat >> confdefs.h <<EOF
5377 #define $ac_tr_hdr 1
5378 EOF
5379 }
5380  
5381 else
5382   echo "$ac_t""no" 1>&6
5383 fi
5384 done
5385
5386       
5387 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5388 echo "configure:5389: checking for main in -lxml" >&5
5389 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5390
5391 xe_check_libs=" -lxml "
5392 cat > conftest.$ac_ext <<EOF
5393 #line 5394 "configure"
5394 #include "confdefs.h"
5395
5396 int main() {
5397 main()
5398 ; return 0; }
5399 EOF
5400 if { (eval echo configure:5401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5401   rm -rf conftest*
5402   eval "ac_cv_lib_$ac_lib_var=yes"
5403 else
5404   echo "configure: failed program was:" >&5
5405   cat conftest.$ac_ext >&5
5406   rm -rf conftest*
5407   eval "ac_cv_lib_$ac_lib_var=no"
5408 fi
5409 rm -f conftest*
5410 xe_check_libs=""
5411
5412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5413   echo "$ac_t""yes" 1>&6
5414   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5415 else
5416   echo "$ac_t""no" 1>&6
5417 fi
5418
5419
5420       
5421 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5422 echo "configure:5423: checking for main in -lglade" >&5
5423 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5424
5425 xe_check_libs=" -lglade "
5426 cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429
5430 int main() {
5431 main()
5432 ; return 0; }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435   rm -rf conftest*
5436   eval "ac_cv_lib_$ac_lib_var=yes"
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -rf conftest*
5441   eval "ac_cv_lib_$ac_lib_var=no"
5442 fi
5443 rm -f conftest*
5444 xe_check_libs=""
5445
5446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5447   echo "$ac_t""yes" 1>&6
5448   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5449 else
5450   echo "$ac_t""no" 1>&6
5451 fi
5452
5453
5454       
5455 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5456 echo "configure:5457: checking for main in -lglade-gnome" >&5
5457 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5458
5459 xe_check_libs=" -lglade-gnome "
5460 cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463
5464 int main() {
5465 main()
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469   rm -rf conftest*
5470   eval "ac_cv_lib_$ac_lib_var=yes"
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   eval "ac_cv_lib_$ac_lib_var=no"
5476 fi
5477 rm -f conftest*
5478 xe_check_libs=""
5479
5480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5481   echo "$ac_t""yes" 1>&6
5482   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5483 else
5484   echo "$ac_t""no" 1>&6
5485 fi
5486
5487
5488       cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 #include <glade/glade-xml.h>
5492 EOF
5493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5494   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5495   rm -rf conftest*
5496   echo "$ac_t""yes" 1>&6
5497                        { test "$extra_verbose" = "yes" && cat << \EOF
5498     Defining LIBGLADE_XML_TXTDOMAIN = 1
5499 EOF
5500 cat >> confdefs.h <<\EOF
5501 #define LIBGLADE_XML_TXTDOMAIN 1
5502 EOF
5503 }
5504
5505 else
5506   rm -rf conftest*
5507   echo "$ac_t""no" 1>&6
5508 fi
5509 rm -f conftest*
5510
5511       CFLAGS="${OLD_CFLAGS}"
5512       CPPFLAGS="${OLD_CPPFLAGS}"
5513       LDFLAGS="${OLD_LDFLAGS}"
5514 fi
5515
5516
5517 if test "$with_x11" != "no"; then
5518     test "$x_includes $x_libraries" != "NONE NONE" && \
5519    window_system=x11 with_x11=yes
5520
5521         
5522       if test "$x_includes $x_libraries" = "NONE NONE" \
5523     -a -n "$OPENWINHOME" \
5524     -a "$OPENWINHOME" != "/usr/openwin" \
5525     -a -d "$OPENWINHOME"; then
5526       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5527       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5528       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5529   fi
5530
5531   if test "$x_includes" = "NONE"; then
5532                     for dir in "/usr/X11" "/usr/X11R6"; do
5533       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5534     done
5535   fi
5536
5537   if test "$x_libraries" = "NONE"; then
5538     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5539       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5540     done
5541   fi
5542
5543   # If we find X, set shell vars x_includes and x_libraries to the
5544 # paths, otherwise set no_x=yes.
5545 # Uses ac_ vars as temps to allow command line to override cache and checks.
5546 # --without-x overrides everything else, but does not touch the cache.
5547 echo $ac_n "checking for X""... $ac_c" 1>&6
5548 echo "configure:5549: checking for X" >&5
5549
5550 # Check whether --with-x or --without-x was given.
5551 if test "${with_x+set}" = set; then
5552   withval="$with_x"
5553   :
5554 fi
5555
5556 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5557 if test "x$with_x" = xno; then
5558   # The user explicitly disabled X.
5559   have_x=disabled
5560 else
5561   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5562     # Both variables are already set.
5563     have_x=yes
5564   else
5565
5566 # One or both of the vars are not set, and there is no cached value.
5567 ac_x_includes=NO ac_x_libraries=NO
5568 rm -fr conftestdir
5569 if mkdir conftestdir; then
5570   cd conftestdir
5571   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5572   cat > Imakefile <<'EOF'
5573 acfindx:
5574         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5575 EOF
5576   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5577     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5578     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5579     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5580     for ac_extension in a so sl; do
5581       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5582         test -f $ac_im_libdir/libX11.$ac_extension; then
5583         ac_im_usrlibdir=$ac_im_libdir; break
5584       fi
5585     done
5586     # Screen out bogus values from the imake configuration.  They are
5587     # bogus both because they are the default anyway, and because
5588     # using them would break gcc on systems where it needs fixed includes.
5589     case "$ac_im_incroot" in
5590         /usr/include) ;;
5591         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5592     esac
5593     case "$ac_im_usrlibdir" in
5594         /usr/lib | /lib) ;;
5595         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5596     esac
5597   fi
5598   cd ..
5599   rm -fr conftestdir
5600 fi
5601
5602 if test "$ac_x_includes" = NO; then
5603   # Guess where to find include files, by looking for this one X11 .h file.
5604   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5605
5606   # First, try using that file with no special directory specified.
5607 cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 #include <$x_direct_test_include>
5611 EOF
5612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5613 { (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5615 if test -z "$ac_err"; then
5616   rm -rf conftest*
5617   # We can compile using X headers with no special include directory.
5618 ac_x_includes=
5619 else
5620   echo "$ac_err" >&5
5621   echo "configure: failed program was:" >&5
5622   cat conftest.$ac_ext >&5
5623   rm -rf conftest*
5624   # Look for the header file in a standard set of common directories.
5625 # Check X11 before X11Rn because it is often a symlink to the current release.
5626   for ac_dir in               \
5627     /usr/X11/include          \
5628     /usr/X11R6/include        \
5629     /usr/X11R5/include        \
5630     /usr/X11R4/include        \
5631                               \
5632     /usr/include/X11          \
5633     /usr/include/X11R6        \
5634     /usr/include/X11R5        \
5635     /usr/include/X11R4        \
5636                               \
5637     /usr/local/X11/include    \
5638     /usr/local/X11R6/include  \
5639     /usr/local/X11R5/include  \
5640     /usr/local/X11R4/include  \
5641                               \
5642     /usr/local/include/X11    \
5643     /usr/local/include/X11R6  \
5644     /usr/local/include/X11R5  \
5645     /usr/local/include/X11R4  \
5646                               \
5647     /usr/X386/include         \
5648     /usr/x386/include         \
5649     /usr/XFree86/include/X11  \
5650                               \
5651     /usr/include              \
5652     /usr/local/include        \
5653     /usr/unsupported/include  \
5654     /usr/athena/include       \
5655     /usr/local/x11r5/include  \
5656     /usr/lpp/Xamples/include  \
5657                               \
5658     /usr/openwin/include      \
5659     /usr/openwin/share/include \
5660     ; \
5661   do
5662     if test -r "$ac_dir/$x_direct_test_include"; then
5663       ac_x_includes=$ac_dir
5664       break
5665     fi
5666   done
5667 fi
5668 rm -f conftest*
5669 fi # $ac_x_includes = NO
5670
5671 if test "$ac_x_libraries" = NO; then
5672   # Check for the libraries.
5673
5674   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5675   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5676
5677   # See if we find them without any special options.
5678   # Don't add to $LIBS permanently.
5679   ac_save_LIBS="$LIBS"
5680   LIBS="-l$x_direct_test_library $LIBS"
5681 cat > conftest.$ac_ext <<EOF
5682 #line 5683 "configure"
5683 #include "confdefs.h"
5684
5685 int main() {
5686 ${x_direct_test_function}()
5687 ; return 0; }
5688 EOF
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5690   rm -rf conftest*
5691   LIBS="$ac_save_LIBS"
5692 # We can link X programs with no special library path.
5693 ac_x_libraries=
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   LIBS="$ac_save_LIBS"
5699 # First see if replacing the include by lib works.
5700 # Check X11 before X11Rn because it is often a symlink to the current release.
5701 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5702     /usr/X11/lib          \
5703     /usr/X11R6/lib        \
5704     /usr/X11R5/lib        \
5705     /usr/X11R4/lib        \
5706                           \
5707     /usr/lib/X11          \
5708     /usr/lib/X11R6        \
5709     /usr/lib/X11R5        \
5710     /usr/lib/X11R4        \
5711                           \
5712     /usr/local/X11/lib    \
5713     /usr/local/X11R6/lib  \
5714     /usr/local/X11R5/lib  \
5715     /usr/local/X11R4/lib  \
5716                           \
5717     /usr/local/lib/X11    \
5718     /usr/local/lib/X11R6  \
5719     /usr/local/lib/X11R5  \
5720     /usr/local/lib/X11R4  \
5721                           \
5722     /usr/X386/lib         \
5723     /usr/x386/lib         \
5724     /usr/XFree86/lib/X11  \
5725                           \
5726     /usr/lib              \
5727     /usr/local/lib        \
5728     /usr/unsupported/lib  \
5729     /usr/athena/lib       \
5730     /usr/local/x11r5/lib  \
5731     /usr/lpp/Xamples/lib  \
5732     /lib/usr/lib/X11      \
5733                           \
5734     /usr/openwin/lib      \
5735     /usr/openwin/share/lib \
5736     ; \
5737 do
5738   for ac_extension in a so sl; do
5739     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5740       ac_x_libraries=$ac_dir
5741       break 2
5742     fi
5743   done
5744 done
5745 fi
5746 rm -f conftest*
5747 fi # $ac_x_libraries = NO
5748
5749 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5750   # Didn't find X anywhere.  Cache the known absence of X.
5751   ac_cv_have_x="have_x=no"
5752 else
5753   # Record where we found X for the cache.
5754   ac_cv_have_x="have_x=yes \
5755                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5756 fi
5757   fi
5758   eval "$ac_cv_have_x"
5759 fi # $with_x != no
5760
5761 if test "$have_x" != yes; then
5762   echo "$ac_t""$have_x" 1>&6
5763   no_x=yes
5764 else
5765   # If each of the values was on the command line, it overrides each guess.
5766   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5767   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5768   # Update the cache value to reflect the command line values.
5769   ac_cv_have_x="have_x=yes \
5770                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5771   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5772 fi
5773
5774 if test "$no_x" = yes; then
5775   # Not all programs may use this symbol, but it does not hurt to define it.
5776   { test "$extra_verbose" = "yes" && cat << \EOF
5777     Defining X_DISPLAY_MISSING
5778 EOF
5779 cat >> confdefs.h <<\EOF
5780 #define X_DISPLAY_MISSING 1
5781 EOF
5782 }
5783
5784   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5785 else
5786   if test -n "$x_includes"; then
5787     X_CFLAGS="$X_CFLAGS -I$x_includes"
5788   fi
5789
5790   # It would also be nice to do this for all -L options, not just this one.
5791   if test -n "$x_libraries"; then
5792     X_LIBS="$X_LIBS -L$x_libraries"
5793     # For Solaris; some versions of Sun CC require a space after -R and
5794     # others require no space.  Words are not sufficient . . . .
5795     case "`(uname -sr) 2>/dev/null`" in
5796     "SunOS 5"*)
5797       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5798 echo "configure:5799: checking whether -R must be followed by a space" >&5
5799       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5800       cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803
5804 int main() {
5805
5806 ; return 0; }
5807 EOF
5808 if { (eval echo configure:5809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5809   rm -rf conftest*
5810   ac_R_nospace=yes
5811 else
5812   echo "configure: failed program was:" >&5
5813   cat conftest.$ac_ext >&5
5814   rm -rf conftest*
5815   ac_R_nospace=no
5816 fi
5817 rm -f conftest*
5818       if test $ac_R_nospace = yes; then
5819         echo "$ac_t""no" 1>&6
5820         X_LIBS="$X_LIBS -R$x_libraries"
5821       else
5822         LIBS="$ac_xsave_LIBS -R $x_libraries"
5823         cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826
5827 int main() {
5828
5829 ; return 0; }
5830 EOF
5831 if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5832   rm -rf conftest*
5833   ac_R_space=yes
5834 else
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   ac_R_space=no
5839 fi
5840 rm -f conftest*
5841         if test $ac_R_space = yes; then
5842           echo "$ac_t""yes" 1>&6
5843           X_LIBS="$X_LIBS -R $x_libraries"
5844         else
5845           echo "$ac_t""neither works" 1>&6
5846         fi
5847       fi
5848       LIBS="$ac_xsave_LIBS"
5849     esac
5850   fi
5851
5852   # Check for system-dependent libraries X programs must link with.
5853   # Do this before checking for the system-independent R6 libraries
5854   # (-lICE), since we may need -lsocket or whatever for X linking.
5855
5856   if test "$ISC" = yes; then
5857     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5858   else
5859     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5860     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5861     # the Alpha needs dnet_stub (dnet does not exist).
5862     if test "$with_dnet" = "no" ; then
5863 ac_cv_lib_dnet_dnet_ntoa=no
5864 else
5865
5866 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5867 echo "configure:5868: checking for dnet_ntoa in -ldnet" >&5
5868 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5869
5870 xe_check_libs=" -ldnet "
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 /* Override any gcc2 internal prototype to avoid an error.  */
5875 /* We use char because int might match the return type of a gcc2
5876     builtin and then its argument prototype would still apply.  */
5877 char dnet_ntoa();
5878
5879 int main() {
5880 dnet_ntoa()
5881 ; return 0; }
5882 EOF
5883 if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5884   rm -rf conftest*
5885   eval "ac_cv_lib_$ac_lib_var=yes"
5886 else
5887   echo "configure: failed program was:" >&5
5888   cat conftest.$ac_ext >&5
5889   rm -rf conftest*
5890   eval "ac_cv_lib_$ac_lib_var=no"
5891 fi
5892 rm -f conftest*
5893 xe_check_libs=""
5894
5895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5896   echo "$ac_t""yes" 1>&6
5897   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5898 else
5899   echo "$ac_t""no" 1>&6
5900 fi
5901
5902 fi
5903
5904     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5905       
5906 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5907 echo "configure:5908: checking for dnet_ntoa in -ldnet_stub" >&5
5908 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5909
5910 xe_check_libs=" -ldnet_stub "
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char dnet_ntoa();
5918
5919 int main() {
5920 dnet_ntoa()
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=no"
5931 fi
5932 rm -f conftest*
5933 xe_check_libs=""
5934
5935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5936   echo "$ac_t""yes" 1>&6
5937   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5938 else
5939   echo "$ac_t""no" 1>&6
5940 fi
5941
5942
5943     fi
5944
5945     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5946     # to get the SysV transport functions.
5947     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5948     # needs -lnsl.
5949     # The nsl library prevents programs from opening the X display
5950     # on Irix 5.2, according to dickey@clark.net.
5951     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5952 echo "configure:5953: checking for gethostbyname" >&5
5953
5954 cat > conftest.$ac_ext <<EOF
5955 #line 5956 "configure"
5956 #include "confdefs.h"
5957 /* System header to define __stub macros and hopefully few prototypes,
5958     which can conflict with char gethostbyname(); below.  */
5959 #include <assert.h>
5960 /* Override any gcc2 internal prototype to avoid an error.  */
5961 /* We use char because int might match the return type of a gcc2
5962     builtin and then its argument prototype would still apply.  */
5963 char gethostbyname();
5964
5965 int main() {
5966
5967 /* The GNU C library defines this for functions which it implements
5968     to always fail with ENOSYS.  Some functions are actually named
5969     something starting with __ and the normal name is an alias.  */
5970 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5971 choke me
5972 #else
5973 gethostbyname();
5974 #endif
5975
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979   rm -rf conftest*
5980   eval "ac_cv_func_gethostbyname=yes"
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   eval "ac_cv_func_gethostbyname=no"
5986 fi
5987 rm -f conftest*
5988
5989 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5990   echo "$ac_t""yes" 1>&6
5991   :
5992 else
5993   echo "$ac_t""no" 1>&6
5994 fi
5995
5996     if test $ac_cv_func_gethostbyname = no; then
5997       
5998 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5999 echo "configure:6000: checking for gethostbyname in -lnsl" >&5
6000 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6001
6002 xe_check_libs=" -lnsl "
6003 cat > conftest.$ac_ext <<EOF
6004 #line 6005 "configure"
6005 #include "confdefs.h"
6006 /* Override any gcc2 internal prototype to avoid an error.  */
6007 /* We use char because int might match the return type of a gcc2
6008     builtin and then its argument prototype would still apply.  */
6009 char gethostbyname();
6010
6011 int main() {
6012 gethostbyname()
6013 ; return 0; }
6014 EOF
6015 if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6016   rm -rf conftest*
6017   eval "ac_cv_lib_$ac_lib_var=yes"
6018 else
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_lib_$ac_lib_var=no"
6023 fi
6024 rm -f conftest*
6025 xe_check_libs=""
6026
6027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6028   echo "$ac_t""yes" 1>&6
6029   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6030 else
6031   echo "$ac_t""no" 1>&6
6032 fi
6033
6034
6035     fi
6036
6037     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6038     # socket/setsockopt and other routines are undefined under SCO ODT
6039     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6040     # on later versions), says simon@lia.di.epfl.ch: it contains
6041     # gethostby* variants that don't use the nameserver (or something).
6042     # -lsocket must be given before -lnsl if both are needed.
6043     # We assume that if connect needs -lnsl, so does gethostbyname.
6044     echo $ac_n "checking for connect""... $ac_c" 1>&6
6045 echo "configure:6046: checking for connect" >&5
6046
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* System header to define __stub macros and hopefully few prototypes,
6051     which can conflict with char connect(); below.  */
6052 #include <assert.h>
6053 /* Override any gcc2 internal prototype to avoid an error.  */
6054 /* We use char because int might match the return type of a gcc2
6055     builtin and then its argument prototype would still apply.  */
6056 char connect();
6057
6058 int main() {
6059
6060 /* The GNU C library defines this for functions which it implements
6061     to always fail with ENOSYS.  Some functions are actually named
6062     something starting with __ and the normal name is an alias.  */
6063 #if defined (__stub_connect) || defined (__stub___connect)
6064 choke me
6065 #else
6066 connect();
6067 #endif
6068
6069 ; return 0; }
6070 EOF
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6072   rm -rf conftest*
6073   eval "ac_cv_func_connect=yes"
6074 else
6075   echo "configure: failed program was:" >&5
6076   cat conftest.$ac_ext >&5
6077   rm -rf conftest*
6078   eval "ac_cv_func_connect=no"
6079 fi
6080 rm -f conftest*
6081
6082 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6083   echo "$ac_t""yes" 1>&6
6084   :
6085 else
6086   echo "$ac_t""no" 1>&6
6087 fi
6088
6089     if test $ac_cv_func_connect = no; then
6090       
6091 xe_msg_checking="for connect in -lsocket"
6092 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6093 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6094 echo "configure:6095: checking "$xe_msg_checking"" >&5
6095 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6096
6097 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6098 cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 /* Override any gcc2 internal prototype to avoid an error.  */
6102 /* We use char because int might match the return type of a gcc2
6103     builtin and then its argument prototype would still apply.  */
6104 char connect();
6105
6106 int main() {
6107 connect()
6108 ; return 0; }
6109 EOF
6110 if { (eval echo configure:6111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6111   rm -rf conftest*
6112   eval "ac_cv_lib_$ac_lib_var=yes"
6113 else
6114   echo "configure: failed program was:" >&5
6115   cat conftest.$ac_ext >&5
6116   rm -rf conftest*
6117   eval "ac_cv_lib_$ac_lib_var=no"
6118 fi
6119 rm -f conftest*
6120 xe_check_libs=""
6121
6122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6123   echo "$ac_t""yes" 1>&6
6124   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6125 else
6126   echo "$ac_t""no" 1>&6
6127 fi
6128
6129
6130     fi
6131
6132     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6133     echo $ac_n "checking for remove""... $ac_c" 1>&6
6134 echo "configure:6135: checking for remove" >&5
6135
6136 cat > conftest.$ac_ext <<EOF
6137 #line 6138 "configure"
6138 #include "confdefs.h"
6139 /* System header to define __stub macros and hopefully few prototypes,
6140     which can conflict with char remove(); below.  */
6141 #include <assert.h>
6142 /* Override any gcc2 internal prototype to avoid an error.  */
6143 /* We use char because int might match the return type of a gcc2
6144     builtin and then its argument prototype would still apply.  */
6145 char remove();
6146
6147 int main() {
6148
6149 /* The GNU C library defines this for functions which it implements
6150     to always fail with ENOSYS.  Some functions are actually named
6151     something starting with __ and the normal name is an alias.  */
6152 #if defined (__stub_remove) || defined (__stub___remove)
6153 choke me
6154 #else
6155 remove();
6156 #endif
6157
6158 ; return 0; }
6159 EOF
6160 if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6161   rm -rf conftest*
6162   eval "ac_cv_func_remove=yes"
6163 else
6164   echo "configure: failed program was:" >&5
6165   cat conftest.$ac_ext >&5
6166   rm -rf conftest*
6167   eval "ac_cv_func_remove=no"
6168 fi
6169 rm -f conftest*
6170
6171 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6172   echo "$ac_t""yes" 1>&6
6173   :
6174 else
6175   echo "$ac_t""no" 1>&6
6176 fi
6177
6178     if test $ac_cv_func_remove = no; then
6179       
6180 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6181 echo "configure:6182: checking for remove in -lposix" >&5
6182 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6183
6184 xe_check_libs=" -lposix "
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 /* Override any gcc2 internal prototype to avoid an error.  */
6189 /* We use char because int might match the return type of a gcc2
6190     builtin and then its argument prototype would still apply.  */
6191 char remove();
6192
6193 int main() {
6194 remove()
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6198   rm -rf conftest*
6199   eval "ac_cv_lib_$ac_lib_var=yes"
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   eval "ac_cv_lib_$ac_lib_var=no"
6205 fi
6206 rm -f conftest*
6207 xe_check_libs=""
6208
6209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6210   echo "$ac_t""yes" 1>&6
6211   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6212 else
6213   echo "$ac_t""no" 1>&6
6214 fi
6215
6216
6217     fi
6218
6219     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6220     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6221 echo "configure:6222: checking for shmat" >&5
6222
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 /* System header to define __stub macros and hopefully few prototypes,
6227     which can conflict with char shmat(); below.  */
6228 #include <assert.h>
6229 /* Override any gcc2 internal prototype to avoid an error.  */
6230 /* We use char because int might match the return type of a gcc2
6231     builtin and then its argument prototype would still apply.  */
6232 char shmat();
6233
6234 int main() {
6235
6236 /* The GNU C library defines this for functions which it implements
6237     to always fail with ENOSYS.  Some functions are actually named
6238     something starting with __ and the normal name is an alias.  */
6239 #if defined (__stub_shmat) || defined (__stub___shmat)
6240 choke me
6241 #else
6242 shmat();
6243 #endif
6244
6245 ; return 0; }
6246 EOF
6247 if { (eval echo configure:6248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6248   rm -rf conftest*
6249   eval "ac_cv_func_shmat=yes"
6250 else
6251   echo "configure: failed program was:" >&5
6252   cat conftest.$ac_ext >&5
6253   rm -rf conftest*
6254   eval "ac_cv_func_shmat=no"
6255 fi
6256 rm -f conftest*
6257
6258 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6259   echo "$ac_t""yes" 1>&6
6260   :
6261 else
6262   echo "$ac_t""no" 1>&6
6263 fi
6264
6265     if test $ac_cv_func_shmat = no; then
6266       
6267 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6268 echo "configure:6269: checking for shmat in -lipc" >&5
6269 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6270
6271 xe_check_libs=" -lipc "
6272 cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275 /* Override any gcc2 internal prototype to avoid an error.  */
6276 /* We use char because int might match the return type of a gcc2
6277     builtin and then its argument prototype would still apply.  */
6278 char shmat();
6279
6280 int main() {
6281 shmat()
6282 ; return 0; }
6283 EOF
6284 if { (eval echo configure:6285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6285   rm -rf conftest*
6286   eval "ac_cv_lib_$ac_lib_var=yes"
6287 else
6288   echo "configure: failed program was:" >&5
6289   cat conftest.$ac_ext >&5
6290   rm -rf conftest*
6291   eval "ac_cv_lib_$ac_lib_var=no"
6292 fi
6293 rm -f conftest*
6294 xe_check_libs=""
6295
6296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6297   echo "$ac_t""yes" 1>&6
6298   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6299 else
6300   echo "$ac_t""no" 1>&6
6301 fi
6302
6303
6304     fi
6305   fi
6306
6307   # Check for libraries that X11R6 Xt/Xaw programs need.
6308   ac_save_LDFLAGS="$LDFLAGS"
6309   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6310   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6311   # check for ICE first), but we must link in the order -lSM -lICE or
6312   # we get undefined symbols.  So assume we have SM if we have ICE.
6313   # These have to be linked with before -lX11, unlike the other
6314   # libraries we check for below, so use a different variable.
6315   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6316   
6317 xe_msg_checking="for IceConnectionNumber in -lICE"
6318 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6319 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6320 echo "configure:6321: checking "$xe_msg_checking"" >&5
6321 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6322
6323 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6324 cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6327 /* Override any gcc2 internal prototype to avoid an error.  */
6328 /* We use char because int might match the return type of a gcc2
6329     builtin and then its argument prototype would still apply.  */
6330 char IceConnectionNumber();
6331
6332 int main() {
6333 IceConnectionNumber()
6334 ; return 0; }
6335 EOF
6336 if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6337   rm -rf conftest*
6338   eval "ac_cv_lib_$ac_lib_var=yes"
6339 else
6340   echo "configure: failed program was:" >&5
6341   cat conftest.$ac_ext >&5
6342   rm -rf conftest*
6343   eval "ac_cv_lib_$ac_lib_var=no"
6344 fi
6345 rm -f conftest*
6346 xe_check_libs=""
6347
6348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6349   echo "$ac_t""yes" 1>&6
6350   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6351 else
6352   echo "$ac_t""no" 1>&6
6353 fi
6354
6355
6356   LDFLAGS="$ac_save_LDFLAGS"
6357
6358 fi
6359  # Autoconf claims to find X library and include dirs for us.
6360   if test "$no_x" = "yes"
6361   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6362   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6363   fi
6364 fi
6365
6366
6367 if test "$with_x11" = "yes"; then
6368   { test "$extra_verbose" = "yes" && cat << \EOF
6369     Defining HAVE_X_WINDOWS
6370 EOF
6371 cat >> confdefs.h <<\EOF
6372 #define HAVE_X_WINDOWS 1
6373 EOF
6374 }
6375
6376   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6377   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6378
6379
6380     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6381 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6382 echo "configure:6383: checking for Xm/Xm.h" >&5
6383
6384 cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387 #include <Xm/Xm.h>
6388 EOF
6389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6390 { (eval echo configure:6391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6392 if test -z "$ac_err"; then
6393   rm -rf conftest*
6394   eval "ac_cv_header_$ac_safe=yes"
6395 else
6396   echo "$ac_err" >&5
6397   echo "configure: failed program was:" >&5
6398   cat conftest.$ac_ext >&5
6399   rm -rf conftest*
6400   eval "ac_cv_header_$ac_safe=no"
6401 fi
6402 rm -f conftest*
6403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6404   echo "$ac_t""yes" 1>&6
6405   
6406 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6407 echo "configure:6408: checking for XmStringFree in -lXm" >&5
6408 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6409
6410 xe_check_libs=" -lXm "
6411 cat > conftest.$ac_ext <<EOF
6412 #line 6413 "configure"
6413 #include "confdefs.h"
6414 /* Override any gcc2 internal prototype to avoid an error.  */
6415 /* We use char because int might match the return type of a gcc2
6416     builtin and then its argument prototype would still apply.  */
6417 char XmStringFree();
6418
6419 int main() {
6420 XmStringFree()
6421 ; return 0; }
6422 EOF
6423 if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=yes"
6426 else
6427   echo "configure: failed program was:" >&5
6428   cat conftest.$ac_ext >&5
6429   rm -rf conftest*
6430   eval "ac_cv_lib_$ac_lib_var=no"
6431 fi
6432 rm -f conftest*
6433 xe_check_libs=""
6434
6435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6436   echo "$ac_t""yes" 1>&6
6437   got_motif=yes
6438 else
6439   echo "$ac_t""no" 1>&6
6440 fi
6441
6442
6443 else
6444   echo "$ac_t""no" 1>&6
6445 fi
6446
6447
6448   if test "$got_motif" != "yes"; then
6449             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6450                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6451       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6452       if test -d "$lib_dir" -a -d "$inc_dir"; then
6453         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6454           x_libraries="$lib_dir $x_libraries"
6455           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6456         esac
6457         case "$x_includes" in "$inc_dir"* ) ;; *)
6458           x_includes="$inc_dir $x_includes"
6459           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6460         esac
6461         break;  fi
6462     done
6463   fi
6464
6465     for rel in "X11R6" "X11R5" "X11R4"; do
6466     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6467     if test -d "$lib_dir" -a -d "$inc_dir"; then
6468       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6469         x_libraries="$x_libraries $lib_dir"
6470         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6471       esac
6472       case "$x_includes" in "$inc_dir"* ) ;; *)
6473         x_includes="$x_includes $inc_dir"
6474         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6475       esac
6476       break;     fi
6477   done
6478
6479     case "$opsys" in
6480   decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
6481   esac
6482
6483   ld_switch_x_site="$X_LIBS"
6484
6485   
6486 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6487     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6488   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6489   
6490         runpath="" runpath_dirs=""
6491   if test -n "$LD_RUN_PATH"; then
6492     runpath="$LD_RUN_PATH"
6493   elif test "$GCC" = "yes"; then
6494         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6495     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6496     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6497     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6498       case "$arg" in P,* | -L* | -R* )
6499         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6500           {
6501 xe_runpath_dir="$dir"
6502   test "$xe_runpath_dir" != "/lib"     -a \
6503         "$xe_runpath_dir" != "/usr/lib" -a \
6504         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6505   eval "$xe_add_unique_runpath_dir"
6506 }
6507         done ;;
6508       esac
6509     done
6510     ld_switch_run="$ld_switch_run_save"
6511     rm -f conftest*
6512   else
6513         for arg in $ld_switch_site $ld_switch_x_site; do
6514       case "$arg" in -L*) {
6515 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6516   test "$xe_runpath_dir" != "/lib"     -a \
6517         "$xe_runpath_dir" != "/usr/lib" -a \
6518         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6519   eval "$xe_add_unique_runpath_dir"
6520 };; esac
6521     done
6522             if test "$opsys $need_motif" = "sol2 yes"; then
6523       xe_runpath_dir="/opt/SUNWdt/lib";
6524       eval "$xe_add_unique_runpath_dir";
6525     fi
6526   fi 
6527   if test -n "$runpath"; then
6528     ld_switch_run="${dash_r}${runpath}"
6529     
6530 if test "$GCC" = "yes"; then
6531   set x $ld_switch_run; shift; ld_switch_run=""
6532   while test -n "$1"; do
6533     case $1 in
6534       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6535       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6536       -Xlinker* ) ;;
6537       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6538     esac
6539     shift
6540   done
6541 fi
6542     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6543   fi
6544 fi
6545
6546
6547   if test "$extra_verbose" = "yes"; then
6548     echo; echo "X11 compilation variables:"
6549     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6550     echo
6551   fi
6552
6553             bitmapdirs=
6554   if test "$x_includes" != NONE; then
6555     for i in $x_includes; do
6556       if test -d "$i/bitmaps"; then
6557         bitmapdirs="$i/bitmaps:$bitmapdirs"
6558       fi
6559       if test -d "$i/X11/bitmaps"; then
6560         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6561       fi
6562     done
6563     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6564   fi
6565   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6566     Defining BITMAPDIR = "$bitmapdirs"
6567 EOF
6568 cat >> confdefs.h <<EOF
6569 #define BITMAPDIR "$bitmapdirs"
6570 EOF
6571 }
6572
6573
6574     echo "checking for X defines extracted by xmkmf" 1>&6
6575 echo "configure:6576: checking for X defines extracted by xmkmf" >&5
6576   rm -fr conftestdir
6577   if mkdir conftestdir; then
6578     cd conftestdir
6579     cat > Imakefile <<'EOF'
6580 xetest:
6581         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6582 EOF
6583     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6584       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6585       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6586     fi
6587     cd ..
6588     rm -fr conftestdir
6589     for word in $xmkmf_defines; do
6590       case "$word" in 
6591       -D__STDC__*) ;;
6592       -D* )
6593         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6594         case "$word" in
6595           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6596           *     ) val=1 ;;
6597         esac
6598         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6599           if test "$val" = "1"
6600             then { test "$extra_verbose" = "yes" && cat << EOF
6601     Defining $sym
6602 EOF
6603 cat >> confdefs.h <<EOF
6604 #define $sym 1
6605 EOF
6606 }
6607
6608             else { test "$extra_verbose" = "yes" && cat << EOF
6609     Defining $sym = $val
6610 EOF
6611 cat >> confdefs.h <<EOF
6612 #define $sym $val
6613 EOF
6614 }
6615
6616           fi
6617         fi  ;;
6618       esac
6619     done
6620   fi
6621
6622     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6623 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6624 echo "configure:6625: checking for X11/Intrinsic.h" >&5
6625
6626 cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629 #include <X11/Intrinsic.h>
6630 EOF
6631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6632 { (eval echo configure:6633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6634 if test -z "$ac_err"; then
6635   rm -rf conftest*
6636   eval "ac_cv_header_$ac_safe=yes"
6637 else
6638   echo "$ac_err" >&5
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641   rm -rf conftest*
6642   eval "ac_cv_header_$ac_safe=no"
6643 fi
6644 rm -f conftest*
6645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6646   echo "$ac_t""yes" 1>&6
6647   :
6648 else
6649   echo "$ac_t""no" 1>&6
6650 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6651 fi
6652
6653
6654       
6655 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6656 echo "configure:6657: checking for XOpenDisplay in -lX11" >&5
6657 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6658
6659 xe_check_libs=" -lX11 "
6660 cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* Override any gcc2 internal prototype to avoid an error.  */
6664 /* We use char because int might match the return type of a gcc2
6665     builtin and then its argument prototype would still apply.  */
6666 char XOpenDisplay();
6667
6668 int main() {
6669 XOpenDisplay()
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   eval "ac_cv_lib_$ac_lib_var=yes"
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678   rm -rf conftest*
6679   eval "ac_cv_lib_$ac_lib_var=no"
6680 fi
6681 rm -f conftest*
6682 xe_check_libs=""
6683
6684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6685   echo "$ac_t""yes" 1>&6
6686   have_lib_x11=yes
6687 else
6688   echo "$ac_t""no" 1>&6
6689 fi
6690
6691
6692   if test "$have_lib_x11" != "yes"; then
6693     
6694 xe_msg_checking="for XGetFontProperty in -lX11"
6695 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6696 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6697 echo "configure:6698: checking "$xe_msg_checking"" >&5
6698 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6699
6700 xe_check_libs=" -lX11 -b i486-linuxaout"
6701 cat > conftest.$ac_ext <<EOF
6702 #line 6703 "configure"
6703 #include "confdefs.h"
6704 /* Override any gcc2 internal prototype to avoid an error.  */
6705 /* We use char because int might match the return type of a gcc2
6706     builtin and then its argument prototype would still apply.  */
6707 char XGetFontProperty();
6708
6709 int main() {
6710 XGetFontProperty()
6711 ; return 0; }
6712 EOF
6713 if { (eval echo configure:6714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=yes"
6716 else
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=no"
6721 fi
6722 rm -f conftest*
6723 xe_check_libs=""
6724
6725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6726   echo "$ac_t""yes" 1>&6
6727   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6728 else
6729   echo "$ac_t""no" 1>&6
6730 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6731 fi
6732
6733
6734   fi
6735   libs_x="-lX11"
6736   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6737
6738     
6739 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6740 echo "configure:6741: checking for XShapeSelectInput in -lXext" >&5
6741 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6742
6743 xe_check_libs=" -lXext "
6744 cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 /* We use char because int might match the return type of a gcc2
6749     builtin and then its argument prototype would still apply.  */
6750 char XShapeSelectInput();
6751
6752 int main() {
6753 XShapeSelectInput()
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   eval "ac_cv_lib_$ac_lib_var=yes"
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=no"
6764 fi
6765 rm -f conftest*
6766 xe_check_libs=""
6767
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6769   echo "$ac_t""yes" 1>&6
6770   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6771 else
6772   echo "$ac_t""no" 1>&6
6773 fi
6774
6775
6776
6777     
6778 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6779 echo "configure:6780: checking for XtOpenDisplay in -lXt" >&5
6780 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6781
6782 xe_check_libs=" -lXt "
6783 cat > conftest.$ac_ext <<EOF
6784 #line 6785 "configure"
6785 #include "confdefs.h"
6786 /* Override any gcc2 internal prototype to avoid an error.  */
6787 /* We use char because int might match the return type of a gcc2
6788     builtin and then its argument prototype would still apply.  */
6789 char XtOpenDisplay();
6790
6791 int main() {
6792 XtOpenDisplay()
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796   rm -rf conftest*
6797   eval "ac_cv_lib_$ac_lib_var=yes"
6798 else
6799   echo "configure: failed program was:" >&5
6800   cat conftest.$ac_ext >&5
6801   rm -rf conftest*
6802   eval "ac_cv_lib_$ac_lib_var=no"
6803 fi
6804 rm -f conftest*
6805 xe_check_libs=""
6806
6807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6808   echo "$ac_t""yes" 1>&6
6809   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6810 else
6811   echo "$ac_t""no" 1>&6
6812 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6813 fi
6814
6815
6816
6817   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6818 echo "configure:6819: checking the version of X11 being used" >&5
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 #include <X11/Intrinsic.h>
6823     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6824 EOF
6825 if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6826 then
6827   ./conftest foobar; x11_release=$?
6828 else
6829   conftest_rc="$?"
6830   echo "configure: failed program was:" >&5
6831   cat conftest.$ac_ext >&5
6832   rm -fr conftest*
6833   x11_release=4
6834 fi
6835 rm -fr conftest*
6836   echo "$ac_t""R${x11_release}" 1>&6
6837   { test "$extra_verbose" = "yes" && cat << EOF
6838     Defining THIS_IS_X11R${x11_release}
6839 EOF
6840 cat >> confdefs.h <<EOF
6841 #define THIS_IS_X11R${x11_release} 1
6842 EOF
6843 }
6844
6845
6846   if test "${x11_release}" = "4"; then
6847     case "$with_widgets" in
6848       "" | "no") with_widgets=no ;;
6849       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6850     esac
6851   fi
6852
6853   for ac_func in XConvertCase
6854 do
6855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6856 echo "configure:6857: checking for $ac_func" >&5
6857
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* System header to define __stub macros and hopefully few prototypes,
6862     which can conflict with char $ac_func(); below.  */
6863 #include <assert.h>
6864 /* Override any gcc2 internal prototype to avoid an error.  */
6865 /* We use char because int might match the return type of a gcc2
6866     builtin and then its argument prototype would still apply.  */
6867 char $ac_func();
6868
6869 int main() {
6870
6871 /* The GNU C library defines this for functions which it implements
6872     to always fail with ENOSYS.  Some functions are actually named
6873     something starting with __ and the normal name is an alias.  */
6874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6875 choke me
6876 #else
6877 $ac_func();
6878 #endif
6879
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6883   rm -rf conftest*
6884   eval "ac_cv_func_$ac_func=yes"
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   eval "ac_cv_func_$ac_func=no"
6890 fi
6891 rm -f conftest*
6892
6893 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6894   echo "$ac_t""yes" 1>&6
6895     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6896   { test "$extra_verbose" = "yes" && cat << EOF
6897     Defining $ac_tr_func
6898 EOF
6899 cat >> confdefs.h <<EOF
6900 #define $ac_tr_func 1
6901 EOF
6902 }
6903  
6904 else
6905   echo "$ac_t""no" 1>&6
6906 fi
6907 done
6908
6909
6910   for ac_hdr in X11/Xlocale.h
6911 do
6912 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6913 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6914 echo "configure:6915: checking for $ac_hdr" >&5
6915
6916 cat > conftest.$ac_ext <<EOF
6917 #line 6918 "configure"
6918 #include "confdefs.h"
6919 #include <$ac_hdr>
6920 EOF
6921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6922 { (eval echo configure:6923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6924 if test -z "$ac_err"; then
6925   rm -rf conftest*
6926   eval "ac_cv_header_$ac_safe=yes"
6927 else
6928   echo "$ac_err" >&5
6929   echo "configure: failed program was:" >&5
6930   cat conftest.$ac_ext >&5
6931   rm -rf conftest*
6932   eval "ac_cv_header_$ac_safe=no"
6933 fi
6934 rm -f conftest*
6935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6936   echo "$ac_t""yes" 1>&6
6937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6938   { test "$extra_verbose" = "yes" && cat << EOF
6939     Defining $ac_tr_hdr
6940 EOF
6941 cat >> confdefs.h <<EOF
6942 #define $ac_tr_hdr 1
6943 EOF
6944 }
6945  
6946 else
6947   echo "$ac_t""no" 1>&6
6948 fi
6949 done
6950
6951
6952     for ac_func in XRegisterIMInstantiateCallback
6953 do
6954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6955 echo "configure:6956: checking for $ac_func" >&5
6956
6957 cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960 /* System header to define __stub macros and hopefully few prototypes,
6961     which can conflict with char $ac_func(); below.  */
6962 #include <assert.h>
6963 /* Override any gcc2 internal prototype to avoid an error.  */
6964 /* We use char because int might match the return type of a gcc2
6965     builtin and then its argument prototype would still apply.  */
6966 char $ac_func();
6967
6968 int main() {
6969
6970 /* The GNU C library defines this for functions which it implements
6971     to always fail with ENOSYS.  Some functions are actually named
6972     something starting with __ and the normal name is an alias.  */
6973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6974 choke me
6975 #else
6976 $ac_func();
6977 #endif
6978
6979 ; return 0; }
6980 EOF
6981 if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6982   rm -rf conftest*
6983   eval "ac_cv_func_$ac_func=yes"
6984 else
6985   echo "configure: failed program was:" >&5
6986   cat conftest.$ac_ext >&5
6987   rm -rf conftest*
6988   eval "ac_cv_func_$ac_func=no"
6989 fi
6990 rm -f conftest*
6991
6992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6993   echo "$ac_t""yes" 1>&6
6994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6995   { test "$extra_verbose" = "yes" && cat << EOF
6996     Defining $ac_tr_func
6997 EOF
6998 cat >> confdefs.h <<EOF
6999 #define $ac_tr_func 1
7000 EOF
7001 }
7002  
7003 else
7004   echo "$ac_t""no" 1>&6
7005 fi
7006 done
7007
7008   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7009 echo "configure:7010: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7010   cat > conftest.$ac_ext <<EOF
7011 #line 7012 "configure"
7012 #include "confdefs.h"
7013
7014 #define NeedFunctionPrototypes 1
7015 #include <X11/Xlib.h>
7016 extern Bool XRegisterIMInstantiateCallback(
7017    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7018
7019 int main() {
7020
7021 ; return 0; }
7022 EOF
7023 if { (eval echo configure:7024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7024   rm -rf conftest*
7025   echo "$ac_t""yes" 1>&6
7026 else
7027   echo "configure: failed program was:" >&5
7028   cat conftest.$ac_ext >&5
7029   rm -rf conftest*
7030   echo "$ac_t""no" 1>&6
7031    { test "$extra_verbose" = "yes" && cat << \EOF
7032     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7033 EOF
7034 cat >> confdefs.h <<\EOF
7035 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7036 EOF
7037 }
7038
7039 fi
7040 rm -f conftest*
7041
7042     test -z "$with_xmu" && { 
7043 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7044 echo "configure:7045: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7045 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7046
7047 xe_check_libs=" -lXmu "
7048 cat > conftest.$ac_ext <<EOF
7049 #line 7050 "configure"
7050 #include "confdefs.h"
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 /* We use char because int might match the return type of a gcc2
7053     builtin and then its argument prototype would still apply.  */
7054 char XmuReadBitmapDataFromFile();
7055
7056 int main() {
7057 XmuReadBitmapDataFromFile()
7058 ; return 0; }
7059 EOF
7060 if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7061   rm -rf conftest*
7062   eval "ac_cv_lib_$ac_lib_var=yes"
7063 else
7064   echo "configure: failed program was:" >&5
7065   cat conftest.$ac_ext >&5
7066   rm -rf conftest*
7067   eval "ac_cv_lib_$ac_lib_var=no"
7068 fi
7069 rm -f conftest*
7070 xe_check_libs=""
7071
7072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7073   echo "$ac_t""yes" 1>&6
7074   with_xmu=yes
7075 else
7076   echo "$ac_t""no" 1>&6
7077 with_xmu=no
7078 fi
7079
7080  }
7081   if test "$with_xmu" = "no"; then
7082     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7083    echo "    xemacs will be linked with \"xmu.o\""
7084  fi
7085   else
7086     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7087     { test "$extra_verbose" = "yes" && cat << \EOF
7088     Defining HAVE_XMU
7089 EOF
7090 cat >> confdefs.h <<\EOF
7091 #define HAVE_XMU 1
7092 EOF
7093 }
7094
7095   fi
7096
7097       
7098 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7099 echo "configure:7100: checking for main in -lXbsd" >&5
7100 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7101
7102 xe_check_libs=" -lXbsd "
7103 cat > conftest.$ac_ext <<EOF
7104 #line 7105 "configure"
7105 #include "confdefs.h"
7106
7107 int main() {
7108 main()
7109 ; return 0; }
7110 EOF
7111 if { (eval echo configure:7112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7112   rm -rf conftest*
7113   eval "ac_cv_lib_$ac_lib_var=yes"
7114 else
7115   echo "configure: failed program was:" >&5
7116   cat conftest.$ac_ext >&5
7117   rm -rf conftest*
7118   eval "ac_cv_lib_$ac_lib_var=no"
7119 fi
7120 rm -f conftest*
7121 xe_check_libs=""
7122
7123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7124   echo "$ac_t""yes" 1>&6
7125   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7126 else
7127   echo "$ac_t""no" 1>&6
7128 fi
7129
7130
7131
7132     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7133         if test "$GCC" = "yes"; then
7134                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7135 echo "configure:7136: checking for name of AIX gcc threads option" >&5
7136       case `$CC -v --help 2>&1` in
7137         *-mthreads*) aix_threads=-mthreads ;;
7138                   *) aix_threads=-pthread  ;;
7139       esac
7140       echo "$ac_t""$aix_threads" 1>&6
7141       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7142       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7143     else
7144             case "$CC" in *_r) : ;;
7145         *)
7146          xe_save_CC="$CC"
7147          CC="${CC}_r"
7148          echo $ac_n "checking size of short""... $ac_c" 1>&6
7149 echo "configure:7150: checking size of short" >&5
7150
7151 cat > conftest.$ac_ext <<EOF
7152 #line 7153 "configure"
7153 #include "confdefs.h"
7154 #include <stdio.h>
7155 main()
7156 {
7157   FILE *f=fopen("conftestval", "w");
7158   if (!f) exit(1);
7159   fprintf(f, "%d\n", sizeof(short));
7160   exit(0);
7161 }
7162 EOF
7163 if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7164 then
7165   ac_cv_sizeof_short=`cat conftestval`
7166 else
7167   conftest_rc="$?"
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -fr conftest*
7171   ac_cv_sizeof_short=0
7172 fi
7173 rm -fr conftest*
7174 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7175 { test "$extra_verbose" = "yes" && cat << EOF
7176     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7177 EOF
7178 cat >> confdefs.h <<EOF
7179 #define SIZEOF_SHORT $ac_cv_sizeof_short
7180 EOF
7181 }
7182
7183
7184          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7185       esac
7186     fi
7187   fi
7188
7189 fi 
7190 if test "$with_msw" != "no"; then
7191   echo "checking for MS-Windows" 1>&6
7192 echo "configure:7193: checking for MS-Windows" >&5
7193   
7194 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7195 echo "configure:7196: checking for main in -lgdi32" >&5
7196 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7197
7198 xe_check_libs=" -lgdi32 "
7199 cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202
7203 int main() {
7204 main()
7205 ; return 0; }
7206 EOF
7207 if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7208   rm -rf conftest*
7209   eval "ac_cv_lib_$ac_lib_var=yes"
7210 else
7211   echo "configure: failed program was:" >&5
7212   cat conftest.$ac_ext >&5
7213   rm -rf conftest*
7214   eval "ac_cv_lib_$ac_lib_var=no"
7215 fi
7216 rm -f conftest*
7217 xe_check_libs=""
7218
7219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7220   echo "$ac_t""yes" 1>&6
7221   with_msw=yes
7222 else
7223   echo "$ac_t""no" 1>&6
7224 fi
7225
7226
7227   if test "$with_msw" = "yes"; then
7228     { test "$extra_verbose" = "yes" && cat << \EOF
7229     Defining HAVE_MS_WINDOWS
7230 EOF
7231 cat >> confdefs.h <<\EOF
7232 #define HAVE_MS_WINDOWS 1
7233 EOF
7234 }
7235
7236
7237         if test "$with_netinstall" = "yes"; then
7238       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7239       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7240       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7241     fi
7242
7243     install_pp="$srcdir/lib-src/installexe.sh"
7244     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool\" to \$libs_system"; fi
7245     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7246     if test "$window_system" != x11; then
7247         window_system=msw
7248         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7249             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7250    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7251  fi
7252         test "$with_menubars"   != "no" && with_menubars=msw \
7253             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7254    echo "    xemacs will be linked with \"menubar-msw.o\""
7255  fi
7256         test "$with_toolbars"   != "no" && with_toolbars=msw \
7257             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7258    echo "    xemacs will be linked with \"toolbar-msw.o\""
7259  fi
7260         test "$with_dialogs"   != "no" && with_dialogs=msw \
7261             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7262    echo "    xemacs will be linked with \"dialog-msw.o\""
7263  fi
7264         test "$with_widgets"   != "no" && with_widgets=msw
7265     else
7266         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7267    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7268  fi
7269         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7270    echo "    xemacs will be linked with \"menubar-msw.o\""
7271  fi
7272         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7273    echo "    xemacs will be linked with \"toolbar-msw.o\""
7274  fi
7275         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7276    echo "    xemacs will be linked with \"dialog-msw.o\""
7277  fi
7278     fi
7279         cat > conftest.$ac_ext <<EOF
7280 #line 7281 "configure"
7281 #include "confdefs.h"
7282 #include <fcntl.h>
7283     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7284 EOF
7285 if { (eval echo configure:7286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7286 then
7287   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7288     Defining HAVE_MSG_SELECT
7289 EOF
7290 cat >> confdefs.h <<\EOF
7291 #define HAVE_MSG_SELECT 1
7292 EOF
7293 }
7294
7295 else
7296   conftest_rc="$?"
7297   echo "configure: failed program was:" >&5
7298   cat conftest.$ac_ext >&5
7299 fi
7300 rm -fr conftest*
7301     with_file_coding=yes
7302     extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o" &&  if test "$extra_verbose" = "yes"; then
7303    echo "    xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o\""
7304  fi
7305   fi
7306 fi
7307
7308
7309
7310 test -z "$window_system" && window_system="none"
7311
7312 if test "$window_system" = "none"; then
7313   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7314   do
7315     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7316        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7317     fi
7318     eval "with_${feature}=no"
7319   done
7320 else
7321   test -z "$with_toolbars" && with_toolbars=yes
7322 fi
7323
7324 if test "$with_msw" != "yes"; then
7325   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7326   do
7327     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7328        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7329     fi
7330     eval "with_${feature}=no"
7331   done
7332 else
7333   :
7334 fi
7335
7336 if test "$with_x11" != "yes"; then
7337             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7338   do
7339     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7340        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7341     fi
7342     eval "with_${feature}=no"
7343   done
7344 fi
7345
7346 if test "$with_x11" = "yes"; then
7347   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7348 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7349 echo "configure:7350: checking for X11/extensions/shape.h" >&5
7350
7351 cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 #include <X11/extensions/shape.h>
7355 EOF
7356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7357 { (eval echo configure:7358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7359 if test -z "$ac_err"; then
7360   rm -rf conftest*
7361   eval "ac_cv_header_$ac_safe=yes"
7362 else
7363   echo "$ac_err" >&5
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=no"
7368 fi
7369 rm -f conftest*
7370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372   
7373    { test "$extra_verbose" = "yes" && cat << \EOF
7374     Defining HAVE_BALLOON_HELP
7375 EOF
7376 cat >> confdefs.h <<\EOF
7377 #define HAVE_BALLOON_HELP 1
7378 EOF
7379 }
7380
7381    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7382    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7383  fi
7384 else
7385   echo "$ac_t""no" 1>&6
7386 fi
7387
7388 fi
7389
7390 bitmapdir=
7391
7392 case "$window_system" in
7393   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7394   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7395   gtk  )
7396        HAVE_X_WINDOWS=no
7397        test "$with_gnome" = "yes" && echo "  Using GNOME."
7398        test "$with_gnome" = "no" && echo "  Using GTK."
7399        ;;
7400   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7401 esac
7402
7403 case "$x_libraries" in *X11R4* )
7404   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7405   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7406 esac
7407
7408 echo "checking for WM_COMMAND option" 1>&6
7409 echo "configure:7410: checking for WM_COMMAND option" >&5;
7410 if test "$with_wmcommand" != "no"; then
7411   { test "$extra_verbose" = "yes" && cat << \EOF
7412     Defining HAVE_WMCOMMAND
7413 EOF
7414 cat >> confdefs.h <<\EOF
7415 #define HAVE_WMCOMMAND 1
7416 EOF
7417 }
7418
7419 fi
7420
7421 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7422 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7423 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7424 echo "configure:7425: checking for X11/Xauth.h" >&5
7425
7426 cat > conftest.$ac_ext <<EOF
7427 #line 7428 "configure"
7428 #include "confdefs.h"
7429 #include <X11/Xauth.h>
7430 EOF
7431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7432 { (eval echo configure:7433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7434 if test -z "$ac_err"; then
7435   rm -rf conftest*
7436   eval "ac_cv_header_$ac_safe=yes"
7437 else
7438   echo "$ac_err" >&5
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442   eval "ac_cv_header_$ac_safe=no"
7443 fi
7444 rm -f conftest*
7445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7446   echo "$ac_t""yes" 1>&6
7447   :
7448 else
7449   echo "$ac_t""no" 1>&6
7450 with_xauth=no
7451 fi
7452  }
7453 test -z "$with_xauth" && { 
7454 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7455 echo "configure:7456: checking for XauGetAuthByAddr in -lXau" >&5
7456 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7457
7458 xe_check_libs=" -lXau "
7459 cat > conftest.$ac_ext <<EOF
7460 #line 7461 "configure"
7461 #include "confdefs.h"
7462 /* Override any gcc2 internal prototype to avoid an error.  */
7463 /* We use char because int might match the return type of a gcc2
7464     builtin and then its argument prototype would still apply.  */
7465 char XauGetAuthByAddr();
7466
7467 int main() {
7468 XauGetAuthByAddr()
7469 ; return 0; }
7470 EOF
7471 if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7472   rm -rf conftest*
7473   eval "ac_cv_lib_$ac_lib_var=yes"
7474 else
7475   echo "configure: failed program was:" >&5
7476   cat conftest.$ac_ext >&5
7477   rm -rf conftest*
7478   eval "ac_cv_lib_$ac_lib_var=no"
7479 fi
7480 rm -f conftest*
7481 xe_check_libs=""
7482
7483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7484   echo "$ac_t""yes" 1>&6
7485   :
7486 else
7487   echo "$ac_t""no" 1>&6
7488 with_xauth=no
7489 fi
7490
7491  }
7492 test -z "$with_xauth" && with_xauth=yes
7493 if test "$with_xauth" = "yes"; then
7494   { test "$extra_verbose" = "yes" && cat << \EOF
7495     Defining HAVE_XAUTH
7496 EOF
7497 cat >> confdefs.h <<\EOF
7498 #define HAVE_XAUTH 1
7499 EOF
7500 }
7501
7502   
7503 T=""
7504 for W in $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
7505 libs_xauth="$T"
7506
7507 fi
7508
7509
7510
7511
7512 if test "$with_tooltalk" != "no" ; then
7513       for dir in "" "Tt/" "desktop/" ; do
7514     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7515 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7516 echo "configure:7517: checking for ${dir}tt_c.h" >&5
7517
7518 cat > conftest.$ac_ext <<EOF
7519 #line 7520 "configure"
7520 #include "confdefs.h"
7521 #include <${dir}tt_c.h>
7522 EOF
7523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7524 { (eval echo configure:7525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7526 if test -z "$ac_err"; then
7527   rm -rf conftest*
7528   eval "ac_cv_header_$ac_safe=yes"
7529 else
7530   echo "$ac_err" >&5
7531   echo "configure: failed program was:" >&5
7532   cat conftest.$ac_ext >&5
7533   rm -rf conftest*
7534   eval "ac_cv_header_$ac_safe=no"
7535 fi
7536 rm -f conftest*
7537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7538   echo "$ac_t""yes" 1>&6
7539   tt_c_h_file="${dir}tt_c.h"; break
7540 else
7541   echo "$ac_t""no" 1>&6
7542 fi
7543
7544   done
7545   if test -z "$tt_c_h_file"; then
7546     if test "$with_tooltalk" = "yes"; then
7547       (echo "$progname: Usage error:"
7548 echo " " "Unable to find required tooltalk header files."
7549 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7550     fi
7551     with_tooltalk=no
7552   fi
7553 fi
7554 if test "$with_tooltalk" != "no" ; then
7555   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7556     
7557 xe_msg_checking="for tt_message_create in -ltt"
7558 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7559 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7560 echo "configure:7561: checking "$xe_msg_checking"" >&5
7561 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7562
7563 xe_check_libs=" -ltt $extra_libs"
7564 cat > conftest.$ac_ext <<EOF
7565 #line 7566 "configure"
7566 #include "confdefs.h"
7567 /* Override any gcc2 internal prototype to avoid an error.  */
7568 /* We use char because int might match the return type of a gcc2
7569     builtin and then its argument prototype would still apply.  */
7570 char tt_message_create();
7571
7572 int main() {
7573 tt_message_create()
7574 ; return 0; }
7575 EOF
7576 if { (eval echo configure:7577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7577   rm -rf conftest*
7578   eval "ac_cv_lib_$ac_lib_var=yes"
7579 else
7580   echo "configure: failed program was:" >&5
7581   cat conftest.$ac_ext >&5
7582   rm -rf conftest*
7583   eval "ac_cv_lib_$ac_lib_var=no"
7584 fi
7585 rm -f conftest*
7586 xe_check_libs=""
7587
7588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7589   echo "$ac_t""yes" 1>&6
7590   tt_libs="-ltt $extra_libs"; break
7591 else
7592   echo "$ac_t""no" 1>&6
7593 :
7594 fi
7595
7596
7597   done
7598   if test -z "$tt_libs"; then
7599     if test "$with_tooltalk" = "yes"; then
7600       (echo "$progname: Usage error:"
7601 echo " " "Unable to find required tooltalk libraries."
7602 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7603     fi
7604     with_tooltalk=no
7605   fi
7606 fi
7607 test -z "$with_tooltalk" && with_tooltalk=yes
7608 if test "$with_tooltalk" = "yes"; then
7609   { test "$extra_verbose" = "yes" && cat << \EOF
7610     Defining TOOLTALK
7611 EOF
7612 cat >> confdefs.h <<\EOF
7613 #define TOOLTALK 1
7614 EOF
7615 }
7616
7617   { test "$extra_verbose" = "yes" && cat << EOF
7618     Defining TT_C_H_FILE = "$tt_c_h_file"
7619 EOF
7620 cat >> confdefs.h <<EOF
7621 #define TT_C_H_FILE "$tt_c_h_file"
7622 EOF
7623 }
7624
7625   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7626   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7627    echo "    xemacs will be linked with \"tooltalk.o\""
7628  fi
7629 fi
7630
7631 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7632 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7633 echo "configure:7634: checking for Dt/Dt.h" >&5
7634
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 #include <Dt/Dt.h>
7639 EOF
7640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7641 { (eval echo configure:7642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7643 if test -z "$ac_err"; then
7644   rm -rf conftest*
7645   eval "ac_cv_header_$ac_safe=yes"
7646 else
7647   echo "$ac_err" >&5
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   eval "ac_cv_header_$ac_safe=no"
7652 fi
7653 rm -f conftest*
7654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656   :
7657 else
7658   echo "$ac_t""no" 1>&6
7659 with_cde=no
7660 fi
7661  }
7662 test -z "$with_cde" && { 
7663 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7664 echo "configure:7665: checking for DtDndDragStart in -lDtSvc" >&5
7665 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7666
7667 xe_check_libs=" -lDtSvc "
7668 cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 /* Override any gcc2 internal prototype to avoid an error.  */
7672 /* We use char because int might match the return type of a gcc2
7673     builtin and then its argument prototype would still apply.  */
7674 char DtDndDragStart();
7675
7676 int main() {
7677 DtDndDragStart()
7678 ; return 0; }
7679 EOF
7680 if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7681   rm -rf conftest*
7682   eval "ac_cv_lib_$ac_lib_var=yes"
7683 else
7684   echo "configure: failed program was:" >&5
7685   cat conftest.$ac_ext >&5
7686   rm -rf conftest*
7687   eval "ac_cv_lib_$ac_lib_var=no"
7688 fi
7689 rm -f conftest*
7690 xe_check_libs=""
7691
7692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7693   echo "$ac_t""yes" 1>&6
7694   :
7695 else
7696   echo "$ac_t""no" 1>&6
7697 with_cde=no
7698 fi
7699
7700  }
7701 test -z "$with_cde" && with_cde=yes
7702 if test "$with_dragndrop" = no; then
7703   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7704   with_cde=no
7705 fi
7706 if test "$with_cde" = "yes" ; then
7707   { test "$extra_verbose" = "yes" && cat << \EOF
7708     Defining HAVE_CDE
7709 EOF
7710 cat >> confdefs.h <<\EOF
7711 #define HAVE_CDE 1
7712 EOF
7713 }
7714
7715   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7716   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7717   with_tooltalk=yes # CDE requires Tooltalk
7718   need_motif=yes    # CDE requires Motif
7719 fi
7720
7721 test "$window_system" != "x11" && with_offix=no
7722 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7723   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7724   with_offix=no
7725 fi
7726 if test "$with_dragndrop" = no; then
7727   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7728   with_offix=no
7729 fi
7730 if test "$with_cde" = yes; then
7731   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7732   with_offix=no
7733 fi
7734 test -z "$with_offix" && with_offix=no
7735 if test "$with_offix" = "yes"; then
7736   { test "$extra_verbose" = "yes" && cat << \EOF
7737     Defining HAVE_OFFIX_DND
7738 EOF
7739 cat >> confdefs.h <<\EOF
7740 #define HAVE_OFFIX_DND 1
7741 EOF
7742 }
7743
7744   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7745   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7746 fi
7747 if test "$with_gtk" = "yes"; then
7748    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7749 fi
7750
7751 if test "$with_dragndrop" != "no" ; then
7752   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7753 echo "configure:7754: checking if drag and drop API is needed" >&5
7754   if test -n "$dragndrop_proto" ; then
7755     with_dragndrop=yes
7756     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7757     { test "$extra_verbose" = "yes" && cat << \EOF
7758     Defining HAVE_DRAGNDROP
7759 EOF
7760 cat >> confdefs.h <<\EOF
7761 #define HAVE_DRAGNDROP 1
7762 EOF
7763 }
7764
7765     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7766   else
7767     with_dragndrop=no
7768     echo "$ac_t""no" 1>&6
7769   fi
7770 fi
7771
7772 echo "checking for LDAP" 1>&6
7773 echo "configure:7774: checking for LDAP" >&5
7774 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7775 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7776 echo "configure:7777: checking for ldap.h" >&5
7777
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 #include <ldap.h>
7782 EOF
7783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7784 { (eval echo configure:7785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7786 if test -z "$ac_err"; then
7787   rm -rf conftest*
7788   eval "ac_cv_header_$ac_safe=yes"
7789 else
7790   echo "$ac_err" >&5
7791   echo "configure: failed program was:" >&5
7792   cat conftest.$ac_ext >&5
7793   rm -rf conftest*
7794   eval "ac_cv_header_$ac_safe=no"
7795 fi
7796 rm -f conftest*
7797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7798   echo "$ac_t""yes" 1>&6
7799   :
7800 else
7801   echo "$ac_t""no" 1>&6
7802 with_ldap=no
7803 fi
7804  }
7805 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7806 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7807 echo "configure:7808: checking for lber.h" >&5
7808
7809 cat > conftest.$ac_ext <<EOF
7810 #line 7811 "configure"
7811 #include "confdefs.h"
7812 #include <lber.h>
7813 EOF
7814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7815 { (eval echo configure:7816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7817 if test -z "$ac_err"; then
7818   rm -rf conftest*
7819   eval "ac_cv_header_$ac_safe=yes"
7820 else
7821   echo "$ac_err" >&5
7822   echo "configure: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   rm -rf conftest*
7825   eval "ac_cv_header_$ac_safe=no"
7826 fi
7827 rm -f conftest*
7828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7829   echo "$ac_t""yes" 1>&6
7830   :
7831 else
7832   echo "$ac_t""no" 1>&6
7833 with_ldap=no
7834 fi
7835  }
7836 if test "$with_ldap" != "no"; then
7837   
7838 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7839 echo "configure:7840: checking for ldap_search in -lldap" >&5
7840 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7841
7842 xe_check_libs=" -lldap "
7843 cat > conftest.$ac_ext <<EOF
7844 #line 7845 "configure"
7845 #include "confdefs.h"
7846 /* Override any gcc2 internal prototype to avoid an error.  */
7847 /* We use char because int might match the return type of a gcc2
7848     builtin and then its argument prototype would still apply.  */
7849 char ldap_search();
7850
7851 int main() {
7852 ldap_search()
7853 ; return 0; }
7854 EOF
7855 if { (eval echo configure:7856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7856   rm -rf conftest*
7857   eval "ac_cv_lib_$ac_lib_var=yes"
7858 else
7859   echo "configure: failed program was:" >&5
7860   cat conftest.$ac_ext >&5
7861   rm -rf conftest*
7862   eval "ac_cv_lib_$ac_lib_var=no"
7863 fi
7864 rm -f conftest*
7865 xe_check_libs=""
7866
7867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7868   echo "$ac_t""yes" 1>&6
7869   with_ldap=yes
7870 else
7871   echo "$ac_t""no" 1>&6
7872 fi
7873
7874
7875     test "$with_ldap" != "yes" && { 
7876 xe_msg_checking="for ldap_open in -lldap"
7877 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7878 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7879 echo "configure:7880: checking "$xe_msg_checking"" >&5
7880 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7881
7882 xe_check_libs=" -lldap -llber"
7883 cat > conftest.$ac_ext <<EOF
7884 #line 7885 "configure"
7885 #include "confdefs.h"
7886 /* Override any gcc2 internal prototype to avoid an error.  */
7887 /* We use char because int might match the return type of a gcc2
7888     builtin and then its argument prototype would still apply.  */
7889 char ldap_open();
7890
7891 int main() {
7892 ldap_open()
7893 ; return 0; }
7894 EOF
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7896   rm -rf conftest*
7897   eval "ac_cv_lib_$ac_lib_var=yes"
7898 else
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   eval "ac_cv_lib_$ac_lib_var=no"
7903 fi
7904 rm -f conftest*
7905 xe_check_libs=""
7906
7907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7908   echo "$ac_t""yes" 1>&6
7909   with_ldap=yes with_ldap_lber=yes
7910 else
7911   echo "$ac_t""no" 1>&6
7912 fi
7913
7914  }
7915   test "$with_ldap" != "yes" && { 
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=yes with_ldap_lber=yes with_ldap_krb=yes
7950 else
7951   echo "$ac_t""no" 1>&6
7952 fi
7953
7954  }
7955   test "$with_ldap" != "yes" && { 
7956 xe_msg_checking="for ldap_open in -lldap"
7957 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7958 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7959 echo "configure:7960: checking "$xe_msg_checking"" >&5
7960 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7961
7962 xe_check_libs=" -lldap -llber -lkrb -ldes"
7963 cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 /* Override any gcc2 internal prototype to avoid an error.  */
7967 /* We use char because int might match the return type of a gcc2
7968     builtin and then its argument prototype would still apply.  */
7969 char ldap_open();
7970
7971 int main() {
7972 ldap_open()
7973 ; return 0; }
7974 EOF
7975 if { (eval echo configure:7976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=yes"
7978 else
7979   echo "configure: failed program was:" >&5
7980   cat conftest.$ac_ext >&5
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=no"
7983 fi
7984 rm -f conftest*
7985 xe_check_libs=""
7986
7987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7988   echo "$ac_t""yes" 1>&6
7989   with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes with_ldap_des=yes
7990 else
7991   echo "$ac_t""no" 1>&6
7992 fi
7993
7994  }
7995               test "$with_ldap_lber" != "yes" && { 
7996 echo $ac_n "checking for ber_pvt_opt_on in -llber""... $ac_c" 1>&6
7997 echo "configure:7998: checking for ber_pvt_opt_on in -llber" >&5
7998 ac_lib_var=`echo lber'_'ber_pvt_opt_on | sed 'y%./+-%__p_%'`
7999
8000 xe_check_libs=" -llber "
8001 cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* Override any gcc2 internal prototype to avoid an error.  */
8005 /* We use char because int might match the return type of a gcc2
8006     builtin and then its argument prototype would still apply.  */
8007 char ber_pvt_opt_on();
8008
8009 int main() {
8010 ber_pvt_opt_on()
8011 ; return 0; }
8012 EOF
8013 if { (eval echo configure:8014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8014   rm -rf conftest*
8015   eval "ac_cv_lib_$ac_lib_var=yes"
8016 else
8017   echo "configure: failed program was:" >&5
8018   cat conftest.$ac_ext >&5
8019   rm -rf conftest*
8020   eval "ac_cv_lib_$ac_lib_var=no"
8021 fi
8022 rm -f conftest*
8023 xe_check_libs=""
8024
8025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8026   echo "$ac_t""yes" 1>&6
8027   with_ldap_lber=yes
8028 else
8029   echo "$ac_t""no" 1>&6
8030 fi
8031
8032  }
8033 fi
8034 if test "$with_ldap" = "yes"; then
8035   { test "$extra_verbose" = "yes" && cat << \EOF
8036     Defining HAVE_LDAP
8037 EOF
8038 cat >> confdefs.h <<\EOF
8039 #define HAVE_LDAP 1
8040 EOF
8041 }
8042
8043   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8044    echo "    xemacs will be linked with \"eldap.o\""
8045  fi
8046   if test "$with_ldap_des" = "yes" ; then
8047     LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
8048   fi
8049   if test "$with_ldap_krb" = "yes" ; then
8050     LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
8051   fi
8052   if test "$with_ldap_lber" = "yes" ; then
8053     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
8054   fi
8055   LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
8056   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8057 do
8058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8059 echo "configure:8060: checking for $ac_func" >&5
8060
8061 cat > conftest.$ac_ext <<EOF
8062 #line 8063 "configure"
8063 #include "confdefs.h"
8064 /* System header to define __stub macros and hopefully few prototypes,
8065     which can conflict with char $ac_func(); below.  */
8066 #include <assert.h>
8067 /* Override any gcc2 internal prototype to avoid an error.  */
8068 /* We use char because int might match the return type of a gcc2
8069     builtin and then its argument prototype would still apply.  */
8070 char $ac_func();
8071
8072 int main() {
8073
8074 /* The GNU C library defines this for functions which it implements
8075     to always fail with ENOSYS.  Some functions are actually named
8076     something starting with __ and the normal name is an alias.  */
8077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8078 choke me
8079 #else
8080 $ac_func();
8081 #endif
8082
8083 ; return 0; }
8084 EOF
8085 if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8086   rm -rf conftest*
8087   eval "ac_cv_func_$ac_func=yes"
8088 else
8089   echo "configure: failed program was:" >&5
8090   cat conftest.$ac_ext >&5
8091   rm -rf conftest*
8092   eval "ac_cv_func_$ac_func=no"
8093 fi
8094 rm -f conftest*
8095
8096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8097   echo "$ac_t""yes" 1>&6
8098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8099   { test "$extra_verbose" = "yes" && cat << EOF
8100     Defining $ac_tr_func
8101 EOF
8102 cat >> confdefs.h <<EOF
8103 #define $ac_tr_func 1
8104 EOF
8105 }
8106  
8107 else
8108   echo "$ac_t""no" 1>&6
8109 fi
8110 done
8111
8112 fi
8113
8114 if test "$with_postgresql" != "no"; then
8115   echo "checking for PostgreSQL" 1>&6
8116 echo "configure:8117: checking for PostgreSQL" >&5
8117
8118   for header_dir in "" "pgsql/" "postgresql/"; do
8119     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8120 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8121 echo "configure:8122: checking for ${header_dir}libpq-fe.h" >&5
8122
8123 cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 #include <${header_dir}libpq-fe.h>
8127 EOF
8128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8129 { (eval echo configure:8130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8131 if test -z "$ac_err"; then
8132   rm -rf conftest*
8133   eval "ac_cv_header_$ac_safe=yes"
8134 else
8135   echo "$ac_err" >&5
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   eval "ac_cv_header_$ac_safe=no"
8140 fi
8141 rm -f conftest*
8142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8143   echo "$ac_t""yes" 1>&6
8144   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8145 else
8146   echo "$ac_t""no" 1>&6
8147 fi
8148
8149   done
8150
8151   test -n "$libpq_fe_h_file" && { 
8152 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8153 echo "configure:8154: checking for PQconnectdb in -lpq" >&5
8154 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8155
8156 xe_check_libs=" -lpq "
8157 cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 /* Override any gcc2 internal prototype to avoid an error.  */
8161 /* We use char because int might match the return type of a gcc2
8162     builtin and then its argument prototype would still apply.  */
8163 char PQconnectdb();
8164
8165 int main() {
8166 PQconnectdb()
8167 ; return 0; }
8168 EOF
8169 if { (eval echo configure:8170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8170   rm -rf conftest*
8171   eval "ac_cv_lib_$ac_lib_var=yes"
8172 else
8173   echo "configure: failed program was:" >&5
8174   cat conftest.$ac_ext >&5
8175   rm -rf conftest*
8176   eval "ac_cv_lib_$ac_lib_var=no"
8177 fi
8178 rm -f conftest*
8179 xe_check_libs=""
8180
8181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8182   echo "$ac_t""yes" 1>&6
8183   have_libpq=yes
8184 else
8185   echo "$ac_t""no" 1>&6
8186 fi
8187
8188  }
8189
8190   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8191     with_postgresql=yes
8192     { test "$extra_verbose" = "yes" && cat << \EOF
8193     Defining HAVE_POSTGRESQL
8194 EOF
8195 cat >> confdefs.h <<\EOF
8196 #define HAVE_POSTGRESQL 1
8197 EOF
8198 }
8199
8200     
8201 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8202 echo "configure:8203: checking for PQconnectStart in -lpq" >&5
8203 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8204
8205 xe_check_libs=" -lpq "
8206 cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 /* Override any gcc2 internal prototype to avoid an error.  */
8210 /* We use char because int might match the return type of a gcc2
8211     builtin and then its argument prototype would still apply.  */
8212 char PQconnectStart();
8213
8214 int main() {
8215 PQconnectStart()
8216 ; return 0; }
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8219   rm -rf conftest*
8220   eval "ac_cv_lib_$ac_lib_var=yes"
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -rf conftest*
8225   eval "ac_cv_lib_$ac_lib_var=no"
8226 fi
8227 rm -f conftest*
8228 xe_check_libs=""
8229
8230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8231   echo "$ac_t""yes" 1>&6
8232   with_postgresqlv7=yes;
8233                  { test "$extra_verbose" = "yes" && cat << \EOF
8234     Defining HAVE_POSTGRESQLV7
8235 EOF
8236 cat >> confdefs.h <<\EOF
8237 #define HAVE_POSTGRESQLV7 1
8238 EOF
8239 }
8240
8241 else
8242   echo "$ac_t""no" 1>&6
8243 fi
8244
8245
8246     { test "$extra_verbose" = "yes" && cat << EOF
8247     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8248 EOF
8249 cat >> confdefs.h <<EOF
8250 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8251 EOF
8252 }
8253
8254     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8255     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8256    echo "    xemacs will be linked with \"postgresql.o\""
8257  fi
8258   elif test "$with_postgresql" = "yes"; then
8259     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8260   fi
8261 fi
8262
8263
8264 if test "$window_system" != "none"; then
8265   echo "checking for graphics libraries" 1>&6
8266 echo "configure:8267: checking for graphics libraries" >&5
8267
8268       libpath_xpm=
8269   incpath_xpm=
8270   case "$opsys" in 
8271     cygwin*)
8272       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8273       cygwin_top=`eval "dirname ${cygwin_top}"`;
8274       cygwin_top="${cygwin_top}/..";
8275       case "$window_system" in
8276                 x11)  ;;
8277                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8278              incpath_xpm="-I${cygwin_top}/include/noX"
8279               ;;
8280                 gtk)  ;;
8281                 none) ;;
8282                 *)    ;;
8283       esac
8284       ;;
8285         *) ;;
8286   esac
8287     xpm_problem=""
8288   if test -z "$with_xpm"; then
8289     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8290     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8291     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8292 echo "configure:8293: checking for Xpm - no older than 3.4f" >&5
8293     xe_check_libs=-lXpm
8294     cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297 #define XPM_NUMBERS
8298 #include <X11/xpm.h>
8299     int main(int c, char **v) {
8300     return c == 1 ? 0 :
8301       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8302       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8303 EOF
8304 if { (eval echo configure:8305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8305 then
8306   ./conftest dummy_arg; xpm_status=$?;
8307       if test "$xpm_status" = "0"; then
8308         with_xpm=yes;
8309       else
8310         with_xpm=no;
8311         if test "$xpm_status" = "1"; then
8312           xpm_problem="Xpm library version and header file version don't match!"
8313         elif test "$xpm_status" = "2"; then
8314           xpm_problem="Xpm library version is too old!"
8315         else
8316           xpm_problem="Internal xpm detection logic error!"
8317         fi
8318         echo "
8319 *** WARNING *** $xpm_problem
8320   I'm not touching that with a 10-foot pole!
8321   If you really want to use the installed version of Xpm, rerun
8322   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8323     fi
8324 else
8325   conftest_rc="$?"
8326   echo "configure: failed program was:" >&5
8327   cat conftest.$ac_ext >&5
8328   rm -fr conftest*
8329   with_xpm=no
8330 fi
8331 rm -fr conftest*
8332     xe_check_libs=
8333     echo "$ac_t""$with_xpm" 1>&6
8334   fi
8335   if test "$with_xpm" = "yes"; then
8336                 { test "$extra_verbose" = "yes" && cat << \EOF
8337     Defining HAVE_XPM
8338 EOF
8339 cat >> confdefs.h <<\EOF
8340 #define HAVE_XPM 1
8341 EOF
8342 }
8343
8344     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8345     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8346     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8347     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8348 echo "configure:8349: checking for \"FOR_MSW\" xpm" >&5
8349     xe_check_libs=-lXpm
8350     cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353
8354 int main() {
8355 XpmCreatePixmapFromData()
8356 ; return 0; }
8357 EOF
8358 if { (eval echo configure:8359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8359   rm -rf conftest*
8360   xpm_for_msw=no
8361 else
8362   echo "configure: failed program was:" >&5
8363   cat conftest.$ac_ext >&5
8364   rm -rf conftest*
8365   xpm_for_msw=yes
8366 fi
8367 rm -f conftest*
8368     xe_check_libs=
8369     echo "$ac_t""$xpm_for_msw" 1>&6
8370     if test "$xpm_for_msw" = "yes"; then
8371       { test "$extra_verbose" = "yes" && cat << \EOF
8372     Defining FOR_MSW
8373 EOF
8374 cat >> confdefs.h <<\EOF
8375 #define FOR_MSW 1
8376 EOF
8377 }
8378
8379     fi
8380   fi
8381
8382     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8383 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8384 echo "configure:8385: checking for compface.h" >&5
8385
8386 cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 #include <compface.h>
8390 EOF
8391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8392 { (eval echo configure:8393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8394 if test -z "$ac_err"; then
8395   rm -rf conftest*
8396   eval "ac_cv_header_$ac_safe=yes"
8397 else
8398   echo "$ac_err" >&5
8399   echo "configure: failed program was:" >&5
8400   cat conftest.$ac_ext >&5
8401   rm -rf conftest*
8402   eval "ac_cv_header_$ac_safe=no"
8403 fi
8404 rm -f conftest*
8405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407   :
8408 else
8409   echo "$ac_t""no" 1>&6
8410 with_xface=no
8411 fi
8412  }
8413   test -z "$with_xface" && { 
8414 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8415 echo "configure:8416: checking for UnGenFace in -lcompface" >&5
8416 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8417
8418 xe_check_libs=" -lcompface "
8419 cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 /* Override any gcc2 internal prototype to avoid an error.  */
8423 /* We use char because int might match the return type of a gcc2
8424     builtin and then its argument prototype would still apply.  */
8425 char UnGenFace();
8426
8427 int main() {
8428 UnGenFace()
8429 ; return 0; }
8430 EOF
8431 if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8432   rm -rf conftest*
8433   eval "ac_cv_lib_$ac_lib_var=yes"
8434 else
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -rf conftest*
8438   eval "ac_cv_lib_$ac_lib_var=no"
8439 fi
8440 rm -f conftest*
8441 xe_check_libs=""
8442
8443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8444   echo "$ac_t""yes" 1>&6
8445   : 
8446 else
8447   echo "$ac_t""no" 1>&6
8448 with_xface=no
8449 fi
8450
8451  }
8452   test -z "$with_xface" && with_xface=yes
8453   if test "$with_xface" = "yes"; then
8454     { test "$extra_verbose" = "yes" && cat << \EOF
8455     Defining HAVE_XFACE
8456 EOF
8457 cat >> confdefs.h <<\EOF
8458 #define HAVE_XFACE 1
8459 EOF
8460 }
8461
8462     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8463   fi
8464
8465         if test "$with_gif" != "no"; then
8466     with_gif="yes"
8467     { test "$extra_verbose" = "yes" && cat << \EOF
8468     Defining HAVE_GIF
8469 EOF
8470 cat >> confdefs.h <<\EOF
8471 #define HAVE_GIF 1
8472 EOF
8473 }
8474
8475     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8476    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8477  fi
8478   fi
8479
8480       if test "$with_png $with_tiff" != "no no"; then
8481     
8482 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8483 echo "configure:8484: checking for inflate in -lc" >&5
8484 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8485
8486 xe_check_libs=" -lc "
8487 cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 /* Override any gcc2 internal prototype to avoid an error.  */
8491 /* We use char because int might match the return type of a gcc2
8492     builtin and then its argument prototype would still apply.  */
8493 char inflate();
8494
8495 int main() {
8496 inflate()
8497 ; return 0; }
8498 EOF
8499 if { (eval echo configure:8500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8500   rm -rf conftest*
8501   eval "ac_cv_lib_$ac_lib_var=yes"
8502 else
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   eval "ac_cv_lib_$ac_lib_var=no"
8507 fi
8508 rm -f conftest*
8509 xe_check_libs=""
8510
8511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8512   echo "$ac_t""yes" 1>&6
8513   :
8514 else
8515   echo "$ac_t""no" 1>&6
8516
8517 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8518 echo "configure:8519: checking for inflate in -lz" >&5
8519 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8520
8521 xe_check_libs=" -lz "
8522 cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8525 /* Override any gcc2 internal prototype to avoid an error.  */
8526 /* We use char because int might match the return type of a gcc2
8527     builtin and then its argument prototype would still apply.  */
8528 char inflate();
8529
8530 int main() {
8531 inflate()
8532 ; return 0; }
8533 EOF
8534 if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8535   rm -rf conftest*
8536   eval "ac_cv_lib_$ac_lib_var=yes"
8537 else
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -rf conftest*
8541   eval "ac_cv_lib_$ac_lib_var=no"
8542 fi
8543 rm -f conftest*
8544 xe_check_libs=""
8545
8546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8547   echo "$ac_t""yes" 1>&6
8548   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8549 else
8550   echo "$ac_t""no" 1>&6
8551
8552 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8553 echo "configure:8554: checking for inflate in -lgz" >&5
8554 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8555
8556 xe_check_libs=" -lgz "
8557 cat > conftest.$ac_ext <<EOF
8558 #line 8559 "configure"
8559 #include "confdefs.h"
8560 /* Override any gcc2 internal prototype to avoid an error.  */
8561 /* We use char because int might match the return type of a gcc2
8562     builtin and then its argument prototype would still apply.  */
8563 char inflate();
8564
8565 int main() {
8566 inflate()
8567 ; return 0; }
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8570   rm -rf conftest*
8571   eval "ac_cv_lib_$ac_lib_var=yes"
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -rf conftest*
8576   eval "ac_cv_lib_$ac_lib_var=no"
8577 fi
8578 rm -f conftest*
8579 xe_check_libs=""
8580
8581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8582   echo "$ac_t""yes" 1>&6
8583   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8584 else
8585   echo "$ac_t""no" 1>&6
8586 fi
8587
8588
8589 fi
8590
8591
8592 fi
8593
8594
8595   fi
8596
8597     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8598 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8599 echo "configure:8600: checking for jpeglib.h" >&5
8600
8601 cat > conftest.$ac_ext <<EOF
8602 #line 8603 "configure"
8603 #include "confdefs.h"
8604 #include <jpeglib.h>
8605 EOF
8606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8607 { (eval echo configure:8608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8609 if test -z "$ac_err"; then
8610   rm -rf conftest*
8611   eval "ac_cv_header_$ac_safe=yes"
8612 else
8613   echo "$ac_err" >&5
8614   echo "configure: failed program was:" >&5
8615   cat conftest.$ac_ext >&5
8616   rm -rf conftest*
8617   eval "ac_cv_header_$ac_safe=no"
8618 fi
8619 rm -f conftest*
8620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8621   echo "$ac_t""yes" 1>&6
8622   :
8623 else
8624   echo "$ac_t""no" 1>&6
8625 with_jpeg=no
8626 fi
8627  }
8628   test -z "$with_jpeg" && { 
8629 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8630 echo "configure:8631: checking for jpeg_destroy_decompress in -ljpeg" >&5
8631 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8632
8633 xe_check_libs=" -ljpeg "
8634 cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 /* Override any gcc2 internal prototype to avoid an error.  */
8638 /* We use char because int might match the return type of a gcc2
8639     builtin and then its argument prototype would still apply.  */
8640 char jpeg_destroy_decompress();
8641
8642 int main() {
8643 jpeg_destroy_decompress()
8644 ; return 0; }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=yes"
8649 else
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -rf conftest*
8653   eval "ac_cv_lib_$ac_lib_var=no"
8654 fi
8655 rm -f conftest*
8656 xe_check_libs=""
8657
8658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8659   echo "$ac_t""yes" 1>&6
8660   :
8661 else
8662   echo "$ac_t""no" 1>&6
8663 with_jpeg=no
8664 fi
8665
8666  }
8667   test -z "$with_jpeg" && with_jpeg=yes
8668   if test "$with_jpeg" = "yes"; then
8669     { test "$extra_verbose" = "yes" && cat << \EOF
8670     Defining HAVE_JPEG
8671 EOF
8672 cat >> confdefs.h <<\EOF
8673 #define HAVE_JPEG 1
8674 EOF
8675 }
8676
8677     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8678   fi
8679
8680     png_problem=""
8681   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8682 echo "configure:8683: checking for pow" >&5
8683
8684 cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 /* System header to define __stub macros and hopefully few prototypes,
8688     which can conflict with char pow(); below.  */
8689 #include <assert.h>
8690 /* Override any gcc2 internal prototype to avoid an error.  */
8691 /* We use char because int might match the return type of a gcc2
8692     builtin and then its argument prototype would still apply.  */
8693 char pow();
8694
8695 int main() {
8696
8697 /* The GNU C library defines this for functions which it implements
8698     to always fail with ENOSYS.  Some functions are actually named
8699     something starting with __ and the normal name is an alias.  */
8700 #if defined (__stub_pow) || defined (__stub___pow)
8701 choke me
8702 #else
8703 pow();
8704 #endif
8705
8706 ; return 0; }
8707 EOF
8708 if { (eval echo configure:8709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8709   rm -rf conftest*
8710   eval "ac_cv_func_pow=yes"
8711 else
8712   echo "configure: failed program was:" >&5
8713   cat conftest.$ac_ext >&5
8714   rm -rf conftest*
8715   eval "ac_cv_func_pow=no"
8716 fi
8717 rm -f conftest*
8718
8719 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8720   echo "$ac_t""yes" 1>&6
8721   :
8722 else
8723   echo "$ac_t""no" 1>&6
8724 with_png=no
8725 fi
8726  }
8727   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8728 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8729 echo "configure:8730: checking for png.h" >&5
8730
8731 cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8734 #include <png.h>
8735 EOF
8736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8737 { (eval echo configure:8738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8739 if test -z "$ac_err"; then
8740   rm -rf conftest*
8741   eval "ac_cv_header_$ac_safe=yes"
8742 else
8743   echo "$ac_err" >&5
8744   echo "configure: failed program was:" >&5
8745   cat conftest.$ac_ext >&5
8746   rm -rf conftest*
8747   eval "ac_cv_header_$ac_safe=no"
8748 fi
8749 rm -f conftest*
8750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8751   echo "$ac_t""yes" 1>&6
8752   :
8753 else
8754   echo "$ac_t""no" 1>&6
8755 with_png=no
8756 fi
8757  }
8758   test -z "$with_png" && { 
8759 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8760 echo "configure:8761: checking for png_read_image in -lpng" >&5
8761 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8762
8763 xe_check_libs=" -lpng "
8764 cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 /* Override any gcc2 internal prototype to avoid an error.  */
8768 /* We use char because int might match the return type of a gcc2
8769     builtin and then its argument prototype would still apply.  */
8770 char png_read_image();
8771
8772 int main() {
8773 png_read_image()
8774 ; return 0; }
8775 EOF
8776 if { (eval echo configure:8777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8777   rm -rf conftest*
8778   eval "ac_cv_lib_$ac_lib_var=yes"
8779 else
8780   echo "configure: failed program was:" >&5
8781   cat conftest.$ac_ext >&5
8782   rm -rf conftest*
8783   eval "ac_cv_lib_$ac_lib_var=no"
8784 fi
8785 rm -f conftest*
8786 xe_check_libs=""
8787
8788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8789   echo "$ac_t""yes" 1>&6
8790   :
8791 else
8792   echo "$ac_t""no" 1>&6
8793 with_png=no
8794 fi
8795
8796  }
8797   if test -z "$with_png"; then
8798     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8799 echo "configure:8800: checking for workable png version information" >&5
8800     xe_check_libs="-lpng -lz"
8801     cat > conftest.$ac_ext <<EOF
8802 #line 8803 "configure"
8803 #include "confdefs.h"
8804 #include <png.h>
8805     int main(int c, char **v) {
8806     if (c == 1) return 0;
8807     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8808     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8809 EOF
8810 if { (eval echo configure:8811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8811 then
8812   ./conftest dummy_arg; png_status=$?;
8813       if test "$png_status" = "0"; then
8814         with_png=yes;
8815       else
8816         with_png=no;
8817         if test "$png_status" = "1"; then
8818           png_problem="PNG library version and header file don't match!"
8819         elif test "$png_status" = "2"; then
8820           png_problem="PNG library version too old (pre 1.0.2)!"
8821         fi
8822         echo "
8823 *** WARNING *** $png_problem
8824   I'm not touching that with a 10-foot pole!
8825   If you really want to use the installed version of libPNG, rerun
8826   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8827     fi
8828 else
8829   conftest_rc="$?"
8830   echo "configure: failed program was:" >&5
8831   cat conftest.$ac_ext >&5
8832   rm -fr conftest*
8833   with_png=no
8834 fi
8835 rm -fr conftest*
8836     xe_check_libs=
8837     echo "$ac_t""$with_png" 1>&6
8838   fi
8839   if test "$with_png" = "yes"; then
8840     { test "$extra_verbose" = "yes" && cat << \EOF
8841     Defining HAVE_PNG
8842 EOF
8843 cat >> confdefs.h <<\EOF
8844 #define HAVE_PNG 1
8845 EOF
8846 }
8847
8848     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8849   fi
8850
8851     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8852 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8853 echo "configure:8854: checking for tiffio.h" >&5
8854
8855 cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 #include <tiffio.h>
8859 EOF
8860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8861 { (eval echo configure:8862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8863 if test -z "$ac_err"; then
8864   rm -rf conftest*
8865   eval "ac_cv_header_$ac_safe=yes"
8866 else
8867   echo "$ac_err" >&5
8868   echo "configure: failed program was:" >&5
8869   cat conftest.$ac_ext >&5
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=no"
8872 fi
8873 rm -f conftest*
8874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8875   echo "$ac_t""yes" 1>&6
8876   :
8877 else
8878   echo "$ac_t""no" 1>&6
8879 with_tiff=no
8880 fi
8881  }
8882   test -z "$with_tiff" && { 
8883 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8884 echo "configure:8885: checking for TIFFClientOpen in -ltiff" >&5
8885 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8886
8887 xe_check_libs=" -ltiff "
8888 cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 /* Override any gcc2 internal prototype to avoid an error.  */
8892 /* We use char because int might match the return type of a gcc2
8893     builtin and then its argument prototype would still apply.  */
8894 char TIFFClientOpen();
8895
8896 int main() {
8897 TIFFClientOpen()
8898 ; return 0; }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8901   rm -rf conftest*
8902   eval "ac_cv_lib_$ac_lib_var=yes"
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=no"
8908 fi
8909 rm -f conftest*
8910 xe_check_libs=""
8911
8912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8913   echo "$ac_t""yes" 1>&6
8914   :
8915 else
8916   echo "$ac_t""no" 1>&6
8917 with_tiff=no
8918 fi
8919
8920  }
8921   test -z "$with_tiff" && with_tiff=yes
8922   if test "$with_tiff" = "yes"; then
8923     { test "$extra_verbose" = "yes" && cat << \EOF
8924     Defining HAVE_TIFF
8925 EOF
8926 cat >> confdefs.h <<\EOF
8927 #define HAVE_TIFF 1
8928 EOF
8929 }
8930
8931     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8932   fi
8933 fi
8934
8935
8936 if test "$with_gtk" = "yes"; then
8937     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8938 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8939 echo "configure:8940: checking for compface.h" >&5
8940
8941 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 #include <compface.h>
8945 EOF
8946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8947 { (eval echo configure:8948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8949 if test -z "$ac_err"; then
8950   rm -rf conftest*
8951   eval "ac_cv_header_$ac_safe=yes"
8952 else
8953   echo "$ac_err" >&5
8954   echo "configure: failed program was:" >&5
8955   cat conftest.$ac_ext >&5
8956   rm -rf conftest*
8957   eval "ac_cv_header_$ac_safe=no"
8958 fi
8959 rm -f conftest*
8960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8961   echo "$ac_t""yes" 1>&6
8962   :
8963 else
8964   echo "$ac_t""no" 1>&6
8965 with_xface=no
8966 fi
8967  }
8968   test -z "$with_xface" && { 
8969 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8970 echo "configure:8971: checking for UnGenFace in -lcompface" >&5
8971 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8972
8973 xe_check_libs=" -lcompface "
8974 cat > conftest.$ac_ext <<EOF
8975 #line 8976 "configure"
8976 #include "confdefs.h"
8977 /* Override any gcc2 internal prototype to avoid an error.  */
8978 /* We use char because int might match the return type of a gcc2
8979     builtin and then its argument prototype would still apply.  */
8980 char UnGenFace();
8981
8982 int main() {
8983 UnGenFace()
8984 ; return 0; }
8985 EOF
8986 if { (eval echo configure:8987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8987   rm -rf conftest*
8988   eval "ac_cv_lib_$ac_lib_var=yes"
8989 else
8990   echo "configure: failed program was:" >&5
8991   cat conftest.$ac_ext >&5
8992   rm -rf conftest*
8993   eval "ac_cv_lib_$ac_lib_var=no"
8994 fi
8995 rm -f conftest*
8996 xe_check_libs=""
8997
8998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8999   echo "$ac_t""yes" 1>&6
9000   : 
9001 else
9002   echo "$ac_t""no" 1>&6
9003 with_xface=no
9004 fi
9005
9006  }
9007   test -z "$with_xface" && with_xface=yes
9008   if test "$with_xface" = "yes"; then
9009     { test "$extra_verbose" = "yes" && cat << \EOF
9010     Defining HAVE_XFACE
9011 EOF
9012 cat >> confdefs.h <<\EOF
9013 #define HAVE_XFACE 1
9014 EOF
9015 }
9016
9017     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
9018   fi
9019 fi
9020
9021
9022
9023 if test "$with_x11" = "yes"; then
9024   echo "checking for X11 graphics libraries" 1>&6
9025 echo "configure:9026: checking for X11 graphics libraries" >&5
9026 fi
9027
9028 if test "$with_x11" = "yes"; then
9029   echo "checking for the Athena widgets" 1>&6
9030 echo "configure:9031: checking for the Athena widgets" >&5
9031
9032     case "$with_athena" in
9033         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9034     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9035     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9036     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9037     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9038     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9039   esac
9040
9041   athena_3d_function=Xaw3dComputeBottomShadowRGB
9042
9043     if test "$athena_3d" = "no"; then
9044     
9045 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9046 echo "configure:9047: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9047 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | 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 XawScrollbarSetThumb();
9057
9058 int main() {
9059 XawScrollbarSetThumb()
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           
9077 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9078 echo "configure:9079: checking for $athena_3d_function in -l$athena_variant" >&5
9079 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9080
9081 xe_check_libs=" -l$athena_variant "
9082 cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085 /* Override any gcc2 internal prototype to avoid an error.  */
9086 /* We use char because int might match the return type of a gcc2
9087     builtin and then its argument prototype would still apply.  */
9088 char $athena_3d_function();
9089
9090 int main() {
9091 $athena_3d_function()
9092 ; return 0; }
9093 EOF
9094 if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9095   rm -rf conftest*
9096   eval "ac_cv_lib_$ac_lib_var=yes"
9097 else
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -rf conftest*
9101   eval "ac_cv_lib_$ac_lib_var=no"
9102 fi
9103 rm -f conftest*
9104 xe_check_libs=""
9105
9106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9107   echo "$ac_t""yes" 1>&6
9108   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9109 else
9110   echo "$ac_t""no" 1>&6
9111 athena_lib=$athena_variant
9112 fi
9113
9114
9115       
9116 else
9117   echo "$ac_t""no" 1>&6
9118 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9119 fi
9120
9121
9122   else
9123         
9124 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9125 echo "configure:9126: checking for $athena_3d_function in -l$athena_variant" >&5
9126 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9127
9128 xe_check_libs=" -l$athena_variant "
9129 cat > conftest.$ac_ext <<EOF
9130 #line 9131 "configure"
9131 #include "confdefs.h"
9132 /* Override any gcc2 internal prototype to avoid an error.  */
9133 /* We use char because int might match the return type of a gcc2
9134     builtin and then its argument prototype would still apply.  */
9135 char $athena_3d_function();
9136
9137 int main() {
9138 $athena_3d_function()
9139 ; return 0; }
9140 EOF
9141 if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9142   rm -rf conftest*
9143   eval "ac_cv_lib_$ac_lib_var=yes"
9144 else
9145   echo "configure: failed program was:" >&5
9146   cat conftest.$ac_ext >&5
9147   rm -rf conftest*
9148   eval "ac_cv_lib_$ac_lib_var=no"
9149 fi
9150 rm -f conftest*
9151 xe_check_libs=""
9152
9153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9154   echo "$ac_t""yes" 1>&6
9155   athena_lib=$athena_variant
9156 else
9157   echo "$ac_t""no" 1>&6
9158 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9159 echo "configure:9160: checking for $athena_3d_function in -lXaw" >&5
9160 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9161
9162 xe_check_libs=" -lXaw "
9163 cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 /* Override any gcc2 internal prototype to avoid an error.  */
9167 /* We use char because int might match the return type of a gcc2
9168     builtin and then its argument prototype would still apply.  */
9169 char $athena_3d_function();
9170
9171 int main() {
9172 $athena_3d_function()
9173 ; return 0; }
9174 EOF
9175 if { (eval echo configure:9176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9176   rm -rf conftest*
9177   eval "ac_cv_lib_$ac_lib_var=yes"
9178 else
9179   echo "configure: failed program was:" >&5
9180   cat conftest.$ac_ext >&5
9181   rm -rf conftest*
9182   eval "ac_cv_lib_$ac_lib_var=no"
9183 fi
9184 rm -f conftest*
9185 xe_check_libs=""
9186
9187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9188   echo "$ac_t""yes" 1>&6
9189   athena_lib=Xaw;
9190           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9191         
9192 else
9193   echo "$ac_t""no" 1>&6
9194 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9195 fi
9196
9197
9198 fi
9199
9200
9201   fi
9202
9203     if test "$athena_3d" = "no"; then
9204     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9205 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9206 echo "configure:9207: checking for X11/Xaw/ThreeD.h" >&5
9207
9208 cat > conftest.$ac_ext <<EOF
9209 #line 9210 "configure"
9210 #include "confdefs.h"
9211 #include <X11/Xaw/ThreeD.h>
9212 EOF
9213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9214 { (eval echo configure:9215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9216 if test -z "$ac_err"; then
9217   rm -rf conftest*
9218   eval "ac_cv_header_$ac_safe=yes"
9219 else
9220   echo "$ac_err" >&5
9221   echo "configure: failed program was:" >&5
9222   cat conftest.$ac_ext >&5
9223   rm -rf conftest*
9224   eval "ac_cv_header_$ac_safe=no"
9225 fi
9226 rm -f conftest*
9227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9228   echo "$ac_t""yes" 1>&6
9229   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9230 else
9231   echo "$ac_t""no" 1>&6
9232 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9233 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9234 echo "configure:9235: checking for X11/Xaw/XawInit.h" >&5
9235
9236 cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239 #include <X11/Xaw/XawInit.h>
9240 EOF
9241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9242 { (eval echo configure:9243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9244 if test -z "$ac_err"; then
9245   rm -rf conftest*
9246   eval "ac_cv_header_$ac_safe=yes"
9247 else
9248   echo "$ac_err" >&5
9249   echo "configure: failed program was:" >&5
9250   cat conftest.$ac_ext >&5
9251   rm -rf conftest*
9252   eval "ac_cv_header_$ac_safe=no"
9253 fi
9254 rm -f conftest*
9255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257   athena_h_path=X11/Xaw
9258 else
9259   echo "$ac_t""no" 1>&6
9260 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9261 fi
9262
9263 fi
9264
9265   else
9266             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9267 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9268 echo "configure:9269: checking for X11/$athena_variant/XawInit.h" >&5
9269
9270 cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 #include <X11/$athena_variant/XawInit.h>
9274 EOF
9275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9276 { (eval echo configure:9277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9278 if test -z "$ac_err"; then
9279   rm -rf conftest*
9280   eval "ac_cv_header_$ac_safe=yes"
9281 else
9282   echo "$ac_err" >&5
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_header_$ac_safe=no"
9287 fi
9288 rm -f conftest*
9289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9290   echo "$ac_t""yes" 1>&6
9291   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9292 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9293 echo "configure:9294: checking for X11/$athena_variant/ThreeD.h" >&5
9294
9295 cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298 #include <X11/$athena_variant/ThreeD.h>
9299 EOF
9300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9301 { (eval echo configure:9302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9303 if test -z "$ac_err"; then
9304   rm -rf conftest*
9305   eval "ac_cv_header_$ac_safe=yes"
9306 else
9307   echo "$ac_err" >&5
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -rf conftest*
9311   eval "ac_cv_header_$ac_safe=no"
9312 fi
9313 rm -f conftest*
9314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9315   echo "$ac_t""yes" 1>&6
9316   athena_h_path=X11/$athena_variant
9317 else
9318   echo "$ac_t""no" 1>&6
9319 fi
9320
9321 else
9322   echo "$ac_t""no" 1>&6
9323 fi
9324
9325
9326         if test -z "$athena_h_path"; then
9327       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9328 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9329 echo "configure:9330: checking for $athena_variant/XawInit.h" >&5
9330
9331 cat > conftest.$ac_ext <<EOF
9332 #line 9333 "configure"
9333 #include "confdefs.h"
9334 #include <$athena_variant/XawInit.h>
9335 EOF
9336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9337 { (eval echo configure:9338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9339 if test -z "$ac_err"; then
9340   rm -rf conftest*
9341   eval "ac_cv_header_$ac_safe=yes"
9342 else
9343   echo "$ac_err" >&5
9344   echo "configure: failed program was:" >&5
9345   cat conftest.$ac_ext >&5
9346   rm -rf conftest*
9347   eval "ac_cv_header_$ac_safe=no"
9348 fi
9349 rm -f conftest*
9350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9351   echo "$ac_t""yes" 1>&6
9352   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9353 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9354 echo "configure:9355: checking for $athena_variant/ThreeD.h" >&5
9355
9356 cat > conftest.$ac_ext <<EOF
9357 #line 9358 "configure"
9358 #include "confdefs.h"
9359 #include <$athena_variant/ThreeD.h>
9360 EOF
9361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9362 { (eval echo configure:9363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9364 if test -z "$ac_err"; then
9365   rm -rf conftest*
9366   eval "ac_cv_header_$ac_safe=yes"
9367 else
9368   echo "$ac_err" >&5
9369   echo "configure: failed program was:" >&5
9370   cat conftest.$ac_ext >&5
9371   rm -rf conftest*
9372   eval "ac_cv_header_$ac_safe=no"
9373 fi
9374 rm -f conftest*
9375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9376   echo "$ac_t""yes" 1>&6
9377   athena_h_path=$athena_variant
9378 else
9379   echo "$ac_t""no" 1>&6
9380 fi
9381
9382 else
9383   echo "$ac_t""no" 1>&6
9384 fi
9385
9386     fi
9387
9388         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9389       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9390 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9391 echo "configure:9392: checking for X11/Xaw3d/XawInit.h" >&5
9392
9393 cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9396 #include <X11/Xaw3d/XawInit.h>
9397 EOF
9398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9399 { (eval echo configure:9400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9401 if test -z "$ac_err"; then
9402   rm -rf conftest*
9403   eval "ac_cv_header_$ac_safe=yes"
9404 else
9405   echo "$ac_err" >&5
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -rf conftest*
9409   eval "ac_cv_header_$ac_safe=no"
9410 fi
9411 rm -f conftest*
9412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9413   echo "$ac_t""yes" 1>&6
9414   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9415 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9416 echo "configure:9417: checking for X11/Xaw3d/ThreeD.h" >&5
9417
9418 cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421 #include <X11/Xaw3d/ThreeD.h>
9422 EOF
9423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9424 { (eval echo configure:9425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9426 if test -z "$ac_err"; then
9427   rm -rf conftest*
9428   eval "ac_cv_header_$ac_safe=yes"
9429 else
9430   echo "$ac_err" >&5
9431   echo "configure: failed program was:" >&5
9432   cat conftest.$ac_ext >&5
9433   rm -rf conftest*
9434   eval "ac_cv_header_$ac_safe=no"
9435 fi
9436 rm -f conftest*
9437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9438   echo "$ac_t""yes" 1>&6
9439   
9440             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9441             athena_h_path=X11/Xaw3d
9442           
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446
9447 else
9448   echo "$ac_t""no" 1>&6
9449 fi
9450
9451     fi
9452
9453         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9454       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9455 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9456 echo "configure:9457: checking for Xaw3d/XawInit.h" >&5
9457
9458 cat > conftest.$ac_ext <<EOF
9459 #line 9460 "configure"
9460 #include "confdefs.h"
9461 #include <Xaw3d/XawInit.h>
9462 EOF
9463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9464 { (eval echo configure:9465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9466 if test -z "$ac_err"; then
9467   rm -rf conftest*
9468   eval "ac_cv_header_$ac_safe=yes"
9469 else
9470   echo "$ac_err" >&5
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -rf conftest*
9474   eval "ac_cv_header_$ac_safe=no"
9475 fi
9476 rm -f conftest*
9477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9478   echo "$ac_t""yes" 1>&6
9479   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9480 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9481 echo "configure:9482: checking for Xaw3d/ThreeD.h" >&5
9482
9483 cat > conftest.$ac_ext <<EOF
9484 #line 9485 "configure"
9485 #include "confdefs.h"
9486 #include <Xaw3d/ThreeD.h>
9487 EOF
9488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9489 { (eval echo configure:9490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9491 if test -z "$ac_err"; then
9492   rm -rf conftest*
9493   eval "ac_cv_header_$ac_safe=yes"
9494 else
9495   echo "$ac_err" >&5
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -rf conftest*
9499   eval "ac_cv_header_$ac_safe=no"
9500 fi
9501 rm -f conftest*
9502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9503   echo "$ac_t""yes" 1>&6
9504   
9505             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9506             athena_h_path=Xaw3d
9507           
9508 else
9509   echo "$ac_t""no" 1>&6
9510 fi
9511
9512 else
9513   echo "$ac_t""no" 1>&6
9514 fi
9515
9516     fi
9517
9518             if test -z "$athena_h_path"; then
9519       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9520 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9521 echo "configure:9522: checking for X11/Xaw/ThreeD.h" >&5
9522
9523 cat > conftest.$ac_ext <<EOF
9524 #line 9525 "configure"
9525 #include "confdefs.h"
9526 #include <X11/Xaw/ThreeD.h>
9527 EOF
9528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9529 { (eval echo configure:9530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9531 if test -z "$ac_err"; then
9532   rm -rf conftest*
9533   eval "ac_cv_header_$ac_safe=yes"
9534 else
9535   echo "$ac_err" >&5
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -rf conftest*
9539   eval "ac_cv_header_$ac_safe=no"
9540 fi
9541 rm -f conftest*
9542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9543   echo "$ac_t""yes" 1>&6
9544   
9545           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9546           athena_h_path=X11/Xaw
9547         
9548 else
9549   echo "$ac_t""no" 1>&6
9550 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9551 fi
9552
9553     fi
9554   fi
9555
9556     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9557     have_xaw=yes
9558   else
9559     have_xaw=no
9560   fi
9561
9562 else
9563   have_xaw=no
9564 fi 
9565 if test "$with_x11" = "yes"; then
9566     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9567 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9568 echo "configure:9569: checking for Xm/Xm.h" >&5
9569
9570 cat > conftest.$ac_ext <<EOF
9571 #line 9572 "configure"
9572 #include "confdefs.h"
9573 #include <Xm/Xm.h>
9574 EOF
9575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9576 { (eval echo configure:9577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9578 if test -z "$ac_err"; then
9579   rm -rf conftest*
9580   eval "ac_cv_header_$ac_safe=yes"
9581 else
9582   echo "$ac_err" >&5
9583   echo "configure: failed program was:" >&5
9584   cat conftest.$ac_ext >&5
9585   rm -rf conftest*
9586   eval "ac_cv_header_$ac_safe=no"
9587 fi
9588 rm -f conftest*
9589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9590   echo "$ac_t""yes" 1>&6
9591   
9592 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9593 echo "configure:9594: checking for XmStringFree in -lXm" >&5
9594 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9595
9596 xe_check_libs=" -lXm "
9597 cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600 /* Override any gcc2 internal prototype to avoid an error.  */
9601 /* We use char because int might match the return type of a gcc2
9602     builtin and then its argument prototype would still apply.  */
9603 char XmStringFree();
9604
9605 int main() {
9606 XmStringFree()
9607 ; return 0; }
9608 EOF
9609 if { (eval echo configure:9610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9610   rm -rf conftest*
9611   eval "ac_cv_lib_$ac_lib_var=yes"
9612 else
9613   echo "configure: failed program was:" >&5
9614   cat conftest.$ac_ext >&5
9615   rm -rf conftest*
9616   eval "ac_cv_lib_$ac_lib_var=no"
9617 fi
9618 rm -f conftest*
9619 xe_check_libs=""
9620
9621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9622   echo "$ac_t""yes" 1>&6
9623   have_motif=yes
9624 else
9625   echo "$ac_t""no" 1>&6
9626 have_motif=no
9627 fi
9628
9629
9630 else
9631   echo "$ac_t""no" 1>&6
9632 have_motif=no
9633 fi
9634
9635
9636   if test "$have_motif" = "yes"; then
9637         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9638 echo "configure:9639: checking for Lesstif" >&5
9639     cat > conftest.$ac_ext <<EOF
9640 #line 9641 "configure"
9641 #include "confdefs.h"
9642 #include <Xm/Xm.h>
9643 #ifdef LESSTIF_VERSION
9644 yes
9645 #endif
9646
9647 EOF
9648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9649   egrep "yes" >/dev/null 2>&1; then
9650   rm -rf conftest*
9651   have_lesstif=yes
9652 else
9653   rm -rf conftest*
9654   have_lesstif=no
9655 fi
9656 rm -f conftest*
9657
9658   echo "$ac_t""$have_lesstif" 1>&6
9659   fi
9660
9661 fi 
9662
9663 case "$opsys" in
9664   *linux* )  lucid_prefers_motif="no"  ;;
9665   * )        lucid_prefers_motif="yes" ;;
9666 esac
9667
9668 case "$with_menubars" in "" | "yes" | "athena" )
9669   with_menubars="lucid" ;;
9670 esac
9671 case "$with_dialogs" in "" | "yes" | "lucid" )
9672   if test "$lucid_prefers_motif" = "yes"; then
9673     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9674     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9675     else with_dialogs=no
9676     fi
9677   else
9678     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9679     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9680     else with_dialogs=no
9681     fi
9682   fi ;;
9683 esac
9684 case "$with_scrollbars" in "" | "yes" )
9685   with_scrollbars="lucid" ;;
9686 esac
9687 case "$with_widgets" in
9688   "yes" | "lucid")
9689     if test "$lucid_prefers_motif" = "yes"; then
9690       if   test "$have_motif" = "yes"; then with_widgets="motif"
9691       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9692       else with_widgets=no
9693       fi
9694     else
9695       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9696       elif test "$have_motif" = "yes"; then with_widgets="motif"
9697       else with_widgets=no
9698       fi
9699     fi ;;
9700   "" )
9701     with_widgets=no ;;
9702 esac
9703
9704 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9705
9706 case "$all_widgets" in
9707   *athena* )
9708     if test "$have_xaw" != "yes"; then
9709       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9710     fi
9711
9712         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9713
9714         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9715
9716                     { test "$extra_verbose" = "yes" && cat << EOF
9717     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9718 EOF
9719 cat >> confdefs.h <<EOF
9720 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9721 EOF
9722 }
9723
9724     { test "$extra_verbose" = "yes" && cat << EOF
9725     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9726 EOF
9727 cat >> confdefs.h <<EOF
9728 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9729 EOF
9730 }
9731
9732     { test "$extra_verbose" = "yes" && cat << EOF
9733     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9734 EOF
9735 cat >> confdefs.h <<EOF
9736 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9737 EOF
9738 }
9739
9740     { test "$extra_verbose" = "yes" && cat << EOF
9741     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9742 EOF
9743 cat >> confdefs.h <<EOF
9744 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9745 EOF
9746 }
9747
9748     { test "$extra_verbose" = "yes" && cat << EOF
9749     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9750 EOF
9751 cat >> confdefs.h <<EOF
9752 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9753 EOF
9754 }
9755
9756     { test "$extra_verbose" = "yes" && cat << EOF
9757     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9758 EOF
9759 cat >> confdefs.h <<EOF
9760 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9761 EOF
9762 }
9763
9764     { test "$extra_verbose" = "yes" && cat << EOF
9765     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9766 EOF
9767 cat >> confdefs.h <<EOF
9768 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9769 EOF
9770 }
9771
9772     { test "$extra_verbose" = "yes" && cat << EOF
9773     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9774 EOF
9775 cat >> confdefs.h <<EOF
9776 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9777 EOF
9778 }
9779
9780     { test "$extra_verbose" = "yes" && cat << EOF
9781     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9782 EOF
9783 cat >> confdefs.h <<EOF
9784 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9785 EOF
9786 }
9787
9788     { test "$extra_verbose" = "yes" && cat << EOF
9789     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9790 EOF
9791 cat >> confdefs.h <<EOF
9792 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9793 EOF
9794 }
9795
9796
9797     { test "$extra_verbose" = "yes" && cat << \EOF
9798     Defining LWLIB_USES_ATHENA
9799 EOF
9800 cat >> confdefs.h <<\EOF
9801 #define LWLIB_USES_ATHENA 1
9802 EOF
9803 }
9804
9805     { test "$extra_verbose" = "yes" && cat << \EOF
9806     Defining NEED_ATHENA
9807 EOF
9808 cat >> confdefs.h <<\EOF
9809 #define NEED_ATHENA 1
9810 EOF
9811 }
9812
9813     need_athena="yes"
9814
9815     if test "$athena_3d" = "yes"; then
9816       { test "$extra_verbose" = "yes" && cat << \EOF
9817     Defining HAVE_ATHENA_3D
9818 EOF
9819 cat >> confdefs.h <<\EOF
9820 #define HAVE_ATHENA_3D 1
9821 EOF
9822 }
9823
9824     fi
9825   ;;
9826 esac
9827
9828 case "$all_widgets" in *motif* )
9829   { test "$extra_verbose" = "yes" && cat << \EOF
9830     Defining LWLIB_USES_MOTIF
9831 EOF
9832 cat >> confdefs.h <<\EOF
9833 #define LWLIB_USES_MOTIF 1
9834 EOF
9835 }
9836
9837   { test "$extra_verbose" = "yes" && cat << \EOF
9838     Defining NEED_MOTIF
9839 EOF
9840 cat >> confdefs.h <<\EOF
9841 #define NEED_MOTIF 1
9842 EOF
9843 }
9844
9845   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9846   need_motif=yes ;;
9847 esac
9848
9849 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9850 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9851 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9852 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9853         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9854 case "$with_widgets" in athena* )
9855         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;;
9856 esac
9857 case "$all_widgets" in *lucid* )
9858   { test "$extra_verbose" = "yes" && cat << \EOF
9859     Defining NEED_LUCID
9860 EOF
9861 cat >> confdefs.h <<\EOF
9862 #define NEED_LUCID 1
9863 EOF
9864 }
9865
9866   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9867 esac
9868
9869
9870
9871 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9872     Defining LWLIB_SCROLLBARS_ATHENA
9873 EOF
9874 cat >> confdefs.h <<\EOF
9875 #define LWLIB_SCROLLBARS_ATHENA 1
9876 EOF
9877 }
9878
9879 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9880     Defining LWLIB_DIALOGS_ATHENA
9881 EOF
9882 cat >> confdefs.h <<\EOF
9883 #define LWLIB_DIALOGS_ATHENA 1
9884 EOF
9885 }
9886
9887
9888 if test "$athena_3d" = "yes"; then
9889   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9890     Defining LWLIB_SCROLLBARS_ATHENA3D
9891 EOF
9892 cat >> confdefs.h <<\EOF
9893 #define LWLIB_SCROLLBARS_ATHENA3D 1
9894 EOF
9895 }
9896
9897   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9898     Defining LWLIB_DIALOGS_ATHENA3D
9899 EOF
9900 cat >> confdefs.h <<\EOF
9901 #define LWLIB_DIALOGS_ATHENA3D 1
9902 EOF
9903 }
9904
9905 fi
9906
9907 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9908     Defining LWLIB_WIDGETS_ATHENA
9909 EOF
9910 cat >> confdefs.h <<\EOF
9911 #define LWLIB_WIDGETS_ATHENA 1
9912 EOF
9913 }
9914 ;; esac
9915 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9916         { test "$extra_verbose" = "yes" && cat << \EOF
9917     Defining LWLIB_TABS_LUCID
9918 EOF
9919 cat >> confdefs.h <<\EOF
9920 #define LWLIB_TABS_LUCID 1
9921 EOF
9922 }
9923
9924
9925 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9926     Defining HAVE_MENUBARS
9927 EOF
9928 cat >> confdefs.h <<\EOF
9929 #define HAVE_MENUBARS 1
9930 EOF
9931 }
9932
9933 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9934     Defining HAVE_SCROLLBARS
9935 EOF
9936 cat >> confdefs.h <<\EOF
9937 #define HAVE_SCROLLBARS 1
9938 EOF
9939 }
9940
9941 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9942     Defining HAVE_DIALOGS
9943 EOF
9944 cat >> confdefs.h <<\EOF
9945 #define HAVE_DIALOGS 1
9946 EOF
9947 }
9948
9949 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9950     Defining HAVE_TOOLBARS
9951 EOF
9952 cat >> confdefs.h <<\EOF
9953 #define HAVE_TOOLBARS 1
9954 EOF
9955 }
9956
9957 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9958     Defining HAVE_WIDGETS
9959 EOF
9960 cat >> confdefs.h <<\EOF
9961 #define HAVE_WIDGETS 1
9962 EOF
9963 }
9964
9965
9966 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9967     Defining LWLIB_MENUBARS_LUCID
9968 EOF
9969 cat >> confdefs.h <<\EOF
9970 #define LWLIB_MENUBARS_LUCID 1
9971 EOF
9972 }
9973
9974 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9975     Defining LWLIB_SCROLLBARS_LUCID
9976 EOF
9977 cat >> confdefs.h <<\EOF
9978 #define LWLIB_SCROLLBARS_LUCID 1
9979 EOF
9980 }
9981
9982
9983 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9984     Defining LWLIB_MENUBARS_MOTIF
9985 EOF
9986 cat >> confdefs.h <<\EOF
9987 #define LWLIB_MENUBARS_MOTIF 1
9988 EOF
9989 }
9990
9991 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9992     Defining LWLIB_SCROLLBARS_MOTIF
9993 EOF
9994 cat >> confdefs.h <<\EOF
9995 #define LWLIB_SCROLLBARS_MOTIF 1
9996 EOF
9997 }
9998
9999 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10000     Defining LWLIB_DIALOGS_MOTIF
10001 EOF
10002 cat >> confdefs.h <<\EOF
10003 #define LWLIB_DIALOGS_MOTIF 1
10004 EOF
10005 }
10006
10007 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10008     Defining LWLIB_WIDGETS_MOTIF
10009 EOF
10010 cat >> confdefs.h <<\EOF
10011 #define LWLIB_WIDGETS_MOTIF 1
10012 EOF
10013 }
10014
10015
10016 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
10017    echo "    xemacs will be linked with \"menubar.o\""
10018  fi
10019 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
10020    echo "    xemacs will be linked with \"scrollbar.o\""
10021  fi
10022 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
10023    echo "    xemacs will be linked with \"dialog.o\""
10024  fi
10025 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
10026    echo "    xemacs will be linked with \"toolbar.o\""
10027  fi
10028
10029 if test "$with_gtk" = "yes"; then
10030   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10031    echo "    xemacs will be linked with \"menubar-gtk.o\""
10032  fi
10033   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10034    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10035  fi
10036   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10037    echo "    xemacs will be linked with \"dialog-gtk.o\""
10038  fi
10039   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10040    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10041  fi
10042   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10043    echo "    xemacs will be linked with \"gui-gtk.o\""
10044  fi
10045 fi
10046
10047 if test "$with_x11" = "yes"; then
10048   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10049    echo "    xemacs will be linked with \"menubar-x.o\""
10050  fi
10051   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10052    echo "    xemacs will be linked with \"scrollbar-x.o\""
10053  fi
10054   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10055    echo "    xemacs will be linked with \"dialog-x.o\""
10056  fi
10057   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10058    echo "    xemacs will be linked with \"toolbar-x.o\""
10059  fi
10060   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10061    echo "    xemacs will be linked with \"gui-x.o\""
10062  fi
10063 fi
10064
10065
10066 test -z "$with_mule" && with_mule=no
10067 test -z "$with_file_coding" && with_file_coding=no
10068
10069
10070 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10071   { test "$extra_verbose" = "yes" && cat << \EOF
10072     Defining FILE_CODING
10073 EOF
10074 cat >> confdefs.h <<\EOF
10075 #define FILE_CODING 1
10076 EOF
10077 }
10078
10079   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10080    echo "    xemacs will be linked with \"file-coding.o\""
10081  fi
10082 fi
10083
10084 test -z "$with_chise" && with_chise=yes
10085 if test "$with_chise" = "yes"; then
10086     with_mule=yes
10087     with_utf_2000=yes
10088     with_text_coding=yes
10089 fi
10090
10091 if test "$with_mule" = "yes" ; then
10092   echo "checking for Mule-related features" 1>&6
10093 echo "configure:10094: checking for Mule-related features" >&5
10094   { test "$extra_verbose" = "yes" && cat << \EOF
10095     Defining MULE
10096 EOF
10097 cat >> confdefs.h <<\EOF
10098 #define MULE 1
10099 EOF
10100 }
10101
10102
10103     chise_includes_found=no
10104   if test "$with_chise" != "no"; then
10105     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10106 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10107 echo "configure:10108: checking for chise.h" >&5
10108
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 #include <chise.h>
10113 EOF
10114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10115 { (eval echo configure:10116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10117 if test -z "$ac_err"; then
10118   rm -rf conftest*
10119   eval "ac_cv_header_$ac_safe=yes"
10120 else
10121   echo "$ac_err" >&5
10122   echo "configure: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   rm -rf conftest*
10125   eval "ac_cv_header_$ac_safe=no"
10126 fi
10127 rm -f conftest*
10128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10129   echo "$ac_t""yes" 1>&6
10130   :
10131 else
10132   echo "$ac_t""no" 1>&6
10133 with_chise=no
10134 fi
10135
10136   fi
10137   if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \
10138       -d "/usr/local/chise/include"; then
10139     save_c_switch_site="$c_switch_site"
10140     c_switch_site="$c_switch_site -I/usr/local/chise/include"
10141     ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'`
10142 echo $ac_n "checking for chise.h""... $ac_c" 1>&6
10143 echo "configure:10144: checking for chise.h" >&5
10144
10145 cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148 #include <chise.h>
10149 EOF
10150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10151 { (eval echo configure:10152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10153 if test -z "$ac_err"; then
10154   rm -rf conftest*
10155   eval "ac_cv_header_$ac_safe=yes"
10156 else
10157   echo "$ac_err" >&5
10158   echo "configure: failed program was:" >&5
10159   cat conftest.$ac_ext >&5
10160   rm -rf conftest*
10161   eval "ac_cv_header_$ac_safe=no"
10162 fi
10163 rm -f conftest*
10164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10165   echo "$ac_t""yes" 1>&6
10166   chise_includes_found=yes
10167 else
10168   echo "$ac_t""no" 1>&6
10169 fi
10170
10171     if test "$chise_includes_found" != "yes"; then
10172       c_switch_site="$save_c_switch_site"
10173       with_chise="no"
10174     fi
10175   fi
10176
10177   test -z "$with_chise" && with_chise=yes
10178   if test "$with_chise" = "yes"; then
10179     { test "$extra_verbose" = "yes" && cat << \EOF
10180     Defining HAVE_CHISE
10181 EOF
10182 cat >> confdefs.h <<\EOF
10183 #define HAVE_CHISE 1
10184 EOF
10185 }
10186
10187     { test "$extra_verbose" = "yes" && cat << \EOF
10188     Defining HAVE_LIBCHISE
10189 EOF
10190 cat >> confdefs.h <<\EOF
10191 #define HAVE_LIBCHISE 1
10192 EOF
10193 }
10194
10195     libs_x="-lchise $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lchise\" to \$libs_x"; fi
10196   fi
10197
10198   { test "$extra_verbose" = "yes" && cat << \EOF
10199     Defining FILE_CODING
10200 EOF
10201 cat >> confdefs.h <<\EOF
10202 #define FILE_CODING 1
10203 EOF
10204 }
10205
10206   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
10207    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
10208  fi
10209   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
10210     { test "$extra_verbose" = "yes" && cat << \EOF
10211     Defining TEXT_CODING
10212 EOF
10213 cat >> confdefs.h <<\EOF
10214 #define TEXT_CODING 1
10215 EOF
10216 }
10217
10218     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
10219    echo "    xemacs will be linked with \"text-coding.o\""
10220  fi
10221   else
10222     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10223    echo "    xemacs will be linked with \"file-coding.o\""
10224  fi
10225   fi
10226     for ac_hdr in libintl.h
10227 do
10228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10230 echo "configure:10231: checking for $ac_hdr" >&5
10231
10232 cat > conftest.$ac_ext <<EOF
10233 #line 10234 "configure"
10234 #include "confdefs.h"
10235 #include <$ac_hdr>
10236 EOF
10237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10238 { (eval echo configure:10239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10240 if test -z "$ac_err"; then
10241   rm -rf conftest*
10242   eval "ac_cv_header_$ac_safe=yes"
10243 else
10244   echo "$ac_err" >&5
10245   echo "configure: failed program was:" >&5
10246   cat conftest.$ac_ext >&5
10247   rm -rf conftest*
10248   eval "ac_cv_header_$ac_safe=no"
10249 fi
10250 rm -f conftest*
10251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10252   echo "$ac_t""yes" 1>&6
10253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10254   { test "$extra_verbose" = "yes" && cat << EOF
10255     Defining $ac_tr_hdr
10256 EOF
10257 cat >> confdefs.h <<EOF
10258 #define $ac_tr_hdr 1
10259 EOF
10260 }
10261  
10262 else
10263   echo "$ac_t""no" 1>&6
10264 fi
10265 done
10266
10267   
10268 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10269 echo "configure:10270: checking for strerror in -lintl" >&5
10270 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10271
10272 xe_check_libs=" -lintl "
10273 cat > conftest.$ac_ext <<EOF
10274 #line 10275 "configure"
10275 #include "confdefs.h"
10276 /* Override any gcc2 internal prototype to avoid an error.  */
10277 /* We use char because int might match the return type of a gcc2
10278     builtin and then its argument prototype would still apply.  */
10279 char strerror();
10280
10281 int main() {
10282 strerror()
10283 ; return 0; }
10284 EOF
10285 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10286   rm -rf conftest*
10287   eval "ac_cv_lib_$ac_lib_var=yes"
10288 else
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_lib_$ac_lib_var=no"
10293 fi
10294 rm -f conftest*
10295 xe_check_libs=""
10296
10297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10298   echo "$ac_t""yes" 1>&6
10299     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10300     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10301   { test "$extra_verbose" = "yes" && cat << EOF
10302     Defining $ac_tr_lib
10303 EOF
10304 cat >> confdefs.h <<EOF
10305 #define $ac_tr_lib 1
10306 EOF
10307 }
10308
10309   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10310
10311 else
10312   echo "$ac_t""no" 1>&6
10313 fi
10314
10315
10316
10317   if test "$with_utf_2000" = "yes" ; then
10318     { test "$extra_verbose" = "yes" && cat << \EOF
10319     Defining CHAR_IS_UCS4
10320 EOF
10321 cat >> confdefs.h <<\EOF
10322 #define CHAR_IS_UCS4 1
10323 EOF
10324 }
10325
10326     { test "$extra_verbose" = "yes" && cat << \EOF
10327     Defining UTF2000
10328 EOF
10329 cat >> confdefs.h <<\EOF
10330 #define UTF2000 1
10331 EOF
10332 }
10333
10334     with_wnn=no
10335     with_wnn6=no
10336   fi
10337
10338   echo "checking for Mule input methods" 1>&6
10339 echo "configure:10340: checking for Mule input methods" >&5
10340         case "$with_xim" in "" | "yes" )
10341     echo "checking for XIM" 1>&6
10342 echo "configure:10343: checking for XIM" >&5
10343     
10344 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10345 echo "configure:10346: checking for XOpenIM in -lX11" >&5
10346 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10347
10348 xe_check_libs=" -lX11 "
10349 cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 /* Override any gcc2 internal prototype to avoid an error.  */
10353 /* We use char because int might match the return type of a gcc2
10354     builtin and then its argument prototype would still apply.  */
10355 char XOpenIM();
10356
10357 int main() {
10358 XOpenIM()
10359 ; return 0; }
10360 EOF
10361 if { (eval echo configure:10362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10362   rm -rf conftest*
10363   eval "ac_cv_lib_$ac_lib_var=yes"
10364 else
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   eval "ac_cv_lib_$ac_lib_var=no"
10369 fi
10370 rm -f conftest*
10371 xe_check_libs=""
10372
10373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10374   echo "$ac_t""yes" 1>&6
10375   with_xim=xlib
10376 else
10377   echo "$ac_t""no" 1>&6
10378 with_xim=no
10379 fi
10380
10381
10382             if test "$need_motif $have_lesstif" = "yes no"; then
10383       
10384 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10385 echo "configure:10386: checking for XmImMbLookupString in -lXm" >&5
10386 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10387
10388 xe_check_libs=" -lXm "
10389 cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 /* Override any gcc2 internal prototype to avoid an error.  */
10393 /* We use char because int might match the return type of a gcc2
10394     builtin and then its argument prototype would still apply.  */
10395 char XmImMbLookupString();
10396
10397 int main() {
10398 XmImMbLookupString()
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10402   rm -rf conftest*
10403   eval "ac_cv_lib_$ac_lib_var=yes"
10404 else
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   eval "ac_cv_lib_$ac_lib_var=no"
10409 fi
10410 rm -f conftest*
10411 xe_check_libs=""
10412
10413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10414   echo "$ac_t""yes" 1>&6
10415   with_xim=motif
10416 else
10417   echo "$ac_t""no" 1>&6
10418 fi
10419
10420
10421     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10422       
10423 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10424 echo "configure:10425: checking for XmImMbLookupString in -lXm" >&5
10425 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10426
10427 xe_check_libs=" -lXm "
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431 /* Override any gcc2 internal prototype to avoid an error.  */
10432 /* We use char because int might match the return type of a gcc2
10433     builtin and then its argument prototype would still apply.  */
10434 char XmImMbLookupString();
10435
10436 int main() {
10437 XmImMbLookupString()
10438 ; return 0; }
10439 EOF
10440 if { (eval echo configure:10441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10441   rm -rf conftest*
10442   eval "ac_cv_lib_$ac_lib_var=yes"
10443 else
10444   echo "configure: failed program was:" >&5
10445   cat conftest.$ac_ext >&5
10446   rm -rf conftest*
10447   eval "ac_cv_lib_$ac_lib_var=no"
10448 fi
10449 rm -f conftest*
10450 xe_check_libs=""
10451
10452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10453   echo "$ac_t""yes" 1>&6
10454   with_xim=motif
10455 else
10456   echo "$ac_t""no" 1>&6
10457 fi
10458
10459
10460     fi ;;
10461   esac
10462   if test "$with_xim" != "no"; then
10463     { test "$extra_verbose" = "yes" && cat << \EOF
10464     Defining HAVE_XIM
10465 EOF
10466 cat >> confdefs.h <<\EOF
10467 #define HAVE_XIM 1
10468 EOF
10469 }
10470
10471     if test "$with_xim" = "xlib"; then
10472       { test "$extra_verbose" = "yes" && cat << \EOF
10473     Defining XIM_XLIB
10474 EOF
10475 cat >> confdefs.h <<\EOF
10476 #define XIM_XLIB 1
10477 EOF
10478 }
10479
10480       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10481    echo "    xemacs will be linked with \"input-method-xlib.o\""
10482  fi
10483     fi
10484     if test "$with_xim" = "motif"; then
10485       { test "$extra_verbose" = "yes" && cat << \EOF
10486     Defining XIM_MOTIF
10487 EOF
10488 cat >> confdefs.h <<\EOF
10489 #define XIM_MOTIF 1
10490 EOF
10491 }
10492
10493       need_motif=yes
10494       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10495    echo "    xemacs will be linked with \"input-method-motif.o\""
10496  fi
10497     fi
10498     if test "$with_xim" = "motif"; then
10499       with_xfs=no
10500     fi
10501   fi
10502
10503     if test "$with_xfs" = "yes" ; then
10504     echo "checking for XFontSet" 1>&6
10505 echo "configure:10506: checking for XFontSet" >&5
10506     
10507 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10508 echo "configure:10509: checking for XmbDrawString in -lX11" >&5
10509 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10510
10511 xe_check_libs=" -lX11 "
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515 /* Override any gcc2 internal prototype to avoid an error.  */
10516 /* We use char because int might match the return type of a gcc2
10517     builtin and then its argument prototype would still apply.  */
10518 char XmbDrawString();
10519
10520 int main() {
10521 XmbDrawString()
10522 ; return 0; }
10523 EOF
10524 if { (eval echo configure:10525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=yes"
10527 else
10528   echo "configure: failed program was:" >&5
10529   cat conftest.$ac_ext >&5
10530   rm -rf conftest*
10531   eval "ac_cv_lib_$ac_lib_var=no"
10532 fi
10533 rm -f conftest*
10534 xe_check_libs=""
10535
10536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10537   echo "$ac_t""yes" 1>&6
10538   :
10539 else
10540   echo "$ac_t""no" 1>&6
10541 with_xfs=no
10542 fi
10543
10544
10545     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10546       { test "$extra_verbose" = "yes" && cat << \EOF
10547     Defining USE_XFONTSET
10548 EOF
10549 cat >> confdefs.h <<\EOF
10550 #define USE_XFONTSET 1
10551 EOF
10552 }
10553
10554       if test "$with_xim" = "no" ; then
10555         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10556    echo "    xemacs will be linked with \"input-method-xlib.o\""
10557  fi
10558       fi
10559     fi
10560   fi 
10561     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10562   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10563 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10564 echo "configure:10565: checking for wnn/jllib.h" >&5
10565
10566 cat > conftest.$ac_ext <<EOF
10567 #line 10568 "configure"
10568 #include "confdefs.h"
10569 #include <wnn/jllib.h>
10570 EOF
10571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10572 { (eval echo configure:10573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10574 if test -z "$ac_err"; then
10575   rm -rf conftest*
10576   eval "ac_cv_header_$ac_safe=yes"
10577 else
10578   echo "$ac_err" >&5
10579   echo "configure: failed program was:" >&5
10580   cat conftest.$ac_ext >&5
10581   rm -rf conftest*
10582   eval "ac_cv_header_$ac_safe=no"
10583 fi
10584 rm -f conftest*
10585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10586   echo "$ac_t""yes" 1>&6
10587   :
10588 else
10589   echo "$ac_t""no" 1>&6
10590 with_wnn=no
10591 fi
10592  }
10593     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10594 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10595 echo "configure:10596: checking for wnn/commonhd.h" >&5
10596
10597 cat > conftest.$ac_ext <<EOF
10598 #line 10599 "configure"
10599 #include "confdefs.h"
10600 #include <wnn/commonhd.h>
10601 EOF
10602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10603 { (eval echo configure:10604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10605 if test -z "$ac_err"; then
10606   rm -rf conftest*
10607   eval "ac_cv_header_$ac_safe=yes"
10608 else
10609   echo "$ac_err" >&5
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -rf conftest*
10613   eval "ac_cv_header_$ac_safe=no"
10614 fi
10615 rm -f conftest*
10616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618   :
10619 else
10620   echo "$ac_t""no" 1>&6
10621 with_wnn=no
10622 fi
10623  }
10624     if test "$with_wnn" != "no"; then
10625     for ac_func in crypt
10626 do
10627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10628 echo "configure:10629: checking for $ac_func" >&5
10629
10630 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633 /* System header to define __stub macros and hopefully few prototypes,
10634     which can conflict with char $ac_func(); below.  */
10635 #include <assert.h>
10636 /* Override any gcc2 internal prototype to avoid an error.  */
10637 /* We use char because int might match the return type of a gcc2
10638     builtin and then its argument prototype would still apply.  */
10639 char $ac_func();
10640
10641 int main() {
10642
10643 /* The GNU C library defines this for functions which it implements
10644     to always fail with ENOSYS.  Some functions are actually named
10645     something starting with __ and the normal name is an alias.  */
10646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10647 choke me
10648 #else
10649 $ac_func();
10650 #endif
10651
10652 ; return 0; }
10653 EOF
10654 if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10655   rm -rf conftest*
10656   eval "ac_cv_func_$ac_func=yes"
10657 else
10658   echo "configure: failed program was:" >&5
10659   cat conftest.$ac_ext >&5
10660   rm -rf conftest*
10661   eval "ac_cv_func_$ac_func=no"
10662 fi
10663 rm -f conftest*
10664
10665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10668   { test "$extra_verbose" = "yes" && cat << EOF
10669     Defining $ac_tr_func
10670 EOF
10671 cat >> confdefs.h <<EOF
10672 #define $ac_tr_func 1
10673 EOF
10674 }
10675  
10676 else
10677   echo "$ac_t""no" 1>&6
10678 fi
10679 done
10680
10681     test "$ac_cv_func_crypt" != "yes" && { 
10682 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10683 echo "configure:10684: checking for crypt in -lcrypt" >&5
10684 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10685
10686 xe_check_libs=" -lcrypt "
10687 cat > conftest.$ac_ext <<EOF
10688 #line 10689 "configure"
10689 #include "confdefs.h"
10690 /* Override any gcc2 internal prototype to avoid an error.  */
10691 /* We use char because int might match the return type of a gcc2
10692     builtin and then its argument prototype would still apply.  */
10693 char crypt();
10694
10695 int main() {
10696 crypt()
10697 ; return 0; }
10698 EOF
10699 if { (eval echo configure:10700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10700   rm -rf conftest*
10701   eval "ac_cv_lib_$ac_lib_var=yes"
10702 else
10703   echo "configure: failed program was:" >&5
10704   cat conftest.$ac_ext >&5
10705   rm -rf conftest*
10706   eval "ac_cv_lib_$ac_lib_var=no"
10707 fi
10708 rm -f conftest*
10709 xe_check_libs=""
10710
10711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10712   echo "$ac_t""yes" 1>&6
10713     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10714     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10715   { test "$extra_verbose" = "yes" && cat << EOF
10716     Defining $ac_tr_lib
10717 EOF
10718 cat >> confdefs.h <<EOF
10719 #define $ac_tr_lib 1
10720 EOF
10721 }
10722
10723   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10724
10725 else
10726   echo "$ac_t""no" 1>&6
10727 fi
10728
10729  }
10730   fi
10731     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10732     
10733 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10734 echo "configure:10735: checking for jl_dic_list_e in -lwnn" >&5
10735 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10736
10737 xe_check_libs=" -lwnn "
10738 cat > conftest.$ac_ext <<EOF
10739 #line 10740 "configure"
10740 #include "confdefs.h"
10741 /* Override any gcc2 internal prototype to avoid an error.  */
10742 /* We use char because int might match the return type of a gcc2
10743     builtin and then its argument prototype would still apply.  */
10744 char jl_dic_list_e();
10745
10746 int main() {
10747 jl_dic_list_e()
10748 ; return 0; }
10749 EOF
10750 if { (eval echo configure:10751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10751   rm -rf conftest*
10752   eval "ac_cv_lib_$ac_lib_var=yes"
10753 else
10754   echo "configure: failed program was:" >&5
10755   cat conftest.$ac_ext >&5
10756   rm -rf conftest*
10757   eval "ac_cv_lib_$ac_lib_var=no"
10758 fi
10759 rm -f conftest*
10760 xe_check_libs=""
10761
10762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10763   echo "$ac_t""yes" 1>&6
10764   libwnn=wnn
10765 else
10766   echo "$ac_t""no" 1>&6
10767 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10768 echo "configure:10769: checking for jl_dic_list_e in -lwnn4" >&5
10769 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10770
10771 xe_check_libs=" -lwnn4 "
10772 cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775 /* Override any gcc2 internal prototype to avoid an error.  */
10776 /* We use char because int might match the return type of a gcc2
10777     builtin and then its argument prototype would still apply.  */
10778 char jl_dic_list_e();
10779
10780 int main() {
10781 jl_dic_list_e()
10782 ; return 0; }
10783 EOF
10784 if { (eval echo configure:10785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10785   rm -rf conftest*
10786   eval "ac_cv_lib_$ac_lib_var=yes"
10787 else
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   eval "ac_cv_lib_$ac_lib_var=no"
10792 fi
10793 rm -f conftest*
10794 xe_check_libs=""
10795
10796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10797   echo "$ac_t""yes" 1>&6
10798   libwnn=wnn4
10799 else
10800   echo "$ac_t""no" 1>&6
10801 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10802 echo "configure:10803: checking for jl_dic_list_e in -lwnn6" >&5
10803 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10804
10805 xe_check_libs=" -lwnn6 "
10806 cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809 /* Override any gcc2 internal prototype to avoid an error.  */
10810 /* We use char because int might match the return type of a gcc2
10811     builtin and then its argument prototype would still apply.  */
10812 char jl_dic_list_e();
10813
10814 int main() {
10815 jl_dic_list_e()
10816 ; return 0; }
10817 EOF
10818 if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10819   rm -rf conftest*
10820   eval "ac_cv_lib_$ac_lib_var=yes"
10821 else
10822   echo "configure: failed program was:" >&5
10823   cat conftest.$ac_ext >&5
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=no"
10826 fi
10827 rm -f conftest*
10828 xe_check_libs=""
10829
10830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10831   echo "$ac_t""yes" 1>&6
10832   libwnn=wnn6
10833 else
10834   echo "$ac_t""no" 1>&6
10835 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10836 echo "configure:10837: checking for dic_list_e in -lwnn6_fromsrc" >&5
10837 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10838
10839 xe_check_libs=" -lwnn6_fromsrc "
10840 cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843 /* Override any gcc2 internal prototype to avoid an error.  */
10844 /* We use char because int might match the return type of a gcc2
10845     builtin and then its argument prototype would still apply.  */
10846 char dic_list_e();
10847
10848 int main() {
10849 dic_list_e()
10850 ; return 0; }
10851 EOF
10852 if { (eval echo configure:10853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10853   rm -rf conftest*
10854   eval "ac_cv_lib_$ac_lib_var=yes"
10855 else
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   eval "ac_cv_lib_$ac_lib_var=no"
10860 fi
10861 rm -f conftest*
10862 xe_check_libs=""
10863
10864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10865   echo "$ac_t""yes" 1>&6
10866   libwnn=wnn6_fromsrc
10867 else
10868   echo "$ac_t""no" 1>&6
10869 with_wnn=no
10870 fi
10871
10872
10873 fi
10874
10875
10876 fi
10877
10878
10879 fi
10880
10881
10882   fi
10883   test -z "$with_wnn" && with_wnn=yes
10884   if test "$with_wnn" = "yes"; then
10885     { test "$extra_verbose" = "yes" && cat << \EOF
10886     Defining HAVE_WNN
10887 EOF
10888 cat >> confdefs.h <<\EOF
10889 #define HAVE_WNN 1
10890 EOF
10891 }
10892
10893     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10894     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10895    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10896  fi
10897     if test "$with_wnn6" != "no"; then
10898       
10899 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10900 echo "configure:10901: checking for jl_fi_dic_list in -l$libwnn" >&5
10901 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10902
10903 xe_check_libs=" -l$libwnn "
10904 cat > conftest.$ac_ext <<EOF
10905 #line 10906 "configure"
10906 #include "confdefs.h"
10907 /* Override any gcc2 internal prototype to avoid an error.  */
10908 /* We use char because int might match the return type of a gcc2
10909     builtin and then its argument prototype would still apply.  */
10910 char jl_fi_dic_list();
10911
10912 int main() {
10913 jl_fi_dic_list()
10914 ; return 0; }
10915 EOF
10916 if { (eval echo configure:10917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10917   rm -rf conftest*
10918   eval "ac_cv_lib_$ac_lib_var=yes"
10919 else
10920   echo "configure: failed program was:" >&5
10921   cat conftest.$ac_ext >&5
10922   rm -rf conftest*
10923   eval "ac_cv_lib_$ac_lib_var=no"
10924 fi
10925 rm -f conftest*
10926 xe_check_libs=""
10927
10928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10929   echo "$ac_t""yes" 1>&6
10930   with_wnn6=yes
10931 else
10932   echo "$ac_t""no" 1>&6
10933 fi
10934
10935
10936       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10937     Defining WNN6
10938 EOF
10939 cat >> confdefs.h <<\EOF
10940 #define WNN6 1
10941 EOF
10942 }
10943
10944     fi
10945   fi
10946
10947     canna_includes_found=no
10948   if test "$with_canna" != "no"; then
10949     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10950 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10951 echo "configure:10952: checking for canna/jrkanji.h" >&5
10952
10953 cat > conftest.$ac_ext <<EOF
10954 #line 10955 "configure"
10955 #include "confdefs.h"
10956 #include <canna/jrkanji.h>
10957 EOF
10958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10959 { (eval echo configure:10960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10961 if test -z "$ac_err"; then
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=yes"
10964 else
10965   echo "$ac_err" >&5
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_header_$ac_safe=no"
10970 fi
10971 rm -f conftest*
10972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10973   echo "$ac_t""yes" 1>&6
10974   canna_includes_found=yes
10975 else
10976   echo "$ac_t""no" 1>&6
10977 fi
10978
10979   fi
10980   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10981       -d "/usr/local/canna/include"; then
10982     save_c_switch_site="$c_switch_site"
10983     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10984     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10986 echo "configure:10987: checking for canna/jrkanji.h" >&5
10987
10988 cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 #include <canna/jrkanji.h>
10992 EOF
10993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10994 { (eval echo configure:10995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10996 if test -z "$ac_err"; then
10997   rm -rf conftest*
10998   eval "ac_cv_header_$ac_safe=yes"
10999 else
11000   echo "$ac_err" >&5
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   eval "ac_cv_header_$ac_safe=no"
11005 fi
11006 rm -f conftest*
11007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11008   echo "$ac_t""yes" 1>&6
11009   canna_includes_found=yes
11010 else
11011   echo "$ac_t""no" 1>&6
11012 fi
11013
11014     if test "$canna_includes_found" != "yes"; then
11015       c_switch_site="$save_c_switch_site"
11016       with_canna="no"
11017     fi
11018   fi
11019
11020   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
11021 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
11022 echo "configure:11023: checking for canna/RK.h" >&5
11023
11024 cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 #include <canna/RK.h>
11028 EOF
11029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11030 { (eval echo configure:11031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11032 if test -z "$ac_err"; then
11033   rm -rf conftest*
11034   eval "ac_cv_header_$ac_safe=yes"
11035 else
11036   echo "$ac_err" >&5
11037   echo "configure: failed program was:" >&5
11038   cat conftest.$ac_ext >&5
11039   rm -rf conftest*
11040   eval "ac_cv_header_$ac_safe=no"
11041 fi
11042 rm -f conftest*
11043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11044   echo "$ac_t""yes" 1>&6
11045   :
11046 else
11047   echo "$ac_t""no" 1>&6
11048 with_canna=no
11049 fi
11050  }
11051   test -z "$with_canna" && { 
11052 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
11053 echo "configure:11054: checking for RkBgnBun in -lRKC" >&5
11054 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
11055
11056 xe_check_libs=" -lRKC "
11057 cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 /* Override any gcc2 internal prototype to avoid an error.  */
11061 /* We use char because int might match the return type of a gcc2
11062     builtin and then its argument prototype would still apply.  */
11063 char RkBgnBun();
11064
11065 int main() {
11066 RkBgnBun()
11067 ; return 0; }
11068 EOF
11069 if { (eval echo configure:11070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11070   rm -rf conftest*
11071   eval "ac_cv_lib_$ac_lib_var=yes"
11072 else
11073   echo "configure: failed program was:" >&5
11074   cat conftest.$ac_ext >&5
11075   rm -rf conftest*
11076   eval "ac_cv_lib_$ac_lib_var=no"
11077 fi
11078 rm -f conftest*
11079 xe_check_libs=""
11080
11081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11082   echo "$ac_t""yes" 1>&6
11083   :
11084 else
11085   echo "$ac_t""no" 1>&6
11086 with_canna=no
11087 fi
11088
11089  }
11090   test -z "$with_canna" && { 
11091 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
11092 echo "configure:11093: checking for jrKanjiControl in -lcanna" >&5
11093 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
11094
11095 xe_check_libs=" -lcanna "
11096 cat > conftest.$ac_ext <<EOF
11097 #line 11098 "configure"
11098 #include "confdefs.h"
11099 /* Override any gcc2 internal prototype to avoid an error.  */
11100 /* We use char because int might match the return type of a gcc2
11101     builtin and then its argument prototype would still apply.  */
11102 char jrKanjiControl();
11103
11104 int main() {
11105 jrKanjiControl()
11106 ; return 0; }
11107 EOF
11108 if { (eval echo configure:11109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11109   rm -rf conftest*
11110   eval "ac_cv_lib_$ac_lib_var=yes"
11111 else
11112   echo "configure: failed program was:" >&5
11113   cat conftest.$ac_ext >&5
11114   rm -rf conftest*
11115   eval "ac_cv_lib_$ac_lib_var=no"
11116 fi
11117 rm -f conftest*
11118 xe_check_libs=""
11119
11120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11121   echo "$ac_t""yes" 1>&6
11122   :
11123 else
11124   echo "$ac_t""no" 1>&6
11125 with_canna=no
11126 fi
11127
11128  }
11129   test -z "$with_canna" && with_canna=yes
11130   if test "$with_canna" = "yes"; then
11131     { test "$extra_verbose" = "yes" && cat << \EOF
11132     Defining HAVE_CANNA
11133 EOF
11134 cat >> confdefs.h <<\EOF
11135 #define HAVE_CANNA 1
11136 EOF
11137 }
11138
11139     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11140     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11141    echo "    xemacs will be linked with \"mule-canna.o\""
11142  fi
11143   fi
11144
11145 else   for feature in xim canna wnn; do
11146     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11147       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11148     fi
11149     eval "with_${feature}=no"
11150   done
11151 fi 
11152
11153 if test "$need_motif" = "yes" ; then
11154   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11155     
11156 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11157 echo "configure:11158: checking for layout_object_getvalue in -li18n" >&5
11158 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11159
11160 xe_check_libs=" -li18n "
11161 cat > conftest.$ac_ext <<EOF
11162 #line 11163 "configure"
11163 #include "confdefs.h"
11164 /* Override any gcc2 internal prototype to avoid an error.  */
11165 /* We use char because int might match the return type of a gcc2
11166     builtin and then its argument prototype would still apply.  */
11167 char layout_object_getvalue();
11168
11169 int main() {
11170 layout_object_getvalue()
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=no"
11181 fi
11182 rm -f conftest*
11183 xe_check_libs=""
11184
11185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11186   echo "$ac_t""yes" 1>&6
11187   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11188 else
11189   echo "$ac_t""no" 1>&6
11190 fi
11191
11192
11193   
11194 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11195     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11196   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11197   
11198         runpath="" runpath_dirs=""
11199   if test -n "$LD_RUN_PATH"; then
11200     runpath="$LD_RUN_PATH"
11201   elif test "$GCC" = "yes"; then
11202         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11203     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11204     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11205     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11206       case "$arg" in P,* | -L* | -R* )
11207         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11208           {
11209 xe_runpath_dir="$dir"
11210   test "$xe_runpath_dir" != "/lib"     -a \
11211         "$xe_runpath_dir" != "/usr/lib" -a \
11212         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11213   eval "$xe_add_unique_runpath_dir"
11214 }
11215         done ;;
11216       esac
11217     done
11218     ld_switch_run="$ld_switch_run_save"
11219     rm -f conftest*
11220   else
11221         for arg in $ld_switch_site $ld_switch_x_site; do
11222       case "$arg" in -L*) {
11223 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11224   test "$xe_runpath_dir" != "/lib"     -a \
11225         "$xe_runpath_dir" != "/usr/lib" -a \
11226         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11227   eval "$xe_add_unique_runpath_dir"
11228 };; esac
11229     done
11230             if test "$opsys $need_motif" = "sol2 yes"; then
11231       xe_runpath_dir="/opt/SUNWdt/lib";
11232       eval "$xe_add_unique_runpath_dir";
11233     fi
11234   fi 
11235   if test -n "$runpath"; then
11236     ld_switch_run="${dash_r}${runpath}"
11237     
11238 if test "$GCC" = "yes"; then
11239   set x $ld_switch_run; shift; ld_switch_run=""
11240   while test -n "$1"; do
11241     case $1 in
11242       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11243       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11244       -Xlinker* ) ;;
11245       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11246     esac
11247     shift
11248   done
11249 fi
11250     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11251   fi
11252 fi
11253
11254 fi
11255
11256
11257 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
11258 do
11259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11260 echo "configure:11261: checking for $ac_func" >&5
11261
11262 cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 /* System header to define __stub macros and hopefully few prototypes,
11266     which can conflict with char $ac_func(); below.  */
11267 #include <assert.h>
11268 /* Override any gcc2 internal prototype to avoid an error.  */
11269 /* We use char because int might match the return type of a gcc2
11270     builtin and then its argument prototype would still apply.  */
11271 char $ac_func();
11272
11273 int main() {
11274
11275 /* The GNU C library defines this for functions which it implements
11276     to always fail with ENOSYS.  Some functions are actually named
11277     something starting with __ and the normal name is an alias.  */
11278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11279 choke me
11280 #else
11281 $ac_func();
11282 #endif
11283
11284 ; return 0; }
11285 EOF
11286 if { (eval echo configure:11287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11287   rm -rf conftest*
11288   eval "ac_cv_func_$ac_func=yes"
11289 else
11290   echo "configure: failed program was:" >&5
11291   cat conftest.$ac_ext >&5
11292   rm -rf conftest*
11293   eval "ac_cv_func_$ac_func=no"
11294 fi
11295 rm -f conftest*
11296
11297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11298   echo "$ac_t""yes" 1>&6
11299     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11300   { test "$extra_verbose" = "yes" && cat << EOF
11301     Defining $ac_tr_func
11302 EOF
11303 cat >> confdefs.h <<EOF
11304 #define $ac_tr_func 1
11305 EOF
11306 }
11307  
11308 else
11309   echo "$ac_t""no" 1>&6
11310 fi
11311 done
11312
11313
11314 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11315   case "$opsys" in
11316     hpux11* )
11317       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11318       ac_cv_func_getaddrinfo=no
11319       ;;
11320   esac
11321 fi
11322
11323
11324 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11325 do
11326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11327 echo "configure:11328: checking for $ac_func" >&5
11328
11329 cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 /* System header to define __stub macros and hopefully few prototypes,
11333     which can conflict with char $ac_func(); below.  */
11334 #include <assert.h>
11335 /* Override any gcc2 internal prototype to avoid an error.  */
11336 /* We use char because int might match the return type of a gcc2
11337     builtin and then its argument prototype would still apply.  */
11338 char $ac_func();
11339
11340 int main() {
11341
11342 /* The GNU C library defines this for functions which it implements
11343     to always fail with ENOSYS.  Some functions are actually named
11344     something starting with __ and the normal name is an alias.  */
11345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11346 choke me
11347 #else
11348 $ac_func();
11349 #endif
11350
11351 ; return 0; }
11352 EOF
11353 if { (eval echo configure:11354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11354   rm -rf conftest*
11355   eval "ac_cv_func_$ac_func=yes"
11356 else
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -rf conftest*
11360   eval "ac_cv_func_$ac_func=no"
11361 fi
11362 rm -f conftest*
11363
11364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11365   echo "$ac_t""yes" 1>&6
11366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11367   { test "$extra_verbose" = "yes" && cat << EOF
11368     Defining $ac_tr_func
11369 EOF
11370 cat >> confdefs.h <<EOF
11371 #define $ac_tr_func 1
11372 EOF
11373 }
11374  
11375 else
11376   echo "$ac_t""no" 1>&6
11377 fi
11378 done
11379
11380
11381 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11382 echo "configure:11383: checking for openpty" >&5
11383
11384 cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387 /* System header to define __stub macros and hopefully few prototypes,
11388     which can conflict with char openpty(); below.  */
11389 #include <assert.h>
11390 /* Override any gcc2 internal prototype to avoid an error.  */
11391 /* We use char because int might match the return type of a gcc2
11392     builtin and then its argument prototype would still apply.  */
11393 char openpty();
11394
11395 int main() {
11396
11397 /* The GNU C library defines this for functions which it implements
11398     to always fail with ENOSYS.  Some functions are actually named
11399     something starting with __ and the normal name is an alias.  */
11400 #if defined (__stub_openpty) || defined (__stub___openpty)
11401 choke me
11402 #else
11403 openpty();
11404 #endif
11405
11406 ; return 0; }
11407 EOF
11408 if { (eval echo configure:11409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11409   rm -rf conftest*
11410   eval "ac_cv_func_openpty=yes"
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   eval "ac_cv_func_openpty=no"
11416 fi
11417 rm -f conftest*
11418
11419 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11420   echo "$ac_t""yes" 1>&6
11421   have_openpty=yes
11422 else
11423   echo "$ac_t""no" 1>&6
11424
11425   
11426 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11427 echo "configure:11428: checking for openpty in -lutil" >&5
11428 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11429
11430 xe_check_libs=" -lutil "
11431 cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 /* Override any gcc2 internal prototype to avoid an error.  */
11435 /* We use char because int might match the return type of a gcc2
11436     builtin and then its argument prototype would still apply.  */
11437 char openpty();
11438
11439 int main() {
11440 openpty()
11441 ; return 0; }
11442 EOF
11443 if { (eval echo configure:11444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11444   rm -rf conftest*
11445   eval "ac_cv_lib_$ac_lib_var=yes"
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   eval "ac_cv_lib_$ac_lib_var=no"
11451 fi
11452 rm -f conftest*
11453 xe_check_libs=""
11454
11455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11456   echo "$ac_t""yes" 1>&6
11457   have_openpty=yes need_libutil=yes
11458 else
11459   echo "$ac_t""no" 1>&6
11460 fi
11461
11462
11463 fi
11464
11465 if test "$have_openpty" = "yes"; then
11466   { test "$extra_verbose" = "yes" && cat << \EOF
11467     Defining HAVE_OPENPTY
11468 EOF
11469 cat >> confdefs.h <<\EOF
11470 #define HAVE_OPENPTY 1
11471 EOF
11472 }
11473
11474   for ac_hdr in pty.h libutil.h util.h
11475 do
11476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11478 echo "configure:11479: checking for $ac_hdr" >&5
11479
11480 cat > conftest.$ac_ext <<EOF
11481 #line 11482 "configure"
11482 #include "confdefs.h"
11483 #include <$ac_hdr>
11484 EOF
11485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11486 { (eval echo configure:11487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11488 if test -z "$ac_err"; then
11489   rm -rf conftest*
11490   eval "ac_cv_header_$ac_safe=yes"
11491 else
11492   echo "$ac_err" >&5
11493   echo "configure: failed program was:" >&5
11494   cat conftest.$ac_ext >&5
11495   rm -rf conftest*
11496   eval "ac_cv_header_$ac_safe=no"
11497 fi
11498 rm -f conftest*
11499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11500   echo "$ac_t""yes" 1>&6
11501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11502   { test "$extra_verbose" = "yes" && cat << EOF
11503     Defining $ac_tr_hdr
11504 EOF
11505 cat >> confdefs.h <<EOF
11506 #define $ac_tr_hdr 1
11507 EOF
11508 }
11509  break
11510 else
11511   echo "$ac_t""no" 1>&6
11512 fi
11513 done
11514
11515   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11516 fi
11517
11518 for ac_hdr in stropts.h
11519 do
11520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11522 echo "configure:11523: checking for $ac_hdr" >&5
11523
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 #include <$ac_hdr>
11528 EOF
11529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11530 { (eval echo configure:11531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11532 if test -z "$ac_err"; then
11533   rm -rf conftest*
11534   eval "ac_cv_header_$ac_safe=yes"
11535 else
11536   echo "$ac_err" >&5
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_header_$ac_safe=no"
11541 fi
11542 rm -f conftest*
11543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11544   echo "$ac_t""yes" 1>&6
11545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11546   { test "$extra_verbose" = "yes" && cat << EOF
11547     Defining $ac_tr_hdr
11548 EOF
11549 cat >> confdefs.h <<EOF
11550 #define $ac_tr_hdr 1
11551 EOF
11552 }
11553  
11554 else
11555   echo "$ac_t""no" 1>&6
11556 fi
11557 done
11558
11559 if test "$ac_cv_header_stropts_h" = "yes"; then
11560   for ac_func in isastream
11561 do
11562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11563 echo "configure:11564: checking for $ac_func" >&5
11564
11565 cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568 /* System header to define __stub macros and hopefully few prototypes,
11569     which can conflict with char $ac_func(); below.  */
11570 #include <assert.h>
11571 /* Override any gcc2 internal prototype to avoid an error.  */
11572 /* We use char because int might match the return type of a gcc2
11573     builtin and then its argument prototype would still apply.  */
11574 char $ac_func();
11575
11576 int main() {
11577
11578 /* The GNU C library defines this for functions which it implements
11579     to always fail with ENOSYS.  Some functions are actually named
11580     something starting with __ and the normal name is an alias.  */
11581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11582 choke me
11583 #else
11584 $ac_func();
11585 #endif
11586
11587 ; return 0; }
11588 EOF
11589 if { (eval echo configure:11590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11590   rm -rf conftest*
11591   eval "ac_cv_func_$ac_func=yes"
11592 else
11593   echo "configure: failed program was:" >&5
11594   cat conftest.$ac_ext >&5
11595   rm -rf conftest*
11596   eval "ac_cv_func_$ac_func=no"
11597 fi
11598 rm -f conftest*
11599
11600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11601   echo "$ac_t""yes" 1>&6
11602     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11603   { test "$extra_verbose" = "yes" && cat << EOF
11604     Defining $ac_tr_func
11605 EOF
11606 cat >> confdefs.h <<EOF
11607 #define $ac_tr_func 1
11608 EOF
11609 }
11610  
11611 else
11612   echo "$ac_t""no" 1>&6
11613 fi
11614 done
11615
11616   for ac_hdr in strtio.h
11617 do
11618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11620 echo "configure:11621: checking for $ac_hdr" >&5
11621
11622 cat > conftest.$ac_ext <<EOF
11623 #line 11624 "configure"
11624 #include "confdefs.h"
11625 #include <$ac_hdr>
11626 EOF
11627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11628 { (eval echo configure:11629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11630 if test -z "$ac_err"; then
11631   rm -rf conftest*
11632   eval "ac_cv_header_$ac_safe=yes"
11633 else
11634   echo "$ac_err" >&5
11635   echo "configure: failed program was:" >&5
11636   cat conftest.$ac_ext >&5
11637   rm -rf conftest*
11638   eval "ac_cv_header_$ac_safe=no"
11639 fi
11640 rm -f conftest*
11641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11642   echo "$ac_t""yes" 1>&6
11643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11644   { test "$extra_verbose" = "yes" && cat << EOF
11645     Defining $ac_tr_hdr
11646 EOF
11647 cat >> confdefs.h <<EOF
11648 #define $ac_tr_hdr 1
11649 EOF
11650 }
11651  
11652 else
11653   echo "$ac_t""no" 1>&6
11654 fi
11655 done
11656  fi
11657
11658 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11659    echo "    xemacs will be linked with \"realpath.o\""
11660  fi
11661
11662 for ac_func in getloadavg
11663 do
11664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11665 echo "configure:11666: checking for $ac_func" >&5
11666
11667 cat > conftest.$ac_ext <<EOF
11668 #line 11669 "configure"
11669 #include "confdefs.h"
11670 /* System header to define __stub macros and hopefully few prototypes,
11671     which can conflict with char $ac_func(); below.  */
11672 #include <assert.h>
11673 /* Override any gcc2 internal prototype to avoid an error.  */
11674 /* We use char because int might match the return type of a gcc2
11675     builtin and then its argument prototype would still apply.  */
11676 char $ac_func();
11677
11678 int main() {
11679
11680 /* The GNU C library defines this for functions which it implements
11681     to always fail with ENOSYS.  Some functions are actually named
11682     something starting with __ and the normal name is an alias.  */
11683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11684 choke me
11685 #else
11686 $ac_func();
11687 #endif
11688
11689 ; return 0; }
11690 EOF
11691 if { (eval echo configure:11692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11692   rm -rf conftest*
11693   eval "ac_cv_func_$ac_func=yes"
11694 else
11695   echo "configure: failed program was:" >&5
11696   cat conftest.$ac_ext >&5
11697   rm -rf conftest*
11698   eval "ac_cv_func_$ac_func=no"
11699 fi
11700 rm -f conftest*
11701
11702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11703   echo "$ac_t""yes" 1>&6
11704     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11705   { test "$extra_verbose" = "yes" && cat << EOF
11706     Defining $ac_tr_func
11707 EOF
11708 cat >> confdefs.h <<EOF
11709 #define $ac_tr_func 1
11710 EOF
11711 }
11712  
11713 else
11714   echo "$ac_t""no" 1>&6
11715 fi
11716 done
11717
11718
11719 if test "$ac_cv_func_getloadavg" = "yes"; then
11720         for ac_hdr in sys/loadavg.h
11721 do
11722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11724 echo "configure:11725: checking for $ac_hdr" >&5
11725
11726 cat > conftest.$ac_ext <<EOF
11727 #line 11728 "configure"
11728 #include "confdefs.h"
11729 #include <$ac_hdr>
11730 EOF
11731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11732 { (eval echo configure:11733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11734 if test -z "$ac_err"; then
11735   rm -rf conftest*
11736   eval "ac_cv_header_$ac_safe=yes"
11737 else
11738   echo "$ac_err" >&5
11739   echo "configure: failed program was:" >&5
11740   cat conftest.$ac_ext >&5
11741   rm -rf conftest*
11742   eval "ac_cv_header_$ac_safe=no"
11743 fi
11744 rm -f conftest*
11745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11746   echo "$ac_t""yes" 1>&6
11747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11748   { test "$extra_verbose" = "yes" && cat << EOF
11749     Defining $ac_tr_hdr
11750 EOF
11751 cat >> confdefs.h <<EOF
11752 #define $ac_tr_hdr 1
11753 EOF
11754 }
11755  
11756 else
11757   echo "$ac_t""no" 1>&6
11758 fi
11759 done
11760
11761 else
11762     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11763    echo "    xemacs will be linked with \"getloadavg.o\""
11764  fi
11765
11766     
11767 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11768 echo "configure:11769: checking for kstat_open in -lkstat" >&5
11769 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11770
11771 xe_check_libs=" -lkstat "
11772 cat > conftest.$ac_ext <<EOF
11773 #line 11774 "configure"
11774 #include "confdefs.h"
11775 /* Override any gcc2 internal prototype to avoid an error.  */
11776 /* We use char because int might match the return type of a gcc2
11777     builtin and then its argument prototype would still apply.  */
11778 char kstat_open();
11779
11780 int main() {
11781 kstat_open()
11782 ; return 0; }
11783 EOF
11784 if { (eval echo configure:11785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11785   rm -rf conftest*
11786   eval "ac_cv_lib_$ac_lib_var=yes"
11787 else
11788   echo "configure: failed program was:" >&5
11789   cat conftest.$ac_ext >&5
11790   rm -rf conftest*
11791   eval "ac_cv_lib_$ac_lib_var=no"
11792 fi
11793 rm -f conftest*
11794 xe_check_libs=""
11795
11796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11797   echo "$ac_t""yes" 1>&6
11798     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11800   { test "$extra_verbose" = "yes" && cat << EOF
11801     Defining $ac_tr_lib
11802 EOF
11803 cat >> confdefs.h <<EOF
11804 #define $ac_tr_lib 1
11805 EOF
11806 }
11807
11808   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11809
11810 else
11811   echo "$ac_t""no" 1>&6
11812 fi
11813
11814
11815   for ac_hdr in kstat.h
11816 do
11817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11819 echo "configure:11820: checking for $ac_hdr" >&5
11820
11821 cat > conftest.$ac_ext <<EOF
11822 #line 11823 "configure"
11823 #include "confdefs.h"
11824 #include <$ac_hdr>
11825 EOF
11826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11827 { (eval echo configure:11828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11829 if test -z "$ac_err"; then
11830   rm -rf conftest*
11831   eval "ac_cv_header_$ac_safe=yes"
11832 else
11833   echo "$ac_err" >&5
11834   echo "configure: failed program was:" >&5
11835   cat conftest.$ac_ext >&5
11836   rm -rf conftest*
11837   eval "ac_cv_header_$ac_safe=no"
11838 fi
11839 rm -f conftest*
11840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11841   echo "$ac_t""yes" 1>&6
11842     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11843   { test "$extra_verbose" = "yes" && cat << EOF
11844     Defining $ac_tr_hdr
11845 EOF
11846 cat >> confdefs.h <<EOF
11847 #define $ac_tr_hdr 1
11848 EOF
11849 }
11850  
11851 else
11852   echo "$ac_t""no" 1>&6
11853 fi
11854 done
11855
11856
11857     
11858 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11859 echo "configure:11860: checking for kvm_read in -lkvm" >&5
11860 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11861
11862 xe_check_libs=" -lkvm "
11863 cat > conftest.$ac_ext <<EOF
11864 #line 11865 "configure"
11865 #include "confdefs.h"
11866 /* Override any gcc2 internal prototype to avoid an error.  */
11867 /* We use char because int might match the return type of a gcc2
11868     builtin and then its argument prototype would still apply.  */
11869 char kvm_read();
11870
11871 int main() {
11872 kvm_read()
11873 ; return 0; }
11874 EOF
11875 if { (eval echo configure:11876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11876   rm -rf conftest*
11877   eval "ac_cv_lib_$ac_lib_var=yes"
11878 else
11879   echo "configure: failed program was:" >&5
11880   cat conftest.$ac_ext >&5
11881   rm -rf conftest*
11882   eval "ac_cv_lib_$ac_lib_var=no"
11883 fi
11884 rm -f conftest*
11885 xe_check_libs=""
11886
11887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11888   echo "$ac_t""yes" 1>&6
11889     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11891   { test "$extra_verbose" = "yes" && cat << EOF
11892     Defining $ac_tr_lib
11893 EOF
11894 cat >> confdefs.h <<EOF
11895 #define $ac_tr_lib 1
11896 EOF
11897 }
11898
11899   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11900
11901 else
11902   echo "$ac_t""no" 1>&6
11903 fi
11904
11905
11906 fi
11907
11908 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11909 echo "configure:11910: checking whether netdb declares h_errno" >&5
11910 cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 #include <netdb.h>
11914 int main() {
11915 return h_errno;
11916 ; return 0; }
11917 EOF
11918 if { (eval echo configure:11919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11919   rm -rf conftest*
11920   echo "$ac_t""yes" 1>&6
11921    { test "$extra_verbose" = "yes" && cat << \EOF
11922     Defining HAVE_H_ERRNO
11923 EOF
11924 cat >> confdefs.h <<\EOF
11925 #define HAVE_H_ERRNO 1
11926 EOF
11927 }
11928
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -rf conftest*
11933   echo "$ac_t""no" 1>&6
11934 fi
11935 rm -f conftest*
11936
11937 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11938 echo "configure:11939: checking for sigsetjmp" >&5
11939 cat > conftest.$ac_ext <<EOF
11940 #line 11941 "configure"
11941 #include "confdefs.h"
11942 #include <setjmp.h>
11943 int main() {
11944 sigjmp_buf bar; sigsetjmp (bar, 0);
11945 ; return 0; }
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11948   rm -rf conftest*
11949   echo "$ac_t""yes" 1>&6
11950    { test "$extra_verbose" = "yes" && cat << \EOF
11951     Defining HAVE_SIGSETJMP
11952 EOF
11953 cat >> confdefs.h <<\EOF
11954 #define HAVE_SIGSETJMP 1
11955 EOF
11956 }
11957
11958 else
11959   echo "configure: failed program was:" >&5
11960   cat conftest.$ac_ext >&5
11961   rm -rf conftest*
11962   echo "$ac_t""no" 1>&6
11963 fi
11964 rm -f conftest*
11965
11966 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11967 echo "configure:11968: checking whether localtime caches TZ" >&5
11968
11969 if test "$ac_cv_func_tzset" = "yes"; then
11970 cat > conftest.$ac_ext <<EOF
11971 #line 11972 "configure"
11972 #include "confdefs.h"
11973 #include <time.h>
11974 #if STDC_HEADERS
11975 # include <stdlib.h>
11976 #endif
11977 extern char **environ;
11978 unset_TZ ()
11979 {
11980   char **from, **to;
11981   for (to = from = environ; (*to = *from); from++)
11982     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11983       to++;
11984 }
11985 char TZ_GMT0[] = "TZ=GMT0";
11986 char TZ_PST8[] = "TZ=PST8";
11987 main()
11988 {
11989   time_t now = time ((time_t *) 0);
11990   int hour_GMT0, hour_unset;
11991   if (putenv (TZ_GMT0) != 0)
11992     exit (1);
11993   hour_GMT0 = localtime (&now)->tm_hour;
11994   unset_TZ ();
11995   hour_unset = localtime (&now)->tm_hour;
11996   if (putenv (TZ_PST8) != 0)
11997     exit (1);
11998   if (localtime (&now)->tm_hour == hour_GMT0)
11999     exit (1);
12000   unset_TZ ();
12001   if (localtime (&now)->tm_hour != hour_unset)
12002     exit (1);
12003   exit (0);
12004 }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12007 then
12008   emacs_cv_localtime_cache=no
12009 else
12010   conftest_rc="$?"
12011   echo "configure: failed program was:" >&5
12012   cat conftest.$ac_ext >&5
12013   rm -fr conftest*
12014   emacs_cv_localtime_cache=yes
12015 fi
12016 rm -fr conftest*
12017 else
12018         # If we lack tzset, report that localtime does not cache TZ,
12019         # since we can't invalidate the cache if we don't have tzset.
12020         emacs_cv_localtime_cache=no
12021 fi
12022 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
12023 if test $emacs_cv_localtime_cache = yes; then
12024   { test "$extra_verbose" = "yes" && cat << \EOF
12025     Defining LOCALTIME_CACHE
12026 EOF
12027 cat >> confdefs.h <<\EOF
12028 #define LOCALTIME_CACHE 1
12029 EOF
12030 }
12031
12032 fi
12033
12034 if test "$HAVE_TIMEVAL" = "yes"; then
12035 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
12036 echo "configure:12037: checking whether gettimeofday accepts one or two arguments" >&5
12037 cat > conftest.$ac_ext <<EOF
12038 #line 12039 "configure"
12039 #include "confdefs.h"
12040
12041 #ifdef TIME_WITH_SYS_TIME
12042 #include <sys/time.h>
12043 #include <time.h>
12044 #else
12045 #ifdef HAVE_SYS_TIME_H
12046 #include <sys/time.h>
12047 #else
12048 #include <time.h>
12049 #endif
12050 #endif
12051   
12052 int main() {
12053
12054   struct timeval time;
12055   gettimeofday (&time, 0);
12056
12057 ; return 0; }
12058 EOF
12059 if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12060   rm -rf conftest*
12061   echo "$ac_t""two" 1>&6
12062 else
12063   echo "configure: failed program was:" >&5
12064   cat conftest.$ac_ext >&5
12065   rm -rf conftest*
12066   echo "$ac_t""one" 1>&6
12067    { test "$extra_verbose" = "yes" && cat << \EOF
12068     Defining GETTIMEOFDAY_ONE_ARGUMENT
12069 EOF
12070 cat >> confdefs.h <<\EOF
12071 #define GETTIMEOFDAY_ONE_ARGUMENT 1
12072 EOF
12073 }
12074
12075 fi
12076 rm -f conftest*
12077 fi
12078
12079
12080 echo $ac_n "checking for inline""... $ac_c" 1>&6
12081 echo "configure:12082: checking for inline" >&5
12082
12083 ac_cv_c_inline=no
12084 for ac_kw in inline __inline__ __inline; do
12085   cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088
12089 int main() {
12090 } $ac_kw foo() {
12091 ; return 0; }
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12094   rm -rf conftest*
12095   ac_cv_c_inline=$ac_kw; break
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099 fi
12100 rm -f conftest*
12101 done
12102
12103
12104 echo "$ac_t""$ac_cv_c_inline" 1>&6
12105 case "$ac_cv_c_inline" in
12106   inline | yes) ;;
12107   no) { test "$extra_verbose" = "yes" && cat << \EOF
12108     Defining inline = 
12109 EOF
12110 cat >> confdefs.h <<\EOF
12111 #define inline 
12112 EOF
12113 }
12114  ;;
12115   *)  { test "$extra_verbose" = "yes" && cat << EOF
12116     Defining inline = $ac_cv_c_inline
12117 EOF
12118 cat >> confdefs.h <<EOF
12119 #define inline $ac_cv_c_inline
12120 EOF
12121 }
12122  ;;
12123 esac
12124
12125 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12126    echo "    xemacs will be linked with \"inline.o\""
12127  fi
12128
12129
12130 if test "$__DECC" != "yes"; then
12131   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12132 # for constant arguments.  Useless!
12133 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12134 echo "configure:12135: checking for working alloca.h" >&5
12135
12136 cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139 #include <alloca.h>
12140 int main() {
12141 char *p = alloca(2 * sizeof(int));
12142 ; return 0; }
12143 EOF
12144 if { (eval echo configure:12145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12145   rm -rf conftest*
12146   ac_cv_header_alloca_h=yes
12147 else
12148   echo "configure: failed program was:" >&5
12149   cat conftest.$ac_ext >&5
12150   rm -rf conftest*
12151   ac_cv_header_alloca_h=no
12152 fi
12153 rm -f conftest*
12154
12155 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12156 if test $ac_cv_header_alloca_h = yes; then
12157   { test "$extra_verbose" = "yes" && cat << \EOF
12158     Defining HAVE_ALLOCA_H
12159 EOF
12160 cat >> confdefs.h <<\EOF
12161 #define HAVE_ALLOCA_H 1
12162 EOF
12163 }
12164
12165 fi
12166
12167 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12168 echo "configure:12169: checking for alloca" >&5
12169
12170 cat > conftest.$ac_ext <<EOF
12171 #line 12172 "configure"
12172 #include "confdefs.h"
12173
12174 #ifdef __GNUC__
12175 # define alloca __builtin_alloca
12176 #else
12177 # ifdef _MSC_VER
12178 #  include <malloc.h>
12179 #  define alloca _alloca
12180 # else
12181 #  if HAVE_ALLOCA_H
12182 #   include <alloca.h>
12183 #  else
12184 #   ifdef _AIX
12185  #pragma alloca
12186 #   else
12187 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12188 char *alloca ();
12189 #    endif
12190 #   endif
12191 #  endif
12192 # endif
12193 #endif
12194
12195 int main() {
12196 char *p = (char *) alloca(1);
12197 ; return 0; }
12198 EOF
12199 if { (eval echo configure:12200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12200   rm -rf conftest*
12201   ac_cv_func_alloca_works=yes
12202 else
12203   echo "configure: failed program was:" >&5
12204   cat conftest.$ac_ext >&5
12205   rm -rf conftest*
12206   ac_cv_func_alloca_works=no
12207 fi
12208 rm -f conftest*
12209
12210 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12211 if test $ac_cv_func_alloca_works = yes; then
12212   { test "$extra_verbose" = "yes" && cat << \EOF
12213     Defining HAVE_ALLOCA
12214 EOF
12215 cat >> confdefs.h <<\EOF
12216 #define HAVE_ALLOCA 1
12217 EOF
12218 }
12219
12220 fi
12221
12222 if test $ac_cv_func_alloca_works = no; then
12223   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12224   # that cause trouble.  Some versions do not even contain alloca or
12225   # contain a buggy version.  If you still want to use their alloca,
12226   # use ar to extract alloca.o from them instead of compiling alloca.c.
12227   ALLOCA=alloca.${ac_objext}
12228   { test "$extra_verbose" = "yes" && cat << \EOF
12229     Defining C_ALLOCA
12230 EOF
12231 cat >> confdefs.h <<\EOF
12232 #define C_ALLOCA 1
12233 EOF
12234 }
12235
12236
12237 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12238 echo "configure:12239: checking whether alloca needs Cray hooks" >&5
12239
12240 cat > conftest.$ac_ext <<EOF
12241 #line 12242 "configure"
12242 #include "confdefs.h"
12243 #if defined(CRAY) && ! defined(CRAY2)
12244 webecray
12245 #else
12246 wenotbecray
12247 #endif
12248
12249 EOF
12250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12251   egrep "webecray" >/dev/null 2>&1; then
12252   rm -rf conftest*
12253   ac_cv_os_cray=yes
12254 else
12255   rm -rf conftest*
12256   ac_cv_os_cray=no
12257 fi
12258 rm -f conftest*
12259
12260
12261 echo "$ac_t""$ac_cv_os_cray" 1>&6
12262 if test $ac_cv_os_cray = yes; then
12263 for ac_func in _getb67 GETB67 getb67; do
12264   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12265 echo "configure:12266: checking for $ac_func" >&5
12266
12267 cat > conftest.$ac_ext <<EOF
12268 #line 12269 "configure"
12269 #include "confdefs.h"
12270 /* System header to define __stub macros and hopefully few prototypes,
12271     which can conflict with char $ac_func(); below.  */
12272 #include <assert.h>
12273 /* Override any gcc2 internal prototype to avoid an error.  */
12274 /* We use char because int might match the return type of a gcc2
12275     builtin and then its argument prototype would still apply.  */
12276 char $ac_func();
12277
12278 int main() {
12279
12280 /* The GNU C library defines this for functions which it implements
12281     to always fail with ENOSYS.  Some functions are actually named
12282     something starting with __ and the normal name is an alias.  */
12283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12284 choke me
12285 #else
12286 $ac_func();
12287 #endif
12288
12289 ; return 0; }
12290 EOF
12291 if { (eval echo configure:12292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12292   rm -rf conftest*
12293   eval "ac_cv_func_$ac_func=yes"
12294 else
12295   echo "configure: failed program was:" >&5
12296   cat conftest.$ac_ext >&5
12297   rm -rf conftest*
12298   eval "ac_cv_func_$ac_func=no"
12299 fi
12300 rm -f conftest*
12301
12302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12303   echo "$ac_t""yes" 1>&6
12304   { test "$extra_verbose" = "yes" && cat << EOF
12305     Defining CRAY_STACKSEG_END = $ac_func
12306 EOF
12307 cat >> confdefs.h <<EOF
12308 #define CRAY_STACKSEG_END $ac_func
12309 EOF
12310 }
12311
12312   break
12313 else
12314   echo "$ac_t""no" 1>&6
12315 fi
12316
12317 done
12318 fi
12319
12320 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12321 echo "configure:12322: checking stack direction for C alloca" >&5
12322
12323 cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326 find_stack_direction ()
12327 {
12328   static char *addr = 0;
12329   auto char dummy;
12330   if (addr == 0)
12331     {
12332       addr = &dummy;
12333       return find_stack_direction ();
12334     }
12335   else
12336     return (&dummy > addr) ? 1 : -1;
12337 }
12338 main ()
12339 {
12340   exit (find_stack_direction() < 0);
12341 }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12344 then
12345   ac_cv_c_stack_direction=1
12346 else
12347   conftest_rc="$?"
12348   echo "configure: failed program was:" >&5
12349   cat conftest.$ac_ext >&5
12350   rm -fr conftest*
12351   ac_cv_c_stack_direction=-1
12352 fi
12353 rm -fr conftest*
12354
12355 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12356 { test "$extra_verbose" = "yes" && cat << EOF
12357     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12358 EOF
12359 cat >> confdefs.h <<EOF
12360 #define STACK_DIRECTION $ac_cv_c_stack_direction
12361 EOF
12362 }
12363
12364 fi
12365
12366   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12367    echo "    xemacs will be linked with \"$ALLOCA\""
12368  fi
12369 fi
12370
12371 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12372 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12373 echo "configure:12374: checking for vfork.h" >&5
12374
12375 cat > conftest.$ac_ext <<EOF
12376 #line 12377 "configure"
12377 #include "confdefs.h"
12378 #include <vfork.h>
12379 EOF
12380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12381 { (eval echo configure:12382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12383 if test -z "$ac_err"; then
12384   rm -rf conftest*
12385   eval "ac_cv_header_$ac_safe=yes"
12386 else
12387   echo "$ac_err" >&5
12388   echo "configure: failed program was:" >&5
12389   cat conftest.$ac_ext >&5
12390   rm -rf conftest*
12391   eval "ac_cv_header_$ac_safe=no"
12392 fi
12393 rm -f conftest*
12394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12395   echo "$ac_t""yes" 1>&6
12396   { test "$extra_verbose" = "yes" && cat << \EOF
12397     Defining HAVE_VFORK_H
12398 EOF
12399 cat >> confdefs.h <<\EOF
12400 #define HAVE_VFORK_H 1
12401 EOF
12402 }
12403
12404 else
12405   echo "$ac_t""no" 1>&6
12406 fi
12407
12408 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12409 echo "configure:12410: checking for working vfork" >&5
12410
12411 cat > conftest.$ac_ext <<EOF
12412 #line 12413 "configure"
12413 #include "confdefs.h"
12414 /* Thanks to Paul Eggert for this test.  */
12415 #include <stdio.h>
12416 #include <sys/types.h>
12417 #include <sys/stat.h>
12418 #ifdef HAVE_UNISTD_H
12419 #include <unistd.h>
12420 #endif
12421 #ifdef HAVE_VFORK_H
12422 #include <vfork.h>
12423 #endif
12424 /* On some sparc systems, changes by the child to local and incoming
12425    argument registers are propagated back to the parent.
12426    The compiler is told about this with #include <vfork.h>,
12427    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12428    Test for this by using a static variable whose address
12429    is put into a register that is clobbered by the vfork.  */
12430 static
12431 #ifdef __cplusplus
12432 sparc_address_test (int arg)
12433 #else
12434 sparc_address_test (arg) int arg;
12435 #endif
12436 {
12437   static pid_t child;
12438   if (!child) {
12439     child = vfork ();
12440     if (child < 0) {
12441       perror ("vfork");
12442       _exit(2);
12443     }
12444     if (!child) {
12445       arg = getpid();
12446       write(-1, "", 0);
12447       _exit (arg);
12448     }
12449   }
12450 }
12451 main() {
12452   pid_t parent = getpid ();
12453   pid_t child;
12454
12455   sparc_address_test ();
12456
12457   child = vfork ();
12458
12459   if (child == 0) {
12460     /* Here is another test for sparc vfork register problems.
12461        This test uses lots of local variables, at least
12462        as many local variables as main has allocated so far
12463        including compiler temporaries.  4 locals are enough for
12464        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12465        A buggy compiler should reuse the register of parent
12466        for one of the local variables, since it will think that
12467        parent can't possibly be used any more in this routine.
12468        Assigning to the local variable will thus munge parent
12469        in the parent process.  */
12470     pid_t
12471       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12472       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12473     /* Convince the compiler that p..p7 are live; otherwise, it might
12474        use the same hardware register for all 8 local variables.  */
12475     if (p != p1 || p != p2 || p != p3 || p != p4
12476         || p != p5 || p != p6 || p != p7)
12477       _exit(1);
12478
12479     /* On some systems (e.g. IRIX 3.3),
12480        vfork doesn't separate parent from child file descriptors.
12481        If the child closes a descriptor before it execs or exits,
12482        this munges the parent's descriptor as well.
12483        Test for this by closing stdout in the child.  */
12484     _exit(close(fileno(stdout)) != 0);
12485   } else {
12486     int status;
12487     struct stat st;
12488
12489     while (wait(&status) != child)
12490       ;
12491     exit(
12492          /* Was there some problem with vforking?  */
12493          child < 0
12494
12495          /* Did the child fail?  (This shouldn't happen.)  */
12496          || status
12497
12498          /* Did the vfork/compiler bug occur?  */
12499          || parent != getpid()
12500
12501          /* Did the file descriptor bug occur?  */
12502          || fstat(fileno(stdout), &st) != 0
12503          );
12504   }
12505 }
12506 EOF
12507 if { (eval echo configure:12508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12508 then
12509   ac_cv_func_vfork_works=yes
12510 else
12511   conftest_rc="$?"
12512   echo "configure: failed program was:" >&5
12513   cat conftest.$ac_ext >&5
12514   rm -fr conftest*
12515   ac_cv_func_vfork_works=no
12516 fi
12517 rm -fr conftest*
12518
12519 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12520 if test $ac_cv_func_vfork_works = no; then
12521   { test "$extra_verbose" = "yes" && cat << \EOF
12522     Defining vfork = fork
12523 EOF
12524 cat >> confdefs.h <<\EOF
12525 #define vfork fork
12526 EOF
12527 }
12528
12529 fi
12530
12531
12532 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12533 echo "configure:12534: checking for working strcoll" >&5
12534
12535 cat > conftest.$ac_ext <<EOF
12536 #line 12537 "configure"
12537 #include "confdefs.h"
12538 #include <string.h>
12539 main ()
12540 {
12541   exit (strcoll ("abc", "def") >= 0 ||
12542         strcoll ("ABC", "DEF") >= 0 ||
12543         strcoll ("123", "456") >= 0);
12544 }
12545 EOF
12546 if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12547 then
12548   ac_cv_func_strcoll_works=yes
12549 else
12550   conftest_rc="$?"
12551   echo "configure: failed program was:" >&5
12552   cat conftest.$ac_ext >&5
12553   rm -fr conftest*
12554   ac_cv_func_strcoll_works=no
12555 fi
12556 rm -fr conftest*
12557
12558 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12559 if test $ac_cv_func_strcoll_works = yes; then
12560   { test "$extra_verbose" = "yes" && cat << \EOF
12561     Defining HAVE_STRCOLL
12562 EOF
12563 cat >> confdefs.h <<\EOF
12564 #define HAVE_STRCOLL 1
12565 EOF
12566 }
12567
12568 fi
12569
12570
12571 for ac_func in getpgrp
12572 do
12573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12574 echo "configure:12575: checking for $ac_func" >&5
12575
12576 cat > conftest.$ac_ext <<EOF
12577 #line 12578 "configure"
12578 #include "confdefs.h"
12579 /* System header to define __stub macros and hopefully few prototypes,
12580     which can conflict with char $ac_func(); below.  */
12581 #include <assert.h>
12582 /* Override any gcc2 internal prototype to avoid an error.  */
12583 /* We use char because int might match the return type of a gcc2
12584     builtin and then its argument prototype would still apply.  */
12585 char $ac_func();
12586
12587 int main() {
12588
12589 /* The GNU C library defines this for functions which it implements
12590     to always fail with ENOSYS.  Some functions are actually named
12591     something starting with __ and the normal name is an alias.  */
12592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12593 choke me
12594 #else
12595 $ac_func();
12596 #endif
12597
12598 ; return 0; }
12599 EOF
12600 if { (eval echo configure:12601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12601   rm -rf conftest*
12602   eval "ac_cv_func_$ac_func=yes"
12603 else
12604   echo "configure: failed program was:" >&5
12605   cat conftest.$ac_ext >&5
12606   rm -rf conftest*
12607   eval "ac_cv_func_$ac_func=no"
12608 fi
12609 rm -f conftest*
12610
12611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12612   echo "$ac_t""yes" 1>&6
12613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12614   { test "$extra_verbose" = "yes" && cat << EOF
12615     Defining $ac_tr_func
12616 EOF
12617 cat >> confdefs.h <<EOF
12618 #define $ac_tr_func 1
12619 EOF
12620 }
12621  
12622 else
12623   echo "$ac_t""no" 1>&6
12624 fi
12625 done
12626
12627 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12628 echo "configure:12629: checking whether getpgrp takes no argument" >&5
12629
12630 cat > conftest.$ac_ext <<EOF
12631 #line 12632 "configure"
12632 #include "confdefs.h"
12633
12634 /*
12635  * If this system has a BSD-style getpgrp(),
12636  * which takes a pid argument, exit unsuccessfully.
12637  *
12638  * Snarfed from Chet Ramey's bash pgrp.c test program
12639  */
12640 #include <stdio.h>
12641 #include <sys/types.h>
12642
12643 int     pid;
12644 int     pg1, pg2, pg3, pg4;
12645 int     ng, np, s, child;
12646
12647 main()
12648 {
12649         pid = getpid();
12650         pg1 = getpgrp(0);
12651         pg2 = getpgrp();
12652         pg3 = getpgrp(pid);
12653         pg4 = getpgrp(1);
12654
12655         /*
12656          * If all of these values are the same, it's pretty sure that
12657          * we're on a system that ignores getpgrp's first argument.
12658          */
12659         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12660                 exit(0);
12661
12662         child = fork();
12663         if (child < 0)
12664                 exit(1);
12665         else if (child == 0) {
12666                 np = getpid();
12667                 /*
12668                  * If this is Sys V, this will not work; pgrp will be
12669                  * set to np because setpgrp just changes a pgrp to be
12670                  * the same as the pid.
12671                  */
12672                 setpgrp(np, pg1);
12673                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12674                 if (ng == pg1) {
12675                         exit(1);
12676                 } else {
12677                         exit(0);
12678                 }
12679         } else {
12680                 wait(&s);
12681                 exit(s>>8);
12682         }
12683 }
12684
12685 EOF
12686 if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12687 then
12688   ac_cv_func_getpgrp_void=yes
12689 else
12690   conftest_rc="$?"
12691   echo "configure: failed program was:" >&5
12692   cat conftest.$ac_ext >&5
12693   rm -fr conftest*
12694   ac_cv_func_getpgrp_void=no
12695 fi
12696 rm -fr conftest*
12697
12698
12699 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12700 if test $ac_cv_func_getpgrp_void = yes; then
12701   { test "$extra_verbose" = "yes" && cat << \EOF
12702     Defining GETPGRP_VOID
12703 EOF
12704 cat >> confdefs.h <<\EOF
12705 #define GETPGRP_VOID 1
12706 EOF
12707 }
12708
12709 fi
12710
12711
12712 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12713 echo "configure:12714: checking for working mmap" >&5
12714 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12715 cat > conftest.$ac_ext <<EOF
12716 #line 12717 "configure"
12717 #include "confdefs.h"
12718 #include <stdio.h>
12719 #include <unistd.h>
12720 #include <fcntl.h>
12721 #include <sys/mman.h>
12722
12723 #ifndef MAP_VARIABLE
12724 #define MAP_VARIABLE 0
12725 #endif
12726
12727 #ifndef MAP_FAILED
12728 #define MAP_FAILED -1
12729 #endif
12730
12731 int main (int argc, char *argv[])
12732 {
12733   int fd = -1;
12734   caddr_t p;
12735 #ifndef MAP_ANONYMOUS
12736   fd = open ("/dev/zero", O_RDWR);
12737   if (fd < 0)
12738     return 1;
12739 #define MAP_ANONYMOUS 0
12740 #endif
12741   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12742            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12743            fd, 0) != (void *) MAP_FAILED)
12744     return 0;
12745   perror ("conftest: mmap failed");
12746   return 1;
12747 }
12748 EOF
12749 if { (eval echo configure:12750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12750 then
12751   have_mmap=yes
12752 else
12753   conftest_rc="$?"
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -fr conftest*
12757   have_mmap=no
12758 fi
12759 rm -fr conftest* ;;
12760 esac
12761 echo "$ac_t""$have_mmap" 1>&6
12762 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12763     Defining HAVE_MMAP
12764 EOF
12765 cat >> confdefs.h <<\EOF
12766 #define HAVE_MMAP 1
12767 EOF
12768 }
12769
12770
12771 case "$opsys" in cygwin*) 
12772         test "$rel_alloc" = "default" && rel_alloc=no ;;
12773 esac
12774 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12775 if test "$rel_alloc $have_mmap" = "default yes"; then
12776   if test "$doug_lea_malloc" = "yes"; then
12777         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12778 echo "configure:12779: checking for M_MMAP_THRESHOLD" >&5
12779     cat > conftest.$ac_ext <<EOF
12780 #line 12781 "configure"
12781 #include "confdefs.h"
12782 #include <malloc.h>
12783 int main() {
12784
12785 #ifndef M_MMAP_THRESHOLD
12786 #error No M_MMAP_THRESHOLD :-(
12787 !@+$%^&*_)(_ - unlikely to compile...
12788 #endif
12789
12790 ; return 0; }
12791 EOF
12792 if { (eval echo configure:12793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12793   rm -rf conftest*
12794   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12795 else
12796   echo "configure: failed program was:" >&5
12797   cat conftest.$ac_ext >&5
12798   rm -rf conftest*
12799   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12800 fi
12801 rm -f conftest*
12802   else
12803     rel_alloc=yes
12804   fi
12805 fi
12806 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12807     Defining REL_ALLOC
12808 EOF
12809 cat >> confdefs.h <<\EOF
12810 #define REL_ALLOC 1
12811 EOF
12812 }
12813
12814
12815 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12816 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12817 echo "configure:12818: checking for termios.h" >&5
12818
12819 cat > conftest.$ac_ext <<EOF
12820 #line 12821 "configure"
12821 #include "confdefs.h"
12822 #include <termios.h>
12823 EOF
12824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12825 { (eval echo configure:12826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12827 if test -z "$ac_err"; then
12828   rm -rf conftest*
12829   eval "ac_cv_header_$ac_safe=yes"
12830 else
12831   echo "$ac_err" >&5
12832   echo "configure: failed program was:" >&5
12833   cat conftest.$ac_ext >&5
12834   rm -rf conftest*
12835   eval "ac_cv_header_$ac_safe=no"
12836 fi
12837 rm -f conftest*
12838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12839   echo "$ac_t""yes" 1>&6
12840   { test "$extra_verbose" = "yes" && cat << \EOF
12841     Defining HAVE_TERMIOS
12842 EOF
12843 cat >> confdefs.h <<\EOF
12844 #define HAVE_TERMIOS 1
12845 EOF
12846 }
12847
12848   { test "$extra_verbose" = "yes" && cat << \EOF
12849     Defining SIGNALS_VIA_CHARACTERS
12850 EOF
12851 cat >> confdefs.h <<\EOF
12852 #define SIGNALS_VIA_CHARACTERS 1
12853 EOF
12854 }
12855
12856   { test "$extra_verbose" = "yes" && cat << \EOF
12857     Defining NO_TERMIO
12858 EOF
12859 cat >> confdefs.h <<\EOF
12860 #define NO_TERMIO 1
12861 EOF
12862 }
12863
12864 else
12865   echo "$ac_t""no" 1>&6
12866 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12867 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12868 echo "configure:12869: checking for termio.h" >&5
12869
12870 cat > conftest.$ac_ext <<EOF
12871 #line 12872 "configure"
12872 #include "confdefs.h"
12873 #include <termio.h>
12874 EOF
12875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12876 { (eval echo configure:12877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12878 if test -z "$ac_err"; then
12879   rm -rf conftest*
12880   eval "ac_cv_header_$ac_safe=yes"
12881 else
12882   echo "$ac_err" >&5
12883   echo "configure: failed program was:" >&5
12884   cat conftest.$ac_ext >&5
12885   rm -rf conftest*
12886   eval "ac_cv_header_$ac_safe=no"
12887 fi
12888 rm -f conftest*
12889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12890   echo "$ac_t""yes" 1>&6
12891   { test "$extra_verbose" = "yes" && cat << \EOF
12892     Defining HAVE_TERMIO
12893 EOF
12894 cat >> confdefs.h <<\EOF
12895 #define HAVE_TERMIO 1
12896 EOF
12897 }
12898
12899 else
12900   echo "$ac_t""no" 1>&6
12901 fi
12902
12903 fi
12904
12905
12906
12907 echo $ac_n "checking for socket""... $ac_c" 1>&6
12908 echo "configure:12909: checking for socket" >&5
12909
12910 cat > conftest.$ac_ext <<EOF
12911 #line 12912 "configure"
12912 #include "confdefs.h"
12913 /* System header to define __stub macros and hopefully few prototypes,
12914     which can conflict with char socket(); below.  */
12915 #include <assert.h>
12916 /* Override any gcc2 internal prototype to avoid an error.  */
12917 /* We use char because int might match the return type of a gcc2
12918     builtin and then its argument prototype would still apply.  */
12919 char socket();
12920
12921 int main() {
12922
12923 /* The GNU C library defines this for functions which it implements
12924     to always fail with ENOSYS.  Some functions are actually named
12925     something starting with __ and the normal name is an alias.  */
12926 #if defined (__stub_socket) || defined (__stub___socket)
12927 choke me
12928 #else
12929 socket();
12930 #endif
12931
12932 ; return 0; }
12933 EOF
12934 if { (eval echo configure:12935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12935   rm -rf conftest*
12936   eval "ac_cv_func_socket=yes"
12937 else
12938   echo "configure: failed program was:" >&5
12939   cat conftest.$ac_ext >&5
12940   rm -rf conftest*
12941   eval "ac_cv_func_socket=no"
12942 fi
12943 rm -f conftest*
12944
12945 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12946   echo "$ac_t""yes" 1>&6
12947   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12948 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12949 echo "configure:12950: checking for netinet/in.h" >&5
12950
12951 cat > conftest.$ac_ext <<EOF
12952 #line 12953 "configure"
12953 #include "confdefs.h"
12954 #include <netinet/in.h>
12955 EOF
12956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12957 { (eval echo configure:12958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12959 if test -z "$ac_err"; then
12960   rm -rf conftest*
12961   eval "ac_cv_header_$ac_safe=yes"
12962 else
12963   echo "$ac_err" >&5
12964   echo "configure: failed program was:" >&5
12965   cat conftest.$ac_ext >&5
12966   rm -rf conftest*
12967   eval "ac_cv_header_$ac_safe=no"
12968 fi
12969 rm -f conftest*
12970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12971   echo "$ac_t""yes" 1>&6
12972   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12973 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12974 echo "configure:12975: checking for arpa/inet.h" >&5
12975
12976 cat > conftest.$ac_ext <<EOF
12977 #line 12978 "configure"
12978 #include "confdefs.h"
12979 #include <arpa/inet.h>
12980 EOF
12981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12982 { (eval echo configure:12983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12984 if test -z "$ac_err"; then
12985   rm -rf conftest*
12986   eval "ac_cv_header_$ac_safe=yes"
12987 else
12988   echo "$ac_err" >&5
12989   echo "configure: failed program was:" >&5
12990   cat conftest.$ac_ext >&5
12991   rm -rf conftest*
12992   eval "ac_cv_header_$ac_safe=no"
12993 fi
12994 rm -f conftest*
12995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12996   echo "$ac_t""yes" 1>&6
12997   
12998   { test "$extra_verbose" = "yes" && cat << \EOF
12999     Defining HAVE_SOCKETS
13000 EOF
13001 cat >> confdefs.h <<\EOF
13002 #define HAVE_SOCKETS 1
13003 EOF
13004 }
13005
13006       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
13007 echo "configure:13008: checking "for sun_len member in struct sockaddr_un"" >&5
13008       cat > conftest.$ac_ext <<EOF
13009 #line 13010 "configure"
13010 #include "confdefs.h"
13011
13012 #include <sys/types.h>
13013 #include <sys/socket.h>
13014 #include <sys/un.h>
13015       
13016 int main() {
13017 static struct sockaddr_un x; x.sun_len = 1;
13018 ; return 0; }
13019 EOF
13020 if { (eval echo configure:13021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13021   rm -rf conftest*
13022   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13023     Defining HAVE_SOCKADDR_SUN_LEN
13024 EOF
13025 cat >> confdefs.h <<\EOF
13026 #define HAVE_SOCKADDR_SUN_LEN 1
13027 EOF
13028 }
13029
13030 else
13031   echo "configure: failed program was:" >&5
13032   cat conftest.$ac_ext >&5
13033   rm -rf conftest*
13034   echo "$ac_t""no" 1>&6
13035 fi
13036 rm -f conftest*
13037       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
13038 echo "configure:13039: checking "for ip_mreq struct in netinet/in.h"" >&5
13039       cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042
13043 #include <sys/types.h>
13044 #include <netinet/in.h>
13045       
13046 int main() {
13047 static struct ip_mreq x;
13048 ; return 0; }
13049 EOF
13050 if { (eval echo configure:13051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13051   rm -rf conftest*
13052   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13053     Defining HAVE_MULTICAST
13054 EOF
13055 cat >> confdefs.h <<\EOF
13056 #define HAVE_MULTICAST 1
13057 EOF
13058 }
13059
13060 else
13061   echo "configure: failed program was:" >&5
13062   cat conftest.$ac_ext >&5
13063   rm -rf conftest*
13064   echo "$ac_t""no" 1>&6
13065 fi
13066 rm -f conftest*
13067 else
13068   echo "$ac_t""no" 1>&6
13069 fi
13070
13071 else
13072   echo "$ac_t""no" 1>&6
13073 fi
13074
13075 else
13076   echo "$ac_t""no" 1>&6
13077 fi
13078
13079
13080 echo $ac_n "checking for msgget""... $ac_c" 1>&6
13081 echo "configure:13082: checking for msgget" >&5
13082
13083 cat > conftest.$ac_ext <<EOF
13084 #line 13085 "configure"
13085 #include "confdefs.h"
13086 /* System header to define __stub macros and hopefully few prototypes,
13087     which can conflict with char msgget(); below.  */
13088 #include <assert.h>
13089 /* Override any gcc2 internal prototype to avoid an error.  */
13090 /* We use char because int might match the return type of a gcc2
13091     builtin and then its argument prototype would still apply.  */
13092 char msgget();
13093
13094 int main() {
13095
13096 /* The GNU C library defines this for functions which it implements
13097     to always fail with ENOSYS.  Some functions are actually named
13098     something starting with __ and the normal name is an alias.  */
13099 #if defined (__stub_msgget) || defined (__stub___msgget)
13100 choke me
13101 #else
13102 msgget();
13103 #endif
13104
13105 ; return 0; }
13106 EOF
13107 if { (eval echo configure:13108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13108   rm -rf conftest*
13109   eval "ac_cv_func_msgget=yes"
13110 else
13111   echo "configure: failed program was:" >&5
13112   cat conftest.$ac_ext >&5
13113   rm -rf conftest*
13114   eval "ac_cv_func_msgget=no"
13115 fi
13116 rm -f conftest*
13117
13118 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13119   echo "$ac_t""yes" 1>&6
13120   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13121 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13122 echo "configure:13123: checking for sys/ipc.h" >&5
13123
13124 cat > conftest.$ac_ext <<EOF
13125 #line 13126 "configure"
13126 #include "confdefs.h"
13127 #include <sys/ipc.h>
13128 EOF
13129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13130 { (eval echo configure:13131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13132 if test -z "$ac_err"; then
13133   rm -rf conftest*
13134   eval "ac_cv_header_$ac_safe=yes"
13135 else
13136   echo "$ac_err" >&5
13137   echo "configure: failed program was:" >&5
13138   cat conftest.$ac_ext >&5
13139   rm -rf conftest*
13140   eval "ac_cv_header_$ac_safe=no"
13141 fi
13142 rm -f conftest*
13143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13144   echo "$ac_t""yes" 1>&6
13145   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13146 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13147 echo "configure:13148: checking for sys/msg.h" >&5
13148
13149 cat > conftest.$ac_ext <<EOF
13150 #line 13151 "configure"
13151 #include "confdefs.h"
13152 #include <sys/msg.h>
13153 EOF
13154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13155 { (eval echo configure:13156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13157 if test -z "$ac_err"; then
13158   rm -rf conftest*
13159   eval "ac_cv_header_$ac_safe=yes"
13160 else
13161   echo "$ac_err" >&5
13162   echo "configure: failed program was:" >&5
13163   cat conftest.$ac_ext >&5
13164   rm -rf conftest*
13165   eval "ac_cv_header_$ac_safe=no"
13166 fi
13167 rm -f conftest*
13168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13169   echo "$ac_t""yes" 1>&6
13170   { test "$extra_verbose" = "yes" && cat << \EOF
13171     Defining HAVE_SYSVIPC
13172 EOF
13173 cat >> confdefs.h <<\EOF
13174 #define HAVE_SYSVIPC 1
13175 EOF
13176 }
13177
13178 else
13179   echo "$ac_t""no" 1>&6
13180 fi
13181
13182 else
13183   echo "$ac_t""no" 1>&6
13184 fi
13185
13186 else
13187   echo "$ac_t""no" 1>&6
13188 fi
13189
13190
13191 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13192 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13193 echo "configure:13194: checking for dirent.h" >&5
13194
13195 cat > conftest.$ac_ext <<EOF
13196 #line 13197 "configure"
13197 #include "confdefs.h"
13198 #include <dirent.h>
13199 EOF
13200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13201 { (eval echo configure:13202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13203 if test -z "$ac_err"; then
13204   rm -rf conftest*
13205   eval "ac_cv_header_$ac_safe=yes"
13206 else
13207   echo "$ac_err" >&5
13208   echo "configure: failed program was:" >&5
13209   cat conftest.$ac_ext >&5
13210   rm -rf conftest*
13211   eval "ac_cv_header_$ac_safe=no"
13212 fi
13213 rm -f conftest*
13214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13215   echo "$ac_t""yes" 1>&6
13216   { test "$extra_verbose" = "yes" && cat << \EOF
13217     Defining SYSV_SYSTEM_DIR
13218 EOF
13219 cat >> confdefs.h <<\EOF
13220 #define SYSV_SYSTEM_DIR 1
13221 EOF
13222 }
13223
13224 else
13225   echo "$ac_t""no" 1>&6
13226 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13227 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13228 echo "configure:13229: checking for sys/dir.h" >&5
13229
13230 cat > conftest.$ac_ext <<EOF
13231 #line 13232 "configure"
13232 #include "confdefs.h"
13233 #include <sys/dir.h>
13234 EOF
13235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13236 { (eval echo configure:13237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13238 if test -z "$ac_err"; then
13239   rm -rf conftest*
13240   eval "ac_cv_header_$ac_safe=yes"
13241 else
13242   echo "$ac_err" >&5
13243   echo "configure: failed program was:" >&5
13244   cat conftest.$ac_ext >&5
13245   rm -rf conftest*
13246   eval "ac_cv_header_$ac_safe=no"
13247 fi
13248 rm -f conftest*
13249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13250   echo "$ac_t""yes" 1>&6
13251   :
13252 else
13253   echo "$ac_t""no" 1>&6
13254 { test "$extra_verbose" = "yes" && cat << \EOF
13255     Defining NONSYSTEM_DIR_LIBRARY
13256 EOF
13257 cat >> confdefs.h <<\EOF
13258 #define NONSYSTEM_DIR_LIBRARY 1
13259 EOF
13260 }
13261
13262 fi
13263
13264 fi
13265
13266
13267 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13268 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13269 echo "configure:13270: checking for nlist.h" >&5
13270
13271 cat > conftest.$ac_ext <<EOF
13272 #line 13273 "configure"
13273 #include "confdefs.h"
13274 #include <nlist.h>
13275 EOF
13276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13277 { (eval echo configure:13278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13279 if test -z "$ac_err"; then
13280   rm -rf conftest*
13281   eval "ac_cv_header_$ac_safe=yes"
13282 else
13283   echo "$ac_err" >&5
13284   echo "configure: failed program was:" >&5
13285   cat conftest.$ac_ext >&5
13286   rm -rf conftest*
13287   eval "ac_cv_header_$ac_safe=no"
13288 fi
13289 rm -f conftest*
13290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13291   echo "$ac_t""yes" 1>&6
13292   { test "$extra_verbose" = "yes" && cat << \EOF
13293     Defining NLIST_STRUCT
13294 EOF
13295 cat >> confdefs.h <<\EOF
13296 #define NLIST_STRUCT 1
13297 EOF
13298 }
13299
13300 else
13301   echo "$ac_t""no" 1>&6
13302 fi
13303
13304
13305
13306 echo "checking "for sound support"" 1>&6
13307 echo "configure:13308: checking "for sound support"" >&5
13308 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13309
13310 if test "$with_native_sound" != "no"; then
13311     if test -n "$native_sound_lib"; then
13312     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13313 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13314 echo "configure:13315: checking for multimedia/audio_device.h" >&5
13315
13316 cat > conftest.$ac_ext <<EOF
13317 #line 13318 "configure"
13318 #include "confdefs.h"
13319 #include <multimedia/audio_device.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 sound_cflags=""
13338       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13339    echo "    xemacs will be linked with \"sunplay.o\""
13340  fi
13341 else
13342   echo "$ac_t""no" 1>&6
13343 fi
13344
13345   fi
13346
13347     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13348     if test -d "/usr/demo/SOUND/include/multimedia"; then
13349       sun_sound_cflags="-I/usr/demo/SOUND/include"
13350     elif test -d "/usr/demo/SOUND/multimedia"; then
13351       sun_sound_cflags="-I/usr/demo/SOUND"
13352     fi
13353
13354     if test -n "$native_sound_lib"; then
13355       sun_sound_lib="$native_sound_lib"
13356     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13357       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13358     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13359       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13360     fi
13361
13362     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13363       native_sound_lib="$sun_sound_lib"
13364       sound_cflags="$sun_sound_cflags"
13365       sound_found=yes
13366       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13367    echo "    xemacs will be linked with \"sunplay.o\""
13368  fi
13369     fi
13370   fi
13371
13372     if test -z "$sound_found"; then
13373     case "$canonical" in
13374     *-sgi-* )
13375       if test -z "$native_sound_lib"; then
13376         
13377 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13378 echo "configure:13379: checking for ALopenport in -laudio" >&5
13379 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13380
13381 xe_check_libs=" -laudio "
13382 cat > conftest.$ac_ext <<EOF
13383 #line 13384 "configure"
13384 #include "confdefs.h"
13385 /* Override any gcc2 internal prototype to avoid an error.  */
13386 /* We use char because int might match the return type of a gcc2
13387     builtin and then its argument prototype would still apply.  */
13388 char ALopenport();
13389
13390 int main() {
13391 ALopenport()
13392 ; return 0; }
13393 EOF
13394 if { (eval echo configure:13395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13395   rm -rf conftest*
13396   eval "ac_cv_lib_$ac_lib_var=yes"
13397 else
13398   echo "configure: failed program was:" >&5
13399   cat conftest.$ac_ext >&5
13400   rm -rf conftest*
13401   eval "ac_cv_lib_$ac_lib_var=no"
13402 fi
13403 rm -f conftest*
13404 xe_check_libs=""
13405
13406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13407   echo "$ac_t""yes" 1>&6
13408   native_sound_lib="-laudio"
13409 else
13410   echo "$ac_t""no" 1>&6
13411 fi
13412
13413
13414       fi
13415       if test -n "$native_sound_lib"; then
13416         sound_found=yes sound_cflags=""
13417         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13418    echo "    xemacs will be linked with \"sgiplay.o\""
13419  fi
13420       fi ;;
13421     hppa*-hp-hpux* )
13422       if test -z "$native_sound_lib"; then
13423         
13424 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13425 echo "configure:13426: checking for AOpenAudio in -lAlib" >&5
13426 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13427
13428 xe_check_libs=" -lAlib "
13429 cat > conftest.$ac_ext <<EOF
13430 #line 13431 "configure"
13431 #include "confdefs.h"
13432 /* Override any gcc2 internal prototype to avoid an error.  */
13433 /* We use char because int might match the return type of a gcc2
13434     builtin and then its argument prototype would still apply.  */
13435 char AOpenAudio();
13436
13437 int main() {
13438 AOpenAudio()
13439 ; return 0; }
13440 EOF
13441 if { (eval echo configure:13442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13442   rm -rf conftest*
13443   eval "ac_cv_lib_$ac_lib_var=yes"
13444 else
13445   echo "configure: failed program was:" >&5
13446   cat conftest.$ac_ext >&5
13447   rm -rf conftest*
13448   eval "ac_cv_lib_$ac_lib_var=no"
13449 fi
13450 rm -f conftest*
13451 xe_check_libs=""
13452
13453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13454   echo "$ac_t""yes" 1>&6
13455   native_sound_lib="-lAlib"
13456 else
13457   echo "$ac_t""no" 1>&6
13458 fi
13459
13460
13461       fi
13462       if test -n "$native_sound_lib"; then
13463         sound_found=yes
13464         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13465    echo "    xemacs will be linked with \"hpplay.o\""
13466  fi
13467         if test "$GCC" = "yes" # Kludge city
13468           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13469           else sound_cflags="+e -I/usr/audio/examples"
13470         fi
13471       fi ;;
13472     esac
13473   fi
13474
13475     if test -z "$sound_found"; then
13476     if test "$with_msw" = "yes"; then
13477     sound_found=yes
13478     native_sound_lib=
13479     fi
13480   fi
13481
13482     if test -z "$sound_found"; then
13483     for dir in "machine" "sys" "linux"; do
13484       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13485 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13486 echo "configure:13487: checking for ${dir}/soundcard.h" >&5
13487
13488 cat > conftest.$ac_ext <<EOF
13489 #line 13490 "configure"
13490 #include "confdefs.h"
13491 #include <${dir}/soundcard.h>
13492 EOF
13493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13494 { (eval echo configure:13495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13496 if test -z "$ac_err"; then
13497   rm -rf conftest*
13498   eval "ac_cv_header_$ac_safe=yes"
13499 else
13500   echo "$ac_err" >&5
13501   echo "configure: failed program was:" >&5
13502   cat conftest.$ac_ext >&5
13503   rm -rf conftest*
13504   eval "ac_cv_header_$ac_safe=no"
13505 fi
13506 rm -f conftest*
13507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13508   echo "$ac_t""yes" 1>&6
13509   sound_found=yes
13510        need_miscplay=yes
13511         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13512    echo "    xemacs will be linked with \"linuxplay.o\""
13513  fi
13514         { test "$extra_verbose" = "yes" && cat << EOF
13515     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13516 EOF
13517 cat >> confdefs.h <<EOF
13518 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13519 EOF
13520 }
13521
13522         break
13523 else
13524   echo "$ac_t""no" 1>&6
13525 fi
13526
13527     done
13528   fi
13529
13530   test "$sound_found" = "yes" && with_native_sound=yes
13531 fi
13532
13533 if test "$with_native_sound" = "yes"; then
13534   { test "$extra_verbose" = "yes" && cat << \EOF
13535     Defining HAVE_NATIVE_SOUND
13536 EOF
13537 cat >> confdefs.h <<\EOF
13538 #define HAVE_NATIVE_SOUND 1
13539 EOF
13540 }
13541
13542   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13543 fi
13544
13545 if test "$with_nas_sound" != "no"; then
13546   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13547 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13548 echo "configure:13549: checking for audio/audiolib.h" >&5
13549
13550 cat > conftest.$ac_ext <<EOF
13551 #line 13552 "configure"
13552 #include "confdefs.h"
13553 #include <audio/audiolib.h>
13554 EOF
13555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13556 { (eval echo configure:13557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13558 if test -z "$ac_err"; then
13559   rm -rf conftest*
13560   eval "ac_cv_header_$ac_safe=yes"
13561 else
13562   echo "$ac_err" >&5
13563   echo "configure: failed program was:" >&5
13564   cat conftest.$ac_ext >&5
13565   rm -rf conftest*
13566   eval "ac_cv_header_$ac_safe=no"
13567 fi
13568 rm -f conftest*
13569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13570   echo "$ac_t""yes" 1>&6
13571   
13572     
13573 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13574 echo "configure:13575: checking for AuOpenServer in -laudio" >&5
13575 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13576
13577 xe_check_libs=" -laudio "
13578 cat > conftest.$ac_ext <<EOF
13579 #line 13580 "configure"
13580 #include "confdefs.h"
13581 /* Override any gcc2 internal prototype to avoid an error.  */
13582 /* We use char because int might match the return type of a gcc2
13583     builtin and then its argument prototype would still apply.  */
13584 char AuOpenServer();
13585
13586 int main() {
13587 AuOpenServer()
13588 ; return 0; }
13589 EOF
13590 if { (eval echo configure:13591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13591   rm -rf conftest*
13592   eval "ac_cv_lib_$ac_lib_var=yes"
13593 else
13594   echo "configure: failed program was:" >&5
13595   cat conftest.$ac_ext >&5
13596   rm -rf conftest*
13597   eval "ac_cv_lib_$ac_lib_var=no"
13598 fi
13599 rm -f conftest*
13600 xe_check_libs=""
13601
13602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13603   echo "$ac_t""yes" 1>&6
13604   have_nas_sound=yes
13605 else
13606   echo "$ac_t""no" 1>&6
13607 fi
13608
13609
13610 else
13611   echo "$ac_t""no" 1>&6
13612 fi
13613
13614   if test "$have_nas_sound" = "yes"; then
13615     with_nas_sound=yes
13616     { test "$extra_verbose" = "yes" && cat << \EOF
13617     Defining HAVE_NAS_SOUND
13618 EOF
13619 cat >> confdefs.h <<\EOF
13620 #define HAVE_NAS_SOUND 1
13621 EOF
13622 }
13623
13624     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13625    echo "    xemacs will be linked with \"nas.o\""
13626  fi
13627     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13628             cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 #include <audio/Xtutil.h>
13632 EOF
13633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13634   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13635   :
13636 else
13637   rm -rf conftest*
13638   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13639     Defining NAS_NO_ERROR_JUMP
13640 EOF
13641 cat >> confdefs.h <<\EOF
13642 #define NAS_NO_ERROR_JUMP 1
13643 EOF
13644 }
13645
13646 fi
13647 rm -f conftest*
13648
13649   else
13650     test "$with_nas_sound" = "yes" && \
13651       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13652     with_nas_sound=no
13653   fi
13654 fi
13655
13656 if test "$with_esd_sound" != "no"; then
13657   # Extract the first word of "esd-config", so it can be a program name with args.
13658 set dummy esd-config; ac_word=$2
13659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13660 echo "configure:13661: checking for $ac_word" >&5
13661
13662 if test -n "$have_esd_config"; then
13663   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13664 else
13665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13666   ac_dummy="$PATH"
13667   for ac_dir in $ac_dummy; do
13668     test -z "$ac_dir" && ac_dir=.
13669     if test -f $ac_dir/$ac_word; then
13670       ac_cv_prog_have_esd_config="yes"
13671       break
13672     fi
13673   done
13674   IFS="$ac_save_ifs"
13675   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13676 fi
13677 have_esd_config="$ac_cv_prog_have_esd_config"
13678 if test -n "$have_esd_config"; then
13679   echo "$ac_t""$have_esd_config" 1>&6
13680 else
13681   echo "$ac_t""no" 1>&6
13682 fi
13683
13684   if test "$have_esd_config" = "yes"; then
13685     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13686     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
13687     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13688     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13689 echo "configure:13690: checking for esd_play_stream" >&5
13690
13691 cat > conftest.$ac_ext <<EOF
13692 #line 13693 "configure"
13693 #include "confdefs.h"
13694 /* System header to define __stub macros and hopefully few prototypes,
13695     which can conflict with char esd_play_stream(); below.  */
13696 #include <assert.h>
13697 /* Override any gcc2 internal prototype to avoid an error.  */
13698 /* We use char because int might match the return type of a gcc2
13699     builtin and then its argument prototype would still apply.  */
13700 char esd_play_stream();
13701
13702 int main() {
13703
13704 /* The GNU C library defines this for functions which it implements
13705     to always fail with ENOSYS.  Some functions are actually named
13706     something starting with __ and the normal name is an alias.  */
13707 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13708 choke me
13709 #else
13710 esd_play_stream();
13711 #endif
13712
13713 ; return 0; }
13714 EOF
13715 if { (eval echo configure:13716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13716   rm -rf conftest*
13717   eval "ac_cv_func_esd_play_stream=yes"
13718 else
13719   echo "configure: failed program was:" >&5
13720   cat conftest.$ac_ext >&5
13721   rm -rf conftest*
13722   eval "ac_cv_func_esd_play_stream=no"
13723 fi
13724 rm -f conftest*
13725
13726 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13727   echo "$ac_t""yes" 1>&6
13728   have_esd_sound=yes
13729 else
13730   echo "$ac_t""no" 1>&6
13731 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13732 fi
13733
13734   fi
13735
13736   if test "$have_esd_sound" = "yes"; then
13737     with_esd_sound=yes
13738     need_miscplay=yes
13739     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13740    echo "    xemacs will be linked with \"esd.o\""
13741  fi
13742     { test "$extra_verbose" = "yes" && cat << \EOF
13743     Defining HAVE_ESD_SOUND
13744 EOF
13745 cat >> confdefs.h <<\EOF
13746 #define HAVE_ESD_SOUND 1
13747 EOF
13748 }
13749
13750   else
13751     test "$with_esd_sound" = "yes" && \
13752       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13753     with_esd_sound=no
13754   fi
13755 fi
13756
13757 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13758    echo "    xemacs will be linked with \"miscplay.o\""
13759  fi
13760
13761
13762 test -z "$with_tty" && with_tty=yes
13763
13764 if test "$with_tty" = "yes"  ; then
13765   echo "checking for TTY-related features" 1>&6
13766 echo "configure:13767: checking for TTY-related features" >&5
13767   { test "$extra_verbose" = "yes" && cat << \EOF
13768     Defining HAVE_TTY
13769 EOF
13770 cat >> confdefs.h <<\EOF
13771 #define HAVE_TTY 1
13772 EOF
13773 }
13774
13775   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
13776    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\""
13777  fi
13778
13779     if test -z "$with_ncurses"; then
13780     
13781 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13782 echo "configure:13783: checking for tgetent in -lncurses" >&5
13783 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13784
13785 xe_check_libs=" -lncurses "
13786 cat > conftest.$ac_ext <<EOF
13787 #line 13788 "configure"
13788 #include "confdefs.h"
13789 /* Override any gcc2 internal prototype to avoid an error.  */
13790 /* We use char because int might match the return type of a gcc2
13791     builtin and then its argument prototype would still apply.  */
13792 char tgetent();
13793
13794 int main() {
13795 tgetent()
13796 ; return 0; }
13797 EOF
13798 if { (eval echo configure:13799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13799   rm -rf conftest*
13800   eval "ac_cv_lib_$ac_lib_var=yes"
13801 else
13802   echo "configure: failed program was:" >&5
13803   cat conftest.$ac_ext >&5
13804   rm -rf conftest*
13805   eval "ac_cv_lib_$ac_lib_var=no"
13806 fi
13807 rm -f conftest*
13808 xe_check_libs=""
13809
13810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13811   echo "$ac_t""yes" 1>&6
13812   with_ncurses=yes
13813 else
13814   echo "$ac_t""no" 1>&6
13815 with_ncurses=no
13816 fi
13817
13818
13819   fi
13820   if test "$with_ncurses" = "yes"; then
13821     { test "$extra_verbose" = "yes" && cat << \EOF
13822     Defining HAVE_NCURSES
13823 EOF
13824 cat >> confdefs.h <<\EOF
13825 #define HAVE_NCURSES 1
13826 EOF
13827 }
13828
13829     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13830 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13831 echo "configure:13832: checking for ncurses/curses.h" >&5
13832
13833 cat > conftest.$ac_ext <<EOF
13834 #line 13835 "configure"
13835 #include "confdefs.h"
13836 #include <ncurses/curses.h>
13837 EOF
13838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13839 { (eval echo configure:13840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13841 if test -z "$ac_err"; then
13842   rm -rf conftest*
13843   eval "ac_cv_header_$ac_safe=yes"
13844 else
13845   echo "$ac_err" >&5
13846   echo "configure: failed program was:" >&5
13847   cat conftest.$ac_ext >&5
13848   rm -rf conftest*
13849   eval "ac_cv_header_$ac_safe=no"
13850 fi
13851 rm -f conftest*
13852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13853   echo "$ac_t""yes" 1>&6
13854   curses_h_file=ncurses/curses.h
13855 else
13856   echo "$ac_t""no" 1>&6
13857 fi
13858
13859     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13860 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13861 echo "configure:13862: checking for ncurses/term.h" >&5
13862
13863 cat > conftest.$ac_ext <<EOF
13864 #line 13865 "configure"
13865 #include "confdefs.h"
13866 #include <ncurses/term.h>
13867 EOF
13868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13869 { (eval echo configure:13870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13871 if test -z "$ac_err"; then
13872   rm -rf conftest*
13873   eval "ac_cv_header_$ac_safe=yes"
13874 else
13875   echo "$ac_err" >&5
13876   echo "configure: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   rm -rf conftest*
13879   eval "ac_cv_header_$ac_safe=no"
13880 fi
13881 rm -f conftest*
13882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13883   echo "$ac_t""yes" 1>&6
13884   term_h_file=ncurses/term.h
13885 else
13886   echo "$ac_t""no" 1>&6
13887 fi
13888
13889     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13890    echo "    xemacs will be linked with \"terminfo.o\""
13891  fi
13892     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13893
13894     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13895                         save_c_switch_site="$c_switch_site"
13896       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13897       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13898 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13899 echo "configure:13900: checking for ncurses/curses.h" >&5
13900
13901 cat > conftest.$ac_ext <<EOF
13902 #line 13903 "configure"
13903 #include "confdefs.h"
13904 #include <ncurses/curses.h>
13905 EOF
13906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13907 { (eval echo configure:13908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13909 if test -z "$ac_err"; then
13910   rm -rf conftest*
13911   eval "ac_cv_header_$ac_safe=yes"
13912 else
13913   echo "$ac_err" >&5
13914   echo "configure: failed program was:" >&5
13915   cat conftest.$ac_ext >&5
13916   rm -rf conftest*
13917   eval "ac_cv_header_$ac_safe=no"
13918 fi
13919 rm -f conftest*
13920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13921   echo "$ac_t""yes" 1>&6
13922   curses_h_file=ncurses/curses.h
13923 else
13924   echo "$ac_t""no" 1>&6
13925 fi
13926
13927       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13928         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13929         else c_switch_site="$save_c_switch_site"
13930       fi
13931     fi
13932   else         if test "$have_terminfo" = "yes"; then
13933       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13934    echo "    xemacs will be linked with \"terminfo.o\""
13935  fi
13936       if test -n "$libs_termcap"; then
13937         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13938       else
13939         for lib in curses termlib termcap; do
13940           
13941 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13942 echo "configure:13943: checking for tgetent in -l$lib" >&5
13943 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13944
13945 xe_check_libs=" -l$lib "
13946 cat > conftest.$ac_ext <<EOF
13947 #line 13948 "configure"
13948 #include "confdefs.h"
13949 /* Override any gcc2 internal prototype to avoid an error.  */
13950 /* We use char because int might match the return type of a gcc2
13951     builtin and then its argument prototype would still apply.  */
13952 char tgetent();
13953
13954 int main() {
13955 tgetent()
13956 ; return 0; }
13957 EOF
13958 if { (eval echo configure:13959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13959   rm -rf conftest*
13960   eval "ac_cv_lib_$ac_lib_var=yes"
13961 else
13962   echo "configure: failed program was:" >&5
13963   cat conftest.$ac_ext >&5
13964   rm -rf conftest*
13965   eval "ac_cv_lib_$ac_lib_var=no"
13966 fi
13967 rm -f conftest*
13968 xe_check_libs=""
13969
13970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13971   echo "$ac_t""yes" 1>&6
13972   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13973 else
13974   echo "$ac_t""no" 1>&6
13975 fi
13976
13977
13978         done
13979       fi
13980     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13981                                 
13982 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13983 echo "configure:13984: checking for tgoto in -ltermcap" >&5
13984 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13985
13986 xe_check_libs=" -ltermcap "
13987 cat > conftest.$ac_ext <<EOF
13988 #line 13989 "configure"
13989 #include "confdefs.h"
13990 /* Override any gcc2 internal prototype to avoid an error.  */
13991 /* We use char because int might match the return type of a gcc2
13992     builtin and then its argument prototype would still apply.  */
13993 char tgoto();
13994
13995 int main() {
13996 tgoto()
13997 ; return 0; }
13998 EOF
13999 if { (eval echo configure:14000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14000   rm -rf conftest*
14001   eval "ac_cv_lib_$ac_lib_var=yes"
14002 else
14003   echo "configure: failed program was:" >&5
14004   cat conftest.$ac_ext >&5
14005   rm -rf conftest*
14006   eval "ac_cv_lib_$ac_lib_var=no"
14007 fi
14008 rm -f conftest*
14009 xe_check_libs=""
14010
14011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14012   echo "$ac_t""yes" 1>&6
14013     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14015   { test "$extra_verbose" = "yes" && cat << EOF
14016     Defining $ac_tr_lib
14017 EOF
14018 cat >> confdefs.h <<EOF
14019 #define $ac_tr_lib 1
14020 EOF
14021 }
14022
14023   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14024
14025 else
14026   echo "$ac_t""no" 1>&6
14027 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14028    echo "    xemacs will be linked with \"tparam.o\""
14029  fi
14030 fi
14031
14032
14033       else
14034         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14035    echo "    xemacs will be linked with \"tparam.o\""
14036  fi
14037       fi
14038                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
14039       if test -n "$libs_termcap"; then
14040         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14041       else
14042         
14043 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
14044 echo "configure:14045: checking for tgetent in -lcurses" >&5
14045 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
14046
14047 xe_check_libs=" -lcurses "
14048 cat > conftest.$ac_ext <<EOF
14049 #line 14050 "configure"
14050 #include "confdefs.h"
14051 /* Override any gcc2 internal prototype to avoid an error.  */
14052 /* We use char because int might match the return type of a gcc2
14053     builtin and then its argument prototype would still apply.  */
14054 char tgetent();
14055
14056 int main() {
14057 tgetent()
14058 ; return 0; }
14059 EOF
14060 if { (eval echo configure:14061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14061   rm -rf conftest*
14062   eval "ac_cv_lib_$ac_lib_var=yes"
14063 else
14064   echo "configure: failed program was:" >&5
14065   cat conftest.$ac_ext >&5
14066   rm -rf conftest*
14067   eval "ac_cv_lib_$ac_lib_var=no"
14068 fi
14069 rm -f conftest*
14070 xe_check_libs=""
14071
14072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14073   echo "$ac_t""yes" 1>&6
14074   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
14075 else
14076   echo "$ac_t""no" 1>&6
14077 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
14078 echo "configure:14079: checking for tgetent in -ltermcap" >&5
14079 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
14080
14081 xe_check_libs=" -ltermcap "
14082 cat > conftest.$ac_ext <<EOF
14083 #line 14084 "configure"
14084 #include "confdefs.h"
14085 /* Override any gcc2 internal prototype to avoid an error.  */
14086 /* We use char because int might match the return type of a gcc2
14087     builtin and then its argument prototype would still apply.  */
14088 char tgetent();
14089
14090 int main() {
14091 tgetent()
14092 ; return 0; }
14093 EOF
14094 if { (eval echo configure:14095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14095   rm -rf conftest*
14096   eval "ac_cv_lib_$ac_lib_var=yes"
14097 else
14098   echo "configure: failed program was:" >&5
14099   cat conftest.$ac_ext >&5
14100   rm -rf conftest*
14101   eval "ac_cv_lib_$ac_lib_var=no"
14102 fi
14103 rm -f conftest*
14104 xe_check_libs=""
14105
14106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14107   echo "$ac_t""yes" 1>&6
14108   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14109 else
14110   echo "$ac_t""no" 1>&6
14111 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14112    echo "    xemacs will be linked with \"termcap.o\""
14113  fi
14114 fi
14115
14116
14117 fi
14118
14119
14120       fi
14121     fi
14122   fi
14123   { test "$extra_verbose" = "yes" && cat << EOF
14124     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14125 EOF
14126 cat >> confdefs.h <<EOF
14127 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14128 EOF
14129 }
14130
14131   { test "$extra_verbose" = "yes" && cat << EOF
14132     Defining TERM_H_FILE = "${term_h_file-term.h}"
14133 EOF
14134 cat >> confdefs.h <<EOF
14135 #define TERM_H_FILE "${term_h_file-term.h}"
14136 EOF
14137 }
14138
14139
14140     if test "$with_gpm" != "no"; then
14141     ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14142 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14143 echo "configure:14144: checking for gpm.h" >&5
14144
14145 cat > conftest.$ac_ext <<EOF
14146 #line 14147 "configure"
14147 #include "confdefs.h"
14148 #include <gpm.h>
14149 EOF
14150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14151 { (eval echo configure:14152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14153 if test -z "$ac_err"; then
14154   rm -rf conftest*
14155   eval "ac_cv_header_$ac_safe=yes"
14156 else
14157   echo "$ac_err" >&5
14158   echo "configure: failed program was:" >&5
14159   cat conftest.$ac_ext >&5
14160   rm -rf conftest*
14161   eval "ac_cv_header_$ac_safe=no"
14162 fi
14163 rm -f conftest*
14164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14165   echo "$ac_t""yes" 1>&6
14166   
14167       
14168 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14169 echo "configure:14170: checking for Gpm_Open in -lgpm" >&5
14170 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14171
14172 xe_check_libs=" -lgpm "
14173 cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 /* Override any gcc2 internal prototype to avoid an error.  */
14177 /* We use char because int might match the return type of a gcc2
14178     builtin and then its argument prototype would still apply.  */
14179 char Gpm_Open();
14180
14181 int main() {
14182 Gpm_Open()
14183 ; return 0; }
14184 EOF
14185 if { (eval echo configure:14186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14186   rm -rf conftest*
14187   eval "ac_cv_lib_$ac_lib_var=yes"
14188 else
14189   echo "configure: failed program was:" >&5
14190   cat conftest.$ac_ext >&5
14191   rm -rf conftest*
14192   eval "ac_cv_lib_$ac_lib_var=no"
14193 fi
14194 rm -f conftest*
14195 xe_check_libs=""
14196
14197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14198   echo "$ac_t""yes" 1>&6
14199   have_gpm=yes
14200 else
14201   echo "$ac_t""no" 1>&6
14202 fi
14203
14204
14205 else
14206   echo "$ac_t""no" 1>&6
14207 fi
14208
14209     if test "$have_gpm" = "yes"; then
14210       with_gpm=yes
14211       { test "$extra_verbose" = "yes" && cat << \EOF
14212     Defining HAVE_GPM
14213 EOF
14214 cat >> confdefs.h <<\EOF
14215 #define HAVE_GPM 1
14216 EOF
14217 }
14218
14219       extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14220    echo "    xemacs will be linked with \"gpmevent.o\""
14221  fi
14222       LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14223     elif test "$with_gpm" = "yes"; then
14224       { echo "Error:" "GPM requested, but gpm.h or libgpm seems to be missing." >&2; exit 1; }
14225     else
14226       with_gpm=no
14227     fi
14228   fi
14229
14230 else   for feature in ncurses gpm; do
14231     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14232       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14233     fi
14234     eval "with_${feature}=no"
14235   done
14236 fi 
14237 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
14238    echo "    xemacs will be linked with \"event-unixoid.o\""
14239  fi
14240
14241
14242 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14243   != "no no no" && echo "checking for database support" 1>&6
14244 echo "configure:14245: checking for database support" >&5
14245
14246 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14247   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14248 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14249 echo "configure:14250: checking for ndbm.h" >&5
14250
14251 cat > conftest.$ac_ext <<EOF
14252 #line 14253 "configure"
14253 #include "confdefs.h"
14254 #include <ndbm.h>
14255 EOF
14256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14257 { (eval echo configure:14258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14259 if test -z "$ac_err"; then
14260   rm -rf conftest*
14261   eval "ac_cv_header_$ac_safe=yes"
14262 else
14263   echo "$ac_err" >&5
14264   echo "configure: failed program was:" >&5
14265   cat conftest.$ac_ext >&5
14266   rm -rf conftest*
14267   eval "ac_cv_header_$ac_safe=no"
14268 fi
14269 rm -f conftest*
14270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14271   echo "$ac_t""yes" 1>&6
14272   :
14273 else
14274   echo "$ac_t""no" 1>&6
14275
14276     test "$with_database_gdbm" = "yes" -o \
14277          "$with_database_dbm"  = "yes" && \
14278       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14279     with_database_gdbm=no with_database_dbm=no
14280 fi
14281
14282 fi
14283
14284 if test "$with_database_gdbm" != "no"; then
14285   
14286 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14287 echo "configure:14288: checking for dbm_open in -lgdbm" >&5
14288 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14289
14290 xe_check_libs=" -lgdbm "
14291 cat > conftest.$ac_ext <<EOF
14292 #line 14293 "configure"
14293 #include "confdefs.h"
14294 /* Override any gcc2 internal prototype to avoid an error.  */
14295 /* We use char because int might match the return type of a gcc2
14296     builtin and then its argument prototype would still apply.  */
14297 char dbm_open();
14298
14299 int main() {
14300 dbm_open()
14301 ; return 0; }
14302 EOF
14303 if { (eval echo configure:14304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14304   rm -rf conftest*
14305   eval "ac_cv_lib_$ac_lib_var=yes"
14306 else
14307   echo "configure: failed program was:" >&5
14308   cat conftest.$ac_ext >&5
14309   rm -rf conftest*
14310   eval "ac_cv_lib_$ac_lib_var=no"
14311 fi
14312 rm -f conftest*
14313 xe_check_libs=""
14314
14315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14316   echo "$ac_t""yes" 1>&6
14317   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14318 else
14319   echo "$ac_t""no" 1>&6
14320 if test "$with_database_gdbm" = "yes"; then
14321      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14322    fi
14323    with_database_gdbm=no
14324 fi
14325
14326
14327 fi
14328
14329 if test "$with_database_dbm" != "no"; then
14330   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14331 echo "configure:14332: checking for dbm_open" >&5
14332
14333 cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336 /* System header to define __stub macros and hopefully few prototypes,
14337     which can conflict with char dbm_open(); below.  */
14338 #include <assert.h>
14339 /* Override any gcc2 internal prototype to avoid an error.  */
14340 /* We use char because int might match the return type of a gcc2
14341     builtin and then its argument prototype would still apply.  */
14342 char dbm_open();
14343
14344 int main() {
14345
14346 /* The GNU C library defines this for functions which it implements
14347     to always fail with ENOSYS.  Some functions are actually named
14348     something starting with __ and the normal name is an alias.  */
14349 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14350 choke me
14351 #else
14352 dbm_open();
14353 #endif
14354
14355 ; return 0; }
14356 EOF
14357 if { (eval echo configure:14358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14358   rm -rf conftest*
14359   eval "ac_cv_func_dbm_open=yes"
14360 else
14361   echo "configure: failed program was:" >&5
14362   cat conftest.$ac_ext >&5
14363   rm -rf conftest*
14364   eval "ac_cv_func_dbm_open=no"
14365 fi
14366 rm -f conftest*
14367
14368 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14369   echo "$ac_t""yes" 1>&6
14370   with_database_dbm=yes libdbm=
14371 else
14372   echo "$ac_t""no" 1>&6
14373
14374     
14375 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14376 echo "configure:14377: checking for dbm_open in -ldbm" >&5
14377 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14378
14379 xe_check_libs=" -ldbm "
14380 cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383 /* Override any gcc2 internal prototype to avoid an error.  */
14384 /* We use char because int might match the return type of a gcc2
14385     builtin and then its argument prototype would still apply.  */
14386 char dbm_open();
14387
14388 int main() {
14389 dbm_open()
14390 ; return 0; }
14391 EOF
14392 if { (eval echo configure:14393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14393   rm -rf conftest*
14394   eval "ac_cv_lib_$ac_lib_var=yes"
14395 else
14396   echo "configure: failed program was:" >&5
14397   cat conftest.$ac_ext >&5
14398   rm -rf conftest*
14399   eval "ac_cv_lib_$ac_lib_var=no"
14400 fi
14401 rm -f conftest*
14402 xe_check_libs=""
14403
14404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14405   echo "$ac_t""yes" 1>&6
14406   with_database_dbm=yes libdbm=-ldbm
14407 else
14408   echo "$ac_t""no" 1>&6
14409 test "$with_database_dbm" = "yes" && \
14410         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14411       with_database_dbm=no
14412 fi
14413
14414
14415 fi
14416
14417 fi
14418
14419 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14420 test "$with_database_gdbm" = "yes" -o \
14421      "$with_database_dbm"  = "yes" && \
14422   { test "$extra_verbose" = "yes" && cat << \EOF
14423     Defining HAVE_DBM
14424 EOF
14425 cat >> confdefs.h <<\EOF
14426 #define HAVE_DBM 1
14427 EOF
14428 }
14429
14430
14431 if test "$with_database_berkdb" != "no"; then
14432   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14433 echo "configure:14434: checking for Berkeley db.h" >&5
14434   for header in "db/db.h" "db.h"; do
14435     case "$opsys" in
14436         *freebsd*)
14437     cat > conftest.$ac_ext <<EOF
14438 #line 14439 "configure"
14439 #include "confdefs.h"
14440
14441 #include <stdlib.h>
14442 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14443 #ifdef HAVE_INTTYPES_H
14444 #define __BIT_TYPES_DEFINED__
14445 #include <inttypes.h>
14446 #endif
14447 #endif
14448 #include <$header>
14449
14450 int main() {
14451
14452 ; return 0; }
14453 EOF
14454 if { (eval echo configure:14455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14455   rm -rf conftest*
14456   db_h_file="$header"; break
14457 else
14458   echo "configure: failed program was:" >&5
14459   cat conftest.$ac_ext >&5
14460 fi
14461 rm -f conftest*
14462         ;;
14463         *)
14464     cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467
14468 #include <stdlib.h>
14469 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14470 #ifdef HAVE_INTTYPES_H
14471 #define __BIT_TYPES_DEFINED__
14472 #include <inttypes.h>
14473 typedef uint8_t  u_int8_t;
14474 typedef uint16_t u_int16_t;
14475 typedef uint32_t u_int32_t;
14476 #ifdef WE_DONT_NEED_QUADS
14477 typedef uint64_t u_int64_t;
14478 #endif
14479 #endif
14480 #endif
14481 #include <$header>
14482
14483 int main() {
14484
14485 ; return 0; }
14486 EOF
14487 if { (eval echo configure:14488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14488   rm -rf conftest*
14489   db_h_file="$header"; break
14490 else
14491   echo "configure: failed program was:" >&5
14492   cat conftest.$ac_ext >&5
14493 fi
14494 rm -f conftest*
14495         ;;
14496         esac
14497   done
14498   if test -z "$db_h_file"
14499   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14500   else echo "$ac_t""$db_h_file" 1>&6
14501   fi
14502
14503   if test "$with_database_berkdb" != "no"; then
14504     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14505 echo "configure:14506: checking for Berkeley DB version" >&5
14506     cat > conftest.$ac_ext <<EOF
14507 #line 14508 "configure"
14508 #include "confdefs.h"
14509 #include <$db_h_file>
14510 #if DB_VERSION_MAJOR > 1
14511 yes
14512 #endif
14513
14514 EOF
14515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14516   egrep "yes" >/dev/null 2>&1; then
14517   rm -rf conftest*
14518   cat > conftest.$ac_ext <<EOF
14519 #line 14520 "configure"
14520 #include "confdefs.h"
14521 #include <$db_h_file>
14522 #if DB_VERSION_MAJOR > 2
14523 yes
14524 #endif
14525
14526 EOF
14527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14528   egrep "yes" >/dev/null 2>&1; then
14529   rm -rf conftest*
14530   echo "$ac_t""3" 1>&6; dbfunc=db_create
14531 else
14532   rm -rf conftest*
14533   
14534     echo "$ac_t""2" 1>&6; dbfunc=db_open
14535 fi
14536 rm -f conftest*
14537
14538 else
14539   rm -rf conftest*
14540   
14541     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14542 fi
14543 rm -f conftest*
14544
14545     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14546 echo "configure:14547: checking for $dbfunc" >&5
14547
14548 cat > conftest.$ac_ext <<EOF
14549 #line 14550 "configure"
14550 #include "confdefs.h"
14551 /* System header to define __stub macros and hopefully few prototypes,
14552     which can conflict with char $dbfunc(); below.  */
14553 #include <assert.h>
14554 /* Override any gcc2 internal prototype to avoid an error.  */
14555 /* We use char because int might match the return type of a gcc2
14556     builtin and then its argument prototype would still apply.  */
14557 char $dbfunc();
14558
14559 int main() {
14560
14561 /* The GNU C library defines this for functions which it implements
14562     to always fail with ENOSYS.  Some functions are actually named
14563     something starting with __ and the normal name is an alias.  */
14564 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14565 choke me
14566 #else
14567 $dbfunc();
14568 #endif
14569
14570 ; return 0; }
14571 EOF
14572 if { (eval echo configure:14573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14573   rm -rf conftest*
14574   eval "ac_cv_func_$dbfunc=yes"
14575 else
14576   echo "configure: failed program was:" >&5
14577   cat conftest.$ac_ext >&5
14578   rm -rf conftest*
14579   eval "ac_cv_func_$dbfunc=no"
14580 fi
14581 rm -f conftest*
14582
14583 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14584   echo "$ac_t""yes" 1>&6
14585   with_database_berkdb=yes need_libdb=no
14586 else
14587   echo "$ac_t""no" 1>&6
14588
14589     
14590 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14591 echo "configure:14592: checking for $dbfunc in -ldb" >&5
14592 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14593
14594 xe_check_libs=" -ldb "
14595 cat > conftest.$ac_ext <<EOF
14596 #line 14597 "configure"
14597 #include "confdefs.h"
14598 /* Override any gcc2 internal prototype to avoid an error.  */
14599 /* We use char because int might match the return type of a gcc2
14600     builtin and then its argument prototype would still apply.  */
14601 char $dbfunc();
14602
14603 int main() {
14604 $dbfunc()
14605 ; return 0; }
14606 EOF
14607 if { (eval echo configure:14608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14608   rm -rf conftest*
14609   eval "ac_cv_lib_$ac_lib_var=yes"
14610 else
14611   echo "configure: failed program was:" >&5
14612   cat conftest.$ac_ext >&5
14613   rm -rf conftest*
14614   eval "ac_cv_lib_$ac_lib_var=no"
14615 fi
14616 rm -f conftest*
14617 xe_check_libs=""
14618
14619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14620   echo "$ac_t""yes" 1>&6
14621   with_database_berkdb=yes need_libdb=yes
14622 else
14623   echo "$ac_t""no" 1>&6
14624 fi
14625
14626
14627 fi
14628
14629   fi
14630
14631   if test "$with_database_berkdb" = "yes"; then
14632     { test "$extra_verbose" = "yes" && cat << EOF
14633     Defining DB_H_FILE = "$db_h_file"
14634 EOF
14635 cat >> confdefs.h <<EOF
14636 #define DB_H_FILE "$db_h_file"
14637 EOF
14638 }
14639
14640     { test "$extra_verbose" = "yes" && cat << \EOF
14641     Defining HAVE_BERKELEY_DB
14642 EOF
14643 cat >> confdefs.h <<\EOF
14644 #define HAVE_BERKELEY_DB 1
14645 EOF
14646 }
14647
14648     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14649   else with_database_berkdb=no
14650   fi
14651 fi
14652
14653 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14654      != "no no no"; then
14655   { test "$extra_verbose" = "yes" && cat << \EOF
14656     Defining HAVE_DATABASE
14657 EOF
14658 cat >> confdefs.h <<\EOF
14659 #define HAVE_DATABASE 1
14660 EOF
14661 }
14662
14663   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14664    echo "    xemacs will be linked with \"database.o\""
14665  fi
14666   if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then
14667     { test "$extra_verbose" = "yes" && cat << \EOF
14668     Defining HAVE_CHISE
14669 EOF
14670 cat >> confdefs.h <<\EOF
14671 #define HAVE_CHISE 1
14672 EOF
14673 }
14674
14675   fi
14676 fi
14677
14678 if test "$with_socks" = "yes"; then
14679   
14680 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14681 echo "configure:14682: checking for SOCKSinit in -lsocks" >&5
14682 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14683
14684 xe_check_libs=" -lsocks "
14685 cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 /* Override any gcc2 internal prototype to avoid an error.  */
14689 /* We use char because int might match the return type of a gcc2
14690     builtin and then its argument prototype would still apply.  */
14691 char SOCKSinit();
14692
14693 int main() {
14694 SOCKSinit()
14695 ; return 0; }
14696 EOF
14697 if { (eval echo configure:14698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14698   rm -rf conftest*
14699   eval "ac_cv_lib_$ac_lib_var=yes"
14700 else
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   eval "ac_cv_lib_$ac_lib_var=no"
14705 fi
14706 rm -f conftest*
14707 xe_check_libs=""
14708
14709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14710   echo "$ac_t""yes" 1>&6
14711     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14712     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14713   { test "$extra_verbose" = "yes" && cat << EOF
14714     Defining $ac_tr_lib
14715 EOF
14716 cat >> confdefs.h <<EOF
14717 #define $ac_tr_lib 1
14718 EOF
14719 }
14720
14721   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14722
14723 else
14724   echo "$ac_t""no" 1>&6
14725 fi
14726
14727
14728   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14729     Defining HAVE_SOCKS
14730 EOF
14731 cat >> confdefs.h <<\EOF
14732 #define HAVE_SOCKS 1
14733 EOF
14734 }
14735
14736 fi
14737
14738 if test "$usage_tracking" = "yes"; then
14739   { test "$extra_verbose" = "yes" && cat << \EOF
14740     Defining USAGE_TRACKING
14741 EOF
14742 cat >> confdefs.h <<\EOF
14743 #define USAGE_TRACKING 1
14744 EOF
14745 }
14746
14747   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14748 fi
14749
14750 if test "$with_modules" != "no"; then
14751   echo "checking for module support" 1>&6
14752 echo "configure:14753: checking for module support" >&5
14753
14754     if test "$with_msw" = "yes"; then
14755     have_dl=yes;
14756   else
14757         case "$opsys" in
14758       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14759     Defining HAVE_DYLD
14760 EOF
14761 cat >> confdefs.h <<\EOF
14762 #define HAVE_DYLD 1
14763 EOF
14764 }
14765  ;;
14766       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14767 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14768 echo "configure:14769: checking for dlfcn.h" >&5
14769
14770 cat > conftest.$ac_ext <<EOF
14771 #line 14772 "configure"
14772 #include "confdefs.h"
14773 #include <dlfcn.h>
14774 EOF
14775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14776 { (eval echo configure:14777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14778 if test -z "$ac_err"; then
14779   rm -rf conftest*
14780   eval "ac_cv_header_$ac_safe=yes"
14781 else
14782   echo "$ac_err" >&5
14783   echo "configure: failed program was:" >&5
14784   cat conftest.$ac_ext >&5
14785   rm -rf conftest*
14786   eval "ac_cv_header_$ac_safe=no"
14787 fi
14788 rm -f conftest*
14789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14790   echo "$ac_t""yes" 1>&6
14791   
14792            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14793 echo "configure:14794: checking for dlopen in -lc" >&5
14794            cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797 #include <dlfcn.h>
14798 int main() {
14799               dlopen ("", 0);
14800 ; return 0; }
14801 EOF
14802 if { (eval echo configure:14803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14803   rm -rf conftest*
14804    have_dl=yes 
14805 else
14806   echo "configure: failed program was:" >&5
14807   cat conftest.$ac_ext >&5
14808   rm -rf conftest*
14809   
14810                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14811 echo "configure:14812: checking for dlopen in -ldl" >&5
14812                ac_save_LIBS="$LIBS"
14813                LIBS="-ldl $LIBS"
14814                cat > conftest.$ac_ext <<EOF
14815 #line 14816 "configure"
14816 #include "confdefs.h"
14817 #include <dlfcn.h>
14818 int main() {
14819                  dlopen ("", 0);
14820 ; return 0; }
14821 EOF
14822 if { (eval echo configure:14823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14823   rm -rf conftest*
14824    have_dl=yes 
14825 else
14826   echo "configure: failed program was:" >&5
14827   cat conftest.$ac_ext >&5
14828   rm -rf conftest*
14829   LIBS="$ac_save_LIBS"
14830 fi
14831 rm -f conftest*
14832                ac_save_LIBS=
14833 fi
14834 rm -f conftest*
14835 else
14836   echo "$ac_t""no" 1>&6
14837 fi
14838
14839         if test -n "$have_dl"; then
14840            { test "$extra_verbose" = "yes" && cat << \EOF
14841     Defining HAVE_DLOPEN
14842 EOF
14843 cat >> confdefs.h <<\EOF
14844 #define HAVE_DLOPEN 1
14845 EOF
14846 }
14847
14848         else
14849            
14850 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14851 echo "configure:14852: checking for shl_load in -ldld" >&5
14852 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14853
14854 xe_check_libs=" -ldld "
14855 cat > conftest.$ac_ext <<EOF
14856 #line 14857 "configure"
14857 #include "confdefs.h"
14858 /* Override any gcc2 internal prototype to avoid an error.  */
14859 /* We use char because int might match the return type of a gcc2
14860     builtin and then its argument prototype would still apply.  */
14861 char shl_load();
14862
14863 int main() {
14864 shl_load()
14865 ; return 0; }
14866 EOF
14867 if { (eval echo configure:14868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14868   rm -rf conftest*
14869   eval "ac_cv_lib_$ac_lib_var=yes"
14870 else
14871   echo "configure: failed program was:" >&5
14872   cat conftest.$ac_ext >&5
14873   rm -rf conftest*
14874   eval "ac_cv_lib_$ac_lib_var=no"
14875 fi
14876 rm -f conftest*
14877 xe_check_libs=""
14878
14879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14880   echo "$ac_t""yes" 1>&6
14881   libdl=dld have_dl=yes;
14882            { test "$extra_verbose" = "yes" && cat << \EOF
14883     Defining HAVE_SHL_LOAD
14884 EOF
14885 cat >> confdefs.h <<\EOF
14886 #define HAVE_SHL_LOAD 1
14887 EOF
14888 }
14889
14890 else
14891   echo "$ac_t""no" 1>&6
14892
14893 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14894 echo "configure:14895: checking for dld_init in -ldld" >&5
14895 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14896
14897 xe_check_libs=" -ldld "
14898 cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 /* Override any gcc2 internal prototype to avoid an error.  */
14902 /* We use char because int might match the return type of a gcc2
14903     builtin and then its argument prototype would still apply.  */
14904 char dld_init();
14905
14906 int main() {
14907 dld_init()
14908 ; return 0; }
14909 EOF
14910 if { (eval echo configure:14911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14911   rm -rf conftest*
14912   eval "ac_cv_lib_$ac_lib_var=yes"
14913 else
14914   echo "configure: failed program was:" >&5
14915   cat conftest.$ac_ext >&5
14916   rm -rf conftest*
14917   eval "ac_cv_lib_$ac_lib_var=no"
14918 fi
14919 rm -f conftest*
14920 xe_check_libs=""
14921
14922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14923   echo "$ac_t""yes" 1>&6
14924   libdl=dld have_dl=yes;
14925            { test "$extra_verbose" = "yes" && cat << \EOF
14926     Defining HAVE_DLD_INIT
14927 EOF
14928 cat >> confdefs.h <<\EOF
14929 #define HAVE_DLD_INIT 1
14930 EOF
14931 }
14932
14933 else
14934   echo "$ac_t""no" 1>&6
14935 fi
14936
14937
14938 fi
14939
14940
14941         fi
14942     ;;
14943     esac
14944   fi 
14945   if test -n "$have_dl"; then
14946         
14947 dll_ld=
14948 dll_ldflags=
14949 dll_cflags=
14950 dll_post=
14951 dll_ldo="-o"
14952 ld_dynamic_link_flags=
14953 xehost=$canonical
14954 xealias=$internal_configuration
14955
14956 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14957 echo "configure:14958: checking how to build dynamic libraries for ${xehost}" >&5
14958 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14959 case "$xehost" in
14960 *-*-linux-gnu*) ;;
14961 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14962 esac
14963
14964 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14965 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14966 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14967
14968 case "$xehost_os" in
14969 aix3*)
14970   # AIX sometimes has problems with the GCC collect2 program.  For some
14971   # reason, if we set the COLLECT_NAMES environment variable, the problems
14972   # vanish in a puff of smoke.
14973   if test "${COLLECT_NAMES+set}" != set; then
14974     COLLECT_NAMES=
14975     export COLLECT_NAMES
14976   fi
14977   ;;
14978 esac
14979
14980 # Now see if the compiler is really GCC.
14981 if test "$GCC" = "yes"; then
14982   XEGCC=yes
14983 else
14984   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14985 echo "configure:14986: checking checking whether we are using GNU C" >&5
14986   cat > conftest.$ac_ext <<EOF
14987 #line 14988 "configure"
14988 #include "confdefs.h"
14989
14990 #ifdef __GNUC__
14991   yes;
14992 #endif
14993
14994 EOF
14995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14996   egrep "yes" >/dev/null 2>&1; then
14997   rm -rf conftest*
14998   XEGCC=yes
14999 else
15000   rm -rf conftest*
15001   XEGCC=no
15002 fi
15003 rm -f conftest*
15004
15005   echo "$ac_t""${XEGCC}" 1>&6
15006 fi
15007
15008 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
15009 echo "configure:15010: checking how to produce PIC code" >&5
15010 wl=
15011
15012 can_build_shared=yes
15013 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15014   wl='-Wl,'
15015
15016   case "$xehost_os" in
15017   aix[3-9]* | irix[5-9]* | osf[3-9])
15018     # PIC is the default for these OSes.
15019     ;;
15020
15021   os2*)
15022     # We can build DLLs from non-PIC.
15023     ;;
15024   amigaos*)
15025     # FIXME: we need at least 68020 code to build shared libraries, but
15026     # adding the `-m68020' flag to GCC prevents building anything better,
15027     # like `-m68040'.
15028     dll_cflags='-m68020 -resident32 -malways-restore-a4'
15029     ;;
15030   *cygwin* | *mingw* )
15031     # PIC is the default
15032     ;;
15033   *)
15034     dll_cflags='-fPIC'
15035     ;;
15036   esac
15037 else
15038   # PORTME Check for PIC flags for the system compiler.
15039   case "$xehost_os" in
15040   hpux9* | hpux1[0-9]*)
15041     # Is there a better link_static_flag that works with the bundled CC?
15042     wl='-Wl,'
15043     dll_cflags='+Z'
15044     ;;
15045
15046   irix[5-9]*)
15047     wl='-Wl,'
15048     # PIC (with -KPIC) is the default.
15049     ;;
15050
15051   os2*)
15052     # We can build DLLs from non-PIC.
15053     ;;
15054
15055   osf[3-9]*)
15056     # All OSF/1 code is PIC.
15057     wl='-Wl,'
15058     ;;
15059
15060   aix[3-9]*)
15061     # All AIX code is PIC.
15062     wl='-Wl,'
15063     ;;
15064
15065   sco3.2v5*)
15066     dll_cflags='-belf -Kpic'
15067     wl='-Wl,'
15068     ;;
15069
15070   unixware*)
15071     dll_cflags="-KPIC"
15072     wl="-Wl,"
15073     ;;
15074
15075   sysv4*)
15076     dll_cflags="-KPIC"
15077     wl="-Wl,"
15078     ;;
15079
15080   sysv5*)
15081     dll_cflags="-KPIC"
15082     wl="-Wl,"
15083     ;;
15084
15085   solaris2*)
15086     dll_cflags='-KPIC'
15087     wl='-Wl,'
15088     ;;
15089
15090   sunos4*)
15091     dll_cflags='-PIC'
15092     wl='-Qoption ld '
15093     ;;
15094
15095   uts4*)
15096     dll_cflags='-pic'
15097     ;;
15098
15099   *)
15100     can_build_shared=no
15101     ;;
15102   esac
15103 fi
15104
15105 if test -n "$dll_cflags"; then
15106   echo "$ac_t""${dll_cflags}" 1>&6
15107
15108   # Check to make sure the dll_cflags actually works.
15109   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
15110 echo "configure:15111: checking if PIC flag ${dll_cflags} really works" >&5
15111   save_CFLAGS="$CFLAGS"
15112   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15113   cat > conftest.$ac_ext <<EOF
15114 #line 15115 "configure"
15115 #include "confdefs.h"
15116
15117 int main() {
15118 int x=0;
15119 ; return 0; }
15120 EOF
15121 if { (eval echo configure:15122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15122   rm -rf conftest*
15123   
15124     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15125     # reports no error.  So, we need to grep stderr for (Bundled).
15126     if grep '(Bundled)' config.log >/dev/null; then
15127       echo "$ac_t""no" 1>&6
15128       can_build_shared=no
15129       dll_cflags=
15130     else
15131       echo "$ac_t""yes" 1>&6
15132     fi
15133 else
15134   echo "configure: failed program was:" >&5
15135   cat conftest.$ac_ext >&5
15136   rm -rf conftest*
15137   echo "$ac_t""no" 1>&6
15138     can_build_shared=no
15139     dll_cflags=
15140 fi
15141 rm -f conftest*
15142   CFLAGS="$save_CFLAGS"
15143 else
15144   echo "$ac_t""none" 1>&6
15145 fi
15146
15147 if test "$can_build_shared" = "yes"; then
15148 cc_produces_so=no
15149 xldf=
15150 xcldf=
15151 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15152 echo "configure:15153: checking if C compiler can produce shared libraries" >&5
15153 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15154   xcldf="-shared"
15155   xldf="-shared"
15156 else # Not using GCC
15157   case "$xehost_os" in
15158     aix[3-9]*)
15159       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15160       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15161       ;;
15162
15163     freebsd2* | netbsd* | openbsd*)
15164       xldf="-Bshareable"
15165       xcldf="${wl}-Bshareable"
15166       ;;
15167
15168     freebsd3*)
15169       xcldf="-shared"
15170       ;;
15171
15172     hpux*)
15173       xldf="-b +s"
15174       xcldf="${wl}-b ${wl}+s"
15175       ;;
15176
15177     irix[5-9]* | osf[3-9]*)
15178       xcldf="${wl}-shared"
15179       xldf="-shared"
15180       ;;
15181
15182     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15183       xcldf="-G"
15184       xldf="-G"
15185       ;;
15186
15187     sunos4*)
15188       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15189       xldf="-assert pure-text -Bstatic"
15190       ;;
15191   esac
15192 fi # End if if we are using gcc
15193
15194 if test -n "$xcldf"; then
15195   save_LDFLAGS=$LDFLAGS
15196   save_LIBS=$LIBS
15197   save_xe_libs=$xe_libs
15198   LDFLAGS="$xcldf $LDFLAGS"
15199   LIBS=
15200   xe_libs=
15201   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15202   cat > conftest.$ac_ext <<EOF
15203 #line 15204 "configure"
15204 #include "confdefs.h"
15205
15206 int main() {
15207 int x=0;
15208 ; return 0; }
15209 EOF
15210 if { (eval echo configure:15211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15211   rm -rf conftest*
15212   cc_produces_so=yes
15213 else
15214   echo "configure: failed program was:" >&5
15215   cat conftest.$ac_ext >&5
15216   rm -rf conftest*
15217   cc_produces_so=no
15218 fi
15219 rm -f conftest*
15220   LDFLAGS=$save_LDFLAGS
15221   LIBS=$save_LIBS
15222   xe_libs=$save_xe_libs
15223   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15224 else
15225   cc_produces_so=no
15226 fi
15227 echo "$ac_t""${cc_produces_so}" 1>&6
15228
15229 LTLD=$LD
15230 if test -z "$LTLD"; then
15231   ac_prog=ld
15232   if test "$XEGCC" = yes; then
15233     # Check if gcc -print-prog-name=ld gives a path.
15234     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15235 echo "configure:15236: checking for ld used by GCC" >&5
15236     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15237     case "$ac_prog" in
15238     # Accept absolute paths.
15239     /*)
15240       if test -z "$LTLD"; then
15241 #        case "$ac_prog" in
15242 #          *gcc-lib*) LTLD="$CC"
15243 #                     ;;
15244 #          *)
15245          LTLD="$ac_prog"
15246 #                     ;;
15247 #        esac
15248       fi
15249       ;;
15250     "")
15251       # If it fails, then pretend we aren't using GCC.
15252       ac_prog=ld
15253       ;;
15254     *)
15255       # If it is relative, then search for the first ld in PATH.
15256       with_gnu_ld=unknown
15257       ;;
15258     esac
15259   else
15260     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15261 echo "configure:15262: checking for GNU ld" >&5
15262   fi
15263
15264   if test -z "$LTLD"; then
15265     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15266     for ac_dir in $PATH; do
15267       test -z "$ac_dir" && ac_dir=.
15268       if test -f "$ac_dir/$ac_prog"; then
15269         LTLD="$ac_dir/$ac_prog"
15270         # Check to see if the program is GNU ld.  I'd rather use --version,
15271         # but apparently some GNU ld's only accept -v.
15272         # Break only if it was the GNU/non-GNU ld that we prefer.
15273         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15274           xe_gnu_ld=yes
15275         else
15276           xe_gnu_ld=no
15277         fi
15278       fi
15279     done
15280     IFS="$ac_save_ifs"
15281   fi
15282
15283   if test -n "$LTLD"; then
15284     echo "$ac_t""${LTLD}" 1>&6
15285   else
15286     echo "$ac_t""no" 1>&6
15287   fi
15288
15289   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15290     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15291     exit 1
15292   fi
15293 fi
15294
15295 ld_dynamic_link_flags=
15296
15297 # Check to see if it really is or isn't GNU ld.
15298 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15299 echo "configure:15300: checking if the linker is GNU ld" >&5
15300 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15301 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15302   xe_gnu_ld=yes
15303 else
15304   xe_gnu_ld=no
15305 fi
15306 echo "$ac_t""${xe_gnu_ld}" 1>&6
15307
15308 case "$xehost_os" in
15309   amigaos* | sunos4*)
15310     # On these operating systems, we should treat GNU ld like the system ld.
15311     gnu_ld_acts_native=yes
15312     ;;
15313   *)
15314     gnu_ld_acts_native=no
15315     ;;
15316 esac
15317
15318 if test "$cc_produces_so" = "yes"; then
15319   dll_ld=$CC
15320   dll_ldflags=$xcldf
15321   can_build_shared=yes
15322   ld_shlibs=yes
15323 else
15324   # OK - only NOW do we futz about with ld.
15325   # See if the linker supports building shared libraries.
15326   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15327 echo "configure:15328: checking whether the linker supports shared libraries" >&5
15328   dll_ld=$CC
15329   dll_ldflags=$LDFLAGS
15330   ld_shlibs=yes
15331   can_build_shared=yes
15332   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15333     # See if GNU ld supports shared libraries.
15334     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15335       dll_ld=$CC
15336       dll_ldflags="-shared"
15337       ld_shlibs=yes
15338     else
15339       ld_shlibs=no
15340     fi
15341   else
15342     # PORTME fill in a description of your system's linker (not GNU ld)
15343     case "$xehost_os" in
15344     aix3*)
15345       dll_ld=$LTLD
15346       dll_ldflags=$xldf
15347       ;;
15348
15349     aix[4-9]*)
15350       dll_ldflags=$xcldf
15351       ;;
15352
15353     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15354     # support.  Future versions do this automatically, but an explicit c++rt0.o
15355     # doesn't break anything, and helps significantly (at the cost of a little
15356     # extra space).
15357     freebsd2.2*)
15358       dll_ld=$LTLD
15359       dll_ldflags=$xldf
15360       dll_post="/usr/lib/c++rt0.o"
15361       ;;
15362
15363     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15364     freebsd2*)
15365       dll_ld=$LTLD
15366       dll_ldflags="-Bshareable"
15367       ;;
15368
15369     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15370     freebsd3*)
15371       dll_ldflags="-shared"
15372       ;;
15373
15374     hpux*)
15375       dll_ld=$LTLD
15376       dll_ldflags=$xldf
15377       ;;
15378
15379     irix[5-9]*)
15380       dll_ld=$LTLD
15381       dll_ldflags=$xldf
15382       ;;
15383
15384     netbsd*)
15385       # Tested with NetBSD 1.2 ld
15386       dll_ld=$LTLD
15387       dll_ldflags=$xldf
15388       ;;
15389
15390     openbsd*)
15391       dll_ld=$LTLD
15392       dll_ldflags=$xldf
15393       ;;
15394
15395     osf3* | osf4*)
15396       dll_ld=$LTLD
15397       dll_ldflags=$xldf
15398       ;;
15399
15400     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15401     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15402       dll_ld=$LTLD
15403       case "$dll_ld" in
15404         *gcc*) dll_ldflags="-shared"
15405                dll_ld=$CC
15406                ;;
15407         *)     dll_ldflags="-G"
15408                ;;
15409       esac
15410       ;;
15411
15412     sunos4*)
15413       if test "$XEGCC" = yes; then
15414         dll_ld=$CC
15415       else
15416         dll_ld=$LTLD
15417       fi
15418       dll_ldflags=$xldf
15419       ;;
15420
15421     uts4*)
15422       dll_ld=$LTLD
15423       dll_ldflags="-G"
15424       ;;
15425
15426     bsdi*)
15427       dll_ldflags="-r"
15428       dll_ld="shlicc2"
15429       ;;
15430
15431     *)
15432       ld_shlibs=no
15433       can_build_shared=no
15434       ;;
15435     esac
15436   fi
15437   echo "$ac_t""${ld_shlibs}" 1>&6
15438   if test "$ld_shlibs" = "no"; then
15439     can_build_shared=no
15440   fi
15441 fi # End of if cc_produces_so = no
15442
15443
15444 if test "$xe_gnu_ld" = yes; then
15445   if test "$ld_shlibs" = yes; then
15446     ld_dynamic_link_flags="${wl}-export-dynamic"
15447   fi
15448 fi
15449
15450 if test -z "$ld_dynamic_link_flags"; then
15451   case "$xehost_os" in
15452   aix[3-9]*)
15453     ld_dynamic_link_flags=
15454     ;;
15455
15456   freebsd2.2*)
15457     ld_dynamic_link_flags=
15458     ;;
15459
15460   freebsd2*)
15461     ld_dynamic_link_flags=
15462     ;;
15463
15464   freebsd3*)
15465     ld_dynamic_link_flags=
15466     ;;
15467
15468   hpux*)
15469     ld_dynamic_link_flags="${wl}-E"
15470     ;;
15471
15472   irix[5-9]*)
15473     ld_dynamic_link_flags=
15474     ;;
15475
15476   netbsd*)
15477     ld_dynamic_link_flags=
15478     ;;
15479
15480   openbsd*)
15481     ld_dynamic_link_flags=
15482     ;;
15483
15484   osf3* | osf4*)
15485     ld_dynamic_link_flags=
15486     ;;
15487
15488   solaris2* | solaris7*)
15489     ld_dynamic_link_flags=
15490     ;;
15491
15492   sco3.2v5* | unixware* | sysv5* | sysv4*)
15493     ld_dynamic_link_flags="${wl}-Bexport"
15494     ;;
15495
15496   sunos4*)
15497     ld_dynamic_link_flags=
15498     ;;
15499
15500   uts4*)
15501     ld_dynamic_link_flags=
15502     ;;
15503
15504   bsdi*)
15505     ld_dynamic_link_flags=
15506     ;;
15507
15508   esac
15509 fi # End of if -z ld_dynamic_link_flags
15510 fi # End of if test "$can_build_shared" = "yes"
15511
15512
15513
15514
15515
15516
15517
15518
15519   fi
15520
15521   if test "$can_build_shared" = "yes"; then
15522     { test "$extra_verbose" = "yes" && cat << \EOF
15523     Defining HAVE_SHLIB
15524 EOF
15525 cat >> confdefs.h <<\EOF
15526 #define HAVE_SHLIB 1
15527 EOF
15528 }
15529
15530     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15531    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15532  fi
15533     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15534     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15535     for ac_func in dlerror _dlerror
15536 do
15537 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15538 echo "configure:15539: checking for $ac_func" >&5
15539
15540 cat > conftest.$ac_ext <<EOF
15541 #line 15542 "configure"
15542 #include "confdefs.h"
15543 /* System header to define __stub macros and hopefully few prototypes,
15544     which can conflict with char $ac_func(); below.  */
15545 #include <assert.h>
15546 /* Override any gcc2 internal prototype to avoid an error.  */
15547 /* We use char because int might match the return type of a gcc2
15548     builtin and then its argument prototype would still apply.  */
15549 char $ac_func();
15550
15551 int main() {
15552
15553 /* The GNU C library defines this for functions which it implements
15554     to always fail with ENOSYS.  Some functions are actually named
15555     something starting with __ and the normal name is an alias.  */
15556 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15557 choke me
15558 #else
15559 $ac_func();
15560 #endif
15561
15562 ; return 0; }
15563 EOF
15564 if { (eval echo configure:15565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15565   rm -rf conftest*
15566   eval "ac_cv_func_$ac_func=yes"
15567 else
15568   echo "configure: failed program was:" >&5
15569   cat conftest.$ac_ext >&5
15570   rm -rf conftest*
15571   eval "ac_cv_func_$ac_func=no"
15572 fi
15573 rm -f conftest*
15574
15575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15576   echo "$ac_t""yes" 1>&6
15577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15578   { test "$extra_verbose" = "yes" && cat << EOF
15579     Defining $ac_tr_func
15580 EOF
15581 cat >> confdefs.h <<EOF
15582 #define $ac_tr_func 1
15583 EOF
15584 }
15585  
15586 else
15587   echo "$ac_t""no" 1>&6
15588 fi
15589 done
15590
15591     with_modules=yes
15592   else
15593     if test "$with_modules" = "yes"; then
15594       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15595     else
15596       echo "configure: warning: "Module support cannot be provided."" 1>&2
15597     fi
15598     with_modules=no
15599   fi
15600 fi
15601
15602 cat > conftest.$ac_ext <<EOF
15603 #line 15604 "configure"
15604 #include "confdefs.h"
15605 int main(int c,char *v[]){return 0;}
15606 EOF
15607 if { (eval echo configure:15608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15608 then
15609   :
15610 else
15611   conftest_rc="$?"
15612   echo "configure: failed program was:" >&5
15613   cat conftest.$ac_ext >&5
15614   rm -fr conftest*
15615   
15616   echo ""
15617   echo "*** PANIC *** configure forgot how to build working executables!"
15618   echo ""
15619   echo "*** This is most commonly due to an unforeseen environment, causing"
15620   echo "*** configure to incorrectly compute the sequence of libraries to link."
15621   echo "*** Please examine the tail of config.log for runtime errors."
15622   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15623   echo "*** Often adding or removing explicit options in the configure"
15624   echo "*** invocation can work around this kind of problem.  If so, please"
15625   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15626   echo "***"
15627   echo "*** Other possible causes are inability to write to the file system"
15628   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15629   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15630   echo "*** necessary.  On other systems, try telling configure where to find"
15631   echo "*** the shared libraries using the --site-runtime-libraries option."
15632   echo "***"
15633   echo "*** Another way to shoot yourself in the foot is to specify"
15634   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15635   echo "*** system.  Don't do that."
15636   exit 1
15637 fi
15638 rm -fr conftest*
15639
15640 if test "$win32_processes" = "yes"; then
15641   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15642    echo "    xemacs will be linked with \"process-nt.o\""
15643  fi
15644 else
15645   { test "$extra_verbose" = "yes" && cat << \EOF
15646     Defining HAVE_UNIX_PROCESSES
15647 EOF
15648 cat >> confdefs.h <<\EOF
15649 #define HAVE_UNIX_PROCESSES 1
15650 EOF
15651 }
15652
15653   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15654    echo "    xemacs will be linked with \"process-unix.o\""
15655  fi
15656 fi
15657
15658
15659
15660 T=""
15661 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15662 CFLAGS="$T"
15663
15664
15665 T=""
15666 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15667 extra_objs="$T"
15668
15669
15670 T=""
15671 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
15672 c_switch_general="$T"
15673
15674
15675 T=""
15676 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
15677 c_switch_window_system="$T"
15678
15679
15680 T=""
15681 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15682 c_switch_all="$T"
15683
15684
15685 T=""
15686 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
15687 ld_switch_general="$T"
15688
15689
15690 T=""
15691 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15692 ld_switch_window_system="$T"
15693
15694
15695 T=""
15696 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15697 ld_switch_all="$T"
15698
15699
15700 T=""
15701 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15702 ld_libs_general="$T"
15703
15704
15705 T=""
15706 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
15707 ld_libs_window_system="$T"
15708
15709
15710 T=""
15711 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15712 ld_libs_all="$T"
15713
15714
15715
15716 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15717 internal_makefile_list="Makefile.in"
15718 SUBDIR_MAKEFILES=''
15719 test -d lock || mkdir lock
15720 for dir in $MAKE_SUBDIR; do
15721   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15722         test -d "$d" || mkdir "$d"; cd "$d"
15723       done ) ;;
15724    * ) test -d "$dir" || mkdir "$dir" ;;
15725   esac
15726   
15727 T=""
15728 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15729 SUBDIR_MAKEFILES="$T"
15730
15731   
15732 T=""
15733 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15734 internal_makefile_list="$T"
15735
15736 done
15737
15738
15739
15740
15741 for dir in src/s src/m; do
15742   if test ! -d "$dir" ; then
15743     echo Making symbolic link to "$srcdir/$dir"
15744     ${LN_S} "$srcdir/$dir" "$dir"
15745   fi
15746 done
15747
15748 if test "$extra_verbose" = "yes"; then
15749   echo ""
15750   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
15751   echo ""
15752 fi
15753
15754
15755 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15756   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15757   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15758 fi
15759
15760 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15761   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15762   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15763 fi
15764
15765 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15766   test "$extra_verbose" = "yes" && echo "creating TAGS"
15767   echo "\f
15768 $srcdir/TAGS,include" > "TAGS"
15769 fi
15770
15771 if test "$__SUNPRO_C" = "yes"; then
15772   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15773   ( echo "# For use with Sun WorkShop's Source browser."
15774     echo "# See sbquery(1) and sbinit(4) for more information"
15775     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15776   ) > .sbinit
15777 fi
15778
15779 rm -f core
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800 PREFIX=$prefix
15801 while true; do
15802   case "$PREFIX" in
15803     *\$* ) eval "PREFIX=$PREFIX" ;;
15804     *) break ;;
15805   esac
15806 done
15807
15808
15809
15810
15811 EXEC_PREFIX=$exec_prefix
15812 while true; do
15813   case "$EXEC_PREFIX" in
15814     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15815     *) break ;;
15816   esac
15817 done
15818
15819
15820
15821
15822 INFODIR=$infodir
15823 while true; do
15824   case "$INFODIR" in
15825     *\$* ) eval "INFODIR=$INFODIR" ;;
15826     *) break ;;
15827   esac
15828 done
15829
15830
15831
15832
15833 INFOPATH=$infopath
15834 while true; do
15835   case "$INFOPATH" in
15836     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15837     *) break ;;
15838   esac
15839 done
15840
15841
15842
15843
15844 PACKAGE_PATH=$package_path
15845 while true; do
15846   case "$PACKAGE_PATH" in
15847     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15848     *) break ;;
15849   esac
15850 done
15851
15852
15853
15854
15855 LISPDIR=$lispdir
15856 while true; do
15857   case "$LISPDIR" in
15858     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15859     *) break ;;
15860   esac
15861 done
15862
15863
15864
15865
15866 MODULEDIR=$moduledir
15867 while true; do
15868   case "$MODULEDIR" in
15869     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15870     *) break ;;
15871   esac
15872 done
15873
15874
15875
15876
15877 SITELISPDIR=$sitelispdir
15878 while true; do
15879   case "$SITELISPDIR" in
15880     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15881     *) break ;;
15882   esac
15883 done
15884
15885
15886
15887
15888 SITEMODULEDIR=$sitemoduledir
15889 while true; do
15890   case "$SITEMODULEDIR" in
15891     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15892     *) break ;;
15893   esac
15894 done
15895
15896
15897
15898
15899 ETCDIR=$etcdir
15900 while true; do
15901   case "$ETCDIR" in
15902     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15903     *) break ;;
15904   esac
15905 done
15906
15907
15908
15909
15910 DOCDIR=$docdir
15911 while true; do
15912   case "$DOCDIR" in
15913     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15914     *) break ;;
15915   esac
15916 done
15917
15918
15919
15920
15921 ARCHLIBDIR=$archlibdir
15922 while true; do
15923   case "$ARCHLIBDIR" in
15924     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15925     *) break ;;
15926   esac
15927 done
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15949
15950
15951
15952
15953
15954
15955
15956 : ${XEMACS_CC:=$CC}
15957
15958
15959 if test "$with_prefix" = "yes"; then
15960   { test "$extra_verbose" = "yes" && cat << \EOF
15961     Defining PREFIX_USER_DEFINED
15962 EOF
15963 cat >> confdefs.h <<\EOF
15964 #define PREFIX_USER_DEFINED 1
15965 EOF
15966 }
15967
15968 fi
15969
15970 if test "$with_site_lisp" = "no"; then
15971   { test "$extra_verbose" = "yes" && cat << \EOF
15972     Defining INHIBIT_SITE_LISP
15973 EOF
15974 cat >> confdefs.h <<\EOF
15975 #define INHIBIT_SITE_LISP 1
15976 EOF
15977 }
15978
15979 fi
15980 if test "$with_site_modules" = "no"; then
15981   { test "$extra_verbose" = "yes" && cat << \EOF
15982     Defining INHIBIT_SITE_MODULES
15983 EOF
15984 cat >> confdefs.h <<\EOF
15985 #define INHIBIT_SITE_MODULES 1
15986 EOF
15987 }
15988
15989 fi
15990
15991
15992 T=""
15993 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15994 ac_configure_args="$T"
15995
15996 { test "$extra_verbose" = "yes" && cat << EOF
15997     Defining EMACS_CONFIGURATION = "$configuration"
15998 EOF
15999 cat >> confdefs.h <<EOF
16000 #define EMACS_CONFIGURATION "$configuration"
16001 EOF
16002 }
16003
16004 { test "$extra_verbose" = "yes" && cat << EOF
16005     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
16006 EOF
16007 cat >> confdefs.h <<EOF
16008 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
16009 EOF
16010 }
16011
16012
16013
16014 null_string=""
16015 { test "$extra_verbose" = "yes" && cat << EOF
16016     Defining LD_SWITCH_X_SITE = $null_string
16017 EOF
16018 cat >> confdefs.h <<EOF
16019 #define LD_SWITCH_X_SITE $null_string
16020 EOF
16021 }
16022
16023 { test "$extra_verbose" = "yes" && cat << EOF
16024     Defining LD_SWITCH_X_SITE_AUX = $null_string
16025 EOF
16026 cat >> confdefs.h <<EOF
16027 #define LD_SWITCH_X_SITE_AUX $null_string
16028 EOF
16029 }
16030
16031 { test "$extra_verbose" = "yes" && cat << EOF
16032     Defining C_SWITCH_X_SITE = $null_string
16033 EOF
16034 cat >> confdefs.h <<EOF
16035 #define C_SWITCH_X_SITE $null_string
16036 EOF
16037 }
16038
16039 { test "$extra_verbose" = "yes" && cat << EOF
16040     Defining LD_SWITCH_SITE = $null_string
16041 EOF
16042 cat >> confdefs.h <<EOF
16043 #define LD_SWITCH_SITE $null_string
16044 EOF
16045 }
16046
16047 { test "$extra_verbose" = "yes" && cat << EOF
16048     Defining C_SWITCH_SITE = $null_string
16049 EOF
16050 cat >> confdefs.h <<EOF
16051 #define C_SWITCH_SITE $null_string
16052 EOF
16053 }
16054
16055
16056
16057 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16058     Defining GNU_MALLOC
16059 EOF
16060 cat >> confdefs.h <<\EOF
16061 #define GNU_MALLOC 1
16062 EOF
16063 }
16064
16065 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16066     Defining USE_SYSTEM_MALLOC
16067 EOF
16068 cat >> confdefs.h <<\EOF
16069 #define USE_SYSTEM_MALLOC 1
16070 EOF
16071 }
16072
16073 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16074     Defining USE_DEBUG_MALLOC
16075 EOF
16076 cat >> confdefs.h <<\EOF
16077 #define USE_DEBUG_MALLOC 1
16078 EOF
16079 }
16080
16081                                               { test "$extra_verbose" = "yes" && cat << \EOF
16082     Defining USE_SYSTEM_MALLOC
16083 EOF
16084 cat >> confdefs.h <<\EOF
16085 #define USE_SYSTEM_MALLOC 1
16086 EOF
16087 }
16088
16089 fi
16090 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16091     Defining I18N3
16092 EOF
16093 cat >> confdefs.h <<\EOF
16094 #define I18N3 1
16095 EOF
16096 }
16097
16098 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16099     Defining USE_GCC
16100 EOF
16101 cat >> confdefs.h <<\EOF
16102 #define USE_GCC 1
16103 EOF
16104 }
16105
16106 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16107     Defining EXTERNAL_WIDGET
16108 EOF
16109 cat >> confdefs.h <<\EOF
16110 #define EXTERNAL_WIDGET 1
16111 EOF
16112 }
16113
16114 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16115     Defining QUICK_BUILD
16116 EOF
16117 cat >> confdefs.h <<\EOF
16118 #define QUICK_BUILD 1
16119 EOF
16120 }
16121
16122 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16123     Defining PURIFY
16124 EOF
16125 cat >> confdefs.h <<\EOF
16126 #define PURIFY 1
16127 EOF
16128 }
16129
16130 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16131     Defining QUANTIFY
16132 EOF
16133 cat >> confdefs.h <<\EOF
16134 #define QUANTIFY 1
16135 EOF
16136 }
16137
16138 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16139     Defining MAIL_USE_POP
16140 EOF
16141 cat >> confdefs.h <<\EOF
16142 #define MAIL_USE_POP 1
16143 EOF
16144 }
16145
16146 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16147     Defining KERBEROS
16148 EOF
16149 cat >> confdefs.h <<\EOF
16150 #define KERBEROS 1
16151 EOF
16152 }
16153
16154 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16155     Defining HESIOD
16156 EOF
16157 cat >> confdefs.h <<\EOF
16158 #define HESIOD 1
16159 EOF
16160 }
16161
16162 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16163     Defining USE_UNION_TYPE
16164 EOF
16165 cat >> confdefs.h <<\EOF
16166 #define USE_UNION_TYPE 1
16167 EOF
16168 }
16169
16170 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16171     Defining REGEX_MALLOC
16172 EOF
16173 cat >> confdefs.h <<\EOF
16174 #define REGEX_MALLOC 1
16175 EOF
16176 }
16177
16178 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16179     Defining PDUMP
16180 EOF
16181 cat >> confdefs.h <<\EOF
16182 #define PDUMP 1
16183 EOF
16184 }
16185
16186 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16187     Defining IPV6_CANONICALIZE
16188 EOF
16189 cat >> confdefs.h <<\EOF
16190 #define IPV6_CANONICALIZE 1
16191 EOF
16192 }
16193
16194
16195
16196 (
16197 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16198 else
16199   echo "uname -a: `uname -a`"
16200 fi
16201 echo ""
16202 echo "$0 $quoted_arguments"
16203 ) > Installation
16204
16205 if test ! -z ${emacs_beta_version} ; then
16206   if test -z "${emacs_is_beta}" ; then
16207         xemacs_betaname=".${emacs_beta_version}"
16208   else
16209         xemacs_betaname="-b${emacs_beta_version}"
16210   fi
16211 else
16212   xemacs_betaname=""
16213 fi
16214
16215 (
16216 echo "
16217
16218 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16219 "
16220 echo "
16221 Compilation / Installation:"
16222 echo "  Source code location:              $srcdir"
16223 echo "  Installation prefix:               $prefix"
16224 if test -n "$site_includes"; then
16225   echo "  Additional header files:           $site_includes"
16226 fi
16227 if test -n "$site_libraries"; then
16228   echo "  Additional libraries:              $site_libraries"
16229 fi
16230 if test -n "$site_prefixes"; then
16231   echo "  Additional prefixes:               $site_prefixes"
16232 fi
16233 if test -n "$runpath"; then
16234   echo "  Runtime library search path:       $runpath"
16235 fi
16236
16237 if test -n "$opsysfile"
16238 then echo "  Operating system description file: \`$opsysfile'"
16239 else echo "  Not using any operating system description file"
16240 fi
16241 if test -n "$machfile"
16242 then echo "  Machine description file:          \`$machfile'"
16243 else echo "  Not using any machine description file"
16244 fi
16245
16246 echo "  Compiler:                          $CC $CFLAGS"
16247 case "$CC" in
16248   gcc*) echo "  Compiler version:                  `$CC --version | head -1`"
16249         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | head -1`"
16250         ;;
16251   *) case "$canonical" in
16252         *-*-aix*   ) 
16253                   realcc=`which $CC`
16254                   if test -L $realcc ; then
16255             ccdir=`dirname $realcc`
16256             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16257                     case $ccprog in
16258                 */*) realcc=$ccprog;;
16259                 *) realcc=$ccdir/$ccprog;;
16260             esac
16261           fi
16262           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16263           if test ! -z "$lpp" ; then
16264             lppstr=`lslpp -Lqc $lpp`
16265             lpplev=`echo "$lppstr" | cut -f3 -d:`
16266             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16267           fi
16268           if test ! -z "$lpplev" ; then
16269             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16270           else
16271             echo "  Compiler version:                  (unknown version)"
16272           fi
16273         ;;
16274         
16275         *-*-solaris*)
16276           ccvers=`$CC -V 2>&1 | head -1`
16277           if test ! -z "$ccvers" ; then
16278             echo "  Compiler version:                  $ccvers"
16279           fi
16280         ;;
16281
16282         alpha*-dec-osf*)
16283           ccvers=`$CC -V | tr '\n' ' '`
16284           if test ! -z "$ccvers" ; then
16285             echo "  Compiler version:                  $ccvers"
16286           fi
16287         ;;
16288
16289         mips-sgi-irix*)
16290           ccvers=`$CC -version`
16291           if test ! -z "$ccvers" ; then
16292             echo "  Compiler version:                  $ccvers"
16293           fi
16294         ;;
16295
16296                 i[3-9]86-pc-linux)
16297           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16298           if test ! -z "$ccvers" ; then
16299             echo "  Compiler version:                  $ccvers"
16300           fi
16301         ;;
16302           
16303         *) echo "  Compiler version:                  $CC on $canonical";;
16304   esac
16305 esac
16306
16307 echo "  Relocating allocator for buffers:  $rel_alloc"
16308 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16309 case "$ld_switch_site" in
16310   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16311     - Consider configuring with --pdump." ;;
16312 esac
16313
16314 case "$canonical" in
16315         *-*-linux*) 
16316           if test -f /etc/redhat-release ; then
16317             echo "  libc:                              `rpm -q glibc`";
16318           else
16319             echo "Need to guess glibc1/2/etc here";
16320           fi
16321         ;;
16322
16323         *-*-aix*) 
16324           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16325         ;;
16326
16327         *-*-solaris*)
16328           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16329           echo "  libc:                              SUNWcsl $libc"
16330
16331         ;;
16332
16333         mips-sgi-irix*)
16334           echo "  IRIX version:                      `uname -sRm`'"
16335         ;;
16336           
16337
16338         alpha*-dec-osf*)
16339                   (cd /usr/.smdb.;
16340                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16341                 echo "  libc:                              $libc"
16342                 
16343           )
16344         ;;
16345
16346         *) echo "  libc:                              system-provided libc on $canonical" ;;
16347 esac
16348
16349
16350 echo "
16351 Window System:"
16352 if test "$with_msw" = "yes"; then
16353   echo "  Compiling in support for the Microsoft window system."
16354 fi
16355 if test "$with_x11" = "yes"; then
16356   echo "  Compiling in support for the X window system:"
16357   echo "    - X Windows headers location:                 $x_includes"
16358   echo "    - X Windows libraries location:               $x_libraries"
16359   if test "$with_xauth" != yes; then
16360     echo "    - Xau (X authority) not available."
16361   fi
16362   if test "$with_xmu" != yes; then
16363     echo "    - Xmu library not available; substituting equivalent routines."
16364   fi
16365   if test "$with_wmcommand" != no; then
16366     echo "    - Handling WM_COMMAND properly."
16367   fi
16368 fi
16369 if test "$need_motif" = "yes" ; then
16370   echo "  Compiling in support for Motif."
16371   if test "$have_lesstif" = "yes"; then
16372     echo "    - Using LessTif implementation."
16373   fi
16374   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16375   echo "             You are likely to experience slow redisplay."
16376   echo "             You may need to install vendor patches to Motif."
16377   echo "             See PROBLEMS for more information."
16378 fi
16379 if test "$need_athena" = "yes"; then
16380   echo "  Compiling in support for the Athena widget set:"
16381   echo "    - Athena headers location:                    $athena_h_path"
16382   echo "    - Athena library to link:                     $athena_lib"
16383 fi
16384 case "$with_menubars" in
16385   gtk   ) echo "  Using GTK menubars."   ;;
16386   lucid ) echo "  Using Lucid menubars." ;;
16387   motif ) echo "  Using Motif menubars."
16388           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16389           echo "             We recommend using the Lucid menubar instead."
16390           echo "             Re-run configure with --with-menubars='lucid'." ;;
16391     msw ) echo "  Using MS-Windows menubars." ;;
16392 esac
16393 case "$with_scrollbars" in
16394   gtk    ) echo "  Using GTK scrollbars."        ;;
16395   lucid  ) echo "  Using Lucid scrollbars."      ;;
16396   motif  ) echo "  Using Motif scrollbars."      ;;
16397   athena ) echo "  Using Athena scrollbars."     ;;
16398      msw ) echo "  Using MS-Windows scrollbars." ;;
16399 esac
16400 case "$with_dialogs" in
16401   gtk    ) echo "  Using GTK dialog boxes." ;;
16402   motif  ) echo "  Using Motif dialog boxes."
16403            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16404              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16405              echo "             We recommend using the Athena dialog boxes instead."
16406              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16407              echo "             Read the PROBLEMS file for more information."
16408            fi; fi ;;
16409   athena ) echo "  Using Athena dialog boxes."     ;;
16410      msw ) echo "  Using MS-Windows dialog boxes." ;;
16411 esac
16412 case "$with_widgets" in
16413   gtk    ) echo "  Using GTK native widgets."        ;;
16414   motif  ) echo "  Using Motif native widgets."      ;;
16415   athena ) echo "  Using Athena native widgets."     ;;
16416      msw ) echo "  Using MS-Windows native widgets." ;;
16417 esac
16418 if test "$with_dragndrop" = yes; then
16419   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16420   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16421 fi
16422
16423 echo "
16424 TTY:"
16425 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16426 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16427
16428 echo "
16429 Images:"
16430 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16431 if test "$with_xpm" = yes; then
16432   echo "  Compiling in support for XPM  images."
16433 elif test "$with_x11" = yes; then
16434   echo "  WARNING: -----------------------------------------------------------"
16435   echo "  WARNING: Compiling without XPM image support."
16436   if test "$xpm_problem" != ""; then
16437     echo "  Reason: $xpm_problem"
16438   fi
16439   echo "  WARNING: You should strongly consider installing XPM."
16440   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16441   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16442   echo "  WARNING: -----------------------------------------------------------"
16443 fi
16444 if test "$with_png" = yes; then
16445   echo "  Compiling in support for PNG  images."
16446 elif test "$window_system" != "none"; then
16447   echo "  WARNING: -----------------------------------------------------------"
16448   echo "  WARNING: Compiling without PNG image support."
16449   if test "$png_problem" != ""; then
16450     echo "  Reason: $png_problem"
16451   fi
16452   echo "  WARNING: You should strongly consider installing the PNG libraries."
16453   echo "  WARNING: Otherwise certain images and glyphs may not display."
16454   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16455   echo "  WARNING: -----------------------------------------------------------"
16456 fi
16457 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16458 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16459 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16460
16461 echo "
16462 Sound:"
16463 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16464 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16465 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16466 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16467
16468 echo "
16469 Databases:"
16470 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16471 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16472 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16473 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16474 if test "$with_postgresql" = yes; then
16475   echo "  Compiling in support for PostgreSQL."
16476   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16477   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16478 fi
16479
16480 echo "
16481 Multiscriptization / Multilingualization / Internationalization:"
16482 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16483 test "$with_chise" = yes && echo "  Using CHISE (CHaracter Information Service Environment) support."
16484 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
16485 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
16486 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16487 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16488 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16489 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16490 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16491 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16492 if test "$with_wnn" = yes; then
16493   echo "  Compiling in support for the WNN input method on Mule."
16494   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16495 fi
16496 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16497
16498 echo "
16499 Mail:"
16500 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16501 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16502 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16503 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16504
16505 echo "
16506 Other Features:"
16507 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16508 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16509 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16510 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16511 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16512 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16513 if test "$use_union_type" = yes; then
16514   echo "  WARNING: ---------------------------------------------------------"
16515   echo "  Using the union type for Lisp_Objects."
16516   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16517   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16518   echo "  WARNING: ---------------------------------------------------------"
16519 fi
16520 if test "$use_regex_malloc" = no; then
16521   echo "  WARNING: -----------------------------------------------------------"
16522   echo "  Using alloca to allocate the failure stack."
16523   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16524   echo "  Do NOT use this build of XEmacs for ordinary work."
16525   echo "  WARNING: -----------------------------------------------------------"
16526 fi
16527 test "$pdump" = yes && echo "  Using the new portable dumper."
16528 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16529 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16530 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16531   != "no no no no no no"; then
16532   echo "  WARNING: ---------------------------------------------------------"
16533   echo "  WARNING: Compiling in support for runtime error checking."
16534   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16535   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16536   echo "  WARNING: ---------------------------------------------------------"
16537 fi
16538 echo ""
16539 ) | tee -a Installation
16540 echo ""
16541
16542
16543 # Remove any trailing slashes in these variables.
16544 test -n "$prefix" &&
16545   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16546 test -n "$exec_prefix" &&
16547   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16548
16549
16550 for file in $internal_makefile_list; do
16551   test "$file" = src/Makefile.in && \
16552     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16553   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16554 done
16555 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16556 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
16557
16558 trap '' 1 2 15
16559
16560 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16561
16562 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16563 # Let make expand exec_prefix.
16564 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16565
16566 # Any assignment to VPATH causes Sun make to only execute
16567 # the first set of double-colon rules, so remove it if not needed.
16568 # If there is a colon in the path, we need to keep it.
16569 if test "x$srcdir" = x.; then
16570   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16571 fi
16572
16573 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16574
16575 DEFS=-DHAVE_CONFIG_H
16576
16577 # Without the "./", some shells look in PATH for config.status.
16578 : ${CONFIG_STATUS=./config.status}
16579
16580 echo creating $CONFIG_STATUS
16581 rm -f $CONFIG_STATUS
16582 cat > $CONFIG_STATUS <<EOF
16583 #! /bin/sh
16584 # Generated automatically by configure.
16585 # Run this file to recreate the current configuration.
16586 # This directory was configured as follows,
16587 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16588 #
16589 # $0 $ac_configure_args
16590 #
16591 # Compiler output produced by configure, useful for debugging
16592 # configure, is in ./config.log if it exists.
16593
16594 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16595 for ac_option
16596 do
16597   case "\$ac_option" in
16598   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16599     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16600     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16601   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16602     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16603     exit 0 ;;
16604   -help | --help | --hel | --he | --h)
16605     echo "\$ac_cs_usage"; exit 0 ;;
16606   *) echo "\$ac_cs_usage"; exit 1 ;;
16607   esac
16608 done
16609
16610 ac_given_srcdir=$srcdir
16611 ac_given_INSTALL="$INSTALL"
16612
16613 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16614 EOF
16615 cat >> $CONFIG_STATUS <<EOF
16616
16617 # Protect against being on the right side of a sed subst in config.status.
16618 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16619  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16620 $ac_vpsub
16621 $extrasub
16622 s%@SHELL@%$SHELL%g
16623 s%@CFLAGS@%$CFLAGS%g
16624 s%@CPPFLAGS@%$CPPFLAGS%g
16625 s%@CXXFLAGS@%$CXXFLAGS%g
16626 s%@FFLAGS@%$FFLAGS%g
16627 s%@DEFS@%$DEFS%g
16628 s%@LDFLAGS@%$LDFLAGS%g
16629 s%@LIBS@%$LIBS%g
16630 s%@exec_prefix@%$exec_prefix%g
16631 s%@prefix@%$prefix%g
16632 s%@program_transform_name@%$program_transform_name%g
16633 s%@bindir@%$bindir%g
16634 s%@sbindir@%$sbindir%g
16635 s%@libexecdir@%$libexecdir%g
16636 s%@datadir@%$datadir%g
16637 s%@sysconfdir@%$sysconfdir%g
16638 s%@sharedstatedir@%$sharedstatedir%g
16639 s%@localstatedir@%$localstatedir%g
16640 s%@libdir@%$libdir%g
16641 s%@includedir@%$includedir%g
16642 s%@oldincludedir@%$oldincludedir%g
16643 s%@infodir@%$infodir%g
16644 s%@mandir@%$mandir%g
16645 s%@LN_S@%$LN_S%g
16646 s%@blddir@%$blddir%g
16647 s%@CC@%$CC%g
16648 s%@CPP@%$CPP%g
16649 s%@start_flags@%$start_flags%g
16650 s%@ld_switch_shared@%$ld_switch_shared%g
16651 s%@start_files@%$start_files%g
16652 s%@ld@%$ld%g
16653 s%@lib_gcc@%$lib_gcc%g
16654 s%@RANLIB@%$RANLIB%g
16655 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16656 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16657 s%@INSTALL_DATA@%$INSTALL_DATA%g
16658 s%@YACC@%$YACC%g
16659 s%@SET_MAKE@%$SET_MAKE%g
16660 s%@GTK_CONFIG@%$GTK_CONFIG%g
16661 s%@X_CFLAGS@%$X_CFLAGS%g
16662 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16663 s%@X_LIBS@%$X_LIBS%g
16664 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16665 s%@install_pp@%$install_pp%g
16666 s%@libs_xauth@%$libs_xauth%g
16667 s%@dnd_objs@%$dnd_objs%g
16668 s%@lwlib_objs@%$lwlib_objs%g
16669 s%@ALLOCA@%$ALLOCA%g
16670 s%@have_esd_config@%$have_esd_config%g
16671 s%@dll_ld@%$dll_ld%g
16672 s%@dll_cflags@%$dll_cflags%g
16673 s%@dll_ldflags@%$dll_ldflags%g
16674 s%@dll_post@%$dll_post%g
16675 s%@dll_ldo@%$dll_ldo%g
16676 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16677 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16678 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16679 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16680 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16681 s%@PROGNAME@%$PROGNAME%g
16682 s%@version@%$version%g
16683 s%@configuration@%$configuration%g
16684 s%@canonical@%$canonical%g
16685 s%@inststaticdir@%$inststaticdir%g
16686 s%@instvardir@%$instvardir%g
16687 s%@srcdir@%$srcdir%g
16688 s%@pkgdir@%$pkgdir%g
16689 s%@statedir@%$statedir%g
16690 s%@extra_includes@%$extra_includes%g
16691 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16692 s%@PREFIX@%$PREFIX%g
16693 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16694 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16695 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16696 s%@INFODIR@%$INFODIR%g
16697 s%@infopath@%$infopath%g
16698 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16699 s%@INFOPATH@%$INFOPATH%g
16700 s%@package_path@%$package_path%g
16701 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16702 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16703 s%@lispdir@%$lispdir%g
16704 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16705 s%@LISPDIR@%$LISPDIR%g
16706 s%@moduledir@%$moduledir%g
16707 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16708 s%@MODULEDIR@%$MODULEDIR%g
16709 s%@sitelispdir@%$sitelispdir%g
16710 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16711 s%@SITELISPDIR@%$SITELISPDIR%g
16712 s%@sitemoduledir@%$sitemoduledir%g
16713 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16714 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16715 s%@etcdir@%$etcdir%g
16716 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16717 s%@ETCDIR@%$ETCDIR%g
16718 s%@docdir@%$docdir%g
16719 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16720 s%@DOCDIR@%$DOCDIR%g
16721 s%@archlibdir@%$archlibdir%g
16722 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16723 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16724 s%@bitmapdir@%$bitmapdir%g
16725 s%@extra_objs@%$extra_objs%g
16726 s%@machfile@%$machfile%g
16727 s%@opsysfile@%$opsysfile%g
16728 s%@c_switch_general@%$c_switch_general%g
16729 s%@c_switch_window_system@%$c_switch_window_system%g
16730 s%@c_switch_all@%$c_switch_all%g
16731 s%@ld_switch_general@%$ld_switch_general%g
16732 s%@ld_switch_window_system@%$ld_switch_window_system%g
16733 s%@ld_switch_all@%$ld_switch_all%g
16734 s%@ld_libs_general@%$ld_libs_general%g
16735 s%@ld_libs_window_system@%$ld_libs_window_system%g
16736 s%@ld_libs_all@%$ld_libs_all%g
16737 s%@RECURSIVE_MAKE_ARGS@%$RECURSIVE_MAKE_ARGS%g
16738 s%@native_sound_lib@%$native_sound_lib%g
16739 s%@sound_cflags@%$sound_cflags%g
16740 s%@dynodump_arch@%$dynodump_arch%g
16741 s%@XEMACS_CC@%$XEMACS_CC%g
16742 s%@internal_makefile_list@%$internal_makefile_list%g
16743
16744 CEOF
16745 EOF
16746
16747 cat >> $CONFIG_STATUS <<\EOF
16748
16749 # Split the substitutions into bite-sized pieces for seds with
16750 # small command number limits, like on Digital OSF/1 and HP-UX.
16751 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16752 ac_file=1 # Number of current file.
16753 ac_beg=1 # First line for current file.
16754 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16755 ac_more_lines=:
16756 ac_sed_cmds=""
16757 while $ac_more_lines; do
16758   if test $ac_beg -gt 1; then
16759     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16760   else
16761     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16762   fi
16763   if test ! -s conftest.s$ac_file; then
16764     ac_more_lines=false
16765     rm -f conftest.s$ac_file
16766   else
16767     if test -z "$ac_sed_cmds"; then
16768       ac_sed_cmds="sed -f conftest.s$ac_file"
16769     else
16770       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16771     fi
16772     ac_file=`expr $ac_file + 1`
16773     ac_beg=$ac_end
16774     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16775   fi
16776 done
16777 if test -z "$ac_sed_cmds"; then
16778   ac_sed_cmds=cat
16779 fi
16780 EOF
16781
16782 cat >> $CONFIG_STATUS <<EOF
16783
16784 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16785 EOF
16786 cat >> $CONFIG_STATUS <<\EOF
16787 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16788   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16789   case "$ac_file" in
16790   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16791        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16792   *) ac_file_in="${ac_file}.in" ;;
16793   esac
16794
16795   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16796
16797   # Remove last slash and all that follows it.  Not all systems have dirname.
16798   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16799   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16800     # The file is in a subdirectory.
16801     test ! -d "$ac_dir" && mkdir "$ac_dir"
16802     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16803     # A "../" for each directory in $ac_dir_suffix.
16804     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16805   else
16806     ac_dir_suffix= ac_dots=
16807   fi
16808
16809   case "$ac_given_srcdir" in
16810   .)  srcdir=.
16811       if test -z "$ac_dots"; then top_srcdir=.
16812       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16813   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16814   *) # Relative path.
16815     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16816     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16817   esac
16818
16819   case "$ac_given_INSTALL" in
16820   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16821   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16822   esac
16823
16824   echo creating "$ac_file"
16825   rm -f "$ac_file"
16826   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16827   case "$ac_file" in
16828   *Makefile*) ac_comsub="1i\\
16829 # $configure_input" ;;
16830   *) ac_comsub= ;;
16831   esac
16832
16833   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16834   sed -e "$ac_comsub
16835 s%@configure_input@%$configure_input%g
16836 s%@srcdir@%$srcdir%g
16837 s%@top_srcdir@%$top_srcdir%g
16838 s%@INSTALL@%$INSTALL%g
16839 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16840 fi; done
16841 rm -f conftest.s*
16842
16843 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16844 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16845 #
16846 # ac_d sets the value in "#define NAME VALUE" lines.
16847 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16848 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16849 ac_dC='\3'
16850 ac_dD='%g'
16851 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16852 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16853 ac_uB='\([      ]\)%\1#\2define\3'
16854 ac_uC=' '
16855 ac_uD='\4%g'
16856 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16857 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16858 ac_eB='$%\1#\2define\3'
16859 ac_eC=' '
16860 ac_eD='%g'
16861
16862 if test "${CONFIG_HEADERS+set}" != set; then
16863 EOF
16864 cat >> $CONFIG_STATUS <<EOF
16865   CONFIG_HEADERS="src/config.h lwlib/config.h"
16866 EOF
16867 cat >> $CONFIG_STATUS <<\EOF
16868 fi
16869 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16870   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16871   case "$ac_file" in
16872   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16873        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16874   *) ac_file_in="${ac_file}.in" ;;
16875   esac
16876
16877   echo creating $ac_file
16878
16879   rm -f conftest.frag conftest.in conftest.out
16880   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16881   cat $ac_file_inputs > conftest.in
16882
16883 EOF
16884
16885 # Transform confdefs.h into a sed script conftest.vals that substitutes
16886 # the proper values into config.h.in to produce config.h.  And first:
16887 # Protect against being on the right side of a sed subst in config.status.
16888 # Protect against being in an unquoted here document in config.status.
16889 rm -f conftest.vals
16890 cat > conftest.hdr <<\EOF
16891 s/[\\&%]/\\&/g
16892 s%[\\$`]%\\&%g
16893 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16894 s%ac_d%ac_u%gp
16895 s%ac_u%ac_e%gp
16896 EOF
16897 sed -n -f conftest.hdr confdefs.h > conftest.vals
16898 rm -f conftest.hdr
16899
16900 # This sed command replaces #undef with comments.  This is necessary, for
16901 # example, in the case of _POSIX_SOURCE, which is predefined and required
16902 # on some systems where configure will not decide to define it.
16903 cat >> conftest.vals <<\EOF
16904 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16905 EOF
16906
16907 # Break up conftest.vals because some shells have a limit on
16908 # the size of here documents, and old seds have small limits too.
16909
16910 rm -f conftest.tail
16911 while :
16912 do
16913   ac_lines=`grep -c . conftest.vals`
16914   # grep -c gives empty output for an empty file on some AIX systems.
16915   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16916   # Write a limited-size here document to conftest.frag.
16917   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16918   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16919   echo 'CEOF
16920   sed -f conftest.frag conftest.in > conftest.out
16921   rm -f conftest.in
16922   mv conftest.out conftest.in
16923 ' >> $CONFIG_STATUS
16924   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16925   rm -f conftest.vals
16926   mv conftest.tail conftest.vals
16927 done
16928 rm -f conftest.vals
16929
16930 cat >> $CONFIG_STATUS <<\EOF
16931   rm -f conftest.frag conftest.h
16932   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16933   cat conftest.in >> conftest.h
16934   rm -f conftest.in
16935   if cmp -s $ac_file conftest.h 2>/dev/null; then
16936     echo "$ac_file is unchanged"
16937     rm -f conftest.h
16938   else
16939     # Remove last slash and all that follows it.  Not all systems have dirname.
16940       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16941       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16942       # The file is in a subdirectory.
16943       test ! -d "$ac_dir" && mkdir "$ac_dir"
16944     fi
16945     rm -f $ac_file
16946     mv conftest.h $ac_file
16947   fi
16948 fi; done
16949
16950 EOF
16951 cat >> $CONFIG_STATUS <<EOF
16952 CPP="$CPP"
16953  top_srcdir="$srcdir"
16954  MAKE_SUBDIR="$MAKE_SUBDIR"
16955
16956 EOF
16957 cat >> $CONFIG_STATUS <<\EOF
16958 for dir in . $MAKE_SUBDIR; do
16959   (
16960     cd $dir
16961     rm -f junk.c
16962     < Makefile.in \
16963       sed -e '/^# Generated/d' \
16964           -e 's%/\*\*/#.*%%' \
16965           -e 's/^ *# */#/' \
16966           -e '/^##/d' \
16967           -e '/^#/ {
16968 p
16969 d
16970 }'        \
16971           -e '/./ {
16972 s/\([\"]\)/\\\1/g
16973 s/^/"/
16974 s/$/"/
16975 }'  > junk.c;
16976
16977
16978
16979     echo creating $dir/Makefile
16980 $CPP -I. -I${top_srcdir}/src  junk.c \
16981   | sed -e 's/^\#.*//'          \
16982         -e 's/^[        ][      ]*$//'\
16983         -e 's/^ /       /'              \
16984         -e '/^[ \f]*$/d' \
16985         -e '/^\"/ {
16986         s/\\\([\"]\)/\1/g
16987         s/^[    ]*\"//
16988         s/\"[   ]*$//
16989 }' > Makefile.new
16990     chmod 444 Makefile.new
16991     mv -f Makefile.new Makefile
16992
16993     echo creating $dir/GNUmakefile
16994 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16995   | sed -e 's/^\#.*//'          \
16996         -e 's/^[        ][      ]*$//'\
16997         -e 's/^ /       /'              \
16998         -e '/^[ \f]*$/d' \
16999         -e '/^\"/ {
17000         s/\\\([\"]\)/\1/g
17001         s/^[    ]*\"//
17002         s/\"[   ]*$//
17003 }' > Makefile.new
17004     chmod 444 Makefile.new
17005     mv -f Makefile.new GNUmakefile
17006
17007     rm -f junk.c
17008   )
17009 done
17010
17011 sed < config.status >> lib-src/config.values \
17012   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
17013   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
17014   -e 's/^\([^ ]*\) $/\1 ""/' \
17015   -e 's/ 1$/ t/'
17016
17017
17018 exit 0
17019 EOF
17020 chmod +x $CONFIG_STATUS
17021 rm -fr confdefs* $ac_clean_files
17022 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1