XEmacs 21.2.33 "Melpomene".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 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 lockdir='${statedir}/${inststaticdir}/lock'
244 archlibdir='${datadir}/${instvardir}/${configuration}'
245 docdir='${archlibdir}'
246 with_prefix='yes'
247 with_site_lisp='no'
248 with_site_modules='yes'
249 with_menubars=''
250 with_scrollbars=''
251 with_widgets=''
252 with_dialogs=''
253 with_file_coding=''
254 cpp='' cppflags='' libs='' ldflags=''
255 dynamic=''
256 with_x11=''
257 with_msw=''
258 rel_alloc='default'
259 with_system_malloc='default'
260 with_dlmalloc='default'
261 native_sound_lib=''
262 use_assertions="yes"
263 with_toolbars=""
264 with_tty=""
265 use_union_type="no"
266 with_dnet=""
267 pdump="no"
268 with_dragndrop="no"
269
270
271
272
273 arguments="$@"
274
275 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
276 quoted_arguments=
277 for i in "$@"; do
278    case "$i" in
279    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
280    | --no-cr | --no-c) ;;
281    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
282    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
283    *)
284    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
285    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
286    esac
287 done
288
289 while test $# != 0; do
290   arg="$1"; shift
291   case "$arg" in
292     --no-create|--no-recursion) ;;
293         -* )
294             case "$arg" in
295         -*=*)
296           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
297           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
298           valomitted=no
299         ;;
300                                                                           -*)
301                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
302           val="yes" valomitted=yes
303         ;;
304       esac
305
306             optname="$opt"
307       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
308
309             case "${valomitted}-${opt}" in yes-without_* )
310         opt=`echo $opt | sed 's/without/with/'`
311         valomitted="no" val="no" ;;
312       esac
313
314             case "$opt" in
315
316         with_site_lisp  | \
317         with_prefix     | \
318         with_site_modules | \
319         with_x          | \
320         with_x11        | \
321         with_msw        | \
322         with_gcc        | \
323         dynamic         | \
324         with_ncurses    | \
325         with_dnet       | \
326         with_socks      | \
327         with_dragndrop  | \
328         with_cde        | \
329         with_offix      | \
330         with_gpm        | \
331         with_xpm        | \
332         with_xface      | \
333         with_gif        | \
334         with_jpeg       | \
335         with_png        | \
336         with_tiff       | \
337         with_wmcommand  | \
338         with_xmu        | \
339         with_purify     | \
340         with_quantify   | \
341         with_toolbars   | \
342         with_tty        | \
343         with_xfs        | \
344         with_i18n3      | \
345         with_mule       | \
346         with_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_ldap       | \
354         with_postgresql | \
355         with_pop        | \
356         with_kerberos   | \
357         with_hesiod     | \
358         with_dnet       | \
359         with_infodock   | \
360         external_widget | \
361         verbose         | \
362         extra_verbose   | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         quick_build )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 The default is to autodetect all sound support."
476 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
477             elif test -n "$new_sdefault" ; then
478                 with_native_sound=$new_sdefault
479                 with_nas_sound=$new_sdefault
480                 with_esd_sound=$new_sdefault
481                 new_sdefault=   # reset this
482             fi
483             sound_notfirst=true
484           done
485         ;;
486
487                         "with_athena" )
488           case "$val" in
489             xa | xaw )                    val=xaw    ;;
490             3 | 3d | xaw3d )              val=3d     ;;
491                         ne | nex | next | naxtaw)     val=next   ;;
492                         9 | 95 | xaw95 )              val=95     ;;
493             xp | xpm | xawxpm )           val=xpm    ;;
494             * ) (echo "$progname: Usage error:"
495 echo " " "The \`--$optname' option must have one of these values:
496   \`xaw', \`3d', \`next', \`95', or \`xpm'."
497 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
498           esac
499           eval "$opt=\"$val\""
500         ;;
501
502                 "with_xim" )
503           case "$val" in
504             y | ye | yes )                val=yes   ;;
505             n | no | non | none )         val=no    ;;
506             x | xl | xli | xlib )         val=xlib  ;;
507             m | mo | mot | moti | motif ) val=motif ;;
508             * ) (echo "$progname: Usage error:"
509 echo " " "The \`--$optname' option must have one of these values:
510   \`motif', \`xlib', \`yes', or \`no'."
511 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
512           esac
513           eval "$opt=\"$val\""
514         ;;
515
516                 "mail_locking" )
517           case "$val" in
518             lockf )     val=lockf ;;
519             flock )     val=flock ;;
520             file | dot ) val=file  ;;
521             locking )   val=locking  ;;
522             * ) (echo "$progname: Usage error:"
523 echo " " "The \`--$optname' option must have one of these values:
524   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
525 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
526           esac
527           eval "$opt=\"$val\""
528         ;;
529
530                 "error_checking" )
531                           
532           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
533             case "$x" in
534                       n | no | non | none ) new_default=no ;;
535               a | al | all )        new_default=yes ;;
536
537               extents )       error_check_extents=yes ;;
538               noextents )     error_check_extents=no ;;
539
540               typecheck )     error_check_typecheck=yes ;;
541               notypecheck )   error_check_typecheck=no ;;
542
543               bufpos )        error_check_bufpos=yes ;;
544               nobufpos )      error_check_bufpos=no ;;
545
546               gc )            error_check_gc=yes ;;
547               nogc )          error_check_gc=no ;;
548
549               malloc )        error_check_malloc=yes ;;
550               nomalloc )      error_check_malloc=no ;;
551
552               byte_code )     error_check_byte_code=yes ;;
553               nobyte_code )   error_check_byte_code=no ;;
554
555               glyphs )     error_check_glyphs=yes ;;
556               noglyphs )   error_check_glyphs=no ;;
557
558               * ) bogus_error_check=yes ;;
559             esac
560             if test "$bogus_error_check" -o \
561                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
562                 if test "$error_check_default" = yes ; then
563                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
564                 else
565                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
566                 fi
567                 (echo "$progname: Usage error:"
568 echo " " "Valid types for the \`--$optname' option are:
569   $types."
570 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
571             elif test -n "$new_default" ; then
572                 error_check_extents=$new_default
573                 error_check_typecheck=$new_default
574                 error_check_bufpos=$new_default
575                 error_check_gc=$new_default
576                 error_check_malloc=$new_default
577                 error_check_byte_code=$new_default
578                 error_check_glyphs=$new_default
579                 new_default=    # reset this
580             fi
581             echeck_notfirst=true
582           done
583         ;;
584
585                                 
586                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
587         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
588         archlibdir | docdir | package_path )
589                    if test "$valomitted" = "yes"; then
590              if test "$#" = 0; then
591                  (echo "$progname: Usage error:"
592 echo " " "The \`--$optname' option requires a value."
593 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
594              fi
595              val="$1"; shift
596            fi
597            eval "$opt=\"$val\""
598
599                            case "$opt" in
600                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
601     Defining EXEC_PREFIX_USER_DEFINED
602 EOF
603 cat >> confdefs.h <<\EOF
604 #define EXEC_PREFIX_USER_DEFINED 1
605 EOF
606 }
607  ;;
608              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
609     Defining LISPDIR_USER_DEFINED
610 EOF
611 cat >> confdefs.h <<\EOF
612 #define LISPDIR_USER_DEFINED 1
613 EOF
614 }
615  ;;
616              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
617     Defining SITELISPDIR_USER_DEFINED
618 EOF
619 cat >> confdefs.h <<\EOF
620 #define SITELISPDIR_USER_DEFINED 1
621 EOF
622 }
623  ;;
624              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
625     Defining MODULEDIR_USER_DEFINED
626 EOF
627 cat >> confdefs.h <<\EOF
628 #define MODULEDIR_USER_DEFINED 1
629 EOF
630 }
631  ;;
632              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
633     Defining ETCDIR_USER_DEFINED
634 EOF
635 cat >> confdefs.h <<\EOF
636 #define ETCDIR_USER_DEFINED 1
637 EOF
638 }
639  ;;
640              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
641     Defining INFODIR_USER_DEFINED
642 EOF
643 cat >> confdefs.h <<\EOF
644 #define INFODIR_USER_DEFINED 1
645 EOF
646 }
647  ;;
648              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
649     Defining INFOPATH_USER_DEFINED
650 EOF
651 cat >> confdefs.h <<\EOF
652 #define INFOPATH_USER_DEFINED 1
653 EOF
654 }
655  ;;
656              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
657     Defining PACKAGE_PATH_USER_DEFINED
658 EOF
659 cat >> confdefs.h <<\EOF
660 #define PACKAGE_PATH_USER_DEFINED 1
661 EOF
662 }
663  ;;
664              datadir )
665                 { test "$extra_verbose" = "yes" && cat << \EOF
666     Defining INFODIR_USER_DEFINED
667 EOF
668 cat >> confdefs.h <<\EOF
669 #define INFODIR_USER_DEFINED 1
670 EOF
671 }
672
673                 { test "$extra_verbose" = "yes" && cat << \EOF
674     Defining LISPDIR_USER_DEFINED
675 EOF
676 cat >> confdefs.h <<\EOF
677 #define LISPDIR_USER_DEFINED 1
678 EOF
679 }
680
681             { test "$extra_verbose" = "yes" && cat << \EOF
682     Defining MODULEDIR_USER_DEFINED
683 EOF
684 cat >> confdefs.h <<\EOF
685 #define MODULEDIR_USER_DEFINED 1
686 EOF
687 }
688
689                 { test "$extra_verbose" = "yes" && cat << \EOF
690     Defining ETCDIR_USER_DEFINED
691 EOF
692 cat >> confdefs.h <<\EOF
693 #define ETCDIR_USER_DEFINED 1
694 EOF
695 }
696  ;;
697              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
698     Defining LOCKDIR_USER_DEFINED
699 EOF
700 cat >> confdefs.h <<\EOF
701 #define LOCKDIR_USER_DEFINED 1
702 EOF
703 }
704  ;;
705              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
706     Defining DOCDIR_USER_DEFINED
707 EOF
708 cat >> confdefs.h <<\EOF
709 #define DOCDIR_USER_DEFINED 1
710 EOF
711 }
712  ;;
713              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
714     Defining ARCHLIBDIR_USER_DEFINED
715 EOF
716 cat >> confdefs.h <<\EOF
717 #define ARCHLIBDIR_USER_DEFINED 1
718 EOF
719 }
720  ;;
721            esac
722         ;;
723
724                 "no_create" ) ;;
725
726                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
727
728                 "with_menubars"   | \
729         "with_scrollbars" | \
730         "with_dialogs" | \
731         "with_widgets" )
732           case "$val" in
733             l | lu | luc | luci | lucid )               val=lucid  ;;
734             m | mo | mot | moti | motif )               val=motif  ;;
735             a | at | ath | athe | athen | athena )      val=athena ;;
736             n | no | non | none )                       val=no ;;
737             * ) (echo "$progname: Usage error:"
738 echo " " "The \`--$optname' option must have one of these values:
739   \`lucid', \`motif', \`athena', or \`no'."
740 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
741           esac
742           eval "$opt=\"$val\""
743         ;;
744
745                 "use_minimal_tagbits" | \
746         "use_indexed_lrecord_implementation" | \
747         "run_in_place"  | \
748         "const_is_losing" | \
749         "with_gnu_make" )
750           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
751         ;;
752
753                 * ) (echo "$progname: Usage error:"
754 echo " " "Unrecognized option: $arg"
755 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
756
757       esac
758     ;;
759
760         *-*-*) configuration="$arg" ;;
761
762         *) (echo "$progname: Usage error:"
763 echo " " "Unrecognized argument: $arg"
764 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
765
766   esac
767 done
768
769
770 test -n "$cpp"      && CPP="$cpp"
771 test -n "$cppflags" && CPPFLAGS="$cppflags"
772 test -n "$libs"     && LIBS="$libs"
773 test -n "$ldflags"  && LDFLAGS="$ldflags"
774
775 eval set x "$quoted_arguments"; shift
776
777 test "$extra_verbose" = "yes" && verbose=yes
778
779 test -n "$with_x" && with_x11="$with_x"
780
781 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
782   test "$with_system_malloc" = "default" && with_system_malloc=yes
783 fi
784
785
786
787 if test "$with_cde $with_tooltalk" = "yes no"; then
788   (echo "$progname: Usage error:"
789 echo " " "--with-cde requires --with-tooltalk"
790 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
791 elif test "$with_tooltalk" = "no" ; then with_cde=no
792 elif test "$with_cde" = "yes"; then with_tooltalk=yes
793 fi
794
795
796 case "$srcdir" in
797
798     "" )
799     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
800       if test -f "$dir/src/lisp.h" -a \
801               -f "$dir/lisp/version.el" ; then
802         srcdir="$dir"
803         break
804       fi
805     done
806     if test -z "$srcdir" ; then
807       (echo "$progname: Usage error:"
808 echo " " "Neither the current directory nor its parent seem to
809   contain the XEmacs sources.  If you do not want to build XEmacs in its
810   source tree, you should run \`$progname' in the directory in which
811   you wish to build XEmacs, using the \`--srcdir' option to say where the
812   sources may be found."
813 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
814     fi
815   ;;
816
817     * )
818     if test ! -f "$srcdir/src/lisp.h" -o \
819             ! -f "$srcdir/lisp/version.el" ; then
820       (echo "$progname: Usage error:"
821 echo " " "The directory specified with the \`--srcdir' option,
822   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
823   either run the \`$progname' script at the top of the XEmacs source
824   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
825 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
826     fi
827   ;;
828 esac
829
830 if test -z "$configuration"; then
831     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
832   if test -z "$configuration"; then
833     (echo "$progname: Usage error:"
834 echo " " "XEmacs has not been ported to this host type.
835 Try explicitly specifying the CONFIGURATION when rerunning configure."
836 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
837   fi
838 fi
839
840 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
841 echo "configure:842: checking whether ln -s works" >&5
842
843 rm -f conftestdata
844 if ln -s X conftestdata 2>/dev/null
845 then
846   rm -f conftestdata
847   ac_cv_prog_LN_S="ln -s"
848 else
849   ac_cv_prog_LN_S=ln
850 fi
851 LN_S="$ac_cv_prog_LN_S"
852 if test "$ac_cv_prog_LN_S" = "ln -s"; then
853   echo "$ac_t""yes" 1>&6
854 else
855   echo "$ac_t""no" 1>&6
856 fi
857
858
859 for dir in lisp etc man info tests; do
860   if test ! -d "$dir" ; then
861     echo Making symbolic link to "$srcdir/$dir"
862     ${LN_S} "$srcdir/$dir" "$dir"
863   fi
864 done
865
866
867 absolute_pwd="`pwd`";
868 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
869 then blddir="$PWD"
870 else blddir="$absolute_pwd"; if test -d "/net"; then
871   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
872   blddir=`echo "$blddir" | \
873    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
874 fi
875 fi
876
877
878 case "$srcdir" in
879   /* ) ;;
880   .  ) srcdir="$blddir" ;;
881   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
882   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
883   srcdir=`echo "$srcdir" | \
884    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
885 fi ;;
886 esac
887
888 if test `pwd` != `sh -c cd $srcdir && pwd`  \
889    && test -f "$srcdir/src/config.h"; then
890   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
891    echo "   as a build directory right now; it has been configured in its own"
892    echo "   right.  To configure in another directory as well, you MUST"
893    echo "   use GNU make.  If you do not have GNU make, then you must"
894    echo "   now do \`make distclean' in $srcdir,"
895    echo "   and then run $progname again.") >&2
896   extrasub='/^VPATH[     ]*=/c\
897 vpath %.c $(srcdir)\
898 vpath %.h $(srcdir)\
899 vpath %.y $(srcdir)\
900 vpath %.l $(srcdir)\
901 vpath %.s $(srcdir)\
902 vpath %.in $(srcdir)'
903 fi
904
905 . "$srcdir/version.sh" || exit 1;
906 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
907 : "${extra_verbose=$beta}"
908 version="${emacs_major_version}.${emacs_minor_version}"
909 { test "$extra_verbose" = "yes" && cat << EOF
910     Defining EMACS_MAJOR_VERSION = $emacs_major_version
911 EOF
912 cat >> confdefs.h <<EOF
913 #define EMACS_MAJOR_VERSION $emacs_major_version
914 EOF
915 }
916
917 { test "$extra_verbose" = "yes" && cat << EOF
918     Defining EMACS_MINOR_VERSION = $emacs_minor_version
919 EOF
920 cat >> confdefs.h <<EOF
921 #define EMACS_MINOR_VERSION $emacs_minor_version
922 EOF
923 }
924
925 if test -n "$emacs_beta_version" ; then
926   if test "$beta" = "yes"; then
927         version="${version}-b${emacs_beta_version}"
928         { test "$extra_verbose" = "yes" && cat << EOF
929     Defining EMACS_BETA_VERSION = $emacs_beta_version
930 EOF
931 cat >> confdefs.h <<EOF
932 #define EMACS_BETA_VERSION $emacs_beta_version
933 EOF
934 }
935
936   else
937         version="${version}.${emacs_beta_version}"
938         { test "$extra_verbose" = "yes" && cat << EOF
939     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
940 EOF
941 cat >> confdefs.h <<EOF
942 #define EMACS_PATCH_LEVEL $emacs_beta_version
943 EOF
944 }
945
946   fi
947 fi
948 { test "$extra_verbose" = "yes" && cat << EOF
949     Defining XEMACS_CODENAME = "$xemacs_codename"
950 EOF
951 cat >> confdefs.h <<EOF
952 #define XEMACS_CODENAME "$xemacs_codename"
953 EOF
954 }
955
956 { test "$extra_verbose" = "yes" && cat << EOF
957     Defining EMACS_VERSION = "$version"
958 EOF
959 cat >> confdefs.h <<EOF
960 #define EMACS_VERSION "$version"
961 EOF
962 }
963
964
965 if test "$with_infodock" = "yes"; then
966   if test ! -f ../../ID-INSTALL; then
967     echo "Cannot build InfoDock without InfoDock sources"
968     with_infodock=no
969   fi
970 fi
971
972 if test "$with_infodock" = "yes"; then
973       { test "$extra_verbose" = "yes" && cat << EOF
974     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
975 EOF
976 cat >> confdefs.h <<EOF
977 #define INFODOCK_MAJOR_VERSION $infodock_major_version
978 EOF
979 }
980
981   { test "$extra_verbose" = "yes" && cat << EOF
982     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
983 EOF
984 cat >> confdefs.h <<EOF
985 #define INFODOCK_MINOR_VERSION $infodock_minor_version
986 EOF
987 }
988
989   { test "$extra_verbose" = "yes" && cat << EOF
990     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
991 EOF
992 cat >> confdefs.h <<EOF
993 #define INFODOCK_BUILD_VERSION $infodock_build_version
994 EOF
995 }
996
997   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
998   PROGNAME=infodock
999   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1000 else
1001   PROGNAME=xemacs
1002 fi
1003
1004 { test "$extra_verbose" = "yes" && cat << EOF
1005     Defining EMACS_PROGNAME = "$PROGNAME"
1006 EOF
1007 cat >> confdefs.h <<EOF
1008 #define EMACS_PROGNAME "$PROGNAME"
1009 EOF
1010 }
1011
1012
1013 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1014 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1015     Defining ERROR_CHECK_EXTENTS
1016 EOF
1017 cat >> confdefs.h <<\EOF
1018 #define ERROR_CHECK_EXTENTS 1
1019 EOF
1020 }
1021
1022 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1023     Defining ERROR_CHECK_TYPECHECK
1024 EOF
1025 cat >> confdefs.h <<\EOF
1026 #define ERROR_CHECK_TYPECHECK 1
1027 EOF
1028 }
1029
1030 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_BUFPOS
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_BUFPOS 1
1035 EOF
1036 }
1037
1038 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_GC
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_GC 1
1043 EOF
1044 }
1045
1046 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1047     Defining ERROR_CHECK_MALLOC
1048 EOF
1049 cat >> confdefs.h <<\EOF
1050 #define ERROR_CHECK_MALLOC 1
1051 EOF
1052 }
1053
1054 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1055     Defining ERROR_CHECK_BYTE_CODE
1056 EOF
1057 cat >> confdefs.h <<\EOF
1058 #define ERROR_CHECK_BYTE_CODE 1
1059 EOF
1060 }
1061
1062 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1063     Defining ERROR_CHECK_GLYPHS
1064 EOF
1065 cat >> confdefs.h <<\EOF
1066 #define ERROR_CHECK_GLYPHS 1
1067 EOF
1068 }
1069
1070 if test "${debug:=$beta}" = "yes"; then
1071   use_assertions=yes memory_usage_stats=yes
1072   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1073    echo "    xemacs will be linked with \"debug.o\""
1074  fi
1075   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1076    echo "    xemacs will be linked with \"tests.o\""
1077  fi
1078   { test "$extra_verbose" = "yes" && cat << \EOF
1079     Defining DEBUG_XEMACS
1080 EOF
1081 cat >> confdefs.h <<\EOF
1082 #define DEBUG_XEMACS 1
1083 EOF
1084 }
1085
1086 fi
1087 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1088     Defining USE_ASSERTIONS
1089 EOF
1090 cat >> confdefs.h <<\EOF
1091 #define USE_ASSERTIONS 1
1092 EOF
1093 }
1094
1095 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1096     Defining MEMORY_USAGE_STATS
1097 EOF
1098 cat >> confdefs.h <<\EOF
1099 #define MEMORY_USAGE_STATS 1
1100 EOF
1101 }
1102
1103
1104
1105 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1106 echo "configure:1107: checking "host system type"" >&5
1107 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1108 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1109 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1110 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1111 echo "$ac_t""$configuration" 1>&6
1112
1113
1114
1115
1116
1117 machine='' opsys=''
1118
1119 case "$canonical" in
1120   sparc-*-*        ) machine=sparc ;;
1121   alpha*-*-*       ) machine=alpha ;;
1122   vax-*-*          ) machine=vax ;;
1123   mips-dec-*       ) machine=pmax ;;
1124   mips-sgi-irix6*  ) machine=iris6d ;;
1125   mips-sgi-*       ) machine=iris4d ;;
1126   mips*-linux      ) machine=mips ;;
1127   romp-ibm-*       ) machine=ibmrt ;;
1128   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1129   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1130   powerpc*-*       ) machine=powerpc ;;
1131   hppa-*-*         ) machine=hp800 ;;
1132   m88k-dg-*        ) machine=aviion ;;
1133   m68*-sony-*      ) machine=news ;;
1134   mips-sony-*      ) machine=news-risc ;;
1135   clipper-*        ) machine=clipper ;;
1136   arm*             ) machine=arm ;;
1137   ns32k-*          ) machine=ns32000 ;;
1138 esac
1139
1140 case "$canonical" in
1141   *-*-linux*    ) opsys=linux ;;
1142   *-*-netbsd*   ) opsys=netbsd ;;
1143   *-*-openbsd*  ) opsys=openbsd ;;
1144   *-*-nextstep* ) opsys=nextstep ;;
1145   *-*-vms       ) opsys=vms ;;
1146
1147     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1148   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1149   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1150   *-dec-osf3*                ) opsys=decosf3-1 ;;
1151   *-dec-osf4*                ) opsys=decosf4-0 ;;
1152
1153     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1154   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1155   *-*-ultrix* )         opsys=ultrix4-3 ;;
1156
1157     *-*-aix3.1*  ) opsys=aix3-1 ;;
1158   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1159   *-*-aix3*    ) opsys=aix3-2   ;;
1160   *-*-aix4.0*  ) opsys=aix4     ;;
1161   *-*-aix4.1*  ) opsys=aix4-1   ;;
1162   *-*-aix4*    ) opsys=aix4-2   ;;
1163
1164     *-gnu* )                    opsys=gnu    ;;
1165   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1166   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1167   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1168   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1169   *-*-aos*   )                  opsys=bsd4-3 ;;
1170   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1171   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1172   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1173   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1174   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1175   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1176         if test -z "$NON_GNU_CPP" ; then
1177           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1178             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1179           done
1180         fi
1181         opsys=usg5-4-2 ;;
1182     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1183     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1184 esac
1185
1186 case "$canonical" in
1187
1188     *-*-netbsd* )
1189     case "$canonical" in
1190       i[3-9]86-*-netbsd*) machine=intel386 ;;
1191       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1192                                             machine=hp9000s300 ;;
1193       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1194       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1195     esac
1196   ;;
1197
1198     *-*-openbsd* )
1199     case "${canonical}" in
1200       i386-*-openbsd*)          machine=intel386 ;;
1201       m68k-*-openbsd*)          machine=hp9000s300 ;;
1202       mipsel-*-openbsd*)        machine=pmax ;;
1203      esac
1204    ;;
1205
1206     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1207   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1208
1209     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1210   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1211
1212     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1213
1214     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1215
1216     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1217
1218     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1219
1220     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1221
1222     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1223   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1224   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1225
1226   
1227     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1228
1229     *-convex-bsd* | *-convex-convexos* )
1230     machine=convex opsys=bsd4-3
1231     NON_GNU_CPP="cc -E -P"
1232   ;;
1233
1234     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1235
1236     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1237   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1238   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1239   m88k-dg-dgux*                           ) opsys=dgux     ;;
1240
1241     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1242   m88k-motorola-sysv4* )
1243                     machine=delta88k opsys=usg5-4-2
1244   ;;
1245   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1246
1247     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1248   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1249
1250     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1251
1252     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1253   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1254   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1255
1256       m88k-harris-cxux* )
1257         case "`uname -r`" in
1258        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1259        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1260     esac
1261     NON_GNU_CPP="/lib/cpp"
1262   ;;
1263     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1264     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1265
1266     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1267
1268     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1269
1270     *-hp-hpux* )
1271         case "$canonical" in
1272       m68*  ) machine=hp9000s300 ;;
1273       hppa* ) machine=hp800      ;;
1274     esac
1275
1276     case "$canonical" in
1277       *-hp-hpux7*  )  opsys=hpux   ;;
1278       *-hp-hpux8*  )  opsys=hpux8  ;;
1279       *-hp-hpux9*  )  opsys=hpux9  ;;
1280       *-hp-hpux10* )  opsys=hpux10 ;;
1281       *-hp-hpux11* )  opsys=hpux11 ;;
1282       *            )  opsys=hpux   ;;
1283     esac
1284
1285         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1286    echo "    xemacs will be linked with \"strcat.o\""
1287  fi ;; esac
1288
1289     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1290         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1291     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1292
1293     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1294   ;;
1295
1296     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1297   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1298
1299     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1300   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1301   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1302   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1303   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1304   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1305
1306     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1307   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1308
1309     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1310
1311     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1312
1313     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1314
1315     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1316
1317       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1318
1319     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1320
1321     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1322
1323     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1324
1325     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1326
1327         mips-mips-usg* ) machine=mips4 ;;
1328   mips-mips-riscos4 )
1329     machine=mips4
1330     NON_GNU_CC="cc -systype bsd43"
1331     NON_GNU_CPP="cc -systype bsd43 -E"
1332     case "$canonical" in
1333       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1334       mips-mips-riscos5* ) opsys=riscos5 ;;
1335     esac
1336   ;;
1337   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1338   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1339
1340     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1341
1342     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1343
1344     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1345   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1346
1347     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1348
1349     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1350
1351     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1352
1353     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1354
1355     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1356   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1357
1358     mips-siemens-sysv* | mips-sni-sysv*)
1359     machine=mips-siemens opsys=usg5-4
1360     NON_GNU_CC=/usr/ccs/bin/cc
1361     NON_GNU_CPP=/usr/ccs/lib/cpp
1362   ;;
1363
1364     mips-nec-sysv*)
1365     machine=mips-nec
1366     NON_GNU_CC=/usr/ccs/bin/cc
1367     NON_GNU_CPP=/usr/ccs/lib/cpp
1368   ;;
1369
1370       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1371   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1372     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1373   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1374   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1375   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1376   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1377   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1378   mips-sgi-irix*      ) opsys=irix5-0 ;;
1379
1380     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1381   *-sony-news* ) opsys=newsos5 ;;
1382
1383     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1384
1385     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1386         case "$canonical" in
1387       m68*-sunos1* )             machine=sun1     ;;
1388       m68*-sunos2* )             machine=sun2     ;;
1389       m68* )                     machine=sun3     ;;
1390       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1391       i*86-*-* )                 machine=intel386 ;;
1392       rs6000* )                  machine=rs6000   ;;
1393     esac
1394
1395         case "$canonical" in *-sunos5*)
1396       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1397     esac
1398
1399                     case "$canonical" in
1400       *-sunos4* )
1401         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1402         : ;;
1403       *-solaris2* )
1404         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1405         RANLIB=':' ;;
1406     esac
1407
1408     case "$canonical" in
1409       *-solaris*          )
1410         opsys=sol2
1411         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1412         { test "$extra_verbose" = "yes" && cat << EOF
1413     Defining OS_RELEASE = $os_release
1414 EOF
1415 cat >> confdefs.h <<EOF
1416 #define OS_RELEASE $os_release
1417 EOF
1418 }
1419  ;;
1420
1421             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1422       *-sunos4.0*         ) opsys=sunos4-0      ;;
1423       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1424       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1425       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1426       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1427       *-mach*             ) opsys=mach-bsd4-3   ;;
1428       *                   ) opsys=bsd4-2        ;;
1429     esac
1430
1431     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1432
1433         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1434   ;;
1435
1436     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1437
1438     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1439   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1440
1441     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1442
1443     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1444
1445     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1446       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1447
1448     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1449
1450     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1451
1452     vax-dec-* )
1453     case "$canonical" in
1454       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1455       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1456       *-mach* )                         opsys=mach-bsd4-3 ;;
1457     esac
1458   ;;
1459
1460     ns16k-whitechapel-* ) machine=mg1 ;;
1461
1462     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1463
1464     i[3-9]86-*-* )
1465     machine=intel386
1466     case "$canonical" in
1467       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1468       *-isc2.2* )               opsys=isc2-2 ;;
1469       *-isc4.0* )               opsys=isc4-0 ;;
1470       *-isc4.* )                opsys=isc4-1
1471                                 GCC_TEST_OPTIONS=-posix
1472                                 NON_GCC_TEST_OPTIONS=-Xp
1473                                 ;;
1474       *-isc* )                  opsys=isc3-0 ;;
1475       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1476       *-esix* )                 opsys=esix ;;
1477       *-mach* )                 opsys=mach-bsd4-3 ;;
1478       *-xenix* )                opsys=xenix ;;
1479       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1480       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1481       *-bsdi4* )                opsys=bsdos4 ;;
1482       *-bsdi3* )                opsys=bsdos3 ;;
1483       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1484       *-bsdi2* )                opsys=bsdos2 ;;
1485       *-sco3.2v5* )             opsys=sco5 ;
1486                                                         if test "$dynamic" = "yes" ; then
1487                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1488         else
1489                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1490         fi ;;
1491       *-sysv5* )                opsys=sco7 ;;
1492       *-386bsd* )               opsys=386bsd ;;
1493       *-freebsd* )              opsys=freebsd ;;
1494       *-nextstep* )             opsys=nextstep ;;
1495       *-pc-cygwin* )            opsys=cygwin32 ;;
1496       *-pc-mingw* )             opsys=mingw32 ;
1497                                 test -z "$with_tty" && with_tty="no";;
1498           esac
1499   ;;
1500
1501     m68k-*-linux* ) machine=m68k opsys=linux ;;
1502
1503 esac
1504
1505 if test -z "$machine" -o -z "$opsys"; then
1506   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1507    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1508   ) >&2
1509   exit 1
1510 fi
1511
1512 if test -z "$dynamic"; then
1513   case "$opsys" in
1514     hpux* | sunos4* ) dynamic=no ;;
1515     *) dynamic=yes ;;
1516   esac
1517 fi
1518 if test "$dynamic" = "yes"; then
1519   case "$opsys" in
1520     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1521     decosf* ) ld_call_shared="-call_shared" ;;
1522   esac
1523 else   case "$opsys" in
1524     sol2 )
1525       echo "Static linking is not supported on Solaris 2."
1526       echo "Rerun configure without specifying --dynamic=no."
1527       exit 1 ;;
1528     linux   ) ld_call_shared="-Bstatic" ;;
1529     decosf* ) ld_call_shared="-non_shared" ;;
1530   esac
1531 fi
1532
1533 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1534
1535 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1536 { test "$extra_verbose" = "yes" && cat << EOF
1537     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1538 EOF
1539 cat >> confdefs.h <<EOF
1540 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1541 EOF
1542 }
1543
1544
1545 machfile="m/${machine}.h"
1546 opsysfile="s/${opsys}.h"
1547
1548
1549 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1550 if test "$with_workshop $with_tooltalk" = "yes no"; then
1551   (echo "$progname: Usage error:"
1552 echo " " "--with-workshop requires --with-tooltalk"
1553 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1554 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1555 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1556 fi
1557
1558 if test "$with_workshop" = "yes"; then
1559   { test "$extra_verbose" = "yes" && cat << \EOF
1560     Defining SUNPRO
1561 EOF
1562 cat >> confdefs.h <<\EOF
1563 #define SUNPRO 1
1564 EOF
1565 }
1566
1567   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1568    echo "    xemacs will be linked with \"sunpro.o\""
1569  fi
1570 fi
1571
1572 if test "$with_clash_detection" != "no"; then
1573   { test "$extra_verbose" = "yes" && cat << \EOF
1574     Defining CLASH_DETECTION
1575 EOF
1576 cat >> confdefs.h <<\EOF
1577 #define CLASH_DETECTION 1
1578 EOF
1579 }
1580
1581   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1582    echo "    xemacs will be linked with \"filelock.o\""
1583  fi
1584 fi
1585
1586 test -n "$compiler" && CC="$compiler"
1587 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1588 fi
1589
1590 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1591 if test "${CFLAGS-unset}" != unset
1592   then cflags_specified=yes;
1593   else cflags_specified=no;
1594 fi
1595
1596 xe_save_CFLAGS="$CFLAGS"
1597
1598 # Extract the first word of "gcc", so it can be a program name with args.
1599 set dummy gcc; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602
1603 if test -n "$CC"; then
1604   ac_cv_prog_CC="$CC" # Let the user override the test.
1605 else
1606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1607   ac_dummy="$PATH"
1608   for ac_dir in $ac_dummy; do
1609     test -z "$ac_dir" && ac_dir=.
1610     if test -f $ac_dir/$ac_word; then
1611       ac_cv_prog_CC="gcc"
1612       break
1613     fi
1614   done
1615   IFS="$ac_save_ifs"
1616 fi
1617 CC="$ac_cv_prog_CC"
1618 if test -n "$CC"; then
1619   echo "$ac_t""$CC" 1>&6
1620 else
1621   echo "$ac_t""no" 1>&6
1622 fi
1623
1624 if test -z "$CC"; then
1625   # Extract the first word of "cc", so it can be a program name with args.
1626 set dummy cc; ac_word=$2
1627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1628 echo "configure:1629: checking for $ac_word" >&5
1629
1630 if test -n "$CC"; then
1631   ac_cv_prog_CC="$CC" # Let the user override the test.
1632 else
1633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1634   ac_prog_rejected=no
1635   ac_dummy="$PATH"
1636   for ac_dir in $ac_dummy; do
1637     test -z "$ac_dir" && ac_dir=.
1638     if test -f $ac_dir/$ac_word; then
1639       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1640         ac_prog_rejected=yes
1641         continue
1642       fi
1643       ac_cv_prog_CC="cc"
1644       break
1645     fi
1646   done
1647   IFS="$ac_save_ifs"
1648 if test $ac_prog_rejected = yes; then
1649   # We found a bogon in the path, so make sure we never use it.
1650   set dummy $ac_cv_prog_CC
1651   shift
1652   if test $# -gt 0; then
1653     # We chose a different compiler from the bogus one.
1654     # However, it has the same basename, so the bogon will be chosen
1655     # first if we set CC to just the basename; use the full file name.
1656     shift
1657     set dummy "$ac_dir/$ac_word" "$@"
1658     shift
1659     ac_cv_prog_CC="$@"
1660   fi
1661 fi
1662 fi
1663 CC="$ac_cv_prog_CC"
1664 if test -n "$CC"; then
1665   echo "$ac_t""$CC" 1>&6
1666 else
1667   echo "$ac_t""no" 1>&6
1668 fi
1669
1670   if test -z "$CC"; then
1671     case "`uname -s`" in
1672     *win32* | *WIN32*)
1673       # Extract the first word of "cl", so it can be a program name with args.
1674 set dummy cl; ac_word=$2
1675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1676 echo "configure:1677: checking for $ac_word" >&5
1677
1678 if test -n "$CC"; then
1679   ac_cv_prog_CC="$CC" # Let the user override the test.
1680 else
1681   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1682   ac_dummy="$PATH"
1683   for ac_dir in $ac_dummy; do
1684     test -z "$ac_dir" && ac_dir=.
1685     if test -f $ac_dir/$ac_word; then
1686       ac_cv_prog_CC="cl"
1687       break
1688     fi
1689   done
1690   IFS="$ac_save_ifs"
1691 fi
1692 CC="$ac_cv_prog_CC"
1693 if test -n "$CC"; then
1694   echo "$ac_t""$CC" 1>&6
1695 else
1696   echo "$ac_t""no" 1>&6
1697 fi
1698  ;;
1699     esac
1700   fi
1701   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1702 fi
1703
1704 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1705 echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1706
1707 ac_ext=c
1708 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1709 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1710 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1711 ac_cpp='$CPP '"$xe_cppflags"
1712 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1713 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1714 cross_compiling=no
1715
1716 cat > conftest.$ac_ext << EOF
1717
1718 #line 1719 "configure"
1719 #include "confdefs.h"
1720
1721 main(){return(0);}
1722 EOF
1723 if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1724   ac_cv_prog_cc_works=yes
1725   # If we can't run a trivial program, we are probably using a cross compiler.
1726   if (./conftest; exit) 2>/dev/null; then
1727     ac_cv_prog_cc_cross=no
1728   else
1729     ac_cv_prog_cc_cross=yes
1730   fi
1731 else
1732   echo "configure: failed program was:" >&5
1733   cat conftest.$ac_ext >&5
1734   ac_cv_prog_cc_works=no
1735 fi
1736 rm -fr conftest*
1737 ac_ext=c
1738 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1739 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1740 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1741 ac_cpp='$CPP '"$xe_cppflags"
1742 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1743 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1744 cross_compiling=no
1745
1746 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1747 if test $ac_cv_prog_cc_works = no; then
1748   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1749 fi
1750 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1751 echo "configure:1752: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1752 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1753 cross_compiling=$ac_cv_prog_cc_cross
1754
1755 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1756 echo "configure:1757: checking whether we are using GNU C" >&5
1757
1758 cat > conftest.c <<EOF
1759 #ifdef __GNUC__
1760   yes;
1761 #endif
1762 EOF
1763 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1764   ac_cv_prog_gcc=yes
1765 else
1766   ac_cv_prog_gcc=no
1767 fi
1768
1769 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1770
1771 if test $ac_cv_prog_gcc = yes; then
1772   GCC=yes
1773 else
1774   GCC=
1775 fi
1776
1777 ac_test_CFLAGS="${CFLAGS+set}"
1778 ac_save_CFLAGS="$CFLAGS"
1779 CFLAGS=
1780 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1781 echo "configure:1782: checking whether ${CC-cc} accepts -g" >&5
1782
1783 echo 'void f(){}' > conftest.c
1784 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1785   ac_cv_prog_cc_g=yes
1786 else
1787   ac_cv_prog_cc_g=no
1788 fi
1789 rm -f conftest*
1790
1791
1792 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1793 if test "$ac_test_CFLAGS" = set; then
1794   CFLAGS="$ac_save_CFLAGS"
1795 elif test $ac_cv_prog_cc_g = yes; then
1796   if test "$GCC" = yes; then
1797     CFLAGS="-g -O2"
1798   else
1799     CFLAGS="-g"
1800   fi
1801 else
1802   if test "$GCC" = yes; then
1803     CFLAGS="-O2"
1804   else
1805     CFLAGS=
1806   fi
1807 fi
1808  
1809 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1810   CC=${NON_GNU_CC-cc}
1811   # Extract the first word of "gcc", so it can be a program name with args.
1812 set dummy gcc; ac_word=$2
1813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1814 echo "configure:1815: checking for $ac_word" >&5
1815
1816 if test -n "$CC"; then
1817   ac_cv_prog_CC="$CC" # Let the user override the test.
1818 else
1819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1820   ac_dummy="$PATH"
1821   for ac_dir in $ac_dummy; do
1822     test -z "$ac_dir" && ac_dir=.
1823     if test -f $ac_dir/$ac_word; then
1824       ac_cv_prog_CC="gcc"
1825       break
1826     fi
1827   done
1828   IFS="$ac_save_ifs"
1829 fi
1830 CC="$ac_cv_prog_CC"
1831 if test -n "$CC"; then
1832   echo "$ac_t""$CC" 1>&6
1833 else
1834   echo "$ac_t""no" 1>&6
1835 fi
1836
1837 if test -z "$CC"; then
1838   # Extract the first word of "cc", so it can be a program name with args.
1839 set dummy cc; ac_word=$2
1840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1841 echo "configure:1842: checking for $ac_word" >&5
1842
1843 if test -n "$CC"; then
1844   ac_cv_prog_CC="$CC" # Let the user override the test.
1845 else
1846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1847   ac_prog_rejected=no
1848   ac_dummy="$PATH"
1849   for ac_dir in $ac_dummy; do
1850     test -z "$ac_dir" && ac_dir=.
1851     if test -f $ac_dir/$ac_word; then
1852       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1853         ac_prog_rejected=yes
1854         continue
1855       fi
1856       ac_cv_prog_CC="cc"
1857       break
1858     fi
1859   done
1860   IFS="$ac_save_ifs"
1861 if test $ac_prog_rejected = yes; then
1862   # We found a bogon in the path, so make sure we never use it.
1863   set dummy $ac_cv_prog_CC
1864   shift
1865   if test $# -gt 0; then
1866     # We chose a different compiler from the bogus one.
1867     # However, it has the same basename, so the bogon will be chosen
1868     # first if we set CC to just the basename; use the full file name.
1869     shift
1870     set dummy "$ac_dir/$ac_word" "$@"
1871     shift
1872     ac_cv_prog_CC="$@"
1873   fi
1874 fi
1875 fi
1876 CC="$ac_cv_prog_CC"
1877 if test -n "$CC"; then
1878   echo "$ac_t""$CC" 1>&6
1879 else
1880   echo "$ac_t""no" 1>&6
1881 fi
1882
1883   if test -z "$CC"; then
1884     case "`uname -s`" in
1885     *win32* | *WIN32*)
1886       # Extract the first word of "cl", so it can be a program name with args.
1887 set dummy cl; ac_word=$2
1888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1889 echo "configure:1890: checking for $ac_word" >&5
1890
1891 if test -n "$CC"; then
1892   ac_cv_prog_CC="$CC" # Let the user override the test.
1893 else
1894   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1895   ac_dummy="$PATH"
1896   for ac_dir in $ac_dummy; do
1897     test -z "$ac_dir" && ac_dir=.
1898     if test -f $ac_dir/$ac_word; then
1899       ac_cv_prog_CC="cl"
1900       break
1901     fi
1902   done
1903   IFS="$ac_save_ifs"
1904 fi
1905 CC="$ac_cv_prog_CC"
1906 if test -n "$CC"; then
1907   echo "$ac_t""$CC" 1>&6
1908 else
1909   echo "$ac_t""no" 1>&6
1910 fi
1911  ;;
1912     esac
1913   fi
1914   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1915 fi
1916
1917 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1918 echo "configure:1919: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1919
1920 ac_ext=c
1921 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1922 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1923 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1924 ac_cpp='$CPP '"$xe_cppflags"
1925 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1926 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1927 cross_compiling=no
1928
1929 cat > conftest.$ac_ext << EOF
1930
1931 #line 1932 "configure"
1932 #include "confdefs.h"
1933
1934 main(){return(0);}
1935 EOF
1936 if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1937   ac_cv_prog_cc_works=yes
1938   # If we can't run a trivial program, we are probably using a cross compiler.
1939   if (./conftest; exit) 2>/dev/null; then
1940     ac_cv_prog_cc_cross=no
1941   else
1942     ac_cv_prog_cc_cross=yes
1943   fi
1944 else
1945   echo "configure: failed program was:" >&5
1946   cat conftest.$ac_ext >&5
1947   ac_cv_prog_cc_works=no
1948 fi
1949 rm -fr conftest*
1950 ac_ext=c
1951 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1952 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1953 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1954 ac_cpp='$CPP '"$xe_cppflags"
1955 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1956 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1957 cross_compiling=no
1958
1959 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1960 if test $ac_cv_prog_cc_works = no; then
1961   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1962 fi
1963 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1964 echo "configure:1965: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1965 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1966 cross_compiling=$ac_cv_prog_cc_cross
1967
1968 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1969 echo "configure:1970: checking whether we are using GNU C" >&5
1970
1971 cat > conftest.c <<EOF
1972 #ifdef __GNUC__
1973   yes;
1974 #endif
1975 EOF
1976 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1977   ac_cv_prog_gcc=yes
1978 else
1979   ac_cv_prog_gcc=no
1980 fi
1981
1982 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1983
1984 if test $ac_cv_prog_gcc = yes; then
1985   GCC=yes
1986 else
1987   GCC=
1988 fi
1989
1990 ac_test_CFLAGS="${CFLAGS+set}"
1991 ac_save_CFLAGS="$CFLAGS"
1992 CFLAGS=
1993 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1994 echo "configure:1995: checking whether ${CC-cc} accepts -g" >&5
1995
1996 echo 'void f(){}' > conftest.c
1997 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1998   ac_cv_prog_cc_g=yes
1999 else
2000   ac_cv_prog_cc_g=no
2001 fi
2002 rm -f conftest*
2003
2004
2005 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2006 if test "$ac_test_CFLAGS" = set; then
2007   CFLAGS="$ac_save_CFLAGS"
2008 elif test $ac_cv_prog_cc_g = yes; then
2009   if test "$GCC" = yes; then
2010     CFLAGS="-g -O2"
2011   else
2012     CFLAGS="-g"
2013   fi
2014 else
2015   if test "$GCC" = yes; then
2016     CFLAGS="-O2"
2017   else
2018     CFLAGS=
2019   fi
2020 fi
2021
2022 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2023   CC=gcc
2024   # Extract the first word of "gcc", so it can be a program name with args.
2025 set dummy gcc; ac_word=$2
2026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2027 echo "configure:2028: checking for $ac_word" >&5
2028
2029 if test -n "$CC"; then
2030   ac_cv_prog_CC="$CC" # Let the user override the test.
2031 else
2032   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2033   ac_dummy="$PATH"
2034   for ac_dir in $ac_dummy; do
2035     test -z "$ac_dir" && ac_dir=.
2036     if test -f $ac_dir/$ac_word; then
2037       ac_cv_prog_CC="gcc"
2038       break
2039     fi
2040   done
2041   IFS="$ac_save_ifs"
2042 fi
2043 CC="$ac_cv_prog_CC"
2044 if test -n "$CC"; then
2045   echo "$ac_t""$CC" 1>&6
2046 else
2047   echo "$ac_t""no" 1>&6
2048 fi
2049
2050 if test -z "$CC"; then
2051   # Extract the first word of "cc", so it can be a program name with args.
2052 set dummy cc; ac_word=$2
2053 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2054 echo "configure:2055: checking for $ac_word" >&5
2055
2056 if test -n "$CC"; then
2057   ac_cv_prog_CC="$CC" # Let the user override the test.
2058 else
2059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2060   ac_prog_rejected=no
2061   ac_dummy="$PATH"
2062   for ac_dir in $ac_dummy; do
2063     test -z "$ac_dir" && ac_dir=.
2064     if test -f $ac_dir/$ac_word; then
2065       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2066         ac_prog_rejected=yes
2067         continue
2068       fi
2069       ac_cv_prog_CC="cc"
2070       break
2071     fi
2072   done
2073   IFS="$ac_save_ifs"
2074 if test $ac_prog_rejected = yes; then
2075   # We found a bogon in the path, so make sure we never use it.
2076   set dummy $ac_cv_prog_CC
2077   shift
2078   if test $# -gt 0; then
2079     # We chose a different compiler from the bogus one.
2080     # However, it has the same basename, so the bogon will be chosen
2081     # first if we set CC to just the basename; use the full file name.
2082     shift
2083     set dummy "$ac_dir/$ac_word" "$@"
2084     shift
2085     ac_cv_prog_CC="$@"
2086   fi
2087 fi
2088 fi
2089 CC="$ac_cv_prog_CC"
2090 if test -n "$CC"; then
2091   echo "$ac_t""$CC" 1>&6
2092 else
2093   echo "$ac_t""no" 1>&6
2094 fi
2095
2096   if test -z "$CC"; then
2097     case "`uname -s`" in
2098     *win32* | *WIN32*)
2099       # Extract the first word of "cl", so it can be a program name with args.
2100 set dummy cl; ac_word=$2
2101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2102 echo "configure:2103: checking for $ac_word" >&5
2103
2104 if test -n "$CC"; then
2105   ac_cv_prog_CC="$CC" # Let the user override the test.
2106 else
2107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2108   ac_dummy="$PATH"
2109   for ac_dir in $ac_dummy; do
2110     test -z "$ac_dir" && ac_dir=.
2111     if test -f $ac_dir/$ac_word; then
2112       ac_cv_prog_CC="cl"
2113       break
2114     fi
2115   done
2116   IFS="$ac_save_ifs"
2117 fi
2118 CC="$ac_cv_prog_CC"
2119 if test -n "$CC"; then
2120   echo "$ac_t""$CC" 1>&6
2121 else
2122   echo "$ac_t""no" 1>&6
2123 fi
2124  ;;
2125     esac
2126   fi
2127   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2128 fi
2129
2130 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2131 echo "configure:2132: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2132
2133 ac_ext=c
2134 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2135 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2136 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2137 ac_cpp='$CPP '"$xe_cppflags"
2138 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2139 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2140 cross_compiling=no
2141
2142 cat > conftest.$ac_ext << EOF
2143
2144 #line 2145 "configure"
2145 #include "confdefs.h"
2146
2147 main(){return(0);}
2148 EOF
2149 if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2150   ac_cv_prog_cc_works=yes
2151   # If we can't run a trivial program, we are probably using a cross compiler.
2152   if (./conftest; exit) 2>/dev/null; then
2153     ac_cv_prog_cc_cross=no
2154   else
2155     ac_cv_prog_cc_cross=yes
2156   fi
2157 else
2158   echo "configure: failed program was:" >&5
2159   cat conftest.$ac_ext >&5
2160   ac_cv_prog_cc_works=no
2161 fi
2162 rm -fr conftest*
2163 ac_ext=c
2164 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2165 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2166 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2167 ac_cpp='$CPP '"$xe_cppflags"
2168 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2169 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2170 cross_compiling=no
2171
2172 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2173 if test $ac_cv_prog_cc_works = no; then
2174   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2175 fi
2176 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2177 echo "configure:2178: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2178 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2179 cross_compiling=$ac_cv_prog_cc_cross
2180
2181 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2182 echo "configure:2183: checking whether we are using GNU C" >&5
2183
2184 cat > conftest.c <<EOF
2185 #ifdef __GNUC__
2186   yes;
2187 #endif
2188 EOF
2189 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2190   ac_cv_prog_gcc=yes
2191 else
2192   ac_cv_prog_gcc=no
2193 fi
2194
2195 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2196
2197 if test $ac_cv_prog_gcc = yes; then
2198   GCC=yes
2199 else
2200   GCC=
2201 fi
2202
2203 ac_test_CFLAGS="${CFLAGS+set}"
2204 ac_save_CFLAGS="$CFLAGS"
2205 CFLAGS=
2206 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2207 echo "configure:2208: checking whether ${CC-cc} accepts -g" >&5
2208
2209 echo 'void f(){}' > conftest.c
2210 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2211   ac_cv_prog_cc_g=yes
2212 else
2213   ac_cv_prog_cc_g=no
2214 fi
2215 rm -f conftest*
2216
2217
2218 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2219 if test "$ac_test_CFLAGS" = set; then
2220   CFLAGS="$ac_save_CFLAGS"
2221 elif test $ac_cv_prog_cc_g = yes; then
2222   if test "$GCC" = yes; then
2223     CFLAGS="-g -O2"
2224   else
2225     CFLAGS="-g"
2226   fi
2227 else
2228   if test "$GCC" = yes; then
2229     CFLAGS="-O2"
2230   else
2231     CFLAGS=
2232   fi
2233 fi
2234
2235 fi
2236 CFLAGS="$xe_save_CFLAGS"
2237
2238
2239 test -n "$CPP" -a -d "$CPP" && CPP=
2240
2241 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2242
2243 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2244 echo "configure:2245: checking how to run the C preprocessor" >&5
2245 # On Suns, sometimes $CPP names a directory.
2246 if test -n "$CPP" && test -d "$CPP"; then
2247   CPP=
2248 fi
2249 if test -z "$CPP"; then
2250
2251   # This must be in double quotes, not single quotes, because CPP may get
2252   # substituted into the Makefile and "${CC-cc}" will confuse make.
2253   CPP="${CC-cc} -E"
2254   # On the NeXT, cc -E runs the code through the compiler's parser,
2255   # not just through cpp.
2256   cat > conftest.$ac_ext <<EOF
2257 #line 2258 "configure"
2258 #include "confdefs.h"
2259 #include <assert.h>
2260 Syntax Error
2261 EOF
2262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2263 { (eval echo configure:2264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2265 if test -z "$ac_err"; then
2266   :
2267 else
2268   echo "$ac_err" >&5
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   rm -rf conftest*
2272   CPP="${CC-cc} -E -traditional-cpp"
2273   cat > conftest.$ac_ext <<EOF
2274 #line 2275 "configure"
2275 #include "confdefs.h"
2276 #include <assert.h>
2277 Syntax Error
2278 EOF
2279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2280 { (eval echo configure:2281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2282 if test -z "$ac_err"; then
2283   :
2284 else
2285   echo "$ac_err" >&5
2286   echo "configure: failed program was:" >&5
2287   cat conftest.$ac_ext >&5
2288   rm -rf conftest*
2289   CPP="${CC-cc} -nologo -E"
2290   cat > conftest.$ac_ext <<EOF
2291 #line 2292 "configure"
2292 #include "confdefs.h"
2293 #include <assert.h>
2294 Syntax Error
2295 EOF
2296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2297 { (eval echo configure:2298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2299 if test -z "$ac_err"; then
2300   :
2301 else
2302   echo "$ac_err" >&5
2303   echo "configure: failed program was:" >&5
2304   cat conftest.$ac_ext >&5
2305   rm -rf conftest*
2306   CPP=/lib/cpp
2307 fi
2308 rm -f conftest*
2309 fi
2310 rm -f conftest*
2311 fi
2312 rm -f conftest*
2313   ac_cv_prog_CPP="$CPP"
2314   CPP="$ac_cv_prog_CPP"
2315 else
2316   ac_cv_prog_CPP="$CPP"
2317 fi
2318 echo "$ac_t""$CPP" 1>&6
2319
2320
2321
2322 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2323 echo "configure:2324: checking for AIX" >&5
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #ifdef _AIX
2328   yes
2329 #endif
2330
2331 EOF
2332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2333   egrep "yes" >/dev/null 2>&1; then
2334   rm -rf conftest*
2335   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2336     Defining _ALL_SOURCE
2337 EOF
2338 cat >> confdefs.h <<\EOF
2339 #define _ALL_SOURCE 1
2340 EOF
2341 }
2342
2343 else
2344   rm -rf conftest*
2345   echo "$ac_t""no" 1>&6
2346 fi
2347 rm -f conftest*
2348
2349  
2350 cat > $srcdir/conffoo.h <<EOF
2351 #define CONFFOO 1
2352 EOF
2353 echo $ac_n "checking for a working inclusion macro""... $ac_c" 1>&6
2354 echo "configure:2355: checking for a working inclusion macro" >&5
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358
2359 int main() {
2360
2361 #define SMART_INCLUDE(path,file) <path/file>
2362 #define CONFFOO_H_PATH $srcdir
2363 #define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
2364 #include CONFFOO_INCLUDE(conffoo.h)
2365
2366 ; return 0; }
2367 EOF
2368 if { (eval echo configure:2369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2369   rm -rf conftest*
2370    echo "$ac_t""direct" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2371     Defining SMART_INCLUDE_INDIRECTIONS = 0
2372 EOF
2373 cat >> confdefs.h <<\EOF
2374 #define SMART_INCLUDE_INDIRECTIONS 0
2375 EOF
2376 }
2377  
2378 else
2379   echo "configure: failed program was:" >&5
2380   cat conftest.$ac_ext >&5
2381   rm -rf conftest*
2382   cat > conftest.$ac_ext <<EOF
2383 #line 2384 "configure"
2384 #include "confdefs.h"
2385
2386 int main() {
2387
2388 #define GLUE_INCLUDE(path,file)  <##path##/##file##>
2389 #define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file)
2390 #define CONFFOO_H_PATH $srcdir
2391 #define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file)
2392 #include CONFFOO_INCLUDE(conffoo.h)
2393
2394 ; return 0; }
2395 EOF
2396 if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2397   rm -rf conftest*
2398    echo "$ac_t""simple" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2399     Defining SMART_INCLUDE_INDIRECTIONS = 1
2400 EOF
2401 cat >> confdefs.h <<\EOF
2402 #define SMART_INCLUDE_INDIRECTIONS 1
2403 EOF
2404 }
2405  
2406 else
2407   echo "configure: failed program was:" >&5
2408   cat conftest.$ac_ext >&5
2409   rm -rf conftest*
2410   cat > conftest.$ac_ext <<EOF
2411 #line 2412 "configure"
2412 #include "confdefs.h"
2413
2414 int main() {
2415
2416 #define GLUE_INCLUDE_2(path,file)  <##path##/##file##>
2417 #define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file)
2418 #define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file)
2419 #define CONFFOO_H_PATH $srcdir
2420 #define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
2421 #include CONFFOO_INCLUDE(conffoo.h)
2422
2423 ; return 0; }
2424 EOF
2425 if { (eval echo configure:2426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2426   rm -rf conftest*
2427    echo "$ac_t""double" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2428     Defining SMART_INCLUDE_INDIRECTIONS = 2
2429 EOF
2430 cat >> confdefs.h <<\EOF
2431 #define SMART_INCLUDE_INDIRECTIONS 2
2432 EOF
2433 }
2434  
2435 else
2436   echo "configure: failed program was:" >&5
2437   cat conftest.$ac_ext >&5
2438   rm -rf conftest*
2439   { echo "configure: error: Cannot define a proper SMART_INCLUDE macro. Please report." 1>&2; exit 1; }
2440 fi
2441 rm -f conftest*
2442 fi
2443 rm -f conftest*
2444 fi
2445 rm -f conftest*
2446 rm -f $srcdir/conffoo.h
2447
2448
2449
2450 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2451 echo "configure:2452: checking for GNU libc" >&5
2452 cat > conftest.$ac_ext <<EOF
2453 #line 2454 "configure"
2454 #include "confdefs.h"
2455 #include <features.h>
2456 int main() {
2457
2458 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2459 #error Not a GNU libc system :-(
2460 ******* ======= ******** &&&&&&&&
2461 #endif
2462
2463 ; return 0; }
2464 EOF
2465 if { (eval echo configure:2466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2466   rm -rf conftest*
2467   have_glibc=yes
2468 else
2469   echo "configure: failed program was:" >&5
2470   cat conftest.$ac_ext >&5
2471   rm -rf conftest*
2472   have_glibc=no
2473 fi
2474 rm -f conftest*
2475 echo "$ac_t""$have_glibc" 1>&6
2476 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2477     Defining _GNU_SOURCE
2478 EOF
2479 cat >> confdefs.h <<\EOF
2480 #define _GNU_SOURCE 1
2481 EOF
2482 }
2483
2484
2485 case "$opsys" in
2486   sol2)
2487    { test "$extra_verbose" = "yes" && cat << \EOF
2488     Defining __EXTENSIONS__
2489 EOF
2490 cat >> confdefs.h <<\EOF
2491 #define __EXTENSIONS__ 1
2492 EOF
2493 }
2494
2495       if test "$os_release" -ge 55; then
2496      { test "$extra_verbose" = "yes" && cat << \EOF
2497     Defining _XOPEN_SOURCE = 500
2498 EOF
2499 cat >> confdefs.h <<\EOF
2500 #define _XOPEN_SOURCE 500
2501 EOF
2502 }
2503
2504      { test "$extra_verbose" = "yes" && cat << \EOF
2505     Defining _XOPEN_SOURCE_EXTENDED
2506 EOF
2507 cat >> confdefs.h <<\EOF
2508 #define _XOPEN_SOURCE_EXTENDED 1
2509 EOF
2510 }
2511
2512    fi ;;
2513   linux)
2514     { test "$extra_verbose" = "yes" && cat << \EOF
2515     Defining _POSIX_C_SOURCE = 199506L
2516 EOF
2517 cat >> confdefs.h <<\EOF
2518 #define _POSIX_C_SOURCE 199506L
2519 EOF
2520 }
2521
2522     { test "$extra_verbose" = "yes" && cat << \EOF
2523     Defining _XOPEN_SOURCE = 500
2524 EOF
2525 cat >> confdefs.h <<\EOF
2526 #define _XOPEN_SOURCE 500
2527 EOF
2528 }
2529
2530     { test "$extra_verbose" = "yes" && cat << \EOF
2531     Defining _XOPEN_SOURCE_EXTENDED
2532 EOF
2533 cat >> confdefs.h <<\EOF
2534 #define _XOPEN_SOURCE_EXTENDED 1
2535 EOF
2536 }
2537
2538     ;;
2539 esac
2540
2541 cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 int main () {
2545 #if defined __SUNPRO_C
2546 return 11;
2547 #elif defined __DECC
2548 return 12;
2549 #else
2550 return 0;
2551 #endif
2552 }
2553 EOF
2554 if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2555 then
2556   :
2557 else
2558   conftest_rc="$?"
2559   echo "configure: failed program was:" >&5
2560   cat conftest.$ac_ext >&5
2561   rm -fr conftest*
2562   case "$conftest_rc" in
2563   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2564   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2565 esac
2566 fi
2567 rm -fr conftest*
2568
2569
2570
2571
2572 echo "Extracting information from the machine- and system-dependent headers..."
2573
2574 tempcname="conftest.c"
2575
2576
2577
2578 cat > $tempcname <<EOF
2579 #define NOT_C_CODE
2580 #define C_SWITCH_SITE
2581 #define C_SWITCH_X_SITE
2582 #define LD_SWITCH_SITE
2583 #define LD_SWITCH_X_SITE
2584 #define LD_SWITCH_X_SITE_AUX
2585 #define OS_RELEASE $os_release
2586 #include "$srcdir/src/$opsysfile"
2587 #include "$srcdir/src/$machfile"
2588
2589 #ifndef LIBS_MACHINE
2590 #define LIBS_MACHINE
2591 #endif
2592 configure___ libs_machine=LIBS_MACHINE
2593
2594 #ifndef LIBS_SYSTEM
2595 #define LIBS_SYSTEM
2596 #endif
2597 configure___ libs_system=LIBS_SYSTEM
2598
2599 #ifndef LIBS_TERMCAP
2600 #define LIBS_TERMCAP
2601 #endif
2602 configure___ libs_termcap=LIBS_TERMCAP
2603
2604 #ifndef LIB_STANDARD
2605 #define LIB_STANDARD
2606 #endif
2607 configure___ libs_standard=LIB_STANDARD
2608
2609
2610 #ifndef OBJECTS_MACHINE
2611 #define OBJECTS_MACHINE
2612 #endif
2613 configure___ objects_machine=OBJECTS_MACHINE
2614
2615 #ifndef OBJECTS_SYSTEM
2616 #define OBJECTS_SYSTEM
2617 #endif
2618 configure___ objects_system=OBJECTS_SYSTEM
2619
2620
2621 #ifndef C_SWITCH_MACHINE
2622 #define C_SWITCH_MACHINE
2623 #endif
2624 configure___ c_switch_machine=C_SWITCH_MACHINE
2625
2626 #ifndef C_SWITCH_SYSTEM
2627 #define C_SWITCH_SYSTEM
2628 #endif
2629 configure___ c_switch_system=C_SWITCH_SYSTEM
2630
2631
2632 #ifndef LD_SWITCH_MACHINE
2633 #define LD_SWITCH_MACHINE
2634 #endif
2635 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2636
2637 #ifndef LD_SWITCH_SYSTEM
2638 #define LD_SWITCH_SYSTEM
2639 #endif
2640 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2641
2642
2643 #ifndef UNEXEC
2644 #define UNEXEC "unexec.o"
2645 #endif
2646 configure___ unexec=UNEXEC
2647
2648
2649 #ifndef LD_SWITCH_SHARED
2650 #define LD_SWITCH_SHARED "-c"
2651 #endif
2652 configure___ ld_switch_shared=LD_SWITCH_SHARED
2653
2654
2655 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2656 configure___ ordinary_ld=ORDINARY_LD
2657
2658 #ifdef ORDINARY_LINK
2659 #define LD ORDINARY_LD
2660 #else /* no ORDINARY LINK */
2661 #ifdef COFF_ENCAPSULATE
2662 #define LD "\$(CC) -nostdlib"
2663 #else /* not COFF_ENCAPSULATE */
2664 #ifdef LINKER
2665 #define LD LINKER
2666 #else /* ! defined (LINKER) */
2667 #define LD "ld"
2668 #endif /* ! defined (LINKER) */
2669 #endif /* ! defined (COFF_ENCAPSULATE) */
2670 #endif /* not ORDINARY_LINK */
2671 configure___ ld=LD
2672
2673 #ifndef LIB_GCC
2674 #define LIB_GCC
2675 #endif
2676 configure___ lib_gcc=LIB_GCC
2677
2678 #ifndef LD_TEXT_START_ADDR
2679 #define LD_TEXT_START_ADDR
2680 #endif
2681 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2682
2683
2684 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2685 #ifdef NO_REMAP
2686 #ifdef COFF_ENCAPSULATE
2687 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2688 #else /* ! defined (COFF_ENCAPSULATE) */
2689 #define START_FILES "pre-crt0.o /lib/crt0.o"
2690 #endif /* ! defined (COFF_ENCAPSULATE) */
2691 #else /* ! defined (NO_REMAP) */
2692 #define START_FILES "ecrt0.o"
2693 #endif /* ! defined (NO_REMAP) */
2694 #endif /* no ORDINARY_LINK */
2695 #ifndef START_FILES
2696 #define START_FILES
2697 #endif
2698 configure___ start_files=START_FILES
2699
2700 #ifdef ORDINARY_LINK
2701 configure___ ordinary_link=yes
2702 #else
2703 configure___ ordinary_link=no
2704 #endif
2705
2706 #ifdef SYSTEM_MALLOC
2707 configure___ system_malloc=yes
2708 #else
2709 configure___ system_malloc=no
2710 #endif
2711
2712 #ifdef TERMINFO
2713 configure___ have_terminfo=yes
2714 #else
2715 configure___ have_terminfo=no
2716 #endif
2717
2718 #ifdef MAIL_USE_FLOCK
2719 configure___ mail_use_flock=yes
2720 #else
2721 configure___ mail_use_flock=no
2722 #endif
2723
2724 #ifdef MAIL_USE_LOCKF
2725 configure___ mail_use_lockf=yes
2726 #else
2727 configure___ mail_use_lockf=no
2728 #endif
2729
2730 #ifdef MAIL_USE_LOCKING
2731 configure___ mail_use_locking=yes
2732 #else
2733 configure___ mail_use_locking=no
2734 #endif
2735
2736 #ifdef HAVE_WIN32_PROCESSES
2737 configure___ win32_processes=yes
2738 #else
2739 configure___ win32_processes=no
2740 #endif
2741
2742 EOF
2743
2744 CPP=`eval "echo $CPP $CPPFLAGS"`
2745 eval `$CPP -Isrc $tempcname \
2746         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2747
2748 rm $tempcname
2749
2750 if test "$pdump" = "yes"; then
2751   ordinary_link="yes"
2752   ld="${ordinary_ld}"
2753   start_files=
2754   libs_standard=
2755   unexec=
2756   lib_gcc=      
2757 fi
2758
2759 test "$extra_verbose" = "yes" && \
2760   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 ""
2761
2762 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2763         mingw_include=`eval "dirname $mingw_include"` ;
2764         mingw_include="-I$mingw_include/../include/mingw32" ;
2765         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2766 esac
2767
2768 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2769
2770 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2771
2772 if test "$cflags_specified" = "no"; then
2773       if   test "$GCC" = "yes"; then
2774     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2775               elif test "$__SUNPRO_C" = "yes"; then
2776     case "$opsys" in
2777       sol2    ) CFLAGS="-v -xO4" ;;
2778       sunos4* ) CFLAGS="-xO2";;
2779     esac
2780   elif test "$__DECC" = "yes"; then
2781     CFLAGS="-O3"
2782   elif test "$CC" = "xlc"; then
2783     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2784     else
2785     CFLAGS="-O" ;  fi
2786 fi
2787
2788 if test "$GCC" = "yes"; then
2789 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2790 echo "configure:2791: checking for buggy gcc versions" >&5
2791 GCC_VERSION=`$CC --version`
2792 case `uname -s`:`uname -m`:$GCC_VERSION in
2793                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2794                         case "$CFLAGS" in
2795             *-O2*|*-O3*)
2796                 case "$CFLAGS" in
2797                     *-fno-schedule-insns*) ;;
2798                     *)
2799                         echo "$ac_t""Yes" 1>&6
2800                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2801                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2802                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2803                         ;;
2804                 esac
2805                 ;;
2806         esac
2807         ;;
2808                     Linux:alpha:egcs-2.91.*)
2809         echo "$ac_t""Yes" 1>&6
2810         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2811         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2812         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2813         ;;
2814     *:i*86*:2.7.2*)
2815         case "$GCC_VERSION" in
2816             2.7.2)
2817                 case "$CFLAGS" in
2818                     *-O2*|*-O3*)
2819                         case "$CFLAGS" in
2820                             *-fno-strength-reduce*) ;;
2821                             *)
2822                                 echo "$ac_t""Yes" 1>&6
2823                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2824                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2825                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2826                                 ;;
2827                         esac
2828                         ;;
2829                 esac
2830                 ;;
2831         esac
2832         case "$CFLAGS" in
2833          *-fno-caller-saves*) ;;
2834          *)
2835             echo "$ac_t""Yes" 1>&6
2836             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2837             echo "configure: warning: -fno-caller-saves." 1>&2
2838             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2839             ;;
2840         esac
2841         ;;
2842 esac
2843 fi
2844 echo "$ac_t""No" 1>&6
2845
2846
2847 if test "$GCC" = "yes"; then
2848   set x $ld_switch_system; shift; ld_switch_system=""
2849   while test -n "$1"; do
2850     case $1 in
2851       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2852       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2853       -Xlinker* ) ;;
2854       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2855     esac
2856     shift
2857   done
2858 fi
2859
2860 if test "$GCC" = "yes"; then
2861   set x $ld_switch_machine; shift; ld_switch_machine=""
2862   while test -n "$1"; do
2863     case $1 in
2864       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2865       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2866       -Xlinker* ) ;;
2867       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2868     esac
2869     shift
2870   done
2871 fi
2872
2873 if test "$GCC" = "yes"; then
2874   set x $LDFLAGS; shift; LDFLAGS=""
2875   while test -n "$1"; do
2876     case $1 in
2877       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2878       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2879       -Xlinker* ) ;;
2880       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2881     esac
2882     shift
2883   done
2884 fi
2885
2886 if test "$GCC" = "yes"; then
2887   set x $ld_call_shared; shift; ld_call_shared=""
2888   while test -n "$1"; do
2889     case $1 in
2890       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2891       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2892       -Xlinker* ) ;;
2893       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2894     esac
2895     shift
2896   done
2897 fi
2898
2899 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2900    echo "    xemacs will be linked with \"$objects_machine\""
2901  fi
2902 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2903    echo "    xemacs will be linked with \"$objects_system\""
2904  fi
2905 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2906    echo "    xemacs will be linked with \"$unexec\""
2907  fi
2908 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2909    echo "    xemacs will be linked with \"dumper.o\""
2910  fi
2911
2912 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2913 echo "configure:2914: checking for dynodump" >&5
2914 if test "$unexec" != "unexsol2.o"; then
2915   echo "$ac_t""no" 1>&6
2916 else
2917   echo "$ac_t""yes" 1>&6
2918   { test "$extra_verbose" = "yes" && cat << \EOF
2919     Defining DYNODUMP
2920 EOF
2921 cat >> confdefs.h <<\EOF
2922 #define DYNODUMP 1
2923 EOF
2924 }
2925
2926   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2927   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2928   case "$machine" in
2929     sparc   ) dynodump_arch=sparc ;;
2930     *86*    ) dynodump_arch=i386  ;;
2931     powerpc ) dynodump_arch=ppc   ;;
2932   esac
2933     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
2934 fi
2935
2936
2937 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2938
2939 if test "$unexec" = "unexaix.o"; then
2940   if   test "$dynamic" = "no"; then
2941   start_flags="-Wl,-bnso,-bnodelcsect"
2942   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2943   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2944     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2945   done
2946   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2947     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2948   done
2949   
2950 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2951 echo "configure:2952: checking for terminateAndUnload in -lC" >&5
2952 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2953
2954 xe_check_libs=" -lC "
2955 cat > conftest.$ac_ext <<EOF
2956 #line 2957 "configure"
2957 #include "confdefs.h"
2958 /* Override any gcc2 internal prototype to avoid an error.  */
2959 /* We use char because int might match the return type of a gcc2
2960     builtin and then its argument prototype would still apply.  */
2961 char terminateAndUnload();
2962
2963 int main() {
2964 terminateAndUnload()
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2968   rm -rf conftest*
2969   eval "ac_cv_lib_$ac_lib_var=yes"
2970 else
2971   echo "configure: failed program was:" >&5
2972   cat conftest.$ac_ext >&5
2973   rm -rf conftest*
2974   eval "ac_cv_lib_$ac_lib_var=no"
2975 fi
2976 rm -f conftest*
2977 xe_check_libs=""
2978
2979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2980   echo "$ac_t""yes" 1>&6
2981   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2982 else
2983   echo "$ac_t""no" 1>&6
2984 fi
2985
2986
2987   fi
2988 elif test -n "$ld_text_start_addr"; then
2989   start_flags="-T $ld_text_start_addr -e __start"
2990 fi
2991
2992
2993
2994
2995 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2996  test -z "$linker" &&  linker='$(CC) -nostdlib'
2997  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2998 fi
2999 test "$GCC" != "yes" && lib_gcc=
3000
3001
3002
3003
3004
3005 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3006 if test -n "$site_libraries"; then
3007   for arg in $site_libraries; do
3008     case "$arg" in
3009      -* ) ;;
3010      * ) test -d "$arg" || \
3011            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3012        arg="-L${arg}" ;;
3013     esac
3014     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3015   done
3016 fi
3017
3018 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3019 if test -n "$site_includes"; then
3020   for arg in $site_includes; do
3021     case "$arg" in
3022       -* ) ;;
3023       * ) test -d "$arg" || \
3024            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3025       arg="-I${arg}" ;;
3026     esac
3027     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3028   done
3029 fi
3030
3031 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3032 if test -n "$site_prefixes"; then
3033   for dir in $site_prefixes; do
3034     lib_dir="${dir}/lib"
3035     inc_dir="${dir}/include"
3036     if test ! -d "$dir"; then
3037       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3038     elif test ! -d "$lib_dir"; then
3039       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3040     else
3041       if test -d "$inc_dir"; then
3042         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
3043       fi
3044       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
3045     fi
3046   done
3047 fi
3048
3049
3050 for dir in "/usr/ccs/lib"; do
3051   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
3052 done
3053
3054 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3055 if test -n "$site_runtime_libraries"; then
3056   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3057   export LD_RUN_PATH
3058 fi
3059
3060
3061
3062
3063
3064 if test -n "$add_runtime_path"; then :;
3065 elif test "$dynamic" = "no"; then add_runtime_path=no
3066 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3067 else case "$opsys" in
3068        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3069        * ) add_runtime_path=no ;;
3070      esac
3071 fi
3072
3073 if test "$add_runtime_path" = "yes"; then
3074       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3075 echo "configure:3076: checking "for runtime libraries flag"" >&5
3076   case "$opsys" in
3077     sol2 ) dash_r="-R" ;;
3078     decosf* | linux* | irix*) dash_r="-rpath " ;;
3079     *)
3080       dash_r=""
3081       for try_dash_r in "-R" "-R " "-rpath "; do
3082         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3083         
3084 if test "$GCC" = "yes"; then
3085   set x $xe_check_libs; shift; xe_check_libs=""
3086   while test -n "$1"; do
3087     case $1 in
3088       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3089       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3090       -Xlinker* ) ;;
3091       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3092     esac
3093     shift
3094   done
3095 fi
3096         cat > conftest.$ac_ext <<EOF
3097 #line 3098 "configure"
3098 #include "confdefs.h"
3099
3100 int main() {
3101
3102 ; return 0; }
3103 EOF
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3105   rm -rf conftest*
3106   dash_r="$try_dash_r"
3107 else
3108   echo "configure: failed program was:" >&5
3109   cat conftest.$ac_ext >&5
3110 fi
3111 rm -f conftest*
3112         xe_check_libs=""
3113         test -n "$dash_r" && break
3114       done ;;
3115   esac
3116   if test -n "$dash_r";
3117     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3118     else echo "$ac_t""NONE" 1>&6
3119   fi
3120 fi
3121
3122 xe_add_unique_runpath_dir='
3123   xe_add_p=yes
3124   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3125   done
3126   if test "$xe_add_p" = "yes"; then
3127     test -n "$runpath" && runpath="${runpath}:"
3128     runpath="${runpath}${xe_runpath_dir}"
3129     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3130   fi'
3131
3132
3133
3134
3135 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3136     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3137   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3138   
3139         runpath="" runpath_dirs=""
3140   if test -n "$LD_RUN_PATH"; then
3141     runpath="$LD_RUN_PATH"
3142   elif test "$GCC" = "yes"; then
3143         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3144     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3145     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3146     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3147       case "$arg" in P,* | -L* | -R* )
3148         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3149           {
3150 xe_runpath_dir="$dir"
3151   test "$xe_runpath_dir" != "/lib"     -a \
3152         "$xe_runpath_dir" != "/usr/lib" -a \
3153         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3154   eval "$xe_add_unique_runpath_dir"
3155 }
3156         done ;;
3157       esac
3158     done
3159     ld_switch_run="$ld_switch_run_save"
3160     rm -f conftest*
3161   else
3162         for arg in $ld_switch_site $ld_switch_x_site; do
3163       case "$arg" in -L*) {
3164 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3165   test "$xe_runpath_dir" != "/lib"     -a \
3166         "$xe_runpath_dir" != "/usr/lib" -a \
3167         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3168   eval "$xe_add_unique_runpath_dir"
3169 };; esac
3170     done
3171         if test "$opsys $need_motif" = "sol2 yes"; then
3172       xe_runpath_dir="/opt/SUNWdt/lib";
3173       eval "$xe_add_unique_runpath_dir";
3174     fi
3175   fi 
3176   if test -n "$runpath"; then
3177     ld_switch_run="${dash_r}${runpath}"
3178     
3179 if test "$GCC" = "yes"; then
3180   set x $ld_switch_run; shift; ld_switch_run=""
3181   while test -n "$1"; do
3182     case $1 in
3183       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3184       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3185       -Xlinker* ) ;;
3186       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3187     esac
3188     shift
3189   done
3190 fi
3191     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3192   fi
3193 fi
3194
3195
3196
3197
3198 GNU_MALLOC=yes
3199 if test "$with_dlmalloc" != "no"; then
3200         doug_lea_malloc=yes
3201 else
3202         doug_lea_malloc=no
3203 fi
3204 after_morecore_hook_exists=yes
3205 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3206 echo "configure:3207: checking for malloc_get_state" >&5
3207
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 /* System header to define __stub macros and hopefully few prototypes,
3212     which can conflict with char malloc_get_state(); below.  */
3213 #include <assert.h>
3214 /* Override any gcc2 internal prototype to avoid an error.  */
3215 /* We use char because int might match the return type of a gcc2
3216     builtin and then its argument prototype would still apply.  */
3217 char malloc_get_state();
3218
3219 int main() {
3220
3221 /* The GNU C library defines this for functions which it implements
3222     to always fail with ENOSYS.  Some functions are actually named
3223     something starting with __ and the normal name is an alias.  */
3224 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3225 choke me
3226 #else
3227 malloc_get_state();
3228 #endif
3229
3230 ; return 0; }
3231 EOF
3232 if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3233   rm -rf conftest*
3234   eval "ac_cv_func_malloc_get_state=yes"
3235 else
3236   echo "configure: failed program was:" >&5
3237   cat conftest.$ac_ext >&5
3238   rm -rf conftest*
3239   eval "ac_cv_func_malloc_get_state=no"
3240 fi
3241 rm -f conftest*
3242
3243 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3244   echo "$ac_t""yes" 1>&6
3245   :
3246 else
3247   echo "$ac_t""no" 1>&6
3248 doug_lea_malloc=no
3249 fi
3250
3251 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3252 echo "configure:3253: checking for malloc_set_state" >&5
3253
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 /* System header to define __stub macros and hopefully few prototypes,
3258     which can conflict with char malloc_set_state(); below.  */
3259 #include <assert.h>
3260 /* Override any gcc2 internal prototype to avoid an error.  */
3261 /* We use char because int might match the return type of a gcc2
3262     builtin and then its argument prototype would still apply.  */
3263 char malloc_set_state();
3264
3265 int main() {
3266
3267 /* The GNU C library defines this for functions which it implements
3268     to always fail with ENOSYS.  Some functions are actually named
3269     something starting with __ and the normal name is an alias.  */
3270 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3271 choke me
3272 #else
3273 malloc_set_state();
3274 #endif
3275
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279   rm -rf conftest*
3280   eval "ac_cv_func_malloc_set_state=yes"
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   eval "ac_cv_func_malloc_set_state=no"
3286 fi
3287 rm -f conftest*
3288
3289 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3290   echo "$ac_t""yes" 1>&6
3291   :
3292 else
3293   echo "$ac_t""no" 1>&6
3294 doug_lea_malloc=no
3295 fi
3296
3297 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3298 echo "configure:3299: checking whether __after_morecore_hook exists" >&5
3299 cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302 extern void (* __after_morecore_hook)();
3303 int main() {
3304 __after_morecore_hook = 0
3305 ; return 0; }
3306 EOF
3307 if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3308   rm -rf conftest*
3309   echo "$ac_t""yes" 1>&6
3310 else
3311   echo "configure: failed program was:" >&5
3312   cat conftest.$ac_ext >&5
3313   rm -rf conftest*
3314   echo "$ac_t""no" 1>&6
3315    after_morecore_hook_exists=no
3316 fi
3317 rm -f conftest*
3318 if test "$system_malloc" = "yes" ; then
3319   GNU_MALLOC=no
3320   GNU_MALLOC_reason="
3321     - The GNU allocators don't work with this system configuration."
3322 elif test "$with_system_malloc" = "yes" ; then
3323   GNU_MALLOC=no
3324   GNU_MALLOC_reason="
3325     - User chose not to use GNU allocators."
3326 elif test "$with_debug_malloc" = "yes" ; then
3327   GNU_MALLOC=no
3328   GNU_MALLOC_reason="
3329     - User chose to use Debugging Malloc."
3330 fi
3331
3332 if test "$doug_lea_malloc" = "yes" ; then
3333   if test "$GNU_MALLOC" = yes ; then
3334     GNU_MALLOC_reason="
3335     - Using Doug Lea's new malloc from the GNU C Library."
3336   fi
3337   { test "$extra_verbose" = "yes" && cat << \EOF
3338     Defining DOUG_LEA_MALLOC
3339 EOF
3340 cat >> confdefs.h <<\EOF
3341 #define DOUG_LEA_MALLOC 1
3342 EOF
3343 }
3344
3345   if test "$after_morecore_hook_exists" = "no" ; then
3346     GNU_MALLOC_reason="
3347     - Using Doug Lea's new malloc from the Linux C Library."
3348     { test "$extra_verbose" = "yes" && cat << \EOF
3349     Defining _NO_MALLOC_WARNING_
3350 EOF
3351 cat >> confdefs.h <<\EOF
3352 #define _NO_MALLOC_WARNING_ 1
3353 EOF
3354 }
3355
3356   fi
3357   use_minimal_tagbits=yes
3358 fi
3359
3360
3361
3362
3363 # Extract the first word of "ranlib", so it can be a program name with args.
3364 set dummy ranlib; ac_word=$2
3365 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3366 echo "configure:3367: checking for $ac_word" >&5
3367
3368 if test -n "$RANLIB"; then
3369   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3370 else
3371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3372   ac_dummy="$PATH"
3373   for ac_dir in $ac_dummy; do
3374     test -z "$ac_dir" && ac_dir=.
3375     if test -f $ac_dir/$ac_word; then
3376       ac_cv_prog_RANLIB="ranlib"
3377       break
3378     fi
3379   done
3380   IFS="$ac_save_ifs"
3381   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3382 fi
3383 RANLIB="$ac_cv_prog_RANLIB"
3384 if test -n "$RANLIB"; then
3385   echo "$ac_t""$RANLIB" 1>&6
3386 else
3387   echo "$ac_t""no" 1>&6
3388 fi
3389
3390 ac_aux_dir=
3391 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3392   if test -f $ac_dir/install-sh; then
3393     ac_aux_dir=$ac_dir
3394     ac_install_sh="$ac_aux_dir/install-sh -c"
3395     break
3396   elif test -f $ac_dir/install.sh; then
3397     ac_aux_dir=$ac_dir
3398     ac_install_sh="$ac_aux_dir/install.sh -c"
3399     break
3400   fi
3401 done
3402 if test -z "$ac_aux_dir"; then
3403   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3404 fi
3405 ac_config_guess=$ac_aux_dir/config.guess
3406 ac_config_sub=$ac_aux_dir/config.sub
3407 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3408
3409 # Find a good install program.  We prefer a C program (faster),
3410 # so one script is as good as another.  But avoid the broken or
3411 # incompatible versions:
3412 # SysV /etc/install, /usr/sbin/install
3413 # SunOS /usr/etc/install
3414 # IRIX /sbin/install
3415 # AIX /bin/install
3416 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3417 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3418 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3419 # ./install, which can be erroneously created by make from ./install.sh.
3420 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3421 echo "configure:3422: checking for a BSD compatible install" >&5
3422 if test -z "$INSTALL"; then
3423
3424   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3425   for ac_dir in $PATH; do
3426     # Account for people who put trailing slashes in PATH elements.
3427     case "$ac_dir/" in
3428     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3429     *)
3430       # OSF1 and SCO ODT 3.0 have their own names for install.
3431       # Don't use installbsd from OSF since it installs stuff as root
3432       # by default.
3433       for ac_prog in ginstall scoinst install; do
3434         if test -f $ac_dir/$ac_prog; then
3435           if test $ac_prog = install &&
3436             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3437             # AIX install.  It has an incompatible calling convention.
3438             :
3439           else
3440             ac_cv_path_install="$ac_dir/$ac_prog -c"
3441             break 2
3442           fi
3443         fi
3444       done
3445       ;;
3446     esac
3447   done
3448   IFS="$ac_save_IFS"
3449
3450   if test "${ac_cv_path_install+set}" = set; then
3451     INSTALL="$ac_cv_path_install"
3452   else
3453     # As a last resort, use the slow shell script.  We don't cache a
3454     # path for INSTALL within a source directory, because that will
3455     # break other packages using the cache if that directory is
3456     # removed, or if the path is relative.
3457     INSTALL="$ac_install_sh"
3458   fi
3459 fi
3460 echo "$ac_t""$INSTALL" 1>&6
3461
3462 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3463 # It thinks the first close brace ends the variable substitution.
3464 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3465
3466 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3467
3468 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3469
3470 for ac_prog in 'bison -y' byacc
3471 do
3472 # Extract the first word of "$ac_prog", so it can be a program name with args.
3473 set dummy $ac_prog; ac_word=$2
3474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3475 echo "configure:3476: checking for $ac_word" >&5
3476
3477 if test -n "$YACC"; then
3478   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3479 else
3480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3481   ac_dummy="$PATH"
3482   for ac_dir in $ac_dummy; do
3483     test -z "$ac_dir" && ac_dir=.
3484     if test -f $ac_dir/$ac_word; then
3485       ac_cv_prog_YACC="$ac_prog"
3486       break
3487     fi
3488   done
3489   IFS="$ac_save_ifs"
3490 fi
3491 YACC="$ac_cv_prog_YACC"
3492 if test -n "$YACC"; then
3493   echo "$ac_t""$YACC" 1>&6
3494 else
3495   echo "$ac_t""no" 1>&6
3496 fi
3497
3498 test -n "$YACC" && break
3499 done
3500 test -n "$YACC" || YACC="yacc"
3501
3502
3503 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/stropts.h   sys/time.h   sys/timeb.h   sys/un.h   kstat.h   ulimit.h   unistd.h   utime.h 
3504 do
3505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3507 echo "configure:3508: checking for $ac_hdr" >&5
3508
3509 cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512 #include <$ac_hdr>
3513 EOF
3514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3515 { (eval echo configure:3516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3517 if test -z "$ac_err"; then
3518   rm -rf conftest*
3519   eval "ac_cv_header_$ac_safe=yes"
3520 else
3521   echo "$ac_err" >&5
3522   echo "configure: failed program was:" >&5
3523   cat conftest.$ac_ext >&5
3524   rm -rf conftest*
3525   eval "ac_cv_header_$ac_safe=no"
3526 fi
3527 rm -f conftest*
3528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3529   echo "$ac_t""yes" 1>&6
3530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3531   { test "$extra_verbose" = "yes" && cat << EOF
3532     Defining $ac_tr_hdr
3533 EOF
3534 cat >> confdefs.h <<EOF
3535 #define $ac_tr_hdr 1
3536 EOF
3537 }
3538  
3539 else
3540   echo "$ac_t""no" 1>&6
3541 fi
3542 done
3543
3544 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3545 echo "configure:3546: checking for sys/wait.h that is POSIX.1 compatible" >&5
3546
3547 cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3551 #include <sys/wait.h>
3552 #ifndef WEXITSTATUS
3553 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3554 #endif
3555 #ifndef WIFEXITED
3556 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3557 #endif
3558 int main() {
3559 int s;
3560 wait (&s);
3561 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565   rm -rf conftest*
3566   ac_cv_header_sys_wait_h=yes
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   ac_cv_header_sys_wait_h=no
3572 fi
3573 rm -f conftest*
3574
3575 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3576 if test $ac_cv_header_sys_wait_h = yes; then
3577   { test "$extra_verbose" = "yes" && cat << \EOF
3578     Defining HAVE_SYS_WAIT_H
3579 EOF
3580 cat >> confdefs.h <<\EOF
3581 #define HAVE_SYS_WAIT_H 1
3582 EOF
3583 }
3584
3585 fi
3586
3587 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3588 echo "configure:3589: checking for ANSI C header files" >&5
3589
3590 cat > conftest.$ac_ext <<EOF
3591 #line 3592 "configure"
3592 #include "confdefs.h"
3593 #include <stdlib.h>
3594 #include <stdarg.h>
3595 #include <string.h>
3596 #include <float.h>
3597 EOF
3598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3599 { (eval echo configure:3600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3601 if test -z "$ac_err"; then
3602   rm -rf conftest*
3603   ac_cv_header_stdc=yes
3604 else
3605   echo "$ac_err" >&5
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -rf conftest*
3609   ac_cv_header_stdc=no
3610 fi
3611 rm -f conftest*
3612
3613 if test $ac_cv_header_stdc = yes; then
3614   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3615 cat > conftest.$ac_ext <<EOF
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618 #include <string.h>
3619 EOF
3620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3621   egrep "memchr" >/dev/null 2>&1; then
3622   :
3623 else
3624   rm -rf conftest*
3625   ac_cv_header_stdc=no
3626 fi
3627 rm -f conftest*
3628
3629 fi
3630
3631 if test $ac_cv_header_stdc = yes; then
3632   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3633 cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 #include <stdlib.h>
3637 EOF
3638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3639   egrep "free" >/dev/null 2>&1; then
3640   :
3641 else
3642   rm -rf conftest*
3643   ac_cv_header_stdc=no
3644 fi
3645 rm -f conftest*
3646
3647 fi
3648
3649 if test $ac_cv_header_stdc = yes; then
3650   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3651 cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <ctype.h>
3655 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3656 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3657 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3658 int main () { int i; for (i = 0; i < 256; i++)
3659 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3660 exit (0); }
3661
3662 EOF
3663 if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3664 then
3665   :
3666 else
3667   conftest_rc="$?"
3668   echo "configure: failed program was:" >&5
3669   cat conftest.$ac_ext >&5
3670   rm -fr conftest*
3671   ac_cv_header_stdc=no
3672 fi
3673 rm -fr conftest*
3674 fi
3675
3676 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3677 if test $ac_cv_header_stdc = yes; then
3678   { test "$extra_verbose" = "yes" && cat << \EOF
3679     Defining STDC_HEADERS
3680 EOF
3681 cat >> confdefs.h <<\EOF
3682 #define STDC_HEADERS 1
3683 EOF
3684 }
3685
3686 fi
3687
3688 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3689 echo "configure:3690: checking whether time.h and sys/time.h may both be included" >&5
3690
3691 cat > conftest.$ac_ext <<EOF
3692 #line 3693 "configure"
3693 #include "confdefs.h"
3694 #include <sys/types.h>
3695 #include <sys/time.h>
3696 #include <time.h>
3697 int main() {
3698 struct tm *tp;
3699 ; return 0; }
3700 EOF
3701 if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3702   rm -rf conftest*
3703   ac_cv_header_time=yes
3704 else
3705   echo "configure: failed program was:" >&5
3706   cat conftest.$ac_ext >&5
3707   rm -rf conftest*
3708   ac_cv_header_time=no
3709 fi
3710 rm -f conftest*
3711
3712 echo "$ac_t""$ac_cv_header_time" 1>&6
3713 if test $ac_cv_header_time = yes; then
3714   { test "$extra_verbose" = "yes" && cat << \EOF
3715     Defining TIME_WITH_SYS_TIME
3716 EOF
3717 cat >> confdefs.h <<\EOF
3718 #define TIME_WITH_SYS_TIME 1
3719 EOF
3720 }
3721
3722 fi
3723
3724 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3725 echo "configure:3726: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3726
3727 cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730 #include <sys/types.h>
3731 #include <signal.h>
3732 /* NetBSD declares sys_siglist in unistd.h.  */
3733 #ifdef HAVE_UNISTD_H
3734 #include <unistd.h>
3735 #endif
3736 int main() {
3737 char *msg = *(sys_siglist + 1);
3738 ; return 0; }
3739 EOF
3740 if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3741   rm -rf conftest*
3742   ac_cv_decl_sys_siglist=yes
3743 else
3744   echo "configure: failed program was:" >&5
3745   cat conftest.$ac_ext >&5
3746   rm -rf conftest*
3747   ac_cv_decl_sys_siglist=no
3748 fi
3749 rm -f conftest*
3750
3751 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3752 if test $ac_cv_decl_sys_siglist = yes; then
3753   { test "$extra_verbose" = "yes" && cat << \EOF
3754     Defining SYS_SIGLIST_DECLARED
3755 EOF
3756 cat >> confdefs.h <<\EOF
3757 #define SYS_SIGLIST_DECLARED 1
3758 EOF
3759 }
3760
3761 fi
3762
3763
3764 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3765 echo "configure:3766: checking for struct utimbuf" >&5
3766 cat > conftest.$ac_ext <<EOF
3767 #line 3768 "configure"
3768 #include "confdefs.h"
3769 #ifdef TIME_WITH_SYS_TIME
3770 #include <sys/time.h>
3771 #include <time.h>
3772 #else
3773 #ifdef HAVE_SYS_TIME_H
3774 #include <sys/time.h>
3775 #else
3776 #include <time.h>
3777 #endif
3778 #endif
3779 #ifdef HAVE_UTIME_H
3780 #include <utime.h>
3781 #endif
3782 int main() {
3783 static struct utimbuf x; x.actime = x.modtime;
3784 ; return 0; }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3787   rm -rf conftest*
3788   echo "$ac_t""yes" 1>&6
3789    { test "$extra_verbose" = "yes" && cat << \EOF
3790     Defining HAVE_STRUCT_UTIMBUF
3791 EOF
3792 cat >> confdefs.h <<\EOF
3793 #define HAVE_STRUCT_UTIMBUF 1
3794 EOF
3795 }
3796
3797 else
3798   echo "configure: failed program was:" >&5
3799   cat conftest.$ac_ext >&5
3800   rm -rf conftest*
3801   echo "$ac_t""no" 1>&6
3802 fi
3803 rm -f conftest*
3804
3805 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3806 echo "configure:3807: checking return type of signal handlers" >&5
3807
3808 cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 #include <sys/types.h>
3812 #include <signal.h>
3813 #ifdef signal
3814 #undef signal
3815 #endif
3816 #ifdef __cplusplus
3817 extern "C" void (*signal (int, void (*)(int)))(int);
3818 #else
3819 void (*signal ()) ();
3820 #endif
3821
3822 int main() {
3823 int i;
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3827   rm -rf conftest*
3828   ac_cv_type_signal=void
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   ac_cv_type_signal=int
3834 fi
3835 rm -f conftest*
3836
3837 echo "$ac_t""$ac_cv_type_signal" 1>&6
3838 { test "$extra_verbose" = "yes" && cat << EOF
3839     Defining RETSIGTYPE = $ac_cv_type_signal
3840 EOF
3841 cat >> confdefs.h <<EOF
3842 #define RETSIGTYPE $ac_cv_type_signal
3843 EOF
3844 }
3845
3846
3847 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3848 echo "configure:3849: checking for size_t" >&5
3849
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 #include <sys/types.h>
3854 #if STDC_HEADERS
3855 #include <stdlib.h>
3856 #include <stddef.h>
3857 #endif
3858 EOF
3859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3860   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3861   rm -rf conftest*
3862   ac_cv_type_size_t=yes
3863 else
3864   rm -rf conftest*
3865   ac_cv_type_size_t=no
3866 fi
3867 rm -f conftest*
3868
3869 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3870 if test $ac_cv_type_size_t = no; then
3871   { test "$extra_verbose" = "yes" && cat << \EOF
3872     Defining size_t = unsigned
3873 EOF
3874 cat >> confdefs.h <<\EOF
3875 #define size_t unsigned
3876 EOF
3877 }
3878
3879 fi
3880
3881 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3882 echo "configure:3883: checking for pid_t" >&5
3883
3884 cat > conftest.$ac_ext <<EOF
3885 #line 3886 "configure"
3886 #include "confdefs.h"
3887 #include <sys/types.h>
3888 #if STDC_HEADERS
3889 #include <stdlib.h>
3890 #include <stddef.h>
3891 #endif
3892 EOF
3893 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3894   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3895   rm -rf conftest*
3896   ac_cv_type_pid_t=yes
3897 else
3898   rm -rf conftest*
3899   ac_cv_type_pid_t=no
3900 fi
3901 rm -f conftest*
3902
3903 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3904 if test $ac_cv_type_pid_t = no; then
3905   { test "$extra_verbose" = "yes" && cat << \EOF
3906     Defining pid_t = int
3907 EOF
3908 cat >> confdefs.h <<\EOF
3909 #define pid_t int
3910 EOF
3911 }
3912
3913 fi
3914
3915 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3916 echo "configure:3917: checking for uid_t in sys/types.h" >&5
3917
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 #include <sys/types.h>
3922 EOF
3923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3924   egrep "uid_t" >/dev/null 2>&1; then
3925   rm -rf conftest*
3926   ac_cv_type_uid_t=yes
3927 else
3928   rm -rf conftest*
3929   ac_cv_type_uid_t=no
3930 fi
3931 rm -f conftest*
3932
3933
3934 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3935 if test $ac_cv_type_uid_t = no; then
3936   { test "$extra_verbose" = "yes" && cat << \EOF
3937     Defining uid_t = int
3938 EOF
3939 cat >> confdefs.h <<\EOF
3940 #define uid_t int
3941 EOF
3942 }
3943
3944   { test "$extra_verbose" = "yes" && cat << \EOF
3945     Defining gid_t = int
3946 EOF
3947 cat >> confdefs.h <<\EOF
3948 #define gid_t int
3949 EOF
3950 }
3951
3952 fi
3953
3954 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3955 echo "configure:3956: checking for mode_t" >&5
3956
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 #include <sys/types.h>
3961 #if STDC_HEADERS
3962 #include <stdlib.h>
3963 #include <stddef.h>
3964 #endif
3965 EOF
3966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3967   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3968   rm -rf conftest*
3969   ac_cv_type_mode_t=yes
3970 else
3971   rm -rf conftest*
3972   ac_cv_type_mode_t=no
3973 fi
3974 rm -f conftest*
3975
3976 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3977 if test $ac_cv_type_mode_t = no; then
3978   { test "$extra_verbose" = "yes" && cat << \EOF
3979     Defining mode_t = int
3980 EOF
3981 cat >> confdefs.h <<\EOF
3982 #define mode_t int
3983 EOF
3984 }
3985
3986 fi
3987
3988 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3989 echo "configure:3990: checking for off_t" >&5
3990
3991 cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 #include <sys/types.h>
3995 #if STDC_HEADERS
3996 #include <stdlib.h>
3997 #include <stddef.h>
3998 #endif
3999 EOF
4000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4001   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4002   rm -rf conftest*
4003   ac_cv_type_off_t=yes
4004 else
4005   rm -rf conftest*
4006   ac_cv_type_off_t=no
4007 fi
4008 rm -f conftest*
4009
4010 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4011 if test $ac_cv_type_off_t = no; then
4012   { test "$extra_verbose" = "yes" && cat << \EOF
4013     Defining off_t = long
4014 EOF
4015 cat >> confdefs.h <<\EOF
4016 #define off_t long
4017 EOF
4018 }
4019
4020 fi
4021
4022 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4023 echo "configure:4024: checking for ssize_t" >&5
4024
4025 cat > conftest.$ac_ext <<EOF
4026 #line 4027 "configure"
4027 #include "confdefs.h"
4028 #include <sys/types.h>
4029 #if STDC_HEADERS
4030 #include <stdlib.h>
4031 #include <stddef.h>
4032 #endif
4033 EOF
4034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4035   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4036   rm -rf conftest*
4037   ac_cv_type_ssize_t=yes
4038 else
4039   rm -rf conftest*
4040   ac_cv_type_ssize_t=no
4041 fi
4042 rm -f conftest*
4043
4044 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4045 if test $ac_cv_type_ssize_t = no; then
4046   { test "$extra_verbose" = "yes" && cat << \EOF
4047     Defining ssize_t = int
4048 EOF
4049 cat >> confdefs.h <<\EOF
4050 #define ssize_t int
4051 EOF
4052 }
4053
4054 fi
4055
4056
4057 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4058 echo "configure:4059: checking for struct timeval" >&5
4059 cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062 #ifdef TIME_WITH_SYS_TIME
4063 #include <sys/time.h>
4064 #include <time.h>
4065 #else
4066 #ifdef HAVE_SYS_TIME_H
4067 #include <sys/time.h>
4068 #else
4069 #include <time.h>
4070 #endif
4071 #endif
4072 int main() {
4073 static struct timeval x; x.tv_sec = x.tv_usec;
4074 ; return 0; }
4075 EOF
4076 if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077   rm -rf conftest*
4078   echo "$ac_t""yes" 1>&6
4079   HAVE_TIMEVAL=yes
4080   { test "$extra_verbose" = "yes" && cat << \EOF
4081     Defining HAVE_TIMEVAL
4082 EOF
4083 cat >> confdefs.h <<\EOF
4084 #define HAVE_TIMEVAL 1
4085 EOF
4086 }
4087
4088 else
4089   echo "configure: failed program was:" >&5
4090   cat conftest.$ac_ext >&5
4091   rm -rf conftest*
4092   echo "$ac_t""no" 1>&6
4093    HAVE_TIMEVAL=no
4094 fi
4095 rm -f conftest*
4096
4097 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4098 echo "configure:4099: checking whether struct tm is in sys/time.h or time.h" >&5
4099
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103 #include <sys/types.h>
4104 #include <time.h>
4105 int main() {
4106 struct tm *tp; tp->tm_sec;
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4110   rm -rf conftest*
4111   ac_cv_struct_tm=time.h
4112 else
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115   rm -rf conftest*
4116   ac_cv_struct_tm=sys/time.h
4117 fi
4118 rm -f conftest*
4119
4120 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4121 if test $ac_cv_struct_tm = sys/time.h; then
4122   { test "$extra_verbose" = "yes" && cat << \EOF
4123     Defining TM_IN_SYS_TIME
4124 EOF
4125 cat >> confdefs.h <<\EOF
4126 #define TM_IN_SYS_TIME 1
4127 EOF
4128 }
4129
4130 fi
4131
4132 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4133 echo "configure:4134: checking for tm_zone in struct tm" >&5
4134
4135 cat > conftest.$ac_ext <<EOF
4136 #line 4137 "configure"
4137 #include "confdefs.h"
4138 #include <sys/types.h>
4139 #include <$ac_cv_struct_tm>
4140 int main() {
4141 struct tm tm; tm.tm_zone;
4142 ; return 0; }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4145   rm -rf conftest*
4146   ac_cv_struct_tm_zone=yes
4147 else
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -rf conftest*
4151   ac_cv_struct_tm_zone=no
4152 fi
4153 rm -f conftest*
4154
4155 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4156 if test "$ac_cv_struct_tm_zone" = yes; then
4157   { test "$extra_verbose" = "yes" && cat << \EOF
4158     Defining HAVE_TM_ZONE
4159 EOF
4160 cat >> confdefs.h <<\EOF
4161 #define HAVE_TM_ZONE 1
4162 EOF
4163 }
4164
4165 else
4166   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4167 echo "configure:4168: checking for tzname" >&5
4168
4169 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 #include <time.h>
4173 #ifndef tzname /* For SGI.  */
4174 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4175 #endif
4176 int main() {
4177 atoi(*tzname);
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4181   rm -rf conftest*
4182   ac_cv_var_tzname=yes
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   ac_cv_var_tzname=no
4188 fi
4189 rm -f conftest*
4190
4191 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4192   if test $ac_cv_var_tzname = yes; then
4193     { test "$extra_verbose" = "yes" && cat << \EOF
4194     Defining HAVE_TZNAME
4195 EOF
4196 cat >> confdefs.h <<\EOF
4197 #define HAVE_TZNAME 1
4198 EOF
4199 }
4200
4201   fi
4202 fi
4203
4204
4205 echo $ac_n "checking for working const""... $ac_c" 1>&6
4206 echo "configure:4207: checking for working const" >&5
4207
4208 cat > conftest.$ac_ext <<EOF
4209 #line 4210 "configure"
4210 #include "confdefs.h"
4211
4212 int main() {
4213
4214 /* Ultrix mips cc rejects this.  */
4215 typedef int charset[2]; const charset x;
4216 /* SunOS 4.1.1 cc rejects this.  */
4217 char const *const *ccp;
4218 char **p;
4219 /* NEC SVR4.0.2 mips cc rejects this.  */
4220 struct point {int x, y;};
4221 static struct point const zero = {0,0};
4222 /* AIX XL C 1.02.0.0 rejects this.
4223    It does not let you subtract one const X* pointer from another in an arm
4224    of an if-expression whose if-part is not a constant expression */
4225 const char *g = "string";
4226 ccp = &g + (g ? g-g : 0);
4227 /* HPUX 7.0 cc rejects these. */
4228 ++ccp;
4229 p = (char**) ccp;
4230 ccp = (char const *const *) p;
4231 { /* SCO 3.2v4 cc rejects this.  */
4232   char *t;
4233   char const *s = 0 ? (char *) 0 : (char const *) 0;
4234
4235   *t++ = 0;
4236 }
4237 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4238   int x[] = {25, 17};
4239   const int *foo = &x[0];
4240   ++foo;
4241 }
4242 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4243   typedef const int *iptr;
4244   iptr p = 0;
4245   ++p;
4246 }
4247 { /* AIX XL C 1.02.0.0 rejects this saying
4248      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4249   struct s { int j; const int *ap[3]; };
4250   struct s *b; b->j = 5;
4251 }
4252 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4253   const int foo = 10;
4254 }
4255
4256 ; return 0; }
4257 EOF
4258 if { (eval echo configure:4259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4259   rm -rf conftest*
4260   ac_cv_c_const=yes
4261 else
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -rf conftest*
4265   ac_cv_c_const=no
4266 fi
4267 rm -f conftest*
4268
4269 echo "$ac_t""$ac_cv_c_const" 1>&6
4270 if test $ac_cv_c_const = no; then
4271   { test "$extra_verbose" = "yes" && cat << \EOF
4272     Defining const = 
4273 EOF
4274 cat >> confdefs.h <<\EOF
4275 #define const 
4276 EOF
4277 }
4278
4279 fi
4280
4281
4282 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4283 echo "configure:4284: checking whether ${MAKE-make} sets \${MAKE}" >&5
4284 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4285
4286 cat > conftestmake <<\EOF
4287 all:
4288         @echo 'ac_maketemp="${MAKE}"'
4289 EOF
4290 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4291 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4292 if test -n "$ac_maketemp"; then
4293   eval ac_cv_prog_make_${ac_make}_set=yes
4294 else
4295   eval ac_cv_prog_make_${ac_make}_set=no
4296 fi
4297 rm -f conftestmake
4298 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4299   echo "$ac_t""yes" 1>&6
4300   SET_MAKE=
4301 else
4302   echo "$ac_t""no" 1>&6
4303   SET_MAKE="MAKE=${MAKE-make}"
4304 fi
4305
4306
4307 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4308 echo "configure:4309: checking whether byte ordering is bigendian" >&5
4309
4310 ac_cv_c_bigendian=unknown
4311 # See if sys/param.h defines the BYTE_ORDER macro.
4312 cat > conftest.$ac_ext <<EOF
4313 #line 4314 "configure"
4314 #include "confdefs.h"
4315 #include <sys/types.h>
4316 #include <sys/param.h>
4317 int main() {
4318
4319 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4320  bogus endian macros
4321 #endif
4322 ; return 0; }
4323 EOF
4324 if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4325   rm -rf conftest*
4326   # It does; now see whether it defined to BIG_ENDIAN or not.
4327 cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330 #include <sys/types.h>
4331 #include <sys/param.h>
4332 int main() {
4333
4334 #if BYTE_ORDER != BIG_ENDIAN
4335  not big endian
4336 #endif
4337 ; return 0; }
4338 EOF
4339 if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4340   rm -rf conftest*
4341   ac_cv_c_bigendian=yes
4342 else
4343   echo "configure: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   rm -rf conftest*
4346   ac_cv_c_bigendian=no
4347 fi
4348 rm -f conftest*
4349 else
4350   echo "configure: failed program was:" >&5
4351   cat conftest.$ac_ext >&5
4352 fi
4353 rm -f conftest*
4354 if test $ac_cv_c_bigendian = unknown; then
4355 cat > conftest.$ac_ext <<EOF
4356 #line 4357 "configure"
4357 #include "confdefs.h"
4358 main () {
4359   /* Are we little or big endian?  From Harbison&Steele.  */
4360   union
4361   {
4362     long l;
4363     char c[sizeof (long)];
4364   } u;
4365   u.l = 1;
4366   exit (u.c[sizeof (long) - 1] == 1);
4367 }
4368 EOF
4369 if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4370 then
4371   ac_cv_c_bigendian=no
4372 else
4373   conftest_rc="$?"
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -fr conftest*
4377   ac_cv_c_bigendian=yes
4378 fi
4379 rm -fr conftest*
4380 fi
4381
4382 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4383 if test $ac_cv_c_bigendian = yes; then
4384   { test "$extra_verbose" = "yes" && cat << \EOF
4385     Defining WORDS_BIGENDIAN
4386 EOF
4387 cat >> confdefs.h <<\EOF
4388 #define WORDS_BIGENDIAN 1
4389 EOF
4390 }
4391
4392 fi
4393
4394
4395 echo $ac_n "checking size of short""... $ac_c" 1>&6
4396 echo "configure:4397: checking size of short" >&5
4397
4398 cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 #include <stdio.h>
4402 main()
4403 {
4404   FILE *f=fopen("conftestval", "w");
4405   if (!f) exit(1);
4406   fprintf(f, "%d\n", sizeof(short));
4407   exit(0);
4408 }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4411 then
4412   ac_cv_sizeof_short=`cat conftestval`
4413 else
4414   conftest_rc="$?"
4415   echo "configure: failed program was:" >&5
4416   cat conftest.$ac_ext >&5
4417   rm -fr conftest*
4418   ac_cv_sizeof_short=0
4419 fi
4420 rm -fr conftest*
4421 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4422 { test "$extra_verbose" = "yes" && cat << EOF
4423     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4424 EOF
4425 cat >> confdefs.h <<EOF
4426 #define SIZEOF_SHORT $ac_cv_sizeof_short
4427 EOF
4428 }
4429
4430
4431 if test "$ac_cv_sizeof_short" = 0; then
4432   echo ""
4433   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4434   echo "*** PANIC *** Please examine config.log for compilation errors."
4435   exit 1
4436 fi
4437 echo $ac_n "checking size of int""... $ac_c" 1>&6
4438 echo "configure:4439: checking size of int" >&5
4439
4440 cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 #include <stdio.h>
4444 main()
4445 {
4446   FILE *f=fopen("conftestval", "w");
4447   if (!f) exit(1);
4448   fprintf(f, "%d\n", sizeof(int));
4449   exit(0);
4450 }
4451 EOF
4452 if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4453 then
4454   ac_cv_sizeof_int=`cat conftestval`
4455 else
4456   conftest_rc="$?"
4457   echo "configure: failed program was:" >&5
4458   cat conftest.$ac_ext >&5
4459   rm -fr conftest*
4460   ac_cv_sizeof_int=0
4461 fi
4462 rm -fr conftest*
4463 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4464 { test "$extra_verbose" = "yes" && cat << EOF
4465     Defining SIZEOF_INT = $ac_cv_sizeof_int
4466 EOF
4467 cat >> confdefs.h <<EOF
4468 #define SIZEOF_INT $ac_cv_sizeof_int
4469 EOF
4470 }
4471
4472
4473 echo $ac_n "checking size of long""... $ac_c" 1>&6
4474 echo "configure:4475: checking size of long" >&5
4475
4476 cat > conftest.$ac_ext <<EOF
4477 #line 4478 "configure"
4478 #include "confdefs.h"
4479 #include <stdio.h>
4480 main()
4481 {
4482   FILE *f=fopen("conftestval", "w");
4483   if (!f) exit(1);
4484   fprintf(f, "%d\n", sizeof(long));
4485   exit(0);
4486 }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4489 then
4490   ac_cv_sizeof_long=`cat conftestval`
4491 else
4492   conftest_rc="$?"
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -fr conftest*
4496   ac_cv_sizeof_long=0
4497 fi
4498 rm -fr conftest*
4499 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4500 { test "$extra_verbose" = "yes" && cat << EOF
4501     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4502 EOF
4503 cat >> confdefs.h <<EOF
4504 #define SIZEOF_LONG $ac_cv_sizeof_long
4505 EOF
4506 }
4507
4508
4509 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4510 echo "configure:4511: checking size of long long" >&5
4511
4512 cat > conftest.$ac_ext <<EOF
4513 #line 4514 "configure"
4514 #include "confdefs.h"
4515 #include <stdio.h>
4516 main()
4517 {
4518   FILE *f=fopen("conftestval", "w");
4519   if (!f) exit(1);
4520   fprintf(f, "%d\n", sizeof(long long));
4521   exit(0);
4522 }
4523 EOF
4524 if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4525 then
4526   ac_cv_sizeof_long_long=`cat conftestval`
4527 else
4528   conftest_rc="$?"
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -fr conftest*
4532   ac_cv_sizeof_long_long=0
4533 fi
4534 rm -fr conftest*
4535 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4536 { test "$extra_verbose" = "yes" && cat << EOF
4537     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4538 EOF
4539 cat >> confdefs.h <<EOF
4540 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4541 EOF
4542 }
4543
4544
4545 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4546 echo "configure:4547: checking size of void *" >&5
4547
4548 cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551 #include <stdio.h>
4552 main()
4553 {
4554   FILE *f=fopen("conftestval", "w");
4555   if (!f) exit(1);
4556   fprintf(f, "%d\n", sizeof(void *));
4557   exit(0);
4558 }
4559 EOF
4560 if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4561 then
4562   ac_cv_sizeof_void_p=`cat conftestval`
4563 else
4564   conftest_rc="$?"
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -fr conftest*
4568   ac_cv_sizeof_void_p=0
4569 fi
4570 rm -fr conftest*
4571 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4572 { test "$extra_verbose" = "yes" && cat << EOF
4573     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4574 EOF
4575 cat >> confdefs.h <<EOF
4576 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4577 EOF
4578 }
4579
4580
4581
4582 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4583 echo "configure:4584: checking for long file names" >&5
4584
4585 ac_cv_sys_long_file_names=yes
4586 # Test for long file names in all the places we know might matter:
4587 #      .                the current directory, where building will happen
4588 #      $prefix/lib      where we will be installing things
4589 #      $exec_prefix/lib likewise
4590 # eval it to expand exec_prefix.
4591 #      $TMPDIR          if set, where it might want to write temporary files
4592 # if $TMPDIR is not set:
4593 #      /tmp             where it might want to write temporary files
4594 #      /var/tmp         likewise
4595 #      /usr/tmp         likewise
4596 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4597   ac_tmpdirs="$TMPDIR"
4598 else
4599   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4600 fi
4601 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4602   test -d $ac_dir || continue
4603   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4604   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4605   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4606   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4607   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4608     ac_cv_sys_long_file_names=no
4609     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4610     break
4611   fi
4612   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4613 done
4614
4615 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4616 if test $ac_cv_sys_long_file_names = yes; then
4617   { test "$extra_verbose" = "yes" && cat << \EOF
4618     Defining HAVE_LONG_FILE_NAMES
4619 EOF
4620 cat >> confdefs.h <<\EOF
4621 #define HAVE_LONG_FILE_NAMES 1
4622 EOF
4623 }
4624
4625 fi
4626
4627
4628 echo $ac_n "checking for sin""... $ac_c" 1>&6
4629 echo "configure:4630: checking for sin" >&5
4630
4631 cat > conftest.$ac_ext <<EOF
4632 #line 4633 "configure"
4633 #include "confdefs.h"
4634 /* System header to define __stub macros and hopefully few prototypes,
4635     which can conflict with char sin(); below.  */
4636 #include <assert.h>
4637 /* Override any gcc2 internal prototype to avoid an error.  */
4638 /* We use char because int might match the return type of a gcc2
4639     builtin and then its argument prototype would still apply.  */
4640 char sin();
4641
4642 int main() {
4643
4644 /* The GNU C library defines this for functions which it implements
4645     to always fail with ENOSYS.  Some functions are actually named
4646     something starting with __ and the normal name is an alias.  */
4647 #if defined (__stub_sin) || defined (__stub___sin)
4648 choke me
4649 #else
4650 sin();
4651 #endif
4652
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4656   rm -rf conftest*
4657   eval "ac_cv_func_sin=yes"
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   eval "ac_cv_func_sin=no"
4663 fi
4664 rm -f conftest*
4665
4666 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4667   echo "$ac_t""yes" 1>&6
4668   :
4669 else
4670   echo "$ac_t""no" 1>&6
4671
4672 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4673 echo "configure:4674: checking for sin in -lm" >&5
4674 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4675
4676 xe_check_libs=" -lm "
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 /* Override any gcc2 internal prototype to avoid an error.  */
4681 /* We use char because int might match the return type of a gcc2
4682     builtin and then its argument prototype would still apply.  */
4683 char sin();
4684
4685 int main() {
4686 sin()
4687 ; return 0; }
4688 EOF
4689 if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=yes"
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695   rm -rf conftest*
4696   eval "ac_cv_lib_$ac_lib_var=no"
4697 fi
4698 rm -f conftest*
4699 xe_check_libs=""
4700
4701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4702   echo "$ac_t""yes" 1>&6
4703     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4704     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4705   { test "$extra_verbose" = "yes" && cat << EOF
4706     Defining $ac_tr_lib
4707 EOF
4708 cat >> confdefs.h <<EOF
4709 #define $ac_tr_lib 1
4710 EOF
4711 }
4712
4713   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4714
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718
4719
4720 fi
4721
4722
4723 { test "$extra_verbose" = "yes" && cat << \EOF
4724     Defining LISP_FLOAT_TYPE
4725 EOF
4726 cat >> confdefs.h <<\EOF
4727 #define LISP_FLOAT_TYPE 1
4728 EOF
4729 }
4730
4731
4732 cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735 #include <math.h>
4736 int main() {
4737 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   { test "$extra_verbose" = "yes" && cat << \EOF
4743     Defining HAVE_INVERSE_HYPERBOLIC
4744 EOF
4745 cat >> confdefs.h <<\EOF
4746 #define HAVE_INVERSE_HYPERBOLIC 1
4747 EOF
4748 }
4749
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753 fi
4754 rm -f conftest*
4755
4756 echo "checking type of mail spool file locking" 1>&6
4757 echo "configure:4758: checking type of mail spool file locking" >&5
4758 for ac_func in lockf flock
4759 do
4760 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4761 echo "configure:4762: checking for $ac_func" >&5
4762
4763 cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 /* System header to define __stub macros and hopefully few prototypes,
4767     which can conflict with char $ac_func(); below.  */
4768 #include <assert.h>
4769 /* Override any gcc2 internal prototype to avoid an error.  */
4770 /* We use char because int might match the return type of a gcc2
4771     builtin and then its argument prototype would still apply.  */
4772 char $ac_func();
4773
4774 int main() {
4775
4776 /* The GNU C library defines this for functions which it implements
4777     to always fail with ENOSYS.  Some functions are actually named
4778     something starting with __ and the normal name is an alias.  */
4779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4780 choke me
4781 #else
4782 $ac_func();
4783 #endif
4784
4785 ; return 0; }
4786 EOF
4787 if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4788   rm -rf conftest*
4789   eval "ac_cv_func_$ac_func=yes"
4790 else
4791   echo "configure: failed program was:" >&5
4792   cat conftest.$ac_ext >&5
4793   rm -rf conftest*
4794   eval "ac_cv_func_$ac_func=no"
4795 fi
4796 rm -f conftest*
4797
4798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4799   echo "$ac_t""yes" 1>&6
4800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4801   { test "$extra_verbose" = "yes" && cat << EOF
4802     Defining $ac_tr_func
4803 EOF
4804 cat >> confdefs.h <<EOF
4805 #define $ac_tr_func 1
4806 EOF
4807 }
4808  
4809 else
4810   echo "$ac_t""no" 1>&6
4811 fi
4812 done
4813
4814 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4815 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4816 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4817 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4818     Defining MAIL_LOCK_LOCKF
4819 EOF
4820 cat >> confdefs.h <<\EOF
4821 #define MAIL_LOCK_LOCKF 1
4822 EOF
4823 }
4824
4825 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4826     Defining MAIL_LOCK_FLOCK
4827 EOF
4828 cat >> confdefs.h <<\EOF
4829 #define MAIL_LOCK_FLOCK 1
4830 EOF
4831 }
4832
4833 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4834     Defining MAIL_LOCK_LOCKING
4835 EOF
4836 cat >> confdefs.h <<\EOF
4837 #define MAIL_LOCK_LOCKING 1
4838 EOF
4839 }
4840
4841 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4842     Defining MAIL_LOCK_DOT
4843 EOF
4844 cat >> confdefs.h <<\EOF
4845 #define MAIL_LOCK_DOT 1
4846 EOF
4847 }
4848
4849 fi
4850 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4851   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4852 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4853   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4854 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4855   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4856
4857 case "$opsys" in decosf*)
4858   
4859 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4860 echo "configure:4861: checking for cma_open in -lpthreads" >&5
4861 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4862
4863 xe_check_libs=" -lpthreads "
4864 cat > conftest.$ac_ext <<EOF
4865 #line 4866 "configure"
4866 #include "confdefs.h"
4867 /* Override any gcc2 internal prototype to avoid an error.  */
4868 /* We use char because int might match the return type of a gcc2
4869     builtin and then its argument prototype would still apply.  */
4870 char cma_open();
4871
4872 int main() {
4873 cma_open()
4874 ; return 0; }
4875 EOF
4876 if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4877   rm -rf conftest*
4878   eval "ac_cv_lib_$ac_lib_var=yes"
4879 else
4880   echo "configure: failed program was:" >&5
4881   cat conftest.$ac_ext >&5
4882   rm -rf conftest*
4883   eval "ac_cv_lib_$ac_lib_var=no"
4884 fi
4885 rm -f conftest*
4886 xe_check_libs=""
4887
4888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4889   echo "$ac_t""yes" 1>&6
4890     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4891     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4892   { test "$extra_verbose" = "yes" && cat << EOF
4893     Defining $ac_tr_lib
4894 EOF
4895 cat >> confdefs.h <<EOF
4896 #define $ac_tr_lib 1
4897 EOF
4898 }
4899
4900   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4901
4902 else
4903   echo "$ac_t""no" 1>&6
4904 fi
4905
4906
4907   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4908     c_switch_site="$c_switch_site -threads" ;;
4909 esac
4910
4911 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4912 echo "configure:4913: checking whether the -xildoff compiler flag is required" >&5
4913 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4914   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4915     then echo "$ac_t""no" 1>&6;
4916     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
4917   fi
4918   else echo "$ac_t""no" 1>&6
4919 fi
4920
4921 if test "$opsys" = "sol2"; then
4922   if test "$os_release" -ge 56; then
4923     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4924 echo "configure:4925: checking for \"-z ignore\" linker flag" >&5
4925     case "`ld -h 2>&1`" in
4926       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4927         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4928       *) echo "$ac_t""no" 1>&6 ;;
4929     esac
4930   fi
4931 fi
4932
4933
4934 echo "checking "for specified window system"" 1>&6
4935 echo "configure:4936: checking "for specified window system"" >&5
4936
4937 if test "$with_x11" != "no"; then
4938     test "$x_includes $x_libraries" != "NONE NONE" && \
4939    window_system=x11 with_x11=yes
4940
4941         
4942       if test "$x_includes $x_libraries" = "NONE NONE" \
4943     -a -n "$OPENWINHOME" \
4944     -a "$OPENWINHOME" != "/usr/openwin" \
4945     -a -d "$OPENWINHOME"; then
4946       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4947       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4948       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4949   fi
4950
4951   if test "$x_includes" = "NONE"; then
4952                     for dir in "/usr/X11" "/usr/X11R6"; do
4953       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4954     done
4955   fi
4956
4957   if test "$x_libraries" = "NONE"; then
4958     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4959       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4960     done
4961   fi
4962
4963   # If we find X, set shell vars x_includes and x_libraries to the
4964 # paths, otherwise set no_x=yes.
4965 # Uses ac_ vars as temps to allow command line to override cache and checks.
4966 # --without-x overrides everything else, but does not touch the cache.
4967 echo $ac_n "checking for X""... $ac_c" 1>&6
4968 echo "configure:4969: checking for X" >&5
4969
4970 # Check whether --with-x or --without-x was given.
4971 if test "${with_x+set}" = set; then
4972   withval="$with_x"
4973   :
4974 fi
4975
4976 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4977 if test "x$with_x" = xno; then
4978   # The user explicitly disabled X.
4979   have_x=disabled
4980 else
4981   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4982     # Both variables are already set.
4983     have_x=yes
4984   else
4985
4986 # One or both of the vars are not set, and there is no cached value.
4987 ac_x_includes=NO ac_x_libraries=NO
4988 rm -fr conftestdir
4989 if mkdir conftestdir; then
4990   cd conftestdir
4991   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4992   cat > Imakefile <<'EOF'
4993 acfindx:
4994         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4995 EOF
4996   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4997     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4998     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4999     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5000     for ac_extension in a so sl; do
5001       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5002         test -f $ac_im_libdir/libX11.$ac_extension; then
5003         ac_im_usrlibdir=$ac_im_libdir; break
5004       fi
5005     done
5006     # Screen out bogus values from the imake configuration.  They are
5007     # bogus both because they are the default anyway, and because
5008     # using them would break gcc on systems where it needs fixed includes.
5009     case "$ac_im_incroot" in
5010         /usr/include) ;;
5011         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5012     esac
5013     case "$ac_im_usrlibdir" in
5014         /usr/lib | /lib) ;;
5015         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5016     esac
5017   fi
5018   cd ..
5019   rm -fr conftestdir
5020 fi
5021
5022 if test "$ac_x_includes" = NO; then
5023   # Guess where to find include files, by looking for this one X11 .h file.
5024   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5025
5026   # First, try using that file with no special directory specified.
5027 cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030 #include <$x_direct_test_include>
5031 EOF
5032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5033 { (eval echo configure:5034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5035 if test -z "$ac_err"; then
5036   rm -rf conftest*
5037   # We can compile using X headers with no special include directory.
5038 ac_x_includes=
5039 else
5040   echo "$ac_err" >&5
5041   echo "configure: failed program was:" >&5
5042   cat conftest.$ac_ext >&5
5043   rm -rf conftest*
5044   # Look for the header file in a standard set of common directories.
5045 # Check X11 before X11Rn because it is often a symlink to the current release.
5046   for ac_dir in               \
5047     /usr/X11/include          \
5048     /usr/X11R6/include        \
5049     /usr/X11R5/include        \
5050     /usr/X11R4/include        \
5051                               \
5052     /usr/include/X11          \
5053     /usr/include/X11R6        \
5054     /usr/include/X11R5        \
5055     /usr/include/X11R4        \
5056                               \
5057     /usr/local/X11/include    \
5058     /usr/local/X11R6/include  \
5059     /usr/local/X11R5/include  \
5060     /usr/local/X11R4/include  \
5061                               \
5062     /usr/local/include/X11    \
5063     /usr/local/include/X11R6  \
5064     /usr/local/include/X11R5  \
5065     /usr/local/include/X11R4  \
5066                               \
5067     /usr/X386/include         \
5068     /usr/x386/include         \
5069     /usr/XFree86/include/X11  \
5070                               \
5071     /usr/include              \
5072     /usr/local/include        \
5073     /usr/unsupported/include  \
5074     /usr/athena/include       \
5075     /usr/local/x11r5/include  \
5076     /usr/lpp/Xamples/include  \
5077                               \
5078     /usr/openwin/include      \
5079     /usr/openwin/share/include \
5080     ; \
5081   do
5082     if test -r "$ac_dir/$x_direct_test_include"; then
5083       ac_x_includes=$ac_dir
5084       break
5085     fi
5086   done
5087 fi
5088 rm -f conftest*
5089 fi # $ac_x_includes = NO
5090
5091 if test "$ac_x_libraries" = NO; then
5092   # Check for the libraries.
5093
5094   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5095   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5096
5097   # See if we find them without any special options.
5098   # Don't add to $LIBS permanently.
5099   ac_save_LIBS="$LIBS"
5100   LIBS="-l$x_direct_test_library $LIBS"
5101 cat > conftest.$ac_ext <<EOF
5102 #line 5103 "configure"
5103 #include "confdefs.h"
5104
5105 int main() {
5106 ${x_direct_test_function}()
5107 ; return 0; }
5108 EOF
5109 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5110   rm -rf conftest*
5111   LIBS="$ac_save_LIBS"
5112 # We can link X programs with no special library path.
5113 ac_x_libraries=
5114 else
5115   echo "configure: failed program was:" >&5
5116   cat conftest.$ac_ext >&5
5117   rm -rf conftest*
5118   LIBS="$ac_save_LIBS"
5119 # First see if replacing the include by lib works.
5120 # Check X11 before X11Rn because it is often a symlink to the current release.
5121 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5122     /usr/X11/lib          \
5123     /usr/X11R6/lib        \
5124     /usr/X11R5/lib        \
5125     /usr/X11R4/lib        \
5126                           \
5127     /usr/lib/X11          \
5128     /usr/lib/X11R6        \
5129     /usr/lib/X11R5        \
5130     /usr/lib/X11R4        \
5131                           \
5132     /usr/local/X11/lib    \
5133     /usr/local/X11R6/lib  \
5134     /usr/local/X11R5/lib  \
5135     /usr/local/X11R4/lib  \
5136                           \
5137     /usr/local/lib/X11    \
5138     /usr/local/lib/X11R6  \
5139     /usr/local/lib/X11R5  \
5140     /usr/local/lib/X11R4  \
5141                           \
5142     /usr/X386/lib         \
5143     /usr/x386/lib         \
5144     /usr/XFree86/lib/X11  \
5145                           \
5146     /usr/lib              \
5147     /usr/local/lib        \
5148     /usr/unsupported/lib  \
5149     /usr/athena/lib       \
5150     /usr/local/x11r5/lib  \
5151     /usr/lpp/Xamples/lib  \
5152     /lib/usr/lib/X11      \
5153                           \
5154     /usr/openwin/lib      \
5155     /usr/openwin/share/lib \
5156     ; \
5157 do
5158   for ac_extension in a so sl; do
5159     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5160       ac_x_libraries=$ac_dir
5161       break 2
5162     fi
5163   done
5164 done
5165 fi
5166 rm -f conftest*
5167 fi # $ac_x_libraries = NO
5168
5169 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5170   # Didn't find X anywhere.  Cache the known absence of X.
5171   ac_cv_have_x="have_x=no"
5172 else
5173   # Record where we found X for the cache.
5174   ac_cv_have_x="have_x=yes \
5175                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5176 fi
5177   fi
5178   eval "$ac_cv_have_x"
5179 fi # $with_x != no
5180
5181 if test "$have_x" != yes; then
5182   echo "$ac_t""$have_x" 1>&6
5183   no_x=yes
5184 else
5185   # If each of the values was on the command line, it overrides each guess.
5186   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5187   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5188   # Update the cache value to reflect the command line values.
5189   ac_cv_have_x="have_x=yes \
5190                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5191   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5192 fi
5193
5194 if test "$no_x" = yes; then
5195   # Not all programs may use this symbol, but it does not hurt to define it.
5196   { test "$extra_verbose" = "yes" && cat << \EOF
5197     Defining X_DISPLAY_MISSING
5198 EOF
5199 cat >> confdefs.h <<\EOF
5200 #define X_DISPLAY_MISSING 1
5201 EOF
5202 }
5203
5204   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5205 else
5206   if test -n "$x_includes"; then
5207     X_CFLAGS="$X_CFLAGS -I$x_includes"
5208   fi
5209
5210   # It would also be nice to do this for all -L options, not just this one.
5211   if test -n "$x_libraries"; then
5212     X_LIBS="$X_LIBS -L$x_libraries"
5213     # For Solaris; some versions of Sun CC require a space after -R and
5214     # others require no space.  Words are not sufficient . . . .
5215     case "`(uname -sr) 2>/dev/null`" in
5216     "SunOS 5"*)
5217       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5218 echo "configure:5219: checking whether -R must be followed by a space" >&5
5219       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5220       cat > conftest.$ac_ext <<EOF
5221 #line 5222 "configure"
5222 #include "confdefs.h"
5223
5224 int main() {
5225
5226 ; return 0; }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229   rm -rf conftest*
5230   ac_R_nospace=yes
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -rf conftest*
5235   ac_R_nospace=no
5236 fi
5237 rm -f conftest*
5238       if test $ac_R_nospace = yes; then
5239         echo "$ac_t""no" 1>&6
5240         X_LIBS="$X_LIBS -R$x_libraries"
5241       else
5242         LIBS="$ac_xsave_LIBS -R $x_libraries"
5243         cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246
5247 int main() {
5248
5249 ; return 0; }
5250 EOF
5251 if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5252   rm -rf conftest*
5253   ac_R_space=yes
5254 else
5255   echo "configure: failed program was:" >&5
5256   cat conftest.$ac_ext >&5
5257   rm -rf conftest*
5258   ac_R_space=no
5259 fi
5260 rm -f conftest*
5261         if test $ac_R_space = yes; then
5262           echo "$ac_t""yes" 1>&6
5263           X_LIBS="$X_LIBS -R $x_libraries"
5264         else
5265           echo "$ac_t""neither works" 1>&6
5266         fi
5267       fi
5268       LIBS="$ac_xsave_LIBS"
5269     esac
5270   fi
5271
5272   # Check for system-dependent libraries X programs must link with.
5273   # Do this before checking for the system-independent R6 libraries
5274   # (-lICE), since we may need -lsocket or whatever for X linking.
5275
5276   if test "$ISC" = yes; then
5277     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5278   else
5279     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5280     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5281     # the Alpha needs dnet_stub (dnet does not exist).
5282     if test "$with_dnet" = "no" ; then
5283 ac_cv_lib_dnet_dnet_ntoa=no
5284 else
5285
5286 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5287 echo "configure:5288: checking for dnet_ntoa in -ldnet" >&5
5288 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5289
5290 xe_check_libs=" -ldnet "
5291 cat > conftest.$ac_ext <<EOF
5292 #line 5293 "configure"
5293 #include "confdefs.h"
5294 /* Override any gcc2 internal prototype to avoid an error.  */
5295 /* We use char because int might match the return type of a gcc2
5296     builtin and then its argument prototype would still apply.  */
5297 char dnet_ntoa();
5298
5299 int main() {
5300 dnet_ntoa()
5301 ; return 0; }
5302 EOF
5303 if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5304   rm -rf conftest*
5305   eval "ac_cv_lib_$ac_lib_var=yes"
5306 else
5307   echo "configure: failed program was:" >&5
5308   cat conftest.$ac_ext >&5
5309   rm -rf conftest*
5310   eval "ac_cv_lib_$ac_lib_var=no"
5311 fi
5312 rm -f conftest*
5313 xe_check_libs=""
5314
5315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5316   echo "$ac_t""yes" 1>&6
5317   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5318 else
5319   echo "$ac_t""no" 1>&6
5320 fi
5321
5322 fi
5323
5324     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5325       
5326 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5327 echo "configure:5328: checking for dnet_ntoa in -ldnet_stub" >&5
5328 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5329
5330 xe_check_libs=" -ldnet_stub "
5331 cat > conftest.$ac_ext <<EOF
5332 #line 5333 "configure"
5333 #include "confdefs.h"
5334 /* Override any gcc2 internal prototype to avoid an error.  */
5335 /* We use char because int might match the return type of a gcc2
5336     builtin and then its argument prototype would still apply.  */
5337 char dnet_ntoa();
5338
5339 int main() {
5340 dnet_ntoa()
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   eval "ac_cv_lib_$ac_lib_var=yes"
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -rf conftest*
5350   eval "ac_cv_lib_$ac_lib_var=no"
5351 fi
5352 rm -f conftest*
5353 xe_check_libs=""
5354
5355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5356   echo "$ac_t""yes" 1>&6
5357   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5358 else
5359   echo "$ac_t""no" 1>&6
5360 fi
5361
5362
5363     fi
5364
5365     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5366     # to get the SysV transport functions.
5367     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5368     # needs -lnsl.
5369     # The nsl library prevents programs from opening the X display
5370     # on Irix 5.2, according to dickey@clark.net.
5371     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5372 echo "configure:5373: checking for gethostbyname" >&5
5373
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377 /* System header to define __stub macros and hopefully few prototypes,
5378     which can conflict with char gethostbyname(); below.  */
5379 #include <assert.h>
5380 /* Override any gcc2 internal prototype to avoid an error.  */
5381 /* We use char because int might match the return type of a gcc2
5382     builtin and then its argument prototype would still apply.  */
5383 char gethostbyname();
5384
5385 int main() {
5386
5387 /* The GNU C library defines this for functions which it implements
5388     to always fail with ENOSYS.  Some functions are actually named
5389     something starting with __ and the normal name is an alias.  */
5390 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5391 choke me
5392 #else
5393 gethostbyname();
5394 #endif
5395
5396 ; return 0; }
5397 EOF
5398 if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5399   rm -rf conftest*
5400   eval "ac_cv_func_gethostbyname=yes"
5401 else
5402   echo "configure: failed program was:" >&5
5403   cat conftest.$ac_ext >&5
5404   rm -rf conftest*
5405   eval "ac_cv_func_gethostbyname=no"
5406 fi
5407 rm -f conftest*
5408
5409 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5410   echo "$ac_t""yes" 1>&6
5411   :
5412 else
5413   echo "$ac_t""no" 1>&6
5414 fi
5415
5416     if test $ac_cv_func_gethostbyname = no; then
5417       
5418 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5419 echo "configure:5420: checking for gethostbyname in -lnsl" >&5
5420 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5421
5422 xe_check_libs=" -lnsl "
5423 cat > conftest.$ac_ext <<EOF
5424 #line 5425 "configure"
5425 #include "confdefs.h"
5426 /* Override any gcc2 internal prototype to avoid an error.  */
5427 /* We use char because int might match the return type of a gcc2
5428     builtin and then its argument prototype would still apply.  */
5429 char gethostbyname();
5430
5431 int main() {
5432 gethostbyname()
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5436   rm -rf conftest*
5437   eval "ac_cv_lib_$ac_lib_var=yes"
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   eval "ac_cv_lib_$ac_lib_var=no"
5443 fi
5444 rm -f conftest*
5445 xe_check_libs=""
5446
5447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5448   echo "$ac_t""yes" 1>&6
5449   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5450 else
5451   echo "$ac_t""no" 1>&6
5452 fi
5453
5454
5455     fi
5456
5457     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5458     # socket/setsockopt and other routines are undefined under SCO ODT
5459     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5460     # on later versions), says simon@lia.di.epfl.ch: it contains
5461     # gethostby* variants that don't use the nameserver (or something).
5462     # -lsocket must be given before -lnsl if both are needed.
5463     # We assume that if connect needs -lnsl, so does gethostbyname.
5464     echo $ac_n "checking for connect""... $ac_c" 1>&6
5465 echo "configure:5466: checking for connect" >&5
5466
5467 cat > conftest.$ac_ext <<EOF
5468 #line 5469 "configure"
5469 #include "confdefs.h"
5470 /* System header to define __stub macros and hopefully few prototypes,
5471     which can conflict with char connect(); below.  */
5472 #include <assert.h>
5473 /* Override any gcc2 internal prototype to avoid an error.  */
5474 /* We use char because int might match the return type of a gcc2
5475     builtin and then its argument prototype would still apply.  */
5476 char connect();
5477
5478 int main() {
5479
5480 /* The GNU C library defines this for functions which it implements
5481     to always fail with ENOSYS.  Some functions are actually named
5482     something starting with __ and the normal name is an alias.  */
5483 #if defined (__stub_connect) || defined (__stub___connect)
5484 choke me
5485 #else
5486 connect();
5487 #endif
5488
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5492   rm -rf conftest*
5493   eval "ac_cv_func_connect=yes"
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_func_connect=no"
5499 fi
5500 rm -f conftest*
5501
5502 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504   :
5505 else
5506   echo "$ac_t""no" 1>&6
5507 fi
5508
5509     if test $ac_cv_func_connect = no; then
5510       
5511 xe_msg_checking="for connect in -lsocket"
5512 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5513 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5514 echo "configure:5515: checking "$xe_msg_checking"" >&5
5515 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5516
5517 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5518 cat > conftest.$ac_ext <<EOF
5519 #line 5520 "configure"
5520 #include "confdefs.h"
5521 /* Override any gcc2 internal prototype to avoid an error.  */
5522 /* We use char because int might match the return type of a gcc2
5523     builtin and then its argument prototype would still apply.  */
5524 char connect();
5525
5526 int main() {
5527 connect()
5528 ; return 0; }
5529 EOF
5530 if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531   rm -rf conftest*
5532   eval "ac_cv_lib_$ac_lib_var=yes"
5533 else
5534   echo "configure: failed program was:" >&5
5535   cat conftest.$ac_ext >&5
5536   rm -rf conftest*
5537   eval "ac_cv_lib_$ac_lib_var=no"
5538 fi
5539 rm -f conftest*
5540 xe_check_libs=""
5541
5542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5543   echo "$ac_t""yes" 1>&6
5544   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5545 else
5546   echo "$ac_t""no" 1>&6
5547 fi
5548
5549
5550     fi
5551
5552     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5553     echo $ac_n "checking for remove""... $ac_c" 1>&6
5554 echo "configure:5555: checking for remove" >&5
5555
5556 cat > conftest.$ac_ext <<EOF
5557 #line 5558 "configure"
5558 #include "confdefs.h"
5559 /* System header to define __stub macros and hopefully few prototypes,
5560     which can conflict with char remove(); below.  */
5561 #include <assert.h>
5562 /* Override any gcc2 internal prototype to avoid an error.  */
5563 /* We use char because int might match the return type of a gcc2
5564     builtin and then its argument prototype would still apply.  */
5565 char remove();
5566
5567 int main() {
5568
5569 /* The GNU C library defines this for functions which it implements
5570     to always fail with ENOSYS.  Some functions are actually named
5571     something starting with __ and the normal name is an alias.  */
5572 #if defined (__stub_remove) || defined (__stub___remove)
5573 choke me
5574 #else
5575 remove();
5576 #endif
5577
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5581   rm -rf conftest*
5582   eval "ac_cv_func_remove=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_func_remove=no"
5588 fi
5589 rm -f conftest*
5590
5591 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5592   echo "$ac_t""yes" 1>&6
5593   :
5594 else
5595   echo "$ac_t""no" 1>&6
5596 fi
5597
5598     if test $ac_cv_func_remove = no; then
5599       
5600 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5601 echo "configure:5602: checking for remove in -lposix" >&5
5602 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5603
5604 xe_check_libs=" -lposix "
5605 cat > conftest.$ac_ext <<EOF
5606 #line 5607 "configure"
5607 #include "confdefs.h"
5608 /* Override any gcc2 internal prototype to avoid an error.  */
5609 /* We use char because int might match the return type of a gcc2
5610     builtin and then its argument prototype would still apply.  */
5611 char remove();
5612
5613 int main() {
5614 remove()
5615 ; return 0; }
5616 EOF
5617 if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5618   rm -rf conftest*
5619   eval "ac_cv_lib_$ac_lib_var=yes"
5620 else
5621   echo "configure: failed program was:" >&5
5622   cat conftest.$ac_ext >&5
5623   rm -rf conftest*
5624   eval "ac_cv_lib_$ac_lib_var=no"
5625 fi
5626 rm -f conftest*
5627 xe_check_libs=""
5628
5629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5630   echo "$ac_t""yes" 1>&6
5631   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5632 else
5633   echo "$ac_t""no" 1>&6
5634 fi
5635
5636
5637     fi
5638
5639     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5640     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5641 echo "configure:5642: checking for shmat" >&5
5642
5643 cat > conftest.$ac_ext <<EOF
5644 #line 5645 "configure"
5645 #include "confdefs.h"
5646 /* System header to define __stub macros and hopefully few prototypes,
5647     which can conflict with char shmat(); below.  */
5648 #include <assert.h>
5649 /* Override any gcc2 internal prototype to avoid an error.  */
5650 /* We use char because int might match the return type of a gcc2
5651     builtin and then its argument prototype would still apply.  */
5652 char shmat();
5653
5654 int main() {
5655
5656 /* The GNU C library defines this for functions which it implements
5657     to always fail with ENOSYS.  Some functions are actually named
5658     something starting with __ and the normal name is an alias.  */
5659 #if defined (__stub_shmat) || defined (__stub___shmat)
5660 choke me
5661 #else
5662 shmat();
5663 #endif
5664
5665 ; return 0; }
5666 EOF
5667 if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5668   rm -rf conftest*
5669   eval "ac_cv_func_shmat=yes"
5670 else
5671   echo "configure: failed program was:" >&5
5672   cat conftest.$ac_ext >&5
5673   rm -rf conftest*
5674   eval "ac_cv_func_shmat=no"
5675 fi
5676 rm -f conftest*
5677
5678 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5679   echo "$ac_t""yes" 1>&6
5680   :
5681 else
5682   echo "$ac_t""no" 1>&6
5683 fi
5684
5685     if test $ac_cv_func_shmat = no; then
5686       
5687 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5688 echo "configure:5689: checking for shmat in -lipc" >&5
5689 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5690
5691 xe_check_libs=" -lipc "
5692 cat > conftest.$ac_ext <<EOF
5693 #line 5694 "configure"
5694 #include "confdefs.h"
5695 /* Override any gcc2 internal prototype to avoid an error.  */
5696 /* We use char because int might match the return type of a gcc2
5697     builtin and then its argument prototype would still apply.  */
5698 char shmat();
5699
5700 int main() {
5701 shmat()
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705   rm -rf conftest*
5706   eval "ac_cv_lib_$ac_lib_var=yes"
5707 else
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   eval "ac_cv_lib_$ac_lib_var=no"
5712 fi
5713 rm -f conftest*
5714 xe_check_libs=""
5715
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5717   echo "$ac_t""yes" 1>&6
5718   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5719 else
5720   echo "$ac_t""no" 1>&6
5721 fi
5722
5723
5724     fi
5725   fi
5726
5727   # Check for libraries that X11R6 Xt/Xaw programs need.
5728   ac_save_LDFLAGS="$LDFLAGS"
5729   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5730   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5731   # check for ICE first), but we must link in the order -lSM -lICE or
5732   # we get undefined symbols.  So assume we have SM if we have ICE.
5733   # These have to be linked with before -lX11, unlike the other
5734   # libraries we check for below, so use a different variable.
5735   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5736   
5737 xe_msg_checking="for IceConnectionNumber in -lICE"
5738 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5739 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5740 echo "configure:5741: checking "$xe_msg_checking"" >&5
5741 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5742
5743 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5744 cat > conftest.$ac_ext <<EOF
5745 #line 5746 "configure"
5746 #include "confdefs.h"
5747 /* Override any gcc2 internal prototype to avoid an error.  */
5748 /* We use char because int might match the return type of a gcc2
5749     builtin and then its argument prototype would still apply.  */
5750 char IceConnectionNumber();
5751
5752 int main() {
5753 IceConnectionNumber()
5754 ; return 0; }
5755 EOF
5756 if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5757   rm -rf conftest*
5758   eval "ac_cv_lib_$ac_lib_var=yes"
5759 else
5760   echo "configure: failed program was:" >&5
5761   cat conftest.$ac_ext >&5
5762   rm -rf conftest*
5763   eval "ac_cv_lib_$ac_lib_var=no"
5764 fi
5765 rm -f conftest*
5766 xe_check_libs=""
5767
5768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5769   echo "$ac_t""yes" 1>&6
5770   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5771 else
5772   echo "$ac_t""no" 1>&6
5773 fi
5774
5775
5776   LDFLAGS="$ac_save_LDFLAGS"
5777
5778 fi
5779  # Autoconf claims to find X library and include dirs for us.
5780   if test "$no_x" = "yes"
5781   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5782   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5783   fi
5784 fi
5785
5786 case "$with_x11" in
5787   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5788   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5789 esac
5790
5791 if test "$with_x11" = "yes"; then
5792   { test "$extra_verbose" = "yes" && cat << \EOF
5793     Defining HAVE_X_WINDOWS
5794 EOF
5795 cat >> confdefs.h <<\EOF
5796 #define HAVE_X_WINDOWS 1
5797 EOF
5798 }
5799
5800   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5801   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5802
5803       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5804     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5805     if test -d "$lib_dir" -a -d "$inc_dir"; then
5806       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5807         x_libraries="$lib_dir $x_libraries"
5808         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5809       esac
5810       case "$x_includes" in "$inc_dir"* ) ;; *)
5811         x_includes="$inc_dir $x_includes"
5812         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5813       esac
5814       break;       fi
5815   done
5816
5817     for rel in "X11R6" "X11R5" "X11R4"; do
5818     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5819     if test -d "$lib_dir" -a -d "$inc_dir"; then
5820       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5821         x_libraries="$x_libraries $lib_dir"
5822         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5823       esac
5824       case "$x_includes" in "$inc_dir"* ) ;; *)
5825         x_includes="$x_includes $inc_dir"
5826         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5827       esac
5828       break;     fi
5829   done
5830
5831     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
5832
5833   ld_switch_x_site="$X_LIBS"
5834
5835   
5836 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5837     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5838   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5839   
5840         runpath="" runpath_dirs=""
5841   if test -n "$LD_RUN_PATH"; then
5842     runpath="$LD_RUN_PATH"
5843   elif test "$GCC" = "yes"; then
5844         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5845     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5846     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5847     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5848       case "$arg" in P,* | -L* | -R* )
5849         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5850           {
5851 xe_runpath_dir="$dir"
5852   test "$xe_runpath_dir" != "/lib"     -a \
5853         "$xe_runpath_dir" != "/usr/lib" -a \
5854         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5855   eval "$xe_add_unique_runpath_dir"
5856 }
5857         done ;;
5858       esac
5859     done
5860     ld_switch_run="$ld_switch_run_save"
5861     rm -f conftest*
5862   else
5863         for arg in $ld_switch_site $ld_switch_x_site; do
5864       case "$arg" in -L*) {
5865 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5866   test "$xe_runpath_dir" != "/lib"     -a \
5867         "$xe_runpath_dir" != "/usr/lib" -a \
5868         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5869   eval "$xe_add_unique_runpath_dir"
5870 };; esac
5871     done
5872         if test "$opsys $need_motif" = "sol2 yes"; then
5873       xe_runpath_dir="/opt/SUNWdt/lib";
5874       eval "$xe_add_unique_runpath_dir";
5875     fi
5876   fi 
5877   if test -n "$runpath"; then
5878     ld_switch_run="${dash_r}${runpath}"
5879     
5880 if test "$GCC" = "yes"; then
5881   set x $ld_switch_run; shift; ld_switch_run=""
5882   while test -n "$1"; do
5883     case $1 in
5884       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5885       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5886       -Xlinker* ) ;;
5887       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5888     esac
5889     shift
5890   done
5891 fi
5892     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5893   fi
5894 fi
5895
5896
5897   if test "$extra_verbose" = "yes"; then
5898     echo; echo "X11 compilation variables:"
5899     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5900     echo
5901   fi
5902
5903             bitmapdirs=
5904   if test "$x_includes" != NONE; then
5905     for i in $x_includes; do
5906       if test -d "$i/bitmaps"; then
5907         bitmapdirs="$i/bitmaps:$bitmapdirs"
5908       fi
5909       if test -d "$i/X11/bitmaps"; then
5910         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5911       fi
5912     done
5913     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5914   fi
5915   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5916     Defining BITMAPDIR = "$bitmapdirs"
5917 EOF
5918 cat >> confdefs.h <<EOF
5919 #define BITMAPDIR "$bitmapdirs"
5920 EOF
5921 }
5922
5923
5924     echo "checking for X defines extracted by xmkmf" 1>&6
5925 echo "configure:5926: checking for X defines extracted by xmkmf" >&5
5926   rm -fr conftestdir
5927   if mkdir conftestdir; then
5928     cd conftestdir
5929     cat > Imakefile <<'EOF'
5930 xetest:
5931         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5932 EOF
5933     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5934       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5935       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5936     fi
5937     cd ..
5938     rm -fr conftestdir
5939     for word in $xmkmf_defines; do
5940       case "$word" in
5941         -D*=* ) ;;
5942         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5943               { test "$extra_verbose" = "yes" && cat << EOF
5944     Defining $word
5945 EOF
5946 cat >> confdefs.h <<EOF
5947 #define $word 1
5948 EOF
5949 }
5950  ;;
5951       esac
5952     done
5953   fi
5954
5955     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5956 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5957 echo "configure:5958: checking for X11/Intrinsic.h" >&5
5958
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 #include <X11/Intrinsic.h>
5963 EOF
5964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5965 { (eval echo configure:5966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5967 if test -z "$ac_err"; then
5968   rm -rf conftest*
5969   eval "ac_cv_header_$ac_safe=yes"
5970 else
5971   echo "$ac_err" >&5
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_header_$ac_safe=no"
5976 fi
5977 rm -f conftest*
5978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5979   echo "$ac_t""yes" 1>&6
5980   :
5981 else
5982   echo "$ac_t""no" 1>&6
5983 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5984 fi
5985
5986
5987       
5988 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5989 echo "configure:5990: checking for XOpenDisplay in -lX11" >&5
5990 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5991
5992 xe_check_libs=" -lX11 "
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error.  */
5997 /* We use char because int might match the return type of a gcc2
5998     builtin and then its argument prototype would still apply.  */
5999 char XOpenDisplay();
6000
6001 int main() {
6002 XOpenDisplay()
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_lib_$ac_lib_var=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=no"
6013 fi
6014 rm -f conftest*
6015 xe_check_libs=""
6016
6017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6018   echo "$ac_t""yes" 1>&6
6019   have_lib_x11=yes
6020 else
6021   echo "$ac_t""no" 1>&6
6022 fi
6023
6024
6025   if test "$have_lib_x11" != "yes"; then
6026     
6027 xe_msg_checking="for XGetFontProperty in -lX11"
6028 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6029 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6030 echo "configure:6031: checking "$xe_msg_checking"" >&5
6031 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6032
6033 xe_check_libs=" -lX11 -b i486-linuxaout"
6034 cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 /* Override any gcc2 internal prototype to avoid an error.  */
6038 /* We use char because int might match the return type of a gcc2
6039     builtin and then its argument prototype would still apply.  */
6040 char XGetFontProperty();
6041
6042 int main() {
6043 XGetFontProperty()
6044 ; return 0; }
6045 EOF
6046 if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6047   rm -rf conftest*
6048   eval "ac_cv_lib_$ac_lib_var=yes"
6049 else
6050   echo "configure: failed program was:" >&5
6051   cat conftest.$ac_ext >&5
6052   rm -rf conftest*
6053   eval "ac_cv_lib_$ac_lib_var=no"
6054 fi
6055 rm -f conftest*
6056 xe_check_libs=""
6057
6058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6059   echo "$ac_t""yes" 1>&6
6060   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6061 else
6062   echo "$ac_t""no" 1>&6
6063 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6064 fi
6065
6066
6067   fi
6068   libs_x="-lX11"
6069   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6070
6071     
6072 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6073 echo "configure:6074: checking for XShapeSelectInput in -lXext" >&5
6074 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6075
6076 xe_check_libs=" -lXext "
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6079 "configure"
6079 #include "confdefs.h"
6080 /* Override any gcc2 internal prototype to avoid an error.  */
6081 /* We use char because int might match the return type of a gcc2
6082     builtin and then its argument prototype would still apply.  */
6083 char XShapeSelectInput();
6084
6085 int main() {
6086 XShapeSelectInput()
6087 ; return 0; }
6088 EOF
6089 if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6090   rm -rf conftest*
6091   eval "ac_cv_lib_$ac_lib_var=yes"
6092 else
6093   echo "configure: failed program was:" >&5
6094   cat conftest.$ac_ext >&5
6095   rm -rf conftest*
6096   eval "ac_cv_lib_$ac_lib_var=no"
6097 fi
6098 rm -f conftest*
6099 xe_check_libs=""
6100
6101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6102   echo "$ac_t""yes" 1>&6
6103   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6104 else
6105   echo "$ac_t""no" 1>&6
6106 fi
6107
6108
6109
6110     
6111 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6112 echo "configure:6113: checking for XtOpenDisplay in -lXt" >&5
6113 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6114
6115 xe_check_libs=" -lXt "
6116 cat > conftest.$ac_ext <<EOF
6117 #line 6118 "configure"
6118 #include "confdefs.h"
6119 /* Override any gcc2 internal prototype to avoid an error.  */
6120 /* We use char because int might match the return type of a gcc2
6121     builtin and then its argument prototype would still apply.  */
6122 char XtOpenDisplay();
6123
6124 int main() {
6125 XtOpenDisplay()
6126 ; return 0; }
6127 EOF
6128 if { (eval echo configure:6129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6129   rm -rf conftest*
6130   eval "ac_cv_lib_$ac_lib_var=yes"
6131 else
6132   echo "configure: failed program was:" >&5
6133   cat conftest.$ac_ext >&5
6134   rm -rf conftest*
6135   eval "ac_cv_lib_$ac_lib_var=no"
6136 fi
6137 rm -f conftest*
6138 xe_check_libs=""
6139
6140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6141   echo "$ac_t""yes" 1>&6
6142   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6143 else
6144   echo "$ac_t""no" 1>&6
6145 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6146 fi
6147
6148
6149
6150   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6151 echo "configure:6152: checking the version of X11 being used" >&5
6152   cat > conftest.$ac_ext <<EOF
6153 #line 6154 "configure"
6154 #include "confdefs.h"
6155 #include <X11/Intrinsic.h>
6156     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6157 EOF
6158 if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6159 then
6160   ./conftest foobar; x11_release=$?
6161 else
6162   conftest_rc="$?"
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -fr conftest*
6166   x11_release=4
6167 fi
6168 rm -fr conftest*
6169   echo "$ac_t""R${x11_release}" 1>&6
6170   { test "$extra_verbose" = "yes" && cat << EOF
6171     Defining THIS_IS_X11R${x11_release}
6172 EOF
6173 cat >> confdefs.h <<EOF
6174 #define THIS_IS_X11R${x11_release} 1
6175 EOF
6176 }
6177
6178
6179   for ac_func in XConvertCase
6180 do
6181 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6182 echo "configure:6183: checking for $ac_func" >&5
6183
6184 cat > conftest.$ac_ext <<EOF
6185 #line 6186 "configure"
6186 #include "confdefs.h"
6187 /* System header to define __stub macros and hopefully few prototypes,
6188     which can conflict with char $ac_func(); below.  */
6189 #include <assert.h>
6190 /* Override any gcc2 internal prototype to avoid an error.  */
6191 /* We use char because int might match the return type of a gcc2
6192     builtin and then its argument prototype would still apply.  */
6193 char $ac_func();
6194
6195 int main() {
6196
6197 /* The GNU C library defines this for functions which it implements
6198     to always fail with ENOSYS.  Some functions are actually named
6199     something starting with __ and the normal name is an alias.  */
6200 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6201 choke me
6202 #else
6203 $ac_func();
6204 #endif
6205
6206 ; return 0; }
6207 EOF
6208 if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6209   rm -rf conftest*
6210   eval "ac_cv_func_$ac_func=yes"
6211 else
6212   echo "configure: failed program was:" >&5
6213   cat conftest.$ac_ext >&5
6214   rm -rf conftest*
6215   eval "ac_cv_func_$ac_func=no"
6216 fi
6217 rm -f conftest*
6218
6219 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6220   echo "$ac_t""yes" 1>&6
6221     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6222   { test "$extra_verbose" = "yes" && cat << EOF
6223     Defining $ac_tr_func
6224 EOF
6225 cat >> confdefs.h <<EOF
6226 #define $ac_tr_func 1
6227 EOF
6228 }
6229  
6230 else
6231   echo "$ac_t""no" 1>&6
6232 fi
6233 done
6234
6235
6236   for ac_hdr in X11/Xlocale.h
6237 do
6238 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6239 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6240 echo "configure:6241: checking for $ac_hdr" >&5
6241
6242 cat > conftest.$ac_ext <<EOF
6243 #line 6244 "configure"
6244 #include "confdefs.h"
6245 #include <$ac_hdr>
6246 EOF
6247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6248 { (eval echo configure:6249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6250 if test -z "$ac_err"; then
6251   rm -rf conftest*
6252   eval "ac_cv_header_$ac_safe=yes"
6253 else
6254   echo "$ac_err" >&5
6255   echo "configure: failed program was:" >&5
6256   cat conftest.$ac_ext >&5
6257   rm -rf conftest*
6258   eval "ac_cv_header_$ac_safe=no"
6259 fi
6260 rm -f conftest*
6261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6264   { test "$extra_verbose" = "yes" && cat << EOF
6265     Defining $ac_tr_hdr
6266 EOF
6267 cat >> confdefs.h <<EOF
6268 #define $ac_tr_hdr 1
6269 EOF
6270 }
6271  
6272 else
6273   echo "$ac_t""no" 1>&6
6274 fi
6275 done
6276
6277
6278     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6279 echo "configure:6280: checking for XFree86" >&5
6280   if test -d "/usr/X386/include" -o \
6281           -f "/etc/XF86Config"    -o \
6282           -f "/etc/X11/XF86Config" -o \
6283           -f "/usr/X11R6/lib/X11/XF86Config"; then
6284     echo "$ac_t""yes" 1>&6
6285     { test "$extra_verbose" = "yes" && cat << \EOF
6286     Defining HAVE_XFREE386
6287 EOF
6288 cat >> confdefs.h <<\EOF
6289 #define HAVE_XFREE386 1
6290 EOF
6291 }
6292
6293   else
6294     echo "$ac_t""no" 1>&6
6295   fi
6296
6297     test -z "$with_xmu" && { 
6298 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6299 echo "configure:6300: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6300 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6301
6302 xe_check_libs=" -lXmu "
6303 cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 /* Override any gcc2 internal prototype to avoid an error.  */
6307 /* We use char because int might match the return type of a gcc2
6308     builtin and then its argument prototype would still apply.  */
6309 char XmuReadBitmapDataFromFile();
6310
6311 int main() {
6312 XmuReadBitmapDataFromFile()
6313 ; return 0; }
6314 EOF
6315 if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6316   rm -rf conftest*
6317   eval "ac_cv_lib_$ac_lib_var=yes"
6318 else
6319   echo "configure: failed program was:" >&5
6320   cat conftest.$ac_ext >&5
6321   rm -rf conftest*
6322   eval "ac_cv_lib_$ac_lib_var=no"
6323 fi
6324 rm -f conftest*
6325 xe_check_libs=""
6326
6327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6328   echo "$ac_t""yes" 1>&6
6329   with_xmu=yes
6330 else
6331   echo "$ac_t""no" 1>&6
6332 with_xmu=no
6333 fi
6334
6335  }
6336   if test "$with_xmu" = "no"; then
6337     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6338    echo "    xemacs will be linked with \"xmu.o\""
6339  fi
6340   else
6341     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6342     { test "$extra_verbose" = "yes" && cat << \EOF
6343     Defining HAVE_XMU
6344 EOF
6345 cat >> confdefs.h <<\EOF
6346 #define HAVE_XMU 1
6347 EOF
6348 }
6349
6350   fi
6351
6352       
6353 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6354 echo "configure:6355: checking for main in -lXbsd" >&5
6355 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6356
6357 xe_check_libs=" -lXbsd "
6358 cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6361
6362 int main() {
6363 main()
6364 ; return 0; }
6365 EOF
6366 if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6367   rm -rf conftest*
6368   eval "ac_cv_lib_$ac_lib_var=yes"
6369 else
6370   echo "configure: failed program was:" >&5
6371   cat conftest.$ac_ext >&5
6372   rm -rf conftest*
6373   eval "ac_cv_lib_$ac_lib_var=no"
6374 fi
6375 rm -f conftest*
6376 xe_check_libs=""
6377
6378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6379   echo "$ac_t""yes" 1>&6
6380   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6381 else
6382   echo "$ac_t""no" 1>&6
6383 fi
6384
6385
6386
6387     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6388         if test "$GCC" = "yes"; then
6389       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6390       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6391     else
6392       case "$CC" in
6393         "xlc" ) CC="xlc_r" ;;
6394         "xlC" ) CC="xlC_r" ;;
6395         "cc"  ) CC="cc_r" ;;
6396       esac
6397     fi
6398   fi
6399
6400 fi 
6401 if test "$with_msw" != "no"; then
6402   echo "checking for MS-Windows" 1>&6
6403 echo "configure:6404: checking for MS-Windows" >&5
6404   
6405 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6406 echo "configure:6407: checking for main in -lgdi32" >&5
6407 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6408
6409 xe_check_libs=" -lgdi32 "
6410 cat > conftest.$ac_ext <<EOF
6411 #line 6412 "configure"
6412 #include "confdefs.h"
6413
6414 int main() {
6415 main()
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=no"
6426 fi
6427 rm -f conftest*
6428 xe_check_libs=""
6429
6430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6431   echo "$ac_t""yes" 1>&6
6432   with_msw=yes
6433 else
6434   echo "$ac_t""no" 1>&6
6435 fi
6436
6437
6438   if test "$with_msw" = "yes"; then
6439     { test "$extra_verbose" = "yes" && cat << \EOF
6440     Defining HAVE_MS_WINDOWS
6441 EOF
6442 cat >> confdefs.h <<\EOF
6443 #define HAVE_MS_WINDOWS 1
6444 EOF
6445 }
6446
6447     install_pp="$blddir/lib-src/installexe.sh"
6448     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6449     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6450     if test "$window_system" != x11; then
6451         window_system=msw
6452         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6453             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6454    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6455  fi
6456         test "$with_menubars"   != "no" && with_menubars=msw \
6457             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6458    echo "    xemacs will be linked with \"menubar-msw.o\""
6459  fi
6460         test "$with_toolbars"   != "no" && with_toolbars=msw \
6461             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6462    echo "    xemacs will be linked with \"toolbar-msw.o\""
6463  fi
6464         test "$with_dialogs"   != "no" && with_dialogs=msw \
6465             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6466    echo "    xemacs will be linked with \"dialog-msw.o\""
6467  fi
6468         test "$with_widgets"   != "no" && with_widgets=msw
6469     else
6470         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6471    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6472  fi
6473         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6474    echo "    xemacs will be linked with \"menubar-msw.o\""
6475  fi
6476         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6477    echo "    xemacs will be linked with \"toolbar-msw.o\""
6478  fi
6479         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6480    echo "    xemacs will be linked with \"dialog-msw.o\""
6481  fi
6482     fi
6483         cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 #include <fcntl.h>
6487     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6488 EOF
6489 if { (eval echo configure:6490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6490 then
6491   { test "$extra_verbose" = "yes" && cat << \EOF
6492     Defining HAVE_MSG_SELECT
6493 EOF
6494 cat >> confdefs.h <<\EOF
6495 #define HAVE_MSG_SELECT 1
6496 EOF
6497 }
6498
6499 else
6500   conftest_rc="$?"
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503 fi
6504 rm -fr conftest*
6505     with_file_coding=yes
6506     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
6507    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\""
6508  fi
6509   fi
6510 fi
6511
6512
6513
6514 test -z "$window_system" && window_system="none"
6515
6516 if test "$window_system" = "none"; then
6517   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6518   do
6519     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6520        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6521     fi
6522     eval "with_${feature}=no"
6523   done
6524 else
6525   test -z "$with_toolbars" && with_toolbars=yes
6526 fi
6527
6528 if test "$with_msw" != "yes"; then
6529   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6530   do
6531     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6532        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6533     fi
6534     eval "with_${feature}=no"
6535   done
6536 else
6537   :
6538 fi
6539
6540 if test "$with_x11" != "yes"; then
6541             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6542   do
6543     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6544        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6545     fi
6546     eval "with_${feature}=no"
6547   done
6548 fi
6549
6550 bitmapdir=
6551
6552 case "$window_system" in
6553   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6554   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6555   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6556 esac
6557
6558 case "$x_libraries" in *X11R4* )
6559   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6560   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6561 esac
6562
6563 echo "checking for WM_COMMAND option" 1>&6
6564 echo "configure:6565: checking for WM_COMMAND option" >&5;
6565 if test "$with_wmcommand" != "no"; then
6566   { test "$extra_verbose" = "yes" && cat << \EOF
6567     Defining HAVE_WMCOMMAND
6568 EOF
6569 cat >> confdefs.h <<\EOF
6570 #define HAVE_WMCOMMAND 1
6571 EOF
6572 }
6573
6574 fi
6575
6576 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6577 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6578 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6579 echo "configure:6580: checking for X11/Xauth.h" >&5
6580
6581 cat > conftest.$ac_ext <<EOF
6582 #line 6583 "configure"
6583 #include "confdefs.h"
6584 #include <X11/Xauth.h>
6585 EOF
6586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6587 { (eval echo configure:6588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6589 if test -z "$ac_err"; then
6590   rm -rf conftest*
6591   eval "ac_cv_header_$ac_safe=yes"
6592 else
6593   echo "$ac_err" >&5
6594   echo "configure: failed program was:" >&5
6595   cat conftest.$ac_ext >&5
6596   rm -rf conftest*
6597   eval "ac_cv_header_$ac_safe=no"
6598 fi
6599 rm -f conftest*
6600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6601   echo "$ac_t""yes" 1>&6
6602   :
6603 else
6604   echo "$ac_t""no" 1>&6
6605 with_xauth=no
6606 fi
6607  }
6608 test -z "$with_xauth" && { 
6609 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6610 echo "configure:6611: checking for XauGetAuthByAddr in -lXau" >&5
6611 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6612
6613 xe_check_libs=" -lXau "
6614 cat > conftest.$ac_ext <<EOF
6615 #line 6616 "configure"
6616 #include "confdefs.h"
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 /* We use char because int might match the return type of a gcc2
6619     builtin and then its argument prototype would still apply.  */
6620 char XauGetAuthByAddr();
6621
6622 int main() {
6623 XauGetAuthByAddr()
6624 ; return 0; }
6625 EOF
6626 if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6627   rm -rf conftest*
6628   eval "ac_cv_lib_$ac_lib_var=yes"
6629 else
6630   echo "configure: failed program was:" >&5
6631   cat conftest.$ac_ext >&5
6632   rm -rf conftest*
6633   eval "ac_cv_lib_$ac_lib_var=no"
6634 fi
6635 rm -f conftest*
6636 xe_check_libs=""
6637
6638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6639   echo "$ac_t""yes" 1>&6
6640   :
6641 else
6642   echo "$ac_t""no" 1>&6
6643 with_xauth=no
6644 fi
6645
6646  }
6647 test -z "$with_xauth" && with_xauth=yes
6648 if test "$with_xauth" = "yes"; then
6649   { test "$extra_verbose" = "yes" && cat << \EOF
6650     Defining HAVE_XAUTH
6651 EOF
6652 cat >> confdefs.h <<\EOF
6653 #define HAVE_XAUTH 1
6654 EOF
6655 }
6656
6657   
6658 T=""
6659 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
6660 libs_xauth="$T"
6661
6662 fi
6663
6664
6665
6666
6667 if test "$with_tooltalk" != "no" ; then
6668       for dir in "" "Tt/" "desktop/" ; do
6669     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6670 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6671 echo "configure:6672: checking for ${dir}tt_c.h" >&5
6672
6673 cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 #include <${dir}tt_c.h>
6677 EOF
6678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6679 { (eval echo configure:6680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6681 if test -z "$ac_err"; then
6682   rm -rf conftest*
6683   eval "ac_cv_header_$ac_safe=yes"
6684 else
6685   echo "$ac_err" >&5
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   rm -rf conftest*
6689   eval "ac_cv_header_$ac_safe=no"
6690 fi
6691 rm -f conftest*
6692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6693   echo "$ac_t""yes" 1>&6
6694   tt_c_h_file="${dir}tt_c.h"; break
6695 else
6696   echo "$ac_t""no" 1>&6
6697 fi
6698
6699   done
6700   if test -z "$tt_c_h_file"; then
6701     if test "$with_tooltalk" = "yes"; then
6702       (echo "$progname: Usage error:"
6703 echo " " "Unable to find required tooltalk header files."
6704 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6705     fi
6706     with_tooltalk=no
6707   fi
6708 fi
6709 if test "$with_tooltalk" != "no" ; then
6710   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6711     
6712 xe_msg_checking="for tt_message_create in -ltt"
6713 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6714 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6715 echo "configure:6716: checking "$xe_msg_checking"" >&5
6716 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6717
6718 xe_check_libs=" -ltt $extra_libs"
6719 cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 /* Override any gcc2 internal prototype to avoid an error.  */
6723 /* We use char because int might match the return type of a gcc2
6724     builtin and then its argument prototype would still apply.  */
6725 char tt_message_create();
6726
6727 int main() {
6728 tt_message_create()
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_lib_$ac_lib_var=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=no"
6739 fi
6740 rm -f conftest*
6741 xe_check_libs=""
6742
6743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6744   echo "$ac_t""yes" 1>&6
6745   tt_libs="-ltt $extra_libs"; break
6746 else
6747   echo "$ac_t""no" 1>&6
6748 :
6749 fi
6750
6751
6752   done
6753   if test -z "$tt_libs"; then
6754     if test "$with_tooltalk" = "yes"; then
6755       (echo "$progname: Usage error:"
6756 echo " " "Unable to find required tooltalk libraries."
6757 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6758     fi
6759     with_tooltalk=no
6760   fi
6761 fi
6762 test -z "$with_tooltalk" && with_tooltalk=yes
6763 if test "$with_tooltalk" = "yes"; then
6764   { test "$extra_verbose" = "yes" && cat << \EOF
6765     Defining TOOLTALK
6766 EOF
6767 cat >> confdefs.h <<\EOF
6768 #define TOOLTALK 1
6769 EOF
6770 }
6771
6772   { test "$extra_verbose" = "yes" && cat << EOF
6773     Defining TT_C_H_FILE = "$tt_c_h_file"
6774 EOF
6775 cat >> confdefs.h <<EOF
6776 #define TT_C_H_FILE "$tt_c_h_file"
6777 EOF
6778 }
6779
6780   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6781   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6782    echo "    xemacs will be linked with \"tooltalk.o\""
6783  fi
6784 fi
6785
6786 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6787 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6788 echo "configure:6789: checking for Dt/Dt.h" >&5
6789
6790 cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793 #include <Dt/Dt.h>
6794 EOF
6795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6796 { (eval echo configure:6797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6798 if test -z "$ac_err"; then
6799   rm -rf conftest*
6800   eval "ac_cv_header_$ac_safe=yes"
6801 else
6802   echo "$ac_err" >&5
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_header_$ac_safe=no"
6807 fi
6808 rm -f conftest*
6809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6810   echo "$ac_t""yes" 1>&6
6811   :
6812 else
6813   echo "$ac_t""no" 1>&6
6814 with_cde=no
6815 fi
6816  }
6817 test -z "$with_cde" && { 
6818 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6819 echo "configure:6820: checking for DtDndDragStart in -lDtSvc" >&5
6820 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6821
6822 xe_check_libs=" -lDtSvc "
6823 cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826 /* Override any gcc2 internal prototype to avoid an error.  */
6827 /* We use char because int might match the return type of a gcc2
6828     builtin and then its argument prototype would still apply.  */
6829 char DtDndDragStart();
6830
6831 int main() {
6832 DtDndDragStart()
6833 ; return 0; }
6834 EOF
6835 if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6836   rm -rf conftest*
6837   eval "ac_cv_lib_$ac_lib_var=yes"
6838 else
6839   echo "configure: failed program was:" >&5
6840   cat conftest.$ac_ext >&5
6841   rm -rf conftest*
6842   eval "ac_cv_lib_$ac_lib_var=no"
6843 fi
6844 rm -f conftest*
6845 xe_check_libs=""
6846
6847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6848   echo "$ac_t""yes" 1>&6
6849   :
6850 else
6851   echo "$ac_t""no" 1>&6
6852 with_cde=no
6853 fi
6854
6855  }
6856 test -z "$with_cde" && with_cde=yes
6857 if test "$with_dragndrop" = no; then
6858   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6859   with_cde=no
6860 fi
6861 if test "$with_cde" = "yes" ; then
6862   { test "$extra_verbose" = "yes" && cat << \EOF
6863     Defining HAVE_CDE
6864 EOF
6865 cat >> confdefs.h <<\EOF
6866 #define HAVE_CDE 1
6867 EOF
6868 }
6869
6870   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6871   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6872   with_tooltalk=yes # CDE requires Tooltalk
6873   need_motif=yes    # CDE requires Motif
6874 fi
6875
6876 test "$window_system" != "x11" && with_offix=no
6877 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6878   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6879   with_offix=no
6880 fi
6881 if test "$with_dragndrop" = no; then
6882   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6883   with_offix=no
6884 fi
6885 if test "$with_cde" = yes; then
6886   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6887   with_offix=no
6888 fi
6889 test -z "$with_offix" && with_offix=no
6890 if test "$with_offix" = "yes"; then
6891   { test "$extra_verbose" = "yes" && cat << \EOF
6892     Defining HAVE_OFFIX_DND
6893 EOF
6894 cat >> confdefs.h <<\EOF
6895 #define HAVE_OFFIX_DND 1
6896 EOF
6897 }
6898
6899   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6900   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6901 fi
6902
6903 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6904 echo "configure:6905: checking if drag and drop API is needed" >&5
6905 if test "$with_dragndrop" != "no" ; then
6906   if test -n "$dragndrop_proto" ; then
6907     with_dragndrop=yes
6908     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6909     { test "$extra_verbose" = "yes" && cat << \EOF
6910     Defining HAVE_DRAGNDROP
6911 EOF
6912 cat >> confdefs.h <<\EOF
6913 #define HAVE_DRAGNDROP 1
6914 EOF
6915 }
6916
6917     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6918   else
6919     with_dragndrop=no
6920     echo "$ac_t""no" 1>&6
6921   fi
6922 fi
6923
6924 echo "checking for LDAP" 1>&6
6925 echo "configure:6926: checking for LDAP" >&5
6926 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6927 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6928 echo "configure:6929: checking for ldap.h" >&5
6929
6930 cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933 #include <ldap.h>
6934 EOF
6935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6936 { (eval echo configure:6937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6938 if test -z "$ac_err"; then
6939   rm -rf conftest*
6940   eval "ac_cv_header_$ac_safe=yes"
6941 else
6942   echo "$ac_err" >&5
6943   echo "configure: failed program was:" >&5
6944   cat conftest.$ac_ext >&5
6945   rm -rf conftest*
6946   eval "ac_cv_header_$ac_safe=no"
6947 fi
6948 rm -f conftest*
6949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6950   echo "$ac_t""yes" 1>&6
6951   :
6952 else
6953   echo "$ac_t""no" 1>&6
6954 with_ldap=no
6955 fi
6956  }
6957 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6958 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6959 echo "configure:6960: checking for lber.h" >&5
6960
6961 cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 #include <lber.h>
6965 EOF
6966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6967 { (eval echo configure:6968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6969 if test -z "$ac_err"; then
6970   rm -rf conftest*
6971   eval "ac_cv_header_$ac_safe=yes"
6972 else
6973   echo "$ac_err" >&5
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -rf conftest*
6977   eval "ac_cv_header_$ac_safe=no"
6978 fi
6979 rm -f conftest*
6980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6981   echo "$ac_t""yes" 1>&6
6982   :
6983 else
6984   echo "$ac_t""no" 1>&6
6985 with_ldap=no
6986 fi
6987  }
6988 if test "$with_ldap" != "no"; then
6989   
6990 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6991 echo "configure:6992: checking for ldap_search in -lldap" >&5
6992 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6993
6994 xe_check_libs=" -lldap "
6995 cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998 /* Override any gcc2 internal prototype to avoid an error.  */
6999 /* We use char because int might match the return type of a gcc2
7000     builtin and then its argument prototype would still apply.  */
7001 char ldap_search();
7002
7003 int main() {
7004 ldap_search()
7005 ; return 0; }
7006 EOF
7007 if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7008   rm -rf conftest*
7009   eval "ac_cv_lib_$ac_lib_var=yes"
7010 else
7011   echo "configure: failed program was:" >&5
7012   cat conftest.$ac_ext >&5
7013   rm -rf conftest*
7014   eval "ac_cv_lib_$ac_lib_var=no"
7015 fi
7016 rm -f conftest*
7017 xe_check_libs=""
7018
7019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7020   echo "$ac_t""yes" 1>&6
7021   with_ldap_nolber=yes
7022 else
7023   echo "$ac_t""no" 1>&6
7024 with_ldap_nolber=no
7025 fi
7026
7027
7028   test "$with_ldap_nolber" = "no" && { 
7029 xe_msg_checking="for ldap_open in -lldap"
7030 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7031 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7032 echo "configure:7033: checking "$xe_msg_checking"" >&5
7033 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7034
7035 xe_check_libs=" -lldap -llber"
7036 cat > conftest.$ac_ext <<EOF
7037 #line 7038 "configure"
7038 #include "confdefs.h"
7039 /* Override any gcc2 internal prototype to avoid an error.  */
7040 /* We use char because int might match the return type of a gcc2
7041     builtin and then its argument prototype would still apply.  */
7042 char ldap_open();
7043
7044 int main() {
7045 ldap_open()
7046 ; return 0; }
7047 EOF
7048 if { (eval echo configure:7049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7049   rm -rf conftest*
7050   eval "ac_cv_lib_$ac_lib_var=yes"
7051 else
7052   echo "configure: failed program was:" >&5
7053   cat conftest.$ac_ext >&5
7054   rm -rf conftest*
7055   eval "ac_cv_lib_$ac_lib_var=no"
7056 fi
7057 rm -f conftest*
7058 xe_check_libs=""
7059
7060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7061   echo "$ac_t""yes" 1>&6
7062   with_ldap_lber=yes
7063 else
7064   echo "$ac_t""no" 1>&6
7065 with_ldap_lber=no
7066 fi
7067
7068  }
7069   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7070 xe_msg_checking="for ldap_open in -lldap"
7071 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7072 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7073 echo "configure:7074: checking "$xe_msg_checking"" >&5
7074 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7075
7076 xe_check_libs=" -lldap -llber -lkrb"
7077 cat > conftest.$ac_ext <<EOF
7078 #line 7079 "configure"
7079 #include "confdefs.h"
7080 /* Override any gcc2 internal prototype to avoid an error.  */
7081 /* We use char because int might match the return type of a gcc2
7082     builtin and then its argument prototype would still apply.  */
7083 char ldap_open();
7084
7085 int main() {
7086 ldap_open()
7087 ; return 0; }
7088 EOF
7089 if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7090   rm -rf conftest*
7091   eval "ac_cv_lib_$ac_lib_var=yes"
7092 else
7093   echo "configure: failed program was:" >&5
7094   cat conftest.$ac_ext >&5
7095   rm -rf conftest*
7096   eval "ac_cv_lib_$ac_lib_var=no"
7097 fi
7098 rm -f conftest*
7099 xe_check_libs=""
7100
7101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7102   echo "$ac_t""yes" 1>&6
7103   with_ldap_krb=yes
7104 else
7105   echo "$ac_t""no" 1>&6
7106 with_ldap_krb=no
7107 fi
7108
7109  }
7110   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7111 xe_msg_checking="for ldap_open in -lldap"
7112 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7113 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7114 echo "configure:7115: checking "$xe_msg_checking"" >&5
7115 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7116
7117 xe_check_libs=" -lldap -llber -lkrb -ldes"
7118 cat > conftest.$ac_ext <<EOF
7119 #line 7120 "configure"
7120 #include "confdefs.h"
7121 /* Override any gcc2 internal prototype to avoid an error.  */
7122 /* We use char because int might match the return type of a gcc2
7123     builtin and then its argument prototype would still apply.  */
7124 char ldap_open();
7125
7126 int main() {
7127 ldap_open()
7128 ; return 0; }
7129 EOF
7130 if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7131   rm -rf conftest*
7132   eval "ac_cv_lib_$ac_lib_var=yes"
7133 else
7134   echo "configure: failed program was:" >&5
7135   cat conftest.$ac_ext >&5
7136   rm -rf conftest*
7137   eval "ac_cv_lib_$ac_lib_var=no"
7138 fi
7139 rm -f conftest*
7140 xe_check_libs=""
7141
7142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7143   echo "$ac_t""yes" 1>&6
7144   with_ldap_krbdes=yes
7145 else
7146   echo "$ac_t""no" 1>&6
7147 with_ldap_krbdes=no
7148 fi
7149
7150  }
7151   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
7152 fi
7153 if test "$with_ldap" = "yes"; then
7154   { test "$extra_verbose" = "yes" && cat << \EOF
7155     Defining HAVE_LDAP
7156 EOF
7157 cat >> confdefs.h <<\EOF
7158 #define HAVE_LDAP 1
7159 EOF
7160 }
7161
7162   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7163    echo "    xemacs will be linked with \"eldap.o\""
7164  fi
7165   if test "$with_ldap_nolber" = "yes" ; then
7166     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7167   else
7168     if test "$with_ldap_krb" = "yes" ; then
7169       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7170     fi
7171     if test "$with_ldap_krbdes" = "yes" ; then
7172       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7173       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7174     fi
7175     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7176     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7177   fi
7178   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7179 do
7180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7181 echo "configure:7182: checking for $ac_func" >&5
7182
7183 cat > conftest.$ac_ext <<EOF
7184 #line 7185 "configure"
7185 #include "confdefs.h"
7186 /* System header to define __stub macros and hopefully few prototypes,
7187     which can conflict with char $ac_func(); below.  */
7188 #include <assert.h>
7189 /* Override any gcc2 internal prototype to avoid an error.  */
7190 /* We use char because int might match the return type of a gcc2
7191     builtin and then its argument prototype would still apply.  */
7192 char $ac_func();
7193
7194 int main() {
7195
7196 /* The GNU C library defines this for functions which it implements
7197     to always fail with ENOSYS.  Some functions are actually named
7198     something starting with __ and the normal name is an alias.  */
7199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7200 choke me
7201 #else
7202 $ac_func();
7203 #endif
7204
7205 ; return 0; }
7206 EOF
7207 if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7208   rm -rf conftest*
7209   eval "ac_cv_func_$ac_func=yes"
7210 else
7211   echo "configure: failed program was:" >&5
7212   cat conftest.$ac_ext >&5
7213   rm -rf conftest*
7214   eval "ac_cv_func_$ac_func=no"
7215 fi
7216 rm -f conftest*
7217
7218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7219   echo "$ac_t""yes" 1>&6
7220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7221   { test "$extra_verbose" = "yes" && cat << EOF
7222     Defining $ac_tr_func
7223 EOF
7224 cat >> confdefs.h <<EOF
7225 #define $ac_tr_func 1
7226 EOF
7227 }
7228  
7229 else
7230   echo "$ac_t""no" 1>&6
7231 fi
7232 done
7233
7234 fi
7235
7236 echo "checking for PostgreSQL" 1>&6
7237 echo "configure:7238: checking for PostgreSQL" >&5
7238 postgres_h_path=""
7239 postgres_includes_found=no
7240 save_c_switch_site="$c_switch_site"
7241
7242 if test "$with_postgresql" != "no"; then
7243         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7244 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7245 echo "configure:7246: checking for libpq-fe.h" >&5
7246
7247 cat > conftest.$ac_ext <<EOF
7248 #line 7249 "configure"
7249 #include "confdefs.h"
7250 #include <libpq-fe.h>
7251 EOF
7252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7253 { (eval echo configure:7254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7255 if test -z "$ac_err"; then
7256   rm -rf conftest*
7257   eval "ac_cv_header_$ac_safe=yes"
7258 else
7259   echo "$ac_err" >&5
7260   echo "configure: failed program was:" >&5
7261   cat conftest.$ac_ext >&5
7262   rm -rf conftest*
7263   eval "ac_cv_header_$ac_safe=no"
7264 fi
7265 rm -f conftest*
7266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7267   echo "$ac_t""yes" 1>&6
7268   postgres_includes_found=yes
7269 else
7270   echo "$ac_t""no" 1>&6
7271 fi
7272
7273 fi
7274
7275 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7276         -d "/usr/local/pgsql/include"; then
7277         c_switch_site="$c_switch_site -I/usr/local/pgsql/include"
7278         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7279 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7280 echo "configure:7281: checking for libpq-fe.h" >&5
7281
7282 cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285 #include <libpq-fe.h>
7286 EOF
7287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7288 { (eval echo configure:7289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7290 if test -z "$ac_err"; then
7291   rm -rf conftest*
7292   eval "ac_cv_header_$ac_safe=yes"
7293 else
7294   echo "$ac_err" >&5
7295   echo "configure: failed program was:" >&5
7296   cat conftest.$ac_ext >&5
7297   rm -rf conftest*
7298   eval "ac_cv_header_$ac_safe=no"
7299 fi
7300 rm -f conftest*
7301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7302   echo "$ac_t""yes" 1>&6
7303   postgres_includes_found=yes
7304 else
7305   echo "$ac_t""no" 1>&6
7306 fi
7307
7308         if test "$postgres_includes_found" != "yes"; then
7309                 postgres_h_path="/usr/local/pgsql/include"
7310         fi
7311         c_switch_site="$save_c_switch_site"
7312 fi
7313 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7314         -d "/usr/include/pgsql"; then
7315         c_switch_site="$c_switch_site -I/usr/include/pgsql"
7316         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7317 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7318 echo "configure:7319: checking for libpq-fe.h" >&5
7319
7320 cat > conftest.$ac_ext <<EOF
7321 #line 7322 "configure"
7322 #include "confdefs.h"
7323 #include <libpq-fe.h>
7324 EOF
7325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7326 { (eval echo configure:7327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7328 if test -z "$ac_err"; then
7329   rm -rf conftest*
7330   eval "ac_cv_header_$ac_safe=yes"
7331 else
7332   echo "$ac_err" >&5
7333   echo "configure: failed program was:" >&5
7334   cat conftest.$ac_ext >&5
7335   rm -rf conftest*
7336   eval "ac_cv_header_$ac_safe=no"
7337 fi
7338 rm -f conftest*
7339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7340   echo "$ac_t""yes" 1>&6
7341   postgres_includes_found=yes
7342 else
7343   echo "$ac_t""no" 1>&6
7344 fi
7345
7346         if test "$postgres_includes_found" = "yes"; then
7347                 postgres_h_path="pgsql"
7348         fi
7349                 c_switch_site="$save_c_switch_site"
7350         fi
7351 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7352         -d "/usr/include/postgresql"; then
7353         c_switch_site="$c_switch_site -I/usr/include/postgresql"
7354         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7355 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7356 echo "configure:7357: checking for libpq-fe.h" >&5
7357
7358 cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361 #include <libpq-fe.h>
7362 EOF
7363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7364 { (eval echo configure:7365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7366 if test -z "$ac_err"; then
7367   rm -rf conftest*
7368   eval "ac_cv_header_$ac_safe=yes"
7369 else
7370   echo "$ac_err" >&5
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -rf conftest*
7374   eval "ac_cv_header_$ac_safe=no"
7375 fi
7376 rm -f conftest*
7377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7378   echo "$ac_t""yes" 1>&6
7379   postgres_includes_found=yes
7380 else
7381   echo "$ac_t""no" 1>&6
7382 fi
7383
7384         if test "$postgres_includes_found" = "yes"; then
7385                 postgres_h_path="postgresql"
7386 fi
7387         c_switch_site="$save_c_switch_site"
7388 fi
7389
7390 if test "$postgres_includes_found" = "yes"; then
7391         
7392 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7393 echo "configure:7394: checking for PQconnectdb in -lpq" >&5
7394 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7395
7396 xe_check_libs=" -lpq "
7397 cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400 /* Override any gcc2 internal prototype to avoid an error.  */
7401 /* We use char because int might match the return type of a gcc2
7402     builtin and then its argument prototype would still apply.  */
7403 char PQconnectdb();
7404
7405 int main() {
7406 PQconnectdb()
7407 ; return 0; }
7408 EOF
7409 if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7410   rm -rf conftest*
7411   eval "ac_cv_lib_$ac_lib_var=yes"
7412 else
7413   echo "configure: failed program was:" >&5
7414   cat conftest.$ac_ext >&5
7415   rm -rf conftest*
7416   eval "ac_cv_lib_$ac_lib_var=no"
7417 fi
7418 rm -f conftest*
7419 xe_check_libs=""
7420
7421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7422   echo "$ac_t""yes" 1>&6
7423   with_postgresql=yes
7424 else
7425   echo "$ac_t""no" 1>&6
7426 with_postgresql=no
7427 fi
7428
7429
7430 fi
7431 if test "$with_postgresql" = "yes"; then
7432         
7433 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7434 echo "configure:7435: checking for PQconnectStart in -lpq" >&5
7435 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7436
7437 xe_check_libs=" -lpq "
7438 cat > conftest.$ac_ext <<EOF
7439 #line 7440 "configure"
7440 #include "confdefs.h"
7441 /* Override any gcc2 internal prototype to avoid an error.  */
7442 /* We use char because int might match the return type of a gcc2
7443     builtin and then its argument prototype would still apply.  */
7444 char PQconnectStart();
7445
7446 int main() {
7447 PQconnectStart()
7448 ; return 0; }
7449 EOF
7450 if { (eval echo configure:7451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7451   rm -rf conftest*
7452   eval "ac_cv_lib_$ac_lib_var=yes"
7453 else
7454   echo "configure: failed program was:" >&5
7455   cat conftest.$ac_ext >&5
7456   rm -rf conftest*
7457   eval "ac_cv_lib_$ac_lib_var=no"
7458 fi
7459 rm -f conftest*
7460 xe_check_libs=""
7461
7462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7463   echo "$ac_t""yes" 1>&6
7464   with_postgresqlv7=yes
7465 else
7466   echo "$ac_t""no" 1>&6
7467 with_postgresqlv7=no
7468 fi
7469
7470
7471 fi
7472 if test "$with_postgresql" = "yes"; then
7473         if test -n "$postgres_h_path"; then
7474                 { test "$extra_verbose" = "yes" && cat << EOF
7475     Defining POSTGRES_H_PATH = $postgres_h_path
7476 EOF
7477 cat >> confdefs.h <<EOF
7478 #define POSTGRES_H_PATH $postgres_h_path
7479 EOF
7480 }
7481
7482         fi
7483         { test "$extra_verbose" = "yes" && cat << \EOF
7484     Defining HAVE_POSTGRESQL
7485 EOF
7486 cat >> confdefs.h <<\EOF
7487 #define HAVE_POSTGRESQL 1
7488 EOF
7489 }
7490
7491         if test "$with_postgresqlv7" = "yes"; then
7492                 { test "$extra_verbose" = "yes" && cat << \EOF
7493     Defining HAVE_POSTGRESQLV7
7494 EOF
7495 cat >> confdefs.h <<\EOF
7496 #define HAVE_POSTGRESQLV7 1
7497 EOF
7498 }
7499
7500         fi
7501         LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7502         extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7503    echo "    xemacs will be linked with \"postgresql.o\""
7504  fi
7505 fi
7506
7507
7508 if test "$window_system" != "none"; then
7509   echo "checking for graphics libraries" 1>&6
7510 echo "configure:7511: checking for graphics libraries" >&5
7511
7512     xpm_problem=""
7513   if test -z "$with_xpm"; then
7514     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7515 echo "configure:7516: checking for Xpm - no older than 3.4f" >&5
7516     xe_check_libs=-lXpm
7517     cat > conftest.$ac_ext <<EOF
7518 #line 7519 "configure"
7519 #include "confdefs.h"
7520 #define XPM_NUMBERS
7521 #include <X11/xpm.h>
7522     int main(int c, char **v) {
7523     return c == 1 ? 0 :
7524       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7525       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7526 EOF
7527 if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7528 then
7529   ./conftest dummy_arg; xpm_status=$?;
7530       if test "$xpm_status" = "0"; then
7531         with_xpm=yes;
7532       else
7533         with_xpm=no;
7534         if test "$xpm_status" = "1"; then
7535           xpm_problem="Xpm library version and header file version don't match!"
7536         elif test "$xpm_status" = "2"; then
7537           xpm_problem="Xpm library version is too old!"
7538         else
7539           xpm_problem="Internal xpm detection logic error!"
7540         fi
7541         echo "
7542 *** WARNING *** $xpm_problem
7543   I'm not touching that with a 10-foot pole!
7544   If you really want to use the installed version of Xpm, rerun
7545   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7546     fi
7547 else
7548   conftest_rc="$?"
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -fr conftest*
7552   with_xpm=no
7553 fi
7554 rm -fr conftest*
7555     xe_check_libs=
7556     echo "$ac_t""$with_xpm" 1>&6
7557   fi
7558   if test "$with_xpm" = "yes"; then
7559     { test "$extra_verbose" = "yes" && cat << \EOF
7560     Defining HAVE_XPM
7561 EOF
7562 cat >> confdefs.h <<\EOF
7563 #define HAVE_XPM 1
7564 EOF
7565 }
7566
7567     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7568     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7569 echo "configure:7570: checking for \"FOR_MSW\" xpm" >&5
7570     xe_check_libs=-lXpm
7571     cat > conftest.$ac_ext <<EOF
7572 #line 7573 "configure"
7573 #include "confdefs.h"
7574
7575 int main() {
7576 XpmCreatePixmapFromData()
7577 ; return 0; }
7578 EOF
7579 if { (eval echo configure:7580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7580   rm -rf conftest*
7581   xpm_for_msw=no
7582 else
7583   echo "configure: failed program was:" >&5
7584   cat conftest.$ac_ext >&5
7585   rm -rf conftest*
7586   xpm_for_msw=yes
7587 fi
7588 rm -f conftest*
7589     xe_check_libs=
7590     echo "$ac_t""$xpm_for_msw" 1>&6
7591     if test "$xpm_for_msw" = "yes"; then
7592       { test "$extra_verbose" = "yes" && cat << \EOF
7593     Defining FOR_MSW
7594 EOF
7595 cat >> confdefs.h <<\EOF
7596 #define FOR_MSW 1
7597 EOF
7598 }
7599
7600     fi
7601   fi
7602
7603     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7604 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7605 echo "configure:7606: checking for compface.h" >&5
7606
7607 cat > conftest.$ac_ext <<EOF
7608 #line 7609 "configure"
7609 #include "confdefs.h"
7610 #include <compface.h>
7611 EOF
7612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613 { (eval echo configure:7614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7615 if test -z "$ac_err"; then
7616   rm -rf conftest*
7617   eval "ac_cv_header_$ac_safe=yes"
7618 else
7619   echo "$ac_err" >&5
7620   echo "configure: failed program was:" >&5
7621   cat conftest.$ac_ext >&5
7622   rm -rf conftest*
7623   eval "ac_cv_header_$ac_safe=no"
7624 fi
7625 rm -f conftest*
7626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7627   echo "$ac_t""yes" 1>&6
7628   :
7629 else
7630   echo "$ac_t""no" 1>&6
7631 with_xface=no
7632 fi
7633  }
7634   test -z "$with_xface" && { 
7635 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7636 echo "configure:7637: checking for UnGenFace in -lcompface" >&5
7637 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7638
7639 xe_check_libs=" -lcompface "
7640 cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 /* Override any gcc2 internal prototype to avoid an error.  */
7644 /* We use char because int might match the return type of a gcc2
7645     builtin and then its argument prototype would still apply.  */
7646 char UnGenFace();
7647
7648 int main() {
7649 UnGenFace()
7650 ; return 0; }
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7653   rm -rf conftest*
7654   eval "ac_cv_lib_$ac_lib_var=yes"
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -rf conftest*
7659   eval "ac_cv_lib_$ac_lib_var=no"
7660 fi
7661 rm -f conftest*
7662 xe_check_libs=""
7663
7664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7665   echo "$ac_t""yes" 1>&6
7666   : 
7667 else
7668   echo "$ac_t""no" 1>&6
7669 with_xface=no
7670 fi
7671
7672  }
7673   test -z "$with_xface" && with_xface=yes
7674   if test "$with_xface" = "yes"; then
7675     { test "$extra_verbose" = "yes" && cat << \EOF
7676     Defining HAVE_XFACE
7677 EOF
7678 cat >> confdefs.h <<\EOF
7679 #define HAVE_XFACE 1
7680 EOF
7681 }
7682
7683     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7684   fi
7685
7686         if test "$with_gif" != "no"; then
7687     with_gif="yes"
7688     { test "$extra_verbose" = "yes" && cat << \EOF
7689     Defining HAVE_GIF
7690 EOF
7691 cat >> confdefs.h <<\EOF
7692 #define HAVE_GIF 1
7693 EOF
7694 }
7695
7696     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7697    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7698  fi
7699   fi
7700
7701       if test "$with_png $with_tiff" != "no no"; then
7702     
7703 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7704 echo "configure:7705: checking for inflate in -lc" >&5
7705 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7706
7707 xe_check_libs=" -lc "
7708 cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711 /* Override any gcc2 internal prototype to avoid an error.  */
7712 /* We use char because int might match the return type of a gcc2
7713     builtin and then its argument prototype would still apply.  */
7714 char inflate();
7715
7716 int main() {
7717 inflate()
7718 ; return 0; }
7719 EOF
7720 if { (eval echo configure:7721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7721   rm -rf conftest*
7722   eval "ac_cv_lib_$ac_lib_var=yes"
7723 else
7724   echo "configure: failed program was:" >&5
7725   cat conftest.$ac_ext >&5
7726   rm -rf conftest*
7727   eval "ac_cv_lib_$ac_lib_var=no"
7728 fi
7729 rm -f conftest*
7730 xe_check_libs=""
7731
7732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7733   echo "$ac_t""yes" 1>&6
7734   :
7735 else
7736   echo "$ac_t""no" 1>&6
7737
7738 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7739 echo "configure:7740: checking for inflate in -lz" >&5
7740 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7741
7742 xe_check_libs=" -lz "
7743 cat > conftest.$ac_ext <<EOF
7744 #line 7745 "configure"
7745 #include "confdefs.h"
7746 /* Override any gcc2 internal prototype to avoid an error.  */
7747 /* We use char because int might match the return type of a gcc2
7748     builtin and then its argument prototype would still apply.  */
7749 char inflate();
7750
7751 int main() {
7752 inflate()
7753 ; return 0; }
7754 EOF
7755 if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7756   rm -rf conftest*
7757   eval "ac_cv_lib_$ac_lib_var=yes"
7758 else
7759   echo "configure: failed program was:" >&5
7760   cat conftest.$ac_ext >&5
7761   rm -rf conftest*
7762   eval "ac_cv_lib_$ac_lib_var=no"
7763 fi
7764 rm -f conftest*
7765 xe_check_libs=""
7766
7767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7768   echo "$ac_t""yes" 1>&6
7769   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7770 else
7771   echo "$ac_t""no" 1>&6
7772
7773 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7774 echo "configure:7775: checking for inflate in -lgz" >&5
7775 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7776
7777 xe_check_libs=" -lgz "
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 /* Override any gcc2 internal prototype to avoid an error.  */
7782 /* We use char because int might match the return type of a gcc2
7783     builtin and then its argument prototype would still apply.  */
7784 char inflate();
7785
7786 int main() {
7787 inflate()
7788 ; return 0; }
7789 EOF
7790 if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7791   rm -rf conftest*
7792   eval "ac_cv_lib_$ac_lib_var=yes"
7793 else
7794   echo "configure: failed program was:" >&5
7795   cat conftest.$ac_ext >&5
7796   rm -rf conftest*
7797   eval "ac_cv_lib_$ac_lib_var=no"
7798 fi
7799 rm -f conftest*
7800 xe_check_libs=""
7801
7802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7803   echo "$ac_t""yes" 1>&6
7804   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7805 else
7806   echo "$ac_t""no" 1>&6
7807 fi
7808
7809
7810 fi
7811
7812
7813 fi
7814
7815
7816   fi
7817
7818     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7819 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7820 echo "configure:7821: checking for jpeglib.h" >&5
7821
7822 cat > conftest.$ac_ext <<EOF
7823 #line 7824 "configure"
7824 #include "confdefs.h"
7825 #include <jpeglib.h>
7826 EOF
7827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7828 { (eval echo configure:7829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7830 if test -z "$ac_err"; then
7831   rm -rf conftest*
7832   eval "ac_cv_header_$ac_safe=yes"
7833 else
7834   echo "$ac_err" >&5
7835   echo "configure: failed program was:" >&5
7836   cat conftest.$ac_ext >&5
7837   rm -rf conftest*
7838   eval "ac_cv_header_$ac_safe=no"
7839 fi
7840 rm -f conftest*
7841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7842   echo "$ac_t""yes" 1>&6
7843   :
7844 else
7845   echo "$ac_t""no" 1>&6
7846 with_jpeg=no
7847 fi
7848  }
7849   test -z "$with_jpeg" && { 
7850 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7851 echo "configure:7852: checking for jpeg_destroy_decompress in -ljpeg" >&5
7852 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7853
7854 xe_check_libs=" -ljpeg "
7855 cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 /* Override any gcc2 internal prototype to avoid an error.  */
7859 /* We use char because int might match the return type of a gcc2
7860     builtin and then its argument prototype would still apply.  */
7861 char jpeg_destroy_decompress();
7862
7863 int main() {
7864 jpeg_destroy_decompress()
7865 ; return 0; }
7866 EOF
7867 if { (eval echo configure:7868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7868   rm -rf conftest*
7869   eval "ac_cv_lib_$ac_lib_var=yes"
7870 else
7871   echo "configure: failed program was:" >&5
7872   cat conftest.$ac_ext >&5
7873   rm -rf conftest*
7874   eval "ac_cv_lib_$ac_lib_var=no"
7875 fi
7876 rm -f conftest*
7877 xe_check_libs=""
7878
7879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7880   echo "$ac_t""yes" 1>&6
7881   :
7882 else
7883   echo "$ac_t""no" 1>&6
7884 with_jpeg=no
7885 fi
7886
7887  }
7888   test -z "$with_jpeg" && with_jpeg=yes
7889   if test "$with_jpeg" = "yes"; then
7890     { test "$extra_verbose" = "yes" && cat << \EOF
7891     Defining HAVE_JPEG
7892 EOF
7893 cat >> confdefs.h <<\EOF
7894 #define HAVE_JPEG 1
7895 EOF
7896 }
7897
7898     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7899   fi
7900
7901     png_problem=""
7902   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7903 echo "configure:7904: checking for pow" >&5
7904
7905 cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* System header to define __stub macros and hopefully few prototypes,
7909     which can conflict with char pow(); below.  */
7910 #include <assert.h>
7911 /* Override any gcc2 internal prototype to avoid an error.  */
7912 /* We use char because int might match the return type of a gcc2
7913     builtin and then its argument prototype would still apply.  */
7914 char pow();
7915
7916 int main() {
7917
7918 /* The GNU C library defines this for functions which it implements
7919     to always fail with ENOSYS.  Some functions are actually named
7920     something starting with __ and the normal name is an alias.  */
7921 #if defined (__stub_pow) || defined (__stub___pow)
7922 choke me
7923 #else
7924 pow();
7925 #endif
7926
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   eval "ac_cv_func_pow=yes"
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_func_pow=no"
7937 fi
7938 rm -f conftest*
7939
7940 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7941   echo "$ac_t""yes" 1>&6
7942   :
7943 else
7944   echo "$ac_t""no" 1>&6
7945 with_png=no
7946 fi
7947  }
7948   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7949 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7950 echo "configure:7951: checking for png.h" >&5
7951
7952 cat > conftest.$ac_ext <<EOF
7953 #line 7954 "configure"
7954 #include "confdefs.h"
7955 #include <png.h>
7956 EOF
7957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7958 { (eval echo configure:7959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7960 if test -z "$ac_err"; then
7961   rm -rf conftest*
7962   eval "ac_cv_header_$ac_safe=yes"
7963 else
7964   echo "$ac_err" >&5
7965   echo "configure: failed program was:" >&5
7966   cat conftest.$ac_ext >&5
7967   rm -rf conftest*
7968   eval "ac_cv_header_$ac_safe=no"
7969 fi
7970 rm -f conftest*
7971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7972   echo "$ac_t""yes" 1>&6
7973   :
7974 else
7975   echo "$ac_t""no" 1>&6
7976 with_png=no
7977 fi
7978  }
7979   test -z "$with_png" && { 
7980 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7981 echo "configure:7982: checking for png_read_image in -lpng" >&5
7982 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7983
7984 xe_check_libs=" -lpng "
7985 cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988 /* Override any gcc2 internal prototype to avoid an error.  */
7989 /* We use char because int might match the return type of a gcc2
7990     builtin and then its argument prototype would still apply.  */
7991 char png_read_image();
7992
7993 int main() {
7994 png_read_image()
7995 ; return 0; }
7996 EOF
7997 if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7998   rm -rf conftest*
7999   eval "ac_cv_lib_$ac_lib_var=yes"
8000 else
8001   echo "configure: failed program was:" >&5
8002   cat conftest.$ac_ext >&5
8003   rm -rf conftest*
8004   eval "ac_cv_lib_$ac_lib_var=no"
8005 fi
8006 rm -f conftest*
8007 xe_check_libs=""
8008
8009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8010   echo "$ac_t""yes" 1>&6
8011   :
8012 else
8013   echo "$ac_t""no" 1>&6
8014 with_png=no
8015 fi
8016
8017  }
8018   if test -z "$with_png"; then
8019     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8020 echo "configure:8021: checking for workable png version information" >&5
8021     xe_check_libs="-lpng -lz"
8022     cat > conftest.$ac_ext <<EOF
8023 #line 8024 "configure"
8024 #include "confdefs.h"
8025 #include <png.h>
8026     int main(int c, char **v) {
8027     if (c == 1) return 0;
8028     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8029     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8030 EOF
8031 if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8032 then
8033   ./conftest dummy_arg; png_status=$?;
8034       if test "$png_status" = "0"; then
8035         with_png=yes;
8036       else
8037         with_png=no;
8038         if test "$png_status" = "1"; then
8039           png_problem="PNG library version and header file don't match!"
8040         elif test "$png_status" = "2"; then
8041           png_problem="PNG library version too old (pre 1.0.2)!"
8042         fi
8043         echo "
8044 *** WARNING *** $png_problem
8045   I'm not touching that with a 10-foot pole!
8046   If you really want to use the installed version of libPNG, rerun
8047   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8048     fi
8049 else
8050   conftest_rc="$?"
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -fr conftest*
8054   with_png=no
8055 fi
8056 rm -fr conftest*
8057     xe_check_libs=
8058     echo "$ac_t""$with_png" 1>&6
8059   fi
8060   if test "$with_png" = "yes"; then
8061     { test "$extra_verbose" = "yes" && cat << \EOF
8062     Defining HAVE_PNG
8063 EOF
8064 cat >> confdefs.h <<\EOF
8065 #define HAVE_PNG 1
8066 EOF
8067 }
8068
8069     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8070   fi
8071
8072     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8073 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8074 echo "configure:8075: checking for tiffio.h" >&5
8075
8076 cat > conftest.$ac_ext <<EOF
8077 #line 8078 "configure"
8078 #include "confdefs.h"
8079 #include <tiffio.h>
8080 EOF
8081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8082 { (eval echo configure:8083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8084 if test -z "$ac_err"; then
8085   rm -rf conftest*
8086   eval "ac_cv_header_$ac_safe=yes"
8087 else
8088   echo "$ac_err" >&5
8089   echo "configure: failed program was:" >&5
8090   cat conftest.$ac_ext >&5
8091   rm -rf conftest*
8092   eval "ac_cv_header_$ac_safe=no"
8093 fi
8094 rm -f conftest*
8095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8096   echo "$ac_t""yes" 1>&6
8097   :
8098 else
8099   echo "$ac_t""no" 1>&6
8100 with_tiff=no
8101 fi
8102  }
8103   test -z "$with_tiff" && { 
8104 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8105 echo "configure:8106: checking for TIFFClientOpen in -ltiff" >&5
8106 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8107
8108 xe_check_libs=" -ltiff "
8109 cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 /* Override any gcc2 internal prototype to avoid an error.  */
8113 /* We use char because int might match the return type of a gcc2
8114     builtin and then its argument prototype would still apply.  */
8115 char TIFFClientOpen();
8116
8117 int main() {
8118 TIFFClientOpen()
8119 ; return 0; }
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=yes"
8124 else
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -rf conftest*
8128   eval "ac_cv_lib_$ac_lib_var=no"
8129 fi
8130 rm -f conftest*
8131 xe_check_libs=""
8132
8133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8134   echo "$ac_t""yes" 1>&6
8135   :
8136 else
8137   echo "$ac_t""no" 1>&6
8138 with_tiff=no
8139 fi
8140
8141  }
8142   test -z "$with_tiff" && with_tiff=yes
8143   if test "$with_tiff" = "yes"; then
8144     { test "$extra_verbose" = "yes" && cat << \EOF
8145     Defining HAVE_TIFF
8146 EOF
8147 cat >> confdefs.h <<\EOF
8148 #define HAVE_TIFF 1
8149 EOF
8150 }
8151
8152     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8153   fi
8154 fi
8155
8156
8157 if test "$with_x11" = "yes"; then
8158
8159   echo "checking for X11 graphics libraries" 1>&6
8160 echo "configure:8161: checking for X11 graphics libraries" >&5
8161
8162   echo "checking for the Athena widgets" 1>&6
8163 echo "configure:8164: checking for the Athena widgets" >&5
8164
8165     case "$with_athena" in
8166         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8167     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8168     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8169     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8170     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8171     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8172   esac
8173
8174     if test "$athena_3d" = "no"; then
8175     
8176 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8177 echo "configure:8178: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8178 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8179
8180 xe_check_libs=" -l$athena_variant "
8181 cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 /* Override any gcc2 internal prototype to avoid an error.  */
8185 /* We use char because int might match the return type of a gcc2
8186     builtin and then its argument prototype would still apply.  */
8187 char XawScrollbarSetThumb();
8188
8189 int main() {
8190 XawScrollbarSetThumb()
8191 ; return 0; }
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8194   rm -rf conftest*
8195   eval "ac_cv_lib_$ac_lib_var=yes"
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199   rm -rf conftest*
8200   eval "ac_cv_lib_$ac_lib_var=no"
8201 fi
8202 rm -f conftest*
8203 xe_check_libs=""
8204
8205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8206   echo "$ac_t""yes" 1>&6
8207           
8208 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8209 echo "configure:8210: checking for threeDClassRec in -l$athena_variant" >&5
8210 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8211
8212 xe_check_libs=" -l$athena_variant "
8213 cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* Override any gcc2 internal prototype to avoid an error.  */
8217 /* We use char because int might match the return type of a gcc2
8218     builtin and then its argument prototype would still apply.  */
8219 char threeDClassRec();
8220
8221 int main() {
8222 threeDClassRec()
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=yes"
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=no"
8233 fi
8234 rm -f conftest*
8235 xe_check_libs=""
8236
8237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8238   echo "$ac_t""yes" 1>&6
8239   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8240 else
8241   echo "$ac_t""no" 1>&6
8242 athena_lib=$athena_variant
8243 fi
8244
8245
8246       
8247 else
8248   echo "$ac_t""no" 1>&6
8249 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8250 fi
8251
8252
8253   else
8254         
8255 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8256 echo "configure:8257: checking for threeDClassRec in -l$athena_variant" >&5
8257 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8258
8259 xe_check_libs=" -l$athena_variant "
8260 cat > conftest.$ac_ext <<EOF
8261 #line 8262 "configure"
8262 #include "confdefs.h"
8263 /* Override any gcc2 internal prototype to avoid an error.  */
8264 /* We use char because int might match the return type of a gcc2
8265     builtin and then its argument prototype would still apply.  */
8266 char threeDClassRec();
8267
8268 int main() {
8269 threeDClassRec()
8270 ; return 0; }
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=yes"
8275 else
8276   echo "configure: failed program was:" >&5
8277   cat conftest.$ac_ext >&5
8278   rm -rf conftest*
8279   eval "ac_cv_lib_$ac_lib_var=no"
8280 fi
8281 rm -f conftest*
8282 xe_check_libs=""
8283
8284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8285   echo "$ac_t""yes" 1>&6
8286   athena_lib=$athena_variant
8287 else
8288   echo "$ac_t""no" 1>&6
8289 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8290 echo "configure:8291: checking for threeDClassRec in -lXaw" >&5
8291 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8292
8293 xe_check_libs=" -lXaw "
8294 cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297 /* Override any gcc2 internal prototype to avoid an error.  */
8298 /* We use char because int might match the return type of a gcc2
8299     builtin and then its argument prototype would still apply.  */
8300 char threeDClassRec();
8301
8302 int main() {
8303 threeDClassRec()
8304 ; return 0; }
8305 EOF
8306 if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=yes"
8309 else
8310   echo "configure: failed program was:" >&5
8311   cat conftest.$ac_ext >&5
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=no"
8314 fi
8315 rm -f conftest*
8316 xe_check_libs=""
8317
8318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8319   echo "$ac_t""yes" 1>&6
8320   athena_lib=Xaw;
8321           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8322         
8323 else
8324   echo "$ac_t""no" 1>&6
8325 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8326 fi
8327
8328
8329 fi
8330
8331
8332   fi
8333
8334     if test "$athena_3d" = "no"; then
8335     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8336 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8337 echo "configure:8338: checking for X11/Xaw/ThreeD.h" >&5
8338
8339 cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 #include <X11/Xaw/ThreeD.h>
8343 EOF
8344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8345 { (eval echo configure:8346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8347 if test -z "$ac_err"; then
8348   rm -rf conftest*
8349   eval "ac_cv_header_$ac_safe=yes"
8350 else
8351   echo "$ac_err" >&5
8352   echo "configure: failed program was:" >&5
8353   cat conftest.$ac_ext >&5
8354   rm -rf conftest*
8355   eval "ac_cv_header_$ac_safe=no"
8356 fi
8357 rm -f conftest*
8358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8359   echo "$ac_t""yes" 1>&6
8360   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8361 else
8362   echo "$ac_t""no" 1>&6
8363 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8364 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8365 echo "configure:8366: checking for X11/Xaw/XawInit.h" >&5
8366
8367 cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 #include <X11/Xaw/XawInit.h>
8371 EOF
8372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8373 { (eval echo configure:8374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8375 if test -z "$ac_err"; then
8376   rm -rf conftest*
8377   eval "ac_cv_header_$ac_safe=yes"
8378 else
8379   echo "$ac_err" >&5
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -rf conftest*
8383   eval "ac_cv_header_$ac_safe=no"
8384 fi
8385 rm -f conftest*
8386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8387   echo "$ac_t""yes" 1>&6
8388   athena_h_path=X11/Xaw
8389 else
8390   echo "$ac_t""no" 1>&6
8391 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8392 fi
8393
8394 fi
8395
8396   else
8397             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8398 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8399 echo "configure:8400: checking for X11/$athena_variant/XawInit.h" >&5
8400
8401 cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404 #include <X11/$athena_variant/XawInit.h>
8405 EOF
8406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8407 { (eval echo configure:8408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8409 if test -z "$ac_err"; then
8410   rm -rf conftest*
8411   eval "ac_cv_header_$ac_safe=yes"
8412 else
8413   echo "$ac_err" >&5
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   eval "ac_cv_header_$ac_safe=no"
8418 fi
8419 rm -f conftest*
8420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8421   echo "$ac_t""yes" 1>&6
8422   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8423 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8424 echo "configure:8425: checking for X11/$athena_variant/ThreeD.h" >&5
8425
8426 cat > conftest.$ac_ext <<EOF
8427 #line 8428 "configure"
8428 #include "confdefs.h"
8429 #include <X11/$athena_variant/ThreeD.h>
8430 EOF
8431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8432 { (eval echo configure:8433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8434 if test -z "$ac_err"; then
8435   rm -rf conftest*
8436   eval "ac_cv_header_$ac_safe=yes"
8437 else
8438   echo "$ac_err" >&5
8439   echo "configure: failed program was:" >&5
8440   cat conftest.$ac_ext >&5
8441   rm -rf conftest*
8442   eval "ac_cv_header_$ac_safe=no"
8443 fi
8444 rm -f conftest*
8445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8446   echo "$ac_t""yes" 1>&6
8447   athena_h_path=X11/$athena_variant
8448 else
8449   echo "$ac_t""no" 1>&6
8450 fi
8451
8452 else
8453   echo "$ac_t""no" 1>&6
8454 fi
8455
8456
8457         if test -z "$athena_h_path"; then
8458       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8459 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8460 echo "configure:8461: checking for $athena_variant/XawInit.h" >&5
8461
8462 cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 #include <$athena_variant/XawInit.h>
8466 EOF
8467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8468 { (eval echo configure:8469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8470 if test -z "$ac_err"; then
8471   rm -rf conftest*
8472   eval "ac_cv_header_$ac_safe=yes"
8473 else
8474   echo "$ac_err" >&5
8475   echo "configure: failed program was:" >&5
8476   cat conftest.$ac_ext >&5
8477   rm -rf conftest*
8478   eval "ac_cv_header_$ac_safe=no"
8479 fi
8480 rm -f conftest*
8481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8482   echo "$ac_t""yes" 1>&6
8483   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8484 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8485 echo "configure:8486: checking for $athena_variant/ThreeD.h" >&5
8486
8487 cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <$athena_variant/ThreeD.h>
8491 EOF
8492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8493 { (eval echo configure:8494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8495 if test -z "$ac_err"; then
8496   rm -rf conftest*
8497   eval "ac_cv_header_$ac_safe=yes"
8498 else
8499   echo "$ac_err" >&5
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   eval "ac_cv_header_$ac_safe=no"
8504 fi
8505 rm -f conftest*
8506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8507   echo "$ac_t""yes" 1>&6
8508   athena_h_path=$athena_variant
8509 else
8510   echo "$ac_t""no" 1>&6
8511 fi
8512
8513 else
8514   echo "$ac_t""no" 1>&6
8515 fi
8516
8517     fi
8518
8519         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8520       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8521 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8522 echo "configure:8523: checking for X11/Xaw3d/XawInit.h" >&5
8523
8524 cat > conftest.$ac_ext <<EOF
8525 #line 8526 "configure"
8526 #include "confdefs.h"
8527 #include <X11/Xaw3d/XawInit.h>
8528 EOF
8529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8530 { (eval echo configure:8531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8532 if test -z "$ac_err"; then
8533   rm -rf conftest*
8534   eval "ac_cv_header_$ac_safe=yes"
8535 else
8536   echo "$ac_err" >&5
8537   echo "configure: failed program was:" >&5
8538   cat conftest.$ac_ext >&5
8539   rm -rf conftest*
8540   eval "ac_cv_header_$ac_safe=no"
8541 fi
8542 rm -f conftest*
8543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8544   echo "$ac_t""yes" 1>&6
8545   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8546 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8547 echo "configure:8548: checking for X11/Xaw3d/ThreeD.h" >&5
8548
8549 cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 #include <X11/Xaw3d/ThreeD.h>
8553 EOF
8554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8555 { (eval echo configure:8556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8557 if test -z "$ac_err"; then
8558   rm -rf conftest*
8559   eval "ac_cv_header_$ac_safe=yes"
8560 else
8561   echo "$ac_err" >&5
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   eval "ac_cv_header_$ac_safe=no"
8566 fi
8567 rm -f conftest*
8568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570   
8571             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8572             athena_h_path=X11/Xaw3d
8573           
8574 else
8575   echo "$ac_t""no" 1>&6
8576 fi
8577
8578 else
8579   echo "$ac_t""no" 1>&6
8580 fi
8581
8582     fi
8583
8584         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8585       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8586 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8587 echo "configure:8588: checking for Xaw3d/XawInit.h" >&5
8588
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 #include <Xaw3d/XawInit.h>
8593 EOF
8594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8595 { (eval echo configure:8596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8597 if test -z "$ac_err"; then
8598   rm -rf conftest*
8599   eval "ac_cv_header_$ac_safe=yes"
8600 else
8601   echo "$ac_err" >&5
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604   rm -rf conftest*
8605   eval "ac_cv_header_$ac_safe=no"
8606 fi
8607 rm -f conftest*
8608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8609   echo "$ac_t""yes" 1>&6
8610   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8611 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8612 echo "configure:8613: checking for Xaw3d/ThreeD.h" >&5
8613
8614 cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617 #include <Xaw3d/ThreeD.h>
8618 EOF
8619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8620 { (eval echo configure:8621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8622 if test -z "$ac_err"; then
8623   rm -rf conftest*
8624   eval "ac_cv_header_$ac_safe=yes"
8625 else
8626   echo "$ac_err" >&5
8627   echo "configure: failed program was:" >&5
8628   cat conftest.$ac_ext >&5
8629   rm -rf conftest*
8630   eval "ac_cv_header_$ac_safe=no"
8631 fi
8632 rm -f conftest*
8633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8634   echo "$ac_t""yes" 1>&6
8635   
8636             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8637             athena_h_path=Xaw3d
8638           
8639 else
8640   echo "$ac_t""no" 1>&6
8641 fi
8642
8643 else
8644   echo "$ac_t""no" 1>&6
8645 fi
8646
8647     fi
8648
8649             if test -z "$athena_h_path"; then
8650       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8651 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8652 echo "configure:8653: checking for X11/Xaw/ThreeD.h" >&5
8653
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 #include <X11/Xaw/ThreeD.h>
8658 EOF
8659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8660 { (eval echo configure:8661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8662 if test -z "$ac_err"; then
8663   rm -rf conftest*
8664   eval "ac_cv_header_$ac_safe=yes"
8665 else
8666   echo "$ac_err" >&5
8667   echo "configure: failed program was:" >&5
8668   cat conftest.$ac_ext >&5
8669   rm -rf conftest*
8670   eval "ac_cv_header_$ac_safe=no"
8671 fi
8672 rm -f conftest*
8673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8674   echo "$ac_t""yes" 1>&6
8675   
8676           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8677           athena_h_path=X11/Xaw
8678         
8679 else
8680   echo "$ac_t""no" 1>&6
8681 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8682 fi
8683
8684     fi
8685   fi
8686
8687     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8688     have_xaw=yes
8689   else
8690     have_xaw=no
8691   fi
8692
8693     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8694 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8695 echo "configure:8696: checking for Xm/Xm.h" >&5
8696
8697 cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 #include <Xm/Xm.h>
8701 EOF
8702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8703 { (eval echo configure:8704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8705 if test -z "$ac_err"; then
8706   rm -rf conftest*
8707   eval "ac_cv_header_$ac_safe=yes"
8708 else
8709   echo "$ac_err" >&5
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -rf conftest*
8713   eval "ac_cv_header_$ac_safe=no"
8714 fi
8715 rm -f conftest*
8716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8717   echo "$ac_t""yes" 1>&6
8718   
8719 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8720 echo "configure:8721: checking for XmStringFree in -lXm" >&5
8721 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8722
8723 xe_check_libs=" -lXm "
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 /* Override any gcc2 internal prototype to avoid an error.  */
8728 /* We use char because int might match the return type of a gcc2
8729     builtin and then its argument prototype would still apply.  */
8730 char XmStringFree();
8731
8732 int main() {
8733 XmStringFree()
8734 ; return 0; }
8735 EOF
8736 if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8737   rm -rf conftest*
8738   eval "ac_cv_lib_$ac_lib_var=yes"
8739 else
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_lib_$ac_lib_var=no"
8744 fi
8745 rm -f conftest*
8746 xe_check_libs=""
8747
8748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8749   echo "$ac_t""yes" 1>&6
8750   have_motif=yes
8751 else
8752   echo "$ac_t""no" 1>&6
8753 have_motif=no
8754 fi
8755
8756
8757 else
8758   echo "$ac_t""no" 1>&6
8759 have_motif=no
8760 fi
8761
8762
8763   if test "$have_motif" = "yes"; then
8764         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8765 echo "configure:8766: checking for Lesstif" >&5
8766     cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <Xm/Xm.h>
8770 #ifdef LESSTIF_VERSION
8771 yes
8772 #endif
8773
8774 EOF
8775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8776   egrep "yes" >/dev/null 2>&1; then
8777   rm -rf conftest*
8778   have_lesstif=yes
8779 else
8780   rm -rf conftest*
8781   have_lesstif=no
8782 fi
8783 rm -f conftest*
8784
8785   echo "$ac_t""$have_lesstif" 1>&6
8786   fi
8787
8788 fi 
8789
8790 case "$with_menubars" in "" | "yes" | "athena" )
8791   with_menubars="lucid" ;;
8792 esac
8793 case "$with_dialogs" in "" | "yes" | "lucid" )
8794   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8795   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8796   else with_dialogs=no
8797   fi ;;
8798 esac
8799 case "$with_scrollbars" in "" | "yes" )
8800   with_scrollbars="lucid" ;;
8801 esac
8802 case "$with_widgets" in "" | "yes" | "lucid")
8803   if   test "$have_motif" = "yes"; then with_widgets="motif"
8804   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8805   else with_widgets=no
8806   fi ;;
8807 esac
8808
8809 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8810
8811 case "$all_widgets" in
8812   *athena* )
8813     if test "$have_xaw" != "yes"; then
8814       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8815     fi
8816
8817         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8818
8819         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8820
8821             { test "$extra_verbose" = "yes" && cat << EOF
8822     Defining ATHENA_H_PATH = $athena_h_path
8823 EOF
8824 cat >> confdefs.h <<EOF
8825 #define ATHENA_H_PATH $athena_h_path
8826 EOF
8827 }
8828
8829
8830     { test "$extra_verbose" = "yes" && cat << \EOF
8831     Defining LWLIB_USES_ATHENA
8832 EOF
8833 cat >> confdefs.h <<\EOF
8834 #define LWLIB_USES_ATHENA 1
8835 EOF
8836 }
8837
8838     { test "$extra_verbose" = "yes" && cat << \EOF
8839     Defining NEED_ATHENA
8840 EOF
8841 cat >> confdefs.h <<\EOF
8842 #define NEED_ATHENA 1
8843 EOF
8844 }
8845
8846
8847     if test "$athena_3d" = "yes"; then
8848       { test "$extra_verbose" = "yes" && cat << \EOF
8849     Defining HAVE_ATHENA_3D
8850 EOF
8851 cat >> confdefs.h <<\EOF
8852 #define HAVE_ATHENA_3D 1
8853 EOF
8854 }
8855
8856     fi
8857   ;;
8858 esac
8859
8860 case "$all_widgets" in *motif* )
8861   { test "$extra_verbose" = "yes" && cat << \EOF
8862     Defining LWLIB_USES_MOTIF
8863 EOF
8864 cat >> confdefs.h <<\EOF
8865 #define LWLIB_USES_MOTIF 1
8866 EOF
8867 }
8868
8869   { test "$extra_verbose" = "yes" && cat << \EOF
8870     Defining NEED_MOTIF
8871 EOF
8872 cat >> confdefs.h <<\EOF
8873 #define NEED_MOTIF 1
8874 EOF
8875 }
8876
8877   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8878   need_motif=yes ;;
8879 esac
8880
8881 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8882 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8883 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8884 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8885         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8886 case "$with_widgets" in athena* )
8887         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;;
8888 esac
8889 case "$all_widgets" in *lucid* )
8890   { test "$extra_verbose" = "yes" && cat << \EOF
8891     Defining NEED_LUCID
8892 EOF
8893 cat >> confdefs.h <<\EOF
8894 #define NEED_LUCID 1
8895 EOF
8896 }
8897
8898   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8899 esac
8900
8901
8902
8903 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8904     Defining LWLIB_SCROLLBARS_ATHENA
8905 EOF
8906 cat >> confdefs.h <<\EOF
8907 #define LWLIB_SCROLLBARS_ATHENA 1
8908 EOF
8909 }
8910
8911 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8912     Defining LWLIB_DIALOGS_ATHENA
8913 EOF
8914 cat >> confdefs.h <<\EOF
8915 #define LWLIB_DIALOGS_ATHENA 1
8916 EOF
8917 }
8918
8919
8920 if test "$athena_3d" = "yes"; then
8921   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8922     Defining LWLIB_SCROLLBARS_ATHENA3D
8923 EOF
8924 cat >> confdefs.h <<\EOF
8925 #define LWLIB_SCROLLBARS_ATHENA3D 1
8926 EOF
8927 }
8928
8929   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8930     Defining LWLIB_DIALOGS_ATHENA3D
8931 EOF
8932 cat >> confdefs.h <<\EOF
8933 #define LWLIB_DIALOGS_ATHENA3D 1
8934 EOF
8935 }
8936
8937 fi
8938
8939 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8940     Defining LWLIB_WIDGETS_ATHENA
8941 EOF
8942 cat >> confdefs.h <<\EOF
8943 #define LWLIB_WIDGETS_ATHENA 1
8944 EOF
8945 }
8946 ;; esac
8947 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8948         { test "$extra_verbose" = "yes" && cat << \EOF
8949     Defining LWLIB_TABS_LUCID
8950 EOF
8951 cat >> confdefs.h <<\EOF
8952 #define LWLIB_TABS_LUCID 1
8953 EOF
8954 }
8955
8956
8957 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8958     Defining HAVE_MENUBARS
8959 EOF
8960 cat >> confdefs.h <<\EOF
8961 #define HAVE_MENUBARS 1
8962 EOF
8963 }
8964
8965 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8966     Defining HAVE_SCROLLBARS
8967 EOF
8968 cat >> confdefs.h <<\EOF
8969 #define HAVE_SCROLLBARS 1
8970 EOF
8971 }
8972
8973 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8974     Defining HAVE_DIALOGS
8975 EOF
8976 cat >> confdefs.h <<\EOF
8977 #define HAVE_DIALOGS 1
8978 EOF
8979 }
8980
8981 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8982     Defining HAVE_TOOLBARS
8983 EOF
8984 cat >> confdefs.h <<\EOF
8985 #define HAVE_TOOLBARS 1
8986 EOF
8987 }
8988
8989 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8990     Defining HAVE_WIDGETS
8991 EOF
8992 cat >> confdefs.h <<\EOF
8993 #define HAVE_WIDGETS 1
8994 EOF
8995 }
8996
8997
8998 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8999     Defining LWLIB_MENUBARS_LUCID
9000 EOF
9001 cat >> confdefs.h <<\EOF
9002 #define LWLIB_MENUBARS_LUCID 1
9003 EOF
9004 }
9005
9006 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9007     Defining LWLIB_SCROLLBARS_LUCID
9008 EOF
9009 cat >> confdefs.h <<\EOF
9010 #define LWLIB_SCROLLBARS_LUCID 1
9011 EOF
9012 }
9013
9014
9015 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9016     Defining LWLIB_MENUBARS_MOTIF
9017 EOF
9018 cat >> confdefs.h <<\EOF
9019 #define LWLIB_MENUBARS_MOTIF 1
9020 EOF
9021 }
9022
9023 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9024     Defining LWLIB_SCROLLBARS_MOTIF
9025 EOF
9026 cat >> confdefs.h <<\EOF
9027 #define LWLIB_SCROLLBARS_MOTIF 1
9028 EOF
9029 }
9030
9031 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9032     Defining LWLIB_DIALOGS_MOTIF
9033 EOF
9034 cat >> confdefs.h <<\EOF
9035 #define LWLIB_DIALOGS_MOTIF 1
9036 EOF
9037 }
9038
9039 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9040     Defining LWLIB_WIDGETS_MOTIF
9041 EOF
9042 cat >> confdefs.h <<\EOF
9043 #define LWLIB_WIDGETS_MOTIF 1
9044 EOF
9045 }
9046
9047
9048 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9049    echo "    xemacs will be linked with \"menubar.o\""
9050  fi
9051 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9052    echo "    xemacs will be linked with \"scrollbar.o\""
9053  fi
9054 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9055    echo "    xemacs will be linked with \"dialog.o\""
9056  fi
9057 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9058    echo "    xemacs will be linked with \"toolbar.o\""
9059  fi
9060
9061 if test "$with_x11" = "yes"; then
9062   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9063    echo "    xemacs will be linked with \"menubar-x.o\""
9064  fi
9065   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9066    echo "    xemacs will be linked with \"scrollbar-x.o\""
9067  fi
9068   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9069    echo "    xemacs will be linked with \"dialog-x.o\""
9070  fi
9071   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9072    echo "    xemacs will be linked with \"toolbar-x.o\""
9073  fi
9074   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9075    echo "    xemacs will be linked with \"gui-x.o\""
9076  fi
9077 fi
9078
9079
9080 test -z "$with_mule" && with_mule=no
9081 test -z "$with_file_coding" && with_file_coding=no
9082
9083
9084 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9085   { test "$extra_verbose" = "yes" && cat << \EOF
9086     Defining FILE_CODING
9087 EOF
9088 cat >> confdefs.h <<\EOF
9089 #define FILE_CODING 1
9090 EOF
9091 }
9092
9093   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9094    echo "    xemacs will be linked with \"file-coding.o\""
9095  fi
9096 fi
9097
9098 if test "$with_mule" = "yes" ; then
9099   echo "checking for Mule-related features" 1>&6
9100 echo "configure:9101: checking for Mule-related features" >&5
9101   { test "$extra_verbose" = "yes" && cat << \EOF
9102     Defining MULE
9103 EOF
9104 cat >> confdefs.h <<\EOF
9105 #define MULE 1
9106 EOF
9107 }
9108
9109   { test "$extra_verbose" = "yes" && cat << \EOF
9110     Defining FILE_CODING
9111 EOF
9112 cat >> confdefs.h <<\EOF
9113 #define FILE_CODING 1
9114 EOF
9115 }
9116
9117   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9118    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9119  fi
9120
9121     for ac_hdr in libintl.h
9122 do
9123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9125 echo "configure:9126: checking for $ac_hdr" >&5
9126
9127 cat > conftest.$ac_ext <<EOF
9128 #line 9129 "configure"
9129 #include "confdefs.h"
9130 #include <$ac_hdr>
9131 EOF
9132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9133 { (eval echo configure:9134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9135 if test -z "$ac_err"; then
9136   rm -rf conftest*
9137   eval "ac_cv_header_$ac_safe=yes"
9138 else
9139   echo "$ac_err" >&5
9140   echo "configure: failed program was:" >&5
9141   cat conftest.$ac_ext >&5
9142   rm -rf conftest*
9143   eval "ac_cv_header_$ac_safe=no"
9144 fi
9145 rm -f conftest*
9146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9147   echo "$ac_t""yes" 1>&6
9148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9149   { test "$extra_verbose" = "yes" && cat << EOF
9150     Defining $ac_tr_hdr
9151 EOF
9152 cat >> confdefs.h <<EOF
9153 #define $ac_tr_hdr 1
9154 EOF
9155 }
9156  
9157 else
9158   echo "$ac_t""no" 1>&6
9159 fi
9160 done
9161
9162   
9163 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9164 echo "configure:9165: checking for strerror in -lintl" >&5
9165 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9166
9167 xe_check_libs=" -lintl "
9168 cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* Override any gcc2 internal prototype to avoid an error.  */
9172 /* We use char because int might match the return type of a gcc2
9173     builtin and then its argument prototype would still apply.  */
9174 char strerror();
9175
9176 int main() {
9177 strerror()
9178 ; return 0; }
9179 EOF
9180 if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9181   rm -rf conftest*
9182   eval "ac_cv_lib_$ac_lib_var=yes"
9183 else
9184   echo "configure: failed program was:" >&5
9185   cat conftest.$ac_ext >&5
9186   rm -rf conftest*
9187   eval "ac_cv_lib_$ac_lib_var=no"
9188 fi
9189 rm -f conftest*
9190 xe_check_libs=""
9191
9192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9193   echo "$ac_t""yes" 1>&6
9194     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9195     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9196   { test "$extra_verbose" = "yes" && cat << EOF
9197     Defining $ac_tr_lib
9198 EOF
9199 cat >> confdefs.h <<EOF
9200 #define $ac_tr_lib 1
9201 EOF
9202 }
9203
9204   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9205
9206 else
9207   echo "$ac_t""no" 1>&6
9208 fi
9209
9210
9211
9212   echo "checking for Mule input methods" 1>&6
9213 echo "configure:9214: checking for Mule input methods" >&5
9214         case "$with_xim" in "" | "yes" )
9215     echo "checking for XIM" 1>&6
9216 echo "configure:9217: checking for XIM" >&5
9217     
9218 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9219 echo "configure:9220: checking for XOpenIM in -lX11" >&5
9220 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9221
9222 xe_check_libs=" -lX11 "
9223 cat > conftest.$ac_ext <<EOF
9224 #line 9225 "configure"
9225 #include "confdefs.h"
9226 /* Override any gcc2 internal prototype to avoid an error.  */
9227 /* We use char because int might match the return type of a gcc2
9228     builtin and then its argument prototype would still apply.  */
9229 char XOpenIM();
9230
9231 int main() {
9232 XOpenIM()
9233 ; return 0; }
9234 EOF
9235 if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9236   rm -rf conftest*
9237   eval "ac_cv_lib_$ac_lib_var=yes"
9238 else
9239   echo "configure: failed program was:" >&5
9240   cat conftest.$ac_ext >&5
9241   rm -rf conftest*
9242   eval "ac_cv_lib_$ac_lib_var=no"
9243 fi
9244 rm -f conftest*
9245 xe_check_libs=""
9246
9247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9248   echo "$ac_t""yes" 1>&6
9249   with_xim=xlib
9250 else
9251   echo "$ac_t""no" 1>&6
9252 with_xim=no
9253 fi
9254
9255
9256         if test "$have_motif $have_lesstif" = "yes no"; then
9257       
9258 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9259 echo "configure:9260: checking for XmImMbLookupString in -lXm" >&5
9260 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9261
9262 xe_check_libs=" -lXm "
9263 cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 /* Override any gcc2 internal prototype to avoid an error.  */
9267 /* We use char because int might match the return type of a gcc2
9268     builtin and then its argument prototype would still apply.  */
9269 char XmImMbLookupString();
9270
9271 int main() {
9272 XmImMbLookupString()
9273 ; return 0; }
9274 EOF
9275 if { (eval echo configure:9276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9276   rm -rf conftest*
9277   eval "ac_cv_lib_$ac_lib_var=yes"
9278 else
9279   echo "configure: failed program was:" >&5
9280   cat conftest.$ac_ext >&5
9281   rm -rf conftest*
9282   eval "ac_cv_lib_$ac_lib_var=no"
9283 fi
9284 rm -f conftest*
9285 xe_check_libs=""
9286
9287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9288   echo "$ac_t""yes" 1>&6
9289   with_xim=motif
9290 else
9291   echo "$ac_t""no" 1>&6
9292 fi
9293
9294
9295     fi ;;
9296   esac
9297   if test "$with_xim" != "no"; then
9298     { test "$extra_verbose" = "yes" && cat << \EOF
9299     Defining HAVE_XIM
9300 EOF
9301 cat >> confdefs.h <<\EOF
9302 #define HAVE_XIM 1
9303 EOF
9304 }
9305
9306     if test "$with_xim" = "xlib"; then
9307       { test "$extra_verbose" = "yes" && cat << \EOF
9308     Defining XIM_XLIB
9309 EOF
9310 cat >> confdefs.h <<\EOF
9311 #define XIM_XLIB 1
9312 EOF
9313 }
9314
9315       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9316    echo "    xemacs will be linked with \"input-method-xlib.o\""
9317  fi
9318     fi
9319     if test "$with_xim" = "motif"; then
9320       { test "$extra_verbose" = "yes" && cat << \EOF
9321     Defining XIM_MOTIF
9322 EOF
9323 cat >> confdefs.h <<\EOF
9324 #define XIM_MOTIF 1
9325 EOF
9326 }
9327
9328       need_motif=yes
9329       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9330    echo "    xemacs will be linked with \"input-method-motif.o\""
9331  fi
9332     fi
9333     if test "$with_xim" = "motif"; then
9334       with_xfs=no
9335     fi
9336   fi
9337
9338     if test "$with_xfs" = "yes" ; then
9339     echo "checking for XFontSet" 1>&6
9340 echo "configure:9341: checking for XFontSet" >&5
9341     
9342 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9343 echo "configure:9344: checking for XmbDrawString in -lX11" >&5
9344 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9345
9346 xe_check_libs=" -lX11 "
9347 cat > conftest.$ac_ext <<EOF
9348 #line 9349 "configure"
9349 #include "confdefs.h"
9350 /* Override any gcc2 internal prototype to avoid an error.  */
9351 /* We use char because int might match the return type of a gcc2
9352     builtin and then its argument prototype would still apply.  */
9353 char XmbDrawString();
9354
9355 int main() {
9356 XmbDrawString()
9357 ; return 0; }
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9360   rm -rf conftest*
9361   eval "ac_cv_lib_$ac_lib_var=yes"
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -rf conftest*
9366   eval "ac_cv_lib_$ac_lib_var=no"
9367 fi
9368 rm -f conftest*
9369 xe_check_libs=""
9370
9371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9372   echo "$ac_t""yes" 1>&6
9373   :
9374 else
9375   echo "$ac_t""no" 1>&6
9376 with_xfs=no
9377 fi
9378
9379
9380     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9381       { test "$extra_verbose" = "yes" && cat << \EOF
9382     Defining USE_XFONTSET
9383 EOF
9384 cat >> confdefs.h <<\EOF
9385 #define USE_XFONTSET 1
9386 EOF
9387 }
9388
9389       if test "$with_xim" = "no" ; then
9390         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9391    echo "    xemacs will be linked with \"input-method-xfs.o\""
9392  fi
9393       fi
9394     fi
9395   fi 
9396     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9397   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9398 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9399 echo "configure:9400: checking for wnn/jllib.h" >&5
9400
9401 cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404 #include <wnn/jllib.h>
9405 EOF
9406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9407 { (eval echo configure:9408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9409 if test -z "$ac_err"; then
9410   rm -rf conftest*
9411   eval "ac_cv_header_$ac_safe=yes"
9412 else
9413   echo "$ac_err" >&5
9414   echo "configure: failed program was:" >&5
9415   cat conftest.$ac_ext >&5
9416   rm -rf conftest*
9417   eval "ac_cv_header_$ac_safe=no"
9418 fi
9419 rm -f conftest*
9420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9421   echo "$ac_t""yes" 1>&6
9422   :
9423 else
9424   echo "$ac_t""no" 1>&6
9425 with_wnn=no
9426 fi
9427  }
9428     if test "$with_wnn" != "no"; then
9429     for ac_func in crypt
9430 do
9431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9432 echo "configure:9433: checking for $ac_func" >&5
9433
9434 cat > conftest.$ac_ext <<EOF
9435 #line 9436 "configure"
9436 #include "confdefs.h"
9437 /* System header to define __stub macros and hopefully few prototypes,
9438     which can conflict with char $ac_func(); below.  */
9439 #include <assert.h>
9440 /* Override any gcc2 internal prototype to avoid an error.  */
9441 /* We use char because int might match the return type of a gcc2
9442     builtin and then its argument prototype would still apply.  */
9443 char $ac_func();
9444
9445 int main() {
9446
9447 /* The GNU C library defines this for functions which it implements
9448     to always fail with ENOSYS.  Some functions are actually named
9449     something starting with __ and the normal name is an alias.  */
9450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9451 choke me
9452 #else
9453 $ac_func();
9454 #endif
9455
9456 ; return 0; }
9457 EOF
9458 if { (eval echo configure:9459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9459   rm -rf conftest*
9460   eval "ac_cv_func_$ac_func=yes"
9461 else
9462   echo "configure: failed program was:" >&5
9463   cat conftest.$ac_ext >&5
9464   rm -rf conftest*
9465   eval "ac_cv_func_$ac_func=no"
9466 fi
9467 rm -f conftest*
9468
9469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9470   echo "$ac_t""yes" 1>&6
9471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9472   { test "$extra_verbose" = "yes" && cat << EOF
9473     Defining $ac_tr_func
9474 EOF
9475 cat >> confdefs.h <<EOF
9476 #define $ac_tr_func 1
9477 EOF
9478 }
9479  
9480 else
9481   echo "$ac_t""no" 1>&6
9482 fi
9483 done
9484
9485     test "$ac_cv_func_crypt" != "yes" && { 
9486 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9487 echo "configure:9488: checking for crypt in -lcrypt" >&5
9488 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9489
9490 xe_check_libs=" -lcrypt "
9491 cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 /* Override any gcc2 internal prototype to avoid an error.  */
9495 /* We use char because int might match the return type of a gcc2
9496     builtin and then its argument prototype would still apply.  */
9497 char crypt();
9498
9499 int main() {
9500 crypt()
9501 ; return 0; }
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9504   rm -rf conftest*
9505   eval "ac_cv_lib_$ac_lib_var=yes"
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   eval "ac_cv_lib_$ac_lib_var=no"
9511 fi
9512 rm -f conftest*
9513 xe_check_libs=""
9514
9515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9516   echo "$ac_t""yes" 1>&6
9517     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9518     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9519   { test "$extra_verbose" = "yes" && cat << EOF
9520     Defining $ac_tr_lib
9521 EOF
9522 cat >> confdefs.h <<EOF
9523 #define $ac_tr_lib 1
9524 EOF
9525 }
9526
9527   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9528
9529 else
9530   echo "$ac_t""no" 1>&6
9531 fi
9532
9533  }
9534   fi
9535     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9536     
9537 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9538 echo "configure:9539: checking for jl_dic_list_e in -lwnn" >&5
9539 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9540
9541 xe_check_libs=" -lwnn "
9542 cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 /* Override any gcc2 internal prototype to avoid an error.  */
9546 /* We use char because int might match the return type of a gcc2
9547     builtin and then its argument prototype would still apply.  */
9548 char jl_dic_list_e();
9549
9550 int main() {
9551 jl_dic_list_e()
9552 ; return 0; }
9553 EOF
9554 if { (eval echo configure:9555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9555   rm -rf conftest*
9556   eval "ac_cv_lib_$ac_lib_var=yes"
9557 else
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   eval "ac_cv_lib_$ac_lib_var=no"
9562 fi
9563 rm -f conftest*
9564 xe_check_libs=""
9565
9566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9567   echo "$ac_t""yes" 1>&6
9568   libwnn=wnn
9569 else
9570   echo "$ac_t""no" 1>&6
9571 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9572 echo "configure:9573: checking for jl_dic_list_e in -lwnn4" >&5
9573 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9574
9575 xe_check_libs=" -lwnn4 "
9576 cat > conftest.$ac_ext <<EOF
9577 #line 9578 "configure"
9578 #include "confdefs.h"
9579 /* Override any gcc2 internal prototype to avoid an error.  */
9580 /* We use char because int might match the return type of a gcc2
9581     builtin and then its argument prototype would still apply.  */
9582 char jl_dic_list_e();
9583
9584 int main() {
9585 jl_dic_list_e()
9586 ; return 0; }
9587 EOF
9588 if { (eval echo configure:9589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9589   rm -rf conftest*
9590   eval "ac_cv_lib_$ac_lib_var=yes"
9591 else
9592   echo "configure: failed program was:" >&5
9593   cat conftest.$ac_ext >&5
9594   rm -rf conftest*
9595   eval "ac_cv_lib_$ac_lib_var=no"
9596 fi
9597 rm -f conftest*
9598 xe_check_libs=""
9599
9600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9601   echo "$ac_t""yes" 1>&6
9602   libwnn=wnn4
9603 else
9604   echo "$ac_t""no" 1>&6
9605 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9606 echo "configure:9607: checking for jl_dic_list_e in -lwnn6" >&5
9607 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9608
9609 xe_check_libs=" -lwnn6 "
9610 cat > conftest.$ac_ext <<EOF
9611 #line 9612 "configure"
9612 #include "confdefs.h"
9613 /* Override any gcc2 internal prototype to avoid an error.  */
9614 /* We use char because int might match the return type of a gcc2
9615     builtin and then its argument prototype would still apply.  */
9616 char jl_dic_list_e();
9617
9618 int main() {
9619 jl_dic_list_e()
9620 ; return 0; }
9621 EOF
9622 if { (eval echo configure:9623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9623   rm -rf conftest*
9624   eval "ac_cv_lib_$ac_lib_var=yes"
9625 else
9626   echo "configure: failed program was:" >&5
9627   cat conftest.$ac_ext >&5
9628   rm -rf conftest*
9629   eval "ac_cv_lib_$ac_lib_var=no"
9630 fi
9631 rm -f conftest*
9632 xe_check_libs=""
9633
9634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9635   echo "$ac_t""yes" 1>&6
9636   libwnn=wnn6
9637 else
9638   echo "$ac_t""no" 1>&6
9639 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9640 echo "configure:9641: checking for dic_list_e in -lwnn6_fromsrc" >&5
9641 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9642
9643 xe_check_libs=" -lwnn6_fromsrc "
9644 cat > conftest.$ac_ext <<EOF
9645 #line 9646 "configure"
9646 #include "confdefs.h"
9647 /* Override any gcc2 internal prototype to avoid an error.  */
9648 /* We use char because int might match the return type of a gcc2
9649     builtin and then its argument prototype would still apply.  */
9650 char dic_list_e();
9651
9652 int main() {
9653 dic_list_e()
9654 ; return 0; }
9655 EOF
9656 if { (eval echo configure:9657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9657   rm -rf conftest*
9658   eval "ac_cv_lib_$ac_lib_var=yes"
9659 else
9660   echo "configure: failed program was:" >&5
9661   cat conftest.$ac_ext >&5
9662   rm -rf conftest*
9663   eval "ac_cv_lib_$ac_lib_var=no"
9664 fi
9665 rm -f conftest*
9666 xe_check_libs=""
9667
9668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9669   echo "$ac_t""yes" 1>&6
9670   libwnn=wnn6_fromsrc
9671 else
9672   echo "$ac_t""no" 1>&6
9673 with_wnn=no
9674 fi
9675
9676
9677 fi
9678
9679
9680 fi
9681
9682
9683 fi
9684
9685
9686   fi
9687   test -z "$with_wnn" && with_wnn=yes
9688   if test "$with_wnn" = "yes"; then
9689     { test "$extra_verbose" = "yes" && cat << \EOF
9690     Defining HAVE_WNN
9691 EOF
9692 cat >> confdefs.h <<\EOF
9693 #define HAVE_WNN 1
9694 EOF
9695 }
9696
9697     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9698     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9699    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9700  fi
9701     if test "$with_wnn6" != "no"; then
9702       
9703 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9704 echo "configure:9705: checking for jl_fi_dic_list in -l$libwnn" >&5
9705 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9706
9707 xe_check_libs=" -l$libwnn "
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* Override any gcc2 internal prototype to avoid an error.  */
9712 /* We use char because int might match the return type of a gcc2
9713     builtin and then its argument prototype would still apply.  */
9714 char jl_fi_dic_list();
9715
9716 int main() {
9717 jl_fi_dic_list()
9718 ; return 0; }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9721   rm -rf conftest*
9722   eval "ac_cv_lib_$ac_lib_var=yes"
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   eval "ac_cv_lib_$ac_lib_var=no"
9728 fi
9729 rm -f conftest*
9730 xe_check_libs=""
9731
9732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9733   echo "$ac_t""yes" 1>&6
9734   with_wnn6=yes
9735 else
9736   echo "$ac_t""no" 1>&6
9737 fi
9738
9739
9740       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9741     Defining WNN6
9742 EOF
9743 cat >> confdefs.h <<\EOF
9744 #define WNN6 1
9745 EOF
9746 }
9747
9748     fi
9749   fi
9750
9751     canna_includes_found=no
9752   if test "$with_canna" != "no"; then
9753     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9754 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9755 echo "configure:9756: checking for canna/jrkanji.h" >&5
9756
9757 cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 #include <canna/jrkanji.h>
9761 EOF
9762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9763 { (eval echo configure:9764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9765 if test -z "$ac_err"; then
9766   rm -rf conftest*
9767   eval "ac_cv_header_$ac_safe=yes"
9768 else
9769   echo "$ac_err" >&5
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   eval "ac_cv_header_$ac_safe=no"
9774 fi
9775 rm -f conftest*
9776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9777   echo "$ac_t""yes" 1>&6
9778   canna_includes_found=yes
9779 else
9780   echo "$ac_t""no" 1>&6
9781 fi
9782
9783   fi
9784   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9785       -d "/usr/local/canna/include"; then
9786     save_c_switch_site="$c_switch_site"
9787     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9788     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9789 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9790 echo "configure:9791: checking for canna/jrkanji.h" >&5
9791
9792 cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 #include <canna/jrkanji.h>
9796 EOF
9797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9798 { (eval echo configure:9799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9800 if test -z "$ac_err"; then
9801   rm -rf conftest*
9802   eval "ac_cv_header_$ac_safe=yes"
9803 else
9804   echo "$ac_err" >&5
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807   rm -rf conftest*
9808   eval "ac_cv_header_$ac_safe=no"
9809 fi
9810 rm -f conftest*
9811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9812   echo "$ac_t""yes" 1>&6
9813   canna_includes_found=yes
9814 else
9815   echo "$ac_t""no" 1>&6
9816 fi
9817
9818     if test "$canna_includes_found" != "yes"; then
9819       c_switch_site="$save_c_switch_site"
9820       with_canna="no"
9821     fi
9822   fi
9823
9824   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9825 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9826 echo "configure:9827: checking for canna/RK.h" >&5
9827
9828 cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 #include <canna/RK.h>
9832 EOF
9833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9834 { (eval echo configure:9835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9836 if test -z "$ac_err"; then
9837   rm -rf conftest*
9838   eval "ac_cv_header_$ac_safe=yes"
9839 else
9840   echo "$ac_err" >&5
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_header_$ac_safe=no"
9845 fi
9846 rm -f conftest*
9847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9848   echo "$ac_t""yes" 1>&6
9849   :
9850 else
9851   echo "$ac_t""no" 1>&6
9852 with_canna=no
9853 fi
9854  }
9855   test -z "$with_canna" && { 
9856 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9857 echo "configure:9858: checking for RkBgnBun in -lRKC" >&5
9858 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9859
9860 xe_check_libs=" -lRKC "
9861 cat > conftest.$ac_ext <<EOF
9862 #line 9863 "configure"
9863 #include "confdefs.h"
9864 /* Override any gcc2 internal prototype to avoid an error.  */
9865 /* We use char because int might match the return type of a gcc2
9866     builtin and then its argument prototype would still apply.  */
9867 char RkBgnBun();
9868
9869 int main() {
9870 RkBgnBun()
9871 ; return 0; }
9872 EOF
9873 if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9874   rm -rf conftest*
9875   eval "ac_cv_lib_$ac_lib_var=yes"
9876 else
9877   echo "configure: failed program was:" >&5
9878   cat conftest.$ac_ext >&5
9879   rm -rf conftest*
9880   eval "ac_cv_lib_$ac_lib_var=no"
9881 fi
9882 rm -f conftest*
9883 xe_check_libs=""
9884
9885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9886   echo "$ac_t""yes" 1>&6
9887   :
9888 else
9889   echo "$ac_t""no" 1>&6
9890 with_canna=no
9891 fi
9892
9893  }
9894   test -z "$with_canna" && { 
9895 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9896 echo "configure:9897: checking for jrKanjiControl in -lcanna" >&5
9897 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9898
9899 xe_check_libs=" -lcanna "
9900 cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 /* Override any gcc2 internal prototype to avoid an error.  */
9904 /* We use char because int might match the return type of a gcc2
9905     builtin and then its argument prototype would still apply.  */
9906 char jrKanjiControl();
9907
9908 int main() {
9909 jrKanjiControl()
9910 ; return 0; }
9911 EOF
9912 if { (eval echo configure:9913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9913   rm -rf conftest*
9914   eval "ac_cv_lib_$ac_lib_var=yes"
9915 else
9916   echo "configure: failed program was:" >&5
9917   cat conftest.$ac_ext >&5
9918   rm -rf conftest*
9919   eval "ac_cv_lib_$ac_lib_var=no"
9920 fi
9921 rm -f conftest*
9922 xe_check_libs=""
9923
9924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9925   echo "$ac_t""yes" 1>&6
9926   :
9927 else
9928   echo "$ac_t""no" 1>&6
9929 with_canna=no
9930 fi
9931
9932  }
9933   test -z "$with_canna" && with_canna=yes
9934   if test "$with_canna" = "yes"; then
9935     { test "$extra_verbose" = "yes" && cat << \EOF
9936     Defining HAVE_CANNA
9937 EOF
9938 cat >> confdefs.h <<\EOF
9939 #define HAVE_CANNA 1
9940 EOF
9941 }
9942
9943     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9944     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9945    echo "    xemacs will be linked with \"mule-canna.o\""
9946  fi
9947   fi
9948
9949 else   for feature in xim canna wnn; do
9950     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9951       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9952     fi
9953     eval "with_${feature}=no"
9954   done
9955 fi 
9956
9957 if test "$need_motif" = "yes" ; then
9958   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9959     
9960 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9961 echo "configure:9962: checking for layout_object_getvalue in -li18n" >&5
9962 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9963
9964 xe_check_libs=" -li18n "
9965 cat > conftest.$ac_ext <<EOF
9966 #line 9967 "configure"
9967 #include "confdefs.h"
9968 /* Override any gcc2 internal prototype to avoid an error.  */
9969 /* We use char because int might match the return type of a gcc2
9970     builtin and then its argument prototype would still apply.  */
9971 char layout_object_getvalue();
9972
9973 int main() {
9974 layout_object_getvalue()
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9978   rm -rf conftest*
9979   eval "ac_cv_lib_$ac_lib_var=yes"
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_lib_$ac_lib_var=no"
9985 fi
9986 rm -f conftest*
9987 xe_check_libs=""
9988
9989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9990   echo "$ac_t""yes" 1>&6
9991   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9992 else
9993   echo "$ac_t""no" 1>&6
9994 fi
9995
9996
9997   
9998 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9999     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10000   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10001   
10002         runpath="" runpath_dirs=""
10003   if test -n "$LD_RUN_PATH"; then
10004     runpath="$LD_RUN_PATH"
10005   elif test "$GCC" = "yes"; then
10006         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10007     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10008     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10009     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10010       case "$arg" in P,* | -L* | -R* )
10011         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10012           {
10013 xe_runpath_dir="$dir"
10014   test "$xe_runpath_dir" != "/lib"     -a \
10015         "$xe_runpath_dir" != "/usr/lib" -a \
10016         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10017   eval "$xe_add_unique_runpath_dir"
10018 }
10019         done ;;
10020       esac
10021     done
10022     ld_switch_run="$ld_switch_run_save"
10023     rm -f conftest*
10024   else
10025         for arg in $ld_switch_site $ld_switch_x_site; do
10026       case "$arg" in -L*) {
10027 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10028   test "$xe_runpath_dir" != "/lib"     -a \
10029         "$xe_runpath_dir" != "/usr/lib" -a \
10030         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10031   eval "$xe_add_unique_runpath_dir"
10032 };; esac
10033     done
10034         if test "$opsys $need_motif" = "sol2 yes"; then
10035       xe_runpath_dir="/opt/SUNWdt/lib";
10036       eval "$xe_add_unique_runpath_dir";
10037     fi
10038   fi 
10039   if test -n "$runpath"; then
10040     ld_switch_run="${dash_r}${runpath}"
10041     
10042 if test "$GCC" = "yes"; then
10043   set x $ld_switch_run; shift; ld_switch_run=""
10044   while test -n "$1"; do
10045     case $1 in
10046       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10047       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10048       -Xlinker* ) ;;
10049       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10050     esac
10051     shift
10052   done
10053 fi
10054     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10055   fi
10056 fi
10057
10058 fi
10059
10060 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10061 do
10062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10063 echo "configure:10064: checking for $ac_func" >&5
10064
10065 cat > conftest.$ac_ext <<EOF
10066 #line 10067 "configure"
10067 #include "confdefs.h"
10068 /* System header to define __stub macros and hopefully few prototypes,
10069     which can conflict with char $ac_func(); below.  */
10070 #include <assert.h>
10071 /* Override any gcc2 internal prototype to avoid an error.  */
10072 /* We use char because int might match the return type of a gcc2
10073     builtin and then its argument prototype would still apply.  */
10074 char $ac_func();
10075
10076 int main() {
10077
10078 /* The GNU C library defines this for functions which it implements
10079     to always fail with ENOSYS.  Some functions are actually named
10080     something starting with __ and the normal name is an alias.  */
10081 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10082 choke me
10083 #else
10084 $ac_func();
10085 #endif
10086
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10090   rm -rf conftest*
10091   eval "ac_cv_func_$ac_func=yes"
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   eval "ac_cv_func_$ac_func=no"
10097 fi
10098 rm -f conftest*
10099
10100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10101   echo "$ac_t""yes" 1>&6
10102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10103   { test "$extra_verbose" = "yes" && cat << EOF
10104     Defining $ac_tr_func
10105 EOF
10106 cat >> confdefs.h <<EOF
10107 #define $ac_tr_func 1
10108 EOF
10109 }
10110  
10111 else
10112   echo "$ac_t""no" 1>&6
10113 fi
10114 done
10115
10116
10117 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10118    echo "    xemacs will be linked with \"realpath.o\""
10119  fi
10120
10121 for ac_func in getloadavg
10122 do
10123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10124 echo "configure:10125: checking for $ac_func" >&5
10125
10126 cat > conftest.$ac_ext <<EOF
10127 #line 10128 "configure"
10128 #include "confdefs.h"
10129 /* System header to define __stub macros and hopefully few prototypes,
10130     which can conflict with char $ac_func(); below.  */
10131 #include <assert.h>
10132 /* Override any gcc2 internal prototype to avoid an error.  */
10133 /* We use char because int might match the return type of a gcc2
10134     builtin and then its argument prototype would still apply.  */
10135 char $ac_func();
10136
10137 int main() {
10138
10139 /* The GNU C library defines this for functions which it implements
10140     to always fail with ENOSYS.  Some functions are actually named
10141     something starting with __ and the normal name is an alias.  */
10142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10143 choke me
10144 #else
10145 $ac_func();
10146 #endif
10147
10148 ; return 0; }
10149 EOF
10150 if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10151   rm -rf conftest*
10152   eval "ac_cv_func_$ac_func=yes"
10153 else
10154   echo "configure: failed program was:" >&5
10155   cat conftest.$ac_ext >&5
10156   rm -rf conftest*
10157   eval "ac_cv_func_$ac_func=no"
10158 fi
10159 rm -f conftest*
10160
10161 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10162   echo "$ac_t""yes" 1>&6
10163     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10164   { test "$extra_verbose" = "yes" && cat << EOF
10165     Defining $ac_tr_func
10166 EOF
10167 cat >> confdefs.h <<EOF
10168 #define $ac_tr_func 1
10169 EOF
10170 }
10171  
10172 else
10173   echo "$ac_t""no" 1>&6
10174 fi
10175 done
10176
10177
10178 if test "$ac_cv_func_getloadavg" != "yes"
10179 then
10180   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10181    echo "    xemacs will be linked with \"getloadavg.o\""
10182  fi
10183
10184     
10185 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10186 echo "configure:10187: checking for kstat_open in -lkstat" >&5
10187 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10188
10189 xe_check_libs=" -lkstat "
10190 cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193 /* Override any gcc2 internal prototype to avoid an error.  */
10194 /* We use char because int might match the return type of a gcc2
10195     builtin and then its argument prototype would still apply.  */
10196 char kstat_open();
10197
10198 int main() {
10199 kstat_open()
10200 ; return 0; }
10201 EOF
10202 if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10203   rm -rf conftest*
10204   eval "ac_cv_lib_$ac_lib_var=yes"
10205 else
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   eval "ac_cv_lib_$ac_lib_var=no"
10210 fi
10211 rm -f conftest*
10212 xe_check_libs=""
10213
10214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10215   echo "$ac_t""yes" 1>&6
10216     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10217     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10218   { test "$extra_verbose" = "yes" && cat << EOF
10219     Defining $ac_tr_lib
10220 EOF
10221 cat >> confdefs.h <<EOF
10222 #define $ac_tr_lib 1
10223 EOF
10224 }
10225
10226   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10227
10228 else
10229   echo "$ac_t""no" 1>&6
10230 fi
10231
10232
10233
10234     
10235 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10236 echo "configure:10237: checking for kvm_read in -lkvm" >&5
10237 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10238
10239 xe_check_libs=" -lkvm "
10240 cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 /* Override any gcc2 internal prototype to avoid an error.  */
10244 /* We use char because int might match the return type of a gcc2
10245     builtin and then its argument prototype would still apply.  */
10246 char kvm_read();
10247
10248 int main() {
10249 kvm_read()
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10253   rm -rf conftest*
10254   eval "ac_cv_lib_$ac_lib_var=yes"
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_lib_$ac_lib_var=no"
10260 fi
10261 rm -f conftest*
10262 xe_check_libs=""
10263
10264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10265   echo "$ac_t""yes" 1>&6
10266     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10267     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10268   { test "$extra_verbose" = "yes" && cat << EOF
10269     Defining $ac_tr_lib
10270 EOF
10271 cat >> confdefs.h <<EOF
10272 #define $ac_tr_lib 1
10273 EOF
10274 }
10275
10276   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10277
10278 else
10279   echo "$ac_t""no" 1>&6
10280 fi
10281
10282
10283 fi
10284
10285 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10286 echo "configure:10287: checking whether netdb declares h_errno" >&5
10287 cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290 #include <netdb.h>
10291 int main() {
10292 return h_errno;
10293 ; return 0; }
10294 EOF
10295 if { (eval echo configure:10296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10296   rm -rf conftest*
10297   echo "$ac_t""yes" 1>&6
10298    { test "$extra_verbose" = "yes" && cat << \EOF
10299     Defining HAVE_H_ERRNO
10300 EOF
10301 cat >> confdefs.h <<\EOF
10302 #define HAVE_H_ERRNO 1
10303 EOF
10304 }
10305
10306 else
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -rf conftest*
10310   echo "$ac_t""no" 1>&6
10311 fi
10312 rm -f conftest*
10313
10314 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10315 echo "configure:10316: checking for sigsetjmp" >&5
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 #include <setjmp.h>
10320 int main() {
10321 sigjmp_buf bar; sigsetjmp (bar, 0);
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10325   rm -rf conftest*
10326   echo "$ac_t""yes" 1>&6
10327    { test "$extra_verbose" = "yes" && cat << \EOF
10328     Defining HAVE_SIGSETJMP
10329 EOF
10330 cat >> confdefs.h <<\EOF
10331 #define HAVE_SIGSETJMP 1
10332 EOF
10333 }
10334
10335 else
10336   echo "configure: failed program was:" >&5
10337   cat conftest.$ac_ext >&5
10338   rm -rf conftest*
10339   echo "$ac_t""no" 1>&6
10340 fi
10341 rm -f conftest*
10342
10343 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10344 echo "configure:10345: checking whether localtime caches TZ" >&5
10345
10346 if test "$ac_cv_func_tzset" = "yes"; then
10347 cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 #include <time.h>
10351 #if STDC_HEADERS
10352 # include <stdlib.h>
10353 #endif
10354 extern char **environ;
10355 unset_TZ ()
10356 {
10357   char **from, **to;
10358   for (to = from = environ; (*to = *from); from++)
10359     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10360       to++;
10361 }
10362 char TZ_GMT0[] = "TZ=GMT0";
10363 char TZ_PST8[] = "TZ=PST8";
10364 main()
10365 {
10366   time_t now = time ((time_t *) 0);
10367   int hour_GMT0, hour_unset;
10368   if (putenv (TZ_GMT0) != 0)
10369     exit (1);
10370   hour_GMT0 = localtime (&now)->tm_hour;
10371   unset_TZ ();
10372   hour_unset = localtime (&now)->tm_hour;
10373   if (putenv (TZ_PST8) != 0)
10374     exit (1);
10375   if (localtime (&now)->tm_hour == hour_GMT0)
10376     exit (1);
10377   unset_TZ ();
10378   if (localtime (&now)->tm_hour != hour_unset)
10379     exit (1);
10380   exit (0);
10381 }
10382 EOF
10383 if { (eval echo configure:10384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10384 then
10385   emacs_cv_localtime_cache=no
10386 else
10387   conftest_rc="$?"
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -fr conftest*
10391   emacs_cv_localtime_cache=yes
10392 fi
10393 rm -fr conftest*
10394 else
10395         # If we lack tzset, report that localtime does not cache TZ,
10396         # since we can't invalidate the cache if we don't have tzset.
10397         emacs_cv_localtime_cache=no
10398 fi
10399 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10400 if test $emacs_cv_localtime_cache = yes; then
10401   { test "$extra_verbose" = "yes" && cat << \EOF
10402     Defining LOCALTIME_CACHE
10403 EOF
10404 cat >> confdefs.h <<\EOF
10405 #define LOCALTIME_CACHE 1
10406 EOF
10407 }
10408
10409 fi
10410
10411 if test "$HAVE_TIMEVAL" = "yes"; then
10412 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10413 echo "configure:10414: checking whether gettimeofday accepts one or two arguments" >&5
10414 cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417
10418 #ifdef TIME_WITH_SYS_TIME
10419 #include <sys/time.h>
10420 #include <time.h>
10421 #else
10422 #ifdef HAVE_SYS_TIME_H
10423 #include <sys/time.h>
10424 #else
10425 #include <time.h>
10426 #endif
10427 #endif
10428   
10429 int main() {
10430
10431   struct timeval time;
10432   gettimeofday (&time, 0);
10433
10434 ; return 0; }
10435 EOF
10436 if { (eval echo configure:10437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10437   rm -rf conftest*
10438   echo "$ac_t""two" 1>&6
10439 else
10440   echo "configure: failed program was:" >&5
10441   cat conftest.$ac_ext >&5
10442   rm -rf conftest*
10443   echo "$ac_t""one" 1>&6
10444    { test "$extra_verbose" = "yes" && cat << \EOF
10445     Defining GETTIMEOFDAY_ONE_ARGUMENT
10446 EOF
10447 cat >> confdefs.h <<\EOF
10448 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10449 EOF
10450 }
10451
10452 fi
10453 rm -f conftest*
10454 fi
10455
10456
10457 echo $ac_n "checking for inline""... $ac_c" 1>&6
10458 echo "configure:10459: checking for inline" >&5
10459
10460 ac_cv_c_inline=no
10461 for ac_kw in inline __inline__ __inline; do
10462   cat > conftest.$ac_ext <<EOF
10463 #line 10464 "configure"
10464 #include "confdefs.h"
10465
10466 int main() {
10467 } $ac_kw foo() {
10468 ; return 0; }
10469 EOF
10470 if { (eval echo configure:10471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10471   rm -rf conftest*
10472   ac_cv_c_inline=$ac_kw; break
10473 else
10474   echo "configure: failed program was:" >&5
10475   cat conftest.$ac_ext >&5
10476 fi
10477 rm -f conftest*
10478 done
10479
10480
10481 echo "$ac_t""$ac_cv_c_inline" 1>&6
10482 case "$ac_cv_c_inline" in
10483   inline | yes) ;;
10484   no) { test "$extra_verbose" = "yes" && cat << \EOF
10485     Defining inline = 
10486 EOF
10487 cat >> confdefs.h <<\EOF
10488 #define inline 
10489 EOF
10490 }
10491  ;;
10492   *)  { test "$extra_verbose" = "yes" && cat << EOF
10493     Defining inline = $ac_cv_c_inline
10494 EOF
10495 cat >> confdefs.h <<EOF
10496 #define inline $ac_cv_c_inline
10497 EOF
10498 }
10499  ;;
10500 esac
10501
10502 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10503    echo "    xemacs will be linked with \"inline.o\""
10504  fi
10505
10506
10507 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10508 # for constant arguments.  Useless!
10509 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10510 echo "configure:10511: checking for working alloca.h" >&5
10511
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515 #include <alloca.h>
10516 int main() {
10517 char *p = alloca(2 * sizeof(int));
10518 ; return 0; }
10519 EOF
10520 if { (eval echo configure:10521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10521   rm -rf conftest*
10522   ac_cv_header_alloca_h=yes
10523 else
10524   echo "configure: failed program was:" >&5
10525   cat conftest.$ac_ext >&5
10526   rm -rf conftest*
10527   ac_cv_header_alloca_h=no
10528 fi
10529 rm -f conftest*
10530
10531 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10532 if test $ac_cv_header_alloca_h = yes; then
10533   { test "$extra_verbose" = "yes" && cat << \EOF
10534     Defining HAVE_ALLOCA_H
10535 EOF
10536 cat >> confdefs.h <<\EOF
10537 #define HAVE_ALLOCA_H 1
10538 EOF
10539 }
10540
10541 fi
10542
10543 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10544 echo "configure:10545: checking for alloca" >&5
10545
10546 cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549
10550 #ifdef __GNUC__
10551 # define alloca __builtin_alloca
10552 #else
10553 # ifdef _MSC_VER
10554 #  include <malloc.h>
10555 #  define alloca _alloca
10556 # else
10557 #  if HAVE_ALLOCA_H
10558 #   include <alloca.h>
10559 #  else
10560 #   ifdef _AIX
10561  #pragma alloca
10562 #   else
10563 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10564 char *alloca ();
10565 #    endif
10566 #   endif
10567 #  endif
10568 # endif
10569 #endif
10570
10571 int main() {
10572 char *p = (char *) alloca(1);
10573 ; return 0; }
10574 EOF
10575 if { (eval echo configure:10576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10576   rm -rf conftest*
10577   ac_cv_func_alloca_works=yes
10578 else
10579   echo "configure: failed program was:" >&5
10580   cat conftest.$ac_ext >&5
10581   rm -rf conftest*
10582   ac_cv_func_alloca_works=no
10583 fi
10584 rm -f conftest*
10585
10586 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10587 if test $ac_cv_func_alloca_works = yes; then
10588   { test "$extra_verbose" = "yes" && cat << \EOF
10589     Defining HAVE_ALLOCA
10590 EOF
10591 cat >> confdefs.h <<\EOF
10592 #define HAVE_ALLOCA 1
10593 EOF
10594 }
10595
10596 fi
10597
10598 if test $ac_cv_func_alloca_works = no; then
10599   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10600   # that cause trouble.  Some versions do not even contain alloca or
10601   # contain a buggy version.  If you still want to use their alloca,
10602   # use ar to extract alloca.o from them instead of compiling alloca.c.
10603   ALLOCA=alloca.${ac_objext}
10604   { test "$extra_verbose" = "yes" && cat << \EOF
10605     Defining C_ALLOCA
10606 EOF
10607 cat >> confdefs.h <<\EOF
10608 #define C_ALLOCA 1
10609 EOF
10610 }
10611
10612
10613 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10614 echo "configure:10615: checking whether alloca needs Cray hooks" >&5
10615
10616 cat > conftest.$ac_ext <<EOF
10617 #line 10618 "configure"
10618 #include "confdefs.h"
10619 #if defined(CRAY) && ! defined(CRAY2)
10620 webecray
10621 #else
10622 wenotbecray
10623 #endif
10624
10625 EOF
10626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10627   egrep "webecray" >/dev/null 2>&1; then
10628   rm -rf conftest*
10629   ac_cv_os_cray=yes
10630 else
10631   rm -rf conftest*
10632   ac_cv_os_cray=no
10633 fi
10634 rm -f conftest*
10635
10636
10637 echo "$ac_t""$ac_cv_os_cray" 1>&6
10638 if test $ac_cv_os_cray = yes; then
10639 for ac_func in _getb67 GETB67 getb67; do
10640   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10641 echo "configure:10642: checking for $ac_func" >&5
10642
10643 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646 /* System header to define __stub macros and hopefully few prototypes,
10647     which can conflict with char $ac_func(); below.  */
10648 #include <assert.h>
10649 /* Override any gcc2 internal prototype to avoid an error.  */
10650 /* We use char because int might match the return type of a gcc2
10651     builtin and then its argument prototype would still apply.  */
10652 char $ac_func();
10653
10654 int main() {
10655
10656 /* The GNU C library defines this for functions which it implements
10657     to always fail with ENOSYS.  Some functions are actually named
10658     something starting with __ and the normal name is an alias.  */
10659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10660 choke me
10661 #else
10662 $ac_func();
10663 #endif
10664
10665 ; return 0; }
10666 EOF
10667 if { (eval echo configure:10668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10668   rm -rf conftest*
10669   eval "ac_cv_func_$ac_func=yes"
10670 else
10671   echo "configure: failed program was:" >&5
10672   cat conftest.$ac_ext >&5
10673   rm -rf conftest*
10674   eval "ac_cv_func_$ac_func=no"
10675 fi
10676 rm -f conftest*
10677
10678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10679   echo "$ac_t""yes" 1>&6
10680   { test "$extra_verbose" = "yes" && cat << EOF
10681     Defining CRAY_STACKSEG_END = $ac_func
10682 EOF
10683 cat >> confdefs.h <<EOF
10684 #define CRAY_STACKSEG_END $ac_func
10685 EOF
10686 }
10687
10688   break
10689 else
10690   echo "$ac_t""no" 1>&6
10691 fi
10692
10693 done
10694 fi
10695
10696 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10697 echo "configure:10698: checking stack direction for C alloca" >&5
10698
10699 cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702 find_stack_direction ()
10703 {
10704   static char *addr = 0;
10705   auto char dummy;
10706   if (addr == 0)
10707     {
10708       addr = &dummy;
10709       return find_stack_direction ();
10710     }
10711   else
10712     return (&dummy > addr) ? 1 : -1;
10713 }
10714 main ()
10715 {
10716   exit (find_stack_direction() < 0);
10717 }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10720 then
10721   ac_cv_c_stack_direction=1
10722 else
10723   conftest_rc="$?"
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -fr conftest*
10727   ac_cv_c_stack_direction=-1
10728 fi
10729 rm -fr conftest*
10730
10731 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10732 { test "$extra_verbose" = "yes" && cat << EOF
10733     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10734 EOF
10735 cat >> confdefs.h <<EOF
10736 #define STACK_DIRECTION $ac_cv_c_stack_direction
10737 EOF
10738 }
10739
10740 fi
10741
10742 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10743    echo "    xemacs will be linked with \"$ALLOCA\""
10744  fi
10745
10746 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10747 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10748 echo "configure:10749: checking for vfork.h" >&5
10749
10750 cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753 #include <vfork.h>
10754 EOF
10755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10756 { (eval echo configure:10757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10758 if test -z "$ac_err"; then
10759   rm -rf conftest*
10760   eval "ac_cv_header_$ac_safe=yes"
10761 else
10762   echo "$ac_err" >&5
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   eval "ac_cv_header_$ac_safe=no"
10767 fi
10768 rm -f conftest*
10769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10770   echo "$ac_t""yes" 1>&6
10771   { test "$extra_verbose" = "yes" && cat << \EOF
10772     Defining HAVE_VFORK_H
10773 EOF
10774 cat >> confdefs.h <<\EOF
10775 #define HAVE_VFORK_H 1
10776 EOF
10777 }
10778
10779 else
10780   echo "$ac_t""no" 1>&6
10781 fi
10782
10783 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10784 echo "configure:10785: checking for working vfork" >&5
10785
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789 /* Thanks to Paul Eggert for this test.  */
10790 #include <stdio.h>
10791 #include <sys/types.h>
10792 #include <sys/stat.h>
10793 #ifdef HAVE_UNISTD_H
10794 #include <unistd.h>
10795 #endif
10796 #ifdef HAVE_VFORK_H
10797 #include <vfork.h>
10798 #endif
10799 /* On some sparc systems, changes by the child to local and incoming
10800    argument registers are propagated back to the parent.
10801    The compiler is told about this with #include <vfork.h>,
10802    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10803    Test for this by using a static variable whose address
10804    is put into a register that is clobbered by the vfork.  */
10805 static
10806 #ifdef __cplusplus
10807 sparc_address_test (int arg)
10808 #else
10809 sparc_address_test (arg) int arg;
10810 #endif
10811 {
10812   static pid_t child;
10813   if (!child) {
10814     child = vfork ();
10815     if (child < 0) {
10816       perror ("vfork");
10817       _exit(2);
10818     }
10819     if (!child) {
10820       arg = getpid();
10821       write(-1, "", 0);
10822       _exit (arg);
10823     }
10824   }
10825 }
10826 main() {
10827   pid_t parent = getpid ();
10828   pid_t child;
10829
10830   sparc_address_test ();
10831
10832   child = vfork ();
10833
10834   if (child == 0) {
10835     /* Here is another test for sparc vfork register problems.
10836        This test uses lots of local variables, at least
10837        as many local variables as main has allocated so far
10838        including compiler temporaries.  4 locals are enough for
10839        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10840        A buggy compiler should reuse the register of parent
10841        for one of the local variables, since it will think that
10842        parent can't possibly be used any more in this routine.
10843        Assigning to the local variable will thus munge parent
10844        in the parent process.  */
10845     pid_t
10846       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10847       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10848     /* Convince the compiler that p..p7 are live; otherwise, it might
10849        use the same hardware register for all 8 local variables.  */
10850     if (p != p1 || p != p2 || p != p3 || p != p4
10851         || p != p5 || p != p6 || p != p7)
10852       _exit(1);
10853
10854     /* On some systems (e.g. IRIX 3.3),
10855        vfork doesn't separate parent from child file descriptors.
10856        If the child closes a descriptor before it execs or exits,
10857        this munges the parent's descriptor as well.
10858        Test for this by closing stdout in the child.  */
10859     _exit(close(fileno(stdout)) != 0);
10860   } else {
10861     int status;
10862     struct stat st;
10863
10864     while (wait(&status) != child)
10865       ;
10866     exit(
10867          /* Was there some problem with vforking?  */
10868          child < 0
10869
10870          /* Did the child fail?  (This shouldn't happen.)  */
10871          || status
10872
10873          /* Did the vfork/compiler bug occur?  */
10874          || parent != getpid()
10875
10876          /* Did the file descriptor bug occur?  */
10877          || fstat(fileno(stdout), &st) != 0
10878          );
10879   }
10880 }
10881 EOF
10882 if { (eval echo configure:10883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10883 then
10884   ac_cv_func_vfork_works=yes
10885 else
10886   conftest_rc="$?"
10887   echo "configure: failed program was:" >&5
10888   cat conftest.$ac_ext >&5
10889   rm -fr conftest*
10890   ac_cv_func_vfork_works=no
10891 fi
10892 rm -fr conftest*
10893
10894 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10895 if test $ac_cv_func_vfork_works = no; then
10896   { test "$extra_verbose" = "yes" && cat << \EOF
10897     Defining vfork = fork
10898 EOF
10899 cat >> confdefs.h <<\EOF
10900 #define vfork fork
10901 EOF
10902 }
10903
10904 fi
10905
10906
10907 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10908 echo "configure:10909: checking for working strcoll" >&5
10909
10910 cat > conftest.$ac_ext <<EOF
10911 #line 10912 "configure"
10912 #include "confdefs.h"
10913 #include <string.h>
10914 main ()
10915 {
10916   exit (strcoll ("abc", "def") >= 0 ||
10917         strcoll ("ABC", "DEF") >= 0 ||
10918         strcoll ("123", "456") >= 0);
10919 }
10920 EOF
10921 if { (eval echo configure:10922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10922 then
10923   ac_cv_func_strcoll_works=yes
10924 else
10925   conftest_rc="$?"
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -fr conftest*
10929   ac_cv_func_strcoll_works=no
10930 fi
10931 rm -fr conftest*
10932
10933 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10934 if test $ac_cv_func_strcoll_works = yes; then
10935   { test "$extra_verbose" = "yes" && cat << \EOF
10936     Defining HAVE_STRCOLL
10937 EOF
10938 cat >> confdefs.h <<\EOF
10939 #define HAVE_STRCOLL 1
10940 EOF
10941 }
10942
10943 fi
10944
10945
10946 for ac_func in getpgrp
10947 do
10948 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10949 echo "configure:10950: checking for $ac_func" >&5
10950
10951 cat > conftest.$ac_ext <<EOF
10952 #line 10953 "configure"
10953 #include "confdefs.h"
10954 /* System header to define __stub macros and hopefully few prototypes,
10955     which can conflict with char $ac_func(); below.  */
10956 #include <assert.h>
10957 /* Override any gcc2 internal prototype to avoid an error.  */
10958 /* We use char because int might match the return type of a gcc2
10959     builtin and then its argument prototype would still apply.  */
10960 char $ac_func();
10961
10962 int main() {
10963
10964 /* The GNU C library defines this for functions which it implements
10965     to always fail with ENOSYS.  Some functions are actually named
10966     something starting with __ and the normal name is an alias.  */
10967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10968 choke me
10969 #else
10970 $ac_func();
10971 #endif
10972
10973 ; return 0; }
10974 EOF
10975 if { (eval echo configure:10976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10976   rm -rf conftest*
10977   eval "ac_cv_func_$ac_func=yes"
10978 else
10979   echo "configure: failed program was:" >&5
10980   cat conftest.$ac_ext >&5
10981   rm -rf conftest*
10982   eval "ac_cv_func_$ac_func=no"
10983 fi
10984 rm -f conftest*
10985
10986 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10987   echo "$ac_t""yes" 1>&6
10988     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10989   { test "$extra_verbose" = "yes" && cat << EOF
10990     Defining $ac_tr_func
10991 EOF
10992 cat >> confdefs.h <<EOF
10993 #define $ac_tr_func 1
10994 EOF
10995 }
10996  
10997 else
10998   echo "$ac_t""no" 1>&6
10999 fi
11000 done
11001
11002 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11003 echo "configure:11004: checking whether getpgrp takes no argument" >&5
11004
11005 cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008
11009 /*
11010  * If this system has a BSD-style getpgrp(),
11011  * which takes a pid argument, exit unsuccessfully.
11012  *
11013  * Snarfed from Chet Ramey's bash pgrp.c test program
11014  */
11015 #include <stdio.h>
11016 #include <sys/types.h>
11017
11018 int     pid;
11019 int     pg1, pg2, pg3, pg4;
11020 int     ng, np, s, child;
11021
11022 main()
11023 {
11024         pid = getpid();
11025         pg1 = getpgrp(0);
11026         pg2 = getpgrp();
11027         pg3 = getpgrp(pid);
11028         pg4 = getpgrp(1);
11029
11030         /*
11031          * If all of these values are the same, it's pretty sure that
11032          * we're on a system that ignores getpgrp's first argument.
11033          */
11034         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11035                 exit(0);
11036
11037         child = fork();
11038         if (child < 0)
11039                 exit(1);
11040         else if (child == 0) {
11041                 np = getpid();
11042                 /*
11043                  * If this is Sys V, this will not work; pgrp will be
11044                  * set to np because setpgrp just changes a pgrp to be
11045                  * the same as the pid.
11046                  */
11047                 setpgrp(np, pg1);
11048                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11049                 if (ng == pg1) {
11050                         exit(1);
11051                 } else {
11052                         exit(0);
11053                 }
11054         } else {
11055                 wait(&s);
11056                 exit(s>>8);
11057         }
11058 }
11059
11060 EOF
11061 if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11062 then
11063   ac_cv_func_getpgrp_void=yes
11064 else
11065   conftest_rc="$?"
11066   echo "configure: failed program was:" >&5
11067   cat conftest.$ac_ext >&5
11068   rm -fr conftest*
11069   ac_cv_func_getpgrp_void=no
11070 fi
11071 rm -fr conftest*
11072
11073
11074 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11075 if test $ac_cv_func_getpgrp_void = yes; then
11076   { test "$extra_verbose" = "yes" && cat << \EOF
11077     Defining GETPGRP_VOID
11078 EOF
11079 cat >> confdefs.h <<\EOF
11080 #define GETPGRP_VOID 1
11081 EOF
11082 }
11083
11084 fi
11085
11086
11087 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11088 echo "configure:11089: checking for working mmap" >&5
11089 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11090 cat > conftest.$ac_ext <<EOF
11091 #line 11092 "configure"
11092 #include "confdefs.h"
11093 #include <stdio.h>
11094 #include <unistd.h>
11095 #include <fcntl.h>
11096 #include <sys/mman.h>
11097
11098 #ifndef MAP_VARIABLE
11099 #define MAP_VARIABLE 0
11100 #endif
11101
11102 #ifndef MAP_FAILED
11103 #define MAP_FAILED -1
11104 #endif
11105
11106 int main (int argc, char *argv[])
11107 {
11108   int fd = -1;
11109   caddr_t p;
11110 #ifndef MAP_ANONYMOUS
11111   fd = open ("/dev/zero", O_RDWR);
11112   if (fd < 0)
11113     return 1;
11114 #define MAP_ANONYMOUS 0
11115 #endif
11116   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11117            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11118            fd, 0) != (void *) MAP_FAILED)
11119     return 0;
11120   perror ("conftest: mmap failed");
11121   return 1;
11122 }
11123 EOF
11124 if { (eval echo configure:11125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11125 then
11126   have_mmap=yes
11127 else
11128   conftest_rc="$?"
11129   echo "configure: failed program was:" >&5
11130   cat conftest.$ac_ext >&5
11131   rm -fr conftest*
11132   have_mmap=no
11133 fi
11134 rm -fr conftest* ;;
11135 esac
11136 echo "$ac_t""$have_mmap" 1>&6
11137 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11138     Defining HAVE_MMAP
11139 EOF
11140 cat >> confdefs.h <<\EOF
11141 #define HAVE_MMAP 1
11142 EOF
11143 }
11144
11145
11146 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11147 if test "$rel_alloc $have_mmap" = "default yes"; then
11148   if test "$doug_lea_malloc" = "yes"; then
11149         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11150 echo "configure:11151: checking for M_MMAP_THRESHOLD" >&5
11151     cat > conftest.$ac_ext <<EOF
11152 #line 11153 "configure"
11153 #include "confdefs.h"
11154 #include <malloc.h>
11155 int main() {
11156
11157 #ifndef M_MMAP_THRESHOLD
11158 #error No M_MMAP_THRESHOLD :-(
11159 !@+$%^&*_)(_ - unlikely to compile...
11160 #endif
11161
11162 ; return 0; }
11163 EOF
11164 if { (eval echo configure:11165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11165   rm -rf conftest*
11166   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -rf conftest*
11171   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11172 fi
11173 rm -f conftest*
11174   else
11175     rel_alloc=yes
11176   fi
11177 fi
11178 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11179     Defining REL_ALLOC
11180 EOF
11181 cat >> confdefs.h <<\EOF
11182 #define REL_ALLOC 1
11183 EOF
11184 }
11185
11186
11187 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11188 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11189 echo "configure:11190: checking for termios.h" >&5
11190
11191 cat > conftest.$ac_ext <<EOF
11192 #line 11193 "configure"
11193 #include "confdefs.h"
11194 #include <termios.h>
11195 EOF
11196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11197 { (eval echo configure:11198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11199 if test -z "$ac_err"; then
11200   rm -rf conftest*
11201   eval "ac_cv_header_$ac_safe=yes"
11202 else
11203   echo "$ac_err" >&5
11204   echo "configure: failed program was:" >&5
11205   cat conftest.$ac_ext >&5
11206   rm -rf conftest*
11207   eval "ac_cv_header_$ac_safe=no"
11208 fi
11209 rm -f conftest*
11210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11211   echo "$ac_t""yes" 1>&6
11212   { test "$extra_verbose" = "yes" && cat << \EOF
11213     Defining HAVE_TERMIOS
11214 EOF
11215 cat >> confdefs.h <<\EOF
11216 #define HAVE_TERMIOS 1
11217 EOF
11218 }
11219
11220   { test "$extra_verbose" = "yes" && cat << \EOF
11221     Defining SIGNALS_VIA_CHARACTERS
11222 EOF
11223 cat >> confdefs.h <<\EOF
11224 #define SIGNALS_VIA_CHARACTERS 1
11225 EOF
11226 }
11227
11228   { test "$extra_verbose" = "yes" && cat << \EOF
11229     Defining NO_TERMIO
11230 EOF
11231 cat >> confdefs.h <<\EOF
11232 #define NO_TERMIO 1
11233 EOF
11234 }
11235
11236 else
11237   echo "$ac_t""no" 1>&6
11238 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11239 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11240 echo "configure:11241: checking for termio.h" >&5
11241
11242 cat > conftest.$ac_ext <<EOF
11243 #line 11244 "configure"
11244 #include "confdefs.h"
11245 #include <termio.h>
11246 EOF
11247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11248 { (eval echo configure:11249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11250 if test -z "$ac_err"; then
11251   rm -rf conftest*
11252   eval "ac_cv_header_$ac_safe=yes"
11253 else
11254   echo "$ac_err" >&5
11255   echo "configure: failed program was:" >&5
11256   cat conftest.$ac_ext >&5
11257   rm -rf conftest*
11258   eval "ac_cv_header_$ac_safe=no"
11259 fi
11260 rm -f conftest*
11261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11262   echo "$ac_t""yes" 1>&6
11263   { test "$extra_verbose" = "yes" && cat << \EOF
11264     Defining HAVE_TERMIO
11265 EOF
11266 cat >> confdefs.h <<\EOF
11267 #define HAVE_TERMIO 1
11268 EOF
11269 }
11270
11271 else
11272   echo "$ac_t""no" 1>&6
11273 fi
11274
11275 fi
11276
11277
11278
11279 echo $ac_n "checking for socket""... $ac_c" 1>&6
11280 echo "configure:11281: checking for socket" >&5
11281
11282 cat > conftest.$ac_ext <<EOF
11283 #line 11284 "configure"
11284 #include "confdefs.h"
11285 /* System header to define __stub macros and hopefully few prototypes,
11286     which can conflict with char socket(); below.  */
11287 #include <assert.h>
11288 /* Override any gcc2 internal prototype to avoid an error.  */
11289 /* We use char because int might match the return type of a gcc2
11290     builtin and then its argument prototype would still apply.  */
11291 char socket();
11292
11293 int main() {
11294
11295 /* The GNU C library defines this for functions which it implements
11296     to always fail with ENOSYS.  Some functions are actually named
11297     something starting with __ and the normal name is an alias.  */
11298 #if defined (__stub_socket) || defined (__stub___socket)
11299 choke me
11300 #else
11301 socket();
11302 #endif
11303
11304 ; return 0; }
11305 EOF
11306 if { (eval echo configure:11307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11307   rm -rf conftest*
11308   eval "ac_cv_func_socket=yes"
11309 else
11310   echo "configure: failed program was:" >&5
11311   cat conftest.$ac_ext >&5
11312   rm -rf conftest*
11313   eval "ac_cv_func_socket=no"
11314 fi
11315 rm -f conftest*
11316
11317 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11318   echo "$ac_t""yes" 1>&6
11319   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11320 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11321 echo "configure:11322: checking for netinet/in.h" >&5
11322
11323 cat > conftest.$ac_ext <<EOF
11324 #line 11325 "configure"
11325 #include "confdefs.h"
11326 #include <netinet/in.h>
11327 EOF
11328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11329 { (eval echo configure:11330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11331 if test -z "$ac_err"; then
11332   rm -rf conftest*
11333   eval "ac_cv_header_$ac_safe=yes"
11334 else
11335   echo "$ac_err" >&5
11336   echo "configure: failed program was:" >&5
11337   cat conftest.$ac_ext >&5
11338   rm -rf conftest*
11339   eval "ac_cv_header_$ac_safe=no"
11340 fi
11341 rm -f conftest*
11342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11343   echo "$ac_t""yes" 1>&6
11344   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11345 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11346 echo "configure:11347: checking for arpa/inet.h" >&5
11347
11348 cat > conftest.$ac_ext <<EOF
11349 #line 11350 "configure"
11350 #include "confdefs.h"
11351 #include <arpa/inet.h>
11352 EOF
11353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11354 { (eval echo configure:11355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11356 if test -z "$ac_err"; then
11357   rm -rf conftest*
11358   eval "ac_cv_header_$ac_safe=yes"
11359 else
11360   echo "$ac_err" >&5
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_header_$ac_safe=no"
11365 fi
11366 rm -f conftest*
11367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11368   echo "$ac_t""yes" 1>&6
11369   
11370   { test "$extra_verbose" = "yes" && cat << \EOF
11371     Defining HAVE_SOCKETS
11372 EOF
11373 cat >> confdefs.h <<\EOF
11374 #define HAVE_SOCKETS 1
11375 EOF
11376 }
11377
11378       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11379 echo "configure:11380: checking "for sun_len member in struct sockaddr_un"" >&5
11380       cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383
11384 #include <sys/types.h>
11385 #include <sys/socket.h>
11386 #include <sys/un.h>
11387       
11388 int main() {
11389 static struct sockaddr_un x; x.sun_len = 1;
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11393   rm -rf conftest*
11394   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11395     Defining HAVE_SOCKADDR_SUN_LEN
11396 EOF
11397 cat >> confdefs.h <<\EOF
11398 #define HAVE_SOCKADDR_SUN_LEN 1
11399 EOF
11400 }
11401
11402 else
11403   echo "configure: failed program was:" >&5
11404   cat conftest.$ac_ext >&5
11405   rm -rf conftest*
11406   echo "$ac_t""no" 1>&6
11407 fi
11408 rm -f conftest*
11409       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11410 echo "configure:11411: checking "for ip_mreq struct in netinet/in.h"" >&5
11411       cat > conftest.$ac_ext <<EOF
11412 #line 11413 "configure"
11413 #include "confdefs.h"
11414
11415 #include <sys/types.h>
11416 #include <netinet/in.h>
11417       
11418 int main() {
11419 static struct ip_mreq x;
11420 ; return 0; }
11421 EOF
11422 if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11423   rm -rf conftest*
11424   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11425     Defining HAVE_MULTICAST
11426 EOF
11427 cat >> confdefs.h <<\EOF
11428 #define HAVE_MULTICAST 1
11429 EOF
11430 }
11431
11432 else
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -rf conftest*
11436   echo "$ac_t""no" 1>&6
11437 fi
11438 rm -f conftest*
11439 else
11440   echo "$ac_t""no" 1>&6
11441 fi
11442
11443 else
11444   echo "$ac_t""no" 1>&6
11445 fi
11446
11447 else
11448   echo "$ac_t""no" 1>&6
11449 fi
11450
11451
11452 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11453 echo "configure:11454: checking for msgget" >&5
11454
11455 cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458 /* System header to define __stub macros and hopefully few prototypes,
11459     which can conflict with char msgget(); below.  */
11460 #include <assert.h>
11461 /* Override any gcc2 internal prototype to avoid an error.  */
11462 /* We use char because int might match the return type of a gcc2
11463     builtin and then its argument prototype would still apply.  */
11464 char msgget();
11465
11466 int main() {
11467
11468 /* The GNU C library defines this for functions which it implements
11469     to always fail with ENOSYS.  Some functions are actually named
11470     something starting with __ and the normal name is an alias.  */
11471 #if defined (__stub_msgget) || defined (__stub___msgget)
11472 choke me
11473 #else
11474 msgget();
11475 #endif
11476
11477 ; return 0; }
11478 EOF
11479 if { (eval echo configure:11480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11480   rm -rf conftest*
11481   eval "ac_cv_func_msgget=yes"
11482 else
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -rf conftest*
11486   eval "ac_cv_func_msgget=no"
11487 fi
11488 rm -f conftest*
11489
11490 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11491   echo "$ac_t""yes" 1>&6
11492   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11493 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11494 echo "configure:11495: checking for sys/ipc.h" >&5
11495
11496 cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499 #include <sys/ipc.h>
11500 EOF
11501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11502 { (eval echo configure:11503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11504 if test -z "$ac_err"; then
11505   rm -rf conftest*
11506   eval "ac_cv_header_$ac_safe=yes"
11507 else
11508   echo "$ac_err" >&5
11509   echo "configure: failed program was:" >&5
11510   cat conftest.$ac_ext >&5
11511   rm -rf conftest*
11512   eval "ac_cv_header_$ac_safe=no"
11513 fi
11514 rm -f conftest*
11515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11516   echo "$ac_t""yes" 1>&6
11517   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11518 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11519 echo "configure:11520: checking for sys/msg.h" >&5
11520
11521 cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 #include <sys/msg.h>
11525 EOF
11526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11527 { (eval echo configure:11528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11529 if test -z "$ac_err"; then
11530   rm -rf conftest*
11531   eval "ac_cv_header_$ac_safe=yes"
11532 else
11533   echo "$ac_err" >&5
11534   echo "configure: failed program was:" >&5
11535   cat conftest.$ac_ext >&5
11536   rm -rf conftest*
11537   eval "ac_cv_header_$ac_safe=no"
11538 fi
11539 rm -f conftest*
11540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11541   echo "$ac_t""yes" 1>&6
11542   { test "$extra_verbose" = "yes" && cat << \EOF
11543     Defining HAVE_SYSVIPC
11544 EOF
11545 cat >> confdefs.h <<\EOF
11546 #define HAVE_SYSVIPC 1
11547 EOF
11548 }
11549
11550 else
11551   echo "$ac_t""no" 1>&6
11552 fi
11553
11554 else
11555   echo "$ac_t""no" 1>&6
11556 fi
11557
11558 else
11559   echo "$ac_t""no" 1>&6
11560 fi
11561
11562
11563 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11564 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11565 echo "configure:11566: checking for dirent.h" >&5
11566
11567 cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 #include <dirent.h>
11571 EOF
11572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11573 { (eval echo configure:11574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11575 if test -z "$ac_err"; then
11576   rm -rf conftest*
11577   eval "ac_cv_header_$ac_safe=yes"
11578 else
11579   echo "$ac_err" >&5
11580   echo "configure: failed program was:" >&5
11581   cat conftest.$ac_ext >&5
11582   rm -rf conftest*
11583   eval "ac_cv_header_$ac_safe=no"
11584 fi
11585 rm -f conftest*
11586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11587   echo "$ac_t""yes" 1>&6
11588   { test "$extra_verbose" = "yes" && cat << \EOF
11589     Defining SYSV_SYSTEM_DIR
11590 EOF
11591 cat >> confdefs.h <<\EOF
11592 #define SYSV_SYSTEM_DIR 1
11593 EOF
11594 }
11595
11596 else
11597   echo "$ac_t""no" 1>&6
11598 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11599 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11600 echo "configure:11601: checking for sys/dir.h" >&5
11601
11602 cat > conftest.$ac_ext <<EOF
11603 #line 11604 "configure"
11604 #include "confdefs.h"
11605 #include <sys/dir.h>
11606 EOF
11607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11608 { (eval echo configure:11609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11610 if test -z "$ac_err"; then
11611   rm -rf conftest*
11612   eval "ac_cv_header_$ac_safe=yes"
11613 else
11614   echo "$ac_err" >&5
11615   echo "configure: failed program was:" >&5
11616   cat conftest.$ac_ext >&5
11617   rm -rf conftest*
11618   eval "ac_cv_header_$ac_safe=no"
11619 fi
11620 rm -f conftest*
11621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11622   echo "$ac_t""yes" 1>&6
11623   :
11624 else
11625   echo "$ac_t""no" 1>&6
11626 { test "$extra_verbose" = "yes" && cat << \EOF
11627     Defining NONSYSTEM_DIR_LIBRARY
11628 EOF
11629 cat >> confdefs.h <<\EOF
11630 #define NONSYSTEM_DIR_LIBRARY 1
11631 EOF
11632 }
11633
11634 fi
11635
11636 fi
11637
11638
11639 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11640 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11641 echo "configure:11642: checking for nlist.h" >&5
11642
11643 cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include <nlist.h>
11647 EOF
11648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11649 { (eval echo configure:11650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11651 if test -z "$ac_err"; then
11652   rm -rf conftest*
11653   eval "ac_cv_header_$ac_safe=yes"
11654 else
11655   echo "$ac_err" >&5
11656   echo "configure: failed program was:" >&5
11657   cat conftest.$ac_ext >&5
11658   rm -rf conftest*
11659   eval "ac_cv_header_$ac_safe=no"
11660 fi
11661 rm -f conftest*
11662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11663   echo "$ac_t""yes" 1>&6
11664   { test "$extra_verbose" = "yes" && cat << \EOF
11665     Defining NLIST_STRUCT
11666 EOF
11667 cat >> confdefs.h <<\EOF
11668 #define NLIST_STRUCT 1
11669 EOF
11670 }
11671
11672 else
11673   echo "$ac_t""no" 1>&6
11674 fi
11675
11676
11677
11678 echo "checking "for sound support"" 1>&6
11679 echo "configure:11680: checking "for sound support"" >&5
11680 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11681
11682 if test "$with_native_sound" != "no"; then
11683     if test -n "$native_sound_lib"; then
11684     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11685 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11686 echo "configure:11687: checking for multimedia/audio_device.h" >&5
11687
11688 cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691 #include <multimedia/audio_device.h>
11692 EOF
11693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11694 { (eval echo configure:11695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11696 if test -z "$ac_err"; then
11697   rm -rf conftest*
11698   eval "ac_cv_header_$ac_safe=yes"
11699 else
11700   echo "$ac_err" >&5
11701   echo "configure: failed program was:" >&5
11702   cat conftest.$ac_ext >&5
11703   rm -rf conftest*
11704   eval "ac_cv_header_$ac_safe=no"
11705 fi
11706 rm -f conftest*
11707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11708   echo "$ac_t""yes" 1>&6
11709   sound_found=yes sound_cflags=""
11710       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11711    echo "    xemacs will be linked with \"sunplay.o\""
11712  fi
11713 else
11714   echo "$ac_t""no" 1>&6
11715 fi
11716
11717   fi
11718
11719     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11720     sound_found=yes
11721     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11722    echo "    xemacs will be linked with \"sunplay.o\""
11723  fi
11724     if test -d "/usr/demo/SOUND/include"
11725       then sound_cflags="-I/usr/demo/SOUND/include"
11726       else sound_cflags="-I/usr/demo/SOUND"
11727     fi
11728     if test -z "$native_sound_lib" ; then
11729       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11730         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11731         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11732       fi
11733     fi
11734   fi
11735
11736     if test -z "$sound_found"; then
11737     case "$canonical" in
11738     *-sgi-* )
11739       if test -z "$native_sound_lib"; then
11740         
11741 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11742 echo "configure:11743: checking for ALopenport in -laudio" >&5
11743 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11744
11745 xe_check_libs=" -laudio "
11746 cat > conftest.$ac_ext <<EOF
11747 #line 11748 "configure"
11748 #include "confdefs.h"
11749 /* Override any gcc2 internal prototype to avoid an error.  */
11750 /* We use char because int might match the return type of a gcc2
11751     builtin and then its argument prototype would still apply.  */
11752 char ALopenport();
11753
11754 int main() {
11755 ALopenport()
11756 ; return 0; }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11759   rm -rf conftest*
11760   eval "ac_cv_lib_$ac_lib_var=yes"
11761 else
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -rf conftest*
11765   eval "ac_cv_lib_$ac_lib_var=no"
11766 fi
11767 rm -f conftest*
11768 xe_check_libs=""
11769
11770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11771   echo "$ac_t""yes" 1>&6
11772   native_sound_lib="-laudio"
11773 else
11774   echo "$ac_t""no" 1>&6
11775 fi
11776
11777
11778       fi
11779       if test -n "$native_sound_lib"; then
11780         sound_found=yes sound_cflags=""
11781         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11782    echo "    xemacs will be linked with \"sgiplay.o\""
11783  fi
11784       fi ;;
11785     hppa*-hp-hpux* )
11786       if test -z "$native_sound_lib"; then
11787         
11788 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11789 echo "configure:11790: checking for AOpenAudio in -lAlib" >&5
11790 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11791
11792 xe_check_libs=" -lAlib "
11793 cat > conftest.$ac_ext <<EOF
11794 #line 11795 "configure"
11795 #include "confdefs.h"
11796 /* Override any gcc2 internal prototype to avoid an error.  */
11797 /* We use char because int might match the return type of a gcc2
11798     builtin and then its argument prototype would still apply.  */
11799 char AOpenAudio();
11800
11801 int main() {
11802 AOpenAudio()
11803 ; return 0; }
11804 EOF
11805 if { (eval echo configure:11806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11806   rm -rf conftest*
11807   eval "ac_cv_lib_$ac_lib_var=yes"
11808 else
11809   echo "configure: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   rm -rf conftest*
11812   eval "ac_cv_lib_$ac_lib_var=no"
11813 fi
11814 rm -f conftest*
11815 xe_check_libs=""
11816
11817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11818   echo "$ac_t""yes" 1>&6
11819   native_sound_lib="-lAlib"
11820 else
11821   echo "$ac_t""no" 1>&6
11822 fi
11823
11824
11825       fi
11826       if test -n "$native_sound_lib"; then
11827         sound_found=yes
11828         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11829    echo "    xemacs will be linked with \"hpplay.o\""
11830  fi
11831         if test "$GCC" = "yes" # Kludge city
11832           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11833           else sound_cflags="+e -I/usr/audio/examples"
11834         fi
11835       fi ;;
11836     esac
11837   fi
11838
11839     if test -z "$sound_found"; then
11840     for dir in "machine" "sys" "linux"; do
11841       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11842 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11843 echo "configure:11844: checking for ${dir}/soundcard.h" >&5
11844
11845 cat > conftest.$ac_ext <<EOF
11846 #line 11847 "configure"
11847 #include "confdefs.h"
11848 #include <${dir}/soundcard.h>
11849 EOF
11850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11851 { (eval echo configure:11852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11853 if test -z "$ac_err"; then
11854   rm -rf conftest*
11855   eval "ac_cv_header_$ac_safe=yes"
11856 else
11857   echo "$ac_err" >&5
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -rf conftest*
11861   eval "ac_cv_header_$ac_safe=no"
11862 fi
11863 rm -f conftest*
11864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11865   echo "$ac_t""yes" 1>&6
11866   sound_found=yes
11867        need_miscplay=yes
11868         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11869    echo "    xemacs will be linked with \"linuxplay.o\""
11870  fi
11871         { test "$extra_verbose" = "yes" && cat << EOF
11872     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
11873 EOF
11874 cat >> confdefs.h <<EOF
11875 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
11876 EOF
11877 }
11878
11879         break
11880 else
11881   echo "$ac_t""no" 1>&6
11882 fi
11883
11884     done
11885   fi
11886
11887   test "$sound_found" = "yes" && with_native_sound=yes
11888 fi
11889
11890 if test "$with_native_sound" = "yes"; then
11891   { test "$extra_verbose" = "yes" && cat << \EOF
11892     Defining HAVE_NATIVE_SOUND
11893 EOF
11894 cat >> confdefs.h <<\EOF
11895 #define HAVE_NATIVE_SOUND 1
11896 EOF
11897 }
11898
11899   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11900 fi
11901
11902 if test "$with_nas_sound" != "no"; then
11903   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11904 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11905 echo "configure:11906: checking for audio/audiolib.h" >&5
11906
11907 cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910 #include <audio/audiolib.h>
11911 EOF
11912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11913 { (eval echo configure:11914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11915 if test -z "$ac_err"; then
11916   rm -rf conftest*
11917   eval "ac_cv_header_$ac_safe=yes"
11918 else
11919   echo "$ac_err" >&5
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   eval "ac_cv_header_$ac_safe=no"
11924 fi
11925 rm -f conftest*
11926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11927   echo "$ac_t""yes" 1>&6
11928   
11929     
11930 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11931 echo "configure:11932: checking for AuOpenServer in -laudio" >&5
11932 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11933
11934 xe_check_libs=" -laudio "
11935 cat > conftest.$ac_ext <<EOF
11936 #line 11937 "configure"
11937 #include "confdefs.h"
11938 /* Override any gcc2 internal prototype to avoid an error.  */
11939 /* We use char because int might match the return type of a gcc2
11940     builtin and then its argument prototype would still apply.  */
11941 char AuOpenServer();
11942
11943 int main() {
11944 AuOpenServer()
11945 ; return 0; }
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11948   rm -rf conftest*
11949   eval "ac_cv_lib_$ac_lib_var=yes"
11950 else
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -rf conftest*
11954   eval "ac_cv_lib_$ac_lib_var=no"
11955 fi
11956 rm -f conftest*
11957 xe_check_libs=""
11958
11959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11960   echo "$ac_t""yes" 1>&6
11961   have_nas_sound=yes
11962 else
11963   echo "$ac_t""no" 1>&6
11964 fi
11965
11966
11967 else
11968   echo "$ac_t""no" 1>&6
11969 fi
11970
11971   if test "$have_nas_sound" = "yes"; then
11972     with_nas_sound=yes
11973     { test "$extra_verbose" = "yes" && cat << \EOF
11974     Defining HAVE_NAS_SOUND
11975 EOF
11976 cat >> confdefs.h <<\EOF
11977 #define HAVE_NAS_SOUND 1
11978 EOF
11979 }
11980
11981     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11982    echo "    xemacs will be linked with \"nas.o\""
11983  fi
11984     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11985             cat > conftest.$ac_ext <<EOF
11986 #line 11987 "configure"
11987 #include "confdefs.h"
11988 #include <audio/Xtutil.h>
11989 EOF
11990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11991   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11992   :
11993 else
11994   rm -rf conftest*
11995   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11996     Defining NAS_NO_ERROR_JUMP
11997 EOF
11998 cat >> confdefs.h <<\EOF
11999 #define NAS_NO_ERROR_JUMP 1
12000 EOF
12001 }
12002
12003 fi
12004 rm -f conftest*
12005
12006   else
12007     test "$with_nas_sound" = "yes" && \
12008       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12009     with_nas_sound=no
12010   fi
12011 fi
12012
12013 if test "$with_esd_sound" != "no"; then
12014   # Extract the first word of "esd-config", so it can be a program name with args.
12015 set dummy esd-config; ac_word=$2
12016 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12017 echo "configure:12018: checking for $ac_word" >&5
12018
12019 if test -n "$have_esd_config"; then
12020   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12021 else
12022   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12023   ac_dummy="$PATH"
12024   for ac_dir in $ac_dummy; do
12025     test -z "$ac_dir" && ac_dir=.
12026     if test -f $ac_dir/$ac_word; then
12027       ac_cv_prog_have_esd_config="yes"
12028       break
12029     fi
12030   done
12031   IFS="$ac_save_ifs"
12032   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12033 fi
12034 have_esd_config="$ac_cv_prog_have_esd_config"
12035 if test -n "$have_esd_config"; then
12036   echo "$ac_t""$have_esd_config" 1>&6
12037 else
12038   echo "$ac_t""no" 1>&6
12039 fi
12040
12041   if test "$have_esd_config" = "yes"; then
12042     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12043     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
12044     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12045     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12046 echo "configure:12047: checking for esd_play_stream" >&5
12047
12048 cat > conftest.$ac_ext <<EOF
12049 #line 12050 "configure"
12050 #include "confdefs.h"
12051 /* System header to define __stub macros and hopefully few prototypes,
12052     which can conflict with char esd_play_stream(); below.  */
12053 #include <assert.h>
12054 /* Override any gcc2 internal prototype to avoid an error.  */
12055 /* We use char because int might match the return type of a gcc2
12056     builtin and then its argument prototype would still apply.  */
12057 char esd_play_stream();
12058
12059 int main() {
12060
12061 /* The GNU C library defines this for functions which it implements
12062     to always fail with ENOSYS.  Some functions are actually named
12063     something starting with __ and the normal name is an alias.  */
12064 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12065 choke me
12066 #else
12067 esd_play_stream();
12068 #endif
12069
12070 ; return 0; }
12071 EOF
12072 if { (eval echo configure:12073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12073   rm -rf conftest*
12074   eval "ac_cv_func_esd_play_stream=yes"
12075 else
12076   echo "configure: failed program was:" >&5
12077   cat conftest.$ac_ext >&5
12078   rm -rf conftest*
12079   eval "ac_cv_func_esd_play_stream=no"
12080 fi
12081 rm -f conftest*
12082
12083 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12084   echo "$ac_t""yes" 1>&6
12085   have_esd_sound=yes
12086 else
12087   echo "$ac_t""no" 1>&6
12088 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12089 fi
12090
12091   fi
12092
12093   if test "$have_esd_sound" = "yes"; then
12094     with_esd_sound=yes
12095     need_miscplay=yes
12096     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12097    echo "    xemacs will be linked with \"esd.o\""
12098  fi
12099     { test "$extra_verbose" = "yes" && cat << \EOF
12100     Defining HAVE_ESD_SOUND
12101 EOF
12102 cat >> confdefs.h <<\EOF
12103 #define HAVE_ESD_SOUND 1
12104 EOF
12105 }
12106
12107   else
12108     test "$with_esd_sound" = "yes" && \
12109       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12110     with_esd_sound=no
12111   fi
12112 fi
12113
12114 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12115    echo "    xemacs will be linked with \"miscplay.o\""
12116  fi
12117
12118
12119 test -z "$with_tty" && with_tty=yes
12120
12121 if test "$with_tty" = "yes"  ; then
12122   echo "checking for TTY-related features" 1>&6
12123 echo "configure:12124: checking for TTY-related features" >&5
12124   { test "$extra_verbose" = "yes" && cat << \EOF
12125     Defining HAVE_TTY
12126 EOF
12127 cat >> confdefs.h <<\EOF
12128 #define HAVE_TTY 1
12129 EOF
12130 }
12131
12132   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
12133    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\""
12134  fi
12135
12136     if test -z "$with_ncurses"; then
12137     
12138 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12139 echo "configure:12140: checking for tgetent in -lncurses" >&5
12140 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12141
12142 xe_check_libs=" -lncurses "
12143 cat > conftest.$ac_ext <<EOF
12144 #line 12145 "configure"
12145 #include "confdefs.h"
12146 /* Override any gcc2 internal prototype to avoid an error.  */
12147 /* We use char because int might match the return type of a gcc2
12148     builtin and then its argument prototype would still apply.  */
12149 char tgetent();
12150
12151 int main() {
12152 tgetent()
12153 ; return 0; }
12154 EOF
12155 if { (eval echo configure:12156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12156   rm -rf conftest*
12157   eval "ac_cv_lib_$ac_lib_var=yes"
12158 else
12159   echo "configure: failed program was:" >&5
12160   cat conftest.$ac_ext >&5
12161   rm -rf conftest*
12162   eval "ac_cv_lib_$ac_lib_var=no"
12163 fi
12164 rm -f conftest*
12165 xe_check_libs=""
12166
12167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12168   echo "$ac_t""yes" 1>&6
12169   with_ncurses=yes
12170 else
12171   echo "$ac_t""no" 1>&6
12172 with_ncurses=no
12173 fi
12174
12175
12176   fi
12177   if test "$with_ncurses" = "yes"; then
12178     { test "$extra_verbose" = "yes" && cat << \EOF
12179     Defining HAVE_NCURSES
12180 EOF
12181 cat >> confdefs.h <<\EOF
12182 #define HAVE_NCURSES 1
12183 EOF
12184 }
12185
12186     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12187 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12188 echo "configure:12189: checking for ncurses/curses.h" >&5
12189
12190 cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193 #include <ncurses/curses.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   curses_h_file=ncurses/curses.h
12212 else
12213   echo "$ac_t""no" 1>&6
12214 fi
12215
12216     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12217 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12218 echo "configure:12219: checking for ncurses/term.h" >&5
12219
12220 cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 #include <ncurses/term.h>
12224 EOF
12225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12226 { (eval echo configure:12227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12228 if test -z "$ac_err"; then
12229   rm -rf conftest*
12230   eval "ac_cv_header_$ac_safe=yes"
12231 else
12232   echo "$ac_err" >&5
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   eval "ac_cv_header_$ac_safe=no"
12237 fi
12238 rm -f conftest*
12239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12240   echo "$ac_t""yes" 1>&6
12241   term_h_file=ncurses/term.h
12242 else
12243   echo "$ac_t""no" 1>&6
12244 fi
12245
12246     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12247    echo "    xemacs will be linked with \"terminfo.o\""
12248  fi
12249     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12250
12251     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12252                         save_c_switch_site="$c_switch_site"
12253       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12254       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12255 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12256 echo "configure:12257: checking for ncurses/curses.h" >&5
12257
12258 cat > conftest.$ac_ext <<EOF
12259 #line 12260 "configure"
12260 #include "confdefs.h"
12261 #include <ncurses/curses.h>
12262 EOF
12263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12264 { (eval echo configure:12265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12266 if test -z "$ac_err"; then
12267   rm -rf conftest*
12268   eval "ac_cv_header_$ac_safe=yes"
12269 else
12270   echo "$ac_err" >&5
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   eval "ac_cv_header_$ac_safe=no"
12275 fi
12276 rm -f conftest*
12277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12278   echo "$ac_t""yes" 1>&6
12279   curses_h_file=ncurses/curses.h
12280 else
12281   echo "$ac_t""no" 1>&6
12282 fi
12283
12284       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12285         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12286         else c_switch_site="$save_c_switch_site"
12287       fi
12288     fi
12289   else         if test "$have_terminfo" = "yes"; then
12290       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12291    echo "    xemacs will be linked with \"terminfo.o\""
12292  fi
12293       if test -n "$libs_termcap"; then
12294         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12295       else
12296         for lib in curses termlib termcap; do
12297           
12298 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12299 echo "configure:12300: checking for tgetent in -l$lib" >&5
12300 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12301
12302 xe_check_libs=" -l$lib "
12303 cat > conftest.$ac_ext <<EOF
12304 #line 12305 "configure"
12305 #include "confdefs.h"
12306 /* Override any gcc2 internal prototype to avoid an error.  */
12307 /* We use char because int might match the return type of a gcc2
12308     builtin and then its argument prototype would still apply.  */
12309 char tgetent();
12310
12311 int main() {
12312 tgetent()
12313 ; return 0; }
12314 EOF
12315 if { (eval echo configure:12316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12316   rm -rf conftest*
12317   eval "ac_cv_lib_$ac_lib_var=yes"
12318 else
12319   echo "configure: failed program was:" >&5
12320   cat conftest.$ac_ext >&5
12321   rm -rf conftest*
12322   eval "ac_cv_lib_$ac_lib_var=no"
12323 fi
12324 rm -f conftest*
12325 xe_check_libs=""
12326
12327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12328   echo "$ac_t""yes" 1>&6
12329   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12330 else
12331   echo "$ac_t""no" 1>&6
12332 fi
12333
12334
12335         done
12336       fi
12337     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12338    echo "    xemacs will be linked with \"tparam.o\""
12339  fi
12340                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12341       if test -n "$libs_termcap"; then
12342         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12343       else
12344         
12345 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12346 echo "configure:12347: checking for tgetent in -lcurses" >&5
12347 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12348
12349 xe_check_libs=" -lcurses "
12350 cat > conftest.$ac_ext <<EOF
12351 #line 12352 "configure"
12352 #include "confdefs.h"
12353 /* Override any gcc2 internal prototype to avoid an error.  */
12354 /* We use char because int might match the return type of a gcc2
12355     builtin and then its argument prototype would still apply.  */
12356 char tgetent();
12357
12358 int main() {
12359 tgetent()
12360 ; return 0; }
12361 EOF
12362 if { (eval echo configure:12363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12363   rm -rf conftest*
12364   eval "ac_cv_lib_$ac_lib_var=yes"
12365 else
12366   echo "configure: failed program was:" >&5
12367   cat conftest.$ac_ext >&5
12368   rm -rf conftest*
12369   eval "ac_cv_lib_$ac_lib_var=no"
12370 fi
12371 rm -f conftest*
12372 xe_check_libs=""
12373
12374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12375   echo "$ac_t""yes" 1>&6
12376   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12377 else
12378   echo "$ac_t""no" 1>&6
12379 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12380 echo "configure:12381: checking for tgetent in -ltermcap" >&5
12381 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12382
12383 xe_check_libs=" -ltermcap "
12384 cat > conftest.$ac_ext <<EOF
12385 #line 12386 "configure"
12386 #include "confdefs.h"
12387 /* Override any gcc2 internal prototype to avoid an error.  */
12388 /* We use char because int might match the return type of a gcc2
12389     builtin and then its argument prototype would still apply.  */
12390 char tgetent();
12391
12392 int main() {
12393 tgetent()
12394 ; return 0; }
12395 EOF
12396 if { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12397   rm -rf conftest*
12398   eval "ac_cv_lib_$ac_lib_var=yes"
12399 else
12400   echo "configure: failed program was:" >&5
12401   cat conftest.$ac_ext >&5
12402   rm -rf conftest*
12403   eval "ac_cv_lib_$ac_lib_var=no"
12404 fi
12405 rm -f conftest*
12406 xe_check_libs=""
12407
12408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12409   echo "$ac_t""yes" 1>&6
12410   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12411 else
12412   echo "$ac_t""no" 1>&6
12413 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12414    echo "    xemacs will be linked with \"termcap.o\""
12415  fi
12416 fi
12417
12418
12419 fi
12420
12421
12422       fi
12423     fi
12424   fi
12425   { test "$extra_verbose" = "yes" && cat << EOF
12426     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12427 EOF
12428 cat >> confdefs.h <<EOF
12429 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12430 EOF
12431 }
12432
12433   { test "$extra_verbose" = "yes" && cat << EOF
12434     Defining TERM_H_FILE = "${term_h_file-term.h}"
12435 EOF
12436 cat >> confdefs.h <<EOF
12437 #define TERM_H_FILE "${term_h_file-term.h}"
12438 EOF
12439 }
12440
12441
12442     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12443 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12444 echo "configure:12445: checking for gpm.h" >&5
12445
12446 cat > conftest.$ac_ext <<EOF
12447 #line 12448 "configure"
12448 #include "confdefs.h"
12449 #include <gpm.h>
12450 EOF
12451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12452 { (eval echo configure:12453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12454 if test -z "$ac_err"; then
12455   rm -rf conftest*
12456   eval "ac_cv_header_$ac_safe=yes"
12457 else
12458   echo "$ac_err" >&5
12459   echo "configure: failed program was:" >&5
12460   cat conftest.$ac_ext >&5
12461   rm -rf conftest*
12462   eval "ac_cv_header_$ac_safe=no"
12463 fi
12464 rm -f conftest*
12465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12466   echo "$ac_t""yes" 1>&6
12467   :
12468 else
12469   echo "$ac_t""no" 1>&6
12470 with_gpm=no
12471 fi
12472  }
12473   test -z "$with_gpm" && { 
12474 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12475 echo "configure:12476: checking for Gpm_Open in -lgpm" >&5
12476 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12477
12478 xe_check_libs=" -lgpm "
12479 cat > conftest.$ac_ext <<EOF
12480 #line 12481 "configure"
12481 #include "confdefs.h"
12482 /* Override any gcc2 internal prototype to avoid an error.  */
12483 /* We use char because int might match the return type of a gcc2
12484     builtin and then its argument prototype would still apply.  */
12485 char Gpm_Open();
12486
12487 int main() {
12488 Gpm_Open()
12489 ; return 0; }
12490 EOF
12491 if { (eval echo configure:12492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12492   rm -rf conftest*
12493   eval "ac_cv_lib_$ac_lib_var=yes"
12494 else
12495   echo "configure: failed program was:" >&5
12496   cat conftest.$ac_ext >&5
12497   rm -rf conftest*
12498   eval "ac_cv_lib_$ac_lib_var=no"
12499 fi
12500 rm -f conftest*
12501 xe_check_libs=""
12502
12503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12504   echo "$ac_t""yes" 1>&6
12505   with_gpm=yes
12506 else
12507   echo "$ac_t""no" 1>&6
12508 with_gpm=no
12509 fi
12510
12511  }
12512   if test "$with_gpm" = "yes"; then
12513     { test "$extra_verbose" = "yes" && cat << \EOF
12514     Defining HAVE_GPM
12515 EOF
12516 cat >> confdefs.h <<\EOF
12517 #define HAVE_GPM 1
12518 EOF
12519 }
12520
12521     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12522    echo "    xemacs will be linked with \"gpmevent.o\""
12523  fi
12524     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12525   fi
12526
12527 else   for feature in ncurses gpm; do
12528     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12529       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12530     fi
12531     eval "with_${feature}=no"
12532   done
12533 fi 
12534 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12535    echo "    xemacs will be linked with \"event-unixoid.o\""
12536  fi
12537
12538
12539 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12540   != "no no no" && echo "checking for database support" 1>&6
12541 echo "configure:12542: checking for database support" >&5
12542
12543 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12544   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12545 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12546 echo "configure:12547: checking for ndbm.h" >&5
12547
12548 cat > conftest.$ac_ext <<EOF
12549 #line 12550 "configure"
12550 #include "confdefs.h"
12551 #include <ndbm.h>
12552 EOF
12553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12554 { (eval echo configure:12555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12556 if test -z "$ac_err"; then
12557   rm -rf conftest*
12558   eval "ac_cv_header_$ac_safe=yes"
12559 else
12560   echo "$ac_err" >&5
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_header_$ac_safe=no"
12565 fi
12566 rm -f conftest*
12567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12568   echo "$ac_t""yes" 1>&6
12569   :
12570 else
12571   echo "$ac_t""no" 1>&6
12572
12573     test "$with_database_gdbm" = "yes" -o \
12574          "$with_database_dbm"  = "yes" && \
12575       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12576     with_database_gdbm=no with_database_dbm=no
12577 fi
12578
12579 fi
12580
12581 if test "$with_database_gdbm" != "no"; then
12582   
12583 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12584 echo "configure:12585: checking for dbm_open in -lgdbm" >&5
12585 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12586
12587 xe_check_libs=" -lgdbm "
12588 cat > conftest.$ac_ext <<EOF
12589 #line 12590 "configure"
12590 #include "confdefs.h"
12591 /* Override any gcc2 internal prototype to avoid an error.  */
12592 /* We use char because int might match the return type of a gcc2
12593     builtin and then its argument prototype would still apply.  */
12594 char dbm_open();
12595
12596 int main() {
12597 dbm_open()
12598 ; return 0; }
12599 EOF
12600 if { (eval echo configure:12601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12601   rm -rf conftest*
12602   eval "ac_cv_lib_$ac_lib_var=yes"
12603 else
12604   echo "configure: failed program was:" >&5
12605   cat conftest.$ac_ext >&5
12606   rm -rf conftest*
12607   eval "ac_cv_lib_$ac_lib_var=no"
12608 fi
12609 rm -f conftest*
12610 xe_check_libs=""
12611
12612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12613   echo "$ac_t""yes" 1>&6
12614   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12615 else
12616   echo "$ac_t""no" 1>&6
12617 if test "$with_database_gdbm" = "yes"; then
12618      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12619    fi
12620    with_database_gdbm=no
12621 fi
12622
12623
12624 fi
12625
12626 if test "$with_database_dbm" != "no"; then
12627   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12628 echo "configure:12629: checking for dbm_open" >&5
12629
12630 cat > conftest.$ac_ext <<EOF
12631 #line 12632 "configure"
12632 #include "confdefs.h"
12633 /* System header to define __stub macros and hopefully few prototypes,
12634     which can conflict with char dbm_open(); below.  */
12635 #include <assert.h>
12636 /* Override any gcc2 internal prototype to avoid an error.  */
12637 /* We use char because int might match the return type of a gcc2
12638     builtin and then its argument prototype would still apply.  */
12639 char dbm_open();
12640
12641 int main() {
12642
12643 /* The GNU C library defines this for functions which it implements
12644     to always fail with ENOSYS.  Some functions are actually named
12645     something starting with __ and the normal name is an alias.  */
12646 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12647 choke me
12648 #else
12649 dbm_open();
12650 #endif
12651
12652 ; return 0; }
12653 EOF
12654 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12655   rm -rf conftest*
12656   eval "ac_cv_func_dbm_open=yes"
12657 else
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -rf conftest*
12661   eval "ac_cv_func_dbm_open=no"
12662 fi
12663 rm -f conftest*
12664
12665 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12666   echo "$ac_t""yes" 1>&6
12667   with_database_dbm=yes libdbm=
12668 else
12669   echo "$ac_t""no" 1>&6
12670
12671     
12672 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12673 echo "configure:12674: checking for dbm_open in -ldbm" >&5
12674 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12675
12676 xe_check_libs=" -ldbm "
12677 cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 /* Override any gcc2 internal prototype to avoid an error.  */
12681 /* We use char because int might match the return type of a gcc2
12682     builtin and then its argument prototype would still apply.  */
12683 char dbm_open();
12684
12685 int main() {
12686 dbm_open()
12687 ; return 0; }
12688 EOF
12689 if { (eval echo configure:12690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12690   rm -rf conftest*
12691   eval "ac_cv_lib_$ac_lib_var=yes"
12692 else
12693   echo "configure: failed program was:" >&5
12694   cat conftest.$ac_ext >&5
12695   rm -rf conftest*
12696   eval "ac_cv_lib_$ac_lib_var=no"
12697 fi
12698 rm -f conftest*
12699 xe_check_libs=""
12700
12701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12702   echo "$ac_t""yes" 1>&6
12703   with_database_dbm=yes libdbm=-ldbm
12704 else
12705   echo "$ac_t""no" 1>&6
12706 test "$with_database_dbm" = "yes" && \
12707         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12708       with_database_dbm=no
12709 fi
12710
12711
12712 fi
12713
12714 fi
12715
12716 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12717 test "$with_database_gdbm" = "yes" -o \
12718      "$with_database_dbm"  = "yes" && \
12719   { test "$extra_verbose" = "yes" && cat << \EOF
12720     Defining HAVE_DBM
12721 EOF
12722 cat >> confdefs.h <<\EOF
12723 #define HAVE_DBM 1
12724 EOF
12725 }
12726
12727
12728 if test "$with_database_berkdb" != "no"; then
12729   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12730 echo "configure:12731: checking for Berkeley db.h" >&5
12731   for header in "db/db.h" "db.h"; do
12732     cat > conftest.$ac_ext <<EOF
12733 #line 12734 "configure"
12734 #include "confdefs.h"
12735
12736 #include <stdlib.h>
12737 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12738 #ifdef HAVE_INTTYPES_H
12739 #define __BIT_TYPES_DEFINED__
12740 #include <inttypes.h>
12741 typedef uint8_t  u_int8_t;
12742 typedef uint16_t u_int16_t;
12743 typedef uint32_t u_int32_t;
12744 #ifdef WE_DONT_NEED_QUADS
12745 typedef uint64_t u_int64_t;
12746 #endif
12747 #endif
12748 #endif
12749 #include <$header>
12750
12751 int main() {
12752
12753 ; return 0; }
12754 EOF
12755 if { (eval echo configure:12756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12756   rm -rf conftest*
12757   db_h_file="$header"; break
12758 else
12759   echo "configure: failed program was:" >&5
12760   cat conftest.$ac_ext >&5
12761 fi
12762 rm -f conftest*
12763   done
12764   if test -z "$db_h_file"
12765   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12766   else echo "$ac_t""$db_h_file" 1>&6
12767   fi
12768
12769   if test "$with_database_berkdb" != "no"; then
12770     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12771 echo "configure:12772: checking for Berkeley DB version" >&5
12772     cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775 #include <$db_h_file>
12776 #if DB_VERSION_MAJOR > 1
12777 yes
12778 #endif
12779
12780 EOF
12781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12782   egrep "yes" >/dev/null 2>&1; then
12783   rm -rf conftest*
12784   echo "$ac_t""2" 1>&6; dbfunc=db_open
12785 else
12786   rm -rf conftest*
12787   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12788 fi
12789 rm -f conftest*
12790
12791     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12792 echo "configure:12793: checking for $dbfunc" >&5
12793
12794 cat > conftest.$ac_ext <<EOF
12795 #line 12796 "configure"
12796 #include "confdefs.h"
12797 /* System header to define __stub macros and hopefully few prototypes,
12798     which can conflict with char $dbfunc(); below.  */
12799 #include <assert.h>
12800 /* Override any gcc2 internal prototype to avoid an error.  */
12801 /* We use char because int might match the return type of a gcc2
12802     builtin and then its argument prototype would still apply.  */
12803 char $dbfunc();
12804
12805 int main() {
12806
12807 /* The GNU C library defines this for functions which it implements
12808     to always fail with ENOSYS.  Some functions are actually named
12809     something starting with __ and the normal name is an alias.  */
12810 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12811 choke me
12812 #else
12813 $dbfunc();
12814 #endif
12815
12816 ; return 0; }
12817 EOF
12818 if { (eval echo configure:12819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12819   rm -rf conftest*
12820   eval "ac_cv_func_$dbfunc=yes"
12821 else
12822   echo "configure: failed program was:" >&5
12823   cat conftest.$ac_ext >&5
12824   rm -rf conftest*
12825   eval "ac_cv_func_$dbfunc=no"
12826 fi
12827 rm -f conftest*
12828
12829 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12830   echo "$ac_t""yes" 1>&6
12831   with_database_berkdb=yes need_libdb=no
12832 else
12833   echo "$ac_t""no" 1>&6
12834
12835     
12836 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12837 echo "configure:12838: checking for $dbfunc in -ldb" >&5
12838 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12839
12840 xe_check_libs=" -ldb "
12841 cat > conftest.$ac_ext <<EOF
12842 #line 12843 "configure"
12843 #include "confdefs.h"
12844 /* Override any gcc2 internal prototype to avoid an error.  */
12845 /* We use char because int might match the return type of a gcc2
12846     builtin and then its argument prototype would still apply.  */
12847 char $dbfunc();
12848
12849 int main() {
12850 $dbfunc()
12851 ; return 0; }
12852 EOF
12853 if { (eval echo configure:12854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12854   rm -rf conftest*
12855   eval "ac_cv_lib_$ac_lib_var=yes"
12856 else
12857   echo "configure: failed program was:" >&5
12858   cat conftest.$ac_ext >&5
12859   rm -rf conftest*
12860   eval "ac_cv_lib_$ac_lib_var=no"
12861 fi
12862 rm -f conftest*
12863 xe_check_libs=""
12864
12865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12866   echo "$ac_t""yes" 1>&6
12867   with_database_berkdb=yes need_libdb=yes
12868 else
12869   echo "$ac_t""no" 1>&6
12870 fi
12871
12872
12873 fi
12874
12875   fi
12876
12877   if test "$with_database_berkdb" = "yes"; then
12878     { test "$extra_verbose" = "yes" && cat << EOF
12879     Defining DB_H_FILE = "$db_h_file"
12880 EOF
12881 cat >> confdefs.h <<EOF
12882 #define DB_H_FILE "$db_h_file"
12883 EOF
12884 }
12885
12886     { test "$extra_verbose" = "yes" && cat << \EOF
12887     Defining HAVE_BERKELEY_DB
12888 EOF
12889 cat >> confdefs.h <<\EOF
12890 #define HAVE_BERKELEY_DB 1
12891 EOF
12892 }
12893
12894     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12895   else with_database_berkdb=no
12896   fi
12897 fi
12898
12899 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12900      != "no no no"; then
12901   { test "$extra_verbose" = "yes" && cat << \EOF
12902     Defining HAVE_DATABASE
12903 EOF
12904 cat >> confdefs.h <<\EOF
12905 #define HAVE_DATABASE 1
12906 EOF
12907 }
12908
12909   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12910    echo "    xemacs will be linked with \"database.o\""
12911  fi
12912 fi
12913
12914 if test "$with_socks" = "yes"; then
12915   
12916 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12917 echo "configure:12918: checking for SOCKSinit in -lsocks" >&5
12918 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12919
12920 xe_check_libs=" -lsocks "
12921 cat > conftest.$ac_ext <<EOF
12922 #line 12923 "configure"
12923 #include "confdefs.h"
12924 /* Override any gcc2 internal prototype to avoid an error.  */
12925 /* We use char because int might match the return type of a gcc2
12926     builtin and then its argument prototype would still apply.  */
12927 char SOCKSinit();
12928
12929 int main() {
12930 SOCKSinit()
12931 ; return 0; }
12932 EOF
12933 if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12934   rm -rf conftest*
12935   eval "ac_cv_lib_$ac_lib_var=yes"
12936 else
12937   echo "configure: failed program was:" >&5
12938   cat conftest.$ac_ext >&5
12939   rm -rf conftest*
12940   eval "ac_cv_lib_$ac_lib_var=no"
12941 fi
12942 rm -f conftest*
12943 xe_check_libs=""
12944
12945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12946   echo "$ac_t""yes" 1>&6
12947     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12948     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12949   { test "$extra_verbose" = "yes" && cat << EOF
12950     Defining $ac_tr_lib
12951 EOF
12952 cat >> confdefs.h <<EOF
12953 #define $ac_tr_lib 1
12954 EOF
12955 }
12956
12957   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12958
12959 else
12960   echo "$ac_t""no" 1>&6
12961 fi
12962
12963
12964   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12965     Defining HAVE_SOCKS
12966 EOF
12967 cat >> confdefs.h <<\EOF
12968 #define HAVE_SOCKS 1
12969 EOF
12970 }
12971
12972 fi
12973
12974 if test "$usage_tracking" = "yes"; then
12975   { test "$extra_verbose" = "yes" && cat << \EOF
12976     Defining USAGE_TRACKING
12977 EOF
12978 cat >> confdefs.h <<\EOF
12979 #define USAGE_TRACKING 1
12980 EOF
12981 }
12982
12983   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12984 fi
12985
12986 if test "$with_modules" != "no"; then
12987   echo "checking for module support" 1>&6
12988 echo "configure:12989: checking for module support" >&5
12989
12990     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12991 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12992 echo "configure:12993: checking for dlfcn.h" >&5
12993
12994 cat > conftest.$ac_ext <<EOF
12995 #line 12996 "configure"
12996 #include "confdefs.h"
12997 #include <dlfcn.h>
12998 EOF
12999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13000 { (eval echo configure:13001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13002 if test -z "$ac_err"; then
13003   rm -rf conftest*
13004   eval "ac_cv_header_$ac_safe=yes"
13005 else
13006   echo "$ac_err" >&5
13007   echo "configure: failed program was:" >&5
13008   cat conftest.$ac_ext >&5
13009   rm -rf conftest*
13010   eval "ac_cv_header_$ac_safe=no"
13011 fi
13012 rm -f conftest*
13013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13014   echo "$ac_t""yes" 1>&6
13015   
13016     
13017 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13018 echo "configure:13019: checking for dlopen in -ldl" >&5
13019 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
13020
13021 xe_check_libs=" -ldl "
13022 cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 /* Override any gcc2 internal prototype to avoid an error.  */
13026 /* We use char because int might match the return type of a gcc2
13027     builtin and then its argument prototype would still apply.  */
13028 char dlopen();
13029
13030 int main() {
13031 dlopen()
13032 ; return 0; }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13035   rm -rf conftest*
13036   eval "ac_cv_lib_$ac_lib_var=yes"
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   eval "ac_cv_lib_$ac_lib_var=no"
13042 fi
13043 rm -f conftest*
13044 xe_check_libs=""
13045
13046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13047   echo "$ac_t""yes" 1>&6
13048   have_dl=yes libdl=dl
13049 else
13050   echo "$ac_t""no" 1>&6
13051
13052 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13053 echo "configure:13054: checking for dlopen in -lc" >&5
13054 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
13055
13056 xe_check_libs=" -lc "
13057 cat > conftest.$ac_ext <<EOF
13058 #line 13059 "configure"
13059 #include "confdefs.h"
13060 /* Override any gcc2 internal prototype to avoid an error.  */
13061 /* We use char because int might match the return type of a gcc2
13062     builtin and then its argument prototype would still apply.  */
13063 char dlopen();
13064
13065 int main() {
13066 dlopen()
13067 ; return 0; }
13068 EOF
13069 if { (eval echo configure:13070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13070   rm -rf conftest*
13071   eval "ac_cv_lib_$ac_lib_var=yes"
13072 else
13073   echo "configure: failed program was:" >&5
13074   cat conftest.$ac_ext >&5
13075   rm -rf conftest*
13076   eval "ac_cv_lib_$ac_lib_var=no"
13077 fi
13078 rm -f conftest*
13079 xe_check_libs=""
13080
13081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13082   echo "$ac_t""yes" 1>&6
13083   have_dl=yes 
13084 else
13085   echo "$ac_t""no" 1>&6
13086 fi
13087
13088
13089 fi
13090
13091
13092 else
13093   echo "$ac_t""no" 1>&6
13094 fi
13095
13096   if test -n "$have_dl"; then
13097     { test "$extra_verbose" = "yes" && cat << \EOF
13098     Defining HAVE_DLOPEN
13099 EOF
13100 cat >> confdefs.h <<\EOF
13101 #define HAVE_DLOPEN 1
13102 EOF
13103 }
13104
13105   else
13106     
13107 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13108 echo "configure:13109: checking for shl_load in -ldld" >&5
13109 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13110
13111 xe_check_libs=" -ldld "
13112 cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 /* Override any gcc2 internal prototype to avoid an error.  */
13116 /* We use char because int might match the return type of a gcc2
13117     builtin and then its argument prototype would still apply.  */
13118 char shl_load();
13119
13120 int main() {
13121 shl_load()
13122 ; return 0; }
13123 EOF
13124 if { (eval echo configure:13125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13125   rm -rf conftest*
13126   eval "ac_cv_lib_$ac_lib_var=yes"
13127 else
13128   echo "configure: failed program was:" >&5
13129   cat conftest.$ac_ext >&5
13130   rm -rf conftest*
13131   eval "ac_cv_lib_$ac_lib_var=no"
13132 fi
13133 rm -f conftest*
13134 xe_check_libs=""
13135
13136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13137   echo "$ac_t""yes" 1>&6
13138   libdl=dld have_dl=yes;
13139       { test "$extra_verbose" = "yes" && cat << \EOF
13140     Defining HAVE_SHL_LOAD
13141 EOF
13142 cat >> confdefs.h <<\EOF
13143 #define HAVE_SHL_LOAD 1
13144 EOF
13145 }
13146
13147 else
13148   echo "$ac_t""no" 1>&6
13149
13150 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13151 echo "configure:13152: checking for dld_init in -ldld" >&5
13152 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13153
13154 xe_check_libs=" -ldld "
13155 cat > conftest.$ac_ext <<EOF
13156 #line 13157 "configure"
13157 #include "confdefs.h"
13158 /* Override any gcc2 internal prototype to avoid an error.  */
13159 /* We use char because int might match the return type of a gcc2
13160     builtin and then its argument prototype would still apply.  */
13161 char dld_init();
13162
13163 int main() {
13164 dld_init()
13165 ; return 0; }
13166 EOF
13167 if { (eval echo configure:13168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13168   rm -rf conftest*
13169   eval "ac_cv_lib_$ac_lib_var=yes"
13170 else
13171   echo "configure: failed program was:" >&5
13172   cat conftest.$ac_ext >&5
13173   rm -rf conftest*
13174   eval "ac_cv_lib_$ac_lib_var=no"
13175 fi
13176 rm -f conftest*
13177 xe_check_libs=""
13178
13179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13180   echo "$ac_t""yes" 1>&6
13181   libdl=dld have_dl=yes;
13182       { test "$extra_verbose" = "yes" && cat << \EOF
13183     Defining HAVE_DLD_INIT
13184 EOF
13185 cat >> confdefs.h <<\EOF
13186 #define HAVE_DLD_INIT 1
13187 EOF
13188 }
13189
13190 else
13191   echo "$ac_t""no" 1>&6
13192 fi
13193
13194
13195 fi
13196
13197
13198   fi
13199
13200   if test -n "$have_dl"; then
13201         
13202 dll_ld=
13203 dll_ldflags=
13204 dll_cflags=
13205 dll_post=
13206 dll_ldo="-o"
13207 ld_dynamic_link_flags=
13208 xehost=$canonical
13209 xealias=$internal_configuration
13210
13211 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13212 echo "configure:13213: checking how to build dynamic libraries for ${xehost}" >&5
13213 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13214 case "$xehost" in
13215 *-*-linux-gnu*) ;;
13216 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13217 esac
13218
13219 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13220 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13221 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13222
13223 case "$xehost_os" in
13224 aix3*)
13225   # AIX sometimes has problems with the GCC collect2 program.  For some
13226   # reason, if we set the COLLECT_NAMES environment variable, the problems
13227   # vanish in a puff of smoke.
13228   if test "${COLLECT_NAMES+set}" != set; then
13229     COLLECT_NAMES=
13230     export COLLECT_NAMES
13231   fi
13232   ;;
13233 esac
13234
13235 # Now see if the compiler is really GCC.
13236 if test "$GCC" = "yes"; then
13237   XEGCC=yes
13238 else
13239   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13240 echo "configure:13241: checking checking whether we are using GNU C" >&5
13241   cat > conftest.$ac_ext <<EOF
13242 #line 13243 "configure"
13243 #include "confdefs.h"
13244
13245 #ifdef __GNUC__
13246   yes;
13247 #endif
13248
13249 EOF
13250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13251   egrep "yes" >/dev/null 2>&1; then
13252   rm -rf conftest*
13253   XEGCC=yes
13254 else
13255   rm -rf conftest*
13256   XEGCC=no
13257 fi
13258 rm -f conftest*
13259
13260   echo "$ac_t""${XEGCC}" 1>&6
13261 fi
13262
13263 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13264 echo "configure:13265: checking how to produce PIC code" >&5
13265 wl=
13266
13267 can_build_shared=yes
13268 if test "$XEGCC" = yes; then
13269   wl='-Wl,'
13270
13271   case "$xehost_os" in
13272   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13273     # PIC is the default for these OSes.
13274     ;;
13275
13276   aix3* | aix4* | os2*)
13277     # We can build DLLs from non-PIC.
13278     ;;
13279   amigaos*)
13280     # FIXME: we need at least 68020 code to build shared libraries, but
13281     # adding the `-m68020' flag to GCC prevents building anything better,
13282     # like `-m68040'.
13283     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13284     ;;
13285   *)
13286     dll_cflags='-fPIC'
13287     ;;
13288   esac
13289 else
13290   # PORTME Check for PIC flags for the system compiler.
13291   case "$xehost_os" in
13292   hpux9* | hpux1[0-9]*)
13293     # Is there a better link_static_flag that works with the bundled CC?
13294     wl='-Wl,'
13295     dll_cflags='+Z'
13296     ;;
13297
13298   irix5* | irix6*)
13299     wl='-Wl,'
13300     # PIC (with -KPIC) is the default.
13301     ;;
13302
13303   os2*)
13304     # We can build DLLs from non-PIC.
13305     ;;
13306
13307   osf3* | osf4*)
13308     # All OSF/1 code is PIC.
13309     wl='-Wl,'
13310     ;;
13311
13312   sco3.2v5*)
13313     dll_cflags='-belf -Kpic'
13314     wl='-Wl,'
13315     ;;
13316
13317   unixware*)
13318     dll_cflags="-KPIC"
13319     wl="-Wl,"
13320     ;;
13321
13322   sysv4*)
13323     dll_cflags="-KPIC"
13324     wl="-Wl,"
13325     ;;
13326
13327   sysv5*)
13328     dll_cflags="-KPIC"
13329     wl="-Wl,"
13330     ;;
13331
13332   solaris2*)
13333     dll_cflags='-KPIC'
13334     wl='-Wl,'
13335     ;;
13336
13337   sunos4*)
13338     dll_cflags='-PIC'
13339     wl='-Qoption ld '
13340     ;;
13341
13342   uts4*)
13343     dll_cflags='-pic'
13344     ;;
13345
13346   *)
13347     can_build_shared=no
13348     ;;
13349   esac
13350 fi
13351
13352 if test -n "$dll_cflags"; then
13353   echo "$ac_t""${dll_cflags}" 1>&6
13354   
13355   # Check to make sure the dll_cflags actually works.
13356   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13357 echo "configure:13358: checking if PIC flag ${dll_cflags} really works" >&5
13358   save_CFLAGS="$CFLAGS"
13359   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13360   cat > conftest.$ac_ext <<EOF
13361 #line 13362 "configure"
13362 #include "confdefs.h"
13363
13364 int main() {
13365 int x=0;
13366 ; return 0; }
13367 EOF
13368 if { (eval echo configure:13369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13369   rm -rf conftest*
13370   
13371     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13372     # reports no error.  So, we need to grep stderr for (Bundled).
13373     if grep '(Bundled)' config.log >/dev/null; then
13374       echo "$ac_t""no" 1>&6
13375       can_build_shared=no
13376       dll_cflags=
13377     else
13378       echo "$ac_t""yes" 1>&6
13379     fi
13380 else
13381   echo "configure: failed program was:" >&5
13382   cat conftest.$ac_ext >&5
13383   rm -rf conftest*
13384   echo "$ac_t""no" 1>&6
13385     can_build_shared=no
13386     dll_cflags=
13387 fi
13388 rm -f conftest*
13389   CFLAGS="$save_CFLAGS"
13390 else
13391   echo "$ac_t""none" 1>&6
13392 fi
13393
13394 if test "$can_build_shared" = "yes"; then
13395 cc_produces_so=no
13396 xldf=
13397 xcldf=
13398 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13399 echo "configure:13400: checking if C compiler can produce shared libraries" >&5
13400 if test "$XEGCC" = yes; then
13401   xcldf="-shared"
13402   xldf="-shared"
13403 else # Not using GCC
13404   case "$xehost_os" in
13405     aix3* | aix4*)
13406       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13407       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13408       ;;
13409
13410     freebsd2* | netbsd* | openbsd*)
13411       xldf="-Bshareable"
13412       xcldf="${wl}-Bshareable"
13413       ;;
13414
13415     freebsd3*)
13416       xcldf="-shared"
13417       ;;
13418
13419     hpux*)
13420       xldf="-b +s"
13421       xcldf="${wl}-b ${wl}+s"
13422       ;;
13423
13424     irix5* | irix6* | osf3* | osf4*)
13425       xcldf="${wl}-shared"
13426       xldf="-shared"
13427       ;;
13428
13429     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13430       xcldf="-G"
13431       xldf="-G"
13432       ;;
13433
13434     sunos4*)
13435       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13436       xldf="-assert pure-text -Bstatic"
13437       ;;
13438   esac
13439 fi # End if if we are using gcc
13440
13441 if test -n "$xcldf"; then
13442   save_LDFLAGS=$LDFLAGS
13443   save_LIBS=$LIBS
13444   save_xe_libs=$xe_libs
13445   LDFLAGS="$xcldf $LDFLAGS"
13446   LIBS=
13447   xe_libs=
13448   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13449   cat > conftest.$ac_ext <<EOF
13450 #line 13451 "configure"
13451 #include "confdefs.h"
13452
13453 int main() {
13454 int x=0;
13455 ; return 0; }
13456 EOF
13457 if { (eval echo configure:13458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13458   rm -rf conftest*
13459   cc_produces_so=yes
13460 else
13461   echo "configure: failed program was:" >&5
13462   cat conftest.$ac_ext >&5
13463   rm -rf conftest*
13464   cc_produces_so=no
13465 fi
13466 rm -f conftest*
13467   LDFLAGS=$save_LDFLAGS
13468   LIBS=$save_LIBS
13469   xe_libs=$save_xe_libs
13470   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13471 else
13472   cc_produces_so=no
13473 fi
13474 echo "$ac_t""${cc_produces_so}" 1>&6
13475
13476 LTLD=$LD
13477 if test -z "$LTLD"; then
13478   ac_prog=ld
13479   if test "$XEGCC" = yes; then
13480     # Check if gcc -print-prog-name=ld gives a path.
13481     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13482 echo "configure:13483: checking for ld used by GCC" >&5
13483     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13484     case "$ac_prog" in
13485     # Accept absolute paths.
13486     /*)
13487       if test -z "$LTLD"; then
13488         case "$ac_prog" in
13489           *gcc-lib*) LTLD="$CC"
13490                      ;;
13491           *)         LTLD="$ac_prog"
13492                      ;;
13493         esac
13494       fi
13495       ;;
13496     "")
13497       # If it fails, then pretend we aren't using GCC.
13498       ac_prog=ld
13499       ;;
13500     *)
13501       # If it is relative, then search for the first ld in PATH.
13502       with_gnu_ld=unknown
13503       ;;
13504     esac
13505   else
13506     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13507 echo "configure:13508: checking for GNU ld" >&5
13508   fi
13509
13510   if test -z "$LTLD"; then
13511     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13512     for ac_dir in $PATH; do
13513       test -z "$ac_dir" && ac_dir=.
13514       if test -f "$ac_dir/$ac_prog"; then
13515         LTLD="$ac_dir/$ac_prog"
13516         # Check to see if the program is GNU ld.  I'd rather use --version,
13517         # but apparently some GNU ld's only accept -v.
13518         # Break only if it was the GNU/non-GNU ld that we prefer.
13519         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13520           xe_gnu_ld=yes
13521         else
13522           xe_gnu_ld=no
13523         fi
13524       fi
13525     done
13526     IFS="$ac_save_ifs"
13527   fi
13528
13529   if test -n "$LTLD"; then
13530     echo "$ac_t""${LTLD}" 1>&6
13531   else
13532     echo "$ac_t""no" 1>&6
13533   fi
13534
13535   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13536     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13537     exit 1
13538   fi
13539 fi
13540
13541 ld_dynamic_link_flags=
13542
13543 # Check to see if it really is or isn't GNU ld.
13544 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13545 echo "configure:13546: checking if the linker is GNU ld" >&5
13546 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13547 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13548   xe_gnu_ld=yes
13549 else
13550   xe_gnu_ld=no
13551 fi
13552 echo "$ac_t""${xe_gnu_ld}" 1>&6
13553
13554 case "$xehost_os" in
13555   amigaos* | sunos4*)
13556     # On these operating systems, we should treat GNU ld like the system ld.
13557     gnu_ld_acts_native=yes
13558     ;;
13559   *)
13560     gnu_ld_acts_native=no
13561     ;;
13562 esac
13563
13564 if test "$cc_produces_so" = "yes"; then
13565   dll_ld=$CC
13566   dll_ldflags=$xcldf
13567   can_build_shared=yes
13568   ld_shlibs=yes
13569 else
13570   # OK - only NOW do we futz about with ld.
13571   # See if the linker supports building shared libraries.
13572   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13573 echo "configure:13574: checking whether the linker supports shared libraries" >&5
13574   dll_ld=$CC
13575   dll_ldflags=$LDFLAGS
13576   ld_shlibs=yes
13577   can_build_shared=yes
13578   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13579     # See if GNU ld supports shared libraries.
13580     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13581       dll_ld=$CC
13582       dll_ldflags="-shared"
13583       ld_shlibs=yes
13584     else
13585       ld_shlibs=no
13586     fi
13587   else
13588     # PORTME fill in a description of your system's linker (not GNU ld)
13589     case "$xehost_os" in
13590     aix3*)
13591       dll_ld=$LTLD
13592       dll_ldflags=$xldf
13593       ;;
13594
13595     aix4*)
13596       dll_ldflags=$xcldf
13597       ;;
13598
13599     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13600     # support.  Future versions do this automatically, but an explicit c++rt0.o
13601     # doesn't break anything, and helps significantly (at the cost of a little
13602     # extra space).
13603     freebsd2.2*)
13604       dll_ld=$LTLD
13605       dll_ldflags=$xldf
13606       dll_post="/usr/lib/c++rt0.o"
13607       ;;
13608
13609     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13610     freebsd2*)
13611       dll_ld=$LTLD
13612       dll_ldflags="-Bshareable"
13613       ;;
13614
13615     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13616     freebsd3*)
13617       dll_ldflags="-shared"
13618       ;;
13619
13620     hpux*)
13621       dll_ld=$LTLD
13622       dll_ldflags=$xldf
13623       ;;
13624
13625     irix5* | irix6*)
13626       dll_ld=$LTLD
13627       dll_ldflags=$xldf
13628       ;;
13629
13630     netbsd*)
13631       # Tested with NetBSD 1.2 ld
13632       dll_ld=$LTLD
13633       dll_ldflags=$xldf
13634       ;;
13635
13636     openbsd*)
13637       dll_ld=$LTLD
13638       dll_ldflags=$xldf
13639       ;;
13640
13641     osf3* | osf4*)
13642       dll_ld=$LTLD
13643       dll_ldflags=$xldf
13644       ;;
13645
13646     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13647     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13648       dll_ld=$LTLD
13649       case "$dll_ld" in
13650         *gcc*) dll_ldflags="-shared"
13651                dll_ld=$CC
13652                ;;
13653         *)     dll_ldflags="-G"
13654                ;;
13655       esac
13656       ;;
13657
13658     sunos4*)
13659       if test "$XEGCC" = yes; then
13660         dll_ld=$CC
13661       else
13662         dll_ld=$LTLD
13663       fi
13664       dll_ldflags=$xldf
13665       ;;
13666
13667     uts4*)
13668       dll_ld=$LTLD
13669       dll_ldflags="-G"
13670       ;;
13671
13672     bsdi*)
13673       dll_ldflags="-r"
13674       dll_ld="shlicc2"
13675       ;;
13676
13677     *)
13678       ld_shlibs=no
13679       can_build_shared=no
13680       ;;
13681     esac
13682   fi
13683   echo "$ac_t""${ld_shlibs}" 1>&6
13684   if test "$ld_shlibs" = "no"; then
13685     can_build_shared=no
13686   fi
13687 fi # End of if cc_produces_so = no
13688
13689
13690 if test "$xe_gnu_ld" = yes; then
13691   if test "$ld_shlibs" = yes; then
13692     ld_dynamic_link_flags="${wl}-export-dynamic"
13693   fi
13694 fi
13695
13696 if test -z "$ld_dynamic_link_flags"; then
13697   case "$xehost_os" in
13698   aix3*)
13699     ld_dynamic_link_flags=
13700     ;;
13701
13702   aix4*)
13703     ld_dynamic_link_flags=
13704     ;;
13705
13706   freebsd2.2*)
13707     ld_dynamic_link_flags=
13708     ;;
13709
13710   freebsd2*)
13711     ld_dynamic_link_flags=
13712     ;;
13713
13714   freebsd3*)
13715     ld_dynamic_link_flags=
13716     ;;
13717
13718   hpux*)
13719     ld_dynamic_link_flags="${wl}-E"
13720     ;;
13721
13722   irix5* | irix6*)
13723     ld_dynamic_link_flags=
13724     ;;
13725
13726   netbsd*)
13727     ld_dynamic_link_flags=
13728     ;;
13729
13730   openbsd*)
13731     ld_dynamic_link_flags=
13732     ;;
13733
13734   osf3* | osf4*)
13735     ld_dynamic_link_flags=
13736     ;;
13737
13738   solaris2* | solaris7*)
13739     ld_dynamic_link_flags=
13740     ;;
13741
13742   sco3.2v5* | unixware* | sysv5* | sysv4*)
13743     ld_dynamic_link_flags="${wl}-Bexport"
13744     ;;
13745
13746   sunos4*)
13747     ld_dynamic_link_flags=
13748     ;;
13749
13750   uts4*)
13751     ld_dynamic_link_flags=
13752     ;;
13753
13754   bsdi*)
13755     ld_dynamic_link_flags=
13756     ;;
13757
13758   esac
13759 fi # End of if -z ld_dynamic_link_flags
13760 fi # End of if test "$can_build_shared" = "yes"
13761
13762
13763
13764
13765
13766
13767
13768
13769   fi
13770
13771   if test "$can_build_shared" = "yes"; then
13772     { test "$extra_verbose" = "yes" && cat << \EOF
13773     Defining HAVE_SHLIB
13774 EOF
13775 cat >> confdefs.h <<\EOF
13776 #define HAVE_SHLIB 1
13777 EOF
13778 }
13779
13780     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13781    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13782  fi
13783     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13784     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13785     for ac_func in dlerror _dlerror
13786 do
13787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13788 echo "configure:13789: checking for $ac_func" >&5
13789
13790 cat > conftest.$ac_ext <<EOF
13791 #line 13792 "configure"
13792 #include "confdefs.h"
13793 /* System header to define __stub macros and hopefully few prototypes,
13794     which can conflict with char $ac_func(); below.  */
13795 #include <assert.h>
13796 /* Override any gcc2 internal prototype to avoid an error.  */
13797 /* We use char because int might match the return type of a gcc2
13798     builtin and then its argument prototype would still apply.  */
13799 char $ac_func();
13800
13801 int main() {
13802
13803 /* The GNU C library defines this for functions which it implements
13804     to always fail with ENOSYS.  Some functions are actually named
13805     something starting with __ and the normal name is an alias.  */
13806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13807 choke me
13808 #else
13809 $ac_func();
13810 #endif
13811
13812 ; return 0; }
13813 EOF
13814 if { (eval echo configure:13815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13815   rm -rf conftest*
13816   eval "ac_cv_func_$ac_func=yes"
13817 else
13818   echo "configure: failed program was:" >&5
13819   cat conftest.$ac_ext >&5
13820   rm -rf conftest*
13821   eval "ac_cv_func_$ac_func=no"
13822 fi
13823 rm -f conftest*
13824
13825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13826   echo "$ac_t""yes" 1>&6
13827     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13828   { test "$extra_verbose" = "yes" && cat << EOF
13829     Defining $ac_tr_func
13830 EOF
13831 cat >> confdefs.h <<EOF
13832 #define $ac_tr_func 1
13833 EOF
13834 }
13835  
13836 else
13837   echo "$ac_t""no" 1>&6
13838 fi
13839 done
13840
13841     with_modules=yes
13842   else
13843     if test "$with_modules" = "yes"; then
13844       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13845     else
13846       echo "configure: warning: "Module support cannot be provided."" 1>&2
13847     fi
13848     with_modules=no
13849   fi
13850 fi
13851
13852 cat > conftest.$ac_ext <<EOF
13853 #line 13854 "configure"
13854 #include "confdefs.h"
13855 int main(int c,char *v[]){return 0;}
13856 EOF
13857 if { (eval echo configure:13858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13858 then
13859   :
13860 else
13861   conftest_rc="$?"
13862   echo "configure: failed program was:" >&5
13863   cat conftest.$ac_ext >&5
13864   rm -fr conftest*
13865   
13866   echo ""
13867   echo "*** PANIC *** The C compiler can no longer build working executables."
13868   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13869   echo "*** PANIC *** The most likely reason for this problem is that configure"
13870   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13871   echo "*** PANIC *** found at run time."
13872   echo "*** PANIC ***"
13873   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13874   echo "*** PANIC *** On other systems, try telling configure where to find the"
13875   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13876   echo "*** PANIC ***"
13877   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13878   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13879   echo "*** PANIC *** on your system.  Don't do that."
13880   exit 1
13881 fi
13882 rm -fr conftest*
13883
13884 if test "$win32_processes" = "yes"; then
13885   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13886    echo "    xemacs will be linked with \"process-nt.o\""
13887  fi
13888 else
13889   { test "$extra_verbose" = "yes" && cat << \EOF
13890     Defining HAVE_UNIX_PROCESSES
13891 EOF
13892 cat >> confdefs.h <<\EOF
13893 #define HAVE_UNIX_PROCESSES 1
13894 EOF
13895 }
13896
13897   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13898    echo "    xemacs will be linked with \"process-unix.o\""
13899  fi
13900 fi
13901
13902
13903
13904 T=""
13905 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13906 CFLAGS="$T"
13907
13908
13909 T=""
13910 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13911 extra_objs="$T"
13912
13913
13914 T=""
13915 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
13916 c_switch_general="$T"
13917
13918
13919 T=""
13920 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13921 c_switch_window_system="$T"
13922
13923
13924 T=""
13925 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13926 c_switch_all="$T"
13927
13928
13929 T=""
13930 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
13931 ld_switch_general="$T"
13932
13933
13934 T=""
13935 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13936 ld_switch_window_system="$T"
13937
13938
13939 T=""
13940 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13941 ld_switch_all="$T"
13942
13943
13944 T=""
13945 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13946 ld_libs_general="$T"
13947
13948
13949 T=""
13950 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
13951 ld_libs_window_system="$T"
13952
13953
13954 T=""
13955 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13956 ld_libs_all="$T"
13957
13958
13959
13960 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13961 internal_makefile_list="Makefile.in"
13962 SUBDIR_MAKEFILES=''
13963 test -d lock || mkdir lock
13964 for dir in $MAKE_SUBDIR; do
13965   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13966         test -d "$d" || mkdir "$d"; cd "$d"
13967       done ) ;;
13968    * ) test -d "$dir" || mkdir "$dir" ;;
13969   esac
13970   
13971 T=""
13972 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13973 SUBDIR_MAKEFILES="$T"
13974
13975   
13976 T=""
13977 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13978 internal_makefile_list="$T"
13979
13980 done
13981
13982
13983
13984
13985 for dir in src/s src/m; do
13986   if test ! -d "$dir" ; then
13987     echo Making symbolic link to "$srcdir/$dir"
13988     ${LN_S} "$srcdir/$dir" "$dir"
13989   fi
13990 done
13991
13992 if test "$extra_verbose" = "yes"; then
13993   echo ""
13994   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
13995   echo ""
13996 fi
13997
13998
13999 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14000   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14001   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14002 fi
14003
14004 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14005   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14006   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14007 fi
14008
14009 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14010   test "$extra_verbose" = "yes" && echo "creating TAGS"
14011   echo "\f
14012 $srcdir/TAGS,include" > "TAGS"
14013 fi
14014
14015 if test "$__SUNPRO_C" = "yes"; then
14016   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14017   ( echo "# For use with Sun WorkShop's Source browser."
14018     echo "# See sbquery(1) and sbinit(4) for more information"
14019     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14020   ) > .sbinit
14021 fi
14022
14023 rm -f core
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043 PREFIX=$prefix
14044 while true; do
14045   case "$PREFIX" in
14046     *\$* ) eval "PREFIX=$PREFIX" ;;
14047     *) break ;;
14048   esac
14049 done
14050
14051
14052
14053
14054 EXEC_PREFIX=$exec_prefix
14055 while true; do
14056   case "$EXEC_PREFIX" in
14057     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14058     *) break ;;
14059   esac
14060 done
14061
14062
14063
14064
14065 INFODIR=$infodir
14066 while true; do
14067   case "$INFODIR" in
14068     *\$* ) eval "INFODIR=$INFODIR" ;;
14069     *) break ;;
14070   esac
14071 done
14072
14073
14074
14075
14076 INFOPATH=$infopath
14077 while true; do
14078   case "$INFOPATH" in
14079     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14080     *) break ;;
14081   esac
14082 done
14083
14084
14085
14086
14087 PACKAGE_PATH=$package_path
14088 while true; do
14089   case "$PACKAGE_PATH" in
14090     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14091     *) break ;;
14092   esac
14093 done
14094
14095
14096
14097
14098 LISPDIR=$lispdir
14099 while true; do
14100   case "$LISPDIR" in
14101     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14102     *) break ;;
14103   esac
14104 done
14105
14106
14107
14108
14109 MODULEDIR=$moduledir
14110 while true; do
14111   case "$MODULEDIR" in
14112     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14113     *) break ;;
14114   esac
14115 done
14116
14117
14118
14119
14120 SITELISPDIR=$sitelispdir
14121 while true; do
14122   case "$SITELISPDIR" in
14123     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14124     *) break ;;
14125   esac
14126 done
14127
14128
14129
14130
14131 SITEMODULEDIR=$sitemoduledir
14132 while true; do
14133   case "$SITEMODULEDIR" in
14134     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14135     *) break ;;
14136   esac
14137 done
14138
14139
14140
14141
14142 ETCDIR=$etcdir
14143 while true; do
14144   case "$ETCDIR" in
14145     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14146     *) break ;;
14147   esac
14148 done
14149
14150
14151
14152
14153 LOCKDIR=$lockdir
14154 while true; do
14155   case "$LOCKDIR" in
14156     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
14157     *) break ;;
14158   esac
14159 done
14160
14161
14162
14163
14164 DOCDIR=$docdir
14165 while true; do
14166   case "$DOCDIR" in
14167     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14168     *) break ;;
14169   esac
14170 done
14171
14172
14173
14174
14175 ARCHLIBDIR=$archlibdir
14176 while true; do
14177   case "$ARCHLIBDIR" in
14178     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14179     *) break ;;
14180   esac
14181 done
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14203
14204
14205
14206
14207
14208
14209
14210 : ${XEMACS_CC:=$CC}
14211
14212
14213 if test "$with_prefix" = "yes"; then
14214   { test "$extra_verbose" = "yes" && cat << \EOF
14215     Defining PREFIX_USER_DEFINED
14216 EOF
14217 cat >> confdefs.h <<\EOF
14218 #define PREFIX_USER_DEFINED 1
14219 EOF
14220 }
14221
14222 fi
14223
14224 if test "$with_site_lisp" = "no"; then
14225   { test "$extra_verbose" = "yes" && cat << \EOF
14226     Defining INHIBIT_SITE_LISP
14227 EOF
14228 cat >> confdefs.h <<\EOF
14229 #define INHIBIT_SITE_LISP 1
14230 EOF
14231 }
14232
14233 fi
14234 if test "$with_site_modules" = "no"; then
14235   { test "$extra_verbose" = "yes" && cat << \EOF
14236     Defining INHIBIT_SITE_MODULES
14237 EOF
14238 cat >> confdefs.h <<\EOF
14239 #define INHIBIT_SITE_MODULES 1
14240 EOF
14241 }
14242
14243 fi
14244
14245
14246 T=""
14247 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14248 ac_configure_args="$T"
14249
14250 { test "$extra_verbose" = "yes" && cat << EOF
14251     Defining EMACS_CONFIGURATION = "$configuration"
14252 EOF
14253 cat >> confdefs.h <<EOF
14254 #define EMACS_CONFIGURATION "$configuration"
14255 EOF
14256 }
14257
14258 { test "$extra_verbose" = "yes" && cat << EOF
14259     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14260 EOF
14261 cat >> confdefs.h <<EOF
14262 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14263 EOF
14264 }
14265
14266 { test "$extra_verbose" = "yes" && cat << EOF
14267     Defining config_machfile = "$machfile"
14268 EOF
14269 cat >> confdefs.h <<EOF
14270 #define config_machfile "$machfile"
14271 EOF
14272 }
14273
14274 { test "$extra_verbose" = "yes" && cat << EOF
14275     Defining config_opsysfile = "$opsysfile"
14276 EOF
14277 cat >> confdefs.h <<EOF
14278 #define config_opsysfile "$opsysfile"
14279 EOF
14280 }
14281
14282
14283
14284 null_string=""
14285 { test "$extra_verbose" = "yes" && cat << EOF
14286     Defining LD_SWITCH_X_SITE = $null_string
14287 EOF
14288 cat >> confdefs.h <<EOF
14289 #define LD_SWITCH_X_SITE $null_string
14290 EOF
14291 }
14292
14293 { test "$extra_verbose" = "yes" && cat << EOF
14294     Defining LD_SWITCH_X_SITE_AUX = $null_string
14295 EOF
14296 cat >> confdefs.h <<EOF
14297 #define LD_SWITCH_X_SITE_AUX $null_string
14298 EOF
14299 }
14300
14301 { test "$extra_verbose" = "yes" && cat << EOF
14302     Defining C_SWITCH_X_SITE = $null_string
14303 EOF
14304 cat >> confdefs.h <<EOF
14305 #define C_SWITCH_X_SITE $null_string
14306 EOF
14307 }
14308
14309 { test "$extra_verbose" = "yes" && cat << EOF
14310     Defining LD_SWITCH_SITE = $null_string
14311 EOF
14312 cat >> confdefs.h <<EOF
14313 #define LD_SWITCH_SITE $null_string
14314 EOF
14315 }
14316
14317 { test "$extra_verbose" = "yes" && cat << EOF
14318     Defining C_SWITCH_SITE = $null_string
14319 EOF
14320 cat >> confdefs.h <<EOF
14321 #define C_SWITCH_SITE $null_string
14322 EOF
14323 }
14324
14325
14326
14327 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14328     Defining GNU_MALLOC
14329 EOF
14330 cat >> confdefs.h <<\EOF
14331 #define GNU_MALLOC 1
14332 EOF
14333 }
14334
14335 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14336     Defining USE_SYSTEM_MALLOC
14337 EOF
14338 cat >> confdefs.h <<\EOF
14339 #define USE_SYSTEM_MALLOC 1
14340 EOF
14341 }
14342
14343 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14344     Defining USE_DEBUG_MALLOC
14345 EOF
14346 cat >> confdefs.h <<\EOF
14347 #define USE_DEBUG_MALLOC 1
14348 EOF
14349 }
14350
14351                                               { test "$extra_verbose" = "yes" && cat << \EOF
14352     Defining USE_SYSTEM_MALLOC
14353 EOF
14354 cat >> confdefs.h <<\EOF
14355 #define USE_SYSTEM_MALLOC 1
14356 EOF
14357 }
14358
14359 fi
14360 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14361     Defining I18N3
14362 EOF
14363 cat >> confdefs.h <<\EOF
14364 #define I18N3 1
14365 EOF
14366 }
14367
14368 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14369     Defining USE_GCC
14370 EOF
14371 cat >> confdefs.h <<\EOF
14372 #define USE_GCC 1
14373 EOF
14374 }
14375
14376 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14377     Defining EXTERNAL_WIDGET
14378 EOF
14379 cat >> confdefs.h <<\EOF
14380 #define EXTERNAL_WIDGET 1
14381 EOF
14382 }
14383
14384 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14385     Defining QUICK_BUILD
14386 EOF
14387 cat >> confdefs.h <<\EOF
14388 #define QUICK_BUILD 1
14389 EOF
14390 }
14391
14392 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14393     Defining PURIFY
14394 EOF
14395 cat >> confdefs.h <<\EOF
14396 #define PURIFY 1
14397 EOF
14398 }
14399
14400 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14401     Defining QUANTIFY
14402 EOF
14403 cat >> confdefs.h <<\EOF
14404 #define QUANTIFY 1
14405 EOF
14406 }
14407
14408 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14409     Defining MAIL_USE_POP
14410 EOF
14411 cat >> confdefs.h <<\EOF
14412 #define MAIL_USE_POP 1
14413 EOF
14414 }
14415
14416 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14417     Defining KERBEROS
14418 EOF
14419 cat >> confdefs.h <<\EOF
14420 #define KERBEROS 1
14421 EOF
14422 }
14423
14424 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14425     Defining HESIOD
14426 EOF
14427 cat >> confdefs.h <<\EOF
14428 #define HESIOD 1
14429 EOF
14430 }
14431
14432 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14433     Defining USE_UNION_TYPE
14434 EOF
14435 cat >> confdefs.h <<\EOF
14436 #define USE_UNION_TYPE 1
14437 EOF
14438 }
14439
14440 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14441     Defining PDUMP
14442 EOF
14443 cat >> confdefs.h <<\EOF
14444 #define PDUMP 1
14445 EOF
14446 }
14447
14448
14449
14450 (
14451 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14452 else
14453   echo "uname -a: `uname -a`"
14454 fi
14455 echo ""
14456 echo "$0 $quoted_arguments"
14457 ) > Installation
14458
14459 if test ! -z ${emacs_beta_version} ; then
14460   if test -z "${emacs_is_beta}" ; then
14461         xemacs_betaname=".${emacs_beta_version}"
14462   else
14463         xemacs_betaname="-b${emacs_beta_version}"
14464   fi
14465 else
14466   xemacs_betaname=""
14467 fi
14468
14469 (
14470 echo "
14471
14472 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14473 "
14474 echo "
14475 Compilation / Installation:"
14476 echo "  Source code location:              $srcdir"
14477 echo "  Installation prefix:               $prefix"
14478 if test -n "$site_includes"; then
14479   echo "  Additional header files:           $site_includes"
14480 fi
14481 if test -n "$site_libraries"; then
14482   echo "  Additional libraries:              $site_libraries"
14483 fi
14484 if test -n "$site_prefixes"; then
14485   echo "  Additional prefixes:               $site_prefixes"
14486 fi
14487 if test -n "$runpath"; then
14488   echo "  Runtime library search path:       $runpath"
14489 fi
14490 echo "  Operating system description file: \`$opsysfile'"
14491 echo "  Machine description file:          \`$machfile'"
14492 echo "  Compiler:                          $CC $CFLAGS"
14493 echo "  Relocating allocator for buffers:  $rel_alloc"
14494 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
14495
14496 echo "
14497 Window System:"
14498 if test "$with_msw" = "yes"; then
14499   echo "  Compiling in support for the Microsoft window system."
14500 fi
14501 if test "$with_x11" = "yes"; then
14502   echo "  Compiling in support for the X window system:"
14503   echo "    - X Windows headers location:                 $x_includes"
14504   echo "    - X Windows libraries location:               $x_libraries"
14505   if test "$with_xauth" != yes; then
14506     echo "    - Xau (X authority) not available."
14507   fi
14508   if test "$with_xmu" != yes; then
14509     echo "    - Xmu library not available; substituting equivalent routines."
14510   fi
14511   if test "$with_wmcommand" != no; then
14512     echo "    - Handling WM_COMMAND properly."
14513   fi
14514 fi
14515 if test "$have_xaw" = "yes"; then
14516   echo "  Compiling in support for the Athena widget set:"
14517   echo "    - Athena headers location:                    $athena_h_path"
14518   echo "    - Athena library to link:                     $athena_lib"
14519 fi
14520 case "$with_menubars" in
14521   lucid ) echo "  Using Lucid menubars." ;;
14522   motif ) echo "  Using Motif menubars."
14523           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14524           echo "             We recommend using the Lucid menubar instead."
14525           echo "             Re-run configure with --with-menubars='lucid'." ;;
14526     msw ) echo "  Using MS-Windows menubars." ;;
14527 esac
14528 case "$with_scrollbars" in
14529   lucid  ) echo "  Using Lucid scrollbars."      ;;
14530   motif  ) echo "  Using Motif scrollbars."      ;;
14531   athena ) echo "  Using Athena scrollbars."     ;;
14532      msw ) echo "  Using MS-Windows scrollbars." ;;
14533 esac
14534 case "$with_dialogs" in
14535   motif  ) echo "  Using Motif dialog boxes."
14536            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14537              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14538              echo "             We recommend using the Athena dialog boxes instead."
14539              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14540              echo "             Read the PROBLEMS file for more information."
14541            fi; fi ;;
14542   athena ) echo "  Using Athena dialog boxes."     ;;
14543      msw ) echo "  Using MS-Windows dialog boxes." ;;
14544 esac
14545 case "$with_widgets" in
14546   motif  ) echo "  Using Motif native widgets."      ;;
14547   athena ) echo "  Using Athena native widgets."     ;;
14548      msw ) echo "  Using MS-Windows native widgets." ;;
14549 esac
14550 if test "$with_dragndrop" = yes; then
14551   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
14552   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
14553 fi
14554
14555 echo "
14556 TTY:"
14557 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
14558 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14559
14560 echo "
14561 Images:"
14562 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
14563 if test "$with_xpm" = yes; then
14564   echo "  Compiling in support for XPM  images."
14565 elif test "$with_x11" = yes; then
14566   echo "  WARNING: -----------------------------------------------------------"
14567   echo "  WARNING: Compiling without XPM image support."
14568   if test "$xpm_problem" != ""; then
14569     echo "  Reason: $xpm_problem"
14570   fi
14571   echo "  WARNING: You should strongly consider installing XPM."
14572   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14573   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14574   echo "  WARNING: -----------------------------------------------------------"
14575 fi
14576 if test "$with_png" = yes; then
14577   echo "  Compiling in support for PNG  images."
14578 elif test "$window_system" != "none"; then
14579   echo "  WARNING: -----------------------------------------------------------"
14580   echo "  WARNING: Compiling without PNG image support."
14581   if test "$png_problem" != ""; then
14582     echo "  Reason: $png_problem"
14583   fi
14584   echo "  WARNING: You should strongly consider installing the PNG libraries."
14585   echo "  WARNING: Otherwise certain images and glyphs may not display."
14586   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14587   echo "  WARNING: -----------------------------------------------------------"
14588 fi
14589 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
14590 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
14591 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14592
14593 echo "
14594 Sound:"
14595 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
14596 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
14597 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
14598 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
14599
14600 echo "
14601 Databases:"
14602 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
14603 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14604 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14605 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
14606 if test "$with_postgresql" = yes; then
14607   echo "  Compiling in support for PostgreSQL."
14608   if test "$with_postgresqlv7" = yes; then
14609     echo "    - Using PostgreSQL V7 bindings."
14610   fi
14611   if test -n "$postgres_h_path"; then
14612     echo "    - PostgreSQL headers location:  $postgres_h_path"
14613   fi
14614 fi
14615
14616 echo "
14617 Internationalization:"
14618 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
14619 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
14620 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
14621 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
14622 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
14623 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
14624 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
14625 if test "$with_wnn" = yes; then
14626   echo "  Compiling in support for the WNN input method on Mule."
14627   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
14628 fi
14629 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
14630
14631 echo "
14632 Mail:"
14633 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
14634 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
14635 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
14636 echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
14637
14638 echo "
14639 Other Features:"
14640 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14641 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14642 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14643 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
14644 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
14645 test "$with_clash_detection" != "no" && \
14646   echo "  Clash detection will use \"$lockdir\" for locking files."
14647 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
14648 test "$pdump" = yes && echo "  Using the new portable dumper."
14649 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
14650 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
14651 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
14652   != "no no no no no no"; then
14653   echo "  WARNING: ---------------------------------------------------------"
14654   echo "  WARNING: Compiling in support for runtime error checking."
14655   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14656   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14657   echo "  WARNING: ---------------------------------------------------------"
14658 fi
14659 echo ""
14660 ) | tee -a Installation
14661 echo ""
14662
14663
14664 # Remove any trailing slashes in these variables.
14665 test -n "$prefix" &&
14666   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14667 test -n "$exec_prefix" &&
14668   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14669
14670
14671 for file in $internal_makefile_list; do
14672   test "$file" = src/Makefile.in && \
14673     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14674   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14675 done
14676 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14677 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
14678
14679 trap '' 1 2 15
14680
14681 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14682
14683 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14684 # Let make expand exec_prefix.
14685 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14686
14687 # Any assignment to VPATH causes Sun make to only execute
14688 # the first set of double-colon rules, so remove it if not needed.
14689 # If there is a colon in the path, we need to keep it.
14690 if test "x$srcdir" = x.; then
14691   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14692 fi
14693
14694 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14695
14696 DEFS=-DHAVE_CONFIG_H
14697
14698 # Without the "./", some shells look in PATH for config.status.
14699 : ${CONFIG_STATUS=./config.status}
14700
14701 echo creating $CONFIG_STATUS
14702 rm -f $CONFIG_STATUS
14703 cat > $CONFIG_STATUS <<EOF
14704 #! /bin/sh
14705 # Generated automatically by configure.
14706 # Run this file to recreate the current configuration.
14707 # This directory was configured as follows,
14708 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14709 #
14710 # $0 $ac_configure_args
14711 #
14712 # Compiler output produced by configure, useful for debugging
14713 # configure, is in ./config.log if it exists.
14714
14715 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14716 for ac_option
14717 do
14718   case "\$ac_option" in
14719   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14720     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14721     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14722   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14723     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14724     exit 0 ;;
14725   -help | --help | --hel | --he | --h)
14726     echo "\$ac_cs_usage"; exit 0 ;;
14727   *) echo "\$ac_cs_usage"; exit 1 ;;
14728   esac
14729 done
14730
14731 ac_given_srcdir=$srcdir
14732 ac_given_INSTALL="$INSTALL"
14733
14734 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14735 EOF
14736 cat >> $CONFIG_STATUS <<EOF
14737
14738 # Protect against being on the right side of a sed subst in config.status.
14739 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14740  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14741 $ac_vpsub
14742 $extrasub
14743 s%@SHELL@%$SHELL%g
14744 s%@CFLAGS@%$CFLAGS%g
14745 s%@CPPFLAGS@%$CPPFLAGS%g
14746 s%@CXXFLAGS@%$CXXFLAGS%g
14747 s%@FFLAGS@%$FFLAGS%g
14748 s%@DEFS@%$DEFS%g
14749 s%@LDFLAGS@%$LDFLAGS%g
14750 s%@LIBS@%$LIBS%g
14751 s%@exec_prefix@%$exec_prefix%g
14752 s%@prefix@%$prefix%g
14753 s%@program_transform_name@%$program_transform_name%g
14754 s%@bindir@%$bindir%g
14755 s%@sbindir@%$sbindir%g
14756 s%@libexecdir@%$libexecdir%g
14757 s%@datadir@%$datadir%g
14758 s%@sysconfdir@%$sysconfdir%g
14759 s%@sharedstatedir@%$sharedstatedir%g
14760 s%@localstatedir@%$localstatedir%g
14761 s%@libdir@%$libdir%g
14762 s%@includedir@%$includedir%g
14763 s%@oldincludedir@%$oldincludedir%g
14764 s%@infodir@%$infodir%g
14765 s%@mandir@%$mandir%g
14766 s%@LN_S@%$LN_S%g
14767 s%@blddir@%$blddir%g
14768 s%@CC@%$CC%g
14769 s%@CPP@%$CPP%g
14770 s%@start_flags@%$start_flags%g
14771 s%@ld_switch_shared@%$ld_switch_shared%g
14772 s%@start_files@%$start_files%g
14773 s%@ld@%$ld%g
14774 s%@lib_gcc@%$lib_gcc%g
14775 s%@RANLIB@%$RANLIB%g
14776 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14777 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14778 s%@INSTALL_DATA@%$INSTALL_DATA%g
14779 s%@YACC@%$YACC%g
14780 s%@SET_MAKE@%$SET_MAKE%g
14781 s%@X_CFLAGS@%$X_CFLAGS%g
14782 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14783 s%@X_LIBS@%$X_LIBS%g
14784 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14785 s%@install_pp@%$install_pp%g
14786 s%@libs_xauth@%$libs_xauth%g
14787 s%@dnd_objs@%$dnd_objs%g
14788 s%@lwlib_objs@%$lwlib_objs%g
14789 s%@ALLOCA@%$ALLOCA%g
14790 s%@have_esd_config@%$have_esd_config%g
14791 s%@dll_ld@%$dll_ld%g
14792 s%@dll_cflags@%$dll_cflags%g
14793 s%@dll_ldflags@%$dll_ldflags%g
14794 s%@dll_post@%$dll_post%g
14795 s%@dll_ldo@%$dll_ldo%g
14796 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14797 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14798 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14799 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14800 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14801 s%@PROGNAME@%$PROGNAME%g
14802 s%@version@%$version%g
14803 s%@configuration@%$configuration%g
14804 s%@canonical@%$canonical%g
14805 s%@inststaticdir@%$inststaticdir%g
14806 s%@instvardir@%$instvardir%g
14807 s%@srcdir@%$srcdir%g
14808 s%@pkgdir@%$pkgdir%g
14809 s%@statedir@%$statedir%g
14810 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14811 s%@PREFIX@%$PREFIX%g
14812 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14813 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14814 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14815 s%@INFODIR@%$INFODIR%g
14816 s%@infopath@%$infopath%g
14817 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14818 s%@INFOPATH@%$INFOPATH%g
14819 s%@package_path@%$package_path%g
14820 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14821 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14822 s%@lispdir@%$lispdir%g
14823 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14824 s%@LISPDIR@%$LISPDIR%g
14825 s%@moduledir@%$moduledir%g
14826 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14827 s%@MODULEDIR@%$MODULEDIR%g
14828 s%@sitelispdir@%$sitelispdir%g
14829 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14830 s%@SITELISPDIR@%$SITELISPDIR%g
14831 s%@sitemoduledir@%$sitemoduledir%g
14832 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14833 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14834 s%@etcdir@%$etcdir%g
14835 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14836 s%@ETCDIR@%$ETCDIR%g
14837 s%@lockdir@%$lockdir%g
14838 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14839 s%@LOCKDIR@%$LOCKDIR%g
14840 s%@docdir@%$docdir%g
14841 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14842 s%@DOCDIR@%$DOCDIR%g
14843 s%@archlibdir@%$archlibdir%g
14844 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14845 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14846 s%@bitmapdir@%$bitmapdir%g
14847 s%@extra_objs@%$extra_objs%g
14848 s%@machfile@%$machfile%g
14849 s%@opsysfile@%$opsysfile%g
14850 s%@c_switch_general@%$c_switch_general%g
14851 s%@c_switch_window_system@%$c_switch_window_system%g
14852 s%@c_switch_all@%$c_switch_all%g
14853 s%@ld_switch_general@%$ld_switch_general%g
14854 s%@ld_switch_window_system@%$ld_switch_window_system%g
14855 s%@ld_switch_all@%$ld_switch_all%g
14856 s%@ld_libs_general@%$ld_libs_general%g
14857 s%@ld_libs_window_system@%$ld_libs_window_system%g
14858 s%@ld_libs_all@%$ld_libs_all%g
14859 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14860 s%@native_sound_lib@%$native_sound_lib%g
14861 s%@sound_cflags@%$sound_cflags%g
14862 s%@dynodump_arch@%$dynodump_arch%g
14863 s%@XEMACS_CC@%$XEMACS_CC%g
14864 s%@internal_makefile_list@%$internal_makefile_list%g
14865
14866 CEOF
14867 EOF
14868
14869 cat >> $CONFIG_STATUS <<\EOF
14870
14871 # Split the substitutions into bite-sized pieces for seds with
14872 # small command number limits, like on Digital OSF/1 and HP-UX.
14873 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14874 ac_file=1 # Number of current file.
14875 ac_beg=1 # First line for current file.
14876 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14877 ac_more_lines=:
14878 ac_sed_cmds=""
14879 while $ac_more_lines; do
14880   if test $ac_beg -gt 1; then
14881     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14882   else
14883     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14884   fi
14885   if test ! -s conftest.s$ac_file; then
14886     ac_more_lines=false
14887     rm -f conftest.s$ac_file
14888   else
14889     if test -z "$ac_sed_cmds"; then
14890       ac_sed_cmds="sed -f conftest.s$ac_file"
14891     else
14892       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14893     fi
14894     ac_file=`expr $ac_file + 1`
14895     ac_beg=$ac_end
14896     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14897   fi
14898 done
14899 if test -z "$ac_sed_cmds"; then
14900   ac_sed_cmds=cat
14901 fi
14902 EOF
14903
14904 cat >> $CONFIG_STATUS <<EOF
14905
14906 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14907 EOF
14908 cat >> $CONFIG_STATUS <<\EOF
14909 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14910   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14911   case "$ac_file" in
14912   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14913        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14914   *) ac_file_in="${ac_file}.in" ;;
14915   esac
14916
14917   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14918
14919   # Remove last slash and all that follows it.  Not all systems have dirname.
14920   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14921   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14922     # The file is in a subdirectory.
14923     test ! -d "$ac_dir" && mkdir "$ac_dir"
14924     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14925     # A "../" for each directory in $ac_dir_suffix.
14926     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14927   else
14928     ac_dir_suffix= ac_dots=
14929   fi
14930
14931   case "$ac_given_srcdir" in
14932   .)  srcdir=.
14933       if test -z "$ac_dots"; then top_srcdir=.
14934       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14935   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14936   *) # Relative path.
14937     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14938     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14939   esac
14940
14941   case "$ac_given_INSTALL" in
14942   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14943   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14944   esac
14945
14946   echo creating "$ac_file"
14947   rm -f "$ac_file"
14948   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14949   case "$ac_file" in
14950   *Makefile*) ac_comsub="1i\\
14951 # $configure_input" ;;
14952   *) ac_comsub= ;;
14953   esac
14954
14955   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14956   sed -e "$ac_comsub
14957 s%@configure_input@%$configure_input%g
14958 s%@srcdir@%$srcdir%g
14959 s%@top_srcdir@%$top_srcdir%g
14960 s%@INSTALL@%$INSTALL%g
14961 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14962 fi; done
14963 rm -f conftest.s*
14964
14965 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14966 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14967 #
14968 # ac_d sets the value in "#define NAME VALUE" lines.
14969 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14970 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14971 ac_dC='\3'
14972 ac_dD='%g'
14973 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14974 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14975 ac_uB='\([      ]\)%\1#\2define\3'
14976 ac_uC=' '
14977 ac_uD='\4%g'
14978 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14979 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14980 ac_eB='$%\1#\2define\3'
14981 ac_eC=' '
14982 ac_eD='%g'
14983
14984 if test "${CONFIG_HEADERS+set}" != set; then
14985 EOF
14986 cat >> $CONFIG_STATUS <<EOF
14987   CONFIG_HEADERS="src/config.h lwlib/config.h"
14988 EOF
14989 cat >> $CONFIG_STATUS <<\EOF
14990 fi
14991 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14992   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14993   case "$ac_file" in
14994   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14995        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14996   *) ac_file_in="${ac_file}.in" ;;
14997   esac
14998
14999   echo creating $ac_file
15000
15001   rm -f conftest.frag conftest.in conftest.out
15002   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15003   cat $ac_file_inputs > conftest.in
15004
15005 EOF
15006
15007 # Transform confdefs.h into a sed script conftest.vals that substitutes
15008 # the proper values into config.h.in to produce config.h.  And first:
15009 # Protect against being on the right side of a sed subst in config.status.
15010 # Protect against being in an unquoted here document in config.status.
15011 rm -f conftest.vals
15012 cat > conftest.hdr <<\EOF
15013 s/[\\&%]/\\&/g
15014 s%[\\$`]%\\&%g
15015 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15016 s%ac_d%ac_u%gp
15017 s%ac_u%ac_e%gp
15018 EOF
15019 sed -n -f conftest.hdr confdefs.h > conftest.vals
15020 rm -f conftest.hdr
15021
15022 # This sed command replaces #undef with comments.  This is necessary, for
15023 # example, in the case of _POSIX_SOURCE, which is predefined and required
15024 # on some systems where configure will not decide to define it.
15025 cat >> conftest.vals <<\EOF
15026 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15027 EOF
15028
15029 # Break up conftest.vals because some shells have a limit on
15030 # the size of here documents, and old seds have small limits too.
15031
15032 rm -f conftest.tail
15033 while :
15034 do
15035   ac_lines=`grep -c . conftest.vals`
15036   # grep -c gives empty output for an empty file on some AIX systems.
15037   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15038   # Write a limited-size here document to conftest.frag.
15039   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15040   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15041   echo 'CEOF
15042   sed -f conftest.frag conftest.in > conftest.out
15043   rm -f conftest.in
15044   mv conftest.out conftest.in
15045 ' >> $CONFIG_STATUS
15046   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15047   rm -f conftest.vals
15048   mv conftest.tail conftest.vals
15049 done
15050 rm -f conftest.vals
15051
15052 cat >> $CONFIG_STATUS <<\EOF
15053   rm -f conftest.frag conftest.h
15054   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15055   cat conftest.in >> conftest.h
15056   rm -f conftest.in
15057   if cmp -s $ac_file conftest.h 2>/dev/null; then
15058     echo "$ac_file is unchanged"
15059     rm -f conftest.h
15060   else
15061     # Remove last slash and all that follows it.  Not all systems have dirname.
15062       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15063       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15064       # The file is in a subdirectory.
15065       test ! -d "$ac_dir" && mkdir "$ac_dir"
15066     fi
15067     rm -f $ac_file
15068     mv conftest.h $ac_file
15069   fi
15070 fi; done
15071
15072 EOF
15073 cat >> $CONFIG_STATUS <<EOF
15074 CPP="$CPP"
15075  top_srcdir="$srcdir"
15076  MAKE_SUBDIR="$MAKE_SUBDIR"
15077
15078 EOF
15079 cat >> $CONFIG_STATUS <<\EOF
15080 for dir in . $MAKE_SUBDIR; do
15081   (
15082     cd $dir
15083     rm -f junk.c
15084     < Makefile.in \
15085       sed -e '/^# Generated/d' \
15086           -e 's%/\*\*/#.*%%' \
15087           -e 's/^ *# */#/' \
15088           -e '/^##/d' \
15089           -e '/^#/ {
15090 p
15091 d
15092 }'        \
15093           -e '/./ {
15094 s/\([\"]\)/\\\1/g
15095 s/^/"/
15096 s/$/"/
15097 }'  > junk.c;
15098
15099
15100
15101     echo creating $dir/Makefile
15102 $CPP -I. -I${top_srcdir}/src  junk.c \
15103   | sed -e 's/^\#.*//'          \
15104         -e 's/^[        ][      ]*$//'\
15105         -e 's/^ /       /'              \
15106   | sed -n -e '/^..*$/p'        \
15107   | sed '/^\"/ {
15108         s/\\\([\"]\)/\1/g
15109         s/^[    ]*\"//
15110         s/\"[   ]*$//
15111 }' > Makefile.new
15112     chmod 444 Makefile.new
15113     mv -f Makefile.new Makefile
15114
15115     echo creating $dir/GNUmakefile
15116 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15117   | sed -e 's/^\#.*//'          \
15118         -e 's/^[        ][      ]*$//'\
15119         -e 's/^ /       /'              \
15120   | sed -n -e '/^..*$/p'        \
15121   | sed '/^\"/ {
15122         s/\\\([\"]\)/\1/g
15123         s/^[    ]*\"//
15124         s/\"[   ]*$//
15125 }' > Makefile.new
15126     chmod 444 Makefile.new
15127     mv -f Makefile.new GNUmakefile
15128
15129     rm -f junk.c
15130   )
15131 done
15132
15133 sed < config.status >> lib-src/config.values \
15134   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15135   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15136   -e 's/^\([^ ]*\) $/\1 ""/' \
15137   -e 's/ 1$/ t/'
15138
15139
15140 exit 0
15141 EOF
15142 chmod +x $CONFIG_STATUS
15143 rm -fr confdefs* $ac_clean_files
15144 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1