Sync with r21-2-35.
[chise/xemacs-chise.git] / 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, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.13 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 SHELL=${CONFIG_SHELL-/bin/sh}
96 ac_max_here_lines=12
97
98 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
99
100 # File descriptor usage:
101 # 0 standard input
102 # 1 file creation
103 # 2 errors and warnings
104 # 3 some systems may open it to /dev/tty
105 # 4 used on the Kubota Titan
106 # 6 checking for... messages and results
107 # 5 compiler messages saved in config.log
108 if test "$silent" = yes; then
109   exec 6>/dev/null
110 else
111   exec 6>&1
112 fi
113 exec 5>./config.log
114
115 echo "\
116 This file contains any messages produced by compilers while
117 running configure, to aid debugging if configure makes a mistake.
118 " 1>&5
119
120 # Strip out --no-create and --no-recursion so they do not pile up.
121 # Also quote any args containing shell metacharacters.
122 ac_configure_args=
123 for ac_arg
124 do
125   case "$ac_arg" in
126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
127   | --no-cr | --no-c) ;;
128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
130   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
131   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
132   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
133   esac
134 done
135
136 # NLS nuisances.
137 # Only set these to C if already set.  These must not be set unconditionally
138 # because not all systems understand e.g. LANG=C (notably SCO).
139 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
140 # Non-C LC_CTYPE values break the ctype check.
141 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
142 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
143 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
144 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
145
146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
147 rm -rf conftest* confdefs.h
148 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
149 echo > confdefs.h
150
151 # A filename unique to this package, relative to the directory that
152 # configure is in, which we can look for to find out if srcdir is correct.
153 ac_unique_file=src/lisp.h
154
155 # Find the source files, if location was not specified.
156 if test -z "$srcdir"; then
157   ac_srcdir_defaulted=yes
158   # Try the directory containing this script, then its parent.
159   ac_prog=$0
160   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
161   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
162   srcdir=$ac_confdir
163   if test ! -r $srcdir/$ac_unique_file; then
164     srcdir=..
165   fi
166 else
167   ac_srcdir_defaulted=no
168 fi
169 if test ! -r $srcdir/$ac_unique_file; then
170   if test "$ac_srcdir_defaulted" = yes; then
171     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
172   else
173     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
174   fi
175 fi
176 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
177
178 # Prefer explicitly selected file to automatically selected ones.
179 if test -z "$CONFIG_SITE"; then
180   if test "x$prefix" != xNONE; then
181     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
182   else
183     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
184   fi
185 fi
186 for ac_site_file in $CONFIG_SITE; do
187   if test -r "$ac_site_file"; then
188     echo "loading site script $ac_site_file"
189     . "$ac_site_file"
190   fi
191 done
192
193
194 ac_ext=c
195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
197 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
198 ac_cpp='$CPP '"$xe_cppflags"
199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
201 cross_compiling=no
202
203 ac_exeext=
204 ac_objext=o
205 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
206   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
207   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
208     ac_n= ac_c='
209 ' ac_t='        '
210   else
211     ac_n=-n ac_c= ac_t=
212   fi
213 else
214   ac_n= ac_c='\c' ac_t=
215 fi
216
217
218 progname="`echo $0 | sed 's:^\./\./:\./:'`"
219
220
221 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
222 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
223
224 prefix='/usr/local'
225 exec_prefix='${prefix}'
226 bindir='${exec_prefix}/bin'
227 datadir='${prefix}/lib'
228 statedir='${prefix}/lib'
229 libdir='${exec_prefix}/lib'
230 mandir='${prefix}/man/man1'
231 inststaticdir='${PROGNAME}'
232 instvardir='${PROGNAME}-${version}'
233 infodir='${datadir}/${instvardir}/info'
234 infopath=''
235 install_pp=''
236 lispdir='${datadir}/${instvardir}/lisp'
237 moduledir='${datadir}/${instvardir}/${configuration}/modules'
238 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
239 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
240 pkgdir='${datadir}/${instvardir}/lisp'
241 package_path=''
242 etcdir='${datadir}/${instvardir}/etc'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_utf_2000   | \
346         with_text_coding| \
347         with_file_coding| \
348         with_canna      | \
349         with_wnn        | \
350         with_wnn6       | \
351         with_workshop   | \
352         with_sparcworks | \
353         with_tooltalk   | \
354         with_ldap       | \
355         with_postgresql | \
356         with_pop        | \
357         with_kerberos   | \
358         with_hesiod     | \
359         with_dnet       | \
360         with_infodock   | \
361         external_widget | \
362         verbose         | \
363         extra_verbose   | \
364         usage_tracking  | \
365         use_union_type  | \
366         pdump           | \
367         debug           | \
368         use_assertions  | \
369         memory_usage_stats | \
370         with_clash_detection | \
371         with_modules | \
372         quick_build )
373                   case "$val" in
374             y | ye | yes )      val=yes ;;
375             n | no )            val=no  ;;
376             * ) (echo "$progname: Usage error:"
377 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
378 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
379           esac
380           eval "$opt=\"$val\"" ;;
381
382
383                         srcdir          | \
384         compiler        | \
385         cflags          | \
386         cpp             | \
387         cppflags        | \
388         libs            | \
389         ldflags         | \
390         cache_file      | \
391         native_sound_lib| \
392         site_lisp       | \
393         x_includes      | \
394         x_libraries     | \
395         site_includes   | \
396         site_libraries  | \
397         site_prefixes   | \
398         site_runtime_libraries )
399                   if test "$valomitted" = "yes" ; then
400                     if test "$#" = 0 ; then
401               (echo "$progname: Usage error:"
402 echo " " "The \`--$optname' option requires a value."
403 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
404             fi
405             val="$1"; shift
406           fi
407           eval "$opt=\"$val\""
408         ;;
409
410                 rel_alloc | \
411         with_dlmalloc | \
412         with_debug_malloc  | use_debug_malloc | \
413         with_system_malloc | use_system_malloc )
414           case "$val" in
415             y | ye | yes )      val=yes ;;
416             n | no )            val=no  ;;
417             d | de | def | defa | defau | defaul | default ) val=default ;;
418             * ) (echo "$progname: Usage error:"
419 echo " " "The \`--$optname' option requires one of these values:
420   \`yes', \`no', or \`default'."
421 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
422           esac
423           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
424           eval "$opt=\"$val\""
425         ;;
426
427                 "with_database" )
428           with_database_berkdb=no
429           with_database_dbm=no
430           with_database_gdbm=no
431           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
432             case "$x" in
433               no ) ;;
434               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
435               d | db | dbm )                               with_database_dbm=yes    ;;
436               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
437               * ) (echo "$progname: Usage error:"
438 echo " " "The \`--$optname' option value
439   must be either \`no' or a comma-separated list
440   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
441 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
442             esac
443           done
444           if test "$with_database_dbm"  = "yes" -a \
445                   "$with_database_gdbm" = "yes"; then
446           (echo "$progname: Usage error:"
447 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
448   with the \`--$optname' option."
449 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
450           fi
451         ;;
452
453                 "with_sound" )
454                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
455             case "$x" in
456                       n | no | non | none ) new_sdefault=no ;;
457               a | al | all | both ) new_sdefault=yes ;;
458
459               native )       with_native_sound=yes ;;
460               nonative )     with_native_sound=no ;;
461
462               nas )          with_nas_sound=yes ;;
463               nonas )        with_nas_sound=no ;;
464
465               esd )          with_esd_sound=yes ;;
466               noesd )        with_esd_sound=no ;;
467
468               * ) bogus_sound=yes ;;
469             esac
470             if test "$bogus_sound" -o \
471                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
472                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
473                 (echo "$progname: Usage error:"
474 echo " " "Valid types for the \`--$optname' option are:
475   $types.
476 The default is to autodetect all sound support."
477 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
478             elif test -n "$new_sdefault" ; then
479                 with_native_sound=$new_sdefault
480                 with_nas_sound=$new_sdefault
481                 with_esd_sound=$new_sdefault
482                 new_sdefault=   # reset this
483             fi
484             sound_notfirst=true
485           done
486         ;;
487
488                         "with_athena" )
489           case "$val" in
490             xa | xaw )                    val=xaw    ;;
491             3 | 3d | xaw3d )              val=3d     ;;
492                         ne | nex | next | naxtaw)     val=next   ;;
493                         9 | 95 | xaw95 )              val=95     ;;
494             xp | xpm | xawxpm )           val=xpm    ;;
495             * ) (echo "$progname: Usage error:"
496 echo " " "The \`--$optname' option must have one of these values:
497   \`xaw', \`3d', \`next', \`95', or \`xpm'."
498 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
499           esac
500           eval "$opt=\"$val\""
501         ;;
502
503                 "with_xim" )
504           case "$val" in
505             y | ye | yes )                val=yes   ;;
506             n | no | non | none )         val=no    ;;
507             x | xl | xli | xlib )         val=xlib  ;;
508             m | mo | mot | moti | motif ) val=motif ;;
509             * ) (echo "$progname: Usage error:"
510 echo " " "The \`--$optname' option must have one of these values:
511   \`motif', \`xlib', \`yes', or \`no'."
512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
513           esac
514           eval "$opt=\"$val\""
515         ;;
516
517                 "mail_locking" )
518           case "$val" in
519             lockf )     val=lockf ;;
520             flock )     val=flock ;;
521             file | dot ) val=file  ;;
522             locking )   val=locking  ;;
523             * ) (echo "$progname: Usage error:"
524 echo " " "The \`--$optname' option must have one of these values:
525   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
526 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
527           esac
528           eval "$opt=\"$val\""
529         ;;
530
531                 "error_checking" )
532                           
533           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
534             case "$x" in
535                       n | no | non | none ) new_default=no ;;
536               a | al | all )        new_default=yes ;;
537
538               extents )       error_check_extents=yes ;;
539               noextents )     error_check_extents=no ;;
540
541               typecheck )     error_check_typecheck=yes ;;
542               notypecheck )   error_check_typecheck=no ;;
543
544               bufpos )        error_check_bufpos=yes ;;
545               nobufpos )      error_check_bufpos=no ;;
546
547               gc )            error_check_gc=yes ;;
548               nogc )          error_check_gc=no ;;
549
550               malloc )        error_check_malloc=yes ;;
551               nomalloc )      error_check_malloc=no ;;
552
553               byte_code )     error_check_byte_code=yes ;;
554               nobyte_code )   error_check_byte_code=no ;;
555
556               glyphs )     error_check_glyphs=yes ;;
557               noglyphs )   error_check_glyphs=no ;;
558
559               * ) bogus_error_check=yes ;;
560             esac
561             if test "$bogus_error_check" -o \
562                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
563                 if test "$error_check_default" = yes ; then
564                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
565                 else
566                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
567                 fi
568                 (echo "$progname: Usage error:"
569 echo " " "Valid types for the \`--$optname' option are:
570   $types."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
572             elif test -n "$new_default" ; then
573                 error_check_extents=$new_default
574                 error_check_typecheck=$new_default
575                 error_check_bufpos=$new_default
576                 error_check_gc=$new_default
577                 error_check_malloc=$new_default
578                 error_check_byte_code=$new_default
579                 error_check_glyphs=$new_default
580                 new_default=    # reset this
581             fi
582             echeck_notfirst=true
583           done
584         ;;
585
586                                 
587                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
588         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
589         archlibdir | docdir | package_path )
590                    if test "$valomitted" = "yes"; then
591              if test "$#" = 0; then
592                  (echo "$progname: Usage error:"
593 echo " " "The \`--$optname' option requires a value."
594 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
595              fi
596              val="$1"; shift
597            fi
598            eval "$opt=\"$val\""
599
600                            case "$opt" in
601                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
602     Defining EXEC_PREFIX_USER_DEFINED
603 EOF
604 cat >> confdefs.h <<\EOF
605 #define EXEC_PREFIX_USER_DEFINED 1
606 EOF
607 }
608  ;;
609              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
610     Defining LISPDIR_USER_DEFINED
611 EOF
612 cat >> confdefs.h <<\EOF
613 #define LISPDIR_USER_DEFINED 1
614 EOF
615 }
616  ;;
617              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
618     Defining SITELISPDIR_USER_DEFINED
619 EOF
620 cat >> confdefs.h <<\EOF
621 #define SITELISPDIR_USER_DEFINED 1
622 EOF
623 }
624  ;;
625              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
626     Defining MODULEDIR_USER_DEFINED
627 EOF
628 cat >> confdefs.h <<\EOF
629 #define MODULEDIR_USER_DEFINED 1
630 EOF
631 }
632  ;;
633              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
634     Defining ETCDIR_USER_DEFINED
635 EOF
636 cat >> confdefs.h <<\EOF
637 #define ETCDIR_USER_DEFINED 1
638 EOF
639 }
640  ;;
641              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
642     Defining INFODIR_USER_DEFINED
643 EOF
644 cat >> confdefs.h <<\EOF
645 #define INFODIR_USER_DEFINED 1
646 EOF
647 }
648  ;;
649              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
650     Defining INFOPATH_USER_DEFINED
651 EOF
652 cat >> confdefs.h <<\EOF
653 #define INFOPATH_USER_DEFINED 1
654 EOF
655 }
656  ;;
657              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
658     Defining PACKAGE_PATH_USER_DEFINED
659 EOF
660 cat >> confdefs.h <<\EOF
661 #define PACKAGE_PATH_USER_DEFINED 1
662 EOF
663 }
664  ;;
665              datadir )
666                 { test "$extra_verbose" = "yes" && cat << \EOF
667     Defining INFODIR_USER_DEFINED
668 EOF
669 cat >> confdefs.h <<\EOF
670 #define INFODIR_USER_DEFINED 1
671 EOF
672 }
673
674                 { test "$extra_verbose" = "yes" && cat << \EOF
675     Defining LISPDIR_USER_DEFINED
676 EOF
677 cat >> confdefs.h <<\EOF
678 #define LISPDIR_USER_DEFINED 1
679 EOF
680 }
681
682             { test "$extra_verbose" = "yes" && cat << \EOF
683     Defining MODULEDIR_USER_DEFINED
684 EOF
685 cat >> confdefs.h <<\EOF
686 #define MODULEDIR_USER_DEFINED 1
687 EOF
688 }
689
690                 { test "$extra_verbose" = "yes" && cat << \EOF
691     Defining ETCDIR_USER_DEFINED
692 EOF
693 cat >> confdefs.h <<\EOF
694 #define ETCDIR_USER_DEFINED 1
695 EOF
696 }
697  ;;
698              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
699     Defining DOCDIR_USER_DEFINED
700 EOF
701 cat >> confdefs.h <<\EOF
702 #define DOCDIR_USER_DEFINED 1
703 EOF
704 }
705  ;;
706              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
707     Defining ARCHLIBDIR_USER_DEFINED
708 EOF
709 cat >> confdefs.h <<\EOF
710 #define ARCHLIBDIR_USER_DEFINED 1
711 EOF
712 }
713  ;;
714            esac
715         ;;
716
717                 "no_create" ) ;;
718
719                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
720
721                 "with_menubars"   | \
722         "with_scrollbars" | \
723         "with_dialogs"    | \
724         "with_widgets" )
725           case "$val" in
726             l | lu | luc | luci | lucid )               val=lucid  ;;
727             m | mo | mot | moti | motif )               val=motif  ;;
728             a | at | ath | athe | athen | athena )      val=athena ;;
729             n | no | non | none )                       val=no     ;;
730             y | ye | yes )                              val=yes    ;;
731             * ) (echo "$progname: Usage error:"
732 echo " " "The \`--$optname' option must have one of these values:
733   \`lucid', \`motif', \`athena', \`yes', or \`no'."
734 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
735           esac
736           eval "$opt=\"$val\""
737         ;;
738
739                 "use_minimal_tagbits" | \
740         "use_indexed_lrecord_implementation" | \
741         "run_in_place"  | \
742         "const_is_losing" | \
743         "with_gnu_make" )
744           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
745         ;;
746
747                 * ) (echo "$progname: Usage error:"
748 echo " " "Unrecognized option: $arg"
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750
751       esac
752     ;;
753
754         *-*-*) configuration="$arg" ;;
755
756         *) (echo "$progname: Usage error:"
757 echo " " "Unrecognized argument: $arg"
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
759
760   esac
761 done
762
763
764 test -n "$cpp"      && CPP="$cpp"
765 test -n "$cppflags" && CPPFLAGS="$cppflags"
766 test -n "$libs"     && LIBS="$libs"
767 test -n "$ldflags"  && LDFLAGS="$ldflags"
768
769 eval set x "$quoted_arguments"; shift
770
771 test "$extra_verbose" = "yes" && verbose=yes
772
773 test -n "$with_x" && with_x11="$with_x"
774
775 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
776   test "$with_system_malloc" = "default" && with_system_malloc=yes
777 fi
778
779
780
781 if test "$with_cde $with_tooltalk" = "yes no"; then
782   (echo "$progname: Usage error:"
783 echo " " "--with-cde requires --with-tooltalk"
784 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
785 elif test "$with_tooltalk" = "no" ; then with_cde=no
786 elif test "$with_cde" = "yes"; then with_tooltalk=yes
787 fi
788
789
790 case "$srcdir" in
791
792     "" )
793     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
794       if test -f "$dir/src/lisp.h" -a \
795               -f "$dir/lisp/version.el" ; then
796         srcdir="$dir"
797         break
798       fi
799     done
800     if test -z "$srcdir" ; then
801       (echo "$progname: Usage error:"
802 echo " " "Neither the current directory nor its parent seem to
803   contain the XEmacs sources.  If you do not want to build XEmacs in its
804   source tree, you should run \`$progname' in the directory in which
805   you wish to build XEmacs, using the \`--srcdir' option to say where the
806   sources may be found."
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808     fi
809   ;;
810
811     * )
812     if test ! -f "$srcdir/src/lisp.h" -o \
813             ! -f "$srcdir/lisp/version.el" ; then
814       (echo "$progname: Usage error:"
815 echo " " "The directory specified with the \`--srcdir' option,
816   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
817   either run the \`$progname' script at the top of the XEmacs source
818   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
819 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
820     fi
821   ;;
822 esac
823
824 if test -z "$configuration"; then
825     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
826   if test -z "$configuration"; then
827     (echo "$progname: Usage error:"
828 echo " " "XEmacs has not been ported to this host type.
829 Try explicitly specifying the CONFIGURATION when rerunning configure."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831   fi
832 fi
833
834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
835 echo "configure:836: checking whether ln -s works" >&5
836
837 rm -f conftestdata
838 if ln -s X conftestdata 2>/dev/null
839 then
840   rm -f conftestdata
841   ac_cv_prog_LN_S="ln -s"
842 else
843   ac_cv_prog_LN_S=ln
844 fi
845 LN_S="$ac_cv_prog_LN_S"
846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
847   echo "$ac_t""yes" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852
853 for dir in lisp etc man info tests; do
854   if test ! -d "$dir" ; then
855     echo Making symbolic link to "$srcdir/$dir"
856     ${LN_S} "$srcdir/$dir" "$dir"
857   fi
858 done
859
860
861 absolute_pwd="`pwd`";
862 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
863 then blddir="$PWD"
864 else blddir="$absolute_pwd"; if test -d "/net"; then
865   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
866   blddir=`echo "$blddir" | \
867    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
868 fi
869 fi
870
871
872 case "$srcdir" in
873   /* ) ;;
874   .  ) srcdir="$blddir" ;;
875   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   srcdir=`echo "$srcdir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi ;;
880 esac
881
882 if test `pwd` != `sh -c cd $srcdir && pwd`  \
883    && test -f "$srcdir/src/config.h"; then
884   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
885    echo "   as a build directory right now; it has been configured in its own"
886    echo "   right.  To configure in another directory as well, you MUST"
887    echo "   use GNU make.  If you do not have GNU make, then you must"
888    echo "   now do \`make distclean' in $srcdir,"
889    echo "   and then run $progname again.") >&2
890   extrasub='/^VPATH[     ]*=/c\
891 vpath %.c $(srcdir)\
892 vpath %.h $(srcdir)\
893 vpath %.y $(srcdir)\
894 vpath %.l $(srcdir)\
895 vpath %.s $(srcdir)\
896 vpath %.in $(srcdir)'
897 fi
898
899 . "$srcdir/version.sh" || exit 1;
900 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
901 : "${extra_verbose=$beta}"
902 version="${emacs_major_version}.${emacs_minor_version}"
903 { test "$extra_verbose" = "yes" && cat << EOF
904     Defining EMACS_MAJOR_VERSION = $emacs_major_version
905 EOF
906 cat >> confdefs.h <<EOF
907 #define EMACS_MAJOR_VERSION $emacs_major_version
908 EOF
909 }
910
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MINOR_VERSION = $emacs_minor_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MINOR_VERSION $emacs_minor_version
916 EOF
917 }
918
919 if test -n "$emacs_beta_version" ; then
920   if test "$beta" = "yes"; then
921         version="${version}-b${emacs_beta_version}"
922         { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_BETA_VERSION = $emacs_beta_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_BETA_VERSION $emacs_beta_version
927 EOF
928 }
929
930   else
931         version="${version}.${emacs_beta_version}"
932         { test "$extra_verbose" = "yes" && cat << EOF
933     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
934 EOF
935 cat >> confdefs.h <<EOF
936 #define EMACS_PATCH_LEVEL $emacs_beta_version
937 EOF
938 }
939
940   fi
941 fi
942 { test "$extra_verbose" = "yes" && cat << EOF
943     Defining XEMACS_CODENAME = "$xemacs_codename"
944 EOF
945 cat >> confdefs.h <<EOF
946 #define XEMACS_CODENAME "$xemacs_codename"
947 EOF
948 }
949
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_VERSION = "$version"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_VERSION "$version"
955 EOF
956 }
957
958
959 if test "$with_infodock" = "yes"; then
960   if test ! -f ../../ID-INSTALL; then
961     echo "Cannot build InfoDock without InfoDock sources"
962     with_infodock=no
963   fi
964 fi
965
966 if test "$with_infodock" = "yes"; then
967       { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_MAJOR_VERSION $infodock_major_version
972 EOF
973 }
974
975   { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MINOR_VERSION $infodock_minor_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_BUILD_VERSION $infodock_build_version
988 EOF
989 }
990
991   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
992   PROGNAME=infodock
993   CPPFLAGS="$CPPFLAGS -DINFODOCK"
994 else
995   PROGNAME=xemacs
996 fi
997
998 { test "$extra_verbose" = "yes" && cat << EOF
999     Defining EMACS_PROGNAME = "$PROGNAME"
1000 EOF
1001 cat >> confdefs.h <<EOF
1002 #define EMACS_PROGNAME "$PROGNAME"
1003 EOF
1004 }
1005
1006
1007 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1008 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1009     Defining ERROR_CHECK_EXTENTS
1010 EOF
1011 cat >> confdefs.h <<\EOF
1012 #define ERROR_CHECK_EXTENTS 1
1013 EOF
1014 }
1015
1016 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1017     Defining ERROR_CHECK_TYPECHECK
1018 EOF
1019 cat >> confdefs.h <<\EOF
1020 #define ERROR_CHECK_TYPECHECK 1
1021 EOF
1022 }
1023
1024 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1025     Defining ERROR_CHECK_BUFPOS
1026 EOF
1027 cat >> confdefs.h <<\EOF
1028 #define ERROR_CHECK_BUFPOS 1
1029 EOF
1030 }
1031
1032 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1033     Defining ERROR_CHECK_GC
1034 EOF
1035 cat >> confdefs.h <<\EOF
1036 #define ERROR_CHECK_GC 1
1037 EOF
1038 }
1039
1040 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1041     Defining ERROR_CHECK_MALLOC
1042 EOF
1043 cat >> confdefs.h <<\EOF
1044 #define ERROR_CHECK_MALLOC 1
1045 EOF
1046 }
1047
1048 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1049     Defining ERROR_CHECK_BYTE_CODE
1050 EOF
1051 cat >> confdefs.h <<\EOF
1052 #define ERROR_CHECK_BYTE_CODE 1
1053 EOF
1054 }
1055
1056 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1057     Defining ERROR_CHECK_GLYPHS
1058 EOF
1059 cat >> confdefs.h <<\EOF
1060 #define ERROR_CHECK_GLYPHS 1
1061 EOF
1062 }
1063
1064 if test "${debug:=$beta}" = "yes"; then
1065   use_assertions=yes memory_usage_stats=yes
1066   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1067    echo "    xemacs will be linked with \"debug.o\""
1068  fi
1069   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1070    echo "    xemacs will be linked with \"tests.o\""
1071  fi
1072   { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining DEBUG_XEMACS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define DEBUG_XEMACS 1
1077 EOF
1078 }
1079
1080 fi
1081 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1082     Defining USE_ASSERTIONS
1083 EOF
1084 cat >> confdefs.h <<\EOF
1085 #define USE_ASSERTIONS 1
1086 EOF
1087 }
1088
1089 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining MEMORY_USAGE_STATS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define MEMORY_USAGE_STATS 1
1094 EOF
1095 }
1096
1097
1098
1099 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1100 echo "configure:1101: checking "host system type"" >&5
1101 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1102 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1103 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1104 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1105 echo "$ac_t""$configuration" 1>&6
1106
1107
1108
1109
1110
1111 machine='' opsys=''
1112
1113 case "$canonical" in
1114   sparc-*-*        ) machine=sparc ;;
1115   alpha*-*-*       ) machine=alpha ;;
1116   vax-*-*          ) machine=vax ;;
1117   mips-dec-*       ) machine=pmax ;;
1118   mips-sgi-irix6*  ) machine=iris6d ;;
1119   mips-sgi-*       ) machine=iris4d ;;
1120   mips*-linux      ) machine=mips ;;
1121   romp-ibm-*       ) machine=ibmrt ;;
1122   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1123   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1124   powerpc*-*       ) machine=powerpc ;;
1125   hppa-*-*         ) machine=hp800 ;;
1126   m88k-dg-*        ) machine=aviion ;;
1127   m68*-sony-*      ) machine=news ;;
1128   mips-sony-*      ) machine=news-risc ;;
1129   clipper-*        ) machine=clipper ;;
1130   arm*             ) machine=arm ;;
1131   ns32k-*          ) machine=ns32000 ;;
1132   s390-*           ) machine=s390 ;;
1133 esac
1134
1135 case "$canonical" in
1136   *-*-linux*    ) opsys=linux ;;
1137   *-*-netbsd*   ) opsys=netbsd ;;
1138   *-*-openbsd*  ) opsys=openbsd ;;
1139   *-*-nextstep* ) opsys=nextstep ;;
1140   *-*-vms       ) opsys=vms ;;
1141
1142     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1143   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1144   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1145   *-dec-osf3*                ) opsys=decosf3-1 ;;
1146   *-dec-osf4*                ) opsys=decosf4-0 ;;
1147
1148     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1149   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1150   *-*-ultrix* )         opsys=ultrix4-3 ;;
1151
1152     *-*-aix3.1*  ) opsys=aix3-1 ;;
1153   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1154   *-*-aix3*    ) opsys=aix3-2   ;;
1155   *-*-aix4.0*  ) opsys=aix4     ;;
1156   *-*-aix4.1*  ) opsys=aix4-1   ;;
1157   *-*-aix4*    ) opsys=aix4-2   ;;
1158
1159     *-gnu* )                    opsys=gnu    ;;
1160   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1161   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1162   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1163   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1164   *-*-aos*   )                  opsys=bsd4-3 ;;
1165   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1166   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1167   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1168   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1169   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1170   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1171         if test -z "$NON_GNU_CPP" ; then
1172           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1173             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1174           done
1175         fi
1176         opsys=usg5-4-2 ;;
1177     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1178     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1179 esac
1180
1181 case "$canonical" in
1182
1183     *-*-netbsd* )
1184     case "$canonical" in
1185       i[3-9]86-*-netbsd*) machine=intel386 ;;
1186       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1187                                             machine=hp9000s300 ;;
1188       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1189       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1190     esac
1191   ;;
1192
1193     *-*-openbsd* )
1194     case "${canonical}" in
1195       i386-*-openbsd*)          machine=intel386 ;;
1196       m68k-*-openbsd*)          machine=hp9000s300 ;;
1197       mipsel-*-openbsd*)        machine=pmax ;;
1198      esac
1199    ;;
1200
1201     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1202   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1203
1204     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1205   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1206
1207     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1208
1209     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1210
1211     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1212
1213     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1214
1215     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1216
1217     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1218   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1219   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1220
1221   
1222     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1223
1224     *-convex-bsd* | *-convex-convexos* )
1225     machine=convex opsys=bsd4-3
1226     NON_GNU_CPP="cc -E -P"
1227   ;;
1228
1229     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1230
1231     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1232   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1233   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1234   m88k-dg-dgux*                           ) opsys=dgux     ;;
1235
1236     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1237   m88k-motorola-sysv4* )
1238                     machine=delta88k opsys=usg5-4-2
1239   ;;
1240   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1241
1242     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1243   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1244
1245     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1246
1247     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1248   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1249   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1250
1251       m88k-harris-cxux* )
1252         case "`uname -r`" in
1253        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1254        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1255     esac
1256     NON_GNU_CPP="/lib/cpp"
1257   ;;
1258     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1259     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1260
1261     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1262
1263     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1264
1265     *-hp-hpux* )
1266         case "$canonical" in
1267       m68*  ) machine=hp9000s300 ;;
1268       hppa* ) machine=hp800      ;;
1269     esac
1270
1271     case "$canonical" in
1272       *-hp-hpux7*  )  opsys=hpux   ;;
1273       *-hp-hpux8*  )  opsys=hpux8  ;;
1274       *-hp-hpux9*  )  opsys=hpux9  ;;
1275       *-hp-hpux10* )  opsys=hpux10 ;;
1276       *-hp-hpux11* )  opsys=hpux11 ;;
1277       *            )  opsys=hpux   ;;
1278     esac
1279
1280         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1281    echo "    xemacs will be linked with \"strcat.o\""
1282  fi ;; esac
1283
1284     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1285         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1286     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1287
1288     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1289   ;;
1290
1291     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1292   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1293
1294     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1295   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1296   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1297   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1298   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1299   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1300
1301     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1302   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1303
1304     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1305
1306     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1307
1308     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1309
1310     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1311
1312       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1313
1314     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1315
1316     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1317
1318     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1319
1320     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1321
1322         mips-mips-usg* ) machine=mips4 ;;
1323   mips-mips-riscos4 )
1324     machine=mips4
1325     NON_GNU_CC="cc -systype bsd43"
1326     NON_GNU_CPP="cc -systype bsd43 -E"
1327     case "$canonical" in
1328       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1329       mips-mips-riscos5* ) opsys=riscos5 ;;
1330     esac
1331   ;;
1332   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1333   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1334
1335     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1336
1337     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1338
1339     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1340   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1341
1342     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1343
1344     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1345
1346     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1347
1348     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1349
1350     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1351   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1352
1353     mips-siemens-sysv* | mips-sni-sysv*)
1354     machine=mips-siemens opsys=usg5-4
1355     NON_GNU_CC=/usr/ccs/bin/cc
1356     NON_GNU_CPP=/usr/ccs/lib/cpp
1357   ;;
1358
1359     mips-nec-sysv*)
1360     machine=mips-nec
1361     NON_GNU_CC=/usr/ccs/bin/cc
1362     NON_GNU_CPP=/usr/ccs/lib/cpp
1363   ;;
1364
1365       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1366   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1367     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1368   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1369   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1370   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1371   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1372   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1373   mips-sgi-irix*      ) opsys=irix5-0 ;;
1374
1375     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1376   *-sony-news* ) opsys=newsos5 ;;
1377
1378     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1379
1380     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1381         case "$canonical" in
1382       m68*-sunos1* )             machine=sun1     ;;
1383       m68*-sunos2* )             machine=sun2     ;;
1384       m68* )                     machine=sun3     ;;
1385       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1386       i*86-*-* )                 machine=intel386 ;;
1387       rs6000* )                  machine=rs6000   ;;
1388     esac
1389
1390         case "$canonical" in *-sunos5*)
1391       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1392     esac
1393
1394                     case "$canonical" in
1395       *-sunos4* )
1396         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1397         : ;;
1398       *-solaris2* )
1399         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1400         RANLIB=':' ;;
1401     esac
1402
1403     case "$canonical" in
1404       *-solaris*          )
1405         opsys=sol2
1406         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1407         { test "$extra_verbose" = "yes" && cat << EOF
1408     Defining OS_RELEASE = $os_release
1409 EOF
1410 cat >> confdefs.h <<EOF
1411 #define OS_RELEASE $os_release
1412 EOF
1413 }
1414  ;;
1415
1416             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1417       *-sunos4.0*         ) opsys=sunos4-0      ;;
1418       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1419       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1420       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1421       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1422       *-mach*             ) opsys=mach-bsd4-3   ;;
1423       *                   ) opsys=bsd4-2        ;;
1424     esac
1425
1426     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1427
1428         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1429   ;;
1430
1431     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1432
1433     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1434   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1435
1436     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1437
1438     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1439
1440     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1441       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1442
1443     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1444
1445     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1446
1447     vax-dec-* )
1448     case "$canonical" in
1449       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1450       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1451       *-mach* )                         opsys=mach-bsd4-3 ;;
1452     esac
1453   ;;
1454
1455     ns16k-whitechapel-* ) machine=mg1 ;;
1456
1457     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1458
1459     i[3-9]86-*-* )
1460     machine=intel386
1461     case "$canonical" in
1462       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1463       *-isc2.2* )               opsys=isc2-2 ;;
1464       *-isc4.0* )               opsys=isc4-0 ;;
1465       *-isc4.* )                opsys=isc4-1
1466                                 GCC_TEST_OPTIONS=-posix
1467                                 NON_GCC_TEST_OPTIONS=-Xp
1468                                 ;;
1469       *-isc* )                  opsys=isc3-0 ;;
1470       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1471       *-esix* )                 opsys=esix ;;
1472       *-mach* )                 opsys=mach-bsd4-3 ;;
1473       *-xenix* )                opsys=xenix ;;
1474       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1475       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1476       *-bsdi4* )                opsys=bsdos4 ;;
1477       *-bsdi3* )                opsys=bsdos3 ;;
1478       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1479       *-bsdi2* )                opsys=bsdos2 ;;
1480       *-sco3.2v5* )             opsys=sco5 ;
1481                                                         if test "$dynamic" = "yes" ; then
1482                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1483         else
1484                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1485         fi ;;
1486       *-sysv5* )                opsys=sco7 ;;
1487       *-386bsd* )               opsys=386bsd ;;
1488       *-freebsd* )              opsys=freebsd ;;
1489       *-nextstep* )             opsys=nextstep ;;
1490       *-pc-cygwin* )            opsys=cygwin32 ;;
1491       *-pc-mingw* )             opsys=mingw32 ;
1492                                 test -z "$with_tty" && with_tty="no";;
1493           esac
1494   ;;
1495
1496     m68k-*-linux* ) machine=m68k opsys=linux ;;
1497
1498 esac
1499
1500 if test -z "$machine" -o -z "$opsys"; then
1501   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1502    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1503   ) >&2
1504   exit 1
1505 fi
1506
1507 if test -z "$dynamic"; then
1508   case "$opsys" in
1509     hpux* | sunos4* ) dynamic=no ;;
1510     *) dynamic=yes ;;
1511   esac
1512 fi
1513 if test "$dynamic" = "yes"; then
1514   case "$opsys" in
1515     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1516     decosf* ) ld_call_shared="-call_shared" ;;
1517   esac
1518 else   case "$opsys" in
1519     sol2 )
1520       echo "Static linking is not supported on Solaris 2."
1521       echo "Rerun configure without specifying --dynamic=no."
1522       exit 1 ;;
1523     linux   ) ld_call_shared="-Bstatic" ;;
1524     decosf* ) ld_call_shared="-non_shared" ;;
1525   esac
1526 fi
1527
1528 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1529
1530 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1531 { test "$extra_verbose" = "yes" && cat << EOF
1532     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1533 EOF
1534 cat >> confdefs.h <<EOF
1535 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1536 EOF
1537 }
1538
1539
1540 machfile="m/${machine}.h"
1541 opsysfile="s/${opsys}.h"
1542
1543
1544 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1545 if test "$with_workshop $with_tooltalk" = "yes no"; then
1546   (echo "$progname: Usage error:"
1547 echo " " "--with-workshop requires --with-tooltalk"
1548 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1549 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1550 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1551 fi
1552
1553 if test "$with_workshop" = "yes"; then
1554   { test "$extra_verbose" = "yes" && cat << \EOF
1555     Defining SUNPRO
1556 EOF
1557 cat >> confdefs.h <<\EOF
1558 #define SUNPRO 1
1559 EOF
1560 }
1561
1562   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1563    echo "    xemacs will be linked with \"sunpro.o\""
1564  fi
1565 fi
1566
1567 if test "$with_clash_detection" != "no"; then
1568   { test "$extra_verbose" = "yes" && cat << \EOF
1569     Defining CLASH_DETECTION
1570 EOF
1571 cat >> confdefs.h <<\EOF
1572 #define CLASH_DETECTION 1
1573 EOF
1574 }
1575
1576   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1577    echo "    xemacs will be linked with \"filelock.o\""
1578  fi
1579 fi
1580
1581 test -n "$compiler" && CC="$compiler"
1582 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1583 fi
1584
1585 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1586 if test "${CFLAGS-unset}" != unset
1587   then cflags_specified=yes;
1588   else cflags_specified=no;
1589 fi
1590
1591 xe_save_CFLAGS="$CFLAGS"
1592
1593 # Extract the first word of "gcc", so it can be a program name with args.
1594 set dummy gcc; ac_word=$2
1595 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1596 echo "configure:1597: checking for $ac_word" >&5
1597
1598 if test -n "$CC"; then
1599   ac_cv_prog_CC="$CC" # Let the user override the test.
1600 else
1601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1602   ac_dummy="$PATH"
1603   for ac_dir in $ac_dummy; do
1604     test -z "$ac_dir" && ac_dir=.
1605     if test -f $ac_dir/$ac_word; then
1606       ac_cv_prog_CC="gcc"
1607       break
1608     fi
1609   done
1610   IFS="$ac_save_ifs"
1611 fi
1612 CC="$ac_cv_prog_CC"
1613 if test -n "$CC"; then
1614   echo "$ac_t""$CC" 1>&6
1615 else
1616   echo "$ac_t""no" 1>&6
1617 fi
1618
1619 if test -z "$CC"; then
1620   # Extract the first word of "cc", so it can be a program name with args.
1621 set dummy cc; ac_word=$2
1622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1623 echo "configure:1624: checking for $ac_word" >&5
1624
1625 if test -n "$CC"; then
1626   ac_cv_prog_CC="$CC" # Let the user override the test.
1627 else
1628   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1629   ac_prog_rejected=no
1630   ac_dummy="$PATH"
1631   for ac_dir in $ac_dummy; do
1632     test -z "$ac_dir" && ac_dir=.
1633     if test -f $ac_dir/$ac_word; then
1634       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1635         ac_prog_rejected=yes
1636         continue
1637       fi
1638       ac_cv_prog_CC="cc"
1639       break
1640     fi
1641   done
1642   IFS="$ac_save_ifs"
1643 if test $ac_prog_rejected = yes; then
1644   # We found a bogon in the path, so make sure we never use it.
1645   set dummy $ac_cv_prog_CC
1646   shift
1647   if test $# -gt 0; then
1648     # We chose a different compiler from the bogus one.
1649     # However, it has the same basename, so the bogon will be chosen
1650     # first if we set CC to just the basename; use the full file name.
1651     shift
1652     set dummy "$ac_dir/$ac_word" "$@"
1653     shift
1654     ac_cv_prog_CC="$@"
1655   fi
1656 fi
1657 fi
1658 CC="$ac_cv_prog_CC"
1659 if test -n "$CC"; then
1660   echo "$ac_t""$CC" 1>&6
1661 else
1662   echo "$ac_t""no" 1>&6
1663 fi
1664
1665   if test -z "$CC"; then
1666     case "`uname -s`" in
1667     *win32* | *WIN32*)
1668       # Extract the first word of "cl", so it can be a program name with args.
1669 set dummy cl; ac_word=$2
1670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1671 echo "configure:1672: checking for $ac_word" >&5
1672
1673 if test -n "$CC"; then
1674   ac_cv_prog_CC="$CC" # Let the user override the test.
1675 else
1676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1677   ac_dummy="$PATH"
1678   for ac_dir in $ac_dummy; do
1679     test -z "$ac_dir" && ac_dir=.
1680     if test -f $ac_dir/$ac_word; then
1681       ac_cv_prog_CC="cl"
1682       break
1683     fi
1684   done
1685   IFS="$ac_save_ifs"
1686 fi
1687 CC="$ac_cv_prog_CC"
1688 if test -n "$CC"; then
1689   echo "$ac_t""$CC" 1>&6
1690 else
1691   echo "$ac_t""no" 1>&6
1692 fi
1693  ;;
1694     esac
1695   fi
1696   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1697 fi
1698
1699 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1700 echo "configure:1701: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1701
1702 ac_ext=c
1703 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1704 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1705 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1706 ac_cpp='$CPP '"$xe_cppflags"
1707 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1708 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1709 cross_compiling=no
1710
1711 cat > conftest.$ac_ext << EOF
1712
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715
1716 main(){return(0);}
1717 EOF
1718 if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1719   ac_cv_prog_cc_works=yes
1720   # If we can't run a trivial program, we are probably using a cross compiler.
1721   if (./conftest; exit) 2>/dev/null; then
1722     ac_cv_prog_cc_cross=no
1723   else
1724     ac_cv_prog_cc_cross=yes
1725   fi
1726 else
1727   echo "configure: failed program was:" >&5
1728   cat conftest.$ac_ext >&5
1729   ac_cv_prog_cc_works=no
1730 fi
1731 rm -fr conftest*
1732 ac_ext=c
1733 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1734 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1735 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1736 ac_cpp='$CPP '"$xe_cppflags"
1737 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1738 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1739 cross_compiling=no
1740
1741 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1742 if test $ac_cv_prog_cc_works = no; then
1743   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1744 fi
1745 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1746 echo "configure:1747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1747 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1748 cross_compiling=$ac_cv_prog_cc_cross
1749
1750 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1751 echo "configure:1752: checking whether we are using GNU C" >&5
1752
1753 cat > conftest.c <<EOF
1754 #ifdef __GNUC__
1755   yes;
1756 #endif
1757 EOF
1758 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1759   ac_cv_prog_gcc=yes
1760 else
1761   ac_cv_prog_gcc=no
1762 fi
1763
1764 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1765
1766 if test $ac_cv_prog_gcc = yes; then
1767   GCC=yes
1768 else
1769   GCC=
1770 fi
1771
1772 ac_test_CFLAGS="${CFLAGS+set}"
1773 ac_save_CFLAGS="$CFLAGS"
1774 CFLAGS=
1775 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1776 echo "configure:1777: checking whether ${CC-cc} accepts -g" >&5
1777
1778 echo 'void f(){}' > conftest.c
1779 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1780   ac_cv_prog_cc_g=yes
1781 else
1782   ac_cv_prog_cc_g=no
1783 fi
1784 rm -f conftest*
1785
1786
1787 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1788 if test "$ac_test_CFLAGS" = set; then
1789   CFLAGS="$ac_save_CFLAGS"
1790 elif test $ac_cv_prog_cc_g = yes; then
1791   if test "$GCC" = yes; then
1792     CFLAGS="-g -O2"
1793   else
1794     CFLAGS="-g"
1795   fi
1796 else
1797   if test "$GCC" = yes; then
1798     CFLAGS="-O2"
1799   else
1800     CFLAGS=
1801   fi
1802 fi
1803  
1804 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1805   CC=${NON_GNU_CC-cc}
1806   # Extract the first word of "gcc", so it can be a program name with args.
1807 set dummy gcc; ac_word=$2
1808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1809 echo "configure:1810: checking for $ac_word" >&5
1810
1811 if test -n "$CC"; then
1812   ac_cv_prog_CC="$CC" # Let the user override the test.
1813 else
1814   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1815   ac_dummy="$PATH"
1816   for ac_dir in $ac_dummy; do
1817     test -z "$ac_dir" && ac_dir=.
1818     if test -f $ac_dir/$ac_word; then
1819       ac_cv_prog_CC="gcc"
1820       break
1821     fi
1822   done
1823   IFS="$ac_save_ifs"
1824 fi
1825 CC="$ac_cv_prog_CC"
1826 if test -n "$CC"; then
1827   echo "$ac_t""$CC" 1>&6
1828 else
1829   echo "$ac_t""no" 1>&6
1830 fi
1831
1832 if test -z "$CC"; then
1833   # Extract the first word of "cc", so it can be a program name with args.
1834 set dummy cc; ac_word=$2
1835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1836 echo "configure:1837: checking for $ac_word" >&5
1837
1838 if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1842   ac_prog_rejected=no
1843   ac_dummy="$PATH"
1844   for ac_dir in $ac_dummy; do
1845     test -z "$ac_dir" && ac_dir=.
1846     if test -f $ac_dir/$ac_word; then
1847       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1848         ac_prog_rejected=yes
1849         continue
1850       fi
1851       ac_cv_prog_CC="cc"
1852       break
1853     fi
1854   done
1855   IFS="$ac_save_ifs"
1856 if test $ac_prog_rejected = yes; then
1857   # We found a bogon in the path, so make sure we never use it.
1858   set dummy $ac_cv_prog_CC
1859   shift
1860   if test $# -gt 0; then
1861     # We chose a different compiler from the bogus one.
1862     # However, it has the same basename, so the bogon will be chosen
1863     # first if we set CC to just the basename; use the full file name.
1864     shift
1865     set dummy "$ac_dir/$ac_word" "$@"
1866     shift
1867     ac_cv_prog_CC="$@"
1868   fi
1869 fi
1870 fi
1871 CC="$ac_cv_prog_CC"
1872 if test -n "$CC"; then
1873   echo "$ac_t""$CC" 1>&6
1874 else
1875   echo "$ac_t""no" 1>&6
1876 fi
1877
1878   if test -z "$CC"; then
1879     case "`uname -s`" in
1880     *win32* | *WIN32*)
1881       # Extract the first word of "cl", so it can be a program name with args.
1882 set dummy cl; ac_word=$2
1883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1884 echo "configure:1885: checking for $ac_word" >&5
1885
1886 if test -n "$CC"; then
1887   ac_cv_prog_CC="$CC" # Let the user override the test.
1888 else
1889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1890   ac_dummy="$PATH"
1891   for ac_dir in $ac_dummy; do
1892     test -z "$ac_dir" && ac_dir=.
1893     if test -f $ac_dir/$ac_word; then
1894       ac_cv_prog_CC="cl"
1895       break
1896     fi
1897   done
1898   IFS="$ac_save_ifs"
1899 fi
1900 CC="$ac_cv_prog_CC"
1901 if test -n "$CC"; then
1902   echo "$ac_t""$CC" 1>&6
1903 else
1904   echo "$ac_t""no" 1>&6
1905 fi
1906  ;;
1907     esac
1908   fi
1909   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1910 fi
1911
1912 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1913 echo "configure:1914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1914
1915 ac_ext=c
1916 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1917 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1918 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1919 ac_cpp='$CPP '"$xe_cppflags"
1920 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1921 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1922 cross_compiling=no
1923
1924 cat > conftest.$ac_ext << EOF
1925
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928
1929 main(){return(0);}
1930 EOF
1931 if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1932   ac_cv_prog_cc_works=yes
1933   # If we can't run a trivial program, we are probably using a cross compiler.
1934   if (./conftest; exit) 2>/dev/null; then
1935     ac_cv_prog_cc_cross=no
1936   else
1937     ac_cv_prog_cc_cross=yes
1938   fi
1939 else
1940   echo "configure: failed program was:" >&5
1941   cat conftest.$ac_ext >&5
1942   ac_cv_prog_cc_works=no
1943 fi
1944 rm -fr conftest*
1945 ac_ext=c
1946 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1947 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1948 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1949 ac_cpp='$CPP '"$xe_cppflags"
1950 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1951 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1952 cross_compiling=no
1953
1954 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1955 if test $ac_cv_prog_cc_works = no; then
1956   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1957 fi
1958 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1959 echo "configure:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1960 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1961 cross_compiling=$ac_cv_prog_cc_cross
1962
1963 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1964 echo "configure:1965: checking whether we are using GNU C" >&5
1965
1966 cat > conftest.c <<EOF
1967 #ifdef __GNUC__
1968   yes;
1969 #endif
1970 EOF
1971 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1972   ac_cv_prog_gcc=yes
1973 else
1974   ac_cv_prog_gcc=no
1975 fi
1976
1977 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1978
1979 if test $ac_cv_prog_gcc = yes; then
1980   GCC=yes
1981 else
1982   GCC=
1983 fi
1984
1985 ac_test_CFLAGS="${CFLAGS+set}"
1986 ac_save_CFLAGS="$CFLAGS"
1987 CFLAGS=
1988 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1989 echo "configure:1990: checking whether ${CC-cc} accepts -g" >&5
1990
1991 echo 'void f(){}' > conftest.c
1992 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1993   ac_cv_prog_cc_g=yes
1994 else
1995   ac_cv_prog_cc_g=no
1996 fi
1997 rm -f conftest*
1998
1999
2000 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2001 if test "$ac_test_CFLAGS" = set; then
2002   CFLAGS="$ac_save_CFLAGS"
2003 elif test $ac_cv_prog_cc_g = yes; then
2004   if test "$GCC" = yes; then
2005     CFLAGS="-g -O2"
2006   else
2007     CFLAGS="-g"
2008   fi
2009 else
2010   if test "$GCC" = yes; then
2011     CFLAGS="-O2"
2012   else
2013     CFLAGS=
2014   fi
2015 fi
2016
2017 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2018   CC=gcc
2019   # Extract the first word of "gcc", so it can be a program name with args.
2020 set dummy gcc; ac_word=$2
2021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2022 echo "configure:2023: checking for $ac_word" >&5
2023
2024 if test -n "$CC"; then
2025   ac_cv_prog_CC="$CC" # Let the user override the test.
2026 else
2027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2028   ac_dummy="$PATH"
2029   for ac_dir in $ac_dummy; do
2030     test -z "$ac_dir" && ac_dir=.
2031     if test -f $ac_dir/$ac_word; then
2032       ac_cv_prog_CC="gcc"
2033       break
2034     fi
2035   done
2036   IFS="$ac_save_ifs"
2037 fi
2038 CC="$ac_cv_prog_CC"
2039 if test -n "$CC"; then
2040   echo "$ac_t""$CC" 1>&6
2041 else
2042   echo "$ac_t""no" 1>&6
2043 fi
2044
2045 if test -z "$CC"; then
2046   # Extract the first word of "cc", so it can be a program name with args.
2047 set dummy cc; ac_word=$2
2048 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2049 echo "configure:2050: checking for $ac_word" >&5
2050
2051 if test -n "$CC"; then
2052   ac_cv_prog_CC="$CC" # Let the user override the test.
2053 else
2054   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2055   ac_prog_rejected=no
2056   ac_dummy="$PATH"
2057   for ac_dir in $ac_dummy; do
2058     test -z "$ac_dir" && ac_dir=.
2059     if test -f $ac_dir/$ac_word; then
2060       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2061         ac_prog_rejected=yes
2062         continue
2063       fi
2064       ac_cv_prog_CC="cc"
2065       break
2066     fi
2067   done
2068   IFS="$ac_save_ifs"
2069 if test $ac_prog_rejected = yes; then
2070   # We found a bogon in the path, so make sure we never use it.
2071   set dummy $ac_cv_prog_CC
2072   shift
2073   if test $# -gt 0; then
2074     # We chose a different compiler from the bogus one.
2075     # However, it has the same basename, so the bogon will be chosen
2076     # first if we set CC to just the basename; use the full file name.
2077     shift
2078     set dummy "$ac_dir/$ac_word" "$@"
2079     shift
2080     ac_cv_prog_CC="$@"
2081   fi
2082 fi
2083 fi
2084 CC="$ac_cv_prog_CC"
2085 if test -n "$CC"; then
2086   echo "$ac_t""$CC" 1>&6
2087 else
2088   echo "$ac_t""no" 1>&6
2089 fi
2090
2091   if test -z "$CC"; then
2092     case "`uname -s`" in
2093     *win32* | *WIN32*)
2094       # Extract the first word of "cl", so it can be a program name with args.
2095 set dummy cl; ac_word=$2
2096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2097 echo "configure:2098: checking for $ac_word" >&5
2098
2099 if test -n "$CC"; then
2100   ac_cv_prog_CC="$CC" # Let the user override the test.
2101 else
2102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2103   ac_dummy="$PATH"
2104   for ac_dir in $ac_dummy; do
2105     test -z "$ac_dir" && ac_dir=.
2106     if test -f $ac_dir/$ac_word; then
2107       ac_cv_prog_CC="cl"
2108       break
2109     fi
2110   done
2111   IFS="$ac_save_ifs"
2112 fi
2113 CC="$ac_cv_prog_CC"
2114 if test -n "$CC"; then
2115   echo "$ac_t""$CC" 1>&6
2116 else
2117   echo "$ac_t""no" 1>&6
2118 fi
2119  ;;
2120     esac
2121   fi
2122   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2123 fi
2124
2125 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2126 echo "configure:2127: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2127
2128 ac_ext=c
2129 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2130 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2131 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2132 ac_cpp='$CPP '"$xe_cppflags"
2133 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2134 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2135 cross_compiling=no
2136
2137 cat > conftest.$ac_ext << EOF
2138
2139 #line 2140 "configure"
2140 #include "confdefs.h"
2141
2142 main(){return(0);}
2143 EOF
2144 if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2145   ac_cv_prog_cc_works=yes
2146   # If we can't run a trivial program, we are probably using a cross compiler.
2147   if (./conftest; exit) 2>/dev/null; then
2148     ac_cv_prog_cc_cross=no
2149   else
2150     ac_cv_prog_cc_cross=yes
2151   fi
2152 else
2153   echo "configure: failed program was:" >&5
2154   cat conftest.$ac_ext >&5
2155   ac_cv_prog_cc_works=no
2156 fi
2157 rm -fr conftest*
2158 ac_ext=c
2159 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2160 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2161 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2162 ac_cpp='$CPP '"$xe_cppflags"
2163 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2164 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2165 cross_compiling=no
2166
2167 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2168 if test $ac_cv_prog_cc_works = no; then
2169   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2170 fi
2171 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2172 echo "configure:2173: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2173 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2174 cross_compiling=$ac_cv_prog_cc_cross
2175
2176 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2177 echo "configure:2178: checking whether we are using GNU C" >&5
2178
2179 cat > conftest.c <<EOF
2180 #ifdef __GNUC__
2181   yes;
2182 #endif
2183 EOF
2184 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2185   ac_cv_prog_gcc=yes
2186 else
2187   ac_cv_prog_gcc=no
2188 fi
2189
2190 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2191
2192 if test $ac_cv_prog_gcc = yes; then
2193   GCC=yes
2194 else
2195   GCC=
2196 fi
2197
2198 ac_test_CFLAGS="${CFLAGS+set}"
2199 ac_save_CFLAGS="$CFLAGS"
2200 CFLAGS=
2201 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2202 echo "configure:2203: checking whether ${CC-cc} accepts -g" >&5
2203
2204 echo 'void f(){}' > conftest.c
2205 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2206   ac_cv_prog_cc_g=yes
2207 else
2208   ac_cv_prog_cc_g=no
2209 fi
2210 rm -f conftest*
2211
2212
2213 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2214 if test "$ac_test_CFLAGS" = set; then
2215   CFLAGS="$ac_save_CFLAGS"
2216 elif test $ac_cv_prog_cc_g = yes; then
2217   if test "$GCC" = yes; then
2218     CFLAGS="-g -O2"
2219   else
2220     CFLAGS="-g"
2221   fi
2222 else
2223   if test "$GCC" = yes; then
2224     CFLAGS="-O2"
2225   else
2226     CFLAGS=
2227   fi
2228 fi
2229
2230 fi
2231 CFLAGS="$xe_save_CFLAGS"
2232
2233
2234 test -n "$CPP" -a -d "$CPP" && CPP=
2235
2236 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2237
2238 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2239 echo "configure:2240: checking how to run the C preprocessor" >&5
2240 # On Suns, sometimes $CPP names a directory.
2241 if test -n "$CPP" && test -d "$CPP"; then
2242   CPP=
2243 fi
2244 if test -z "$CPP"; then
2245
2246   # This must be in double quotes, not single quotes, because CPP may get
2247   # substituted into the Makefile and "${CC-cc}" will confuse make.
2248   CPP="${CC-cc} -E"
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp.
2251   cat > conftest.$ac_ext <<EOF
2252 #line 2253 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255 Syntax Error
2256 EOF
2257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2258 { (eval echo configure:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2260 if test -z "$ac_err"; then
2261   :
2262 else
2263   echo "$ac_err" >&5
2264   echo "configure: failed program was:" >&5
2265   cat conftest.$ac_ext >&5
2266   rm -rf conftest*
2267   CPP="${CC-cc} -E -traditional-cpp"
2268   cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <assert.h>
2272 Syntax Error
2273 EOF
2274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2275 { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2277 if test -z "$ac_err"; then
2278   :
2279 else
2280   echo "$ac_err" >&5
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   CPP="${CC-cc} -nologo -E"
2285   cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <assert.h>
2289 Syntax Error
2290 EOF
2291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2292 { (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2294 if test -z "$ac_err"; then
2295   :
2296 else
2297   echo "$ac_err" >&5
2298   echo "configure: failed program was:" >&5
2299   cat conftest.$ac_ext >&5
2300   rm -rf conftest*
2301   CPP=/lib/cpp
2302 fi
2303 rm -f conftest*
2304 fi
2305 rm -f conftest*
2306 fi
2307 rm -f conftest*
2308   ac_cv_prog_CPP="$CPP"
2309   CPP="$ac_cv_prog_CPP"
2310 else
2311   ac_cv_prog_CPP="$CPP"
2312 fi
2313 echo "$ac_t""$CPP" 1>&6
2314
2315
2316
2317 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2318 echo "configure:2319: checking for AIX" >&5
2319 cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #ifdef _AIX
2323   yes
2324 #endif
2325
2326 EOF
2327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2328   egrep "yes" >/dev/null 2>&1; then
2329   rm -rf conftest*
2330   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2331     Defining _ALL_SOURCE
2332 EOF
2333 cat >> confdefs.h <<\EOF
2334 #define _ALL_SOURCE 1
2335 EOF
2336 }
2337
2338 else
2339   rm -rf conftest*
2340   echo "$ac_t""no" 1>&6
2341 fi
2342 rm -f conftest*
2343
2344  
2345
2346 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2347 echo "configure:2348: checking for GNU libc" >&5
2348 cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #include <features.h>
2352 int main() {
2353
2354 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2355 #error Not a GNU libc system :-(
2356 ******* ======= ******** &&&&&&&&
2357 #endif
2358
2359 ; return 0; }
2360 EOF
2361 if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2362   rm -rf conftest*
2363   have_glibc=yes
2364 else
2365   echo "configure: failed program was:" >&5
2366   cat conftest.$ac_ext >&5
2367   rm -rf conftest*
2368   have_glibc=no
2369 fi
2370 rm -f conftest*
2371 echo "$ac_t""$have_glibc" 1>&6
2372 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2373     Defining _GNU_SOURCE
2374 EOF
2375 cat >> confdefs.h <<\EOF
2376 #define _GNU_SOURCE 1
2377 EOF
2378 }
2379
2380
2381 case "$opsys" in
2382   sol2)
2383    { test "$extra_verbose" = "yes" && cat << \EOF
2384     Defining __EXTENSIONS__
2385 EOF
2386 cat >> confdefs.h <<\EOF
2387 #define __EXTENSIONS__ 1
2388 EOF
2389 }
2390
2391       if test "$os_release" -ge 55; then
2392      { test "$extra_verbose" = "yes" && cat << \EOF
2393     Defining _XOPEN_SOURCE = 500
2394 EOF
2395 cat >> confdefs.h <<\EOF
2396 #define _XOPEN_SOURCE 500
2397 EOF
2398 }
2399
2400      { test "$extra_verbose" = "yes" && cat << \EOF
2401     Defining _XOPEN_SOURCE_EXTENDED
2402 EOF
2403 cat >> confdefs.h <<\EOF
2404 #define _XOPEN_SOURCE_EXTENDED 1
2405 EOF
2406 }
2407
2408    fi ;;
2409   linux)
2410     { test "$extra_verbose" = "yes" && cat << \EOF
2411     Defining _POSIX_C_SOURCE = 199506L
2412 EOF
2413 cat >> confdefs.h <<\EOF
2414 #define _POSIX_C_SOURCE 199506L
2415 EOF
2416 }
2417
2418     { test "$extra_verbose" = "yes" && cat << \EOF
2419     Defining _XOPEN_SOURCE = 500
2420 EOF
2421 cat >> confdefs.h <<\EOF
2422 #define _XOPEN_SOURCE 500
2423 EOF
2424 }
2425
2426     { test "$extra_verbose" = "yes" && cat << \EOF
2427     Defining _XOPEN_SOURCE_EXTENDED
2428 EOF
2429 cat >> confdefs.h <<\EOF
2430 #define _XOPEN_SOURCE_EXTENDED 1
2431 EOF
2432 }
2433
2434     ;;
2435 esac
2436
2437 cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 int main () {
2441 #if defined __SUNPRO_C
2442 return 11;
2443 #elif defined __DECC
2444 return 12;
2445 #else
2446 return 0;
2447 #endif
2448 }
2449 EOF
2450 if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2451 then
2452   :
2453 else
2454   conftest_rc="$?"
2455   echo "configure: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   rm -fr conftest*
2458   case "$conftest_rc" in
2459   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2460   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2461 esac
2462 fi
2463 rm -fr conftest*
2464
2465
2466
2467
2468 echo "Extracting information from the machine- and system-dependent headers..."
2469
2470 tempcname="conftest.c"
2471
2472
2473
2474 cat > $tempcname <<EOF
2475 #define NOT_C_CODE
2476 #define C_SWITCH_SITE
2477 #define C_SWITCH_X_SITE
2478 #define LD_SWITCH_SITE
2479 #define LD_SWITCH_X_SITE
2480 #define LD_SWITCH_X_SITE_AUX
2481 #define OS_RELEASE $os_release
2482 #include "$srcdir/src/$opsysfile"
2483 #include "$srcdir/src/$machfile"
2484
2485 #ifndef LIBS_MACHINE
2486 #define LIBS_MACHINE
2487 #endif
2488 configure___ libs_machine=LIBS_MACHINE
2489
2490 #ifndef LIBS_SYSTEM
2491 #define LIBS_SYSTEM
2492 #endif
2493 configure___ libs_system=LIBS_SYSTEM
2494
2495 #ifndef LIBS_TERMCAP
2496 #define LIBS_TERMCAP
2497 #endif
2498 configure___ libs_termcap=LIBS_TERMCAP
2499
2500 #ifndef LIB_STANDARD
2501 #define LIB_STANDARD
2502 #endif
2503 configure___ libs_standard=LIB_STANDARD
2504
2505
2506 #ifndef OBJECTS_MACHINE
2507 #define OBJECTS_MACHINE
2508 #endif
2509 configure___ objects_machine=OBJECTS_MACHINE
2510
2511 #ifndef OBJECTS_SYSTEM
2512 #define OBJECTS_SYSTEM
2513 #endif
2514 configure___ objects_system=OBJECTS_SYSTEM
2515
2516
2517 #ifndef C_SWITCH_MACHINE
2518 #define C_SWITCH_MACHINE
2519 #endif
2520 configure___ c_switch_machine=C_SWITCH_MACHINE
2521
2522 #ifndef C_SWITCH_SYSTEM
2523 #define C_SWITCH_SYSTEM
2524 #endif
2525 configure___ c_switch_system=C_SWITCH_SYSTEM
2526
2527
2528 #ifndef LD_SWITCH_MACHINE
2529 #define LD_SWITCH_MACHINE
2530 #endif
2531 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2532
2533 #ifndef LD_SWITCH_SYSTEM
2534 #define LD_SWITCH_SYSTEM
2535 #endif
2536 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2537
2538
2539 #ifndef UNEXEC
2540 #define UNEXEC "unexec.o"
2541 #endif
2542 configure___ unexec=UNEXEC
2543
2544
2545 #ifndef LD_SWITCH_SHARED
2546 #define LD_SWITCH_SHARED "-c"
2547 #endif
2548 configure___ ld_switch_shared=LD_SWITCH_SHARED
2549
2550
2551 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2552 configure___ ordinary_ld=ORDINARY_LD
2553
2554 #ifdef ORDINARY_LINK
2555 #define LD ORDINARY_LD
2556 #else /* no ORDINARY LINK */
2557 #ifdef COFF_ENCAPSULATE
2558 #define LD "\$(CC) -nostdlib"
2559 #else /* not COFF_ENCAPSULATE */
2560 #ifdef LINKER
2561 #define LD LINKER
2562 #else /* ! defined (LINKER) */
2563 #define LD "ld"
2564 #endif /* ! defined (LINKER) */
2565 #endif /* ! defined (COFF_ENCAPSULATE) */
2566 #endif /* not ORDINARY_LINK */
2567 configure___ ld=LD
2568
2569 #ifndef LIB_GCC
2570 #define LIB_GCC
2571 #endif
2572 configure___ lib_gcc=LIB_GCC
2573
2574 #ifndef LD_TEXT_START_ADDR
2575 #define LD_TEXT_START_ADDR
2576 #endif
2577 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2578
2579
2580 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2581 #ifdef NO_REMAP
2582 #ifdef COFF_ENCAPSULATE
2583 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2584 #else /* ! defined (COFF_ENCAPSULATE) */
2585 #define START_FILES "pre-crt0.o /lib/crt0.o"
2586 #endif /* ! defined (COFF_ENCAPSULATE) */
2587 #else /* ! defined (NO_REMAP) */
2588 #define START_FILES "ecrt0.o"
2589 #endif /* ! defined (NO_REMAP) */
2590 #endif /* no ORDINARY_LINK */
2591 #ifndef START_FILES
2592 #define START_FILES
2593 #endif
2594 configure___ start_files=START_FILES
2595
2596 #ifdef ORDINARY_LINK
2597 configure___ ordinary_link=yes
2598 #else
2599 configure___ ordinary_link=no
2600 #endif
2601
2602 #ifdef SYSTEM_MALLOC
2603 configure___ system_malloc=yes
2604 #else
2605 configure___ system_malloc=no
2606 #endif
2607
2608 #ifdef TERMINFO
2609 configure___ have_terminfo=yes
2610 #else
2611 configure___ have_terminfo=no
2612 #endif
2613
2614 #ifdef MAIL_USE_FLOCK
2615 configure___ mail_use_flock=yes
2616 #else
2617 configure___ mail_use_flock=no
2618 #endif
2619
2620 #ifdef MAIL_USE_LOCKF
2621 configure___ mail_use_lockf=yes
2622 #else
2623 configure___ mail_use_lockf=no
2624 #endif
2625
2626 #ifdef MAIL_USE_LOCKING
2627 configure___ mail_use_locking=yes
2628 #else
2629 configure___ mail_use_locking=no
2630 #endif
2631
2632 #ifdef HAVE_WIN32_PROCESSES
2633 configure___ win32_processes=yes
2634 #else
2635 configure___ win32_processes=no
2636 #endif
2637
2638 EOF
2639
2640 CPP=`eval "echo $CPP $CPPFLAGS"`
2641 eval `$CPP -Isrc $tempcname \
2642         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2643
2644 rm $tempcname
2645
2646 if test "$pdump" = "yes"; then
2647   ordinary_link="yes"
2648   ld="${ordinary_ld}"
2649   start_files=
2650   libs_standard=
2651   unexec=
2652   lib_gcc=
2653 fi
2654
2655 test "$extra_verbose" = "yes" && \
2656   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 ""
2657
2658 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2659         mingw_include=`eval "dirname $mingw_include"` ;
2660         mingw_include="-I$mingw_include/../include/mingw32" ;
2661         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2662 esac
2663
2664 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2665
2666 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2667
2668 if test "$cflags_specified" = "no"; then
2669       if   test "$GCC" = "yes"; then
2670     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2671               elif test "$__SUNPRO_C" = "yes"; then
2672     case "$opsys" in
2673       sol2    ) CFLAGS="-v -xO4" ;;
2674       sunos4* ) CFLAGS="-xO2";;
2675     esac
2676   elif test "$__DECC" = "yes"; then
2677     CFLAGS="-O3"
2678   elif test "$CC" = "xlc"; then
2679     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2680     else
2681     CFLAGS="-O" ;  fi
2682 fi
2683
2684 if test "$GCC" = "yes"; then
2685 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2686 echo "configure:2687: checking for buggy gcc versions" >&5
2687 GCC_VERSION=`$CC --version`
2688 case `uname -s`:`uname -m`:$GCC_VERSION in
2689                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2690                         case "$CFLAGS" in
2691             *-O2*|*-O3*)
2692                 case "$CFLAGS" in
2693                     *-fno-schedule-insns*) ;;
2694                     *)
2695                         echo "$ac_t""Yes" 1>&6
2696                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2697                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2698                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2699                         ;;
2700                 esac
2701                 ;;
2702         esac
2703         ;;
2704                     Linux:alpha:egcs-2.91.*)
2705         echo "$ac_t""Yes" 1>&6
2706         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2707         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2708         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2709         ;;
2710     *:i*86*:2.7.2*)
2711         case "$GCC_VERSION" in
2712             2.7.2)
2713                 case "$CFLAGS" in
2714                     *-O2*|*-O3*)
2715                         case "$CFLAGS" in
2716                             *-fno-strength-reduce*) ;;
2717                             *)
2718                                 echo "$ac_t""Yes" 1>&6
2719                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2720                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2721                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2722                                 ;;
2723                         esac
2724                         ;;
2725                 esac
2726                 ;;
2727         esac
2728         case "$CFLAGS" in
2729          *-fno-caller-saves*) ;;
2730          *)
2731             echo "$ac_t""Yes" 1>&6
2732             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2733             echo "configure: warning: -fno-caller-saves." 1>&2
2734             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2735             ;;
2736         esac
2737         ;;
2738 esac
2739 fi
2740 echo "$ac_t""No" 1>&6
2741
2742
2743 if test "$GCC" = "yes"; then
2744   set x $ld_switch_system; shift; ld_switch_system=""
2745   while test -n "$1"; do
2746     case $1 in
2747       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2748       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2749       -Xlinker* ) ;;
2750       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2751     esac
2752     shift
2753   done
2754 fi
2755
2756 if test "$GCC" = "yes"; then
2757   set x $ld_switch_machine; shift; ld_switch_machine=""
2758   while test -n "$1"; do
2759     case $1 in
2760       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2761       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2762       -Xlinker* ) ;;
2763       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2764     esac
2765     shift
2766   done
2767 fi
2768
2769 if test "$GCC" = "yes"; then
2770   set x $LDFLAGS; shift; LDFLAGS=""
2771   while test -n "$1"; do
2772     case $1 in
2773       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2774       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2775       -Xlinker* ) ;;
2776       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2777     esac
2778     shift
2779   done
2780 fi
2781
2782 if test "$GCC" = "yes"; then
2783   set x $ld_call_shared; shift; ld_call_shared=""
2784   while test -n "$1"; do
2785     case $1 in
2786       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2787       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2788       -Xlinker* ) ;;
2789       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2790     esac
2791     shift
2792   done
2793 fi
2794
2795 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2796    echo "    xemacs will be linked with \"$objects_machine\""
2797  fi
2798 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2799    echo "    xemacs will be linked with \"$objects_system\""
2800  fi
2801 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2802    echo "    xemacs will be linked with \"$unexec\""
2803  fi
2804 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2805    echo "    xemacs will be linked with \"dumper.o\""
2806  fi
2807
2808 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2809 echo "configure:2810: checking for dynodump" >&5
2810 if test "$unexec" != "unexsol2.o"; then
2811   echo "$ac_t""no" 1>&6
2812 else
2813   echo "$ac_t""yes" 1>&6
2814   { test "$extra_verbose" = "yes" && cat << \EOF
2815     Defining DYNODUMP
2816 EOF
2817 cat >> confdefs.h <<\EOF
2818 #define DYNODUMP 1
2819 EOF
2820 }
2821
2822   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2823   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2824   case "$machine" in
2825     sparc   ) dynodump_arch=sparc ;;
2826     *86*    ) dynodump_arch=i386  ;;
2827     powerpc ) dynodump_arch=ppc   ;;
2828   esac
2829     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
2830 fi
2831
2832
2833 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2834
2835 if test "$unexec" = "unexaix.o"; then
2836   if   test "$dynamic" = "no"; then
2837   start_flags="-Wl,-bnso,-bnodelcsect"
2838   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2839   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2840     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2841   done
2842   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2843     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2844   done
2845   
2846 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2847 echo "configure:2848: checking for terminateAndUnload in -lC" >&5
2848 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2849
2850 xe_check_libs=" -lC "
2851 cat > conftest.$ac_ext <<EOF
2852 #line 2853 "configure"
2853 #include "confdefs.h"
2854 /* Override any gcc2 internal prototype to avoid an error.  */
2855 /* We use char because int might match the return type of a gcc2
2856     builtin and then its argument prototype would still apply.  */
2857 char terminateAndUnload();
2858
2859 int main() {
2860 terminateAndUnload()
2861 ; return 0; }
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2864   rm -rf conftest*
2865   eval "ac_cv_lib_$ac_lib_var=yes"
2866 else
2867   echo "configure: failed program was:" >&5
2868   cat conftest.$ac_ext >&5
2869   rm -rf conftest*
2870   eval "ac_cv_lib_$ac_lib_var=no"
2871 fi
2872 rm -f conftest*
2873 xe_check_libs=""
2874
2875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2876   echo "$ac_t""yes" 1>&6
2877   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2878 else
2879   echo "$ac_t""no" 1>&6
2880 fi
2881
2882
2883   fi
2884 elif test -n "$ld_text_start_addr"; then
2885   start_flags="-T $ld_text_start_addr -e __start"
2886 fi
2887
2888
2889
2890
2891 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2892  test -z "$linker" &&  linker='$(CC) -nostdlib'
2893  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2894 fi
2895 test "$GCC" != "yes" && lib_gcc=
2896
2897
2898
2899
2900
2901 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2902 if test -n "$site_libraries"; then
2903   for arg in $site_libraries; do
2904     case "$arg" in
2905      -* ) ;;
2906      * ) test -d "$arg" || \
2907            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2908        arg="-L${arg}" ;;
2909     esac
2910     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2911   done
2912 fi
2913
2914 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2915 if test -n "$site_includes"; then
2916   for arg in $site_includes; do
2917     case "$arg" in
2918       -* ) ;;
2919       * ) test -d "$arg" || \
2920            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2921       arg="-I${arg}" ;;
2922     esac
2923     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2924   done
2925 fi
2926
2927 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2928 if test -n "$site_prefixes"; then
2929   for dir in $site_prefixes; do
2930     lib_dir="${dir}/lib"
2931     inc_dir="${dir}/include"
2932     if test ! -d "$dir"; then
2933       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2934     elif test ! -d "$lib_dir"; then
2935       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2936     else
2937       if test -d "$inc_dir"; then
2938         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
2939       fi
2940       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
2941     fi
2942   done
2943 fi
2944
2945
2946 for dir in "/usr/ccs/lib"; do
2947   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
2948 done
2949
2950 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2951 if test -n "$site_runtime_libraries"; then
2952   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2953   export LD_RUN_PATH
2954 fi
2955
2956
2957
2958
2959
2960 if test -n "$add_runtime_path"; then :;
2961 elif test "$dynamic" = "no"; then add_runtime_path=no
2962 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2963 else case "$opsys" in
2964        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2965        * ) add_runtime_path=no ;;
2966      esac
2967 fi
2968
2969 if test "$add_runtime_path" = "yes"; then
2970       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2971 echo "configure:2972: checking "for runtime libraries flag"" >&5
2972   case "$opsys" in
2973     sol2 ) dash_r="-R" ;;
2974     decosf* | linux* | irix*) dash_r="-rpath " ;;
2975     *)
2976       dash_r=""
2977       for try_dash_r in "-R" "-R " "-rpath "; do
2978         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2979         
2980 if test "$GCC" = "yes"; then
2981   set x $xe_check_libs; shift; xe_check_libs=""
2982   while test -n "$1"; do
2983     case $1 in
2984       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2985       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2986       -Xlinker* ) ;;
2987       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2988     esac
2989     shift
2990   done
2991 fi
2992         cat > conftest.$ac_ext <<EOF
2993 #line 2994 "configure"
2994 #include "confdefs.h"
2995
2996 int main() {
2997
2998 ; return 0; }
2999 EOF
3000 if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3001   rm -rf conftest*
3002   dash_r="$try_dash_r"
3003 else
3004   echo "configure: failed program was:" >&5
3005   cat conftest.$ac_ext >&5
3006 fi
3007 rm -f conftest*
3008         xe_check_libs=""
3009         test -n "$dash_r" && break
3010       done ;;
3011   esac
3012   if test -n "$dash_r";
3013     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3014     else echo "$ac_t""NONE" 1>&6
3015   fi
3016 fi
3017
3018 xe_add_unique_runpath_dir='
3019   xe_add_p=yes
3020   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3021   done
3022   if test "$xe_add_p" = "yes"; then
3023     test -n "$runpath" && runpath="${runpath}:"
3024     runpath="${runpath}${xe_runpath_dir}"
3025     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3026   fi'
3027
3028
3029
3030
3031 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3032     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3033   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3034   
3035         runpath="" runpath_dirs=""
3036   if test -n "$LD_RUN_PATH"; then
3037     runpath="$LD_RUN_PATH"
3038   elif test "$GCC" = "yes"; then
3039         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3040     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3041     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3042     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3043       case "$arg" in P,* | -L* | -R* )
3044         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3045           {
3046 xe_runpath_dir="$dir"
3047   test "$xe_runpath_dir" != "/lib"     -a \
3048         "$xe_runpath_dir" != "/usr/lib" -a \
3049         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3050   eval "$xe_add_unique_runpath_dir"
3051 }
3052         done ;;
3053       esac
3054     done
3055     ld_switch_run="$ld_switch_run_save"
3056     rm -f conftest*
3057   else
3058         for arg in $ld_switch_site $ld_switch_x_site; do
3059       case "$arg" in -L*) {
3060 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3061   test "$xe_runpath_dir" != "/lib"     -a \
3062         "$xe_runpath_dir" != "/usr/lib" -a \
3063         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3064   eval "$xe_add_unique_runpath_dir"
3065 };; esac
3066     done
3067         if test "$opsys $need_motif" = "sol2 yes"; then
3068       xe_runpath_dir="/opt/SUNWdt/lib";
3069       eval "$xe_add_unique_runpath_dir";
3070     fi
3071   fi 
3072   if test -n "$runpath"; then
3073     ld_switch_run="${dash_r}${runpath}"
3074     
3075 if test "$GCC" = "yes"; then
3076   set x $ld_switch_run; shift; ld_switch_run=""
3077   while test -n "$1"; do
3078     case $1 in
3079       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3080       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3081       -Xlinker* ) ;;
3082       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3083     esac
3084     shift
3085   done
3086 fi
3087     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3088   fi
3089 fi
3090
3091
3092
3093
3094 GNU_MALLOC=yes
3095 if test "$with_dlmalloc" != "no"; then
3096         doug_lea_malloc=yes
3097 else
3098         doug_lea_malloc=no
3099 fi
3100 after_morecore_hook_exists=yes
3101 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3102 echo "configure:3103: checking for malloc_set_state" >&5
3103
3104 cat > conftest.$ac_ext <<EOF
3105 #line 3106 "configure"
3106 #include "confdefs.h"
3107 /* System header to define __stub macros and hopefully few prototypes,
3108     which can conflict with char malloc_set_state(); below.  */
3109 #include <assert.h>
3110 /* Override any gcc2 internal prototype to avoid an error.  */
3111 /* We use char because int might match the return type of a gcc2
3112     builtin and then its argument prototype would still apply.  */
3113 char malloc_set_state();
3114
3115 int main() {
3116
3117 /* The GNU C library defines this for functions which it implements
3118     to always fail with ENOSYS.  Some functions are actually named
3119     something starting with __ and the normal name is an alias.  */
3120 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3121 choke me
3122 #else
3123 malloc_set_state();
3124 #endif
3125
3126 ; return 0; }
3127 EOF
3128 if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3129   rm -rf conftest*
3130   eval "ac_cv_func_malloc_set_state=yes"
3131 else
3132   echo "configure: failed program was:" >&5
3133   cat conftest.$ac_ext >&5
3134   rm -rf conftest*
3135   eval "ac_cv_func_malloc_set_state=no"
3136 fi
3137 rm -f conftest*
3138
3139 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3140   echo "$ac_t""yes" 1>&6
3141   :
3142 else
3143   echo "$ac_t""no" 1>&6
3144 doug_lea_malloc=no
3145 fi
3146
3147 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3148 echo "configure:3149: checking whether __after_morecore_hook exists" >&5
3149 cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152 extern void (* __after_morecore_hook)();
3153 int main() {
3154 __after_morecore_hook = 0
3155 ; return 0; }
3156 EOF
3157 if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3158   rm -rf conftest*
3159   echo "$ac_t""yes" 1>&6
3160 else
3161   echo "configure: failed program was:" >&5
3162   cat conftest.$ac_ext >&5
3163   rm -rf conftest*
3164   echo "$ac_t""no" 1>&6
3165    after_morecore_hook_exists=no
3166 fi
3167 rm -f conftest*
3168 if test "$system_malloc" = "yes" ; then
3169   GNU_MALLOC=no
3170   GNU_MALLOC_reason="
3171     - The GNU allocators don't work with this system configuration."
3172 elif test "$with_system_malloc" = "yes" ; then
3173   GNU_MALLOC=no
3174   GNU_MALLOC_reason="
3175     - User chose not to use GNU allocators."
3176 elif test "$with_debug_malloc" = "yes" ; then
3177   GNU_MALLOC=no
3178   GNU_MALLOC_reason="
3179     - User chose to use Debugging Malloc."
3180 fi
3181
3182 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3183   GNU_MALLOC_reason="
3184     - Using Doug Lea's new malloc from the GNU C Library."
3185   { test "$extra_verbose" = "yes" && cat << \EOF
3186     Defining DOUG_LEA_MALLOC
3187 EOF
3188 cat >> confdefs.h <<\EOF
3189 #define DOUG_LEA_MALLOC 1
3190 EOF
3191 }
3192
3193   if test "$after_morecore_hook_exists" = "no" ; then
3194     GNU_MALLOC_reason="
3195     - Using Doug Lea's new malloc from the Linux C Library."
3196     { test "$extra_verbose" = "yes" && cat << \EOF
3197     Defining _NO_MALLOC_WARNING_
3198 EOF
3199 cat >> confdefs.h <<\EOF
3200 #define _NO_MALLOC_WARNING_ 1
3201 EOF
3202 }
3203
3204   fi
3205 fi
3206
3207
3208
3209
3210 # Extract the first word of "ranlib", so it can be a program name with args.
3211 set dummy ranlib; ac_word=$2
3212 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3213 echo "configure:3214: checking for $ac_word" >&5
3214
3215 if test -n "$RANLIB"; then
3216   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3217 else
3218   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3219   ac_dummy="$PATH"
3220   for ac_dir in $ac_dummy; do
3221     test -z "$ac_dir" && ac_dir=.
3222     if test -f $ac_dir/$ac_word; then
3223       ac_cv_prog_RANLIB="ranlib"
3224       break
3225     fi
3226   done
3227   IFS="$ac_save_ifs"
3228   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3229 fi
3230 RANLIB="$ac_cv_prog_RANLIB"
3231 if test -n "$RANLIB"; then
3232   echo "$ac_t""$RANLIB" 1>&6
3233 else
3234   echo "$ac_t""no" 1>&6
3235 fi
3236
3237 ac_aux_dir=
3238 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3239   if test -f $ac_dir/install-sh; then
3240     ac_aux_dir=$ac_dir
3241     ac_install_sh="$ac_aux_dir/install-sh -c"
3242     break
3243   elif test -f $ac_dir/install.sh; then
3244     ac_aux_dir=$ac_dir
3245     ac_install_sh="$ac_aux_dir/install.sh -c"
3246     break
3247   fi
3248 done
3249 if test -z "$ac_aux_dir"; then
3250   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3251 fi
3252 ac_config_guess=$ac_aux_dir/config.guess
3253 ac_config_sub=$ac_aux_dir/config.sub
3254 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3255
3256 # Find a good install program.  We prefer a C program (faster),
3257 # so one script is as good as another.  But avoid the broken or
3258 # incompatible versions:
3259 # SysV /etc/install, /usr/sbin/install
3260 # SunOS /usr/etc/install
3261 # IRIX /sbin/install
3262 # AIX /bin/install
3263 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3264 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3265 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3266 # ./install, which can be erroneously created by make from ./install.sh.
3267 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3268 echo "configure:3269: checking for a BSD compatible install" >&5
3269 if test -z "$INSTALL"; then
3270
3271   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3272   for ac_dir in $PATH; do
3273     # Account for people who put trailing slashes in PATH elements.
3274     case "$ac_dir/" in
3275     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3276     *)
3277       # OSF1 and SCO ODT 3.0 have their own names for install.
3278       # Don't use installbsd from OSF since it installs stuff as root
3279       # by default.
3280       for ac_prog in ginstall scoinst install; do
3281         if test -f $ac_dir/$ac_prog; then
3282           if test $ac_prog = install &&
3283             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3284             # AIX install.  It has an incompatible calling convention.
3285             :
3286           else
3287             ac_cv_path_install="$ac_dir/$ac_prog -c"
3288             break 2
3289           fi
3290         fi
3291       done
3292       ;;
3293     esac
3294   done
3295   IFS="$ac_save_IFS"
3296
3297   if test "${ac_cv_path_install+set}" = set; then
3298     INSTALL="$ac_cv_path_install"
3299   else
3300     # As a last resort, use the slow shell script.  We don't cache a
3301     # path for INSTALL within a source directory, because that will
3302     # break other packages using the cache if that directory is
3303     # removed, or if the path is relative.
3304     INSTALL="$ac_install_sh"
3305   fi
3306 fi
3307 echo "$ac_t""$INSTALL" 1>&6
3308
3309 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3310 # It thinks the first close brace ends the variable substitution.
3311 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3312
3313 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3314
3315 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3316
3317 for ac_prog in 'bison -y' byacc
3318 do
3319 # Extract the first word of "$ac_prog", so it can be a program name with args.
3320 set dummy $ac_prog; ac_word=$2
3321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3322 echo "configure:3323: checking for $ac_word" >&5
3323
3324 if test -n "$YACC"; then
3325   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3326 else
3327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3328   ac_dummy="$PATH"
3329   for ac_dir in $ac_dummy; do
3330     test -z "$ac_dir" && ac_dir=.
3331     if test -f $ac_dir/$ac_word; then
3332       ac_cv_prog_YACC="$ac_prog"
3333       break
3334     fi
3335   done
3336   IFS="$ac_save_ifs"
3337 fi
3338 YACC="$ac_cv_prog_YACC"
3339 if test -n "$YACC"; then
3340   echo "$ac_t""$YACC" 1>&6
3341 else
3342   echo "$ac_t""no" 1>&6
3343 fi
3344
3345 test -n "$YACC" && break
3346 done
3347 test -n "$YACC" || YACC="yacc"
3348
3349
3350 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/stropts.h   sys/time.h   sys/timeb.h   sys/un.h   kstat.h   ulimit.h   unistd.h   utime.h 
3351 do
3352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3354 echo "configure:3355: checking for $ac_hdr" >&5
3355
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 #include <$ac_hdr>
3360 EOF
3361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3362 { (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3364 if test -z "$ac_err"; then
3365   rm -rf conftest*
3366   eval "ac_cv_header_$ac_safe=yes"
3367 else
3368   echo "$ac_err" >&5
3369   echo "configure: failed program was:" >&5
3370   cat conftest.$ac_ext >&5
3371   rm -rf conftest*
3372   eval "ac_cv_header_$ac_safe=no"
3373 fi
3374 rm -f conftest*
3375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3376   echo "$ac_t""yes" 1>&6
3377     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3378   { test "$extra_verbose" = "yes" && cat << EOF
3379     Defining $ac_tr_hdr
3380 EOF
3381 cat >> confdefs.h <<EOF
3382 #define $ac_tr_hdr 1
3383 EOF
3384 }
3385  
3386 else
3387   echo "$ac_t""no" 1>&6
3388 fi
3389 done
3390
3391 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3392 echo "configure:3393: checking for sys/wait.h that is POSIX.1 compatible" >&5
3393
3394 cat > conftest.$ac_ext <<EOF
3395 #line 3396 "configure"
3396 #include "confdefs.h"
3397 #include <sys/types.h>
3398 #include <sys/wait.h>
3399 #ifndef WEXITSTATUS
3400 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3401 #endif
3402 #ifndef WIFEXITED
3403 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3404 #endif
3405 int main() {
3406 int s;
3407 wait (&s);
3408 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3409 ; return 0; }
3410 EOF
3411 if { (eval echo configure:3412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3412   rm -rf conftest*
3413   ac_cv_header_sys_wait_h=yes
3414 else
3415   echo "configure: failed program was:" >&5
3416   cat conftest.$ac_ext >&5
3417   rm -rf conftest*
3418   ac_cv_header_sys_wait_h=no
3419 fi
3420 rm -f conftest*
3421
3422 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3423 if test $ac_cv_header_sys_wait_h = yes; then
3424   { test "$extra_verbose" = "yes" && cat << \EOF
3425     Defining HAVE_SYS_WAIT_H
3426 EOF
3427 cat >> confdefs.h <<\EOF
3428 #define HAVE_SYS_WAIT_H 1
3429 EOF
3430 }
3431
3432 fi
3433
3434 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3435 echo "configure:3436: checking for ANSI C header files" >&5
3436
3437 cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440 #include <stdlib.h>
3441 #include <stdarg.h>
3442 #include <string.h>
3443 #include <float.h>
3444 EOF
3445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3446 { (eval echo configure:3447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3448 if test -z "$ac_err"; then
3449   rm -rf conftest*
3450   ac_cv_header_stdc=yes
3451 else
3452   echo "$ac_err" >&5
3453   echo "configure: failed program was:" >&5
3454   cat conftest.$ac_ext >&5
3455   rm -rf conftest*
3456   ac_cv_header_stdc=no
3457 fi
3458 rm -f conftest*
3459
3460 if test $ac_cv_header_stdc = yes; then
3461   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3462 cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 #include <string.h>
3466 EOF
3467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3468   egrep "memchr" >/dev/null 2>&1; then
3469   :
3470 else
3471   rm -rf conftest*
3472   ac_cv_header_stdc=no
3473 fi
3474 rm -f conftest*
3475
3476 fi
3477
3478 if test $ac_cv_header_stdc = yes; then
3479   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3480 cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <stdlib.h>
3484 EOF
3485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3486   egrep "free" >/dev/null 2>&1; then
3487   :
3488 else
3489   rm -rf conftest*
3490   ac_cv_header_stdc=no
3491 fi
3492 rm -f conftest*
3493
3494 fi
3495
3496 if test $ac_cv_header_stdc = yes; then
3497   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3498 cat > conftest.$ac_ext <<EOF
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3501 #include <ctype.h>
3502 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3503 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3504 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3505 int main () { int i; for (i = 0; i < 256; i++)
3506 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3507 exit (0); }
3508
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3511 then
3512   :
3513 else
3514   conftest_rc="$?"
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517   rm -fr conftest*
3518   ac_cv_header_stdc=no
3519 fi
3520 rm -fr conftest*
3521 fi
3522
3523 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3524 if test $ac_cv_header_stdc = yes; then
3525   { test "$extra_verbose" = "yes" && cat << \EOF
3526     Defining STDC_HEADERS
3527 EOF
3528 cat >> confdefs.h <<\EOF
3529 #define STDC_HEADERS 1
3530 EOF
3531 }
3532
3533 fi
3534
3535 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3536 echo "configure:3537: checking whether time.h and sys/time.h may both be included" >&5
3537
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #include <sys/types.h>
3542 #include <sys/time.h>
3543 #include <time.h>
3544 int main() {
3545 struct tm *tp;
3546 ; return 0; }
3547 EOF
3548 if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3549   rm -rf conftest*
3550   ac_cv_header_time=yes
3551 else
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   ac_cv_header_time=no
3556 fi
3557 rm -f conftest*
3558
3559 echo "$ac_t""$ac_cv_header_time" 1>&6
3560 if test $ac_cv_header_time = yes; then
3561   { test "$extra_verbose" = "yes" && cat << \EOF
3562     Defining TIME_WITH_SYS_TIME
3563 EOF
3564 cat >> confdefs.h <<\EOF
3565 #define TIME_WITH_SYS_TIME 1
3566 EOF
3567 }
3568
3569 fi
3570
3571 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3572 echo "configure:3573: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3573
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 #include <sys/types.h>
3578 #include <signal.h>
3579 /* NetBSD declares sys_siglist in unistd.h.  */
3580 #ifdef HAVE_UNISTD_H
3581 #include <unistd.h>
3582 #endif
3583 int main() {
3584 char *msg = *(sys_siglist + 1);
3585 ; return 0; }
3586 EOF
3587 if { (eval echo configure:3588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3588   rm -rf conftest*
3589   ac_cv_decl_sys_siglist=yes
3590 else
3591   echo "configure: failed program was:" >&5
3592   cat conftest.$ac_ext >&5
3593   rm -rf conftest*
3594   ac_cv_decl_sys_siglist=no
3595 fi
3596 rm -f conftest*
3597
3598 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3599 if test $ac_cv_decl_sys_siglist = yes; then
3600   { test "$extra_verbose" = "yes" && cat << \EOF
3601     Defining SYS_SIGLIST_DECLARED
3602 EOF
3603 cat >> confdefs.h <<\EOF
3604 #define SYS_SIGLIST_DECLARED 1
3605 EOF
3606 }
3607
3608 fi
3609
3610
3611 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3612 echo "configure:3613: checking for struct utimbuf" >&5
3613 cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616 #ifdef TIME_WITH_SYS_TIME
3617 #include <sys/time.h>
3618 #include <time.h>
3619 #else
3620 #ifdef HAVE_SYS_TIME_H
3621 #include <sys/time.h>
3622 #else
3623 #include <time.h>
3624 #endif
3625 #endif
3626 #ifdef HAVE_UTIME_H
3627 #include <utime.h>
3628 #endif
3629 int main() {
3630 static struct utimbuf x; x.actime = x.modtime;
3631 ; return 0; }
3632 EOF
3633 if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3634   rm -rf conftest*
3635   echo "$ac_t""yes" 1>&6
3636    { test "$extra_verbose" = "yes" && cat << \EOF
3637     Defining HAVE_STRUCT_UTIMBUF
3638 EOF
3639 cat >> confdefs.h <<\EOF
3640 #define HAVE_STRUCT_UTIMBUF 1
3641 EOF
3642 }
3643
3644 else
3645   echo "configure: failed program was:" >&5
3646   cat conftest.$ac_ext >&5
3647   rm -rf conftest*
3648   echo "$ac_t""no" 1>&6
3649 fi
3650 rm -f conftest*
3651
3652 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3653 echo "configure:3654: checking return type of signal handlers" >&5
3654
3655 cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 #include <sys/types.h>
3659 #include <signal.h>
3660 #ifdef signal
3661 #undef signal
3662 #endif
3663 #ifdef __cplusplus
3664 extern "C" void (*signal (int, void (*)(int)))(int);
3665 #else
3666 void (*signal ()) ();
3667 #endif
3668
3669 int main() {
3670 int i;
3671 ; return 0; }
3672 EOF
3673 if { (eval echo configure:3674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3674   rm -rf conftest*
3675   ac_cv_type_signal=void
3676 else
3677   echo "configure: failed program was:" >&5
3678   cat conftest.$ac_ext >&5
3679   rm -rf conftest*
3680   ac_cv_type_signal=int
3681 fi
3682 rm -f conftest*
3683
3684 echo "$ac_t""$ac_cv_type_signal" 1>&6
3685 { test "$extra_verbose" = "yes" && cat << EOF
3686     Defining RETSIGTYPE = $ac_cv_type_signal
3687 EOF
3688 cat >> confdefs.h <<EOF
3689 #define RETSIGTYPE $ac_cv_type_signal
3690 EOF
3691 }
3692
3693
3694 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3695 echo "configure:3696: checking for size_t" >&5
3696
3697 cat > conftest.$ac_ext <<EOF
3698 #line 3699 "configure"
3699 #include "confdefs.h"
3700 #include <sys/types.h>
3701 #if STDC_HEADERS
3702 #include <stdlib.h>
3703 #include <stddef.h>
3704 #endif
3705 EOF
3706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3707   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3708   rm -rf conftest*
3709   ac_cv_type_size_t=yes
3710 else
3711   rm -rf conftest*
3712   ac_cv_type_size_t=no
3713 fi
3714 rm -f conftest*
3715
3716 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3717 if test $ac_cv_type_size_t = no; then
3718   { test "$extra_verbose" = "yes" && cat << \EOF
3719     Defining size_t = unsigned
3720 EOF
3721 cat >> confdefs.h <<\EOF
3722 #define size_t unsigned
3723 EOF
3724 }
3725
3726 fi
3727
3728 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3729 echo "configure:3730: checking for pid_t" >&5
3730
3731 cat > conftest.$ac_ext <<EOF
3732 #line 3733 "configure"
3733 #include "confdefs.h"
3734 #include <sys/types.h>
3735 #if STDC_HEADERS
3736 #include <stdlib.h>
3737 #include <stddef.h>
3738 #endif
3739 EOF
3740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3741   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3742   rm -rf conftest*
3743   ac_cv_type_pid_t=yes
3744 else
3745   rm -rf conftest*
3746   ac_cv_type_pid_t=no
3747 fi
3748 rm -f conftest*
3749
3750 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3751 if test $ac_cv_type_pid_t = no; then
3752   { test "$extra_verbose" = "yes" && cat << \EOF
3753     Defining pid_t = int
3754 EOF
3755 cat >> confdefs.h <<\EOF
3756 #define pid_t int
3757 EOF
3758 }
3759
3760 fi
3761
3762 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3763 echo "configure:3764: checking for uid_t in sys/types.h" >&5
3764
3765 cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768 #include <sys/types.h>
3769 EOF
3770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3771   egrep "uid_t" >/dev/null 2>&1; then
3772   rm -rf conftest*
3773   ac_cv_type_uid_t=yes
3774 else
3775   rm -rf conftest*
3776   ac_cv_type_uid_t=no
3777 fi
3778 rm -f conftest*
3779
3780
3781 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3782 if test $ac_cv_type_uid_t = no; then
3783   { test "$extra_verbose" = "yes" && cat << \EOF
3784     Defining uid_t = int
3785 EOF
3786 cat >> confdefs.h <<\EOF
3787 #define uid_t int
3788 EOF
3789 }
3790
3791   { test "$extra_verbose" = "yes" && cat << \EOF
3792     Defining gid_t = int
3793 EOF
3794 cat >> confdefs.h <<\EOF
3795 #define gid_t int
3796 EOF
3797 }
3798
3799 fi
3800
3801 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3802 echo "configure:3803: checking for mode_t" >&5
3803
3804 cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 #include <sys/types.h>
3808 #if STDC_HEADERS
3809 #include <stdlib.h>
3810 #include <stddef.h>
3811 #endif
3812 EOF
3813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3814   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3815   rm -rf conftest*
3816   ac_cv_type_mode_t=yes
3817 else
3818   rm -rf conftest*
3819   ac_cv_type_mode_t=no
3820 fi
3821 rm -f conftest*
3822
3823 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3824 if test $ac_cv_type_mode_t = no; then
3825   { test "$extra_verbose" = "yes" && cat << \EOF
3826     Defining mode_t = int
3827 EOF
3828 cat >> confdefs.h <<\EOF
3829 #define mode_t int
3830 EOF
3831 }
3832
3833 fi
3834
3835 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3836 echo "configure:3837: checking for off_t" >&5
3837
3838 cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 #include <sys/types.h>
3842 #if STDC_HEADERS
3843 #include <stdlib.h>
3844 #include <stddef.h>
3845 #endif
3846 EOF
3847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3848   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3849   rm -rf conftest*
3850   ac_cv_type_off_t=yes
3851 else
3852   rm -rf conftest*
3853   ac_cv_type_off_t=no
3854 fi
3855 rm -f conftest*
3856
3857 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3858 if test $ac_cv_type_off_t = no; then
3859   { test "$extra_verbose" = "yes" && cat << \EOF
3860     Defining off_t = long
3861 EOF
3862 cat >> confdefs.h <<\EOF
3863 #define off_t long
3864 EOF
3865 }
3866
3867 fi
3868
3869 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3870 echo "configure:3871: checking for ssize_t" >&5
3871
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 #include <sys/types.h>
3876 #if STDC_HEADERS
3877 #include <stdlib.h>
3878 #include <stddef.h>
3879 #endif
3880 EOF
3881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3882   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3883   rm -rf conftest*
3884   ac_cv_type_ssize_t=yes
3885 else
3886   rm -rf conftest*
3887   ac_cv_type_ssize_t=no
3888 fi
3889 rm -f conftest*
3890
3891 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3892 if test $ac_cv_type_ssize_t = no; then
3893   { test "$extra_verbose" = "yes" && cat << \EOF
3894     Defining ssize_t = int
3895 EOF
3896 cat >> confdefs.h <<\EOF
3897 #define ssize_t int
3898 EOF
3899 }
3900
3901 fi
3902
3903
3904 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3905 echo "configure:3906: checking for socklen_t" >&5
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <sys/socket.h>
3910 socklen_t x;
3911
3912 int main() {
3913
3914 ; return 0; }
3915 EOF
3916 if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3917   rm -rf conftest*
3918   echo "$ac_t""yes" 1>&6
3919 else
3920   echo "configure: failed program was:" >&5
3921   cat conftest.$ac_ext >&5
3922   rm -rf conftest*
3923   
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 #include <sys/socket.h>
3928 int accept (int, struct sockaddr *, size_t *);
3929
3930 int main() {
3931
3932 ; return 0; }
3933 EOF
3934 if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3935   rm -rf conftest*
3936   
3937 echo "$ac_t""size_t" 1>&6
3938 { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining socklen_t = size_t
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define socklen_t size_t
3943 EOF
3944 }
3945
3946 else
3947   echo "configure: failed program was:" >&5
3948   cat conftest.$ac_ext >&5
3949   rm -rf conftest*
3950   
3951 echo "$ac_t""int" 1>&6
3952 { test "$extra_verbose" = "yes" && cat << \EOF
3953     Defining socklen_t = int
3954 EOF
3955 cat >> confdefs.h <<\EOF
3956 #define socklen_t int
3957 EOF
3958 }
3959
3960 fi
3961 rm -f conftest*
3962 fi
3963 rm -f conftest*
3964
3965 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3966 echo "configure:3967: checking for struct timeval" >&5
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #ifdef TIME_WITH_SYS_TIME
3971 #include <sys/time.h>
3972 #include <time.h>
3973 #else
3974 #ifdef HAVE_SYS_TIME_H
3975 #include <sys/time.h>
3976 #else
3977 #include <time.h>
3978 #endif
3979 #endif
3980 int main() {
3981 static struct timeval x; x.tv_sec = x.tv_usec;
3982 ; return 0; }
3983 EOF
3984 if { (eval echo configure:3985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3985   rm -rf conftest*
3986   echo "$ac_t""yes" 1>&6
3987   HAVE_TIMEVAL=yes
3988   { test "$extra_verbose" = "yes" && cat << \EOF
3989     Defining HAVE_TIMEVAL
3990 EOF
3991 cat >> confdefs.h <<\EOF
3992 #define HAVE_TIMEVAL 1
3993 EOF
3994 }
3995
3996 else
3997   echo "configure: failed program was:" >&5
3998   cat conftest.$ac_ext >&5
3999   rm -rf conftest*
4000   echo "$ac_t""no" 1>&6
4001    HAVE_TIMEVAL=no
4002 fi
4003 rm -f conftest*
4004
4005 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4006 echo "configure:4007: checking whether struct tm is in sys/time.h or time.h" >&5
4007
4008 cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011 #include <sys/types.h>
4012 #include <time.h>
4013 int main() {
4014 struct tm *tp; tp->tm_sec;
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   ac_cv_struct_tm=time.h
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   ac_cv_struct_tm=sys/time.h
4025 fi
4026 rm -f conftest*
4027
4028 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4029 if test $ac_cv_struct_tm = sys/time.h; then
4030   { test "$extra_verbose" = "yes" && cat << \EOF
4031     Defining TM_IN_SYS_TIME
4032 EOF
4033 cat >> confdefs.h <<\EOF
4034 #define TM_IN_SYS_TIME 1
4035 EOF
4036 }
4037
4038 fi
4039
4040 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4041 echo "configure:4042: checking for tm_zone in struct tm" >&5
4042
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 #include <sys/types.h>
4047 #include <$ac_cv_struct_tm>
4048 int main() {
4049 struct tm tm; tm.tm_zone;
4050 ; return 0; }
4051 EOF
4052 if { (eval echo configure:4053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4053   rm -rf conftest*
4054   ac_cv_struct_tm_zone=yes
4055 else
4056   echo "configure: failed program was:" >&5
4057   cat conftest.$ac_ext >&5
4058   rm -rf conftest*
4059   ac_cv_struct_tm_zone=no
4060 fi
4061 rm -f conftest*
4062
4063 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4064 if test "$ac_cv_struct_tm_zone" = yes; then
4065   { test "$extra_verbose" = "yes" && cat << \EOF
4066     Defining HAVE_TM_ZONE
4067 EOF
4068 cat >> confdefs.h <<\EOF
4069 #define HAVE_TM_ZONE 1
4070 EOF
4071 }
4072
4073 else
4074   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4075 echo "configure:4076: checking for tzname" >&5
4076
4077 cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 #include <time.h>
4081 #ifndef tzname /* For SGI.  */
4082 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4083 #endif
4084 int main() {
4085 atoi(*tzname);
4086 ; return 0; }
4087 EOF
4088 if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4089   rm -rf conftest*
4090   ac_cv_var_tzname=yes
4091 else
4092   echo "configure: failed program was:" >&5
4093   cat conftest.$ac_ext >&5
4094   rm -rf conftest*
4095   ac_cv_var_tzname=no
4096 fi
4097 rm -f conftest*
4098
4099 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4100   if test $ac_cv_var_tzname = yes; then
4101     { test "$extra_verbose" = "yes" && cat << \EOF
4102     Defining HAVE_TZNAME
4103 EOF
4104 cat >> confdefs.h <<\EOF
4105 #define HAVE_TZNAME 1
4106 EOF
4107 }
4108
4109   fi
4110 fi
4111
4112
4113 echo $ac_n "checking for working const""... $ac_c" 1>&6
4114 echo "configure:4115: checking for working const" >&5
4115
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119
4120 int main() {
4121
4122 /* Ultrix mips cc rejects this.  */
4123 typedef int charset[2]; const charset x;
4124 /* SunOS 4.1.1 cc rejects this.  */
4125 char const *const *ccp;
4126 char **p;
4127 /* NEC SVR4.0.2 mips cc rejects this.  */
4128 struct point {int x, y;};
4129 static struct point const zero = {0,0};
4130 /* AIX XL C 1.02.0.0 rejects this.
4131    It does not let you subtract one const X* pointer from another in an arm
4132    of an if-expression whose if-part is not a constant expression */
4133 const char *g = "string";
4134 ccp = &g + (g ? g-g : 0);
4135 /* HPUX 7.0 cc rejects these. */
4136 ++ccp;
4137 p = (char**) ccp;
4138 ccp = (char const *const *) p;
4139 { /* SCO 3.2v4 cc rejects this.  */
4140   char *t;
4141   char const *s = 0 ? (char *) 0 : (char const *) 0;
4142
4143   *t++ = 0;
4144 }
4145 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4146   int x[] = {25, 17};
4147   const int *foo = &x[0];
4148   ++foo;
4149 }
4150 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4151   typedef const int *iptr;
4152   iptr p = 0;
4153   ++p;
4154 }
4155 { /* AIX XL C 1.02.0.0 rejects this saying
4156      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4157   struct s { int j; const int *ap[3]; };
4158   struct s *b; b->j = 5;
4159 }
4160 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4161   const int foo = 10;
4162 }
4163
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4167   rm -rf conftest*
4168   ac_cv_c_const=yes
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   ac_cv_c_const=no
4174 fi
4175 rm -f conftest*
4176
4177 echo "$ac_t""$ac_cv_c_const" 1>&6
4178 if test $ac_cv_c_const = no; then
4179   { test "$extra_verbose" = "yes" && cat << \EOF
4180     Defining const = 
4181 EOF
4182 cat >> confdefs.h <<\EOF
4183 #define const 
4184 EOF
4185 }
4186
4187 fi
4188
4189
4190 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4191 echo "configure:4192: checking whether ${MAKE-make} sets \${MAKE}" >&5
4192 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4193
4194 cat > conftestmake <<\EOF
4195 all:
4196         @echo 'ac_maketemp="${MAKE}"'
4197 EOF
4198 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4199 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4200 if test -n "$ac_maketemp"; then
4201   eval ac_cv_prog_make_${ac_make}_set=yes
4202 else
4203   eval ac_cv_prog_make_${ac_make}_set=no
4204 fi
4205 rm -f conftestmake
4206 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4207   echo "$ac_t""yes" 1>&6
4208   SET_MAKE=
4209 else
4210   echo "$ac_t""no" 1>&6
4211   SET_MAKE="MAKE=${MAKE-make}"
4212 fi
4213
4214
4215 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4216 echo "configure:4217: checking whether byte ordering is bigendian" >&5
4217
4218 ac_cv_c_bigendian=unknown
4219 # See if sys/param.h defines the BYTE_ORDER macro.
4220 cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223 #include <sys/types.h>
4224 #include <sys/param.h>
4225 int main() {
4226
4227 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4228  bogus endian macros
4229 #endif
4230 ; return 0; }
4231 EOF
4232 if { (eval echo configure:4233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4233   rm -rf conftest*
4234   # It does; now see whether it defined to BIG_ENDIAN or not.
4235 cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <sys/types.h>
4239 #include <sys/param.h>
4240 int main() {
4241
4242 #if BYTE_ORDER != BIG_ENDIAN
4243  not big endian
4244 #endif
4245 ; return 0; }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4248   rm -rf conftest*
4249   ac_cv_c_bigendian=yes
4250 else
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   ac_cv_c_bigendian=no
4255 fi
4256 rm -f conftest*
4257 else
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260 fi
4261 rm -f conftest*
4262 if test $ac_cv_c_bigendian = unknown; then
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 main () {
4267   /* Are we little or big endian?  From Harbison&Steele.  */
4268   union
4269   {
4270     long l;
4271     char c[sizeof (long)];
4272   } u;
4273   u.l = 1;
4274   exit (u.c[sizeof (long) - 1] == 1);
4275 }
4276 EOF
4277 if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4278 then
4279   ac_cv_c_bigendian=no
4280 else
4281   conftest_rc="$?"
4282   echo "configure: failed program was:" >&5
4283   cat conftest.$ac_ext >&5
4284   rm -fr conftest*
4285   ac_cv_c_bigendian=yes
4286 fi
4287 rm -fr conftest*
4288 fi
4289
4290 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4291 if test $ac_cv_c_bigendian = yes; then
4292   { test "$extra_verbose" = "yes" && cat << \EOF
4293     Defining WORDS_BIGENDIAN
4294 EOF
4295 cat >> confdefs.h <<\EOF
4296 #define WORDS_BIGENDIAN 1
4297 EOF
4298 }
4299
4300 fi
4301
4302
4303 echo $ac_n "checking size of short""... $ac_c" 1>&6
4304 echo "configure:4305: checking size of short" >&5
4305
4306 cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 #include <stdio.h>
4310 main()
4311 {
4312   FILE *f=fopen("conftestval", "w");
4313   if (!f) exit(1);
4314   fprintf(f, "%d\n", sizeof(short));
4315   exit(0);
4316 }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4319 then
4320   ac_cv_sizeof_short=`cat conftestval`
4321 else
4322   conftest_rc="$?"
4323   echo "configure: failed program was:" >&5
4324   cat conftest.$ac_ext >&5
4325   rm -fr conftest*
4326   ac_cv_sizeof_short=0
4327 fi
4328 rm -fr conftest*
4329 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4330 { test "$extra_verbose" = "yes" && cat << EOF
4331     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4332 EOF
4333 cat >> confdefs.h <<EOF
4334 #define SIZEOF_SHORT $ac_cv_sizeof_short
4335 EOF
4336 }
4337
4338
4339 if test "$ac_cv_sizeof_short" = 0; then
4340   echo ""
4341   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4342   echo "*** PANIC *** Please examine config.log for compilation errors."
4343   exit 1
4344 fi
4345 echo $ac_n "checking size of int""... $ac_c" 1>&6
4346 echo "configure:4347: checking size of int" >&5
4347
4348 cat > conftest.$ac_ext <<EOF
4349 #line 4350 "configure"
4350 #include "confdefs.h"
4351 #include <stdio.h>
4352 main()
4353 {
4354   FILE *f=fopen("conftestval", "w");
4355   if (!f) exit(1);
4356   fprintf(f, "%d\n", sizeof(int));
4357   exit(0);
4358 }
4359 EOF
4360 if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4361 then
4362   ac_cv_sizeof_int=`cat conftestval`
4363 else
4364   conftest_rc="$?"
4365   echo "configure: failed program was:" >&5
4366   cat conftest.$ac_ext >&5
4367   rm -fr conftest*
4368   ac_cv_sizeof_int=0
4369 fi
4370 rm -fr conftest*
4371 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4372 { test "$extra_verbose" = "yes" && cat << EOF
4373     Defining SIZEOF_INT = $ac_cv_sizeof_int
4374 EOF
4375 cat >> confdefs.h <<EOF
4376 #define SIZEOF_INT $ac_cv_sizeof_int
4377 EOF
4378 }
4379
4380
4381 echo $ac_n "checking size of long""... $ac_c" 1>&6
4382 echo "configure:4383: checking size of long" >&5
4383
4384 cat > conftest.$ac_ext <<EOF
4385 #line 4386 "configure"
4386 #include "confdefs.h"
4387 #include <stdio.h>
4388 main()
4389 {
4390   FILE *f=fopen("conftestval", "w");
4391   if (!f) exit(1);
4392   fprintf(f, "%d\n", sizeof(long));
4393   exit(0);
4394 }
4395 EOF
4396 if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4397 then
4398   ac_cv_sizeof_long=`cat conftestval`
4399 else
4400   conftest_rc="$?"
4401   echo "configure: failed program was:" >&5
4402   cat conftest.$ac_ext >&5
4403   rm -fr conftest*
4404   ac_cv_sizeof_long=0
4405 fi
4406 rm -fr conftest*
4407 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4408 { test "$extra_verbose" = "yes" && cat << EOF
4409     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4410 EOF
4411 cat >> confdefs.h <<EOF
4412 #define SIZEOF_LONG $ac_cv_sizeof_long
4413 EOF
4414 }
4415
4416
4417 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4418 echo "configure:4419: checking size of long long" >&5
4419
4420 cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423 #include <stdio.h>
4424 main()
4425 {
4426   FILE *f=fopen("conftestval", "w");
4427   if (!f) exit(1);
4428   fprintf(f, "%d\n", sizeof(long long));
4429   exit(0);
4430 }
4431 EOF
4432 if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4433 then
4434   ac_cv_sizeof_long_long=`cat conftestval`
4435 else
4436   conftest_rc="$?"
4437   echo "configure: failed program was:" >&5
4438   cat conftest.$ac_ext >&5
4439   rm -fr conftest*
4440   ac_cv_sizeof_long_long=0
4441 fi
4442 rm -fr conftest*
4443 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4444 { test "$extra_verbose" = "yes" && cat << EOF
4445     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4446 EOF
4447 cat >> confdefs.h <<EOF
4448 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4449 EOF
4450 }
4451
4452
4453 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4454 echo "configure:4455: checking size of void *" >&5
4455
4456 cat > conftest.$ac_ext <<EOF
4457 #line 4458 "configure"
4458 #include "confdefs.h"
4459 #include <stdio.h>
4460 main()
4461 {
4462   FILE *f=fopen("conftestval", "w");
4463   if (!f) exit(1);
4464   fprintf(f, "%d\n", sizeof(void *));
4465   exit(0);
4466 }
4467 EOF
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4469 then
4470   ac_cv_sizeof_void_p=`cat conftestval`
4471 else
4472   conftest_rc="$?"
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -fr conftest*
4476   ac_cv_sizeof_void_p=0
4477 fi
4478 rm -fr conftest*
4479 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4480 { test "$extra_verbose" = "yes" && cat << EOF
4481     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4482 EOF
4483 cat >> confdefs.h <<EOF
4484 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4485 EOF
4486 }
4487
4488
4489
4490 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4491 echo "configure:4492: checking for long file names" >&5
4492
4493 ac_cv_sys_long_file_names=yes
4494 # Test for long file names in all the places we know might matter:
4495 #      .                the current directory, where building will happen
4496 #      $prefix/lib      where we will be installing things
4497 #      $exec_prefix/lib likewise
4498 # eval it to expand exec_prefix.
4499 #      $TMPDIR          if set, where it might want to write temporary files
4500 # if $TMPDIR is not set:
4501 #      /tmp             where it might want to write temporary files
4502 #      /var/tmp         likewise
4503 #      /usr/tmp         likewise
4504 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4505   ac_tmpdirs="$TMPDIR"
4506 else
4507   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4508 fi
4509 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4510   test -d $ac_dir || continue
4511   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4512   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4513   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4514   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4515   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4516     ac_cv_sys_long_file_names=no
4517     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4518     break
4519   fi
4520   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4521 done
4522
4523 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4524 if test $ac_cv_sys_long_file_names = yes; then
4525   { test "$extra_verbose" = "yes" && cat << \EOF
4526     Defining HAVE_LONG_FILE_NAMES
4527 EOF
4528 cat >> confdefs.h <<\EOF
4529 #define HAVE_LONG_FILE_NAMES 1
4530 EOF
4531 }
4532
4533 fi
4534
4535
4536 echo $ac_n "checking for sin""... $ac_c" 1>&6
4537 echo "configure:4538: checking for sin" >&5
4538
4539 cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542 /* System header to define __stub macros and hopefully few prototypes,
4543     which can conflict with char sin(); below.  */
4544 #include <assert.h>
4545 /* Override any gcc2 internal prototype to avoid an error.  */
4546 /* We use char because int might match the return type of a gcc2
4547     builtin and then its argument prototype would still apply.  */
4548 char sin();
4549
4550 int main() {
4551
4552 /* The GNU C library defines this for functions which it implements
4553     to always fail with ENOSYS.  Some functions are actually named
4554     something starting with __ and the normal name is an alias.  */
4555 #if defined (__stub_sin) || defined (__stub___sin)
4556 choke me
4557 #else
4558 sin();
4559 #endif
4560
4561 ; return 0; }
4562 EOF
4563 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4564   rm -rf conftest*
4565   eval "ac_cv_func_sin=yes"
4566 else
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_func_sin=no"
4571 fi
4572 rm -f conftest*
4573
4574 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4575   echo "$ac_t""yes" 1>&6
4576   :
4577 else
4578   echo "$ac_t""no" 1>&6
4579
4580 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4581 echo "configure:4582: checking for sin in -lm" >&5
4582 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4583
4584 xe_check_libs=" -lm "
4585 cat > conftest.$ac_ext <<EOF
4586 #line 4587 "configure"
4587 #include "confdefs.h"
4588 /* Override any gcc2 internal prototype to avoid an error.  */
4589 /* We use char because int might match the return type of a gcc2
4590     builtin and then its argument prototype would still apply.  */
4591 char sin();
4592
4593 int main() {
4594 sin()
4595 ; return 0; }
4596 EOF
4597 if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4598   rm -rf conftest*
4599   eval "ac_cv_lib_$ac_lib_var=yes"
4600 else
4601   echo "configure: failed program was:" >&5
4602   cat conftest.$ac_ext >&5
4603   rm -rf conftest*
4604   eval "ac_cv_lib_$ac_lib_var=no"
4605 fi
4606 rm -f conftest*
4607 xe_check_libs=""
4608
4609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4610   echo "$ac_t""yes" 1>&6
4611     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4612     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4613   { test "$extra_verbose" = "yes" && cat << EOF
4614     Defining $ac_tr_lib
4615 EOF
4616 cat >> confdefs.h <<EOF
4617 #define $ac_tr_lib 1
4618 EOF
4619 }
4620
4621   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4622
4623 else
4624   echo "$ac_t""no" 1>&6
4625 fi
4626
4627
4628 fi
4629
4630
4631 { test "$extra_verbose" = "yes" && cat << \EOF
4632     Defining LISP_FLOAT_TYPE
4633 EOF
4634 cat >> confdefs.h <<\EOF
4635 #define LISP_FLOAT_TYPE 1
4636 EOF
4637 }
4638
4639
4640 cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 #include <math.h>
4644 int main() {
4645 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4646 ; return 0; }
4647 EOF
4648 if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4649   rm -rf conftest*
4650   { test "$extra_verbose" = "yes" && cat << \EOF
4651     Defining HAVE_INVERSE_HYPERBOLIC
4652 EOF
4653 cat >> confdefs.h <<\EOF
4654 #define HAVE_INVERSE_HYPERBOLIC 1
4655 EOF
4656 }
4657
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661 fi
4662 rm -f conftest*
4663
4664 echo "checking type of mail spool file locking" 1>&6
4665 echo "configure:4666: checking type of mail spool file locking" >&5
4666 for ac_func in lockf flock
4667 do
4668 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4669 echo "configure:4670: checking for $ac_func" >&5
4670
4671 cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674 /* System header to define __stub macros and hopefully few prototypes,
4675     which can conflict with char $ac_func(); below.  */
4676 #include <assert.h>
4677 /* Override any gcc2 internal prototype to avoid an error.  */
4678 /* We use char because int might match the return type of a gcc2
4679     builtin and then its argument prototype would still apply.  */
4680 char $ac_func();
4681
4682 int main() {
4683
4684 /* The GNU C library defines this for functions which it implements
4685     to always fail with ENOSYS.  Some functions are actually named
4686     something starting with __ and the normal name is an alias.  */
4687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4688 choke me
4689 #else
4690 $ac_func();
4691 #endif
4692
4693 ; return 0; }
4694 EOF
4695 if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696   rm -rf conftest*
4697   eval "ac_cv_func_$ac_func=yes"
4698 else
4699   echo "configure: failed program was:" >&5
4700   cat conftest.$ac_ext >&5
4701   rm -rf conftest*
4702   eval "ac_cv_func_$ac_func=no"
4703 fi
4704 rm -f conftest*
4705
4706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4707   echo "$ac_t""yes" 1>&6
4708     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4709   { test "$extra_verbose" = "yes" && cat << EOF
4710     Defining $ac_tr_func
4711 EOF
4712 cat >> confdefs.h <<EOF
4713 #define $ac_tr_func 1
4714 EOF
4715 }
4716  
4717 else
4718   echo "$ac_t""no" 1>&6
4719 fi
4720 done
4721
4722 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4723 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4724 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4725 if   test -z "$mail_locking"; then
4726   case "$opsys" in cygwin* | mingw*)
4727     mail_locking=pop ;;
4728   esac
4729 fi
4730
4731 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4732     Defining MAIL_LOCK_LOCKF
4733 EOF
4734 cat >> confdefs.h <<\EOF
4735 #define MAIL_LOCK_LOCKF 1
4736 EOF
4737 }
4738
4739 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4740     Defining MAIL_LOCK_FLOCK
4741 EOF
4742 cat >> confdefs.h <<\EOF
4743 #define MAIL_LOCK_FLOCK 1
4744 EOF
4745 }
4746
4747 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4748     Defining MAIL_LOCK_LOCKING
4749 EOF
4750 cat >> confdefs.h <<\EOF
4751 #define MAIL_LOCK_LOCKING 1
4752 EOF
4753 }
4754
4755 elif test "$mail_locking" = "pop"; then
4756   with_pop=yes
4757   mail_locking=
4758 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4759     Defining MAIL_LOCK_DOT
4760 EOF
4761 cat >> confdefs.h <<\EOF
4762 #define MAIL_LOCK_DOT 1
4763 EOF
4764 }
4765
4766 fi
4767 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4768   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4769 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4770   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4771 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4772   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4773
4774 case "$opsys" in decosf*)
4775   
4776 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4777 echo "configure:4778: checking for cma_open in -lpthreads" >&5
4778 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4779
4780 xe_check_libs=" -lpthreads "
4781 cat > conftest.$ac_ext <<EOF
4782 #line 4783 "configure"
4783 #include "confdefs.h"
4784 /* Override any gcc2 internal prototype to avoid an error.  */
4785 /* We use char because int might match the return type of a gcc2
4786     builtin and then its argument prototype would still apply.  */
4787 char cma_open();
4788
4789 int main() {
4790 cma_open()
4791 ; return 0; }
4792 EOF
4793 if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4794   rm -rf conftest*
4795   eval "ac_cv_lib_$ac_lib_var=yes"
4796 else
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799   rm -rf conftest*
4800   eval "ac_cv_lib_$ac_lib_var=no"
4801 fi
4802 rm -f conftest*
4803 xe_check_libs=""
4804
4805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4808     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4809   { test "$extra_verbose" = "yes" && cat << EOF
4810     Defining $ac_tr_lib
4811 EOF
4812 cat >> confdefs.h <<EOF
4813 #define $ac_tr_lib 1
4814 EOF
4815 }
4816
4817   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4818
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822
4823
4824   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4825     c_switch_site="$c_switch_site -threads" ;;
4826 esac
4827
4828 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4829 echo "configure:4830: checking whether the -xildoff compiler flag is required" >&5
4830 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4831   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4832     then echo "$ac_t""no" 1>&6;
4833     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
4834   fi
4835   else echo "$ac_t""no" 1>&6
4836 fi
4837
4838 if test "$opsys" = "sol2"; then
4839   if test "$os_release" -ge 56; then
4840     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4841 echo "configure:4842: checking for \"-z ignore\" linker flag" >&5
4842     case "`ld -h 2>&1`" in
4843       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4844         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4845       *) echo "$ac_t""no" 1>&6 ;;
4846     esac
4847   fi
4848 fi
4849
4850
4851 echo "checking "for specified window system"" 1>&6
4852 echo "configure:4853: checking "for specified window system"" >&5
4853
4854 if test "$with_x11" != "no"; then
4855     test "$x_includes $x_libraries" != "NONE NONE" && \
4856    window_system=x11 with_x11=yes
4857
4858         
4859       if test "$x_includes $x_libraries" = "NONE NONE" \
4860     -a -n "$OPENWINHOME" \
4861     -a "$OPENWINHOME" != "/usr/openwin" \
4862     -a -d "$OPENWINHOME"; then
4863       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4864       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4865       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4866   fi
4867
4868   if test "$x_includes" = "NONE"; then
4869                     for dir in "/usr/X11" "/usr/X11R6"; do
4870       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4871     done
4872   fi
4873
4874   if test "$x_libraries" = "NONE"; then
4875     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4876       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4877     done
4878   fi
4879
4880   # If we find X, set shell vars x_includes and x_libraries to the
4881 # paths, otherwise set no_x=yes.
4882 # Uses ac_ vars as temps to allow command line to override cache and checks.
4883 # --without-x overrides everything else, but does not touch the cache.
4884 echo $ac_n "checking for X""... $ac_c" 1>&6
4885 echo "configure:4886: checking for X" >&5
4886
4887 # Check whether --with-x or --without-x was given.
4888 if test "${with_x+set}" = set; then
4889   withval="$with_x"
4890   :
4891 fi
4892
4893 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4894 if test "x$with_x" = xno; then
4895   # The user explicitly disabled X.
4896   have_x=disabled
4897 else
4898   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4899     # Both variables are already set.
4900     have_x=yes
4901   else
4902
4903 # One or both of the vars are not set, and there is no cached value.
4904 ac_x_includes=NO ac_x_libraries=NO
4905 rm -fr conftestdir
4906 if mkdir conftestdir; then
4907   cd conftestdir
4908   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4909   cat > Imakefile <<'EOF'
4910 acfindx:
4911         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4912 EOF
4913   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4914     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4915     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4916     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4917     for ac_extension in a so sl; do
4918       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4919         test -f $ac_im_libdir/libX11.$ac_extension; then
4920         ac_im_usrlibdir=$ac_im_libdir; break
4921       fi
4922     done
4923     # Screen out bogus values from the imake configuration.  They are
4924     # bogus both because they are the default anyway, and because
4925     # using them would break gcc on systems where it needs fixed includes.
4926     case "$ac_im_incroot" in
4927         /usr/include) ;;
4928         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4929     esac
4930     case "$ac_im_usrlibdir" in
4931         /usr/lib | /lib) ;;
4932         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4933     esac
4934   fi
4935   cd ..
4936   rm -fr conftestdir
4937 fi
4938
4939 if test "$ac_x_includes" = NO; then
4940   # Guess where to find include files, by looking for this one X11 .h file.
4941   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4942
4943   # First, try using that file with no special directory specified.
4944 cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947 #include <$x_direct_test_include>
4948 EOF
4949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4950 { (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4952 if test -z "$ac_err"; then
4953   rm -rf conftest*
4954   # We can compile using X headers with no special include directory.
4955 ac_x_includes=
4956 else
4957   echo "$ac_err" >&5
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   # Look for the header file in a standard set of common directories.
4962 # Check X11 before X11Rn because it is often a symlink to the current release.
4963   for ac_dir in               \
4964     /usr/X11/include          \
4965     /usr/X11R6/include        \
4966     /usr/X11R5/include        \
4967     /usr/X11R4/include        \
4968                               \
4969     /usr/include/X11          \
4970     /usr/include/X11R6        \
4971     /usr/include/X11R5        \
4972     /usr/include/X11R4        \
4973                               \
4974     /usr/local/X11/include    \
4975     /usr/local/X11R6/include  \
4976     /usr/local/X11R5/include  \
4977     /usr/local/X11R4/include  \
4978                               \
4979     /usr/local/include/X11    \
4980     /usr/local/include/X11R6  \
4981     /usr/local/include/X11R5  \
4982     /usr/local/include/X11R4  \
4983                               \
4984     /usr/X386/include         \
4985     /usr/x386/include         \
4986     /usr/XFree86/include/X11  \
4987                               \
4988     /usr/include              \
4989     /usr/local/include        \
4990     /usr/unsupported/include  \
4991     /usr/athena/include       \
4992     /usr/local/x11r5/include  \
4993     /usr/lpp/Xamples/include  \
4994                               \
4995     /usr/openwin/include      \
4996     /usr/openwin/share/include \
4997     ; \
4998   do
4999     if test -r "$ac_dir/$x_direct_test_include"; then
5000       ac_x_includes=$ac_dir
5001       break
5002     fi
5003   done
5004 fi
5005 rm -f conftest*
5006 fi # $ac_x_includes = NO
5007
5008 if test "$ac_x_libraries" = NO; then
5009   # Check for the libraries.
5010
5011   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5012   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5013
5014   # See if we find them without any special options.
5015   # Don't add to $LIBS permanently.
5016   ac_save_LIBS="$LIBS"
5017   LIBS="-l$x_direct_test_library $LIBS"
5018 cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021
5022 int main() {
5023 ${x_direct_test_function}()
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027   rm -rf conftest*
5028   LIBS="$ac_save_LIBS"
5029 # We can link X programs with no special library path.
5030 ac_x_libraries=
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   LIBS="$ac_save_LIBS"
5036 # First see if replacing the include by lib works.
5037 # Check X11 before X11Rn because it is often a symlink to the current release.
5038 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5039     /usr/X11/lib          \
5040     /usr/X11R6/lib        \
5041     /usr/X11R5/lib        \
5042     /usr/X11R4/lib        \
5043                           \
5044     /usr/lib/X11          \
5045     /usr/lib/X11R6        \
5046     /usr/lib/X11R5        \
5047     /usr/lib/X11R4        \
5048                           \
5049     /usr/local/X11/lib    \
5050     /usr/local/X11R6/lib  \
5051     /usr/local/X11R5/lib  \
5052     /usr/local/X11R4/lib  \
5053                           \
5054     /usr/local/lib/X11    \
5055     /usr/local/lib/X11R6  \
5056     /usr/local/lib/X11R5  \
5057     /usr/local/lib/X11R4  \
5058                           \
5059     /usr/X386/lib         \
5060     /usr/x386/lib         \
5061     /usr/XFree86/lib/X11  \
5062                           \
5063     /usr/lib              \
5064     /usr/local/lib        \
5065     /usr/unsupported/lib  \
5066     /usr/athena/lib       \
5067     /usr/local/x11r5/lib  \
5068     /usr/lpp/Xamples/lib  \
5069     /lib/usr/lib/X11      \
5070                           \
5071     /usr/openwin/lib      \
5072     /usr/openwin/share/lib \
5073     ; \
5074 do
5075   for ac_extension in a so sl; do
5076     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5077       ac_x_libraries=$ac_dir
5078       break 2
5079     fi
5080   done
5081 done
5082 fi
5083 rm -f conftest*
5084 fi # $ac_x_libraries = NO
5085
5086 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5087   # Didn't find X anywhere.  Cache the known absence of X.
5088   ac_cv_have_x="have_x=no"
5089 else
5090   # Record where we found X for the cache.
5091   ac_cv_have_x="have_x=yes \
5092                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5093 fi
5094   fi
5095   eval "$ac_cv_have_x"
5096 fi # $with_x != no
5097
5098 if test "$have_x" != yes; then
5099   echo "$ac_t""$have_x" 1>&6
5100   no_x=yes
5101 else
5102   # If each of the values was on the command line, it overrides each guess.
5103   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5104   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5105   # Update the cache value to reflect the command line values.
5106   ac_cv_have_x="have_x=yes \
5107                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5108   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5109 fi
5110
5111 if test "$no_x" = yes; then
5112   # Not all programs may use this symbol, but it does not hurt to define it.
5113   { test "$extra_verbose" = "yes" && cat << \EOF
5114     Defining X_DISPLAY_MISSING
5115 EOF
5116 cat >> confdefs.h <<\EOF
5117 #define X_DISPLAY_MISSING 1
5118 EOF
5119 }
5120
5121   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5122 else
5123   if test -n "$x_includes"; then
5124     X_CFLAGS="$X_CFLAGS -I$x_includes"
5125   fi
5126
5127   # It would also be nice to do this for all -L options, not just this one.
5128   if test -n "$x_libraries"; then
5129     X_LIBS="$X_LIBS -L$x_libraries"
5130     # For Solaris; some versions of Sun CC require a space after -R and
5131     # others require no space.  Words are not sufficient . . . .
5132     case "`(uname -sr) 2>/dev/null`" in
5133     "SunOS 5"*)
5134       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5135 echo "configure:5136: checking whether -R must be followed by a space" >&5
5136       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5137       cat > conftest.$ac_ext <<EOF
5138 #line 5139 "configure"
5139 #include "confdefs.h"
5140
5141 int main() {
5142
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   ac_R_nospace=yes
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   ac_R_nospace=no
5153 fi
5154 rm -f conftest*
5155       if test $ac_R_nospace = yes; then
5156         echo "$ac_t""no" 1>&6
5157         X_LIBS="$X_LIBS -R$x_libraries"
5158       else
5159         LIBS="$ac_xsave_LIBS -R $x_libraries"
5160         cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163
5164 int main() {
5165
5166 ; return 0; }
5167 EOF
5168 if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5169   rm -rf conftest*
5170   ac_R_space=yes
5171 else
5172   echo "configure: failed program was:" >&5
5173   cat conftest.$ac_ext >&5
5174   rm -rf conftest*
5175   ac_R_space=no
5176 fi
5177 rm -f conftest*
5178         if test $ac_R_space = yes; then
5179           echo "$ac_t""yes" 1>&6
5180           X_LIBS="$X_LIBS -R $x_libraries"
5181         else
5182           echo "$ac_t""neither works" 1>&6
5183         fi
5184       fi
5185       LIBS="$ac_xsave_LIBS"
5186     esac
5187   fi
5188
5189   # Check for system-dependent libraries X programs must link with.
5190   # Do this before checking for the system-independent R6 libraries
5191   # (-lICE), since we may need -lsocket or whatever for X linking.
5192
5193   if test "$ISC" = yes; then
5194     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5195   else
5196     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5197     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5198     # the Alpha needs dnet_stub (dnet does not exist).
5199     if test "$with_dnet" = "no" ; then
5200 ac_cv_lib_dnet_dnet_ntoa=no
5201 else
5202
5203 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5204 echo "configure:5205: checking for dnet_ntoa in -ldnet" >&5
5205 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5206
5207 xe_check_libs=" -ldnet "
5208 cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 /* Override any gcc2 internal prototype to avoid an error.  */
5212 /* We use char because int might match the return type of a gcc2
5213     builtin and then its argument prototype would still apply.  */
5214 char dnet_ntoa();
5215
5216 int main() {
5217 dnet_ntoa()
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_lib_$ac_lib_var=no"
5228 fi
5229 rm -f conftest*
5230 xe_check_libs=""
5231
5232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5233   echo "$ac_t""yes" 1>&6
5234   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5235 else
5236   echo "$ac_t""no" 1>&6
5237 fi
5238
5239 fi
5240
5241     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5242       
5243 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5244 echo "configure:5245: checking for dnet_ntoa in -ldnet_stub" >&5
5245 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5246
5247 xe_check_libs=" -ldnet_stub "
5248 cat > conftest.$ac_ext <<EOF
5249 #line 5250 "configure"
5250 #include "confdefs.h"
5251 /* Override any gcc2 internal prototype to avoid an error.  */
5252 /* We use char because int might match the return type of a gcc2
5253     builtin and then its argument prototype would still apply.  */
5254 char dnet_ntoa();
5255
5256 int main() {
5257 dnet_ntoa()
5258 ; return 0; }
5259 EOF
5260 if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261   rm -rf conftest*
5262   eval "ac_cv_lib_$ac_lib_var=yes"
5263 else
5264   echo "configure: failed program was:" >&5
5265   cat conftest.$ac_ext >&5
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=no"
5268 fi
5269 rm -f conftest*
5270 xe_check_libs=""
5271
5272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5273   echo "$ac_t""yes" 1>&6
5274   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5275 else
5276   echo "$ac_t""no" 1>&6
5277 fi
5278
5279
5280     fi
5281
5282     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5283     # to get the SysV transport functions.
5284     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5285     # needs -lnsl.
5286     # The nsl library prevents programs from opening the X display
5287     # on Irix 5.2, according to dickey@clark.net.
5288     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5289 echo "configure:5290: checking for gethostbyname" >&5
5290
5291 cat > conftest.$ac_ext <<EOF
5292 #line 5293 "configure"
5293 #include "confdefs.h"
5294 /* System header to define __stub macros and hopefully few prototypes,
5295     which can conflict with char gethostbyname(); below.  */
5296 #include <assert.h>
5297 /* Override any gcc2 internal prototype to avoid an error.  */
5298 /* We use char because int might match the return type of a gcc2
5299     builtin and then its argument prototype would still apply.  */
5300 char gethostbyname();
5301
5302 int main() {
5303
5304 /* The GNU C library defines this for functions which it implements
5305     to always fail with ENOSYS.  Some functions are actually named
5306     something starting with __ and the normal name is an alias.  */
5307 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5308 choke me
5309 #else
5310 gethostbyname();
5311 #endif
5312
5313 ; return 0; }
5314 EOF
5315 if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5316   rm -rf conftest*
5317   eval "ac_cv_func_gethostbyname=yes"
5318 else
5319   echo "configure: failed program was:" >&5
5320   cat conftest.$ac_ext >&5
5321   rm -rf conftest*
5322   eval "ac_cv_func_gethostbyname=no"
5323 fi
5324 rm -f conftest*
5325
5326 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5327   echo "$ac_t""yes" 1>&6
5328   :
5329 else
5330   echo "$ac_t""no" 1>&6
5331 fi
5332
5333     if test $ac_cv_func_gethostbyname = no; then
5334       
5335 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5336 echo "configure:5337: checking for gethostbyname in -lnsl" >&5
5337 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5338
5339 xe_check_libs=" -lnsl "
5340 cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 /* We use char because int might match the return type of a gcc2
5345     builtin and then its argument prototype would still apply.  */
5346 char gethostbyname();
5347
5348 int main() {
5349 gethostbyname()
5350 ; return 0; }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5353   rm -rf conftest*
5354   eval "ac_cv_lib_$ac_lib_var=yes"
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -rf conftest*
5359   eval "ac_cv_lib_$ac_lib_var=no"
5360 fi
5361 rm -f conftest*
5362 xe_check_libs=""
5363
5364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5365   echo "$ac_t""yes" 1>&6
5366   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5367 else
5368   echo "$ac_t""no" 1>&6
5369 fi
5370
5371
5372     fi
5373
5374     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5375     # socket/setsockopt and other routines are undefined under SCO ODT
5376     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5377     # on later versions), says simon@lia.di.epfl.ch: it contains
5378     # gethostby* variants that don't use the nameserver (or something).
5379     # -lsocket must be given before -lnsl if both are needed.
5380     # We assume that if connect needs -lnsl, so does gethostbyname.
5381     echo $ac_n "checking for connect""... $ac_c" 1>&6
5382 echo "configure:5383: checking for connect" >&5
5383
5384 cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387 /* System header to define __stub macros and hopefully few prototypes,
5388     which can conflict with char connect(); below.  */
5389 #include <assert.h>
5390 /* Override any gcc2 internal prototype to avoid an error.  */
5391 /* We use char because int might match the return type of a gcc2
5392     builtin and then its argument prototype would still apply.  */
5393 char connect();
5394
5395 int main() {
5396
5397 /* The GNU C library defines this for functions which it implements
5398     to always fail with ENOSYS.  Some functions are actually named
5399     something starting with __ and the normal name is an alias.  */
5400 #if defined (__stub_connect) || defined (__stub___connect)
5401 choke me
5402 #else
5403 connect();
5404 #endif
5405
5406 ; return 0; }
5407 EOF
5408 if { (eval echo configure:5409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5409   rm -rf conftest*
5410   eval "ac_cv_func_connect=yes"
5411 else
5412   echo "configure: failed program was:" >&5
5413   cat conftest.$ac_ext >&5
5414   rm -rf conftest*
5415   eval "ac_cv_func_connect=no"
5416 fi
5417 rm -f conftest*
5418
5419 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5420   echo "$ac_t""yes" 1>&6
5421   :
5422 else
5423   echo "$ac_t""no" 1>&6
5424 fi
5425
5426     if test $ac_cv_func_connect = no; then
5427       
5428 xe_msg_checking="for connect in -lsocket"
5429 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5430 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5431 echo "configure:5432: checking "$xe_msg_checking"" >&5
5432 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5433
5434 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5435 cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 /* Override any gcc2 internal prototype to avoid an error.  */
5439 /* We use char because int might match the return type of a gcc2
5440     builtin and then its argument prototype would still apply.  */
5441 char connect();
5442
5443 int main() {
5444 connect()
5445 ; return 0; }
5446 EOF
5447 if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5448   rm -rf conftest*
5449   eval "ac_cv_lib_$ac_lib_var=yes"
5450 else
5451   echo "configure: failed program was:" >&5
5452   cat conftest.$ac_ext >&5
5453   rm -rf conftest*
5454   eval "ac_cv_lib_$ac_lib_var=no"
5455 fi
5456 rm -f conftest*
5457 xe_check_libs=""
5458
5459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5460   echo "$ac_t""yes" 1>&6
5461   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5462 else
5463   echo "$ac_t""no" 1>&6
5464 fi
5465
5466
5467     fi
5468
5469     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5470     echo $ac_n "checking for remove""... $ac_c" 1>&6
5471 echo "configure:5472: checking for remove" >&5
5472
5473 cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476 /* System header to define __stub macros and hopefully few prototypes,
5477     which can conflict with char remove(); below.  */
5478 #include <assert.h>
5479 /* Override any gcc2 internal prototype to avoid an error.  */
5480 /* We use char because int might match the return type of a gcc2
5481     builtin and then its argument prototype would still apply.  */
5482 char remove();
5483
5484 int main() {
5485
5486 /* The GNU C library defines this for functions which it implements
5487     to always fail with ENOSYS.  Some functions are actually named
5488     something starting with __ and the normal name is an alias.  */
5489 #if defined (__stub_remove) || defined (__stub___remove)
5490 choke me
5491 #else
5492 remove();
5493 #endif
5494
5495 ; return 0; }
5496 EOF
5497 if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5498   rm -rf conftest*
5499   eval "ac_cv_func_remove=yes"
5500 else
5501   echo "configure: failed program was:" >&5
5502   cat conftest.$ac_ext >&5
5503   rm -rf conftest*
5504   eval "ac_cv_func_remove=no"
5505 fi
5506 rm -f conftest*
5507
5508 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5509   echo "$ac_t""yes" 1>&6
5510   :
5511 else
5512   echo "$ac_t""no" 1>&6
5513 fi
5514
5515     if test $ac_cv_func_remove = no; then
5516       
5517 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5518 echo "configure:5519: checking for remove in -lposix" >&5
5519 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5520
5521 xe_check_libs=" -lposix "
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 /* Override any gcc2 internal prototype to avoid an error.  */
5526 /* We use char because int might match the return type of a gcc2
5527     builtin and then its argument prototype would still apply.  */
5528 char remove();
5529
5530 int main() {
5531 remove()
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535   rm -rf conftest*
5536   eval "ac_cv_lib_$ac_lib_var=yes"
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   eval "ac_cv_lib_$ac_lib_var=no"
5542 fi
5543 rm -f conftest*
5544 xe_check_libs=""
5545
5546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5547   echo "$ac_t""yes" 1>&6
5548   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5549 else
5550   echo "$ac_t""no" 1>&6
5551 fi
5552
5553
5554     fi
5555
5556     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5557     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5558 echo "configure:5559: checking for shmat" >&5
5559
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 /* System header to define __stub macros and hopefully few prototypes,
5564     which can conflict with char shmat(); below.  */
5565 #include <assert.h>
5566 /* Override any gcc2 internal prototype to avoid an error.  */
5567 /* We use char because int might match the return type of a gcc2
5568     builtin and then its argument prototype would still apply.  */
5569 char shmat();
5570
5571 int main() {
5572
5573 /* The GNU C library defines this for functions which it implements
5574     to always fail with ENOSYS.  Some functions are actually named
5575     something starting with __ and the normal name is an alias.  */
5576 #if defined (__stub_shmat) || defined (__stub___shmat)
5577 choke me
5578 #else
5579 shmat();
5580 #endif
5581
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585   rm -rf conftest*
5586   eval "ac_cv_func_shmat=yes"
5587 else
5588   echo "configure: failed program was:" >&5
5589   cat conftest.$ac_ext >&5
5590   rm -rf conftest*
5591   eval "ac_cv_func_shmat=no"
5592 fi
5593 rm -f conftest*
5594
5595 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5596   echo "$ac_t""yes" 1>&6
5597   :
5598 else
5599   echo "$ac_t""no" 1>&6
5600 fi
5601
5602     if test $ac_cv_func_shmat = no; then
5603       
5604 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5605 echo "configure:5606: checking for shmat in -lipc" >&5
5606 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5607
5608 xe_check_libs=" -lipc "
5609 cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612 /* Override any gcc2 internal prototype to avoid an error.  */
5613 /* We use char because int might match the return type of a gcc2
5614     builtin and then its argument prototype would still apply.  */
5615 char shmat();
5616
5617 int main() {
5618 shmat()
5619 ; return 0; }
5620 EOF
5621 if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5622   rm -rf conftest*
5623   eval "ac_cv_lib_$ac_lib_var=yes"
5624 else
5625   echo "configure: failed program was:" >&5
5626   cat conftest.$ac_ext >&5
5627   rm -rf conftest*
5628   eval "ac_cv_lib_$ac_lib_var=no"
5629 fi
5630 rm -f conftest*
5631 xe_check_libs=""
5632
5633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5634   echo "$ac_t""yes" 1>&6
5635   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5636 else
5637   echo "$ac_t""no" 1>&6
5638 fi
5639
5640
5641     fi
5642   fi
5643
5644   # Check for libraries that X11R6 Xt/Xaw programs need.
5645   ac_save_LDFLAGS="$LDFLAGS"
5646   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5647   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5648   # check for ICE first), but we must link in the order -lSM -lICE or
5649   # we get undefined symbols.  So assume we have SM if we have ICE.
5650   # These have to be linked with before -lX11, unlike the other
5651   # libraries we check for below, so use a different variable.
5652   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5653   
5654 xe_msg_checking="for IceConnectionNumber in -lICE"
5655 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5656 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5657 echo "configure:5658: checking "$xe_msg_checking"" >&5
5658 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5659
5660 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5661 cat > conftest.$ac_ext <<EOF
5662 #line 5663 "configure"
5663 #include "confdefs.h"
5664 /* Override any gcc2 internal prototype to avoid an error.  */
5665 /* We use char because int might match the return type of a gcc2
5666     builtin and then its argument prototype would still apply.  */
5667 char IceConnectionNumber();
5668
5669 int main() {
5670 IceConnectionNumber()
5671 ; return 0; }
5672 EOF
5673 if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5674   rm -rf conftest*
5675   eval "ac_cv_lib_$ac_lib_var=yes"
5676 else
5677   echo "configure: failed program was:" >&5
5678   cat conftest.$ac_ext >&5
5679   rm -rf conftest*
5680   eval "ac_cv_lib_$ac_lib_var=no"
5681 fi
5682 rm -f conftest*
5683 xe_check_libs=""
5684
5685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5686   echo "$ac_t""yes" 1>&6
5687   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5688 else
5689   echo "$ac_t""no" 1>&6
5690 fi
5691
5692
5693   LDFLAGS="$ac_save_LDFLAGS"
5694
5695 fi
5696  # Autoconf claims to find X library and include dirs for us.
5697   if test "$no_x" = "yes"
5698   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5699   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5700   fi
5701 fi
5702
5703 case "$with_x11" in
5704   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5705   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5706 esac
5707
5708 if test "$with_x11" = "yes"; then
5709   { test "$extra_verbose" = "yes" && cat << \EOF
5710     Defining HAVE_X_WINDOWS
5711 EOF
5712 cat >> confdefs.h <<\EOF
5713 #define HAVE_X_WINDOWS 1
5714 EOF
5715 }
5716
5717   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5718   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5719
5720       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5721     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5722     if test -d "$lib_dir" -a -d "$inc_dir"; then
5723       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5724         x_libraries="$lib_dir $x_libraries"
5725         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5726       esac
5727       case "$x_includes" in "$inc_dir"* ) ;; *)
5728         x_includes="$inc_dir $x_includes"
5729         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5730       esac
5731       break;       fi
5732   done
5733
5734     for rel in "X11R6" "X11R5" "X11R4"; do
5735     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5736     if test -d "$lib_dir" -a -d "$inc_dir"; then
5737       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5738         x_libraries="$x_libraries $lib_dir"
5739         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5740       esac
5741       case "$x_includes" in "$inc_dir"* ) ;; *)
5742         x_includes="$x_includes $inc_dir"
5743         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5744       esac
5745       break;     fi
5746   done
5747
5748     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
5749
5750   ld_switch_x_site="$X_LIBS"
5751
5752   
5753 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5754     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5755   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5756   
5757         runpath="" runpath_dirs=""
5758   if test -n "$LD_RUN_PATH"; then
5759     runpath="$LD_RUN_PATH"
5760   elif test "$GCC" = "yes"; then
5761         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5762     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5763     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5764     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5765       case "$arg" in P,* | -L* | -R* )
5766         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5767           {
5768 xe_runpath_dir="$dir"
5769   test "$xe_runpath_dir" != "/lib"     -a \
5770         "$xe_runpath_dir" != "/usr/lib" -a \
5771         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5772   eval "$xe_add_unique_runpath_dir"
5773 }
5774         done ;;
5775       esac
5776     done
5777     ld_switch_run="$ld_switch_run_save"
5778     rm -f conftest*
5779   else
5780         for arg in $ld_switch_site $ld_switch_x_site; do
5781       case "$arg" in -L*) {
5782 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5783   test "$xe_runpath_dir" != "/lib"     -a \
5784         "$xe_runpath_dir" != "/usr/lib" -a \
5785         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5786   eval "$xe_add_unique_runpath_dir"
5787 };; esac
5788     done
5789         if test "$opsys $need_motif" = "sol2 yes"; then
5790       xe_runpath_dir="/opt/SUNWdt/lib";
5791       eval "$xe_add_unique_runpath_dir";
5792     fi
5793   fi 
5794   if test -n "$runpath"; then
5795     ld_switch_run="${dash_r}${runpath}"
5796     
5797 if test "$GCC" = "yes"; then
5798   set x $ld_switch_run; shift; ld_switch_run=""
5799   while test -n "$1"; do
5800     case $1 in
5801       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5802       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5803       -Xlinker* ) ;;
5804       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5805     esac
5806     shift
5807   done
5808 fi
5809     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5810   fi
5811 fi
5812
5813
5814   if test "$extra_verbose" = "yes"; then
5815     echo; echo "X11 compilation variables:"
5816     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5817     echo
5818   fi
5819
5820             bitmapdirs=
5821   if test "$x_includes" != NONE; then
5822     for i in $x_includes; do
5823       if test -d "$i/bitmaps"; then
5824         bitmapdirs="$i/bitmaps:$bitmapdirs"
5825       fi
5826       if test -d "$i/X11/bitmaps"; then
5827         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5828       fi
5829     done
5830     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5831   fi
5832   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5833     Defining BITMAPDIR = "$bitmapdirs"
5834 EOF
5835 cat >> confdefs.h <<EOF
5836 #define BITMAPDIR "$bitmapdirs"
5837 EOF
5838 }
5839
5840
5841     echo "checking for X defines extracted by xmkmf" 1>&6
5842 echo "configure:5843: checking for X defines extracted by xmkmf" >&5
5843   rm -fr conftestdir
5844   if mkdir conftestdir; then
5845     cd conftestdir
5846     cat > Imakefile <<'EOF'
5847 xetest:
5848         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5849 EOF
5850     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5851       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5852       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5853     fi
5854     cd ..
5855     rm -fr conftestdir
5856     for word in $xmkmf_defines; do
5857       case "$word" in -D* )
5858         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5859         case "$word" in
5860           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5861           *     ) val=1 ;;
5862         esac
5863         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5864           if test "$val" = "1"
5865             then { test "$extra_verbose" = "yes" && cat << EOF
5866     Defining $sym
5867 EOF
5868 cat >> confdefs.h <<EOF
5869 #define $sym 1
5870 EOF
5871 }
5872
5873             else { test "$extra_verbose" = "yes" && cat << EOF
5874     Defining $sym = $val
5875 EOF
5876 cat >> confdefs.h <<EOF
5877 #define $sym $val
5878 EOF
5879 }
5880
5881           fi
5882         fi  ;;
5883       esac
5884     done
5885   fi
5886
5887     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5888 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5889 echo "configure:5890: checking for X11/Intrinsic.h" >&5
5890
5891 cat > conftest.$ac_ext <<EOF
5892 #line 5893 "configure"
5893 #include "confdefs.h"
5894 #include <X11/Intrinsic.h>
5895 EOF
5896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5897 { (eval echo configure:5898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5899 if test -z "$ac_err"; then
5900   rm -rf conftest*
5901   eval "ac_cv_header_$ac_safe=yes"
5902 else
5903   echo "$ac_err" >&5
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   eval "ac_cv_header_$ac_safe=no"
5908 fi
5909 rm -f conftest*
5910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5911   echo "$ac_t""yes" 1>&6
5912   :
5913 else
5914   echo "$ac_t""no" 1>&6
5915 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5916 fi
5917
5918
5919       
5920 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5921 echo "configure:5922: checking for XOpenDisplay in -lX11" >&5
5922 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5923
5924 xe_check_libs=" -lX11 "
5925 cat > conftest.$ac_ext <<EOF
5926 #line 5927 "configure"
5927 #include "confdefs.h"
5928 /* Override any gcc2 internal prototype to avoid an error.  */
5929 /* We use char because int might match the return type of a gcc2
5930     builtin and then its argument prototype would still apply.  */
5931 char XOpenDisplay();
5932
5933 int main() {
5934 XOpenDisplay()
5935 ; return 0; }
5936 EOF
5937 if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5938   rm -rf conftest*
5939   eval "ac_cv_lib_$ac_lib_var=yes"
5940 else
5941   echo "configure: failed program was:" >&5
5942   cat conftest.$ac_ext >&5
5943   rm -rf conftest*
5944   eval "ac_cv_lib_$ac_lib_var=no"
5945 fi
5946 rm -f conftest*
5947 xe_check_libs=""
5948
5949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5950   echo "$ac_t""yes" 1>&6
5951   have_lib_x11=yes
5952 else
5953   echo "$ac_t""no" 1>&6
5954 fi
5955
5956
5957   if test "$have_lib_x11" != "yes"; then
5958     
5959 xe_msg_checking="for XGetFontProperty in -lX11"
5960 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5961 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5962 echo "configure:5963: checking "$xe_msg_checking"" >&5
5963 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5964
5965 xe_check_libs=" -lX11 -b i486-linuxaout"
5966 cat > conftest.$ac_ext <<EOF
5967 #line 5968 "configure"
5968 #include "confdefs.h"
5969 /* Override any gcc2 internal prototype to avoid an error.  */
5970 /* We use char because int might match the return type of a gcc2
5971     builtin and then its argument prototype would still apply.  */
5972 char XGetFontProperty();
5973
5974 int main() {
5975 XGetFontProperty()
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_lib_$ac_lib_var=yes"
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   eval "ac_cv_lib_$ac_lib_var=no"
5986 fi
5987 rm -f conftest*
5988 xe_check_libs=""
5989
5990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5991   echo "$ac_t""yes" 1>&6
5992   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5993 else
5994   echo "$ac_t""no" 1>&6
5995 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5996 fi
5997
5998
5999   fi
6000   libs_x="-lX11"
6001   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6002
6003     
6004 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6005 echo "configure:6006: checking for XShapeSelectInput in -lXext" >&5
6006 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6007
6008 xe_check_libs=" -lXext "
6009 cat > conftest.$ac_ext <<EOF
6010 #line 6011 "configure"
6011 #include "confdefs.h"
6012 /* Override any gcc2 internal prototype to avoid an error.  */
6013 /* We use char because int might match the return type of a gcc2
6014     builtin and then its argument prototype would still apply.  */
6015 char XShapeSelectInput();
6016
6017 int main() {
6018 XShapeSelectInput()
6019 ; return 0; }
6020 EOF
6021 if { (eval echo configure:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6022   rm -rf conftest*
6023   eval "ac_cv_lib_$ac_lib_var=yes"
6024 else
6025   echo "configure: failed program was:" >&5
6026   cat conftest.$ac_ext >&5
6027   rm -rf conftest*
6028   eval "ac_cv_lib_$ac_lib_var=no"
6029 fi
6030 rm -f conftest*
6031 xe_check_libs=""
6032
6033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6034   echo "$ac_t""yes" 1>&6
6035   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6036 else
6037   echo "$ac_t""no" 1>&6
6038 fi
6039
6040
6041
6042     
6043 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6044 echo "configure:6045: checking for XtOpenDisplay in -lXt" >&5
6045 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6046
6047 xe_check_libs=" -lXt "
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 /* Override any gcc2 internal prototype to avoid an error.  */
6052 /* We use char because int might match the return type of a gcc2
6053     builtin and then its argument prototype would still apply.  */
6054 char XtOpenDisplay();
6055
6056 int main() {
6057 XtOpenDisplay()
6058 ; return 0; }
6059 EOF
6060 if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6061   rm -rf conftest*
6062   eval "ac_cv_lib_$ac_lib_var=yes"
6063 else
6064   echo "configure: failed program was:" >&5
6065   cat conftest.$ac_ext >&5
6066   rm -rf conftest*
6067   eval "ac_cv_lib_$ac_lib_var=no"
6068 fi
6069 rm -f conftest*
6070 xe_check_libs=""
6071
6072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6073   echo "$ac_t""yes" 1>&6
6074   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6075 else
6076   echo "$ac_t""no" 1>&6
6077 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6078 fi
6079
6080
6081
6082   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6083 echo "configure:6084: checking the version of X11 being used" >&5
6084   cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 #include <X11/Intrinsic.h>
6088     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6089 EOF
6090 if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6091 then
6092   ./conftest foobar; x11_release=$?
6093 else
6094   conftest_rc="$?"
6095   echo "configure: failed program was:" >&5
6096   cat conftest.$ac_ext >&5
6097   rm -fr conftest*
6098   x11_release=4
6099 fi
6100 rm -fr conftest*
6101   echo "$ac_t""R${x11_release}" 1>&6
6102   { test "$extra_verbose" = "yes" && cat << EOF
6103     Defining THIS_IS_X11R${x11_release}
6104 EOF
6105 cat >> confdefs.h <<EOF
6106 #define THIS_IS_X11R${x11_release} 1
6107 EOF
6108 }
6109
6110
6111   for ac_func in XConvertCase
6112 do
6113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6114 echo "configure:6115: checking for $ac_func" >&5
6115
6116 cat > conftest.$ac_ext <<EOF
6117 #line 6118 "configure"
6118 #include "confdefs.h"
6119 /* System header to define __stub macros and hopefully few prototypes,
6120     which can conflict with char $ac_func(); below.  */
6121 #include <assert.h>
6122 /* Override any gcc2 internal prototype to avoid an error.  */
6123 /* We use char because int might match the return type of a gcc2
6124     builtin and then its argument prototype would still apply.  */
6125 char $ac_func();
6126
6127 int main() {
6128
6129 /* The GNU C library defines this for functions which it implements
6130     to always fail with ENOSYS.  Some functions are actually named
6131     something starting with __ and the normal name is an alias.  */
6132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6133 choke me
6134 #else
6135 $ac_func();
6136 #endif
6137
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6141   rm -rf conftest*
6142   eval "ac_cv_func_$ac_func=yes"
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   eval "ac_cv_func_$ac_func=no"
6148 fi
6149 rm -f conftest*
6150
6151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6152   echo "$ac_t""yes" 1>&6
6153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6154   { test "$extra_verbose" = "yes" && cat << EOF
6155     Defining $ac_tr_func
6156 EOF
6157 cat >> confdefs.h <<EOF
6158 #define $ac_tr_func 1
6159 EOF
6160 }
6161  
6162 else
6163   echo "$ac_t""no" 1>&6
6164 fi
6165 done
6166
6167
6168   for ac_hdr in X11/Xlocale.h
6169 do
6170 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6171 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6172 echo "configure:6173: checking for $ac_hdr" >&5
6173
6174 cat > conftest.$ac_ext <<EOF
6175 #line 6176 "configure"
6176 #include "confdefs.h"
6177 #include <$ac_hdr>
6178 EOF
6179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6180 { (eval echo configure:6181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6182 if test -z "$ac_err"; then
6183   rm -rf conftest*
6184   eval "ac_cv_header_$ac_safe=yes"
6185 else
6186   echo "$ac_err" >&5
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189   rm -rf conftest*
6190   eval "ac_cv_header_$ac_safe=no"
6191 fi
6192 rm -f conftest*
6193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6196   { test "$extra_verbose" = "yes" && cat << EOF
6197     Defining $ac_tr_hdr
6198 EOF
6199 cat >> confdefs.h <<EOF
6200 #define $ac_tr_hdr 1
6201 EOF
6202 }
6203  
6204 else
6205   echo "$ac_t""no" 1>&6
6206 fi
6207 done
6208
6209
6210     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6211 echo "configure:6212: checking for XFree86" >&5
6212   if test -d "/usr/X386/include" -o \
6213           -f "/etc/XF86Config"    -o \
6214           -f "/etc/X11/XF86Config" -o \
6215           -f "/usr/X11R6/lib/X11/XF86Config"; then
6216     echo "$ac_t""yes" 1>&6
6217     { test "$extra_verbose" = "yes" && cat << \EOF
6218     Defining HAVE_XFREE386
6219 EOF
6220 cat >> confdefs.h <<\EOF
6221 #define HAVE_XFREE386 1
6222 EOF
6223 }
6224
6225   else
6226     echo "$ac_t""no" 1>&6
6227   fi
6228
6229     test -z "$with_xmu" && { 
6230 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6231 echo "configure:6232: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6232 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6233
6234 xe_check_libs=" -lXmu "
6235 cat > conftest.$ac_ext <<EOF
6236 #line 6237 "configure"
6237 #include "confdefs.h"
6238 /* Override any gcc2 internal prototype to avoid an error.  */
6239 /* We use char because int might match the return type of a gcc2
6240     builtin and then its argument prototype would still apply.  */
6241 char XmuReadBitmapDataFromFile();
6242
6243 int main() {
6244 XmuReadBitmapDataFromFile()
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_lib_$ac_lib_var=yes"
6250 else
6251   echo "configure: failed program was:" >&5
6252   cat conftest.$ac_ext >&5
6253   rm -rf conftest*
6254   eval "ac_cv_lib_$ac_lib_var=no"
6255 fi
6256 rm -f conftest*
6257 xe_check_libs=""
6258
6259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6260   echo "$ac_t""yes" 1>&6
6261   with_xmu=yes
6262 else
6263   echo "$ac_t""no" 1>&6
6264 with_xmu=no
6265 fi
6266
6267  }
6268   if test "$with_xmu" = "no"; then
6269     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6270    echo "    xemacs will be linked with \"xmu.o\""
6271  fi
6272   else
6273     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6274     { test "$extra_verbose" = "yes" && cat << \EOF
6275     Defining HAVE_XMU
6276 EOF
6277 cat >> confdefs.h <<\EOF
6278 #define HAVE_XMU 1
6279 EOF
6280 }
6281
6282   fi
6283
6284       
6285 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6286 echo "configure:6287: checking for main in -lXbsd" >&5
6287 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6288
6289 xe_check_libs=" -lXbsd "
6290 cat > conftest.$ac_ext <<EOF
6291 #line 6292 "configure"
6292 #include "confdefs.h"
6293
6294 int main() {
6295 main()
6296 ; return 0; }
6297 EOF
6298 if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6299   rm -rf conftest*
6300   eval "ac_cv_lib_$ac_lib_var=yes"
6301 else
6302   echo "configure: failed program was:" >&5
6303   cat conftest.$ac_ext >&5
6304   rm -rf conftest*
6305   eval "ac_cv_lib_$ac_lib_var=no"
6306 fi
6307 rm -f conftest*
6308 xe_check_libs=""
6309
6310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6311   echo "$ac_t""yes" 1>&6
6312   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6313 else
6314   echo "$ac_t""no" 1>&6
6315 fi
6316
6317
6318
6319     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6320         if test "$GCC" = "yes"; then
6321       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6322       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6323     else
6324       case "$CC" in
6325         "xlc" ) CC="xlc_r" ;;
6326         "xlC" ) CC="xlC_r" ;;
6327         "cc"  ) CC="cc_r" ;;
6328       esac
6329     fi
6330   fi
6331
6332 fi 
6333 if test "$with_msw" != "no"; then
6334   echo "checking for MS-Windows" 1>&6
6335 echo "configure:6336: checking for MS-Windows" >&5
6336   
6337 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6338 echo "configure:6339: checking for main in -lgdi32" >&5
6339 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6340
6341 xe_check_libs=" -lgdi32 "
6342 cat > conftest.$ac_ext <<EOF
6343 #line 6344 "configure"
6344 #include "confdefs.h"
6345
6346 int main() {
6347 main()
6348 ; return 0; }
6349 EOF
6350 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6351   rm -rf conftest*
6352   eval "ac_cv_lib_$ac_lib_var=yes"
6353 else
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -rf conftest*
6357   eval "ac_cv_lib_$ac_lib_var=no"
6358 fi
6359 rm -f conftest*
6360 xe_check_libs=""
6361
6362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6363   echo "$ac_t""yes" 1>&6
6364   with_msw=yes
6365 else
6366   echo "$ac_t""no" 1>&6
6367 fi
6368
6369
6370   if test "$with_msw" = "yes"; then
6371     { test "$extra_verbose" = "yes" && cat << \EOF
6372     Defining HAVE_MS_WINDOWS
6373 EOF
6374 cat >> confdefs.h <<\EOF
6375 #define HAVE_MS_WINDOWS 1
6376 EOF
6377 }
6378
6379     install_pp="$blddir/lib-src/installexe.sh"
6380     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6381     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6382     if test "$window_system" != x11; then
6383         window_system=msw
6384         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6385             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6386    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6387  fi
6388         test "$with_menubars"   != "no" && with_menubars=msw \
6389             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6390    echo "    xemacs will be linked with \"menubar-msw.o\""
6391  fi
6392         test "$with_toolbars"   != "no" && with_toolbars=msw \
6393             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6394    echo "    xemacs will be linked with \"toolbar-msw.o\""
6395  fi
6396         test "$with_dialogs"   != "no" && with_dialogs=msw \
6397             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6398    echo "    xemacs will be linked with \"dialog-msw.o\""
6399  fi
6400         test "$with_widgets"   != "no" && with_widgets=msw
6401     else
6402         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6403    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6404  fi
6405         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6406    echo "    xemacs will be linked with \"menubar-msw.o\""
6407  fi
6408         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6409    echo "    xemacs will be linked with \"toolbar-msw.o\""
6410  fi
6411         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6412    echo "    xemacs will be linked with \"dialog-msw.o\""
6413  fi
6414     fi
6415         cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418 #include <fcntl.h>
6419     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6420 EOF
6421 if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6422 then
6423   { test "$extra_verbose" = "yes" && cat << \EOF
6424     Defining HAVE_MSG_SELECT
6425 EOF
6426 cat >> confdefs.h <<\EOF
6427 #define HAVE_MSG_SELECT 1
6428 EOF
6429 }
6430
6431 else
6432   conftest_rc="$?"
6433   echo "configure: failed program was:" >&5
6434   cat conftest.$ac_ext >&5
6435 fi
6436 rm -fr conftest*
6437     with_file_coding=yes
6438     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
6439    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\""
6440  fi
6441   fi
6442 fi
6443
6444
6445
6446 test -z "$window_system" && window_system="none"
6447
6448 if test "$window_system" = "none"; then
6449   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6450   do
6451     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6452        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6453     fi
6454     eval "with_${feature}=no"
6455   done
6456 else
6457   test -z "$with_toolbars" && with_toolbars=yes
6458 fi
6459
6460 if test "$with_msw" != "yes"; then
6461   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6462   do
6463     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6464        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6465     fi
6466     eval "with_${feature}=no"
6467   done
6468 else
6469   :
6470 fi
6471
6472 if test "$with_x11" != "yes"; then
6473             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6474   do
6475     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6476        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6477     fi
6478     eval "with_${feature}=no"
6479   done
6480 fi
6481
6482 bitmapdir=
6483
6484 case "$window_system" in
6485   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6486   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6487   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6488 esac
6489
6490 case "$x_libraries" in *X11R4* )
6491   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6492   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6493 esac
6494
6495 echo "checking for WM_COMMAND option" 1>&6
6496 echo "configure:6497: checking for WM_COMMAND option" >&5;
6497 if test "$with_wmcommand" != "no"; then
6498   { test "$extra_verbose" = "yes" && cat << \EOF
6499     Defining HAVE_WMCOMMAND
6500 EOF
6501 cat >> confdefs.h <<\EOF
6502 #define HAVE_WMCOMMAND 1
6503 EOF
6504 }
6505
6506 fi
6507
6508 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6509 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6510 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6511 echo "configure:6512: checking for X11/Xauth.h" >&5
6512
6513 cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516 #include <X11/Xauth.h>
6517 EOF
6518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6519 { (eval echo configure:6520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6521 if test -z "$ac_err"; then
6522   rm -rf conftest*
6523   eval "ac_cv_header_$ac_safe=yes"
6524 else
6525   echo "$ac_err" >&5
6526   echo "configure: failed program was:" >&5
6527   cat conftest.$ac_ext >&5
6528   rm -rf conftest*
6529   eval "ac_cv_header_$ac_safe=no"
6530 fi
6531 rm -f conftest*
6532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6533   echo "$ac_t""yes" 1>&6
6534   :
6535 else
6536   echo "$ac_t""no" 1>&6
6537 with_xauth=no
6538 fi
6539  }
6540 test -z "$with_xauth" && { 
6541 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6542 echo "configure:6543: checking for XauGetAuthByAddr in -lXau" >&5
6543 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6544
6545 xe_check_libs=" -lXau "
6546 cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 /* Override any gcc2 internal prototype to avoid an error.  */
6550 /* We use char because int might match the return type of a gcc2
6551     builtin and then its argument prototype would still apply.  */
6552 char XauGetAuthByAddr();
6553
6554 int main() {
6555 XauGetAuthByAddr()
6556 ; return 0; }
6557 EOF
6558 if { (eval echo configure:6559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6559   rm -rf conftest*
6560   eval "ac_cv_lib_$ac_lib_var=yes"
6561 else
6562   echo "configure: failed program was:" >&5
6563   cat conftest.$ac_ext >&5
6564   rm -rf conftest*
6565   eval "ac_cv_lib_$ac_lib_var=no"
6566 fi
6567 rm -f conftest*
6568 xe_check_libs=""
6569
6570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6571   echo "$ac_t""yes" 1>&6
6572   :
6573 else
6574   echo "$ac_t""no" 1>&6
6575 with_xauth=no
6576 fi
6577
6578  }
6579 test -z "$with_xauth" && with_xauth=yes
6580 if test "$with_xauth" = "yes"; then
6581   { test "$extra_verbose" = "yes" && cat << \EOF
6582     Defining HAVE_XAUTH
6583 EOF
6584 cat >> confdefs.h <<\EOF
6585 #define HAVE_XAUTH 1
6586 EOF
6587 }
6588
6589   
6590 T=""
6591 for W in $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
6592 libs_xauth="$T"
6593
6594 fi
6595
6596
6597
6598
6599 if test "$with_tooltalk" != "no" ; then
6600       for dir in "" "Tt/" "desktop/" ; do
6601     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6602 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6603 echo "configure:6604: checking for ${dir}tt_c.h" >&5
6604
6605 cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 #include <${dir}tt_c.h>
6609 EOF
6610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6611 { (eval echo configure:6612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6613 if test -z "$ac_err"; then
6614   rm -rf conftest*
6615   eval "ac_cv_header_$ac_safe=yes"
6616 else
6617   echo "$ac_err" >&5
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_header_$ac_safe=no"
6622 fi
6623 rm -f conftest*
6624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6625   echo "$ac_t""yes" 1>&6
6626   tt_c_h_file="${dir}tt_c.h"; break
6627 else
6628   echo "$ac_t""no" 1>&6
6629 fi
6630
6631   done
6632   if test -z "$tt_c_h_file"; then
6633     if test "$with_tooltalk" = "yes"; then
6634       (echo "$progname: Usage error:"
6635 echo " " "Unable to find required tooltalk header files."
6636 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6637     fi
6638     with_tooltalk=no
6639   fi
6640 fi
6641 if test "$with_tooltalk" != "no" ; then
6642   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6643     
6644 xe_msg_checking="for tt_message_create in -ltt"
6645 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6646 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6647 echo "configure:6648: checking "$xe_msg_checking"" >&5
6648 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6649
6650 xe_check_libs=" -ltt $extra_libs"
6651 cat > conftest.$ac_ext <<EOF
6652 #line 6653 "configure"
6653 #include "confdefs.h"
6654 /* Override any gcc2 internal prototype to avoid an error.  */
6655 /* We use char because int might match the return type of a gcc2
6656     builtin and then its argument prototype would still apply.  */
6657 char tt_message_create();
6658
6659 int main() {
6660 tt_message_create()
6661 ; return 0; }
6662 EOF
6663 if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6664   rm -rf conftest*
6665   eval "ac_cv_lib_$ac_lib_var=yes"
6666 else
6667   echo "configure: failed program was:" >&5
6668   cat conftest.$ac_ext >&5
6669   rm -rf conftest*
6670   eval "ac_cv_lib_$ac_lib_var=no"
6671 fi
6672 rm -f conftest*
6673 xe_check_libs=""
6674
6675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6676   echo "$ac_t""yes" 1>&6
6677   tt_libs="-ltt $extra_libs"; break
6678 else
6679   echo "$ac_t""no" 1>&6
6680 :
6681 fi
6682
6683
6684   done
6685   if test -z "$tt_libs"; then
6686     if test "$with_tooltalk" = "yes"; then
6687       (echo "$progname: Usage error:"
6688 echo " " "Unable to find required tooltalk libraries."
6689 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6690     fi
6691     with_tooltalk=no
6692   fi
6693 fi
6694 test -z "$with_tooltalk" && with_tooltalk=yes
6695 if test "$with_tooltalk" = "yes"; then
6696   { test "$extra_verbose" = "yes" && cat << \EOF
6697     Defining TOOLTALK
6698 EOF
6699 cat >> confdefs.h <<\EOF
6700 #define TOOLTALK 1
6701 EOF
6702 }
6703
6704   { test "$extra_verbose" = "yes" && cat << EOF
6705     Defining TT_C_H_FILE = "$tt_c_h_file"
6706 EOF
6707 cat >> confdefs.h <<EOF
6708 #define TT_C_H_FILE "$tt_c_h_file"
6709 EOF
6710 }
6711
6712   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6713   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6714    echo "    xemacs will be linked with \"tooltalk.o\""
6715  fi
6716 fi
6717
6718 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6719 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6720 echo "configure:6721: checking for Dt/Dt.h" >&5
6721
6722 cat > conftest.$ac_ext <<EOF
6723 #line 6724 "configure"
6724 #include "confdefs.h"
6725 #include <Dt/Dt.h>
6726 EOF
6727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6728 { (eval echo configure:6729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6730 if test -z "$ac_err"; then
6731   rm -rf conftest*
6732   eval "ac_cv_header_$ac_safe=yes"
6733 else
6734   echo "$ac_err" >&5
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_header_$ac_safe=no"
6739 fi
6740 rm -f conftest*
6741 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743   :
6744 else
6745   echo "$ac_t""no" 1>&6
6746 with_cde=no
6747 fi
6748  }
6749 test -z "$with_cde" && { 
6750 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6751 echo "configure:6752: checking for DtDndDragStart in -lDtSvc" >&5
6752 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6753
6754 xe_check_libs=" -lDtSvc "
6755 cat > conftest.$ac_ext <<EOF
6756 #line 6757 "configure"
6757 #include "confdefs.h"
6758 /* Override any gcc2 internal prototype to avoid an error.  */
6759 /* We use char because int might match the return type of a gcc2
6760     builtin and then its argument prototype would still apply.  */
6761 char DtDndDragStart();
6762
6763 int main() {
6764 DtDndDragStart()
6765 ; return 0; }
6766 EOF
6767 if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=yes"
6770 else
6771   echo "configure: failed program was:" >&5
6772   cat conftest.$ac_ext >&5
6773   rm -rf conftest*
6774   eval "ac_cv_lib_$ac_lib_var=no"
6775 fi
6776 rm -f conftest*
6777 xe_check_libs=""
6778
6779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6780   echo "$ac_t""yes" 1>&6
6781   :
6782 else
6783   echo "$ac_t""no" 1>&6
6784 with_cde=no
6785 fi
6786
6787  }
6788 test -z "$with_cde" && with_cde=yes
6789 if test "$with_dragndrop" = no; then
6790   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6791   with_cde=no
6792 fi
6793 if test "$with_cde" = "yes" ; then
6794   { test "$extra_verbose" = "yes" && cat << \EOF
6795     Defining HAVE_CDE
6796 EOF
6797 cat >> confdefs.h <<\EOF
6798 #define HAVE_CDE 1
6799 EOF
6800 }
6801
6802   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6803   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6804   with_tooltalk=yes # CDE requires Tooltalk
6805   need_motif=yes    # CDE requires Motif
6806 fi
6807
6808 test "$window_system" != "x11" && with_offix=no
6809 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6810   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6811   with_offix=no
6812 fi
6813 if test "$with_dragndrop" = no; then
6814   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6815   with_offix=no
6816 fi
6817 if test "$with_cde" = yes; then
6818   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6819   with_offix=no
6820 fi
6821 test -z "$with_offix" && with_offix=no
6822 if test "$with_offix" = "yes"; then
6823   { test "$extra_verbose" = "yes" && cat << \EOF
6824     Defining HAVE_OFFIX_DND
6825 EOF
6826 cat >> confdefs.h <<\EOF
6827 #define HAVE_OFFIX_DND 1
6828 EOF
6829 }
6830
6831   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6832   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6833 fi
6834
6835 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6836 echo "configure:6837: checking if drag and drop API is needed" >&5
6837 if test "$with_dragndrop" != "no" ; then
6838   if test -n "$dragndrop_proto" ; then
6839     with_dragndrop=yes
6840     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6841     { test "$extra_verbose" = "yes" && cat << \EOF
6842     Defining HAVE_DRAGNDROP
6843 EOF
6844 cat >> confdefs.h <<\EOF
6845 #define HAVE_DRAGNDROP 1
6846 EOF
6847 }
6848
6849     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6850   else
6851     with_dragndrop=no
6852     echo "$ac_t""no" 1>&6
6853   fi
6854 fi
6855
6856 echo "checking for LDAP" 1>&6
6857 echo "configure:6858: checking for LDAP" >&5
6858 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6859 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6860 echo "configure:6861: checking for ldap.h" >&5
6861
6862 cat > conftest.$ac_ext <<EOF
6863 #line 6864 "configure"
6864 #include "confdefs.h"
6865 #include <ldap.h>
6866 EOF
6867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6868 { (eval echo configure:6869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6870 if test -z "$ac_err"; then
6871   rm -rf conftest*
6872   eval "ac_cv_header_$ac_safe=yes"
6873 else
6874   echo "$ac_err" >&5
6875   echo "configure: failed program was:" >&5
6876   cat conftest.$ac_ext >&5
6877   rm -rf conftest*
6878   eval "ac_cv_header_$ac_safe=no"
6879 fi
6880 rm -f conftest*
6881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6882   echo "$ac_t""yes" 1>&6
6883   :
6884 else
6885   echo "$ac_t""no" 1>&6
6886 with_ldap=no
6887 fi
6888  }
6889 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6890 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6891 echo "configure:6892: checking for lber.h" >&5
6892
6893 cat > conftest.$ac_ext <<EOF
6894 #line 6895 "configure"
6895 #include "confdefs.h"
6896 #include <lber.h>
6897 EOF
6898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6899 { (eval echo configure:6900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6901 if test -z "$ac_err"; then
6902   rm -rf conftest*
6903   eval "ac_cv_header_$ac_safe=yes"
6904 else
6905   echo "$ac_err" >&5
6906   echo "configure: failed program was:" >&5
6907   cat conftest.$ac_ext >&5
6908   rm -rf conftest*
6909   eval "ac_cv_header_$ac_safe=no"
6910 fi
6911 rm -f conftest*
6912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6913   echo "$ac_t""yes" 1>&6
6914   :
6915 else
6916   echo "$ac_t""no" 1>&6
6917 with_ldap=no
6918 fi
6919  }
6920 if test "$with_ldap" != "no"; then
6921   
6922 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6923 echo "configure:6924: checking for ldap_search in -lldap" >&5
6924 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6925
6926 xe_check_libs=" -lldap "
6927 cat > conftest.$ac_ext <<EOF
6928 #line 6929 "configure"
6929 #include "confdefs.h"
6930 /* Override any gcc2 internal prototype to avoid an error.  */
6931 /* We use char because int might match the return type of a gcc2
6932     builtin and then its argument prototype would still apply.  */
6933 char ldap_search();
6934
6935 int main() {
6936 ldap_search()
6937 ; return 0; }
6938 EOF
6939 if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6940   rm -rf conftest*
6941   eval "ac_cv_lib_$ac_lib_var=yes"
6942 else
6943   echo "configure: failed program was:" >&5
6944   cat conftest.$ac_ext >&5
6945   rm -rf conftest*
6946   eval "ac_cv_lib_$ac_lib_var=no"
6947 fi
6948 rm -f conftest*
6949 xe_check_libs=""
6950
6951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6952   echo "$ac_t""yes" 1>&6
6953   with_ldap_nolber=yes
6954 else
6955   echo "$ac_t""no" 1>&6
6956 with_ldap_nolber=no
6957 fi
6958
6959
6960   test "$with_ldap_nolber" = "no" && { 
6961 xe_msg_checking="for ldap_open in -lldap"
6962 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6963 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6964 echo "configure:6965: checking "$xe_msg_checking"" >&5
6965 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6966
6967 xe_check_libs=" -lldap -llber"
6968 cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971 /* Override any gcc2 internal prototype to avoid an error.  */
6972 /* We use char because int might match the return type of a gcc2
6973     builtin and then its argument prototype would still apply.  */
6974 char ldap_open();
6975
6976 int main() {
6977 ldap_open()
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   eval "ac_cv_lib_$ac_lib_var=yes"
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_lib_$ac_lib_var=no"
6988 fi
6989 rm -f conftest*
6990 xe_check_libs=""
6991
6992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6993   echo "$ac_t""yes" 1>&6
6994   with_ldap_lber=yes
6995 else
6996   echo "$ac_t""no" 1>&6
6997 with_ldap_lber=no
6998 fi
6999
7000  }
7001   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7002 xe_msg_checking="for ldap_open in -lldap"
7003 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7004 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7005 echo "configure:7006: checking "$xe_msg_checking"" >&5
7006 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7007
7008 xe_check_libs=" -lldap -llber -lkrb"
7009 cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012 /* Override any gcc2 internal prototype to avoid an error.  */
7013 /* We use char because int might match the return type of a gcc2
7014     builtin and then its argument prototype would still apply.  */
7015 char ldap_open();
7016
7017 int main() {
7018 ldap_open()
7019 ; return 0; }
7020 EOF
7021 if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7022   rm -rf conftest*
7023   eval "ac_cv_lib_$ac_lib_var=yes"
7024 else
7025   echo "configure: failed program was:" >&5
7026   cat conftest.$ac_ext >&5
7027   rm -rf conftest*
7028   eval "ac_cv_lib_$ac_lib_var=no"
7029 fi
7030 rm -f conftest*
7031 xe_check_libs=""
7032
7033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7034   echo "$ac_t""yes" 1>&6
7035   with_ldap_krb=yes
7036 else
7037   echo "$ac_t""no" 1>&6
7038 with_ldap_krb=no
7039 fi
7040
7041  }
7042   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7043 xe_msg_checking="for ldap_open in -lldap"
7044 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7045 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7046 echo "configure:7047: checking "$xe_msg_checking"" >&5
7047 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7048
7049 xe_check_libs=" -lldap -llber -lkrb -ldes"
7050 cat > conftest.$ac_ext <<EOF
7051 #line 7052 "configure"
7052 #include "confdefs.h"
7053 /* Override any gcc2 internal prototype to avoid an error.  */
7054 /* We use char because int might match the return type of a gcc2
7055     builtin and then its argument prototype would still apply.  */
7056 char ldap_open();
7057
7058 int main() {
7059 ldap_open()
7060 ; return 0; }
7061 EOF
7062 if { (eval echo configure:7063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7063   rm -rf conftest*
7064   eval "ac_cv_lib_$ac_lib_var=yes"
7065 else
7066   echo "configure: failed program was:" >&5
7067   cat conftest.$ac_ext >&5
7068   rm -rf conftest*
7069   eval "ac_cv_lib_$ac_lib_var=no"
7070 fi
7071 rm -f conftest*
7072 xe_check_libs=""
7073
7074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7075   echo "$ac_t""yes" 1>&6
7076   with_ldap_krbdes=yes
7077 else
7078   echo "$ac_t""no" 1>&6
7079 with_ldap_krbdes=no
7080 fi
7081
7082  }
7083   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
7084 fi
7085 if test "$with_ldap" = "yes"; then
7086   { test "$extra_verbose" = "yes" && cat << \EOF
7087     Defining HAVE_LDAP
7088 EOF
7089 cat >> confdefs.h <<\EOF
7090 #define HAVE_LDAP 1
7091 EOF
7092 }
7093
7094   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7095    echo "    xemacs will be linked with \"eldap.o\""
7096  fi
7097   if test "$with_ldap_nolber" = "yes" ; then
7098     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7099   else
7100     if test "$with_ldap_krb" = "yes" ; then
7101       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7102     fi
7103     if test "$with_ldap_krbdes" = "yes" ; then
7104       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7105       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7106     fi
7107     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7108     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7109   fi
7110   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7111 do
7112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7113 echo "configure:7114: checking for $ac_func" >&5
7114
7115 cat > conftest.$ac_ext <<EOF
7116 #line 7117 "configure"
7117 #include "confdefs.h"
7118 /* System header to define __stub macros and hopefully few prototypes,
7119     which can conflict with char $ac_func(); below.  */
7120 #include <assert.h>
7121 /* Override any gcc2 internal prototype to avoid an error.  */
7122 /* We use char because int might match the return type of a gcc2
7123     builtin and then its argument prototype would still apply.  */
7124 char $ac_func();
7125
7126 int main() {
7127
7128 /* The GNU C library defines this for functions which it implements
7129     to always fail with ENOSYS.  Some functions are actually named
7130     something starting with __ and the normal name is an alias.  */
7131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7132 choke me
7133 #else
7134 $ac_func();
7135 #endif
7136
7137 ; return 0; }
7138 EOF
7139 if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7140   rm -rf conftest*
7141   eval "ac_cv_func_$ac_func=yes"
7142 else
7143   echo "configure: failed program was:" >&5
7144   cat conftest.$ac_ext >&5
7145   rm -rf conftest*
7146   eval "ac_cv_func_$ac_func=no"
7147 fi
7148 rm -f conftest*
7149
7150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7151   echo "$ac_t""yes" 1>&6
7152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7153   { test "$extra_verbose" = "yes" && cat << EOF
7154     Defining $ac_tr_func
7155 EOF
7156 cat >> confdefs.h <<EOF
7157 #define $ac_tr_func 1
7158 EOF
7159 }
7160  
7161 else
7162   echo "$ac_t""no" 1>&6
7163 fi
7164 done
7165
7166 fi
7167
7168 if test "$with_postgresql" != "no"; then
7169   echo "checking for PostgreSQL" 1>&6
7170 echo "configure:7171: checking for PostgreSQL" >&5
7171
7172   for header_dir in "" "pgsql/" "postgresql/"; do
7173     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7174 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7175 echo "configure:7176: checking for ${header_dir}libpq-fe.h" >&5
7176
7177 cat > conftest.$ac_ext <<EOF
7178 #line 7179 "configure"
7179 #include "confdefs.h"
7180 #include <${header_dir}libpq-fe.h>
7181 EOF
7182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7183 { (eval echo configure:7184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7185 if test -z "$ac_err"; then
7186   rm -rf conftest*
7187   eval "ac_cv_header_$ac_safe=yes"
7188 else
7189   echo "$ac_err" >&5
7190   echo "configure: failed program was:" >&5
7191   cat conftest.$ac_ext >&5
7192   rm -rf conftest*
7193   eval "ac_cv_header_$ac_safe=no"
7194 fi
7195 rm -f conftest*
7196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7197   echo "$ac_t""yes" 1>&6
7198   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7199 else
7200   echo "$ac_t""no" 1>&6
7201 fi
7202
7203   done
7204
7205   test -n "$libpq_fe_h_file" && { 
7206 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7207 echo "configure:7208: checking for PQconnectdb in -lpq" >&5
7208 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7209
7210 xe_check_libs=" -lpq "
7211 cat > conftest.$ac_ext <<EOF
7212 #line 7213 "configure"
7213 #include "confdefs.h"
7214 /* Override any gcc2 internal prototype to avoid an error.  */
7215 /* We use char because int might match the return type of a gcc2
7216     builtin and then its argument prototype would still apply.  */
7217 char PQconnectdb();
7218
7219 int main() {
7220 PQconnectdb()
7221 ; return 0; }
7222 EOF
7223 if { (eval echo configure:7224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7224   rm -rf conftest*
7225   eval "ac_cv_lib_$ac_lib_var=yes"
7226 else
7227   echo "configure: failed program was:" >&5
7228   cat conftest.$ac_ext >&5
7229   rm -rf conftest*
7230   eval "ac_cv_lib_$ac_lib_var=no"
7231 fi
7232 rm -f conftest*
7233 xe_check_libs=""
7234
7235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7236   echo "$ac_t""yes" 1>&6
7237   have_libpq=yes
7238 else
7239   echo "$ac_t""no" 1>&6
7240 fi
7241
7242  }
7243
7244   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7245     with_postgresql=yes
7246     { test "$extra_verbose" = "yes" && cat << \EOF
7247     Defining HAVE_POSTGRESQL
7248 EOF
7249 cat >> confdefs.h <<\EOF
7250 #define HAVE_POSTGRESQL 1
7251 EOF
7252 }
7253
7254     
7255 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7256 echo "configure:7257: checking for PQconnectStart in -lpq" >&5
7257 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7258
7259 xe_check_libs=" -lpq "
7260 cat > conftest.$ac_ext <<EOF
7261 #line 7262 "configure"
7262 #include "confdefs.h"
7263 /* Override any gcc2 internal prototype to avoid an error.  */
7264 /* We use char because int might match the return type of a gcc2
7265     builtin and then its argument prototype would still apply.  */
7266 char PQconnectStart();
7267
7268 int main() {
7269 PQconnectStart()
7270 ; return 0; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7273   rm -rf conftest*
7274   eval "ac_cv_lib_$ac_lib_var=yes"
7275 else
7276   echo "configure: failed program was:" >&5
7277   cat conftest.$ac_ext >&5
7278   rm -rf conftest*
7279   eval "ac_cv_lib_$ac_lib_var=no"
7280 fi
7281 rm -f conftest*
7282 xe_check_libs=""
7283
7284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7285   echo "$ac_t""yes" 1>&6
7286   with_postgresqlv7=yes;
7287                  { test "$extra_verbose" = "yes" && cat << \EOF
7288     Defining HAVE_POSTGRESQLV7
7289 EOF
7290 cat >> confdefs.h <<\EOF
7291 #define HAVE_POSTGRESQLV7 1
7292 EOF
7293 }
7294
7295 else
7296   echo "$ac_t""no" 1>&6
7297 fi
7298
7299
7300     { test "$extra_verbose" = "yes" && cat << EOF
7301     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7302 EOF
7303 cat >> confdefs.h <<EOF
7304 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7305 EOF
7306 }
7307
7308     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7309     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7310    echo "    xemacs will be linked with \"postgresql.o\""
7311  fi
7312   elif test "$with_postgresql" = "yes"; then
7313     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7314   fi
7315 fi
7316
7317
7318 if test "$window_system" != "none"; then
7319   echo "checking for graphics libraries" 1>&6
7320 echo "configure:7321: checking for graphics libraries" >&5
7321
7322     xpm_problem=""
7323   if test -z "$with_xpm"; then
7324     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7325 echo "configure:7326: checking for Xpm - no older than 3.4f" >&5
7326     xe_check_libs=-lXpm
7327     cat > conftest.$ac_ext <<EOF
7328 #line 7329 "configure"
7329 #include "confdefs.h"
7330 #define XPM_NUMBERS
7331 #include <X11/xpm.h>
7332     int main(int c, char **v) {
7333     return c == 1 ? 0 :
7334       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7335       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7336 EOF
7337 if { (eval echo configure:7338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7338 then
7339   ./conftest dummy_arg; xpm_status=$?;
7340       if test "$xpm_status" = "0"; then
7341         with_xpm=yes;
7342       else
7343         with_xpm=no;
7344         if test "$xpm_status" = "1"; then
7345           xpm_problem="Xpm library version and header file version don't match!"
7346         elif test "$xpm_status" = "2"; then
7347           xpm_problem="Xpm library version is too old!"
7348         else
7349           xpm_problem="Internal xpm detection logic error!"
7350         fi
7351         echo "
7352 *** WARNING *** $xpm_problem
7353   I'm not touching that with a 10-foot pole!
7354   If you really want to use the installed version of Xpm, rerun
7355   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7356     fi
7357 else
7358   conftest_rc="$?"
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -fr conftest*
7362   with_xpm=no
7363 fi
7364 rm -fr conftest*
7365     xe_check_libs=
7366     echo "$ac_t""$with_xpm" 1>&6
7367   fi
7368   if test "$with_xpm" = "yes"; then
7369     { test "$extra_verbose" = "yes" && cat << \EOF
7370     Defining HAVE_XPM
7371 EOF
7372 cat >> confdefs.h <<\EOF
7373 #define HAVE_XPM 1
7374 EOF
7375 }
7376
7377     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7378     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7379 echo "configure:7380: checking for \"FOR_MSW\" xpm" >&5
7380     xe_check_libs=-lXpm
7381     cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7384
7385 int main() {
7386 XpmCreatePixmapFromData()
7387 ; return 0; }
7388 EOF
7389 if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7390   rm -rf conftest*
7391   xpm_for_msw=no
7392 else
7393   echo "configure: failed program was:" >&5
7394   cat conftest.$ac_ext >&5
7395   rm -rf conftest*
7396   xpm_for_msw=yes
7397 fi
7398 rm -f conftest*
7399     xe_check_libs=
7400     echo "$ac_t""$xpm_for_msw" 1>&6
7401     if test "$xpm_for_msw" = "yes"; then
7402       { test "$extra_verbose" = "yes" && cat << \EOF
7403     Defining FOR_MSW
7404 EOF
7405 cat >> confdefs.h <<\EOF
7406 #define FOR_MSW 1
7407 EOF
7408 }
7409
7410     fi
7411   fi
7412
7413     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7414 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7415 echo "configure:7416: checking for compface.h" >&5
7416
7417 cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 #include <compface.h>
7421 EOF
7422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7423 { (eval echo configure:7424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7425 if test -z "$ac_err"; then
7426   rm -rf conftest*
7427   eval "ac_cv_header_$ac_safe=yes"
7428 else
7429   echo "$ac_err" >&5
7430   echo "configure: failed program was:" >&5
7431   cat conftest.$ac_ext >&5
7432   rm -rf conftest*
7433   eval "ac_cv_header_$ac_safe=no"
7434 fi
7435 rm -f conftest*
7436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438   :
7439 else
7440   echo "$ac_t""no" 1>&6
7441 with_xface=no
7442 fi
7443  }
7444   test -z "$with_xface" && { 
7445 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7446 echo "configure:7447: checking for UnGenFace in -lcompface" >&5
7447 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7448
7449 xe_check_libs=" -lcompface "
7450 cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 /* Override any gcc2 internal prototype to avoid an error.  */
7454 /* We use char because int might match the return type of a gcc2
7455     builtin and then its argument prototype would still apply.  */
7456 char UnGenFace();
7457
7458 int main() {
7459 UnGenFace()
7460 ; return 0; }
7461 EOF
7462 if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7463   rm -rf conftest*
7464   eval "ac_cv_lib_$ac_lib_var=yes"
7465 else
7466   echo "configure: failed program was:" >&5
7467   cat conftest.$ac_ext >&5
7468   rm -rf conftest*
7469   eval "ac_cv_lib_$ac_lib_var=no"
7470 fi
7471 rm -f conftest*
7472 xe_check_libs=""
7473
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7475   echo "$ac_t""yes" 1>&6
7476   : 
7477 else
7478   echo "$ac_t""no" 1>&6
7479 with_xface=no
7480 fi
7481
7482  }
7483   test -z "$with_xface" && with_xface=yes
7484   if test "$with_xface" = "yes"; then
7485     { test "$extra_verbose" = "yes" && cat << \EOF
7486     Defining HAVE_XFACE
7487 EOF
7488 cat >> confdefs.h <<\EOF
7489 #define HAVE_XFACE 1
7490 EOF
7491 }
7492
7493     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7494   fi
7495
7496         if test "$with_gif" != "no"; then
7497     with_gif="yes"
7498     { test "$extra_verbose" = "yes" && cat << \EOF
7499     Defining HAVE_GIF
7500 EOF
7501 cat >> confdefs.h <<\EOF
7502 #define HAVE_GIF 1
7503 EOF
7504 }
7505
7506     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7507    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7508  fi
7509   fi
7510
7511       if test "$with_png $with_tiff" != "no no"; then
7512     
7513 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7514 echo "configure:7515: checking for inflate in -lc" >&5
7515 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7516
7517 xe_check_libs=" -lc "
7518 cat > conftest.$ac_ext <<EOF
7519 #line 7520 "configure"
7520 #include "confdefs.h"
7521 /* Override any gcc2 internal prototype to avoid an error.  */
7522 /* We use char because int might match the return type of a gcc2
7523     builtin and then its argument prototype would still apply.  */
7524 char inflate();
7525
7526 int main() {
7527 inflate()
7528 ; return 0; }
7529 EOF
7530 if { (eval echo configure:7531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7531   rm -rf conftest*
7532   eval "ac_cv_lib_$ac_lib_var=yes"
7533 else
7534   echo "configure: failed program was:" >&5
7535   cat conftest.$ac_ext >&5
7536   rm -rf conftest*
7537   eval "ac_cv_lib_$ac_lib_var=no"
7538 fi
7539 rm -f conftest*
7540 xe_check_libs=""
7541
7542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7543   echo "$ac_t""yes" 1>&6
7544   :
7545 else
7546   echo "$ac_t""no" 1>&6
7547
7548 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7549 echo "configure:7550: checking for inflate in -lz" >&5
7550 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7551
7552 xe_check_libs=" -lz "
7553 cat > conftest.$ac_ext <<EOF
7554 #line 7555 "configure"
7555 #include "confdefs.h"
7556 /* Override any gcc2 internal prototype to avoid an error.  */
7557 /* We use char because int might match the return type of a gcc2
7558     builtin and then its argument prototype would still apply.  */
7559 char inflate();
7560
7561 int main() {
7562 inflate()
7563 ; return 0; }
7564 EOF
7565 if { (eval echo configure:7566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7566   rm -rf conftest*
7567   eval "ac_cv_lib_$ac_lib_var=yes"
7568 else
7569   echo "configure: failed program was:" >&5
7570   cat conftest.$ac_ext >&5
7571   rm -rf conftest*
7572   eval "ac_cv_lib_$ac_lib_var=no"
7573 fi
7574 rm -f conftest*
7575 xe_check_libs=""
7576
7577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7578   echo "$ac_t""yes" 1>&6
7579   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7580 else
7581   echo "$ac_t""no" 1>&6
7582
7583 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7584 echo "configure:7585: checking for inflate in -lgz" >&5
7585 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7586
7587 xe_check_libs=" -lgz "
7588 cat > conftest.$ac_ext <<EOF
7589 #line 7590 "configure"
7590 #include "confdefs.h"
7591 /* Override any gcc2 internal prototype to avoid an error.  */
7592 /* We use char because int might match the return type of a gcc2
7593     builtin and then its argument prototype would still apply.  */
7594 char inflate();
7595
7596 int main() {
7597 inflate()
7598 ; return 0; }
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7601   rm -rf conftest*
7602   eval "ac_cv_lib_$ac_lib_var=yes"
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_lib_$ac_lib_var=no"
7608 fi
7609 rm -f conftest*
7610 xe_check_libs=""
7611
7612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7613   echo "$ac_t""yes" 1>&6
7614   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7615 else
7616   echo "$ac_t""no" 1>&6
7617 fi
7618
7619
7620 fi
7621
7622
7623 fi
7624
7625
7626   fi
7627
7628     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7629 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7630 echo "configure:7631: checking for jpeglib.h" >&5
7631
7632 cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 #include <jpeglib.h>
7636 EOF
7637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7638 { (eval echo configure:7639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7640 if test -z "$ac_err"; then
7641   rm -rf conftest*
7642   eval "ac_cv_header_$ac_safe=yes"
7643 else
7644   echo "$ac_err" >&5
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_header_$ac_safe=no"
7649 fi
7650 rm -f conftest*
7651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7652   echo "$ac_t""yes" 1>&6
7653   :
7654 else
7655   echo "$ac_t""no" 1>&6
7656 with_jpeg=no
7657 fi
7658  }
7659   test -z "$with_jpeg" && { 
7660 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7661 echo "configure:7662: checking for jpeg_destroy_decompress in -ljpeg" >&5
7662 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7663
7664 xe_check_libs=" -ljpeg "
7665 cat > conftest.$ac_ext <<EOF
7666 #line 7667 "configure"
7667 #include "confdefs.h"
7668 /* Override any gcc2 internal prototype to avoid an error.  */
7669 /* We use char because int might match the return type of a gcc2
7670     builtin and then its argument prototype would still apply.  */
7671 char jpeg_destroy_decompress();
7672
7673 int main() {
7674 jpeg_destroy_decompress()
7675 ; return 0; }
7676 EOF
7677 if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7678   rm -rf conftest*
7679   eval "ac_cv_lib_$ac_lib_var=yes"
7680 else
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -rf conftest*
7684   eval "ac_cv_lib_$ac_lib_var=no"
7685 fi
7686 rm -f conftest*
7687 xe_check_libs=""
7688
7689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7690   echo "$ac_t""yes" 1>&6
7691   :
7692 else
7693   echo "$ac_t""no" 1>&6
7694 with_jpeg=no
7695 fi
7696
7697  }
7698   test -z "$with_jpeg" && with_jpeg=yes
7699   if test "$with_jpeg" = "yes"; then
7700     { test "$extra_verbose" = "yes" && cat << \EOF
7701     Defining HAVE_JPEG
7702 EOF
7703 cat >> confdefs.h <<\EOF
7704 #define HAVE_JPEG 1
7705 EOF
7706 }
7707
7708     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7709   fi
7710
7711     png_problem=""
7712   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7713 echo "configure:7714: checking for pow" >&5
7714
7715 cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718 /* System header to define __stub macros and hopefully few prototypes,
7719     which can conflict with char pow(); below.  */
7720 #include <assert.h>
7721 /* Override any gcc2 internal prototype to avoid an error.  */
7722 /* We use char because int might match the return type of a gcc2
7723     builtin and then its argument prototype would still apply.  */
7724 char pow();
7725
7726 int main() {
7727
7728 /* The GNU C library defines this for functions which it implements
7729     to always fail with ENOSYS.  Some functions are actually named
7730     something starting with __ and the normal name is an alias.  */
7731 #if defined (__stub_pow) || defined (__stub___pow)
7732 choke me
7733 #else
7734 pow();
7735 #endif
7736
7737 ; return 0; }
7738 EOF
7739 if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7740   rm -rf conftest*
7741   eval "ac_cv_func_pow=yes"
7742 else
7743   echo "configure: failed program was:" >&5
7744   cat conftest.$ac_ext >&5
7745   rm -rf conftest*
7746   eval "ac_cv_func_pow=no"
7747 fi
7748 rm -f conftest*
7749
7750 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7751   echo "$ac_t""yes" 1>&6
7752   :
7753 else
7754   echo "$ac_t""no" 1>&6
7755 with_png=no
7756 fi
7757  }
7758   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7759 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7760 echo "configure:7761: checking for png.h" >&5
7761
7762 cat > conftest.$ac_ext <<EOF
7763 #line 7764 "configure"
7764 #include "confdefs.h"
7765 #include <png.h>
7766 EOF
7767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7768 { (eval echo configure:7769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7770 if test -z "$ac_err"; then
7771   rm -rf conftest*
7772   eval "ac_cv_header_$ac_safe=yes"
7773 else
7774   echo "$ac_err" >&5
7775   echo "configure: failed program was:" >&5
7776   cat conftest.$ac_ext >&5
7777   rm -rf conftest*
7778   eval "ac_cv_header_$ac_safe=no"
7779 fi
7780 rm -f conftest*
7781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7782   echo "$ac_t""yes" 1>&6
7783   :
7784 else
7785   echo "$ac_t""no" 1>&6
7786 with_png=no
7787 fi
7788  }
7789   test -z "$with_png" && { 
7790 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7791 echo "configure:7792: checking for png_read_image in -lpng" >&5
7792 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7793
7794 xe_check_libs=" -lpng "
7795 cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798 /* Override any gcc2 internal prototype to avoid an error.  */
7799 /* We use char because int might match the return type of a gcc2
7800     builtin and then its argument prototype would still apply.  */
7801 char png_read_image();
7802
7803 int main() {
7804 png_read_image()
7805 ; return 0; }
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7808   rm -rf conftest*
7809   eval "ac_cv_lib_$ac_lib_var=yes"
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -rf conftest*
7814   eval "ac_cv_lib_$ac_lib_var=no"
7815 fi
7816 rm -f conftest*
7817 xe_check_libs=""
7818
7819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7820   echo "$ac_t""yes" 1>&6
7821   :
7822 else
7823   echo "$ac_t""no" 1>&6
7824 with_png=no
7825 fi
7826
7827  }
7828   if test -z "$with_png"; then
7829     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7830 echo "configure:7831: checking for workable png version information" >&5
7831     xe_check_libs="-lpng -lz"
7832     cat > conftest.$ac_ext <<EOF
7833 #line 7834 "configure"
7834 #include "confdefs.h"
7835 #include <png.h>
7836     int main(int c, char **v) {
7837     if (c == 1) return 0;
7838     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7839     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7840 EOF
7841 if { (eval echo configure:7842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7842 then
7843   ./conftest dummy_arg; png_status=$?;
7844       if test "$png_status" = "0"; then
7845         with_png=yes;
7846       else
7847         with_png=no;
7848         if test "$png_status" = "1"; then
7849           png_problem="PNG library version and header file don't match!"
7850         elif test "$png_status" = "2"; then
7851           png_problem="PNG library version too old (pre 1.0.2)!"
7852         fi
7853         echo "
7854 *** WARNING *** $png_problem
7855   I'm not touching that with a 10-foot pole!
7856   If you really want to use the installed version of libPNG, rerun
7857   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7858     fi
7859 else
7860   conftest_rc="$?"
7861   echo "configure: failed program was:" >&5
7862   cat conftest.$ac_ext >&5
7863   rm -fr conftest*
7864   with_png=no
7865 fi
7866 rm -fr conftest*
7867     xe_check_libs=
7868     echo "$ac_t""$with_png" 1>&6
7869   fi
7870   if test "$with_png" = "yes"; then
7871     { test "$extra_verbose" = "yes" && cat << \EOF
7872     Defining HAVE_PNG
7873 EOF
7874 cat >> confdefs.h <<\EOF
7875 #define HAVE_PNG 1
7876 EOF
7877 }
7878
7879     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7880   fi
7881
7882     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7883 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7884 echo "configure:7885: checking for tiffio.h" >&5
7885
7886 cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 #include <tiffio.h>
7890 EOF
7891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7892 { (eval echo configure:7893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7894 if test -z "$ac_err"; then
7895   rm -rf conftest*
7896   eval "ac_cv_header_$ac_safe=yes"
7897 else
7898   echo "$ac_err" >&5
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   eval "ac_cv_header_$ac_safe=no"
7903 fi
7904 rm -f conftest*
7905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7906   echo "$ac_t""yes" 1>&6
7907   :
7908 else
7909   echo "$ac_t""no" 1>&6
7910 with_tiff=no
7911 fi
7912  }
7913   test -z "$with_tiff" && { 
7914 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7915 echo "configure:7916: checking for TIFFClientOpen in -ltiff" >&5
7916 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7917
7918 xe_check_libs=" -ltiff "
7919 cat > conftest.$ac_ext <<EOF
7920 #line 7921 "configure"
7921 #include "confdefs.h"
7922 /* Override any gcc2 internal prototype to avoid an error.  */
7923 /* We use char because int might match the return type of a gcc2
7924     builtin and then its argument prototype would still apply.  */
7925 char TIFFClientOpen();
7926
7927 int main() {
7928 TIFFClientOpen()
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7932   rm -rf conftest*
7933   eval "ac_cv_lib_$ac_lib_var=yes"
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   eval "ac_cv_lib_$ac_lib_var=no"
7939 fi
7940 rm -f conftest*
7941 xe_check_libs=""
7942
7943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7944   echo "$ac_t""yes" 1>&6
7945   :
7946 else
7947   echo "$ac_t""no" 1>&6
7948 with_tiff=no
7949 fi
7950
7951  }
7952   test -z "$with_tiff" && with_tiff=yes
7953   if test "$with_tiff" = "yes"; then
7954     { test "$extra_verbose" = "yes" && cat << \EOF
7955     Defining HAVE_TIFF
7956 EOF
7957 cat >> confdefs.h <<\EOF
7958 #define HAVE_TIFF 1
7959 EOF
7960 }
7961
7962     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7963   fi
7964 fi
7965
7966
7967 if test "$with_x11" = "yes"; then
7968
7969   echo "checking for X11 graphics libraries" 1>&6
7970 echo "configure:7971: checking for X11 graphics libraries" >&5
7971
7972   echo "checking for the Athena widgets" 1>&6
7973 echo "configure:7974: checking for the Athena widgets" >&5
7974
7975     case "$with_athena" in
7976         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7977     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7978     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7979     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7980     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7981     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7982   esac
7983
7984     if test "$athena_3d" = "no"; then
7985     
7986 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7987 echo "configure:7988: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7988 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7989
7990 xe_check_libs=" -l$athena_variant "
7991 cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 /* Override any gcc2 internal prototype to avoid an error.  */
7995 /* We use char because int might match the return type of a gcc2
7996     builtin and then its argument prototype would still apply.  */
7997 char XawScrollbarSetThumb();
7998
7999 int main() {
8000 XawScrollbarSetThumb()
8001 ; return 0; }
8002 EOF
8003 if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8004   rm -rf conftest*
8005   eval "ac_cv_lib_$ac_lib_var=yes"
8006 else
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -rf conftest*
8010   eval "ac_cv_lib_$ac_lib_var=no"
8011 fi
8012 rm -f conftest*
8013 xe_check_libs=""
8014
8015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8016   echo "$ac_t""yes" 1>&6
8017           
8018 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8019 echo "configure:8020: checking for threeDClassRec in -l$athena_variant" >&5
8020 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8021
8022 xe_check_libs=" -l$athena_variant "
8023 cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 /* Override any gcc2 internal prototype to avoid an error.  */
8027 /* We use char because int might match the return type of a gcc2
8028     builtin and then its argument prototype would still apply.  */
8029 char threeDClassRec();
8030
8031 int main() {
8032 threeDClassRec()
8033 ; return 0; }
8034 EOF
8035 if { (eval echo configure:8036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8036   rm -rf conftest*
8037   eval "ac_cv_lib_$ac_lib_var=yes"
8038 else
8039   echo "configure: failed program was:" >&5
8040   cat conftest.$ac_ext >&5
8041   rm -rf conftest*
8042   eval "ac_cv_lib_$ac_lib_var=no"
8043 fi
8044 rm -f conftest*
8045 xe_check_libs=""
8046
8047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8048   echo "$ac_t""yes" 1>&6
8049   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8050 else
8051   echo "$ac_t""no" 1>&6
8052 athena_lib=$athena_variant
8053 fi
8054
8055
8056       
8057 else
8058   echo "$ac_t""no" 1>&6
8059 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8060 fi
8061
8062
8063   else
8064         
8065 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8066 echo "configure:8067: checking for threeDClassRec in -l$athena_variant" >&5
8067 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8068
8069 xe_check_libs=" -l$athena_variant "
8070 cat > conftest.$ac_ext <<EOF
8071 #line 8072 "configure"
8072 #include "confdefs.h"
8073 /* Override any gcc2 internal prototype to avoid an error.  */
8074 /* We use char because int might match the return type of a gcc2
8075     builtin and then its argument prototype would still apply.  */
8076 char threeDClassRec();
8077
8078 int main() {
8079 threeDClassRec()
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8083   rm -rf conftest*
8084   eval "ac_cv_lib_$ac_lib_var=yes"
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   eval "ac_cv_lib_$ac_lib_var=no"
8090 fi
8091 rm -f conftest*
8092 xe_check_libs=""
8093
8094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8095   echo "$ac_t""yes" 1>&6
8096   athena_lib=$athena_variant
8097 else
8098   echo "$ac_t""no" 1>&6
8099 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8100 echo "configure:8101: checking for threeDClassRec in -lXaw" >&5
8101 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8102
8103 xe_check_libs=" -lXaw "
8104 cat > conftest.$ac_ext <<EOF
8105 #line 8106 "configure"
8106 #include "confdefs.h"
8107 /* Override any gcc2 internal prototype to avoid an error.  */
8108 /* We use char because int might match the return type of a gcc2
8109     builtin and then its argument prototype would still apply.  */
8110 char threeDClassRec();
8111
8112 int main() {
8113 threeDClassRec()
8114 ; return 0; }
8115 EOF
8116 if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8117   rm -rf conftest*
8118   eval "ac_cv_lib_$ac_lib_var=yes"
8119 else
8120   echo "configure: failed program was:" >&5
8121   cat conftest.$ac_ext >&5
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=no"
8124 fi
8125 rm -f conftest*
8126 xe_check_libs=""
8127
8128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8129   echo "$ac_t""yes" 1>&6
8130   athena_lib=Xaw;
8131           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8132         
8133 else
8134   echo "$ac_t""no" 1>&6
8135 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8136 fi
8137
8138
8139 fi
8140
8141
8142   fi
8143
8144     if test "$athena_3d" = "no"; then
8145     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8146 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8147 echo "configure:8148: checking for X11/Xaw/ThreeD.h" >&5
8148
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 #include <X11/Xaw/ThreeD.h>
8153 EOF
8154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8155 { (eval echo configure:8156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8157 if test -z "$ac_err"; then
8158   rm -rf conftest*
8159   eval "ac_cv_header_$ac_safe=yes"
8160 else
8161   echo "$ac_err" >&5
8162   echo "configure: failed program was:" >&5
8163   cat conftest.$ac_ext >&5
8164   rm -rf conftest*
8165   eval "ac_cv_header_$ac_safe=no"
8166 fi
8167 rm -f conftest*
8168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8169   echo "$ac_t""yes" 1>&6
8170   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8171 else
8172   echo "$ac_t""no" 1>&6
8173 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8174 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8175 echo "configure:8176: checking for X11/Xaw/XawInit.h" >&5
8176
8177 cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 #include <X11/Xaw/XawInit.h>
8181 EOF
8182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8183 { (eval echo configure:8184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8185 if test -z "$ac_err"; then
8186   rm -rf conftest*
8187   eval "ac_cv_header_$ac_safe=yes"
8188 else
8189   echo "$ac_err" >&5
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192   rm -rf conftest*
8193   eval "ac_cv_header_$ac_safe=no"
8194 fi
8195 rm -f conftest*
8196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8197   echo "$ac_t""yes" 1>&6
8198   athena_h_path=X11/Xaw
8199 else
8200   echo "$ac_t""no" 1>&6
8201 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8202 fi
8203
8204 fi
8205
8206   else
8207             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8208 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8209 echo "configure:8210: checking for X11/$athena_variant/XawInit.h" >&5
8210
8211 cat > conftest.$ac_ext <<EOF
8212 #line 8213 "configure"
8213 #include "confdefs.h"
8214 #include <X11/$athena_variant/XawInit.h>
8215 EOF
8216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8217 { (eval echo configure:8218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8219 if test -z "$ac_err"; then
8220   rm -rf conftest*
8221   eval "ac_cv_header_$ac_safe=yes"
8222 else
8223   echo "$ac_err" >&5
8224   echo "configure: failed program was:" >&5
8225   cat conftest.$ac_ext >&5
8226   rm -rf conftest*
8227   eval "ac_cv_header_$ac_safe=no"
8228 fi
8229 rm -f conftest*
8230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8231   echo "$ac_t""yes" 1>&6
8232   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8233 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8234 echo "configure:8235: checking for X11/$athena_variant/ThreeD.h" >&5
8235
8236 cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239 #include <X11/$athena_variant/ThreeD.h>
8240 EOF
8241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8242 { (eval echo configure:8243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8244 if test -z "$ac_err"; then
8245   rm -rf conftest*
8246   eval "ac_cv_header_$ac_safe=yes"
8247 else
8248   echo "$ac_err" >&5
8249   echo "configure: failed program was:" >&5
8250   cat conftest.$ac_ext >&5
8251   rm -rf conftest*
8252   eval "ac_cv_header_$ac_safe=no"
8253 fi
8254 rm -f conftest*
8255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257   athena_h_path=X11/$athena_variant
8258 else
8259   echo "$ac_t""no" 1>&6
8260 fi
8261
8262 else
8263   echo "$ac_t""no" 1>&6
8264 fi
8265
8266
8267         if test -z "$athena_h_path"; then
8268       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8269 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8270 echo "configure:8271: checking for $athena_variant/XawInit.h" >&5
8271
8272 cat > conftest.$ac_ext <<EOF
8273 #line 8274 "configure"
8274 #include "confdefs.h"
8275 #include <$athena_variant/XawInit.h>
8276 EOF
8277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8278 { (eval echo configure:8279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8280 if test -z "$ac_err"; then
8281   rm -rf conftest*
8282   eval "ac_cv_header_$ac_safe=yes"
8283 else
8284   echo "$ac_err" >&5
8285   echo "configure: failed program was:" >&5
8286   cat conftest.$ac_ext >&5
8287   rm -rf conftest*
8288   eval "ac_cv_header_$ac_safe=no"
8289 fi
8290 rm -f conftest*
8291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8292   echo "$ac_t""yes" 1>&6
8293   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8294 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8295 echo "configure:8296: checking for $athena_variant/ThreeD.h" >&5
8296
8297 cat > conftest.$ac_ext <<EOF
8298 #line 8299 "configure"
8299 #include "confdefs.h"
8300 #include <$athena_variant/ThreeD.h>
8301 EOF
8302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8303 { (eval echo configure:8304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8305 if test -z "$ac_err"; then
8306   rm -rf conftest*
8307   eval "ac_cv_header_$ac_safe=yes"
8308 else
8309   echo "$ac_err" >&5
8310   echo "configure: failed program was:" >&5
8311   cat conftest.$ac_ext >&5
8312   rm -rf conftest*
8313   eval "ac_cv_header_$ac_safe=no"
8314 fi
8315 rm -f conftest*
8316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8317   echo "$ac_t""yes" 1>&6
8318   athena_h_path=$athena_variant
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322
8323 else
8324   echo "$ac_t""no" 1>&6
8325 fi
8326
8327     fi
8328
8329         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8330       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8331 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8332 echo "configure:8333: checking for X11/Xaw3d/XawInit.h" >&5
8333
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 #include <X11/Xaw3d/XawInit.h>
8338 EOF
8339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8340 { (eval echo configure:8341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8342 if test -z "$ac_err"; then
8343   rm -rf conftest*
8344   eval "ac_cv_header_$ac_safe=yes"
8345 else
8346   echo "$ac_err" >&5
8347   echo "configure: failed program was:" >&5
8348   cat conftest.$ac_ext >&5
8349   rm -rf conftest*
8350   eval "ac_cv_header_$ac_safe=no"
8351 fi
8352 rm -f conftest*
8353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8354   echo "$ac_t""yes" 1>&6
8355   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8356 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8357 echo "configure:8358: checking for X11/Xaw3d/ThreeD.h" >&5
8358
8359 cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 #include <X11/Xaw3d/ThreeD.h>
8363 EOF
8364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8365 { (eval echo configure:8366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8367 if test -z "$ac_err"; then
8368   rm -rf conftest*
8369   eval "ac_cv_header_$ac_safe=yes"
8370 else
8371   echo "$ac_err" >&5
8372   echo "configure: failed program was:" >&5
8373   cat conftest.$ac_ext >&5
8374   rm -rf conftest*
8375   eval "ac_cv_header_$ac_safe=no"
8376 fi
8377 rm -f conftest*
8378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8379   echo "$ac_t""yes" 1>&6
8380   
8381             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8382             athena_h_path=X11/Xaw3d
8383           
8384 else
8385   echo "$ac_t""no" 1>&6
8386 fi
8387
8388 else
8389   echo "$ac_t""no" 1>&6
8390 fi
8391
8392     fi
8393
8394         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8395       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8396 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8397 echo "configure:8398: checking for Xaw3d/XawInit.h" >&5
8398
8399 cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 #include <Xaw3d/XawInit.h>
8403 EOF
8404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8405 { (eval echo configure:8406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8407 if test -z "$ac_err"; then
8408   rm -rf conftest*
8409   eval "ac_cv_header_$ac_safe=yes"
8410 else
8411   echo "$ac_err" >&5
8412   echo "configure: failed program was:" >&5
8413   cat conftest.$ac_ext >&5
8414   rm -rf conftest*
8415   eval "ac_cv_header_$ac_safe=no"
8416 fi
8417 rm -f conftest*
8418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8419   echo "$ac_t""yes" 1>&6
8420   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8421 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8422 echo "configure:8423: checking for Xaw3d/ThreeD.h" >&5
8423
8424 cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 #include <Xaw3d/ThreeD.h>
8428 EOF
8429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8430 { (eval echo configure:8431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8432 if test -z "$ac_err"; then
8433   rm -rf conftest*
8434   eval "ac_cv_header_$ac_safe=yes"
8435 else
8436   echo "$ac_err" >&5
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_header_$ac_safe=no"
8441 fi
8442 rm -f conftest*
8443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8444   echo "$ac_t""yes" 1>&6
8445   
8446             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8447             athena_h_path=Xaw3d
8448           
8449 else
8450   echo "$ac_t""no" 1>&6
8451 fi
8452
8453 else
8454   echo "$ac_t""no" 1>&6
8455 fi
8456
8457     fi
8458
8459             if test -z "$athena_h_path"; then
8460       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8461 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8462 echo "configure:8463: checking for X11/Xaw/ThreeD.h" >&5
8463
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 #include <X11/Xaw/ThreeD.h>
8468 EOF
8469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8470 { (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8472 if test -z "$ac_err"; then
8473   rm -rf conftest*
8474   eval "ac_cv_header_$ac_safe=yes"
8475 else
8476   echo "$ac_err" >&5
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   eval "ac_cv_header_$ac_safe=no"
8481 fi
8482 rm -f conftest*
8483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8484   echo "$ac_t""yes" 1>&6
8485   
8486           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8487           athena_h_path=X11/Xaw
8488         
8489 else
8490   echo "$ac_t""no" 1>&6
8491 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8492 fi
8493
8494     fi
8495   fi
8496
8497     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8498     have_xaw=yes
8499   else
8500     have_xaw=no
8501   fi
8502
8503     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8504 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8505 echo "configure:8506: checking for Xm/Xm.h" >&5
8506
8507 cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510 #include <Xm/Xm.h>
8511 EOF
8512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8513 { (eval echo configure:8514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8515 if test -z "$ac_err"; then
8516   rm -rf conftest*
8517   eval "ac_cv_header_$ac_safe=yes"
8518 else
8519   echo "$ac_err" >&5
8520   echo "configure: failed program was:" >&5
8521   cat conftest.$ac_ext >&5
8522   rm -rf conftest*
8523   eval "ac_cv_header_$ac_safe=no"
8524 fi
8525 rm -f conftest*
8526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8527   echo "$ac_t""yes" 1>&6
8528   
8529 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8530 echo "configure:8531: checking for XmStringFree in -lXm" >&5
8531 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8532
8533 xe_check_libs=" -lXm "
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 /* Override any gcc2 internal prototype to avoid an error.  */
8538 /* We use char because int might match the return type of a gcc2
8539     builtin and then its argument prototype would still apply.  */
8540 char XmStringFree();
8541
8542 int main() {
8543 XmStringFree()
8544 ; return 0; }
8545 EOF
8546 if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8547   rm -rf conftest*
8548   eval "ac_cv_lib_$ac_lib_var=yes"
8549 else
8550   echo "configure: failed program was:" >&5
8551   cat conftest.$ac_ext >&5
8552   rm -rf conftest*
8553   eval "ac_cv_lib_$ac_lib_var=no"
8554 fi
8555 rm -f conftest*
8556 xe_check_libs=""
8557
8558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8559   echo "$ac_t""yes" 1>&6
8560   have_motif=yes
8561 else
8562   echo "$ac_t""no" 1>&6
8563 have_motif=no
8564 fi
8565
8566
8567 else
8568   echo "$ac_t""no" 1>&6
8569 have_motif=no
8570 fi
8571
8572
8573   if test "$have_motif" = "yes"; then
8574         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8575 echo "configure:8576: checking for Lesstif" >&5
8576     cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 #include <Xm/Xm.h>
8580 #ifdef LESSTIF_VERSION
8581 yes
8582 #endif
8583
8584 EOF
8585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8586   egrep "yes" >/dev/null 2>&1; then
8587   rm -rf conftest*
8588   have_lesstif=yes
8589 else
8590   rm -rf conftest*
8591   have_lesstif=no
8592 fi
8593 rm -f conftest*
8594
8595   echo "$ac_t""$have_lesstif" 1>&6
8596   fi
8597
8598 fi 
8599
8600 case "$with_menubars" in "" | "yes" | "athena" )
8601   with_menubars="lucid" ;;
8602 esac
8603 case "$with_dialogs" in "" | "yes" | "lucid" )
8604   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8605   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8606   else with_dialogs=no
8607   fi ;;
8608 esac
8609 case "$with_scrollbars" in "" | "yes" )
8610   with_scrollbars="lucid" ;;
8611 esac
8612 case "$with_widgets" in "" | "yes" | "lucid")
8613   if   test "$have_motif" = "yes"; then with_widgets="motif"
8614   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8615   else with_widgets=no
8616   fi ;;
8617 esac
8618
8619 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8620
8621 case "$all_widgets" in
8622   *athena* )
8623     if test "$have_xaw" != "yes"; then
8624       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8625     fi
8626
8627         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8628
8629         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8630
8631                     { test "$extra_verbose" = "yes" && cat << EOF
8632     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8633 EOF
8634 cat >> confdefs.h <<EOF
8635 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8636 EOF
8637 }
8638
8639     { test "$extra_verbose" = "yes" && cat << EOF
8640     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8641 EOF
8642 cat >> confdefs.h <<EOF
8643 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8644 EOF
8645 }
8646
8647     { test "$extra_verbose" = "yes" && cat << EOF
8648     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8649 EOF
8650 cat >> confdefs.h <<EOF
8651 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8652 EOF
8653 }
8654
8655     { test "$extra_verbose" = "yes" && cat << EOF
8656     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8657 EOF
8658 cat >> confdefs.h <<EOF
8659 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8660 EOF
8661 }
8662
8663     { test "$extra_verbose" = "yes" && cat << EOF
8664     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8665 EOF
8666 cat >> confdefs.h <<EOF
8667 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8668 EOF
8669 }
8670
8671     { test "$extra_verbose" = "yes" && cat << EOF
8672     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8673 EOF
8674 cat >> confdefs.h <<EOF
8675 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8676 EOF
8677 }
8678
8679     { test "$extra_verbose" = "yes" && cat << EOF
8680     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8681 EOF
8682 cat >> confdefs.h <<EOF
8683 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8684 EOF
8685 }
8686
8687     { test "$extra_verbose" = "yes" && cat << EOF
8688     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8689 EOF
8690 cat >> confdefs.h <<EOF
8691 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8692 EOF
8693 }
8694
8695     { test "$extra_verbose" = "yes" && cat << EOF
8696     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8697 EOF
8698 cat >> confdefs.h <<EOF
8699 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8700 EOF
8701 }
8702
8703     { test "$extra_verbose" = "yes" && cat << EOF
8704     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8705 EOF
8706 cat >> confdefs.h <<EOF
8707 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8708 EOF
8709 }
8710
8711
8712     { test "$extra_verbose" = "yes" && cat << \EOF
8713     Defining LWLIB_USES_ATHENA
8714 EOF
8715 cat >> confdefs.h <<\EOF
8716 #define LWLIB_USES_ATHENA 1
8717 EOF
8718 }
8719
8720     { test "$extra_verbose" = "yes" && cat << \EOF
8721     Defining NEED_ATHENA
8722 EOF
8723 cat >> confdefs.h <<\EOF
8724 #define NEED_ATHENA 1
8725 EOF
8726 }
8727
8728     need_athena="yes"
8729
8730     if test "$athena_3d" = "yes"; then
8731       { test "$extra_verbose" = "yes" && cat << \EOF
8732     Defining HAVE_ATHENA_3D
8733 EOF
8734 cat >> confdefs.h <<\EOF
8735 #define HAVE_ATHENA_3D 1
8736 EOF
8737 }
8738
8739     fi
8740   ;;
8741 esac
8742
8743 case "$all_widgets" in *motif* )
8744   { test "$extra_verbose" = "yes" && cat << \EOF
8745     Defining LWLIB_USES_MOTIF
8746 EOF
8747 cat >> confdefs.h <<\EOF
8748 #define LWLIB_USES_MOTIF 1
8749 EOF
8750 }
8751
8752   { test "$extra_verbose" = "yes" && cat << \EOF
8753     Defining NEED_MOTIF
8754 EOF
8755 cat >> confdefs.h <<\EOF
8756 #define NEED_MOTIF 1
8757 EOF
8758 }
8759
8760   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8761   need_motif=yes ;;
8762 esac
8763
8764 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8765 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8766 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8767 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8768         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8769 case "$with_widgets" in athena* )
8770         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;;
8771 esac
8772 case "$all_widgets" in *lucid* )
8773   { test "$extra_verbose" = "yes" && cat << \EOF
8774     Defining NEED_LUCID
8775 EOF
8776 cat >> confdefs.h <<\EOF
8777 #define NEED_LUCID 1
8778 EOF
8779 }
8780
8781   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8782 esac
8783
8784
8785
8786 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8787     Defining LWLIB_SCROLLBARS_ATHENA
8788 EOF
8789 cat >> confdefs.h <<\EOF
8790 #define LWLIB_SCROLLBARS_ATHENA 1
8791 EOF
8792 }
8793
8794 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8795     Defining LWLIB_DIALOGS_ATHENA
8796 EOF
8797 cat >> confdefs.h <<\EOF
8798 #define LWLIB_DIALOGS_ATHENA 1
8799 EOF
8800 }
8801
8802
8803 if test "$athena_3d" = "yes"; then
8804   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8805     Defining LWLIB_SCROLLBARS_ATHENA3D
8806 EOF
8807 cat >> confdefs.h <<\EOF
8808 #define LWLIB_SCROLLBARS_ATHENA3D 1
8809 EOF
8810 }
8811
8812   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8813     Defining LWLIB_DIALOGS_ATHENA3D
8814 EOF
8815 cat >> confdefs.h <<\EOF
8816 #define LWLIB_DIALOGS_ATHENA3D 1
8817 EOF
8818 }
8819
8820 fi
8821
8822 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8823     Defining LWLIB_WIDGETS_ATHENA
8824 EOF
8825 cat >> confdefs.h <<\EOF
8826 #define LWLIB_WIDGETS_ATHENA 1
8827 EOF
8828 }
8829 ;; esac
8830 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8831         { test "$extra_verbose" = "yes" && cat << \EOF
8832     Defining LWLIB_TABS_LUCID
8833 EOF
8834 cat >> confdefs.h <<\EOF
8835 #define LWLIB_TABS_LUCID 1
8836 EOF
8837 }
8838
8839
8840 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8841     Defining HAVE_MENUBARS
8842 EOF
8843 cat >> confdefs.h <<\EOF
8844 #define HAVE_MENUBARS 1
8845 EOF
8846 }
8847
8848 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8849     Defining HAVE_SCROLLBARS
8850 EOF
8851 cat >> confdefs.h <<\EOF
8852 #define HAVE_SCROLLBARS 1
8853 EOF
8854 }
8855
8856 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8857     Defining HAVE_DIALOGS
8858 EOF
8859 cat >> confdefs.h <<\EOF
8860 #define HAVE_DIALOGS 1
8861 EOF
8862 }
8863
8864 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8865     Defining HAVE_TOOLBARS
8866 EOF
8867 cat >> confdefs.h <<\EOF
8868 #define HAVE_TOOLBARS 1
8869 EOF
8870 }
8871
8872 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8873     Defining HAVE_WIDGETS
8874 EOF
8875 cat >> confdefs.h <<\EOF
8876 #define HAVE_WIDGETS 1
8877 EOF
8878 }
8879
8880
8881 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8882     Defining LWLIB_MENUBARS_LUCID
8883 EOF
8884 cat >> confdefs.h <<\EOF
8885 #define LWLIB_MENUBARS_LUCID 1
8886 EOF
8887 }
8888
8889 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8890     Defining LWLIB_SCROLLBARS_LUCID
8891 EOF
8892 cat >> confdefs.h <<\EOF
8893 #define LWLIB_SCROLLBARS_LUCID 1
8894 EOF
8895 }
8896
8897
8898 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8899     Defining LWLIB_MENUBARS_MOTIF
8900 EOF
8901 cat >> confdefs.h <<\EOF
8902 #define LWLIB_MENUBARS_MOTIF 1
8903 EOF
8904 }
8905
8906 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8907     Defining LWLIB_SCROLLBARS_MOTIF
8908 EOF
8909 cat >> confdefs.h <<\EOF
8910 #define LWLIB_SCROLLBARS_MOTIF 1
8911 EOF
8912 }
8913
8914 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8915     Defining LWLIB_DIALOGS_MOTIF
8916 EOF
8917 cat >> confdefs.h <<\EOF
8918 #define LWLIB_DIALOGS_MOTIF 1
8919 EOF
8920 }
8921
8922 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8923     Defining LWLIB_WIDGETS_MOTIF
8924 EOF
8925 cat >> confdefs.h <<\EOF
8926 #define LWLIB_WIDGETS_MOTIF 1
8927 EOF
8928 }
8929
8930
8931 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8932    echo "    xemacs will be linked with \"menubar.o\""
8933  fi
8934 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8935    echo "    xemacs will be linked with \"scrollbar.o\""
8936  fi
8937 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8938    echo "    xemacs will be linked with \"dialog.o\""
8939  fi
8940 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8941    echo "    xemacs will be linked with \"toolbar.o\""
8942  fi
8943
8944 if test "$with_x11" = "yes"; then
8945   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8946    echo "    xemacs will be linked with \"menubar-x.o\""
8947  fi
8948   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8949    echo "    xemacs will be linked with \"scrollbar-x.o\""
8950  fi
8951   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8952    echo "    xemacs will be linked with \"dialog-x.o\""
8953  fi
8954   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8955    echo "    xemacs will be linked with \"toolbar-x.o\""
8956  fi
8957   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8958    echo "    xemacs will be linked with \"gui-x.o\""
8959  fi
8960 fi
8961
8962
8963 test -z "$with_mule" && with_mule=no
8964 test -z "$with_file_coding" && with_file_coding=no
8965
8966
8967 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8968   { test "$extra_verbose" = "yes" && cat << \EOF
8969     Defining FILE_CODING
8970 EOF
8971 cat >> confdefs.h <<\EOF
8972 #define FILE_CODING 1
8973 EOF
8974 }
8975
8976   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8977    echo "    xemacs will be linked with \"file-coding.o\""
8978  fi
8979 fi
8980
8981 if test "$with_mule" = "yes" ; then
8982   echo "checking for Mule-related features" 1>&6
8983 echo "configure:8984: checking for Mule-related features" >&5
8984   { test "$extra_verbose" = "yes" && cat << \EOF
8985     Defining MULE
8986 EOF
8987 cat >> confdefs.h <<\EOF
8988 #define MULE 1
8989 EOF
8990 }
8991
8992   { test "$extra_verbose" = "yes" && cat << \EOF
8993     Defining FILE_CODING
8994 EOF
8995 cat >> confdefs.h <<\EOF
8996 #define FILE_CODING 1
8997 EOF
8998 }
8999
9000   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9001    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9002  fi
9003   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9004     { test "$extra_verbose" = "yes" && cat << \EOF
9005     Defining TEXT_CODING
9006 EOF
9007 cat >> confdefs.h <<\EOF
9008 #define TEXT_CODING 1
9009 EOF
9010 }
9011
9012     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9013    echo "    xemacs will be linked with \"text-coding.o\""
9014  fi
9015   else
9016     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9017    echo "    xemacs will be linked with \"file-coding.o\""
9018  fi
9019   fi
9020     for ac_hdr in libintl.h
9021 do
9022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9024 echo "configure:9025: checking for $ac_hdr" >&5
9025
9026 cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029 #include <$ac_hdr>
9030 EOF
9031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9032 { (eval echo configure:9033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9034 if test -z "$ac_err"; then
9035   rm -rf conftest*
9036   eval "ac_cv_header_$ac_safe=yes"
9037 else
9038   echo "$ac_err" >&5
9039   echo "configure: failed program was:" >&5
9040   cat conftest.$ac_ext >&5
9041   rm -rf conftest*
9042   eval "ac_cv_header_$ac_safe=no"
9043 fi
9044 rm -f conftest*
9045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9046   echo "$ac_t""yes" 1>&6
9047     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9048   { test "$extra_verbose" = "yes" && cat << EOF
9049     Defining $ac_tr_hdr
9050 EOF
9051 cat >> confdefs.h <<EOF
9052 #define $ac_tr_hdr 1
9053 EOF
9054 }
9055  
9056 else
9057   echo "$ac_t""no" 1>&6
9058 fi
9059 done
9060
9061   
9062 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9063 echo "configure:9064: checking for strerror in -lintl" >&5
9064 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9065
9066 xe_check_libs=" -lintl "
9067 cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070 /* Override any gcc2 internal prototype to avoid an error.  */
9071 /* We use char because int might match the return type of a gcc2
9072     builtin and then its argument prototype would still apply.  */
9073 char strerror();
9074
9075 int main() {
9076 strerror()
9077 ; return 0; }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9080   rm -rf conftest*
9081   eval "ac_cv_lib_$ac_lib_var=yes"
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   eval "ac_cv_lib_$ac_lib_var=no"
9087 fi
9088 rm -f conftest*
9089 xe_check_libs=""
9090
9091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9092   echo "$ac_t""yes" 1>&6
9093     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9094     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9095   { test "$extra_verbose" = "yes" && cat << EOF
9096     Defining $ac_tr_lib
9097 EOF
9098 cat >> confdefs.h <<EOF
9099 #define $ac_tr_lib 1
9100 EOF
9101 }
9102
9103   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9104
9105 else
9106   echo "$ac_t""no" 1>&6
9107 fi
9108
9109
9110
9111   if test "$with_utf_2000" = "yes" ; then
9112     { test "$extra_verbose" = "yes" && cat << \EOF
9113     Defining CHAR_IS_UCS4
9114 EOF
9115 cat >> confdefs.h <<\EOF
9116 #define CHAR_IS_UCS4 1
9117 EOF
9118 }
9119
9120     { test "$extra_verbose" = "yes" && cat << \EOF
9121     Defining UTF2000
9122 EOF
9123 cat >> confdefs.h <<\EOF
9124 #define UTF2000 1
9125 EOF
9126 }
9127
9128     { test "$extra_verbose" = "yes" && cat << \EOF
9129     Defining HAVE_GGC
9130 EOF
9131 cat >> confdefs.h <<\EOF
9132 #define HAVE_GGC 1
9133 EOF
9134 }
9135
9136   fi
9137
9138   echo "checking for Mule input methods" 1>&6
9139 echo "configure:9140: checking for Mule input methods" >&5
9140         case "$with_xim" in "" | "yes" )
9141     echo "checking for XIM" 1>&6
9142 echo "configure:9143: checking for XIM" >&5
9143     
9144 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9145 echo "configure:9146: checking for XOpenIM in -lX11" >&5
9146 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9147
9148 xe_check_libs=" -lX11 "
9149 cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 /* Override any gcc2 internal prototype to avoid an error.  */
9153 /* We use char because int might match the return type of a gcc2
9154     builtin and then its argument prototype would still apply.  */
9155 char XOpenIM();
9156
9157 int main() {
9158 XOpenIM()
9159 ; return 0; }
9160 EOF
9161 if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9162   rm -rf conftest*
9163   eval "ac_cv_lib_$ac_lib_var=yes"
9164 else
9165   echo "configure: failed program was:" >&5
9166   cat conftest.$ac_ext >&5
9167   rm -rf conftest*
9168   eval "ac_cv_lib_$ac_lib_var=no"
9169 fi
9170 rm -f conftest*
9171 xe_check_libs=""
9172
9173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9174   echo "$ac_t""yes" 1>&6
9175   with_xim=xlib
9176 else
9177   echo "$ac_t""no" 1>&6
9178 with_xim=no
9179 fi
9180
9181
9182         if test "$have_motif $have_lesstif" = "yes no"; then
9183       
9184 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9185 echo "configure:9186: checking for XmImMbLookupString in -lXm" >&5
9186 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9187
9188 xe_check_libs=" -lXm "
9189 cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192 /* Override any gcc2 internal prototype to avoid an error.  */
9193 /* We use char because int might match the return type of a gcc2
9194     builtin and then its argument prototype would still apply.  */
9195 char XmImMbLookupString();
9196
9197 int main() {
9198 XmImMbLookupString()
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_lib_$ac_lib_var=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=no"
9209 fi
9210 rm -f conftest*
9211 xe_check_libs=""
9212
9213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9214   echo "$ac_t""yes" 1>&6
9215   with_xim=motif
9216 else
9217   echo "$ac_t""no" 1>&6
9218 fi
9219
9220
9221     fi ;;
9222   esac
9223   if test "$with_xim" != "no"; then
9224     { test "$extra_verbose" = "yes" && cat << \EOF
9225     Defining HAVE_XIM
9226 EOF
9227 cat >> confdefs.h <<\EOF
9228 #define HAVE_XIM 1
9229 EOF
9230 }
9231
9232     if test "$with_xim" = "xlib"; then
9233       { test "$extra_verbose" = "yes" && cat << \EOF
9234     Defining XIM_XLIB
9235 EOF
9236 cat >> confdefs.h <<\EOF
9237 #define XIM_XLIB 1
9238 EOF
9239 }
9240
9241       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9242    echo "    xemacs will be linked with \"input-method-xlib.o\""
9243  fi
9244     fi
9245     if test "$with_xim" = "motif"; then
9246       { test "$extra_verbose" = "yes" && cat << \EOF
9247     Defining XIM_MOTIF
9248 EOF
9249 cat >> confdefs.h <<\EOF
9250 #define XIM_MOTIF 1
9251 EOF
9252 }
9253
9254       need_motif=yes
9255       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9256    echo "    xemacs will be linked with \"input-method-motif.o\""
9257  fi
9258     fi
9259     if test "$with_xim" = "motif"; then
9260       with_xfs=no
9261     fi
9262   fi
9263
9264     if test "$with_xfs" = "yes" ; then
9265     echo "checking for XFontSet" 1>&6
9266 echo "configure:9267: checking for XFontSet" >&5
9267     
9268 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9269 echo "configure:9270: checking for XmbDrawString in -lX11" >&5
9270 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9271
9272 xe_check_libs=" -lX11 "
9273 cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276 /* Override any gcc2 internal prototype to avoid an error.  */
9277 /* We use char because int might match the return type of a gcc2
9278     builtin and then its argument prototype would still apply.  */
9279 char XmbDrawString();
9280
9281 int main() {
9282 XmbDrawString()
9283 ; return 0; }
9284 EOF
9285 if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=yes"
9288 else
9289   echo "configure: failed program was:" >&5
9290   cat conftest.$ac_ext >&5
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=no"
9293 fi
9294 rm -f conftest*
9295 xe_check_libs=""
9296
9297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9298   echo "$ac_t""yes" 1>&6
9299   :
9300 else
9301   echo "$ac_t""no" 1>&6
9302 with_xfs=no
9303 fi
9304
9305
9306     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9307       { test "$extra_verbose" = "yes" && cat << \EOF
9308     Defining USE_XFONTSET
9309 EOF
9310 cat >> confdefs.h <<\EOF
9311 #define USE_XFONTSET 1
9312 EOF
9313 }
9314
9315       if test "$with_xim" = "no" ; then
9316         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9317    echo "    xemacs will be linked with \"input-method-xfs.o\""
9318  fi
9319       fi
9320     fi
9321   fi 
9322     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9323   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9324 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9325 echo "configure:9326: checking for wnn/jllib.h" >&5
9326
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330 #include <wnn/jllib.h>
9331 EOF
9332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9333 { (eval echo configure:9334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9335 if test -z "$ac_err"; then
9336   rm -rf conftest*
9337   eval "ac_cv_header_$ac_safe=yes"
9338 else
9339   echo "$ac_err" >&5
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_header_$ac_safe=no"
9344 fi
9345 rm -f conftest*
9346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348   :
9349 else
9350   echo "$ac_t""no" 1>&6
9351 with_wnn=no
9352 fi
9353  }
9354     if test "$with_wnn" != "no"; then
9355     for ac_func in crypt
9356 do
9357 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9358 echo "configure:9359: checking for $ac_func" >&5
9359
9360 cat > conftest.$ac_ext <<EOF
9361 #line 9362 "configure"
9362 #include "confdefs.h"
9363 /* System header to define __stub macros and hopefully few prototypes,
9364     which can conflict with char $ac_func(); below.  */
9365 #include <assert.h>
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char $ac_func();
9370
9371 int main() {
9372
9373 /* The GNU C library defines this for functions which it implements
9374     to always fail with ENOSYS.  Some functions are actually named
9375     something starting with __ and the normal name is an alias.  */
9376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9377 choke me
9378 #else
9379 $ac_func();
9380 #endif
9381
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_func_$ac_func=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_func_$ac_func=no"
9392 fi
9393 rm -f conftest*
9394
9395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9396   echo "$ac_t""yes" 1>&6
9397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9398   { test "$extra_verbose" = "yes" && cat << EOF
9399     Defining $ac_tr_func
9400 EOF
9401 cat >> confdefs.h <<EOF
9402 #define $ac_tr_func 1
9403 EOF
9404 }
9405  
9406 else
9407   echo "$ac_t""no" 1>&6
9408 fi
9409 done
9410
9411     test "$ac_cv_func_crypt" != "yes" && { 
9412 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9413 echo "configure:9414: checking for crypt in -lcrypt" >&5
9414 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9415
9416 xe_check_libs=" -lcrypt "
9417 cat > conftest.$ac_ext <<EOF
9418 #line 9419 "configure"
9419 #include "confdefs.h"
9420 /* Override any gcc2 internal prototype to avoid an error.  */
9421 /* We use char because int might match the return type of a gcc2
9422     builtin and then its argument prototype would still apply.  */
9423 char crypt();
9424
9425 int main() {
9426 crypt()
9427 ; return 0; }
9428 EOF
9429 if { (eval echo configure:9430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9430   rm -rf conftest*
9431   eval "ac_cv_lib_$ac_lib_var=yes"
9432 else
9433   echo "configure: failed program was:" >&5
9434   cat conftest.$ac_ext >&5
9435   rm -rf conftest*
9436   eval "ac_cv_lib_$ac_lib_var=no"
9437 fi
9438 rm -f conftest*
9439 xe_check_libs=""
9440
9441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9442   echo "$ac_t""yes" 1>&6
9443     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9444     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9445   { test "$extra_verbose" = "yes" && cat << EOF
9446     Defining $ac_tr_lib
9447 EOF
9448 cat >> confdefs.h <<EOF
9449 #define $ac_tr_lib 1
9450 EOF
9451 }
9452
9453   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9454
9455 else
9456   echo "$ac_t""no" 1>&6
9457 fi
9458
9459  }
9460   fi
9461     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9462     
9463 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9464 echo "configure:9465: checking for jl_dic_list_e in -lwnn" >&5
9465 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9466
9467 xe_check_libs=" -lwnn "
9468 cat > conftest.$ac_ext <<EOF
9469 #line 9470 "configure"
9470 #include "confdefs.h"
9471 /* Override any gcc2 internal prototype to avoid an error.  */
9472 /* We use char because int might match the return type of a gcc2
9473     builtin and then its argument prototype would still apply.  */
9474 char jl_dic_list_e();
9475
9476 int main() {
9477 jl_dic_list_e()
9478 ; return 0; }
9479 EOF
9480 if { (eval echo configure:9481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9481   rm -rf conftest*
9482   eval "ac_cv_lib_$ac_lib_var=yes"
9483 else
9484   echo "configure: failed program was:" >&5
9485   cat conftest.$ac_ext >&5
9486   rm -rf conftest*
9487   eval "ac_cv_lib_$ac_lib_var=no"
9488 fi
9489 rm -f conftest*
9490 xe_check_libs=""
9491
9492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9493   echo "$ac_t""yes" 1>&6
9494   libwnn=wnn
9495 else
9496   echo "$ac_t""no" 1>&6
9497 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9498 echo "configure:9499: checking for jl_dic_list_e in -lwnn4" >&5
9499 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9500
9501 xe_check_libs=" -lwnn4 "
9502 cat > conftest.$ac_ext <<EOF
9503 #line 9504 "configure"
9504 #include "confdefs.h"
9505 /* Override any gcc2 internal prototype to avoid an error.  */
9506 /* We use char because int might match the return type of a gcc2
9507     builtin and then its argument prototype would still apply.  */
9508 char jl_dic_list_e();
9509
9510 int main() {
9511 jl_dic_list_e()
9512 ; return 0; }
9513 EOF
9514 if { (eval echo configure:9515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9515   rm -rf conftest*
9516   eval "ac_cv_lib_$ac_lib_var=yes"
9517 else
9518   echo "configure: failed program was:" >&5
9519   cat conftest.$ac_ext >&5
9520   rm -rf conftest*
9521   eval "ac_cv_lib_$ac_lib_var=no"
9522 fi
9523 rm -f conftest*
9524 xe_check_libs=""
9525
9526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9527   echo "$ac_t""yes" 1>&6
9528   libwnn=wnn4
9529 else
9530   echo "$ac_t""no" 1>&6
9531 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9532 echo "configure:9533: checking for jl_dic_list_e in -lwnn6" >&5
9533 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9534
9535 xe_check_libs=" -lwnn6 "
9536 cat > conftest.$ac_ext <<EOF
9537 #line 9538 "configure"
9538 #include "confdefs.h"
9539 /* Override any gcc2 internal prototype to avoid an error.  */
9540 /* We use char because int might match the return type of a gcc2
9541     builtin and then its argument prototype would still apply.  */
9542 char jl_dic_list_e();
9543
9544 int main() {
9545 jl_dic_list_e()
9546 ; return 0; }
9547 EOF
9548 if { (eval echo configure:9549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9549   rm -rf conftest*
9550   eval "ac_cv_lib_$ac_lib_var=yes"
9551 else
9552   echo "configure: failed program was:" >&5
9553   cat conftest.$ac_ext >&5
9554   rm -rf conftest*
9555   eval "ac_cv_lib_$ac_lib_var=no"
9556 fi
9557 rm -f conftest*
9558 xe_check_libs=""
9559
9560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9561   echo "$ac_t""yes" 1>&6
9562   libwnn=wnn6
9563 else
9564   echo "$ac_t""no" 1>&6
9565 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9566 echo "configure:9567: checking for dic_list_e in -lwnn6_fromsrc" >&5
9567 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9568
9569 xe_check_libs=" -lwnn6_fromsrc "
9570 cat > conftest.$ac_ext <<EOF
9571 #line 9572 "configure"
9572 #include "confdefs.h"
9573 /* Override any gcc2 internal prototype to avoid an error.  */
9574 /* We use char because int might match the return type of a gcc2
9575     builtin and then its argument prototype would still apply.  */
9576 char dic_list_e();
9577
9578 int main() {
9579 dic_list_e()
9580 ; return 0; }
9581 EOF
9582 if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9583   rm -rf conftest*
9584   eval "ac_cv_lib_$ac_lib_var=yes"
9585 else
9586   echo "configure: failed program was:" >&5
9587   cat conftest.$ac_ext >&5
9588   rm -rf conftest*
9589   eval "ac_cv_lib_$ac_lib_var=no"
9590 fi
9591 rm -f conftest*
9592 xe_check_libs=""
9593
9594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9595   echo "$ac_t""yes" 1>&6
9596   libwnn=wnn6_fromsrc
9597 else
9598   echo "$ac_t""no" 1>&6
9599 with_wnn=no
9600 fi
9601
9602
9603 fi
9604
9605
9606 fi
9607
9608
9609 fi
9610
9611
9612   fi
9613   test -z "$with_wnn" && with_wnn=yes
9614   if test "$with_wnn" = "yes"; then
9615     { test "$extra_verbose" = "yes" && cat << \EOF
9616     Defining HAVE_WNN
9617 EOF
9618 cat >> confdefs.h <<\EOF
9619 #define HAVE_WNN 1
9620 EOF
9621 }
9622
9623     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9624     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9625    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9626  fi
9627     if test "$with_wnn6" != "no"; then
9628       
9629 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9630 echo "configure:9631: checking for jl_fi_dic_list in -l$libwnn" >&5
9631 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9632
9633 xe_check_libs=" -l$libwnn "
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 /* Override any gcc2 internal prototype to avoid an error.  */
9638 /* We use char because int might match the return type of a gcc2
9639     builtin and then its argument prototype would still apply.  */
9640 char jl_fi_dic_list();
9641
9642 int main() {
9643 jl_fi_dic_list()
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9647   rm -rf conftest*
9648   eval "ac_cv_lib_$ac_lib_var=yes"
9649 else
9650   echo "configure: failed program was:" >&5
9651   cat conftest.$ac_ext >&5
9652   rm -rf conftest*
9653   eval "ac_cv_lib_$ac_lib_var=no"
9654 fi
9655 rm -f conftest*
9656 xe_check_libs=""
9657
9658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9659   echo "$ac_t""yes" 1>&6
9660   with_wnn6=yes
9661 else
9662   echo "$ac_t""no" 1>&6
9663 fi
9664
9665
9666       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9667     Defining WNN6
9668 EOF
9669 cat >> confdefs.h <<\EOF
9670 #define WNN6 1
9671 EOF
9672 }
9673
9674     fi
9675   fi
9676
9677     canna_includes_found=no
9678   if test "$with_canna" != "no"; then
9679     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9680 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9681 echo "configure:9682: checking for canna/jrkanji.h" >&5
9682
9683 cat > conftest.$ac_ext <<EOF
9684 #line 9685 "configure"
9685 #include "confdefs.h"
9686 #include <canna/jrkanji.h>
9687 EOF
9688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9689 { (eval echo configure:9690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9691 if test -z "$ac_err"; then
9692   rm -rf conftest*
9693   eval "ac_cv_header_$ac_safe=yes"
9694 else
9695   echo "$ac_err" >&5
9696   echo "configure: failed program was:" >&5
9697   cat conftest.$ac_ext >&5
9698   rm -rf conftest*
9699   eval "ac_cv_header_$ac_safe=no"
9700 fi
9701 rm -f conftest*
9702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9703   echo "$ac_t""yes" 1>&6
9704   canna_includes_found=yes
9705 else
9706   echo "$ac_t""no" 1>&6
9707 fi
9708
9709   fi
9710   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9711       -d "/usr/local/canna/include"; then
9712     save_c_switch_site="$c_switch_site"
9713     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9714     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9715 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9716 echo "configure:9717: checking for canna/jrkanji.h" >&5
9717
9718 cat > conftest.$ac_ext <<EOF
9719 #line 9720 "configure"
9720 #include "confdefs.h"
9721 #include <canna/jrkanji.h>
9722 EOF
9723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9724 { (eval echo configure:9725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9726 if test -z "$ac_err"; then
9727   rm -rf conftest*
9728   eval "ac_cv_header_$ac_safe=yes"
9729 else
9730   echo "$ac_err" >&5
9731   echo "configure: failed program was:" >&5
9732   cat conftest.$ac_ext >&5
9733   rm -rf conftest*
9734   eval "ac_cv_header_$ac_safe=no"
9735 fi
9736 rm -f conftest*
9737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9738   echo "$ac_t""yes" 1>&6
9739   canna_includes_found=yes
9740 else
9741   echo "$ac_t""no" 1>&6
9742 fi
9743
9744     if test "$canna_includes_found" != "yes"; then
9745       c_switch_site="$save_c_switch_site"
9746       with_canna="no"
9747     fi
9748   fi
9749
9750   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9751 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9752 echo "configure:9753: checking for canna/RK.h" >&5
9753
9754 cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 #include <canna/RK.h>
9758 EOF
9759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9760 { (eval echo configure:9761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9762 if test -z "$ac_err"; then
9763   rm -rf conftest*
9764   eval "ac_cv_header_$ac_safe=yes"
9765 else
9766   echo "$ac_err" >&5
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769   rm -rf conftest*
9770   eval "ac_cv_header_$ac_safe=no"
9771 fi
9772 rm -f conftest*
9773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9774   echo "$ac_t""yes" 1>&6
9775   :
9776 else
9777   echo "$ac_t""no" 1>&6
9778 with_canna=no
9779 fi
9780  }
9781   test -z "$with_canna" && { 
9782 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9783 echo "configure:9784: checking for RkBgnBun in -lRKC" >&5
9784 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9785
9786 xe_check_libs=" -lRKC "
9787 cat > conftest.$ac_ext <<EOF
9788 #line 9789 "configure"
9789 #include "confdefs.h"
9790 /* Override any gcc2 internal prototype to avoid an error.  */
9791 /* We use char because int might match the return type of a gcc2
9792     builtin and then its argument prototype would still apply.  */
9793 char RkBgnBun();
9794
9795 int main() {
9796 RkBgnBun()
9797 ; return 0; }
9798 EOF
9799 if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9800   rm -rf conftest*
9801   eval "ac_cv_lib_$ac_lib_var=yes"
9802 else
9803   echo "configure: failed program was:" >&5
9804   cat conftest.$ac_ext >&5
9805   rm -rf conftest*
9806   eval "ac_cv_lib_$ac_lib_var=no"
9807 fi
9808 rm -f conftest*
9809 xe_check_libs=""
9810
9811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9812   echo "$ac_t""yes" 1>&6
9813   :
9814 else
9815   echo "$ac_t""no" 1>&6
9816 with_canna=no
9817 fi
9818
9819  }
9820   test -z "$with_canna" && { 
9821 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9822 echo "configure:9823: checking for jrKanjiControl in -lcanna" >&5
9823 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9824
9825 xe_check_libs=" -lcanna "
9826 cat > conftest.$ac_ext <<EOF
9827 #line 9828 "configure"
9828 #include "confdefs.h"
9829 /* Override any gcc2 internal prototype to avoid an error.  */
9830 /* We use char because int might match the return type of a gcc2
9831     builtin and then its argument prototype would still apply.  */
9832 char jrKanjiControl();
9833
9834 int main() {
9835 jrKanjiControl()
9836 ; return 0; }
9837 EOF
9838 if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9839   rm -rf conftest*
9840   eval "ac_cv_lib_$ac_lib_var=yes"
9841 else
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   eval "ac_cv_lib_$ac_lib_var=no"
9846 fi
9847 rm -f conftest*
9848 xe_check_libs=""
9849
9850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9851   echo "$ac_t""yes" 1>&6
9852   :
9853 else
9854   echo "$ac_t""no" 1>&6
9855 with_canna=no
9856 fi
9857
9858  }
9859   test -z "$with_canna" && with_canna=yes
9860   if test "$with_canna" = "yes"; then
9861     { test "$extra_verbose" = "yes" && cat << \EOF
9862     Defining HAVE_CANNA
9863 EOF
9864 cat >> confdefs.h <<\EOF
9865 #define HAVE_CANNA 1
9866 EOF
9867 }
9868
9869     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9870     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9871    echo "    xemacs will be linked with \"mule-canna.o\""
9872  fi
9873   fi
9874
9875 else   for feature in xim canna wnn; do
9876     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9877       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9878     fi
9879     eval "with_${feature}=no"
9880   done
9881 fi 
9882
9883 if test "$need_motif" = "yes" ; then
9884   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9885     
9886 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9887 echo "configure:9888: checking for layout_object_getvalue in -li18n" >&5
9888 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9889
9890 xe_check_libs=" -li18n "
9891 cat > conftest.$ac_ext <<EOF
9892 #line 9893 "configure"
9893 #include "confdefs.h"
9894 /* Override any gcc2 internal prototype to avoid an error.  */
9895 /* We use char because int might match the return type of a gcc2
9896     builtin and then its argument prototype would still apply.  */
9897 char layout_object_getvalue();
9898
9899 int main() {
9900 layout_object_getvalue()
9901 ; return 0; }
9902 EOF
9903 if { (eval echo configure:9904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9904   rm -rf conftest*
9905   eval "ac_cv_lib_$ac_lib_var=yes"
9906 else
9907   echo "configure: failed program was:" >&5
9908   cat conftest.$ac_ext >&5
9909   rm -rf conftest*
9910   eval "ac_cv_lib_$ac_lib_var=no"
9911 fi
9912 rm -f conftest*
9913 xe_check_libs=""
9914
9915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9916   echo "$ac_t""yes" 1>&6
9917   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9918 else
9919   echo "$ac_t""no" 1>&6
9920 fi
9921
9922
9923   
9924 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9925     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9926   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9927   
9928         runpath="" runpath_dirs=""
9929   if test -n "$LD_RUN_PATH"; then
9930     runpath="$LD_RUN_PATH"
9931   elif test "$GCC" = "yes"; then
9932         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9933     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9934     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9935     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9936       case "$arg" in P,* | -L* | -R* )
9937         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9938           {
9939 xe_runpath_dir="$dir"
9940   test "$xe_runpath_dir" != "/lib"     -a \
9941         "$xe_runpath_dir" != "/usr/lib" -a \
9942         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9943   eval "$xe_add_unique_runpath_dir"
9944 }
9945         done ;;
9946       esac
9947     done
9948     ld_switch_run="$ld_switch_run_save"
9949     rm -f conftest*
9950   else
9951         for arg in $ld_switch_site $ld_switch_x_site; do
9952       case "$arg" in -L*) {
9953 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9954   test "$xe_runpath_dir" != "/lib"     -a \
9955         "$xe_runpath_dir" != "/usr/lib" -a \
9956         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9957   eval "$xe_add_unique_runpath_dir"
9958 };; esac
9959     done
9960         if test "$opsys $need_motif" = "sol2 yes"; then
9961       xe_runpath_dir="/opt/SUNWdt/lib";
9962       eval "$xe_add_unique_runpath_dir";
9963     fi
9964   fi 
9965   if test -n "$runpath"; then
9966     ld_switch_run="${dash_r}${runpath}"
9967     
9968 if test "$GCC" = "yes"; then
9969   set x $ld_switch_run; shift; ld_switch_run=""
9970   while test -n "$1"; do
9971     case $1 in
9972       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9973       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9974       -Xlinker* ) ;;
9975       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9976     esac
9977     shift
9978   done
9979 fi
9980     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9981   fi
9982 fi
9983
9984 fi
9985
9986 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
9987 do
9988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9989 echo "configure:9990: checking for $ac_func" >&5
9990
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 /* System header to define __stub macros and hopefully few prototypes,
9995     which can conflict with char $ac_func(); below.  */
9996 #include <assert.h>
9997 /* Override any gcc2 internal prototype to avoid an error.  */
9998 /* We use char because int might match the return type of a gcc2
9999     builtin and then its argument prototype would still apply.  */
10000 char $ac_func();
10001
10002 int main() {
10003
10004 /* The GNU C library defines this for functions which it implements
10005     to always fail with ENOSYS.  Some functions are actually named
10006     something starting with __ and the normal name is an alias.  */
10007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10008 choke me
10009 #else
10010 $ac_func();
10011 #endif
10012
10013 ; return 0; }
10014 EOF
10015 if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10016   rm -rf conftest*
10017   eval "ac_cv_func_$ac_func=yes"
10018 else
10019   echo "configure: failed program was:" >&5
10020   cat conftest.$ac_ext >&5
10021   rm -rf conftest*
10022   eval "ac_cv_func_$ac_func=no"
10023 fi
10024 rm -f conftest*
10025
10026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10027   echo "$ac_t""yes" 1>&6
10028     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10029   { test "$extra_verbose" = "yes" && cat << EOF
10030     Defining $ac_tr_func
10031 EOF
10032 cat >> confdefs.h <<EOF
10033 #define $ac_tr_func 1
10034 EOF
10035 }
10036  
10037 else
10038   echo "$ac_t""no" 1>&6
10039 fi
10040 done
10041
10042
10043 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10044    echo "    xemacs will be linked with \"realpath.o\""
10045  fi
10046
10047 for ac_func in getloadavg
10048 do
10049 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10050 echo "configure:10051: checking for $ac_func" >&5
10051
10052 cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 /* System header to define __stub macros and hopefully few prototypes,
10056     which can conflict with char $ac_func(); below.  */
10057 #include <assert.h>
10058 /* Override any gcc2 internal prototype to avoid an error.  */
10059 /* We use char because int might match the return type of a gcc2
10060     builtin and then its argument prototype would still apply.  */
10061 char $ac_func();
10062
10063 int main() {
10064
10065 /* The GNU C library defines this for functions which it implements
10066     to always fail with ENOSYS.  Some functions are actually named
10067     something starting with __ and the normal name is an alias.  */
10068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10069 choke me
10070 #else
10071 $ac_func();
10072 #endif
10073
10074 ; return 0; }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10077   rm -rf conftest*
10078   eval "ac_cv_func_$ac_func=yes"
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_func_$ac_func=no"
10084 fi
10085 rm -f conftest*
10086
10087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10090   { test "$extra_verbose" = "yes" && cat << EOF
10091     Defining $ac_tr_func
10092 EOF
10093 cat >> confdefs.h <<EOF
10094 #define $ac_tr_func 1
10095 EOF
10096 }
10097  
10098 else
10099   echo "$ac_t""no" 1>&6
10100 fi
10101 done
10102
10103
10104 if test "$ac_cv_func_getloadavg" != "yes"
10105 then
10106   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10107    echo "    xemacs will be linked with \"getloadavg.o\""
10108  fi
10109
10110     
10111 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10112 echo "configure:10113: checking for kstat_open in -lkstat" >&5
10113 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10114
10115 xe_check_libs=" -lkstat "
10116 cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char kstat_open();
10123
10124 int main() {
10125 kstat_open()
10126 ; return 0; }
10127 EOF
10128 if { (eval echo configure:10129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10129   rm -rf conftest*
10130   eval "ac_cv_lib_$ac_lib_var=yes"
10131 else
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   rm -rf conftest*
10135   eval "ac_cv_lib_$ac_lib_var=no"
10136 fi
10137 rm -f conftest*
10138 xe_check_libs=""
10139
10140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10141   echo "$ac_t""yes" 1>&6
10142     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10144   { test "$extra_verbose" = "yes" && cat << EOF
10145     Defining $ac_tr_lib
10146 EOF
10147 cat >> confdefs.h <<EOF
10148 #define $ac_tr_lib 1
10149 EOF
10150 }
10151
10152   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10153
10154 else
10155   echo "$ac_t""no" 1>&6
10156 fi
10157
10158
10159
10160     
10161 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10162 echo "configure:10163: checking for kvm_read in -lkvm" >&5
10163 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10164
10165 xe_check_libs=" -lkvm "
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 /* Override any gcc2 internal prototype to avoid an error.  */
10170 /* We use char because int might match the return type of a gcc2
10171     builtin and then its argument prototype would still apply.  */
10172 char kvm_read();
10173
10174 int main() {
10175 kvm_read()
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_lib_$ac_lib_var=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_lib_$ac_lib_var=no"
10186 fi
10187 rm -f conftest*
10188 xe_check_libs=""
10189
10190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10191   echo "$ac_t""yes" 1>&6
10192     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10193     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10194   { test "$extra_verbose" = "yes" && cat << EOF
10195     Defining $ac_tr_lib
10196 EOF
10197 cat >> confdefs.h <<EOF
10198 #define $ac_tr_lib 1
10199 EOF
10200 }
10201
10202   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10203
10204 else
10205   echo "$ac_t""no" 1>&6
10206 fi
10207
10208
10209 fi
10210
10211 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10212 echo "configure:10213: checking whether netdb declares h_errno" >&5
10213 cat > conftest.$ac_ext <<EOF
10214 #line 10215 "configure"
10215 #include "confdefs.h"
10216 #include <netdb.h>
10217 int main() {
10218 return h_errno;
10219 ; return 0; }
10220 EOF
10221 if { (eval echo configure:10222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10222   rm -rf conftest*
10223   echo "$ac_t""yes" 1>&6
10224    { test "$extra_verbose" = "yes" && cat << \EOF
10225     Defining HAVE_H_ERRNO
10226 EOF
10227 cat >> confdefs.h <<\EOF
10228 #define HAVE_H_ERRNO 1
10229 EOF
10230 }
10231
10232 else
10233   echo "configure: failed program was:" >&5
10234   cat conftest.$ac_ext >&5
10235   rm -rf conftest*
10236   echo "$ac_t""no" 1>&6
10237 fi
10238 rm -f conftest*
10239
10240 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10241 echo "configure:10242: checking for sigsetjmp" >&5
10242 cat > conftest.$ac_ext <<EOF
10243 #line 10244 "configure"
10244 #include "confdefs.h"
10245 #include <setjmp.h>
10246 int main() {
10247 sigjmp_buf bar; sigsetjmp (bar, 0);
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10251   rm -rf conftest*
10252   echo "$ac_t""yes" 1>&6
10253    { test "$extra_verbose" = "yes" && cat << \EOF
10254     Defining HAVE_SIGSETJMP
10255 EOF
10256 cat >> confdefs.h <<\EOF
10257 #define HAVE_SIGSETJMP 1
10258 EOF
10259 }
10260
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   echo "$ac_t""no" 1>&6
10266 fi
10267 rm -f conftest*
10268
10269 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10270 echo "configure:10271: checking whether localtime caches TZ" >&5
10271
10272 if test "$ac_cv_func_tzset" = "yes"; then
10273 cat > conftest.$ac_ext <<EOF
10274 #line 10275 "configure"
10275 #include "confdefs.h"
10276 #include <time.h>
10277 #if STDC_HEADERS
10278 # include <stdlib.h>
10279 #endif
10280 extern char **environ;
10281 unset_TZ ()
10282 {
10283   char **from, **to;
10284   for (to = from = environ; (*to = *from); from++)
10285     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10286       to++;
10287 }
10288 char TZ_GMT0[] = "TZ=GMT0";
10289 char TZ_PST8[] = "TZ=PST8";
10290 main()
10291 {
10292   time_t now = time ((time_t *) 0);
10293   int hour_GMT0, hour_unset;
10294   if (putenv (TZ_GMT0) != 0)
10295     exit (1);
10296   hour_GMT0 = localtime (&now)->tm_hour;
10297   unset_TZ ();
10298   hour_unset = localtime (&now)->tm_hour;
10299   if (putenv (TZ_PST8) != 0)
10300     exit (1);
10301   if (localtime (&now)->tm_hour == hour_GMT0)
10302     exit (1);
10303   unset_TZ ();
10304   if (localtime (&now)->tm_hour != hour_unset)
10305     exit (1);
10306   exit (0);
10307 }
10308 EOF
10309 if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10310 then
10311   emacs_cv_localtime_cache=no
10312 else
10313   conftest_rc="$?"
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -fr conftest*
10317   emacs_cv_localtime_cache=yes
10318 fi
10319 rm -fr conftest*
10320 else
10321         # If we lack tzset, report that localtime does not cache TZ,
10322         # since we can't invalidate the cache if we don't have tzset.
10323         emacs_cv_localtime_cache=no
10324 fi
10325 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10326 if test $emacs_cv_localtime_cache = yes; then
10327   { test "$extra_verbose" = "yes" && cat << \EOF
10328     Defining LOCALTIME_CACHE
10329 EOF
10330 cat >> confdefs.h <<\EOF
10331 #define LOCALTIME_CACHE 1
10332 EOF
10333 }
10334
10335 fi
10336
10337 if test "$HAVE_TIMEVAL" = "yes"; then
10338 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10339 echo "configure:10340: checking whether gettimeofday accepts one or two arguments" >&5
10340 cat > conftest.$ac_ext <<EOF
10341 #line 10342 "configure"
10342 #include "confdefs.h"
10343
10344 #ifdef TIME_WITH_SYS_TIME
10345 #include <sys/time.h>
10346 #include <time.h>
10347 #else
10348 #ifdef HAVE_SYS_TIME_H
10349 #include <sys/time.h>
10350 #else
10351 #include <time.h>
10352 #endif
10353 #endif
10354   
10355 int main() {
10356
10357   struct timeval time;
10358   gettimeofday (&time, 0);
10359
10360 ; return 0; }
10361 EOF
10362 if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10363   rm -rf conftest*
10364   echo "$ac_t""two" 1>&6
10365 else
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -rf conftest*
10369   echo "$ac_t""one" 1>&6
10370    { test "$extra_verbose" = "yes" && cat << \EOF
10371     Defining GETTIMEOFDAY_ONE_ARGUMENT
10372 EOF
10373 cat >> confdefs.h <<\EOF
10374 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10375 EOF
10376 }
10377
10378 fi
10379 rm -f conftest*
10380 fi
10381
10382
10383 echo $ac_n "checking for inline""... $ac_c" 1>&6
10384 echo "configure:10385: checking for inline" >&5
10385
10386 ac_cv_c_inline=no
10387 for ac_kw in inline __inline__ __inline; do
10388   cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391
10392 int main() {
10393 } $ac_kw foo() {
10394 ; return 0; }
10395 EOF
10396 if { (eval echo configure:10397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10397   rm -rf conftest*
10398   ac_cv_c_inline=$ac_kw; break
10399 else
10400   echo "configure: failed program was:" >&5
10401   cat conftest.$ac_ext >&5
10402 fi
10403 rm -f conftest*
10404 done
10405
10406
10407 echo "$ac_t""$ac_cv_c_inline" 1>&6
10408 case "$ac_cv_c_inline" in
10409   inline | yes) ;;
10410   no) { test "$extra_verbose" = "yes" && cat << \EOF
10411     Defining inline = 
10412 EOF
10413 cat >> confdefs.h <<\EOF
10414 #define inline 
10415 EOF
10416 }
10417  ;;
10418   *)  { test "$extra_verbose" = "yes" && cat << EOF
10419     Defining inline = $ac_cv_c_inline
10420 EOF
10421 cat >> confdefs.h <<EOF
10422 #define inline $ac_cv_c_inline
10423 EOF
10424 }
10425  ;;
10426 esac
10427
10428 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10429    echo "    xemacs will be linked with \"inline.o\""
10430  fi
10431
10432
10433 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10434 # for constant arguments.  Useless!
10435 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10436 echo "configure:10437: checking for working alloca.h" >&5
10437
10438 cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441 #include <alloca.h>
10442 int main() {
10443 char *p = alloca(2 * sizeof(int));
10444 ; return 0; }
10445 EOF
10446 if { (eval echo configure:10447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10447   rm -rf conftest*
10448   ac_cv_header_alloca_h=yes
10449 else
10450   echo "configure: failed program was:" >&5
10451   cat conftest.$ac_ext >&5
10452   rm -rf conftest*
10453   ac_cv_header_alloca_h=no
10454 fi
10455 rm -f conftest*
10456
10457 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10458 if test $ac_cv_header_alloca_h = yes; then
10459   { test "$extra_verbose" = "yes" && cat << \EOF
10460     Defining HAVE_ALLOCA_H
10461 EOF
10462 cat >> confdefs.h <<\EOF
10463 #define HAVE_ALLOCA_H 1
10464 EOF
10465 }
10466
10467 fi
10468
10469 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10470 echo "configure:10471: checking for alloca" >&5
10471
10472 cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 #ifdef __GNUC__
10477 # define alloca __builtin_alloca
10478 #else
10479 # ifdef _MSC_VER
10480 #  include <malloc.h>
10481 #  define alloca _alloca
10482 # else
10483 #  if HAVE_ALLOCA_H
10484 #   include <alloca.h>
10485 #  else
10486 #   ifdef _AIX
10487  #pragma alloca
10488 #   else
10489 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10490 char *alloca ();
10491 #    endif
10492 #   endif
10493 #  endif
10494 # endif
10495 #endif
10496
10497 int main() {
10498 char *p = (char *) alloca(1);
10499 ; return 0; }
10500 EOF
10501 if { (eval echo configure:10502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10502   rm -rf conftest*
10503   ac_cv_func_alloca_works=yes
10504 else
10505   echo "configure: failed program was:" >&5
10506   cat conftest.$ac_ext >&5
10507   rm -rf conftest*
10508   ac_cv_func_alloca_works=no
10509 fi
10510 rm -f conftest*
10511
10512 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10513 if test $ac_cv_func_alloca_works = yes; then
10514   { test "$extra_verbose" = "yes" && cat << \EOF
10515     Defining HAVE_ALLOCA
10516 EOF
10517 cat >> confdefs.h <<\EOF
10518 #define HAVE_ALLOCA 1
10519 EOF
10520 }
10521
10522 fi
10523
10524 if test $ac_cv_func_alloca_works = no; then
10525   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10526   # that cause trouble.  Some versions do not even contain alloca or
10527   # contain a buggy version.  If you still want to use their alloca,
10528   # use ar to extract alloca.o from them instead of compiling alloca.c.
10529   ALLOCA=alloca.${ac_objext}
10530   { test "$extra_verbose" = "yes" && cat << \EOF
10531     Defining C_ALLOCA
10532 EOF
10533 cat >> confdefs.h <<\EOF
10534 #define C_ALLOCA 1
10535 EOF
10536 }
10537
10538
10539 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10540 echo "configure:10541: checking whether alloca needs Cray hooks" >&5
10541
10542 cat > conftest.$ac_ext <<EOF
10543 #line 10544 "configure"
10544 #include "confdefs.h"
10545 #if defined(CRAY) && ! defined(CRAY2)
10546 webecray
10547 #else
10548 wenotbecray
10549 #endif
10550
10551 EOF
10552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10553   egrep "webecray" >/dev/null 2>&1; then
10554   rm -rf conftest*
10555   ac_cv_os_cray=yes
10556 else
10557   rm -rf conftest*
10558   ac_cv_os_cray=no
10559 fi
10560 rm -f conftest*
10561
10562
10563 echo "$ac_t""$ac_cv_os_cray" 1>&6
10564 if test $ac_cv_os_cray = yes; then
10565 for ac_func in _getb67 GETB67 getb67; do
10566   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10567 echo "configure:10568: checking for $ac_func" >&5
10568
10569 cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572 /* System header to define __stub macros and hopefully few prototypes,
10573     which can conflict with char $ac_func(); below.  */
10574 #include <assert.h>
10575 /* Override any gcc2 internal prototype to avoid an error.  */
10576 /* We use char because int might match the return type of a gcc2
10577     builtin and then its argument prototype would still apply.  */
10578 char $ac_func();
10579
10580 int main() {
10581
10582 /* The GNU C library defines this for functions which it implements
10583     to always fail with ENOSYS.  Some functions are actually named
10584     something starting with __ and the normal name is an alias.  */
10585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10586 choke me
10587 #else
10588 $ac_func();
10589 #endif
10590
10591 ; return 0; }
10592 EOF
10593 if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10594   rm -rf conftest*
10595   eval "ac_cv_func_$ac_func=yes"
10596 else
10597   echo "configure: failed program was:" >&5
10598   cat conftest.$ac_ext >&5
10599   rm -rf conftest*
10600   eval "ac_cv_func_$ac_func=no"
10601 fi
10602 rm -f conftest*
10603
10604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10605   echo "$ac_t""yes" 1>&6
10606   { test "$extra_verbose" = "yes" && cat << EOF
10607     Defining CRAY_STACKSEG_END = $ac_func
10608 EOF
10609 cat >> confdefs.h <<EOF
10610 #define CRAY_STACKSEG_END $ac_func
10611 EOF
10612 }
10613
10614   break
10615 else
10616   echo "$ac_t""no" 1>&6
10617 fi
10618
10619 done
10620 fi
10621
10622 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10623 echo "configure:10624: checking stack direction for C alloca" >&5
10624
10625 cat > conftest.$ac_ext <<EOF
10626 #line 10627 "configure"
10627 #include "confdefs.h"
10628 find_stack_direction ()
10629 {
10630   static char *addr = 0;
10631   auto char dummy;
10632   if (addr == 0)
10633     {
10634       addr = &dummy;
10635       return find_stack_direction ();
10636     }
10637   else
10638     return (&dummy > addr) ? 1 : -1;
10639 }
10640 main ()
10641 {
10642   exit (find_stack_direction() < 0);
10643 }
10644 EOF
10645 if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10646 then
10647   ac_cv_c_stack_direction=1
10648 else
10649   conftest_rc="$?"
10650   echo "configure: failed program was:" >&5
10651   cat conftest.$ac_ext >&5
10652   rm -fr conftest*
10653   ac_cv_c_stack_direction=-1
10654 fi
10655 rm -fr conftest*
10656
10657 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10658 { test "$extra_verbose" = "yes" && cat << EOF
10659     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10660 EOF
10661 cat >> confdefs.h <<EOF
10662 #define STACK_DIRECTION $ac_cv_c_stack_direction
10663 EOF
10664 }
10665
10666 fi
10667
10668 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10669    echo "    xemacs will be linked with \"$ALLOCA\""
10670  fi
10671
10672 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10673 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10674 echo "configure:10675: checking for vfork.h" >&5
10675
10676 cat > conftest.$ac_ext <<EOF
10677 #line 10678 "configure"
10678 #include "confdefs.h"
10679 #include <vfork.h>
10680 EOF
10681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10682 { (eval echo configure:10683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10684 if test -z "$ac_err"; then
10685   rm -rf conftest*
10686   eval "ac_cv_header_$ac_safe=yes"
10687 else
10688   echo "$ac_err" >&5
10689   echo "configure: failed program was:" >&5
10690   cat conftest.$ac_ext >&5
10691   rm -rf conftest*
10692   eval "ac_cv_header_$ac_safe=no"
10693 fi
10694 rm -f conftest*
10695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10696   echo "$ac_t""yes" 1>&6
10697   { test "$extra_verbose" = "yes" && cat << \EOF
10698     Defining HAVE_VFORK_H
10699 EOF
10700 cat >> confdefs.h <<\EOF
10701 #define HAVE_VFORK_H 1
10702 EOF
10703 }
10704
10705 else
10706   echo "$ac_t""no" 1>&6
10707 fi
10708
10709 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10710 echo "configure:10711: checking for working vfork" >&5
10711
10712 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715 /* Thanks to Paul Eggert for this test.  */
10716 #include <stdio.h>
10717 #include <sys/types.h>
10718 #include <sys/stat.h>
10719 #ifdef HAVE_UNISTD_H
10720 #include <unistd.h>
10721 #endif
10722 #ifdef HAVE_VFORK_H
10723 #include <vfork.h>
10724 #endif
10725 /* On some sparc systems, changes by the child to local and incoming
10726    argument registers are propagated back to the parent.
10727    The compiler is told about this with #include <vfork.h>,
10728    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10729    Test for this by using a static variable whose address
10730    is put into a register that is clobbered by the vfork.  */
10731 static
10732 #ifdef __cplusplus
10733 sparc_address_test (int arg)
10734 #else
10735 sparc_address_test (arg) int arg;
10736 #endif
10737 {
10738   static pid_t child;
10739   if (!child) {
10740     child = vfork ();
10741     if (child < 0) {
10742       perror ("vfork");
10743       _exit(2);
10744     }
10745     if (!child) {
10746       arg = getpid();
10747       write(-1, "", 0);
10748       _exit (arg);
10749     }
10750   }
10751 }
10752 main() {
10753   pid_t parent = getpid ();
10754   pid_t child;
10755
10756   sparc_address_test ();
10757
10758   child = vfork ();
10759
10760   if (child == 0) {
10761     /* Here is another test for sparc vfork register problems.
10762        This test uses lots of local variables, at least
10763        as many local variables as main has allocated so far
10764        including compiler temporaries.  4 locals are enough for
10765        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10766        A buggy compiler should reuse the register of parent
10767        for one of the local variables, since it will think that
10768        parent can't possibly be used any more in this routine.
10769        Assigning to the local variable will thus munge parent
10770        in the parent process.  */
10771     pid_t
10772       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10773       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10774     /* Convince the compiler that p..p7 are live; otherwise, it might
10775        use the same hardware register for all 8 local variables.  */
10776     if (p != p1 || p != p2 || p != p3 || p != p4
10777         || p != p5 || p != p6 || p != p7)
10778       _exit(1);
10779
10780     /* On some systems (e.g. IRIX 3.3),
10781        vfork doesn't separate parent from child file descriptors.
10782        If the child closes a descriptor before it execs or exits,
10783        this munges the parent's descriptor as well.
10784        Test for this by closing stdout in the child.  */
10785     _exit(close(fileno(stdout)) != 0);
10786   } else {
10787     int status;
10788     struct stat st;
10789
10790     while (wait(&status) != child)
10791       ;
10792     exit(
10793          /* Was there some problem with vforking?  */
10794          child < 0
10795
10796          /* Did the child fail?  (This shouldn't happen.)  */
10797          || status
10798
10799          /* Did the vfork/compiler bug occur?  */
10800          || parent != getpid()
10801
10802          /* Did the file descriptor bug occur?  */
10803          || fstat(fileno(stdout), &st) != 0
10804          );
10805   }
10806 }
10807 EOF
10808 if { (eval echo configure:10809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10809 then
10810   ac_cv_func_vfork_works=yes
10811 else
10812   conftest_rc="$?"
10813   echo "configure: failed program was:" >&5
10814   cat conftest.$ac_ext >&5
10815   rm -fr conftest*
10816   ac_cv_func_vfork_works=no
10817 fi
10818 rm -fr conftest*
10819
10820 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10821 if test $ac_cv_func_vfork_works = no; then
10822   { test "$extra_verbose" = "yes" && cat << \EOF
10823     Defining vfork = fork
10824 EOF
10825 cat >> confdefs.h <<\EOF
10826 #define vfork fork
10827 EOF
10828 }
10829
10830 fi
10831
10832
10833 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10834 echo "configure:10835: checking for working strcoll" >&5
10835
10836 cat > conftest.$ac_ext <<EOF
10837 #line 10838 "configure"
10838 #include "confdefs.h"
10839 #include <string.h>
10840 main ()
10841 {
10842   exit (strcoll ("abc", "def") >= 0 ||
10843         strcoll ("ABC", "DEF") >= 0 ||
10844         strcoll ("123", "456") >= 0);
10845 }
10846 EOF
10847 if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10848 then
10849   ac_cv_func_strcoll_works=yes
10850 else
10851   conftest_rc="$?"
10852   echo "configure: failed program was:" >&5
10853   cat conftest.$ac_ext >&5
10854   rm -fr conftest*
10855   ac_cv_func_strcoll_works=no
10856 fi
10857 rm -fr conftest*
10858
10859 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10860 if test $ac_cv_func_strcoll_works = yes; then
10861   { test "$extra_verbose" = "yes" && cat << \EOF
10862     Defining HAVE_STRCOLL
10863 EOF
10864 cat >> confdefs.h <<\EOF
10865 #define HAVE_STRCOLL 1
10866 EOF
10867 }
10868
10869 fi
10870
10871
10872 for ac_func in getpgrp
10873 do
10874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10875 echo "configure:10876: checking for $ac_func" >&5
10876
10877 cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 /* System header to define __stub macros and hopefully few prototypes,
10881     which can conflict with char $ac_func(); below.  */
10882 #include <assert.h>
10883 /* Override any gcc2 internal prototype to avoid an error.  */
10884 /* We use char because int might match the return type of a gcc2
10885     builtin and then its argument prototype would still apply.  */
10886 char $ac_func();
10887
10888 int main() {
10889
10890 /* The GNU C library defines this for functions which it implements
10891     to always fail with ENOSYS.  Some functions are actually named
10892     something starting with __ and the normal name is an alias.  */
10893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10894 choke me
10895 #else
10896 $ac_func();
10897 #endif
10898
10899 ; return 0; }
10900 EOF
10901 if { (eval echo configure:10902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10902   rm -rf conftest*
10903   eval "ac_cv_func_$ac_func=yes"
10904 else
10905   echo "configure: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907   rm -rf conftest*
10908   eval "ac_cv_func_$ac_func=no"
10909 fi
10910 rm -f conftest*
10911
10912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10913   echo "$ac_t""yes" 1>&6
10914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10915   { test "$extra_verbose" = "yes" && cat << EOF
10916     Defining $ac_tr_func
10917 EOF
10918 cat >> confdefs.h <<EOF
10919 #define $ac_tr_func 1
10920 EOF
10921 }
10922  
10923 else
10924   echo "$ac_t""no" 1>&6
10925 fi
10926 done
10927
10928 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10929 echo "configure:10930: checking whether getpgrp takes no argument" >&5
10930
10931 cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934
10935 /*
10936  * If this system has a BSD-style getpgrp(),
10937  * which takes a pid argument, exit unsuccessfully.
10938  *
10939  * Snarfed from Chet Ramey's bash pgrp.c test program
10940  */
10941 #include <stdio.h>
10942 #include <sys/types.h>
10943
10944 int     pid;
10945 int     pg1, pg2, pg3, pg4;
10946 int     ng, np, s, child;
10947
10948 main()
10949 {
10950         pid = getpid();
10951         pg1 = getpgrp(0);
10952         pg2 = getpgrp();
10953         pg3 = getpgrp(pid);
10954         pg4 = getpgrp(1);
10955
10956         /*
10957          * If all of these values are the same, it's pretty sure that
10958          * we're on a system that ignores getpgrp's first argument.
10959          */
10960         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10961                 exit(0);
10962
10963         child = fork();
10964         if (child < 0)
10965                 exit(1);
10966         else if (child == 0) {
10967                 np = getpid();
10968                 /*
10969                  * If this is Sys V, this will not work; pgrp will be
10970                  * set to np because setpgrp just changes a pgrp to be
10971                  * the same as the pid.
10972                  */
10973                 setpgrp(np, pg1);
10974                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10975                 if (ng == pg1) {
10976                         exit(1);
10977                 } else {
10978                         exit(0);
10979                 }
10980         } else {
10981                 wait(&s);
10982                 exit(s>>8);
10983         }
10984 }
10985
10986 EOF
10987 if { (eval echo configure:10988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10988 then
10989   ac_cv_func_getpgrp_void=yes
10990 else
10991   conftest_rc="$?"
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -fr conftest*
10995   ac_cv_func_getpgrp_void=no
10996 fi
10997 rm -fr conftest*
10998
10999
11000 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11001 if test $ac_cv_func_getpgrp_void = yes; then
11002   { test "$extra_verbose" = "yes" && cat << \EOF
11003     Defining GETPGRP_VOID
11004 EOF
11005 cat >> confdefs.h <<\EOF
11006 #define GETPGRP_VOID 1
11007 EOF
11008 }
11009
11010 fi
11011
11012
11013 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11014 echo "configure:11015: checking for working mmap" >&5
11015 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11016 cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <stdio.h>
11020 #include <unistd.h>
11021 #include <fcntl.h>
11022 #include <sys/mman.h>
11023
11024 #ifndef MAP_VARIABLE
11025 #define MAP_VARIABLE 0
11026 #endif
11027
11028 #ifndef MAP_FAILED
11029 #define MAP_FAILED -1
11030 #endif
11031
11032 int main (int argc, char *argv[])
11033 {
11034   int fd = -1;
11035   caddr_t p;
11036 #ifndef MAP_ANONYMOUS
11037   fd = open ("/dev/zero", O_RDWR);
11038   if (fd < 0)
11039     return 1;
11040 #define MAP_ANONYMOUS 0
11041 #endif
11042   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11043            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11044            fd, 0) != (void *) MAP_FAILED)
11045     return 0;
11046   perror ("conftest: mmap failed");
11047   return 1;
11048 }
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11051 then
11052   have_mmap=yes
11053 else
11054   conftest_rc="$?"
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -fr conftest*
11058   have_mmap=no
11059 fi
11060 rm -fr conftest* ;;
11061 esac
11062 echo "$ac_t""$have_mmap" 1>&6
11063 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11064     Defining HAVE_MMAP
11065 EOF
11066 cat >> confdefs.h <<\EOF
11067 #define HAVE_MMAP 1
11068 EOF
11069 }
11070
11071
11072 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11073 if test "$rel_alloc $have_mmap" = "default yes"; then
11074   if test "$doug_lea_malloc" = "yes"; then
11075         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11076 echo "configure:11077: checking for M_MMAP_THRESHOLD" >&5
11077     cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080 #include <malloc.h>
11081 int main() {
11082
11083 #ifndef M_MMAP_THRESHOLD
11084 #error No M_MMAP_THRESHOLD :-(
11085 !@+$%^&*_)(_ - unlikely to compile...
11086 #endif
11087
11088 ; return 0; }
11089 EOF
11090 if { (eval echo configure:11091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11091   rm -rf conftest*
11092   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11093 else
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -rf conftest*
11097   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11098 fi
11099 rm -f conftest*
11100   else
11101     rel_alloc=yes
11102   fi
11103 fi
11104 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11105     Defining REL_ALLOC
11106 EOF
11107 cat >> confdefs.h <<\EOF
11108 #define REL_ALLOC 1
11109 EOF
11110 }
11111
11112
11113 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11114 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11115 echo "configure:11116: checking for termios.h" >&5
11116
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120 #include <termios.h>
11121 EOF
11122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11123 { (eval echo configure:11124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11125 if test -z "$ac_err"; then
11126   rm -rf conftest*
11127   eval "ac_cv_header_$ac_safe=yes"
11128 else
11129   echo "$ac_err" >&5
11130   echo "configure: failed program was:" >&5
11131   cat conftest.$ac_ext >&5
11132   rm -rf conftest*
11133   eval "ac_cv_header_$ac_safe=no"
11134 fi
11135 rm -f conftest*
11136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11137   echo "$ac_t""yes" 1>&6
11138   { test "$extra_verbose" = "yes" && cat << \EOF
11139     Defining HAVE_TERMIOS
11140 EOF
11141 cat >> confdefs.h <<\EOF
11142 #define HAVE_TERMIOS 1
11143 EOF
11144 }
11145
11146   { test "$extra_verbose" = "yes" && cat << \EOF
11147     Defining SIGNALS_VIA_CHARACTERS
11148 EOF
11149 cat >> confdefs.h <<\EOF
11150 #define SIGNALS_VIA_CHARACTERS 1
11151 EOF
11152 }
11153
11154   { test "$extra_verbose" = "yes" && cat << \EOF
11155     Defining NO_TERMIO
11156 EOF
11157 cat >> confdefs.h <<\EOF
11158 #define NO_TERMIO 1
11159 EOF
11160 }
11161
11162 else
11163   echo "$ac_t""no" 1>&6
11164 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11165 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11166 echo "configure:11167: checking for termio.h" >&5
11167
11168 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 #include <termio.h>
11172 EOF
11173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11174 { (eval echo configure:11175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11176 if test -z "$ac_err"; then
11177   rm -rf conftest*
11178   eval "ac_cv_header_$ac_safe=yes"
11179 else
11180   echo "$ac_err" >&5
11181   echo "configure: failed program was:" >&5
11182   cat conftest.$ac_ext >&5
11183   rm -rf conftest*
11184   eval "ac_cv_header_$ac_safe=no"
11185 fi
11186 rm -f conftest*
11187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11188   echo "$ac_t""yes" 1>&6
11189   { test "$extra_verbose" = "yes" && cat << \EOF
11190     Defining HAVE_TERMIO
11191 EOF
11192 cat >> confdefs.h <<\EOF
11193 #define HAVE_TERMIO 1
11194 EOF
11195 }
11196
11197 else
11198   echo "$ac_t""no" 1>&6
11199 fi
11200
11201 fi
11202
11203
11204
11205 echo $ac_n "checking for socket""... $ac_c" 1>&6
11206 echo "configure:11207: checking for socket" >&5
11207
11208 cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211 /* System header to define __stub macros and hopefully few prototypes,
11212     which can conflict with char socket(); below.  */
11213 #include <assert.h>
11214 /* Override any gcc2 internal prototype to avoid an error.  */
11215 /* We use char because int might match the return type of a gcc2
11216     builtin and then its argument prototype would still apply.  */
11217 char socket();
11218
11219 int main() {
11220
11221 /* The GNU C library defines this for functions which it implements
11222     to always fail with ENOSYS.  Some functions are actually named
11223     something starting with __ and the normal name is an alias.  */
11224 #if defined (__stub_socket) || defined (__stub___socket)
11225 choke me
11226 #else
11227 socket();
11228 #endif
11229
11230 ; return 0; }
11231 EOF
11232 if { (eval echo configure:11233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11233   rm -rf conftest*
11234   eval "ac_cv_func_socket=yes"
11235 else
11236   echo "configure: failed program was:" >&5
11237   cat conftest.$ac_ext >&5
11238   rm -rf conftest*
11239   eval "ac_cv_func_socket=no"
11240 fi
11241 rm -f conftest*
11242
11243 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11244   echo "$ac_t""yes" 1>&6
11245   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11246 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11247 echo "configure:11248: checking for netinet/in.h" >&5
11248
11249 cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 #include <netinet/in.h>
11253 EOF
11254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11255 { (eval echo configure:11256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11257 if test -z "$ac_err"; then
11258   rm -rf conftest*
11259   eval "ac_cv_header_$ac_safe=yes"
11260 else
11261   echo "$ac_err" >&5
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=no"
11266 fi
11267 rm -f conftest*
11268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11269   echo "$ac_t""yes" 1>&6
11270   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11271 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11272 echo "configure:11273: checking for arpa/inet.h" >&5
11273
11274 cat > conftest.$ac_ext <<EOF
11275 #line 11276 "configure"
11276 #include "confdefs.h"
11277 #include <arpa/inet.h>
11278 EOF
11279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11280 { (eval echo configure:11281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11282 if test -z "$ac_err"; then
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=yes"
11285 else
11286   echo "$ac_err" >&5
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -rf conftest*
11290   eval "ac_cv_header_$ac_safe=no"
11291 fi
11292 rm -f conftest*
11293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11294   echo "$ac_t""yes" 1>&6
11295   
11296   { test "$extra_verbose" = "yes" && cat << \EOF
11297     Defining HAVE_SOCKETS
11298 EOF
11299 cat >> confdefs.h <<\EOF
11300 #define HAVE_SOCKETS 1
11301 EOF
11302 }
11303
11304       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11305 echo "configure:11306: checking "for sun_len member in struct sockaddr_un"" >&5
11306       cat > conftest.$ac_ext <<EOF
11307 #line 11308 "configure"
11308 #include "confdefs.h"
11309
11310 #include <sys/types.h>
11311 #include <sys/socket.h>
11312 #include <sys/un.h>
11313       
11314 int main() {
11315 static struct sockaddr_un x; x.sun_len = 1;
11316 ; return 0; }
11317 EOF
11318 if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11319   rm -rf conftest*
11320   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11321     Defining HAVE_SOCKADDR_SUN_LEN
11322 EOF
11323 cat >> confdefs.h <<\EOF
11324 #define HAVE_SOCKADDR_SUN_LEN 1
11325 EOF
11326 }
11327
11328 else
11329   echo "configure: failed program was:" >&5
11330   cat conftest.$ac_ext >&5
11331   rm -rf conftest*
11332   echo "$ac_t""no" 1>&6
11333 fi
11334 rm -f conftest*
11335       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11336 echo "configure:11337: checking "for ip_mreq struct in netinet/in.h"" >&5
11337       cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340
11341 #include <sys/types.h>
11342 #include <netinet/in.h>
11343       
11344 int main() {
11345 static struct ip_mreq x;
11346 ; return 0; }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11349   rm -rf conftest*
11350   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11351     Defining HAVE_MULTICAST
11352 EOF
11353 cat >> confdefs.h <<\EOF
11354 #define HAVE_MULTICAST 1
11355 EOF
11356 }
11357
11358 else
11359   echo "configure: failed program was:" >&5
11360   cat conftest.$ac_ext >&5
11361   rm -rf conftest*
11362   echo "$ac_t""no" 1>&6
11363 fi
11364 rm -f conftest*
11365 else
11366   echo "$ac_t""no" 1>&6
11367 fi
11368
11369 else
11370   echo "$ac_t""no" 1>&6
11371 fi
11372
11373 else
11374   echo "$ac_t""no" 1>&6
11375 fi
11376
11377
11378 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11379 echo "configure:11380: checking for msgget" >&5
11380
11381 cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 /* System header to define __stub macros and hopefully few prototypes,
11385     which can conflict with char msgget(); below.  */
11386 #include <assert.h>
11387 /* Override any gcc2 internal prototype to avoid an error.  */
11388 /* We use char because int might match the return type of a gcc2
11389     builtin and then its argument prototype would still apply.  */
11390 char msgget();
11391
11392 int main() {
11393
11394 /* The GNU C library defines this for functions which it implements
11395     to always fail with ENOSYS.  Some functions are actually named
11396     something starting with __ and the normal name is an alias.  */
11397 #if defined (__stub_msgget) || defined (__stub___msgget)
11398 choke me
11399 #else
11400 msgget();
11401 #endif
11402
11403 ; return 0; }
11404 EOF
11405 if { (eval echo configure:11406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11406   rm -rf conftest*
11407   eval "ac_cv_func_msgget=yes"
11408 else
11409   echo "configure: failed program was:" >&5
11410   cat conftest.$ac_ext >&5
11411   rm -rf conftest*
11412   eval "ac_cv_func_msgget=no"
11413 fi
11414 rm -f conftest*
11415
11416 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11417   echo "$ac_t""yes" 1>&6
11418   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11419 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11420 echo "configure:11421: checking for sys/ipc.h" >&5
11421
11422 cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 #include <sys/ipc.h>
11426 EOF
11427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11428 { (eval echo configure:11429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11430 if test -z "$ac_err"; then
11431   rm -rf conftest*
11432   eval "ac_cv_header_$ac_safe=yes"
11433 else
11434   echo "$ac_err" >&5
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=no"
11439 fi
11440 rm -f conftest*
11441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11442   echo "$ac_t""yes" 1>&6
11443   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11444 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11445 echo "configure:11446: checking for sys/msg.h" >&5
11446
11447 cat > conftest.$ac_ext <<EOF
11448 #line 11449 "configure"
11449 #include "confdefs.h"
11450 #include <sys/msg.h>
11451 EOF
11452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11453 { (eval echo configure:11454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11455 if test -z "$ac_err"; then
11456   rm -rf conftest*
11457   eval "ac_cv_header_$ac_safe=yes"
11458 else
11459   echo "$ac_err" >&5
11460   echo "configure: failed program was:" >&5
11461   cat conftest.$ac_ext >&5
11462   rm -rf conftest*
11463   eval "ac_cv_header_$ac_safe=no"
11464 fi
11465 rm -f conftest*
11466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11467   echo "$ac_t""yes" 1>&6
11468   { test "$extra_verbose" = "yes" && cat << \EOF
11469     Defining HAVE_SYSVIPC
11470 EOF
11471 cat >> confdefs.h <<\EOF
11472 #define HAVE_SYSVIPC 1
11473 EOF
11474 }
11475
11476 else
11477   echo "$ac_t""no" 1>&6
11478 fi
11479
11480 else
11481   echo "$ac_t""no" 1>&6
11482 fi
11483
11484 else
11485   echo "$ac_t""no" 1>&6
11486 fi
11487
11488
11489 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11490 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11491 echo "configure:11492: checking for dirent.h" >&5
11492
11493 cat > conftest.$ac_ext <<EOF
11494 #line 11495 "configure"
11495 #include "confdefs.h"
11496 #include <dirent.h>
11497 EOF
11498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11499 { (eval echo configure:11500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11501 if test -z "$ac_err"; then
11502   rm -rf conftest*
11503   eval "ac_cv_header_$ac_safe=yes"
11504 else
11505   echo "$ac_err" >&5
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   eval "ac_cv_header_$ac_safe=no"
11510 fi
11511 rm -f conftest*
11512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11513   echo "$ac_t""yes" 1>&6
11514   { test "$extra_verbose" = "yes" && cat << \EOF
11515     Defining SYSV_SYSTEM_DIR
11516 EOF
11517 cat >> confdefs.h <<\EOF
11518 #define SYSV_SYSTEM_DIR 1
11519 EOF
11520 }
11521
11522 else
11523   echo "$ac_t""no" 1>&6
11524 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11525 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11526 echo "configure:11527: checking for sys/dir.h" >&5
11527
11528 cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531 #include <sys/dir.h>
11532 EOF
11533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11534 { (eval echo configure:11535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11536 if test -z "$ac_err"; then
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=yes"
11539 else
11540   echo "$ac_err" >&5
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -rf conftest*
11544   eval "ac_cv_header_$ac_safe=no"
11545 fi
11546 rm -f conftest*
11547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11548   echo "$ac_t""yes" 1>&6
11549   :
11550 else
11551   echo "$ac_t""no" 1>&6
11552 { test "$extra_verbose" = "yes" && cat << \EOF
11553     Defining NONSYSTEM_DIR_LIBRARY
11554 EOF
11555 cat >> confdefs.h <<\EOF
11556 #define NONSYSTEM_DIR_LIBRARY 1
11557 EOF
11558 }
11559
11560 fi
11561
11562 fi
11563
11564
11565 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11566 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11567 echo "configure:11568: checking for nlist.h" >&5
11568
11569 cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 #include <nlist.h>
11573 EOF
11574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11575 { (eval echo configure:11576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11577 if test -z "$ac_err"; then
11578   rm -rf conftest*
11579   eval "ac_cv_header_$ac_safe=yes"
11580 else
11581   echo "$ac_err" >&5
11582   echo "configure: failed program was:" >&5
11583   cat conftest.$ac_ext >&5
11584   rm -rf conftest*
11585   eval "ac_cv_header_$ac_safe=no"
11586 fi
11587 rm -f conftest*
11588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11589   echo "$ac_t""yes" 1>&6
11590   { test "$extra_verbose" = "yes" && cat << \EOF
11591     Defining NLIST_STRUCT
11592 EOF
11593 cat >> confdefs.h <<\EOF
11594 #define NLIST_STRUCT 1
11595 EOF
11596 }
11597
11598 else
11599   echo "$ac_t""no" 1>&6
11600 fi
11601
11602
11603
11604 echo "checking "for sound support"" 1>&6
11605 echo "configure:11606: checking "for sound support"" >&5
11606 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11607
11608 if test "$with_native_sound" != "no"; then
11609     if test -n "$native_sound_lib"; then
11610     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11611 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11612 echo "configure:11613: checking for multimedia/audio_device.h" >&5
11613
11614 cat > conftest.$ac_ext <<EOF
11615 #line 11616 "configure"
11616 #include "confdefs.h"
11617 #include <multimedia/audio_device.h>
11618 EOF
11619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11620 { (eval echo configure:11621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11622 if test -z "$ac_err"; then
11623   rm -rf conftest*
11624   eval "ac_cv_header_$ac_safe=yes"
11625 else
11626   echo "$ac_err" >&5
11627   echo "configure: failed program was:" >&5
11628   cat conftest.$ac_ext >&5
11629   rm -rf conftest*
11630   eval "ac_cv_header_$ac_safe=no"
11631 fi
11632 rm -f conftest*
11633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11634   echo "$ac_t""yes" 1>&6
11635   sound_found=yes sound_cflags=""
11636       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11637    echo "    xemacs will be linked with \"sunplay.o\""
11638  fi
11639 else
11640   echo "$ac_t""no" 1>&6
11641 fi
11642
11643   fi
11644
11645     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11646     sound_found=yes
11647     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11648    echo "    xemacs will be linked with \"sunplay.o\""
11649  fi
11650     if test -d "/usr/demo/SOUND/include"
11651       then sound_cflags="-I/usr/demo/SOUND/include"
11652       else sound_cflags="-I/usr/demo/SOUND"
11653     fi
11654     if test -z "$native_sound_lib" ; then
11655       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11656         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11657         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11658       fi
11659     fi
11660   fi
11661
11662     if test -z "$sound_found"; then
11663     case "$canonical" in
11664     *-sgi-* )
11665       if test -z "$native_sound_lib"; then
11666         
11667 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11668 echo "configure:11669: checking for ALopenport in -laudio" >&5
11669 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11670
11671 xe_check_libs=" -laudio "
11672 cat > conftest.$ac_ext <<EOF
11673 #line 11674 "configure"
11674 #include "confdefs.h"
11675 /* Override any gcc2 internal prototype to avoid an error.  */
11676 /* We use char because int might match the return type of a gcc2
11677     builtin and then its argument prototype would still apply.  */
11678 char ALopenport();
11679
11680 int main() {
11681 ALopenport()
11682 ; return 0; }
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11685   rm -rf conftest*
11686   eval "ac_cv_lib_$ac_lib_var=yes"
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   eval "ac_cv_lib_$ac_lib_var=no"
11692 fi
11693 rm -f conftest*
11694 xe_check_libs=""
11695
11696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11697   echo "$ac_t""yes" 1>&6
11698   native_sound_lib="-laudio"
11699 else
11700   echo "$ac_t""no" 1>&6
11701 fi
11702
11703
11704       fi
11705       if test -n "$native_sound_lib"; then
11706         sound_found=yes sound_cflags=""
11707         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11708    echo "    xemacs will be linked with \"sgiplay.o\""
11709  fi
11710       fi ;;
11711     hppa*-hp-hpux* )
11712       if test -z "$native_sound_lib"; then
11713         
11714 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11715 echo "configure:11716: checking for AOpenAudio in -lAlib" >&5
11716 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11717
11718 xe_check_libs=" -lAlib "
11719 cat > conftest.$ac_ext <<EOF
11720 #line 11721 "configure"
11721 #include "confdefs.h"
11722 /* Override any gcc2 internal prototype to avoid an error.  */
11723 /* We use char because int might match the return type of a gcc2
11724     builtin and then its argument prototype would still apply.  */
11725 char AOpenAudio();
11726
11727 int main() {
11728 AOpenAudio()
11729 ; return 0; }
11730 EOF
11731 if { (eval echo configure:11732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11732   rm -rf conftest*
11733   eval "ac_cv_lib_$ac_lib_var=yes"
11734 else
11735   echo "configure: failed program was:" >&5
11736   cat conftest.$ac_ext >&5
11737   rm -rf conftest*
11738   eval "ac_cv_lib_$ac_lib_var=no"
11739 fi
11740 rm -f conftest*
11741 xe_check_libs=""
11742
11743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11744   echo "$ac_t""yes" 1>&6
11745   native_sound_lib="-lAlib"
11746 else
11747   echo "$ac_t""no" 1>&6
11748 fi
11749
11750
11751       fi
11752       if test -n "$native_sound_lib"; then
11753         sound_found=yes
11754         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11755    echo "    xemacs will be linked with \"hpplay.o\""
11756  fi
11757         if test "$GCC" = "yes" # Kludge city
11758           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11759           else sound_cflags="+e -I/usr/audio/examples"
11760         fi
11761       fi ;;
11762     esac
11763   fi
11764
11765     if test -z "$sound_found"; then
11766     for dir in "machine" "sys" "linux"; do
11767       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11768 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11769 echo "configure:11770: checking for ${dir}/soundcard.h" >&5
11770
11771 cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774 #include <${dir}/soundcard.h>
11775 EOF
11776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11777 { (eval echo configure:11778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11779 if test -z "$ac_err"; then
11780   rm -rf conftest*
11781   eval "ac_cv_header_$ac_safe=yes"
11782 else
11783   echo "$ac_err" >&5
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   eval "ac_cv_header_$ac_safe=no"
11788 fi
11789 rm -f conftest*
11790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11791   echo "$ac_t""yes" 1>&6
11792   sound_found=yes
11793        need_miscplay=yes
11794         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11795    echo "    xemacs will be linked with \"linuxplay.o\""
11796  fi
11797         { test "$extra_verbose" = "yes" && cat << EOF
11798     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
11799 EOF
11800 cat >> confdefs.h <<EOF
11801 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
11802 EOF
11803 }
11804
11805         break
11806 else
11807   echo "$ac_t""no" 1>&6
11808 fi
11809
11810     done
11811   fi
11812
11813     if test -z "$sound_found"; then
11814     if test "$with_msw" = "yes"; then
11815     sound_found=yes
11816     native_sound_lib=
11817     fi
11818   fi
11819
11820   test "$sound_found" = "yes" && with_native_sound=yes
11821 fi
11822
11823 if test "$with_native_sound" = "yes"; then
11824   { test "$extra_verbose" = "yes" && cat << \EOF
11825     Defining HAVE_NATIVE_SOUND
11826 EOF
11827 cat >> confdefs.h <<\EOF
11828 #define HAVE_NATIVE_SOUND 1
11829 EOF
11830 }
11831
11832   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11833 fi
11834
11835 if test "$with_nas_sound" != "no"; then
11836   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11837 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11838 echo "configure:11839: checking for audio/audiolib.h" >&5
11839
11840 cat > conftest.$ac_ext <<EOF
11841 #line 11842 "configure"
11842 #include "confdefs.h"
11843 #include <audio/audiolib.h>
11844 EOF
11845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11846 { (eval echo configure:11847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11848 if test -z "$ac_err"; then
11849   rm -rf conftest*
11850   eval "ac_cv_header_$ac_safe=yes"
11851 else
11852   echo "$ac_err" >&5
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   eval "ac_cv_header_$ac_safe=no"
11857 fi
11858 rm -f conftest*
11859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11860   echo "$ac_t""yes" 1>&6
11861   
11862     
11863 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11864 echo "configure:11865: checking for AuOpenServer in -laudio" >&5
11865 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11866
11867 xe_check_libs=" -laudio "
11868 cat > conftest.$ac_ext <<EOF
11869 #line 11870 "configure"
11870 #include "confdefs.h"
11871 /* Override any gcc2 internal prototype to avoid an error.  */
11872 /* We use char because int might match the return type of a gcc2
11873     builtin and then its argument prototype would still apply.  */
11874 char AuOpenServer();
11875
11876 int main() {
11877 AuOpenServer()
11878 ; return 0; }
11879 EOF
11880 if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11881   rm -rf conftest*
11882   eval "ac_cv_lib_$ac_lib_var=yes"
11883 else
11884   echo "configure: failed program was:" >&5
11885   cat conftest.$ac_ext >&5
11886   rm -rf conftest*
11887   eval "ac_cv_lib_$ac_lib_var=no"
11888 fi
11889 rm -f conftest*
11890 xe_check_libs=""
11891
11892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11893   echo "$ac_t""yes" 1>&6
11894   have_nas_sound=yes
11895 else
11896   echo "$ac_t""no" 1>&6
11897 fi
11898
11899
11900 else
11901   echo "$ac_t""no" 1>&6
11902 fi
11903
11904   if test "$have_nas_sound" = "yes"; then
11905     with_nas_sound=yes
11906     { test "$extra_verbose" = "yes" && cat << \EOF
11907     Defining HAVE_NAS_SOUND
11908 EOF
11909 cat >> confdefs.h <<\EOF
11910 #define HAVE_NAS_SOUND 1
11911 EOF
11912 }
11913
11914     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11915    echo "    xemacs will be linked with \"nas.o\""
11916  fi
11917     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11918             cat > conftest.$ac_ext <<EOF
11919 #line 11920 "configure"
11920 #include "confdefs.h"
11921 #include <audio/Xtutil.h>
11922 EOF
11923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11924   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11925   :
11926 else
11927   rm -rf conftest*
11928   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11929     Defining NAS_NO_ERROR_JUMP
11930 EOF
11931 cat >> confdefs.h <<\EOF
11932 #define NAS_NO_ERROR_JUMP 1
11933 EOF
11934 }
11935
11936 fi
11937 rm -f conftest*
11938
11939   else
11940     test "$with_nas_sound" = "yes" && \
11941       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11942     with_nas_sound=no
11943   fi
11944 fi
11945
11946 if test "$with_esd_sound" != "no"; then
11947   # Extract the first word of "esd-config", so it can be a program name with args.
11948 set dummy esd-config; ac_word=$2
11949 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11950 echo "configure:11951: checking for $ac_word" >&5
11951
11952 if test -n "$have_esd_config"; then
11953   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11954 else
11955   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11956   ac_dummy="$PATH"
11957   for ac_dir in $ac_dummy; do
11958     test -z "$ac_dir" && ac_dir=.
11959     if test -f $ac_dir/$ac_word; then
11960       ac_cv_prog_have_esd_config="yes"
11961       break
11962     fi
11963   done
11964   IFS="$ac_save_ifs"
11965   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11966 fi
11967 have_esd_config="$ac_cv_prog_have_esd_config"
11968 if test -n "$have_esd_config"; then
11969   echo "$ac_t""$have_esd_config" 1>&6
11970 else
11971   echo "$ac_t""no" 1>&6
11972 fi
11973
11974   if test "$have_esd_config" = "yes"; then
11975     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11976     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
11977     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11978     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11979 echo "configure:11980: checking for esd_play_stream" >&5
11980
11981 cat > conftest.$ac_ext <<EOF
11982 #line 11983 "configure"
11983 #include "confdefs.h"
11984 /* System header to define __stub macros and hopefully few prototypes,
11985     which can conflict with char esd_play_stream(); below.  */
11986 #include <assert.h>
11987 /* Override any gcc2 internal prototype to avoid an error.  */
11988 /* We use char because int might match the return type of a gcc2
11989     builtin and then its argument prototype would still apply.  */
11990 char esd_play_stream();
11991
11992 int main() {
11993
11994 /* The GNU C library defines this for functions which it implements
11995     to always fail with ENOSYS.  Some functions are actually named
11996     something starting with __ and the normal name is an alias.  */
11997 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11998 choke me
11999 #else
12000 esd_play_stream();
12001 #endif
12002
12003 ; return 0; }
12004 EOF
12005 if { (eval echo configure:12006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12006   rm -rf conftest*
12007   eval "ac_cv_func_esd_play_stream=yes"
12008 else
12009   echo "configure: failed program was:" >&5
12010   cat conftest.$ac_ext >&5
12011   rm -rf conftest*
12012   eval "ac_cv_func_esd_play_stream=no"
12013 fi
12014 rm -f conftest*
12015
12016 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12017   echo "$ac_t""yes" 1>&6
12018   have_esd_sound=yes
12019 else
12020   echo "$ac_t""no" 1>&6
12021 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12022 fi
12023
12024   fi
12025
12026   if test "$have_esd_sound" = "yes"; then
12027     with_esd_sound=yes
12028     need_miscplay=yes
12029     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12030    echo "    xemacs will be linked with \"esd.o\""
12031  fi
12032     { test "$extra_verbose" = "yes" && cat << \EOF
12033     Defining HAVE_ESD_SOUND
12034 EOF
12035 cat >> confdefs.h <<\EOF
12036 #define HAVE_ESD_SOUND 1
12037 EOF
12038 }
12039
12040   else
12041     test "$with_esd_sound" = "yes" && \
12042       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12043     with_esd_sound=no
12044   fi
12045 fi
12046
12047 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12048    echo "    xemacs will be linked with \"miscplay.o\""
12049  fi
12050
12051
12052 test -z "$with_tty" && with_tty=yes
12053
12054 if test "$with_tty" = "yes"  ; then
12055   echo "checking for TTY-related features" 1>&6
12056 echo "configure:12057: checking for TTY-related features" >&5
12057   { test "$extra_verbose" = "yes" && cat << \EOF
12058     Defining HAVE_TTY
12059 EOF
12060 cat >> confdefs.h <<\EOF
12061 #define HAVE_TTY 1
12062 EOF
12063 }
12064
12065   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
12066    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\""
12067  fi
12068
12069     if test -z "$with_ncurses"; then
12070     
12071 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12072 echo "configure:12073: checking for tgetent in -lncurses" >&5
12073 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12074
12075 xe_check_libs=" -lncurses "
12076 cat > conftest.$ac_ext <<EOF
12077 #line 12078 "configure"
12078 #include "confdefs.h"
12079 /* Override any gcc2 internal prototype to avoid an error.  */
12080 /* We use char because int might match the return type of a gcc2
12081     builtin and then its argument prototype would still apply.  */
12082 char tgetent();
12083
12084 int main() {
12085 tgetent()
12086 ; return 0; }
12087 EOF
12088 if { (eval echo configure:12089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12089   rm -rf conftest*
12090   eval "ac_cv_lib_$ac_lib_var=yes"
12091 else
12092   echo "configure: failed program was:" >&5
12093   cat conftest.$ac_ext >&5
12094   rm -rf conftest*
12095   eval "ac_cv_lib_$ac_lib_var=no"
12096 fi
12097 rm -f conftest*
12098 xe_check_libs=""
12099
12100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12101   echo "$ac_t""yes" 1>&6
12102   with_ncurses=yes
12103 else
12104   echo "$ac_t""no" 1>&6
12105 with_ncurses=no
12106 fi
12107
12108
12109   fi
12110   if test "$with_ncurses" = "yes"; then
12111     { test "$extra_verbose" = "yes" && cat << \EOF
12112     Defining HAVE_NCURSES
12113 EOF
12114 cat >> confdefs.h <<\EOF
12115 #define HAVE_NCURSES 1
12116 EOF
12117 }
12118
12119     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12120 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12121 echo "configure:12122: checking for ncurses/curses.h" >&5
12122
12123 cat > conftest.$ac_ext <<EOF
12124 #line 12125 "configure"
12125 #include "confdefs.h"
12126 #include <ncurses/curses.h>
12127 EOF
12128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12129 { (eval echo configure:12130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12131 if test -z "$ac_err"; then
12132   rm -rf conftest*
12133   eval "ac_cv_header_$ac_safe=yes"
12134 else
12135   echo "$ac_err" >&5
12136   echo "configure: failed program was:" >&5
12137   cat conftest.$ac_ext >&5
12138   rm -rf conftest*
12139   eval "ac_cv_header_$ac_safe=no"
12140 fi
12141 rm -f conftest*
12142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12143   echo "$ac_t""yes" 1>&6
12144   curses_h_file=ncurses/curses.h
12145 else
12146   echo "$ac_t""no" 1>&6
12147 fi
12148
12149     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12150 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12151 echo "configure:12152: checking for ncurses/term.h" >&5
12152
12153 cat > conftest.$ac_ext <<EOF
12154 #line 12155 "configure"
12155 #include "confdefs.h"
12156 #include <ncurses/term.h>
12157 EOF
12158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12159 { (eval echo configure:12160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12161 if test -z "$ac_err"; then
12162   rm -rf conftest*
12163   eval "ac_cv_header_$ac_safe=yes"
12164 else
12165   echo "$ac_err" >&5
12166   echo "configure: failed program was:" >&5
12167   cat conftest.$ac_ext >&5
12168   rm -rf conftest*
12169   eval "ac_cv_header_$ac_safe=no"
12170 fi
12171 rm -f conftest*
12172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12173   echo "$ac_t""yes" 1>&6
12174   term_h_file=ncurses/term.h
12175 else
12176   echo "$ac_t""no" 1>&6
12177 fi
12178
12179     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12180    echo "    xemacs will be linked with \"terminfo.o\""
12181  fi
12182     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12183
12184     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12185                         save_c_switch_site="$c_switch_site"
12186       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12187       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12188 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12189 echo "configure:12190: checking for ncurses/curses.h" >&5
12190
12191 cat > conftest.$ac_ext <<EOF
12192 #line 12193 "configure"
12193 #include "confdefs.h"
12194 #include <ncurses/curses.h>
12195 EOF
12196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12197 { (eval echo configure:12198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12199 if test -z "$ac_err"; then
12200   rm -rf conftest*
12201   eval "ac_cv_header_$ac_safe=yes"
12202 else
12203   echo "$ac_err" >&5
12204   echo "configure: failed program was:" >&5
12205   cat conftest.$ac_ext >&5
12206   rm -rf conftest*
12207   eval "ac_cv_header_$ac_safe=no"
12208 fi
12209 rm -f conftest*
12210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12211   echo "$ac_t""yes" 1>&6
12212   curses_h_file=ncurses/curses.h
12213 else
12214   echo "$ac_t""no" 1>&6
12215 fi
12216
12217       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12218         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12219         else c_switch_site="$save_c_switch_site"
12220       fi
12221     fi
12222   else         if test "$have_terminfo" = "yes"; then
12223       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12224    echo "    xemacs will be linked with \"terminfo.o\""
12225  fi
12226       if test -n "$libs_termcap"; then
12227         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12228       else
12229         for lib in curses termlib termcap; do
12230           
12231 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12232 echo "configure:12233: checking for tgetent in -l$lib" >&5
12233 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12234
12235 xe_check_libs=" -l$lib "
12236 cat > conftest.$ac_ext <<EOF
12237 #line 12238 "configure"
12238 #include "confdefs.h"
12239 /* Override any gcc2 internal prototype to avoid an error.  */
12240 /* We use char because int might match the return type of a gcc2
12241     builtin and then its argument prototype would still apply.  */
12242 char tgetent();
12243
12244 int main() {
12245 tgetent()
12246 ; return 0; }
12247 EOF
12248 if { (eval echo configure:12249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12249   rm -rf conftest*
12250   eval "ac_cv_lib_$ac_lib_var=yes"
12251 else
12252   echo "configure: failed program was:" >&5
12253   cat conftest.$ac_ext >&5
12254   rm -rf conftest*
12255   eval "ac_cv_lib_$ac_lib_var=no"
12256 fi
12257 rm -f conftest*
12258 xe_check_libs=""
12259
12260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12261   echo "$ac_t""yes" 1>&6
12262   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12263 else
12264   echo "$ac_t""no" 1>&6
12265 fi
12266
12267
12268         done
12269       fi
12270     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12271    echo "    xemacs will be linked with \"tparam.o\""
12272  fi
12273                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12274       if test -n "$libs_termcap"; then
12275         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12276       else
12277         
12278 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12279 echo "configure:12280: checking for tgetent in -lcurses" >&5
12280 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12281
12282 xe_check_libs=" -lcurses "
12283 cat > conftest.$ac_ext <<EOF
12284 #line 12285 "configure"
12285 #include "confdefs.h"
12286 /* Override any gcc2 internal prototype to avoid an error.  */
12287 /* We use char because int might match the return type of a gcc2
12288     builtin and then its argument prototype would still apply.  */
12289 char tgetent();
12290
12291 int main() {
12292 tgetent()
12293 ; return 0; }
12294 EOF
12295 if { (eval echo configure:12296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12296   rm -rf conftest*
12297   eval "ac_cv_lib_$ac_lib_var=yes"
12298 else
12299   echo "configure: failed program was:" >&5
12300   cat conftest.$ac_ext >&5
12301   rm -rf conftest*
12302   eval "ac_cv_lib_$ac_lib_var=no"
12303 fi
12304 rm -f conftest*
12305 xe_check_libs=""
12306
12307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12308   echo "$ac_t""yes" 1>&6
12309   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12310 else
12311   echo "$ac_t""no" 1>&6
12312 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12313 echo "configure:12314: checking for tgetent in -ltermcap" >&5
12314 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12315
12316 xe_check_libs=" -ltermcap "
12317 cat > conftest.$ac_ext <<EOF
12318 #line 12319 "configure"
12319 #include "confdefs.h"
12320 /* Override any gcc2 internal prototype to avoid an error.  */
12321 /* We use char because int might match the return type of a gcc2
12322     builtin and then its argument prototype would still apply.  */
12323 char tgetent();
12324
12325 int main() {
12326 tgetent()
12327 ; return 0; }
12328 EOF
12329 if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12330   rm -rf conftest*
12331   eval "ac_cv_lib_$ac_lib_var=yes"
12332 else
12333   echo "configure: failed program was:" >&5
12334   cat conftest.$ac_ext >&5
12335   rm -rf conftest*
12336   eval "ac_cv_lib_$ac_lib_var=no"
12337 fi
12338 rm -f conftest*
12339 xe_check_libs=""
12340
12341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12342   echo "$ac_t""yes" 1>&6
12343   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12344 else
12345   echo "$ac_t""no" 1>&6
12346 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12347    echo "    xemacs will be linked with \"termcap.o\""
12348  fi
12349 fi
12350
12351
12352 fi
12353
12354
12355       fi
12356     fi
12357   fi
12358   { test "$extra_verbose" = "yes" && cat << EOF
12359     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12360 EOF
12361 cat >> confdefs.h <<EOF
12362 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12363 EOF
12364 }
12365
12366   { test "$extra_verbose" = "yes" && cat << EOF
12367     Defining TERM_H_FILE = "${term_h_file-term.h}"
12368 EOF
12369 cat >> confdefs.h <<EOF
12370 #define TERM_H_FILE "${term_h_file-term.h}"
12371 EOF
12372 }
12373
12374
12375     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12376 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12377 echo "configure:12378: checking for gpm.h" >&5
12378
12379 cat > conftest.$ac_ext <<EOF
12380 #line 12381 "configure"
12381 #include "confdefs.h"
12382 #include <gpm.h>
12383 EOF
12384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12385 { (eval echo configure:12386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12387 if test -z "$ac_err"; then
12388   rm -rf conftest*
12389   eval "ac_cv_header_$ac_safe=yes"
12390 else
12391   echo "$ac_err" >&5
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -rf conftest*
12395   eval "ac_cv_header_$ac_safe=no"
12396 fi
12397 rm -f conftest*
12398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12399   echo "$ac_t""yes" 1>&6
12400   :
12401 else
12402   echo "$ac_t""no" 1>&6
12403 with_gpm=no
12404 fi
12405  }
12406   test -z "$with_gpm" && { 
12407 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12408 echo "configure:12409: checking for Gpm_Open in -lgpm" >&5
12409 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12410
12411 xe_check_libs=" -lgpm "
12412 cat > conftest.$ac_ext <<EOF
12413 #line 12414 "configure"
12414 #include "confdefs.h"
12415 /* Override any gcc2 internal prototype to avoid an error.  */
12416 /* We use char because int might match the return type of a gcc2
12417     builtin and then its argument prototype would still apply.  */
12418 char Gpm_Open();
12419
12420 int main() {
12421 Gpm_Open()
12422 ; return 0; }
12423 EOF
12424 if { (eval echo configure:12425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12425   rm -rf conftest*
12426   eval "ac_cv_lib_$ac_lib_var=yes"
12427 else
12428   echo "configure: failed program was:" >&5
12429   cat conftest.$ac_ext >&5
12430   rm -rf conftest*
12431   eval "ac_cv_lib_$ac_lib_var=no"
12432 fi
12433 rm -f conftest*
12434 xe_check_libs=""
12435
12436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12437   echo "$ac_t""yes" 1>&6
12438   with_gpm=yes
12439 else
12440   echo "$ac_t""no" 1>&6
12441 with_gpm=no
12442 fi
12443
12444  }
12445   if test "$with_gpm" = "yes"; then
12446     { test "$extra_verbose" = "yes" && cat << \EOF
12447     Defining HAVE_GPM
12448 EOF
12449 cat >> confdefs.h <<\EOF
12450 #define HAVE_GPM 1
12451 EOF
12452 }
12453
12454     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12455    echo "    xemacs will be linked with \"gpmevent.o\""
12456  fi
12457     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12458   fi
12459
12460 else   for feature in ncurses gpm; do
12461     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12462       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12463     fi
12464     eval "with_${feature}=no"
12465   done
12466 fi 
12467 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12468    echo "    xemacs will be linked with \"event-unixoid.o\""
12469  fi
12470
12471
12472 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12473   != "no no no" && echo "checking for database support" 1>&6
12474 echo "configure:12475: checking for database support" >&5
12475
12476 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12477   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12478 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12479 echo "configure:12480: checking for ndbm.h" >&5
12480
12481 cat > conftest.$ac_ext <<EOF
12482 #line 12483 "configure"
12483 #include "confdefs.h"
12484 #include <ndbm.h>
12485 EOF
12486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12487 { (eval echo configure:12488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12489 if test -z "$ac_err"; then
12490   rm -rf conftest*
12491   eval "ac_cv_header_$ac_safe=yes"
12492 else
12493   echo "$ac_err" >&5
12494   echo "configure: failed program was:" >&5
12495   cat conftest.$ac_ext >&5
12496   rm -rf conftest*
12497   eval "ac_cv_header_$ac_safe=no"
12498 fi
12499 rm -f conftest*
12500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12501   echo "$ac_t""yes" 1>&6
12502   :
12503 else
12504   echo "$ac_t""no" 1>&6
12505
12506     test "$with_database_gdbm" = "yes" -o \
12507          "$with_database_dbm"  = "yes" && \
12508       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12509     with_database_gdbm=no with_database_dbm=no
12510 fi
12511
12512 fi
12513
12514 if test "$with_database_gdbm" != "no"; then
12515   
12516 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12517 echo "configure:12518: checking for dbm_open in -lgdbm" >&5
12518 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12519
12520 xe_check_libs=" -lgdbm "
12521 cat > conftest.$ac_ext <<EOF
12522 #line 12523 "configure"
12523 #include "confdefs.h"
12524 /* Override any gcc2 internal prototype to avoid an error.  */
12525 /* We use char because int might match the return type of a gcc2
12526     builtin and then its argument prototype would still apply.  */
12527 char dbm_open();
12528
12529 int main() {
12530 dbm_open()
12531 ; return 0; }
12532 EOF
12533 if { (eval echo configure:12534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12534   rm -rf conftest*
12535   eval "ac_cv_lib_$ac_lib_var=yes"
12536 else
12537   echo "configure: failed program was:" >&5
12538   cat conftest.$ac_ext >&5
12539   rm -rf conftest*
12540   eval "ac_cv_lib_$ac_lib_var=no"
12541 fi
12542 rm -f conftest*
12543 xe_check_libs=""
12544
12545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12546   echo "$ac_t""yes" 1>&6
12547   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12548 else
12549   echo "$ac_t""no" 1>&6
12550 if test "$with_database_gdbm" = "yes"; then
12551      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12552    fi
12553    with_database_gdbm=no
12554 fi
12555
12556
12557 fi
12558
12559 if test "$with_database_dbm" != "no"; then
12560   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12561 echo "configure:12562: checking for dbm_open" >&5
12562
12563 cat > conftest.$ac_ext <<EOF
12564 #line 12565 "configure"
12565 #include "confdefs.h"
12566 /* System header to define __stub macros and hopefully few prototypes,
12567     which can conflict with char dbm_open(); below.  */
12568 #include <assert.h>
12569 /* Override any gcc2 internal prototype to avoid an error.  */
12570 /* We use char because int might match the return type of a gcc2
12571     builtin and then its argument prototype would still apply.  */
12572 char dbm_open();
12573
12574 int main() {
12575
12576 /* The GNU C library defines this for functions which it implements
12577     to always fail with ENOSYS.  Some functions are actually named
12578     something starting with __ and the normal name is an alias.  */
12579 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12580 choke me
12581 #else
12582 dbm_open();
12583 #endif
12584
12585 ; return 0; }
12586 EOF
12587 if { (eval echo configure:12588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12588   rm -rf conftest*
12589   eval "ac_cv_func_dbm_open=yes"
12590 else
12591   echo "configure: failed program was:" >&5
12592   cat conftest.$ac_ext >&5
12593   rm -rf conftest*
12594   eval "ac_cv_func_dbm_open=no"
12595 fi
12596 rm -f conftest*
12597
12598 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12599   echo "$ac_t""yes" 1>&6
12600   with_database_dbm=yes libdbm=
12601 else
12602   echo "$ac_t""no" 1>&6
12603
12604     
12605 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12606 echo "configure:12607: checking for dbm_open in -ldbm" >&5
12607 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12608
12609 xe_check_libs=" -ldbm "
12610 cat > conftest.$ac_ext <<EOF
12611 #line 12612 "configure"
12612 #include "confdefs.h"
12613 /* Override any gcc2 internal prototype to avoid an error.  */
12614 /* We use char because int might match the return type of a gcc2
12615     builtin and then its argument prototype would still apply.  */
12616 char dbm_open();
12617
12618 int main() {
12619 dbm_open()
12620 ; return 0; }
12621 EOF
12622 if { (eval echo configure:12623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12623   rm -rf conftest*
12624   eval "ac_cv_lib_$ac_lib_var=yes"
12625 else
12626   echo "configure: failed program was:" >&5
12627   cat conftest.$ac_ext >&5
12628   rm -rf conftest*
12629   eval "ac_cv_lib_$ac_lib_var=no"
12630 fi
12631 rm -f conftest*
12632 xe_check_libs=""
12633
12634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12635   echo "$ac_t""yes" 1>&6
12636   with_database_dbm=yes libdbm=-ldbm
12637 else
12638   echo "$ac_t""no" 1>&6
12639 test "$with_database_dbm" = "yes" && \
12640         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12641       with_database_dbm=no
12642 fi
12643
12644
12645 fi
12646
12647 fi
12648
12649 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12650 test "$with_database_gdbm" = "yes" -o \
12651      "$with_database_dbm"  = "yes" && \
12652   { test "$extra_verbose" = "yes" && cat << \EOF
12653     Defining HAVE_DBM
12654 EOF
12655 cat >> confdefs.h <<\EOF
12656 #define HAVE_DBM 1
12657 EOF
12658 }
12659
12660
12661 if test "$with_database_berkdb" != "no"; then
12662   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12663 echo "configure:12664: checking for Berkeley db.h" >&5
12664   for header in "db/db.h" "db.h"; do
12665     cat > conftest.$ac_ext <<EOF
12666 #line 12667 "configure"
12667 #include "confdefs.h"
12668
12669 #include <stdlib.h>
12670 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12671 #ifdef HAVE_INTTYPES_H
12672 #define __BIT_TYPES_DEFINED__
12673 #include <inttypes.h>
12674 typedef uint8_t  u_int8_t;
12675 typedef uint16_t u_int16_t;
12676 typedef uint32_t u_int32_t;
12677 #ifdef WE_DONT_NEED_QUADS
12678 typedef uint64_t u_int64_t;
12679 #endif
12680 #endif
12681 #endif
12682 #include <$header>
12683
12684 int main() {
12685
12686 ; return 0; }
12687 EOF
12688 if { (eval echo configure:12689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12689   rm -rf conftest*
12690   db_h_file="$header"; break
12691 else
12692   echo "configure: failed program was:" >&5
12693   cat conftest.$ac_ext >&5
12694 fi
12695 rm -f conftest*
12696   done
12697   if test -z "$db_h_file"
12698   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12699   else echo "$ac_t""$db_h_file" 1>&6
12700   fi
12701
12702   if test "$with_database_berkdb" != "no"; then
12703     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12704 echo "configure:12705: checking for Berkeley DB version" >&5
12705     cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 #include <$db_h_file>
12709 #if DB_VERSION_MAJOR > 1
12710 yes
12711 #endif
12712
12713 EOF
12714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12715   egrep "yes" >/dev/null 2>&1; then
12716   rm -rf conftest*
12717   echo "$ac_t""2" 1>&6; dbfunc=db_open
12718 else
12719   rm -rf conftest*
12720   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12721 fi
12722 rm -f conftest*
12723
12724     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12725 echo "configure:12726: checking for $dbfunc" >&5
12726
12727 cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 /* System header to define __stub macros and hopefully few prototypes,
12731     which can conflict with char $dbfunc(); below.  */
12732 #include <assert.h>
12733 /* Override any gcc2 internal prototype to avoid an error.  */
12734 /* We use char because int might match the return type of a gcc2
12735     builtin and then its argument prototype would still apply.  */
12736 char $dbfunc();
12737
12738 int main() {
12739
12740 /* The GNU C library defines this for functions which it implements
12741     to always fail with ENOSYS.  Some functions are actually named
12742     something starting with __ and the normal name is an alias.  */
12743 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12744 choke me
12745 #else
12746 $dbfunc();
12747 #endif
12748
12749 ; return 0; }
12750 EOF
12751 if { (eval echo configure:12752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12752   rm -rf conftest*
12753   eval "ac_cv_func_$dbfunc=yes"
12754 else
12755   echo "configure: failed program was:" >&5
12756   cat conftest.$ac_ext >&5
12757   rm -rf conftest*
12758   eval "ac_cv_func_$dbfunc=no"
12759 fi
12760 rm -f conftest*
12761
12762 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12763   echo "$ac_t""yes" 1>&6
12764   with_database_berkdb=yes need_libdb=no
12765 else
12766   echo "$ac_t""no" 1>&6
12767
12768     
12769 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12770 echo "configure:12771: checking for $dbfunc in -ldb" >&5
12771 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12772
12773 xe_check_libs=" -ldb "
12774 cat > conftest.$ac_ext <<EOF
12775 #line 12776 "configure"
12776 #include "confdefs.h"
12777 /* Override any gcc2 internal prototype to avoid an error.  */
12778 /* We use char because int might match the return type of a gcc2
12779     builtin and then its argument prototype would still apply.  */
12780 char $dbfunc();
12781
12782 int main() {
12783 $dbfunc()
12784 ; return 0; }
12785 EOF
12786 if { (eval echo configure:12787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12787   rm -rf conftest*
12788   eval "ac_cv_lib_$ac_lib_var=yes"
12789 else
12790   echo "configure: failed program was:" >&5
12791   cat conftest.$ac_ext >&5
12792   rm -rf conftest*
12793   eval "ac_cv_lib_$ac_lib_var=no"
12794 fi
12795 rm -f conftest*
12796 xe_check_libs=""
12797
12798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12799   echo "$ac_t""yes" 1>&6
12800   with_database_berkdb=yes need_libdb=yes
12801 else
12802   echo "$ac_t""no" 1>&6
12803 fi
12804
12805
12806 fi
12807
12808   fi
12809
12810   if test "$with_database_berkdb" = "yes"; then
12811     { test "$extra_verbose" = "yes" && cat << EOF
12812     Defining DB_H_FILE = "$db_h_file"
12813 EOF
12814 cat >> confdefs.h <<EOF
12815 #define DB_H_FILE "$db_h_file"
12816 EOF
12817 }
12818
12819     { test "$extra_verbose" = "yes" && cat << \EOF
12820     Defining HAVE_BERKELEY_DB
12821 EOF
12822 cat >> confdefs.h <<\EOF
12823 #define HAVE_BERKELEY_DB 1
12824 EOF
12825 }
12826
12827     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12828   else with_database_berkdb=no
12829   fi
12830 fi
12831
12832 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12833      != "no no no"; then
12834   { test "$extra_verbose" = "yes" && cat << \EOF
12835     Defining HAVE_DATABASE
12836 EOF
12837 cat >> confdefs.h <<\EOF
12838 #define HAVE_DATABASE 1
12839 EOF
12840 }
12841
12842   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12843    echo "    xemacs will be linked with \"database.o\""
12844  fi
12845 fi
12846
12847 if test "$with_socks" = "yes"; then
12848   
12849 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12850 echo "configure:12851: checking for SOCKSinit in -lsocks" >&5
12851 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12852
12853 xe_check_libs=" -lsocks "
12854 cat > conftest.$ac_ext <<EOF
12855 #line 12856 "configure"
12856 #include "confdefs.h"
12857 /* Override any gcc2 internal prototype to avoid an error.  */
12858 /* We use char because int might match the return type of a gcc2
12859     builtin and then its argument prototype would still apply.  */
12860 char SOCKSinit();
12861
12862 int main() {
12863 SOCKSinit()
12864 ; return 0; }
12865 EOF
12866 if { (eval echo configure:12867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12867   rm -rf conftest*
12868   eval "ac_cv_lib_$ac_lib_var=yes"
12869 else
12870   echo "configure: failed program was:" >&5
12871   cat conftest.$ac_ext >&5
12872   rm -rf conftest*
12873   eval "ac_cv_lib_$ac_lib_var=no"
12874 fi
12875 rm -f conftest*
12876 xe_check_libs=""
12877
12878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12879   echo "$ac_t""yes" 1>&6
12880     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12882   { test "$extra_verbose" = "yes" && cat << EOF
12883     Defining $ac_tr_lib
12884 EOF
12885 cat >> confdefs.h <<EOF
12886 #define $ac_tr_lib 1
12887 EOF
12888 }
12889
12890   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12891
12892 else
12893   echo "$ac_t""no" 1>&6
12894 fi
12895
12896
12897   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12898     Defining HAVE_SOCKS
12899 EOF
12900 cat >> confdefs.h <<\EOF
12901 #define HAVE_SOCKS 1
12902 EOF
12903 }
12904
12905 fi
12906
12907 if test "$usage_tracking" = "yes"; then
12908   { test "$extra_verbose" = "yes" && cat << \EOF
12909     Defining USAGE_TRACKING
12910 EOF
12911 cat >> confdefs.h <<\EOF
12912 #define USAGE_TRACKING 1
12913 EOF
12914 }
12915
12916   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12917 fi
12918
12919 if test "$with_modules" != "no"; then
12920   echo "checking for module support" 1>&6
12921 echo "configure:12922: checking for module support" >&5
12922
12923     if test "$with_msw" = "yes"; then
12924     have_dl=yes;
12925   else
12926         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12927 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12928 echo "configure:12929: checking for dlfcn.h" >&5
12929
12930 cat > conftest.$ac_ext <<EOF
12931 #line 12932 "configure"
12932 #include "confdefs.h"
12933 #include <dlfcn.h>
12934 EOF
12935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12936 { (eval echo configure:12937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12938 if test -z "$ac_err"; then
12939   rm -rf conftest*
12940   eval "ac_cv_header_$ac_safe=yes"
12941 else
12942   echo "$ac_err" >&5
12943   echo "configure: failed program was:" >&5
12944   cat conftest.$ac_ext >&5
12945   rm -rf conftest*
12946   eval "ac_cv_header_$ac_safe=no"
12947 fi
12948 rm -f conftest*
12949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12950   echo "$ac_t""yes" 1>&6
12951   
12952       
12953 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12954 echo "configure:12955: checking for dlopen in -ldl" >&5
12955 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12956
12957 xe_check_libs=" -ldl "
12958 cat > conftest.$ac_ext <<EOF
12959 #line 12960 "configure"
12960 #include "confdefs.h"
12961 /* Override any gcc2 internal prototype to avoid an error.  */
12962 /* We use char because int might match the return type of a gcc2
12963     builtin and then its argument prototype would still apply.  */
12964 char dlopen();
12965
12966 int main() {
12967 dlopen()
12968 ; return 0; }
12969 EOF
12970 if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12971   rm -rf conftest*
12972   eval "ac_cv_lib_$ac_lib_var=yes"
12973 else
12974   echo "configure: failed program was:" >&5
12975   cat conftest.$ac_ext >&5
12976   rm -rf conftest*
12977   eval "ac_cv_lib_$ac_lib_var=no"
12978 fi
12979 rm -f conftest*
12980 xe_check_libs=""
12981
12982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12983   echo "$ac_t""yes" 1>&6
12984   have_dl=yes libdl=dl
12985 else
12986   echo "$ac_t""no" 1>&6
12987
12988 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12989 echo "configure:12990: checking for dlopen in -lc" >&5
12990 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12991
12992 xe_check_libs=" -lc "
12993 cat > conftest.$ac_ext <<EOF
12994 #line 12995 "configure"
12995 #include "confdefs.h"
12996 /* Override any gcc2 internal prototype to avoid an error.  */
12997 /* We use char because int might match the return type of a gcc2
12998     builtin and then its argument prototype would still apply.  */
12999 char dlopen();
13000
13001 int main() {
13002 dlopen()
13003 ; return 0; }
13004 EOF
13005 if { (eval echo configure:13006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13006   rm -rf conftest*
13007   eval "ac_cv_lib_$ac_lib_var=yes"
13008 else
13009   echo "configure: failed program was:" >&5
13010   cat conftest.$ac_ext >&5
13011   rm -rf conftest*
13012   eval "ac_cv_lib_$ac_lib_var=no"
13013 fi
13014 rm -f conftest*
13015 xe_check_libs=""
13016
13017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13018   echo "$ac_t""yes" 1>&6
13019   have_dl=yes 
13020 else
13021   echo "$ac_t""no" 1>&6
13022 fi
13023
13024
13025 fi
13026
13027
13028 else
13029   echo "$ac_t""no" 1>&6
13030 fi
13031
13032     if test -n "$have_dl"; then
13033       { test "$extra_verbose" = "yes" && cat << \EOF
13034     Defining HAVE_DLOPEN
13035 EOF
13036 cat >> confdefs.h <<\EOF
13037 #define HAVE_DLOPEN 1
13038 EOF
13039 }
13040
13041     else
13042       
13043 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13044 echo "configure:13045: checking for shl_load in -ldld" >&5
13045 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13046
13047 xe_check_libs=" -ldld "
13048 cat > conftest.$ac_ext <<EOF
13049 #line 13050 "configure"
13050 #include "confdefs.h"
13051 /* Override any gcc2 internal prototype to avoid an error.  */
13052 /* We use char because int might match the return type of a gcc2
13053     builtin and then its argument prototype would still apply.  */
13054 char shl_load();
13055
13056 int main() {
13057 shl_load()
13058 ; return 0; }
13059 EOF
13060 if { (eval echo configure:13061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13061   rm -rf conftest*
13062   eval "ac_cv_lib_$ac_lib_var=yes"
13063 else
13064   echo "configure: failed program was:" >&5
13065   cat conftest.$ac_ext >&5
13066   rm -rf conftest*
13067   eval "ac_cv_lib_$ac_lib_var=no"
13068 fi
13069 rm -f conftest*
13070 xe_check_libs=""
13071
13072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13073   echo "$ac_t""yes" 1>&6
13074   libdl=dld have_dl=yes;
13075         { test "$extra_verbose" = "yes" && cat << \EOF
13076     Defining HAVE_SHL_LOAD
13077 EOF
13078 cat >> confdefs.h <<\EOF
13079 #define HAVE_SHL_LOAD 1
13080 EOF
13081 }
13082
13083 else
13084   echo "$ac_t""no" 1>&6
13085
13086 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13087 echo "configure:13088: checking for dld_init in -ldld" >&5
13088 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13089
13090 xe_check_libs=" -ldld "
13091 cat > conftest.$ac_ext <<EOF
13092 #line 13093 "configure"
13093 #include "confdefs.h"
13094 /* Override any gcc2 internal prototype to avoid an error.  */
13095 /* We use char because int might match the return type of a gcc2
13096     builtin and then its argument prototype would still apply.  */
13097 char dld_init();
13098
13099 int main() {
13100 dld_init()
13101 ; return 0; }
13102 EOF
13103 if { (eval echo configure:13104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13104   rm -rf conftest*
13105   eval "ac_cv_lib_$ac_lib_var=yes"
13106 else
13107   echo "configure: failed program was:" >&5
13108   cat conftest.$ac_ext >&5
13109   rm -rf conftest*
13110   eval "ac_cv_lib_$ac_lib_var=no"
13111 fi
13112 rm -f conftest*
13113 xe_check_libs=""
13114
13115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13116   echo "$ac_t""yes" 1>&6
13117   libdl=dld have_dl=yes;
13118         { test "$extra_verbose" = "yes" && cat << \EOF
13119     Defining HAVE_DLD_INIT
13120 EOF
13121 cat >> confdefs.h <<\EOF
13122 #define HAVE_DLD_INIT 1
13123 EOF
13124 }
13125
13126 else
13127   echo "$ac_t""no" 1>&6
13128 fi
13129
13130
13131 fi
13132
13133
13134     fi
13135   fi 
13136   if test -n "$have_dl"; then
13137         
13138 dll_ld=
13139 dll_ldflags=
13140 dll_cflags=
13141 dll_post=
13142 dll_ldo="-o"
13143 ld_dynamic_link_flags=
13144 xehost=$canonical
13145 xealias=$internal_configuration
13146
13147 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13148 echo "configure:13149: checking how to build dynamic libraries for ${xehost}" >&5
13149 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13150 case "$xehost" in
13151 *-*-linux-gnu*) ;;
13152 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13153 esac
13154
13155 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13156 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13157 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13158
13159 case "$xehost_os" in
13160 aix3*)
13161   # AIX sometimes has problems with the GCC collect2 program.  For some
13162   # reason, if we set the COLLECT_NAMES environment variable, the problems
13163   # vanish in a puff of smoke.
13164   if test "${COLLECT_NAMES+set}" != set; then
13165     COLLECT_NAMES=
13166     export COLLECT_NAMES
13167   fi
13168   ;;
13169 esac
13170
13171 # Now see if the compiler is really GCC.
13172 if test "$GCC" = "yes"; then
13173   XEGCC=yes
13174 else
13175   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13176 echo "configure:13177: checking checking whether we are using GNU C" >&5
13177   cat > conftest.$ac_ext <<EOF
13178 #line 13179 "configure"
13179 #include "confdefs.h"
13180
13181 #ifdef __GNUC__
13182   yes;
13183 #endif
13184
13185 EOF
13186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13187   egrep "yes" >/dev/null 2>&1; then
13188   rm -rf conftest*
13189   XEGCC=yes
13190 else
13191   rm -rf conftest*
13192   XEGCC=no
13193 fi
13194 rm -f conftest*
13195
13196   echo "$ac_t""${XEGCC}" 1>&6
13197 fi
13198
13199 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13200 echo "configure:13201: checking how to produce PIC code" >&5
13201 wl=
13202
13203 can_build_shared=yes
13204 if test "$XEGCC" = yes; then
13205   wl='-Wl,'
13206
13207   case "$xehost_os" in
13208   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13209     # PIC is the default for these OSes.
13210     ;;
13211
13212   aix3* | aix4* | os2*)
13213     # We can build DLLs from non-PIC.
13214     ;;
13215   amigaos*)
13216     # FIXME: we need at least 68020 code to build shared libraries, but
13217     # adding the `-m68020' flag to GCC prevents building anything better,
13218     # like `-m68040'.
13219     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13220     ;;
13221   *cygwin* | *mingw* )
13222     # PIC is the default
13223     ;;
13224   *)
13225     dll_cflags='-fPIC'
13226     ;;
13227   esac
13228 else
13229   # PORTME Check for PIC flags for the system compiler.
13230   case "$xehost_os" in
13231   hpux9* | hpux1[0-9]*)
13232     # Is there a better link_static_flag that works with the bundled CC?
13233     wl='-Wl,'
13234     dll_cflags='+Z'
13235     ;;
13236
13237   irix5* | irix6*)
13238     wl='-Wl,'
13239     # PIC (with -KPIC) is the default.
13240     ;;
13241
13242   os2*)
13243     # We can build DLLs from non-PIC.
13244     ;;
13245
13246   osf3* | osf4*)
13247     # All OSF/1 code is PIC.
13248     wl='-Wl,'
13249     ;;
13250
13251   sco3.2v5*)
13252     dll_cflags='-belf -Kpic'
13253     wl='-Wl,'
13254     ;;
13255
13256   unixware*)
13257     dll_cflags="-KPIC"
13258     wl="-Wl,"
13259     ;;
13260
13261   sysv4*)
13262     dll_cflags="-KPIC"
13263     wl="-Wl,"
13264     ;;
13265
13266   sysv5*)
13267     dll_cflags="-KPIC"
13268     wl="-Wl,"
13269     ;;
13270
13271   solaris2*)
13272     dll_cflags='-KPIC'
13273     wl='-Wl,'
13274     ;;
13275
13276   sunos4*)
13277     dll_cflags='-PIC'
13278     wl='-Qoption ld '
13279     ;;
13280
13281   uts4*)
13282     dll_cflags='-pic'
13283     ;;
13284
13285   *)
13286     can_build_shared=no
13287     ;;
13288   esac
13289 fi
13290
13291 if test -n "$dll_cflags"; then
13292   echo "$ac_t""${dll_cflags}" 1>&6
13293   
13294   # Check to make sure the dll_cflags actually works.
13295   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13296 echo "configure:13297: checking if PIC flag ${dll_cflags} really works" >&5
13297   save_CFLAGS="$CFLAGS"
13298   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13299   cat > conftest.$ac_ext <<EOF
13300 #line 13301 "configure"
13301 #include "confdefs.h"
13302
13303 int main() {
13304 int x=0;
13305 ; return 0; }
13306 EOF
13307 if { (eval echo configure:13308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13308   rm -rf conftest*
13309   
13310     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13311     # reports no error.  So, we need to grep stderr for (Bundled).
13312     if grep '(Bundled)' config.log >/dev/null; then
13313       echo "$ac_t""no" 1>&6
13314       can_build_shared=no
13315       dll_cflags=
13316     else
13317       echo "$ac_t""yes" 1>&6
13318     fi
13319 else
13320   echo "configure: failed program was:" >&5
13321   cat conftest.$ac_ext >&5
13322   rm -rf conftest*
13323   echo "$ac_t""no" 1>&6
13324     can_build_shared=no
13325     dll_cflags=
13326 fi
13327 rm -f conftest*
13328   CFLAGS="$save_CFLAGS"
13329 else
13330   echo "$ac_t""none" 1>&6
13331 fi
13332
13333 if test "$can_build_shared" = "yes"; then
13334 cc_produces_so=no
13335 xldf=
13336 xcldf=
13337 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13338 echo "configure:13339: checking if C compiler can produce shared libraries" >&5
13339 if test "$XEGCC" = yes; then
13340   xcldf="-shared"
13341   xldf="-shared"
13342 else # Not using GCC
13343   case "$xehost_os" in
13344     aix3* | aix4*)
13345       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13346       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13347       ;;
13348
13349     freebsd2* | netbsd* | openbsd*)
13350       xldf="-Bshareable"
13351       xcldf="${wl}-Bshareable"
13352       ;;
13353
13354     freebsd3*)
13355       xcldf="-shared"
13356       ;;
13357
13358     hpux*)
13359       xldf="-b +s"
13360       xcldf="${wl}-b ${wl}+s"
13361       ;;
13362
13363     irix5* | irix6* | osf3* | osf4*)
13364       xcldf="${wl}-shared"
13365       xldf="-shared"
13366       ;;
13367
13368     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13369       xcldf="-G"
13370       xldf="-G"
13371       ;;
13372
13373     sunos4*)
13374       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13375       xldf="-assert pure-text -Bstatic"
13376       ;;
13377   esac
13378 fi # End if if we are using gcc
13379
13380 if test -n "$xcldf"; then
13381   save_LDFLAGS=$LDFLAGS
13382   save_LIBS=$LIBS
13383   save_xe_libs=$xe_libs
13384   LDFLAGS="$xcldf $LDFLAGS"
13385   LIBS=
13386   xe_libs=
13387   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13388   cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391
13392 int main() {
13393 int x=0;
13394 ; return 0; }
13395 EOF
13396 if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13397   rm -rf conftest*
13398   cc_produces_so=yes
13399 else
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402   rm -rf conftest*
13403   cc_produces_so=no
13404 fi
13405 rm -f conftest*
13406   LDFLAGS=$save_LDFLAGS
13407   LIBS=$save_LIBS
13408   xe_libs=$save_xe_libs
13409   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13410 else
13411   cc_produces_so=no
13412 fi
13413 echo "$ac_t""${cc_produces_so}" 1>&6
13414
13415 LTLD=$LD
13416 if test -z "$LTLD"; then
13417   ac_prog=ld
13418   if test "$XEGCC" = yes; then
13419     # Check if gcc -print-prog-name=ld gives a path.
13420     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13421 echo "configure:13422: checking for ld used by GCC" >&5
13422     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13423     case "$ac_prog" in
13424     # Accept absolute paths.
13425     /*)
13426       if test -z "$LTLD"; then
13427         case "$ac_prog" in
13428           *gcc-lib*) LTLD="$CC"
13429                      ;;
13430           *)         LTLD="$ac_prog"
13431                      ;;
13432         esac
13433       fi
13434       ;;
13435     "")
13436       # If it fails, then pretend we aren't using GCC.
13437       ac_prog=ld
13438       ;;
13439     *)
13440       # If it is relative, then search for the first ld in PATH.
13441       with_gnu_ld=unknown
13442       ;;
13443     esac
13444   else
13445     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13446 echo "configure:13447: checking for GNU ld" >&5
13447   fi
13448
13449   if test -z "$LTLD"; then
13450     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13451     for ac_dir in $PATH; do
13452       test -z "$ac_dir" && ac_dir=.
13453       if test -f "$ac_dir/$ac_prog"; then
13454         LTLD="$ac_dir/$ac_prog"
13455         # Check to see if the program is GNU ld.  I'd rather use --version,
13456         # but apparently some GNU ld's only accept -v.
13457         # Break only if it was the GNU/non-GNU ld that we prefer.
13458         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13459           xe_gnu_ld=yes
13460         else
13461           xe_gnu_ld=no
13462         fi
13463       fi
13464     done
13465     IFS="$ac_save_ifs"
13466   fi
13467
13468   if test -n "$LTLD"; then
13469     echo "$ac_t""${LTLD}" 1>&6
13470   else
13471     echo "$ac_t""no" 1>&6
13472   fi
13473
13474   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13475     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13476     exit 1
13477   fi
13478 fi
13479
13480 ld_dynamic_link_flags=
13481
13482 # Check to see if it really is or isn't GNU ld.
13483 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13484 echo "configure:13485: checking if the linker is GNU ld" >&5
13485 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13486 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13487   xe_gnu_ld=yes
13488 else
13489   xe_gnu_ld=no
13490 fi
13491 echo "$ac_t""${xe_gnu_ld}" 1>&6
13492
13493 case "$xehost_os" in
13494   amigaos* | sunos4*)
13495     # On these operating systems, we should treat GNU ld like the system ld.
13496     gnu_ld_acts_native=yes
13497     ;;
13498   *)
13499     gnu_ld_acts_native=no
13500     ;;
13501 esac
13502
13503 if test "$cc_produces_so" = "yes"; then
13504   dll_ld=$CC
13505   dll_ldflags=$xcldf
13506   can_build_shared=yes
13507   ld_shlibs=yes
13508 else
13509   # OK - only NOW do we futz about with ld.
13510   # See if the linker supports building shared libraries.
13511   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13512 echo "configure:13513: checking whether the linker supports shared libraries" >&5
13513   dll_ld=$CC
13514   dll_ldflags=$LDFLAGS
13515   ld_shlibs=yes
13516   can_build_shared=yes
13517   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13518     # See if GNU ld supports shared libraries.
13519     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13520       dll_ld=$CC
13521       dll_ldflags="-shared"
13522       ld_shlibs=yes
13523     else
13524       ld_shlibs=no
13525     fi
13526   else
13527     # PORTME fill in a description of your system's linker (not GNU ld)
13528     case "$xehost_os" in
13529     aix3*)
13530       dll_ld=$LTLD
13531       dll_ldflags=$xldf
13532       ;;
13533
13534     aix4*)
13535       dll_ldflags=$xcldf
13536       ;;
13537
13538     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13539     # support.  Future versions do this automatically, but an explicit c++rt0.o
13540     # doesn't break anything, and helps significantly (at the cost of a little
13541     # extra space).
13542     freebsd2.2*)
13543       dll_ld=$LTLD
13544       dll_ldflags=$xldf
13545       dll_post="/usr/lib/c++rt0.o"
13546       ;;
13547
13548     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13549     freebsd2*)
13550       dll_ld=$LTLD
13551       dll_ldflags="-Bshareable"
13552       ;;
13553
13554     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13555     freebsd3*)
13556       dll_ldflags="-shared"
13557       ;;
13558
13559     hpux*)
13560       dll_ld=$LTLD
13561       dll_ldflags=$xldf
13562       ;;
13563
13564     irix5* | irix6*)
13565       dll_ld=$LTLD
13566       dll_ldflags=$xldf
13567       ;;
13568
13569     netbsd*)
13570       # Tested with NetBSD 1.2 ld
13571       dll_ld=$LTLD
13572       dll_ldflags=$xldf
13573       ;;
13574
13575     openbsd*)
13576       dll_ld=$LTLD
13577       dll_ldflags=$xldf
13578       ;;
13579
13580     osf3* | osf4*)
13581       dll_ld=$LTLD
13582       dll_ldflags=$xldf
13583       ;;
13584
13585     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13586     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13587       dll_ld=$LTLD
13588       case "$dll_ld" in
13589         *gcc*) dll_ldflags="-shared"
13590                dll_ld=$CC
13591                ;;
13592         *)     dll_ldflags="-G"
13593                ;;
13594       esac
13595       ;;
13596
13597     sunos4*)
13598       if test "$XEGCC" = yes; then
13599         dll_ld=$CC
13600       else
13601         dll_ld=$LTLD
13602       fi
13603       dll_ldflags=$xldf
13604       ;;
13605
13606     uts4*)
13607       dll_ld=$LTLD
13608       dll_ldflags="-G"
13609       ;;
13610
13611     bsdi*)
13612       dll_ldflags="-r"
13613       dll_ld="shlicc2"
13614       ;;
13615
13616     *)
13617       ld_shlibs=no
13618       can_build_shared=no
13619       ;;
13620     esac
13621   fi
13622   echo "$ac_t""${ld_shlibs}" 1>&6
13623   if test "$ld_shlibs" = "no"; then
13624     can_build_shared=no
13625   fi
13626 fi # End of if cc_produces_so = no
13627
13628
13629 if test "$xe_gnu_ld" = yes; then
13630   if test "$ld_shlibs" = yes; then
13631     ld_dynamic_link_flags="${wl}-export-dynamic"
13632   fi
13633 fi
13634
13635 if test -z "$ld_dynamic_link_flags"; then
13636   case "$xehost_os" in
13637   aix3*)
13638     ld_dynamic_link_flags=
13639     ;;
13640
13641   aix4*)
13642     ld_dynamic_link_flags=
13643     ;;
13644
13645   freebsd2.2*)
13646     ld_dynamic_link_flags=
13647     ;;
13648
13649   freebsd2*)
13650     ld_dynamic_link_flags=
13651     ;;
13652
13653   freebsd3*)
13654     ld_dynamic_link_flags=
13655     ;;
13656
13657   hpux*)
13658     ld_dynamic_link_flags="${wl}-E"
13659     ;;
13660
13661   irix5* | irix6*)
13662     ld_dynamic_link_flags=
13663     ;;
13664
13665   netbsd*)
13666     ld_dynamic_link_flags=
13667     ;;
13668
13669   openbsd*)
13670     ld_dynamic_link_flags=
13671     ;;
13672
13673   osf3* | osf4*)
13674     ld_dynamic_link_flags=
13675     ;;
13676
13677   solaris2* | solaris7*)
13678     ld_dynamic_link_flags=
13679     ;;
13680
13681   sco3.2v5* | unixware* | sysv5* | sysv4*)
13682     ld_dynamic_link_flags="${wl}-Bexport"
13683     ;;
13684
13685   sunos4*)
13686     ld_dynamic_link_flags=
13687     ;;
13688
13689   uts4*)
13690     ld_dynamic_link_flags=
13691     ;;
13692
13693   bsdi*)
13694     ld_dynamic_link_flags=
13695     ;;
13696
13697   esac
13698 fi # End of if -z ld_dynamic_link_flags
13699 fi # End of if test "$can_build_shared" = "yes"
13700
13701
13702
13703
13704
13705
13706
13707
13708   fi
13709
13710   if test "$can_build_shared" = "yes"; then
13711     { test "$extra_verbose" = "yes" && cat << \EOF
13712     Defining HAVE_SHLIB
13713 EOF
13714 cat >> confdefs.h <<\EOF
13715 #define HAVE_SHLIB 1
13716 EOF
13717 }
13718
13719     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13720    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13721  fi
13722     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13723     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13724     for ac_func in dlerror _dlerror
13725 do
13726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13727 echo "configure:13728: checking for $ac_func" >&5
13728
13729 cat > conftest.$ac_ext <<EOF
13730 #line 13731 "configure"
13731 #include "confdefs.h"
13732 /* System header to define __stub macros and hopefully few prototypes,
13733     which can conflict with char $ac_func(); below.  */
13734 #include <assert.h>
13735 /* Override any gcc2 internal prototype to avoid an error.  */
13736 /* We use char because int might match the return type of a gcc2
13737     builtin and then its argument prototype would still apply.  */
13738 char $ac_func();
13739
13740 int main() {
13741
13742 /* The GNU C library defines this for functions which it implements
13743     to always fail with ENOSYS.  Some functions are actually named
13744     something starting with __ and the normal name is an alias.  */
13745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13746 choke me
13747 #else
13748 $ac_func();
13749 #endif
13750
13751 ; return 0; }
13752 EOF
13753 if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13754   rm -rf conftest*
13755   eval "ac_cv_func_$ac_func=yes"
13756 else
13757   echo "configure: failed program was:" >&5
13758   cat conftest.$ac_ext >&5
13759   rm -rf conftest*
13760   eval "ac_cv_func_$ac_func=no"
13761 fi
13762 rm -f conftest*
13763
13764 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13765   echo "$ac_t""yes" 1>&6
13766     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13767   { test "$extra_verbose" = "yes" && cat << EOF
13768     Defining $ac_tr_func
13769 EOF
13770 cat >> confdefs.h <<EOF
13771 #define $ac_tr_func 1
13772 EOF
13773 }
13774  
13775 else
13776   echo "$ac_t""no" 1>&6
13777 fi
13778 done
13779
13780     with_modules=yes
13781   else
13782     if test "$with_modules" = "yes"; then
13783       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13784     else
13785       echo "configure: warning: "Module support cannot be provided."" 1>&2
13786     fi
13787     with_modules=no
13788   fi
13789 fi
13790
13791 cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 int main(int c,char *v[]){return 0;}
13795 EOF
13796 if { (eval echo configure:13797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13797 then
13798   :
13799 else
13800   conftest_rc="$?"
13801   echo "configure: failed program was:" >&5
13802   cat conftest.$ac_ext >&5
13803   rm -fr conftest*
13804   
13805   echo ""
13806   echo "*** PANIC *** The C compiler can no longer build working executables."
13807   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13808   echo "*** PANIC *** The most likely reason for this problem is that configure"
13809   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13810   echo "*** PANIC *** found at run time."
13811   echo "*** PANIC ***"
13812   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13813   echo "*** PANIC *** On other systems, try telling configure where to find the"
13814   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13815   echo "*** PANIC ***"
13816   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13817   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13818   echo "*** PANIC *** on your system.  Don't do that."
13819   exit 1
13820 fi
13821 rm -fr conftest*
13822
13823 if test "$win32_processes" = "yes"; then
13824   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13825    echo "    xemacs will be linked with \"process-nt.o\""
13826  fi
13827 else
13828   { test "$extra_verbose" = "yes" && cat << \EOF
13829     Defining HAVE_UNIX_PROCESSES
13830 EOF
13831 cat >> confdefs.h <<\EOF
13832 #define HAVE_UNIX_PROCESSES 1
13833 EOF
13834 }
13835
13836   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13837    echo "    xemacs will be linked with \"process-unix.o\""
13838  fi
13839 fi
13840
13841
13842
13843 T=""
13844 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13845 CFLAGS="$T"
13846
13847
13848 T=""
13849 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13850 extra_objs="$T"
13851
13852
13853 T=""
13854 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
13855 c_switch_general="$T"
13856
13857
13858 T=""
13859 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13860 c_switch_window_system="$T"
13861
13862
13863 T=""
13864 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13865 c_switch_all="$T"
13866
13867
13868 T=""
13869 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
13870 ld_switch_general="$T"
13871
13872
13873 T=""
13874 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13875 ld_switch_window_system="$T"
13876
13877
13878 T=""
13879 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13880 ld_switch_all="$T"
13881
13882
13883 T=""
13884 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13885 ld_libs_general="$T"
13886
13887
13888 T=""
13889 for W in $X_EXTRA_LIBS $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13890 ld_libs_window_system="$T"
13891
13892
13893 T=""
13894 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13895 ld_libs_all="$T"
13896
13897
13898
13899 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13900 internal_makefile_list="Makefile.in"
13901 SUBDIR_MAKEFILES=''
13902 test -d lock || mkdir lock
13903 for dir in $MAKE_SUBDIR; do
13904   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13905         test -d "$d" || mkdir "$d"; cd "$d"
13906       done ) ;;
13907    * ) test -d "$dir" || mkdir "$dir" ;;
13908   esac
13909   
13910 T=""
13911 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13912 SUBDIR_MAKEFILES="$T"
13913
13914   
13915 T=""
13916 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13917 internal_makefile_list="$T"
13918
13919 done
13920
13921
13922
13923
13924 for dir in src/s src/m; do
13925   if test ! -d "$dir" ; then
13926     echo Making symbolic link to "$srcdir/$dir"
13927     ${LN_S} "$srcdir/$dir" "$dir"
13928   fi
13929 done
13930
13931 if test "$extra_verbose" = "yes"; then
13932   echo ""
13933   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
13934   echo ""
13935 fi
13936
13937
13938 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13939   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13940   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13941 fi
13942
13943 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13944   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13945   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13946 fi
13947
13948 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13949   test "$extra_verbose" = "yes" && echo "creating TAGS"
13950   echo "\f
13951 $srcdir/TAGS,include" > "TAGS"
13952 fi
13953
13954 if test "$__SUNPRO_C" = "yes"; then
13955   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13956   ( echo "# For use with Sun WorkShop's Source browser."
13957     echo "# See sbquery(1) and sbinit(4) for more information"
13958     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13959   ) > .sbinit
13960 fi
13961
13962 rm -f core
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982 PREFIX=$prefix
13983 while true; do
13984   case "$PREFIX" in
13985     *\$* ) eval "PREFIX=$PREFIX" ;;
13986     *) break ;;
13987   esac
13988 done
13989
13990
13991
13992
13993 EXEC_PREFIX=$exec_prefix
13994 while true; do
13995   case "$EXEC_PREFIX" in
13996     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13997     *) break ;;
13998   esac
13999 done
14000
14001
14002
14003
14004 INFODIR=$infodir
14005 while true; do
14006   case "$INFODIR" in
14007     *\$* ) eval "INFODIR=$INFODIR" ;;
14008     *) break ;;
14009   esac
14010 done
14011
14012
14013
14014
14015 INFOPATH=$infopath
14016 while true; do
14017   case "$INFOPATH" in
14018     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14019     *) break ;;
14020   esac
14021 done
14022
14023
14024
14025
14026 PACKAGE_PATH=$package_path
14027 while true; do
14028   case "$PACKAGE_PATH" in
14029     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14030     *) break ;;
14031   esac
14032 done
14033
14034
14035
14036
14037 LISPDIR=$lispdir
14038 while true; do
14039   case "$LISPDIR" in
14040     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14041     *) break ;;
14042   esac
14043 done
14044
14045
14046
14047
14048 MODULEDIR=$moduledir
14049 while true; do
14050   case "$MODULEDIR" in
14051     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14052     *) break ;;
14053   esac
14054 done
14055
14056
14057
14058
14059 SITELISPDIR=$sitelispdir
14060 while true; do
14061   case "$SITELISPDIR" in
14062     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14063     *) break ;;
14064   esac
14065 done
14066
14067
14068
14069
14070 SITEMODULEDIR=$sitemoduledir
14071 while true; do
14072   case "$SITEMODULEDIR" in
14073     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14074     *) break ;;
14075   esac
14076 done
14077
14078
14079
14080
14081 ETCDIR=$etcdir
14082 while true; do
14083   case "$ETCDIR" in
14084     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14085     *) break ;;
14086   esac
14087 done
14088
14089
14090
14091
14092 DOCDIR=$docdir
14093 while true; do
14094   case "$DOCDIR" in
14095     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14096     *) break ;;
14097   esac
14098 done
14099
14100
14101
14102
14103 ARCHLIBDIR=$archlibdir
14104 while true; do
14105   case "$ARCHLIBDIR" in
14106     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14107     *) break ;;
14108   esac
14109 done
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14131
14132
14133
14134
14135
14136
14137
14138 : ${XEMACS_CC:=$CC}
14139
14140
14141 if test "$with_prefix" = "yes"; then
14142   { test "$extra_verbose" = "yes" && cat << \EOF
14143     Defining PREFIX_USER_DEFINED
14144 EOF
14145 cat >> confdefs.h <<\EOF
14146 #define PREFIX_USER_DEFINED 1
14147 EOF
14148 }
14149
14150 fi
14151
14152 if test "$with_site_lisp" = "no"; then
14153   { test "$extra_verbose" = "yes" && cat << \EOF
14154     Defining INHIBIT_SITE_LISP
14155 EOF
14156 cat >> confdefs.h <<\EOF
14157 #define INHIBIT_SITE_LISP 1
14158 EOF
14159 }
14160
14161 fi
14162 if test "$with_site_modules" = "no"; then
14163   { test "$extra_verbose" = "yes" && cat << \EOF
14164     Defining INHIBIT_SITE_MODULES
14165 EOF
14166 cat >> confdefs.h <<\EOF
14167 #define INHIBIT_SITE_MODULES 1
14168 EOF
14169 }
14170
14171 fi
14172
14173
14174 T=""
14175 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14176 ac_configure_args="$T"
14177
14178 { test "$extra_verbose" = "yes" && cat << EOF
14179     Defining EMACS_CONFIGURATION = "$configuration"
14180 EOF
14181 cat >> confdefs.h <<EOF
14182 #define EMACS_CONFIGURATION "$configuration"
14183 EOF
14184 }
14185
14186 { test "$extra_verbose" = "yes" && cat << EOF
14187     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14188 EOF
14189 cat >> confdefs.h <<EOF
14190 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14191 EOF
14192 }
14193
14194 { test "$extra_verbose" = "yes" && cat << EOF
14195     Defining config_machfile = "$machfile"
14196 EOF
14197 cat >> confdefs.h <<EOF
14198 #define config_machfile "$machfile"
14199 EOF
14200 }
14201
14202 { test "$extra_verbose" = "yes" && cat << EOF
14203     Defining config_opsysfile = "$opsysfile"
14204 EOF
14205 cat >> confdefs.h <<EOF
14206 #define config_opsysfile "$opsysfile"
14207 EOF
14208 }
14209
14210
14211
14212 null_string=""
14213 { test "$extra_verbose" = "yes" && cat << EOF
14214     Defining LD_SWITCH_X_SITE = $null_string
14215 EOF
14216 cat >> confdefs.h <<EOF
14217 #define LD_SWITCH_X_SITE $null_string
14218 EOF
14219 }
14220
14221 { test "$extra_verbose" = "yes" && cat << EOF
14222     Defining LD_SWITCH_X_SITE_AUX = $null_string
14223 EOF
14224 cat >> confdefs.h <<EOF
14225 #define LD_SWITCH_X_SITE_AUX $null_string
14226 EOF
14227 }
14228
14229 { test "$extra_verbose" = "yes" && cat << EOF
14230     Defining C_SWITCH_X_SITE = $null_string
14231 EOF
14232 cat >> confdefs.h <<EOF
14233 #define C_SWITCH_X_SITE $null_string
14234 EOF
14235 }
14236
14237 { test "$extra_verbose" = "yes" && cat << EOF
14238     Defining LD_SWITCH_SITE = $null_string
14239 EOF
14240 cat >> confdefs.h <<EOF
14241 #define LD_SWITCH_SITE $null_string
14242 EOF
14243 }
14244
14245 { test "$extra_verbose" = "yes" && cat << EOF
14246     Defining C_SWITCH_SITE = $null_string
14247 EOF
14248 cat >> confdefs.h <<EOF
14249 #define C_SWITCH_SITE $null_string
14250 EOF
14251 }
14252
14253
14254
14255 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14256     Defining GNU_MALLOC
14257 EOF
14258 cat >> confdefs.h <<\EOF
14259 #define GNU_MALLOC 1
14260 EOF
14261 }
14262
14263 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14264     Defining USE_SYSTEM_MALLOC
14265 EOF
14266 cat >> confdefs.h <<\EOF
14267 #define USE_SYSTEM_MALLOC 1
14268 EOF
14269 }
14270
14271 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14272     Defining USE_DEBUG_MALLOC
14273 EOF
14274 cat >> confdefs.h <<\EOF
14275 #define USE_DEBUG_MALLOC 1
14276 EOF
14277 }
14278
14279                                               { test "$extra_verbose" = "yes" && cat << \EOF
14280     Defining USE_SYSTEM_MALLOC
14281 EOF
14282 cat >> confdefs.h <<\EOF
14283 #define USE_SYSTEM_MALLOC 1
14284 EOF
14285 }
14286
14287 fi
14288 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14289     Defining I18N3
14290 EOF
14291 cat >> confdefs.h <<\EOF
14292 #define I18N3 1
14293 EOF
14294 }
14295
14296 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14297     Defining USE_GCC
14298 EOF
14299 cat >> confdefs.h <<\EOF
14300 #define USE_GCC 1
14301 EOF
14302 }
14303
14304 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14305     Defining EXTERNAL_WIDGET
14306 EOF
14307 cat >> confdefs.h <<\EOF
14308 #define EXTERNAL_WIDGET 1
14309 EOF
14310 }
14311
14312 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14313     Defining QUICK_BUILD
14314 EOF
14315 cat >> confdefs.h <<\EOF
14316 #define QUICK_BUILD 1
14317 EOF
14318 }
14319
14320 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14321     Defining PURIFY
14322 EOF
14323 cat >> confdefs.h <<\EOF
14324 #define PURIFY 1
14325 EOF
14326 }
14327
14328 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14329     Defining QUANTIFY
14330 EOF
14331 cat >> confdefs.h <<\EOF
14332 #define QUANTIFY 1
14333 EOF
14334 }
14335
14336 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14337     Defining MAIL_USE_POP
14338 EOF
14339 cat >> confdefs.h <<\EOF
14340 #define MAIL_USE_POP 1
14341 EOF
14342 }
14343
14344 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14345     Defining KERBEROS
14346 EOF
14347 cat >> confdefs.h <<\EOF
14348 #define KERBEROS 1
14349 EOF
14350 }
14351
14352 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14353     Defining HESIOD
14354 EOF
14355 cat >> confdefs.h <<\EOF
14356 #define HESIOD 1
14357 EOF
14358 }
14359
14360 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14361     Defining USE_UNION_TYPE
14362 EOF
14363 cat >> confdefs.h <<\EOF
14364 #define USE_UNION_TYPE 1
14365 EOF
14366 }
14367
14368 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14369     Defining PDUMP
14370 EOF
14371 cat >> confdefs.h <<\EOF
14372 #define PDUMP 1
14373 EOF
14374 }
14375
14376
14377
14378 (
14379 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14380 else
14381   echo "uname -a: `uname -a`"
14382 fi
14383 echo ""
14384 echo "$0 $quoted_arguments"
14385 ) > Installation
14386
14387 if test ! -z ${emacs_beta_version} ; then
14388   if test -z "${emacs_is_beta}" ; then
14389         xemacs_betaname=".${emacs_beta_version}"
14390   else
14391         xemacs_betaname="-b${emacs_beta_version}"
14392   fi
14393 else
14394   xemacs_betaname=""
14395 fi
14396
14397 (
14398 echo "
14399
14400 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14401 "
14402 echo "
14403 Compilation / Installation:"
14404 echo "  Source code location:              $srcdir"
14405 echo "  Installation prefix:               $prefix"
14406 if test -n "$site_includes"; then
14407   echo "  Additional header files:           $site_includes"
14408 fi
14409 if test -n "$site_libraries"; then
14410   echo "  Additional libraries:              $site_libraries"
14411 fi
14412 if test -n "$site_prefixes"; then
14413   echo "  Additional prefixes:               $site_prefixes"
14414 fi
14415 if test -n "$runpath"; then
14416   echo "  Runtime library search path:       $runpath"
14417 fi
14418 echo "  Operating system description file: \`$opsysfile'"
14419 echo "  Machine description file:          \`$machfile'"
14420 echo "  Compiler:                          $CC $CFLAGS"
14421 echo "  Relocating allocator for buffers:  $rel_alloc"
14422 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
14423
14424 echo "
14425 Window System:"
14426 if test "$with_msw" = "yes"; then
14427   echo "  Compiling in support for the Microsoft window system."
14428 fi
14429 if test "$with_x11" = "yes"; then
14430   echo "  Compiling in support for the X window system:"
14431   echo "    - X Windows headers location:                 $x_includes"
14432   echo "    - X Windows libraries location:               $x_libraries"
14433   if test "$with_xauth" != yes; then
14434     echo "    - Xau (X authority) not available."
14435   fi
14436   if test "$with_xmu" != yes; then
14437     echo "    - Xmu library not available; substituting equivalent routines."
14438   fi
14439   if test "$with_wmcommand" != no; then
14440     echo "    - Handling WM_COMMAND properly."
14441   fi
14442 fi
14443 if test "$need_athena" = "yes"; then
14444   echo "  Compiling in support for the Athena widget set:"
14445   echo "    - Athena headers location:                    $athena_h_path"
14446   echo "    - Athena library to link:                     $athena_lib"
14447 fi
14448 case "$with_menubars" in
14449   lucid ) echo "  Using Lucid menubars." ;;
14450   motif ) echo "  Using Motif menubars."
14451           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14452           echo "             We recommend using the Lucid menubar instead."
14453           echo "             Re-run configure with --with-menubars='lucid'." ;;
14454     msw ) echo "  Using MS-Windows menubars." ;;
14455 esac
14456 case "$with_scrollbars" in
14457   lucid  ) echo "  Using Lucid scrollbars."      ;;
14458   motif  ) echo "  Using Motif scrollbars."      ;;
14459   athena ) echo "  Using Athena scrollbars."     ;;
14460      msw ) echo "  Using MS-Windows scrollbars." ;;
14461 esac
14462 case "$with_dialogs" in
14463   motif  ) echo "  Using Motif dialog boxes."
14464            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14465              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14466              echo "             We recommend using the Athena dialog boxes instead."
14467              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14468              echo "             Read the PROBLEMS file for more information."
14469            fi; fi ;;
14470   athena ) echo "  Using Athena dialog boxes."     ;;
14471      msw ) echo "  Using MS-Windows dialog boxes." ;;
14472 esac
14473 case "$with_widgets" in
14474   motif  ) echo "  Using Motif native widgets."      ;;
14475   athena ) echo "  Using Athena native widgets."     ;;
14476      msw ) echo "  Using MS-Windows native widgets." ;;
14477 esac
14478 if test "$with_dragndrop" = yes; then
14479   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
14480   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
14481 fi
14482
14483 echo "
14484 TTY:"
14485 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
14486 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14487
14488 echo "
14489 Images:"
14490 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
14491 if test "$with_xpm" = yes; then
14492   echo "  Compiling in support for XPM  images."
14493 elif test "$with_x11" = yes; then
14494   echo "  WARNING: -----------------------------------------------------------"
14495   echo "  WARNING: Compiling without XPM image support."
14496   if test "$xpm_problem" != ""; then
14497     echo "  Reason: $xpm_problem"
14498   fi
14499   echo "  WARNING: You should strongly consider installing XPM."
14500   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14501   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14502   echo "  WARNING: -----------------------------------------------------------"
14503 fi
14504 if test "$with_png" = yes; then
14505   echo "  Compiling in support for PNG  images."
14506 elif test "$window_system" != "none"; then
14507   echo "  WARNING: -----------------------------------------------------------"
14508   echo "  WARNING: Compiling without PNG image support."
14509   if test "$png_problem" != ""; then
14510     echo "  Reason: $png_problem"
14511   fi
14512   echo "  WARNING: You should strongly consider installing the PNG libraries."
14513   echo "  WARNING: Otherwise certain images and glyphs may not display."
14514   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14515   echo "  WARNING: -----------------------------------------------------------"
14516 fi
14517 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
14518 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
14519 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14520
14521 echo "
14522 Sound:"
14523 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
14524 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
14525 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
14526 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
14527
14528 echo "
14529 Databases:"
14530 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
14531 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14532 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14533 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
14534 if test "$with_postgresql" = yes; then
14535   echo "  Compiling in support for PostgreSQL."
14536   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
14537   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
14538 fi
14539
14540 echo "
14541 Internationalization:"
14542 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
14543 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
14544 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
14545 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
14546 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
14547 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
14548 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
14549 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
14550 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
14551 if test "$with_wnn" = yes; then
14552   echo "  Compiling in support for the WNN input method on Mule."
14553   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
14554 fi
14555 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
14556
14557 echo "
14558 Mail:"
14559 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
14560 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
14561 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
14562 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
14563
14564 echo "
14565 Other Features:"
14566 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14567 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14568 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14569 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
14570 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
14571 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
14572 test "$pdump" = yes && echo "  Using the new portable dumper."
14573 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
14574 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
14575 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
14576   != "no no no no no no"; then
14577   echo "  WARNING: ---------------------------------------------------------"
14578   echo "  WARNING: Compiling in support for runtime error checking."
14579   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14580   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14581   echo "  WARNING: ---------------------------------------------------------"
14582 fi
14583 echo ""
14584 ) | tee -a Installation
14585 echo ""
14586
14587
14588 # Remove any trailing slashes in these variables.
14589 test -n "$prefix" &&
14590   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14591 test -n "$exec_prefix" &&
14592   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14593
14594
14595 for file in $internal_makefile_list; do
14596   test "$file" = src/Makefile.in && \
14597     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14598   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14599 done
14600 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14601 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
14602
14603 trap '' 1 2 15
14604
14605 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14606
14607 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14608 # Let make expand exec_prefix.
14609 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14610
14611 # Any assignment to VPATH causes Sun make to only execute
14612 # the first set of double-colon rules, so remove it if not needed.
14613 # If there is a colon in the path, we need to keep it.
14614 if test "x$srcdir" = x.; then
14615   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14616 fi
14617
14618 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14619
14620 DEFS=-DHAVE_CONFIG_H
14621
14622 # Without the "./", some shells look in PATH for config.status.
14623 : ${CONFIG_STATUS=./config.status}
14624
14625 echo creating $CONFIG_STATUS
14626 rm -f $CONFIG_STATUS
14627 cat > $CONFIG_STATUS <<EOF
14628 #! /bin/sh
14629 # Generated automatically by configure.
14630 # Run this file to recreate the current configuration.
14631 # This directory was configured as follows,
14632 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14633 #
14634 # $0 $ac_configure_args
14635 #
14636 # Compiler output produced by configure, useful for debugging
14637 # configure, is in ./config.log if it exists.
14638
14639 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14640 for ac_option
14641 do
14642   case "\$ac_option" in
14643   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14644     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14645     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14646   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14647     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14648     exit 0 ;;
14649   -help | --help | --hel | --he | --h)
14650     echo "\$ac_cs_usage"; exit 0 ;;
14651   *) echo "\$ac_cs_usage"; exit 1 ;;
14652   esac
14653 done
14654
14655 ac_given_srcdir=$srcdir
14656 ac_given_INSTALL="$INSTALL"
14657
14658 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14659 EOF
14660 cat >> $CONFIG_STATUS <<EOF
14661
14662 # Protect against being on the right side of a sed subst in config.status.
14663 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14664  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14665 $ac_vpsub
14666 $extrasub
14667 s%@SHELL@%$SHELL%g
14668 s%@CFLAGS@%$CFLAGS%g
14669 s%@CPPFLAGS@%$CPPFLAGS%g
14670 s%@CXXFLAGS@%$CXXFLAGS%g
14671 s%@FFLAGS@%$FFLAGS%g
14672 s%@DEFS@%$DEFS%g
14673 s%@LDFLAGS@%$LDFLAGS%g
14674 s%@LIBS@%$LIBS%g
14675 s%@exec_prefix@%$exec_prefix%g
14676 s%@prefix@%$prefix%g
14677 s%@program_transform_name@%$program_transform_name%g
14678 s%@bindir@%$bindir%g
14679 s%@sbindir@%$sbindir%g
14680 s%@libexecdir@%$libexecdir%g
14681 s%@datadir@%$datadir%g
14682 s%@sysconfdir@%$sysconfdir%g
14683 s%@sharedstatedir@%$sharedstatedir%g
14684 s%@localstatedir@%$localstatedir%g
14685 s%@libdir@%$libdir%g
14686 s%@includedir@%$includedir%g
14687 s%@oldincludedir@%$oldincludedir%g
14688 s%@infodir@%$infodir%g
14689 s%@mandir@%$mandir%g
14690 s%@LN_S@%$LN_S%g
14691 s%@blddir@%$blddir%g
14692 s%@CC@%$CC%g
14693 s%@CPP@%$CPP%g
14694 s%@start_flags@%$start_flags%g
14695 s%@ld_switch_shared@%$ld_switch_shared%g
14696 s%@start_files@%$start_files%g
14697 s%@ld@%$ld%g
14698 s%@lib_gcc@%$lib_gcc%g
14699 s%@RANLIB@%$RANLIB%g
14700 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14701 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14702 s%@INSTALL_DATA@%$INSTALL_DATA%g
14703 s%@YACC@%$YACC%g
14704 s%@SET_MAKE@%$SET_MAKE%g
14705 s%@X_CFLAGS@%$X_CFLAGS%g
14706 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14707 s%@X_LIBS@%$X_LIBS%g
14708 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14709 s%@install_pp@%$install_pp%g
14710 s%@libs_xauth@%$libs_xauth%g
14711 s%@dnd_objs@%$dnd_objs%g
14712 s%@lwlib_objs@%$lwlib_objs%g
14713 s%@ALLOCA@%$ALLOCA%g
14714 s%@have_esd_config@%$have_esd_config%g
14715 s%@dll_ld@%$dll_ld%g
14716 s%@dll_cflags@%$dll_cflags%g
14717 s%@dll_ldflags@%$dll_ldflags%g
14718 s%@dll_post@%$dll_post%g
14719 s%@dll_ldo@%$dll_ldo%g
14720 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14721 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14722 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14723 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14724 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14725 s%@PROGNAME@%$PROGNAME%g
14726 s%@version@%$version%g
14727 s%@configuration@%$configuration%g
14728 s%@canonical@%$canonical%g
14729 s%@inststaticdir@%$inststaticdir%g
14730 s%@instvardir@%$instvardir%g
14731 s%@srcdir@%$srcdir%g
14732 s%@pkgdir@%$pkgdir%g
14733 s%@statedir@%$statedir%g
14734 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14735 s%@PREFIX@%$PREFIX%g
14736 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14737 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14738 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14739 s%@INFODIR@%$INFODIR%g
14740 s%@infopath@%$infopath%g
14741 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14742 s%@INFOPATH@%$INFOPATH%g
14743 s%@package_path@%$package_path%g
14744 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14745 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14746 s%@lispdir@%$lispdir%g
14747 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14748 s%@LISPDIR@%$LISPDIR%g
14749 s%@moduledir@%$moduledir%g
14750 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14751 s%@MODULEDIR@%$MODULEDIR%g
14752 s%@sitelispdir@%$sitelispdir%g
14753 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14754 s%@SITELISPDIR@%$SITELISPDIR%g
14755 s%@sitemoduledir@%$sitemoduledir%g
14756 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14757 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14758 s%@etcdir@%$etcdir%g
14759 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14760 s%@ETCDIR@%$ETCDIR%g
14761 s%@docdir@%$docdir%g
14762 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14763 s%@DOCDIR@%$DOCDIR%g
14764 s%@archlibdir@%$archlibdir%g
14765 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14766 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14767 s%@bitmapdir@%$bitmapdir%g
14768 s%@extra_objs@%$extra_objs%g
14769 s%@machfile@%$machfile%g
14770 s%@opsysfile@%$opsysfile%g
14771 s%@c_switch_general@%$c_switch_general%g
14772 s%@c_switch_window_system@%$c_switch_window_system%g
14773 s%@c_switch_all@%$c_switch_all%g
14774 s%@ld_switch_general@%$ld_switch_general%g
14775 s%@ld_switch_window_system@%$ld_switch_window_system%g
14776 s%@ld_switch_all@%$ld_switch_all%g
14777 s%@ld_libs_general@%$ld_libs_general%g
14778 s%@ld_libs_window_system@%$ld_libs_window_system%g
14779 s%@ld_libs_all@%$ld_libs_all%g
14780 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14781 s%@native_sound_lib@%$native_sound_lib%g
14782 s%@sound_cflags@%$sound_cflags%g
14783 s%@dynodump_arch@%$dynodump_arch%g
14784 s%@XEMACS_CC@%$XEMACS_CC%g
14785 s%@internal_makefile_list@%$internal_makefile_list%g
14786
14787 CEOF
14788 EOF
14789
14790 cat >> $CONFIG_STATUS <<\EOF
14791
14792 # Split the substitutions into bite-sized pieces for seds with
14793 # small command number limits, like on Digital OSF/1 and HP-UX.
14794 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14795 ac_file=1 # Number of current file.
14796 ac_beg=1 # First line for current file.
14797 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14798 ac_more_lines=:
14799 ac_sed_cmds=""
14800 while $ac_more_lines; do
14801   if test $ac_beg -gt 1; then
14802     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14803   else
14804     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14805   fi
14806   if test ! -s conftest.s$ac_file; then
14807     ac_more_lines=false
14808     rm -f conftest.s$ac_file
14809   else
14810     if test -z "$ac_sed_cmds"; then
14811       ac_sed_cmds="sed -f conftest.s$ac_file"
14812     else
14813       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14814     fi
14815     ac_file=`expr $ac_file + 1`
14816     ac_beg=$ac_end
14817     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14818   fi
14819 done
14820 if test -z "$ac_sed_cmds"; then
14821   ac_sed_cmds=cat
14822 fi
14823 EOF
14824
14825 cat >> $CONFIG_STATUS <<EOF
14826
14827 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14828 EOF
14829 cat >> $CONFIG_STATUS <<\EOF
14830 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14831   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14832   case "$ac_file" in
14833   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14834        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14835   *) ac_file_in="${ac_file}.in" ;;
14836   esac
14837
14838   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14839
14840   # Remove last slash and all that follows it.  Not all systems have dirname.
14841   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14842   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14843     # The file is in a subdirectory.
14844     test ! -d "$ac_dir" && mkdir "$ac_dir"
14845     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14846     # A "../" for each directory in $ac_dir_suffix.
14847     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14848   else
14849     ac_dir_suffix= ac_dots=
14850   fi
14851
14852   case "$ac_given_srcdir" in
14853   .)  srcdir=.
14854       if test -z "$ac_dots"; then top_srcdir=.
14855       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14856   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14857   *) # Relative path.
14858     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14859     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14860   esac
14861
14862   case "$ac_given_INSTALL" in
14863   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14864   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14865   esac
14866
14867   echo creating "$ac_file"
14868   rm -f "$ac_file"
14869   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14870   case "$ac_file" in
14871   *Makefile*) ac_comsub="1i\\
14872 # $configure_input" ;;
14873   *) ac_comsub= ;;
14874   esac
14875
14876   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14877   sed -e "$ac_comsub
14878 s%@configure_input@%$configure_input%g
14879 s%@srcdir@%$srcdir%g
14880 s%@top_srcdir@%$top_srcdir%g
14881 s%@INSTALL@%$INSTALL%g
14882 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14883 fi; done
14884 rm -f conftest.s*
14885
14886 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14887 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14888 #
14889 # ac_d sets the value in "#define NAME VALUE" lines.
14890 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14891 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14892 ac_dC='\3'
14893 ac_dD='%g'
14894 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14895 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14896 ac_uB='\([      ]\)%\1#\2define\3'
14897 ac_uC=' '
14898 ac_uD='\4%g'
14899 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14900 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14901 ac_eB='$%\1#\2define\3'
14902 ac_eC=' '
14903 ac_eD='%g'
14904
14905 if test "${CONFIG_HEADERS+set}" != set; then
14906 EOF
14907 cat >> $CONFIG_STATUS <<EOF
14908   CONFIG_HEADERS="src/config.h lwlib/config.h"
14909 EOF
14910 cat >> $CONFIG_STATUS <<\EOF
14911 fi
14912 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14913   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14914   case "$ac_file" in
14915   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14916        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14917   *) ac_file_in="${ac_file}.in" ;;
14918   esac
14919
14920   echo creating $ac_file
14921
14922   rm -f conftest.frag conftest.in conftest.out
14923   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14924   cat $ac_file_inputs > conftest.in
14925
14926 EOF
14927
14928 # Transform confdefs.h into a sed script conftest.vals that substitutes
14929 # the proper values into config.h.in to produce config.h.  And first:
14930 # Protect against being on the right side of a sed subst in config.status.
14931 # Protect against being in an unquoted here document in config.status.
14932 rm -f conftest.vals
14933 cat > conftest.hdr <<\EOF
14934 s/[\\&%]/\\&/g
14935 s%[\\$`]%\\&%g
14936 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14937 s%ac_d%ac_u%gp
14938 s%ac_u%ac_e%gp
14939 EOF
14940 sed -n -f conftest.hdr confdefs.h > conftest.vals
14941 rm -f conftest.hdr
14942
14943 # This sed command replaces #undef with comments.  This is necessary, for
14944 # example, in the case of _POSIX_SOURCE, which is predefined and required
14945 # on some systems where configure will not decide to define it.
14946 cat >> conftest.vals <<\EOF
14947 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14948 EOF
14949
14950 # Break up conftest.vals because some shells have a limit on
14951 # the size of here documents, and old seds have small limits too.
14952
14953 rm -f conftest.tail
14954 while :
14955 do
14956   ac_lines=`grep -c . conftest.vals`
14957   # grep -c gives empty output for an empty file on some AIX systems.
14958   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14959   # Write a limited-size here document to conftest.frag.
14960   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14961   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14962   echo 'CEOF
14963   sed -f conftest.frag conftest.in > conftest.out
14964   rm -f conftest.in
14965   mv conftest.out conftest.in
14966 ' >> $CONFIG_STATUS
14967   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14968   rm -f conftest.vals
14969   mv conftest.tail conftest.vals
14970 done
14971 rm -f conftest.vals
14972
14973 cat >> $CONFIG_STATUS <<\EOF
14974   rm -f conftest.frag conftest.h
14975   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14976   cat conftest.in >> conftest.h
14977   rm -f conftest.in
14978   if cmp -s $ac_file conftest.h 2>/dev/null; then
14979     echo "$ac_file is unchanged"
14980     rm -f conftest.h
14981   else
14982     # Remove last slash and all that follows it.  Not all systems have dirname.
14983       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14984       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14985       # The file is in a subdirectory.
14986       test ! -d "$ac_dir" && mkdir "$ac_dir"
14987     fi
14988     rm -f $ac_file
14989     mv conftest.h $ac_file
14990   fi
14991 fi; done
14992
14993 EOF
14994 cat >> $CONFIG_STATUS <<EOF
14995 CPP="$CPP"
14996  top_srcdir="$srcdir"
14997  MAKE_SUBDIR="$MAKE_SUBDIR"
14998
14999 EOF
15000 cat >> $CONFIG_STATUS <<\EOF
15001 for dir in . $MAKE_SUBDIR; do
15002   (
15003     cd $dir
15004     rm -f junk.c
15005     < Makefile.in \
15006       sed -e '/^# Generated/d' \
15007           -e 's%/\*\*/#.*%%' \
15008           -e 's/^ *# */#/' \
15009           -e '/^##/d' \
15010           -e '/^#/ {
15011 p
15012 d
15013 }'        \
15014           -e '/./ {
15015 s/\([\"]\)/\\\1/g
15016 s/^/"/
15017 s/$/"/
15018 }'  > junk.c;
15019
15020
15021
15022     echo creating $dir/Makefile
15023 $CPP -I. -I${top_srcdir}/src  junk.c \
15024   | sed -e 's/^\#.*//'          \
15025         -e 's/^[        ][      ]*$//'\
15026         -e 's/^ /       /'              \
15027   | sed -n -e '/^..*$/p'        \
15028   | sed '/^\"/ {
15029         s/\\\([\"]\)/\1/g
15030         s/^[    ]*\"//
15031         s/\"[   ]*$//
15032 }' > Makefile.new
15033     chmod 444 Makefile.new
15034     mv -f Makefile.new Makefile
15035
15036     echo creating $dir/GNUmakefile
15037 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15038   | sed -e 's/^\#.*//'          \
15039         -e 's/^[        ][      ]*$//'\
15040         -e 's/^ /       /'              \
15041   | sed -n -e '/^..*$/p'        \
15042   | sed '/^\"/ {
15043         s/\\\([\"]\)/\1/g
15044         s/^[    ]*\"//
15045         s/\"[   ]*$//
15046 }' > Makefile.new
15047     chmod 444 Makefile.new
15048     mv -f Makefile.new GNUmakefile
15049
15050     rm -f junk.c
15051   )
15052 done
15053
15054 sed < config.status >> lib-src/config.values \
15055   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15056   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15057   -e 's/^\([^ ]*\) $/\1 ""/' \
15058   -e 's/ 1$/ t/'
15059
15060
15061 exit 0
15062 EOF
15063 chmod +x $CONFIG_STATUS
15064 rm -fr confdefs* $ac_clean_files
15065 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1