sync to xemacs-21.2.37 but STILL BUGGY
[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 esac
1133
1134 case "$canonical" in
1135   *-*-linux*    ) opsys=linux ;;
1136   *-*-netbsd*   ) opsys=netbsd ;;
1137   *-*-openbsd*  ) opsys=openbsd ;;
1138   *-*-nextstep* ) opsys=nextstep ;;
1139   *-*-vms       ) opsys=vms ;;
1140
1141     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1142   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1143   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1144   *-dec-osf3*                ) opsys=decosf3-1 ;;
1145   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1146
1147     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1148   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1149   *-*-ultrix* )         opsys=ultrix4-3 ;;
1150
1151     *-*-aix3.1*  ) opsys=aix3-1 ;;
1152   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1153   *-*-aix3*    ) opsys=aix3-2   ;;
1154   *-*-aix4.0*  ) opsys=aix4     ;;
1155   *-*-aix4.1*  ) opsys=aix4-1   ;;
1156   *-*-aix4*    ) opsys=aix4-2   ;;
1157
1158     *-gnu* )                    opsys=gnu    ;;
1159   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1160   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1161   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1162   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1163   *-*-aos*   )                  opsys=bsd4-3 ;;
1164   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1165   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1166   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1167   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1168   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1169   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1170         if test -z "$NON_GNU_CPP" ; then
1171           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1172             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1173           done
1174         fi
1175         opsys=usg5-4-2 ;;
1176     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1177     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1178 esac
1179
1180 case "$canonical" in
1181
1182     *-*-netbsd* )
1183     case "$canonical" in
1184       i[3-9]86-*-netbsd*) machine=intel386 ;;
1185       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1186                                             machine=hp9000s300 ;;
1187       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1188       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1189     esac
1190   ;;
1191
1192     *-*-openbsd* )
1193     case "${canonical}" in
1194       i386-*-openbsd*)          machine=intel386 ;;
1195       m68k-*-openbsd*)          machine=hp9000s300 ;;
1196       mipsel-*-openbsd*)        machine=pmax ;;
1197      esac
1198    ;;
1199
1200     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1201   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1202
1203     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1204   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1205
1206     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1207
1208     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1209
1210     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1211
1212     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1213
1214     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1215
1216     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1217   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1218   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1219
1220   
1221     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1222
1223     *-convex-bsd* | *-convex-convexos* )
1224     machine=convex opsys=bsd4-3
1225     NON_GNU_CPP="cc -E -P"
1226   ;;
1227
1228     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1229
1230     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1231   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1232   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1233   m88k-dg-dgux*                           ) opsys=dgux     ;;
1234
1235     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1236   m88k-motorola-sysv4* )
1237                     machine=delta88k opsys=usg5-4-2
1238   ;;
1239   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1240
1241     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1242   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1243
1244     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1245
1246     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1247   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1248   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1249
1250       m88k-harris-cxux* )
1251         case "`uname -r`" in
1252        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1253        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1254     esac
1255     NON_GNU_CPP="/lib/cpp"
1256   ;;
1257     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1258     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1259
1260     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1261
1262     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1263
1264     *-hp-hpux* )
1265         case "$canonical" in
1266       m68*  ) machine=hp9000s300 ;;
1267       hppa* ) machine=hp800      ;;
1268     esac
1269
1270     case "$canonical" in
1271       *-hp-hpux7*  )  opsys=hpux   ;;
1272       *-hp-hpux8*  )  opsys=hpux8  ;;
1273       *-hp-hpux9*  )  opsys=hpux9  ;;
1274       *-hp-hpux10* )  opsys=hpux10 ;;
1275       *-hp-hpux11* )  opsys=hpux11 ;;
1276       *            )  opsys=hpux   ;;
1277     esac
1278
1279         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1280    echo "    xemacs will be linked with \"strcat.o\""
1281  fi ;; esac
1282
1283     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1284         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1285     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1286
1287     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1288   ;;
1289
1290     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1291   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1292
1293     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1294   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1295   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1296   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1297   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1298   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1299
1300     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1301   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1302
1303     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1304
1305     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1306
1307     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1308
1309     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1310
1311       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1312
1313     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1314
1315     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1316
1317     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1318
1319     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1320
1321         mips-mips-usg* ) machine=mips4 ;;
1322   mips-mips-riscos4 )
1323     machine=mips4
1324     NON_GNU_CC="cc -systype bsd43"
1325     NON_GNU_CPP="cc -systype bsd43 -E"
1326     case "$canonical" in
1327       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1328       mips-mips-riscos5* ) opsys=riscos5 ;;
1329     esac
1330   ;;
1331   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1332   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1333
1334     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1335
1336     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1337
1338     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1339   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1340
1341     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1342
1343     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1344
1345     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1346
1347     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1348
1349     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1350   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1351
1352     mips-siemens-sysv* | mips-sni-sysv*)
1353     machine=mips-siemens opsys=usg5-4
1354     NON_GNU_CC=/usr/ccs/bin/cc
1355     NON_GNU_CPP=/usr/ccs/lib/cpp
1356   ;;
1357
1358     mips-nec-sysv*)
1359     machine=mips-nec
1360     NON_GNU_CC=/usr/ccs/bin/cc
1361     NON_GNU_CPP=/usr/ccs/lib/cpp
1362   ;;
1363
1364       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1365   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1366     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1367   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1368   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1369   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1370   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1371   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1372   mips-sgi-irix*      ) opsys=irix5-0 ;;
1373
1374     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1375   *-sony-news* ) opsys=newsos5 ;;
1376
1377     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1378
1379     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1380         case "$canonical" in
1381       m68*-sunos1* )             machine=sun1     ;;
1382       m68*-sunos2* )             machine=sun2     ;;
1383       m68* )                     machine=sun3     ;;
1384       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1385       i*86-*-* )                 machine=intel386 ;;
1386       rs6000* )                  machine=rs6000   ;;
1387     esac
1388
1389         case "$canonical" in *-sunos5*)
1390       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1391     esac
1392
1393                     case "$canonical" in
1394       *-sunos4* )
1395         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1396         : ;;
1397       *-solaris2* )
1398         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1399         RANLIB=':' ;;
1400     esac
1401
1402     case "$canonical" in
1403       *-solaris*          )
1404         opsys=sol2
1405         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1406         { test "$extra_verbose" = "yes" && cat << EOF
1407     Defining OS_RELEASE = $os_release
1408 EOF
1409 cat >> confdefs.h <<EOF
1410 #define OS_RELEASE $os_release
1411 EOF
1412 }
1413  ;;
1414
1415             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1416       *-sunos4.0*         ) opsys=sunos4-0      ;;
1417       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1418       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1419       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1420       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1421       *-mach*             ) opsys=mach-bsd4-3   ;;
1422       *                   ) opsys=bsd4-2        ;;
1423     esac
1424
1425     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1426
1427         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1428   ;;
1429
1430     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1431
1432     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1433   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1434
1435     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1436
1437     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1438
1439     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1440       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1441
1442     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1443
1444     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1445
1446     vax-dec-* )
1447     case "$canonical" in
1448       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1449       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1450       *-mach* )                         opsys=mach-bsd4-3 ;;
1451     esac
1452   ;;
1453
1454     ns16k-whitechapel-* ) machine=mg1 ;;
1455
1456     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1457
1458     i[3-9]86-*-* )
1459     machine=intel386
1460     case "$canonical" in
1461       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1462       *-isc2.2* )               opsys=isc2-2 ;;
1463       *-isc4.0* )               opsys=isc4-0 ;;
1464       *-isc4.* )                opsys=isc4-1
1465                                 GCC_TEST_OPTIONS=-posix
1466                                 NON_GCC_TEST_OPTIONS=-Xp
1467                                 ;;
1468       *-isc* )                  opsys=isc3-0 ;;
1469       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1470       *-esix* )                 opsys=esix ;;
1471       *-mach* )                 opsys=mach-bsd4-3 ;;
1472       *-xenix* )                opsys=xenix ;;
1473       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1474       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1475       *-bsdi4* )                opsys=bsdos4 ;;
1476       *-bsdi3* )                opsys=bsdos3 ;;
1477       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1478       *-bsdi2* )                opsys=bsdos2 ;;
1479       *-sco3.2v5* )             opsys=sco5 ;
1480                                                         if test "$dynamic" = "yes" ; then
1481                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1482         else
1483                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1484         fi ;;
1485       *-sysv5* )                opsys=sco7 ;;
1486       *-386bsd* )               opsys=386bsd ;;
1487       *-freebsd* )              opsys=freebsd ;;
1488       *-nextstep* )             opsys=nextstep ;;
1489       *-pc-cygwin* )            opsys=cygwin32 ;;
1490       *-pc-mingw* )             opsys=mingw32 ;
1491                                 test -z "$with_tty" && with_tty="no";;
1492           esac
1493   ;;
1494
1495     m68k-*-linux* ) machine=m68k opsys=linux ;;
1496
1497 esac
1498
1499 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1500 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1501
1502 if test -r "${srcdir}/src/m/${machine}.h"; then
1503   machfile="m/${machine}.h"
1504   { test "$extra_verbose" = "yes" && cat << EOF
1505     Defining config_machfile = "$machfile"
1506 EOF
1507 cat >> confdefs.h <<EOF
1508 #define config_machfile "$machfile"
1509 EOF
1510 }
1511
1512 else
1513   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1514   echo "Using configure-time autodetection only."
1515 fi
1516
1517 if test -r "${srcdir}/src/s/${opsys}.h"; then
1518   opsysfile="s/${opsys}.h"
1519   { test "$extra_verbose" = "yes" && cat << EOF
1520     Defining config_opsysfile = "$opsysfile"
1521 EOF
1522 cat >> confdefs.h <<EOF
1523 #define config_opsysfile "$opsysfile"
1524 EOF
1525 }
1526
1527 else
1528   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1529   echo "Using configure-time autodetection only."
1530 fi
1531
1532
1533 if test -z "$dynamic"; then
1534   case "$opsys" in
1535     hpux* | sunos4* ) dynamic=no ;;
1536     *) dynamic=yes ;;
1537   esac
1538 fi
1539 if test "$dynamic" = "yes"; then
1540   case "$opsys" in
1541     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1542     decosf* ) ld_call_shared="-call_shared" ;;
1543   esac
1544 else   case "$opsys" in
1545     sol2 )
1546       echo "Static linking is not supported on Solaris 2."
1547       echo "Rerun configure without specifying --dynamic=no."
1548       exit 1 ;;
1549     linux   ) ld_call_shared="-Bstatic" ;;
1550     decosf* ) ld_call_shared="-non_shared" ;;
1551   esac
1552 fi
1553
1554 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1555
1556 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1557 { test "$extra_verbose" = "yes" && cat << EOF
1558     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1559 EOF
1560 cat >> confdefs.h <<EOF
1561 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1562 EOF
1563 }
1564
1565
1566
1567 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1568 if test "$with_workshop $with_tooltalk" = "yes no"; then
1569   (echo "$progname: Usage error:"
1570 echo " " "--with-workshop requires --with-tooltalk"
1571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1572 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1573 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1574 fi
1575
1576 if test "$with_workshop" = "yes"; then
1577   { test "$extra_verbose" = "yes" && cat << \EOF
1578     Defining SUNPRO
1579 EOF
1580 cat >> confdefs.h <<\EOF
1581 #define SUNPRO 1
1582 EOF
1583 }
1584
1585   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1586    echo "    xemacs will be linked with \"sunpro.o\""
1587  fi
1588 fi
1589
1590 if test "$with_clash_detection" != "no"; then
1591   { test "$extra_verbose" = "yes" && cat << \EOF
1592     Defining CLASH_DETECTION
1593 EOF
1594 cat >> confdefs.h <<\EOF
1595 #define CLASH_DETECTION 1
1596 EOF
1597 }
1598
1599   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1600    echo "    xemacs will be linked with \"filelock.o\""
1601  fi
1602 fi
1603
1604 test -n "$compiler" && CC="$compiler"
1605 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1606 fi
1607
1608 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1609 if test "${CFLAGS-unset}" != unset
1610   then cflags_specified=yes;
1611   else cflags_specified=no;
1612 fi
1613
1614 xe_save_CFLAGS="$CFLAGS"
1615
1616 # Extract the first word of "gcc", so it can be a program name with args.
1617 set dummy gcc; ac_word=$2
1618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1619 echo "configure:1620: checking for $ac_word" >&5
1620
1621 if test -n "$CC"; then
1622   ac_cv_prog_CC="$CC" # Let the user override the test.
1623 else
1624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1625   ac_dummy="$PATH"
1626   for ac_dir in $ac_dummy; do
1627     test -z "$ac_dir" && ac_dir=.
1628     if test -f $ac_dir/$ac_word; then
1629       ac_cv_prog_CC="gcc"
1630       break
1631     fi
1632   done
1633   IFS="$ac_save_ifs"
1634 fi
1635 CC="$ac_cv_prog_CC"
1636 if test -n "$CC"; then
1637   echo "$ac_t""$CC" 1>&6
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641
1642 if test -z "$CC"; then
1643   # Extract the first word of "cc", so it can be a program name with args.
1644 set dummy cc; ac_word=$2
1645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1646 echo "configure:1647: checking for $ac_word" >&5
1647
1648 if test -n "$CC"; then
1649   ac_cv_prog_CC="$CC" # Let the user override the test.
1650 else
1651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1652   ac_prog_rejected=no
1653   ac_dummy="$PATH"
1654   for ac_dir in $ac_dummy; do
1655     test -z "$ac_dir" && ac_dir=.
1656     if test -f $ac_dir/$ac_word; then
1657       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1658         ac_prog_rejected=yes
1659         continue
1660       fi
1661       ac_cv_prog_CC="cc"
1662       break
1663     fi
1664   done
1665   IFS="$ac_save_ifs"
1666 if test $ac_prog_rejected = yes; then
1667   # We found a bogon in the path, so make sure we never use it.
1668   set dummy $ac_cv_prog_CC
1669   shift
1670   if test $# -gt 0; then
1671     # We chose a different compiler from the bogus one.
1672     # However, it has the same basename, so the bogon will be chosen
1673     # first if we set CC to just the basename; use the full file name.
1674     shift
1675     set dummy "$ac_dir/$ac_word" "$@"
1676     shift
1677     ac_cv_prog_CC="$@"
1678   fi
1679 fi
1680 fi
1681 CC="$ac_cv_prog_CC"
1682 if test -n "$CC"; then
1683   echo "$ac_t""$CC" 1>&6
1684 else
1685   echo "$ac_t""no" 1>&6
1686 fi
1687
1688   if test -z "$CC"; then
1689     case "`uname -s`" in
1690     *win32* | *WIN32*)
1691       # Extract the first word of "cl", so it can be a program name with args.
1692 set dummy cl; ac_word=$2
1693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1694 echo "configure:1695: checking for $ac_word" >&5
1695
1696 if test -n "$CC"; then
1697   ac_cv_prog_CC="$CC" # Let the user override the test.
1698 else
1699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1700   ac_dummy="$PATH"
1701   for ac_dir in $ac_dummy; do
1702     test -z "$ac_dir" && ac_dir=.
1703     if test -f $ac_dir/$ac_word; then
1704       ac_cv_prog_CC="cl"
1705       break
1706     fi
1707   done
1708   IFS="$ac_save_ifs"
1709 fi
1710 CC="$ac_cv_prog_CC"
1711 if test -n "$CC"; then
1712   echo "$ac_t""$CC" 1>&6
1713 else
1714   echo "$ac_t""no" 1>&6
1715 fi
1716  ;;
1717     esac
1718   fi
1719   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1720 fi
1721
1722 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1723 echo "configure:1724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1724
1725 ac_ext=c
1726 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1727 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1728 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1729 ac_cpp='$CPP '"$xe_cppflags"
1730 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1731 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1732 cross_compiling=no
1733
1734 cat > conftest.$ac_ext << EOF
1735
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738
1739 main(){return(0);}
1740 EOF
1741 if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742   ac_cv_prog_cc_works=yes
1743   # If we can't run a trivial program, we are probably using a cross compiler.
1744   if (./conftest; exit) 2>/dev/null; then
1745     ac_cv_prog_cc_cross=no
1746   else
1747     ac_cv_prog_cc_cross=yes
1748   fi
1749 else
1750   echo "configure: failed program was:" >&5
1751   cat conftest.$ac_ext >&5
1752   ac_cv_prog_cc_works=no
1753 fi
1754 rm -fr conftest*
1755 ac_ext=c
1756 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1757 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1758 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1759 ac_cpp='$CPP '"$xe_cppflags"
1760 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1761 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1762 cross_compiling=no
1763
1764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1765 if test $ac_cv_prog_cc_works = no; then
1766   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1767 fi
1768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1769 echo "configure:1770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1771 cross_compiling=$ac_cv_prog_cc_cross
1772
1773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1774 echo "configure:1775: checking whether we are using GNU C" >&5
1775
1776 cat > conftest.c <<EOF
1777 #ifdef __GNUC__
1778   yes;
1779 #endif
1780 EOF
1781 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1782   ac_cv_prog_gcc=yes
1783 else
1784   ac_cv_prog_gcc=no
1785 fi
1786
1787 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1788
1789 if test $ac_cv_prog_gcc = yes; then
1790   GCC=yes
1791 else
1792   GCC=
1793 fi
1794
1795 ac_test_CFLAGS="${CFLAGS+set}"
1796 ac_save_CFLAGS="$CFLAGS"
1797 CFLAGS=
1798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1799 echo "configure:1800: checking whether ${CC-cc} accepts -g" >&5
1800
1801 echo 'void f(){}' > conftest.c
1802 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1803   ac_cv_prog_cc_g=yes
1804 else
1805   ac_cv_prog_cc_g=no
1806 fi
1807 rm -f conftest*
1808
1809
1810 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1811 if test "$ac_test_CFLAGS" = set; then
1812   CFLAGS="$ac_save_CFLAGS"
1813 elif test $ac_cv_prog_cc_g = yes; then
1814   if test "$GCC" = yes; then
1815     CFLAGS="-g -O2"
1816   else
1817     CFLAGS="-g"
1818   fi
1819 else
1820   if test "$GCC" = yes; then
1821     CFLAGS="-O2"
1822   else
1823     CFLAGS=
1824   fi
1825 fi
1826  
1827 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1828   CC=${NON_GNU_CC-cc}
1829   # Extract the first word of "gcc", so it can be a program name with args.
1830 set dummy gcc; ac_word=$2
1831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1832 echo "configure:1833: checking for $ac_word" >&5
1833
1834 if test -n "$CC"; then
1835   ac_cv_prog_CC="$CC" # Let the user override the test.
1836 else
1837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1838   ac_dummy="$PATH"
1839   for ac_dir in $ac_dummy; do
1840     test -z "$ac_dir" && ac_dir=.
1841     if test -f $ac_dir/$ac_word; then
1842       ac_cv_prog_CC="gcc"
1843       break
1844     fi
1845   done
1846   IFS="$ac_save_ifs"
1847 fi
1848 CC="$ac_cv_prog_CC"
1849 if test -n "$CC"; then
1850   echo "$ac_t""$CC" 1>&6
1851 else
1852   echo "$ac_t""no" 1>&6
1853 fi
1854
1855 if test -z "$CC"; then
1856   # Extract the first word of "cc", so it can be a program name with args.
1857 set dummy cc; ac_word=$2
1858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1859 echo "configure:1860: checking for $ac_word" >&5
1860
1861 if test -n "$CC"; then
1862   ac_cv_prog_CC="$CC" # Let the user override the test.
1863 else
1864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1865   ac_prog_rejected=no
1866   ac_dummy="$PATH"
1867   for ac_dir in $ac_dummy; do
1868     test -z "$ac_dir" && ac_dir=.
1869     if test -f $ac_dir/$ac_word; then
1870       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1871         ac_prog_rejected=yes
1872         continue
1873       fi
1874       ac_cv_prog_CC="cc"
1875       break
1876     fi
1877   done
1878   IFS="$ac_save_ifs"
1879 if test $ac_prog_rejected = yes; then
1880   # We found a bogon in the path, so make sure we never use it.
1881   set dummy $ac_cv_prog_CC
1882   shift
1883   if test $# -gt 0; then
1884     # We chose a different compiler from the bogus one.
1885     # However, it has the same basename, so the bogon will be chosen
1886     # first if we set CC to just the basename; use the full file name.
1887     shift
1888     set dummy "$ac_dir/$ac_word" "$@"
1889     shift
1890     ac_cv_prog_CC="$@"
1891   fi
1892 fi
1893 fi
1894 CC="$ac_cv_prog_CC"
1895 if test -n "$CC"; then
1896   echo "$ac_t""$CC" 1>&6
1897 else
1898   echo "$ac_t""no" 1>&6
1899 fi
1900
1901   if test -z "$CC"; then
1902     case "`uname -s`" in
1903     *win32* | *WIN32*)
1904       # Extract the first word of "cl", so it can be a program name with args.
1905 set dummy cl; ac_word=$2
1906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_word" >&5
1908
1909 if test -n "$CC"; then
1910   ac_cv_prog_CC="$CC" # Let the user override the test.
1911 else
1912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1913   ac_dummy="$PATH"
1914   for ac_dir in $ac_dummy; do
1915     test -z "$ac_dir" && ac_dir=.
1916     if test -f $ac_dir/$ac_word; then
1917       ac_cv_prog_CC="cl"
1918       break
1919     fi
1920   done
1921   IFS="$ac_save_ifs"
1922 fi
1923 CC="$ac_cv_prog_CC"
1924 if test -n "$CC"; then
1925   echo "$ac_t""$CC" 1>&6
1926 else
1927   echo "$ac_t""no" 1>&6
1928 fi
1929  ;;
1930     esac
1931   fi
1932   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1933 fi
1934
1935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1936 echo "configure:1937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1937
1938 ac_ext=c
1939 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1940 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1941 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1942 ac_cpp='$CPP '"$xe_cppflags"
1943 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1944 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1945 cross_compiling=no
1946
1947 cat > conftest.$ac_ext << EOF
1948
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951
1952 main(){return(0);}
1953 EOF
1954 if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1955   ac_cv_prog_cc_works=yes
1956   # If we can't run a trivial program, we are probably using a cross compiler.
1957   if (./conftest; exit) 2>/dev/null; then
1958     ac_cv_prog_cc_cross=no
1959   else
1960     ac_cv_prog_cc_cross=yes
1961   fi
1962 else
1963   echo "configure: failed program was:" >&5
1964   cat conftest.$ac_ext >&5
1965   ac_cv_prog_cc_works=no
1966 fi
1967 rm -fr conftest*
1968 ac_ext=c
1969 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1970 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1971 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1972 ac_cpp='$CPP '"$xe_cppflags"
1973 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1974 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1975 cross_compiling=no
1976
1977 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1978 if test $ac_cv_prog_cc_works = no; then
1979   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1980 fi
1981 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1982 echo "configure:1983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1983 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1984 cross_compiling=$ac_cv_prog_cc_cross
1985
1986 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1987 echo "configure:1988: checking whether we are using GNU C" >&5
1988
1989 cat > conftest.c <<EOF
1990 #ifdef __GNUC__
1991   yes;
1992 #endif
1993 EOF
1994 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1995   ac_cv_prog_gcc=yes
1996 else
1997   ac_cv_prog_gcc=no
1998 fi
1999
2000 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2001
2002 if test $ac_cv_prog_gcc = yes; then
2003   GCC=yes
2004 else
2005   GCC=
2006 fi
2007
2008 ac_test_CFLAGS="${CFLAGS+set}"
2009 ac_save_CFLAGS="$CFLAGS"
2010 CFLAGS=
2011 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2012 echo "configure:2013: checking whether ${CC-cc} accepts -g" >&5
2013
2014 echo 'void f(){}' > conftest.c
2015 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2016   ac_cv_prog_cc_g=yes
2017 else
2018   ac_cv_prog_cc_g=no
2019 fi
2020 rm -f conftest*
2021
2022
2023 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2024 if test "$ac_test_CFLAGS" = set; then
2025   CFLAGS="$ac_save_CFLAGS"
2026 elif test $ac_cv_prog_cc_g = yes; then
2027   if test "$GCC" = yes; then
2028     CFLAGS="-g -O2"
2029   else
2030     CFLAGS="-g"
2031   fi
2032 else
2033   if test "$GCC" = yes; then
2034     CFLAGS="-O2"
2035   else
2036     CFLAGS=
2037   fi
2038 fi
2039
2040 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2041   CC=gcc
2042   # Extract the first word of "gcc", so it can be a program name with args.
2043 set dummy gcc; ac_word=$2
2044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2045 echo "configure:2046: checking for $ac_word" >&5
2046
2047 if test -n "$CC"; then
2048   ac_cv_prog_CC="$CC" # Let the user override the test.
2049 else
2050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2051   ac_dummy="$PATH"
2052   for ac_dir in $ac_dummy; do
2053     test -z "$ac_dir" && ac_dir=.
2054     if test -f $ac_dir/$ac_word; then
2055       ac_cv_prog_CC="gcc"
2056       break
2057     fi
2058   done
2059   IFS="$ac_save_ifs"
2060 fi
2061 CC="$ac_cv_prog_CC"
2062 if test -n "$CC"; then
2063   echo "$ac_t""$CC" 1>&6
2064 else
2065   echo "$ac_t""no" 1>&6
2066 fi
2067
2068 if test -z "$CC"; then
2069   # Extract the first word of "cc", so it can be a program name with args.
2070 set dummy cc; ac_word=$2
2071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2072 echo "configure:2073: checking for $ac_word" >&5
2073
2074 if test -n "$CC"; then
2075   ac_cv_prog_CC="$CC" # Let the user override the test.
2076 else
2077   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2078   ac_prog_rejected=no
2079   ac_dummy="$PATH"
2080   for ac_dir in $ac_dummy; do
2081     test -z "$ac_dir" && ac_dir=.
2082     if test -f $ac_dir/$ac_word; then
2083       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2084         ac_prog_rejected=yes
2085         continue
2086       fi
2087       ac_cv_prog_CC="cc"
2088       break
2089     fi
2090   done
2091   IFS="$ac_save_ifs"
2092 if test $ac_prog_rejected = yes; then
2093   # We found a bogon in the path, so make sure we never use it.
2094   set dummy $ac_cv_prog_CC
2095   shift
2096   if test $# -gt 0; then
2097     # We chose a different compiler from the bogus one.
2098     # However, it has the same basename, so the bogon will be chosen
2099     # first if we set CC to just the basename; use the full file name.
2100     shift
2101     set dummy "$ac_dir/$ac_word" "$@"
2102     shift
2103     ac_cv_prog_CC="$@"
2104   fi
2105 fi
2106 fi
2107 CC="$ac_cv_prog_CC"
2108 if test -n "$CC"; then
2109   echo "$ac_t""$CC" 1>&6
2110 else
2111   echo "$ac_t""no" 1>&6
2112 fi
2113
2114   if test -z "$CC"; then
2115     case "`uname -s`" in
2116     *win32* | *WIN32*)
2117       # Extract the first word of "cl", so it can be a program name with args.
2118 set dummy cl; ac_word=$2
2119 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2120 echo "configure:2121: checking for $ac_word" >&5
2121
2122 if test -n "$CC"; then
2123   ac_cv_prog_CC="$CC" # Let the user override the test.
2124 else
2125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2126   ac_dummy="$PATH"
2127   for ac_dir in $ac_dummy; do
2128     test -z "$ac_dir" && ac_dir=.
2129     if test -f $ac_dir/$ac_word; then
2130       ac_cv_prog_CC="cl"
2131       break
2132     fi
2133   done
2134   IFS="$ac_save_ifs"
2135 fi
2136 CC="$ac_cv_prog_CC"
2137 if test -n "$CC"; then
2138   echo "$ac_t""$CC" 1>&6
2139 else
2140   echo "$ac_t""no" 1>&6
2141 fi
2142  ;;
2143     esac
2144   fi
2145   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2146 fi
2147
2148 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2149 echo "configure:2150: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2150
2151 ac_ext=c
2152 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2153 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2154 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2155 ac_cpp='$CPP '"$xe_cppflags"
2156 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2157 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2158 cross_compiling=no
2159
2160 cat > conftest.$ac_ext << EOF
2161
2162 #line 2163 "configure"
2163 #include "confdefs.h"
2164
2165 main(){return(0);}
2166 EOF
2167 if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2168   ac_cv_prog_cc_works=yes
2169   # If we can't run a trivial program, we are probably using a cross compiler.
2170   if (./conftest; exit) 2>/dev/null; then
2171     ac_cv_prog_cc_cross=no
2172   else
2173     ac_cv_prog_cc_cross=yes
2174   fi
2175 else
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   ac_cv_prog_cc_works=no
2179 fi
2180 rm -fr conftest*
2181 ac_ext=c
2182 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2183 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2184 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2185 ac_cpp='$CPP '"$xe_cppflags"
2186 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2187 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2188 cross_compiling=no
2189
2190 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2191 if test $ac_cv_prog_cc_works = no; then
2192   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2193 fi
2194 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2195 echo "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2196 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2197 cross_compiling=$ac_cv_prog_cc_cross
2198
2199 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2200 echo "configure:2201: checking whether we are using GNU C" >&5
2201
2202 cat > conftest.c <<EOF
2203 #ifdef __GNUC__
2204   yes;
2205 #endif
2206 EOF
2207 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2208   ac_cv_prog_gcc=yes
2209 else
2210   ac_cv_prog_gcc=no
2211 fi
2212
2213 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2214
2215 if test $ac_cv_prog_gcc = yes; then
2216   GCC=yes
2217 else
2218   GCC=
2219 fi
2220
2221 ac_test_CFLAGS="${CFLAGS+set}"
2222 ac_save_CFLAGS="$CFLAGS"
2223 CFLAGS=
2224 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2225 echo "configure:2226: checking whether ${CC-cc} accepts -g" >&5
2226
2227 echo 'void f(){}' > conftest.c
2228 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2229   ac_cv_prog_cc_g=yes
2230 else
2231   ac_cv_prog_cc_g=no
2232 fi
2233 rm -f conftest*
2234
2235
2236 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2237 if test "$ac_test_CFLAGS" = set; then
2238   CFLAGS="$ac_save_CFLAGS"
2239 elif test $ac_cv_prog_cc_g = yes; then
2240   if test "$GCC" = yes; then
2241     CFLAGS="-g -O2"
2242   else
2243     CFLAGS="-g"
2244   fi
2245 else
2246   if test "$GCC" = yes; then
2247     CFLAGS="-O2"
2248   else
2249     CFLAGS=
2250   fi
2251 fi
2252
2253 fi
2254 CFLAGS="$xe_save_CFLAGS"
2255
2256
2257 test -n "$CPP" -a -d "$CPP" && CPP=
2258
2259 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2260
2261 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2262 echo "configure:2263: checking how to run the C preprocessor" >&5
2263 # On Suns, sometimes $CPP names a directory.
2264 if test -n "$CPP" && test -d "$CPP"; then
2265   CPP=
2266 fi
2267 if test -z "$CPP"; then
2268
2269   # This must be in double quotes, not single quotes, because CPP may get
2270   # substituted into the Makefile and "${CC-cc}" will confuse make.
2271   CPP="${CC-cc} -E"
2272   # On the NeXT, cc -E runs the code through the compiler's parser,
2273   # not just through cpp.
2274   cat > conftest.$ac_ext <<EOF
2275 #line 2276 "configure"
2276 #include "confdefs.h"
2277 #include <assert.h>
2278 Syntax Error
2279 EOF
2280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2281 { (eval echo configure:2282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2283 if test -z "$ac_err"; then
2284   :
2285 else
2286   echo "$ac_err" >&5
2287   echo "configure: failed program was:" >&5
2288   cat conftest.$ac_ext >&5
2289   rm -rf conftest*
2290   CPP="${CC-cc} -E -traditional-cpp"
2291   cat > conftest.$ac_ext <<EOF
2292 #line 2293 "configure"
2293 #include "confdefs.h"
2294 #include <assert.h>
2295 Syntax Error
2296 EOF
2297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2298 { (eval echo configure:2299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2300 if test -z "$ac_err"; then
2301   :
2302 else
2303   echo "$ac_err" >&5
2304   echo "configure: failed program was:" >&5
2305   cat conftest.$ac_ext >&5
2306   rm -rf conftest*
2307   CPP="${CC-cc} -nologo -E"
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <assert.h>
2312 Syntax Error
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   :
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   CPP=/lib/cpp
2325 fi
2326 rm -f conftest*
2327 fi
2328 rm -f conftest*
2329 fi
2330 rm -f conftest*
2331   ac_cv_prog_CPP="$CPP"
2332   CPP="$ac_cv_prog_CPP"
2333 else
2334   ac_cv_prog_CPP="$CPP"
2335 fi
2336 echo "$ac_t""$CPP" 1>&6
2337
2338
2339
2340 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2341 echo "configure:2342: checking for AIX" >&5
2342 cat > conftest.$ac_ext <<EOF
2343 #line 2344 "configure"
2344 #include "confdefs.h"
2345 #ifdef _AIX
2346   yes
2347 #endif
2348
2349 EOF
2350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351   egrep "yes" >/dev/null 2>&1; then
2352   rm -rf conftest*
2353   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2354     Defining _ALL_SOURCE
2355 EOF
2356 cat >> confdefs.h <<\EOF
2357 #define _ALL_SOURCE 1
2358 EOF
2359 }
2360
2361 else
2362   rm -rf conftest*
2363   echo "$ac_t""no" 1>&6
2364 fi
2365 rm -f conftest*
2366
2367  
2368
2369 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2370 echo "configure:2371: checking for GNU libc" >&5
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2373 "configure"
2373 #include "confdefs.h"
2374 #include <features.h>
2375 int main() {
2376
2377 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2378 #error Not a GNU libc system :-(
2379 ******* ======= ******** &&&&&&&&
2380 #endif
2381
2382 ; return 0; }
2383 EOF
2384 if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2385   rm -rf conftest*
2386   have_glibc=yes
2387 else
2388   echo "configure: failed program was:" >&5
2389   cat conftest.$ac_ext >&5
2390   rm -rf conftest*
2391   have_glibc=no
2392 fi
2393 rm -f conftest*
2394 echo "$ac_t""$have_glibc" 1>&6
2395 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2396     Defining _GNU_SOURCE
2397 EOF
2398 cat >> confdefs.h <<\EOF
2399 #define _GNU_SOURCE 1
2400 EOF
2401 }
2402
2403
2404 case "$opsys" in
2405   sol2)
2406    { test "$extra_verbose" = "yes" && cat << \EOF
2407     Defining __EXTENSIONS__
2408 EOF
2409 cat >> confdefs.h <<\EOF
2410 #define __EXTENSIONS__ 1
2411 EOF
2412 }
2413
2414       if test "$os_release" -ge 55; then
2415      { test "$extra_verbose" = "yes" && cat << \EOF
2416     Defining _XOPEN_SOURCE = 500
2417 EOF
2418 cat >> confdefs.h <<\EOF
2419 #define _XOPEN_SOURCE 500
2420 EOF
2421 }
2422
2423      { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining _XOPEN_SOURCE_EXTENDED
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define _XOPEN_SOURCE_EXTENDED 1
2428 EOF
2429 }
2430
2431    fi ;;
2432   linux)
2433     { test "$extra_verbose" = "yes" && cat << \EOF
2434     Defining _POSIX_C_SOURCE = 199506L
2435 EOF
2436 cat >> confdefs.h <<\EOF
2437 #define _POSIX_C_SOURCE 199506L
2438 EOF
2439 }
2440
2441     { test "$extra_verbose" = "yes" && cat << \EOF
2442     Defining _XOPEN_SOURCE = 500
2443 EOF
2444 cat >> confdefs.h <<\EOF
2445 #define _XOPEN_SOURCE 500
2446 EOF
2447 }
2448
2449     { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE_EXTENDED
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE_EXTENDED 1
2454 EOF
2455 }
2456
2457     ;;
2458 esac
2459
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463 int main () {
2464 #if defined __SUNPRO_C
2465 return 11;
2466 #elif defined __DECC
2467 return 12;
2468 #elif defined __USLC__ && defined __SCO_VERSION__
2469 return 13;
2470 #else
2471 return 0;
2472 #endif
2473 }
2474 EOF
2475 if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2476 then
2477   :
2478 else
2479   conftest_rc="$?"
2480   echo "configure: failed program was:" >&5
2481   cat conftest.$ac_ext >&5
2482   rm -fr conftest*
2483   case "$conftest_rc" in
2484   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2485   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2486   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2487 esac
2488 fi
2489 rm -fr conftest*
2490
2491
2492
2493
2494 echo "Extracting information from the machine- and system-dependent headers..."
2495
2496 tempcname="conftest.c"
2497
2498
2499
2500 cat > $tempcname < confdefs.h
2501 cat >> $tempcname <<EOF
2502 #define NOT_C_CODE
2503 #define C_SWITCH_SITE
2504 #define C_SWITCH_X_SITE
2505 #define LD_SWITCH_SITE
2506 #define LD_SWITCH_X_SITE
2507 #define LD_SWITCH_X_SITE_AUX
2508 #define OS_RELEASE $os_release
2509
2510 #ifdef config_opsysfile
2511 #include "$srcdir/src/$opsysfile"
2512 #endif
2513
2514 #ifdef config_machfile
2515 #include "$srcdir/src/$machfile"
2516 #endif
2517
2518 #ifndef LIBS_MACHINE
2519 #define LIBS_MACHINE
2520 #endif
2521 configure___ libs_machine=LIBS_MACHINE
2522
2523 #ifndef LIBS_SYSTEM
2524 #define LIBS_SYSTEM
2525 #endif
2526 configure___ libs_system=LIBS_SYSTEM
2527
2528 #ifndef LIBS_TERMCAP
2529 #define LIBS_TERMCAP
2530 #endif
2531 configure___ libs_termcap=LIBS_TERMCAP
2532
2533 #ifndef LIB_STANDARD
2534 #define LIB_STANDARD
2535 #endif
2536 configure___ libs_standard=LIB_STANDARD
2537
2538
2539 #ifndef OBJECTS_MACHINE
2540 #define OBJECTS_MACHINE
2541 #endif
2542 configure___ objects_machine=OBJECTS_MACHINE
2543
2544 #ifndef OBJECTS_SYSTEM
2545 #define OBJECTS_SYSTEM
2546 #endif
2547 configure___ objects_system=OBJECTS_SYSTEM
2548
2549
2550 #ifndef C_SWITCH_MACHINE
2551 #define C_SWITCH_MACHINE
2552 #endif
2553 configure___ c_switch_machine=C_SWITCH_MACHINE
2554
2555 #ifndef C_SWITCH_SYSTEM
2556 #define C_SWITCH_SYSTEM
2557 #endif
2558 configure___ c_switch_system=C_SWITCH_SYSTEM
2559
2560
2561 #ifndef LD_SWITCH_MACHINE
2562 #define LD_SWITCH_MACHINE
2563 #endif
2564 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2565
2566 #ifndef LD_SWITCH_SYSTEM
2567 #define LD_SWITCH_SYSTEM
2568 #endif
2569 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2570
2571
2572 #ifndef UNEXEC
2573 #define UNEXEC "unexec.o"
2574 #endif
2575 configure___ unexec=UNEXEC
2576
2577
2578 #ifndef LD_SWITCH_SHARED
2579 #define LD_SWITCH_SHARED "-c"
2580 #endif
2581 configure___ ld_switch_shared=LD_SWITCH_SHARED
2582
2583
2584 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2585 configure___ ordinary_ld=ORDINARY_LD
2586
2587 #ifdef ORDINARY_LINK
2588 #define LD ORDINARY_LD
2589 #else /* no ORDINARY LINK */
2590 #ifdef COFF_ENCAPSULATE
2591 #define LD "\$(CC) -nostdlib"
2592 #else /* not COFF_ENCAPSULATE */
2593 #ifdef LINKER
2594 #define LD LINKER
2595 #else /* ! defined (LINKER) */
2596 #define LD "ld"
2597 #endif /* ! defined (LINKER) */
2598 #endif /* ! defined (COFF_ENCAPSULATE) */
2599 #endif /* not ORDINARY_LINK */
2600 configure___ ld=LD
2601
2602 #ifndef LIB_GCC
2603 #define LIB_GCC
2604 #endif
2605 configure___ lib_gcc=LIB_GCC
2606
2607 #ifndef LD_TEXT_START_ADDR
2608 #define LD_TEXT_START_ADDR
2609 #endif
2610 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2611
2612
2613 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2614 #ifdef NO_REMAP
2615 #ifdef COFF_ENCAPSULATE
2616 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2617 #else /* ! defined (COFF_ENCAPSULATE) */
2618 #define START_FILES "pre-crt0.o /lib/crt0.o"
2619 #endif /* ! defined (COFF_ENCAPSULATE) */
2620 #else /* ! defined (NO_REMAP) */
2621 #define START_FILES "ecrt0.o"
2622 #endif /* ! defined (NO_REMAP) */
2623 #endif /* no ORDINARY_LINK */
2624 #ifndef START_FILES
2625 #define START_FILES
2626 #endif
2627 configure___ start_files=START_FILES
2628
2629 #ifdef ORDINARY_LINK
2630 configure___ ordinary_link=yes
2631 #else
2632 configure___ ordinary_link=no
2633 #endif
2634
2635 #ifdef SYSTEM_MALLOC
2636 configure___ system_malloc=yes
2637 #else
2638 configure___ system_malloc=no
2639 #endif
2640
2641 #ifdef TERMINFO
2642 configure___ have_terminfo=yes
2643 #else
2644 configure___ have_terminfo=no
2645 #endif
2646
2647 #ifdef MAIL_USE_FLOCK
2648 configure___ mail_use_flock=yes
2649 #else
2650 configure___ mail_use_flock=no
2651 #endif
2652
2653 #ifdef MAIL_USE_LOCKF
2654 configure___ mail_use_lockf=yes
2655 #else
2656 configure___ mail_use_lockf=no
2657 #endif
2658
2659 #ifdef MAIL_USE_LOCKING
2660 configure___ mail_use_locking=yes
2661 #else
2662 configure___ mail_use_locking=no
2663 #endif
2664
2665 #ifdef HAVE_WIN32_PROCESSES
2666 configure___ win32_processes=yes
2667 #else
2668 configure___ win32_processes=no
2669 #endif
2670
2671 EOF
2672
2673 CPP=`eval "echo $CPP $CPPFLAGS"`
2674 eval `$CPP -Isrc $tempcname \
2675         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2676
2677 rm $tempcname
2678
2679 if test "$pdump" = "yes"; then
2680   ordinary_link="yes"
2681   ld="${ordinary_ld}"
2682   start_files=
2683   libs_standard=
2684   unexec=
2685   lib_gcc=
2686 fi
2687
2688 test "$extra_verbose" = "yes" && \
2689   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 ""
2690
2691 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2692         mingw_include=`eval "dirname $mingw_include"` ;
2693         mingw_include="-I$mingw_include/../include/mingw32" ;
2694         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2695 esac
2696
2697 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2698
2699
2700 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2701
2702 if test "$__USLC__" = yes; then
2703   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2704 echo "configure:2705: checking for whether the -Kalloca compiler flag is needed" >&5
2705   need_kalloca=no
2706   cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709
2710 int main() {
2711 void *x = alloca(4);
2712 ; return 0; }
2713 EOF
2714 if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2715   rm -rf conftest*
2716   :
2717 else
2718   echo "configure: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   rm -rf conftest*
2721   
2722     xe_save_c_switch_system="$c_switch_system"
2723     c_switch_system="$c_switch_system -Kalloca"
2724     cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727
2728 int main() {
2729 void *x = alloca(4);
2730 ; return 0; }
2731 EOF
2732 if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733   rm -rf conftest*
2734    need_kalloca=yes 
2735 else
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738 fi
2739 rm -f conftest*
2740     c_switch_system="$xe_save_c_switch_system"
2741 fi
2742 rm -f conftest*
2743   echo "$ac_t""$need_kalloca" 1>&6
2744   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2745 fi
2746
2747 if test "$cflags_specified" = "no"; then
2748       if   test "$GCC" = "yes"; then
2749     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2750               elif test "$__SUNPRO_C" = "yes"; then
2751     case "$opsys" in
2752       sol2    ) CFLAGS="-v -xO4" ;;
2753       sunos4* ) CFLAGS="-xO2";;
2754     esac
2755   elif test "$__DECC" = "yes"; then
2756     CFLAGS="-O3"
2757   elif test "$CC" = "xlc"; then
2758     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2759     else
2760     CFLAGS="-O" ;  fi
2761 fi
2762
2763 if test "$GCC" = "yes"; then
2764 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2765 echo "configure:2766: checking for buggy gcc versions" >&5
2766 GCC_VERSION=`$CC --version`
2767 case `uname -s`:`uname -m`:$GCC_VERSION in
2768                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2769                         case "$CFLAGS" in
2770             *-O2*|*-O3*)
2771                 case "$CFLAGS" in
2772                     *-fno-schedule-insns*) ;;
2773                     *)
2774                         echo "$ac_t""yes" 1>&6
2775                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2776                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2777                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2778                         ;;
2779                 esac
2780                 ;;
2781         esac
2782         ;;
2783                     Linux:alpha:egcs-2.91.*)
2784         echo "$ac_t""yes" 1>&6
2785         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2786         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2787         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2788         ;;
2789     *:i*86*:2.7.2*)
2790         case "$GCC_VERSION" in
2791             2.7.2)
2792                 case "$CFLAGS" in
2793                     *-O2*|*-O3*)
2794                         case "$CFLAGS" in
2795                             *-fno-strength-reduce*) ;;
2796                             *)
2797                                 echo "$ac_t""yes" 1>&6
2798                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2799                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2800                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2801                                 ;;
2802                         esac
2803                         ;;
2804                 esac
2805                 ;;
2806         esac
2807         case "$CFLAGS" in
2808          *-fno-caller-saves*) ;;
2809          *)
2810             echo "$ac_t""yes" 1>&6
2811             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2812             echo "configure: warning: -fno-caller-saves." 1>&2
2813             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2814             ;;
2815         esac
2816         ;;
2817 esac
2818 echo "$ac_t""no" 1>&6
2819 fi
2820
2821
2822 if test "$GCC" = "yes"; then
2823   set x $ld_switch_system; shift; ld_switch_system=""
2824   while test -n "$1"; do
2825     case $1 in
2826       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2827       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2828       -Xlinker* ) ;;
2829       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2830     esac
2831     shift
2832   done
2833 fi
2834
2835 if test "$GCC" = "yes"; then
2836   set x $ld_switch_machine; shift; ld_switch_machine=""
2837   while test -n "$1"; do
2838     case $1 in
2839       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2840       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2841       -Xlinker* ) ;;
2842       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2843     esac
2844     shift
2845   done
2846 fi
2847
2848 if test "$GCC" = "yes"; then
2849   set x $LDFLAGS; shift; LDFLAGS=""
2850   while test -n "$1"; do
2851     case $1 in
2852       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2853       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2854       -Xlinker* ) ;;
2855       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2856     esac
2857     shift
2858   done
2859 fi
2860
2861 if test "$GCC" = "yes"; then
2862   set x $ld_call_shared; shift; ld_call_shared=""
2863   while test -n "$1"; do
2864     case $1 in
2865       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2866       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2867       -Xlinker* ) ;;
2868       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2869     esac
2870     shift
2871   done
2872 fi
2873
2874 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2875    echo "    xemacs will be linked with \"$objects_machine\""
2876  fi
2877 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2878    echo "    xemacs will be linked with \"$objects_system\""
2879  fi
2880 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2881    echo "    xemacs will be linked with \"$unexec\""
2882  fi
2883 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2884    echo "    xemacs will be linked with \"dumper.o\""
2885  fi
2886
2887 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2888 echo "configure:2889: checking for dynodump" >&5
2889 if test "$unexec" != "unexsol2.o"; then
2890   echo "$ac_t""no" 1>&6
2891 else
2892   echo "$ac_t""yes" 1>&6
2893   { test "$extra_verbose" = "yes" && cat << \EOF
2894     Defining DYNODUMP
2895 EOF
2896 cat >> confdefs.h <<\EOF
2897 #define DYNODUMP 1
2898 EOF
2899 }
2900
2901   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2902   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2903   case "$machine" in
2904     sparc   ) dynodump_arch=sparc ;;
2905     *86*    ) dynodump_arch=i386  ;;
2906     powerpc ) dynodump_arch=ppc   ;;
2907   esac
2908     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
2909 fi
2910
2911
2912 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2913
2914 if test "$unexec" = "unexaix.o"; then
2915   if   test "$dynamic" = "no"; then
2916   start_flags="-Wl,-bnso,-bnodelcsect"
2917   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2918   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2919     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2920   done
2921   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2922     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2923   done
2924   
2925 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2926 echo "configure:2927: checking for terminateAndUnload in -lC" >&5
2927 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2928
2929 xe_check_libs=" -lC "
2930 cat > conftest.$ac_ext <<EOF
2931 #line 2932 "configure"
2932 #include "confdefs.h"
2933 /* Override any gcc2 internal prototype to avoid an error.  */
2934 /* We use char because int might match the return type of a gcc2
2935     builtin and then its argument prototype would still apply.  */
2936 char terminateAndUnload();
2937
2938 int main() {
2939 terminateAndUnload()
2940 ; return 0; }
2941 EOF
2942 if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2943   rm -rf conftest*
2944   eval "ac_cv_lib_$ac_lib_var=yes"
2945 else
2946   echo "configure: failed program was:" >&5
2947   cat conftest.$ac_ext >&5
2948   rm -rf conftest*
2949   eval "ac_cv_lib_$ac_lib_var=no"
2950 fi
2951 rm -f conftest*
2952 xe_check_libs=""
2953
2954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2955   echo "$ac_t""yes" 1>&6
2956   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961
2962   fi
2963 elif test -n "$ld_text_start_addr"; then
2964   start_flags="-T $ld_text_start_addr -e __start"
2965 fi
2966
2967
2968
2969
2970 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2971  test -z "$linker" &&  linker='$(CC) -nostdlib'
2972  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2973 fi
2974 test "$GCC" != "yes" && lib_gcc=
2975
2976
2977
2978
2979
2980 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2981 if test -n "$site_libraries"; then
2982   for arg in $site_libraries; do
2983     case "$arg" in
2984      -* ) ;;
2985      * ) test -d "$arg" || \
2986            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2987        arg="-L${arg}" ;;
2988     esac
2989     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2990   done
2991 fi
2992
2993 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2994 if test -n "$site_includes"; then
2995   for arg in $site_includes; do
2996     case "$arg" in
2997       -* ) ;;
2998       * ) test -d "$arg" || \
2999            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3000       arg="-I${arg}" ;;
3001     esac
3002     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3003   done
3004 fi
3005
3006 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3007 if test -n "$site_prefixes"; then
3008   for dir in $site_prefixes; do
3009     lib_dir="${dir}/lib"
3010     inc_dir="${dir}/include"
3011     if test ! -d "$dir"; then
3012       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3013     elif test ! -d "$lib_dir"; then
3014       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3015     else
3016       if test -d "$inc_dir"; then
3017         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
3018       fi
3019       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
3020     fi
3021   done
3022 fi
3023
3024
3025 for dir in "/usr/ccs/lib"; do
3026   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
3027 done
3028
3029 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3030 if test -n "$site_runtime_libraries"; then
3031   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3032   export LD_RUN_PATH
3033 fi
3034
3035
3036
3037
3038
3039 if test -n "$add_runtime_path"; then :;
3040 elif test "$dynamic" = "no"; then add_runtime_path=no
3041 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3042 else case "$opsys" in
3043        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3044        * ) add_runtime_path=no ;;
3045      esac
3046 fi
3047
3048 if test "$add_runtime_path" = "yes"; then
3049       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3050 echo "configure:3051: checking "for runtime libraries flag"" >&5
3051   case "$opsys" in
3052     sol2 ) dash_r="-R" ;;
3053     decosf* | linux* | irix*) dash_r="-rpath " ;;
3054     *)
3055       dash_r=""
3056       for try_dash_r in "-R" "-R " "-rpath "; do
3057         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3058         
3059 if test "$GCC" = "yes"; then
3060   set x $xe_check_libs; shift; xe_check_libs=""
3061   while test -n "$1"; do
3062     case $1 in
3063       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3064       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3065       -Xlinker* ) ;;
3066       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3067     esac
3068     shift
3069   done
3070 fi
3071         cat > conftest.$ac_ext <<EOF
3072 #line 3073 "configure"
3073 #include "confdefs.h"
3074
3075 int main() {
3076
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080   rm -rf conftest*
3081   dash_r="$try_dash_r"
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085 fi
3086 rm -f conftest*
3087         xe_check_libs=""
3088         test -n "$dash_r" && break
3089       done ;;
3090   esac
3091   if test -n "$dash_r";
3092     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3093     else echo "$ac_t""NONE" 1>&6
3094   fi
3095 fi
3096
3097 xe_add_unique_runpath_dir='
3098   xe_add_p=yes
3099   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3100   done
3101   if test "$xe_add_p" = "yes"; then
3102     test -n "$runpath" && runpath="${runpath}:"
3103     runpath="${runpath}${xe_runpath_dir}"
3104     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3105   fi'
3106
3107
3108
3109
3110 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3111     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3112   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3113   
3114         runpath="" runpath_dirs=""
3115   if test -n "$LD_RUN_PATH"; then
3116     runpath="$LD_RUN_PATH"
3117   elif test "$GCC" = "yes"; then
3118         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3119     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3120     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3121     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3122       case "$arg" in P,* | -L* | -R* )
3123         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3124           {
3125 xe_runpath_dir="$dir"
3126   test "$xe_runpath_dir" != "/lib"     -a \
3127         "$xe_runpath_dir" != "/usr/lib" -a \
3128         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3129   eval "$xe_add_unique_runpath_dir"
3130 }
3131         done ;;
3132       esac
3133     done
3134     ld_switch_run="$ld_switch_run_save"
3135     rm -f conftest*
3136   else
3137         for arg in $ld_switch_site $ld_switch_x_site; do
3138       case "$arg" in -L*) {
3139 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3140   test "$xe_runpath_dir" != "/lib"     -a \
3141         "$xe_runpath_dir" != "/usr/lib" -a \
3142         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3143   eval "$xe_add_unique_runpath_dir"
3144 };; esac
3145     done
3146         if test "$opsys $need_motif" = "sol2 yes"; then
3147       xe_runpath_dir="/opt/SUNWdt/lib";
3148       eval "$xe_add_unique_runpath_dir";
3149     fi
3150   fi 
3151   if test -n "$runpath"; then
3152     ld_switch_run="${dash_r}${runpath}"
3153     
3154 if test "$GCC" = "yes"; then
3155   set x $ld_switch_run; shift; ld_switch_run=""
3156   while test -n "$1"; do
3157     case $1 in
3158       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3159       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3160       -Xlinker* ) ;;
3161       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3162     esac
3163     shift
3164   done
3165 fi
3166     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3167   fi
3168 fi
3169
3170
3171
3172
3173 GNU_MALLOC=yes
3174 if test "$with_dlmalloc" != "no"; then
3175         doug_lea_malloc=yes
3176 else
3177         doug_lea_malloc=no
3178 fi
3179 after_morecore_hook_exists=yes
3180 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3181 echo "configure:3182: checking for malloc_set_state" >&5
3182
3183 cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186 /* System header to define __stub macros and hopefully few prototypes,
3187     which can conflict with char malloc_set_state(); below.  */
3188 #include <assert.h>
3189 /* Override any gcc2 internal prototype to avoid an error.  */
3190 /* We use char because int might match the return type of a gcc2
3191     builtin and then its argument prototype would still apply.  */
3192 char malloc_set_state();
3193
3194 int main() {
3195
3196 /* The GNU C library defines this for functions which it implements
3197     to always fail with ENOSYS.  Some functions are actually named
3198     something starting with __ and the normal name is an alias.  */
3199 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3200 choke me
3201 #else
3202 malloc_set_state();
3203 #endif
3204
3205 ; return 0; }
3206 EOF
3207 if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3208   rm -rf conftest*
3209   eval "ac_cv_func_malloc_set_state=yes"
3210 else
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   eval "ac_cv_func_malloc_set_state=no"
3215 fi
3216 rm -f conftest*
3217
3218 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3219   echo "$ac_t""yes" 1>&6
3220   :
3221 else
3222   echo "$ac_t""no" 1>&6
3223 doug_lea_malloc=no
3224 fi
3225
3226 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3227 echo "configure:3228: checking whether __after_morecore_hook exists" >&5
3228 cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231 extern void (* __after_morecore_hook)();
3232 int main() {
3233 __after_morecore_hook = 0
3234 ; return 0; }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3237   rm -rf conftest*
3238   echo "$ac_t""yes" 1>&6
3239 else
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   echo "$ac_t""no" 1>&6
3244    after_morecore_hook_exists=no
3245 fi
3246 rm -f conftest*
3247 if test "$system_malloc" = "yes" ; then
3248   GNU_MALLOC=no
3249   GNU_MALLOC_reason="
3250     - The GNU allocators don't work with this system configuration."
3251 elif test "$with_system_malloc" = "yes" ; then
3252   GNU_MALLOC=no
3253   GNU_MALLOC_reason="
3254     - User chose not to use GNU allocators."
3255 elif test "$with_debug_malloc" = "yes" ; then
3256   GNU_MALLOC=no
3257   GNU_MALLOC_reason="
3258     - User chose to use Debugging Malloc."
3259 fi
3260
3261 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3262   GNU_MALLOC_reason="
3263     - Using Doug Lea's new malloc from the GNU C Library."
3264   { test "$extra_verbose" = "yes" && cat << \EOF
3265     Defining DOUG_LEA_MALLOC
3266 EOF
3267 cat >> confdefs.h <<\EOF
3268 #define DOUG_LEA_MALLOC 1
3269 EOF
3270 }
3271
3272   if test "$after_morecore_hook_exists" = "no" ; then
3273     GNU_MALLOC_reason="
3274     - Using Doug Lea's new malloc from the Linux C Library."
3275     { test "$extra_verbose" = "yes" && cat << \EOF
3276     Defining _NO_MALLOC_WARNING_
3277 EOF
3278 cat >> confdefs.h <<\EOF
3279 #define _NO_MALLOC_WARNING_ 1
3280 EOF
3281 }
3282
3283   fi
3284 fi
3285
3286
3287
3288
3289 # Extract the first word of "ranlib", so it can be a program name with args.
3290 set dummy ranlib; ac_word=$2
3291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3292 echo "configure:3293: checking for $ac_word" >&5
3293
3294 if test -n "$RANLIB"; then
3295   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3296 else
3297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3298   ac_dummy="$PATH"
3299   for ac_dir in $ac_dummy; do
3300     test -z "$ac_dir" && ac_dir=.
3301     if test -f $ac_dir/$ac_word; then
3302       ac_cv_prog_RANLIB="ranlib"
3303       break
3304     fi
3305   done
3306   IFS="$ac_save_ifs"
3307   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3308 fi
3309 RANLIB="$ac_cv_prog_RANLIB"
3310 if test -n "$RANLIB"; then
3311   echo "$ac_t""$RANLIB" 1>&6
3312 else
3313   echo "$ac_t""no" 1>&6
3314 fi
3315
3316 ac_aux_dir=
3317 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3318   if test -f $ac_dir/install-sh; then
3319     ac_aux_dir=$ac_dir
3320     ac_install_sh="$ac_aux_dir/install-sh -c"
3321     break
3322   elif test -f $ac_dir/install.sh; then
3323     ac_aux_dir=$ac_dir
3324     ac_install_sh="$ac_aux_dir/install.sh -c"
3325     break
3326   fi
3327 done
3328 if test -z "$ac_aux_dir"; then
3329   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3330 fi
3331 ac_config_guess=$ac_aux_dir/config.guess
3332 ac_config_sub=$ac_aux_dir/config.sub
3333 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3334
3335 # Find a good install program.  We prefer a C program (faster),
3336 # so one script is as good as another.  But avoid the broken or
3337 # incompatible versions:
3338 # SysV /etc/install, /usr/sbin/install
3339 # SunOS /usr/etc/install
3340 # IRIX /sbin/install
3341 # AIX /bin/install
3342 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3343 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3344 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3345 # ./install, which can be erroneously created by make from ./install.sh.
3346 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3347 echo "configure:3348: checking for a BSD compatible install" >&5
3348 if test -z "$INSTALL"; then
3349
3350   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3351   for ac_dir in $PATH; do
3352     # Account for people who put trailing slashes in PATH elements.
3353     case "$ac_dir/" in
3354     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3355     *)
3356       # OSF1 and SCO ODT 3.0 have their own names for install.
3357       # Don't use installbsd from OSF since it installs stuff as root
3358       # by default.
3359       for ac_prog in ginstall scoinst install; do
3360         if test -f $ac_dir/$ac_prog; then
3361           if test $ac_prog = install &&
3362             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3363             # AIX install.  It has an incompatible calling convention.
3364             :
3365           else
3366             ac_cv_path_install="$ac_dir/$ac_prog -c"
3367             break 2
3368           fi
3369         fi
3370       done
3371       ;;
3372     esac
3373   done
3374   IFS="$ac_save_IFS"
3375
3376   if test "${ac_cv_path_install+set}" = set; then
3377     INSTALL="$ac_cv_path_install"
3378   else
3379     # As a last resort, use the slow shell script.  We don't cache a
3380     # path for INSTALL within a source directory, because that will
3381     # break other packages using the cache if that directory is
3382     # removed, or if the path is relative.
3383     INSTALL="$ac_install_sh"
3384   fi
3385 fi
3386 echo "$ac_t""$INSTALL" 1>&6
3387
3388 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3389 # It thinks the first close brace ends the variable substitution.
3390 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3391
3392 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3393
3394 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3395
3396 for ac_prog in 'bison -y' byacc
3397 do
3398 # Extract the first word of "$ac_prog", so it can be a program name with args.
3399 set dummy $ac_prog; ac_word=$2
3400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3401 echo "configure:3402: checking for $ac_word" >&5
3402
3403 if test -n "$YACC"; then
3404   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH"
3408   for ac_dir in $ac_dummy; do
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_prog_YACC="$ac_prog"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 fi
3417 YACC="$ac_cv_prog_YACC"
3418 if test -n "$YACC"; then
3419   echo "$ac_t""$YACC" 1>&6
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423
3424 test -n "$YACC" && break
3425 done
3426 test -n "$YACC" || YACC="yacc"
3427
3428
3429 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/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h   utime.h 
3430 do
3431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3433 echo "configure:3434: checking for $ac_hdr" >&5
3434
3435 cat > conftest.$ac_ext <<EOF
3436 #line 3437 "configure"
3437 #include "confdefs.h"
3438 #include <$ac_hdr>
3439 EOF
3440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3441 { (eval echo configure:3442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3443 if test -z "$ac_err"; then
3444   rm -rf conftest*
3445   eval "ac_cv_header_$ac_safe=yes"
3446 else
3447   echo "$ac_err" >&5
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450   rm -rf conftest*
3451   eval "ac_cv_header_$ac_safe=no"
3452 fi
3453 rm -f conftest*
3454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3455   echo "$ac_t""yes" 1>&6
3456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3457   { test "$extra_verbose" = "yes" && cat << EOF
3458     Defining $ac_tr_hdr
3459 EOF
3460 cat >> confdefs.h <<EOF
3461 #define $ac_tr_hdr 1
3462 EOF
3463 }
3464  
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468 done
3469
3470 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3471 echo "configure:3472: checking for sys/wait.h that is POSIX.1 compatible" >&5
3472
3473 cat > conftest.$ac_ext <<EOF
3474 #line 3475 "configure"
3475 #include "confdefs.h"
3476 #include <sys/types.h>
3477 #include <sys/wait.h>
3478 #ifndef WEXITSTATUS
3479 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3480 #endif
3481 #ifndef WIFEXITED
3482 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3483 #endif
3484 int main() {
3485 int s;
3486 wait (&s);
3487 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3488 ; return 0; }
3489 EOF
3490 if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3491   rm -rf conftest*
3492   ac_cv_header_sys_wait_h=yes
3493 else
3494   echo "configure: failed program was:" >&5
3495   cat conftest.$ac_ext >&5
3496   rm -rf conftest*
3497   ac_cv_header_sys_wait_h=no
3498 fi
3499 rm -f conftest*
3500
3501 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3502 if test $ac_cv_header_sys_wait_h = yes; then
3503   { test "$extra_verbose" = "yes" && cat << \EOF
3504     Defining HAVE_SYS_WAIT_H
3505 EOF
3506 cat >> confdefs.h <<\EOF
3507 #define HAVE_SYS_WAIT_H 1
3508 EOF
3509 }
3510
3511 fi
3512
3513 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3514 echo "configure:3515: checking for ANSI C header files" >&5
3515
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 #include <stdlib.h>
3520 #include <stdarg.h>
3521 #include <string.h>
3522 #include <float.h>
3523 EOF
3524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3525 { (eval echo configure:3526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3527 if test -z "$ac_err"; then
3528   rm -rf conftest*
3529   ac_cv_header_stdc=yes
3530 else
3531   echo "$ac_err" >&5
3532   echo "configure: failed program was:" >&5
3533   cat conftest.$ac_ext >&5
3534   rm -rf conftest*
3535   ac_cv_header_stdc=no
3536 fi
3537 rm -f conftest*
3538
3539 if test $ac_cv_header_stdc = yes; then
3540   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 #include <string.h>
3545 EOF
3546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3547   egrep "memchr" >/dev/null 2>&1; then
3548   :
3549 else
3550   rm -rf conftest*
3551   ac_cv_header_stdc=no
3552 fi
3553 rm -f conftest*
3554
3555 fi
3556
3557 if test $ac_cv_header_stdc = yes; then
3558   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 #include <stdlib.h>
3563 EOF
3564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3565   egrep "free" >/dev/null 2>&1; then
3566   :
3567 else
3568   rm -rf conftest*
3569   ac_cv_header_stdc=no
3570 fi
3571 rm -f conftest*
3572
3573 fi
3574
3575 if test $ac_cv_header_stdc = yes; then
3576   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3577 cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <ctype.h>
3581 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3582 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3583 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3584 int main () { int i; for (i = 0; i < 256; i++)
3585 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3586 exit (0); }
3587
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3590 then
3591   :
3592 else
3593   conftest_rc="$?"
3594   echo "configure: failed program was:" >&5
3595   cat conftest.$ac_ext >&5
3596   rm -fr conftest*
3597   ac_cv_header_stdc=no
3598 fi
3599 rm -fr conftest*
3600 fi
3601
3602 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3603 if test $ac_cv_header_stdc = yes; then
3604   { test "$extra_verbose" = "yes" && cat << \EOF
3605     Defining STDC_HEADERS
3606 EOF
3607 cat >> confdefs.h <<\EOF
3608 #define STDC_HEADERS 1
3609 EOF
3610 }
3611
3612 fi
3613
3614 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3615 echo "configure:3616: checking whether time.h and sys/time.h may both be included" >&5
3616
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <sys/types.h>
3621 #include <sys/time.h>
3622 #include <time.h>
3623 int main() {
3624 struct tm *tp;
3625 ; return 0; }
3626 EOF
3627 if { (eval echo configure:3628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3628   rm -rf conftest*
3629   ac_cv_header_time=yes
3630 else
3631   echo "configure: failed program was:" >&5
3632   cat conftest.$ac_ext >&5
3633   rm -rf conftest*
3634   ac_cv_header_time=no
3635 fi
3636 rm -f conftest*
3637
3638 echo "$ac_t""$ac_cv_header_time" 1>&6
3639 if test $ac_cv_header_time = yes; then
3640   { test "$extra_verbose" = "yes" && cat << \EOF
3641     Defining TIME_WITH_SYS_TIME
3642 EOF
3643 cat >> confdefs.h <<\EOF
3644 #define TIME_WITH_SYS_TIME 1
3645 EOF
3646 }
3647
3648 fi
3649
3650 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3651 echo "configure:3652: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3652
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <sys/types.h>
3657 #include <signal.h>
3658 /* NetBSD declares sys_siglist in unistd.h.  */
3659 #ifdef HAVE_UNISTD_H
3660 #include <unistd.h>
3661 #endif
3662 int main() {
3663 char *msg = *(sys_siglist + 1);
3664 ; return 0; }
3665 EOF
3666 if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3667   rm -rf conftest*
3668   ac_cv_decl_sys_siglist=yes
3669 else
3670   echo "configure: failed program was:" >&5
3671   cat conftest.$ac_ext >&5
3672   rm -rf conftest*
3673   ac_cv_decl_sys_siglist=no
3674 fi
3675 rm -f conftest*
3676
3677 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3678 if test $ac_cv_decl_sys_siglist = yes; then
3679   { test "$extra_verbose" = "yes" && cat << \EOF
3680     Defining SYS_SIGLIST_DECLARED
3681 EOF
3682 cat >> confdefs.h <<\EOF
3683 #define SYS_SIGLIST_DECLARED 1
3684 EOF
3685 }
3686
3687 fi
3688
3689
3690 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3691 echo "configure:3692: checking for struct utimbuf" >&5
3692 cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 #ifdef TIME_WITH_SYS_TIME
3696 #include <sys/time.h>
3697 #include <time.h>
3698 #else
3699 #ifdef HAVE_SYS_TIME_H
3700 #include <sys/time.h>
3701 #else
3702 #include <time.h>
3703 #endif
3704 #endif
3705 #ifdef HAVE_UTIME_H
3706 #include <utime.h>
3707 #endif
3708 int main() {
3709 static struct utimbuf x; x.actime = x.modtime;
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   rm -rf conftest*
3714   echo "$ac_t""yes" 1>&6
3715    { test "$extra_verbose" = "yes" && cat << \EOF
3716     Defining HAVE_STRUCT_UTIMBUF
3717 EOF
3718 cat >> confdefs.h <<\EOF
3719 #define HAVE_STRUCT_UTIMBUF 1
3720 EOF
3721 }
3722
3723 else
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   echo "$ac_t""no" 1>&6
3728 fi
3729 rm -f conftest*
3730
3731 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3732 echo "configure:3733: checking return type of signal handlers" >&5
3733
3734 cat > conftest.$ac_ext <<EOF
3735 #line 3736 "configure"
3736 #include "confdefs.h"
3737 #include <sys/types.h>
3738 #include <signal.h>
3739 #ifdef signal
3740 #undef signal
3741 #endif
3742 #ifdef __cplusplus
3743 extern "C" void (*signal (int, void (*)(int)))(int);
3744 #else
3745 void (*signal ()) ();
3746 #endif
3747
3748 int main() {
3749 int i;
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   ac_cv_type_signal=void
3755 else
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   ac_cv_type_signal=int
3760 fi
3761 rm -f conftest*
3762
3763 echo "$ac_t""$ac_cv_type_signal" 1>&6
3764 { test "$extra_verbose" = "yes" && cat << EOF
3765     Defining RETSIGTYPE = $ac_cv_type_signal
3766 EOF
3767 cat >> confdefs.h <<EOF
3768 #define RETSIGTYPE $ac_cv_type_signal
3769 EOF
3770 }
3771
3772
3773 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3774 echo "configure:3775: checking for size_t" >&5
3775
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <sys/types.h>
3780 #if STDC_HEADERS
3781 #include <stdlib.h>
3782 #include <stddef.h>
3783 #endif
3784 EOF
3785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3786   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3787   rm -rf conftest*
3788   ac_cv_type_size_t=yes
3789 else
3790   rm -rf conftest*
3791   ac_cv_type_size_t=no
3792 fi
3793 rm -f conftest*
3794
3795 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3796 if test $ac_cv_type_size_t = no; then
3797   { test "$extra_verbose" = "yes" && cat << \EOF
3798     Defining size_t = unsigned
3799 EOF
3800 cat >> confdefs.h <<\EOF
3801 #define size_t unsigned
3802 EOF
3803 }
3804
3805 fi
3806
3807 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3808 echo "configure:3809: checking for pid_t" >&5
3809
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 #include <sys/types.h>
3814 #if STDC_HEADERS
3815 #include <stdlib.h>
3816 #include <stddef.h>
3817 #endif
3818 EOF
3819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3820   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3821   rm -rf conftest*
3822   ac_cv_type_pid_t=yes
3823 else
3824   rm -rf conftest*
3825   ac_cv_type_pid_t=no
3826 fi
3827 rm -f conftest*
3828
3829 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3830 if test $ac_cv_type_pid_t = no; then
3831   { test "$extra_verbose" = "yes" && cat << \EOF
3832     Defining pid_t = int
3833 EOF
3834 cat >> confdefs.h <<\EOF
3835 #define pid_t int
3836 EOF
3837 }
3838
3839 fi
3840
3841 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3842 echo "configure:3843: checking for uid_t in sys/types.h" >&5
3843
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <sys/types.h>
3848 EOF
3849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3850   egrep "uid_t" >/dev/null 2>&1; then
3851   rm -rf conftest*
3852   ac_cv_type_uid_t=yes
3853 else
3854   rm -rf conftest*
3855   ac_cv_type_uid_t=no
3856 fi
3857 rm -f conftest*
3858
3859
3860 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3861 if test $ac_cv_type_uid_t = no; then
3862   { test "$extra_verbose" = "yes" && cat << \EOF
3863     Defining uid_t = int
3864 EOF
3865 cat >> confdefs.h <<\EOF
3866 #define uid_t int
3867 EOF
3868 }
3869
3870   { test "$extra_verbose" = "yes" && cat << \EOF
3871     Defining gid_t = int
3872 EOF
3873 cat >> confdefs.h <<\EOF
3874 #define gid_t int
3875 EOF
3876 }
3877
3878 fi
3879
3880 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3881 echo "configure:3882: checking for mode_t" >&5
3882
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <sys/types.h>
3887 #if STDC_HEADERS
3888 #include <stdlib.h>
3889 #include <stddef.h>
3890 #endif
3891 EOF
3892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3893   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3894   rm -rf conftest*
3895   ac_cv_type_mode_t=yes
3896 else
3897   rm -rf conftest*
3898   ac_cv_type_mode_t=no
3899 fi
3900 rm -f conftest*
3901
3902 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3903 if test $ac_cv_type_mode_t = no; then
3904   { test "$extra_verbose" = "yes" && cat << \EOF
3905     Defining mode_t = int
3906 EOF
3907 cat >> confdefs.h <<\EOF
3908 #define mode_t int
3909 EOF
3910 }
3911
3912 fi
3913
3914 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3915 echo "configure:3916: checking for off_t" >&5
3916
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <sys/types.h>
3921 #if STDC_HEADERS
3922 #include <stdlib.h>
3923 #include <stddef.h>
3924 #endif
3925 EOF
3926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3927   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3928   rm -rf conftest*
3929   ac_cv_type_off_t=yes
3930 else
3931   rm -rf conftest*
3932   ac_cv_type_off_t=no
3933 fi
3934 rm -f conftest*
3935
3936 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3937 if test $ac_cv_type_off_t = no; then
3938   { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining off_t = long
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define off_t long
3943 EOF
3944 }
3945
3946 fi
3947
3948 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3949 echo "configure:3950: checking for ssize_t" >&5
3950
3951 cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <sys/types.h>
3955 #if STDC_HEADERS
3956 #include <stdlib.h>
3957 #include <stddef.h>
3958 #endif
3959 EOF
3960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3962   rm -rf conftest*
3963   ac_cv_type_ssize_t=yes
3964 else
3965   rm -rf conftest*
3966   ac_cv_type_ssize_t=no
3967 fi
3968 rm -f conftest*
3969
3970 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3971 if test $ac_cv_type_ssize_t = no; then
3972   { test "$extra_verbose" = "yes" && cat << \EOF
3973     Defining ssize_t = int
3974 EOF
3975 cat >> confdefs.h <<\EOF
3976 #define ssize_t int
3977 EOF
3978 }
3979
3980 fi
3981
3982
3983 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3984 echo "configure:3985: checking for socklen_t" >&5
3985 cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 #include <sys/socket.h>
3989 socklen_t x;
3990
3991 int main() {
3992
3993 ; return 0; }
3994 EOF
3995 if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3996   rm -rf conftest*
3997   echo "$ac_t""yes" 1>&6
3998 else
3999   echo "configure: failed program was:" >&5
4000   cat conftest.$ac_ext >&5
4001   rm -rf conftest*
4002   
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <sys/socket.h>
4007 int accept (int, struct sockaddr *, size_t *);
4008
4009 int main() {
4010
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014   rm -rf conftest*
4015   
4016 echo "$ac_t""size_t" 1>&6
4017 { test "$extra_verbose" = "yes" && cat << \EOF
4018     Defining socklen_t = size_t
4019 EOF
4020 cat >> confdefs.h <<\EOF
4021 #define socklen_t size_t
4022 EOF
4023 }
4024
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   
4030 echo "$ac_t""int" 1>&6
4031 { test "$extra_verbose" = "yes" && cat << \EOF
4032     Defining socklen_t = int
4033 EOF
4034 cat >> confdefs.h <<\EOF
4035 #define socklen_t int
4036 EOF
4037 }
4038
4039 fi
4040 rm -f conftest*
4041 fi
4042 rm -f conftest*
4043
4044 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4045 echo "configure:4046: checking for struct timeval" >&5
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #ifdef TIME_WITH_SYS_TIME
4050 #include <sys/time.h>
4051 #include <time.h>
4052 #else
4053 #ifdef HAVE_SYS_TIME_H
4054 #include <sys/time.h>
4055 #else
4056 #include <time.h>
4057 #endif
4058 #endif
4059 int main() {
4060 static struct timeval x; x.tv_sec = x.tv_usec;
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4064   rm -rf conftest*
4065   echo "$ac_t""yes" 1>&6
4066   HAVE_TIMEVAL=yes
4067   { test "$extra_verbose" = "yes" && cat << \EOF
4068     Defining HAVE_TIMEVAL
4069 EOF
4070 cat >> confdefs.h <<\EOF
4071 #define HAVE_TIMEVAL 1
4072 EOF
4073 }
4074
4075 else
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   echo "$ac_t""no" 1>&6
4080    HAVE_TIMEVAL=no
4081 fi
4082 rm -f conftest*
4083
4084 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4085 echo "configure:4086: checking whether struct tm is in sys/time.h or time.h" >&5
4086
4087 cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 #include <sys/types.h>
4091 #include <time.h>
4092 int main() {
4093 struct tm *tp; tp->tm_sec;
4094 ; return 0; }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4097   rm -rf conftest*
4098   ac_cv_struct_tm=time.h
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -rf conftest*
4103   ac_cv_struct_tm=sys/time.h
4104 fi
4105 rm -f conftest*
4106
4107 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4108 if test $ac_cv_struct_tm = sys/time.h; then
4109   { test "$extra_verbose" = "yes" && cat << \EOF
4110     Defining TM_IN_SYS_TIME
4111 EOF
4112 cat >> confdefs.h <<\EOF
4113 #define TM_IN_SYS_TIME 1
4114 EOF
4115 }
4116
4117 fi
4118
4119 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4120 echo "configure:4121: checking for tm_zone in struct tm" >&5
4121
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4124 "configure"
4124 #include "confdefs.h"
4125 #include <sys/types.h>
4126 #include <$ac_cv_struct_tm>
4127 int main() {
4128 struct tm tm; tm.tm_zone;
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   rm -rf conftest*
4133   ac_cv_struct_tm_zone=yes
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   ac_cv_struct_tm_zone=no
4139 fi
4140 rm -f conftest*
4141
4142 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4143 if test "$ac_cv_struct_tm_zone" = yes; then
4144   { test "$extra_verbose" = "yes" && cat << \EOF
4145     Defining HAVE_TM_ZONE
4146 EOF
4147 cat >> confdefs.h <<\EOF
4148 #define HAVE_TM_ZONE 1
4149 EOF
4150 }
4151
4152 else
4153   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4154 echo "configure:4155: checking for tzname" >&5
4155
4156 cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 #include <time.h>
4160 #ifndef tzname /* For SGI.  */
4161 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4162 #endif
4163 int main() {
4164 atoi(*tzname);
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4168   rm -rf conftest*
4169   ac_cv_var_tzname=yes
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   ac_cv_var_tzname=no
4175 fi
4176 rm -f conftest*
4177
4178 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4179   if test $ac_cv_var_tzname = yes; then
4180     { test "$extra_verbose" = "yes" && cat << \EOF
4181     Defining HAVE_TZNAME
4182 EOF
4183 cat >> confdefs.h <<\EOF
4184 #define HAVE_TZNAME 1
4185 EOF
4186 }
4187
4188   fi
4189 fi
4190
4191
4192 echo $ac_n "checking for working const""... $ac_c" 1>&6
4193 echo "configure:4194: checking for working const" >&5
4194
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198
4199 int main() {
4200
4201 /* Ultrix mips cc rejects this.  */
4202 typedef int charset[2]; const charset x;
4203 /* SunOS 4.1.1 cc rejects this.  */
4204 char const *const *ccp;
4205 char **p;
4206 /* NEC SVR4.0.2 mips cc rejects this.  */
4207 struct point {int x, y;};
4208 static struct point const zero = {0,0};
4209 /* AIX XL C 1.02.0.0 rejects this.
4210    It does not let you subtract one const X* pointer from another in an arm
4211    of an if-expression whose if-part is not a constant expression */
4212 const char *g = "string";
4213 ccp = &g + (g ? g-g : 0);
4214 /* HPUX 7.0 cc rejects these. */
4215 ++ccp;
4216 p = (char**) ccp;
4217 ccp = (char const *const *) p;
4218 { /* SCO 3.2v4 cc rejects this.  */
4219   char *t;
4220   char const *s = 0 ? (char *) 0 : (char const *) 0;
4221
4222   *t++ = 0;
4223 }
4224 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4225   int x[] = {25, 17};
4226   const int *foo = &x[0];
4227   ++foo;
4228 }
4229 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4230   typedef const int *iptr;
4231   iptr p = 0;
4232   ++p;
4233 }
4234 { /* AIX XL C 1.02.0.0 rejects this saying
4235      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4236   struct s { int j; const int *ap[3]; };
4237   struct s *b; b->j = 5;
4238 }
4239 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4240   const int foo = 10;
4241 }
4242
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4246   rm -rf conftest*
4247   ac_cv_c_const=yes
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   ac_cv_c_const=no
4253 fi
4254 rm -f conftest*
4255
4256 echo "$ac_t""$ac_cv_c_const" 1>&6
4257 if test $ac_cv_c_const = no; then
4258   { test "$extra_verbose" = "yes" && cat << \EOF
4259     Defining const = 
4260 EOF
4261 cat >> confdefs.h <<\EOF
4262 #define const 
4263 EOF
4264 }
4265
4266 fi
4267
4268
4269 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4270 echo "configure:4271: checking whether ${MAKE-make} sets \${MAKE}" >&5
4271 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4272
4273 cat > conftestmake <<\EOF
4274 all:
4275         @echo 'ac_maketemp="${MAKE}"'
4276 EOF
4277 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4278 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4279 if test -n "$ac_maketemp"; then
4280   eval ac_cv_prog_make_${ac_make}_set=yes
4281 else
4282   eval ac_cv_prog_make_${ac_make}_set=no
4283 fi
4284 rm -f conftestmake
4285 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4286   echo "$ac_t""yes" 1>&6
4287   SET_MAKE=
4288 else
4289   echo "$ac_t""no" 1>&6
4290   SET_MAKE="MAKE=${MAKE-make}"
4291 fi
4292
4293
4294 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4295 echo "configure:4296: checking whether byte ordering is bigendian" >&5
4296
4297 ac_cv_c_bigendian=unknown
4298 # See if sys/param.h defines the BYTE_ORDER macro.
4299 cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 #include <sys/types.h>
4303 #include <sys/param.h>
4304 int main() {
4305
4306 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4307  bogus endian macros
4308 #endif
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4312   rm -rf conftest*
4313   # It does; now see whether it defined to BIG_ENDIAN or not.
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <sys/types.h>
4318 #include <sys/param.h>
4319 int main() {
4320
4321 #if BYTE_ORDER != BIG_ENDIAN
4322  not big endian
4323 #endif
4324 ; return 0; }
4325 EOF
4326 if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4327   rm -rf conftest*
4328   ac_cv_c_bigendian=yes
4329 else
4330   echo "configure: failed program was:" >&5
4331   cat conftest.$ac_ext >&5
4332   rm -rf conftest*
4333   ac_cv_c_bigendian=no
4334 fi
4335 rm -f conftest*
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339 fi
4340 rm -f conftest*
4341 if test $ac_cv_c_bigendian = unknown; then
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 main () {
4346   /* Are we little or big endian?  From Harbison&Steele.  */
4347   union
4348   {
4349     long l;
4350     char c[sizeof (long)];
4351   } u;
4352   u.l = 1;
4353   exit (u.c[sizeof (long) - 1] == 1);
4354 }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4357 then
4358   ac_cv_c_bigendian=no
4359 else
4360   conftest_rc="$?"
4361   echo "configure: failed program was:" >&5
4362   cat conftest.$ac_ext >&5
4363   rm -fr conftest*
4364   ac_cv_c_bigendian=yes
4365 fi
4366 rm -fr conftest*
4367 fi
4368
4369 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4370 if test $ac_cv_c_bigendian = yes; then
4371   { test "$extra_verbose" = "yes" && cat << \EOF
4372     Defining WORDS_BIGENDIAN
4373 EOF
4374 cat >> confdefs.h <<\EOF
4375 #define WORDS_BIGENDIAN 1
4376 EOF
4377 }
4378
4379 fi
4380
4381
4382 echo $ac_n "checking size of short""... $ac_c" 1>&6
4383 echo "configure:4384: checking size of short" >&5
4384
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388 #include <stdio.h>
4389 main()
4390 {
4391   FILE *f=fopen("conftestval", "w");
4392   if (!f) exit(1);
4393   fprintf(f, "%d\n", sizeof(short));
4394   exit(0);
4395 }
4396 EOF
4397 if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4398 then
4399   ac_cv_sizeof_short=`cat conftestval`
4400 else
4401   conftest_rc="$?"
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -fr conftest*
4405   ac_cv_sizeof_short=0
4406 fi
4407 rm -fr conftest*
4408 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4409 { test "$extra_verbose" = "yes" && cat << EOF
4410     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4411 EOF
4412 cat >> confdefs.h <<EOF
4413 #define SIZEOF_SHORT $ac_cv_sizeof_short
4414 EOF
4415 }
4416
4417
4418 if test "$ac_cv_sizeof_short" = 0; then
4419   echo ""
4420   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4421   echo "*** PANIC *** Please examine config.log for compilation errors."
4422   exit 1
4423 fi
4424 echo $ac_n "checking size of int""... $ac_c" 1>&6
4425 echo "configure:4426: checking size of int" >&5
4426
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <stdio.h>
4431 main()
4432 {
4433   FILE *f=fopen("conftestval", "w");
4434   if (!f) exit(1);
4435   fprintf(f, "%d\n", sizeof(int));
4436   exit(0);
4437 }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4440 then
4441   ac_cv_sizeof_int=`cat conftestval`
4442 else
4443   conftest_rc="$?"
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -fr conftest*
4447   ac_cv_sizeof_int=0
4448 fi
4449 rm -fr conftest*
4450 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4451 { test "$extra_verbose" = "yes" && cat << EOF
4452     Defining SIZEOF_INT = $ac_cv_sizeof_int
4453 EOF
4454 cat >> confdefs.h <<EOF
4455 #define SIZEOF_INT $ac_cv_sizeof_int
4456 EOF
4457 }
4458
4459
4460 echo $ac_n "checking size of long""... $ac_c" 1>&6
4461 echo "configure:4462: checking size of long" >&5
4462
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 #include <stdio.h>
4467 main()
4468 {
4469   FILE *f=fopen("conftestval", "w");
4470   if (!f) exit(1);
4471   fprintf(f, "%d\n", sizeof(long));
4472   exit(0);
4473 }
4474 EOF
4475 if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4476 then
4477   ac_cv_sizeof_long=`cat conftestval`
4478 else
4479   conftest_rc="$?"
4480   echo "configure: failed program was:" >&5
4481   cat conftest.$ac_ext >&5
4482   rm -fr conftest*
4483   ac_cv_sizeof_long=0
4484 fi
4485 rm -fr conftest*
4486 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4487 { test "$extra_verbose" = "yes" && cat << EOF
4488     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4489 EOF
4490 cat >> confdefs.h <<EOF
4491 #define SIZEOF_LONG $ac_cv_sizeof_long
4492 EOF
4493 }
4494
4495
4496 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4497 echo "configure:4498: checking size of long long" >&5
4498
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 #include <stdio.h>
4503 main()
4504 {
4505   FILE *f=fopen("conftestval", "w");
4506   if (!f) exit(1);
4507   fprintf(f, "%d\n", sizeof(long long));
4508   exit(0);
4509 }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4512 then
4513   ac_cv_sizeof_long_long=`cat conftestval`
4514 else
4515   conftest_rc="$?"
4516   echo "configure: failed program was:" >&5
4517   cat conftest.$ac_ext >&5
4518   rm -fr conftest*
4519   ac_cv_sizeof_long_long=0
4520 fi
4521 rm -fr conftest*
4522 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4523 { test "$extra_verbose" = "yes" && cat << EOF
4524     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4525 EOF
4526 cat >> confdefs.h <<EOF
4527 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4528 EOF
4529 }
4530
4531
4532 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4533 echo "configure:4534: checking size of void *" >&5
4534
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 #include <stdio.h>
4539 main()
4540 {
4541   FILE *f=fopen("conftestval", "w");
4542   if (!f) exit(1);
4543   fprintf(f, "%d\n", sizeof(void *));
4544   exit(0);
4545 }
4546 EOF
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4548 then
4549   ac_cv_sizeof_void_p=`cat conftestval`
4550 else
4551   conftest_rc="$?"
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -fr conftest*
4555   ac_cv_sizeof_void_p=0
4556 fi
4557 rm -fr conftest*
4558 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4559 { test "$extra_verbose" = "yes" && cat << EOF
4560     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4561 EOF
4562 cat >> confdefs.h <<EOF
4563 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4564 EOF
4565 }
4566
4567
4568
4569 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4570 echo "configure:4571: checking for long file names" >&5
4571
4572 ac_cv_sys_long_file_names=yes
4573 # Test for long file names in all the places we know might matter:
4574 #      .                the current directory, where building will happen
4575 #      $prefix/lib      where we will be installing things
4576 #      $exec_prefix/lib likewise
4577 # eval it to expand exec_prefix.
4578 #      $TMPDIR          if set, where it might want to write temporary files
4579 # if $TMPDIR is not set:
4580 #      /tmp             where it might want to write temporary files
4581 #      /var/tmp         likewise
4582 #      /usr/tmp         likewise
4583 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4584   ac_tmpdirs="$TMPDIR"
4585 else
4586   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4587 fi
4588 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4589   test -d $ac_dir || continue
4590   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4591   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4592   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4593   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4594   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4595     ac_cv_sys_long_file_names=no
4596     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4597     break
4598   fi
4599   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4600 done
4601
4602 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4603 if test $ac_cv_sys_long_file_names = yes; then
4604   { test "$extra_verbose" = "yes" && cat << \EOF
4605     Defining HAVE_LONG_FILE_NAMES
4606 EOF
4607 cat >> confdefs.h <<\EOF
4608 #define HAVE_LONG_FILE_NAMES 1
4609 EOF
4610 }
4611
4612 fi
4613
4614
4615 echo $ac_n "checking for sin""... $ac_c" 1>&6
4616 echo "configure:4617: checking for sin" >&5
4617
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 /* System header to define __stub macros and hopefully few prototypes,
4622     which can conflict with char sin(); below.  */
4623 #include <assert.h>
4624 /* Override any gcc2 internal prototype to avoid an error.  */
4625 /* We use char because int might match the return type of a gcc2
4626     builtin and then its argument prototype would still apply.  */
4627 char sin();
4628
4629 int main() {
4630
4631 /* The GNU C library defines this for functions which it implements
4632     to always fail with ENOSYS.  Some functions are actually named
4633     something starting with __ and the normal name is an alias.  */
4634 #if defined (__stub_sin) || defined (__stub___sin)
4635 choke me
4636 #else
4637 sin();
4638 #endif
4639
4640 ; return 0; }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4643   rm -rf conftest*
4644   eval "ac_cv_func_sin=yes"
4645 else
4646   echo "configure: failed program was:" >&5
4647   cat conftest.$ac_ext >&5
4648   rm -rf conftest*
4649   eval "ac_cv_func_sin=no"
4650 fi
4651 rm -f conftest*
4652
4653 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655   :
4656 else
4657   echo "$ac_t""no" 1>&6
4658
4659 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4660 echo "configure:4661: checking for sin in -lm" >&5
4661 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4662
4663 xe_check_libs=" -lm "
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667 /* Override any gcc2 internal prototype to avoid an error.  */
4668 /* We use char because int might match the return type of a gcc2
4669     builtin and then its argument prototype would still apply.  */
4670 char sin();
4671
4672 int main() {
4673 sin()
4674 ; return 0; }
4675 EOF
4676 if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4677   rm -rf conftest*
4678   eval "ac_cv_lib_$ac_lib_var=yes"
4679 else
4680   echo "configure: failed program was:" >&5
4681   cat conftest.$ac_ext >&5
4682   rm -rf conftest*
4683   eval "ac_cv_lib_$ac_lib_var=no"
4684 fi
4685 rm -f conftest*
4686 xe_check_libs=""
4687
4688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4689   echo "$ac_t""yes" 1>&6
4690     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4691     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4692   { test "$extra_verbose" = "yes" && cat << EOF
4693     Defining $ac_tr_lib
4694 EOF
4695 cat >> confdefs.h <<EOF
4696 #define $ac_tr_lib 1
4697 EOF
4698 }
4699
4700   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4701
4702 else
4703   echo "$ac_t""no" 1>&6
4704 fi
4705
4706
4707 fi
4708
4709
4710 { test "$extra_verbose" = "yes" && cat << \EOF
4711     Defining LISP_FLOAT_TYPE
4712 EOF
4713 cat >> confdefs.h <<\EOF
4714 #define LISP_FLOAT_TYPE 1
4715 EOF
4716 }
4717
4718
4719 cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 #include <math.h>
4723 int main() {
4724 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   { test "$extra_verbose" = "yes" && cat << \EOF
4730     Defining HAVE_INVERSE_HYPERBOLIC
4731 EOF
4732 cat >> confdefs.h <<\EOF
4733 #define HAVE_INVERSE_HYPERBOLIC 1
4734 EOF
4735 }
4736
4737 else
4738   echo "configure: failed program was:" >&5
4739   cat conftest.$ac_ext >&5
4740 fi
4741 rm -f conftest*
4742
4743 echo "checking type of mail spool file locking" 1>&6
4744 echo "configure:4745: checking type of mail spool file locking" >&5
4745 for ac_func in lockf flock
4746 do
4747 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4748 echo "configure:4749: checking for $ac_func" >&5
4749
4750 cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 /* System header to define __stub macros and hopefully few prototypes,
4754     which can conflict with char $ac_func(); below.  */
4755 #include <assert.h>
4756 /* Override any gcc2 internal prototype to avoid an error.  */
4757 /* We use char because int might match the return type of a gcc2
4758     builtin and then its argument prototype would still apply.  */
4759 char $ac_func();
4760
4761 int main() {
4762
4763 /* The GNU C library defines this for functions which it implements
4764     to always fail with ENOSYS.  Some functions are actually named
4765     something starting with __ and the normal name is an alias.  */
4766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4767 choke me
4768 #else
4769 $ac_func();
4770 #endif
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   eval "ac_cv_func_$ac_func=yes"
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   eval "ac_cv_func_$ac_func=no"
4782 fi
4783 rm -f conftest*
4784
4785 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4786   echo "$ac_t""yes" 1>&6
4787     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4788   { test "$extra_verbose" = "yes" && cat << EOF
4789     Defining $ac_tr_func
4790 EOF
4791 cat >> confdefs.h <<EOF
4792 #define $ac_tr_func 1
4793 EOF
4794 }
4795  
4796 else
4797   echo "$ac_t""no" 1>&6
4798 fi
4799 done
4800
4801 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4802 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4803 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4804 if   test -z "$mail_locking"; then
4805   case "$opsys" in cygwin* | mingw*)
4806     mail_locking=pop ;;
4807   esac
4808 fi
4809
4810 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4811     Defining MAIL_LOCK_LOCKF
4812 EOF
4813 cat >> confdefs.h <<\EOF
4814 #define MAIL_LOCK_LOCKF 1
4815 EOF
4816 }
4817
4818 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4819     Defining MAIL_LOCK_FLOCK
4820 EOF
4821 cat >> confdefs.h <<\EOF
4822 #define MAIL_LOCK_FLOCK 1
4823 EOF
4824 }
4825
4826 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4827     Defining MAIL_LOCK_LOCKING
4828 EOF
4829 cat >> confdefs.h <<\EOF
4830 #define MAIL_LOCK_LOCKING 1
4831 EOF
4832 }
4833
4834 elif test "$mail_locking" = "pop"; then
4835   with_pop=yes
4836   mail_locking=
4837 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4838     Defining MAIL_LOCK_DOT
4839 EOF
4840 cat >> confdefs.h <<\EOF
4841 #define MAIL_LOCK_DOT 1
4842 EOF
4843 }
4844
4845 fi
4846 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4847   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4848 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4849   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4850 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4851   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4852
4853 case "$opsys" in decosf*)
4854   
4855 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4856 echo "configure:4857: checking for cma_open in -lpthreads" >&5
4857 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4858
4859 xe_check_libs=" -lpthreads "
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 /* We use char because int might match the return type of a gcc2
4865     builtin and then its argument prototype would still apply.  */
4866 char cma_open();
4867
4868 int main() {
4869 cma_open()
4870 ; return 0; }
4871 EOF
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873   rm -rf conftest*
4874   eval "ac_cv_lib_$ac_lib_var=yes"
4875 else
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_lib_$ac_lib_var=no"
4880 fi
4881 rm -f conftest*
4882 xe_check_libs=""
4883
4884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4885   echo "$ac_t""yes" 1>&6
4886     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4887     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4888   { test "$extra_verbose" = "yes" && cat << EOF
4889     Defining $ac_tr_lib
4890 EOF
4891 cat >> confdefs.h <<EOF
4892 #define $ac_tr_lib 1
4893 EOF
4894 }
4895
4896   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4897
4898 else
4899   echo "$ac_t""no" 1>&6
4900 fi
4901
4902
4903   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4904     c_switch_site="$c_switch_site -threads" ;;
4905 esac
4906
4907 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4908 echo "configure:4909: checking whether the -xildoff compiler flag is required" >&5
4909 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4910   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4911     then echo "$ac_t""no" 1>&6;
4912     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
4913   fi
4914   else echo "$ac_t""no" 1>&6
4915 fi
4916
4917 if test "$opsys" = "sol2"; then
4918   if test "$os_release" -ge 56; then
4919     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4920 echo "configure:4921: checking for \"-z ignore\" linker flag" >&5
4921     case "`ld -h 2>&1`" in
4922       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4923         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4924       *) echo "$ac_t""no" 1>&6 ;;
4925     esac
4926   fi
4927 fi
4928
4929
4930 echo "checking "for specified window system"" 1>&6
4931 echo "configure:4932: checking "for specified window system"" >&5
4932
4933 if test "$with_x11" != "no"; then
4934     test "$x_includes $x_libraries" != "NONE NONE" && \
4935    window_system=x11 with_x11=yes
4936
4937         
4938       if test "$x_includes $x_libraries" = "NONE NONE" \
4939     -a -n "$OPENWINHOME" \
4940     -a "$OPENWINHOME" != "/usr/openwin" \
4941     -a -d "$OPENWINHOME"; then
4942       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4943       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4944       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4945   fi
4946
4947   if test "$x_includes" = "NONE"; then
4948                     for dir in "/usr/X11" "/usr/X11R6"; do
4949       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4950     done
4951   fi
4952
4953   if test "$x_libraries" = "NONE"; then
4954     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4955       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4956     done
4957   fi
4958
4959   # If we find X, set shell vars x_includes and x_libraries to the
4960 # paths, otherwise set no_x=yes.
4961 # Uses ac_ vars as temps to allow command line to override cache and checks.
4962 # --without-x overrides everything else, but does not touch the cache.
4963 echo $ac_n "checking for X""... $ac_c" 1>&6
4964 echo "configure:4965: checking for X" >&5
4965
4966 # Check whether --with-x or --without-x was given.
4967 if test "${with_x+set}" = set; then
4968   withval="$with_x"
4969   :
4970 fi
4971
4972 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4973 if test "x$with_x" = xno; then
4974   # The user explicitly disabled X.
4975   have_x=disabled
4976 else
4977   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4978     # Both variables are already set.
4979     have_x=yes
4980   else
4981
4982 # One or both of the vars are not set, and there is no cached value.
4983 ac_x_includes=NO ac_x_libraries=NO
4984 rm -fr conftestdir
4985 if mkdir conftestdir; then
4986   cd conftestdir
4987   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4988   cat > Imakefile <<'EOF'
4989 acfindx:
4990         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4991 EOF
4992   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4993     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4994     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4995     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4996     for ac_extension in a so sl; do
4997       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4998         test -f $ac_im_libdir/libX11.$ac_extension; then
4999         ac_im_usrlibdir=$ac_im_libdir; break
5000       fi
5001     done
5002     # Screen out bogus values from the imake configuration.  They are
5003     # bogus both because they are the default anyway, and because
5004     # using them would break gcc on systems where it needs fixed includes.
5005     case "$ac_im_incroot" in
5006         /usr/include) ;;
5007         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5008     esac
5009     case "$ac_im_usrlibdir" in
5010         /usr/lib | /lib) ;;
5011         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5012     esac
5013   fi
5014   cd ..
5015   rm -fr conftestdir
5016 fi
5017
5018 if test "$ac_x_includes" = NO; then
5019   # Guess where to find include files, by looking for this one X11 .h file.
5020   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5021
5022   # First, try using that file with no special directory specified.
5023 cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5026 #include <$x_direct_test_include>
5027 EOF
5028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5029 { (eval echo configure:5030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5031 if test -z "$ac_err"; then
5032   rm -rf conftest*
5033   # We can compile using X headers with no special include directory.
5034 ac_x_includes=
5035 else
5036   echo "$ac_err" >&5
5037   echo "configure: failed program was:" >&5
5038   cat conftest.$ac_ext >&5
5039   rm -rf conftest*
5040   # Look for the header file in a standard set of common directories.
5041 # Check X11 before X11Rn because it is often a symlink to the current release.
5042   for ac_dir in               \
5043     /usr/X11/include          \
5044     /usr/X11R6/include        \
5045     /usr/X11R5/include        \
5046     /usr/X11R4/include        \
5047                               \
5048     /usr/include/X11          \
5049     /usr/include/X11R6        \
5050     /usr/include/X11R5        \
5051     /usr/include/X11R4        \
5052                               \
5053     /usr/local/X11/include    \
5054     /usr/local/X11R6/include  \
5055     /usr/local/X11R5/include  \
5056     /usr/local/X11R4/include  \
5057                               \
5058     /usr/local/include/X11    \
5059     /usr/local/include/X11R6  \
5060     /usr/local/include/X11R5  \
5061     /usr/local/include/X11R4  \
5062                               \
5063     /usr/X386/include         \
5064     /usr/x386/include         \
5065     /usr/XFree86/include/X11  \
5066                               \
5067     /usr/include              \
5068     /usr/local/include        \
5069     /usr/unsupported/include  \
5070     /usr/athena/include       \
5071     /usr/local/x11r5/include  \
5072     /usr/lpp/Xamples/include  \
5073                               \
5074     /usr/openwin/include      \
5075     /usr/openwin/share/include \
5076     ; \
5077   do
5078     if test -r "$ac_dir/$x_direct_test_include"; then
5079       ac_x_includes=$ac_dir
5080       break
5081     fi
5082   done
5083 fi
5084 rm -f conftest*
5085 fi # $ac_x_includes = NO
5086
5087 if test "$ac_x_libraries" = NO; then
5088   # Check for the libraries.
5089
5090   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5091   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5092
5093   # See if we find them without any special options.
5094   # Don't add to $LIBS permanently.
5095   ac_save_LIBS="$LIBS"
5096   LIBS="-l$x_direct_test_library $LIBS"
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100
5101 int main() {
5102 ${x_direct_test_function}()
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   LIBS="$ac_save_LIBS"
5108 # We can link X programs with no special library path.
5109 ac_x_libraries=
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113   rm -rf conftest*
5114   LIBS="$ac_save_LIBS"
5115 # First see if replacing the include by lib works.
5116 # Check X11 before X11Rn because it is often a symlink to the current release.
5117 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5118     /usr/X11/lib          \
5119     /usr/X11R6/lib        \
5120     /usr/X11R5/lib        \
5121     /usr/X11R4/lib        \
5122                           \
5123     /usr/lib/X11          \
5124     /usr/lib/X11R6        \
5125     /usr/lib/X11R5        \
5126     /usr/lib/X11R4        \
5127                           \
5128     /usr/local/X11/lib    \
5129     /usr/local/X11R6/lib  \
5130     /usr/local/X11R5/lib  \
5131     /usr/local/X11R4/lib  \
5132                           \
5133     /usr/local/lib/X11    \
5134     /usr/local/lib/X11R6  \
5135     /usr/local/lib/X11R5  \
5136     /usr/local/lib/X11R4  \
5137                           \
5138     /usr/X386/lib         \
5139     /usr/x386/lib         \
5140     /usr/XFree86/lib/X11  \
5141                           \
5142     /usr/lib              \
5143     /usr/local/lib        \
5144     /usr/unsupported/lib  \
5145     /usr/athena/lib       \
5146     /usr/local/x11r5/lib  \
5147     /usr/lpp/Xamples/lib  \
5148     /lib/usr/lib/X11      \
5149                           \
5150     /usr/openwin/lib      \
5151     /usr/openwin/share/lib \
5152     ; \
5153 do
5154   for ac_extension in a so sl; do
5155     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5156       ac_x_libraries=$ac_dir
5157       break 2
5158     fi
5159   done
5160 done
5161 fi
5162 rm -f conftest*
5163 fi # $ac_x_libraries = NO
5164
5165 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5166   # Didn't find X anywhere.  Cache the known absence of X.
5167   ac_cv_have_x="have_x=no"
5168 else
5169   # Record where we found X for the cache.
5170   ac_cv_have_x="have_x=yes \
5171                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5172 fi
5173   fi
5174   eval "$ac_cv_have_x"
5175 fi # $with_x != no
5176
5177 if test "$have_x" != yes; then
5178   echo "$ac_t""$have_x" 1>&6
5179   no_x=yes
5180 else
5181   # If each of the values was on the command line, it overrides each guess.
5182   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5183   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5184   # Update the cache value to reflect the command line values.
5185   ac_cv_have_x="have_x=yes \
5186                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5187   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5188 fi
5189
5190 if test "$no_x" = yes; then
5191   # Not all programs may use this symbol, but it does not hurt to define it.
5192   { test "$extra_verbose" = "yes" && cat << \EOF
5193     Defining X_DISPLAY_MISSING
5194 EOF
5195 cat >> confdefs.h <<\EOF
5196 #define X_DISPLAY_MISSING 1
5197 EOF
5198 }
5199
5200   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5201 else
5202   if test -n "$x_includes"; then
5203     X_CFLAGS="$X_CFLAGS -I$x_includes"
5204   fi
5205
5206   # It would also be nice to do this for all -L options, not just this one.
5207   if test -n "$x_libraries"; then
5208     X_LIBS="$X_LIBS -L$x_libraries"
5209     # For Solaris; some versions of Sun CC require a space after -R and
5210     # others require no space.  Words are not sufficient . . . .
5211     case "`(uname -sr) 2>/dev/null`" in
5212     "SunOS 5"*)
5213       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5214 echo "configure:5215: checking whether -R must be followed by a space" >&5
5215       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5216       cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219
5220 int main() {
5221
5222 ; return 0; }
5223 EOF
5224 if { (eval echo configure:5225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5225   rm -rf conftest*
5226   ac_R_nospace=yes
5227 else
5228   echo "configure: failed program was:" >&5
5229   cat conftest.$ac_ext >&5
5230   rm -rf conftest*
5231   ac_R_nospace=no
5232 fi
5233 rm -f conftest*
5234       if test $ac_R_nospace = yes; then
5235         echo "$ac_t""no" 1>&6
5236         X_LIBS="$X_LIBS -R$x_libraries"
5237       else
5238         LIBS="$ac_xsave_LIBS -R $x_libraries"
5239         cat > conftest.$ac_ext <<EOF
5240 #line 5241 "configure"
5241 #include "confdefs.h"
5242
5243 int main() {
5244
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248   rm -rf conftest*
5249   ac_R_space=yes
5250 else
5251   echo "configure: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   rm -rf conftest*
5254   ac_R_space=no
5255 fi
5256 rm -f conftest*
5257         if test $ac_R_space = yes; then
5258           echo "$ac_t""yes" 1>&6
5259           X_LIBS="$X_LIBS -R $x_libraries"
5260         else
5261           echo "$ac_t""neither works" 1>&6
5262         fi
5263       fi
5264       LIBS="$ac_xsave_LIBS"
5265     esac
5266   fi
5267
5268   # Check for system-dependent libraries X programs must link with.
5269   # Do this before checking for the system-independent R6 libraries
5270   # (-lICE), since we may need -lsocket or whatever for X linking.
5271
5272   if test "$ISC" = yes; then
5273     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5274   else
5275     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5276     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5277     # the Alpha needs dnet_stub (dnet does not exist).
5278     if test "$with_dnet" = "no" ; then
5279 ac_cv_lib_dnet_dnet_ntoa=no
5280 else
5281
5282 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5283 echo "configure:5284: checking for dnet_ntoa in -ldnet" >&5
5284 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5285
5286 xe_check_libs=" -ldnet "
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 /* Override any gcc2 internal prototype to avoid an error.  */
5291 /* We use char because int might match the return type of a gcc2
5292     builtin and then its argument prototype would still apply.  */
5293 char dnet_ntoa();
5294
5295 int main() {
5296 dnet_ntoa()
5297 ; return 0; }
5298 EOF
5299 if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5300   rm -rf conftest*
5301   eval "ac_cv_lib_$ac_lib_var=yes"
5302 else
5303   echo "configure: failed program was:" >&5
5304   cat conftest.$ac_ext >&5
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=no"
5307 fi
5308 rm -f conftest*
5309 xe_check_libs=""
5310
5311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5312   echo "$ac_t""yes" 1>&6
5313   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5314 else
5315   echo "$ac_t""no" 1>&6
5316 fi
5317
5318 fi
5319
5320     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5321       
5322 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5323 echo "configure:5324: checking for dnet_ntoa in -ldnet_stub" >&5
5324 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5325
5326 xe_check_libs=" -ldnet_stub "
5327 cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330 /* Override any gcc2 internal prototype to avoid an error.  */
5331 /* We use char because int might match the return type of a gcc2
5332     builtin and then its argument prototype would still apply.  */
5333 char dnet_ntoa();
5334
5335 int main() {
5336 dnet_ntoa()
5337 ; return 0; }
5338 EOF
5339 if { (eval echo configure:5340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5340   rm -rf conftest*
5341   eval "ac_cv_lib_$ac_lib_var=yes"
5342 else
5343   echo "configure: failed program was:" >&5
5344   cat conftest.$ac_ext >&5
5345   rm -rf conftest*
5346   eval "ac_cv_lib_$ac_lib_var=no"
5347 fi
5348 rm -f conftest*
5349 xe_check_libs=""
5350
5351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5352   echo "$ac_t""yes" 1>&6
5353   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5354 else
5355   echo "$ac_t""no" 1>&6
5356 fi
5357
5358
5359     fi
5360
5361     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5362     # to get the SysV transport functions.
5363     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5364     # needs -lnsl.
5365     # The nsl library prevents programs from opening the X display
5366     # on Irix 5.2, according to dickey@clark.net.
5367     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5368 echo "configure:5369: checking for gethostbyname" >&5
5369
5370 cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373 /* System header to define __stub macros and hopefully few prototypes,
5374     which can conflict with char gethostbyname(); below.  */
5375 #include <assert.h>
5376 /* Override any gcc2 internal prototype to avoid an error.  */
5377 /* We use char because int might match the return type of a gcc2
5378     builtin and then its argument prototype would still apply.  */
5379 char gethostbyname();
5380
5381 int main() {
5382
5383 /* The GNU C library defines this for functions which it implements
5384     to always fail with ENOSYS.  Some functions are actually named
5385     something starting with __ and the normal name is an alias.  */
5386 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5387 choke me
5388 #else
5389 gethostbyname();
5390 #endif
5391
5392 ; return 0; }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5395   rm -rf conftest*
5396   eval "ac_cv_func_gethostbyname=yes"
5397 else
5398   echo "configure: failed program was:" >&5
5399   cat conftest.$ac_ext >&5
5400   rm -rf conftest*
5401   eval "ac_cv_func_gethostbyname=no"
5402 fi
5403 rm -f conftest*
5404
5405 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5406   echo "$ac_t""yes" 1>&6
5407   :
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411
5412     if test $ac_cv_func_gethostbyname = no; then
5413       
5414 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5415 echo "configure:5416: checking for gethostbyname in -lnsl" >&5
5416 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5417
5418 xe_check_libs=" -lnsl "
5419 cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 /* Override any gcc2 internal prototype to avoid an error.  */
5423 /* We use char because int might match the return type of a gcc2
5424     builtin and then its argument prototype would still apply.  */
5425 char gethostbyname();
5426
5427 int main() {
5428 gethostbyname()
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5432   rm -rf conftest*
5433   eval "ac_cv_lib_$ac_lib_var=yes"
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   eval "ac_cv_lib_$ac_lib_var=no"
5439 fi
5440 rm -f conftest*
5441 xe_check_libs=""
5442
5443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5444   echo "$ac_t""yes" 1>&6
5445   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449
5450
5451     fi
5452
5453     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5454     # socket/setsockopt and other routines are undefined under SCO ODT
5455     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5456     # on later versions), says simon@lia.di.epfl.ch: it contains
5457     # gethostby* variants that don't use the nameserver (or something).
5458     # -lsocket must be given before -lnsl if both are needed.
5459     # We assume that if connect needs -lnsl, so does gethostbyname.
5460     echo $ac_n "checking for connect""... $ac_c" 1>&6
5461 echo "configure:5462: checking for connect" >&5
5462
5463 cat > conftest.$ac_ext <<EOF
5464 #line 5465 "configure"
5465 #include "confdefs.h"
5466 /* System header to define __stub macros and hopefully few prototypes,
5467     which can conflict with char connect(); below.  */
5468 #include <assert.h>
5469 /* Override any gcc2 internal prototype to avoid an error.  */
5470 /* We use char because int might match the return type of a gcc2
5471     builtin and then its argument prototype would still apply.  */
5472 char connect();
5473
5474 int main() {
5475
5476 /* The GNU C library defines this for functions which it implements
5477     to always fail with ENOSYS.  Some functions are actually named
5478     something starting with __ and the normal name is an alias.  */
5479 #if defined (__stub_connect) || defined (__stub___connect)
5480 choke me
5481 #else
5482 connect();
5483 #endif
5484
5485 ; return 0; }
5486 EOF
5487 if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5488   rm -rf conftest*
5489   eval "ac_cv_func_connect=yes"
5490 else
5491   echo "configure: failed program was:" >&5
5492   cat conftest.$ac_ext >&5
5493   rm -rf conftest*
5494   eval "ac_cv_func_connect=no"
5495 fi
5496 rm -f conftest*
5497
5498 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5499   echo "$ac_t""yes" 1>&6
5500   :
5501 else
5502   echo "$ac_t""no" 1>&6
5503 fi
5504
5505     if test $ac_cv_func_connect = no; then
5506       
5507 xe_msg_checking="for connect in -lsocket"
5508 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5509 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5510 echo "configure:5511: checking "$xe_msg_checking"" >&5
5511 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5512
5513 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5514 cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 /* We use char because int might match the return type of a gcc2
5519     builtin and then its argument prototype would still apply.  */
5520 char connect();
5521
5522 int main() {
5523 connect()
5524 ; return 0; }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5527   rm -rf conftest*
5528   eval "ac_cv_lib_$ac_lib_var=yes"
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -rf conftest*
5533   eval "ac_cv_lib_$ac_lib_var=no"
5534 fi
5535 rm -f conftest*
5536 xe_check_libs=""
5537
5538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5539   echo "$ac_t""yes" 1>&6
5540   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5541 else
5542   echo "$ac_t""no" 1>&6
5543 fi
5544
5545
5546     fi
5547
5548     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5549     echo $ac_n "checking for remove""... $ac_c" 1>&6
5550 echo "configure:5551: checking for remove" >&5
5551
5552 cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 /* System header to define __stub macros and hopefully few prototypes,
5556     which can conflict with char remove(); below.  */
5557 #include <assert.h>
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char remove();
5562
5563 int main() {
5564
5565 /* The GNU C library defines this for functions which it implements
5566     to always fail with ENOSYS.  Some functions are actually named
5567     something starting with __ and the normal name is an alias.  */
5568 #if defined (__stub_remove) || defined (__stub___remove)
5569 choke me
5570 #else
5571 remove();
5572 #endif
5573
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5577   rm -rf conftest*
5578   eval "ac_cv_func_remove=yes"
5579 else
5580   echo "configure: failed program was:" >&5
5581   cat conftest.$ac_ext >&5
5582   rm -rf conftest*
5583   eval "ac_cv_func_remove=no"
5584 fi
5585 rm -f conftest*
5586
5587 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5588   echo "$ac_t""yes" 1>&6
5589   :
5590 else
5591   echo "$ac_t""no" 1>&6
5592 fi
5593
5594     if test $ac_cv_func_remove = no; then
5595       
5596 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5597 echo "configure:5598: checking for remove in -lposix" >&5
5598 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5599
5600 xe_check_libs=" -lposix "
5601 cat > conftest.$ac_ext <<EOF
5602 #line 5603 "configure"
5603 #include "confdefs.h"
5604 /* Override any gcc2 internal prototype to avoid an error.  */
5605 /* We use char because int might match the return type of a gcc2
5606     builtin and then its argument prototype would still apply.  */
5607 char remove();
5608
5609 int main() {
5610 remove()
5611 ; return 0; }
5612 EOF
5613 if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5614   rm -rf conftest*
5615   eval "ac_cv_lib_$ac_lib_var=yes"
5616 else
5617   echo "configure: failed program was:" >&5
5618   cat conftest.$ac_ext >&5
5619   rm -rf conftest*
5620   eval "ac_cv_lib_$ac_lib_var=no"
5621 fi
5622 rm -f conftest*
5623 xe_check_libs=""
5624
5625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5626   echo "$ac_t""yes" 1>&6
5627   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5628 else
5629   echo "$ac_t""no" 1>&6
5630 fi
5631
5632
5633     fi
5634
5635     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5636     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5637 echo "configure:5638: checking for shmat" >&5
5638
5639 cat > conftest.$ac_ext <<EOF
5640 #line 5641 "configure"
5641 #include "confdefs.h"
5642 /* System header to define __stub macros and hopefully few prototypes,
5643     which can conflict with char shmat(); below.  */
5644 #include <assert.h>
5645 /* Override any gcc2 internal prototype to avoid an error.  */
5646 /* We use char because int might match the return type of a gcc2
5647     builtin and then its argument prototype would still apply.  */
5648 char shmat();
5649
5650 int main() {
5651
5652 /* The GNU C library defines this for functions which it implements
5653     to always fail with ENOSYS.  Some functions are actually named
5654     something starting with __ and the normal name is an alias.  */
5655 #if defined (__stub_shmat) || defined (__stub___shmat)
5656 choke me
5657 #else
5658 shmat();
5659 #endif
5660
5661 ; return 0; }
5662 EOF
5663 if { (eval echo configure:5664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5664   rm -rf conftest*
5665   eval "ac_cv_func_shmat=yes"
5666 else
5667   echo "configure: failed program was:" >&5
5668   cat conftest.$ac_ext >&5
5669   rm -rf conftest*
5670   eval "ac_cv_func_shmat=no"
5671 fi
5672 rm -f conftest*
5673
5674 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676   :
5677 else
5678   echo "$ac_t""no" 1>&6
5679 fi
5680
5681     if test $ac_cv_func_shmat = no; then
5682       
5683 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5684 echo "configure:5685: checking for shmat in -lipc" >&5
5685 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5686
5687 xe_check_libs=" -lipc "
5688 cat > conftest.$ac_ext <<EOF
5689 #line 5690 "configure"
5690 #include "confdefs.h"
5691 /* Override any gcc2 internal prototype to avoid an error.  */
5692 /* We use char because int might match the return type of a gcc2
5693     builtin and then its argument prototype would still apply.  */
5694 char shmat();
5695
5696 int main() {
5697 shmat()
5698 ; return 0; }
5699 EOF
5700 if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5701   rm -rf conftest*
5702   eval "ac_cv_lib_$ac_lib_var=yes"
5703 else
5704   echo "configure: failed program was:" >&5
5705   cat conftest.$ac_ext >&5
5706   rm -rf conftest*
5707   eval "ac_cv_lib_$ac_lib_var=no"
5708 fi
5709 rm -f conftest*
5710 xe_check_libs=""
5711
5712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5713   echo "$ac_t""yes" 1>&6
5714   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5715 else
5716   echo "$ac_t""no" 1>&6
5717 fi
5718
5719
5720     fi
5721   fi
5722
5723   # Check for libraries that X11R6 Xt/Xaw programs need.
5724   ac_save_LDFLAGS="$LDFLAGS"
5725   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5726   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5727   # check for ICE first), but we must link in the order -lSM -lICE or
5728   # we get undefined symbols.  So assume we have SM if we have ICE.
5729   # These have to be linked with before -lX11, unlike the other
5730   # libraries we check for below, so use a different variable.
5731   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5732   
5733 xe_msg_checking="for IceConnectionNumber in -lICE"
5734 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5735 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5736 echo "configure:5737: checking "$xe_msg_checking"" >&5
5737 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5738
5739 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5740 cat > conftest.$ac_ext <<EOF
5741 #line 5742 "configure"
5742 #include "confdefs.h"
5743 /* Override any gcc2 internal prototype to avoid an error.  */
5744 /* We use char because int might match the return type of a gcc2
5745     builtin and then its argument prototype would still apply.  */
5746 char IceConnectionNumber();
5747
5748 int main() {
5749 IceConnectionNumber()
5750 ; return 0; }
5751 EOF
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753   rm -rf conftest*
5754   eval "ac_cv_lib_$ac_lib_var=yes"
5755 else
5756   echo "configure: failed program was:" >&5
5757   cat conftest.$ac_ext >&5
5758   rm -rf conftest*
5759   eval "ac_cv_lib_$ac_lib_var=no"
5760 fi
5761 rm -f conftest*
5762 xe_check_libs=""
5763
5764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5765   echo "$ac_t""yes" 1>&6
5766   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5767 else
5768   echo "$ac_t""no" 1>&6
5769 fi
5770
5771
5772   LDFLAGS="$ac_save_LDFLAGS"
5773
5774 fi
5775  # Autoconf claims to find X library and include dirs for us.
5776   if test "$no_x" = "yes"
5777   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5778   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5779   fi
5780 fi
5781
5782 case "$with_x11" in
5783   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5784   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5785 esac
5786
5787 if test "$with_x11" = "yes"; then
5788   { test "$extra_verbose" = "yes" && cat << \EOF
5789     Defining HAVE_X_WINDOWS
5790 EOF
5791 cat >> confdefs.h <<\EOF
5792 #define HAVE_X_WINDOWS 1
5793 EOF
5794 }
5795
5796   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5797   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5798
5799       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5800     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5801     if test -d "$lib_dir" -a -d "$inc_dir"; then
5802       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5803         x_libraries="$lib_dir $x_libraries"
5804         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5805       esac
5806       case "$x_includes" in "$inc_dir"* ) ;; *)
5807         x_includes="$inc_dir $x_includes"
5808         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5809       esac
5810       break;       fi
5811   done
5812
5813     for rel in "X11R6" "X11R5" "X11R4"; do
5814     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5815     if test -d "$lib_dir" -a -d "$inc_dir"; then
5816       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5817         x_libraries="$x_libraries $lib_dir"
5818         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5819       esac
5820       case "$x_includes" in "$inc_dir"* ) ;; *)
5821         x_includes="$x_includes $inc_dir"
5822         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5823       esac
5824       break;     fi
5825   done
5826
5827     case "$opsys" in
5828   decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
5829   esac
5830
5831   ld_switch_x_site="$X_LIBS"
5832
5833   
5834 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5835     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5836   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5837   
5838         runpath="" runpath_dirs=""
5839   if test -n "$LD_RUN_PATH"; then
5840     runpath="$LD_RUN_PATH"
5841   elif test "$GCC" = "yes"; then
5842         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5843     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5844     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5845     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5846       case "$arg" in P,* | -L* | -R* )
5847         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5848           {
5849 xe_runpath_dir="$dir"
5850   test "$xe_runpath_dir" != "/lib"     -a \
5851         "$xe_runpath_dir" != "/usr/lib" -a \
5852         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5853   eval "$xe_add_unique_runpath_dir"
5854 }
5855         done ;;
5856       esac
5857     done
5858     ld_switch_run="$ld_switch_run_save"
5859     rm -f conftest*
5860   else
5861         for arg in $ld_switch_site $ld_switch_x_site; do
5862       case "$arg" in -L*) {
5863 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5864   test "$xe_runpath_dir" != "/lib"     -a \
5865         "$xe_runpath_dir" != "/usr/lib" -a \
5866         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5867   eval "$xe_add_unique_runpath_dir"
5868 };; esac
5869     done
5870         if test "$opsys $need_motif" = "sol2 yes"; then
5871       xe_runpath_dir="/opt/SUNWdt/lib";
5872       eval "$xe_add_unique_runpath_dir";
5873     fi
5874   fi 
5875   if test -n "$runpath"; then
5876     ld_switch_run="${dash_r}${runpath}"
5877     
5878 if test "$GCC" = "yes"; then
5879   set x $ld_switch_run; shift; ld_switch_run=""
5880   while test -n "$1"; do
5881     case $1 in
5882       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5883       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5884       -Xlinker* ) ;;
5885       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5886     esac
5887     shift
5888   done
5889 fi
5890     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5891   fi
5892 fi
5893
5894
5895   if test "$extra_verbose" = "yes"; then
5896     echo; echo "X11 compilation variables:"
5897     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5898     echo
5899   fi
5900
5901             bitmapdirs=
5902   if test "$x_includes" != NONE; then
5903     for i in $x_includes; do
5904       if test -d "$i/bitmaps"; then
5905         bitmapdirs="$i/bitmaps:$bitmapdirs"
5906       fi
5907       if test -d "$i/X11/bitmaps"; then
5908         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5909       fi
5910     done
5911     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5912   fi
5913   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5914     Defining BITMAPDIR = "$bitmapdirs"
5915 EOF
5916 cat >> confdefs.h <<EOF
5917 #define BITMAPDIR "$bitmapdirs"
5918 EOF
5919 }
5920
5921
5922     echo "checking for X defines extracted by xmkmf" 1>&6
5923 echo "configure:5924: checking for X defines extracted by xmkmf" >&5
5924   rm -fr conftestdir
5925   if mkdir conftestdir; then
5926     cd conftestdir
5927     cat > Imakefile <<'EOF'
5928 xetest:
5929         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5930 EOF
5931     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5932       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5933       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5934     fi
5935     cd ..
5936     rm -fr conftestdir
5937     for word in $xmkmf_defines; do
5938       case "$word" in -D* )
5939         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5940         case "$word" in
5941           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5942           *     ) val=1 ;;
5943         esac
5944         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5945           if test "$val" = "1"
5946             then { test "$extra_verbose" = "yes" && cat << EOF
5947     Defining $sym
5948 EOF
5949 cat >> confdefs.h <<EOF
5950 #define $sym 1
5951 EOF
5952 }
5953
5954             else { test "$extra_verbose" = "yes" && cat << EOF
5955     Defining $sym = $val
5956 EOF
5957 cat >> confdefs.h <<EOF
5958 #define $sym $val
5959 EOF
5960 }
5961
5962           fi
5963         fi  ;;
5964       esac
5965     done
5966   fi
5967
5968     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5969 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5970 echo "configure:5971: checking for X11/Intrinsic.h" >&5
5971
5972 cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 #include <X11/Intrinsic.h>
5976 EOF
5977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5978 { (eval echo configure:5979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5980 if test -z "$ac_err"; then
5981   rm -rf conftest*
5982   eval "ac_cv_header_$ac_safe=yes"
5983 else
5984   echo "$ac_err" >&5
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -rf conftest*
5988   eval "ac_cv_header_$ac_safe=no"
5989 fi
5990 rm -f conftest*
5991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5992   echo "$ac_t""yes" 1>&6
5993   :
5994 else
5995   echo "$ac_t""no" 1>&6
5996 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5997 fi
5998
5999
6000       
6001 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6002 echo "configure:6003: checking for XOpenDisplay in -lX11" >&5
6003 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6004
6005 xe_check_libs=" -lX11 "
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 /* Override any gcc2 internal prototype to avoid an error.  */
6010 /* We use char because int might match the return type of a gcc2
6011     builtin and then its argument prototype would still apply.  */
6012 char XOpenDisplay();
6013
6014 int main() {
6015 XOpenDisplay()
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_lib_$ac_lib_var=no"
6026 fi
6027 rm -f conftest*
6028 xe_check_libs=""
6029
6030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6031   echo "$ac_t""yes" 1>&6
6032   have_lib_x11=yes
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036
6037
6038   if test "$have_lib_x11" != "yes"; then
6039     
6040 xe_msg_checking="for XGetFontProperty in -lX11"
6041 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6042 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6043 echo "configure:6044: checking "$xe_msg_checking"" >&5
6044 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6045
6046 xe_check_libs=" -lX11 -b i486-linuxaout"
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char XGetFontProperty();
6054
6055 int main() {
6056 XGetFontProperty()
6057 ; return 0; }
6058 EOF
6059 if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6060   rm -rf conftest*
6061   eval "ac_cv_lib_$ac_lib_var=yes"
6062 else
6063   echo "configure: failed program was:" >&5
6064   cat conftest.$ac_ext >&5
6065   rm -rf conftest*
6066   eval "ac_cv_lib_$ac_lib_var=no"
6067 fi
6068 rm -f conftest*
6069 xe_check_libs=""
6070
6071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6072   echo "$ac_t""yes" 1>&6
6073   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6074 else
6075   echo "$ac_t""no" 1>&6
6076 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6077 fi
6078
6079
6080   fi
6081   libs_x="-lX11"
6082   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6083
6084     
6085 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6086 echo "configure:6087: checking for XShapeSelectInput in -lXext" >&5
6087 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6088
6089 xe_check_libs=" -lXext "
6090 cat > conftest.$ac_ext <<EOF
6091 #line 6092 "configure"
6092 #include "confdefs.h"
6093 /* Override any gcc2 internal prototype to avoid an error.  */
6094 /* We use char because int might match the return type of a gcc2
6095     builtin and then its argument prototype would still apply.  */
6096 char XShapeSelectInput();
6097
6098 int main() {
6099 XShapeSelectInput()
6100 ; return 0; }
6101 EOF
6102 if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6103   rm -rf conftest*
6104   eval "ac_cv_lib_$ac_lib_var=yes"
6105 else
6106   echo "configure: failed program was:" >&5
6107   cat conftest.$ac_ext >&5
6108   rm -rf conftest*
6109   eval "ac_cv_lib_$ac_lib_var=no"
6110 fi
6111 rm -f conftest*
6112 xe_check_libs=""
6113
6114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6115   echo "$ac_t""yes" 1>&6
6116   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6117 else
6118   echo "$ac_t""no" 1>&6
6119 fi
6120
6121
6122
6123     
6124 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6125 echo "configure:6126: checking for XtOpenDisplay in -lXt" >&5
6126 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6127
6128 xe_check_libs=" -lXt "
6129 cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char XtOpenDisplay();
6136
6137 int main() {
6138 XtOpenDisplay()
6139 ; return 0; }
6140 EOF
6141 if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142   rm -rf conftest*
6143   eval "ac_cv_lib_$ac_lib_var=yes"
6144 else
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   eval "ac_cv_lib_$ac_lib_var=no"
6149 fi
6150 rm -f conftest*
6151 xe_check_libs=""
6152
6153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6154   echo "$ac_t""yes" 1>&6
6155   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6156 else
6157   echo "$ac_t""no" 1>&6
6158 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6159 fi
6160
6161
6162
6163   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6164 echo "configure:6165: checking the version of X11 being used" >&5
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 #include <X11/Intrinsic.h>
6169     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6170 EOF
6171 if { (eval echo configure:6172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6172 then
6173   ./conftest foobar; x11_release=$?
6174 else
6175   conftest_rc="$?"
6176   echo "configure: failed program was:" >&5
6177   cat conftest.$ac_ext >&5
6178   rm -fr conftest*
6179   x11_release=4
6180 fi
6181 rm -fr conftest*
6182   echo "$ac_t""R${x11_release}" 1>&6
6183   { test "$extra_verbose" = "yes" && cat << EOF
6184     Defining THIS_IS_X11R${x11_release}
6185 EOF
6186 cat >> confdefs.h <<EOF
6187 #define THIS_IS_X11R${x11_release} 1
6188 EOF
6189 }
6190
6191
6192   if test "${x11_release}" = "4"; then
6193     case "$with_widgets" in
6194       "" | "no") with_widgets=no ;;
6195       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6196     esac
6197   fi
6198
6199   for ac_func in XConvertCase
6200 do
6201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6202 echo "configure:6203: checking for $ac_func" >&5
6203
6204 cat > conftest.$ac_ext <<EOF
6205 #line 6206 "configure"
6206 #include "confdefs.h"
6207 /* System header to define __stub macros and hopefully few prototypes,
6208     which can conflict with char $ac_func(); below.  */
6209 #include <assert.h>
6210 /* Override any gcc2 internal prototype to avoid an error.  */
6211 /* We use char because int might match the return type of a gcc2
6212     builtin and then its argument prototype would still apply.  */
6213 char $ac_func();
6214
6215 int main() {
6216
6217 /* The GNU C library defines this for functions which it implements
6218     to always fail with ENOSYS.  Some functions are actually named
6219     something starting with __ and the normal name is an alias.  */
6220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6221 choke me
6222 #else
6223 $ac_func();
6224 #endif
6225
6226 ; return 0; }
6227 EOF
6228 if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6229   rm -rf conftest*
6230   eval "ac_cv_func_$ac_func=yes"
6231 else
6232   echo "configure: failed program was:" >&5
6233   cat conftest.$ac_ext >&5
6234   rm -rf conftest*
6235   eval "ac_cv_func_$ac_func=no"
6236 fi
6237 rm -f conftest*
6238
6239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6242   { test "$extra_verbose" = "yes" && cat << EOF
6243     Defining $ac_tr_func
6244 EOF
6245 cat >> confdefs.h <<EOF
6246 #define $ac_tr_func 1
6247 EOF
6248 }
6249  
6250 else
6251   echo "$ac_t""no" 1>&6
6252 fi
6253 done
6254
6255
6256   for ac_hdr in X11/Xlocale.h
6257 do
6258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6260 echo "configure:6261: checking for $ac_hdr" >&5
6261
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 #include <$ac_hdr>
6266 EOF
6267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6268 { (eval echo configure:6269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6270 if test -z "$ac_err"; then
6271   rm -rf conftest*
6272   eval "ac_cv_header_$ac_safe=yes"
6273 else
6274   echo "$ac_err" >&5
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   eval "ac_cv_header_$ac_safe=no"
6279 fi
6280 rm -f conftest*
6281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6282   echo "$ac_t""yes" 1>&6
6283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6284   { test "$extra_verbose" = "yes" && cat << EOF
6285     Defining $ac_tr_hdr
6286 EOF
6287 cat >> confdefs.h <<EOF
6288 #define $ac_tr_hdr 1
6289 EOF
6290 }
6291  
6292 else
6293   echo "$ac_t""no" 1>&6
6294 fi
6295 done
6296
6297
6298     for ac_func in XRegisterIMInstantiateCallback
6299 do
6300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6301 echo "configure:6302: checking for $ac_func" >&5
6302
6303 cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 /* System header to define __stub macros and hopefully few prototypes,
6307     which can conflict with char $ac_func(); below.  */
6308 #include <assert.h>
6309 /* Override any gcc2 internal prototype to avoid an error.  */
6310 /* We use char because int might match the return type of a gcc2
6311     builtin and then its argument prototype would still apply.  */
6312 char $ac_func();
6313
6314 int main() {
6315
6316 /* The GNU C library defines this for functions which it implements
6317     to always fail with ENOSYS.  Some functions are actually named
6318     something starting with __ and the normal name is an alias.  */
6319 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6320 choke me
6321 #else
6322 $ac_func();
6323 #endif
6324
6325 ; return 0; }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6328   rm -rf conftest*
6329   eval "ac_cv_func_$ac_func=yes"
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333   rm -rf conftest*
6334   eval "ac_cv_func_$ac_func=no"
6335 fi
6336 rm -f conftest*
6337
6338 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6339   echo "$ac_t""yes" 1>&6
6340     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6341   { test "$extra_verbose" = "yes" && cat << EOF
6342     Defining $ac_tr_func
6343 EOF
6344 cat >> confdefs.h <<EOF
6345 #define $ac_tr_func 1
6346 EOF
6347 }
6348  
6349 else
6350   echo "$ac_t""no" 1>&6
6351 fi
6352 done
6353
6354   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6355 echo "configure:6356: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359
6360 #define NeedFunctionPrototypes 1
6361 #include <X11/Xlib.h>
6362 extern Bool XRegisterIMInstantiateCallback(
6363    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6364
6365 int main() {
6366
6367 ; return 0; }
6368 EOF
6369 if { (eval echo configure:6370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6370   rm -rf conftest*
6371   echo "$ac_t""yes" 1>&6
6372 else
6373   echo "configure: failed program was:" >&5
6374   cat conftest.$ac_ext >&5
6375   rm -rf conftest*
6376   echo "$ac_t""no" 1>&6
6377    { test "$extra_verbose" = "yes" && cat << \EOF
6378     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6379 EOF
6380 cat >> confdefs.h <<\EOF
6381 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6382 EOF
6383 }
6384
6385 fi
6386 rm -f conftest*
6387
6388     test -z "$with_xmu" && { 
6389 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6390 echo "configure:6391: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6391 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6392
6393 xe_check_libs=" -lXmu "
6394 cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 /* Override any gcc2 internal prototype to avoid an error.  */
6398 /* We use char because int might match the return type of a gcc2
6399     builtin and then its argument prototype would still apply.  */
6400 char XmuReadBitmapDataFromFile();
6401
6402 int main() {
6403 XmuReadBitmapDataFromFile()
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6407   rm -rf conftest*
6408   eval "ac_cv_lib_$ac_lib_var=yes"
6409 else
6410   echo "configure: failed program was:" >&5
6411   cat conftest.$ac_ext >&5
6412   rm -rf conftest*
6413   eval "ac_cv_lib_$ac_lib_var=no"
6414 fi
6415 rm -f conftest*
6416 xe_check_libs=""
6417
6418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6419   echo "$ac_t""yes" 1>&6
6420   with_xmu=yes
6421 else
6422   echo "$ac_t""no" 1>&6
6423 with_xmu=no
6424 fi
6425
6426  }
6427   if test "$with_xmu" = "no"; then
6428     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6429    echo "    xemacs will be linked with \"xmu.o\""
6430  fi
6431   else
6432     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6433     { test "$extra_verbose" = "yes" && cat << \EOF
6434     Defining HAVE_XMU
6435 EOF
6436 cat >> confdefs.h <<\EOF
6437 #define HAVE_XMU 1
6438 EOF
6439 }
6440
6441   fi
6442
6443       
6444 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6445 echo "configure:6446: checking for main in -lXbsd" >&5
6446 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6447
6448 xe_check_libs=" -lXbsd "
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452
6453 int main() {
6454 main()
6455 ; return 0; }
6456 EOF
6457 if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6458   rm -rf conftest*
6459   eval "ac_cv_lib_$ac_lib_var=yes"
6460 else
6461   echo "configure: failed program was:" >&5
6462   cat conftest.$ac_ext >&5
6463   rm -rf conftest*
6464   eval "ac_cv_lib_$ac_lib_var=no"
6465 fi
6466 rm -f conftest*
6467 xe_check_libs=""
6468
6469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6470   echo "$ac_t""yes" 1>&6
6471   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6472 else
6473   echo "$ac_t""no" 1>&6
6474 fi
6475
6476
6477
6478     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6479         if test "$GCC" = "yes"; then
6480       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6481       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6482     else
6483       case "$CC" in
6484         "xlc" ) CC="xlc_r" ;;
6485         "xlC" ) CC="xlC_r" ;;
6486         "cc"  ) CC="cc_r" ;;
6487       esac
6488     fi
6489   fi
6490
6491 fi 
6492 if test "$with_msw" != "no"; then
6493   echo "checking for MS-Windows" 1>&6
6494 echo "configure:6495: checking for MS-Windows" >&5
6495   
6496 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6497 echo "configure:6498: checking for main in -lgdi32" >&5
6498 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6499
6500 xe_check_libs=" -lgdi32 "
6501 cat > conftest.$ac_ext <<EOF
6502 #line 6503 "configure"
6503 #include "confdefs.h"
6504
6505 int main() {
6506 main()
6507 ; return 0; }
6508 EOF
6509 if { (eval echo configure:6510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6510   rm -rf conftest*
6511   eval "ac_cv_lib_$ac_lib_var=yes"
6512 else
6513   echo "configure: failed program was:" >&5
6514   cat conftest.$ac_ext >&5
6515   rm -rf conftest*
6516   eval "ac_cv_lib_$ac_lib_var=no"
6517 fi
6518 rm -f conftest*
6519 xe_check_libs=""
6520
6521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6522   echo "$ac_t""yes" 1>&6
6523   with_msw=yes
6524 else
6525   echo "$ac_t""no" 1>&6
6526 fi
6527
6528
6529   if test "$with_msw" = "yes"; then
6530     { test "$extra_verbose" = "yes" && cat << \EOF
6531     Defining HAVE_MS_WINDOWS
6532 EOF
6533 cat >> confdefs.h <<\EOF
6534 #define HAVE_MS_WINDOWS 1
6535 EOF
6536 }
6537
6538     install_pp="$blddir/lib-src/installexe.sh"
6539     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
6540     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6541     if test "$window_system" != x11; then
6542         window_system=msw
6543         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6544             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6545    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6546  fi
6547         test "$with_menubars"   != "no" && with_menubars=msw \
6548             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6549    echo "    xemacs will be linked with \"menubar-msw.o\""
6550  fi
6551         test "$with_toolbars"   != "no" && with_toolbars=msw \
6552             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6553    echo "    xemacs will be linked with \"toolbar-msw.o\""
6554  fi
6555         test "$with_dialogs"   != "no" && with_dialogs=msw \
6556             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6557    echo "    xemacs will be linked with \"dialog-msw.o\""
6558  fi
6559         test "$with_widgets"   != "no" && with_widgets=msw
6560     else
6561         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6562    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6563  fi
6564         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6565    echo "    xemacs will be linked with \"menubar-msw.o\""
6566  fi
6567         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6568    echo "    xemacs will be linked with \"toolbar-msw.o\""
6569  fi
6570         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6571    echo "    xemacs will be linked with \"dialog-msw.o\""
6572  fi
6573     fi
6574         cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 #include <fcntl.h>
6578     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6579 EOF
6580 if { (eval echo configure:6581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6581 then
6582   { test "$extra_verbose" = "yes" && cat << \EOF
6583     Defining HAVE_MSG_SELECT
6584 EOF
6585 cat >> confdefs.h <<\EOF
6586 #define HAVE_MSG_SELECT 1
6587 EOF
6588 }
6589
6590 else
6591   conftest_rc="$?"
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594 fi
6595 rm -fr conftest*
6596     with_file_coding=yes
6597     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
6598    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\""
6599  fi
6600   fi
6601 fi
6602
6603
6604
6605 test -z "$window_system" && window_system="none"
6606
6607 if test "$window_system" = "none"; then
6608   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6609   do
6610     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6611        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6612     fi
6613     eval "with_${feature}=no"
6614   done
6615 else
6616   test -z "$with_toolbars" && with_toolbars=yes
6617 fi
6618
6619 if test "$with_msw" != "yes"; then
6620   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6621   do
6622     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6623        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6624     fi
6625     eval "with_${feature}=no"
6626   done
6627 else
6628   :
6629 fi
6630
6631 if test "$with_x11" != "yes"; then
6632             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6633   do
6634     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6635        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6636     fi
6637     eval "with_${feature}=no"
6638   done
6639 fi
6640
6641 if test "$with_x11" = "yes"; then
6642   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6643 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6644 echo "configure:6645: checking for X11/extensions/shape.h" >&5
6645
6646 cat > conftest.$ac_ext <<EOF
6647 #line 6648 "configure"
6648 #include "confdefs.h"
6649 #include <X11/extensions/shape.h>
6650 EOF
6651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6652 { (eval echo configure:6653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6654 if test -z "$ac_err"; then
6655   rm -rf conftest*
6656   eval "ac_cv_header_$ac_safe=yes"
6657 else
6658   echo "$ac_err" >&5
6659   echo "configure: failed program was:" >&5
6660   cat conftest.$ac_ext >&5
6661   rm -rf conftest*
6662   eval "ac_cv_header_$ac_safe=no"
6663 fi
6664 rm -f conftest*
6665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6666   echo "$ac_t""yes" 1>&6
6667   
6668    { test "$extra_verbose" = "yes" && cat << \EOF
6669     Defining HAVE_BALLOON_HELP
6670 EOF
6671 cat >> confdefs.h <<\EOF
6672 #define HAVE_BALLOON_HELP 1
6673 EOF
6674 }
6675
6676    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6677    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6678  fi
6679 else
6680   echo "$ac_t""no" 1>&6
6681 fi
6682
6683 fi
6684
6685 bitmapdir=
6686
6687 case "$window_system" in
6688   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6689   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6690   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6691 esac
6692
6693 case "$x_libraries" in *X11R4* )
6694   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6695   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6696 esac
6697
6698 echo "checking for WM_COMMAND option" 1>&6
6699 echo "configure:6700: checking for WM_COMMAND option" >&5;
6700 if test "$with_wmcommand" != "no"; then
6701   { test "$extra_verbose" = "yes" && cat << \EOF
6702     Defining HAVE_WMCOMMAND
6703 EOF
6704 cat >> confdefs.h <<\EOF
6705 #define HAVE_WMCOMMAND 1
6706 EOF
6707 }
6708
6709 fi
6710
6711 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6712 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6713 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6714 echo "configure:6715: checking for X11/Xauth.h" >&5
6715
6716 cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 #include <X11/Xauth.h>
6720 EOF
6721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6722 { (eval echo configure:6723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6724 if test -z "$ac_err"; then
6725   rm -rf conftest*
6726   eval "ac_cv_header_$ac_safe=yes"
6727 else
6728   echo "$ac_err" >&5
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_header_$ac_safe=no"
6733 fi
6734 rm -f conftest*
6735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737   :
6738 else
6739   echo "$ac_t""no" 1>&6
6740 with_xauth=no
6741 fi
6742  }
6743 test -z "$with_xauth" && { 
6744 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6745 echo "configure:6746: checking for XauGetAuthByAddr in -lXau" >&5
6746 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6747
6748 xe_check_libs=" -lXau "
6749 cat > conftest.$ac_ext <<EOF
6750 #line 6751 "configure"
6751 #include "confdefs.h"
6752 /* Override any gcc2 internal prototype to avoid an error.  */
6753 /* We use char because int might match the return type of a gcc2
6754     builtin and then its argument prototype would still apply.  */
6755 char XauGetAuthByAddr();
6756
6757 int main() {
6758 XauGetAuthByAddr()
6759 ; return 0; }
6760 EOF
6761 if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=yes"
6764 else
6765   echo "configure: failed program was:" >&5
6766   cat conftest.$ac_ext >&5
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=no"
6769 fi
6770 rm -f conftest*
6771 xe_check_libs=""
6772
6773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6774   echo "$ac_t""yes" 1>&6
6775   :
6776 else
6777   echo "$ac_t""no" 1>&6
6778 with_xauth=no
6779 fi
6780
6781  }
6782 test -z "$with_xauth" && with_xauth=yes
6783 if test "$with_xauth" = "yes"; then
6784   { test "$extra_verbose" = "yes" && cat << \EOF
6785     Defining HAVE_XAUTH
6786 EOF
6787 cat >> confdefs.h <<\EOF
6788 #define HAVE_XAUTH 1
6789 EOF
6790 }
6791
6792   
6793 T=""
6794 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
6795 libs_xauth="$T"
6796
6797 fi
6798
6799
6800
6801
6802 if test "$with_tooltalk" != "no" ; then
6803       for dir in "" "Tt/" "desktop/" ; do
6804     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6805 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6806 echo "configure:6807: checking for ${dir}tt_c.h" >&5
6807
6808 cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 #include <${dir}tt_c.h>
6812 EOF
6813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6814 { (eval echo configure:6815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6816 if test -z "$ac_err"; then
6817   rm -rf conftest*
6818   eval "ac_cv_header_$ac_safe=yes"
6819 else
6820   echo "$ac_err" >&5
6821   echo "configure: failed program was:" >&5
6822   cat conftest.$ac_ext >&5
6823   rm -rf conftest*
6824   eval "ac_cv_header_$ac_safe=no"
6825 fi
6826 rm -f conftest*
6827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6828   echo "$ac_t""yes" 1>&6
6829   tt_c_h_file="${dir}tt_c.h"; break
6830 else
6831   echo "$ac_t""no" 1>&6
6832 fi
6833
6834   done
6835   if test -z "$tt_c_h_file"; then
6836     if test "$with_tooltalk" = "yes"; then
6837       (echo "$progname: Usage error:"
6838 echo " " "Unable to find required tooltalk header files."
6839 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6840     fi
6841     with_tooltalk=no
6842   fi
6843 fi
6844 if test "$with_tooltalk" != "no" ; then
6845   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6846     
6847 xe_msg_checking="for tt_message_create in -ltt"
6848 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6849 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6850 echo "configure:6851: checking "$xe_msg_checking"" >&5
6851 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6852
6853 xe_check_libs=" -ltt $extra_libs"
6854 cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char tt_message_create();
6861
6862 int main() {
6863 tt_message_create()
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6867   rm -rf conftest*
6868   eval "ac_cv_lib_$ac_lib_var=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_lib_$ac_lib_var=no"
6874 fi
6875 rm -f conftest*
6876 xe_check_libs=""
6877
6878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6879   echo "$ac_t""yes" 1>&6
6880   tt_libs="-ltt $extra_libs"; break
6881 else
6882   echo "$ac_t""no" 1>&6
6883 :
6884 fi
6885
6886
6887   done
6888   if test -z "$tt_libs"; then
6889     if test "$with_tooltalk" = "yes"; then
6890       (echo "$progname: Usage error:"
6891 echo " " "Unable to find required tooltalk libraries."
6892 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6893     fi
6894     with_tooltalk=no
6895   fi
6896 fi
6897 test -z "$with_tooltalk" && with_tooltalk=yes
6898 if test "$with_tooltalk" = "yes"; then
6899   { test "$extra_verbose" = "yes" && cat << \EOF
6900     Defining TOOLTALK
6901 EOF
6902 cat >> confdefs.h <<\EOF
6903 #define TOOLTALK 1
6904 EOF
6905 }
6906
6907   { test "$extra_verbose" = "yes" && cat << EOF
6908     Defining TT_C_H_FILE = "$tt_c_h_file"
6909 EOF
6910 cat >> confdefs.h <<EOF
6911 #define TT_C_H_FILE "$tt_c_h_file"
6912 EOF
6913 }
6914
6915   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6916   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6917    echo "    xemacs will be linked with \"tooltalk.o\""
6918  fi
6919 fi
6920
6921 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6922 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6923 echo "configure:6924: checking for Dt/Dt.h" >&5
6924
6925 cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 #include <Dt/Dt.h>
6929 EOF
6930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6931 { (eval echo configure:6932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6933 if test -z "$ac_err"; then
6934   rm -rf conftest*
6935   eval "ac_cv_header_$ac_safe=yes"
6936 else
6937   echo "$ac_err" >&5
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_header_$ac_safe=no"
6942 fi
6943 rm -f conftest*
6944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6945   echo "$ac_t""yes" 1>&6
6946   :
6947 else
6948   echo "$ac_t""no" 1>&6
6949 with_cde=no
6950 fi
6951  }
6952 test -z "$with_cde" && { 
6953 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6954 echo "configure:6955: checking for DtDndDragStart in -lDtSvc" >&5
6955 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6956
6957 xe_check_libs=" -lDtSvc "
6958 cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961 /* Override any gcc2 internal prototype to avoid an error.  */
6962 /* We use char because int might match the return type of a gcc2
6963     builtin and then its argument prototype would still apply.  */
6964 char DtDndDragStart();
6965
6966 int main() {
6967 DtDndDragStart()
6968 ; return 0; }
6969 EOF
6970 if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6971   rm -rf conftest*
6972   eval "ac_cv_lib_$ac_lib_var=yes"
6973 else
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -rf conftest*
6977   eval "ac_cv_lib_$ac_lib_var=no"
6978 fi
6979 rm -f conftest*
6980 xe_check_libs=""
6981
6982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6983   echo "$ac_t""yes" 1>&6
6984   :
6985 else
6986   echo "$ac_t""no" 1>&6
6987 with_cde=no
6988 fi
6989
6990  }
6991 test -z "$with_cde" && with_cde=yes
6992 if test "$with_dragndrop" = no; then
6993   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6994   with_cde=no
6995 fi
6996 if test "$with_cde" = "yes" ; then
6997   { test "$extra_verbose" = "yes" && cat << \EOF
6998     Defining HAVE_CDE
6999 EOF
7000 cat >> confdefs.h <<\EOF
7001 #define HAVE_CDE 1
7002 EOF
7003 }
7004
7005   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7006   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7007   with_tooltalk=yes # CDE requires Tooltalk
7008   need_motif=yes    # CDE requires Motif
7009 fi
7010
7011 test "$window_system" != "x11" && with_offix=no
7012 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7013   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7014   with_offix=no
7015 fi
7016 if test "$with_dragndrop" = no; then
7017   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7018   with_offix=no
7019 fi
7020 if test "$with_cde" = yes; then
7021   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7022   with_offix=no
7023 fi
7024 test -z "$with_offix" && with_offix=no
7025 if test "$with_offix" = "yes"; then
7026   { test "$extra_verbose" = "yes" && cat << \EOF
7027     Defining HAVE_OFFIX_DND
7028 EOF
7029 cat >> confdefs.h <<\EOF
7030 #define HAVE_OFFIX_DND 1
7031 EOF
7032 }
7033
7034   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7035   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7036 fi
7037
7038 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7039 echo "configure:7040: checking if drag and drop API is needed" >&5
7040 if test "$with_dragndrop" != "no" ; then
7041   if test -n "$dragndrop_proto" ; then
7042     with_dragndrop=yes
7043     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7044     { test "$extra_verbose" = "yes" && cat << \EOF
7045     Defining HAVE_DRAGNDROP
7046 EOF
7047 cat >> confdefs.h <<\EOF
7048 #define HAVE_DRAGNDROP 1
7049 EOF
7050 }
7051
7052     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7053   else
7054     with_dragndrop=no
7055     echo "$ac_t""no" 1>&6
7056   fi
7057 fi
7058
7059 echo "checking for LDAP" 1>&6
7060 echo "configure:7061: checking for LDAP" >&5
7061 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7062 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7063 echo "configure:7064: checking for ldap.h" >&5
7064
7065 cat > conftest.$ac_ext <<EOF
7066 #line 7067 "configure"
7067 #include "confdefs.h"
7068 #include <ldap.h>
7069 EOF
7070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7071 { (eval echo configure:7072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7073 if test -z "$ac_err"; then
7074   rm -rf conftest*
7075   eval "ac_cv_header_$ac_safe=yes"
7076 else
7077   echo "$ac_err" >&5
7078   echo "configure: failed program was:" >&5
7079   cat conftest.$ac_ext >&5
7080   rm -rf conftest*
7081   eval "ac_cv_header_$ac_safe=no"
7082 fi
7083 rm -f conftest*
7084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7085   echo "$ac_t""yes" 1>&6
7086   :
7087 else
7088   echo "$ac_t""no" 1>&6
7089 with_ldap=no
7090 fi
7091  }
7092 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7093 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7094 echo "configure:7095: checking for lber.h" >&5
7095
7096 cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099 #include <lber.h>
7100 EOF
7101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7102 { (eval echo configure:7103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7104 if test -z "$ac_err"; then
7105   rm -rf conftest*
7106   eval "ac_cv_header_$ac_safe=yes"
7107 else
7108   echo "$ac_err" >&5
7109   echo "configure: failed program was:" >&5
7110   cat conftest.$ac_ext >&5
7111   rm -rf conftest*
7112   eval "ac_cv_header_$ac_safe=no"
7113 fi
7114 rm -f conftest*
7115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7116   echo "$ac_t""yes" 1>&6
7117   :
7118 else
7119   echo "$ac_t""no" 1>&6
7120 with_ldap=no
7121 fi
7122  }
7123 if test "$with_ldap" != "no"; then
7124   
7125 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7126 echo "configure:7127: checking for ldap_search in -lldap" >&5
7127 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7128
7129 xe_check_libs=" -lldap "
7130 cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 /* Override any gcc2 internal prototype to avoid an error.  */
7134 /* We use char because int might match the return type of a gcc2
7135     builtin and then its argument prototype would still apply.  */
7136 char ldap_search();
7137
7138 int main() {
7139 ldap_search()
7140 ; return 0; }
7141 EOF
7142 if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7143   rm -rf conftest*
7144   eval "ac_cv_lib_$ac_lib_var=yes"
7145 else
7146   echo "configure: failed program was:" >&5
7147   cat conftest.$ac_ext >&5
7148   rm -rf conftest*
7149   eval "ac_cv_lib_$ac_lib_var=no"
7150 fi
7151 rm -f conftest*
7152 xe_check_libs=""
7153
7154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7155   echo "$ac_t""yes" 1>&6
7156   with_ldap_nolber=yes
7157 else
7158   echo "$ac_t""no" 1>&6
7159 with_ldap_nolber=no
7160 fi
7161
7162
7163   test "$with_ldap_nolber" = "no" && { 
7164 xe_msg_checking="for ldap_open in -lldap"
7165 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7166 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7167 echo "configure:7168: checking "$xe_msg_checking"" >&5
7168 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7169
7170 xe_check_libs=" -lldap -llber"
7171 cat > conftest.$ac_ext <<EOF
7172 #line 7173 "configure"
7173 #include "confdefs.h"
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 /* We use char because int might match the return type of a gcc2
7176     builtin and then its argument prototype would still apply.  */
7177 char ldap_open();
7178
7179 int main() {
7180 ldap_open()
7181 ; return 0; }
7182 EOF
7183 if { (eval echo configure:7184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7184   rm -rf conftest*
7185   eval "ac_cv_lib_$ac_lib_var=yes"
7186 else
7187   echo "configure: failed program was:" >&5
7188   cat conftest.$ac_ext >&5
7189   rm -rf conftest*
7190   eval "ac_cv_lib_$ac_lib_var=no"
7191 fi
7192 rm -f conftest*
7193 xe_check_libs=""
7194
7195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7196   echo "$ac_t""yes" 1>&6
7197   with_ldap_lber=yes
7198 else
7199   echo "$ac_t""no" 1>&6
7200 with_ldap_lber=no
7201 fi
7202
7203  }
7204   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7205 xe_msg_checking="for ldap_open in -lldap"
7206 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7207 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7208 echo "configure:7209: checking "$xe_msg_checking"" >&5
7209 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7210
7211 xe_check_libs=" -lldap -llber -lkrb"
7212 cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 /* Override any gcc2 internal prototype to avoid an error.  */
7216 /* We use char because int might match the return type of a gcc2
7217     builtin and then its argument prototype would still apply.  */
7218 char ldap_open();
7219
7220 int main() {
7221 ldap_open()
7222 ; return 0; }
7223 EOF
7224 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7225   rm -rf conftest*
7226   eval "ac_cv_lib_$ac_lib_var=yes"
7227 else
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -rf conftest*
7231   eval "ac_cv_lib_$ac_lib_var=no"
7232 fi
7233 rm -f conftest*
7234 xe_check_libs=""
7235
7236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7237   echo "$ac_t""yes" 1>&6
7238   with_ldap_krb=yes
7239 else
7240   echo "$ac_t""no" 1>&6
7241 with_ldap_krb=no
7242 fi
7243
7244  }
7245   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7246 xe_msg_checking="for ldap_open in -lldap"
7247 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7248 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7249 echo "configure:7250: checking "$xe_msg_checking"" >&5
7250 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7251
7252 xe_check_libs=" -lldap -llber -lkrb -ldes"
7253 cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* Override any gcc2 internal prototype to avoid an error.  */
7257 /* We use char because int might match the return type of a gcc2
7258     builtin and then its argument prototype would still apply.  */
7259 char ldap_open();
7260
7261 int main() {
7262 ldap_open()
7263 ; return 0; }
7264 EOF
7265 if { (eval echo configure:7266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7266   rm -rf conftest*
7267   eval "ac_cv_lib_$ac_lib_var=yes"
7268 else
7269   echo "configure: failed program was:" >&5
7270   cat conftest.$ac_ext >&5
7271   rm -rf conftest*
7272   eval "ac_cv_lib_$ac_lib_var=no"
7273 fi
7274 rm -f conftest*
7275 xe_check_libs=""
7276
7277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7278   echo "$ac_t""yes" 1>&6
7279   with_ldap_krbdes=yes
7280 else
7281   echo "$ac_t""no" 1>&6
7282 with_ldap_krbdes=no
7283 fi
7284
7285  }
7286   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
7287 fi
7288 if test "$with_ldap" = "yes"; then
7289   { test "$extra_verbose" = "yes" && cat << \EOF
7290     Defining HAVE_LDAP
7291 EOF
7292 cat >> confdefs.h <<\EOF
7293 #define HAVE_LDAP 1
7294 EOF
7295 }
7296
7297   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7298    echo "    xemacs will be linked with \"eldap.o\""
7299  fi
7300   if test "$with_ldap_nolber" = "yes" ; then
7301     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7302   else
7303     if test "$with_ldap_krb" = "yes" ; then
7304       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7305     fi
7306     if test "$with_ldap_krbdes" = "yes" ; then
7307       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7308       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7309     fi
7310     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7311     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7312   fi
7313   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7314 do
7315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7316 echo "configure:7317: checking for $ac_func" >&5
7317
7318 cat > conftest.$ac_ext <<EOF
7319 #line 7320 "configure"
7320 #include "confdefs.h"
7321 /* System header to define __stub macros and hopefully few prototypes,
7322     which can conflict with char $ac_func(); below.  */
7323 #include <assert.h>
7324 /* Override any gcc2 internal prototype to avoid an error.  */
7325 /* We use char because int might match the return type of a gcc2
7326     builtin and then its argument prototype would still apply.  */
7327 char $ac_func();
7328
7329 int main() {
7330
7331 /* The GNU C library defines this for functions which it implements
7332     to always fail with ENOSYS.  Some functions are actually named
7333     something starting with __ and the normal name is an alias.  */
7334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7335 choke me
7336 #else
7337 $ac_func();
7338 #endif
7339
7340 ; return 0; }
7341 EOF
7342 if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7343   rm -rf conftest*
7344   eval "ac_cv_func_$ac_func=yes"
7345 else
7346   echo "configure: failed program was:" >&5
7347   cat conftest.$ac_ext >&5
7348   rm -rf conftest*
7349   eval "ac_cv_func_$ac_func=no"
7350 fi
7351 rm -f conftest*
7352
7353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7354   echo "$ac_t""yes" 1>&6
7355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7356   { test "$extra_verbose" = "yes" && cat << EOF
7357     Defining $ac_tr_func
7358 EOF
7359 cat >> confdefs.h <<EOF
7360 #define $ac_tr_func 1
7361 EOF
7362 }
7363  
7364 else
7365   echo "$ac_t""no" 1>&6
7366 fi
7367 done
7368
7369 fi
7370
7371 if test "$with_postgresql" != "no"; then
7372   echo "checking for PostgreSQL" 1>&6
7373 echo "configure:7374: checking for PostgreSQL" >&5
7374
7375   for header_dir in "" "pgsql/" "postgresql/"; do
7376     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7377 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7378 echo "configure:7379: checking for ${header_dir}libpq-fe.h" >&5
7379
7380 cat > conftest.$ac_ext <<EOF
7381 #line 7382 "configure"
7382 #include "confdefs.h"
7383 #include <${header_dir}libpq-fe.h>
7384 EOF
7385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7386 { (eval echo configure:7387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7388 if test -z "$ac_err"; then
7389   rm -rf conftest*
7390   eval "ac_cv_header_$ac_safe=yes"
7391 else
7392   echo "$ac_err" >&5
7393   echo "configure: failed program was:" >&5
7394   cat conftest.$ac_ext >&5
7395   rm -rf conftest*
7396   eval "ac_cv_header_$ac_safe=no"
7397 fi
7398 rm -f conftest*
7399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7400   echo "$ac_t""yes" 1>&6
7401   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7402 else
7403   echo "$ac_t""no" 1>&6
7404 fi
7405
7406   done
7407
7408   test -n "$libpq_fe_h_file" && { 
7409 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7410 echo "configure:7411: checking for PQconnectdb in -lpq" >&5
7411 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7412
7413 xe_check_libs=" -lpq "
7414 cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 /* Override any gcc2 internal prototype to avoid an error.  */
7418 /* We use char because int might match the return type of a gcc2
7419     builtin and then its argument prototype would still apply.  */
7420 char PQconnectdb();
7421
7422 int main() {
7423 PQconnectdb()
7424 ; return 0; }
7425 EOF
7426 if { (eval echo configure:7427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7427   rm -rf conftest*
7428   eval "ac_cv_lib_$ac_lib_var=yes"
7429 else
7430   echo "configure: failed program was:" >&5
7431   cat conftest.$ac_ext >&5
7432   rm -rf conftest*
7433   eval "ac_cv_lib_$ac_lib_var=no"
7434 fi
7435 rm -f conftest*
7436 xe_check_libs=""
7437
7438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7439   echo "$ac_t""yes" 1>&6
7440   have_libpq=yes
7441 else
7442   echo "$ac_t""no" 1>&6
7443 fi
7444
7445  }
7446
7447   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7448     with_postgresql=yes
7449     { test "$extra_verbose" = "yes" && cat << \EOF
7450     Defining HAVE_POSTGRESQL
7451 EOF
7452 cat >> confdefs.h <<\EOF
7453 #define HAVE_POSTGRESQL 1
7454 EOF
7455 }
7456
7457     
7458 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7459 echo "configure:7460: checking for PQconnectStart in -lpq" >&5
7460 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7461
7462 xe_check_libs=" -lpq "
7463 cat > conftest.$ac_ext <<EOF
7464 #line 7465 "configure"
7465 #include "confdefs.h"
7466 /* Override any gcc2 internal prototype to avoid an error.  */
7467 /* We use char because int might match the return type of a gcc2
7468     builtin and then its argument prototype would still apply.  */
7469 char PQconnectStart();
7470
7471 int main() {
7472 PQconnectStart()
7473 ; return 0; }
7474 EOF
7475 if { (eval echo configure:7476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7476   rm -rf conftest*
7477   eval "ac_cv_lib_$ac_lib_var=yes"
7478 else
7479   echo "configure: failed program was:" >&5
7480   cat conftest.$ac_ext >&5
7481   rm -rf conftest*
7482   eval "ac_cv_lib_$ac_lib_var=no"
7483 fi
7484 rm -f conftest*
7485 xe_check_libs=""
7486
7487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7488   echo "$ac_t""yes" 1>&6
7489   with_postgresqlv7=yes;
7490                  { test "$extra_verbose" = "yes" && cat << \EOF
7491     Defining HAVE_POSTGRESQLV7
7492 EOF
7493 cat >> confdefs.h <<\EOF
7494 #define HAVE_POSTGRESQLV7 1
7495 EOF
7496 }
7497
7498 else
7499   echo "$ac_t""no" 1>&6
7500 fi
7501
7502
7503     { test "$extra_verbose" = "yes" && cat << EOF
7504     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7505 EOF
7506 cat >> confdefs.h <<EOF
7507 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7508 EOF
7509 }
7510
7511     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7512     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7513    echo "    xemacs will be linked with \"postgresql.o\""
7514  fi
7515   elif test "$with_postgresql" = "yes"; then
7516     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7517   fi
7518 fi
7519
7520
7521 if test "$window_system" != "none"; then
7522   echo "checking for graphics libraries" 1>&6
7523 echo "configure:7524: checking for graphics libraries" >&5
7524
7525     xpm_problem=""
7526   if test -z "$with_xpm"; then
7527     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7528 echo "configure:7529: checking for Xpm - no older than 3.4f" >&5
7529     xe_check_libs=-lXpm
7530     cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 #define XPM_NUMBERS
7534 #include <X11/xpm.h>
7535     int main(int c, char **v) {
7536     return c == 1 ? 0 :
7537       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7538       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7539 EOF
7540 if { (eval echo configure:7541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7541 then
7542   ./conftest dummy_arg; xpm_status=$?;
7543       if test "$xpm_status" = "0"; then
7544         with_xpm=yes;
7545       else
7546         with_xpm=no;
7547         if test "$xpm_status" = "1"; then
7548           xpm_problem="Xpm library version and header file version don't match!"
7549         elif test "$xpm_status" = "2"; then
7550           xpm_problem="Xpm library version is too old!"
7551         else
7552           xpm_problem="Internal xpm detection logic error!"
7553         fi
7554         echo "
7555 *** WARNING *** $xpm_problem
7556   I'm not touching that with a 10-foot pole!
7557   If you really want to use the installed version of Xpm, rerun
7558   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7559     fi
7560 else
7561   conftest_rc="$?"
7562   echo "configure: failed program was:" >&5
7563   cat conftest.$ac_ext >&5
7564   rm -fr conftest*
7565   with_xpm=no
7566 fi
7567 rm -fr conftest*
7568     xe_check_libs=
7569     echo "$ac_t""$with_xpm" 1>&6
7570   fi
7571   if test "$with_xpm" = "yes"; then
7572     { test "$extra_verbose" = "yes" && cat << \EOF
7573     Defining HAVE_XPM
7574 EOF
7575 cat >> confdefs.h <<\EOF
7576 #define HAVE_XPM 1
7577 EOF
7578 }
7579
7580     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7581     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7582 echo "configure:7583: checking for \"FOR_MSW\" xpm" >&5
7583     xe_check_libs=-lXpm
7584     cat > conftest.$ac_ext <<EOF
7585 #line 7586 "configure"
7586 #include "confdefs.h"
7587
7588 int main() {
7589 XpmCreatePixmapFromData()
7590 ; return 0; }
7591 EOF
7592 if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7593   rm -rf conftest*
7594   xpm_for_msw=no
7595 else
7596   echo "configure: failed program was:" >&5
7597   cat conftest.$ac_ext >&5
7598   rm -rf conftest*
7599   xpm_for_msw=yes
7600 fi
7601 rm -f conftest*
7602     xe_check_libs=
7603     echo "$ac_t""$xpm_for_msw" 1>&6
7604     if test "$xpm_for_msw" = "yes"; then
7605       { test "$extra_verbose" = "yes" && cat << \EOF
7606     Defining FOR_MSW
7607 EOF
7608 cat >> confdefs.h <<\EOF
7609 #define FOR_MSW 1
7610 EOF
7611 }
7612
7613     fi
7614   fi
7615
7616     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7617 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7618 echo "configure:7619: checking for compface.h" >&5
7619
7620 cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 #include <compface.h>
7624 EOF
7625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7626 { (eval echo configure:7627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7628 if test -z "$ac_err"; then
7629   rm -rf conftest*
7630   eval "ac_cv_header_$ac_safe=yes"
7631 else
7632   echo "$ac_err" >&5
7633   echo "configure: failed program was:" >&5
7634   cat conftest.$ac_ext >&5
7635   rm -rf conftest*
7636   eval "ac_cv_header_$ac_safe=no"
7637 fi
7638 rm -f conftest*
7639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7640   echo "$ac_t""yes" 1>&6
7641   :
7642 else
7643   echo "$ac_t""no" 1>&6
7644 with_xface=no
7645 fi
7646  }
7647   test -z "$with_xface" && { 
7648 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7649 echo "configure:7650: checking for UnGenFace in -lcompface" >&5
7650 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7651
7652 xe_check_libs=" -lcompface "
7653 cat > conftest.$ac_ext <<EOF
7654 #line 7655 "configure"
7655 #include "confdefs.h"
7656 /* Override any gcc2 internal prototype to avoid an error.  */
7657 /* We use char because int might match the return type of a gcc2
7658     builtin and then its argument prototype would still apply.  */
7659 char UnGenFace();
7660
7661 int main() {
7662 UnGenFace()
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7666   rm -rf conftest*
7667   eval "ac_cv_lib_$ac_lib_var=yes"
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -rf conftest*
7672   eval "ac_cv_lib_$ac_lib_var=no"
7673 fi
7674 rm -f conftest*
7675 xe_check_libs=""
7676
7677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7678   echo "$ac_t""yes" 1>&6
7679   : 
7680 else
7681   echo "$ac_t""no" 1>&6
7682 with_xface=no
7683 fi
7684
7685  }
7686   test -z "$with_xface" && with_xface=yes
7687   if test "$with_xface" = "yes"; then
7688     { test "$extra_verbose" = "yes" && cat << \EOF
7689     Defining HAVE_XFACE
7690 EOF
7691 cat >> confdefs.h <<\EOF
7692 #define HAVE_XFACE 1
7693 EOF
7694 }
7695
7696     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7697   fi
7698
7699         if test "$with_gif" != "no"; then
7700     with_gif="yes"
7701     { test "$extra_verbose" = "yes" && cat << \EOF
7702     Defining HAVE_GIF
7703 EOF
7704 cat >> confdefs.h <<\EOF
7705 #define HAVE_GIF 1
7706 EOF
7707 }
7708
7709     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7710    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7711  fi
7712   fi
7713
7714       if test "$with_png $with_tiff" != "no no"; then
7715     
7716 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7717 echo "configure:7718: checking for inflate in -lc" >&5
7718 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7719
7720 xe_check_libs=" -lc "
7721 cat > conftest.$ac_ext <<EOF
7722 #line 7723 "configure"
7723 #include "confdefs.h"
7724 /* Override any gcc2 internal prototype to avoid an error.  */
7725 /* We use char because int might match the return type of a gcc2
7726     builtin and then its argument prototype would still apply.  */
7727 char inflate();
7728
7729 int main() {
7730 inflate()
7731 ; return 0; }
7732 EOF
7733 if { (eval echo configure:7734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7734   rm -rf conftest*
7735   eval "ac_cv_lib_$ac_lib_var=yes"
7736 else
7737   echo "configure: failed program was:" >&5
7738   cat conftest.$ac_ext >&5
7739   rm -rf conftest*
7740   eval "ac_cv_lib_$ac_lib_var=no"
7741 fi
7742 rm -f conftest*
7743 xe_check_libs=""
7744
7745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7746   echo "$ac_t""yes" 1>&6
7747   :
7748 else
7749   echo "$ac_t""no" 1>&6
7750
7751 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7752 echo "configure:7753: checking for inflate in -lz" >&5
7753 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7754
7755 xe_check_libs=" -lz "
7756 cat > conftest.$ac_ext <<EOF
7757 #line 7758 "configure"
7758 #include "confdefs.h"
7759 /* Override any gcc2 internal prototype to avoid an error.  */
7760 /* We use char because int might match the return type of a gcc2
7761     builtin and then its argument prototype would still apply.  */
7762 char inflate();
7763
7764 int main() {
7765 inflate()
7766 ; return 0; }
7767 EOF
7768 if { (eval echo configure:7769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7769   rm -rf conftest*
7770   eval "ac_cv_lib_$ac_lib_var=yes"
7771 else
7772   echo "configure: failed program was:" >&5
7773   cat conftest.$ac_ext >&5
7774   rm -rf conftest*
7775   eval "ac_cv_lib_$ac_lib_var=no"
7776 fi
7777 rm -f conftest*
7778 xe_check_libs=""
7779
7780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7781   echo "$ac_t""yes" 1>&6
7782   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7783 else
7784   echo "$ac_t""no" 1>&6
7785
7786 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7787 echo "configure:7788: checking for inflate in -lgz" >&5
7788 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7789
7790 xe_check_libs=" -lgz "
7791 cat > conftest.$ac_ext <<EOF
7792 #line 7793 "configure"
7793 #include "confdefs.h"
7794 /* Override any gcc2 internal prototype to avoid an error.  */
7795 /* We use char because int might match the return type of a gcc2
7796     builtin and then its argument prototype would still apply.  */
7797 char inflate();
7798
7799 int main() {
7800 inflate()
7801 ; return 0; }
7802 EOF
7803 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7804   rm -rf conftest*
7805   eval "ac_cv_lib_$ac_lib_var=yes"
7806 else
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   eval "ac_cv_lib_$ac_lib_var=no"
7811 fi
7812 rm -f conftest*
7813 xe_check_libs=""
7814
7815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7816   echo "$ac_t""yes" 1>&6
7817   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7818 else
7819   echo "$ac_t""no" 1>&6
7820 fi
7821
7822
7823 fi
7824
7825
7826 fi
7827
7828
7829   fi
7830
7831     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7832 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7833 echo "configure:7834: checking for jpeglib.h" >&5
7834
7835 cat > conftest.$ac_ext <<EOF
7836 #line 7837 "configure"
7837 #include "confdefs.h"
7838 #include <jpeglib.h>
7839 EOF
7840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7841 { (eval echo configure:7842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7843 if test -z "$ac_err"; then
7844   rm -rf conftest*
7845   eval "ac_cv_header_$ac_safe=yes"
7846 else
7847   echo "$ac_err" >&5
7848   echo "configure: failed program was:" >&5
7849   cat conftest.$ac_ext >&5
7850   rm -rf conftest*
7851   eval "ac_cv_header_$ac_safe=no"
7852 fi
7853 rm -f conftest*
7854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7855   echo "$ac_t""yes" 1>&6
7856   :
7857 else
7858   echo "$ac_t""no" 1>&6
7859 with_jpeg=no
7860 fi
7861  }
7862   test -z "$with_jpeg" && { 
7863 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7864 echo "configure:7865: checking for jpeg_destroy_decompress in -ljpeg" >&5
7865 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7866
7867 xe_check_libs=" -ljpeg "
7868 cat > conftest.$ac_ext <<EOF
7869 #line 7870 "configure"
7870 #include "confdefs.h"
7871 /* Override any gcc2 internal prototype to avoid an error.  */
7872 /* We use char because int might match the return type of a gcc2
7873     builtin and then its argument prototype would still apply.  */
7874 char jpeg_destroy_decompress();
7875
7876 int main() {
7877 jpeg_destroy_decompress()
7878 ; return 0; }
7879 EOF
7880 if { (eval echo configure:7881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7881   rm -rf conftest*
7882   eval "ac_cv_lib_$ac_lib_var=yes"
7883 else
7884   echo "configure: failed program was:" >&5
7885   cat conftest.$ac_ext >&5
7886   rm -rf conftest*
7887   eval "ac_cv_lib_$ac_lib_var=no"
7888 fi
7889 rm -f conftest*
7890 xe_check_libs=""
7891
7892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7893   echo "$ac_t""yes" 1>&6
7894   :
7895 else
7896   echo "$ac_t""no" 1>&6
7897 with_jpeg=no
7898 fi
7899
7900  }
7901   test -z "$with_jpeg" && with_jpeg=yes
7902   if test "$with_jpeg" = "yes"; then
7903     { test "$extra_verbose" = "yes" && cat << \EOF
7904     Defining HAVE_JPEG
7905 EOF
7906 cat >> confdefs.h <<\EOF
7907 #define HAVE_JPEG 1
7908 EOF
7909 }
7910
7911     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7912   fi
7913
7914     png_problem=""
7915   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7916 echo "configure:7917: checking for pow" >&5
7917
7918 cat > conftest.$ac_ext <<EOF
7919 #line 7920 "configure"
7920 #include "confdefs.h"
7921 /* System header to define __stub macros and hopefully few prototypes,
7922     which can conflict with char pow(); below.  */
7923 #include <assert.h>
7924 /* Override any gcc2 internal prototype to avoid an error.  */
7925 /* We use char because int might match the return type of a gcc2
7926     builtin and then its argument prototype would still apply.  */
7927 char pow();
7928
7929 int main() {
7930
7931 /* The GNU C library defines this for functions which it implements
7932     to always fail with ENOSYS.  Some functions are actually named
7933     something starting with __ and the normal name is an alias.  */
7934 #if defined (__stub_pow) || defined (__stub___pow)
7935 choke me
7936 #else
7937 pow();
7938 #endif
7939
7940 ; return 0; }
7941 EOF
7942 if { (eval echo configure:7943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7943   rm -rf conftest*
7944   eval "ac_cv_func_pow=yes"
7945 else
7946   echo "configure: failed program was:" >&5
7947   cat conftest.$ac_ext >&5
7948   rm -rf conftest*
7949   eval "ac_cv_func_pow=no"
7950 fi
7951 rm -f conftest*
7952
7953 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7954   echo "$ac_t""yes" 1>&6
7955   :
7956 else
7957   echo "$ac_t""no" 1>&6
7958 with_png=no
7959 fi
7960  }
7961   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7962 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7963 echo "configure:7964: checking for png.h" >&5
7964
7965 cat > conftest.$ac_ext <<EOF
7966 #line 7967 "configure"
7967 #include "confdefs.h"
7968 #include <png.h>
7969 EOF
7970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7971 { (eval echo configure:7972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7973 if test -z "$ac_err"; then
7974   rm -rf conftest*
7975   eval "ac_cv_header_$ac_safe=yes"
7976 else
7977   echo "$ac_err" >&5
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   eval "ac_cv_header_$ac_safe=no"
7982 fi
7983 rm -f conftest*
7984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7985   echo "$ac_t""yes" 1>&6
7986   :
7987 else
7988   echo "$ac_t""no" 1>&6
7989 with_png=no
7990 fi
7991  }
7992   test -z "$with_png" && { 
7993 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7994 echo "configure:7995: checking for png_read_image in -lpng" >&5
7995 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7996
7997 xe_check_libs=" -lpng "
7998 cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* Override any gcc2 internal prototype to avoid an error.  */
8002 /* We use char because int might match the return type of a gcc2
8003     builtin and then its argument prototype would still apply.  */
8004 char png_read_image();
8005
8006 int main() {
8007 png_read_image()
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8011   rm -rf conftest*
8012   eval "ac_cv_lib_$ac_lib_var=yes"
8013 else
8014   echo "configure: failed program was:" >&5
8015   cat conftest.$ac_ext >&5
8016   rm -rf conftest*
8017   eval "ac_cv_lib_$ac_lib_var=no"
8018 fi
8019 rm -f conftest*
8020 xe_check_libs=""
8021
8022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8023   echo "$ac_t""yes" 1>&6
8024   :
8025 else
8026   echo "$ac_t""no" 1>&6
8027 with_png=no
8028 fi
8029
8030  }
8031   if test -z "$with_png"; then
8032     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8033 echo "configure:8034: checking for workable png version information" >&5
8034     xe_check_libs="-lpng -lz"
8035     cat > conftest.$ac_ext <<EOF
8036 #line 8037 "configure"
8037 #include "confdefs.h"
8038 #include <png.h>
8039     int main(int c, char **v) {
8040     if (c == 1) return 0;
8041     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8042     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8043 EOF
8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8045 then
8046   ./conftest dummy_arg; png_status=$?;
8047       if test "$png_status" = "0"; then
8048         with_png=yes;
8049       else
8050         with_png=no;
8051         if test "$png_status" = "1"; then
8052           png_problem="PNG library version and header file don't match!"
8053         elif test "$png_status" = "2"; then
8054           png_problem="PNG library version too old (pre 1.0.2)!"
8055         fi
8056         echo "
8057 *** WARNING *** $png_problem
8058   I'm not touching that with a 10-foot pole!
8059   If you really want to use the installed version of libPNG, rerun
8060   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8061     fi
8062 else
8063   conftest_rc="$?"
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -fr conftest*
8067   with_png=no
8068 fi
8069 rm -fr conftest*
8070     xe_check_libs=
8071     echo "$ac_t""$with_png" 1>&6
8072   fi
8073   if test "$with_png" = "yes"; then
8074     { test "$extra_verbose" = "yes" && cat << \EOF
8075     Defining HAVE_PNG
8076 EOF
8077 cat >> confdefs.h <<\EOF
8078 #define HAVE_PNG 1
8079 EOF
8080 }
8081
8082     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8083   fi
8084
8085     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8086 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8087 echo "configure:8088: checking for tiffio.h" >&5
8088
8089 cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 #include <tiffio.h>
8093 EOF
8094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8095 { (eval echo configure:8096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8097 if test -z "$ac_err"; then
8098   rm -rf conftest*
8099   eval "ac_cv_header_$ac_safe=yes"
8100 else
8101   echo "$ac_err" >&5
8102   echo "configure: failed program was:" >&5
8103   cat conftest.$ac_ext >&5
8104   rm -rf conftest*
8105   eval "ac_cv_header_$ac_safe=no"
8106 fi
8107 rm -f conftest*
8108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8109   echo "$ac_t""yes" 1>&6
8110   :
8111 else
8112   echo "$ac_t""no" 1>&6
8113 with_tiff=no
8114 fi
8115  }
8116   test -z "$with_tiff" && { 
8117 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8118 echo "configure:8119: checking for TIFFClientOpen in -ltiff" >&5
8119 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8120
8121 xe_check_libs=" -ltiff "
8122 cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 /* Override any gcc2 internal prototype to avoid an error.  */
8126 /* We use char because int might match the return type of a gcc2
8127     builtin and then its argument prototype would still apply.  */
8128 char TIFFClientOpen();
8129
8130 int main() {
8131 TIFFClientOpen()
8132 ; return 0; }
8133 EOF
8134 if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8135   rm -rf conftest*
8136   eval "ac_cv_lib_$ac_lib_var=yes"
8137 else
8138   echo "configure: failed program was:" >&5
8139   cat conftest.$ac_ext >&5
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=no"
8142 fi
8143 rm -f conftest*
8144 xe_check_libs=""
8145
8146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8147   echo "$ac_t""yes" 1>&6
8148   :
8149 else
8150   echo "$ac_t""no" 1>&6
8151 with_tiff=no
8152 fi
8153
8154  }
8155   test -z "$with_tiff" && with_tiff=yes
8156   if test "$with_tiff" = "yes"; then
8157     { test "$extra_verbose" = "yes" && cat << \EOF
8158     Defining HAVE_TIFF
8159 EOF
8160 cat >> confdefs.h <<\EOF
8161 #define HAVE_TIFF 1
8162 EOF
8163 }
8164
8165     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8166   fi
8167 fi
8168
8169
8170 if test "$with_x11" = "yes"; then
8171
8172   echo "checking for X11 graphics libraries" 1>&6
8173 echo "configure:8174: checking for X11 graphics libraries" >&5
8174
8175   echo "checking for the Athena widgets" 1>&6
8176 echo "configure:8177: checking for the Athena widgets" >&5
8177
8178     case "$with_athena" in
8179         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8180     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8181     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8182     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8183     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8184     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8185   esac
8186
8187     if test "$athena_3d" = "no"; then
8188     
8189 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8190 echo "configure:8191: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8191 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8192
8193 xe_check_libs=" -l$athena_variant "
8194 cat > conftest.$ac_ext <<EOF
8195 #line 8196 "configure"
8196 #include "confdefs.h"
8197 /* Override any gcc2 internal prototype to avoid an error.  */
8198 /* We use char because int might match the return type of a gcc2
8199     builtin and then its argument prototype would still apply.  */
8200 char XawScrollbarSetThumb();
8201
8202 int main() {
8203 XawScrollbarSetThumb()
8204 ; return 0; }
8205 EOF
8206 if { (eval echo configure:8207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8207   rm -rf conftest*
8208   eval "ac_cv_lib_$ac_lib_var=yes"
8209 else
8210   echo "configure: failed program was:" >&5
8211   cat conftest.$ac_ext >&5
8212   rm -rf conftest*
8213   eval "ac_cv_lib_$ac_lib_var=no"
8214 fi
8215 rm -f conftest*
8216 xe_check_libs=""
8217
8218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8219   echo "$ac_t""yes" 1>&6
8220           
8221 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8222 echo "configure:8223: checking for threeDClassRec in -l$athena_variant" >&5
8223 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8224
8225 xe_check_libs=" -l$athena_variant "
8226 cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* Override any gcc2 internal prototype to avoid an error.  */
8230 /* We use char because int might match the return type of a gcc2
8231     builtin and then its argument prototype would still apply.  */
8232 char threeDClassRec();
8233
8234 int main() {
8235 threeDClassRec()
8236 ; return 0; }
8237 EOF
8238 if { (eval echo configure:8239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8239   rm -rf conftest*
8240   eval "ac_cv_lib_$ac_lib_var=yes"
8241 else
8242   echo "configure: failed program was:" >&5
8243   cat conftest.$ac_ext >&5
8244   rm -rf conftest*
8245   eval "ac_cv_lib_$ac_lib_var=no"
8246 fi
8247 rm -f conftest*
8248 xe_check_libs=""
8249
8250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8251   echo "$ac_t""yes" 1>&6
8252   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8253 else
8254   echo "$ac_t""no" 1>&6
8255 athena_lib=$athena_variant
8256 fi
8257
8258
8259       
8260 else
8261   echo "$ac_t""no" 1>&6
8262 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8263 fi
8264
8265
8266   else
8267         
8268 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8269 echo "configure:8270: checking for threeDClassRec in -l$athena_variant" >&5
8270 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8271
8272 xe_check_libs=" -l$athena_variant "
8273 cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* Override any gcc2 internal prototype to avoid an error.  */
8277 /* We use char because int might match the return type of a gcc2
8278     builtin and then its argument prototype would still apply.  */
8279 char threeDClassRec();
8280
8281 int main() {
8282 threeDClassRec()
8283 ; return 0; }
8284 EOF
8285 if { (eval echo configure:8286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8286   rm -rf conftest*
8287   eval "ac_cv_lib_$ac_lib_var=yes"
8288 else
8289   echo "configure: failed program was:" >&5
8290   cat conftest.$ac_ext >&5
8291   rm -rf conftest*
8292   eval "ac_cv_lib_$ac_lib_var=no"
8293 fi
8294 rm -f conftest*
8295 xe_check_libs=""
8296
8297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8298   echo "$ac_t""yes" 1>&6
8299   athena_lib=$athena_variant
8300 else
8301   echo "$ac_t""no" 1>&6
8302 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8303 echo "configure:8304: checking for threeDClassRec in -lXaw" >&5
8304 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8305
8306 xe_check_libs=" -lXaw "
8307 cat > conftest.$ac_ext <<EOF
8308 #line 8309 "configure"
8309 #include "confdefs.h"
8310 /* Override any gcc2 internal prototype to avoid an error.  */
8311 /* We use char because int might match the return type of a gcc2
8312     builtin and then its argument prototype would still apply.  */
8313 char threeDClassRec();
8314
8315 int main() {
8316 threeDClassRec()
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8320   rm -rf conftest*
8321   eval "ac_cv_lib_$ac_lib_var=yes"
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   eval "ac_cv_lib_$ac_lib_var=no"
8327 fi
8328 rm -f conftest*
8329 xe_check_libs=""
8330
8331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8332   echo "$ac_t""yes" 1>&6
8333   athena_lib=Xaw;
8334           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8335         
8336 else
8337   echo "$ac_t""no" 1>&6
8338 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8339 fi
8340
8341
8342 fi
8343
8344
8345   fi
8346
8347     if test "$athena_3d" = "no"; then
8348     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8349 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8350 echo "configure:8351: checking for X11/Xaw/ThreeD.h" >&5
8351
8352 cat > conftest.$ac_ext <<EOF
8353 #line 8354 "configure"
8354 #include "confdefs.h"
8355 #include <X11/Xaw/ThreeD.h>
8356 EOF
8357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8358 { (eval echo configure:8359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8360 if test -z "$ac_err"; then
8361   rm -rf conftest*
8362   eval "ac_cv_header_$ac_safe=yes"
8363 else
8364   echo "$ac_err" >&5
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   eval "ac_cv_header_$ac_safe=no"
8369 fi
8370 rm -f conftest*
8371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8372   echo "$ac_t""yes" 1>&6
8373   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8374 else
8375   echo "$ac_t""no" 1>&6
8376 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8377 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8378 echo "configure:8379: checking for X11/Xaw/XawInit.h" >&5
8379
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 #include <X11/Xaw/XawInit.h>
8384 EOF
8385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8386 { (eval echo configure:8387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8388 if test -z "$ac_err"; then
8389   rm -rf conftest*
8390   eval "ac_cv_header_$ac_safe=yes"
8391 else
8392   echo "$ac_err" >&5
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   eval "ac_cv_header_$ac_safe=no"
8397 fi
8398 rm -f conftest*
8399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8400   echo "$ac_t""yes" 1>&6
8401   athena_h_path=X11/Xaw
8402 else
8403   echo "$ac_t""no" 1>&6
8404 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8405 fi
8406
8407 fi
8408
8409   else
8410             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8411 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8412 echo "configure:8413: checking for X11/$athena_variant/XawInit.h" >&5
8413
8414 cat > conftest.$ac_ext <<EOF
8415 #line 8416 "configure"
8416 #include "confdefs.h"
8417 #include <X11/$athena_variant/XawInit.h>
8418 EOF
8419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8420 { (eval echo configure:8421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8422 if test -z "$ac_err"; then
8423   rm -rf conftest*
8424   eval "ac_cv_header_$ac_safe=yes"
8425 else
8426   echo "$ac_err" >&5
8427   echo "configure: failed program was:" >&5
8428   cat conftest.$ac_ext >&5
8429   rm -rf conftest*
8430   eval "ac_cv_header_$ac_safe=no"
8431 fi
8432 rm -f conftest*
8433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8434   echo "$ac_t""yes" 1>&6
8435   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8436 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8437 echo "configure:8438: checking for X11/$athena_variant/ThreeD.h" >&5
8438
8439 cat > conftest.$ac_ext <<EOF
8440 #line 8441 "configure"
8441 #include "confdefs.h"
8442 #include <X11/$athena_variant/ThreeD.h>
8443 EOF
8444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8445 { (eval echo configure:8446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8447 if test -z "$ac_err"; then
8448   rm -rf conftest*
8449   eval "ac_cv_header_$ac_safe=yes"
8450 else
8451   echo "$ac_err" >&5
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -rf conftest*
8455   eval "ac_cv_header_$ac_safe=no"
8456 fi
8457 rm -f conftest*
8458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8459   echo "$ac_t""yes" 1>&6
8460   athena_h_path=X11/$athena_variant
8461 else
8462   echo "$ac_t""no" 1>&6
8463 fi
8464
8465 else
8466   echo "$ac_t""no" 1>&6
8467 fi
8468
8469
8470         if test -z "$athena_h_path"; then
8471       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8472 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8473 echo "configure:8474: checking for $athena_variant/XawInit.h" >&5
8474
8475 cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 #include <$athena_variant/XawInit.h>
8479 EOF
8480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8481 { (eval echo configure:8482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8483 if test -z "$ac_err"; then
8484   rm -rf conftest*
8485   eval "ac_cv_header_$ac_safe=yes"
8486 else
8487   echo "$ac_err" >&5
8488   echo "configure: failed program was:" >&5
8489   cat conftest.$ac_ext >&5
8490   rm -rf conftest*
8491   eval "ac_cv_header_$ac_safe=no"
8492 fi
8493 rm -f conftest*
8494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8495   echo "$ac_t""yes" 1>&6
8496   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8497 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8498 echo "configure:8499: checking for $athena_variant/ThreeD.h" >&5
8499
8500 cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503 #include <$athena_variant/ThreeD.h>
8504 EOF
8505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8506 { (eval echo configure:8507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8508 if test -z "$ac_err"; then
8509   rm -rf conftest*
8510   eval "ac_cv_header_$ac_safe=yes"
8511 else
8512   echo "$ac_err" >&5
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   eval "ac_cv_header_$ac_safe=no"
8517 fi
8518 rm -f conftest*
8519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8520   echo "$ac_t""yes" 1>&6
8521   athena_h_path=$athena_variant
8522 else
8523   echo "$ac_t""no" 1>&6
8524 fi
8525
8526 else
8527   echo "$ac_t""no" 1>&6
8528 fi
8529
8530     fi
8531
8532         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8533       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8534 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8535 echo "configure:8536: checking for X11/Xaw3d/XawInit.h" >&5
8536
8537 cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 #include <X11/Xaw3d/XawInit.h>
8541 EOF
8542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8543 { (eval echo configure:8544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8545 if test -z "$ac_err"; then
8546   rm -rf conftest*
8547   eval "ac_cv_header_$ac_safe=yes"
8548 else
8549   echo "$ac_err" >&5
8550   echo "configure: failed program was:" >&5
8551   cat conftest.$ac_ext >&5
8552   rm -rf conftest*
8553   eval "ac_cv_header_$ac_safe=no"
8554 fi
8555 rm -f conftest*
8556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8557   echo "$ac_t""yes" 1>&6
8558   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8559 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8560 echo "configure:8561: checking for X11/Xaw3d/ThreeD.h" >&5
8561
8562 cat > conftest.$ac_ext <<EOF
8563 #line 8564 "configure"
8564 #include "confdefs.h"
8565 #include <X11/Xaw3d/ThreeD.h>
8566 EOF
8567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8568 { (eval echo configure:8569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8570 if test -z "$ac_err"; then
8571   rm -rf conftest*
8572   eval "ac_cv_header_$ac_safe=yes"
8573 else
8574   echo "$ac_err" >&5
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   eval "ac_cv_header_$ac_safe=no"
8579 fi
8580 rm -f conftest*
8581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8582   echo "$ac_t""yes" 1>&6
8583   
8584             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8585             athena_h_path=X11/Xaw3d
8586           
8587 else
8588   echo "$ac_t""no" 1>&6
8589 fi
8590
8591 else
8592   echo "$ac_t""no" 1>&6
8593 fi
8594
8595     fi
8596
8597         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8598       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8599 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8600 echo "configure:8601: checking for Xaw3d/XawInit.h" >&5
8601
8602 cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 #include <Xaw3d/XawInit.h>
8606 EOF
8607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8608 { (eval echo configure:8609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8610 if test -z "$ac_err"; then
8611   rm -rf conftest*
8612   eval "ac_cv_header_$ac_safe=yes"
8613 else
8614   echo "$ac_err" >&5
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -rf conftest*
8618   eval "ac_cv_header_$ac_safe=no"
8619 fi
8620 rm -f conftest*
8621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8622   echo "$ac_t""yes" 1>&6
8623   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8624 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8625 echo "configure:8626: checking for Xaw3d/ThreeD.h" >&5
8626
8627 cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 #include <Xaw3d/ThreeD.h>
8631 EOF
8632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8633 { (eval echo configure:8634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8635 if test -z "$ac_err"; then
8636   rm -rf conftest*
8637   eval "ac_cv_header_$ac_safe=yes"
8638 else
8639   echo "$ac_err" >&5
8640   echo "configure: failed program was:" >&5
8641   cat conftest.$ac_ext >&5
8642   rm -rf conftest*
8643   eval "ac_cv_header_$ac_safe=no"
8644 fi
8645 rm -f conftest*
8646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8647   echo "$ac_t""yes" 1>&6
8648   
8649             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8650             athena_h_path=Xaw3d
8651           
8652 else
8653   echo "$ac_t""no" 1>&6
8654 fi
8655
8656 else
8657   echo "$ac_t""no" 1>&6
8658 fi
8659
8660     fi
8661
8662             if test -z "$athena_h_path"; then
8663       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8664 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8665 echo "configure:8666: checking for X11/Xaw/ThreeD.h" >&5
8666
8667 cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 #include <X11/Xaw/ThreeD.h>
8671 EOF
8672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8673 { (eval echo configure:8674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8675 if test -z "$ac_err"; then
8676   rm -rf conftest*
8677   eval "ac_cv_header_$ac_safe=yes"
8678 else
8679   echo "$ac_err" >&5
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   eval "ac_cv_header_$ac_safe=no"
8684 fi
8685 rm -f conftest*
8686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8687   echo "$ac_t""yes" 1>&6
8688   
8689           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8690           athena_h_path=X11/Xaw
8691         
8692 else
8693   echo "$ac_t""no" 1>&6
8694 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8695 fi
8696
8697     fi
8698   fi
8699
8700     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8701     have_xaw=yes
8702   else
8703     have_xaw=no
8704   fi
8705
8706     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8707 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8708 echo "configure:8709: checking for Xm/Xm.h" >&5
8709
8710 cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8713 #include <Xm/Xm.h>
8714 EOF
8715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8716 { (eval echo configure:8717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8718 if test -z "$ac_err"; then
8719   rm -rf conftest*
8720   eval "ac_cv_header_$ac_safe=yes"
8721 else
8722   echo "$ac_err" >&5
8723   echo "configure: failed program was:" >&5
8724   cat conftest.$ac_ext >&5
8725   rm -rf conftest*
8726   eval "ac_cv_header_$ac_safe=no"
8727 fi
8728 rm -f conftest*
8729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8730   echo "$ac_t""yes" 1>&6
8731   
8732 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8733 echo "configure:8734: checking for XmStringFree in -lXm" >&5
8734 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8735
8736 xe_check_libs=" -lXm "
8737 cat > conftest.$ac_ext <<EOF
8738 #line 8739 "configure"
8739 #include "confdefs.h"
8740 /* Override any gcc2 internal prototype to avoid an error.  */
8741 /* We use char because int might match the return type of a gcc2
8742     builtin and then its argument prototype would still apply.  */
8743 char XmStringFree();
8744
8745 int main() {
8746 XmStringFree()
8747 ; return 0; }
8748 EOF
8749 if { (eval echo configure:8750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8750   rm -rf conftest*
8751   eval "ac_cv_lib_$ac_lib_var=yes"
8752 else
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -rf conftest*
8756   eval "ac_cv_lib_$ac_lib_var=no"
8757 fi
8758 rm -f conftest*
8759 xe_check_libs=""
8760
8761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8762   echo "$ac_t""yes" 1>&6
8763   have_motif=yes
8764 else
8765   echo "$ac_t""no" 1>&6
8766 have_motif=no
8767 fi
8768
8769
8770 else
8771   echo "$ac_t""no" 1>&6
8772 have_motif=no
8773 fi
8774
8775
8776   if test "$have_motif" = "yes"; then
8777         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8778 echo "configure:8779: checking for Lesstif" >&5
8779     cat > conftest.$ac_ext <<EOF
8780 #line 8781 "configure"
8781 #include "confdefs.h"
8782 #include <Xm/Xm.h>
8783 #ifdef LESSTIF_VERSION
8784 yes
8785 #endif
8786
8787 EOF
8788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8789   egrep "yes" >/dev/null 2>&1; then
8790   rm -rf conftest*
8791   have_lesstif=yes
8792 else
8793   rm -rf conftest*
8794   have_lesstif=no
8795 fi
8796 rm -f conftest*
8797
8798   echo "$ac_t""$have_lesstif" 1>&6
8799   fi
8800
8801 fi 
8802
8803 case "$with_menubars" in "" | "yes" | "athena" )
8804   with_menubars="lucid" ;;
8805 esac
8806 case "$with_dialogs" in "" | "yes" | "lucid" )
8807   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8808   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8809   else with_dialogs=no
8810   fi ;;
8811 esac
8812 case "$with_scrollbars" in "" | "yes" )
8813   with_scrollbars="lucid" ;;
8814 esac
8815 case "$with_widgets" in "" | "yes" | "lucid")
8816   if   test "$have_motif" = "yes"; then with_widgets="motif"
8817   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8818   else with_widgets=no
8819   fi ;;
8820 esac
8821
8822 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8823
8824 case "$all_widgets" in
8825   *athena* )
8826     if test "$have_xaw" != "yes"; then
8827       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8828     fi
8829
8830         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8831
8832         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8833
8834                     { test "$extra_verbose" = "yes" && cat << EOF
8835     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8836 EOF
8837 cat >> confdefs.h <<EOF
8838 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8839 EOF
8840 }
8841
8842     { test "$extra_verbose" = "yes" && cat << EOF
8843     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8844 EOF
8845 cat >> confdefs.h <<EOF
8846 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8847 EOF
8848 }
8849
8850     { test "$extra_verbose" = "yes" && cat << EOF
8851     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8852 EOF
8853 cat >> confdefs.h <<EOF
8854 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8855 EOF
8856 }
8857
8858     { test "$extra_verbose" = "yes" && cat << EOF
8859     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8860 EOF
8861 cat >> confdefs.h <<EOF
8862 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8863 EOF
8864 }
8865
8866     { test "$extra_verbose" = "yes" && cat << EOF
8867     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8868 EOF
8869 cat >> confdefs.h <<EOF
8870 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8871 EOF
8872 }
8873
8874     { test "$extra_verbose" = "yes" && cat << EOF
8875     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8876 EOF
8877 cat >> confdefs.h <<EOF
8878 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8879 EOF
8880 }
8881
8882     { test "$extra_verbose" = "yes" && cat << EOF
8883     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8884 EOF
8885 cat >> confdefs.h <<EOF
8886 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8887 EOF
8888 }
8889
8890     { test "$extra_verbose" = "yes" && cat << EOF
8891     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8892 EOF
8893 cat >> confdefs.h <<EOF
8894 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8895 EOF
8896 }
8897
8898     { test "$extra_verbose" = "yes" && cat << EOF
8899     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8900 EOF
8901 cat >> confdefs.h <<EOF
8902 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8903 EOF
8904 }
8905
8906     { test "$extra_verbose" = "yes" && cat << EOF
8907     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8908 EOF
8909 cat >> confdefs.h <<EOF
8910 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8911 EOF
8912 }
8913
8914
8915     { test "$extra_verbose" = "yes" && cat << \EOF
8916     Defining LWLIB_USES_ATHENA
8917 EOF
8918 cat >> confdefs.h <<\EOF
8919 #define LWLIB_USES_ATHENA 1
8920 EOF
8921 }
8922
8923     { test "$extra_verbose" = "yes" && cat << \EOF
8924     Defining NEED_ATHENA
8925 EOF
8926 cat >> confdefs.h <<\EOF
8927 #define NEED_ATHENA 1
8928 EOF
8929 }
8930
8931     need_athena="yes"
8932
8933     if test "$athena_3d" = "yes"; then
8934       { test "$extra_verbose" = "yes" && cat << \EOF
8935     Defining HAVE_ATHENA_3D
8936 EOF
8937 cat >> confdefs.h <<\EOF
8938 #define HAVE_ATHENA_3D 1
8939 EOF
8940 }
8941
8942     fi
8943   ;;
8944 esac
8945
8946 case "$all_widgets" in *motif* )
8947   { test "$extra_verbose" = "yes" && cat << \EOF
8948     Defining LWLIB_USES_MOTIF
8949 EOF
8950 cat >> confdefs.h <<\EOF
8951 #define LWLIB_USES_MOTIF 1
8952 EOF
8953 }
8954
8955   { test "$extra_verbose" = "yes" && cat << \EOF
8956     Defining NEED_MOTIF
8957 EOF
8958 cat >> confdefs.h <<\EOF
8959 #define NEED_MOTIF 1
8960 EOF
8961 }
8962
8963   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8964   need_motif=yes ;;
8965 esac
8966
8967 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8968 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8969 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8970 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8971         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8972 case "$with_widgets" in athena* )
8973         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;;
8974 esac
8975 case "$all_widgets" in *lucid* )
8976   { test "$extra_verbose" = "yes" && cat << \EOF
8977     Defining NEED_LUCID
8978 EOF
8979 cat >> confdefs.h <<\EOF
8980 #define NEED_LUCID 1
8981 EOF
8982 }
8983
8984   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8985 esac
8986
8987
8988
8989 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8990     Defining LWLIB_SCROLLBARS_ATHENA
8991 EOF
8992 cat >> confdefs.h <<\EOF
8993 #define LWLIB_SCROLLBARS_ATHENA 1
8994 EOF
8995 }
8996
8997 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8998     Defining LWLIB_DIALOGS_ATHENA
8999 EOF
9000 cat >> confdefs.h <<\EOF
9001 #define LWLIB_DIALOGS_ATHENA 1
9002 EOF
9003 }
9004
9005
9006 if test "$athena_3d" = "yes"; then
9007   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9008     Defining LWLIB_SCROLLBARS_ATHENA3D
9009 EOF
9010 cat >> confdefs.h <<\EOF
9011 #define LWLIB_SCROLLBARS_ATHENA3D 1
9012 EOF
9013 }
9014
9015   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9016     Defining LWLIB_DIALOGS_ATHENA3D
9017 EOF
9018 cat >> confdefs.h <<\EOF
9019 #define LWLIB_DIALOGS_ATHENA3D 1
9020 EOF
9021 }
9022
9023 fi
9024
9025 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9026     Defining LWLIB_WIDGETS_ATHENA
9027 EOF
9028 cat >> confdefs.h <<\EOF
9029 #define LWLIB_WIDGETS_ATHENA 1
9030 EOF
9031 }
9032 ;; esac
9033 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9034         { test "$extra_verbose" = "yes" && cat << \EOF
9035     Defining LWLIB_TABS_LUCID
9036 EOF
9037 cat >> confdefs.h <<\EOF
9038 #define LWLIB_TABS_LUCID 1
9039 EOF
9040 }
9041
9042
9043 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9044     Defining HAVE_MENUBARS
9045 EOF
9046 cat >> confdefs.h <<\EOF
9047 #define HAVE_MENUBARS 1
9048 EOF
9049 }
9050
9051 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9052     Defining HAVE_SCROLLBARS
9053 EOF
9054 cat >> confdefs.h <<\EOF
9055 #define HAVE_SCROLLBARS 1
9056 EOF
9057 }
9058
9059 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9060     Defining HAVE_DIALOGS
9061 EOF
9062 cat >> confdefs.h <<\EOF
9063 #define HAVE_DIALOGS 1
9064 EOF
9065 }
9066
9067 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9068     Defining HAVE_TOOLBARS
9069 EOF
9070 cat >> confdefs.h <<\EOF
9071 #define HAVE_TOOLBARS 1
9072 EOF
9073 }
9074
9075 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9076     Defining HAVE_WIDGETS
9077 EOF
9078 cat >> confdefs.h <<\EOF
9079 #define HAVE_WIDGETS 1
9080 EOF
9081 }
9082
9083
9084 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9085     Defining LWLIB_MENUBARS_LUCID
9086 EOF
9087 cat >> confdefs.h <<\EOF
9088 #define LWLIB_MENUBARS_LUCID 1
9089 EOF
9090 }
9091
9092 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9093     Defining LWLIB_SCROLLBARS_LUCID
9094 EOF
9095 cat >> confdefs.h <<\EOF
9096 #define LWLIB_SCROLLBARS_LUCID 1
9097 EOF
9098 }
9099
9100
9101 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9102     Defining LWLIB_MENUBARS_MOTIF
9103 EOF
9104 cat >> confdefs.h <<\EOF
9105 #define LWLIB_MENUBARS_MOTIF 1
9106 EOF
9107 }
9108
9109 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9110     Defining LWLIB_SCROLLBARS_MOTIF
9111 EOF
9112 cat >> confdefs.h <<\EOF
9113 #define LWLIB_SCROLLBARS_MOTIF 1
9114 EOF
9115 }
9116
9117 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9118     Defining LWLIB_DIALOGS_MOTIF
9119 EOF
9120 cat >> confdefs.h <<\EOF
9121 #define LWLIB_DIALOGS_MOTIF 1
9122 EOF
9123 }
9124
9125 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9126     Defining LWLIB_WIDGETS_MOTIF
9127 EOF
9128 cat >> confdefs.h <<\EOF
9129 #define LWLIB_WIDGETS_MOTIF 1
9130 EOF
9131 }
9132
9133
9134 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9135    echo "    xemacs will be linked with \"menubar.o\""
9136  fi
9137 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9138    echo "    xemacs will be linked with \"scrollbar.o\""
9139  fi
9140 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9141    echo "    xemacs will be linked with \"dialog.o\""
9142  fi
9143 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9144    echo "    xemacs will be linked with \"toolbar.o\""
9145  fi
9146
9147 if test "$with_x11" = "yes"; then
9148   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9149    echo "    xemacs will be linked with \"menubar-x.o\""
9150  fi
9151   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9152    echo "    xemacs will be linked with \"scrollbar-x.o\""
9153  fi
9154   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9155    echo "    xemacs will be linked with \"dialog-x.o\""
9156  fi
9157   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9158    echo "    xemacs will be linked with \"toolbar-x.o\""
9159  fi
9160   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9161    echo "    xemacs will be linked with \"gui-x.o\""
9162  fi
9163 fi
9164
9165
9166 test -z "$with_mule" && with_mule=no
9167 test -z "$with_file_coding" && with_file_coding=no
9168
9169
9170 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9171   { test "$extra_verbose" = "yes" && cat << \EOF
9172     Defining FILE_CODING
9173 EOF
9174 cat >> confdefs.h <<\EOF
9175 #define FILE_CODING 1
9176 EOF
9177 }
9178
9179   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9180    echo "    xemacs will be linked with \"file-coding.o\""
9181  fi
9182 fi
9183
9184 if test "$with_mule" = "yes" ; then
9185   echo "checking for Mule-related features" 1>&6
9186 echo "configure:9187: checking for Mule-related features" >&5
9187   { test "$extra_verbose" = "yes" && cat << \EOF
9188     Defining MULE
9189 EOF
9190 cat >> confdefs.h <<\EOF
9191 #define MULE 1
9192 EOF
9193 }
9194
9195   { test "$extra_verbose" = "yes" && cat << \EOF
9196     Defining FILE_CODING
9197 EOF
9198 cat >> confdefs.h <<\EOF
9199 #define FILE_CODING 1
9200 EOF
9201 }
9202
9203   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9204    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9205  fi
9206   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9207     { test "$extra_verbose" = "yes" && cat << \EOF
9208     Defining TEXT_CODING
9209 EOF
9210 cat >> confdefs.h <<\EOF
9211 #define TEXT_CODING 1
9212 EOF
9213 }
9214
9215     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9216    echo "    xemacs will be linked with \"text-coding.o\""
9217  fi
9218   else
9219     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9220    echo "    xemacs will be linked with \"file-coding.o\""
9221  fi
9222   fi
9223     for ac_hdr in libintl.h
9224 do
9225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9227 echo "configure:9228: checking for $ac_hdr" >&5
9228
9229 cat > conftest.$ac_ext <<EOF
9230 #line 9231 "configure"
9231 #include "confdefs.h"
9232 #include <$ac_hdr>
9233 EOF
9234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9235 { (eval echo configure:9236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9237 if test -z "$ac_err"; then
9238   rm -rf conftest*
9239   eval "ac_cv_header_$ac_safe=yes"
9240 else
9241   echo "$ac_err" >&5
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -rf conftest*
9245   eval "ac_cv_header_$ac_safe=no"
9246 fi
9247 rm -f conftest*
9248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9249   echo "$ac_t""yes" 1>&6
9250     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9251   { test "$extra_verbose" = "yes" && cat << EOF
9252     Defining $ac_tr_hdr
9253 EOF
9254 cat >> confdefs.h <<EOF
9255 #define $ac_tr_hdr 1
9256 EOF
9257 }
9258  
9259 else
9260   echo "$ac_t""no" 1>&6
9261 fi
9262 done
9263
9264   
9265 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9266 echo "configure:9267: checking for strerror in -lintl" >&5
9267 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9268
9269 xe_check_libs=" -lintl "
9270 cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 /* Override any gcc2 internal prototype to avoid an error.  */
9274 /* We use char because int might match the return type of a gcc2
9275     builtin and then its argument prototype would still apply.  */
9276 char strerror();
9277
9278 int main() {
9279 strerror()
9280 ; return 0; }
9281 EOF
9282 if { (eval echo configure:9283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9283   rm -rf conftest*
9284   eval "ac_cv_lib_$ac_lib_var=yes"
9285 else
9286   echo "configure: failed program was:" >&5
9287   cat conftest.$ac_ext >&5
9288   rm -rf conftest*
9289   eval "ac_cv_lib_$ac_lib_var=no"
9290 fi
9291 rm -f conftest*
9292 xe_check_libs=""
9293
9294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9295   echo "$ac_t""yes" 1>&6
9296     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9298   { test "$extra_verbose" = "yes" && cat << EOF
9299     Defining $ac_tr_lib
9300 EOF
9301 cat >> confdefs.h <<EOF
9302 #define $ac_tr_lib 1
9303 EOF
9304 }
9305
9306   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9307
9308 else
9309   echo "$ac_t""no" 1>&6
9310 fi
9311
9312
9313
9314   if test "$with_utf_2000" = "yes" ; then
9315     { test "$extra_verbose" = "yes" && cat << \EOF
9316     Defining CHAR_IS_UCS4
9317 EOF
9318 cat >> confdefs.h <<\EOF
9319 #define CHAR_IS_UCS4 1
9320 EOF
9321 }
9322
9323     { test "$extra_verbose" = "yes" && cat << \EOF
9324     Defining UTF2000
9325 EOF
9326 cat >> confdefs.h <<\EOF
9327 #define UTF2000 1
9328 EOF
9329 }
9330
9331     { test "$extra_verbose" = "yes" && cat << \EOF
9332     Defining HAVE_GGC
9333 EOF
9334 cat >> confdefs.h <<\EOF
9335 #define HAVE_GGC 1
9336 EOF
9337 }
9338
9339   fi
9340
9341   echo "checking for Mule input methods" 1>&6
9342 echo "configure:9343: checking for Mule input methods" >&5
9343         case "$with_xim" in "" | "yes" )
9344     echo "checking for XIM" 1>&6
9345 echo "configure:9346: checking for XIM" >&5
9346     
9347 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9348 echo "configure:9349: checking for XOpenIM in -lX11" >&5
9349 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9350
9351 xe_check_libs=" -lX11 "
9352 cat > conftest.$ac_ext <<EOF
9353 #line 9354 "configure"
9354 #include "confdefs.h"
9355 /* Override any gcc2 internal prototype to avoid an error.  */
9356 /* We use char because int might match the return type of a gcc2
9357     builtin and then its argument prototype would still apply.  */
9358 char XOpenIM();
9359
9360 int main() {
9361 XOpenIM()
9362 ; return 0; }
9363 EOF
9364 if { (eval echo configure:9365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9365   rm -rf conftest*
9366   eval "ac_cv_lib_$ac_lib_var=yes"
9367 else
9368   echo "configure: failed program was:" >&5
9369   cat conftest.$ac_ext >&5
9370   rm -rf conftest*
9371   eval "ac_cv_lib_$ac_lib_var=no"
9372 fi
9373 rm -f conftest*
9374 xe_check_libs=""
9375
9376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9377   echo "$ac_t""yes" 1>&6
9378   with_xim=xlib
9379 else
9380   echo "$ac_t""no" 1>&6
9381 with_xim=no
9382 fi
9383
9384
9385         if test "$have_motif $have_lesstif" = "yes no"; then
9386       
9387 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9388 echo "configure:9389: checking for XmImMbLookupString in -lXm" >&5
9389 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9390
9391 xe_check_libs=" -lXm "
9392 cat > conftest.$ac_ext <<EOF
9393 #line 9394 "configure"
9394 #include "confdefs.h"
9395 /* Override any gcc2 internal prototype to avoid an error.  */
9396 /* We use char because int might match the return type of a gcc2
9397     builtin and then its argument prototype would still apply.  */
9398 char XmImMbLookupString();
9399
9400 int main() {
9401 XmImMbLookupString()
9402 ; return 0; }
9403 EOF
9404 if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=yes"
9407 else
9408   echo "configure: failed program was:" >&5
9409   cat conftest.$ac_ext >&5
9410   rm -rf conftest*
9411   eval "ac_cv_lib_$ac_lib_var=no"
9412 fi
9413 rm -f conftest*
9414 xe_check_libs=""
9415
9416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9417   echo "$ac_t""yes" 1>&6
9418   with_xim=motif
9419 else
9420   echo "$ac_t""no" 1>&6
9421 fi
9422
9423
9424     fi ;;
9425   esac
9426   if test "$with_xim" != "no"; then
9427     { test "$extra_verbose" = "yes" && cat << \EOF
9428     Defining HAVE_XIM
9429 EOF
9430 cat >> confdefs.h <<\EOF
9431 #define HAVE_XIM 1
9432 EOF
9433 }
9434
9435     if test "$with_xim" = "xlib"; then
9436       { test "$extra_verbose" = "yes" && cat << \EOF
9437     Defining XIM_XLIB
9438 EOF
9439 cat >> confdefs.h <<\EOF
9440 #define XIM_XLIB 1
9441 EOF
9442 }
9443
9444       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9445    echo "    xemacs will be linked with \"input-method-xlib.o\""
9446  fi
9447     fi
9448     if test "$with_xim" = "motif"; then
9449       { test "$extra_verbose" = "yes" && cat << \EOF
9450     Defining XIM_MOTIF
9451 EOF
9452 cat >> confdefs.h <<\EOF
9453 #define XIM_MOTIF 1
9454 EOF
9455 }
9456
9457       need_motif=yes
9458       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9459    echo "    xemacs will be linked with \"input-method-motif.o\""
9460  fi
9461     fi
9462     if test "$with_xim" = "motif"; then
9463       with_xfs=no
9464     fi
9465   fi
9466
9467     if test "$with_xfs" = "yes" ; then
9468     echo "checking for XFontSet" 1>&6
9469 echo "configure:9470: checking for XFontSet" >&5
9470     
9471 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9472 echo "configure:9473: checking for XmbDrawString in -lX11" >&5
9473 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9474
9475 xe_check_libs=" -lX11 "
9476 cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479 /* Override any gcc2 internal prototype to avoid an error.  */
9480 /* We use char because int might match the return type of a gcc2
9481     builtin and then its argument prototype would still apply.  */
9482 char XmbDrawString();
9483
9484 int main() {
9485 XmbDrawString()
9486 ; return 0; }
9487 EOF
9488 if { (eval echo configure:9489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9489   rm -rf conftest*
9490   eval "ac_cv_lib_$ac_lib_var=yes"
9491 else
9492   echo "configure: failed program was:" >&5
9493   cat conftest.$ac_ext >&5
9494   rm -rf conftest*
9495   eval "ac_cv_lib_$ac_lib_var=no"
9496 fi
9497 rm -f conftest*
9498 xe_check_libs=""
9499
9500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9501   echo "$ac_t""yes" 1>&6
9502   :
9503 else
9504   echo "$ac_t""no" 1>&6
9505 with_xfs=no
9506 fi
9507
9508
9509     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9510       { test "$extra_verbose" = "yes" && cat << \EOF
9511     Defining USE_XFONTSET
9512 EOF
9513 cat >> confdefs.h <<\EOF
9514 #define USE_XFONTSET 1
9515 EOF
9516 }
9517
9518       if test "$with_xim" = "no" ; then
9519         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9520    echo "    xemacs will be linked with \"input-method-xfs.o\""
9521  fi
9522       fi
9523     fi
9524   fi 
9525     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9526   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9527 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9528 echo "configure:9529: checking for wnn/jllib.h" >&5
9529
9530 cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 #include <wnn/jllib.h>
9534 EOF
9535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9536 { (eval echo configure:9537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9538 if test -z "$ac_err"; then
9539   rm -rf conftest*
9540   eval "ac_cv_header_$ac_safe=yes"
9541 else
9542   echo "$ac_err" >&5
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   eval "ac_cv_header_$ac_safe=no"
9547 fi
9548 rm -f conftest*
9549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9550   echo "$ac_t""yes" 1>&6
9551   :
9552 else
9553   echo "$ac_t""no" 1>&6
9554 with_wnn=no
9555 fi
9556  }
9557     if test "$with_wnn" != "no"; then
9558     for ac_func in crypt
9559 do
9560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9561 echo "configure:9562: checking for $ac_func" >&5
9562
9563 cat > conftest.$ac_ext <<EOF
9564 #line 9565 "configure"
9565 #include "confdefs.h"
9566 /* System header to define __stub macros and hopefully few prototypes,
9567     which can conflict with char $ac_func(); below.  */
9568 #include <assert.h>
9569 /* Override any gcc2 internal prototype to avoid an error.  */
9570 /* We use char because int might match the return type of a gcc2
9571     builtin and then its argument prototype would still apply.  */
9572 char $ac_func();
9573
9574 int main() {
9575
9576 /* The GNU C library defines this for functions which it implements
9577     to always fail with ENOSYS.  Some functions are actually named
9578     something starting with __ and the normal name is an alias.  */
9579 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9580 choke me
9581 #else
9582 $ac_func();
9583 #endif
9584
9585 ; return 0; }
9586 EOF
9587 if { (eval echo configure:9588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9588   rm -rf conftest*
9589   eval "ac_cv_func_$ac_func=yes"
9590 else
9591   echo "configure: failed program was:" >&5
9592   cat conftest.$ac_ext >&5
9593   rm -rf conftest*
9594   eval "ac_cv_func_$ac_func=no"
9595 fi
9596 rm -f conftest*
9597
9598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9599   echo "$ac_t""yes" 1>&6
9600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9601   { test "$extra_verbose" = "yes" && cat << EOF
9602     Defining $ac_tr_func
9603 EOF
9604 cat >> confdefs.h <<EOF
9605 #define $ac_tr_func 1
9606 EOF
9607 }
9608  
9609 else
9610   echo "$ac_t""no" 1>&6
9611 fi
9612 done
9613
9614     test "$ac_cv_func_crypt" != "yes" && { 
9615 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9616 echo "configure:9617: checking for crypt in -lcrypt" >&5
9617 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9618
9619 xe_check_libs=" -lcrypt "
9620 cat > conftest.$ac_ext <<EOF
9621 #line 9622 "configure"
9622 #include "confdefs.h"
9623 /* Override any gcc2 internal prototype to avoid an error.  */
9624 /* We use char because int might match the return type of a gcc2
9625     builtin and then its argument prototype would still apply.  */
9626 char crypt();
9627
9628 int main() {
9629 crypt()
9630 ; return 0; }
9631 EOF
9632 if { (eval echo configure:9633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9633   rm -rf conftest*
9634   eval "ac_cv_lib_$ac_lib_var=yes"
9635 else
9636   echo "configure: failed program was:" >&5
9637   cat conftest.$ac_ext >&5
9638   rm -rf conftest*
9639   eval "ac_cv_lib_$ac_lib_var=no"
9640 fi
9641 rm -f conftest*
9642 xe_check_libs=""
9643
9644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9645   echo "$ac_t""yes" 1>&6
9646     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9647     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9648   { test "$extra_verbose" = "yes" && cat << EOF
9649     Defining $ac_tr_lib
9650 EOF
9651 cat >> confdefs.h <<EOF
9652 #define $ac_tr_lib 1
9653 EOF
9654 }
9655
9656   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9657
9658 else
9659   echo "$ac_t""no" 1>&6
9660 fi
9661
9662  }
9663   fi
9664     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9665     
9666 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9667 echo "configure:9668: checking for jl_dic_list_e in -lwnn" >&5
9668 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9669
9670 xe_check_libs=" -lwnn "
9671 cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674 /* Override any gcc2 internal prototype to avoid an error.  */
9675 /* We use char because int might match the return type of a gcc2
9676     builtin and then its argument prototype would still apply.  */
9677 char jl_dic_list_e();
9678
9679 int main() {
9680 jl_dic_list_e()
9681 ; return 0; }
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9684   rm -rf conftest*
9685   eval "ac_cv_lib_$ac_lib_var=yes"
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -rf conftest*
9690   eval "ac_cv_lib_$ac_lib_var=no"
9691 fi
9692 rm -f conftest*
9693 xe_check_libs=""
9694
9695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9696   echo "$ac_t""yes" 1>&6
9697   libwnn=wnn
9698 else
9699   echo "$ac_t""no" 1>&6
9700 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9701 echo "configure:9702: checking for jl_dic_list_e in -lwnn4" >&5
9702 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9703
9704 xe_check_libs=" -lwnn4 "
9705 cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708 /* Override any gcc2 internal prototype to avoid an error.  */
9709 /* We use char because int might match the return type of a gcc2
9710     builtin and then its argument prototype would still apply.  */
9711 char jl_dic_list_e();
9712
9713 int main() {
9714 jl_dic_list_e()
9715 ; return 0; }
9716 EOF
9717 if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9718   rm -rf conftest*
9719   eval "ac_cv_lib_$ac_lib_var=yes"
9720 else
9721   echo "configure: failed program was:" >&5
9722   cat conftest.$ac_ext >&5
9723   rm -rf conftest*
9724   eval "ac_cv_lib_$ac_lib_var=no"
9725 fi
9726 rm -f conftest*
9727 xe_check_libs=""
9728
9729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9730   echo "$ac_t""yes" 1>&6
9731   libwnn=wnn4
9732 else
9733   echo "$ac_t""no" 1>&6
9734 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9735 echo "configure:9736: checking for jl_dic_list_e in -lwnn6" >&5
9736 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9737
9738 xe_check_libs=" -lwnn6 "
9739 cat > conftest.$ac_ext <<EOF
9740 #line 9741 "configure"
9741 #include "confdefs.h"
9742 /* Override any gcc2 internal prototype to avoid an error.  */
9743 /* We use char because int might match the return type of a gcc2
9744     builtin and then its argument prototype would still apply.  */
9745 char jl_dic_list_e();
9746
9747 int main() {
9748 jl_dic_list_e()
9749 ; return 0; }
9750 EOF
9751 if { (eval echo configure:9752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9752   rm -rf conftest*
9753   eval "ac_cv_lib_$ac_lib_var=yes"
9754 else
9755   echo "configure: failed program was:" >&5
9756   cat conftest.$ac_ext >&5
9757   rm -rf conftest*
9758   eval "ac_cv_lib_$ac_lib_var=no"
9759 fi
9760 rm -f conftest*
9761 xe_check_libs=""
9762
9763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9764   echo "$ac_t""yes" 1>&6
9765   libwnn=wnn6
9766 else
9767   echo "$ac_t""no" 1>&6
9768 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9769 echo "configure:9770: checking for dic_list_e in -lwnn6_fromsrc" >&5
9770 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9771
9772 xe_check_libs=" -lwnn6_fromsrc "
9773 cat > conftest.$ac_ext <<EOF
9774 #line 9775 "configure"
9775 #include "confdefs.h"
9776 /* Override any gcc2 internal prototype to avoid an error.  */
9777 /* We use char because int might match the return type of a gcc2
9778     builtin and then its argument prototype would still apply.  */
9779 char dic_list_e();
9780
9781 int main() {
9782 dic_list_e()
9783 ; return 0; }
9784 EOF
9785 if { (eval echo configure:9786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9786   rm -rf conftest*
9787   eval "ac_cv_lib_$ac_lib_var=yes"
9788 else
9789   echo "configure: failed program was:" >&5
9790   cat conftest.$ac_ext >&5
9791   rm -rf conftest*
9792   eval "ac_cv_lib_$ac_lib_var=no"
9793 fi
9794 rm -f conftest*
9795 xe_check_libs=""
9796
9797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9798   echo "$ac_t""yes" 1>&6
9799   libwnn=wnn6_fromsrc
9800 else
9801   echo "$ac_t""no" 1>&6
9802 with_wnn=no
9803 fi
9804
9805
9806 fi
9807
9808
9809 fi
9810
9811
9812 fi
9813
9814
9815   fi
9816   test -z "$with_wnn" && with_wnn=yes
9817   if test "$with_wnn" = "yes"; then
9818     { test "$extra_verbose" = "yes" && cat << \EOF
9819     Defining HAVE_WNN
9820 EOF
9821 cat >> confdefs.h <<\EOF
9822 #define HAVE_WNN 1
9823 EOF
9824 }
9825
9826     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9827     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9828    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9829  fi
9830     if test "$with_wnn6" != "no"; then
9831       
9832 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9833 echo "configure:9834: checking for jl_fi_dic_list in -l$libwnn" >&5
9834 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9835
9836 xe_check_libs=" -l$libwnn "
9837 cat > conftest.$ac_ext <<EOF
9838 #line 9839 "configure"
9839 #include "confdefs.h"
9840 /* Override any gcc2 internal prototype to avoid an error.  */
9841 /* We use char because int might match the return type of a gcc2
9842     builtin and then its argument prototype would still apply.  */
9843 char jl_fi_dic_list();
9844
9845 int main() {
9846 jl_fi_dic_list()
9847 ; return 0; }
9848 EOF
9849 if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9850   rm -rf conftest*
9851   eval "ac_cv_lib_$ac_lib_var=yes"
9852 else
9853   echo "configure: failed program was:" >&5
9854   cat conftest.$ac_ext >&5
9855   rm -rf conftest*
9856   eval "ac_cv_lib_$ac_lib_var=no"
9857 fi
9858 rm -f conftest*
9859 xe_check_libs=""
9860
9861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9862   echo "$ac_t""yes" 1>&6
9863   with_wnn6=yes
9864 else
9865   echo "$ac_t""no" 1>&6
9866 fi
9867
9868
9869       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9870     Defining WNN6
9871 EOF
9872 cat >> confdefs.h <<\EOF
9873 #define WNN6 1
9874 EOF
9875 }
9876
9877     fi
9878   fi
9879
9880     canna_includes_found=no
9881   if test "$with_canna" != "no"; then
9882     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9883 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9884 echo "configure:9885: checking for canna/jrkanji.h" >&5
9885
9886 cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889 #include <canna/jrkanji.h>
9890 EOF
9891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9892 { (eval echo configure:9893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9894 if test -z "$ac_err"; then
9895   rm -rf conftest*
9896   eval "ac_cv_header_$ac_safe=yes"
9897 else
9898   echo "$ac_err" >&5
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -rf conftest*
9902   eval "ac_cv_header_$ac_safe=no"
9903 fi
9904 rm -f conftest*
9905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9906   echo "$ac_t""yes" 1>&6
9907   canna_includes_found=yes
9908 else
9909   echo "$ac_t""no" 1>&6
9910 fi
9911
9912   fi
9913   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9914       -d "/usr/local/canna/include"; then
9915     save_c_switch_site="$c_switch_site"
9916     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9917     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9918 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9919 echo "configure:9920: checking for canna/jrkanji.h" >&5
9920
9921 cat > conftest.$ac_ext <<EOF
9922 #line 9923 "configure"
9923 #include "confdefs.h"
9924 #include <canna/jrkanji.h>
9925 EOF
9926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9927 { (eval echo configure:9928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9929 if test -z "$ac_err"; then
9930   rm -rf conftest*
9931   eval "ac_cv_header_$ac_safe=yes"
9932 else
9933   echo "$ac_err" >&5
9934   echo "configure: failed program was:" >&5
9935   cat conftest.$ac_ext >&5
9936   rm -rf conftest*
9937   eval "ac_cv_header_$ac_safe=no"
9938 fi
9939 rm -f conftest*
9940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9941   echo "$ac_t""yes" 1>&6
9942   canna_includes_found=yes
9943 else
9944   echo "$ac_t""no" 1>&6
9945 fi
9946
9947     if test "$canna_includes_found" != "yes"; then
9948       c_switch_site="$save_c_switch_site"
9949       with_canna="no"
9950     fi
9951   fi
9952
9953   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9954 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9955 echo "configure:9956: checking for canna/RK.h" >&5
9956
9957 cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 #include <canna/RK.h>
9961 EOF
9962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9963 { (eval echo configure:9964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9965 if test -z "$ac_err"; then
9966   rm -rf conftest*
9967   eval "ac_cv_header_$ac_safe=yes"
9968 else
9969   echo "$ac_err" >&5
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   eval "ac_cv_header_$ac_safe=no"
9974 fi
9975 rm -f conftest*
9976 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9977   echo "$ac_t""yes" 1>&6
9978   :
9979 else
9980   echo "$ac_t""no" 1>&6
9981 with_canna=no
9982 fi
9983  }
9984   test -z "$with_canna" && { 
9985 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9986 echo "configure:9987: checking for RkBgnBun in -lRKC" >&5
9987 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9988
9989 xe_check_libs=" -lRKC "
9990 cat > conftest.$ac_ext <<EOF
9991 #line 9992 "configure"
9992 #include "confdefs.h"
9993 /* Override any gcc2 internal prototype to avoid an error.  */
9994 /* We use char because int might match the return type of a gcc2
9995     builtin and then its argument prototype would still apply.  */
9996 char RkBgnBun();
9997
9998 int main() {
9999 RkBgnBun()
10000 ; return 0; }
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10003   rm -rf conftest*
10004   eval "ac_cv_lib_$ac_lib_var=yes"
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   eval "ac_cv_lib_$ac_lib_var=no"
10010 fi
10011 rm -f conftest*
10012 xe_check_libs=""
10013
10014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10015   echo "$ac_t""yes" 1>&6
10016   :
10017 else
10018   echo "$ac_t""no" 1>&6
10019 with_canna=no
10020 fi
10021
10022  }
10023   test -z "$with_canna" && { 
10024 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10025 echo "configure:10026: checking for jrKanjiControl in -lcanna" >&5
10026 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10027
10028 xe_check_libs=" -lcanna "
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 /* Override any gcc2 internal prototype to avoid an error.  */
10033 /* We use char because int might match the return type of a gcc2
10034     builtin and then its argument prototype would still apply.  */
10035 char jrKanjiControl();
10036
10037 int main() {
10038 jrKanjiControl()
10039 ; return 0; }
10040 EOF
10041 if { (eval echo configure:10042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=yes"
10044 else
10045   echo "configure: failed program was:" >&5
10046   cat conftest.$ac_ext >&5
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=no"
10049 fi
10050 rm -f conftest*
10051 xe_check_libs=""
10052
10053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10054   echo "$ac_t""yes" 1>&6
10055   :
10056 else
10057   echo "$ac_t""no" 1>&6
10058 with_canna=no
10059 fi
10060
10061  }
10062   test -z "$with_canna" && with_canna=yes
10063   if test "$with_canna" = "yes"; then
10064     { test "$extra_verbose" = "yes" && cat << \EOF
10065     Defining HAVE_CANNA
10066 EOF
10067 cat >> confdefs.h <<\EOF
10068 #define HAVE_CANNA 1
10069 EOF
10070 }
10071
10072     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10073     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10074    echo "    xemacs will be linked with \"mule-canna.o\""
10075  fi
10076   fi
10077
10078 else   for feature in xim canna wnn; do
10079     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10080       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10081     fi
10082     eval "with_${feature}=no"
10083   done
10084 fi 
10085
10086 if test "$need_motif" = "yes" ; then
10087   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10088     
10089 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10090 echo "configure:10091: checking for layout_object_getvalue in -li18n" >&5
10091 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10092
10093 xe_check_libs=" -li18n "
10094 cat > conftest.$ac_ext <<EOF
10095 #line 10096 "configure"
10096 #include "confdefs.h"
10097 /* Override any gcc2 internal prototype to avoid an error.  */
10098 /* We use char because int might match the return type of a gcc2
10099     builtin and then its argument prototype would still apply.  */
10100 char layout_object_getvalue();
10101
10102 int main() {
10103 layout_object_getvalue()
10104 ; return 0; }
10105 EOF
10106 if { (eval echo configure:10107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10107   rm -rf conftest*
10108   eval "ac_cv_lib_$ac_lib_var=yes"
10109 else
10110   echo "configure: failed program was:" >&5
10111   cat conftest.$ac_ext >&5
10112   rm -rf conftest*
10113   eval "ac_cv_lib_$ac_lib_var=no"
10114 fi
10115 rm -f conftest*
10116 xe_check_libs=""
10117
10118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10119   echo "$ac_t""yes" 1>&6
10120   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10121 else
10122   echo "$ac_t""no" 1>&6
10123 fi
10124
10125
10126   
10127 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10128     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10129   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10130   
10131         runpath="" runpath_dirs=""
10132   if test -n "$LD_RUN_PATH"; then
10133     runpath="$LD_RUN_PATH"
10134   elif test "$GCC" = "yes"; then
10135         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10136     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10137     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10138     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10139       case "$arg" in P,* | -L* | -R* )
10140         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10141           {
10142 xe_runpath_dir="$dir"
10143   test "$xe_runpath_dir" != "/lib"     -a \
10144         "$xe_runpath_dir" != "/usr/lib" -a \
10145         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10146   eval "$xe_add_unique_runpath_dir"
10147 }
10148         done ;;
10149       esac
10150     done
10151     ld_switch_run="$ld_switch_run_save"
10152     rm -f conftest*
10153   else
10154         for arg in $ld_switch_site $ld_switch_x_site; do
10155       case "$arg" in -L*) {
10156 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10157   test "$xe_runpath_dir" != "/lib"     -a \
10158         "$xe_runpath_dir" != "/usr/lib" -a \
10159         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10160   eval "$xe_add_unique_runpath_dir"
10161 };; esac
10162     done
10163         if test "$opsys $need_motif" = "sol2 yes"; then
10164       xe_runpath_dir="/opt/SUNWdt/lib";
10165       eval "$xe_add_unique_runpath_dir";
10166     fi
10167   fi 
10168   if test -n "$runpath"; then
10169     ld_switch_run="${dash_r}${runpath}"
10170     
10171 if test "$GCC" = "yes"; then
10172   set x $ld_switch_run; shift; ld_switch_run=""
10173   while test -n "$1"; do
10174     case $1 in
10175       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10176       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10177       -Xlinker* ) ;;
10178       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10179     esac
10180     shift
10181   done
10182 fi
10183     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10184   fi
10185 fi
10186
10187 fi
10188
10189 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10190 do
10191 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10192 echo "configure:10193: checking for $ac_func" >&5
10193
10194 cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 /* System header to define __stub macros and hopefully few prototypes,
10198     which can conflict with char $ac_func(); below.  */
10199 #include <assert.h>
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 /* We use char because int might match the return type of a gcc2
10202     builtin and then its argument prototype would still apply.  */
10203 char $ac_func();
10204
10205 int main() {
10206
10207 /* The GNU C library defines this for functions which it implements
10208     to always fail with ENOSYS.  Some functions are actually named
10209     something starting with __ and the normal name is an alias.  */
10210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10211 choke me
10212 #else
10213 $ac_func();
10214 #endif
10215
10216 ; return 0; }
10217 EOF
10218 if { (eval echo configure:10219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10219   rm -rf conftest*
10220   eval "ac_cv_func_$ac_func=yes"
10221 else
10222   echo "configure: failed program was:" >&5
10223   cat conftest.$ac_ext >&5
10224   rm -rf conftest*
10225   eval "ac_cv_func_$ac_func=no"
10226 fi
10227 rm -f conftest*
10228
10229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10230   echo "$ac_t""yes" 1>&6
10231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10232   { test "$extra_verbose" = "yes" && cat << EOF
10233     Defining $ac_tr_func
10234 EOF
10235 cat >> confdefs.h <<EOF
10236 #define $ac_tr_func 1
10237 EOF
10238 }
10239  
10240 else
10241   echo "$ac_t""no" 1>&6
10242 fi
10243 done
10244
10245
10246 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10247 do
10248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10249 echo "configure:10250: checking for $ac_func" >&5
10250
10251 cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254 /* System header to define __stub macros and hopefully few prototypes,
10255     which can conflict with char $ac_func(); below.  */
10256 #include <assert.h>
10257 /* Override any gcc2 internal prototype to avoid an error.  */
10258 /* We use char because int might match the return type of a gcc2
10259     builtin and then its argument prototype would still apply.  */
10260 char $ac_func();
10261
10262 int main() {
10263
10264 /* The GNU C library defines this for functions which it implements
10265     to always fail with ENOSYS.  Some functions are actually named
10266     something starting with __ and the normal name is an alias.  */
10267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10268 choke me
10269 #else
10270 $ac_func();
10271 #endif
10272
10273 ; return 0; }
10274 EOF
10275 if { (eval echo configure:10276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10276   rm -rf conftest*
10277   eval "ac_cv_func_$ac_func=yes"
10278 else
10279   echo "configure: failed program was:" >&5
10280   cat conftest.$ac_ext >&5
10281   rm -rf conftest*
10282   eval "ac_cv_func_$ac_func=no"
10283 fi
10284 rm -f conftest*
10285
10286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10287   echo "$ac_t""yes" 1>&6
10288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10289   { test "$extra_verbose" = "yes" && cat << EOF
10290     Defining $ac_tr_func
10291 EOF
10292 cat >> confdefs.h <<EOF
10293 #define $ac_tr_func 1
10294 EOF
10295 }
10296  
10297 else
10298   echo "$ac_t""no" 1>&6
10299 fi
10300 done
10301
10302
10303 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10304 echo "configure:10305: checking for openpty" >&5
10305
10306 cat > conftest.$ac_ext <<EOF
10307 #line 10308 "configure"
10308 #include "confdefs.h"
10309 /* System header to define __stub macros and hopefully few prototypes,
10310     which can conflict with char openpty(); below.  */
10311 #include <assert.h>
10312 /* Override any gcc2 internal prototype to avoid an error.  */
10313 /* We use char because int might match the return type of a gcc2
10314     builtin and then its argument prototype would still apply.  */
10315 char openpty();
10316
10317 int main() {
10318
10319 /* The GNU C library defines this for functions which it implements
10320     to always fail with ENOSYS.  Some functions are actually named
10321     something starting with __ and the normal name is an alias.  */
10322 #if defined (__stub_openpty) || defined (__stub___openpty)
10323 choke me
10324 #else
10325 openpty();
10326 #endif
10327
10328 ; return 0; }
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10331   rm -rf conftest*
10332   eval "ac_cv_func_openpty=yes"
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -rf conftest*
10337   eval "ac_cv_func_openpty=no"
10338 fi
10339 rm -f conftest*
10340
10341 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10342   echo "$ac_t""yes" 1>&6
10343   have_openpty=yes
10344 else
10345   echo "$ac_t""no" 1>&6
10346
10347   
10348 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10349 echo "configure:10350: checking for openpty in -lutil" >&5
10350 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10351
10352 xe_check_libs=" -lutil "
10353 cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 /* Override any gcc2 internal prototype to avoid an error.  */
10357 /* We use char because int might match the return type of a gcc2
10358     builtin and then its argument prototype would still apply.  */
10359 char openpty();
10360
10361 int main() {
10362 openpty()
10363 ; return 0; }
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10366   rm -rf conftest*
10367   eval "ac_cv_lib_$ac_lib_var=yes"
10368 else
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -rf conftest*
10372   eval "ac_cv_lib_$ac_lib_var=no"
10373 fi
10374 rm -f conftest*
10375 xe_check_libs=""
10376
10377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10378   echo "$ac_t""yes" 1>&6
10379   have_openpty=yes need_libutil=yes
10380 else
10381   echo "$ac_t""no" 1>&6
10382 fi
10383
10384
10385 fi
10386
10387 if test "$have_openpty" = "yes"; then
10388   { test "$extra_verbose" = "yes" && cat << \EOF
10389     Defining HAVE_OPENPTY
10390 EOF
10391 cat >> confdefs.h <<\EOF
10392 #define HAVE_OPENPTY 1
10393 EOF
10394 }
10395
10396   for ac_hdr in pty.h libutil.h
10397 do
10398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10400 echo "configure:10401: checking for $ac_hdr" >&5
10401
10402 cat > conftest.$ac_ext <<EOF
10403 #line 10404 "configure"
10404 #include "confdefs.h"
10405 #include <$ac_hdr>
10406 EOF
10407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10408 { (eval echo configure:10409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10410 if test -z "$ac_err"; then
10411   rm -rf conftest*
10412   eval "ac_cv_header_$ac_safe=yes"
10413 else
10414   echo "$ac_err" >&5
10415   echo "configure: failed program was:" >&5
10416   cat conftest.$ac_ext >&5
10417   rm -rf conftest*
10418   eval "ac_cv_header_$ac_safe=no"
10419 fi
10420 rm -f conftest*
10421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10422   echo "$ac_t""yes" 1>&6
10423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10424   { test "$extra_verbose" = "yes" && cat << EOF
10425     Defining $ac_tr_hdr
10426 EOF
10427 cat >> confdefs.h <<EOF
10428 #define $ac_tr_hdr 1
10429 EOF
10430 }
10431  
10432 else
10433   echo "$ac_t""no" 1>&6
10434 fi
10435 done
10436
10437   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10438 fi
10439
10440 for ac_hdr in stropts.h
10441 do
10442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10444 echo "configure:10445: checking for $ac_hdr" >&5
10445
10446 cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 #include <$ac_hdr>
10450 EOF
10451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10452 { (eval echo configure:10453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10454 if test -z "$ac_err"; then
10455   rm -rf conftest*
10456   eval "ac_cv_header_$ac_safe=yes"
10457 else
10458   echo "$ac_err" >&5
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=no"
10463 fi
10464 rm -f conftest*
10465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10466   echo "$ac_t""yes" 1>&6
10467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10468   { test "$extra_verbose" = "yes" && cat << EOF
10469     Defining $ac_tr_hdr
10470 EOF
10471 cat >> confdefs.h <<EOF
10472 #define $ac_tr_hdr 1
10473 EOF
10474 }
10475  
10476 else
10477   echo "$ac_t""no" 1>&6
10478 fi
10479 done
10480
10481 if test "$ac_cv_header_stropts_h" = "yes"; then
10482   for ac_func in isastream
10483 do
10484 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10485 echo "configure:10486: checking for $ac_func" >&5
10486
10487 cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 /* System header to define __stub macros and hopefully few prototypes,
10491     which can conflict with char $ac_func(); below.  */
10492 #include <assert.h>
10493 /* Override any gcc2 internal prototype to avoid an error.  */
10494 /* We use char because int might match the return type of a gcc2
10495     builtin and then its argument prototype would still apply.  */
10496 char $ac_func();
10497
10498 int main() {
10499
10500 /* The GNU C library defines this for functions which it implements
10501     to always fail with ENOSYS.  Some functions are actually named
10502     something starting with __ and the normal name is an alias.  */
10503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10504 choke me
10505 #else
10506 $ac_func();
10507 #endif
10508
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512   rm -rf conftest*
10513   eval "ac_cv_func_$ac_func=yes"
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   eval "ac_cv_func_$ac_func=no"
10519 fi
10520 rm -f conftest*
10521
10522 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10523   echo "$ac_t""yes" 1>&6
10524     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10525   { test "$extra_verbose" = "yes" && cat << EOF
10526     Defining $ac_tr_func
10527 EOF
10528 cat >> confdefs.h <<EOF
10529 #define $ac_tr_func 1
10530 EOF
10531 }
10532  
10533 else
10534   echo "$ac_t""no" 1>&6
10535 fi
10536 done
10537
10538   for ac_hdr in strtio.h
10539 do
10540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10542 echo "configure:10543: checking for $ac_hdr" >&5
10543
10544 cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 #include <$ac_hdr>
10548 EOF
10549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10550 { (eval echo configure:10551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10552 if test -z "$ac_err"; then
10553   rm -rf conftest*
10554   eval "ac_cv_header_$ac_safe=yes"
10555 else
10556   echo "$ac_err" >&5
10557   echo "configure: failed program was:" >&5
10558   cat conftest.$ac_ext >&5
10559   rm -rf conftest*
10560   eval "ac_cv_header_$ac_safe=no"
10561 fi
10562 rm -f conftest*
10563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10564   echo "$ac_t""yes" 1>&6
10565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10566   { test "$extra_verbose" = "yes" && cat << EOF
10567     Defining $ac_tr_hdr
10568 EOF
10569 cat >> confdefs.h <<EOF
10570 #define $ac_tr_hdr 1
10571 EOF
10572 }
10573  
10574 else
10575   echo "$ac_t""no" 1>&6
10576 fi
10577 done
10578  fi
10579
10580 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10581    echo "    xemacs will be linked with \"realpath.o\""
10582  fi
10583
10584 for ac_func in getloadavg
10585 do
10586 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10587 echo "configure:10588: checking for $ac_func" >&5
10588
10589 cat > conftest.$ac_ext <<EOF
10590 #line 10591 "configure"
10591 #include "confdefs.h"
10592 /* System header to define __stub macros and hopefully few prototypes,
10593     which can conflict with char $ac_func(); below.  */
10594 #include <assert.h>
10595 /* Override any gcc2 internal prototype to avoid an error.  */
10596 /* We use char because int might match the return type of a gcc2
10597     builtin and then its argument prototype would still apply.  */
10598 char $ac_func();
10599
10600 int main() {
10601
10602 /* The GNU C library defines this for functions which it implements
10603     to always fail with ENOSYS.  Some functions are actually named
10604     something starting with __ and the normal name is an alias.  */
10605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10606 choke me
10607 #else
10608 $ac_func();
10609 #endif
10610
10611 ; return 0; }
10612 EOF
10613 if { (eval echo configure:10614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10614   rm -rf conftest*
10615   eval "ac_cv_func_$ac_func=yes"
10616 else
10617   echo "configure: failed program was:" >&5
10618   cat conftest.$ac_ext >&5
10619   rm -rf conftest*
10620   eval "ac_cv_func_$ac_func=no"
10621 fi
10622 rm -f conftest*
10623
10624 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10625   echo "$ac_t""yes" 1>&6
10626     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10627   { test "$extra_verbose" = "yes" && cat << EOF
10628     Defining $ac_tr_func
10629 EOF
10630 cat >> confdefs.h <<EOF
10631 #define $ac_tr_func 1
10632 EOF
10633 }
10634  
10635 else
10636   echo "$ac_t""no" 1>&6
10637 fi
10638 done
10639
10640
10641 if test "$ac_cv_func_getloadavg" = "yes"; then
10642         for ac_hdr in sys/loadavg.h
10643 do
10644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10646 echo "configure:10647: checking for $ac_hdr" >&5
10647
10648 cat > conftest.$ac_ext <<EOF
10649 #line 10650 "configure"
10650 #include "confdefs.h"
10651 #include <$ac_hdr>
10652 EOF
10653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10654 { (eval echo configure:10655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10656 if test -z "$ac_err"; then
10657   rm -rf conftest*
10658   eval "ac_cv_header_$ac_safe=yes"
10659 else
10660   echo "$ac_err" >&5
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_header_$ac_safe=no"
10665 fi
10666 rm -f conftest*
10667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10668   echo "$ac_t""yes" 1>&6
10669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10670   { test "$extra_verbose" = "yes" && cat << EOF
10671     Defining $ac_tr_hdr
10672 EOF
10673 cat >> confdefs.h <<EOF
10674 #define $ac_tr_hdr 1
10675 EOF
10676 }
10677  
10678 else
10679   echo "$ac_t""no" 1>&6
10680 fi
10681 done
10682
10683 else
10684     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10685    echo "    xemacs will be linked with \"getloadavg.o\""
10686  fi
10687
10688     
10689 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10690 echo "configure:10691: checking for kstat_open in -lkstat" >&5
10691 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10692
10693 xe_check_libs=" -lkstat "
10694 cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697 /* Override any gcc2 internal prototype to avoid an error.  */
10698 /* We use char because int might match the return type of a gcc2
10699     builtin and then its argument prototype would still apply.  */
10700 char kstat_open();
10701
10702 int main() {
10703 kstat_open()
10704 ; return 0; }
10705 EOF
10706 if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10707   rm -rf conftest*
10708   eval "ac_cv_lib_$ac_lib_var=yes"
10709 else
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -rf conftest*
10713   eval "ac_cv_lib_$ac_lib_var=no"
10714 fi
10715 rm -f conftest*
10716 xe_check_libs=""
10717
10718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10719   echo "$ac_t""yes" 1>&6
10720     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10721     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10722   { test "$extra_verbose" = "yes" && cat << EOF
10723     Defining $ac_tr_lib
10724 EOF
10725 cat >> confdefs.h <<EOF
10726 #define $ac_tr_lib 1
10727 EOF
10728 }
10729
10730   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10731
10732 else
10733   echo "$ac_t""no" 1>&6
10734 fi
10735
10736
10737   for ac_hdr in kstat.h
10738 do
10739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10741 echo "configure:10742: checking for $ac_hdr" >&5
10742
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <$ac_hdr>
10747 EOF
10748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10749 { (eval echo configure:10750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10751 if test -z "$ac_err"; then
10752   rm -rf conftest*
10753   eval "ac_cv_header_$ac_safe=yes"
10754 else
10755   echo "$ac_err" >&5
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_header_$ac_safe=no"
10760 fi
10761 rm -f conftest*
10762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10763   echo "$ac_t""yes" 1>&6
10764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10765   { test "$extra_verbose" = "yes" && cat << EOF
10766     Defining $ac_tr_hdr
10767 EOF
10768 cat >> confdefs.h <<EOF
10769 #define $ac_tr_hdr 1
10770 EOF
10771 }
10772  
10773 else
10774   echo "$ac_t""no" 1>&6
10775 fi
10776 done
10777
10778
10779     
10780 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10781 echo "configure:10782: checking for kvm_read in -lkvm" >&5
10782 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10783
10784 xe_check_libs=" -lkvm "
10785 cat > conftest.$ac_ext <<EOF
10786 #line 10787 "configure"
10787 #include "confdefs.h"
10788 /* Override any gcc2 internal prototype to avoid an error.  */
10789 /* We use char because int might match the return type of a gcc2
10790     builtin and then its argument prototype would still apply.  */
10791 char kvm_read();
10792
10793 int main() {
10794 kvm_read()
10795 ; return 0; }
10796 EOF
10797 if { (eval echo configure:10798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10798   rm -rf conftest*
10799   eval "ac_cv_lib_$ac_lib_var=yes"
10800 else
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   eval "ac_cv_lib_$ac_lib_var=no"
10805 fi
10806 rm -f conftest*
10807 xe_check_libs=""
10808
10809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10810   echo "$ac_t""yes" 1>&6
10811     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10812     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10813   { test "$extra_verbose" = "yes" && cat << EOF
10814     Defining $ac_tr_lib
10815 EOF
10816 cat >> confdefs.h <<EOF
10817 #define $ac_tr_lib 1
10818 EOF
10819 }
10820
10821   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10822
10823 else
10824   echo "$ac_t""no" 1>&6
10825 fi
10826
10827
10828 fi
10829
10830 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10831 echo "configure:10832: checking whether netdb declares h_errno" >&5
10832 cat > conftest.$ac_ext <<EOF
10833 #line 10834 "configure"
10834 #include "confdefs.h"
10835 #include <netdb.h>
10836 int main() {
10837 return h_errno;
10838 ; return 0; }
10839 EOF
10840 if { (eval echo configure:10841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10841   rm -rf conftest*
10842   echo "$ac_t""yes" 1>&6
10843    { test "$extra_verbose" = "yes" && cat << \EOF
10844     Defining HAVE_H_ERRNO
10845 EOF
10846 cat >> confdefs.h <<\EOF
10847 #define HAVE_H_ERRNO 1
10848 EOF
10849 }
10850
10851 else
10852   echo "configure: failed program was:" >&5
10853   cat conftest.$ac_ext >&5
10854   rm -rf conftest*
10855   echo "$ac_t""no" 1>&6
10856 fi
10857 rm -f conftest*
10858
10859 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10860 echo "configure:10861: checking for sigsetjmp" >&5
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 #include <setjmp.h>
10865 int main() {
10866 sigjmp_buf bar; sigsetjmp (bar, 0);
10867 ; return 0; }
10868 EOF
10869 if { (eval echo configure:10870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10870   rm -rf conftest*
10871   echo "$ac_t""yes" 1>&6
10872    { test "$extra_verbose" = "yes" && cat << \EOF
10873     Defining HAVE_SIGSETJMP
10874 EOF
10875 cat >> confdefs.h <<\EOF
10876 #define HAVE_SIGSETJMP 1
10877 EOF
10878 }
10879
10880 else
10881   echo "configure: failed program was:" >&5
10882   cat conftest.$ac_ext >&5
10883   rm -rf conftest*
10884   echo "$ac_t""no" 1>&6
10885 fi
10886 rm -f conftest*
10887
10888 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10889 echo "configure:10890: checking whether localtime caches TZ" >&5
10890
10891 if test "$ac_cv_func_tzset" = "yes"; then
10892 cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 #include <time.h>
10896 #if STDC_HEADERS
10897 # include <stdlib.h>
10898 #endif
10899 extern char **environ;
10900 unset_TZ ()
10901 {
10902   char **from, **to;
10903   for (to = from = environ; (*to = *from); from++)
10904     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10905       to++;
10906 }
10907 char TZ_GMT0[] = "TZ=GMT0";
10908 char TZ_PST8[] = "TZ=PST8";
10909 main()
10910 {
10911   time_t now = time ((time_t *) 0);
10912   int hour_GMT0, hour_unset;
10913   if (putenv (TZ_GMT0) != 0)
10914     exit (1);
10915   hour_GMT0 = localtime (&now)->tm_hour;
10916   unset_TZ ();
10917   hour_unset = localtime (&now)->tm_hour;
10918   if (putenv (TZ_PST8) != 0)
10919     exit (1);
10920   if (localtime (&now)->tm_hour == hour_GMT0)
10921     exit (1);
10922   unset_TZ ();
10923   if (localtime (&now)->tm_hour != hour_unset)
10924     exit (1);
10925   exit (0);
10926 }
10927 EOF
10928 if { (eval echo configure:10929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10929 then
10930   emacs_cv_localtime_cache=no
10931 else
10932   conftest_rc="$?"
10933   echo "configure: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   rm -fr conftest*
10936   emacs_cv_localtime_cache=yes
10937 fi
10938 rm -fr conftest*
10939 else
10940         # If we lack tzset, report that localtime does not cache TZ,
10941         # since we can't invalidate the cache if we don't have tzset.
10942         emacs_cv_localtime_cache=no
10943 fi
10944 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10945 if test $emacs_cv_localtime_cache = yes; then
10946   { test "$extra_verbose" = "yes" && cat << \EOF
10947     Defining LOCALTIME_CACHE
10948 EOF
10949 cat >> confdefs.h <<\EOF
10950 #define LOCALTIME_CACHE 1
10951 EOF
10952 }
10953
10954 fi
10955
10956 if test "$HAVE_TIMEVAL" = "yes"; then
10957 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10958 echo "configure:10959: checking whether gettimeofday accepts one or two arguments" >&5
10959 cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962
10963 #ifdef TIME_WITH_SYS_TIME
10964 #include <sys/time.h>
10965 #include <time.h>
10966 #else
10967 #ifdef HAVE_SYS_TIME_H
10968 #include <sys/time.h>
10969 #else
10970 #include <time.h>
10971 #endif
10972 #endif
10973   
10974 int main() {
10975
10976   struct timeval time;
10977   gettimeofday (&time, 0);
10978
10979 ; return 0; }
10980 EOF
10981 if { (eval echo configure:10982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10982   rm -rf conftest*
10983   echo "$ac_t""two" 1>&6
10984 else
10985   echo "configure: failed program was:" >&5
10986   cat conftest.$ac_ext >&5
10987   rm -rf conftest*
10988   echo "$ac_t""one" 1>&6
10989    { test "$extra_verbose" = "yes" && cat << \EOF
10990     Defining GETTIMEOFDAY_ONE_ARGUMENT
10991 EOF
10992 cat >> confdefs.h <<\EOF
10993 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10994 EOF
10995 }
10996
10997 fi
10998 rm -f conftest*
10999 fi
11000
11001
11002 echo $ac_n "checking for inline""... $ac_c" 1>&6
11003 echo "configure:11004: checking for inline" >&5
11004
11005 ac_cv_c_inline=no
11006 for ac_kw in inline __inline__ __inline; do
11007   cat > conftest.$ac_ext <<EOF
11008 #line 11009 "configure"
11009 #include "confdefs.h"
11010
11011 int main() {
11012 } $ac_kw foo() {
11013 ; return 0; }
11014 EOF
11015 if { (eval echo configure:11016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11016   rm -rf conftest*
11017   ac_cv_c_inline=$ac_kw; break
11018 else
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021 fi
11022 rm -f conftest*
11023 done
11024
11025
11026 echo "$ac_t""$ac_cv_c_inline" 1>&6
11027 case "$ac_cv_c_inline" in
11028   inline | yes) ;;
11029   no) { test "$extra_verbose" = "yes" && cat << \EOF
11030     Defining inline = 
11031 EOF
11032 cat >> confdefs.h <<\EOF
11033 #define inline 
11034 EOF
11035 }
11036  ;;
11037   *)  { test "$extra_verbose" = "yes" && cat << EOF
11038     Defining inline = $ac_cv_c_inline
11039 EOF
11040 cat >> confdefs.h <<EOF
11041 #define inline $ac_cv_c_inline
11042 EOF
11043 }
11044  ;;
11045 esac
11046
11047 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11048    echo "    xemacs will be linked with \"inline.o\""
11049  fi
11050
11051
11052 if test "$__DECC" != "yes"; then
11053   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11054 # for constant arguments.  Useless!
11055 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11056 echo "configure:11057: checking for working alloca.h" >&5
11057
11058 cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061 #include <alloca.h>
11062 int main() {
11063 char *p = alloca(2 * sizeof(int));
11064 ; return 0; }
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11067   rm -rf conftest*
11068   ac_cv_header_alloca_h=yes
11069 else
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -rf conftest*
11073   ac_cv_header_alloca_h=no
11074 fi
11075 rm -f conftest*
11076
11077 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11078 if test $ac_cv_header_alloca_h = yes; then
11079   { test "$extra_verbose" = "yes" && cat << \EOF
11080     Defining HAVE_ALLOCA_H
11081 EOF
11082 cat >> confdefs.h <<\EOF
11083 #define HAVE_ALLOCA_H 1
11084 EOF
11085 }
11086
11087 fi
11088
11089 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11090 echo "configure:11091: checking for alloca" >&5
11091
11092 cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095
11096 #ifdef __GNUC__
11097 # define alloca __builtin_alloca
11098 #else
11099 # ifdef _MSC_VER
11100 #  include <malloc.h>
11101 #  define alloca _alloca
11102 # else
11103 #  if HAVE_ALLOCA_H
11104 #   include <alloca.h>
11105 #  else
11106 #   ifdef _AIX
11107  #pragma alloca
11108 #   else
11109 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11110 char *alloca ();
11111 #    endif
11112 #   endif
11113 #  endif
11114 # endif
11115 #endif
11116
11117 int main() {
11118 char *p = (char *) alloca(1);
11119 ; return 0; }
11120 EOF
11121 if { (eval echo configure:11122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11122   rm -rf conftest*
11123   ac_cv_func_alloca_works=yes
11124 else
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -rf conftest*
11128   ac_cv_func_alloca_works=no
11129 fi
11130 rm -f conftest*
11131
11132 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11133 if test $ac_cv_func_alloca_works = yes; then
11134   { test "$extra_verbose" = "yes" && cat << \EOF
11135     Defining HAVE_ALLOCA
11136 EOF
11137 cat >> confdefs.h <<\EOF
11138 #define HAVE_ALLOCA 1
11139 EOF
11140 }
11141
11142 fi
11143
11144 if test $ac_cv_func_alloca_works = no; then
11145   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11146   # that cause trouble.  Some versions do not even contain alloca or
11147   # contain a buggy version.  If you still want to use their alloca,
11148   # use ar to extract alloca.o from them instead of compiling alloca.c.
11149   ALLOCA=alloca.${ac_objext}
11150   { test "$extra_verbose" = "yes" && cat << \EOF
11151     Defining C_ALLOCA
11152 EOF
11153 cat >> confdefs.h <<\EOF
11154 #define C_ALLOCA 1
11155 EOF
11156 }
11157
11158
11159 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11160 echo "configure:11161: checking whether alloca needs Cray hooks" >&5
11161
11162 cat > conftest.$ac_ext <<EOF
11163 #line 11164 "configure"
11164 #include "confdefs.h"
11165 #if defined(CRAY) && ! defined(CRAY2)
11166 webecray
11167 #else
11168 wenotbecray
11169 #endif
11170
11171 EOF
11172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11173   egrep "webecray" >/dev/null 2>&1; then
11174   rm -rf conftest*
11175   ac_cv_os_cray=yes
11176 else
11177   rm -rf conftest*
11178   ac_cv_os_cray=no
11179 fi
11180 rm -f conftest*
11181
11182
11183 echo "$ac_t""$ac_cv_os_cray" 1>&6
11184 if test $ac_cv_os_cray = yes; then
11185 for ac_func in _getb67 GETB67 getb67; do
11186   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11187 echo "configure:11188: checking for $ac_func" >&5
11188
11189 cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192 /* System header to define __stub macros and hopefully few prototypes,
11193     which can conflict with char $ac_func(); below.  */
11194 #include <assert.h>
11195 /* Override any gcc2 internal prototype to avoid an error.  */
11196 /* We use char because int might match the return type of a gcc2
11197     builtin and then its argument prototype would still apply.  */
11198 char $ac_func();
11199
11200 int main() {
11201
11202 /* The GNU C library defines this for functions which it implements
11203     to always fail with ENOSYS.  Some functions are actually named
11204     something starting with __ and the normal name is an alias.  */
11205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11206 choke me
11207 #else
11208 $ac_func();
11209 #endif
11210
11211 ; return 0; }
11212 EOF
11213 if { (eval echo configure:11214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11214   rm -rf conftest*
11215   eval "ac_cv_func_$ac_func=yes"
11216 else
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_func_$ac_func=no"
11221 fi
11222 rm -f conftest*
11223
11224 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11225   echo "$ac_t""yes" 1>&6
11226   { test "$extra_verbose" = "yes" && cat << EOF
11227     Defining CRAY_STACKSEG_END = $ac_func
11228 EOF
11229 cat >> confdefs.h <<EOF
11230 #define CRAY_STACKSEG_END $ac_func
11231 EOF
11232 }
11233
11234   break
11235 else
11236   echo "$ac_t""no" 1>&6
11237 fi
11238
11239 done
11240 fi
11241
11242 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11243 echo "configure:11244: checking stack direction for C alloca" >&5
11244
11245 cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 find_stack_direction ()
11249 {
11250   static char *addr = 0;
11251   auto char dummy;
11252   if (addr == 0)
11253     {
11254       addr = &dummy;
11255       return find_stack_direction ();
11256     }
11257   else
11258     return (&dummy > addr) ? 1 : -1;
11259 }
11260 main ()
11261 {
11262   exit (find_stack_direction() < 0);
11263 }
11264 EOF
11265 if { (eval echo configure:11266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11266 then
11267   ac_cv_c_stack_direction=1
11268 else
11269   conftest_rc="$?"
11270   echo "configure: failed program was:" >&5
11271   cat conftest.$ac_ext >&5
11272   rm -fr conftest*
11273   ac_cv_c_stack_direction=-1
11274 fi
11275 rm -fr conftest*
11276
11277 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11278 { test "$extra_verbose" = "yes" && cat << EOF
11279     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11280 EOF
11281 cat >> confdefs.h <<EOF
11282 #define STACK_DIRECTION $ac_cv_c_stack_direction
11283 EOF
11284 }
11285
11286 fi
11287
11288   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11289    echo "    xemacs will be linked with \"$ALLOCA\""
11290  fi
11291 fi
11292
11293 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11294 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11295 echo "configure:11296: checking for vfork.h" >&5
11296
11297 cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300 #include <vfork.h>
11301 EOF
11302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11303 { (eval echo configure:11304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11305 if test -z "$ac_err"; then
11306   rm -rf conftest*
11307   eval "ac_cv_header_$ac_safe=yes"
11308 else
11309   echo "$ac_err" >&5
11310   echo "configure: failed program was:" >&5
11311   cat conftest.$ac_ext >&5
11312   rm -rf conftest*
11313   eval "ac_cv_header_$ac_safe=no"
11314 fi
11315 rm -f conftest*
11316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11317   echo "$ac_t""yes" 1>&6
11318   { test "$extra_verbose" = "yes" && cat << \EOF
11319     Defining HAVE_VFORK_H
11320 EOF
11321 cat >> confdefs.h <<\EOF
11322 #define HAVE_VFORK_H 1
11323 EOF
11324 }
11325
11326 else
11327   echo "$ac_t""no" 1>&6
11328 fi
11329
11330 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11331 echo "configure:11332: checking for working vfork" >&5
11332
11333 cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336 /* Thanks to Paul Eggert for this test.  */
11337 #include <stdio.h>
11338 #include <sys/types.h>
11339 #include <sys/stat.h>
11340 #ifdef HAVE_UNISTD_H
11341 #include <unistd.h>
11342 #endif
11343 #ifdef HAVE_VFORK_H
11344 #include <vfork.h>
11345 #endif
11346 /* On some sparc systems, changes by the child to local and incoming
11347    argument registers are propagated back to the parent.
11348    The compiler is told about this with #include <vfork.h>,
11349    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11350    Test for this by using a static variable whose address
11351    is put into a register that is clobbered by the vfork.  */
11352 static
11353 #ifdef __cplusplus
11354 sparc_address_test (int arg)
11355 #else
11356 sparc_address_test (arg) int arg;
11357 #endif
11358 {
11359   static pid_t child;
11360   if (!child) {
11361     child = vfork ();
11362     if (child < 0) {
11363       perror ("vfork");
11364       _exit(2);
11365     }
11366     if (!child) {
11367       arg = getpid();
11368       write(-1, "", 0);
11369       _exit (arg);
11370     }
11371   }
11372 }
11373 main() {
11374   pid_t parent = getpid ();
11375   pid_t child;
11376
11377   sparc_address_test ();
11378
11379   child = vfork ();
11380
11381   if (child == 0) {
11382     /* Here is another test for sparc vfork register problems.
11383        This test uses lots of local variables, at least
11384        as many local variables as main has allocated so far
11385        including compiler temporaries.  4 locals are enough for
11386        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11387        A buggy compiler should reuse the register of parent
11388        for one of the local variables, since it will think that
11389        parent can't possibly be used any more in this routine.
11390        Assigning to the local variable will thus munge parent
11391        in the parent process.  */
11392     pid_t
11393       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11394       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11395     /* Convince the compiler that p..p7 are live; otherwise, it might
11396        use the same hardware register for all 8 local variables.  */
11397     if (p != p1 || p != p2 || p != p3 || p != p4
11398         || p != p5 || p != p6 || p != p7)
11399       _exit(1);
11400
11401     /* On some systems (e.g. IRIX 3.3),
11402        vfork doesn't separate parent from child file descriptors.
11403        If the child closes a descriptor before it execs or exits,
11404        this munges the parent's descriptor as well.
11405        Test for this by closing stdout in the child.  */
11406     _exit(close(fileno(stdout)) != 0);
11407   } else {
11408     int status;
11409     struct stat st;
11410
11411     while (wait(&status) != child)
11412       ;
11413     exit(
11414          /* Was there some problem with vforking?  */
11415          child < 0
11416
11417          /* Did the child fail?  (This shouldn't happen.)  */
11418          || status
11419
11420          /* Did the vfork/compiler bug occur?  */
11421          || parent != getpid()
11422
11423          /* Did the file descriptor bug occur?  */
11424          || fstat(fileno(stdout), &st) != 0
11425          );
11426   }
11427 }
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11430 then
11431   ac_cv_func_vfork_works=yes
11432 else
11433   conftest_rc="$?"
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -fr conftest*
11437   ac_cv_func_vfork_works=no
11438 fi
11439 rm -fr conftest*
11440
11441 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11442 if test $ac_cv_func_vfork_works = no; then
11443   { test "$extra_verbose" = "yes" && cat << \EOF
11444     Defining vfork = fork
11445 EOF
11446 cat >> confdefs.h <<\EOF
11447 #define vfork fork
11448 EOF
11449 }
11450
11451 fi
11452
11453
11454 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11455 echo "configure:11456: checking for working strcoll" >&5
11456
11457 cat > conftest.$ac_ext <<EOF
11458 #line 11459 "configure"
11459 #include "confdefs.h"
11460 #include <string.h>
11461 main ()
11462 {
11463   exit (strcoll ("abc", "def") >= 0 ||
11464         strcoll ("ABC", "DEF") >= 0 ||
11465         strcoll ("123", "456") >= 0);
11466 }
11467 EOF
11468 if { (eval echo configure:11469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11469 then
11470   ac_cv_func_strcoll_works=yes
11471 else
11472   conftest_rc="$?"
11473   echo "configure: failed program was:" >&5
11474   cat conftest.$ac_ext >&5
11475   rm -fr conftest*
11476   ac_cv_func_strcoll_works=no
11477 fi
11478 rm -fr conftest*
11479
11480 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11481 if test $ac_cv_func_strcoll_works = yes; then
11482   { test "$extra_verbose" = "yes" && cat << \EOF
11483     Defining HAVE_STRCOLL
11484 EOF
11485 cat >> confdefs.h <<\EOF
11486 #define HAVE_STRCOLL 1
11487 EOF
11488 }
11489
11490 fi
11491
11492
11493 for ac_func in getpgrp
11494 do
11495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11496 echo "configure:11497: checking for $ac_func" >&5
11497
11498 cat > conftest.$ac_ext <<EOF
11499 #line 11500 "configure"
11500 #include "confdefs.h"
11501 /* System header to define __stub macros and hopefully few prototypes,
11502     which can conflict with char $ac_func(); below.  */
11503 #include <assert.h>
11504 /* Override any gcc2 internal prototype to avoid an error.  */
11505 /* We use char because int might match the return type of a gcc2
11506     builtin and then its argument prototype would still apply.  */
11507 char $ac_func();
11508
11509 int main() {
11510
11511 /* The GNU C library defines this for functions which it implements
11512     to always fail with ENOSYS.  Some functions are actually named
11513     something starting with __ and the normal name is an alias.  */
11514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11515 choke me
11516 #else
11517 $ac_func();
11518 #endif
11519
11520 ; return 0; }
11521 EOF
11522 if { (eval echo configure:11523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11523   rm -rf conftest*
11524   eval "ac_cv_func_$ac_func=yes"
11525 else
11526   echo "configure: failed program was:" >&5
11527   cat conftest.$ac_ext >&5
11528   rm -rf conftest*
11529   eval "ac_cv_func_$ac_func=no"
11530 fi
11531 rm -f conftest*
11532
11533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11534   echo "$ac_t""yes" 1>&6
11535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11536   { test "$extra_verbose" = "yes" && cat << EOF
11537     Defining $ac_tr_func
11538 EOF
11539 cat >> confdefs.h <<EOF
11540 #define $ac_tr_func 1
11541 EOF
11542 }
11543  
11544 else
11545   echo "$ac_t""no" 1>&6
11546 fi
11547 done
11548
11549 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11550 echo "configure:11551: checking whether getpgrp takes no argument" >&5
11551
11552 cat > conftest.$ac_ext <<EOF
11553 #line 11554 "configure"
11554 #include "confdefs.h"
11555
11556 /*
11557  * If this system has a BSD-style getpgrp(),
11558  * which takes a pid argument, exit unsuccessfully.
11559  *
11560  * Snarfed from Chet Ramey's bash pgrp.c test program
11561  */
11562 #include <stdio.h>
11563 #include <sys/types.h>
11564
11565 int     pid;
11566 int     pg1, pg2, pg3, pg4;
11567 int     ng, np, s, child;
11568
11569 main()
11570 {
11571         pid = getpid();
11572         pg1 = getpgrp(0);
11573         pg2 = getpgrp();
11574         pg3 = getpgrp(pid);
11575         pg4 = getpgrp(1);
11576
11577         /*
11578          * If all of these values are the same, it's pretty sure that
11579          * we're on a system that ignores getpgrp's first argument.
11580          */
11581         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11582                 exit(0);
11583
11584         child = fork();
11585         if (child < 0)
11586                 exit(1);
11587         else if (child == 0) {
11588                 np = getpid();
11589                 /*
11590                  * If this is Sys V, this will not work; pgrp will be
11591                  * set to np because setpgrp just changes a pgrp to be
11592                  * the same as the pid.
11593                  */
11594                 setpgrp(np, pg1);
11595                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11596                 if (ng == pg1) {
11597                         exit(1);
11598                 } else {
11599                         exit(0);
11600                 }
11601         } else {
11602                 wait(&s);
11603                 exit(s>>8);
11604         }
11605 }
11606
11607 EOF
11608 if { (eval echo configure:11609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11609 then
11610   ac_cv_func_getpgrp_void=yes
11611 else
11612   conftest_rc="$?"
11613   echo "configure: failed program was:" >&5
11614   cat conftest.$ac_ext >&5
11615   rm -fr conftest*
11616   ac_cv_func_getpgrp_void=no
11617 fi
11618 rm -fr conftest*
11619
11620
11621 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11622 if test $ac_cv_func_getpgrp_void = yes; then
11623   { test "$extra_verbose" = "yes" && cat << \EOF
11624     Defining GETPGRP_VOID
11625 EOF
11626 cat >> confdefs.h <<\EOF
11627 #define GETPGRP_VOID 1
11628 EOF
11629 }
11630
11631 fi
11632
11633
11634 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11635 echo "configure:11636: checking for working mmap" >&5
11636 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11637 cat > conftest.$ac_ext <<EOF
11638 #line 11639 "configure"
11639 #include "confdefs.h"
11640 #include <stdio.h>
11641 #include <unistd.h>
11642 #include <fcntl.h>
11643 #include <sys/mman.h>
11644
11645 #ifndef MAP_VARIABLE
11646 #define MAP_VARIABLE 0
11647 #endif
11648
11649 #ifndef MAP_FAILED
11650 #define MAP_FAILED -1
11651 #endif
11652
11653 int main (int argc, char *argv[])
11654 {
11655   int fd = -1;
11656   caddr_t p;
11657 #ifndef MAP_ANONYMOUS
11658   fd = open ("/dev/zero", O_RDWR);
11659   if (fd < 0)
11660     return 1;
11661 #define MAP_ANONYMOUS 0
11662 #endif
11663   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11664            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11665            fd, 0) != (void *) MAP_FAILED)
11666     return 0;
11667   perror ("conftest: mmap failed");
11668   return 1;
11669 }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11672 then
11673   have_mmap=yes
11674 else
11675   conftest_rc="$?"
11676   echo "configure: failed program was:" >&5
11677   cat conftest.$ac_ext >&5
11678   rm -fr conftest*
11679   have_mmap=no
11680 fi
11681 rm -fr conftest* ;;
11682 esac
11683 echo "$ac_t""$have_mmap" 1>&6
11684 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11685     Defining HAVE_MMAP
11686 EOF
11687 cat >> confdefs.h <<\EOF
11688 #define HAVE_MMAP 1
11689 EOF
11690 }
11691
11692
11693 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11694 if test "$rel_alloc $have_mmap" = "default yes"; then
11695   if test "$doug_lea_malloc" = "yes"; then
11696         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11697 echo "configure:11698: checking for M_MMAP_THRESHOLD" >&5
11698     cat > conftest.$ac_ext <<EOF
11699 #line 11700 "configure"
11700 #include "confdefs.h"
11701 #include <malloc.h>
11702 int main() {
11703
11704 #ifndef M_MMAP_THRESHOLD
11705 #error No M_MMAP_THRESHOLD :-(
11706 !@+$%^&*_)(_ - unlikely to compile...
11707 #endif
11708
11709 ; return 0; }
11710 EOF
11711 if { (eval echo configure:11712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11712   rm -rf conftest*
11713   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11714 else
11715   echo "configure: failed program was:" >&5
11716   cat conftest.$ac_ext >&5
11717   rm -rf conftest*
11718   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11719 fi
11720 rm -f conftest*
11721   else
11722     rel_alloc=yes
11723   fi
11724 fi
11725 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11726     Defining REL_ALLOC
11727 EOF
11728 cat >> confdefs.h <<\EOF
11729 #define REL_ALLOC 1
11730 EOF
11731 }
11732
11733
11734 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11735 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11736 echo "configure:11737: checking for termios.h" >&5
11737
11738 cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741 #include <termios.h>
11742 EOF
11743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11744 { (eval echo configure:11745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11746 if test -z "$ac_err"; then
11747   rm -rf conftest*
11748   eval "ac_cv_header_$ac_safe=yes"
11749 else
11750   echo "$ac_err" >&5
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   eval "ac_cv_header_$ac_safe=no"
11755 fi
11756 rm -f conftest*
11757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11758   echo "$ac_t""yes" 1>&6
11759   { test "$extra_verbose" = "yes" && cat << \EOF
11760     Defining HAVE_TERMIOS
11761 EOF
11762 cat >> confdefs.h <<\EOF
11763 #define HAVE_TERMIOS 1
11764 EOF
11765 }
11766
11767   { test "$extra_verbose" = "yes" && cat << \EOF
11768     Defining SIGNALS_VIA_CHARACTERS
11769 EOF
11770 cat >> confdefs.h <<\EOF
11771 #define SIGNALS_VIA_CHARACTERS 1
11772 EOF
11773 }
11774
11775   { test "$extra_verbose" = "yes" && cat << \EOF
11776     Defining NO_TERMIO
11777 EOF
11778 cat >> confdefs.h <<\EOF
11779 #define NO_TERMIO 1
11780 EOF
11781 }
11782
11783 else
11784   echo "$ac_t""no" 1>&6
11785 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11786 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11787 echo "configure:11788: checking for termio.h" >&5
11788
11789 cat > conftest.$ac_ext <<EOF
11790 #line 11791 "configure"
11791 #include "confdefs.h"
11792 #include <termio.h>
11793 EOF
11794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11795 { (eval echo configure:11796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11797 if test -z "$ac_err"; then
11798   rm -rf conftest*
11799   eval "ac_cv_header_$ac_safe=yes"
11800 else
11801   echo "$ac_err" >&5
11802   echo "configure: failed program was:" >&5
11803   cat conftest.$ac_ext >&5
11804   rm -rf conftest*
11805   eval "ac_cv_header_$ac_safe=no"
11806 fi
11807 rm -f conftest*
11808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11809   echo "$ac_t""yes" 1>&6
11810   { test "$extra_verbose" = "yes" && cat << \EOF
11811     Defining HAVE_TERMIO
11812 EOF
11813 cat >> confdefs.h <<\EOF
11814 #define HAVE_TERMIO 1
11815 EOF
11816 }
11817
11818 else
11819   echo "$ac_t""no" 1>&6
11820 fi
11821
11822 fi
11823
11824
11825
11826 echo $ac_n "checking for socket""... $ac_c" 1>&6
11827 echo "configure:11828: checking for socket" >&5
11828
11829 cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832 /* System header to define __stub macros and hopefully few prototypes,
11833     which can conflict with char socket(); below.  */
11834 #include <assert.h>
11835 /* Override any gcc2 internal prototype to avoid an error.  */
11836 /* We use char because int might match the return type of a gcc2
11837     builtin and then its argument prototype would still apply.  */
11838 char socket();
11839
11840 int main() {
11841
11842 /* The GNU C library defines this for functions which it implements
11843     to always fail with ENOSYS.  Some functions are actually named
11844     something starting with __ and the normal name is an alias.  */
11845 #if defined (__stub_socket) || defined (__stub___socket)
11846 choke me
11847 #else
11848 socket();
11849 #endif
11850
11851 ; return 0; }
11852 EOF
11853 if { (eval echo configure:11854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11854   rm -rf conftest*
11855   eval "ac_cv_func_socket=yes"
11856 else
11857   echo "configure: failed program was:" >&5
11858   cat conftest.$ac_ext >&5
11859   rm -rf conftest*
11860   eval "ac_cv_func_socket=no"
11861 fi
11862 rm -f conftest*
11863
11864 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11865   echo "$ac_t""yes" 1>&6
11866   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11867 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11868 echo "configure:11869: checking for netinet/in.h" >&5
11869
11870 cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 #include <netinet/in.h>
11874 EOF
11875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11876 { (eval echo configure:11877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11878 if test -z "$ac_err"; then
11879   rm -rf conftest*
11880   eval "ac_cv_header_$ac_safe=yes"
11881 else
11882   echo "$ac_err" >&5
11883   echo "configure: failed program was:" >&5
11884   cat conftest.$ac_ext >&5
11885   rm -rf conftest*
11886   eval "ac_cv_header_$ac_safe=no"
11887 fi
11888 rm -f conftest*
11889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11890   echo "$ac_t""yes" 1>&6
11891   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11892 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11893 echo "configure:11894: checking for arpa/inet.h" >&5
11894
11895 cat > conftest.$ac_ext <<EOF
11896 #line 11897 "configure"
11897 #include "confdefs.h"
11898 #include <arpa/inet.h>
11899 EOF
11900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11901 { (eval echo configure:11902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11903 if test -z "$ac_err"; then
11904   rm -rf conftest*
11905   eval "ac_cv_header_$ac_safe=yes"
11906 else
11907   echo "$ac_err" >&5
11908   echo "configure: failed program was:" >&5
11909   cat conftest.$ac_ext >&5
11910   rm -rf conftest*
11911   eval "ac_cv_header_$ac_safe=no"
11912 fi
11913 rm -f conftest*
11914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11915   echo "$ac_t""yes" 1>&6
11916   
11917   { test "$extra_verbose" = "yes" && cat << \EOF
11918     Defining HAVE_SOCKETS
11919 EOF
11920 cat >> confdefs.h <<\EOF
11921 #define HAVE_SOCKETS 1
11922 EOF
11923 }
11924
11925       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11926 echo "configure:11927: checking "for sun_len member in struct sockaddr_un"" >&5
11927       cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930
11931 #include <sys/types.h>
11932 #include <sys/socket.h>
11933 #include <sys/un.h>
11934       
11935 int main() {
11936 static struct sockaddr_un x; x.sun_len = 1;
11937 ; return 0; }
11938 EOF
11939 if { (eval echo configure:11940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11940   rm -rf conftest*
11941   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11942     Defining HAVE_SOCKADDR_SUN_LEN
11943 EOF
11944 cat >> confdefs.h <<\EOF
11945 #define HAVE_SOCKADDR_SUN_LEN 1
11946 EOF
11947 }
11948
11949 else
11950   echo "configure: failed program was:" >&5
11951   cat conftest.$ac_ext >&5
11952   rm -rf conftest*
11953   echo "$ac_t""no" 1>&6
11954 fi
11955 rm -f conftest*
11956       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11957 echo "configure:11958: checking "for ip_mreq struct in netinet/in.h"" >&5
11958       cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961
11962 #include <sys/types.h>
11963 #include <netinet/in.h>
11964       
11965 int main() {
11966 static struct ip_mreq x;
11967 ; return 0; }
11968 EOF
11969 if { (eval echo configure:11970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11970   rm -rf conftest*
11971   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11972     Defining HAVE_MULTICAST
11973 EOF
11974 cat >> confdefs.h <<\EOF
11975 #define HAVE_MULTICAST 1
11976 EOF
11977 }
11978
11979 else
11980   echo "configure: failed program was:" >&5
11981   cat conftest.$ac_ext >&5
11982   rm -rf conftest*
11983   echo "$ac_t""no" 1>&6
11984 fi
11985 rm -f conftest*
11986 else
11987   echo "$ac_t""no" 1>&6
11988 fi
11989
11990 else
11991   echo "$ac_t""no" 1>&6
11992 fi
11993
11994 else
11995   echo "$ac_t""no" 1>&6
11996 fi
11997
11998
11999 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12000 echo "configure:12001: checking for msgget" >&5
12001
12002 cat > conftest.$ac_ext <<EOF
12003 #line 12004 "configure"
12004 #include "confdefs.h"
12005 /* System header to define __stub macros and hopefully few prototypes,
12006     which can conflict with char msgget(); below.  */
12007 #include <assert.h>
12008 /* Override any gcc2 internal prototype to avoid an error.  */
12009 /* We use char because int might match the return type of a gcc2
12010     builtin and then its argument prototype would still apply.  */
12011 char msgget();
12012
12013 int main() {
12014
12015 /* The GNU C library defines this for functions which it implements
12016     to always fail with ENOSYS.  Some functions are actually named
12017     something starting with __ and the normal name is an alias.  */
12018 #if defined (__stub_msgget) || defined (__stub___msgget)
12019 choke me
12020 #else
12021 msgget();
12022 #endif
12023
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   eval "ac_cv_func_msgget=yes"
12029 else
12030   echo "configure: failed program was:" >&5
12031   cat conftest.$ac_ext >&5
12032   rm -rf conftest*
12033   eval "ac_cv_func_msgget=no"
12034 fi
12035 rm -f conftest*
12036
12037 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12038   echo "$ac_t""yes" 1>&6
12039   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12040 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12041 echo "configure:12042: checking for sys/ipc.h" >&5
12042
12043 cat > conftest.$ac_ext <<EOF
12044 #line 12045 "configure"
12045 #include "confdefs.h"
12046 #include <sys/ipc.h>
12047 EOF
12048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12049 { (eval echo configure:12050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12051 if test -z "$ac_err"; then
12052   rm -rf conftest*
12053   eval "ac_cv_header_$ac_safe=yes"
12054 else
12055   echo "$ac_err" >&5
12056   echo "configure: failed program was:" >&5
12057   cat conftest.$ac_ext >&5
12058   rm -rf conftest*
12059   eval "ac_cv_header_$ac_safe=no"
12060 fi
12061 rm -f conftest*
12062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12063   echo "$ac_t""yes" 1>&6
12064   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12065 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12066 echo "configure:12067: checking for sys/msg.h" >&5
12067
12068 cat > conftest.$ac_ext <<EOF
12069 #line 12070 "configure"
12070 #include "confdefs.h"
12071 #include <sys/msg.h>
12072 EOF
12073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12074 { (eval echo configure:12075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12076 if test -z "$ac_err"; then
12077   rm -rf conftest*
12078   eval "ac_cv_header_$ac_safe=yes"
12079 else
12080   echo "$ac_err" >&5
12081   echo "configure: failed program was:" >&5
12082   cat conftest.$ac_ext >&5
12083   rm -rf conftest*
12084   eval "ac_cv_header_$ac_safe=no"
12085 fi
12086 rm -f conftest*
12087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12088   echo "$ac_t""yes" 1>&6
12089   { test "$extra_verbose" = "yes" && cat << \EOF
12090     Defining HAVE_SYSVIPC
12091 EOF
12092 cat >> confdefs.h <<\EOF
12093 #define HAVE_SYSVIPC 1
12094 EOF
12095 }
12096
12097 else
12098   echo "$ac_t""no" 1>&6
12099 fi
12100
12101 else
12102   echo "$ac_t""no" 1>&6
12103 fi
12104
12105 else
12106   echo "$ac_t""no" 1>&6
12107 fi
12108
12109
12110 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12111 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12112 echo "configure:12113: checking for dirent.h" >&5
12113
12114 cat > conftest.$ac_ext <<EOF
12115 #line 12116 "configure"
12116 #include "confdefs.h"
12117 #include <dirent.h>
12118 EOF
12119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12120 { (eval echo configure:12121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12122 if test -z "$ac_err"; then
12123   rm -rf conftest*
12124   eval "ac_cv_header_$ac_safe=yes"
12125 else
12126   echo "$ac_err" >&5
12127   echo "configure: failed program was:" >&5
12128   cat conftest.$ac_ext >&5
12129   rm -rf conftest*
12130   eval "ac_cv_header_$ac_safe=no"
12131 fi
12132 rm -f conftest*
12133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12134   echo "$ac_t""yes" 1>&6
12135   { test "$extra_verbose" = "yes" && cat << \EOF
12136     Defining SYSV_SYSTEM_DIR
12137 EOF
12138 cat >> confdefs.h <<\EOF
12139 #define SYSV_SYSTEM_DIR 1
12140 EOF
12141 }
12142
12143 else
12144   echo "$ac_t""no" 1>&6
12145 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12146 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12147 echo "configure:12148: checking for sys/dir.h" >&5
12148
12149 cat > conftest.$ac_ext <<EOF
12150 #line 12151 "configure"
12151 #include "confdefs.h"
12152 #include <sys/dir.h>
12153 EOF
12154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12155 { (eval echo configure:12156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12157 if test -z "$ac_err"; then
12158   rm -rf conftest*
12159   eval "ac_cv_header_$ac_safe=yes"
12160 else
12161   echo "$ac_err" >&5
12162   echo "configure: failed program was:" >&5
12163   cat conftest.$ac_ext >&5
12164   rm -rf conftest*
12165   eval "ac_cv_header_$ac_safe=no"
12166 fi
12167 rm -f conftest*
12168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12169   echo "$ac_t""yes" 1>&6
12170   :
12171 else
12172   echo "$ac_t""no" 1>&6
12173 { test "$extra_verbose" = "yes" && cat << \EOF
12174     Defining NONSYSTEM_DIR_LIBRARY
12175 EOF
12176 cat >> confdefs.h <<\EOF
12177 #define NONSYSTEM_DIR_LIBRARY 1
12178 EOF
12179 }
12180
12181 fi
12182
12183 fi
12184
12185
12186 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12187 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12188 echo "configure:12189: checking for nlist.h" >&5
12189
12190 cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193 #include <nlist.h>
12194 EOF
12195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12196 { (eval echo configure:12197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12198 if test -z "$ac_err"; then
12199   rm -rf conftest*
12200   eval "ac_cv_header_$ac_safe=yes"
12201 else
12202   echo "$ac_err" >&5
12203   echo "configure: failed program was:" >&5
12204   cat conftest.$ac_ext >&5
12205   rm -rf conftest*
12206   eval "ac_cv_header_$ac_safe=no"
12207 fi
12208 rm -f conftest*
12209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12210   echo "$ac_t""yes" 1>&6
12211   { test "$extra_verbose" = "yes" && cat << \EOF
12212     Defining NLIST_STRUCT
12213 EOF
12214 cat >> confdefs.h <<\EOF
12215 #define NLIST_STRUCT 1
12216 EOF
12217 }
12218
12219 else
12220   echo "$ac_t""no" 1>&6
12221 fi
12222
12223
12224
12225 echo "checking "for sound support"" 1>&6
12226 echo "configure:12227: checking "for sound support"" >&5
12227 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12228
12229 if test "$with_native_sound" != "no"; then
12230     if test -n "$native_sound_lib"; then
12231     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12232 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12233 echo "configure:12234: checking for multimedia/audio_device.h" >&5
12234
12235 cat > conftest.$ac_ext <<EOF
12236 #line 12237 "configure"
12237 #include "confdefs.h"
12238 #include <multimedia/audio_device.h>
12239 EOF
12240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12241 { (eval echo configure:12242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12243 if test -z "$ac_err"; then
12244   rm -rf conftest*
12245   eval "ac_cv_header_$ac_safe=yes"
12246 else
12247   echo "$ac_err" >&5
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   eval "ac_cv_header_$ac_safe=no"
12252 fi
12253 rm -f conftest*
12254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12255   echo "$ac_t""yes" 1>&6
12256   sound_found=yes sound_cflags=""
12257       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12258    echo "    xemacs will be linked with \"sunplay.o\""
12259  fi
12260 else
12261   echo "$ac_t""no" 1>&6
12262 fi
12263
12264   fi
12265
12266     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12267     sound_found=yes
12268     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12269    echo "    xemacs will be linked with \"sunplay.o\""
12270  fi
12271     if test -d "/usr/demo/SOUND/include"
12272       then sound_cflags="-I/usr/demo/SOUND/include"
12273       else sound_cflags="-I/usr/demo/SOUND"
12274     fi
12275     if test -z "$native_sound_lib" ; then
12276       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12277         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12278         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12279       fi
12280     fi
12281   fi
12282
12283     if test -z "$sound_found"; then
12284     case "$canonical" in
12285     *-sgi-* )
12286       if test -z "$native_sound_lib"; then
12287         
12288 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12289 echo "configure:12290: checking for ALopenport in -laudio" >&5
12290 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12291
12292 xe_check_libs=" -laudio "
12293 cat > conftest.$ac_ext <<EOF
12294 #line 12295 "configure"
12295 #include "confdefs.h"
12296 /* Override any gcc2 internal prototype to avoid an error.  */
12297 /* We use char because int might match the return type of a gcc2
12298     builtin and then its argument prototype would still apply.  */
12299 char ALopenport();
12300
12301 int main() {
12302 ALopenport()
12303 ; return 0; }
12304 EOF
12305 if { (eval echo configure:12306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12306   rm -rf conftest*
12307   eval "ac_cv_lib_$ac_lib_var=yes"
12308 else
12309   echo "configure: failed program was:" >&5
12310   cat conftest.$ac_ext >&5
12311   rm -rf conftest*
12312   eval "ac_cv_lib_$ac_lib_var=no"
12313 fi
12314 rm -f conftest*
12315 xe_check_libs=""
12316
12317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12318   echo "$ac_t""yes" 1>&6
12319   native_sound_lib="-laudio"
12320 else
12321   echo "$ac_t""no" 1>&6
12322 fi
12323
12324
12325       fi
12326       if test -n "$native_sound_lib"; then
12327         sound_found=yes sound_cflags=""
12328         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12329    echo "    xemacs will be linked with \"sgiplay.o\""
12330  fi
12331       fi ;;
12332     hppa*-hp-hpux* )
12333       if test -z "$native_sound_lib"; then
12334         
12335 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12336 echo "configure:12337: checking for AOpenAudio in -lAlib" >&5
12337 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12338
12339 xe_check_libs=" -lAlib "
12340 cat > conftest.$ac_ext <<EOF
12341 #line 12342 "configure"
12342 #include "confdefs.h"
12343 /* Override any gcc2 internal prototype to avoid an error.  */
12344 /* We use char because int might match the return type of a gcc2
12345     builtin and then its argument prototype would still apply.  */
12346 char AOpenAudio();
12347
12348 int main() {
12349 AOpenAudio()
12350 ; return 0; }
12351 EOF
12352 if { (eval echo configure:12353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12353   rm -rf conftest*
12354   eval "ac_cv_lib_$ac_lib_var=yes"
12355 else
12356   echo "configure: failed program was:" >&5
12357   cat conftest.$ac_ext >&5
12358   rm -rf conftest*
12359   eval "ac_cv_lib_$ac_lib_var=no"
12360 fi
12361 rm -f conftest*
12362 xe_check_libs=""
12363
12364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12365   echo "$ac_t""yes" 1>&6
12366   native_sound_lib="-lAlib"
12367 else
12368   echo "$ac_t""no" 1>&6
12369 fi
12370
12371
12372       fi
12373       if test -n "$native_sound_lib"; then
12374         sound_found=yes
12375         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12376    echo "    xemacs will be linked with \"hpplay.o\""
12377  fi
12378         if test "$GCC" = "yes" # Kludge city
12379           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12380           else sound_cflags="+e -I/usr/audio/examples"
12381         fi
12382       fi ;;
12383     esac
12384   fi
12385
12386     if test -z "$sound_found"; then
12387     for dir in "machine" "sys" "linux"; do
12388       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12389 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12390 echo "configure:12391: checking for ${dir}/soundcard.h" >&5
12391
12392 cat > conftest.$ac_ext <<EOF
12393 #line 12394 "configure"
12394 #include "confdefs.h"
12395 #include <${dir}/soundcard.h>
12396 EOF
12397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12398 { (eval echo configure:12399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12400 if test -z "$ac_err"; then
12401   rm -rf conftest*
12402   eval "ac_cv_header_$ac_safe=yes"
12403 else
12404   echo "$ac_err" >&5
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -rf conftest*
12408   eval "ac_cv_header_$ac_safe=no"
12409 fi
12410 rm -f conftest*
12411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12412   echo "$ac_t""yes" 1>&6
12413   sound_found=yes
12414        need_miscplay=yes
12415         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12416    echo "    xemacs will be linked with \"linuxplay.o\""
12417  fi
12418         { test "$extra_verbose" = "yes" && cat << EOF
12419     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12420 EOF
12421 cat >> confdefs.h <<EOF
12422 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12423 EOF
12424 }
12425
12426         break
12427 else
12428   echo "$ac_t""no" 1>&6
12429 fi
12430
12431     done
12432   fi
12433
12434     if test -z "$sound_found"; then
12435     if test "$with_msw" = "yes"; then
12436     sound_found=yes
12437     native_sound_lib=
12438     fi
12439   fi
12440
12441   test "$sound_found" = "yes" && with_native_sound=yes
12442 fi
12443
12444 if test "$with_native_sound" = "yes"; then
12445   { test "$extra_verbose" = "yes" && cat << \EOF
12446     Defining HAVE_NATIVE_SOUND
12447 EOF
12448 cat >> confdefs.h <<\EOF
12449 #define HAVE_NATIVE_SOUND 1
12450 EOF
12451 }
12452
12453   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12454 fi
12455
12456 if test "$with_nas_sound" != "no"; then
12457   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12458 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12459 echo "configure:12460: checking for audio/audiolib.h" >&5
12460
12461 cat > conftest.$ac_ext <<EOF
12462 #line 12463 "configure"
12463 #include "confdefs.h"
12464 #include <audio/audiolib.h>
12465 EOF
12466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12467 { (eval echo configure:12468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12469 if test -z "$ac_err"; then
12470   rm -rf conftest*
12471   eval "ac_cv_header_$ac_safe=yes"
12472 else
12473   echo "$ac_err" >&5
12474   echo "configure: failed program was:" >&5
12475   cat conftest.$ac_ext >&5
12476   rm -rf conftest*
12477   eval "ac_cv_header_$ac_safe=no"
12478 fi
12479 rm -f conftest*
12480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12481   echo "$ac_t""yes" 1>&6
12482   
12483     
12484 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12485 echo "configure:12486: checking for AuOpenServer in -laudio" >&5
12486 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12487
12488 xe_check_libs=" -laudio "
12489 cat > conftest.$ac_ext <<EOF
12490 #line 12491 "configure"
12491 #include "confdefs.h"
12492 /* Override any gcc2 internal prototype to avoid an error.  */
12493 /* We use char because int might match the return type of a gcc2
12494     builtin and then its argument prototype would still apply.  */
12495 char AuOpenServer();
12496
12497 int main() {
12498 AuOpenServer()
12499 ; return 0; }
12500 EOF
12501 if { (eval echo configure:12502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12502   rm -rf conftest*
12503   eval "ac_cv_lib_$ac_lib_var=yes"
12504 else
12505   echo "configure: failed program was:" >&5
12506   cat conftest.$ac_ext >&5
12507   rm -rf conftest*
12508   eval "ac_cv_lib_$ac_lib_var=no"
12509 fi
12510 rm -f conftest*
12511 xe_check_libs=""
12512
12513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12514   echo "$ac_t""yes" 1>&6
12515   have_nas_sound=yes
12516 else
12517   echo "$ac_t""no" 1>&6
12518 fi
12519
12520
12521 else
12522   echo "$ac_t""no" 1>&6
12523 fi
12524
12525   if test "$have_nas_sound" = "yes"; then
12526     with_nas_sound=yes
12527     { test "$extra_verbose" = "yes" && cat << \EOF
12528     Defining HAVE_NAS_SOUND
12529 EOF
12530 cat >> confdefs.h <<\EOF
12531 #define HAVE_NAS_SOUND 1
12532 EOF
12533 }
12534
12535     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12536    echo "    xemacs will be linked with \"nas.o\""
12537  fi
12538     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12539             cat > conftest.$ac_ext <<EOF
12540 #line 12541 "configure"
12541 #include "confdefs.h"
12542 #include <audio/Xtutil.h>
12543 EOF
12544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12545   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12546   :
12547 else
12548   rm -rf conftest*
12549   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12550     Defining NAS_NO_ERROR_JUMP
12551 EOF
12552 cat >> confdefs.h <<\EOF
12553 #define NAS_NO_ERROR_JUMP 1
12554 EOF
12555 }
12556
12557 fi
12558 rm -f conftest*
12559
12560   else
12561     test "$with_nas_sound" = "yes" && \
12562       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12563     with_nas_sound=no
12564   fi
12565 fi
12566
12567 if test "$with_esd_sound" != "no"; then
12568   # Extract the first word of "esd-config", so it can be a program name with args.
12569 set dummy esd-config; ac_word=$2
12570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12571 echo "configure:12572: checking for $ac_word" >&5
12572
12573 if test -n "$have_esd_config"; then
12574   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12575 else
12576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12577   ac_dummy="$PATH"
12578   for ac_dir in $ac_dummy; do
12579     test -z "$ac_dir" && ac_dir=.
12580     if test -f $ac_dir/$ac_word; then
12581       ac_cv_prog_have_esd_config="yes"
12582       break
12583     fi
12584   done
12585   IFS="$ac_save_ifs"
12586   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12587 fi
12588 have_esd_config="$ac_cv_prog_have_esd_config"
12589 if test -n "$have_esd_config"; then
12590   echo "$ac_t""$have_esd_config" 1>&6
12591 else
12592   echo "$ac_t""no" 1>&6
12593 fi
12594
12595   if test "$have_esd_config" = "yes"; then
12596     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12597     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
12598     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12599     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12600 echo "configure:12601: checking for esd_play_stream" >&5
12601
12602 cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 /* System header to define __stub macros and hopefully few prototypes,
12606     which can conflict with char esd_play_stream(); below.  */
12607 #include <assert.h>
12608 /* Override any gcc2 internal prototype to avoid an error.  */
12609 /* We use char because int might match the return type of a gcc2
12610     builtin and then its argument prototype would still apply.  */
12611 char esd_play_stream();
12612
12613 int main() {
12614
12615 /* The GNU C library defines this for functions which it implements
12616     to always fail with ENOSYS.  Some functions are actually named
12617     something starting with __ and the normal name is an alias.  */
12618 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12619 choke me
12620 #else
12621 esd_play_stream();
12622 #endif
12623
12624 ; return 0; }
12625 EOF
12626 if { (eval echo configure:12627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12627   rm -rf conftest*
12628   eval "ac_cv_func_esd_play_stream=yes"
12629 else
12630   echo "configure: failed program was:" >&5
12631   cat conftest.$ac_ext >&5
12632   rm -rf conftest*
12633   eval "ac_cv_func_esd_play_stream=no"
12634 fi
12635 rm -f conftest*
12636
12637 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12638   echo "$ac_t""yes" 1>&6
12639   have_esd_sound=yes
12640 else
12641   echo "$ac_t""no" 1>&6
12642 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12643 fi
12644
12645   fi
12646
12647   if test "$have_esd_sound" = "yes"; then
12648     with_esd_sound=yes
12649     need_miscplay=yes
12650     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12651    echo "    xemacs will be linked with \"esd.o\""
12652  fi
12653     { test "$extra_verbose" = "yes" && cat << \EOF
12654     Defining HAVE_ESD_SOUND
12655 EOF
12656 cat >> confdefs.h <<\EOF
12657 #define HAVE_ESD_SOUND 1
12658 EOF
12659 }
12660
12661   else
12662     test "$with_esd_sound" = "yes" && \
12663       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12664     with_esd_sound=no
12665   fi
12666 fi
12667
12668 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12669    echo "    xemacs will be linked with \"miscplay.o\""
12670  fi
12671
12672
12673 test -z "$with_tty" && with_tty=yes
12674
12675 if test "$with_tty" = "yes"  ; then
12676   echo "checking for TTY-related features" 1>&6
12677 echo "configure:12678: checking for TTY-related features" >&5
12678   { test "$extra_verbose" = "yes" && cat << \EOF
12679     Defining HAVE_TTY
12680 EOF
12681 cat >> confdefs.h <<\EOF
12682 #define HAVE_TTY 1
12683 EOF
12684 }
12685
12686   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
12687    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\""
12688  fi
12689
12690     if test -z "$with_ncurses"; then
12691     
12692 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12693 echo "configure:12694: checking for tgetent in -lncurses" >&5
12694 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12695
12696 xe_check_libs=" -lncurses "
12697 cat > conftest.$ac_ext <<EOF
12698 #line 12699 "configure"
12699 #include "confdefs.h"
12700 /* Override any gcc2 internal prototype to avoid an error.  */
12701 /* We use char because int might match the return type of a gcc2
12702     builtin and then its argument prototype would still apply.  */
12703 char tgetent();
12704
12705 int main() {
12706 tgetent()
12707 ; return 0; }
12708 EOF
12709 if { (eval echo configure:12710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12710   rm -rf conftest*
12711   eval "ac_cv_lib_$ac_lib_var=yes"
12712 else
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   eval "ac_cv_lib_$ac_lib_var=no"
12717 fi
12718 rm -f conftest*
12719 xe_check_libs=""
12720
12721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12722   echo "$ac_t""yes" 1>&6
12723   with_ncurses=yes
12724 else
12725   echo "$ac_t""no" 1>&6
12726 with_ncurses=no
12727 fi
12728
12729
12730   fi
12731   if test "$with_ncurses" = "yes"; then
12732     { test "$extra_verbose" = "yes" && cat << \EOF
12733     Defining HAVE_NCURSES
12734 EOF
12735 cat >> confdefs.h <<\EOF
12736 #define HAVE_NCURSES 1
12737 EOF
12738 }
12739
12740     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12741 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12742 echo "configure:12743: checking for ncurses/curses.h" >&5
12743
12744 cat > conftest.$ac_ext <<EOF
12745 #line 12746 "configure"
12746 #include "confdefs.h"
12747 #include <ncurses/curses.h>
12748 EOF
12749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12750 { (eval echo configure:12751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12752 if test -z "$ac_err"; then
12753   rm -rf conftest*
12754   eval "ac_cv_header_$ac_safe=yes"
12755 else
12756   echo "$ac_err" >&5
12757   echo "configure: failed program was:" >&5
12758   cat conftest.$ac_ext >&5
12759   rm -rf conftest*
12760   eval "ac_cv_header_$ac_safe=no"
12761 fi
12762 rm -f conftest*
12763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12764   echo "$ac_t""yes" 1>&6
12765   curses_h_file=ncurses/curses.h
12766 else
12767   echo "$ac_t""no" 1>&6
12768 fi
12769
12770     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12771 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12772 echo "configure:12773: checking for ncurses/term.h" >&5
12773
12774 cat > conftest.$ac_ext <<EOF
12775 #line 12776 "configure"
12776 #include "confdefs.h"
12777 #include <ncurses/term.h>
12778 EOF
12779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12780 { (eval echo configure:12781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12782 if test -z "$ac_err"; then
12783   rm -rf conftest*
12784   eval "ac_cv_header_$ac_safe=yes"
12785 else
12786   echo "$ac_err" >&5
12787   echo "configure: failed program was:" >&5
12788   cat conftest.$ac_ext >&5
12789   rm -rf conftest*
12790   eval "ac_cv_header_$ac_safe=no"
12791 fi
12792 rm -f conftest*
12793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12794   echo "$ac_t""yes" 1>&6
12795   term_h_file=ncurses/term.h
12796 else
12797   echo "$ac_t""no" 1>&6
12798 fi
12799
12800     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12801    echo "    xemacs will be linked with \"terminfo.o\""
12802  fi
12803     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12804
12805     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12806                         save_c_switch_site="$c_switch_site"
12807       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12808       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12809 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12810 echo "configure:12811: checking for ncurses/curses.h" >&5
12811
12812 cat > conftest.$ac_ext <<EOF
12813 #line 12814 "configure"
12814 #include "confdefs.h"
12815 #include <ncurses/curses.h>
12816 EOF
12817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12818 { (eval echo configure:12819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12820 if test -z "$ac_err"; then
12821   rm -rf conftest*
12822   eval "ac_cv_header_$ac_safe=yes"
12823 else
12824   echo "$ac_err" >&5
12825   echo "configure: failed program was:" >&5
12826   cat conftest.$ac_ext >&5
12827   rm -rf conftest*
12828   eval "ac_cv_header_$ac_safe=no"
12829 fi
12830 rm -f conftest*
12831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12832   echo "$ac_t""yes" 1>&6
12833   curses_h_file=ncurses/curses.h
12834 else
12835   echo "$ac_t""no" 1>&6
12836 fi
12837
12838       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12839         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12840         else c_switch_site="$save_c_switch_site"
12841       fi
12842     fi
12843   else         if test "$have_terminfo" = "yes"; then
12844       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12845    echo "    xemacs will be linked with \"terminfo.o\""
12846  fi
12847       if test -n "$libs_termcap"; then
12848         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12849       else
12850         for lib in curses termlib termcap; do
12851           
12852 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12853 echo "configure:12854: checking for tgetent in -l$lib" >&5
12854 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12855
12856 xe_check_libs=" -l$lib "
12857 cat > conftest.$ac_ext <<EOF
12858 #line 12859 "configure"
12859 #include "confdefs.h"
12860 /* Override any gcc2 internal prototype to avoid an error.  */
12861 /* We use char because int might match the return type of a gcc2
12862     builtin and then its argument prototype would still apply.  */
12863 char tgetent();
12864
12865 int main() {
12866 tgetent()
12867 ; return 0; }
12868 EOF
12869 if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12870   rm -rf conftest*
12871   eval "ac_cv_lib_$ac_lib_var=yes"
12872 else
12873   echo "configure: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   rm -rf conftest*
12876   eval "ac_cv_lib_$ac_lib_var=no"
12877 fi
12878 rm -f conftest*
12879 xe_check_libs=""
12880
12881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12882   echo "$ac_t""yes" 1>&6
12883   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12884 else
12885   echo "$ac_t""no" 1>&6
12886 fi
12887
12888
12889         done
12890       fi
12891     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12892    echo "    xemacs will be linked with \"tparam.o\""
12893  fi
12894                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12895       if test -n "$libs_termcap"; then
12896         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12897       else
12898         
12899 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12900 echo "configure:12901: checking for tgetent in -lcurses" >&5
12901 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12902
12903 xe_check_libs=" -lcurses "
12904 cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* Override any gcc2 internal prototype to avoid an error.  */
12908 /* We use char because int might match the return type of a gcc2
12909     builtin and then its argument prototype would still apply.  */
12910 char tgetent();
12911
12912 int main() {
12913 tgetent()
12914 ; return 0; }
12915 EOF
12916 if { (eval echo configure:12917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12917   rm -rf conftest*
12918   eval "ac_cv_lib_$ac_lib_var=yes"
12919 else
12920   echo "configure: failed program was:" >&5
12921   cat conftest.$ac_ext >&5
12922   rm -rf conftest*
12923   eval "ac_cv_lib_$ac_lib_var=no"
12924 fi
12925 rm -f conftest*
12926 xe_check_libs=""
12927
12928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12929   echo "$ac_t""yes" 1>&6
12930   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12931 else
12932   echo "$ac_t""no" 1>&6
12933 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12934 echo "configure:12935: checking for tgetent in -ltermcap" >&5
12935 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12936
12937 xe_check_libs=" -ltermcap "
12938 cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 /* Override any gcc2 internal prototype to avoid an error.  */
12942 /* We use char because int might match the return type of a gcc2
12943     builtin and then its argument prototype would still apply.  */
12944 char tgetent();
12945
12946 int main() {
12947 tgetent()
12948 ; return 0; }
12949 EOF
12950 if { (eval echo configure:12951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12951   rm -rf conftest*
12952   eval "ac_cv_lib_$ac_lib_var=yes"
12953 else
12954   echo "configure: failed program was:" >&5
12955   cat conftest.$ac_ext >&5
12956   rm -rf conftest*
12957   eval "ac_cv_lib_$ac_lib_var=no"
12958 fi
12959 rm -f conftest*
12960 xe_check_libs=""
12961
12962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12963   echo "$ac_t""yes" 1>&6
12964   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12965 else
12966   echo "$ac_t""no" 1>&6
12967 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12968    echo "    xemacs will be linked with \"termcap.o\""
12969  fi
12970 fi
12971
12972
12973 fi
12974
12975
12976       fi
12977     fi
12978   fi
12979   { test "$extra_verbose" = "yes" && cat << EOF
12980     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12981 EOF
12982 cat >> confdefs.h <<EOF
12983 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12984 EOF
12985 }
12986
12987   { test "$extra_verbose" = "yes" && cat << EOF
12988     Defining TERM_H_FILE = "${term_h_file-term.h}"
12989 EOF
12990 cat >> confdefs.h <<EOF
12991 #define TERM_H_FILE "${term_h_file-term.h}"
12992 EOF
12993 }
12994
12995
12996     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12997 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12998 echo "configure:12999: checking for gpm.h" >&5
12999
13000 cat > conftest.$ac_ext <<EOF
13001 #line 13002 "configure"
13002 #include "confdefs.h"
13003 #include <gpm.h>
13004 EOF
13005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13006 { (eval echo configure:13007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13008 if test -z "$ac_err"; then
13009   rm -rf conftest*
13010   eval "ac_cv_header_$ac_safe=yes"
13011 else
13012   echo "$ac_err" >&5
13013   echo "configure: failed program was:" >&5
13014   cat conftest.$ac_ext >&5
13015   rm -rf conftest*
13016   eval "ac_cv_header_$ac_safe=no"
13017 fi
13018 rm -f conftest*
13019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13020   echo "$ac_t""yes" 1>&6
13021   :
13022 else
13023   echo "$ac_t""no" 1>&6
13024 with_gpm=no
13025 fi
13026  }
13027   test -z "$with_gpm" && { 
13028 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13029 echo "configure:13030: checking for Gpm_Open in -lgpm" >&5
13030 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13031
13032 xe_check_libs=" -lgpm "
13033 cat > conftest.$ac_ext <<EOF
13034 #line 13035 "configure"
13035 #include "confdefs.h"
13036 /* Override any gcc2 internal prototype to avoid an error.  */
13037 /* We use char because int might match the return type of a gcc2
13038     builtin and then its argument prototype would still apply.  */
13039 char Gpm_Open();
13040
13041 int main() {
13042 Gpm_Open()
13043 ; return 0; }
13044 EOF
13045 if { (eval echo configure:13046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13046   rm -rf conftest*
13047   eval "ac_cv_lib_$ac_lib_var=yes"
13048 else
13049   echo "configure: failed program was:" >&5
13050   cat conftest.$ac_ext >&5
13051   rm -rf conftest*
13052   eval "ac_cv_lib_$ac_lib_var=no"
13053 fi
13054 rm -f conftest*
13055 xe_check_libs=""
13056
13057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13058   echo "$ac_t""yes" 1>&6
13059   with_gpm=yes
13060 else
13061   echo "$ac_t""no" 1>&6
13062 with_gpm=no
13063 fi
13064
13065  }
13066   if test "$with_gpm" = "yes"; then
13067     { test "$extra_verbose" = "yes" && cat << \EOF
13068     Defining HAVE_GPM
13069 EOF
13070 cat >> confdefs.h <<\EOF
13071 #define HAVE_GPM 1
13072 EOF
13073 }
13074
13075     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13076    echo "    xemacs will be linked with \"gpmevent.o\""
13077  fi
13078     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13079   fi
13080
13081 else   for feature in ncurses gpm; do
13082     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13083       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13084     fi
13085     eval "with_${feature}=no"
13086   done
13087 fi 
13088 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13089    echo "    xemacs will be linked with \"event-unixoid.o\""
13090  fi
13091
13092
13093 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13094   != "no no no" && echo "checking for database support" 1>&6
13095 echo "configure:13096: checking for database support" >&5
13096
13097 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13098   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13099 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13100 echo "configure:13101: checking for ndbm.h" >&5
13101
13102 cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105 #include <ndbm.h>
13106 EOF
13107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13108 { (eval echo configure:13109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13110 if test -z "$ac_err"; then
13111   rm -rf conftest*
13112   eval "ac_cv_header_$ac_safe=yes"
13113 else
13114   echo "$ac_err" >&5
13115   echo "configure: failed program was:" >&5
13116   cat conftest.$ac_ext >&5
13117   rm -rf conftest*
13118   eval "ac_cv_header_$ac_safe=no"
13119 fi
13120 rm -f conftest*
13121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13122   echo "$ac_t""yes" 1>&6
13123   :
13124 else
13125   echo "$ac_t""no" 1>&6
13126
13127     test "$with_database_gdbm" = "yes" -o \
13128          "$with_database_dbm"  = "yes" && \
13129       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13130     with_database_gdbm=no with_database_dbm=no
13131 fi
13132
13133 fi
13134
13135 if test "$with_database_gdbm" != "no"; then
13136   
13137 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13138 echo "configure:13139: checking for dbm_open in -lgdbm" >&5
13139 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13140
13141 xe_check_libs=" -lgdbm "
13142 cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145 /* Override any gcc2 internal prototype to avoid an error.  */
13146 /* We use char because int might match the return type of a gcc2
13147     builtin and then its argument prototype would still apply.  */
13148 char dbm_open();
13149
13150 int main() {
13151 dbm_open()
13152 ; return 0; }
13153 EOF
13154 if { (eval echo configure:13155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13155   rm -rf conftest*
13156   eval "ac_cv_lib_$ac_lib_var=yes"
13157 else
13158   echo "configure: failed program was:" >&5
13159   cat conftest.$ac_ext >&5
13160   rm -rf conftest*
13161   eval "ac_cv_lib_$ac_lib_var=no"
13162 fi
13163 rm -f conftest*
13164 xe_check_libs=""
13165
13166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13167   echo "$ac_t""yes" 1>&6
13168   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13169 else
13170   echo "$ac_t""no" 1>&6
13171 if test "$with_database_gdbm" = "yes"; then
13172      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13173    fi
13174    with_database_gdbm=no
13175 fi
13176
13177
13178 fi
13179
13180 if test "$with_database_dbm" != "no"; then
13181   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13182 echo "configure:13183: checking for dbm_open" >&5
13183
13184 cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13187 /* System header to define __stub macros and hopefully few prototypes,
13188     which can conflict with char dbm_open(); below.  */
13189 #include <assert.h>
13190 /* Override any gcc2 internal prototype to avoid an error.  */
13191 /* We use char because int might match the return type of a gcc2
13192     builtin and then its argument prototype would still apply.  */
13193 char dbm_open();
13194
13195 int main() {
13196
13197 /* The GNU C library defines this for functions which it implements
13198     to always fail with ENOSYS.  Some functions are actually named
13199     something starting with __ and the normal name is an alias.  */
13200 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13201 choke me
13202 #else
13203 dbm_open();
13204 #endif
13205
13206 ; return 0; }
13207 EOF
13208 if { (eval echo configure:13209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13209   rm -rf conftest*
13210   eval "ac_cv_func_dbm_open=yes"
13211 else
13212   echo "configure: failed program was:" >&5
13213   cat conftest.$ac_ext >&5
13214   rm -rf conftest*
13215   eval "ac_cv_func_dbm_open=no"
13216 fi
13217 rm -f conftest*
13218
13219 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13220   echo "$ac_t""yes" 1>&6
13221   with_database_dbm=yes libdbm=
13222 else
13223   echo "$ac_t""no" 1>&6
13224
13225     
13226 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13227 echo "configure:13228: checking for dbm_open in -ldbm" >&5
13228 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13229
13230 xe_check_libs=" -ldbm "
13231 cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234 /* Override any gcc2 internal prototype to avoid an error.  */
13235 /* We use char because int might match the return type of a gcc2
13236     builtin and then its argument prototype would still apply.  */
13237 char dbm_open();
13238
13239 int main() {
13240 dbm_open()
13241 ; return 0; }
13242 EOF
13243 if { (eval echo configure:13244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13244   rm -rf conftest*
13245   eval "ac_cv_lib_$ac_lib_var=yes"
13246 else
13247   echo "configure: failed program was:" >&5
13248   cat conftest.$ac_ext >&5
13249   rm -rf conftest*
13250   eval "ac_cv_lib_$ac_lib_var=no"
13251 fi
13252 rm -f conftest*
13253 xe_check_libs=""
13254
13255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13256   echo "$ac_t""yes" 1>&6
13257   with_database_dbm=yes libdbm=-ldbm
13258 else
13259   echo "$ac_t""no" 1>&6
13260 test "$with_database_dbm" = "yes" && \
13261         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13262       with_database_dbm=no
13263 fi
13264
13265
13266 fi
13267
13268 fi
13269
13270 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13271 test "$with_database_gdbm" = "yes" -o \
13272      "$with_database_dbm"  = "yes" && \
13273   { test "$extra_verbose" = "yes" && cat << \EOF
13274     Defining HAVE_DBM
13275 EOF
13276 cat >> confdefs.h <<\EOF
13277 #define HAVE_DBM 1
13278 EOF
13279 }
13280
13281
13282 if test "$with_database_berkdb" != "no"; then
13283   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13284 echo "configure:13285: checking for Berkeley db.h" >&5
13285   for header in "db/db.h" "db.h"; do
13286     cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289
13290 #include <stdlib.h>
13291 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13292 #ifdef HAVE_INTTYPES_H
13293 #define __BIT_TYPES_DEFINED__
13294 #include <inttypes.h>
13295 typedef uint8_t  u_int8_t;
13296 typedef uint16_t u_int16_t;
13297 typedef uint32_t u_int32_t;
13298 #ifdef WE_DONT_NEED_QUADS
13299 typedef uint64_t u_int64_t;
13300 #endif
13301 #endif
13302 #endif
13303 #include <$header>
13304
13305 int main() {
13306
13307 ; return 0; }
13308 EOF
13309 if { (eval echo configure:13310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13310   rm -rf conftest*
13311   db_h_file="$header"; break
13312 else
13313   echo "configure: failed program was:" >&5
13314   cat conftest.$ac_ext >&5
13315 fi
13316 rm -f conftest*
13317   done
13318   if test -z "$db_h_file"
13319   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13320   else echo "$ac_t""$db_h_file" 1>&6
13321   fi
13322
13323   if test "$with_database_berkdb" != "no"; then
13324     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13325 echo "configure:13326: checking for Berkeley DB version" >&5
13326     cat > conftest.$ac_ext <<EOF
13327 #line 13328 "configure"
13328 #include "confdefs.h"
13329 #include <$db_h_file>
13330 #if DB_VERSION_MAJOR > 1
13331 yes
13332 #endif
13333
13334 EOF
13335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13336   egrep "yes" >/dev/null 2>&1; then
13337   rm -rf conftest*
13338   echo "$ac_t""2" 1>&6; dbfunc=db_open
13339 else
13340   rm -rf conftest*
13341   echo "$ac_t""1" 1>&6; dbfunc=dbopen
13342 fi
13343 rm -f conftest*
13344
13345     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13346 echo "configure:13347: checking for $dbfunc" >&5
13347
13348 cat > conftest.$ac_ext <<EOF
13349 #line 13350 "configure"
13350 #include "confdefs.h"
13351 /* System header to define __stub macros and hopefully few prototypes,
13352     which can conflict with char $dbfunc(); below.  */
13353 #include <assert.h>
13354 /* Override any gcc2 internal prototype to avoid an error.  */
13355 /* We use char because int might match the return type of a gcc2
13356     builtin and then its argument prototype would still apply.  */
13357 char $dbfunc();
13358
13359 int main() {
13360
13361 /* The GNU C library defines this for functions which it implements
13362     to always fail with ENOSYS.  Some functions are actually named
13363     something starting with __ and the normal name is an alias.  */
13364 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13365 choke me
13366 #else
13367 $dbfunc();
13368 #endif
13369
13370 ; return 0; }
13371 EOF
13372 if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13373   rm -rf conftest*
13374   eval "ac_cv_func_$dbfunc=yes"
13375 else
13376   echo "configure: failed program was:" >&5
13377   cat conftest.$ac_ext >&5
13378   rm -rf conftest*
13379   eval "ac_cv_func_$dbfunc=no"
13380 fi
13381 rm -f conftest*
13382
13383 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13384   echo "$ac_t""yes" 1>&6
13385   with_database_berkdb=yes need_libdb=no
13386 else
13387   echo "$ac_t""no" 1>&6
13388
13389     
13390 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13391 echo "configure:13392: checking for $dbfunc in -ldb" >&5
13392 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13393
13394 xe_check_libs=" -ldb "
13395 cat > conftest.$ac_ext <<EOF
13396 #line 13397 "configure"
13397 #include "confdefs.h"
13398 /* Override any gcc2 internal prototype to avoid an error.  */
13399 /* We use char because int might match the return type of a gcc2
13400     builtin and then its argument prototype would still apply.  */
13401 char $dbfunc();
13402
13403 int main() {
13404 $dbfunc()
13405 ; return 0; }
13406 EOF
13407 if { (eval echo configure:13408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13408   rm -rf conftest*
13409   eval "ac_cv_lib_$ac_lib_var=yes"
13410 else
13411   echo "configure: failed program was:" >&5
13412   cat conftest.$ac_ext >&5
13413   rm -rf conftest*
13414   eval "ac_cv_lib_$ac_lib_var=no"
13415 fi
13416 rm -f conftest*
13417 xe_check_libs=""
13418
13419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13420   echo "$ac_t""yes" 1>&6
13421   with_database_berkdb=yes need_libdb=yes
13422 else
13423   echo "$ac_t""no" 1>&6
13424 fi
13425
13426
13427 fi
13428
13429   fi
13430
13431   if test "$with_database_berkdb" = "yes"; then
13432     { test "$extra_verbose" = "yes" && cat << EOF
13433     Defining DB_H_FILE = "$db_h_file"
13434 EOF
13435 cat >> confdefs.h <<EOF
13436 #define DB_H_FILE "$db_h_file"
13437 EOF
13438 }
13439
13440     { test "$extra_verbose" = "yes" && cat << \EOF
13441     Defining HAVE_BERKELEY_DB
13442 EOF
13443 cat >> confdefs.h <<\EOF
13444 #define HAVE_BERKELEY_DB 1
13445 EOF
13446 }
13447
13448     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13449   else with_database_berkdb=no
13450   fi
13451 fi
13452
13453 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13454      != "no no no"; then
13455   { test "$extra_verbose" = "yes" && cat << \EOF
13456     Defining HAVE_DATABASE
13457 EOF
13458 cat >> confdefs.h <<\EOF
13459 #define HAVE_DATABASE 1
13460 EOF
13461 }
13462
13463   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13464    echo "    xemacs will be linked with \"database.o\""
13465  fi
13466 fi
13467
13468 if test "$with_socks" = "yes"; then
13469   
13470 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13471 echo "configure:13472: checking for SOCKSinit in -lsocks" >&5
13472 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13473
13474 xe_check_libs=" -lsocks "
13475 cat > conftest.$ac_ext <<EOF
13476 #line 13477 "configure"
13477 #include "confdefs.h"
13478 /* Override any gcc2 internal prototype to avoid an error.  */
13479 /* We use char because int might match the return type of a gcc2
13480     builtin and then its argument prototype would still apply.  */
13481 char SOCKSinit();
13482
13483 int main() {
13484 SOCKSinit()
13485 ; return 0; }
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13488   rm -rf conftest*
13489   eval "ac_cv_lib_$ac_lib_var=yes"
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   eval "ac_cv_lib_$ac_lib_var=no"
13495 fi
13496 rm -f conftest*
13497 xe_check_libs=""
13498
13499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13500   echo "$ac_t""yes" 1>&6
13501     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13502     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13503   { test "$extra_verbose" = "yes" && cat << EOF
13504     Defining $ac_tr_lib
13505 EOF
13506 cat >> confdefs.h <<EOF
13507 #define $ac_tr_lib 1
13508 EOF
13509 }
13510
13511   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13512
13513 else
13514   echo "$ac_t""no" 1>&6
13515 fi
13516
13517
13518   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13519     Defining HAVE_SOCKS
13520 EOF
13521 cat >> confdefs.h <<\EOF
13522 #define HAVE_SOCKS 1
13523 EOF
13524 }
13525
13526 fi
13527
13528 if test "$usage_tracking" = "yes"; then
13529   { test "$extra_verbose" = "yes" && cat << \EOF
13530     Defining USAGE_TRACKING
13531 EOF
13532 cat >> confdefs.h <<\EOF
13533 #define USAGE_TRACKING 1
13534 EOF
13535 }
13536
13537   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13538 fi
13539
13540 if test "$with_modules" != "no"; then
13541   echo "checking for module support" 1>&6
13542 echo "configure:13543: checking for module support" >&5
13543
13544     if test "$with_msw" = "yes"; then
13545     have_dl=yes;
13546   else
13547         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13548 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13549 echo "configure:13550: checking for dlfcn.h" >&5
13550
13551 cat > conftest.$ac_ext <<EOF
13552 #line 13553 "configure"
13553 #include "confdefs.h"
13554 #include <dlfcn.h>
13555 EOF
13556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13557 { (eval echo configure:13558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13559 if test -z "$ac_err"; then
13560   rm -rf conftest*
13561   eval "ac_cv_header_$ac_safe=yes"
13562 else
13563   echo "$ac_err" >&5
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -rf conftest*
13567   eval "ac_cv_header_$ac_safe=no"
13568 fi
13569 rm -f conftest*
13570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13571   echo "$ac_t""yes" 1>&6
13572   
13573       
13574 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13575 echo "configure:13576: checking for dlopen in -ldl" >&5
13576 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
13577
13578 xe_check_libs=" -ldl "
13579 cat > conftest.$ac_ext <<EOF
13580 #line 13581 "configure"
13581 #include "confdefs.h"
13582 /* Override any gcc2 internal prototype to avoid an error.  */
13583 /* We use char because int might match the return type of a gcc2
13584     builtin and then its argument prototype would still apply.  */
13585 char dlopen();
13586
13587 int main() {
13588 dlopen()
13589 ; return 0; }
13590 EOF
13591 if { (eval echo configure:13592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13592   rm -rf conftest*
13593   eval "ac_cv_lib_$ac_lib_var=yes"
13594 else
13595   echo "configure: failed program was:" >&5
13596   cat conftest.$ac_ext >&5
13597   rm -rf conftest*
13598   eval "ac_cv_lib_$ac_lib_var=no"
13599 fi
13600 rm -f conftest*
13601 xe_check_libs=""
13602
13603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13604   echo "$ac_t""yes" 1>&6
13605   have_dl=yes libdl=dl
13606 else
13607   echo "$ac_t""no" 1>&6
13608
13609 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13610 echo "configure:13611: checking for dlopen in -lc" >&5
13611 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
13612
13613 xe_check_libs=" -lc "
13614 cat > conftest.$ac_ext <<EOF
13615 #line 13616 "configure"
13616 #include "confdefs.h"
13617 /* Override any gcc2 internal prototype to avoid an error.  */
13618 /* We use char because int might match the return type of a gcc2
13619     builtin and then its argument prototype would still apply.  */
13620 char dlopen();
13621
13622 int main() {
13623 dlopen()
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13627   rm -rf conftest*
13628   eval "ac_cv_lib_$ac_lib_var=yes"
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   eval "ac_cv_lib_$ac_lib_var=no"
13634 fi
13635 rm -f conftest*
13636 xe_check_libs=""
13637
13638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13639   echo "$ac_t""yes" 1>&6
13640   have_dl=yes 
13641 else
13642   echo "$ac_t""no" 1>&6
13643 fi
13644
13645
13646 fi
13647
13648
13649 else
13650   echo "$ac_t""no" 1>&6
13651 fi
13652
13653     if test -n "$have_dl"; then
13654       { test "$extra_verbose" = "yes" && cat << \EOF
13655     Defining HAVE_DLOPEN
13656 EOF
13657 cat >> confdefs.h <<\EOF
13658 #define HAVE_DLOPEN 1
13659 EOF
13660 }
13661
13662     else
13663       
13664 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13665 echo "configure:13666: checking for shl_load in -ldld" >&5
13666 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13667
13668 xe_check_libs=" -ldld "
13669 cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* Override any gcc2 internal prototype to avoid an error.  */
13673 /* We use char because int might match the return type of a gcc2
13674     builtin and then its argument prototype would still apply.  */
13675 char shl_load();
13676
13677 int main() {
13678 shl_load()
13679 ; return 0; }
13680 EOF
13681 if { (eval echo configure:13682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13682   rm -rf conftest*
13683   eval "ac_cv_lib_$ac_lib_var=yes"
13684 else
13685   echo "configure: failed program was:" >&5
13686   cat conftest.$ac_ext >&5
13687   rm -rf conftest*
13688   eval "ac_cv_lib_$ac_lib_var=no"
13689 fi
13690 rm -f conftest*
13691 xe_check_libs=""
13692
13693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13694   echo "$ac_t""yes" 1>&6
13695   libdl=dld have_dl=yes;
13696         { test "$extra_verbose" = "yes" && cat << \EOF
13697     Defining HAVE_SHL_LOAD
13698 EOF
13699 cat >> confdefs.h <<\EOF
13700 #define HAVE_SHL_LOAD 1
13701 EOF
13702 }
13703
13704 else
13705   echo "$ac_t""no" 1>&6
13706
13707 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13708 echo "configure:13709: checking for dld_init in -ldld" >&5
13709 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13710
13711 xe_check_libs=" -ldld "
13712 cat > conftest.$ac_ext <<EOF
13713 #line 13714 "configure"
13714 #include "confdefs.h"
13715 /* Override any gcc2 internal prototype to avoid an error.  */
13716 /* We use char because int might match the return type of a gcc2
13717     builtin and then its argument prototype would still apply.  */
13718 char dld_init();
13719
13720 int main() {
13721 dld_init()
13722 ; return 0; }
13723 EOF
13724 if { (eval echo configure:13725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13725   rm -rf conftest*
13726   eval "ac_cv_lib_$ac_lib_var=yes"
13727 else
13728   echo "configure: failed program was:" >&5
13729   cat conftest.$ac_ext >&5
13730   rm -rf conftest*
13731   eval "ac_cv_lib_$ac_lib_var=no"
13732 fi
13733 rm -f conftest*
13734 xe_check_libs=""
13735
13736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13737   echo "$ac_t""yes" 1>&6
13738   libdl=dld have_dl=yes;
13739         { test "$extra_verbose" = "yes" && cat << \EOF
13740     Defining HAVE_DLD_INIT
13741 EOF
13742 cat >> confdefs.h <<\EOF
13743 #define HAVE_DLD_INIT 1
13744 EOF
13745 }
13746
13747 else
13748   echo "$ac_t""no" 1>&6
13749 fi
13750
13751
13752 fi
13753
13754
13755     fi
13756   fi 
13757   if test -n "$have_dl"; then
13758         
13759 dll_ld=
13760 dll_ldflags=
13761 dll_cflags=
13762 dll_post=
13763 dll_ldo="-o"
13764 ld_dynamic_link_flags=
13765 xehost=$canonical
13766 xealias=$internal_configuration
13767
13768 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13769 echo "configure:13770: checking how to build dynamic libraries for ${xehost}" >&5
13770 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13771 case "$xehost" in
13772 *-*-linux-gnu*) ;;
13773 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13774 esac
13775
13776 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13777 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13778 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13779
13780 case "$xehost_os" in
13781 aix3*)
13782   # AIX sometimes has problems with the GCC collect2 program.  For some
13783   # reason, if we set the COLLECT_NAMES environment variable, the problems
13784   # vanish in a puff of smoke.
13785   if test "${COLLECT_NAMES+set}" != set; then
13786     COLLECT_NAMES=
13787     export COLLECT_NAMES
13788   fi
13789   ;;
13790 esac
13791
13792 # Now see if the compiler is really GCC.
13793 if test "$GCC" = "yes"; then
13794   XEGCC=yes
13795 else
13796   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13797 echo "configure:13798: checking checking whether we are using GNU C" >&5
13798   cat > conftest.$ac_ext <<EOF
13799 #line 13800 "configure"
13800 #include "confdefs.h"
13801
13802 #ifdef __GNUC__
13803   yes;
13804 #endif
13805
13806 EOF
13807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13808   egrep "yes" >/dev/null 2>&1; then
13809   rm -rf conftest*
13810   XEGCC=yes
13811 else
13812   rm -rf conftest*
13813   XEGCC=no
13814 fi
13815 rm -f conftest*
13816
13817   echo "$ac_t""${XEGCC}" 1>&6
13818 fi
13819
13820 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13821 echo "configure:13822: checking how to produce PIC code" >&5
13822 wl=
13823
13824 can_build_shared=yes
13825 if test "$XEGCC" = yes; then
13826   wl='-Wl,'
13827
13828   case "$xehost_os" in
13829   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13830     # PIC is the default for these OSes.
13831     ;;
13832
13833   aix3* | aix4* | os2*)
13834     # We can build DLLs from non-PIC.
13835     ;;
13836   amigaos*)
13837     # FIXME: we need at least 68020 code to build shared libraries, but
13838     # adding the `-m68020' flag to GCC prevents building anything better,
13839     # like `-m68040'.
13840     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13841     ;;
13842   *cygwin* | *mingw* )
13843     # PIC is the default
13844     ;;
13845   *)
13846     dll_cflags='-fPIC'
13847     ;;
13848   esac
13849 else
13850   # PORTME Check for PIC flags for the system compiler.
13851   case "$xehost_os" in
13852   hpux9* | hpux1[0-9]*)
13853     # Is there a better link_static_flag that works with the bundled CC?
13854     wl='-Wl,'
13855     dll_cflags='+Z'
13856     ;;
13857
13858   irix5* | irix6*)
13859     wl='-Wl,'
13860     # PIC (with -KPIC) is the default.
13861     ;;
13862
13863   os2*)
13864     # We can build DLLs from non-PIC.
13865     ;;
13866
13867   osf3* | osf4*)
13868     # All OSF/1 code is PIC.
13869     wl='-Wl,'
13870     ;;
13871
13872   sco3.2v5*)
13873     dll_cflags='-belf -Kpic'
13874     wl='-Wl,'
13875     ;;
13876
13877   unixware*)
13878     dll_cflags="-KPIC"
13879     wl="-Wl,"
13880     ;;
13881
13882   sysv4*)
13883     dll_cflags="-KPIC"
13884     wl="-Wl,"
13885     ;;
13886
13887   sysv5*)
13888     dll_cflags="-KPIC"
13889     wl="-Wl,"
13890     ;;
13891
13892   solaris2*)
13893     dll_cflags='-KPIC'
13894     wl='-Wl,'
13895     ;;
13896
13897   sunos4*)
13898     dll_cflags='-PIC'
13899     wl='-Qoption ld '
13900     ;;
13901
13902   uts4*)
13903     dll_cflags='-pic'
13904     ;;
13905
13906   *)
13907     can_build_shared=no
13908     ;;
13909   esac
13910 fi
13911
13912 if test -n "$dll_cflags"; then
13913   echo "$ac_t""${dll_cflags}" 1>&6
13914
13915   # Check to make sure the dll_cflags actually works.
13916   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13917 echo "configure:13918: checking if PIC flag ${dll_cflags} really works" >&5
13918   save_CFLAGS="$CFLAGS"
13919   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13920   cat > conftest.$ac_ext <<EOF
13921 #line 13922 "configure"
13922 #include "confdefs.h"
13923
13924 int main() {
13925 int x=0;
13926 ; return 0; }
13927 EOF
13928 if { (eval echo configure:13929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13929   rm -rf conftest*
13930   
13931     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13932     # reports no error.  So, we need to grep stderr for (Bundled).
13933     if grep '(Bundled)' config.log >/dev/null; then
13934       echo "$ac_t""no" 1>&6
13935       can_build_shared=no
13936       dll_cflags=
13937     else
13938       echo "$ac_t""yes" 1>&6
13939     fi
13940 else
13941   echo "configure: failed program was:" >&5
13942   cat conftest.$ac_ext >&5
13943   rm -rf conftest*
13944   echo "$ac_t""no" 1>&6
13945     can_build_shared=no
13946     dll_cflags=
13947 fi
13948 rm -f conftest*
13949   CFLAGS="$save_CFLAGS"
13950 else
13951   echo "$ac_t""none" 1>&6
13952 fi
13953
13954 if test "$can_build_shared" = "yes"; then
13955 cc_produces_so=no
13956 xldf=
13957 xcldf=
13958 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13959 echo "configure:13960: checking if C compiler can produce shared libraries" >&5
13960 if test "$XEGCC" = yes; then
13961   xcldf="-shared"
13962   xldf="-shared"
13963 else # Not using GCC
13964   case "$xehost_os" in
13965     aix3* | aix4*)
13966       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13967       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13968       ;;
13969
13970     freebsd2* | netbsd* | openbsd*)
13971       xldf="-Bshareable"
13972       xcldf="${wl}-Bshareable"
13973       ;;
13974
13975     freebsd3*)
13976       xcldf="-shared"
13977       ;;
13978
13979     hpux*)
13980       xldf="-b +s"
13981       xcldf="${wl}-b ${wl}+s"
13982       ;;
13983
13984     irix5* | irix6* | osf3* | osf4*)
13985       xcldf="${wl}-shared"
13986       xldf="-shared"
13987       ;;
13988
13989     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13990       xcldf="-G"
13991       xldf="-G"
13992       ;;
13993
13994     sunos4*)
13995       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13996       xldf="-assert pure-text -Bstatic"
13997       ;;
13998   esac
13999 fi # End if if we are using gcc
14000
14001 if test -n "$xcldf"; then
14002   save_LDFLAGS=$LDFLAGS
14003   save_LIBS=$LIBS
14004   save_xe_libs=$xe_libs
14005   LDFLAGS="$xcldf $LDFLAGS"
14006   LIBS=
14007   xe_libs=
14008   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14009   cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012
14013 int main() {
14014 int x=0;
14015 ; return 0; }
14016 EOF
14017 if { (eval echo configure:14018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14018   rm -rf conftest*
14019   cc_produces_so=yes
14020 else
14021   echo "configure: failed program was:" >&5
14022   cat conftest.$ac_ext >&5
14023   rm -rf conftest*
14024   cc_produces_so=no
14025 fi
14026 rm -f conftest*
14027   LDFLAGS=$save_LDFLAGS
14028   LIBS=$save_LIBS
14029   xe_libs=$save_xe_libs
14030   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14031 else
14032   cc_produces_so=no
14033 fi
14034 echo "$ac_t""${cc_produces_so}" 1>&6
14035
14036 LTLD=$LD
14037 if test -z "$LTLD"; then
14038   ac_prog=ld
14039   if test "$XEGCC" = yes; then
14040     # Check if gcc -print-prog-name=ld gives a path.
14041     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14042 echo "configure:14043: checking for ld used by GCC" >&5
14043     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14044     case "$ac_prog" in
14045     # Accept absolute paths.
14046     /*)
14047       if test -z "$LTLD"; then
14048         case "$ac_prog" in
14049           *gcc-lib*) LTLD="$CC"
14050                      ;;
14051           *)         LTLD="$ac_prog"
14052                      ;;
14053         esac
14054       fi
14055       ;;
14056     "")
14057       # If it fails, then pretend we aren't using GCC.
14058       ac_prog=ld
14059       ;;
14060     *)
14061       # If it is relative, then search for the first ld in PATH.
14062       with_gnu_ld=unknown
14063       ;;
14064     esac
14065   else
14066     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14067 echo "configure:14068: checking for GNU ld" >&5
14068   fi
14069
14070   if test -z "$LTLD"; then
14071     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14072     for ac_dir in $PATH; do
14073       test -z "$ac_dir" && ac_dir=.
14074       if test -f "$ac_dir/$ac_prog"; then
14075         LTLD="$ac_dir/$ac_prog"
14076         # Check to see if the program is GNU ld.  I'd rather use --version,
14077         # but apparently some GNU ld's only accept -v.
14078         # Break only if it was the GNU/non-GNU ld that we prefer.
14079         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14080           xe_gnu_ld=yes
14081         else
14082           xe_gnu_ld=no
14083         fi
14084       fi
14085     done
14086     IFS="$ac_save_ifs"
14087   fi
14088
14089   if test -n "$LTLD"; then
14090     echo "$ac_t""${LTLD}" 1>&6
14091   else
14092     echo "$ac_t""no" 1>&6
14093   fi
14094
14095   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14096     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14097     exit 1
14098   fi
14099 fi
14100
14101 ld_dynamic_link_flags=
14102
14103 # Check to see if it really is or isn't GNU ld.
14104 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14105 echo "configure:14106: checking if the linker is GNU ld" >&5
14106 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14107 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14108   xe_gnu_ld=yes
14109 else
14110   xe_gnu_ld=no
14111 fi
14112 echo "$ac_t""${xe_gnu_ld}" 1>&6
14113
14114 case "$xehost_os" in
14115   amigaos* | sunos4*)
14116     # On these operating systems, we should treat GNU ld like the system ld.
14117     gnu_ld_acts_native=yes
14118     ;;
14119   *)
14120     gnu_ld_acts_native=no
14121     ;;
14122 esac
14123
14124 if test "$cc_produces_so" = "yes"; then
14125   dll_ld=$CC
14126   dll_ldflags=$xcldf
14127   can_build_shared=yes
14128   ld_shlibs=yes
14129 else
14130   # OK - only NOW do we futz about with ld.
14131   # See if the linker supports building shared libraries.
14132   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14133 echo "configure:14134: checking whether the linker supports shared libraries" >&5
14134   dll_ld=$CC
14135   dll_ldflags=$LDFLAGS
14136   ld_shlibs=yes
14137   can_build_shared=yes
14138   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14139     # See if GNU ld supports shared libraries.
14140     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14141       dll_ld=$CC
14142       dll_ldflags="-shared"
14143       ld_shlibs=yes
14144     else
14145       ld_shlibs=no
14146     fi
14147   else
14148     # PORTME fill in a description of your system's linker (not GNU ld)
14149     case "$xehost_os" in
14150     aix3*)
14151       dll_ld=$LTLD
14152       dll_ldflags=$xldf
14153       ;;
14154
14155     aix4*)
14156       dll_ldflags=$xcldf
14157       ;;
14158
14159     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14160     # support.  Future versions do this automatically, but an explicit c++rt0.o
14161     # doesn't break anything, and helps significantly (at the cost of a little
14162     # extra space).
14163     freebsd2.2*)
14164       dll_ld=$LTLD
14165       dll_ldflags=$xldf
14166       dll_post="/usr/lib/c++rt0.o"
14167       ;;
14168
14169     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14170     freebsd2*)
14171       dll_ld=$LTLD
14172       dll_ldflags="-Bshareable"
14173       ;;
14174
14175     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14176     freebsd3*)
14177       dll_ldflags="-shared"
14178       ;;
14179
14180     hpux*)
14181       dll_ld=$LTLD
14182       dll_ldflags=$xldf
14183       ;;
14184
14185     irix5* | irix6*)
14186       dll_ld=$LTLD
14187       dll_ldflags=$xldf
14188       ;;
14189
14190     netbsd*)
14191       # Tested with NetBSD 1.2 ld
14192       dll_ld=$LTLD
14193       dll_ldflags=$xldf
14194       ;;
14195
14196     openbsd*)
14197       dll_ld=$LTLD
14198       dll_ldflags=$xldf
14199       ;;
14200
14201     osf3* | osf4*)
14202       dll_ld=$LTLD
14203       dll_ldflags=$xldf
14204       ;;
14205
14206     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14207     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14208       dll_ld=$LTLD
14209       case "$dll_ld" in
14210         *gcc*) dll_ldflags="-shared"
14211                dll_ld=$CC
14212                ;;
14213         *)     dll_ldflags="-G"
14214                ;;
14215       esac
14216       ;;
14217
14218     sunos4*)
14219       if test "$XEGCC" = yes; then
14220         dll_ld=$CC
14221       else
14222         dll_ld=$LTLD
14223       fi
14224       dll_ldflags=$xldf
14225       ;;
14226
14227     uts4*)
14228       dll_ld=$LTLD
14229       dll_ldflags="-G"
14230       ;;
14231
14232     bsdi*)
14233       dll_ldflags="-r"
14234       dll_ld="shlicc2"
14235       ;;
14236
14237     *)
14238       ld_shlibs=no
14239       can_build_shared=no
14240       ;;
14241     esac
14242   fi
14243   echo "$ac_t""${ld_shlibs}" 1>&6
14244   if test "$ld_shlibs" = "no"; then
14245     can_build_shared=no
14246   fi
14247 fi # End of if cc_produces_so = no
14248
14249
14250 if test "$xe_gnu_ld" = yes; then
14251   if test "$ld_shlibs" = yes; then
14252     ld_dynamic_link_flags="${wl}-export-dynamic"
14253   fi
14254 fi
14255
14256 if test -z "$ld_dynamic_link_flags"; then
14257   case "$xehost_os" in
14258   aix3*)
14259     ld_dynamic_link_flags=
14260     ;;
14261
14262   aix4*)
14263     ld_dynamic_link_flags=
14264     ;;
14265
14266   freebsd2.2*)
14267     ld_dynamic_link_flags=
14268     ;;
14269
14270   freebsd2*)
14271     ld_dynamic_link_flags=
14272     ;;
14273
14274   freebsd3*)
14275     ld_dynamic_link_flags=
14276     ;;
14277
14278   hpux*)
14279     ld_dynamic_link_flags="${wl}-E"
14280     ;;
14281
14282   irix5* | irix6*)
14283     ld_dynamic_link_flags=
14284     ;;
14285
14286   netbsd*)
14287     ld_dynamic_link_flags=
14288     ;;
14289
14290   openbsd*)
14291     ld_dynamic_link_flags=
14292     ;;
14293
14294   osf3* | osf4*)
14295     ld_dynamic_link_flags=
14296     ;;
14297
14298   solaris2* | solaris7*)
14299     ld_dynamic_link_flags=
14300     ;;
14301
14302   sco3.2v5* | unixware* | sysv5* | sysv4*)
14303     ld_dynamic_link_flags="${wl}-Bexport"
14304     ;;
14305
14306   sunos4*)
14307     ld_dynamic_link_flags=
14308     ;;
14309
14310   uts4*)
14311     ld_dynamic_link_flags=
14312     ;;
14313
14314   bsdi*)
14315     ld_dynamic_link_flags=
14316     ;;
14317
14318   esac
14319 fi # End of if -z ld_dynamic_link_flags
14320 fi # End of if test "$can_build_shared" = "yes"
14321
14322
14323
14324
14325
14326
14327
14328
14329   fi
14330
14331   if test "$can_build_shared" = "yes"; then
14332     { test "$extra_verbose" = "yes" && cat << \EOF
14333     Defining HAVE_SHLIB
14334 EOF
14335 cat >> confdefs.h <<\EOF
14336 #define HAVE_SHLIB 1
14337 EOF
14338 }
14339
14340     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14341    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14342  fi
14343     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14344     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14345     for ac_func in dlerror _dlerror
14346 do
14347 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14348 echo "configure:14349: checking for $ac_func" >&5
14349
14350 cat > conftest.$ac_ext <<EOF
14351 #line 14352 "configure"
14352 #include "confdefs.h"
14353 /* System header to define __stub macros and hopefully few prototypes,
14354     which can conflict with char $ac_func(); below.  */
14355 #include <assert.h>
14356 /* Override any gcc2 internal prototype to avoid an error.  */
14357 /* We use char because int might match the return type of a gcc2
14358     builtin and then its argument prototype would still apply.  */
14359 char $ac_func();
14360
14361 int main() {
14362
14363 /* The GNU C library defines this for functions which it implements
14364     to always fail with ENOSYS.  Some functions are actually named
14365     something starting with __ and the normal name is an alias.  */
14366 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14367 choke me
14368 #else
14369 $ac_func();
14370 #endif
14371
14372 ; return 0; }
14373 EOF
14374 if { (eval echo configure:14375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14375   rm -rf conftest*
14376   eval "ac_cv_func_$ac_func=yes"
14377 else
14378   echo "configure: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380   rm -rf conftest*
14381   eval "ac_cv_func_$ac_func=no"
14382 fi
14383 rm -f conftest*
14384
14385 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14386   echo "$ac_t""yes" 1>&6
14387     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14388   { test "$extra_verbose" = "yes" && cat << EOF
14389     Defining $ac_tr_func
14390 EOF
14391 cat >> confdefs.h <<EOF
14392 #define $ac_tr_func 1
14393 EOF
14394 }
14395  
14396 else
14397   echo "$ac_t""no" 1>&6
14398 fi
14399 done
14400
14401     with_modules=yes
14402   else
14403     if test "$with_modules" = "yes"; then
14404       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14405     else
14406       echo "configure: warning: "Module support cannot be provided."" 1>&2
14407     fi
14408     with_modules=no
14409   fi
14410 fi
14411
14412 cat > conftest.$ac_ext <<EOF
14413 #line 14414 "configure"
14414 #include "confdefs.h"
14415 int main(int c,char *v[]){return 0;}
14416 EOF
14417 if { (eval echo configure:14418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14418 then
14419   :
14420 else
14421   conftest_rc="$?"
14422   echo "configure: failed program was:" >&5
14423   cat conftest.$ac_ext >&5
14424   rm -fr conftest*
14425   
14426   echo ""
14427   echo "*** PANIC *** The C compiler can no longer build working executables."
14428   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14429   echo "*** PANIC *** The most likely reason for this problem is that configure"
14430   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14431   echo "*** PANIC *** found at run time."
14432   echo "*** PANIC ***"
14433   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14434   echo "*** PANIC *** On other systems, try telling configure where to find the"
14435   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14436   echo "*** PANIC ***"
14437   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14438   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14439   echo "*** PANIC *** on your system.  Don't do that."
14440   exit 1
14441 fi
14442 rm -fr conftest*
14443
14444 if test "$win32_processes" = "yes"; then
14445   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14446    echo "    xemacs will be linked with \"process-nt.o\""
14447  fi
14448 else
14449   { test "$extra_verbose" = "yes" && cat << \EOF
14450     Defining HAVE_UNIX_PROCESSES
14451 EOF
14452 cat >> confdefs.h <<\EOF
14453 #define HAVE_UNIX_PROCESSES 1
14454 EOF
14455 }
14456
14457   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14458    echo "    xemacs will be linked with \"process-unix.o\""
14459  fi
14460 fi
14461
14462
14463
14464 T=""
14465 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14466 CFLAGS="$T"
14467
14468
14469 T=""
14470 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14471 extra_objs="$T"
14472
14473
14474 T=""
14475 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
14476 c_switch_general="$T"
14477
14478
14479 T=""
14480 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14481 c_switch_window_system="$T"
14482
14483
14484 T=""
14485 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14486 c_switch_all="$T"
14487
14488
14489 T=""
14490 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
14491 ld_switch_general="$T"
14492
14493
14494 T=""
14495 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14496 ld_switch_window_system="$T"
14497
14498
14499 T=""
14500 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14501 ld_switch_all="$T"
14502
14503
14504 T=""
14505 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14506 ld_libs_general="$T"
14507
14508
14509 T=""
14510 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
14511 ld_libs_window_system="$T"
14512
14513
14514 T=""
14515 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14516 ld_libs_all="$T"
14517
14518
14519
14520 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14521 internal_makefile_list="Makefile.in"
14522 SUBDIR_MAKEFILES=''
14523 test -d lock || mkdir lock
14524 for dir in $MAKE_SUBDIR; do
14525   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14526         test -d "$d" || mkdir "$d"; cd "$d"
14527       done ) ;;
14528    * ) test -d "$dir" || mkdir "$dir" ;;
14529   esac
14530   
14531 T=""
14532 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14533 SUBDIR_MAKEFILES="$T"
14534
14535   
14536 T=""
14537 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14538 internal_makefile_list="$T"
14539
14540 done
14541
14542
14543
14544
14545 for dir in src/s src/m; do
14546   if test ! -d "$dir" ; then
14547     echo Making symbolic link to "$srcdir/$dir"
14548     ${LN_S} "$srcdir/$dir" "$dir"
14549   fi
14550 done
14551
14552 if test "$extra_verbose" = "yes"; then
14553   echo ""
14554   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
14555   echo ""
14556 fi
14557
14558
14559 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14560   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14561   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14562 fi
14563
14564 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14565   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14566   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14567 fi
14568
14569 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14570   test "$extra_verbose" = "yes" && echo "creating TAGS"
14571   echo "\f
14572 $srcdir/TAGS,include" > "TAGS"
14573 fi
14574
14575 if test "$__SUNPRO_C" = "yes"; then
14576   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14577   ( echo "# For use with Sun WorkShop's Source browser."
14578     echo "# See sbquery(1) and sbinit(4) for more information"
14579     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14580   ) > .sbinit
14581 fi
14582
14583 rm -f core
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603 PREFIX=$prefix
14604 while true; do
14605   case "$PREFIX" in
14606     *\$* ) eval "PREFIX=$PREFIX" ;;
14607     *) break ;;
14608   esac
14609 done
14610
14611
14612
14613
14614 EXEC_PREFIX=$exec_prefix
14615 while true; do
14616   case "$EXEC_PREFIX" in
14617     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14618     *) break ;;
14619   esac
14620 done
14621
14622
14623
14624
14625 INFODIR=$infodir
14626 while true; do
14627   case "$INFODIR" in
14628     *\$* ) eval "INFODIR=$INFODIR" ;;
14629     *) break ;;
14630   esac
14631 done
14632
14633
14634
14635
14636 INFOPATH=$infopath
14637 while true; do
14638   case "$INFOPATH" in
14639     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14640     *) break ;;
14641   esac
14642 done
14643
14644
14645
14646
14647 PACKAGE_PATH=$package_path
14648 while true; do
14649   case "$PACKAGE_PATH" in
14650     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14651     *) break ;;
14652   esac
14653 done
14654
14655
14656
14657
14658 LISPDIR=$lispdir
14659 while true; do
14660   case "$LISPDIR" in
14661     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14662     *) break ;;
14663   esac
14664 done
14665
14666
14667
14668
14669 MODULEDIR=$moduledir
14670 while true; do
14671   case "$MODULEDIR" in
14672     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14673     *) break ;;
14674   esac
14675 done
14676
14677
14678
14679
14680 SITELISPDIR=$sitelispdir
14681 while true; do
14682   case "$SITELISPDIR" in
14683     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14684     *) break ;;
14685   esac
14686 done
14687
14688
14689
14690
14691 SITEMODULEDIR=$sitemoduledir
14692 while true; do
14693   case "$SITEMODULEDIR" in
14694     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14695     *) break ;;
14696   esac
14697 done
14698
14699
14700
14701
14702 ETCDIR=$etcdir
14703 while true; do
14704   case "$ETCDIR" in
14705     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14706     *) break ;;
14707   esac
14708 done
14709
14710
14711
14712
14713 DOCDIR=$docdir
14714 while true; do
14715   case "$DOCDIR" in
14716     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14717     *) break ;;
14718   esac
14719 done
14720
14721
14722
14723
14724 ARCHLIBDIR=$archlibdir
14725 while true; do
14726   case "$ARCHLIBDIR" in
14727     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14728     *) break ;;
14729   esac
14730 done
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14752
14753
14754
14755
14756
14757
14758
14759 : ${XEMACS_CC:=$CC}
14760
14761
14762 if test "$with_prefix" = "yes"; then
14763   { test "$extra_verbose" = "yes" && cat << \EOF
14764     Defining PREFIX_USER_DEFINED
14765 EOF
14766 cat >> confdefs.h <<\EOF
14767 #define PREFIX_USER_DEFINED 1
14768 EOF
14769 }
14770
14771 fi
14772
14773 if test "$with_site_lisp" = "no"; then
14774   { test "$extra_verbose" = "yes" && cat << \EOF
14775     Defining INHIBIT_SITE_LISP
14776 EOF
14777 cat >> confdefs.h <<\EOF
14778 #define INHIBIT_SITE_LISP 1
14779 EOF
14780 }
14781
14782 fi
14783 if test "$with_site_modules" = "no"; then
14784   { test "$extra_verbose" = "yes" && cat << \EOF
14785     Defining INHIBIT_SITE_MODULES
14786 EOF
14787 cat >> confdefs.h <<\EOF
14788 #define INHIBIT_SITE_MODULES 1
14789 EOF
14790 }
14791
14792 fi
14793
14794
14795 T=""
14796 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14797 ac_configure_args="$T"
14798
14799 { test "$extra_verbose" = "yes" && cat << EOF
14800     Defining EMACS_CONFIGURATION = "$configuration"
14801 EOF
14802 cat >> confdefs.h <<EOF
14803 #define EMACS_CONFIGURATION "$configuration"
14804 EOF
14805 }
14806
14807 { test "$extra_verbose" = "yes" && cat << EOF
14808     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14809 EOF
14810 cat >> confdefs.h <<EOF
14811 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14812 EOF
14813 }
14814
14815
14816
14817 null_string=""
14818 { test "$extra_verbose" = "yes" && cat << EOF
14819     Defining LD_SWITCH_X_SITE = $null_string
14820 EOF
14821 cat >> confdefs.h <<EOF
14822 #define LD_SWITCH_X_SITE $null_string
14823 EOF
14824 }
14825
14826 { test "$extra_verbose" = "yes" && cat << EOF
14827     Defining LD_SWITCH_X_SITE_AUX = $null_string
14828 EOF
14829 cat >> confdefs.h <<EOF
14830 #define LD_SWITCH_X_SITE_AUX $null_string
14831 EOF
14832 }
14833
14834 { test "$extra_verbose" = "yes" && cat << EOF
14835     Defining C_SWITCH_X_SITE = $null_string
14836 EOF
14837 cat >> confdefs.h <<EOF
14838 #define C_SWITCH_X_SITE $null_string
14839 EOF
14840 }
14841
14842 { test "$extra_verbose" = "yes" && cat << EOF
14843     Defining LD_SWITCH_SITE = $null_string
14844 EOF
14845 cat >> confdefs.h <<EOF
14846 #define LD_SWITCH_SITE $null_string
14847 EOF
14848 }
14849
14850 { test "$extra_verbose" = "yes" && cat << EOF
14851     Defining C_SWITCH_SITE = $null_string
14852 EOF
14853 cat >> confdefs.h <<EOF
14854 #define C_SWITCH_SITE $null_string
14855 EOF
14856 }
14857
14858
14859
14860 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14861     Defining GNU_MALLOC
14862 EOF
14863 cat >> confdefs.h <<\EOF
14864 #define GNU_MALLOC 1
14865 EOF
14866 }
14867
14868 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14869     Defining USE_SYSTEM_MALLOC
14870 EOF
14871 cat >> confdefs.h <<\EOF
14872 #define USE_SYSTEM_MALLOC 1
14873 EOF
14874 }
14875
14876 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14877     Defining USE_DEBUG_MALLOC
14878 EOF
14879 cat >> confdefs.h <<\EOF
14880 #define USE_DEBUG_MALLOC 1
14881 EOF
14882 }
14883
14884                                               { test "$extra_verbose" = "yes" && cat << \EOF
14885     Defining USE_SYSTEM_MALLOC
14886 EOF
14887 cat >> confdefs.h <<\EOF
14888 #define USE_SYSTEM_MALLOC 1
14889 EOF
14890 }
14891
14892 fi
14893 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14894     Defining I18N3
14895 EOF
14896 cat >> confdefs.h <<\EOF
14897 #define I18N3 1
14898 EOF
14899 }
14900
14901 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14902     Defining USE_GCC
14903 EOF
14904 cat >> confdefs.h <<\EOF
14905 #define USE_GCC 1
14906 EOF
14907 }
14908
14909 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14910     Defining EXTERNAL_WIDGET
14911 EOF
14912 cat >> confdefs.h <<\EOF
14913 #define EXTERNAL_WIDGET 1
14914 EOF
14915 }
14916
14917 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14918     Defining QUICK_BUILD
14919 EOF
14920 cat >> confdefs.h <<\EOF
14921 #define QUICK_BUILD 1
14922 EOF
14923 }
14924
14925 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14926     Defining PURIFY
14927 EOF
14928 cat >> confdefs.h <<\EOF
14929 #define PURIFY 1
14930 EOF
14931 }
14932
14933 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14934     Defining QUANTIFY
14935 EOF
14936 cat >> confdefs.h <<\EOF
14937 #define QUANTIFY 1
14938 EOF
14939 }
14940
14941 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14942     Defining MAIL_USE_POP
14943 EOF
14944 cat >> confdefs.h <<\EOF
14945 #define MAIL_USE_POP 1
14946 EOF
14947 }
14948
14949 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14950     Defining KERBEROS
14951 EOF
14952 cat >> confdefs.h <<\EOF
14953 #define KERBEROS 1
14954 EOF
14955 }
14956
14957 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14958     Defining HESIOD
14959 EOF
14960 cat >> confdefs.h <<\EOF
14961 #define HESIOD 1
14962 EOF
14963 }
14964
14965 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14966     Defining USE_UNION_TYPE
14967 EOF
14968 cat >> confdefs.h <<\EOF
14969 #define USE_UNION_TYPE 1
14970 EOF
14971 }
14972
14973 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14974     Defining PDUMP
14975 EOF
14976 cat >> confdefs.h <<\EOF
14977 #define PDUMP 1
14978 EOF
14979 }
14980
14981
14982
14983 (
14984 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14985 else
14986   echo "uname -a: `uname -a`"
14987 fi
14988 echo ""
14989 echo "$0 $quoted_arguments"
14990 ) > Installation
14991
14992 if test ! -z ${emacs_beta_version} ; then
14993   if test -z "${emacs_is_beta}" ; then
14994         xemacs_betaname=".${emacs_beta_version}"
14995   else
14996         xemacs_betaname="-b${emacs_beta_version}"
14997   fi
14998 else
14999   xemacs_betaname=""
15000 fi
15001
15002 (
15003 echo "
15004
15005 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15006 "
15007 echo "
15008 Compilation / Installation:"
15009 echo "  Source code location:              $srcdir"
15010 echo "  Installation prefix:               $prefix"
15011 if test -n "$site_includes"; then
15012   echo "  Additional header files:           $site_includes"
15013 fi
15014 if test -n "$site_libraries"; then
15015   echo "  Additional libraries:              $site_libraries"
15016 fi
15017 if test -n "$site_prefixes"; then
15018   echo "  Additional prefixes:               $site_prefixes"
15019 fi
15020 if test -n "$runpath"; then
15021   echo "  Runtime library search path:       $runpath"
15022 fi
15023
15024 if test -n "$opsysfile"
15025 then echo "  Operating system description file: \`$opsysfile'"
15026 else echo "  Not using any operating system description file"
15027 fi
15028 if test -n "$machfile"
15029 then echo "  Machine description file:          \`$machfile'"
15030 else echo "  Not using any machine description file"
15031 fi
15032
15033 echo "  Compiler:                          $CC $CFLAGS"
15034 echo "  Relocating allocator for buffers:  $rel_alloc"
15035 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15036
15037 echo "
15038 Window System:"
15039 if test "$with_msw" = "yes"; then
15040   echo "  Compiling in support for the Microsoft window system."
15041 fi
15042 if test "$with_x11" = "yes"; then
15043   echo "  Compiling in support for the X window system:"
15044   echo "    - X Windows headers location:                 $x_includes"
15045   echo "    - X Windows libraries location:               $x_libraries"
15046   if test "$with_xauth" != yes; then
15047     echo "    - Xau (X authority) not available."
15048   fi
15049   if test "$with_xmu" != yes; then
15050     echo "    - Xmu library not available; substituting equivalent routines."
15051   fi
15052   if test "$with_wmcommand" != no; then
15053     echo "    - Handling WM_COMMAND properly."
15054   fi
15055 fi
15056 if test "$need_athena" = "yes"; then
15057   echo "  Compiling in support for the Athena widget set:"
15058   echo "    - Athena headers location:                    $athena_h_path"
15059   echo "    - Athena library to link:                     $athena_lib"
15060 fi
15061 case "$with_menubars" in
15062   lucid ) echo "  Using Lucid menubars." ;;
15063   motif ) echo "  Using Motif menubars."
15064           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15065           echo "             We recommend using the Lucid menubar instead."
15066           echo "             Re-run configure with --with-menubars='lucid'." ;;
15067     msw ) echo "  Using MS-Windows menubars." ;;
15068 esac
15069 case "$with_scrollbars" in
15070   lucid  ) echo "  Using Lucid scrollbars."      ;;
15071   motif  ) echo "  Using Motif scrollbars."      ;;
15072   athena ) echo "  Using Athena scrollbars."     ;;
15073      msw ) echo "  Using MS-Windows scrollbars." ;;
15074 esac
15075 case "$with_dialogs" in
15076   motif  ) echo "  Using Motif dialog boxes."
15077            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15078              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15079              echo "             We recommend using the Athena dialog boxes instead."
15080              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15081              echo "             Read the PROBLEMS file for more information."
15082            fi; fi ;;
15083   athena ) echo "  Using Athena dialog boxes."     ;;
15084      msw ) echo "  Using MS-Windows dialog boxes." ;;
15085 esac
15086 case "$with_widgets" in
15087   motif  ) echo "  Using Motif native widgets."      ;;
15088   athena ) echo "  Using Athena native widgets."     ;;
15089      msw ) echo "  Using MS-Windows native widgets." ;;
15090 esac
15091 if test "$with_dragndrop" = yes; then
15092   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15093   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15094 fi
15095
15096 echo "
15097 TTY:"
15098 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15099 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15100
15101 echo "
15102 Images:"
15103 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15104 if test "$with_xpm" = yes; then
15105   echo "  Compiling in support for XPM  images."
15106 elif test "$with_x11" = yes; then
15107   echo "  WARNING: -----------------------------------------------------------"
15108   echo "  WARNING: Compiling without XPM image support."
15109   if test "$xpm_problem" != ""; then
15110     echo "  Reason: $xpm_problem"
15111   fi
15112   echo "  WARNING: You should strongly consider installing XPM."
15113   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15114   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15115   echo "  WARNING: -----------------------------------------------------------"
15116 fi
15117 if test "$with_png" = yes; then
15118   echo "  Compiling in support for PNG  images."
15119 elif test "$window_system" != "none"; then
15120   echo "  WARNING: -----------------------------------------------------------"
15121   echo "  WARNING: Compiling without PNG image support."
15122   if test "$png_problem" != ""; then
15123     echo "  Reason: $png_problem"
15124   fi
15125   echo "  WARNING: You should strongly consider installing the PNG libraries."
15126   echo "  WARNING: Otherwise certain images and glyphs may not display."
15127   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15128   echo "  WARNING: -----------------------------------------------------------"
15129 fi
15130 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15131 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15132 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15133
15134 echo "
15135 Sound:"
15136 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15137 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15138 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15139 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15140
15141 echo "
15142 Databases:"
15143 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15144 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15145 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15146 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15147 if test "$with_postgresql" = yes; then
15148   echo "  Compiling in support for PostgreSQL."
15149   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15150   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15151 fi
15152
15153 echo "
15154 Internationalization:"
15155 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15156 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15157 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15158 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15159 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15160 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15161 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15162 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15163 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15164 if test "$with_wnn" = yes; then
15165   echo "  Compiling in support for the WNN input method on Mule."
15166   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15167 fi
15168 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15169
15170 echo "
15171 Mail:"
15172 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15173 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15174 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15175 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15176
15177 echo "
15178 Other Features:"
15179 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15180 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15181 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15182 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15183 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15184 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15185 test "$pdump" = yes && echo "  Using the new portable dumper."
15186 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15187 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15188 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15189   != "no no no no no no"; then
15190   echo "  WARNING: ---------------------------------------------------------"
15191   echo "  WARNING: Compiling in support for runtime error checking."
15192   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15193   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15194   echo "  WARNING: ---------------------------------------------------------"
15195 fi
15196 echo ""
15197 ) | tee -a Installation
15198 echo ""
15199
15200
15201 # Remove any trailing slashes in these variables.
15202 test -n "$prefix" &&
15203   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15204 test -n "$exec_prefix" &&
15205   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15206
15207
15208 for file in $internal_makefile_list; do
15209   test "$file" = src/Makefile.in && \
15210     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15211   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15212 done
15213 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15214 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
15215
15216 trap '' 1 2 15
15217
15218 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15219
15220 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15221 # Let make expand exec_prefix.
15222 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15223
15224 # Any assignment to VPATH causes Sun make to only execute
15225 # the first set of double-colon rules, so remove it if not needed.
15226 # If there is a colon in the path, we need to keep it.
15227 if test "x$srcdir" = x.; then
15228   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15229 fi
15230
15231 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15232
15233 DEFS=-DHAVE_CONFIG_H
15234
15235 # Without the "./", some shells look in PATH for config.status.
15236 : ${CONFIG_STATUS=./config.status}
15237
15238 echo creating $CONFIG_STATUS
15239 rm -f $CONFIG_STATUS
15240 cat > $CONFIG_STATUS <<EOF
15241 #! /bin/sh
15242 # Generated automatically by configure.
15243 # Run this file to recreate the current configuration.
15244 # This directory was configured as follows,
15245 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15246 #
15247 # $0 $ac_configure_args
15248 #
15249 # Compiler output produced by configure, useful for debugging
15250 # configure, is in ./config.log if it exists.
15251
15252 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15253 for ac_option
15254 do
15255   case "\$ac_option" in
15256   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15257     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15258     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15259   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15260     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15261     exit 0 ;;
15262   -help | --help | --hel | --he | --h)
15263     echo "\$ac_cs_usage"; exit 0 ;;
15264   *) echo "\$ac_cs_usage"; exit 1 ;;
15265   esac
15266 done
15267
15268 ac_given_srcdir=$srcdir
15269 ac_given_INSTALL="$INSTALL"
15270
15271 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15272 EOF
15273 cat >> $CONFIG_STATUS <<EOF
15274
15275 # Protect against being on the right side of a sed subst in config.status.
15276 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15277  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15278 $ac_vpsub
15279 $extrasub
15280 s%@SHELL@%$SHELL%g
15281 s%@CFLAGS@%$CFLAGS%g
15282 s%@CPPFLAGS@%$CPPFLAGS%g
15283 s%@CXXFLAGS@%$CXXFLAGS%g
15284 s%@FFLAGS@%$FFLAGS%g
15285 s%@DEFS@%$DEFS%g
15286 s%@LDFLAGS@%$LDFLAGS%g
15287 s%@LIBS@%$LIBS%g
15288 s%@exec_prefix@%$exec_prefix%g
15289 s%@prefix@%$prefix%g
15290 s%@program_transform_name@%$program_transform_name%g
15291 s%@bindir@%$bindir%g
15292 s%@sbindir@%$sbindir%g
15293 s%@libexecdir@%$libexecdir%g
15294 s%@datadir@%$datadir%g
15295 s%@sysconfdir@%$sysconfdir%g
15296 s%@sharedstatedir@%$sharedstatedir%g
15297 s%@localstatedir@%$localstatedir%g
15298 s%@libdir@%$libdir%g
15299 s%@includedir@%$includedir%g
15300 s%@oldincludedir@%$oldincludedir%g
15301 s%@infodir@%$infodir%g
15302 s%@mandir@%$mandir%g
15303 s%@LN_S@%$LN_S%g
15304 s%@blddir@%$blddir%g
15305 s%@CC@%$CC%g
15306 s%@CPP@%$CPP%g
15307 s%@start_flags@%$start_flags%g
15308 s%@ld_switch_shared@%$ld_switch_shared%g
15309 s%@start_files@%$start_files%g
15310 s%@ld@%$ld%g
15311 s%@lib_gcc@%$lib_gcc%g
15312 s%@RANLIB@%$RANLIB%g
15313 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15314 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15315 s%@INSTALL_DATA@%$INSTALL_DATA%g
15316 s%@YACC@%$YACC%g
15317 s%@SET_MAKE@%$SET_MAKE%g
15318 s%@X_CFLAGS@%$X_CFLAGS%g
15319 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15320 s%@X_LIBS@%$X_LIBS%g
15321 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15322 s%@install_pp@%$install_pp%g
15323 s%@libs_xauth@%$libs_xauth%g
15324 s%@dnd_objs@%$dnd_objs%g
15325 s%@lwlib_objs@%$lwlib_objs%g
15326 s%@ALLOCA@%$ALLOCA%g
15327 s%@have_esd_config@%$have_esd_config%g
15328 s%@dll_ld@%$dll_ld%g
15329 s%@dll_cflags@%$dll_cflags%g
15330 s%@dll_ldflags@%$dll_ldflags%g
15331 s%@dll_post@%$dll_post%g
15332 s%@dll_ldo@%$dll_ldo%g
15333 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15334 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15335 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15336 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15337 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15338 s%@PROGNAME@%$PROGNAME%g
15339 s%@version@%$version%g
15340 s%@configuration@%$configuration%g
15341 s%@canonical@%$canonical%g
15342 s%@inststaticdir@%$inststaticdir%g
15343 s%@instvardir@%$instvardir%g
15344 s%@srcdir@%$srcdir%g
15345 s%@pkgdir@%$pkgdir%g
15346 s%@statedir@%$statedir%g
15347 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15348 s%@PREFIX@%$PREFIX%g
15349 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15350 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15351 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15352 s%@INFODIR@%$INFODIR%g
15353 s%@infopath@%$infopath%g
15354 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15355 s%@INFOPATH@%$INFOPATH%g
15356 s%@package_path@%$package_path%g
15357 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15358 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15359 s%@lispdir@%$lispdir%g
15360 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15361 s%@LISPDIR@%$LISPDIR%g
15362 s%@moduledir@%$moduledir%g
15363 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15364 s%@MODULEDIR@%$MODULEDIR%g
15365 s%@sitelispdir@%$sitelispdir%g
15366 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15367 s%@SITELISPDIR@%$SITELISPDIR%g
15368 s%@sitemoduledir@%$sitemoduledir%g
15369 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15370 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15371 s%@etcdir@%$etcdir%g
15372 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15373 s%@ETCDIR@%$ETCDIR%g
15374 s%@docdir@%$docdir%g
15375 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15376 s%@DOCDIR@%$DOCDIR%g
15377 s%@archlibdir@%$archlibdir%g
15378 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15379 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15380 s%@bitmapdir@%$bitmapdir%g
15381 s%@extra_objs@%$extra_objs%g
15382 s%@machfile@%$machfile%g
15383 s%@opsysfile@%$opsysfile%g
15384 s%@c_switch_general@%$c_switch_general%g
15385 s%@c_switch_window_system@%$c_switch_window_system%g
15386 s%@c_switch_all@%$c_switch_all%g
15387 s%@ld_switch_general@%$ld_switch_general%g
15388 s%@ld_switch_window_system@%$ld_switch_window_system%g
15389 s%@ld_switch_all@%$ld_switch_all%g
15390 s%@ld_libs_general@%$ld_libs_general%g
15391 s%@ld_libs_window_system@%$ld_libs_window_system%g
15392 s%@ld_libs_all@%$ld_libs_all%g
15393 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15394 s%@native_sound_lib@%$native_sound_lib%g
15395 s%@sound_cflags@%$sound_cflags%g
15396 s%@dynodump_arch@%$dynodump_arch%g
15397 s%@XEMACS_CC@%$XEMACS_CC%g
15398 s%@internal_makefile_list@%$internal_makefile_list%g
15399
15400 CEOF
15401 EOF
15402
15403 cat >> $CONFIG_STATUS <<\EOF
15404
15405 # Split the substitutions into bite-sized pieces for seds with
15406 # small command number limits, like on Digital OSF/1 and HP-UX.
15407 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15408 ac_file=1 # Number of current file.
15409 ac_beg=1 # First line for current file.
15410 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15411 ac_more_lines=:
15412 ac_sed_cmds=""
15413 while $ac_more_lines; do
15414   if test $ac_beg -gt 1; then
15415     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15416   else
15417     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15418   fi
15419   if test ! -s conftest.s$ac_file; then
15420     ac_more_lines=false
15421     rm -f conftest.s$ac_file
15422   else
15423     if test -z "$ac_sed_cmds"; then
15424       ac_sed_cmds="sed -f conftest.s$ac_file"
15425     else
15426       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15427     fi
15428     ac_file=`expr $ac_file + 1`
15429     ac_beg=$ac_end
15430     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15431   fi
15432 done
15433 if test -z "$ac_sed_cmds"; then
15434   ac_sed_cmds=cat
15435 fi
15436 EOF
15437
15438 cat >> $CONFIG_STATUS <<EOF
15439
15440 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15441 EOF
15442 cat >> $CONFIG_STATUS <<\EOF
15443 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15444   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15445   case "$ac_file" in
15446   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15447        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15448   *) ac_file_in="${ac_file}.in" ;;
15449   esac
15450
15451   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15452
15453   # Remove last slash and all that follows it.  Not all systems have dirname.
15454   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15455   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15456     # The file is in a subdirectory.
15457     test ! -d "$ac_dir" && mkdir "$ac_dir"
15458     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15459     # A "../" for each directory in $ac_dir_suffix.
15460     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15461   else
15462     ac_dir_suffix= ac_dots=
15463   fi
15464
15465   case "$ac_given_srcdir" in
15466   .)  srcdir=.
15467       if test -z "$ac_dots"; then top_srcdir=.
15468       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15469   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15470   *) # Relative path.
15471     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15472     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15473   esac
15474
15475   case "$ac_given_INSTALL" in
15476   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15477   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15478   esac
15479
15480   echo creating "$ac_file"
15481   rm -f "$ac_file"
15482   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15483   case "$ac_file" in
15484   *Makefile*) ac_comsub="1i\\
15485 # $configure_input" ;;
15486   *) ac_comsub= ;;
15487   esac
15488
15489   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15490   sed -e "$ac_comsub
15491 s%@configure_input@%$configure_input%g
15492 s%@srcdir@%$srcdir%g
15493 s%@top_srcdir@%$top_srcdir%g
15494 s%@INSTALL@%$INSTALL%g
15495 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15496 fi; done
15497 rm -f conftest.s*
15498
15499 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15500 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15501 #
15502 # ac_d sets the value in "#define NAME VALUE" lines.
15503 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15504 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15505 ac_dC='\3'
15506 ac_dD='%g'
15507 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15508 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15509 ac_uB='\([      ]\)%\1#\2define\3'
15510 ac_uC=' '
15511 ac_uD='\4%g'
15512 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15513 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15514 ac_eB='$%\1#\2define\3'
15515 ac_eC=' '
15516 ac_eD='%g'
15517
15518 if test "${CONFIG_HEADERS+set}" != set; then
15519 EOF
15520 cat >> $CONFIG_STATUS <<EOF
15521   CONFIG_HEADERS="src/config.h lwlib/config.h"
15522 EOF
15523 cat >> $CONFIG_STATUS <<\EOF
15524 fi
15525 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15526   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15527   case "$ac_file" in
15528   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15529        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15530   *) ac_file_in="${ac_file}.in" ;;
15531   esac
15532
15533   echo creating $ac_file
15534
15535   rm -f conftest.frag conftest.in conftest.out
15536   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15537   cat $ac_file_inputs > conftest.in
15538
15539 EOF
15540
15541 # Transform confdefs.h into a sed script conftest.vals that substitutes
15542 # the proper values into config.h.in to produce config.h.  And first:
15543 # Protect against being on the right side of a sed subst in config.status.
15544 # Protect against being in an unquoted here document in config.status.
15545 rm -f conftest.vals
15546 cat > conftest.hdr <<\EOF
15547 s/[\\&%]/\\&/g
15548 s%[\\$`]%\\&%g
15549 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15550 s%ac_d%ac_u%gp
15551 s%ac_u%ac_e%gp
15552 EOF
15553 sed -n -f conftest.hdr confdefs.h > conftest.vals
15554 rm -f conftest.hdr
15555
15556 # This sed command replaces #undef with comments.  This is necessary, for
15557 # example, in the case of _POSIX_SOURCE, which is predefined and required
15558 # on some systems where configure will not decide to define it.
15559 cat >> conftest.vals <<\EOF
15560 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15561 EOF
15562
15563 # Break up conftest.vals because some shells have a limit on
15564 # the size of here documents, and old seds have small limits too.
15565
15566 rm -f conftest.tail
15567 while :
15568 do
15569   ac_lines=`grep -c . conftest.vals`
15570   # grep -c gives empty output for an empty file on some AIX systems.
15571   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15572   # Write a limited-size here document to conftest.frag.
15573   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15574   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15575   echo 'CEOF
15576   sed -f conftest.frag conftest.in > conftest.out
15577   rm -f conftest.in
15578   mv conftest.out conftest.in
15579 ' >> $CONFIG_STATUS
15580   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15581   rm -f conftest.vals
15582   mv conftest.tail conftest.vals
15583 done
15584 rm -f conftest.vals
15585
15586 cat >> $CONFIG_STATUS <<\EOF
15587   rm -f conftest.frag conftest.h
15588   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15589   cat conftest.in >> conftest.h
15590   rm -f conftest.in
15591   if cmp -s $ac_file conftest.h 2>/dev/null; then
15592     echo "$ac_file is unchanged"
15593     rm -f conftest.h
15594   else
15595     # Remove last slash and all that follows it.  Not all systems have dirname.
15596       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15597       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15598       # The file is in a subdirectory.
15599       test ! -d "$ac_dir" && mkdir "$ac_dir"
15600     fi
15601     rm -f $ac_file
15602     mv conftest.h $ac_file
15603   fi
15604 fi; done
15605
15606 EOF
15607 cat >> $CONFIG_STATUS <<EOF
15608 CPP="$CPP"
15609  top_srcdir="$srcdir"
15610  MAKE_SUBDIR="$MAKE_SUBDIR"
15611
15612 EOF
15613 cat >> $CONFIG_STATUS <<\EOF
15614 for dir in . $MAKE_SUBDIR; do
15615   (
15616     cd $dir
15617     rm -f junk.c
15618     < Makefile.in \
15619       sed -e '/^# Generated/d' \
15620           -e 's%/\*\*/#.*%%' \
15621           -e 's/^ *# */#/' \
15622           -e '/^##/d' \
15623           -e '/^#/ {
15624 p
15625 d
15626 }'        \
15627           -e '/./ {
15628 s/\([\"]\)/\\\1/g
15629 s/^/"/
15630 s/$/"/
15631 }'  > junk.c;
15632
15633
15634
15635     echo creating $dir/Makefile
15636 $CPP -I. -I${top_srcdir}/src  junk.c \
15637   | sed -e 's/^\#.*//'          \
15638         -e 's/^[        ][      ]*$//'\
15639         -e 's/^ /       /'              \
15640         -e '/^[ \f]*$/d' \
15641         -e '/^\"/ {
15642         s/\\\([\"]\)/\1/g
15643         s/^[    ]*\"//
15644         s/\"[   ]*$//
15645 }' > Makefile.new
15646     chmod 444 Makefile.new
15647     mv -f Makefile.new Makefile
15648
15649     echo creating $dir/GNUmakefile
15650 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15651   | sed -e 's/^\#.*//'          \
15652         -e 's/^[        ][      ]*$//'\
15653         -e 's/^ /       /'              \
15654         -e '/^[ \f]*$/d' \
15655         -e '/^\"/ {
15656         s/\\\([\"]\)/\1/g
15657         s/^[    ]*\"//
15658         s/\"[   ]*$//
15659 }' > Makefile.new
15660     chmod 444 Makefile.new
15661     mv -f Makefile.new GNUmakefile
15662
15663     rm -f junk.c
15664   )
15665 done
15666
15667 sed < config.status >> lib-src/config.values \
15668   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15669   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15670   -e 's/^\([^ ]*\) $/\1 ""/' \
15671   -e 's/ 1$/ t/'
15672
15673
15674 exit 0
15675 EOF
15676 chmod +x $CONFIG_STATUS
15677 rm -fr confdefs* $ac_clean_files
15678 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1