Sync up with r21-2-39.
[chise/xemacs-chise.git-] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.13 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 SHELL=${CONFIG_SHELL-/bin/sh}
96 ac_max_here_lines=12
97
98 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
99
100 # File descriptor usage:
101 # 0 standard input
102 # 1 file creation
103 # 2 errors and warnings
104 # 3 some systems may open it to /dev/tty
105 # 4 used on the Kubota Titan
106 # 6 checking for... messages and results
107 # 5 compiler messages saved in config.log
108 if test "$silent" = yes; then
109   exec 6>/dev/null
110 else
111   exec 6>&1
112 fi
113 exec 5>./config.log
114
115 echo "\
116 This file contains any messages produced by compilers while
117 running configure, to aid debugging if configure makes a mistake.
118 " 1>&5
119
120 # Strip out --no-create and --no-recursion so they do not pile up.
121 # Also quote any args containing shell metacharacters.
122 ac_configure_args=
123 for ac_arg
124 do
125   case "$ac_arg" in
126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
127   | --no-cr | --no-c) ;;
128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
130   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
131   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
132   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
133   esac
134 done
135
136 # NLS nuisances.
137 # Only set these to C if already set.  These must not be set unconditionally
138 # because not all systems understand e.g. LANG=C (notably SCO).
139 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
140 # Non-C LC_CTYPE values break the ctype check.
141 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
142 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
143 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
144 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
145
146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
147 rm -rf conftest* confdefs.h
148 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
149 echo > confdefs.h
150
151 # A filename unique to this package, relative to the directory that
152 # configure is in, which we can look for to find out if srcdir is correct.
153 ac_unique_file=src/lisp.h
154
155 # Find the source files, if location was not specified.
156 if test -z "$srcdir"; then
157   ac_srcdir_defaulted=yes
158   # Try the directory containing this script, then its parent.
159   ac_prog=$0
160   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
161   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
162   srcdir=$ac_confdir
163   if test ! -r $srcdir/$ac_unique_file; then
164     srcdir=..
165   fi
166 else
167   ac_srcdir_defaulted=no
168 fi
169 if test ! -r $srcdir/$ac_unique_file; then
170   if test "$ac_srcdir_defaulted" = yes; then
171     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
172   else
173     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
174   fi
175 fi
176 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
177
178 # Prefer explicitly selected file to automatically selected ones.
179 if test -z "$CONFIG_SITE"; then
180   if test "x$prefix" != xNONE; then
181     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
182   else
183     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
184   fi
185 fi
186 for ac_site_file in $CONFIG_SITE; do
187   if test -r "$ac_site_file"; then
188     echo "loading site script $ac_site_file"
189     . "$ac_site_file"
190   fi
191 done
192
193
194 ac_ext=c
195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
197 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
198 ac_cpp='$CPP '"$xe_cppflags"
199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
201 cross_compiling=no
202
203 ac_exeext=
204 ac_objext=o
205 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
206   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
207   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
208     ac_n= ac_c='
209 ' ac_t='        '
210   else
211     ac_n=-n ac_c= ac_t=
212   fi
213 else
214   ac_n= ac_c='\c' ac_t=
215 fi
216
217
218 progname="`echo $0 | sed 's:^\./\./:\./:'`"
219
220
221 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
222 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
223
224 prefix='/usr/local'
225 exec_prefix='${prefix}'
226 bindir='${exec_prefix}/bin'
227 datadir='${prefix}/lib'
228 statedir='${prefix}/lib'
229 libdir='${exec_prefix}/lib'
230 mandir='${prefix}/man/man1'
231 inststaticdir='${PROGNAME}'
232 instvardir='${PROGNAME}-${version}'
233 infodir='${datadir}/${instvardir}/info'
234 infopath=''
235 install_pp=''
236 lispdir='${datadir}/${instvardir}/lisp'
237 moduledir='${datadir}/${instvardir}/${configuration}/modules'
238 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
239 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
240 pkgdir='${datadir}/${instvardir}/lisp'
241 package_path=''
242 etcdir='${datadir}/${instvardir}/etc'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_utf_2000   | \
346         with_text_coding| \
347         with_file_coding| \
348         with_canna      | \
349         with_wnn        | \
350         with_wnn6       | \
351         with_workshop   | \
352         with_sparcworks | \
353         with_tooltalk   | \
354         with_ldap       | \
355         with_postgresql | \
356         with_pop        | \
357         with_kerberos   | \
358         with_hesiod     | \
359         with_dnet       | \
360         with_infodock   | \
361         external_widget | \
362         verbose         | \
363         extra_verbose   | \
364         usage_tracking  | \
365         use_union_type  | \
366         pdump           | \
367         debug           | \
368         use_assertions  | \
369         memory_usage_stats | \
370         with_clash_detection | \
371         with_modules | \
372         quick_build )
373                   case "$val" in
374             y | ye | yes )      val=yes ;;
375             n | no )            val=no  ;;
376             * ) (echo "$progname: Usage error:"
377 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
378 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
379           esac
380           eval "$opt=\"$val\"" ;;
381
382
383                         srcdir          | \
384         compiler        | \
385         cflags          | \
386         cpp             | \
387         cppflags        | \
388         libs            | \
389         ldflags         | \
390         cache_file      | \
391         native_sound_lib| \
392         site_lisp       | \
393         x_includes      | \
394         x_libraries     | \
395         site_includes   | \
396         site_libraries  | \
397         site_prefixes   | \
398         site_runtime_libraries )
399                   if test "$valomitted" = "yes" ; then
400                     if test "$#" = 0 ; then
401               (echo "$progname: Usage error:"
402 echo " " "The \`--$optname' option requires a value."
403 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
404             fi
405             val="$1"; shift
406           fi
407           eval "$opt=\"$val\""
408         ;;
409
410                 rel_alloc | \
411         with_dlmalloc | \
412         with_debug_malloc  | use_debug_malloc | \
413         with_system_malloc | use_system_malloc )
414           case "$val" in
415             y | ye | yes )      val=yes ;;
416             n | no )            val=no  ;;
417             d | de | def | defa | defau | defaul | default ) val=default ;;
418             * ) (echo "$progname: Usage error:"
419 echo " " "The \`--$optname' option requires one of these values:
420   \`yes', \`no', or \`default'."
421 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
422           esac
423           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
424           eval "$opt=\"$val\""
425         ;;
426
427                 "with_database" )
428           with_database_berkdb=no
429           with_database_dbm=no
430           with_database_gdbm=no
431           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
432             case "$x" in
433               no ) ;;
434               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
435               d | db | dbm )                               with_database_dbm=yes    ;;
436               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
437               * ) (echo "$progname: Usage error:"
438 echo " " "The \`--$optname' option value
439   must be either \`no' or a comma-separated list
440   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
441 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
442             esac
443           done
444           if test "$with_database_dbm"  = "yes" -a \
445                   "$with_database_gdbm" = "yes"; then
446           (echo "$progname: Usage error:"
447 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
448   with the \`--$optname' option."
449 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
450           fi
451         ;;
452
453                 "with_sound" )
454                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
455             case "$x" in
456                       n | no | non | none ) new_sdefault=no ;;
457               a | al | all | both ) new_sdefault=yes ;;
458
459               native )       with_native_sound=yes ;;
460               nonative )     with_native_sound=no ;;
461
462               nas )          with_nas_sound=yes ;;
463               nonas )        with_nas_sound=no ;;
464
465               esd )          with_esd_sound=yes ;;
466               noesd )        with_esd_sound=no ;;
467
468               * ) bogus_sound=yes ;;
469             esac
470             if test "$bogus_sound" -o \
471                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
472                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
473                 (echo "$progname: Usage error:"
474 echo " " "Valid types for the \`--$optname' option are:
475   $types.
476 The default is to autodetect all sound support."
477 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
478             elif test -n "$new_sdefault" ; then
479                 with_native_sound=$new_sdefault
480                 with_nas_sound=$new_sdefault
481                 with_esd_sound=$new_sdefault
482                 new_sdefault=   # reset this
483             fi
484             sound_notfirst=true
485           done
486         ;;
487
488                         "with_athena" )
489           case "$val" in
490             xa | xaw )                    val=xaw    ;;
491             3 | 3d | xaw3d )              val=3d     ;;
492                         ne | nex | next | naxtaw)     val=next   ;;
493                         9 | 95 | xaw95 )              val=95     ;;
494             xp | xpm | xawxpm )           val=xpm    ;;
495             * ) (echo "$progname: Usage error:"
496 echo " " "The \`--$optname' option must have one of these values:
497   \`xaw', \`3d', \`next', \`95', or \`xpm'."
498 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
499           esac
500           eval "$opt=\"$val\""
501         ;;
502
503                 "with_xim" )
504           case "$val" in
505             y | ye | yes )                val=yes   ;;
506             n | no | non | none )         val=no    ;;
507             x | xl | xli | xlib )         val=xlib  ;;
508             m | mo | mot | moti | motif ) val=motif ;;
509             * ) (echo "$progname: Usage error:"
510 echo " " "The \`--$optname' option must have one of these values:
511   \`motif', \`xlib', \`yes', or \`no'."
512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
513           esac
514           eval "$opt=\"$val\""
515         ;;
516
517                 "mail_locking" )
518           case "$val" in
519             lockf )     val=lockf ;;
520             flock )     val=flock ;;
521             file | dot ) val=file  ;;
522             locking )   val=locking  ;;
523             * ) (echo "$progname: Usage error:"
524 echo " " "The \`--$optname' option must have one of these values:
525   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
526 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
527           esac
528           eval "$opt=\"$val\""
529         ;;
530
531                 "error_checking" )
532                           
533           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
534             case "$x" in
535                       n | no | non | none ) new_default=no ;;
536               a | al | all )        new_default=yes ;;
537
538               extents )       error_check_extents=yes ;;
539               noextents )     error_check_extents=no ;;
540
541               typecheck )     error_check_typecheck=yes ;;
542               notypecheck )   error_check_typecheck=no ;;
543
544               bufpos )        error_check_bufpos=yes ;;
545               nobufpos )      error_check_bufpos=no ;;
546
547               gc )            error_check_gc=yes ;;
548               nogc )          error_check_gc=no ;;
549
550               malloc )        error_check_malloc=yes ;;
551               nomalloc )      error_check_malloc=no ;;
552
553               byte_code )     error_check_byte_code=yes ;;
554               nobyte_code )   error_check_byte_code=no ;;
555
556               glyphs )     error_check_glyphs=yes ;;
557               noglyphs )   error_check_glyphs=no ;;
558
559               * ) bogus_error_check=yes ;;
560             esac
561             if test "$bogus_error_check" -o \
562                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
563                 if test "$error_check_default" = yes ; then
564                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
565                 else
566                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
567                 fi
568                 (echo "$progname: Usage error:"
569 echo " " "Valid types for the \`--$optname' option are:
570   $types."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
572             elif test -n "$new_default" ; then
573                 error_check_extents=$new_default
574                 error_check_typecheck=$new_default
575                 error_check_bufpos=$new_default
576                 error_check_gc=$new_default
577                 error_check_malloc=$new_default
578                 error_check_byte_code=$new_default
579                 error_check_glyphs=$new_default
580                 new_default=    # reset this
581             fi
582             echeck_notfirst=true
583           done
584         ;;
585
586                                 
587                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
588         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
589         archlibdir | docdir | package_path )
590                    if test "$valomitted" = "yes"; then
591              if test "$#" = 0; then
592                  (echo "$progname: Usage error:"
593 echo " " "The \`--$optname' option requires a value."
594 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
595              fi
596              val="$1"; shift
597            fi
598            eval "$opt=\"$val\""
599
600                            case "$opt" in
601                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
602     Defining EXEC_PREFIX_USER_DEFINED
603 EOF
604 cat >> confdefs.h <<\EOF
605 #define EXEC_PREFIX_USER_DEFINED 1
606 EOF
607 }
608  ;;
609              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
610     Defining LISPDIR_USER_DEFINED
611 EOF
612 cat >> confdefs.h <<\EOF
613 #define LISPDIR_USER_DEFINED 1
614 EOF
615 }
616  ;;
617              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
618     Defining SITELISPDIR_USER_DEFINED
619 EOF
620 cat >> confdefs.h <<\EOF
621 #define SITELISPDIR_USER_DEFINED 1
622 EOF
623 }
624  ;;
625              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
626     Defining MODULEDIR_USER_DEFINED
627 EOF
628 cat >> confdefs.h <<\EOF
629 #define MODULEDIR_USER_DEFINED 1
630 EOF
631 }
632  ;;
633              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
634     Defining ETCDIR_USER_DEFINED
635 EOF
636 cat >> confdefs.h <<\EOF
637 #define ETCDIR_USER_DEFINED 1
638 EOF
639 }
640  ;;
641              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
642     Defining INFODIR_USER_DEFINED
643 EOF
644 cat >> confdefs.h <<\EOF
645 #define INFODIR_USER_DEFINED 1
646 EOF
647 }
648  ;;
649              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
650     Defining INFOPATH_USER_DEFINED
651 EOF
652 cat >> confdefs.h <<\EOF
653 #define INFOPATH_USER_DEFINED 1
654 EOF
655 }
656  ;;
657              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
658     Defining PACKAGE_PATH_USER_DEFINED
659 EOF
660 cat >> confdefs.h <<\EOF
661 #define PACKAGE_PATH_USER_DEFINED 1
662 EOF
663 }
664  ;;
665              datadir )
666                 { test "$extra_verbose" = "yes" && cat << \EOF
667     Defining INFODIR_USER_DEFINED
668 EOF
669 cat >> confdefs.h <<\EOF
670 #define INFODIR_USER_DEFINED 1
671 EOF
672 }
673
674                 { test "$extra_verbose" = "yes" && cat << \EOF
675     Defining LISPDIR_USER_DEFINED
676 EOF
677 cat >> confdefs.h <<\EOF
678 #define LISPDIR_USER_DEFINED 1
679 EOF
680 }
681
682             { test "$extra_verbose" = "yes" && cat << \EOF
683     Defining MODULEDIR_USER_DEFINED
684 EOF
685 cat >> confdefs.h <<\EOF
686 #define MODULEDIR_USER_DEFINED 1
687 EOF
688 }
689
690                 { test "$extra_verbose" = "yes" && cat << \EOF
691     Defining ETCDIR_USER_DEFINED
692 EOF
693 cat >> confdefs.h <<\EOF
694 #define ETCDIR_USER_DEFINED 1
695 EOF
696 }
697  ;;
698              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
699     Defining DOCDIR_USER_DEFINED
700 EOF
701 cat >> confdefs.h <<\EOF
702 #define DOCDIR_USER_DEFINED 1
703 EOF
704 }
705  ;;
706              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
707     Defining ARCHLIBDIR_USER_DEFINED
708 EOF
709 cat >> confdefs.h <<\EOF
710 #define ARCHLIBDIR_USER_DEFINED 1
711 EOF
712 }
713  ;;
714            esac
715         ;;
716
717                 "no_create" ) ;;
718
719                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
720
721                 "with_menubars"   | \
722         "with_scrollbars" | \
723         "with_dialogs"    | \
724         "with_widgets" )
725           case "$val" in
726             l | lu | luc | luci | lucid )               val=lucid  ;;
727             m | mo | mot | moti | motif )               val=motif  ;;
728             a | at | ath | athe | athen | athena )      val=athena ;;
729             n | no | non | none )                       val=no     ;;
730             y | ye | yes )                              val=yes    ;;
731             * ) (echo "$progname: Usage error:"
732 echo " " "The \`--$optname' option must have one of these values:
733   \`lucid', \`motif', \`athena', \`yes', or \`no'."
734 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
735           esac
736           eval "$opt=\"$val\""
737         ;;
738
739                 "use_minimal_tagbits" | \
740         "use_indexed_lrecord_implementation" | \
741         "run_in_place"  | \
742         "const_is_losing" | \
743         "with_gnu_make" )
744           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
745         ;;
746
747                 * ) (echo "$progname: Usage error:"
748 echo " " "Unrecognized option: $arg"
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750
751       esac
752     ;;
753
754         *-*-*) configuration="$arg" ;;
755
756         *) (echo "$progname: Usage error:"
757 echo " " "Unrecognized argument: $arg"
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
759
760   esac
761 done
762
763
764 test -n "$cpp"      && CPP="$cpp"
765 test -n "$cppflags" && CPPFLAGS="$cppflags"
766 test -n "$libs"     && LIBS="$libs"
767 test -n "$ldflags"  && LDFLAGS="$ldflags"
768
769 eval set x "$quoted_arguments"; shift
770
771 test "$extra_verbose" = "yes" && verbose=yes
772
773 test -n "$with_x" && with_x11="$with_x"
774
775 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
776   test "$with_system_malloc" = "default" && with_system_malloc=yes
777 fi
778
779
780
781 if test "$with_cde $with_tooltalk" = "yes no"; then
782   (echo "$progname: Usage error:"
783 echo " " "--with-cde requires --with-tooltalk"
784 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
785 elif test "$with_tooltalk" = "no" ; then with_cde=no
786 elif test "$with_cde" = "yes"; then with_tooltalk=yes
787 fi
788
789
790 case "$srcdir" in
791
792     "" )
793     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
794       if test -f "$dir/src/lisp.h" -a \
795               -f "$dir/lisp/version.el" ; then
796         srcdir="$dir"
797         break
798       fi
799     done
800     if test -z "$srcdir" ; then
801       (echo "$progname: Usage error:"
802 echo " " "Neither the current directory nor its parent seem to
803   contain the XEmacs sources.  If you do not want to build XEmacs in its
804   source tree, you should run \`$progname' in the directory in which
805   you wish to build XEmacs, using the \`--srcdir' option to say where the
806   sources may be found."
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808     fi
809   ;;
810
811     * )
812     if test ! -f "$srcdir/src/lisp.h" -o \
813             ! -f "$srcdir/lisp/version.el" ; then
814       (echo "$progname: Usage error:"
815 echo " " "The directory specified with the \`--srcdir' option,
816   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
817   either run the \`$progname' script at the top of the XEmacs source
818   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
819 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
820     fi
821   ;;
822 esac
823
824 if test -z "$configuration"; then
825     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
826   if test -z "$configuration"; then
827     (echo "$progname: Usage error:"
828 echo " " "XEmacs has not been ported to this host type.
829 Try explicitly specifying the CONFIGURATION when rerunning configure."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831   fi
832 fi
833
834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
835 echo "configure:836: checking whether ln -s works" >&5
836
837 rm -f conftestdata
838 if ln -s X conftestdata 2>/dev/null
839 then
840   rm -f conftestdata
841   ac_cv_prog_LN_S="ln -s"
842 else
843   ac_cv_prog_LN_S=ln
844 fi
845 LN_S="$ac_cv_prog_LN_S"
846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
847   echo "$ac_t""yes" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852
853 for dir in lisp etc man info tests; do
854   if test ! -d "$dir" ; then
855     echo Making symbolic link to "$srcdir/$dir"
856     ${LN_S} "$srcdir/$dir" "$dir"
857   fi
858 done
859
860
861 absolute_pwd="`pwd`";
862 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
863 then blddir="$PWD"
864 else blddir="$absolute_pwd"; if test -d "/net"; then
865   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
866   blddir=`echo "$blddir" | \
867    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
868 fi
869 fi
870
871
872 case "$srcdir" in
873   /* ) ;;
874   .  ) srcdir="$blddir" ;;
875   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   srcdir=`echo "$srcdir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi ;;
880 esac
881
882 if test `pwd` != `sh -c cd $srcdir && pwd`  \
883    && test -f "$srcdir/src/config.h"; then
884   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
885    echo "   as a build directory right now; it has been configured in its own"
886    echo "   right.  To configure in another directory as well, you MUST"
887    echo "   use GNU make.  If you do not have GNU make, then you must"
888    echo "   now do \`make distclean' in $srcdir,"
889    echo "   and then run $progname again.") >&2
890   extrasub='/^VPATH[     ]*=/c\
891 vpath %.c $(srcdir)\
892 vpath %.h $(srcdir)\
893 vpath %.y $(srcdir)\
894 vpath %.l $(srcdir)\
895 vpath %.s $(srcdir)\
896 vpath %.in $(srcdir)'
897 fi
898
899 . "$srcdir/version.sh" || exit 1;
900 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
901 : "${extra_verbose=$beta}"
902 version="${emacs_major_version}.${emacs_minor_version}"
903 { test "$extra_verbose" = "yes" && cat << EOF
904     Defining EMACS_MAJOR_VERSION = $emacs_major_version
905 EOF
906 cat >> confdefs.h <<EOF
907 #define EMACS_MAJOR_VERSION $emacs_major_version
908 EOF
909 }
910
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MINOR_VERSION = $emacs_minor_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MINOR_VERSION $emacs_minor_version
916 EOF
917 }
918
919 if test -n "$emacs_beta_version" ; then
920   if test "$beta" = "yes"; then
921         version="${version}-b${emacs_beta_version}"
922         { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_BETA_VERSION = $emacs_beta_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_BETA_VERSION $emacs_beta_version
927 EOF
928 }
929
930   else
931         version="${version}.${emacs_beta_version}"
932         { test "$extra_verbose" = "yes" && cat << EOF
933     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
934 EOF
935 cat >> confdefs.h <<EOF
936 #define EMACS_PATCH_LEVEL $emacs_beta_version
937 EOF
938 }
939
940   fi
941 fi
942 { test "$extra_verbose" = "yes" && cat << EOF
943     Defining XEMACS_CODENAME = "$xemacs_codename"
944 EOF
945 cat >> confdefs.h <<EOF
946 #define XEMACS_CODENAME "$xemacs_codename"
947 EOF
948 }
949
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_VERSION = "$version"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_VERSION "$version"
955 EOF
956 }
957
958
959 if test "$with_infodock" = "yes"; then
960   if test ! -f ../../ID-INSTALL; then
961     echo "Cannot build InfoDock without InfoDock sources"
962     with_infodock=no
963   fi
964 fi
965
966 if test "$with_infodock" = "yes"; then
967       { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_MAJOR_VERSION $infodock_major_version
972 EOF
973 }
974
975   { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MINOR_VERSION $infodock_minor_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_BUILD_VERSION $infodock_build_version
988 EOF
989 }
990
991   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
992   PROGNAME=infodock
993   CPPFLAGS="$CPPFLAGS -DINFODOCK"
994 else
995   PROGNAME=xemacs
996 fi
997
998 { test "$extra_verbose" = "yes" && cat << EOF
999     Defining EMACS_PROGNAME = "$PROGNAME"
1000 EOF
1001 cat >> confdefs.h <<EOF
1002 #define EMACS_PROGNAME "$PROGNAME"
1003 EOF
1004 }
1005
1006
1007 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1008 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1009     Defining ERROR_CHECK_EXTENTS
1010 EOF
1011 cat >> confdefs.h <<\EOF
1012 #define ERROR_CHECK_EXTENTS 1
1013 EOF
1014 }
1015
1016 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1017     Defining ERROR_CHECK_TYPECHECK
1018 EOF
1019 cat >> confdefs.h <<\EOF
1020 #define ERROR_CHECK_TYPECHECK 1
1021 EOF
1022 }
1023
1024 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1025     Defining ERROR_CHECK_BUFPOS
1026 EOF
1027 cat >> confdefs.h <<\EOF
1028 #define ERROR_CHECK_BUFPOS 1
1029 EOF
1030 }
1031
1032 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1033     Defining ERROR_CHECK_GC
1034 EOF
1035 cat >> confdefs.h <<\EOF
1036 #define ERROR_CHECK_GC 1
1037 EOF
1038 }
1039
1040 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1041     Defining ERROR_CHECK_MALLOC
1042 EOF
1043 cat >> confdefs.h <<\EOF
1044 #define ERROR_CHECK_MALLOC 1
1045 EOF
1046 }
1047
1048 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1049     Defining ERROR_CHECK_BYTE_CODE
1050 EOF
1051 cat >> confdefs.h <<\EOF
1052 #define ERROR_CHECK_BYTE_CODE 1
1053 EOF
1054 }
1055
1056 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1057     Defining ERROR_CHECK_GLYPHS
1058 EOF
1059 cat >> confdefs.h <<\EOF
1060 #define ERROR_CHECK_GLYPHS 1
1061 EOF
1062 }
1063
1064 if test "${debug:=$beta}" = "yes"; then
1065   use_assertions=yes memory_usage_stats=yes
1066   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1067    echo "    xemacs will be linked with \"debug.o\""
1068  fi
1069   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1070    echo "    xemacs will be linked with \"tests.o\""
1071  fi
1072   { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining DEBUG_XEMACS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define DEBUG_XEMACS 1
1077 EOF
1078 }
1079
1080 fi
1081 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1082     Defining USE_ASSERTIONS
1083 EOF
1084 cat >> confdefs.h <<\EOF
1085 #define USE_ASSERTIONS 1
1086 EOF
1087 }
1088
1089 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining MEMORY_USAGE_STATS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define MEMORY_USAGE_STATS 1
1094 EOF
1095 }
1096
1097
1098
1099 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1100 echo "configure:1101: checking "host system type"" >&5
1101 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1102 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1103 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1104 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1105 echo "$ac_t""$configuration" 1>&6
1106
1107
1108
1109
1110
1111 machine='' opsys=''
1112
1113 case "$canonical" in
1114   sparc-*-*        ) machine=sparc ;;
1115   alpha*-*-*       ) machine=alpha ;;
1116   vax-*-*          ) machine=vax ;;
1117   mips-dec-*       ) machine=pmax ;;
1118   mips-sgi-irix6*  ) machine=iris6d ;;
1119   mips-sgi-*       ) machine=iris4d ;;
1120   mips*-linux      ) machine=mips ;;
1121   romp-ibm-*       ) machine=ibmrt ;;
1122   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1123   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1124   powerpc*-*       ) machine=powerpc ;;
1125   hppa-*-*         ) machine=hp800 ;;
1126   m88k-dg-*        ) machine=aviion ;;
1127   m68*-sony-*      ) machine=news ;;
1128   mips-sony-*      ) machine=news-risc ;;
1129   clipper-*        ) machine=clipper ;;
1130   arm*             ) machine=arm ;;
1131   ns32k-*          ) machine=ns32000 ;;
1132 esac
1133
1134 case "$canonical" in
1135   *-*-linux*    ) opsys=linux ;;
1136   *-*-netbsd*   ) opsys=netbsd ;;
1137   *-*-openbsd*  ) opsys=openbsd ;;
1138   *-*-nextstep* ) opsys=nextstep ;;
1139   *-*-vms       ) opsys=vms ;;
1140
1141     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1142   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1143   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1144   *-dec-osf3*                ) opsys=decosf3-1 ;;
1145   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1146
1147     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1148   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1149   *-*-ultrix* )         opsys=ultrix4-3 ;;
1150
1151     *-*-aix3.1*  ) opsys=aix3-1 ;;
1152   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1153   *-*-aix3*    ) opsys=aix3-2   ;;
1154   *-*-aix4.0*  ) opsys=aix4     ;;
1155   *-*-aix4.1*  ) opsys=aix4-1   ;;
1156   *-*-aix4*    ) opsys=aix4-2   ;;
1157
1158     *-gnu* )                    opsys=gnu    ;;
1159   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1160   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1161   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1162   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1163   *-*-aos*   )                  opsys=bsd4-3 ;;
1164   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1165   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1166   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1167   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1168   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1169   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1170         if test -z "$NON_GNU_CPP" ; then
1171           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1172             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1173           done
1174         fi
1175         opsys=usg5-4-2 ;;
1176     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1177     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1178 esac
1179
1180 case "$canonical" in
1181
1182     *-*-netbsd* )
1183     case "$canonical" in
1184       i[3-9]86-*-netbsd*) machine=intel386 ;;
1185       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1186                                             machine=hp9000s300 ;;
1187       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1188       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1189     esac
1190   ;;
1191
1192     *-*-openbsd* )
1193     case "${canonical}" in
1194       i386-*-openbsd*)          machine=intel386 ;;
1195       m68k-*-openbsd*)          machine=hp9000s300 ;;
1196       mipsel-*-openbsd*)        machine=pmax ;;
1197      esac
1198    ;;
1199
1200     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1201   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1202
1203     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1204   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1205
1206     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1207
1208     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1209
1210     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1211
1212     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1213
1214     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1215
1216     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1217   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1218   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1219
1220   
1221     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1222
1223     *-convex-bsd* | *-convex-convexos* )
1224     machine=convex opsys=bsd4-3
1225     NON_GNU_CPP="cc -E -P"
1226   ;;
1227
1228     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1229
1230     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1231   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1232   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1233   m88k-dg-dgux*                           ) opsys=dgux     ;;
1234
1235     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1236   m88k-motorola-sysv4* )
1237                     machine=delta88k opsys=usg5-4-2
1238   ;;
1239   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1240
1241     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1242   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1243
1244     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1245
1246     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1247   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1248   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1249
1250       m88k-harris-cxux* )
1251         case "`uname -r`" in
1252        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1253        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1254     esac
1255     NON_GNU_CPP="/lib/cpp"
1256   ;;
1257     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1258     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1259
1260     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1261
1262     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1263
1264     *-hp-hpux* )
1265         case "$canonical" in
1266       m68*  ) machine=hp9000s300 ;;
1267       hppa* ) machine=hp800      ;;
1268     esac
1269
1270     case "$canonical" in
1271       *-hp-hpux7*  )  opsys=hpux   ;;
1272       *-hp-hpux8*  )  opsys=hpux8  ;;
1273       *-hp-hpux9*  )  opsys=hpux9  ;;
1274       *-hp-hpux10* )  opsys=hpux10 ;;
1275       *-hp-hpux11* )  opsys=hpux11 ;;
1276       *            )  opsys=hpux   ;;
1277     esac
1278
1279         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1280    echo "    xemacs will be linked with \"strcat.o\""
1281  fi ;; esac
1282
1283     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1284         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1285     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1286
1287     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1288   ;;
1289
1290     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1291   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1292
1293     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1294   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1295   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1296   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1297   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1298   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1299
1300     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1301   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1302
1303     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1304
1305     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1306
1307     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1308
1309     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1310
1311       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1312
1313     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1314
1315     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1316
1317     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1318
1319     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1320
1321         mips-mips-usg* ) machine=mips4 ;;
1322   mips-mips-riscos4 )
1323     machine=mips4
1324     NON_GNU_CC="cc -systype bsd43"
1325     NON_GNU_CPP="cc -systype bsd43 -E"
1326     case "$canonical" in
1327       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1328       mips-mips-riscos5* ) opsys=riscos5 ;;
1329     esac
1330   ;;
1331   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1332   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1333
1334     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1335
1336     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1337
1338     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1339   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1340
1341     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1342
1343     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1344
1345     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1346
1347     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1348
1349     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1350   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1351
1352     mips-siemens-sysv* | mips-sni-sysv*)
1353     machine=mips-siemens opsys=usg5-4
1354     NON_GNU_CC=/usr/ccs/bin/cc
1355     NON_GNU_CPP=/usr/ccs/lib/cpp
1356   ;;
1357
1358     mips-nec-sysv*)
1359     machine=mips-nec
1360     NON_GNU_CC=/usr/ccs/bin/cc
1361     NON_GNU_CPP=/usr/ccs/lib/cpp
1362   ;;
1363
1364       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1365   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1366     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1367   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1368   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1369   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1370   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1371   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1372   mips-sgi-irix*      ) opsys=irix5-0 ;;
1373
1374     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1375   *-sony-news* ) opsys=newsos5 ;;
1376
1377     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1378
1379     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1380         case "$canonical" in
1381       m68*-sunos1* )             machine=sun1     ;;
1382       m68*-sunos2* )             machine=sun2     ;;
1383       m68* )                     machine=sun3     ;;
1384       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1385       i*86-*-* )                 machine=intel386 ;;
1386       rs6000* )                  machine=rs6000   ;;
1387     esac
1388
1389         case "$canonical" in *-sunos5*)
1390       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1391     esac
1392
1393                     case "$canonical" in
1394       *-sunos4* )
1395         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1396         : ;;
1397       *-solaris2* )
1398         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1399         RANLIB=':' ;;
1400     esac
1401
1402     case "$canonical" in
1403       *-solaris*          )
1404         opsys=sol2
1405         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1406         { test "$extra_verbose" = "yes" && cat << EOF
1407     Defining OS_RELEASE = $os_release
1408 EOF
1409 cat >> confdefs.h <<EOF
1410 #define OS_RELEASE $os_release
1411 EOF
1412 }
1413  ;;
1414
1415             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1416       *-sunos4.0*         ) opsys=sunos4-0      ;;
1417       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1418       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1419       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1420       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1421       *-mach*             ) opsys=mach-bsd4-3   ;;
1422       *                   ) opsys=bsd4-2        ;;
1423     esac
1424
1425     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1426
1427         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1428   ;;
1429
1430     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1431
1432     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1433   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1434
1435     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1436
1437     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1438
1439     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1440       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1441
1442     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1443
1444     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1445
1446     vax-dec-* )
1447     case "$canonical" in
1448       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1449       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1450       *-mach* )                         opsys=mach-bsd4-3 ;;
1451     esac
1452   ;;
1453
1454     ns16k-whitechapel-* ) machine=mg1 ;;
1455
1456     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1457
1458     i[3-9]86-*-* )
1459     machine=intel386
1460     case "$canonical" in
1461       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1462       *-isc2.2* )               opsys=isc2-2 ;;
1463       *-isc4.0* )               opsys=isc4-0 ;;
1464       *-isc4.* )                opsys=isc4-1
1465                                 GCC_TEST_OPTIONS=-posix
1466                                 NON_GCC_TEST_OPTIONS=-Xp
1467                                 ;;
1468       *-isc* )                  opsys=isc3-0 ;;
1469       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1470       *-esix* )                 opsys=esix ;;
1471       *-mach* )                 opsys=mach-bsd4-3 ;;
1472       *-xenix* )                opsys=xenix ;;
1473       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1474       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1475       *-bsdi4* )                opsys=bsdos4 ;;
1476       *-bsdi3* )                opsys=bsdos3 ;;
1477       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1478       *-bsdi2* )                opsys=bsdos2 ;;
1479       *-sco3.2v5* )             opsys=sco5 ;
1480                                                         if test "$dynamic" = "yes" ; then
1481                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1482         else
1483                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1484         fi ;;
1485       *-sysv5* )                opsys=sco7 ;;
1486       *-386bsd* )               opsys=386bsd ;;
1487       *-freebsd* )              opsys=freebsd ;;
1488       *-nextstep* )             opsys=nextstep ;;
1489       *-pc-cygwin* )            opsys=cygwin32 ;;
1490       *-pc-mingw* )             opsys=mingw32 ;
1491                                 test -z "$with_tty" && with_tty="no";;
1492           esac
1493   ;;
1494
1495     m68k-*-linux* ) machine=m68k opsys=linux ;;
1496
1497 esac
1498
1499 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1500 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1501
1502 if test -r "${srcdir}/src/m/${machine}.h"; then
1503   machfile="m/${machine}.h"
1504   { test "$extra_verbose" = "yes" && cat << EOF
1505     Defining config_machfile = "$machfile"
1506 EOF
1507 cat >> confdefs.h <<EOF
1508 #define config_machfile "$machfile"
1509 EOF
1510 }
1511
1512 else
1513   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1514   echo "Using configure-time autodetection only."
1515 fi
1516
1517 if test -r "${srcdir}/src/s/${opsys}.h"; then
1518   opsysfile="s/${opsys}.h"
1519   { test "$extra_verbose" = "yes" && cat << EOF
1520     Defining config_opsysfile = "$opsysfile"
1521 EOF
1522 cat >> confdefs.h <<EOF
1523 #define config_opsysfile "$opsysfile"
1524 EOF
1525 }
1526
1527 else
1528   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1529   echo "Using configure-time autodetection only."
1530 fi
1531
1532
1533 if test -z "$dynamic"; then
1534   case "$opsys" in
1535     hpux* | sunos4* ) dynamic=no ;;
1536     *) dynamic=yes ;;
1537   esac
1538 fi
1539 if test "$dynamic" = "yes"; then
1540   case "$opsys" in
1541     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1542     decosf* ) ld_call_shared="-call_shared" ;;
1543   esac
1544 else   case "$opsys" in
1545     sol2 )
1546       echo "Static linking is not supported on Solaris 2."
1547       echo "Rerun configure without specifying --dynamic=no."
1548       exit 1 ;;
1549     linux   ) ld_call_shared="-Bstatic" ;;
1550     decosf* ) ld_call_shared="-non_shared" ;;
1551   esac
1552 fi
1553
1554 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1555
1556 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1557 { test "$extra_verbose" = "yes" && cat << EOF
1558     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1559 EOF
1560 cat >> confdefs.h <<EOF
1561 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1562 EOF
1563 }
1564
1565
1566
1567 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1568 if test "$with_workshop $with_tooltalk" = "yes no"; then
1569   (echo "$progname: Usage error:"
1570 echo " " "--with-workshop requires --with-tooltalk"
1571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1572 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1573 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1574 fi
1575
1576 if test "$with_workshop" = "yes"; then
1577   { test "$extra_verbose" = "yes" && cat << \EOF
1578     Defining SUNPRO
1579 EOF
1580 cat >> confdefs.h <<\EOF
1581 #define SUNPRO 1
1582 EOF
1583 }
1584
1585   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1586    echo "    xemacs will be linked with \"sunpro.o\""
1587  fi
1588 fi
1589
1590 if test "$with_clash_detection" != "no"; then
1591   { test "$extra_verbose" = "yes" && cat << \EOF
1592     Defining CLASH_DETECTION
1593 EOF
1594 cat >> confdefs.h <<\EOF
1595 #define CLASH_DETECTION 1
1596 EOF
1597 }
1598
1599   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1600    echo "    xemacs will be linked with \"filelock.o\""
1601  fi
1602 fi
1603
1604 test -n "$compiler" && CC="$compiler"
1605 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1606 fi
1607
1608 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1609 if test "${CFLAGS-unset}" != unset
1610   then cflags_specified=yes;
1611   else cflags_specified=no;
1612 fi
1613
1614 xe_save_CFLAGS="$CFLAGS"
1615
1616 # Extract the first word of "gcc", so it can be a program name with args.
1617 set dummy gcc; ac_word=$2
1618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1619 echo "configure:1620: checking for $ac_word" >&5
1620
1621 if test -n "$CC"; then
1622   ac_cv_prog_CC="$CC" # Let the user override the test.
1623 else
1624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1625   ac_dummy="$PATH"
1626   for ac_dir in $ac_dummy; do
1627     test -z "$ac_dir" && ac_dir=.
1628     if test -f $ac_dir/$ac_word; then
1629       ac_cv_prog_CC="gcc"
1630       break
1631     fi
1632   done
1633   IFS="$ac_save_ifs"
1634 fi
1635 CC="$ac_cv_prog_CC"
1636 if test -n "$CC"; then
1637   echo "$ac_t""$CC" 1>&6
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641
1642 if test -z "$CC"; then
1643   # Extract the first word of "cc", so it can be a program name with args.
1644 set dummy cc; ac_word=$2
1645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1646 echo "configure:1647: checking for $ac_word" >&5
1647
1648 if test -n "$CC"; then
1649   ac_cv_prog_CC="$CC" # Let the user override the test.
1650 else
1651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1652   ac_prog_rejected=no
1653   ac_dummy="$PATH"
1654   for ac_dir in $ac_dummy; do
1655     test -z "$ac_dir" && ac_dir=.
1656     if test -f $ac_dir/$ac_word; then
1657       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1658         ac_prog_rejected=yes
1659         continue
1660       fi
1661       ac_cv_prog_CC="cc"
1662       break
1663     fi
1664   done
1665   IFS="$ac_save_ifs"
1666 if test $ac_prog_rejected = yes; then
1667   # We found a bogon in the path, so make sure we never use it.
1668   set dummy $ac_cv_prog_CC
1669   shift
1670   if test $# -gt 0; then
1671     # We chose a different compiler from the bogus one.
1672     # However, it has the same basename, so the bogon will be chosen
1673     # first if we set CC to just the basename; use the full file name.
1674     shift
1675     set dummy "$ac_dir/$ac_word" "$@"
1676     shift
1677     ac_cv_prog_CC="$@"
1678   fi
1679 fi
1680 fi
1681 CC="$ac_cv_prog_CC"
1682 if test -n "$CC"; then
1683   echo "$ac_t""$CC" 1>&6
1684 else
1685   echo "$ac_t""no" 1>&6
1686 fi
1687
1688   if test -z "$CC"; then
1689     case "`uname -s`" in
1690     *win32* | *WIN32*)
1691       # Extract the first word of "cl", so it can be a program name with args.
1692 set dummy cl; ac_word=$2
1693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1694 echo "configure:1695: checking for $ac_word" >&5
1695
1696 if test -n "$CC"; then
1697   ac_cv_prog_CC="$CC" # Let the user override the test.
1698 else
1699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1700   ac_dummy="$PATH"
1701   for ac_dir in $ac_dummy; do
1702     test -z "$ac_dir" && ac_dir=.
1703     if test -f $ac_dir/$ac_word; then
1704       ac_cv_prog_CC="cl"
1705       break
1706     fi
1707   done
1708   IFS="$ac_save_ifs"
1709 fi
1710 CC="$ac_cv_prog_CC"
1711 if test -n "$CC"; then
1712   echo "$ac_t""$CC" 1>&6
1713 else
1714   echo "$ac_t""no" 1>&6
1715 fi
1716  ;;
1717     esac
1718   fi
1719   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1720 fi
1721
1722 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1723 echo "configure:1724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1724
1725 ac_ext=c
1726 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1727 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1728 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1729 ac_cpp='$CPP '"$xe_cppflags"
1730 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1731 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1732 cross_compiling=no
1733
1734 cat > conftest.$ac_ext << EOF
1735
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738
1739 main(){return(0);}
1740 EOF
1741 if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742   ac_cv_prog_cc_works=yes
1743   # If we can't run a trivial program, we are probably using a cross compiler.
1744   if (./conftest; exit) 2>/dev/null; then
1745     ac_cv_prog_cc_cross=no
1746   else
1747     ac_cv_prog_cc_cross=yes
1748   fi
1749 else
1750   echo "configure: failed program was:" >&5
1751   cat conftest.$ac_ext >&5
1752   ac_cv_prog_cc_works=no
1753 fi
1754 rm -fr conftest*
1755 ac_ext=c
1756 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1757 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1758 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1759 ac_cpp='$CPP '"$xe_cppflags"
1760 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1761 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1762 cross_compiling=no
1763
1764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1765 if test $ac_cv_prog_cc_works = no; then
1766   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1767 fi
1768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1769 echo "configure:1770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1771 cross_compiling=$ac_cv_prog_cc_cross
1772
1773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1774 echo "configure:1775: checking whether we are using GNU C" >&5
1775
1776 cat > conftest.c <<EOF
1777 #ifdef __GNUC__
1778   yes;
1779 #endif
1780 EOF
1781 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1782   ac_cv_prog_gcc=yes
1783 else
1784   ac_cv_prog_gcc=no
1785 fi
1786
1787 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1788
1789 if test $ac_cv_prog_gcc = yes; then
1790   GCC=yes
1791 else
1792   GCC=
1793 fi
1794
1795 ac_test_CFLAGS="${CFLAGS+set}"
1796 ac_save_CFLAGS="$CFLAGS"
1797 CFLAGS=
1798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1799 echo "configure:1800: checking whether ${CC-cc} accepts -g" >&5
1800
1801 echo 'void f(){}' > conftest.c
1802 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1803   ac_cv_prog_cc_g=yes
1804 else
1805   ac_cv_prog_cc_g=no
1806 fi
1807 rm -f conftest*
1808
1809
1810 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1811 if test "$ac_test_CFLAGS" = set; then
1812   CFLAGS="$ac_save_CFLAGS"
1813 elif test $ac_cv_prog_cc_g = yes; then
1814   if test "$GCC" = yes; then
1815     CFLAGS="-g -O2"
1816   else
1817     CFLAGS="-g"
1818   fi
1819 else
1820   if test "$GCC" = yes; then
1821     CFLAGS="-O2"
1822   else
1823     CFLAGS=
1824   fi
1825 fi
1826  
1827 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1828   CC=${NON_GNU_CC-cc}
1829   # Extract the first word of "gcc", so it can be a program name with args.
1830 set dummy gcc; ac_word=$2
1831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1832 echo "configure:1833: checking for $ac_word" >&5
1833
1834 if test -n "$CC"; then
1835   ac_cv_prog_CC="$CC" # Let the user override the test.
1836 else
1837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1838   ac_dummy="$PATH"
1839   for ac_dir in $ac_dummy; do
1840     test -z "$ac_dir" && ac_dir=.
1841     if test -f $ac_dir/$ac_word; then
1842       ac_cv_prog_CC="gcc"
1843       break
1844     fi
1845   done
1846   IFS="$ac_save_ifs"
1847 fi
1848 CC="$ac_cv_prog_CC"
1849 if test -n "$CC"; then
1850   echo "$ac_t""$CC" 1>&6
1851 else
1852   echo "$ac_t""no" 1>&6
1853 fi
1854
1855 if test -z "$CC"; then
1856   # Extract the first word of "cc", so it can be a program name with args.
1857 set dummy cc; ac_word=$2
1858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1859 echo "configure:1860: checking for $ac_word" >&5
1860
1861 if test -n "$CC"; then
1862   ac_cv_prog_CC="$CC" # Let the user override the test.
1863 else
1864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1865   ac_prog_rejected=no
1866   ac_dummy="$PATH"
1867   for ac_dir in $ac_dummy; do
1868     test -z "$ac_dir" && ac_dir=.
1869     if test -f $ac_dir/$ac_word; then
1870       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1871         ac_prog_rejected=yes
1872         continue
1873       fi
1874       ac_cv_prog_CC="cc"
1875       break
1876     fi
1877   done
1878   IFS="$ac_save_ifs"
1879 if test $ac_prog_rejected = yes; then
1880   # We found a bogon in the path, so make sure we never use it.
1881   set dummy $ac_cv_prog_CC
1882   shift
1883   if test $# -gt 0; then
1884     # We chose a different compiler from the bogus one.
1885     # However, it has the same basename, so the bogon will be chosen
1886     # first if we set CC to just the basename; use the full file name.
1887     shift
1888     set dummy "$ac_dir/$ac_word" "$@"
1889     shift
1890     ac_cv_prog_CC="$@"
1891   fi
1892 fi
1893 fi
1894 CC="$ac_cv_prog_CC"
1895 if test -n "$CC"; then
1896   echo "$ac_t""$CC" 1>&6
1897 else
1898   echo "$ac_t""no" 1>&6
1899 fi
1900
1901   if test -z "$CC"; then
1902     case "`uname -s`" in
1903     *win32* | *WIN32*)
1904       # Extract the first word of "cl", so it can be a program name with args.
1905 set dummy cl; ac_word=$2
1906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_word" >&5
1908
1909 if test -n "$CC"; then
1910   ac_cv_prog_CC="$CC" # Let the user override the test.
1911 else
1912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1913   ac_dummy="$PATH"
1914   for ac_dir in $ac_dummy; do
1915     test -z "$ac_dir" && ac_dir=.
1916     if test -f $ac_dir/$ac_word; then
1917       ac_cv_prog_CC="cl"
1918       break
1919     fi
1920   done
1921   IFS="$ac_save_ifs"
1922 fi
1923 CC="$ac_cv_prog_CC"
1924 if test -n "$CC"; then
1925   echo "$ac_t""$CC" 1>&6
1926 else
1927   echo "$ac_t""no" 1>&6
1928 fi
1929  ;;
1930     esac
1931   fi
1932   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1933 fi
1934
1935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1936 echo "configure:1937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1937
1938 ac_ext=c
1939 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1940 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1941 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1942 ac_cpp='$CPP '"$xe_cppflags"
1943 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1944 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1945 cross_compiling=no
1946
1947 cat > conftest.$ac_ext << EOF
1948
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951
1952 main(){return(0);}
1953 EOF
1954 if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1955   ac_cv_prog_cc_works=yes
1956   # If we can't run a trivial program, we are probably using a cross compiler.
1957   if (./conftest; exit) 2>/dev/null; then
1958     ac_cv_prog_cc_cross=no
1959   else
1960     ac_cv_prog_cc_cross=yes
1961   fi
1962 else
1963   echo "configure: failed program was:" >&5
1964   cat conftest.$ac_ext >&5
1965   ac_cv_prog_cc_works=no
1966 fi
1967 rm -fr conftest*
1968 ac_ext=c
1969 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1970 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1971 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1972 ac_cpp='$CPP '"$xe_cppflags"
1973 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1974 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1975 cross_compiling=no
1976
1977 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1978 if test $ac_cv_prog_cc_works = no; then
1979   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1980 fi
1981 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1982 echo "configure:1983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1983 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1984 cross_compiling=$ac_cv_prog_cc_cross
1985
1986 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1987 echo "configure:1988: checking whether we are using GNU C" >&5
1988
1989 cat > conftest.c <<EOF
1990 #ifdef __GNUC__
1991   yes;
1992 #endif
1993 EOF
1994 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1995   ac_cv_prog_gcc=yes
1996 else
1997   ac_cv_prog_gcc=no
1998 fi
1999
2000 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2001
2002 if test $ac_cv_prog_gcc = yes; then
2003   GCC=yes
2004 else
2005   GCC=
2006 fi
2007
2008 ac_test_CFLAGS="${CFLAGS+set}"
2009 ac_save_CFLAGS="$CFLAGS"
2010 CFLAGS=
2011 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2012 echo "configure:2013: checking whether ${CC-cc} accepts -g" >&5
2013
2014 echo 'void f(){}' > conftest.c
2015 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2016   ac_cv_prog_cc_g=yes
2017 else
2018   ac_cv_prog_cc_g=no
2019 fi
2020 rm -f conftest*
2021
2022
2023 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2024 if test "$ac_test_CFLAGS" = set; then
2025   CFLAGS="$ac_save_CFLAGS"
2026 elif test $ac_cv_prog_cc_g = yes; then
2027   if test "$GCC" = yes; then
2028     CFLAGS="-g -O2"
2029   else
2030     CFLAGS="-g"
2031   fi
2032 else
2033   if test "$GCC" = yes; then
2034     CFLAGS="-O2"
2035   else
2036     CFLAGS=
2037   fi
2038 fi
2039
2040 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2041   CC=gcc
2042   # Extract the first word of "gcc", so it can be a program name with args.
2043 set dummy gcc; ac_word=$2
2044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2045 echo "configure:2046: checking for $ac_word" >&5
2046
2047 if test -n "$CC"; then
2048   ac_cv_prog_CC="$CC" # Let the user override the test.
2049 else
2050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2051   ac_dummy="$PATH"
2052   for ac_dir in $ac_dummy; do
2053     test -z "$ac_dir" && ac_dir=.
2054     if test -f $ac_dir/$ac_word; then
2055       ac_cv_prog_CC="gcc"
2056       break
2057     fi
2058   done
2059   IFS="$ac_save_ifs"
2060 fi
2061 CC="$ac_cv_prog_CC"
2062 if test -n "$CC"; then
2063   echo "$ac_t""$CC" 1>&6
2064 else
2065   echo "$ac_t""no" 1>&6
2066 fi
2067
2068 if test -z "$CC"; then
2069   # Extract the first word of "cc", so it can be a program name with args.
2070 set dummy cc; ac_word=$2
2071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2072 echo "configure:2073: checking for $ac_word" >&5
2073
2074 if test -n "$CC"; then
2075   ac_cv_prog_CC="$CC" # Let the user override the test.
2076 else
2077   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2078   ac_prog_rejected=no
2079   ac_dummy="$PATH"
2080   for ac_dir in $ac_dummy; do
2081     test -z "$ac_dir" && ac_dir=.
2082     if test -f $ac_dir/$ac_word; then
2083       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2084         ac_prog_rejected=yes
2085         continue
2086       fi
2087       ac_cv_prog_CC="cc"
2088       break
2089     fi
2090   done
2091   IFS="$ac_save_ifs"
2092 if test $ac_prog_rejected = yes; then
2093   # We found a bogon in the path, so make sure we never use it.
2094   set dummy $ac_cv_prog_CC
2095   shift
2096   if test $# -gt 0; then
2097     # We chose a different compiler from the bogus one.
2098     # However, it has the same basename, so the bogon will be chosen
2099     # first if we set CC to just the basename; use the full file name.
2100     shift
2101     set dummy "$ac_dir/$ac_word" "$@"
2102     shift
2103     ac_cv_prog_CC="$@"
2104   fi
2105 fi
2106 fi
2107 CC="$ac_cv_prog_CC"
2108 if test -n "$CC"; then
2109   echo "$ac_t""$CC" 1>&6
2110 else
2111   echo "$ac_t""no" 1>&6
2112 fi
2113
2114   if test -z "$CC"; then
2115     case "`uname -s`" in
2116     *win32* | *WIN32*)
2117       # Extract the first word of "cl", so it can be a program name with args.
2118 set dummy cl; ac_word=$2
2119 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2120 echo "configure:2121: checking for $ac_word" >&5
2121
2122 if test -n "$CC"; then
2123   ac_cv_prog_CC="$CC" # Let the user override the test.
2124 else
2125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2126   ac_dummy="$PATH"
2127   for ac_dir in $ac_dummy; do
2128     test -z "$ac_dir" && ac_dir=.
2129     if test -f $ac_dir/$ac_word; then
2130       ac_cv_prog_CC="cl"
2131       break
2132     fi
2133   done
2134   IFS="$ac_save_ifs"
2135 fi
2136 CC="$ac_cv_prog_CC"
2137 if test -n "$CC"; then
2138   echo "$ac_t""$CC" 1>&6
2139 else
2140   echo "$ac_t""no" 1>&6
2141 fi
2142  ;;
2143     esac
2144   fi
2145   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2146 fi
2147
2148 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2149 echo "configure:2150: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2150
2151 ac_ext=c
2152 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2153 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2154 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2155 ac_cpp='$CPP '"$xe_cppflags"
2156 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2157 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2158 cross_compiling=no
2159
2160 cat > conftest.$ac_ext << EOF
2161
2162 #line 2163 "configure"
2163 #include "confdefs.h"
2164
2165 main(){return(0);}
2166 EOF
2167 if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2168   ac_cv_prog_cc_works=yes
2169   # If we can't run a trivial program, we are probably using a cross compiler.
2170   if (./conftest; exit) 2>/dev/null; then
2171     ac_cv_prog_cc_cross=no
2172   else
2173     ac_cv_prog_cc_cross=yes
2174   fi
2175 else
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   ac_cv_prog_cc_works=no
2179 fi
2180 rm -fr conftest*
2181 ac_ext=c
2182 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2183 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2184 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2185 ac_cpp='$CPP '"$xe_cppflags"
2186 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2187 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2188 cross_compiling=no
2189
2190 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2191 if test $ac_cv_prog_cc_works = no; then
2192   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2193 fi
2194 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2195 echo "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2196 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2197 cross_compiling=$ac_cv_prog_cc_cross
2198
2199 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2200 echo "configure:2201: checking whether we are using GNU C" >&5
2201
2202 cat > conftest.c <<EOF
2203 #ifdef __GNUC__
2204   yes;
2205 #endif
2206 EOF
2207 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2208   ac_cv_prog_gcc=yes
2209 else
2210   ac_cv_prog_gcc=no
2211 fi
2212
2213 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2214
2215 if test $ac_cv_prog_gcc = yes; then
2216   GCC=yes
2217 else
2218   GCC=
2219 fi
2220
2221 ac_test_CFLAGS="${CFLAGS+set}"
2222 ac_save_CFLAGS="$CFLAGS"
2223 CFLAGS=
2224 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2225 echo "configure:2226: checking whether ${CC-cc} accepts -g" >&5
2226
2227 echo 'void f(){}' > conftest.c
2228 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2229   ac_cv_prog_cc_g=yes
2230 else
2231   ac_cv_prog_cc_g=no
2232 fi
2233 rm -f conftest*
2234
2235
2236 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2237 if test "$ac_test_CFLAGS" = set; then
2238   CFLAGS="$ac_save_CFLAGS"
2239 elif test $ac_cv_prog_cc_g = yes; then
2240   if test "$GCC" = yes; then
2241     CFLAGS="-g -O2"
2242   else
2243     CFLAGS="-g"
2244   fi
2245 else
2246   if test "$GCC" = yes; then
2247     CFLAGS="-O2"
2248   else
2249     CFLAGS=
2250   fi
2251 fi
2252
2253 fi
2254 CFLAGS="$xe_save_CFLAGS"
2255
2256
2257 test -n "$CPP" -a -d "$CPP" && CPP=
2258
2259 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2260
2261 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2262 echo "configure:2263: checking how to run the C preprocessor" >&5
2263 # On Suns, sometimes $CPP names a directory.
2264 if test -n "$CPP" && test -d "$CPP"; then
2265   CPP=
2266 fi
2267 if test -z "$CPP"; then
2268
2269   # This must be in double quotes, not single quotes, because CPP may get
2270   # substituted into the Makefile and "${CC-cc}" will confuse make.
2271   CPP="${CC-cc} -E"
2272   # On the NeXT, cc -E runs the code through the compiler's parser,
2273   # not just through cpp.
2274   cat > conftest.$ac_ext <<EOF
2275 #line 2276 "configure"
2276 #include "confdefs.h"
2277 #include <assert.h>
2278 Syntax Error
2279 EOF
2280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2281 { (eval echo configure:2282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2283 if test -z "$ac_err"; then
2284   :
2285 else
2286   echo "$ac_err" >&5
2287   echo "configure: failed program was:" >&5
2288   cat conftest.$ac_ext >&5
2289   rm -rf conftest*
2290   CPP="${CC-cc} -E -traditional-cpp"
2291   cat > conftest.$ac_ext <<EOF
2292 #line 2293 "configure"
2293 #include "confdefs.h"
2294 #include <assert.h>
2295 Syntax Error
2296 EOF
2297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2298 { (eval echo configure:2299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2300 if test -z "$ac_err"; then
2301   :
2302 else
2303   echo "$ac_err" >&5
2304   echo "configure: failed program was:" >&5
2305   cat conftest.$ac_ext >&5
2306   rm -rf conftest*
2307   CPP="${CC-cc} -nologo -E"
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <assert.h>
2312 Syntax Error
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   :
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   CPP=/lib/cpp
2325 fi
2326 rm -f conftest*
2327 fi
2328 rm -f conftest*
2329 fi
2330 rm -f conftest*
2331   ac_cv_prog_CPP="$CPP"
2332   CPP="$ac_cv_prog_CPP"
2333 else
2334   ac_cv_prog_CPP="$CPP"
2335 fi
2336 echo "$ac_t""$CPP" 1>&6
2337
2338
2339
2340 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2341 echo "configure:2342: checking for AIX" >&5
2342 cat > conftest.$ac_ext <<EOF
2343 #line 2344 "configure"
2344 #include "confdefs.h"
2345 #ifdef _AIX
2346   yes
2347 #endif
2348
2349 EOF
2350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351   egrep "yes" >/dev/null 2>&1; then
2352   rm -rf conftest*
2353   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2354     Defining _ALL_SOURCE
2355 EOF
2356 cat >> confdefs.h <<\EOF
2357 #define _ALL_SOURCE 1
2358 EOF
2359 }
2360
2361 else
2362   rm -rf conftest*
2363   echo "$ac_t""no" 1>&6
2364 fi
2365 rm -f conftest*
2366
2367  
2368
2369 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2370 echo "configure:2371: checking for GNU libc" >&5
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2373 "configure"
2373 #include "confdefs.h"
2374 #include <features.h>
2375 int main() {
2376
2377 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2378 #error Not a GNU libc system :-(
2379 ******* ======= ******** &&&&&&&&
2380 #endif
2381
2382 ; return 0; }
2383 EOF
2384 if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2385   rm -rf conftest*
2386   have_glibc=yes
2387 else
2388   echo "configure: failed program was:" >&5
2389   cat conftest.$ac_ext >&5
2390   rm -rf conftest*
2391   have_glibc=no
2392 fi
2393 rm -f conftest*
2394 echo "$ac_t""$have_glibc" 1>&6
2395 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2396     Defining _GNU_SOURCE
2397 EOF
2398 cat >> confdefs.h <<\EOF
2399 #define _GNU_SOURCE 1
2400 EOF
2401 }
2402
2403
2404 case "$opsys" in
2405   sol2)
2406    { test "$extra_verbose" = "yes" && cat << \EOF
2407     Defining __EXTENSIONS__
2408 EOF
2409 cat >> confdefs.h <<\EOF
2410 #define __EXTENSIONS__ 1
2411 EOF
2412 }
2413
2414       if test "$os_release" -ge 55; then
2415      { test "$extra_verbose" = "yes" && cat << \EOF
2416     Defining _XOPEN_SOURCE = 500
2417 EOF
2418 cat >> confdefs.h <<\EOF
2419 #define _XOPEN_SOURCE 500
2420 EOF
2421 }
2422
2423      { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining _XOPEN_SOURCE_EXTENDED
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define _XOPEN_SOURCE_EXTENDED 1
2428 EOF
2429 }
2430
2431    fi ;;
2432   linux)
2433     { test "$extra_verbose" = "yes" && cat << \EOF
2434     Defining _POSIX_C_SOURCE = 199506L
2435 EOF
2436 cat >> confdefs.h <<\EOF
2437 #define _POSIX_C_SOURCE 199506L
2438 EOF
2439 }
2440
2441     { test "$extra_verbose" = "yes" && cat << \EOF
2442     Defining _XOPEN_SOURCE = 500
2443 EOF
2444 cat >> confdefs.h <<\EOF
2445 #define _XOPEN_SOURCE 500
2446 EOF
2447 }
2448
2449     { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE_EXTENDED
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE_EXTENDED 1
2454 EOF
2455 }
2456
2457     ;;
2458 esac
2459
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463 int main () {
2464 #if defined __SUNPRO_C
2465 return 11;
2466 #elif defined __DECC
2467 return 12;
2468 #elif defined __USLC__ && defined __SCO_VERSION__
2469 return 13;
2470 #else
2471 return 0;
2472 #endif
2473 }
2474 EOF
2475 if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2476 then
2477   :
2478 else
2479   conftest_rc="$?"
2480   echo "configure: failed program was:" >&5
2481   cat conftest.$ac_ext >&5
2482   rm -fr conftest*
2483   case "$conftest_rc" in
2484   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2485   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2486   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2487 esac
2488 fi
2489 rm -fr conftest*
2490
2491
2492
2493
2494 echo "Extracting information from the machine- and system-dependent headers..."
2495
2496 tempcname="conftest.c"
2497
2498
2499
2500 cat > $tempcname < confdefs.h
2501 cat >> $tempcname <<EOF
2502 #define NOT_C_CODE
2503 #define C_SWITCH_SITE
2504 #define C_SWITCH_X_SITE
2505 #define LD_SWITCH_SITE
2506 #define LD_SWITCH_X_SITE
2507 #define LD_SWITCH_X_SITE_AUX
2508 #define OS_RELEASE $os_release
2509
2510 #ifdef config_opsysfile
2511 #include "$srcdir/src/$opsysfile"
2512 #endif
2513
2514 #ifdef config_machfile
2515 #include "$srcdir/src/$machfile"
2516 #endif
2517
2518 #ifndef LIBS_MACHINE
2519 #define LIBS_MACHINE
2520 #endif
2521 configure___ libs_machine=LIBS_MACHINE
2522
2523 #ifndef LIBS_SYSTEM
2524 #define LIBS_SYSTEM
2525 #endif
2526 configure___ libs_system=LIBS_SYSTEM
2527
2528 #ifndef LIBS_TERMCAP
2529 #define LIBS_TERMCAP
2530 #endif
2531 configure___ libs_termcap=LIBS_TERMCAP
2532
2533 #ifndef LIB_STANDARD
2534 #define LIB_STANDARD
2535 #endif
2536 configure___ libs_standard=LIB_STANDARD
2537
2538
2539 #ifndef OBJECTS_MACHINE
2540 #define OBJECTS_MACHINE
2541 #endif
2542 configure___ objects_machine=OBJECTS_MACHINE
2543
2544 #ifndef OBJECTS_SYSTEM
2545 #define OBJECTS_SYSTEM
2546 #endif
2547 configure___ objects_system=OBJECTS_SYSTEM
2548
2549
2550 #ifndef C_SWITCH_MACHINE
2551 #define C_SWITCH_MACHINE
2552 #endif
2553 configure___ c_switch_machine=C_SWITCH_MACHINE
2554
2555 #ifndef C_SWITCH_SYSTEM
2556 #define C_SWITCH_SYSTEM
2557 #endif
2558 configure___ c_switch_system=C_SWITCH_SYSTEM
2559
2560
2561 #ifndef LD_SWITCH_MACHINE
2562 #define LD_SWITCH_MACHINE
2563 #endif
2564 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2565
2566 #ifndef LD_SWITCH_SYSTEM
2567 #define LD_SWITCH_SYSTEM
2568 #endif
2569 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2570
2571
2572 #ifndef UNEXEC
2573 #define UNEXEC "unexec.o"
2574 #endif
2575 configure___ unexec=UNEXEC
2576
2577
2578 #ifndef LD_SWITCH_SHARED
2579 #define LD_SWITCH_SHARED "-c"
2580 #endif
2581 configure___ ld_switch_shared=LD_SWITCH_SHARED
2582
2583
2584 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2585 configure___ ordinary_ld=ORDINARY_LD
2586
2587 #ifdef ORDINARY_LINK
2588 #define LD ORDINARY_LD
2589 #else /* no ORDINARY LINK */
2590 #ifdef COFF_ENCAPSULATE
2591 #define LD "\$(CC) -nostdlib"
2592 #else /* not COFF_ENCAPSULATE */
2593 #ifdef LINKER
2594 #define LD LINKER
2595 #else /* ! defined (LINKER) */
2596 #define LD "ld"
2597 #endif /* ! defined (LINKER) */
2598 #endif /* ! defined (COFF_ENCAPSULATE) */
2599 #endif /* not ORDINARY_LINK */
2600 configure___ ld=LD
2601
2602 #ifndef LIB_GCC
2603 #define LIB_GCC
2604 #endif
2605 configure___ lib_gcc=LIB_GCC
2606
2607 #ifndef LD_TEXT_START_ADDR
2608 #define LD_TEXT_START_ADDR
2609 #endif
2610 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2611
2612
2613 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2614 #ifdef NO_REMAP
2615 #ifdef COFF_ENCAPSULATE
2616 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2617 #else /* ! defined (COFF_ENCAPSULATE) */
2618 #define START_FILES "pre-crt0.o /lib/crt0.o"
2619 #endif /* ! defined (COFF_ENCAPSULATE) */
2620 #else /* ! defined (NO_REMAP) */
2621 #define START_FILES "ecrt0.o"
2622 #endif /* ! defined (NO_REMAP) */
2623 #endif /* no ORDINARY_LINK */
2624 #ifndef START_FILES
2625 #define START_FILES
2626 #endif
2627 configure___ start_files=START_FILES
2628
2629 #ifdef ORDINARY_LINK
2630 configure___ ordinary_link=yes
2631 #else
2632 configure___ ordinary_link=no
2633 #endif
2634
2635 #ifdef SYSTEM_MALLOC
2636 configure___ system_malloc=yes
2637 #else
2638 configure___ system_malloc=no
2639 #endif
2640
2641 #ifdef TERMINFO
2642 configure___ have_terminfo=yes
2643 #else
2644 configure___ have_terminfo=no
2645 #endif
2646
2647 #ifdef MAIL_USE_FLOCK
2648 configure___ mail_use_flock=yes
2649 #else
2650 configure___ mail_use_flock=no
2651 #endif
2652
2653 #ifdef MAIL_USE_LOCKF
2654 configure___ mail_use_lockf=yes
2655 #else
2656 configure___ mail_use_lockf=no
2657 #endif
2658
2659 #ifdef MAIL_USE_LOCKING
2660 configure___ mail_use_locking=yes
2661 #else
2662 configure___ mail_use_locking=no
2663 #endif
2664
2665 #ifdef HAVE_WIN32_PROCESSES
2666 configure___ win32_processes=yes
2667 #else
2668 configure___ win32_processes=no
2669 #endif
2670
2671 EOF
2672
2673 CPP=`eval "echo $CPP $CPPFLAGS"`
2674 eval `$CPP -Isrc $tempcname \
2675         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2676
2677 rm $tempcname
2678
2679 if test "$pdump" = "yes"; then
2680   ordinary_link="yes"
2681   ld="${ordinary_ld}"
2682   start_files=
2683   libs_standard=
2684   unexec=
2685   lib_gcc=
2686 fi
2687
2688 test "$extra_verbose" = "yes" && \
2689   for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   ld_switch_machine ld_switch_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
2690
2691 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2692         mingw_include=`eval "dirname $mingw_include"` ;
2693         mingw_include="-I$mingw_include/../include/mingw32" ;
2694         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2695 esac
2696
2697 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2698
2699
2700 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2701
2702 if test "$__USLC__" = yes; then
2703   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2704 echo "configure:2705: checking for whether the -Kalloca compiler flag is needed" >&5
2705   need_kalloca=no
2706   cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709
2710 int main() {
2711 void *x = alloca(4);
2712 ; return 0; }
2713 EOF
2714 if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2715   rm -rf conftest*
2716   :
2717 else
2718   echo "configure: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   rm -rf conftest*
2721   
2722     xe_save_c_switch_system="$c_switch_system"
2723     c_switch_system="$c_switch_system -Kalloca"
2724     cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727
2728 int main() {
2729 void *x = alloca(4);
2730 ; return 0; }
2731 EOF
2732 if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733   rm -rf conftest*
2734    need_kalloca=yes 
2735 else
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738 fi
2739 rm -f conftest*
2740     c_switch_system="$xe_save_c_switch_system"
2741 fi
2742 rm -f conftest*
2743   echo "$ac_t""$need_kalloca" 1>&6
2744   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2745 fi
2746
2747 if test "$cflags_specified" = "no"; then
2748       if   test "$GCC" = "yes"; then
2749     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2750               elif test "$__SUNPRO_C" = "yes"; then
2751     case "$opsys" in
2752       sol2    ) CFLAGS="-v -xO4" ;;
2753       sunos4* ) CFLAGS="-xO2";;
2754     esac
2755   elif test "$__DECC" = "yes"; then
2756     CFLAGS="-O3"
2757   elif test "$CC" = "xlc"; then
2758     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2759     else
2760     CFLAGS="-O" ;  fi
2761 fi
2762
2763 if test "$GCC" = "yes"; then
2764 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2765 echo "configure:2766: checking for buggy gcc versions" >&5
2766 GCC_VERSION=`$CC --version`
2767 case `uname -s`:`uname -m`:$GCC_VERSION in
2768                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2769                         case "$CFLAGS" in
2770             *-O2*|*-O3*)
2771                 case "$CFLAGS" in
2772                     *-fno-schedule-insns*) ;;
2773                     *)
2774                         echo "$ac_t""yes" 1>&6
2775                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2776                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2777                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2778                         ;;
2779                 esac
2780                 ;;
2781         esac
2782         ;;
2783                     Linux:alpha:egcs-2.91.*)
2784         echo "$ac_t""yes" 1>&6
2785         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2786         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2787         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2788         ;;
2789     *:i*86*:2.7.2*)
2790         case "$CFLAGS" in
2791             *-O2*|*-O3*)
2792                 case "$GCC_VERSION" in
2793                     2.7.2)
2794                         case "$CFLAGS" in
2795                             *-fno-strength-reduce*) ;;
2796                             *)
2797                                 echo "$ac_t""yes" 1>&6
2798                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2799                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2800                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2801                                 ;;
2802                         esac
2803                         ;;
2804                 esac
2805                 case "$CFLAGS" in
2806                  *-fno-caller-saves*) ;;
2807                  *)
2808                     echo "$ac_t""yes" 1>&6
2809                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2810                     echo "configure: warning: -fno-caller-saves." 1>&2
2811                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2812                     ;;
2813                 esac
2814                 ;;
2815         esac
2816         ;;
2817 esac
2818 echo "$ac_t""no" 1>&6
2819 fi
2820
2821
2822 if test "$GCC" = "yes"; then
2823   set x $ld_switch_system; shift; ld_switch_system=""
2824   while test -n "$1"; do
2825     case $1 in
2826       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2827       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2828       -Xlinker* ) ;;
2829       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2830     esac
2831     shift
2832   done
2833 fi
2834
2835 if test "$GCC" = "yes"; then
2836   set x $ld_switch_machine; shift; ld_switch_machine=""
2837   while test -n "$1"; do
2838     case $1 in
2839       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2840       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2841       -Xlinker* ) ;;
2842       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2843     esac
2844     shift
2845   done
2846 fi
2847
2848 if test "$GCC" = "yes"; then
2849   set x $LDFLAGS; shift; LDFLAGS=""
2850   while test -n "$1"; do
2851     case $1 in
2852       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2853       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2854       -Xlinker* ) ;;
2855       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2856     esac
2857     shift
2858   done
2859 fi
2860
2861 if test "$GCC" = "yes"; then
2862   set x $ld_call_shared; shift; ld_call_shared=""
2863   while test -n "$1"; do
2864     case $1 in
2865       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2866       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2867       -Xlinker* ) ;;
2868       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2869     esac
2870     shift
2871   done
2872 fi
2873
2874 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2875    echo "    xemacs will be linked with \"$objects_machine\""
2876  fi
2877 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2878    echo "    xemacs will be linked with \"$objects_system\""
2879  fi
2880 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2881    echo "    xemacs will be linked with \"$unexec\""
2882  fi
2883 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2884    echo "    xemacs will be linked with \"dumper.o\""
2885  fi
2886
2887 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2888 echo "configure:2889: checking for dynodump" >&5
2889 if test "$unexec" != "unexsol2.o"; then
2890   echo "$ac_t""no" 1>&6
2891 else
2892   echo "$ac_t""yes" 1>&6
2893   { test "$extra_verbose" = "yes" && cat << \EOF
2894     Defining DYNODUMP
2895 EOF
2896 cat >> confdefs.h <<\EOF
2897 #define DYNODUMP 1
2898 EOF
2899 }
2900
2901   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2902   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2903   case "$machine" in
2904     sparc   ) dynodump_arch=sparc ;;
2905     *86*    ) dynodump_arch=i386  ;;
2906     powerpc ) dynodump_arch=ppc   ;;
2907   esac
2908     test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
2909 fi
2910
2911
2912 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2913
2914 if test "$unexec" = "unexaix.o"; then
2915   if   test "$dynamic" = "no"; then
2916   start_flags="-Wl,-bnso,-bnodelcsect"
2917   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2918   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2919     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2920   done
2921   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2922     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2923   done
2924   
2925 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2926 echo "configure:2927: checking for terminateAndUnload in -lC" >&5
2927 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2928
2929 xe_check_libs=" -lC "
2930 cat > conftest.$ac_ext <<EOF
2931 #line 2932 "configure"
2932 #include "confdefs.h"
2933 /* Override any gcc2 internal prototype to avoid an error.  */
2934 /* We use char because int might match the return type of a gcc2
2935     builtin and then its argument prototype would still apply.  */
2936 char terminateAndUnload();
2937
2938 int main() {
2939 terminateAndUnload()
2940 ; return 0; }
2941 EOF
2942 if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2943   rm -rf conftest*
2944   eval "ac_cv_lib_$ac_lib_var=yes"
2945 else
2946   echo "configure: failed program was:" >&5
2947   cat conftest.$ac_ext >&5
2948   rm -rf conftest*
2949   eval "ac_cv_lib_$ac_lib_var=no"
2950 fi
2951 rm -f conftest*
2952 xe_check_libs=""
2953
2954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2955   echo "$ac_t""yes" 1>&6
2956   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961
2962   fi
2963 elif test -n "$ld_text_start_addr"; then
2964   start_flags="-T $ld_text_start_addr -e __start"
2965 fi
2966
2967
2968
2969
2970 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2971  test -z "$linker" &&  linker='$(CC) -nostdlib'
2972  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2973 fi
2974 test "$GCC" != "yes" && lib_gcc=
2975
2976
2977
2978
2979
2980 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2981 if test -n "$site_libraries"; then
2982   for arg in $site_libraries; do
2983     case "$arg" in
2984      -* ) ;;
2985      * ) test -d "$arg" || \
2986            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2987        arg="-L${arg}" ;;
2988     esac
2989     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2990   done
2991 fi
2992
2993 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2994 if test -n "$site_includes"; then
2995   for arg in $site_includes; do
2996     case "$arg" in
2997       -* ) ;;
2998       * ) test -d "$arg" || \
2999            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3000       arg="-I${arg}" ;;
3001     esac
3002     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3003   done
3004 fi
3005
3006 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3007 if test -n "$site_prefixes"; then
3008   for dir in $site_prefixes; do
3009     lib_dir="${dir}/lib"
3010     inc_dir="${dir}/include"
3011     if test ! -d "$dir"; then
3012       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3013     elif test ! -d "$lib_dir"; then
3014       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3015     else
3016       if test -d "$inc_dir"; then
3017         c_switch_site="$c_switch_site "-I$inc_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I$inc_dir"\" to \$c_switch_site"; fi
3018       fi
3019       ld_switch_site="$ld_switch_site "-L$lib_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi
3020     fi
3021   done
3022 fi
3023
3024
3025 for dir in "/usr/ccs/lib"; do
3026   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3027 done
3028
3029 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3030 if test -n "$site_runtime_libraries"; then
3031   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3032   export LD_RUN_PATH
3033 fi
3034
3035
3036
3037
3038
3039 if test -n "$add_runtime_path"; then :;
3040 elif test "$dynamic" = "no"; then add_runtime_path=no
3041 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3042 else case "$opsys" in
3043        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3044        * ) add_runtime_path=no ;;
3045      esac
3046 fi
3047
3048 if test "$add_runtime_path" = "yes"; then
3049       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3050 echo "configure:3051: checking "for runtime libraries flag"" >&5
3051   case "$opsys" in
3052     sol2 ) dash_r="-R" ;;
3053     decosf* | linux* | irix*) dash_r="-rpath " ;;
3054     *)
3055       dash_r=""
3056       for try_dash_r in "-R" "-R " "-rpath "; do
3057         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3058         
3059 if test "$GCC" = "yes"; then
3060   set x $xe_check_libs; shift; xe_check_libs=""
3061   while test -n "$1"; do
3062     case $1 in
3063       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3064       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3065       -Xlinker* ) ;;
3066       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3067     esac
3068     shift
3069   done
3070 fi
3071         cat > conftest.$ac_ext <<EOF
3072 #line 3073 "configure"
3073 #include "confdefs.h"
3074
3075 int main() {
3076
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080   rm -rf conftest*
3081   dash_r="$try_dash_r"
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085 fi
3086 rm -f conftest*
3087         xe_check_libs=""
3088         test -n "$dash_r" && break
3089       done ;;
3090   esac
3091   if test -n "$dash_r";
3092     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3093     else echo "$ac_t""NONE" 1>&6
3094   fi
3095 fi
3096
3097 xe_add_unique_runpath_dir='
3098   xe_add_p=yes
3099   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3100   done
3101   if test "$xe_add_p" = "yes"; then
3102     test -n "$runpath" && runpath="${runpath}:"
3103     runpath="${runpath}${xe_runpath_dir}"
3104     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3105   fi'
3106
3107
3108
3109
3110 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3111     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3112   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3113   
3114         runpath="" runpath_dirs=""
3115   if test -n "$LD_RUN_PATH"; then
3116     runpath="$LD_RUN_PATH"
3117   elif test "$GCC" = "yes"; then
3118         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3119     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3120     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3121     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3122       case "$arg" in P,* | -L* | -R* )
3123         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3124           {
3125 xe_runpath_dir="$dir"
3126   test "$xe_runpath_dir" != "/lib"     -a \
3127         "$xe_runpath_dir" != "/usr/lib" -a \
3128         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3129   eval "$xe_add_unique_runpath_dir"
3130 }
3131         done ;;
3132       esac
3133     done
3134     ld_switch_run="$ld_switch_run_save"
3135     rm -f conftest*
3136   else
3137         for arg in $ld_switch_site $ld_switch_x_site; do
3138       case "$arg" in -L*) {
3139 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3140   test "$xe_runpath_dir" != "/lib"     -a \
3141         "$xe_runpath_dir" != "/usr/lib" -a \
3142         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3143   eval "$xe_add_unique_runpath_dir"
3144 };; esac
3145     done
3146         if test "$opsys $need_motif" = "sol2 yes"; then
3147       xe_runpath_dir="/opt/SUNWdt/lib";
3148       eval "$xe_add_unique_runpath_dir";
3149     fi
3150   fi 
3151   if test -n "$runpath"; then
3152     ld_switch_run="${dash_r}${runpath}"
3153     
3154 if test "$GCC" = "yes"; then
3155   set x $ld_switch_run; shift; ld_switch_run=""
3156   while test -n "$1"; do
3157     case $1 in
3158       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3159       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3160       -Xlinker* ) ;;
3161       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3162     esac
3163     shift
3164   done
3165 fi
3166     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3167   fi
3168 fi
3169
3170
3171
3172
3173 GNU_MALLOC=yes
3174 if test "$with_dlmalloc" != "no"; then
3175         doug_lea_malloc=yes
3176 else
3177         doug_lea_malloc=no
3178 fi
3179 after_morecore_hook_exists=yes
3180 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3181 echo "configure:3182: checking for malloc_set_state" >&5
3182
3183 cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186 /* System header to define __stub macros and hopefully few prototypes,
3187     which can conflict with char malloc_set_state(); below.  */
3188 #include <assert.h>
3189 /* Override any gcc2 internal prototype to avoid an error.  */
3190 /* We use char because int might match the return type of a gcc2
3191     builtin and then its argument prototype would still apply.  */
3192 char malloc_set_state();
3193
3194 int main() {
3195
3196 /* The GNU C library defines this for functions which it implements
3197     to always fail with ENOSYS.  Some functions are actually named
3198     something starting with __ and the normal name is an alias.  */
3199 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3200 choke me
3201 #else
3202 malloc_set_state();
3203 #endif
3204
3205 ; return 0; }
3206 EOF
3207 if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3208   rm -rf conftest*
3209   eval "ac_cv_func_malloc_set_state=yes"
3210 else
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   eval "ac_cv_func_malloc_set_state=no"
3215 fi
3216 rm -f conftest*
3217
3218 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3219   echo "$ac_t""yes" 1>&6
3220   :
3221 else
3222   echo "$ac_t""no" 1>&6
3223 doug_lea_malloc=no
3224 fi
3225
3226 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3227 echo "configure:3228: checking whether __after_morecore_hook exists" >&5
3228 cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231 extern void (* __after_morecore_hook)();
3232 int main() {
3233 __after_morecore_hook = 0
3234 ; return 0; }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3237   rm -rf conftest*
3238   echo "$ac_t""yes" 1>&6
3239 else
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   echo "$ac_t""no" 1>&6
3244    after_morecore_hook_exists=no
3245 fi
3246 rm -f conftest*
3247 if test "$system_malloc" = "yes" ; then
3248   GNU_MALLOC=no
3249   GNU_MALLOC_reason="
3250     - The GNU allocators don't work with this system configuration."
3251 elif test "$with_system_malloc" = "yes" ; then
3252   GNU_MALLOC=no
3253   GNU_MALLOC_reason="
3254     - User chose not to use GNU allocators."
3255 elif test "$with_debug_malloc" = "yes" ; then
3256   GNU_MALLOC=no
3257   GNU_MALLOC_reason="
3258     - User chose to use Debugging Malloc."
3259 fi
3260
3261 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3262   GNU_MALLOC_reason="
3263     - Using Doug Lea's new malloc from the GNU C Library."
3264   { test "$extra_verbose" = "yes" && cat << \EOF
3265     Defining DOUG_LEA_MALLOC
3266 EOF
3267 cat >> confdefs.h <<\EOF
3268 #define DOUG_LEA_MALLOC 1
3269 EOF
3270 }
3271
3272   if test "$after_morecore_hook_exists" = "no" ; then
3273     GNU_MALLOC_reason="
3274     - Using Doug Lea's new malloc from the Linux C Library."
3275     { test "$extra_verbose" = "yes" && cat << \EOF
3276     Defining _NO_MALLOC_WARNING_
3277 EOF
3278 cat >> confdefs.h <<\EOF
3279 #define _NO_MALLOC_WARNING_ 1
3280 EOF
3281 }
3282
3283   fi
3284 fi
3285
3286
3287
3288
3289 # Extract the first word of "ranlib", so it can be a program name with args.
3290 set dummy ranlib; ac_word=$2
3291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3292 echo "configure:3293: checking for $ac_word" >&5
3293
3294 if test -n "$RANLIB"; then
3295   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3296 else
3297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3298   ac_dummy="$PATH"
3299   for ac_dir in $ac_dummy; do
3300     test -z "$ac_dir" && ac_dir=.
3301     if test -f $ac_dir/$ac_word; then
3302       ac_cv_prog_RANLIB="ranlib"
3303       break
3304     fi
3305   done
3306   IFS="$ac_save_ifs"
3307   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3308 fi
3309 RANLIB="$ac_cv_prog_RANLIB"
3310 if test -n "$RANLIB"; then
3311   echo "$ac_t""$RANLIB" 1>&6
3312 else
3313   echo "$ac_t""no" 1>&6
3314 fi
3315
3316 ac_aux_dir=
3317 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3318   if test -f $ac_dir/install-sh; then
3319     ac_aux_dir=$ac_dir
3320     ac_install_sh="$ac_aux_dir/install-sh -c"
3321     break
3322   elif test -f $ac_dir/install.sh; then
3323     ac_aux_dir=$ac_dir
3324     ac_install_sh="$ac_aux_dir/install.sh -c"
3325     break
3326   fi
3327 done
3328 if test -z "$ac_aux_dir"; then
3329   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3330 fi
3331 ac_config_guess=$ac_aux_dir/config.guess
3332 ac_config_sub=$ac_aux_dir/config.sub
3333 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3334
3335 # Find a good install program.  We prefer a C program (faster),
3336 # so one script is as good as another.  But avoid the broken or
3337 # incompatible versions:
3338 # SysV /etc/install, /usr/sbin/install
3339 # SunOS /usr/etc/install
3340 # IRIX /sbin/install
3341 # AIX /bin/install
3342 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3343 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3344 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3345 # ./install, which can be erroneously created by make from ./install.sh.
3346 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3347 echo "configure:3348: checking for a BSD compatible install" >&5
3348 if test -z "$INSTALL"; then
3349
3350   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3351   for ac_dir in $PATH; do
3352     # Account for people who put trailing slashes in PATH elements.
3353     case "$ac_dir/" in
3354     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3355     *)
3356       # OSF1 and SCO ODT 3.0 have their own names for install.
3357       # Don't use installbsd from OSF since it installs stuff as root
3358       # by default.
3359       for ac_prog in ginstall scoinst install; do
3360         if test -f $ac_dir/$ac_prog; then
3361           if test $ac_prog = install &&
3362             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3363             # AIX install.  It has an incompatible calling convention.
3364             :
3365           else
3366             ac_cv_path_install="$ac_dir/$ac_prog -c"
3367             break 2
3368           fi
3369         fi
3370       done
3371       ;;
3372     esac
3373   done
3374   IFS="$ac_save_IFS"
3375
3376   if test "${ac_cv_path_install+set}" = set; then
3377     INSTALL="$ac_cv_path_install"
3378   else
3379     # As a last resort, use the slow shell script.  We don't cache a
3380     # path for INSTALL within a source directory, because that will
3381     # break other packages using the cache if that directory is
3382     # removed, or if the path is relative.
3383     INSTALL="$ac_install_sh"
3384   fi
3385 fi
3386 echo "$ac_t""$INSTALL" 1>&6
3387
3388 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3389 # It thinks the first close brace ends the variable substitution.
3390 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3391
3392 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3393
3394 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3395
3396 for ac_prog in 'bison -y' byacc
3397 do
3398 # Extract the first word of "$ac_prog", so it can be a program name with args.
3399 set dummy $ac_prog; ac_word=$2
3400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3401 echo "configure:3402: checking for $ac_word" >&5
3402
3403 if test -n "$YACC"; then
3404   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH"
3408   for ac_dir in $ac_dummy; do
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_prog_YACC="$ac_prog"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 fi
3417 YACC="$ac_cv_prog_YACC"
3418 if test -n "$YACC"; then
3419   echo "$ac_t""$YACC" 1>&6
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423
3424 test -n "$YACC" && break
3425 done
3426 test -n "$YACC" || YACC="yacc"
3427
3428
3429 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h   utime.h 
3430 do
3431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3433 echo "configure:3434: checking for $ac_hdr" >&5
3434
3435 cat > conftest.$ac_ext <<EOF
3436 #line 3437 "configure"
3437 #include "confdefs.h"
3438 #include <$ac_hdr>
3439 EOF
3440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3441 { (eval echo configure:3442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3443 if test -z "$ac_err"; then
3444   rm -rf conftest*
3445   eval "ac_cv_header_$ac_safe=yes"
3446 else
3447   echo "$ac_err" >&5
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450   rm -rf conftest*
3451   eval "ac_cv_header_$ac_safe=no"
3452 fi
3453 rm -f conftest*
3454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3455   echo "$ac_t""yes" 1>&6
3456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3457   { test "$extra_verbose" = "yes" && cat << EOF
3458     Defining $ac_tr_hdr
3459 EOF
3460 cat >> confdefs.h <<EOF
3461 #define $ac_tr_hdr 1
3462 EOF
3463 }
3464  
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468 done
3469
3470 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3471 echo "configure:3472: checking for sys/wait.h that is POSIX.1 compatible" >&5
3472
3473 cat > conftest.$ac_ext <<EOF
3474 #line 3475 "configure"
3475 #include "confdefs.h"
3476 #include <sys/types.h>
3477 #include <sys/wait.h>
3478 #ifndef WEXITSTATUS
3479 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3480 #endif
3481 #ifndef WIFEXITED
3482 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3483 #endif
3484 int main() {
3485 int s;
3486 wait (&s);
3487 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3488 ; return 0; }
3489 EOF
3490 if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3491   rm -rf conftest*
3492   ac_cv_header_sys_wait_h=yes
3493 else
3494   echo "configure: failed program was:" >&5
3495   cat conftest.$ac_ext >&5
3496   rm -rf conftest*
3497   ac_cv_header_sys_wait_h=no
3498 fi
3499 rm -f conftest*
3500
3501 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3502 if test $ac_cv_header_sys_wait_h = yes; then
3503   { test "$extra_verbose" = "yes" && cat << \EOF
3504     Defining HAVE_SYS_WAIT_H
3505 EOF
3506 cat >> confdefs.h <<\EOF
3507 #define HAVE_SYS_WAIT_H 1
3508 EOF
3509 }
3510
3511 fi
3512
3513 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3514 echo "configure:3515: checking for ANSI C header files" >&5
3515
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 #include <stdlib.h>
3520 #include <stdarg.h>
3521 #include <string.h>
3522 #include <float.h>
3523 EOF
3524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3525 { (eval echo configure:3526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3527 if test -z "$ac_err"; then
3528   rm -rf conftest*
3529   ac_cv_header_stdc=yes
3530 else
3531   echo "$ac_err" >&5
3532   echo "configure: failed program was:" >&5
3533   cat conftest.$ac_ext >&5
3534   rm -rf conftest*
3535   ac_cv_header_stdc=no
3536 fi
3537 rm -f conftest*
3538
3539 if test $ac_cv_header_stdc = yes; then
3540   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 #include <string.h>
3545 EOF
3546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3547   egrep "memchr" >/dev/null 2>&1; then
3548   :
3549 else
3550   rm -rf conftest*
3551   ac_cv_header_stdc=no
3552 fi
3553 rm -f conftest*
3554
3555 fi
3556
3557 if test $ac_cv_header_stdc = yes; then
3558   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 #include <stdlib.h>
3563 EOF
3564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3565   egrep "free" >/dev/null 2>&1; then
3566   :
3567 else
3568   rm -rf conftest*
3569   ac_cv_header_stdc=no
3570 fi
3571 rm -f conftest*
3572
3573 fi
3574
3575 if test $ac_cv_header_stdc = yes; then
3576   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3577 cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <ctype.h>
3581 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3582 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3583 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3584 int main () { int i; for (i = 0; i < 256; i++)
3585 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3586 exit (0); }
3587
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3590 then
3591   :
3592 else
3593   conftest_rc="$?"
3594   echo "configure: failed program was:" >&5
3595   cat conftest.$ac_ext >&5
3596   rm -fr conftest*
3597   ac_cv_header_stdc=no
3598 fi
3599 rm -fr conftest*
3600 fi
3601
3602 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3603 if test $ac_cv_header_stdc = yes; then
3604   { test "$extra_verbose" = "yes" && cat << \EOF
3605     Defining STDC_HEADERS
3606 EOF
3607 cat >> confdefs.h <<\EOF
3608 #define STDC_HEADERS 1
3609 EOF
3610 }
3611
3612 fi
3613
3614 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3615 echo "configure:3616: checking whether time.h and sys/time.h may both be included" >&5
3616
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <sys/types.h>
3621 #include <sys/time.h>
3622 #include <time.h>
3623 int main() {
3624 struct tm *tp;
3625 ; return 0; }
3626 EOF
3627 if { (eval echo configure:3628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3628   rm -rf conftest*
3629   ac_cv_header_time=yes
3630 else
3631   echo "configure: failed program was:" >&5
3632   cat conftest.$ac_ext >&5
3633   rm -rf conftest*
3634   ac_cv_header_time=no
3635 fi
3636 rm -f conftest*
3637
3638 echo "$ac_t""$ac_cv_header_time" 1>&6
3639 if test $ac_cv_header_time = yes; then
3640   { test "$extra_verbose" = "yes" && cat << \EOF
3641     Defining TIME_WITH_SYS_TIME
3642 EOF
3643 cat >> confdefs.h <<\EOF
3644 #define TIME_WITH_SYS_TIME 1
3645 EOF
3646 }
3647
3648 fi
3649
3650 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3651 echo "configure:3652: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3652
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <sys/types.h>
3657 #include <signal.h>
3658 /* NetBSD declares sys_siglist in unistd.h.  */
3659 #ifdef HAVE_UNISTD_H
3660 #include <unistd.h>
3661 #endif
3662 int main() {
3663 char *msg = *(sys_siglist + 1);
3664 ; return 0; }
3665 EOF
3666 if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3667   rm -rf conftest*
3668   ac_cv_decl_sys_siglist=yes
3669 else
3670   echo "configure: failed program was:" >&5
3671   cat conftest.$ac_ext >&5
3672   rm -rf conftest*
3673   ac_cv_decl_sys_siglist=no
3674 fi
3675 rm -f conftest*
3676
3677 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3678 if test $ac_cv_decl_sys_siglist = yes; then
3679   { test "$extra_verbose" = "yes" && cat << \EOF
3680     Defining SYS_SIGLIST_DECLARED
3681 EOF
3682 cat >> confdefs.h <<\EOF
3683 #define SYS_SIGLIST_DECLARED 1
3684 EOF
3685 }
3686
3687 fi
3688
3689
3690 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3691 echo "configure:3692: checking for struct utimbuf" >&5
3692 cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 #ifdef TIME_WITH_SYS_TIME
3696 #include <sys/time.h>
3697 #include <time.h>
3698 #else
3699 #ifdef HAVE_SYS_TIME_H
3700 #include <sys/time.h>
3701 #else
3702 #include <time.h>
3703 #endif
3704 #endif
3705 #ifdef HAVE_UTIME_H
3706 #include <utime.h>
3707 #endif
3708 int main() {
3709 static struct utimbuf x; x.actime = x.modtime;
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   rm -rf conftest*
3714   echo "$ac_t""yes" 1>&6
3715    { test "$extra_verbose" = "yes" && cat << \EOF
3716     Defining HAVE_STRUCT_UTIMBUF
3717 EOF
3718 cat >> confdefs.h <<\EOF
3719 #define HAVE_STRUCT_UTIMBUF 1
3720 EOF
3721 }
3722
3723 else
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   echo "$ac_t""no" 1>&6
3728 fi
3729 rm -f conftest*
3730
3731 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3732 echo "configure:3733: checking return type of signal handlers" >&5
3733
3734 cat > conftest.$ac_ext <<EOF
3735 #line 3736 "configure"
3736 #include "confdefs.h"
3737 #include <sys/types.h>
3738 #include <signal.h>
3739 #ifdef signal
3740 #undef signal
3741 #endif
3742 #ifdef __cplusplus
3743 extern "C" void (*signal (int, void (*)(int)))(int);
3744 #else
3745 void (*signal ()) ();
3746 #endif
3747
3748 int main() {
3749 int i;
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   ac_cv_type_signal=void
3755 else
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   ac_cv_type_signal=int
3760 fi
3761 rm -f conftest*
3762
3763 echo "$ac_t""$ac_cv_type_signal" 1>&6
3764 { test "$extra_verbose" = "yes" && cat << EOF
3765     Defining RETSIGTYPE = $ac_cv_type_signal
3766 EOF
3767 cat >> confdefs.h <<EOF
3768 #define RETSIGTYPE $ac_cv_type_signal
3769 EOF
3770 }
3771
3772
3773 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3774 echo "configure:3775: checking for size_t" >&5
3775
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <sys/types.h>
3780 #if STDC_HEADERS
3781 #include <stdlib.h>
3782 #include <stddef.h>
3783 #endif
3784 EOF
3785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3786   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3787   rm -rf conftest*
3788   ac_cv_type_size_t=yes
3789 else
3790   rm -rf conftest*
3791   ac_cv_type_size_t=no
3792 fi
3793 rm -f conftest*
3794
3795 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3796 if test $ac_cv_type_size_t = no; then
3797   { test "$extra_verbose" = "yes" && cat << \EOF
3798     Defining size_t = unsigned
3799 EOF
3800 cat >> confdefs.h <<\EOF
3801 #define size_t unsigned
3802 EOF
3803 }
3804
3805 fi
3806
3807 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3808 echo "configure:3809: checking for pid_t" >&5
3809
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 #include <sys/types.h>
3814 #if STDC_HEADERS
3815 #include <stdlib.h>
3816 #include <stddef.h>
3817 #endif
3818 EOF
3819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3820   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3821   rm -rf conftest*
3822   ac_cv_type_pid_t=yes
3823 else
3824   rm -rf conftest*
3825   ac_cv_type_pid_t=no
3826 fi
3827 rm -f conftest*
3828
3829 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3830 if test $ac_cv_type_pid_t = no; then
3831   { test "$extra_verbose" = "yes" && cat << \EOF
3832     Defining pid_t = int
3833 EOF
3834 cat >> confdefs.h <<\EOF
3835 #define pid_t int
3836 EOF
3837 }
3838
3839 fi
3840
3841 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3842 echo "configure:3843: checking for uid_t in sys/types.h" >&5
3843
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <sys/types.h>
3848 EOF
3849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3850   egrep "uid_t" >/dev/null 2>&1; then
3851   rm -rf conftest*
3852   ac_cv_type_uid_t=yes
3853 else
3854   rm -rf conftest*
3855   ac_cv_type_uid_t=no
3856 fi
3857 rm -f conftest*
3858
3859
3860 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3861 if test $ac_cv_type_uid_t = no; then
3862   { test "$extra_verbose" = "yes" && cat << \EOF
3863     Defining uid_t = int
3864 EOF
3865 cat >> confdefs.h <<\EOF
3866 #define uid_t int
3867 EOF
3868 }
3869
3870   { test "$extra_verbose" = "yes" && cat << \EOF
3871     Defining gid_t = int
3872 EOF
3873 cat >> confdefs.h <<\EOF
3874 #define gid_t int
3875 EOF
3876 }
3877
3878 fi
3879
3880 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3881 echo "configure:3882: checking for mode_t" >&5
3882
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <sys/types.h>
3887 #if STDC_HEADERS
3888 #include <stdlib.h>
3889 #include <stddef.h>
3890 #endif
3891 EOF
3892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3893   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3894   rm -rf conftest*
3895   ac_cv_type_mode_t=yes
3896 else
3897   rm -rf conftest*
3898   ac_cv_type_mode_t=no
3899 fi
3900 rm -f conftest*
3901
3902 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3903 if test $ac_cv_type_mode_t = no; then
3904   { test "$extra_verbose" = "yes" && cat << \EOF
3905     Defining mode_t = int
3906 EOF
3907 cat >> confdefs.h <<\EOF
3908 #define mode_t int
3909 EOF
3910 }
3911
3912 fi
3913
3914 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3915 echo "configure:3916: checking for off_t" >&5
3916
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <sys/types.h>
3921 #if STDC_HEADERS
3922 #include <stdlib.h>
3923 #include <stddef.h>
3924 #endif
3925 EOF
3926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3927   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3928   rm -rf conftest*
3929   ac_cv_type_off_t=yes
3930 else
3931   rm -rf conftest*
3932   ac_cv_type_off_t=no
3933 fi
3934 rm -f conftest*
3935
3936 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3937 if test $ac_cv_type_off_t = no; then
3938   { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining off_t = long
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define off_t long
3943 EOF
3944 }
3945
3946 fi
3947
3948 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3949 echo "configure:3950: checking for ssize_t" >&5
3950
3951 cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <sys/types.h>
3955 #if STDC_HEADERS
3956 #include <stdlib.h>
3957 #include <stddef.h>
3958 #endif
3959 EOF
3960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3962   rm -rf conftest*
3963   ac_cv_type_ssize_t=yes
3964 else
3965   rm -rf conftest*
3966   ac_cv_type_ssize_t=no
3967 fi
3968 rm -f conftest*
3969
3970 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3971 if test $ac_cv_type_ssize_t = no; then
3972   { test "$extra_verbose" = "yes" && cat << \EOF
3973     Defining ssize_t = int
3974 EOF
3975 cat >> confdefs.h <<\EOF
3976 #define ssize_t int
3977 EOF
3978 }
3979
3980 fi
3981
3982
3983 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3984 echo "configure:3985: checking for socklen_t" >&5
3985 cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 #include <sys/socket.h>
3989 socklen_t x;
3990
3991 int main() {
3992
3993 ; return 0; }
3994 EOF
3995 if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3996   rm -rf conftest*
3997   echo "$ac_t""yes" 1>&6
3998 else
3999   echo "configure: failed program was:" >&5
4000   cat conftest.$ac_ext >&5
4001   rm -rf conftest*
4002   
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <sys/socket.h>
4007 int accept (int, struct sockaddr *, size_t *);
4008
4009 int main() {
4010
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014   rm -rf conftest*
4015   
4016 echo "$ac_t""size_t" 1>&6
4017 { test "$extra_verbose" = "yes" && cat << \EOF
4018     Defining socklen_t = size_t
4019 EOF
4020 cat >> confdefs.h <<\EOF
4021 #define socklen_t size_t
4022 EOF
4023 }
4024
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   
4030 echo "$ac_t""int" 1>&6
4031 { test "$extra_verbose" = "yes" && cat << \EOF
4032     Defining socklen_t = int
4033 EOF
4034 cat >> confdefs.h <<\EOF
4035 #define socklen_t int
4036 EOF
4037 }
4038
4039 fi
4040 rm -f conftest*
4041 fi
4042 rm -f conftest*
4043
4044 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4045 echo "configure:4046: checking for struct timeval" >&5
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #ifdef TIME_WITH_SYS_TIME
4050 #include <sys/time.h>
4051 #include <time.h>
4052 #else
4053 #ifdef HAVE_SYS_TIME_H
4054 #include <sys/time.h>
4055 #else
4056 #include <time.h>
4057 #endif
4058 #endif
4059 int main() {
4060 static struct timeval x; x.tv_sec = x.tv_usec;
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4064   rm -rf conftest*
4065   echo "$ac_t""yes" 1>&6
4066   HAVE_TIMEVAL=yes
4067   { test "$extra_verbose" = "yes" && cat << \EOF
4068     Defining HAVE_TIMEVAL
4069 EOF
4070 cat >> confdefs.h <<\EOF
4071 #define HAVE_TIMEVAL 1
4072 EOF
4073 }
4074
4075 else
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   echo "$ac_t""no" 1>&6
4080    HAVE_TIMEVAL=no
4081 fi
4082 rm -f conftest*
4083
4084 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4085 echo "configure:4086: checking whether struct tm is in sys/time.h or time.h" >&5
4086
4087 cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 #include <sys/types.h>
4091 #include <time.h>
4092 int main() {
4093 struct tm *tp; tp->tm_sec;
4094 ; return 0; }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4097   rm -rf conftest*
4098   ac_cv_struct_tm=time.h
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -rf conftest*
4103   ac_cv_struct_tm=sys/time.h
4104 fi
4105 rm -f conftest*
4106
4107 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4108 if test $ac_cv_struct_tm = sys/time.h; then
4109   { test "$extra_verbose" = "yes" && cat << \EOF
4110     Defining TM_IN_SYS_TIME
4111 EOF
4112 cat >> confdefs.h <<\EOF
4113 #define TM_IN_SYS_TIME 1
4114 EOF
4115 }
4116
4117 fi
4118
4119 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4120 echo "configure:4121: checking for tm_zone in struct tm" >&5
4121
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4124 "configure"
4124 #include "confdefs.h"
4125 #include <sys/types.h>
4126 #include <$ac_cv_struct_tm>
4127 int main() {
4128 struct tm tm; tm.tm_zone;
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   rm -rf conftest*
4133   ac_cv_struct_tm_zone=yes
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   ac_cv_struct_tm_zone=no
4139 fi
4140 rm -f conftest*
4141
4142 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4143 if test "$ac_cv_struct_tm_zone" = yes; then
4144   { test "$extra_verbose" = "yes" && cat << \EOF
4145     Defining HAVE_TM_ZONE
4146 EOF
4147 cat >> confdefs.h <<\EOF
4148 #define HAVE_TM_ZONE 1
4149 EOF
4150 }
4151
4152 else
4153   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4154 echo "configure:4155: checking for tzname" >&5
4155
4156 cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 #include <time.h>
4160 #ifndef tzname /* For SGI.  */
4161 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4162 #endif
4163 int main() {
4164 atoi(*tzname);
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4168   rm -rf conftest*
4169   ac_cv_var_tzname=yes
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   ac_cv_var_tzname=no
4175 fi
4176 rm -f conftest*
4177
4178 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4179   if test $ac_cv_var_tzname = yes; then
4180     { test "$extra_verbose" = "yes" && cat << \EOF
4181     Defining HAVE_TZNAME
4182 EOF
4183 cat >> confdefs.h <<\EOF
4184 #define HAVE_TZNAME 1
4185 EOF
4186 }
4187
4188   fi
4189 fi
4190
4191
4192 echo $ac_n "checking for working const""... $ac_c" 1>&6
4193 echo "configure:4194: checking for working const" >&5
4194
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198
4199 int main() {
4200
4201 /* Ultrix mips cc rejects this.  */
4202 typedef int charset[2]; const charset x;
4203 /* SunOS 4.1.1 cc rejects this.  */
4204 char const *const *ccp;
4205 char **p;
4206 /* NEC SVR4.0.2 mips cc rejects this.  */
4207 struct point {int x, y;};
4208 static struct point const zero = {0,0};
4209 /* AIX XL C 1.02.0.0 rejects this.
4210    It does not let you subtract one const X* pointer from another in an arm
4211    of an if-expression whose if-part is not a constant expression */
4212 const char *g = "string";
4213 ccp = &g + (g ? g-g : 0);
4214 /* HPUX 7.0 cc rejects these. */
4215 ++ccp;
4216 p = (char**) ccp;
4217 ccp = (char const *const *) p;
4218 { /* SCO 3.2v4 cc rejects this.  */
4219   char *t;
4220   char const *s = 0 ? (char *) 0 : (char const *) 0;
4221
4222   *t++ = 0;
4223 }
4224 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4225   int x[] = {25, 17};
4226   const int *foo = &x[0];
4227   ++foo;
4228 }
4229 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4230   typedef const int *iptr;
4231   iptr p = 0;
4232   ++p;
4233 }
4234 { /* AIX XL C 1.02.0.0 rejects this saying
4235      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4236   struct s { int j; const int *ap[3]; };
4237   struct s *b; b->j = 5;
4238 }
4239 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4240   const int foo = 10;
4241 }
4242
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4246   rm -rf conftest*
4247   ac_cv_c_const=yes
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   ac_cv_c_const=no
4253 fi
4254 rm -f conftest*
4255
4256 echo "$ac_t""$ac_cv_c_const" 1>&6
4257 if test $ac_cv_c_const = no; then
4258   { test "$extra_verbose" = "yes" && cat << \EOF
4259     Defining const = 
4260 EOF
4261 cat >> confdefs.h <<\EOF
4262 #define const 
4263 EOF
4264 }
4265
4266 fi
4267
4268
4269 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4270 echo "configure:4271: checking whether ${MAKE-make} sets \${MAKE}" >&5
4271 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4272
4273 cat > conftestmake <<\EOF
4274 all:
4275         @echo 'ac_maketemp="${MAKE}"'
4276 EOF
4277 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4278 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4279 if test -n "$ac_maketemp"; then
4280   eval ac_cv_prog_make_${ac_make}_set=yes
4281 else
4282   eval ac_cv_prog_make_${ac_make}_set=no
4283 fi
4284 rm -f conftestmake
4285 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4286   echo "$ac_t""yes" 1>&6
4287   SET_MAKE=
4288 else
4289   echo "$ac_t""no" 1>&6
4290   SET_MAKE="MAKE=${MAKE-make}"
4291 fi
4292
4293
4294 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4295 echo "configure:4296: checking whether byte ordering is bigendian" >&5
4296
4297 ac_cv_c_bigendian=unknown
4298 # See if sys/param.h defines the BYTE_ORDER macro.
4299 cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 #include <sys/types.h>
4303 #include <sys/param.h>
4304 int main() {
4305
4306 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4307  bogus endian macros
4308 #endif
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4312   rm -rf conftest*
4313   # It does; now see whether it defined to BIG_ENDIAN or not.
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <sys/types.h>
4318 #include <sys/param.h>
4319 int main() {
4320
4321 #if BYTE_ORDER != BIG_ENDIAN
4322  not big endian
4323 #endif
4324 ; return 0; }
4325 EOF
4326 if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4327   rm -rf conftest*
4328   ac_cv_c_bigendian=yes
4329 else
4330   echo "configure: failed program was:" >&5
4331   cat conftest.$ac_ext >&5
4332   rm -rf conftest*
4333   ac_cv_c_bigendian=no
4334 fi
4335 rm -f conftest*
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339 fi
4340 rm -f conftest*
4341 if test $ac_cv_c_bigendian = unknown; then
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 main () {
4346   /* Are we little or big endian?  From Harbison&Steele.  */
4347   union
4348   {
4349     long l;
4350     char c[sizeof (long)];
4351   } u;
4352   u.l = 1;
4353   exit (u.c[sizeof (long) - 1] == 1);
4354 }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4357 then
4358   ac_cv_c_bigendian=no
4359 else
4360   conftest_rc="$?"
4361   echo "configure: failed program was:" >&5
4362   cat conftest.$ac_ext >&5
4363   rm -fr conftest*
4364   ac_cv_c_bigendian=yes
4365 fi
4366 rm -fr conftest*
4367 fi
4368
4369 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4370 if test $ac_cv_c_bigendian = yes; then
4371   { test "$extra_verbose" = "yes" && cat << \EOF
4372     Defining WORDS_BIGENDIAN
4373 EOF
4374 cat >> confdefs.h <<\EOF
4375 #define WORDS_BIGENDIAN 1
4376 EOF
4377 }
4378
4379 fi
4380
4381
4382 echo $ac_n "checking size of short""... $ac_c" 1>&6
4383 echo "configure:4384: checking size of short" >&5
4384
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388 #include <stdio.h>
4389 #include <sys/types.h>
4390 main()
4391 {
4392   FILE *f=fopen("conftestval", "w");
4393   if (!f) exit(1);
4394   fprintf(f, "%d\n", sizeof(short));
4395   exit(0);
4396 }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4399 then
4400   ac_cv_sizeof_short=`cat conftestval`
4401 else
4402   conftest_rc="$?"
4403   echo "configure: failed program was:" >&5
4404   cat conftest.$ac_ext >&5
4405   rm -fr conftest*
4406   ac_cv_sizeof_short=0
4407 fi
4408 rm -fr conftest*
4409 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4410 { test "$extra_verbose" = "yes" && cat << EOF
4411     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4412 EOF
4413 cat >> confdefs.h <<EOF
4414 #define SIZEOF_SHORT $ac_cv_sizeof_short
4415 EOF
4416 }
4417
4418
4419 if test "$ac_cv_sizeof_short" = 0; then
4420   echo ""
4421   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4422   echo "*** PANIC *** Please examine config.log for compilation errors."
4423   exit 1
4424 fi
4425 echo $ac_n "checking size of int""... $ac_c" 1>&6
4426 echo "configure:4427: checking size of int" >&5
4427
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 #include <stdio.h>
4432 #include <sys/types.h>
4433 main()
4434 {
4435   FILE *f=fopen("conftestval", "w");
4436   if (!f) exit(1);
4437   fprintf(f, "%d\n", sizeof(int));
4438   exit(0);
4439 }
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4442 then
4443   ac_cv_sizeof_int=`cat conftestval`
4444 else
4445   conftest_rc="$?"
4446   echo "configure: failed program was:" >&5
4447   cat conftest.$ac_ext >&5
4448   rm -fr conftest*
4449   ac_cv_sizeof_int=0
4450 fi
4451 rm -fr conftest*
4452 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4453 { test "$extra_verbose" = "yes" && cat << EOF
4454     Defining SIZEOF_INT = $ac_cv_sizeof_int
4455 EOF
4456 cat >> confdefs.h <<EOF
4457 #define SIZEOF_INT $ac_cv_sizeof_int
4458 EOF
4459 }
4460
4461
4462 echo $ac_n "checking size of long""... $ac_c" 1>&6
4463 echo "configure:4464: checking size of long" >&5
4464
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468 #include <stdio.h>
4469 #include <sys/types.h>
4470 main()
4471 {
4472   FILE *f=fopen("conftestval", "w");
4473   if (!f) exit(1);
4474   fprintf(f, "%d\n", sizeof(long));
4475   exit(0);
4476 }
4477 EOF
4478 if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4479 then
4480   ac_cv_sizeof_long=`cat conftestval`
4481 else
4482   conftest_rc="$?"
4483   echo "configure: failed program was:" >&5
4484   cat conftest.$ac_ext >&5
4485   rm -fr conftest*
4486   ac_cv_sizeof_long=0
4487 fi
4488 rm -fr conftest*
4489 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4490 { test "$extra_verbose" = "yes" && cat << EOF
4491     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4492 EOF
4493 cat >> confdefs.h <<EOF
4494 #define SIZEOF_LONG $ac_cv_sizeof_long
4495 EOF
4496 }
4497
4498
4499 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4500 echo "configure:4501: checking size of long long" >&5
4501
4502 cat > conftest.$ac_ext <<EOF
4503 #line 4504 "configure"
4504 #include "confdefs.h"
4505 #include <stdio.h>
4506 #include <sys/types.h>
4507 main()
4508 {
4509   FILE *f=fopen("conftestval", "w");
4510   if (!f) exit(1);
4511   fprintf(f, "%d\n", sizeof(long long));
4512   exit(0);
4513 }
4514 EOF
4515 if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4516 then
4517   ac_cv_sizeof_long_long=`cat conftestval`
4518 else
4519   conftest_rc="$?"
4520   echo "configure: failed program was:" >&5
4521   cat conftest.$ac_ext >&5
4522   rm -fr conftest*
4523   ac_cv_sizeof_long_long=0
4524 fi
4525 rm -fr conftest*
4526 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4527 { test "$extra_verbose" = "yes" && cat << EOF
4528     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4529 EOF
4530 cat >> confdefs.h <<EOF
4531 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4532 EOF
4533 }
4534
4535
4536 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4537 echo "configure:4538: checking size of void *" >&5
4538
4539 cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542 #include <stdio.h>
4543 #include <sys/types.h>
4544 main()
4545 {
4546   FILE *f=fopen("conftestval", "w");
4547   if (!f) exit(1);
4548   fprintf(f, "%d\n", sizeof(void *));
4549   exit(0);
4550 }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4553 then
4554   ac_cv_sizeof_void_p=`cat conftestval`
4555 else
4556   conftest_rc="$?"
4557   echo "configure: failed program was:" >&5
4558   cat conftest.$ac_ext >&5
4559   rm -fr conftest*
4560   ac_cv_sizeof_void_p=0
4561 fi
4562 rm -fr conftest*
4563 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4564 { test "$extra_verbose" = "yes" && cat << EOF
4565     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4566 EOF
4567 cat >> confdefs.h <<EOF
4568 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4569 EOF
4570 }
4571
4572
4573
4574 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4575 echo "configure:4576: checking for long file names" >&5
4576
4577 ac_cv_sys_long_file_names=yes
4578 # Test for long file names in all the places we know might matter:
4579 #      .                the current directory, where building will happen
4580 #      $prefix/lib      where we will be installing things
4581 #      $exec_prefix/lib likewise
4582 # eval it to expand exec_prefix.
4583 #      $TMPDIR          if set, where it might want to write temporary files
4584 # if $TMPDIR is not set:
4585 #      /tmp             where it might want to write temporary files
4586 #      /var/tmp         likewise
4587 #      /usr/tmp         likewise
4588 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4589   ac_tmpdirs="$TMPDIR"
4590 else
4591   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4592 fi
4593 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4594   test -d $ac_dir || continue
4595   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4596   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4597   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4598   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4599   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4600     ac_cv_sys_long_file_names=no
4601     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4602     break
4603   fi
4604   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4605 done
4606
4607 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4608 if test $ac_cv_sys_long_file_names = yes; then
4609   { test "$extra_verbose" = "yes" && cat << \EOF
4610     Defining HAVE_LONG_FILE_NAMES
4611 EOF
4612 cat >> confdefs.h <<\EOF
4613 #define HAVE_LONG_FILE_NAMES 1
4614 EOF
4615 }
4616
4617 fi
4618
4619
4620 echo $ac_n "checking for sin""... $ac_c" 1>&6
4621 echo "configure:4622: checking for sin" >&5
4622
4623 cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626 /* System header to define __stub macros and hopefully few prototypes,
4627     which can conflict with char sin(); below.  */
4628 #include <assert.h>
4629 /* Override any gcc2 internal prototype to avoid an error.  */
4630 /* We use char because int might match the return type of a gcc2
4631     builtin and then its argument prototype would still apply.  */
4632 char sin();
4633
4634 int main() {
4635
4636 /* The GNU C library defines this for functions which it implements
4637     to always fail with ENOSYS.  Some functions are actually named
4638     something starting with __ and the normal name is an alias.  */
4639 #if defined (__stub_sin) || defined (__stub___sin)
4640 choke me
4641 #else
4642 sin();
4643 #endif
4644
4645 ; return 0; }
4646 EOF
4647 if { (eval echo configure:4648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4648   rm -rf conftest*
4649   eval "ac_cv_func_sin=yes"
4650 else
4651   echo "configure: failed program was:" >&5
4652   cat conftest.$ac_ext >&5
4653   rm -rf conftest*
4654   eval "ac_cv_func_sin=no"
4655 fi
4656 rm -f conftest*
4657
4658 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4659   echo "$ac_t""yes" 1>&6
4660   :
4661 else
4662   echo "$ac_t""no" 1>&6
4663
4664 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4665 echo "configure:4666: checking for sin in -lm" >&5
4666 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4667
4668 xe_check_libs=" -lm "
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672 /* Override any gcc2 internal prototype to avoid an error.  */
4673 /* We use char because int might match the return type of a gcc2
4674     builtin and then its argument prototype would still apply.  */
4675 char sin();
4676
4677 int main() {
4678 sin()
4679 ; return 0; }
4680 EOF
4681 if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4682   rm -rf conftest*
4683   eval "ac_cv_lib_$ac_lib_var=yes"
4684 else
4685   echo "configure: failed program was:" >&5
4686   cat conftest.$ac_ext >&5
4687   rm -rf conftest*
4688   eval "ac_cv_lib_$ac_lib_var=no"
4689 fi
4690 rm -f conftest*
4691 xe_check_libs=""
4692
4693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4694   echo "$ac_t""yes" 1>&6
4695     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4696     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4697   { test "$extra_verbose" = "yes" && cat << EOF
4698     Defining $ac_tr_lib
4699 EOF
4700 cat >> confdefs.h <<EOF
4701 #define $ac_tr_lib 1
4702 EOF
4703 }
4704
4705   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4706
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711
4712 fi
4713
4714
4715 { test "$extra_verbose" = "yes" && cat << \EOF
4716     Defining LISP_FLOAT_TYPE
4717 EOF
4718 cat >> confdefs.h <<\EOF
4719 #define LISP_FLOAT_TYPE 1
4720 EOF
4721 }
4722
4723
4724 cat > conftest.$ac_ext <<EOF
4725 #line 4726 "configure"
4726 #include "confdefs.h"
4727 #include <math.h>
4728 int main() {
4729 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4730 ; return 0; }
4731 EOF
4732 if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733   rm -rf conftest*
4734   { test "$extra_verbose" = "yes" && cat << \EOF
4735     Defining HAVE_INVERSE_HYPERBOLIC
4736 EOF
4737 cat >> confdefs.h <<\EOF
4738 #define HAVE_INVERSE_HYPERBOLIC 1
4739 EOF
4740 }
4741
4742 else
4743   echo "configure: failed program was:" >&5
4744   cat conftest.$ac_ext >&5
4745 fi
4746 rm -f conftest*
4747
4748 echo "checking type of mail spool file locking" 1>&6
4749 echo "configure:4750: checking type of mail spool file locking" >&5
4750 for ac_func in lockf flock
4751 do
4752 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4753 echo "configure:4754: checking for $ac_func" >&5
4754
4755 cat > conftest.$ac_ext <<EOF
4756 #line 4757 "configure"
4757 #include "confdefs.h"
4758 /* System header to define __stub macros and hopefully few prototypes,
4759     which can conflict with char $ac_func(); below.  */
4760 #include <assert.h>
4761 /* Override any gcc2 internal prototype to avoid an error.  */
4762 /* We use char because int might match the return type of a gcc2
4763     builtin and then its argument prototype would still apply.  */
4764 char $ac_func();
4765
4766 int main() {
4767
4768 /* The GNU C library defines this for functions which it implements
4769     to always fail with ENOSYS.  Some functions are actually named
4770     something starting with __ and the normal name is an alias.  */
4771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4772 choke me
4773 #else
4774 $ac_func();
4775 #endif
4776
4777 ; return 0; }
4778 EOF
4779 if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4780   rm -rf conftest*
4781   eval "ac_cv_func_$ac_func=yes"
4782 else
4783   echo "configure: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   rm -rf conftest*
4786   eval "ac_cv_func_$ac_func=no"
4787 fi
4788 rm -f conftest*
4789
4790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4791   echo "$ac_t""yes" 1>&6
4792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4793   { test "$extra_verbose" = "yes" && cat << EOF
4794     Defining $ac_tr_func
4795 EOF
4796 cat >> confdefs.h <<EOF
4797 #define $ac_tr_func 1
4798 EOF
4799 }
4800  
4801 else
4802   echo "$ac_t""no" 1>&6
4803 fi
4804 done
4805
4806 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4807 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4808 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4809 if   test -z "$mail_locking"; then
4810   case "$opsys" in cygwin* | mingw*)
4811     mail_locking=pop ;;
4812   esac
4813 fi
4814
4815 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4816     Defining MAIL_LOCK_LOCKF
4817 EOF
4818 cat >> confdefs.h <<\EOF
4819 #define MAIL_LOCK_LOCKF 1
4820 EOF
4821 }
4822
4823 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4824     Defining MAIL_LOCK_FLOCK
4825 EOF
4826 cat >> confdefs.h <<\EOF
4827 #define MAIL_LOCK_FLOCK 1
4828 EOF
4829 }
4830
4831 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4832     Defining MAIL_LOCK_LOCKING
4833 EOF
4834 cat >> confdefs.h <<\EOF
4835 #define MAIL_LOCK_LOCKING 1
4836 EOF
4837 }
4838
4839 elif test "$mail_locking" = "pop"; then
4840   with_pop=yes
4841   mail_locking=
4842 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4843     Defining MAIL_LOCK_DOT
4844 EOF
4845 cat >> confdefs.h <<\EOF
4846 #define MAIL_LOCK_DOT 1
4847 EOF
4848 }
4849
4850 fi
4851 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4852   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4853 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4854   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4855 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4856   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4857
4858 case "$opsys" in decosf*)
4859   
4860 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4861 echo "configure:4862: checking for cma_open in -lpthreads" >&5
4862 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4863
4864 xe_check_libs=" -lpthreads "
4865 cat > conftest.$ac_ext <<EOF
4866 #line 4867 "configure"
4867 #include "confdefs.h"
4868 /* Override any gcc2 internal prototype to avoid an error.  */
4869 /* We use char because int might match the return type of a gcc2
4870     builtin and then its argument prototype would still apply.  */
4871 char cma_open();
4872
4873 int main() {
4874 cma_open()
4875 ; return 0; }
4876 EOF
4877 if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4878   rm -rf conftest*
4879   eval "ac_cv_lib_$ac_lib_var=yes"
4880 else
4881   echo "configure: failed program was:" >&5
4882   cat conftest.$ac_ext >&5
4883   rm -rf conftest*
4884   eval "ac_cv_lib_$ac_lib_var=no"
4885 fi
4886 rm -f conftest*
4887 xe_check_libs=""
4888
4889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4890   echo "$ac_t""yes" 1>&6
4891     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4892     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4893   { test "$extra_verbose" = "yes" && cat << EOF
4894     Defining $ac_tr_lib
4895 EOF
4896 cat >> confdefs.h <<EOF
4897 #define $ac_tr_lib 1
4898 EOF
4899 }
4900
4901   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4902
4903 else
4904   echo "$ac_t""no" 1>&6
4905 fi
4906
4907
4908   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4909     c_switch_site="$c_switch_site -threads" ;;
4910 esac
4911
4912 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4913 echo "configure:4914: checking whether the -xildoff compiler flag is required" >&5
4914 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4915   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4916     then echo "$ac_t""no" 1>&6;
4917     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
4918   fi
4919   else echo "$ac_t""no" 1>&6
4920 fi
4921
4922 if test "$opsys" = "sol2"; then
4923   if test "$os_release" -ge 56; then
4924     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4925 echo "configure:4926: checking for \"-z ignore\" linker flag" >&5
4926     case "`ld -h 2>&1`" in
4927       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4928         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4929       *) echo "$ac_t""no" 1>&6 ;;
4930     esac
4931   fi
4932 fi
4933
4934
4935 echo "checking "for specified window system"" 1>&6
4936 echo "configure:4937: checking "for specified window system"" >&5
4937
4938 if test "$with_x11" != "no"; then
4939     test "$x_includes $x_libraries" != "NONE NONE" && \
4940    window_system=x11 with_x11=yes
4941
4942         
4943       if test "$x_includes $x_libraries" = "NONE NONE" \
4944     -a -n "$OPENWINHOME" \
4945     -a "$OPENWINHOME" != "/usr/openwin" \
4946     -a -d "$OPENWINHOME"; then
4947       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4948       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4949       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4950   fi
4951
4952   if test "$x_includes" = "NONE"; then
4953                     for dir in "/usr/X11" "/usr/X11R6"; do
4954       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4955     done
4956   fi
4957
4958   if test "$x_libraries" = "NONE"; then
4959     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4960       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4961     done
4962   fi
4963
4964   # If we find X, set shell vars x_includes and x_libraries to the
4965 # paths, otherwise set no_x=yes.
4966 # Uses ac_ vars as temps to allow command line to override cache and checks.
4967 # --without-x overrides everything else, but does not touch the cache.
4968 echo $ac_n "checking for X""... $ac_c" 1>&6
4969 echo "configure:4970: checking for X" >&5
4970
4971 # Check whether --with-x or --without-x was given.
4972 if test "${with_x+set}" = set; then
4973   withval="$with_x"
4974   :
4975 fi
4976
4977 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4978 if test "x$with_x" = xno; then
4979   # The user explicitly disabled X.
4980   have_x=disabled
4981 else
4982   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4983     # Both variables are already set.
4984     have_x=yes
4985   else
4986
4987 # One or both of the vars are not set, and there is no cached value.
4988 ac_x_includes=NO ac_x_libraries=NO
4989 rm -fr conftestdir
4990 if mkdir conftestdir; then
4991   cd conftestdir
4992   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4993   cat > Imakefile <<'EOF'
4994 acfindx:
4995         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4996 EOF
4997   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4998     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4999     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5000     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5001     for ac_extension in a so sl; do
5002       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5003         test -f $ac_im_libdir/libX11.$ac_extension; then
5004         ac_im_usrlibdir=$ac_im_libdir; break
5005       fi
5006     done
5007     # Screen out bogus values from the imake configuration.  They are
5008     # bogus both because they are the default anyway, and because
5009     # using them would break gcc on systems where it needs fixed includes.
5010     case "$ac_im_incroot" in
5011         /usr/include) ;;
5012         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5013     esac
5014     case "$ac_im_usrlibdir" in
5015         /usr/lib | /lib) ;;
5016         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5017     esac
5018   fi
5019   cd ..
5020   rm -fr conftestdir
5021 fi
5022
5023 if test "$ac_x_includes" = NO; then
5024   # Guess where to find include files, by looking for this one X11 .h file.
5025   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5026
5027   # First, try using that file with no special directory specified.
5028 cat > conftest.$ac_ext <<EOF
5029 #line 5030 "configure"
5030 #include "confdefs.h"
5031 #include <$x_direct_test_include>
5032 EOF
5033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5034 { (eval echo configure:5035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5036 if test -z "$ac_err"; then
5037   rm -rf conftest*
5038   # We can compile using X headers with no special include directory.
5039 ac_x_includes=
5040 else
5041   echo "$ac_err" >&5
5042   echo "configure: failed program was:" >&5
5043   cat conftest.$ac_ext >&5
5044   rm -rf conftest*
5045   # Look for the header file in a standard set of common directories.
5046 # Check X11 before X11Rn because it is often a symlink to the current release.
5047   for ac_dir in               \
5048     /usr/X11/include          \
5049     /usr/X11R6/include        \
5050     /usr/X11R5/include        \
5051     /usr/X11R4/include        \
5052                               \
5053     /usr/include/X11          \
5054     /usr/include/X11R6        \
5055     /usr/include/X11R5        \
5056     /usr/include/X11R4        \
5057                               \
5058     /usr/local/X11/include    \
5059     /usr/local/X11R6/include  \
5060     /usr/local/X11R5/include  \
5061     /usr/local/X11R4/include  \
5062                               \
5063     /usr/local/include/X11    \
5064     /usr/local/include/X11R6  \
5065     /usr/local/include/X11R5  \
5066     /usr/local/include/X11R4  \
5067                               \
5068     /usr/X386/include         \
5069     /usr/x386/include         \
5070     /usr/XFree86/include/X11  \
5071                               \
5072     /usr/include              \
5073     /usr/local/include        \
5074     /usr/unsupported/include  \
5075     /usr/athena/include       \
5076     /usr/local/x11r5/include  \
5077     /usr/lpp/Xamples/include  \
5078                               \
5079     /usr/openwin/include      \
5080     /usr/openwin/share/include \
5081     ; \
5082   do
5083     if test -r "$ac_dir/$x_direct_test_include"; then
5084       ac_x_includes=$ac_dir
5085       break
5086     fi
5087   done
5088 fi
5089 rm -f conftest*
5090 fi # $ac_x_includes = NO
5091
5092 if test "$ac_x_libraries" = NO; then
5093   # Check for the libraries.
5094
5095   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5096   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5097
5098   # See if we find them without any special options.
5099   # Don't add to $LIBS permanently.
5100   ac_save_LIBS="$LIBS"
5101   LIBS="-l$x_direct_test_library $LIBS"
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.h"
5105
5106 int main() {
5107 ${x_direct_test_function}()
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   LIBS="$ac_save_LIBS"
5113 # We can link X programs with no special library path.
5114 ac_x_libraries=
5115 else
5116   echo "configure: failed program was:" >&5
5117   cat conftest.$ac_ext >&5
5118   rm -rf conftest*
5119   LIBS="$ac_save_LIBS"
5120 # First see if replacing the include by lib works.
5121 # Check X11 before X11Rn because it is often a symlink to the current release.
5122 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5123     /usr/X11/lib          \
5124     /usr/X11R6/lib        \
5125     /usr/X11R5/lib        \
5126     /usr/X11R4/lib        \
5127                           \
5128     /usr/lib/X11          \
5129     /usr/lib/X11R6        \
5130     /usr/lib/X11R5        \
5131     /usr/lib/X11R4        \
5132                           \
5133     /usr/local/X11/lib    \
5134     /usr/local/X11R6/lib  \
5135     /usr/local/X11R5/lib  \
5136     /usr/local/X11R4/lib  \
5137                           \
5138     /usr/local/lib/X11    \
5139     /usr/local/lib/X11R6  \
5140     /usr/local/lib/X11R5  \
5141     /usr/local/lib/X11R4  \
5142                           \
5143     /usr/X386/lib         \
5144     /usr/x386/lib         \
5145     /usr/XFree86/lib/X11  \
5146                           \
5147     /usr/lib              \
5148     /usr/local/lib        \
5149     /usr/unsupported/lib  \
5150     /usr/athena/lib       \
5151     /usr/local/x11r5/lib  \
5152     /usr/lpp/Xamples/lib  \
5153     /lib/usr/lib/X11      \
5154                           \
5155     /usr/openwin/lib      \
5156     /usr/openwin/share/lib \
5157     ; \
5158 do
5159   for ac_extension in a so sl; do
5160     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5161       ac_x_libraries=$ac_dir
5162       break 2
5163     fi
5164   done
5165 done
5166 fi
5167 rm -f conftest*
5168 fi # $ac_x_libraries = NO
5169
5170 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5171   # Didn't find X anywhere.  Cache the known absence of X.
5172   ac_cv_have_x="have_x=no"
5173 else
5174   # Record where we found X for the cache.
5175   ac_cv_have_x="have_x=yes \
5176                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5177 fi
5178   fi
5179   eval "$ac_cv_have_x"
5180 fi # $with_x != no
5181
5182 if test "$have_x" != yes; then
5183   echo "$ac_t""$have_x" 1>&6
5184   no_x=yes
5185 else
5186   # If each of the values was on the command line, it overrides each guess.
5187   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5188   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5189   # Update the cache value to reflect the command line values.
5190   ac_cv_have_x="have_x=yes \
5191                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5192   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5193 fi
5194
5195 if test "$no_x" = yes; then
5196   # Not all programs may use this symbol, but it does not hurt to define it.
5197   { test "$extra_verbose" = "yes" && cat << \EOF
5198     Defining X_DISPLAY_MISSING
5199 EOF
5200 cat >> confdefs.h <<\EOF
5201 #define X_DISPLAY_MISSING 1
5202 EOF
5203 }
5204
5205   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5206 else
5207   if test -n "$x_includes"; then
5208     X_CFLAGS="$X_CFLAGS -I$x_includes"
5209   fi
5210
5211   # It would also be nice to do this for all -L options, not just this one.
5212   if test -n "$x_libraries"; then
5213     X_LIBS="$X_LIBS -L$x_libraries"
5214     # For Solaris; some versions of Sun CC require a space after -R and
5215     # others require no space.  Words are not sufficient . . . .
5216     case "`(uname -sr) 2>/dev/null`" in
5217     "SunOS 5"*)
5218       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5219 echo "configure:5220: checking whether -R must be followed by a space" >&5
5220       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5221       cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224
5225 int main() {
5226
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5230   rm -rf conftest*
5231   ac_R_nospace=yes
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   ac_R_nospace=no
5237 fi
5238 rm -f conftest*
5239       if test $ac_R_nospace = yes; then
5240         echo "$ac_t""no" 1>&6
5241         X_LIBS="$X_LIBS -R$x_libraries"
5242       else
5243         LIBS="$ac_xsave_LIBS -R $x_libraries"
5244         cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247
5248 int main() {
5249
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5253   rm -rf conftest*
5254   ac_R_space=yes
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258   rm -rf conftest*
5259   ac_R_space=no
5260 fi
5261 rm -f conftest*
5262         if test $ac_R_space = yes; then
5263           echo "$ac_t""yes" 1>&6
5264           X_LIBS="$X_LIBS -R $x_libraries"
5265         else
5266           echo "$ac_t""neither works" 1>&6
5267         fi
5268       fi
5269       LIBS="$ac_xsave_LIBS"
5270     esac
5271   fi
5272
5273   # Check for system-dependent libraries X programs must link with.
5274   # Do this before checking for the system-independent R6 libraries
5275   # (-lICE), since we may need -lsocket or whatever for X linking.
5276
5277   if test "$ISC" = yes; then
5278     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5279   else
5280     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5281     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5282     # the Alpha needs dnet_stub (dnet does not exist).
5283     if test "$with_dnet" = "no" ; then
5284 ac_cv_lib_dnet_dnet_ntoa=no
5285 else
5286
5287 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5288 echo "configure:5289: checking for dnet_ntoa in -ldnet" >&5
5289 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5290
5291 xe_check_libs=" -ldnet "
5292 cat > conftest.$ac_ext <<EOF
5293 #line 5294 "configure"
5294 #include "confdefs.h"
5295 /* Override any gcc2 internal prototype to avoid an error.  */
5296 /* We use char because int might match the return type of a gcc2
5297     builtin and then its argument prototype would still apply.  */
5298 char dnet_ntoa();
5299
5300 int main() {
5301 dnet_ntoa()
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=yes"
5307 else
5308   echo "configure: failed program was:" >&5
5309   cat conftest.$ac_ext >&5
5310   rm -rf conftest*
5311   eval "ac_cv_lib_$ac_lib_var=no"
5312 fi
5313 rm -f conftest*
5314 xe_check_libs=""
5315
5316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5317   echo "$ac_t""yes" 1>&6
5318   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5319 else
5320   echo "$ac_t""no" 1>&6
5321 fi
5322
5323 fi
5324
5325     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5326       
5327 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5328 echo "configure:5329: checking for dnet_ntoa in -ldnet_stub" >&5
5329 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5330
5331 xe_check_libs=" -ldnet_stub "
5332 cat > conftest.$ac_ext <<EOF
5333 #line 5334 "configure"
5334 #include "confdefs.h"
5335 /* Override any gcc2 internal prototype to avoid an error.  */
5336 /* We use char because int might match the return type of a gcc2
5337     builtin and then its argument prototype would still apply.  */
5338 char dnet_ntoa();
5339
5340 int main() {
5341 dnet_ntoa()
5342 ; return 0; }
5343 EOF
5344 if { (eval echo configure:5345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5345   rm -rf conftest*
5346   eval "ac_cv_lib_$ac_lib_var=yes"
5347 else
5348   echo "configure: failed program was:" >&5
5349   cat conftest.$ac_ext >&5
5350   rm -rf conftest*
5351   eval "ac_cv_lib_$ac_lib_var=no"
5352 fi
5353 rm -f conftest*
5354 xe_check_libs=""
5355
5356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5357   echo "$ac_t""yes" 1>&6
5358   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5359 else
5360   echo "$ac_t""no" 1>&6
5361 fi
5362
5363
5364     fi
5365
5366     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5367     # to get the SysV transport functions.
5368     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5369     # needs -lnsl.
5370     # The nsl library prevents programs from opening the X display
5371     # on Irix 5.2, according to dickey@clark.net.
5372     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5373 echo "configure:5374: checking for gethostbyname" >&5
5374
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378 /* System header to define __stub macros and hopefully few prototypes,
5379     which can conflict with char gethostbyname(); below.  */
5380 #include <assert.h>
5381 /* Override any gcc2 internal prototype to avoid an error.  */
5382 /* We use char because int might match the return type of a gcc2
5383     builtin and then its argument prototype would still apply.  */
5384 char gethostbyname();
5385
5386 int main() {
5387
5388 /* The GNU C library defines this for functions which it implements
5389     to always fail with ENOSYS.  Some functions are actually named
5390     something starting with __ and the normal name is an alias.  */
5391 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5392 choke me
5393 #else
5394 gethostbyname();
5395 #endif
5396
5397 ; return 0; }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5400   rm -rf conftest*
5401   eval "ac_cv_func_gethostbyname=yes"
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -rf conftest*
5406   eval "ac_cv_func_gethostbyname=no"
5407 fi
5408 rm -f conftest*
5409
5410 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5411   echo "$ac_t""yes" 1>&6
5412   :
5413 else
5414   echo "$ac_t""no" 1>&6
5415 fi
5416
5417     if test $ac_cv_func_gethostbyname = no; then
5418       
5419 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5420 echo "configure:5421: checking for gethostbyname in -lnsl" >&5
5421 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5422
5423 xe_check_libs=" -lnsl "
5424 cat > conftest.$ac_ext <<EOF
5425 #line 5426 "configure"
5426 #include "confdefs.h"
5427 /* Override any gcc2 internal prototype to avoid an error.  */
5428 /* We use char because int might match the return type of a gcc2
5429     builtin and then its argument prototype would still apply.  */
5430 char gethostbyname();
5431
5432 int main() {
5433 gethostbyname()
5434 ; return 0; }
5435 EOF
5436 if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5437   rm -rf conftest*
5438   eval "ac_cv_lib_$ac_lib_var=yes"
5439 else
5440   echo "configure: failed program was:" >&5
5441   cat conftest.$ac_ext >&5
5442   rm -rf conftest*
5443   eval "ac_cv_lib_$ac_lib_var=no"
5444 fi
5445 rm -f conftest*
5446 xe_check_libs=""
5447
5448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5449   echo "$ac_t""yes" 1>&6
5450   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5451 else
5452   echo "$ac_t""no" 1>&6
5453 fi
5454
5455
5456     fi
5457
5458     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5459     # socket/setsockopt and other routines are undefined under SCO ODT
5460     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5461     # on later versions), says simon@lia.di.epfl.ch: it contains
5462     # gethostby* variants that don't use the nameserver (or something).
5463     # -lsocket must be given before -lnsl if both are needed.
5464     # We assume that if connect needs -lnsl, so does gethostbyname.
5465     echo $ac_n "checking for connect""... $ac_c" 1>&6
5466 echo "configure:5467: checking for connect" >&5
5467
5468 cat > conftest.$ac_ext <<EOF
5469 #line 5470 "configure"
5470 #include "confdefs.h"
5471 /* System header to define __stub macros and hopefully few prototypes,
5472     which can conflict with char connect(); below.  */
5473 #include <assert.h>
5474 /* Override any gcc2 internal prototype to avoid an error.  */
5475 /* We use char because int might match the return type of a gcc2
5476     builtin and then its argument prototype would still apply.  */
5477 char connect();
5478
5479 int main() {
5480
5481 /* The GNU C library defines this for functions which it implements
5482     to always fail with ENOSYS.  Some functions are actually named
5483     something starting with __ and the normal name is an alias.  */
5484 #if defined (__stub_connect) || defined (__stub___connect)
5485 choke me
5486 #else
5487 connect();
5488 #endif
5489
5490 ; return 0; }
5491 EOF
5492 if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5493   rm -rf conftest*
5494   eval "ac_cv_func_connect=yes"
5495 else
5496   echo "configure: failed program was:" >&5
5497   cat conftest.$ac_ext >&5
5498   rm -rf conftest*
5499   eval "ac_cv_func_connect=no"
5500 fi
5501 rm -f conftest*
5502
5503 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5504   echo "$ac_t""yes" 1>&6
5505   :
5506 else
5507   echo "$ac_t""no" 1>&6
5508 fi
5509
5510     if test $ac_cv_func_connect = no; then
5511       
5512 xe_msg_checking="for connect in -lsocket"
5513 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5514 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5515 echo "configure:5516: checking "$xe_msg_checking"" >&5
5516 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5517
5518 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522 /* Override any gcc2 internal prototype to avoid an error.  */
5523 /* We use char because int might match the return type of a gcc2
5524     builtin and then its argument prototype would still apply.  */
5525 char connect();
5526
5527 int main() {
5528 connect()
5529 ; return 0; }
5530 EOF
5531 if { (eval echo configure:5532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5532   rm -rf conftest*
5533   eval "ac_cv_lib_$ac_lib_var=yes"
5534 else
5535   echo "configure: failed program was:" >&5
5536   cat conftest.$ac_ext >&5
5537   rm -rf conftest*
5538   eval "ac_cv_lib_$ac_lib_var=no"
5539 fi
5540 rm -f conftest*
5541 xe_check_libs=""
5542
5543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5544   echo "$ac_t""yes" 1>&6
5545   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5546 else
5547   echo "$ac_t""no" 1>&6
5548 fi
5549
5550
5551     fi
5552
5553     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5554     echo $ac_n "checking for remove""... $ac_c" 1>&6
5555 echo "configure:5556: checking for remove" >&5
5556
5557 cat > conftest.$ac_ext <<EOF
5558 #line 5559 "configure"
5559 #include "confdefs.h"
5560 /* System header to define __stub macros and hopefully few prototypes,
5561     which can conflict with char remove(); below.  */
5562 #include <assert.h>
5563 /* Override any gcc2 internal prototype to avoid an error.  */
5564 /* We use char because int might match the return type of a gcc2
5565     builtin and then its argument prototype would still apply.  */
5566 char remove();
5567
5568 int main() {
5569
5570 /* The GNU C library defines this for functions which it implements
5571     to always fail with ENOSYS.  Some functions are actually named
5572     something starting with __ and the normal name is an alias.  */
5573 #if defined (__stub_remove) || defined (__stub___remove)
5574 choke me
5575 #else
5576 remove();
5577 #endif
5578
5579 ; return 0; }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5582   rm -rf conftest*
5583   eval "ac_cv_func_remove=yes"
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -rf conftest*
5588   eval "ac_cv_func_remove=no"
5589 fi
5590 rm -f conftest*
5591
5592 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5593   echo "$ac_t""yes" 1>&6
5594   :
5595 else
5596   echo "$ac_t""no" 1>&6
5597 fi
5598
5599     if test $ac_cv_func_remove = no; then
5600       
5601 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5602 echo "configure:5603: checking for remove in -lposix" >&5
5603 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5604
5605 xe_check_libs=" -lposix "
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 /* Override any gcc2 internal prototype to avoid an error.  */
5610 /* We use char because int might match the return type of a gcc2
5611     builtin and then its argument prototype would still apply.  */
5612 char remove();
5613
5614 int main() {
5615 remove()
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   eval "ac_cv_lib_$ac_lib_var=yes"
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   eval "ac_cv_lib_$ac_lib_var=no"
5626 fi
5627 rm -f conftest*
5628 xe_check_libs=""
5629
5630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5631   echo "$ac_t""yes" 1>&6
5632   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636
5637
5638     fi
5639
5640     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5641     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5642 echo "configure:5643: checking for shmat" >&5
5643
5644 cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647 /* System header to define __stub macros and hopefully few prototypes,
5648     which can conflict with char shmat(); below.  */
5649 #include <assert.h>
5650 /* Override any gcc2 internal prototype to avoid an error.  */
5651 /* We use char because int might match the return type of a gcc2
5652     builtin and then its argument prototype would still apply.  */
5653 char shmat();
5654
5655 int main() {
5656
5657 /* The GNU C library defines this for functions which it implements
5658     to always fail with ENOSYS.  Some functions are actually named
5659     something starting with __ and the normal name is an alias.  */
5660 #if defined (__stub_shmat) || defined (__stub___shmat)
5661 choke me
5662 #else
5663 shmat();
5664 #endif
5665
5666 ; return 0; }
5667 EOF
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669   rm -rf conftest*
5670   eval "ac_cv_func_shmat=yes"
5671 else
5672   echo "configure: failed program was:" >&5
5673   cat conftest.$ac_ext >&5
5674   rm -rf conftest*
5675   eval "ac_cv_func_shmat=no"
5676 fi
5677 rm -f conftest*
5678
5679 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5680   echo "$ac_t""yes" 1>&6
5681   :
5682 else
5683   echo "$ac_t""no" 1>&6
5684 fi
5685
5686     if test $ac_cv_func_shmat = no; then
5687       
5688 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5689 echo "configure:5690: checking for shmat in -lipc" >&5
5690 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5691
5692 xe_check_libs=" -lipc "
5693 cat > conftest.$ac_ext <<EOF
5694 #line 5695 "configure"
5695 #include "confdefs.h"
5696 /* Override any gcc2 internal prototype to avoid an error.  */
5697 /* We use char because int might match the return type of a gcc2
5698     builtin and then its argument prototype would still apply.  */
5699 char shmat();
5700
5701 int main() {
5702 shmat()
5703 ; return 0; }
5704 EOF
5705 if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5706   rm -rf conftest*
5707   eval "ac_cv_lib_$ac_lib_var=yes"
5708 else
5709   echo "configure: failed program was:" >&5
5710   cat conftest.$ac_ext >&5
5711   rm -rf conftest*
5712   eval "ac_cv_lib_$ac_lib_var=no"
5713 fi
5714 rm -f conftest*
5715 xe_check_libs=""
5716
5717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5718   echo "$ac_t""yes" 1>&6
5719   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5720 else
5721   echo "$ac_t""no" 1>&6
5722 fi
5723
5724
5725     fi
5726   fi
5727
5728   # Check for libraries that X11R6 Xt/Xaw programs need.
5729   ac_save_LDFLAGS="$LDFLAGS"
5730   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5731   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5732   # check for ICE first), but we must link in the order -lSM -lICE or
5733   # we get undefined symbols.  So assume we have SM if we have ICE.
5734   # These have to be linked with before -lX11, unlike the other
5735   # libraries we check for below, so use a different variable.
5736   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5737   
5738 xe_msg_checking="for IceConnectionNumber in -lICE"
5739 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5740 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5741 echo "configure:5742: checking "$xe_msg_checking"" >&5
5742 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5743
5744 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5745 cat > conftest.$ac_ext <<EOF
5746 #line 5747 "configure"
5747 #include "confdefs.h"
5748 /* Override any gcc2 internal prototype to avoid an error.  */
5749 /* We use char because int might match the return type of a gcc2
5750     builtin and then its argument prototype would still apply.  */
5751 char IceConnectionNumber();
5752
5753 int main() {
5754 IceConnectionNumber()
5755 ; return 0; }
5756 EOF
5757 if { (eval echo configure:5758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5758   rm -rf conftest*
5759   eval "ac_cv_lib_$ac_lib_var=yes"
5760 else
5761   echo "configure: failed program was:" >&5
5762   cat conftest.$ac_ext >&5
5763   rm -rf conftest*
5764   eval "ac_cv_lib_$ac_lib_var=no"
5765 fi
5766 rm -f conftest*
5767 xe_check_libs=""
5768
5769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5770   echo "$ac_t""yes" 1>&6
5771   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5772 else
5773   echo "$ac_t""no" 1>&6
5774 fi
5775
5776
5777   LDFLAGS="$ac_save_LDFLAGS"
5778
5779 fi
5780  # Autoconf claims to find X library and include dirs for us.
5781   if test "$no_x" = "yes"
5782   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5783   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5784   fi
5785 fi
5786
5787 case "$with_x11" in
5788   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5789   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5790 esac
5791
5792 if test "$with_x11" = "yes"; then
5793   { test "$extra_verbose" = "yes" && cat << \EOF
5794     Defining HAVE_X_WINDOWS
5795 EOF
5796 cat >> confdefs.h <<\EOF
5797 #define HAVE_X_WINDOWS 1
5798 EOF
5799 }
5800
5801   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5802   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5803
5804       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5805     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5806     if test -d "$lib_dir" -a -d "$inc_dir"; then
5807       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5808         x_libraries="$lib_dir $x_libraries"
5809         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5810       esac
5811       case "$x_includes" in "$inc_dir"* ) ;; *)
5812         x_includes="$inc_dir $x_includes"
5813         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5814       esac
5815       break;       fi
5816   done
5817
5818     for rel in "X11R6" "X11R5" "X11R4"; do
5819     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5820     if test -d "$lib_dir" -a -d "$inc_dir"; then
5821       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5822         x_libraries="$x_libraries $lib_dir"
5823         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5824       esac
5825       case "$x_includes" in "$inc_dir"* ) ;; *)
5826         x_includes="$x_includes $inc_dir"
5827         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5828       esac
5829       break;     fi
5830   done
5831
5832     case "$opsys" in
5833   decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
5834   esac
5835
5836   ld_switch_x_site="$X_LIBS"
5837
5838   
5839 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5840     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5841   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5842   
5843         runpath="" runpath_dirs=""
5844   if test -n "$LD_RUN_PATH"; then
5845     runpath="$LD_RUN_PATH"
5846   elif test "$GCC" = "yes"; then
5847         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5848     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5849     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5850     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5851       case "$arg" in P,* | -L* | -R* )
5852         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5853           {
5854 xe_runpath_dir="$dir"
5855   test "$xe_runpath_dir" != "/lib"     -a \
5856         "$xe_runpath_dir" != "/usr/lib" -a \
5857         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5858   eval "$xe_add_unique_runpath_dir"
5859 }
5860         done ;;
5861       esac
5862     done
5863     ld_switch_run="$ld_switch_run_save"
5864     rm -f conftest*
5865   else
5866         for arg in $ld_switch_site $ld_switch_x_site; do
5867       case "$arg" in -L*) {
5868 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5869   test "$xe_runpath_dir" != "/lib"     -a \
5870         "$xe_runpath_dir" != "/usr/lib" -a \
5871         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5872   eval "$xe_add_unique_runpath_dir"
5873 };; esac
5874     done
5875         if test "$opsys $need_motif" = "sol2 yes"; then
5876       xe_runpath_dir="/opt/SUNWdt/lib";
5877       eval "$xe_add_unique_runpath_dir";
5878     fi
5879   fi 
5880   if test -n "$runpath"; then
5881     ld_switch_run="${dash_r}${runpath}"
5882     
5883 if test "$GCC" = "yes"; then
5884   set x $ld_switch_run; shift; ld_switch_run=""
5885   while test -n "$1"; do
5886     case $1 in
5887       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5888       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5889       -Xlinker* ) ;;
5890       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5891     esac
5892     shift
5893   done
5894 fi
5895     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5896   fi
5897 fi
5898
5899
5900   if test "$extra_verbose" = "yes"; then
5901     echo; echo "X11 compilation variables:"
5902     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5903     echo
5904   fi
5905
5906             bitmapdirs=
5907   if test "$x_includes" != NONE; then
5908     for i in $x_includes; do
5909       if test -d "$i/bitmaps"; then
5910         bitmapdirs="$i/bitmaps:$bitmapdirs"
5911       fi
5912       if test -d "$i/X11/bitmaps"; then
5913         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5914       fi
5915     done
5916     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5917   fi
5918   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5919     Defining BITMAPDIR = "$bitmapdirs"
5920 EOF
5921 cat >> confdefs.h <<EOF
5922 #define BITMAPDIR "$bitmapdirs"
5923 EOF
5924 }
5925
5926
5927     echo "checking for X defines extracted by xmkmf" 1>&6
5928 echo "configure:5929: checking for X defines extracted by xmkmf" >&5
5929   rm -fr conftestdir
5930   if mkdir conftestdir; then
5931     cd conftestdir
5932     cat > Imakefile <<'EOF'
5933 xetest:
5934         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5935 EOF
5936     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5937       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5938       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5939     fi
5940     cd ..
5941     rm -fr conftestdir
5942     for word in $xmkmf_defines; do
5943       case "$word" in -D* )
5944         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5945         case "$word" in
5946           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5947           *     ) val=1 ;;
5948         esac
5949         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5950           if test "$val" = "1"
5951             then { test "$extra_verbose" = "yes" && cat << EOF
5952     Defining $sym
5953 EOF
5954 cat >> confdefs.h <<EOF
5955 #define $sym 1
5956 EOF
5957 }
5958
5959             else { test "$extra_verbose" = "yes" && cat << EOF
5960     Defining $sym = $val
5961 EOF
5962 cat >> confdefs.h <<EOF
5963 #define $sym $val
5964 EOF
5965 }
5966
5967           fi
5968         fi  ;;
5969       esac
5970     done
5971   fi
5972
5973     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5974 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5975 echo "configure:5976: checking for X11/Intrinsic.h" >&5
5976
5977 cat > conftest.$ac_ext <<EOF
5978 #line 5979 "configure"
5979 #include "confdefs.h"
5980 #include <X11/Intrinsic.h>
5981 EOF
5982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5983 { (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5985 if test -z "$ac_err"; then
5986   rm -rf conftest*
5987   eval "ac_cv_header_$ac_safe=yes"
5988 else
5989   echo "$ac_err" >&5
5990   echo "configure: failed program was:" >&5
5991   cat conftest.$ac_ext >&5
5992   rm -rf conftest*
5993   eval "ac_cv_header_$ac_safe=no"
5994 fi
5995 rm -f conftest*
5996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5997   echo "$ac_t""yes" 1>&6
5998   :
5999 else
6000   echo "$ac_t""no" 1>&6
6001 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6002 fi
6003
6004
6005       
6006 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6007 echo "configure:6008: checking for XOpenDisplay in -lX11" >&5
6008 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6009
6010 xe_check_libs=" -lX11 "
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014 /* Override any gcc2 internal prototype to avoid an error.  */
6015 /* We use char because int might match the return type of a gcc2
6016     builtin and then its argument prototype would still apply.  */
6017 char XOpenDisplay();
6018
6019 int main() {
6020 XOpenDisplay()
6021 ; return 0; }
6022 EOF
6023 if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6024   rm -rf conftest*
6025   eval "ac_cv_lib_$ac_lib_var=yes"
6026 else
6027   echo "configure: failed program was:" >&5
6028   cat conftest.$ac_ext >&5
6029   rm -rf conftest*
6030   eval "ac_cv_lib_$ac_lib_var=no"
6031 fi
6032 rm -f conftest*
6033 xe_check_libs=""
6034
6035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6036   echo "$ac_t""yes" 1>&6
6037   have_lib_x11=yes
6038 else
6039   echo "$ac_t""no" 1>&6
6040 fi
6041
6042
6043   if test "$have_lib_x11" != "yes"; then
6044     
6045 xe_msg_checking="for XGetFontProperty in -lX11"
6046 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6047 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6048 echo "configure:6049: checking "$xe_msg_checking"" >&5
6049 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6050
6051 xe_check_libs=" -lX11 -b i486-linuxaout"
6052 cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* Override any gcc2 internal prototype to avoid an error.  */
6056 /* We use char because int might match the return type of a gcc2
6057     builtin and then its argument prototype would still apply.  */
6058 char XGetFontProperty();
6059
6060 int main() {
6061 XGetFontProperty()
6062 ; return 0; }
6063 EOF
6064 if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6065   rm -rf conftest*
6066   eval "ac_cv_lib_$ac_lib_var=yes"
6067 else
6068   echo "configure: failed program was:" >&5
6069   cat conftest.$ac_ext >&5
6070   rm -rf conftest*
6071   eval "ac_cv_lib_$ac_lib_var=no"
6072 fi
6073 rm -f conftest*
6074 xe_check_libs=""
6075
6076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6077   echo "$ac_t""yes" 1>&6
6078   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6079 else
6080   echo "$ac_t""no" 1>&6
6081 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6082 fi
6083
6084
6085   fi
6086   libs_x="-lX11"
6087   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6088
6089     
6090 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6091 echo "configure:6092: checking for XShapeSelectInput in -lXext" >&5
6092 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6093
6094 xe_check_libs=" -lXext "
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 /* Override any gcc2 internal prototype to avoid an error.  */
6099 /* We use char because int might match the return type of a gcc2
6100     builtin and then its argument prototype would still apply.  */
6101 char XShapeSelectInput();
6102
6103 int main() {
6104 XShapeSelectInput()
6105 ; return 0; }
6106 EOF
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6108   rm -rf conftest*
6109   eval "ac_cv_lib_$ac_lib_var=yes"
6110 else
6111   echo "configure: failed program was:" >&5
6112   cat conftest.$ac_ext >&5
6113   rm -rf conftest*
6114   eval "ac_cv_lib_$ac_lib_var=no"
6115 fi
6116 rm -f conftest*
6117 xe_check_libs=""
6118
6119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6120   echo "$ac_t""yes" 1>&6
6121   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6122 else
6123   echo "$ac_t""no" 1>&6
6124 fi
6125
6126
6127
6128     
6129 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6130 echo "configure:6131: checking for XtOpenDisplay in -lXt" >&5
6131 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6132
6133 xe_check_libs=" -lXt "
6134 cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 /* Override any gcc2 internal prototype to avoid an error.  */
6138 /* We use char because int might match the return type of a gcc2
6139     builtin and then its argument prototype would still apply.  */
6140 char XtOpenDisplay();
6141
6142 int main() {
6143 XtOpenDisplay()
6144 ; return 0; }
6145 EOF
6146 if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6147   rm -rf conftest*
6148   eval "ac_cv_lib_$ac_lib_var=yes"
6149 else
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -rf conftest*
6153   eval "ac_cv_lib_$ac_lib_var=no"
6154 fi
6155 rm -f conftest*
6156 xe_check_libs=""
6157
6158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6159   echo "$ac_t""yes" 1>&6
6160   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6161 else
6162   echo "$ac_t""no" 1>&6
6163 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6164 fi
6165
6166
6167
6168   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6169 echo "configure:6170: checking the version of X11 being used" >&5
6170   cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 #include <X11/Intrinsic.h>
6174     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6175 EOF
6176 if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6177 then
6178   ./conftest foobar; x11_release=$?
6179 else
6180   conftest_rc="$?"
6181   echo "configure: failed program was:" >&5
6182   cat conftest.$ac_ext >&5
6183   rm -fr conftest*
6184   x11_release=4
6185 fi
6186 rm -fr conftest*
6187   echo "$ac_t""R${x11_release}" 1>&6
6188   { test "$extra_verbose" = "yes" && cat << EOF
6189     Defining THIS_IS_X11R${x11_release}
6190 EOF
6191 cat >> confdefs.h <<EOF
6192 #define THIS_IS_X11R${x11_release} 1
6193 EOF
6194 }
6195
6196
6197   if test "${x11_release}" = "4"; then
6198     case "$with_widgets" in
6199       "" | "no") with_widgets=no ;;
6200       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6201     esac
6202   fi
6203
6204   for ac_func in XConvertCase
6205 do
6206 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6207 echo "configure:6208: checking for $ac_func" >&5
6208
6209 cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 /* System header to define __stub macros and hopefully few prototypes,
6213     which can conflict with char $ac_func(); below.  */
6214 #include <assert.h>
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 /* We use char because int might match the return type of a gcc2
6217     builtin and then its argument prototype would still apply.  */
6218 char $ac_func();
6219
6220 int main() {
6221
6222 /* The GNU C library defines this for functions which it implements
6223     to always fail with ENOSYS.  Some functions are actually named
6224     something starting with __ and the normal name is an alias.  */
6225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6226 choke me
6227 #else
6228 $ac_func();
6229 #endif
6230
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6234   rm -rf conftest*
6235   eval "ac_cv_func_$ac_func=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_func_$ac_func=no"
6241 fi
6242 rm -f conftest*
6243
6244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6245   echo "$ac_t""yes" 1>&6
6246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6247   { test "$extra_verbose" = "yes" && cat << EOF
6248     Defining $ac_tr_func
6249 EOF
6250 cat >> confdefs.h <<EOF
6251 #define $ac_tr_func 1
6252 EOF
6253 }
6254  
6255 else
6256   echo "$ac_t""no" 1>&6
6257 fi
6258 done
6259
6260
6261   for ac_hdr in X11/Xlocale.h
6262 do
6263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6265 echo "configure:6266: checking for $ac_hdr" >&5
6266
6267 cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 #include <$ac_hdr>
6271 EOF
6272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6273 { (eval echo configure:6274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6275 if test -z "$ac_err"; then
6276   rm -rf conftest*
6277   eval "ac_cv_header_$ac_safe=yes"
6278 else
6279   echo "$ac_err" >&5
6280   echo "configure: failed program was:" >&5
6281   cat conftest.$ac_ext >&5
6282   rm -rf conftest*
6283   eval "ac_cv_header_$ac_safe=no"
6284 fi
6285 rm -f conftest*
6286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6287   echo "$ac_t""yes" 1>&6
6288     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6289   { test "$extra_verbose" = "yes" && cat << EOF
6290     Defining $ac_tr_hdr
6291 EOF
6292 cat >> confdefs.h <<EOF
6293 #define $ac_tr_hdr 1
6294 EOF
6295 }
6296  
6297 else
6298   echo "$ac_t""no" 1>&6
6299 fi
6300 done
6301
6302
6303     for ac_func in XRegisterIMInstantiateCallback
6304 do
6305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6306 echo "configure:6307: checking for $ac_func" >&5
6307
6308 cat > conftest.$ac_ext <<EOF
6309 #line 6310 "configure"
6310 #include "confdefs.h"
6311 /* System header to define __stub macros and hopefully few prototypes,
6312     which can conflict with char $ac_func(); below.  */
6313 #include <assert.h>
6314 /* Override any gcc2 internal prototype to avoid an error.  */
6315 /* We use char because int might match the return type of a gcc2
6316     builtin and then its argument prototype would still apply.  */
6317 char $ac_func();
6318
6319 int main() {
6320
6321 /* The GNU C library defines this for functions which it implements
6322     to always fail with ENOSYS.  Some functions are actually named
6323     something starting with __ and the normal name is an alias.  */
6324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6325 choke me
6326 #else
6327 $ac_func();
6328 #endif
6329
6330 ; return 0; }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333   rm -rf conftest*
6334   eval "ac_cv_func_$ac_func=yes"
6335 else
6336   echo "configure: failed program was:" >&5
6337   cat conftest.$ac_ext >&5
6338   rm -rf conftest*
6339   eval "ac_cv_func_$ac_func=no"
6340 fi
6341 rm -f conftest*
6342
6343 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6344   echo "$ac_t""yes" 1>&6
6345     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6346   { test "$extra_verbose" = "yes" && cat << EOF
6347     Defining $ac_tr_func
6348 EOF
6349 cat >> confdefs.h <<EOF
6350 #define $ac_tr_func 1
6351 EOF
6352 }
6353  
6354 else
6355   echo "$ac_t""no" 1>&6
6356 fi
6357 done
6358
6359   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6360 echo "configure:6361: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6361   cat > conftest.$ac_ext <<EOF
6362 #line 6363 "configure"
6363 #include "confdefs.h"
6364
6365 #define NeedFunctionPrototypes 1
6366 #include <X11/Xlib.h>
6367 extern Bool XRegisterIMInstantiateCallback(
6368    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6369
6370 int main() {
6371
6372 ; return 0; }
6373 EOF
6374 if { (eval echo configure:6375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6375   rm -rf conftest*
6376   echo "$ac_t""yes" 1>&6
6377 else
6378   echo "configure: failed program was:" >&5
6379   cat conftest.$ac_ext >&5
6380   rm -rf conftest*
6381   echo "$ac_t""no" 1>&6
6382    { test "$extra_verbose" = "yes" && cat << \EOF
6383     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6384 EOF
6385 cat >> confdefs.h <<\EOF
6386 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6387 EOF
6388 }
6389
6390 fi
6391 rm -f conftest*
6392
6393     test -z "$with_xmu" && { 
6394 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6395 echo "configure:6396: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6396 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6397
6398 xe_check_libs=" -lXmu "
6399 cat > conftest.$ac_ext <<EOF
6400 #line 6401 "configure"
6401 #include "confdefs.h"
6402 /* Override any gcc2 internal prototype to avoid an error.  */
6403 /* We use char because int might match the return type of a gcc2
6404     builtin and then its argument prototype would still apply.  */
6405 char XmuReadBitmapDataFromFile();
6406
6407 int main() {
6408 XmuReadBitmapDataFromFile()
6409 ; return 0; }
6410 EOF
6411 if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6412   rm -rf conftest*
6413   eval "ac_cv_lib_$ac_lib_var=yes"
6414 else
6415   echo "configure: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   rm -rf conftest*
6418   eval "ac_cv_lib_$ac_lib_var=no"
6419 fi
6420 rm -f conftest*
6421 xe_check_libs=""
6422
6423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6424   echo "$ac_t""yes" 1>&6
6425   with_xmu=yes
6426 else
6427   echo "$ac_t""no" 1>&6
6428 with_xmu=no
6429 fi
6430
6431  }
6432   if test "$with_xmu" = "no"; then
6433     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6434    echo "    xemacs will be linked with \"xmu.o\""
6435  fi
6436   else
6437     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6438     { test "$extra_verbose" = "yes" && cat << \EOF
6439     Defining HAVE_XMU
6440 EOF
6441 cat >> confdefs.h <<\EOF
6442 #define HAVE_XMU 1
6443 EOF
6444 }
6445
6446   fi
6447
6448       
6449 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6450 echo "configure:6451: checking for main in -lXbsd" >&5
6451 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6452
6453 xe_check_libs=" -lXbsd "
6454 cat > conftest.$ac_ext <<EOF
6455 #line 6456 "configure"
6456 #include "confdefs.h"
6457
6458 int main() {
6459 main()
6460 ; return 0; }
6461 EOF
6462 if { (eval echo configure:6463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6463   rm -rf conftest*
6464   eval "ac_cv_lib_$ac_lib_var=yes"
6465 else
6466   echo "configure: failed program was:" >&5
6467   cat conftest.$ac_ext >&5
6468   rm -rf conftest*
6469   eval "ac_cv_lib_$ac_lib_var=no"
6470 fi
6471 rm -f conftest*
6472 xe_check_libs=""
6473
6474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6475   echo "$ac_t""yes" 1>&6
6476   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6477 else
6478   echo "$ac_t""no" 1>&6
6479 fi
6480
6481
6482
6483     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6484         if test "$GCC" = "yes"; then
6485       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6486       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6487     else
6488       case "$CC" in
6489         "xlc" ) CC="xlc_r" ;;
6490         "xlC" ) CC="xlC_r" ;;
6491         "cc"  ) CC="cc_r" ;;
6492       esac
6493     fi
6494   fi
6495
6496 fi 
6497 if test "$with_msw" != "no"; then
6498   echo "checking for MS-Windows" 1>&6
6499 echo "configure:6500: checking for MS-Windows" >&5
6500   
6501 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6502 echo "configure:6503: checking for main in -lgdi32" >&5
6503 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6504
6505 xe_check_libs=" -lgdi32 "
6506 cat > conftest.$ac_ext <<EOF
6507 #line 6508 "configure"
6508 #include "confdefs.h"
6509
6510 int main() {
6511 main()
6512 ; return 0; }
6513 EOF
6514 if { (eval echo configure:6515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6515   rm -rf conftest*
6516   eval "ac_cv_lib_$ac_lib_var=yes"
6517 else
6518   echo "configure: failed program was:" >&5
6519   cat conftest.$ac_ext >&5
6520   rm -rf conftest*
6521   eval "ac_cv_lib_$ac_lib_var=no"
6522 fi
6523 rm -f conftest*
6524 xe_check_libs=""
6525
6526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6527   echo "$ac_t""yes" 1>&6
6528   with_msw=yes
6529 else
6530   echo "$ac_t""no" 1>&6
6531 fi
6532
6533
6534   if test "$with_msw" = "yes"; then
6535     { test "$extra_verbose" = "yes" && cat << \EOF
6536     Defining HAVE_MS_WINDOWS
6537 EOF
6538 cat >> confdefs.h <<\EOF
6539 #define HAVE_MS_WINDOWS 1
6540 EOF
6541 }
6542
6543
6544         MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
6545     SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
6546     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
6547         
6548     install_pp="$blddir/lib-src/installexe.sh"
6549     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6550     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6551     if test "$window_system" != x11; then
6552         window_system=msw
6553         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6554             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6555    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6556  fi
6557         test "$with_menubars"   != "no" && with_menubars=msw \
6558             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6559    echo "    xemacs will be linked with \"menubar-msw.o\""
6560  fi
6561         test "$with_toolbars"   != "no" && with_toolbars=msw \
6562             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6563    echo "    xemacs will be linked with \"toolbar-msw.o\""
6564  fi
6565         test "$with_dialogs"   != "no" && with_dialogs=msw \
6566             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6567    echo "    xemacs will be linked with \"dialog-msw.o\""
6568  fi
6569         test "$with_widgets"   != "no" && with_widgets=msw
6570     else
6571         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6572    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6573  fi
6574         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6575    echo "    xemacs will be linked with \"menubar-msw.o\""
6576  fi
6577         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6578    echo "    xemacs will be linked with \"toolbar-msw.o\""
6579  fi
6580         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6581    echo "    xemacs will be linked with \"dialog-msw.o\""
6582  fi
6583     fi
6584         cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 #include <fcntl.h>
6588     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6589 EOF
6590 if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6591 then
6592   { test "$extra_verbose" = "yes" && cat << \EOF
6593     Defining HAVE_MSG_SELECT
6594 EOF
6595 cat >> confdefs.h <<\EOF
6596 #define HAVE_MSG_SELECT 1
6597 EOF
6598 }
6599
6600 else
6601   conftest_rc="$?"
6602   echo "configure: failed program was:" >&5
6603   cat conftest.$ac_ext >&5
6604 fi
6605 rm -fr conftest*
6606     with_file_coding=yes
6607     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
6608    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\""
6609  fi
6610   fi
6611 fi
6612
6613
6614
6615 test -z "$window_system" && window_system="none"
6616
6617 if test "$window_system" = "none"; then
6618   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6619   do
6620     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6621        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6622     fi
6623     eval "with_${feature}=no"
6624   done
6625 else
6626   test -z "$with_toolbars" && with_toolbars=yes
6627 fi
6628
6629 if test "$with_msw" != "yes"; then
6630   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6631   do
6632     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6633        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6634     fi
6635     eval "with_${feature}=no"
6636   done
6637 else
6638   :
6639 fi
6640
6641 if test "$with_x11" != "yes"; then
6642             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6643   do
6644     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6645        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6646     fi
6647     eval "with_${feature}=no"
6648   done
6649 fi
6650
6651 if test "$with_x11" = "yes"; then
6652   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6653 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6654 echo "configure:6655: checking for X11/extensions/shape.h" >&5
6655
6656 cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 #include <X11/extensions/shape.h>
6660 EOF
6661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6662 { (eval echo configure:6663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6664 if test -z "$ac_err"; then
6665   rm -rf conftest*
6666   eval "ac_cv_header_$ac_safe=yes"
6667 else
6668   echo "$ac_err" >&5
6669   echo "configure: failed program was:" >&5
6670   cat conftest.$ac_ext >&5
6671   rm -rf conftest*
6672   eval "ac_cv_header_$ac_safe=no"
6673 fi
6674 rm -f conftest*
6675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6676   echo "$ac_t""yes" 1>&6
6677   
6678    { test "$extra_verbose" = "yes" && cat << \EOF
6679     Defining HAVE_BALLOON_HELP
6680 EOF
6681 cat >> confdefs.h <<\EOF
6682 #define HAVE_BALLOON_HELP 1
6683 EOF
6684 }
6685
6686    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6687    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6688  fi
6689 else
6690   echo "$ac_t""no" 1>&6
6691 fi
6692
6693 fi
6694
6695 bitmapdir=
6696
6697 case "$window_system" in
6698   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6699   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6700   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6701 esac
6702
6703 case "$x_libraries" in *X11R4* )
6704   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6705   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6706 esac
6707
6708 echo "checking for WM_COMMAND option" 1>&6
6709 echo "configure:6710: checking for WM_COMMAND option" >&5;
6710 if test "$with_wmcommand" != "no"; then
6711   { test "$extra_verbose" = "yes" && cat << \EOF
6712     Defining HAVE_WMCOMMAND
6713 EOF
6714 cat >> confdefs.h <<\EOF
6715 #define HAVE_WMCOMMAND 1
6716 EOF
6717 }
6718
6719 fi
6720
6721 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6722 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6723 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6724 echo "configure:6725: checking for X11/Xauth.h" >&5
6725
6726 cat > conftest.$ac_ext <<EOF
6727 #line 6728 "configure"
6728 #include "confdefs.h"
6729 #include <X11/Xauth.h>
6730 EOF
6731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6732 { (eval echo configure:6733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6734 if test -z "$ac_err"; then
6735   rm -rf conftest*
6736   eval "ac_cv_header_$ac_safe=yes"
6737 else
6738   echo "$ac_err" >&5
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_header_$ac_safe=no"
6743 fi
6744 rm -f conftest*
6745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6746   echo "$ac_t""yes" 1>&6
6747   :
6748 else
6749   echo "$ac_t""no" 1>&6
6750 with_xauth=no
6751 fi
6752  }
6753 test -z "$with_xauth" && { 
6754 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6755 echo "configure:6756: checking for XauGetAuthByAddr in -lXau" >&5
6756 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6757
6758 xe_check_libs=" -lXau "
6759 cat > conftest.$ac_ext <<EOF
6760 #line 6761 "configure"
6761 #include "confdefs.h"
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 /* We use char because int might match the return type of a gcc2
6764     builtin and then its argument prototype would still apply.  */
6765 char XauGetAuthByAddr();
6766
6767 int main() {
6768 XauGetAuthByAddr()
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=yes"
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   eval "ac_cv_lib_$ac_lib_var=no"
6779 fi
6780 rm -f conftest*
6781 xe_check_libs=""
6782
6783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6784   echo "$ac_t""yes" 1>&6
6785   :
6786 else
6787   echo "$ac_t""no" 1>&6
6788 with_xauth=no
6789 fi
6790
6791  }
6792 test -z "$with_xauth" && with_xauth=yes
6793 if test "$with_xauth" = "yes"; then
6794   { test "$extra_verbose" = "yes" && cat << \EOF
6795     Defining HAVE_XAUTH
6796 EOF
6797 cat >> confdefs.h <<\EOF
6798 #define HAVE_XAUTH 1
6799 EOF
6800 }
6801
6802   
6803 T=""
6804 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
6805 libs_xauth="$T"
6806
6807 fi
6808
6809
6810
6811
6812 if test "$with_tooltalk" != "no" ; then
6813       for dir in "" "Tt/" "desktop/" ; do
6814     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6815 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6816 echo "configure:6817: checking for ${dir}tt_c.h" >&5
6817
6818 cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6821 #include <${dir}tt_c.h>
6822 EOF
6823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6824 { (eval echo configure:6825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6826 if test -z "$ac_err"; then
6827   rm -rf conftest*
6828   eval "ac_cv_header_$ac_safe=yes"
6829 else
6830   echo "$ac_err" >&5
6831   echo "configure: failed program was:" >&5
6832   cat conftest.$ac_ext >&5
6833   rm -rf conftest*
6834   eval "ac_cv_header_$ac_safe=no"
6835 fi
6836 rm -f conftest*
6837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6838   echo "$ac_t""yes" 1>&6
6839   tt_c_h_file="${dir}tt_c.h"; break
6840 else
6841   echo "$ac_t""no" 1>&6
6842 fi
6843
6844   done
6845   if test -z "$tt_c_h_file"; then
6846     if test "$with_tooltalk" = "yes"; then
6847       (echo "$progname: Usage error:"
6848 echo " " "Unable to find required tooltalk header files."
6849 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6850     fi
6851     with_tooltalk=no
6852   fi
6853 fi
6854 if test "$with_tooltalk" != "no" ; then
6855   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6856     
6857 xe_msg_checking="for tt_message_create in -ltt"
6858 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6859 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6860 echo "configure:6861: checking "$xe_msg_checking"" >&5
6861 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6862
6863 xe_check_libs=" -ltt $extra_libs"
6864 cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 /* Override any gcc2 internal prototype to avoid an error.  */
6868 /* We use char because int might match the return type of a gcc2
6869     builtin and then its argument prototype would still apply.  */
6870 char tt_message_create();
6871
6872 int main() {
6873 tt_message_create()
6874 ; return 0; }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6877   rm -rf conftest*
6878   eval "ac_cv_lib_$ac_lib_var=yes"
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -rf conftest*
6883   eval "ac_cv_lib_$ac_lib_var=no"
6884 fi
6885 rm -f conftest*
6886 xe_check_libs=""
6887
6888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6889   echo "$ac_t""yes" 1>&6
6890   tt_libs="-ltt $extra_libs"; break
6891 else
6892   echo "$ac_t""no" 1>&6
6893 :
6894 fi
6895
6896
6897   done
6898   if test -z "$tt_libs"; then
6899     if test "$with_tooltalk" = "yes"; then
6900       (echo "$progname: Usage error:"
6901 echo " " "Unable to find required tooltalk libraries."
6902 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6903     fi
6904     with_tooltalk=no
6905   fi
6906 fi
6907 test -z "$with_tooltalk" && with_tooltalk=yes
6908 if test "$with_tooltalk" = "yes"; then
6909   { test "$extra_verbose" = "yes" && cat << \EOF
6910     Defining TOOLTALK
6911 EOF
6912 cat >> confdefs.h <<\EOF
6913 #define TOOLTALK 1
6914 EOF
6915 }
6916
6917   { test "$extra_verbose" = "yes" && cat << EOF
6918     Defining TT_C_H_FILE = "$tt_c_h_file"
6919 EOF
6920 cat >> confdefs.h <<EOF
6921 #define TT_C_H_FILE "$tt_c_h_file"
6922 EOF
6923 }
6924
6925   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6926   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6927    echo "    xemacs will be linked with \"tooltalk.o\""
6928  fi
6929 fi
6930
6931 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6932 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6933 echo "configure:6934: checking for Dt/Dt.h" >&5
6934
6935 cat > conftest.$ac_ext <<EOF
6936 #line 6937 "configure"
6937 #include "confdefs.h"
6938 #include <Dt/Dt.h>
6939 EOF
6940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6941 { (eval echo configure:6942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6943 if test -z "$ac_err"; then
6944   rm -rf conftest*
6945   eval "ac_cv_header_$ac_safe=yes"
6946 else
6947   echo "$ac_err" >&5
6948   echo "configure: failed program was:" >&5
6949   cat conftest.$ac_ext >&5
6950   rm -rf conftest*
6951   eval "ac_cv_header_$ac_safe=no"
6952 fi
6953 rm -f conftest*
6954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6955   echo "$ac_t""yes" 1>&6
6956   :
6957 else
6958   echo "$ac_t""no" 1>&6
6959 with_cde=no
6960 fi
6961  }
6962 test -z "$with_cde" && { 
6963 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6964 echo "configure:6965: checking for DtDndDragStart in -lDtSvc" >&5
6965 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6966
6967 xe_check_libs=" -lDtSvc "
6968 cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971 /* Override any gcc2 internal prototype to avoid an error.  */
6972 /* We use char because int might match the return type of a gcc2
6973     builtin and then its argument prototype would still apply.  */
6974 char DtDndDragStart();
6975
6976 int main() {
6977 DtDndDragStart()
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   eval "ac_cv_lib_$ac_lib_var=yes"
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_lib_$ac_lib_var=no"
6988 fi
6989 rm -f conftest*
6990 xe_check_libs=""
6991
6992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6993   echo "$ac_t""yes" 1>&6
6994   :
6995 else
6996   echo "$ac_t""no" 1>&6
6997 with_cde=no
6998 fi
6999
7000  }
7001 test -z "$with_cde" && with_cde=yes
7002 if test "$with_dragndrop" = no; then
7003   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7004   with_cde=no
7005 fi
7006 if test "$with_cde" = "yes" ; then
7007   { test "$extra_verbose" = "yes" && cat << \EOF
7008     Defining HAVE_CDE
7009 EOF
7010 cat >> confdefs.h <<\EOF
7011 #define HAVE_CDE 1
7012 EOF
7013 }
7014
7015   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7016   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7017   with_tooltalk=yes # CDE requires Tooltalk
7018   need_motif=yes    # CDE requires Motif
7019 fi
7020
7021 test "$window_system" != "x11" && with_offix=no
7022 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7023   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7024   with_offix=no
7025 fi
7026 if test "$with_dragndrop" = no; then
7027   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7028   with_offix=no
7029 fi
7030 if test "$with_cde" = yes; then
7031   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7032   with_offix=no
7033 fi
7034 test -z "$with_offix" && with_offix=no
7035 if test "$with_offix" = "yes"; then
7036   { test "$extra_verbose" = "yes" && cat << \EOF
7037     Defining HAVE_OFFIX_DND
7038 EOF
7039 cat >> confdefs.h <<\EOF
7040 #define HAVE_OFFIX_DND 1
7041 EOF
7042 }
7043
7044   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7045   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7046 fi
7047
7048 if test "$with_dragndrop" != "no" ; then
7049   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7050 echo "configure:7051: checking if drag and drop API is needed" >&5
7051   if test -n "$dragndrop_proto" ; then
7052     with_dragndrop=yes
7053     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7054     { test "$extra_verbose" = "yes" && cat << \EOF
7055     Defining HAVE_DRAGNDROP
7056 EOF
7057 cat >> confdefs.h <<\EOF
7058 #define HAVE_DRAGNDROP 1
7059 EOF
7060 }
7061
7062     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7063   else
7064     with_dragndrop=no
7065     echo "$ac_t""no" 1>&6
7066   fi
7067 fi
7068
7069 echo "checking for LDAP" 1>&6
7070 echo "configure:7071: checking for LDAP" >&5
7071 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7072 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7073 echo "configure:7074: checking for ldap.h" >&5
7074
7075 cat > conftest.$ac_ext <<EOF
7076 #line 7077 "configure"
7077 #include "confdefs.h"
7078 #include <ldap.h>
7079 EOF
7080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7081 { (eval echo configure:7082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7083 if test -z "$ac_err"; then
7084   rm -rf conftest*
7085   eval "ac_cv_header_$ac_safe=yes"
7086 else
7087   echo "$ac_err" >&5
7088   echo "configure: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   rm -rf conftest*
7091   eval "ac_cv_header_$ac_safe=no"
7092 fi
7093 rm -f conftest*
7094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7095   echo "$ac_t""yes" 1>&6
7096   :
7097 else
7098   echo "$ac_t""no" 1>&6
7099 with_ldap=no
7100 fi
7101  }
7102 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7103 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7104 echo "configure:7105: checking for lber.h" >&5
7105
7106 cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109 #include <lber.h>
7110 EOF
7111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7112 { (eval echo configure:7113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7114 if test -z "$ac_err"; then
7115   rm -rf conftest*
7116   eval "ac_cv_header_$ac_safe=yes"
7117 else
7118   echo "$ac_err" >&5
7119   echo "configure: failed program was:" >&5
7120   cat conftest.$ac_ext >&5
7121   rm -rf conftest*
7122   eval "ac_cv_header_$ac_safe=no"
7123 fi
7124 rm -f conftest*
7125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7126   echo "$ac_t""yes" 1>&6
7127   :
7128 else
7129   echo "$ac_t""no" 1>&6
7130 with_ldap=no
7131 fi
7132  }
7133 if test "$with_ldap" != "no"; then
7134   
7135 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7136 echo "configure:7137: checking for ldap_search in -lldap" >&5
7137 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7138
7139 xe_check_libs=" -lldap "
7140 cat > conftest.$ac_ext <<EOF
7141 #line 7142 "configure"
7142 #include "confdefs.h"
7143 /* Override any gcc2 internal prototype to avoid an error.  */
7144 /* We use char because int might match the return type of a gcc2
7145     builtin and then its argument prototype would still apply.  */
7146 char ldap_search();
7147
7148 int main() {
7149 ldap_search()
7150 ; return 0; }
7151 EOF
7152 if { (eval echo configure:7153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7153   rm -rf conftest*
7154   eval "ac_cv_lib_$ac_lib_var=yes"
7155 else
7156   echo "configure: failed program was:" >&5
7157   cat conftest.$ac_ext >&5
7158   rm -rf conftest*
7159   eval "ac_cv_lib_$ac_lib_var=no"
7160 fi
7161 rm -f conftest*
7162 xe_check_libs=""
7163
7164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7165   echo "$ac_t""yes" 1>&6
7166   with_ldap_nolber=yes
7167 else
7168   echo "$ac_t""no" 1>&6
7169 with_ldap_nolber=no
7170 fi
7171
7172
7173   test "$with_ldap_nolber" = "no" && { 
7174 xe_msg_checking="for ldap_open in -lldap"
7175 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7176 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7177 echo "configure:7178: checking "$xe_msg_checking"" >&5
7178 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7179
7180 xe_check_libs=" -lldap -llber"
7181 cat > conftest.$ac_ext <<EOF
7182 #line 7183 "configure"
7183 #include "confdefs.h"
7184 /* Override any gcc2 internal prototype to avoid an error.  */
7185 /* We use char because int might match the return type of a gcc2
7186     builtin and then its argument prototype would still apply.  */
7187 char ldap_open();
7188
7189 int main() {
7190 ldap_open()
7191 ; return 0; }
7192 EOF
7193 if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7194   rm -rf conftest*
7195   eval "ac_cv_lib_$ac_lib_var=yes"
7196 else
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -rf conftest*
7200   eval "ac_cv_lib_$ac_lib_var=no"
7201 fi
7202 rm -f conftest*
7203 xe_check_libs=""
7204
7205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7206   echo "$ac_t""yes" 1>&6
7207   with_ldap_lber=yes
7208 else
7209   echo "$ac_t""no" 1>&6
7210 with_ldap_lber=no
7211 fi
7212
7213  }
7214   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7215 xe_msg_checking="for ldap_open in -lldap"
7216 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7217 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7218 echo "configure:7219: checking "$xe_msg_checking"" >&5
7219 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7220
7221 xe_check_libs=" -lldap -llber -lkrb"
7222 cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 /* Override any gcc2 internal prototype to avoid an error.  */
7226 /* We use char because int might match the return type of a gcc2
7227     builtin and then its argument prototype would still apply.  */
7228 char ldap_open();
7229
7230 int main() {
7231 ldap_open()
7232 ; return 0; }
7233 EOF
7234 if { (eval echo configure:7235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7235   rm -rf conftest*
7236   eval "ac_cv_lib_$ac_lib_var=yes"
7237 else
7238   echo "configure: failed program was:" >&5
7239   cat conftest.$ac_ext >&5
7240   rm -rf conftest*
7241   eval "ac_cv_lib_$ac_lib_var=no"
7242 fi
7243 rm -f conftest*
7244 xe_check_libs=""
7245
7246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7247   echo "$ac_t""yes" 1>&6
7248   with_ldap_krb=yes
7249 else
7250   echo "$ac_t""no" 1>&6
7251 with_ldap_krb=no
7252 fi
7253
7254  }
7255   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7256 xe_msg_checking="for ldap_open in -lldap"
7257 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7258 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7259 echo "configure:7260: checking "$xe_msg_checking"" >&5
7260 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7261
7262 xe_check_libs=" -lldap -llber -lkrb -ldes"
7263 cat > conftest.$ac_ext <<EOF
7264 #line 7265 "configure"
7265 #include "confdefs.h"
7266 /* Override any gcc2 internal prototype to avoid an error.  */
7267 /* We use char because int might match the return type of a gcc2
7268     builtin and then its argument prototype would still apply.  */
7269 char ldap_open();
7270
7271 int main() {
7272 ldap_open()
7273 ; return 0; }
7274 EOF
7275 if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7276   rm -rf conftest*
7277   eval "ac_cv_lib_$ac_lib_var=yes"
7278 else
7279   echo "configure: failed program was:" >&5
7280   cat conftest.$ac_ext >&5
7281   rm -rf conftest*
7282   eval "ac_cv_lib_$ac_lib_var=no"
7283 fi
7284 rm -f conftest*
7285 xe_check_libs=""
7286
7287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7288   echo "$ac_t""yes" 1>&6
7289   with_ldap_krbdes=yes
7290 else
7291   echo "$ac_t""no" 1>&6
7292 with_ldap_krbdes=no
7293 fi
7294
7295  }
7296   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
7297 fi
7298 if test "$with_ldap" = "yes"; then
7299   { test "$extra_verbose" = "yes" && cat << \EOF
7300     Defining HAVE_LDAP
7301 EOF
7302 cat >> confdefs.h <<\EOF
7303 #define HAVE_LDAP 1
7304 EOF
7305 }
7306
7307   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7308    echo "    xemacs will be linked with \"eldap.o\""
7309  fi
7310   if test "$with_ldap_nolber" = "yes" ; then
7311     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7312   else
7313     if test "$with_ldap_krb" = "yes" ; then
7314       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7315     fi
7316     if test "$with_ldap_krbdes" = "yes" ; then
7317       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7318       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7319     fi
7320     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7321     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7322   fi
7323   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7324 do
7325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7326 echo "configure:7327: checking for $ac_func" >&5
7327
7328 cat > conftest.$ac_ext <<EOF
7329 #line 7330 "configure"
7330 #include "confdefs.h"
7331 /* System header to define __stub macros and hopefully few prototypes,
7332     which can conflict with char $ac_func(); below.  */
7333 #include <assert.h>
7334 /* Override any gcc2 internal prototype to avoid an error.  */
7335 /* We use char because int might match the return type of a gcc2
7336     builtin and then its argument prototype would still apply.  */
7337 char $ac_func();
7338
7339 int main() {
7340
7341 /* The GNU C library defines this for functions which it implements
7342     to always fail with ENOSYS.  Some functions are actually named
7343     something starting with __ and the normal name is an alias.  */
7344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7345 choke me
7346 #else
7347 $ac_func();
7348 #endif
7349
7350 ; return 0; }
7351 EOF
7352 if { (eval echo configure:7353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7353   rm -rf conftest*
7354   eval "ac_cv_func_$ac_func=yes"
7355 else
7356   echo "configure: failed program was:" >&5
7357   cat conftest.$ac_ext >&5
7358   rm -rf conftest*
7359   eval "ac_cv_func_$ac_func=no"
7360 fi
7361 rm -f conftest*
7362
7363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7364   echo "$ac_t""yes" 1>&6
7365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7366   { test "$extra_verbose" = "yes" && cat << EOF
7367     Defining $ac_tr_func
7368 EOF
7369 cat >> confdefs.h <<EOF
7370 #define $ac_tr_func 1
7371 EOF
7372 }
7373  
7374 else
7375   echo "$ac_t""no" 1>&6
7376 fi
7377 done
7378
7379 fi
7380
7381 if test "$with_postgresql" != "no"; then
7382   echo "checking for PostgreSQL" 1>&6
7383 echo "configure:7384: checking for PostgreSQL" >&5
7384
7385   for header_dir in "" "pgsql/" "postgresql/"; do
7386     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7387 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7388 echo "configure:7389: checking for ${header_dir}libpq-fe.h" >&5
7389
7390 cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7393 #include <${header_dir}libpq-fe.h>
7394 EOF
7395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7396 { (eval echo configure:7397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7398 if test -z "$ac_err"; then
7399   rm -rf conftest*
7400   eval "ac_cv_header_$ac_safe=yes"
7401 else
7402   echo "$ac_err" >&5
7403   echo "configure: failed program was:" >&5
7404   cat conftest.$ac_ext >&5
7405   rm -rf conftest*
7406   eval "ac_cv_header_$ac_safe=no"
7407 fi
7408 rm -f conftest*
7409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7410   echo "$ac_t""yes" 1>&6
7411   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7412 else
7413   echo "$ac_t""no" 1>&6
7414 fi
7415
7416   done
7417
7418   test -n "$libpq_fe_h_file" && { 
7419 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7420 echo "configure:7421: checking for PQconnectdb in -lpq" >&5
7421 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7422
7423 xe_check_libs=" -lpq "
7424 cat > conftest.$ac_ext <<EOF
7425 #line 7426 "configure"
7426 #include "confdefs.h"
7427 /* Override any gcc2 internal prototype to avoid an error.  */
7428 /* We use char because int might match the return type of a gcc2
7429     builtin and then its argument prototype would still apply.  */
7430 char PQconnectdb();
7431
7432 int main() {
7433 PQconnectdb()
7434 ; return 0; }
7435 EOF
7436 if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7437   rm -rf conftest*
7438   eval "ac_cv_lib_$ac_lib_var=yes"
7439 else
7440   echo "configure: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   rm -rf conftest*
7443   eval "ac_cv_lib_$ac_lib_var=no"
7444 fi
7445 rm -f conftest*
7446 xe_check_libs=""
7447
7448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7449   echo "$ac_t""yes" 1>&6
7450   have_libpq=yes
7451 else
7452   echo "$ac_t""no" 1>&6
7453 fi
7454
7455  }
7456
7457   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7458     with_postgresql=yes
7459     { test "$extra_verbose" = "yes" && cat << \EOF
7460     Defining HAVE_POSTGRESQL
7461 EOF
7462 cat >> confdefs.h <<\EOF
7463 #define HAVE_POSTGRESQL 1
7464 EOF
7465 }
7466
7467     
7468 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7469 echo "configure:7470: checking for PQconnectStart in -lpq" >&5
7470 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7471
7472 xe_check_libs=" -lpq "
7473 cat > conftest.$ac_ext <<EOF
7474 #line 7475 "configure"
7475 #include "confdefs.h"
7476 /* Override any gcc2 internal prototype to avoid an error.  */
7477 /* We use char because int might match the return type of a gcc2
7478     builtin and then its argument prototype would still apply.  */
7479 char PQconnectStart();
7480
7481 int main() {
7482 PQconnectStart()
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7486   rm -rf conftest*
7487   eval "ac_cv_lib_$ac_lib_var=yes"
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   eval "ac_cv_lib_$ac_lib_var=no"
7493 fi
7494 rm -f conftest*
7495 xe_check_libs=""
7496
7497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7498   echo "$ac_t""yes" 1>&6
7499   with_postgresqlv7=yes;
7500                  { test "$extra_verbose" = "yes" && cat << \EOF
7501     Defining HAVE_POSTGRESQLV7
7502 EOF
7503 cat >> confdefs.h <<\EOF
7504 #define HAVE_POSTGRESQLV7 1
7505 EOF
7506 }
7507
7508 else
7509   echo "$ac_t""no" 1>&6
7510 fi
7511
7512
7513     { test "$extra_verbose" = "yes" && cat << EOF
7514     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7515 EOF
7516 cat >> confdefs.h <<EOF
7517 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7518 EOF
7519 }
7520
7521     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7522     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7523    echo "    xemacs will be linked with \"postgresql.o\""
7524  fi
7525   elif test "$with_postgresql" = "yes"; then
7526     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7527   fi
7528 fi
7529
7530
7531 if test "$window_system" != "none"; then
7532   echo "checking for graphics libraries" 1>&6
7533 echo "configure:7534: checking for graphics libraries" >&5
7534
7535     xpm_problem=""
7536   if test -z "$with_xpm"; then
7537     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7538 echo "configure:7539: checking for Xpm - no older than 3.4f" >&5
7539     xe_check_libs=-lXpm
7540     cat > conftest.$ac_ext <<EOF
7541 #line 7542 "configure"
7542 #include "confdefs.h"
7543 #define XPM_NUMBERS
7544 #include <X11/xpm.h>
7545     int main(int c, char **v) {
7546     return c == 1 ? 0 :
7547       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7548       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7551 then
7552   ./conftest dummy_arg; xpm_status=$?;
7553       if test "$xpm_status" = "0"; then
7554         with_xpm=yes;
7555       else
7556         with_xpm=no;
7557         if test "$xpm_status" = "1"; then
7558           xpm_problem="Xpm library version and header file version don't match!"
7559         elif test "$xpm_status" = "2"; then
7560           xpm_problem="Xpm library version is too old!"
7561         else
7562           xpm_problem="Internal xpm detection logic error!"
7563         fi
7564         echo "
7565 *** WARNING *** $xpm_problem
7566   I'm not touching that with a 10-foot pole!
7567   If you really want to use the installed version of Xpm, rerun
7568   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7569     fi
7570 else
7571   conftest_rc="$?"
7572   echo "configure: failed program was:" >&5
7573   cat conftest.$ac_ext >&5
7574   rm -fr conftest*
7575   with_xpm=no
7576 fi
7577 rm -fr conftest*
7578     xe_check_libs=
7579     echo "$ac_t""$with_xpm" 1>&6
7580   fi
7581   if test "$with_xpm" = "yes"; then
7582     { test "$extra_verbose" = "yes" && cat << \EOF
7583     Defining HAVE_XPM
7584 EOF
7585 cat >> confdefs.h <<\EOF
7586 #define HAVE_XPM 1
7587 EOF
7588 }
7589
7590     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7591     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7592 echo "configure:7593: checking for \"FOR_MSW\" xpm" >&5
7593     xe_check_libs=-lXpm
7594     cat > conftest.$ac_ext <<EOF
7595 #line 7596 "configure"
7596 #include "confdefs.h"
7597
7598 int main() {
7599 XpmCreatePixmapFromData()
7600 ; return 0; }
7601 EOF
7602 if { (eval echo configure:7603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7603   rm -rf conftest*
7604   xpm_for_msw=no
7605 else
7606   echo "configure: failed program was:" >&5
7607   cat conftest.$ac_ext >&5
7608   rm -rf conftest*
7609   xpm_for_msw=yes
7610 fi
7611 rm -f conftest*
7612     xe_check_libs=
7613     echo "$ac_t""$xpm_for_msw" 1>&6
7614     if test "$xpm_for_msw" = "yes"; then
7615       { test "$extra_verbose" = "yes" && cat << \EOF
7616     Defining FOR_MSW
7617 EOF
7618 cat >> confdefs.h <<\EOF
7619 #define FOR_MSW 1
7620 EOF
7621 }
7622
7623     fi
7624   fi
7625
7626     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7627 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7628 echo "configure:7629: checking for compface.h" >&5
7629
7630 cat > conftest.$ac_ext <<EOF
7631 #line 7632 "configure"
7632 #include "confdefs.h"
7633 #include <compface.h>
7634 EOF
7635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7636 { (eval echo configure:7637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7638 if test -z "$ac_err"; then
7639   rm -rf conftest*
7640   eval "ac_cv_header_$ac_safe=yes"
7641 else
7642   echo "$ac_err" >&5
7643   echo "configure: failed program was:" >&5
7644   cat conftest.$ac_ext >&5
7645   rm -rf conftest*
7646   eval "ac_cv_header_$ac_safe=no"
7647 fi
7648 rm -f conftest*
7649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7650   echo "$ac_t""yes" 1>&6
7651   :
7652 else
7653   echo "$ac_t""no" 1>&6
7654 with_xface=no
7655 fi
7656  }
7657   test -z "$with_xface" && { 
7658 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7659 echo "configure:7660: checking for UnGenFace in -lcompface" >&5
7660 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7661
7662 xe_check_libs=" -lcompface "
7663 cat > conftest.$ac_ext <<EOF
7664 #line 7665 "configure"
7665 #include "confdefs.h"
7666 /* Override any gcc2 internal prototype to avoid an error.  */
7667 /* We use char because int might match the return type of a gcc2
7668     builtin and then its argument prototype would still apply.  */
7669 char UnGenFace();
7670
7671 int main() {
7672 UnGenFace()
7673 ; return 0; }
7674 EOF
7675 if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=yes"
7678 else
7679   echo "configure: failed program was:" >&5
7680   cat conftest.$ac_ext >&5
7681   rm -rf conftest*
7682   eval "ac_cv_lib_$ac_lib_var=no"
7683 fi
7684 rm -f conftest*
7685 xe_check_libs=""
7686
7687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7688   echo "$ac_t""yes" 1>&6
7689   : 
7690 else
7691   echo "$ac_t""no" 1>&6
7692 with_xface=no
7693 fi
7694
7695  }
7696   test -z "$with_xface" && with_xface=yes
7697   if test "$with_xface" = "yes"; then
7698     { test "$extra_verbose" = "yes" && cat << \EOF
7699     Defining HAVE_XFACE
7700 EOF
7701 cat >> confdefs.h <<\EOF
7702 #define HAVE_XFACE 1
7703 EOF
7704 }
7705
7706     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7707   fi
7708
7709         if test "$with_gif" != "no"; then
7710     with_gif="yes"
7711     { test "$extra_verbose" = "yes" && cat << \EOF
7712     Defining HAVE_GIF
7713 EOF
7714 cat >> confdefs.h <<\EOF
7715 #define HAVE_GIF 1
7716 EOF
7717 }
7718
7719     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7720    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7721  fi
7722   fi
7723
7724       if test "$with_png $with_tiff" != "no no"; then
7725     
7726 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7727 echo "configure:7728: checking for inflate in -lc" >&5
7728 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7729
7730 xe_check_libs=" -lc "
7731 cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 /* Override any gcc2 internal prototype to avoid an error.  */
7735 /* We use char because int might match the return type of a gcc2
7736     builtin and then its argument prototype would still apply.  */
7737 char inflate();
7738
7739 int main() {
7740 inflate()
7741 ; return 0; }
7742 EOF
7743 if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7744   rm -rf conftest*
7745   eval "ac_cv_lib_$ac_lib_var=yes"
7746 else
7747   echo "configure: failed program was:" >&5
7748   cat conftest.$ac_ext >&5
7749   rm -rf conftest*
7750   eval "ac_cv_lib_$ac_lib_var=no"
7751 fi
7752 rm -f conftest*
7753 xe_check_libs=""
7754
7755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7756   echo "$ac_t""yes" 1>&6
7757   :
7758 else
7759   echo "$ac_t""no" 1>&6
7760
7761 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7762 echo "configure:7763: checking for inflate in -lz" >&5
7763 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7764
7765 xe_check_libs=" -lz "
7766 cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 /* Override any gcc2 internal prototype to avoid an error.  */
7770 /* We use char because int might match the return type of a gcc2
7771     builtin and then its argument prototype would still apply.  */
7772 char inflate();
7773
7774 int main() {
7775 inflate()
7776 ; return 0; }
7777 EOF
7778 if { (eval echo configure:7779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7779   rm -rf conftest*
7780   eval "ac_cv_lib_$ac_lib_var=yes"
7781 else
7782   echo "configure: failed program was:" >&5
7783   cat conftest.$ac_ext >&5
7784   rm -rf conftest*
7785   eval "ac_cv_lib_$ac_lib_var=no"
7786 fi
7787 rm -f conftest*
7788 xe_check_libs=""
7789
7790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7791   echo "$ac_t""yes" 1>&6
7792   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7793 else
7794   echo "$ac_t""no" 1>&6
7795
7796 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7797 echo "configure:7798: checking for inflate in -lgz" >&5
7798 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7799
7800 xe_check_libs=" -lgz "
7801 cat > conftest.$ac_ext <<EOF
7802 #line 7803 "configure"
7803 #include "confdefs.h"
7804 /* Override any gcc2 internal prototype to avoid an error.  */
7805 /* We use char because int might match the return type of a gcc2
7806     builtin and then its argument prototype would still apply.  */
7807 char inflate();
7808
7809 int main() {
7810 inflate()
7811 ; return 0; }
7812 EOF
7813 if { (eval echo configure:7814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7814   rm -rf conftest*
7815   eval "ac_cv_lib_$ac_lib_var=yes"
7816 else
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   eval "ac_cv_lib_$ac_lib_var=no"
7821 fi
7822 rm -f conftest*
7823 xe_check_libs=""
7824
7825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7826   echo "$ac_t""yes" 1>&6
7827   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7828 else
7829   echo "$ac_t""no" 1>&6
7830 fi
7831
7832
7833 fi
7834
7835
7836 fi
7837
7838
7839   fi
7840
7841     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7842 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7843 echo "configure:7844: checking for jpeglib.h" >&5
7844
7845 cat > conftest.$ac_ext <<EOF
7846 #line 7847 "configure"
7847 #include "confdefs.h"
7848 #include <jpeglib.h>
7849 EOF
7850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7851 { (eval echo configure:7852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7853 if test -z "$ac_err"; then
7854   rm -rf conftest*
7855   eval "ac_cv_header_$ac_safe=yes"
7856 else
7857   echo "$ac_err" >&5
7858   echo "configure: failed program was:" >&5
7859   cat conftest.$ac_ext >&5
7860   rm -rf conftest*
7861   eval "ac_cv_header_$ac_safe=no"
7862 fi
7863 rm -f conftest*
7864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7865   echo "$ac_t""yes" 1>&6
7866   :
7867 else
7868   echo "$ac_t""no" 1>&6
7869 with_jpeg=no
7870 fi
7871  }
7872   test -z "$with_jpeg" && { 
7873 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7874 echo "configure:7875: checking for jpeg_destroy_decompress in -ljpeg" >&5
7875 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7876
7877 xe_check_libs=" -ljpeg "
7878 cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 /* Override any gcc2 internal prototype to avoid an error.  */
7882 /* We use char because int might match the return type of a gcc2
7883     builtin and then its argument prototype would still apply.  */
7884 char jpeg_destroy_decompress();
7885
7886 int main() {
7887 jpeg_destroy_decompress()
7888 ; return 0; }
7889 EOF
7890 if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7891   rm -rf conftest*
7892   eval "ac_cv_lib_$ac_lib_var=yes"
7893 else
7894   echo "configure: failed program was:" >&5
7895   cat conftest.$ac_ext >&5
7896   rm -rf conftest*
7897   eval "ac_cv_lib_$ac_lib_var=no"
7898 fi
7899 rm -f conftest*
7900 xe_check_libs=""
7901
7902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7903   echo "$ac_t""yes" 1>&6
7904   :
7905 else
7906   echo "$ac_t""no" 1>&6
7907 with_jpeg=no
7908 fi
7909
7910  }
7911   test -z "$with_jpeg" && with_jpeg=yes
7912   if test "$with_jpeg" = "yes"; then
7913     { test "$extra_verbose" = "yes" && cat << \EOF
7914     Defining HAVE_JPEG
7915 EOF
7916 cat >> confdefs.h <<\EOF
7917 #define HAVE_JPEG 1
7918 EOF
7919 }
7920
7921     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7922   fi
7923
7924     png_problem=""
7925   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7926 echo "configure:7927: checking for pow" >&5
7927
7928 cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931 /* System header to define __stub macros and hopefully few prototypes,
7932     which can conflict with char pow(); below.  */
7933 #include <assert.h>
7934 /* Override any gcc2 internal prototype to avoid an error.  */
7935 /* We use char because int might match the return type of a gcc2
7936     builtin and then its argument prototype would still apply.  */
7937 char pow();
7938
7939 int main() {
7940
7941 /* The GNU C library defines this for functions which it implements
7942     to always fail with ENOSYS.  Some functions are actually named
7943     something starting with __ and the normal name is an alias.  */
7944 #if defined (__stub_pow) || defined (__stub___pow)
7945 choke me
7946 #else
7947 pow();
7948 #endif
7949
7950 ; return 0; }
7951 EOF
7952 if { (eval echo configure:7953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7953   rm -rf conftest*
7954   eval "ac_cv_func_pow=yes"
7955 else
7956   echo "configure: failed program was:" >&5
7957   cat conftest.$ac_ext >&5
7958   rm -rf conftest*
7959   eval "ac_cv_func_pow=no"
7960 fi
7961 rm -f conftest*
7962
7963 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7964   echo "$ac_t""yes" 1>&6
7965   :
7966 else
7967   echo "$ac_t""no" 1>&6
7968 with_png=no
7969 fi
7970  }
7971   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7972 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7973 echo "configure:7974: checking for png.h" >&5
7974
7975 cat > conftest.$ac_ext <<EOF
7976 #line 7977 "configure"
7977 #include "confdefs.h"
7978 #include <png.h>
7979 EOF
7980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7981 { (eval echo configure:7982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7983 if test -z "$ac_err"; then
7984   rm -rf conftest*
7985   eval "ac_cv_header_$ac_safe=yes"
7986 else
7987   echo "$ac_err" >&5
7988   echo "configure: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   rm -rf conftest*
7991   eval "ac_cv_header_$ac_safe=no"
7992 fi
7993 rm -f conftest*
7994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7995   echo "$ac_t""yes" 1>&6
7996   :
7997 else
7998   echo "$ac_t""no" 1>&6
7999 with_png=no
8000 fi
8001  }
8002   test -z "$with_png" && { 
8003 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8004 echo "configure:8005: checking for png_read_image in -lpng" >&5
8005 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8006
8007 xe_check_libs=" -lpng "
8008 cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8011 /* Override any gcc2 internal prototype to avoid an error.  */
8012 /* We use char because int might match the return type of a gcc2
8013     builtin and then its argument prototype would still apply.  */
8014 char png_read_image();
8015
8016 int main() {
8017 png_read_image()
8018 ; return 0; }
8019 EOF
8020 if { (eval echo configure:8021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8021   rm -rf conftest*
8022   eval "ac_cv_lib_$ac_lib_var=yes"
8023 else
8024   echo "configure: failed program was:" >&5
8025   cat conftest.$ac_ext >&5
8026   rm -rf conftest*
8027   eval "ac_cv_lib_$ac_lib_var=no"
8028 fi
8029 rm -f conftest*
8030 xe_check_libs=""
8031
8032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8033   echo "$ac_t""yes" 1>&6
8034   :
8035 else
8036   echo "$ac_t""no" 1>&6
8037 with_png=no
8038 fi
8039
8040  }
8041   if test -z "$with_png"; then
8042     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8043 echo "configure:8044: checking for workable png version information" >&5
8044     xe_check_libs="-lpng -lz"
8045     cat > conftest.$ac_ext <<EOF
8046 #line 8047 "configure"
8047 #include "confdefs.h"
8048 #include <png.h>
8049     int main(int c, char **v) {
8050     if (c == 1) return 0;
8051     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8052     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8053 EOF
8054 if { (eval echo configure:8055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8055 then
8056   ./conftest dummy_arg; png_status=$?;
8057       if test "$png_status" = "0"; then
8058         with_png=yes;
8059       else
8060         with_png=no;
8061         if test "$png_status" = "1"; then
8062           png_problem="PNG library version and header file don't match!"
8063         elif test "$png_status" = "2"; then
8064           png_problem="PNG library version too old (pre 1.0.2)!"
8065         fi
8066         echo "
8067 *** WARNING *** $png_problem
8068   I'm not touching that with a 10-foot pole!
8069   If you really want to use the installed version of libPNG, rerun
8070   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8071     fi
8072 else
8073   conftest_rc="$?"
8074   echo "configure: failed program was:" >&5
8075   cat conftest.$ac_ext >&5
8076   rm -fr conftest*
8077   with_png=no
8078 fi
8079 rm -fr conftest*
8080     xe_check_libs=
8081     echo "$ac_t""$with_png" 1>&6
8082   fi
8083   if test "$with_png" = "yes"; then
8084     { test "$extra_verbose" = "yes" && cat << \EOF
8085     Defining HAVE_PNG
8086 EOF
8087 cat >> confdefs.h <<\EOF
8088 #define HAVE_PNG 1
8089 EOF
8090 }
8091
8092     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8093   fi
8094
8095     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8096 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8097 echo "configure:8098: checking for tiffio.h" >&5
8098
8099 cat > conftest.$ac_ext <<EOF
8100 #line 8101 "configure"
8101 #include "confdefs.h"
8102 #include <tiffio.h>
8103 EOF
8104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8105 { (eval echo configure:8106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8107 if test -z "$ac_err"; then
8108   rm -rf conftest*
8109   eval "ac_cv_header_$ac_safe=yes"
8110 else
8111   echo "$ac_err" >&5
8112   echo "configure: failed program was:" >&5
8113   cat conftest.$ac_ext >&5
8114   rm -rf conftest*
8115   eval "ac_cv_header_$ac_safe=no"
8116 fi
8117 rm -f conftest*
8118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8119   echo "$ac_t""yes" 1>&6
8120   :
8121 else
8122   echo "$ac_t""no" 1>&6
8123 with_tiff=no
8124 fi
8125  }
8126   test -z "$with_tiff" && { 
8127 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8128 echo "configure:8129: checking for TIFFClientOpen in -ltiff" >&5
8129 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8130
8131 xe_check_libs=" -ltiff "
8132 cat > conftest.$ac_ext <<EOF
8133 #line 8134 "configure"
8134 #include "confdefs.h"
8135 /* Override any gcc2 internal prototype to avoid an error.  */
8136 /* We use char because int might match the return type of a gcc2
8137     builtin and then its argument prototype would still apply.  */
8138 char TIFFClientOpen();
8139
8140 int main() {
8141 TIFFClientOpen()
8142 ; return 0; }
8143 EOF
8144 if { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8145   rm -rf conftest*
8146   eval "ac_cv_lib_$ac_lib_var=yes"
8147 else
8148   echo "configure: failed program was:" >&5
8149   cat conftest.$ac_ext >&5
8150   rm -rf conftest*
8151   eval "ac_cv_lib_$ac_lib_var=no"
8152 fi
8153 rm -f conftest*
8154 xe_check_libs=""
8155
8156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8157   echo "$ac_t""yes" 1>&6
8158   :
8159 else
8160   echo "$ac_t""no" 1>&6
8161 with_tiff=no
8162 fi
8163
8164  }
8165   test -z "$with_tiff" && with_tiff=yes
8166   if test "$with_tiff" = "yes"; then
8167     { test "$extra_verbose" = "yes" && cat << \EOF
8168     Defining HAVE_TIFF
8169 EOF
8170 cat >> confdefs.h <<\EOF
8171 #define HAVE_TIFF 1
8172 EOF
8173 }
8174
8175     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8176   fi
8177 fi
8178
8179
8180 if test "$with_x11" = "yes"; then
8181
8182   echo "checking for X11 graphics libraries" 1>&6
8183 echo "configure:8184: checking for X11 graphics libraries" >&5
8184
8185   echo "checking for the Athena widgets" 1>&6
8186 echo "configure:8187: checking for the Athena widgets" >&5
8187
8188     case "$with_athena" in
8189         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8190     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8191     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8192     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8193     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8194     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8195   esac
8196
8197     if test "$athena_3d" = "no"; then
8198     
8199 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8200 echo "configure:8201: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8201 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8202
8203 xe_check_libs=" -l$athena_variant "
8204 cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 /* Override any gcc2 internal prototype to avoid an error.  */
8208 /* We use char because int might match the return type of a gcc2
8209     builtin and then its argument prototype would still apply.  */
8210 char XawScrollbarSetThumb();
8211
8212 int main() {
8213 XawScrollbarSetThumb()
8214 ; return 0; }
8215 EOF
8216 if { (eval echo configure:8217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8217   rm -rf conftest*
8218   eval "ac_cv_lib_$ac_lib_var=yes"
8219 else
8220   echo "configure: failed program was:" >&5
8221   cat conftest.$ac_ext >&5
8222   rm -rf conftest*
8223   eval "ac_cv_lib_$ac_lib_var=no"
8224 fi
8225 rm -f conftest*
8226 xe_check_libs=""
8227
8228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8229   echo "$ac_t""yes" 1>&6
8230           
8231 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8232 echo "configure:8233: checking for threeDClassRec in -l$athena_variant" >&5
8233 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8234
8235 xe_check_libs=" -l$athena_variant "
8236 cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239 /* Override any gcc2 internal prototype to avoid an error.  */
8240 /* We use char because int might match the return type of a gcc2
8241     builtin and then its argument prototype would still apply.  */
8242 char threeDClassRec();
8243
8244 int main() {
8245 threeDClassRec()
8246 ; return 0; }
8247 EOF
8248 if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8249   rm -rf conftest*
8250   eval "ac_cv_lib_$ac_lib_var=yes"
8251 else
8252   echo "configure: failed program was:" >&5
8253   cat conftest.$ac_ext >&5
8254   rm -rf conftest*
8255   eval "ac_cv_lib_$ac_lib_var=no"
8256 fi
8257 rm -f conftest*
8258 xe_check_libs=""
8259
8260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8261   echo "$ac_t""yes" 1>&6
8262   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8263 else
8264   echo "$ac_t""no" 1>&6
8265 athena_lib=$athena_variant
8266 fi
8267
8268
8269       
8270 else
8271   echo "$ac_t""no" 1>&6
8272 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8273 fi
8274
8275
8276   else
8277         
8278 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8279 echo "configure:8280: checking for threeDClassRec in -l$athena_variant" >&5
8280 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8281
8282 xe_check_libs=" -l$athena_variant "
8283 cat > conftest.$ac_ext <<EOF
8284 #line 8285 "configure"
8285 #include "confdefs.h"
8286 /* Override any gcc2 internal prototype to avoid an error.  */
8287 /* We use char because int might match the return type of a gcc2
8288     builtin and then its argument prototype would still apply.  */
8289 char threeDClassRec();
8290
8291 int main() {
8292 threeDClassRec()
8293 ; return 0; }
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296   rm -rf conftest*
8297   eval "ac_cv_lib_$ac_lib_var=yes"
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=no"
8303 fi
8304 rm -f conftest*
8305 xe_check_libs=""
8306
8307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8308   echo "$ac_t""yes" 1>&6
8309   athena_lib=$athena_variant
8310 else
8311   echo "$ac_t""no" 1>&6
8312 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8313 echo "configure:8314: checking for threeDClassRec in -lXaw" >&5
8314 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8315
8316 xe_check_libs=" -lXaw "
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char threeDClassRec();
8324
8325 int main() {
8326 threeDClassRec()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   eval "ac_cv_lib_$ac_lib_var=yes"
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=no"
8337 fi
8338 rm -f conftest*
8339 xe_check_libs=""
8340
8341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8342   echo "$ac_t""yes" 1>&6
8343   athena_lib=Xaw;
8344           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8345         
8346 else
8347   echo "$ac_t""no" 1>&6
8348 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8349 fi
8350
8351
8352 fi
8353
8354
8355   fi
8356
8357     if test "$athena_3d" = "no"; then
8358     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8359 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8360 echo "configure:8361: checking for X11/Xaw/ThreeD.h" >&5
8361
8362 cat > conftest.$ac_ext <<EOF
8363 #line 8364 "configure"
8364 #include "confdefs.h"
8365 #include <X11/Xaw/ThreeD.h>
8366 EOF
8367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8368 { (eval echo configure:8369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8370 if test -z "$ac_err"; then
8371   rm -rf conftest*
8372   eval "ac_cv_header_$ac_safe=yes"
8373 else
8374   echo "$ac_err" >&5
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=no"
8379 fi
8380 rm -f conftest*
8381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8382   echo "$ac_t""yes" 1>&6
8383   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8384 else
8385   echo "$ac_t""no" 1>&6
8386 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8387 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8388 echo "configure:8389: checking for X11/Xaw/XawInit.h" >&5
8389
8390 cat > conftest.$ac_ext <<EOF
8391 #line 8392 "configure"
8392 #include "confdefs.h"
8393 #include <X11/Xaw/XawInit.h>
8394 EOF
8395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8396 { (eval echo configure:8397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8398 if test -z "$ac_err"; then
8399   rm -rf conftest*
8400   eval "ac_cv_header_$ac_safe=yes"
8401 else
8402   echo "$ac_err" >&5
8403   echo "configure: failed program was:" >&5
8404   cat conftest.$ac_ext >&5
8405   rm -rf conftest*
8406   eval "ac_cv_header_$ac_safe=no"
8407 fi
8408 rm -f conftest*
8409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8410   echo "$ac_t""yes" 1>&6
8411   athena_h_path=X11/Xaw
8412 else
8413   echo "$ac_t""no" 1>&6
8414 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8415 fi
8416
8417 fi
8418
8419   else
8420             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8421 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8422 echo "configure:8423: checking for X11/$athena_variant/XawInit.h" >&5
8423
8424 cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 #include <X11/$athena_variant/XawInit.h>
8428 EOF
8429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8430 { (eval echo configure:8431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8432 if test -z "$ac_err"; then
8433   rm -rf conftest*
8434   eval "ac_cv_header_$ac_safe=yes"
8435 else
8436   echo "$ac_err" >&5
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_header_$ac_safe=no"
8441 fi
8442 rm -f conftest*
8443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8444   echo "$ac_t""yes" 1>&6
8445   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8446 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8447 echo "configure:8448: checking for X11/$athena_variant/ThreeD.h" >&5
8448
8449 cat > conftest.$ac_ext <<EOF
8450 #line 8451 "configure"
8451 #include "confdefs.h"
8452 #include <X11/$athena_variant/ThreeD.h>
8453 EOF
8454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8455 { (eval echo configure:8456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8457 if test -z "$ac_err"; then
8458   rm -rf conftest*
8459   eval "ac_cv_header_$ac_safe=yes"
8460 else
8461   echo "$ac_err" >&5
8462   echo "configure: failed program was:" >&5
8463   cat conftest.$ac_ext >&5
8464   rm -rf conftest*
8465   eval "ac_cv_header_$ac_safe=no"
8466 fi
8467 rm -f conftest*
8468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8469   echo "$ac_t""yes" 1>&6
8470   athena_h_path=X11/$athena_variant
8471 else
8472   echo "$ac_t""no" 1>&6
8473 fi
8474
8475 else
8476   echo "$ac_t""no" 1>&6
8477 fi
8478
8479
8480         if test -z "$athena_h_path"; then
8481       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8482 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8483 echo "configure:8484: checking for $athena_variant/XawInit.h" >&5
8484
8485 cat > conftest.$ac_ext <<EOF
8486 #line 8487 "configure"
8487 #include "confdefs.h"
8488 #include <$athena_variant/XawInit.h>
8489 EOF
8490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8491 { (eval echo configure:8492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8493 if test -z "$ac_err"; then
8494   rm -rf conftest*
8495   eval "ac_cv_header_$ac_safe=yes"
8496 else
8497   echo "$ac_err" >&5
8498   echo "configure: failed program was:" >&5
8499   cat conftest.$ac_ext >&5
8500   rm -rf conftest*
8501   eval "ac_cv_header_$ac_safe=no"
8502 fi
8503 rm -f conftest*
8504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8505   echo "$ac_t""yes" 1>&6
8506   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8507 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8508 echo "configure:8509: checking for $athena_variant/ThreeD.h" >&5
8509
8510 cat > conftest.$ac_ext <<EOF
8511 #line 8512 "configure"
8512 #include "confdefs.h"
8513 #include <$athena_variant/ThreeD.h>
8514 EOF
8515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8516 { (eval echo configure:8517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8518 if test -z "$ac_err"; then
8519   rm -rf conftest*
8520   eval "ac_cv_header_$ac_safe=yes"
8521 else
8522   echo "$ac_err" >&5
8523   echo "configure: failed program was:" >&5
8524   cat conftest.$ac_ext >&5
8525   rm -rf conftest*
8526   eval "ac_cv_header_$ac_safe=no"
8527 fi
8528 rm -f conftest*
8529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8530   echo "$ac_t""yes" 1>&6
8531   athena_h_path=$athena_variant
8532 else
8533   echo "$ac_t""no" 1>&6
8534 fi
8535
8536 else
8537   echo "$ac_t""no" 1>&6
8538 fi
8539
8540     fi
8541
8542         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8543       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8544 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8545 echo "configure:8546: checking for X11/Xaw3d/XawInit.h" >&5
8546
8547 cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 #include <X11/Xaw3d/XawInit.h>
8551 EOF
8552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8553 { (eval echo configure:8554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8555 if test -z "$ac_err"; then
8556   rm -rf conftest*
8557   eval "ac_cv_header_$ac_safe=yes"
8558 else
8559   echo "$ac_err" >&5
8560   echo "configure: failed program was:" >&5
8561   cat conftest.$ac_ext >&5
8562   rm -rf conftest*
8563   eval "ac_cv_header_$ac_safe=no"
8564 fi
8565 rm -f conftest*
8566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8567   echo "$ac_t""yes" 1>&6
8568   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8569 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8570 echo "configure:8571: checking for X11/Xaw3d/ThreeD.h" >&5
8571
8572 cat > conftest.$ac_ext <<EOF
8573 #line 8574 "configure"
8574 #include "confdefs.h"
8575 #include <X11/Xaw3d/ThreeD.h>
8576 EOF
8577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8578 { (eval echo configure:8579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8580 if test -z "$ac_err"; then
8581   rm -rf conftest*
8582   eval "ac_cv_header_$ac_safe=yes"
8583 else
8584   echo "$ac_err" >&5
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -rf conftest*
8588   eval "ac_cv_header_$ac_safe=no"
8589 fi
8590 rm -f conftest*
8591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8592   echo "$ac_t""yes" 1>&6
8593   
8594             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8595             athena_h_path=X11/Xaw3d
8596           
8597 else
8598   echo "$ac_t""no" 1>&6
8599 fi
8600
8601 else
8602   echo "$ac_t""no" 1>&6
8603 fi
8604
8605     fi
8606
8607         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8608       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8609 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8610 echo "configure:8611: checking for Xaw3d/XawInit.h" >&5
8611
8612 cat > conftest.$ac_ext <<EOF
8613 #line 8614 "configure"
8614 #include "confdefs.h"
8615 #include <Xaw3d/XawInit.h>
8616 EOF
8617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8618 { (eval echo configure:8619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8620 if test -z "$ac_err"; then
8621   rm -rf conftest*
8622   eval "ac_cv_header_$ac_safe=yes"
8623 else
8624   echo "$ac_err" >&5
8625   echo "configure: failed program was:" >&5
8626   cat conftest.$ac_ext >&5
8627   rm -rf conftest*
8628   eval "ac_cv_header_$ac_safe=no"
8629 fi
8630 rm -f conftest*
8631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8632   echo "$ac_t""yes" 1>&6
8633   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8634 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8635 echo "configure:8636: checking for Xaw3d/ThreeD.h" >&5
8636
8637 cat > conftest.$ac_ext <<EOF
8638 #line 8639 "configure"
8639 #include "confdefs.h"
8640 #include <Xaw3d/ThreeD.h>
8641 EOF
8642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8643 { (eval echo configure:8644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8645 if test -z "$ac_err"; then
8646   rm -rf conftest*
8647   eval "ac_cv_header_$ac_safe=yes"
8648 else
8649   echo "$ac_err" >&5
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -rf conftest*
8653   eval "ac_cv_header_$ac_safe=no"
8654 fi
8655 rm -f conftest*
8656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8657   echo "$ac_t""yes" 1>&6
8658   
8659             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8660             athena_h_path=Xaw3d
8661           
8662 else
8663   echo "$ac_t""no" 1>&6
8664 fi
8665
8666 else
8667   echo "$ac_t""no" 1>&6
8668 fi
8669
8670     fi
8671
8672             if test -z "$athena_h_path"; then
8673       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8674 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8675 echo "configure:8676: checking for X11/Xaw/ThreeD.h" >&5
8676
8677 cat > conftest.$ac_ext <<EOF
8678 #line 8679 "configure"
8679 #include "confdefs.h"
8680 #include <X11/Xaw/ThreeD.h>
8681 EOF
8682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8683 { (eval echo configure:8684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8685 if test -z "$ac_err"; then
8686   rm -rf conftest*
8687   eval "ac_cv_header_$ac_safe=yes"
8688 else
8689   echo "$ac_err" >&5
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   eval "ac_cv_header_$ac_safe=no"
8694 fi
8695 rm -f conftest*
8696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8697   echo "$ac_t""yes" 1>&6
8698   
8699           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8700           athena_h_path=X11/Xaw
8701         
8702 else
8703   echo "$ac_t""no" 1>&6
8704 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8705 fi
8706
8707     fi
8708   fi
8709
8710     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8711     have_xaw=yes
8712   else
8713     have_xaw=no
8714   fi
8715
8716     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8717 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8718 echo "configure:8719: checking for Xm/Xm.h" >&5
8719
8720 cat > conftest.$ac_ext <<EOF
8721 #line 8722 "configure"
8722 #include "confdefs.h"
8723 #include <Xm/Xm.h>
8724 EOF
8725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8726 { (eval echo configure:8727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8728 if test -z "$ac_err"; then
8729   rm -rf conftest*
8730   eval "ac_cv_header_$ac_safe=yes"
8731 else
8732   echo "$ac_err" >&5
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   eval "ac_cv_header_$ac_safe=no"
8737 fi
8738 rm -f conftest*
8739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8740   echo "$ac_t""yes" 1>&6
8741   
8742 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8743 echo "configure:8744: checking for XmStringFree in -lXm" >&5
8744 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8745
8746 xe_check_libs=" -lXm "
8747 cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 /* Override any gcc2 internal prototype to avoid an error.  */
8751 /* We use char because int might match the return type of a gcc2
8752     builtin and then its argument prototype would still apply.  */
8753 char XmStringFree();
8754
8755 int main() {
8756 XmStringFree()
8757 ; return 0; }
8758 EOF
8759 if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8760   rm -rf conftest*
8761   eval "ac_cv_lib_$ac_lib_var=yes"
8762 else
8763   echo "configure: failed program was:" >&5
8764   cat conftest.$ac_ext >&5
8765   rm -rf conftest*
8766   eval "ac_cv_lib_$ac_lib_var=no"
8767 fi
8768 rm -f conftest*
8769 xe_check_libs=""
8770
8771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8772   echo "$ac_t""yes" 1>&6
8773   have_motif=yes
8774 else
8775   echo "$ac_t""no" 1>&6
8776 have_motif=no
8777 fi
8778
8779
8780 else
8781   echo "$ac_t""no" 1>&6
8782 have_motif=no
8783 fi
8784
8785
8786   if test "$have_motif" = "yes"; then
8787         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8788 echo "configure:8789: checking for Lesstif" >&5
8789     cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 #include <Xm/Xm.h>
8793 #ifdef LESSTIF_VERSION
8794 yes
8795 #endif
8796
8797 EOF
8798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8799   egrep "yes" >/dev/null 2>&1; then
8800   rm -rf conftest*
8801   have_lesstif=yes
8802 else
8803   rm -rf conftest*
8804   have_lesstif=no
8805 fi
8806 rm -f conftest*
8807
8808   echo "$ac_t""$have_lesstif" 1>&6
8809   fi
8810
8811 fi 
8812
8813 case "$with_menubars" in "" | "yes" | "athena" )
8814   with_menubars="lucid" ;;
8815 esac
8816 case "$with_dialogs" in "" | "yes" | "lucid" )
8817   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8818   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8819   else with_dialogs=no
8820   fi ;;
8821 esac
8822 case "$with_scrollbars" in "" | "yes" )
8823   with_scrollbars="lucid" ;;
8824 esac
8825 case "$with_widgets" in "" | "yes" | "lucid")
8826   if   test "$have_motif" = "yes"; then with_widgets="motif"
8827   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8828   else with_widgets=no
8829   fi ;;
8830 esac
8831
8832 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8833
8834 case "$all_widgets" in
8835   *athena* )
8836     if test "$have_xaw" != "yes"; then
8837       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8838     fi
8839
8840         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8841
8842         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8843
8844                     { test "$extra_verbose" = "yes" && cat << EOF
8845     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8846 EOF
8847 cat >> confdefs.h <<EOF
8848 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8849 EOF
8850 }
8851
8852     { test "$extra_verbose" = "yes" && cat << EOF
8853     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8854 EOF
8855 cat >> confdefs.h <<EOF
8856 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8857 EOF
8858 }
8859
8860     { test "$extra_verbose" = "yes" && cat << EOF
8861     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8862 EOF
8863 cat >> confdefs.h <<EOF
8864 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8865 EOF
8866 }
8867
8868     { test "$extra_verbose" = "yes" && cat << EOF
8869     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8870 EOF
8871 cat >> confdefs.h <<EOF
8872 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8873 EOF
8874 }
8875
8876     { test "$extra_verbose" = "yes" && cat << EOF
8877     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8878 EOF
8879 cat >> confdefs.h <<EOF
8880 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8881 EOF
8882 }
8883
8884     { test "$extra_verbose" = "yes" && cat << EOF
8885     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8886 EOF
8887 cat >> confdefs.h <<EOF
8888 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8889 EOF
8890 }
8891
8892     { test "$extra_verbose" = "yes" && cat << EOF
8893     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8894 EOF
8895 cat >> confdefs.h <<EOF
8896 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8897 EOF
8898 }
8899
8900     { test "$extra_verbose" = "yes" && cat << EOF
8901     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8902 EOF
8903 cat >> confdefs.h <<EOF
8904 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8905 EOF
8906 }
8907
8908     { test "$extra_verbose" = "yes" && cat << EOF
8909     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8910 EOF
8911 cat >> confdefs.h <<EOF
8912 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8913 EOF
8914 }
8915
8916     { test "$extra_verbose" = "yes" && cat << EOF
8917     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8918 EOF
8919 cat >> confdefs.h <<EOF
8920 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8921 EOF
8922 }
8923
8924
8925     { test "$extra_verbose" = "yes" && cat << \EOF
8926     Defining LWLIB_USES_ATHENA
8927 EOF
8928 cat >> confdefs.h <<\EOF
8929 #define LWLIB_USES_ATHENA 1
8930 EOF
8931 }
8932
8933     { test "$extra_verbose" = "yes" && cat << \EOF
8934     Defining NEED_ATHENA
8935 EOF
8936 cat >> confdefs.h <<\EOF
8937 #define NEED_ATHENA 1
8938 EOF
8939 }
8940
8941     need_athena="yes"
8942
8943     if test "$athena_3d" = "yes"; then
8944       { test "$extra_verbose" = "yes" && cat << \EOF
8945     Defining HAVE_ATHENA_3D
8946 EOF
8947 cat >> confdefs.h <<\EOF
8948 #define HAVE_ATHENA_3D 1
8949 EOF
8950 }
8951
8952     fi
8953   ;;
8954 esac
8955
8956 case "$all_widgets" in *motif* )
8957   { test "$extra_verbose" = "yes" && cat << \EOF
8958     Defining LWLIB_USES_MOTIF
8959 EOF
8960 cat >> confdefs.h <<\EOF
8961 #define LWLIB_USES_MOTIF 1
8962 EOF
8963 }
8964
8965   { test "$extra_verbose" = "yes" && cat << \EOF
8966     Defining NEED_MOTIF
8967 EOF
8968 cat >> confdefs.h <<\EOF
8969 #define NEED_MOTIF 1
8970 EOF
8971 }
8972
8973   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8974   need_motif=yes ;;
8975 esac
8976
8977 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8978 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8979 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8980 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8981         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8982 case "$with_widgets" in athena* )
8983         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;;
8984 esac
8985 case "$all_widgets" in *lucid* )
8986   { test "$extra_verbose" = "yes" && cat << \EOF
8987     Defining NEED_LUCID
8988 EOF
8989 cat >> confdefs.h <<\EOF
8990 #define NEED_LUCID 1
8991 EOF
8992 }
8993
8994   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8995 esac
8996
8997
8998
8999 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9000     Defining LWLIB_SCROLLBARS_ATHENA
9001 EOF
9002 cat >> confdefs.h <<\EOF
9003 #define LWLIB_SCROLLBARS_ATHENA 1
9004 EOF
9005 }
9006
9007 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9008     Defining LWLIB_DIALOGS_ATHENA
9009 EOF
9010 cat >> confdefs.h <<\EOF
9011 #define LWLIB_DIALOGS_ATHENA 1
9012 EOF
9013 }
9014
9015
9016 if test "$athena_3d" = "yes"; then
9017   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9018     Defining LWLIB_SCROLLBARS_ATHENA3D
9019 EOF
9020 cat >> confdefs.h <<\EOF
9021 #define LWLIB_SCROLLBARS_ATHENA3D 1
9022 EOF
9023 }
9024
9025   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9026     Defining LWLIB_DIALOGS_ATHENA3D
9027 EOF
9028 cat >> confdefs.h <<\EOF
9029 #define LWLIB_DIALOGS_ATHENA3D 1
9030 EOF
9031 }
9032
9033 fi
9034
9035 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9036     Defining LWLIB_WIDGETS_ATHENA
9037 EOF
9038 cat >> confdefs.h <<\EOF
9039 #define LWLIB_WIDGETS_ATHENA 1
9040 EOF
9041 }
9042 ;; esac
9043 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9044         { test "$extra_verbose" = "yes" && cat << \EOF
9045     Defining LWLIB_TABS_LUCID
9046 EOF
9047 cat >> confdefs.h <<\EOF
9048 #define LWLIB_TABS_LUCID 1
9049 EOF
9050 }
9051
9052
9053 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9054     Defining HAVE_MENUBARS
9055 EOF
9056 cat >> confdefs.h <<\EOF
9057 #define HAVE_MENUBARS 1
9058 EOF
9059 }
9060
9061 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9062     Defining HAVE_SCROLLBARS
9063 EOF
9064 cat >> confdefs.h <<\EOF
9065 #define HAVE_SCROLLBARS 1
9066 EOF
9067 }
9068
9069 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9070     Defining HAVE_DIALOGS
9071 EOF
9072 cat >> confdefs.h <<\EOF
9073 #define HAVE_DIALOGS 1
9074 EOF
9075 }
9076
9077 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9078     Defining HAVE_TOOLBARS
9079 EOF
9080 cat >> confdefs.h <<\EOF
9081 #define HAVE_TOOLBARS 1
9082 EOF
9083 }
9084
9085 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9086     Defining HAVE_WIDGETS
9087 EOF
9088 cat >> confdefs.h <<\EOF
9089 #define HAVE_WIDGETS 1
9090 EOF
9091 }
9092
9093
9094 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9095     Defining LWLIB_MENUBARS_LUCID
9096 EOF
9097 cat >> confdefs.h <<\EOF
9098 #define LWLIB_MENUBARS_LUCID 1
9099 EOF
9100 }
9101
9102 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9103     Defining LWLIB_SCROLLBARS_LUCID
9104 EOF
9105 cat >> confdefs.h <<\EOF
9106 #define LWLIB_SCROLLBARS_LUCID 1
9107 EOF
9108 }
9109
9110
9111 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9112     Defining LWLIB_MENUBARS_MOTIF
9113 EOF
9114 cat >> confdefs.h <<\EOF
9115 #define LWLIB_MENUBARS_MOTIF 1
9116 EOF
9117 }
9118
9119 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9120     Defining LWLIB_SCROLLBARS_MOTIF
9121 EOF
9122 cat >> confdefs.h <<\EOF
9123 #define LWLIB_SCROLLBARS_MOTIF 1
9124 EOF
9125 }
9126
9127 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9128     Defining LWLIB_DIALOGS_MOTIF
9129 EOF
9130 cat >> confdefs.h <<\EOF
9131 #define LWLIB_DIALOGS_MOTIF 1
9132 EOF
9133 }
9134
9135 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9136     Defining LWLIB_WIDGETS_MOTIF
9137 EOF
9138 cat >> confdefs.h <<\EOF
9139 #define LWLIB_WIDGETS_MOTIF 1
9140 EOF
9141 }
9142
9143
9144 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9145    echo "    xemacs will be linked with \"menubar.o\""
9146  fi
9147 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9148    echo "    xemacs will be linked with \"scrollbar.o\""
9149  fi
9150 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9151    echo "    xemacs will be linked with \"dialog.o\""
9152  fi
9153 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9154    echo "    xemacs will be linked with \"toolbar.o\""
9155  fi
9156
9157 if test "$with_x11" = "yes"; then
9158   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9159    echo "    xemacs will be linked with \"menubar-x.o\""
9160  fi
9161   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9162    echo "    xemacs will be linked with \"scrollbar-x.o\""
9163  fi
9164   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9165    echo "    xemacs will be linked with \"dialog-x.o\""
9166  fi
9167   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9168    echo "    xemacs will be linked with \"toolbar-x.o\""
9169  fi
9170   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9171    echo "    xemacs will be linked with \"gui-x.o\""
9172  fi
9173 fi
9174
9175
9176 test -z "$with_mule" && with_mule=no
9177 test -z "$with_file_coding" && with_file_coding=no
9178
9179
9180 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9181   { test "$extra_verbose" = "yes" && cat << \EOF
9182     Defining FILE_CODING
9183 EOF
9184 cat >> confdefs.h <<\EOF
9185 #define FILE_CODING 1
9186 EOF
9187 }
9188
9189   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9190    echo "    xemacs will be linked with \"file-coding.o\""
9191  fi
9192 fi
9193
9194 if test "$with_mule" = "yes" ; then
9195   echo "checking for Mule-related features" 1>&6
9196 echo "configure:9197: checking for Mule-related features" >&5
9197   { test "$extra_verbose" = "yes" && cat << \EOF
9198     Defining MULE
9199 EOF
9200 cat >> confdefs.h <<\EOF
9201 #define MULE 1
9202 EOF
9203 }
9204
9205   { test "$extra_verbose" = "yes" && cat << \EOF
9206     Defining FILE_CODING
9207 EOF
9208 cat >> confdefs.h <<\EOF
9209 #define FILE_CODING 1
9210 EOF
9211 }
9212
9213   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9214    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9215  fi
9216   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9217     { test "$extra_verbose" = "yes" && cat << \EOF
9218     Defining TEXT_CODING
9219 EOF
9220 cat >> confdefs.h <<\EOF
9221 #define TEXT_CODING 1
9222 EOF
9223 }
9224
9225     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9226    echo "    xemacs will be linked with \"text-coding.o\""
9227  fi
9228   else
9229     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9230    echo "    xemacs will be linked with \"file-coding.o\""
9231  fi
9232   fi
9233     for ac_hdr in libintl.h
9234 do
9235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9237 echo "configure:9238: checking for $ac_hdr" >&5
9238
9239 cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242 #include <$ac_hdr>
9243 EOF
9244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9245 { (eval echo configure:9246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9247 if test -z "$ac_err"; then
9248   rm -rf conftest*
9249   eval "ac_cv_header_$ac_safe=yes"
9250 else
9251   echo "$ac_err" >&5
9252   echo "configure: failed program was:" >&5
9253   cat conftest.$ac_ext >&5
9254   rm -rf conftest*
9255   eval "ac_cv_header_$ac_safe=no"
9256 fi
9257 rm -f conftest*
9258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9259   echo "$ac_t""yes" 1>&6
9260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9261   { test "$extra_verbose" = "yes" && cat << EOF
9262     Defining $ac_tr_hdr
9263 EOF
9264 cat >> confdefs.h <<EOF
9265 #define $ac_tr_hdr 1
9266 EOF
9267 }
9268  
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272 done
9273
9274   
9275 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9276 echo "configure:9277: checking for strerror in -lintl" >&5
9277 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9278
9279 xe_check_libs=" -lintl "
9280 cat > conftest.$ac_ext <<EOF
9281 #line 9282 "configure"
9282 #include "confdefs.h"
9283 /* Override any gcc2 internal prototype to avoid an error.  */
9284 /* We use char because int might match the return type of a gcc2
9285     builtin and then its argument prototype would still apply.  */
9286 char strerror();
9287
9288 int main() {
9289 strerror()
9290 ; return 0; }
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=yes"
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -rf conftest*
9299   eval "ac_cv_lib_$ac_lib_var=no"
9300 fi
9301 rm -f conftest*
9302 xe_check_libs=""
9303
9304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9305   echo "$ac_t""yes" 1>&6
9306     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9308   { test "$extra_verbose" = "yes" && cat << EOF
9309     Defining $ac_tr_lib
9310 EOF
9311 cat >> confdefs.h <<EOF
9312 #define $ac_tr_lib 1
9313 EOF
9314 }
9315
9316   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9317
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322
9323
9324   if test "$with_utf_2000" = "yes" ; then
9325     { test "$extra_verbose" = "yes" && cat << \EOF
9326     Defining CHAR_IS_UCS4
9327 EOF
9328 cat >> confdefs.h <<\EOF
9329 #define CHAR_IS_UCS4 1
9330 EOF
9331 }
9332
9333     { test "$extra_verbose" = "yes" && cat << \EOF
9334     Defining UTF2000
9335 EOF
9336 cat >> confdefs.h <<\EOF
9337 #define UTF2000 1
9338 EOF
9339 }
9340
9341     { test "$extra_verbose" = "yes" && cat << \EOF
9342     Defining HAVE_GGC
9343 EOF
9344 cat >> confdefs.h <<\EOF
9345 #define HAVE_GGC 1
9346 EOF
9347 }
9348
9349   fi
9350
9351   echo "checking for Mule input methods" 1>&6
9352 echo "configure:9353: checking for Mule input methods" >&5
9353         case "$with_xim" in "" | "yes" )
9354     echo "checking for XIM" 1>&6
9355 echo "configure:9356: checking for XIM" >&5
9356     
9357 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9358 echo "configure:9359: checking for XOpenIM in -lX11" >&5
9359 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9360
9361 xe_check_libs=" -lX11 "
9362 cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365 /* Override any gcc2 internal prototype to avoid an error.  */
9366 /* We use char because int might match the return type of a gcc2
9367     builtin and then its argument prototype would still apply.  */
9368 char XOpenIM();
9369
9370 int main() {
9371 XOpenIM()
9372 ; return 0; }
9373 EOF
9374 if { (eval echo configure:9375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9375   rm -rf conftest*
9376   eval "ac_cv_lib_$ac_lib_var=yes"
9377 else
9378   echo "configure: failed program was:" >&5
9379   cat conftest.$ac_ext >&5
9380   rm -rf conftest*
9381   eval "ac_cv_lib_$ac_lib_var=no"
9382 fi
9383 rm -f conftest*
9384 xe_check_libs=""
9385
9386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9387   echo "$ac_t""yes" 1>&6
9388   with_xim=xlib
9389 else
9390   echo "$ac_t""no" 1>&6
9391 with_xim=no
9392 fi
9393
9394
9395         if test "$have_motif $have_lesstif" = "yes no"; then
9396       
9397 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9398 echo "configure:9399: checking for XmImMbLookupString in -lXm" >&5
9399 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9400
9401 xe_check_libs=" -lXm "
9402 cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 /* Override any gcc2 internal prototype to avoid an error.  */
9406 /* We use char because int might match the return type of a gcc2
9407     builtin and then its argument prototype would still apply.  */
9408 char XmImMbLookupString();
9409
9410 int main() {
9411 XmImMbLookupString()
9412 ; return 0; }
9413 EOF
9414 if { (eval echo configure:9415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9415   rm -rf conftest*
9416   eval "ac_cv_lib_$ac_lib_var=yes"
9417 else
9418   echo "configure: failed program was:" >&5
9419   cat conftest.$ac_ext >&5
9420   rm -rf conftest*
9421   eval "ac_cv_lib_$ac_lib_var=no"
9422 fi
9423 rm -f conftest*
9424 xe_check_libs=""
9425
9426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9427   echo "$ac_t""yes" 1>&6
9428   with_xim=motif
9429 else
9430   echo "$ac_t""no" 1>&6
9431 fi
9432
9433
9434     fi ;;
9435   esac
9436   if test "$with_xim" != "no"; then
9437     { test "$extra_verbose" = "yes" && cat << \EOF
9438     Defining HAVE_XIM
9439 EOF
9440 cat >> confdefs.h <<\EOF
9441 #define HAVE_XIM 1
9442 EOF
9443 }
9444
9445     if test "$with_xim" = "xlib"; then
9446       { test "$extra_verbose" = "yes" && cat << \EOF
9447     Defining XIM_XLIB
9448 EOF
9449 cat >> confdefs.h <<\EOF
9450 #define XIM_XLIB 1
9451 EOF
9452 }
9453
9454       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9455    echo "    xemacs will be linked with \"input-method-xlib.o\""
9456  fi
9457     fi
9458     if test "$with_xim" = "motif"; then
9459       { test "$extra_verbose" = "yes" && cat << \EOF
9460     Defining XIM_MOTIF
9461 EOF
9462 cat >> confdefs.h <<\EOF
9463 #define XIM_MOTIF 1
9464 EOF
9465 }
9466
9467       need_motif=yes
9468       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9469    echo "    xemacs will be linked with \"input-method-motif.o\""
9470  fi
9471     fi
9472     if test "$with_xim" = "motif"; then
9473       with_xfs=no
9474     fi
9475   fi
9476
9477     if test "$with_xfs" = "yes" ; then
9478     echo "checking for XFontSet" 1>&6
9479 echo "configure:9480: checking for XFontSet" >&5
9480     
9481 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9482 echo "configure:9483: checking for XmbDrawString in -lX11" >&5
9483 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9484
9485 xe_check_libs=" -lX11 "
9486 cat > conftest.$ac_ext <<EOF
9487 #line 9488 "configure"
9488 #include "confdefs.h"
9489 /* Override any gcc2 internal prototype to avoid an error.  */
9490 /* We use char because int might match the return type of a gcc2
9491     builtin and then its argument prototype would still apply.  */
9492 char XmbDrawString();
9493
9494 int main() {
9495 XmbDrawString()
9496 ; return 0; }
9497 EOF
9498 if { (eval echo configure:9499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9499   rm -rf conftest*
9500   eval "ac_cv_lib_$ac_lib_var=yes"
9501 else
9502   echo "configure: failed program was:" >&5
9503   cat conftest.$ac_ext >&5
9504   rm -rf conftest*
9505   eval "ac_cv_lib_$ac_lib_var=no"
9506 fi
9507 rm -f conftest*
9508 xe_check_libs=""
9509
9510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9511   echo "$ac_t""yes" 1>&6
9512   :
9513 else
9514   echo "$ac_t""no" 1>&6
9515 with_xfs=no
9516 fi
9517
9518
9519     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9520       { test "$extra_verbose" = "yes" && cat << \EOF
9521     Defining USE_XFONTSET
9522 EOF
9523 cat >> confdefs.h <<\EOF
9524 #define USE_XFONTSET 1
9525 EOF
9526 }
9527
9528       if test "$with_xim" = "no" ; then
9529         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9530    echo "    xemacs will be linked with \"input-method-xfs.o\""
9531  fi
9532       fi
9533     fi
9534   fi 
9535     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9536   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9537 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9538 echo "configure:9539: checking for wnn/jllib.h" >&5
9539
9540 cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9543 #include <wnn/jllib.h>
9544 EOF
9545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9546 { (eval echo configure:9547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9548 if test -z "$ac_err"; then
9549   rm -rf conftest*
9550   eval "ac_cv_header_$ac_safe=yes"
9551 else
9552   echo "$ac_err" >&5
9553   echo "configure: failed program was:" >&5
9554   cat conftest.$ac_ext >&5
9555   rm -rf conftest*
9556   eval "ac_cv_header_$ac_safe=no"
9557 fi
9558 rm -f conftest*
9559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9560   echo "$ac_t""yes" 1>&6
9561   :
9562 else
9563   echo "$ac_t""no" 1>&6
9564 with_wnn=no
9565 fi
9566  }
9567     if test "$with_wnn" != "no"; then
9568     for ac_func in crypt
9569 do
9570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9571 echo "configure:9572: checking for $ac_func" >&5
9572
9573 cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576 /* System header to define __stub macros and hopefully few prototypes,
9577     which can conflict with char $ac_func(); below.  */
9578 #include <assert.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 $ac_func();
9583
9584 int main() {
9585
9586 /* The GNU C library defines this for functions which it implements
9587     to always fail with ENOSYS.  Some functions are actually named
9588     something starting with __ and the normal name is an alias.  */
9589 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9590 choke me
9591 #else
9592 $ac_func();
9593 #endif
9594
9595 ; return 0; }
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9598   rm -rf conftest*
9599   eval "ac_cv_func_$ac_func=yes"
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   eval "ac_cv_func_$ac_func=no"
9605 fi
9606 rm -f conftest*
9607
9608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9609   echo "$ac_t""yes" 1>&6
9610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9611   { test "$extra_verbose" = "yes" && cat << EOF
9612     Defining $ac_tr_func
9613 EOF
9614 cat >> confdefs.h <<EOF
9615 #define $ac_tr_func 1
9616 EOF
9617 }
9618  
9619 else
9620   echo "$ac_t""no" 1>&6
9621 fi
9622 done
9623
9624     test "$ac_cv_func_crypt" != "yes" && { 
9625 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9626 echo "configure:9627: checking for crypt in -lcrypt" >&5
9627 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9628
9629 xe_check_libs=" -lcrypt "
9630 cat > conftest.$ac_ext <<EOF
9631 #line 9632 "configure"
9632 #include "confdefs.h"
9633 /* Override any gcc2 internal prototype to avoid an error.  */
9634 /* We use char because int might match the return type of a gcc2
9635     builtin and then its argument prototype would still apply.  */
9636 char crypt();
9637
9638 int main() {
9639 crypt()
9640 ; return 0; }
9641 EOF
9642 if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9643   rm -rf conftest*
9644   eval "ac_cv_lib_$ac_lib_var=yes"
9645 else
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -rf conftest*
9649   eval "ac_cv_lib_$ac_lib_var=no"
9650 fi
9651 rm -f conftest*
9652 xe_check_libs=""
9653
9654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9655   echo "$ac_t""yes" 1>&6
9656     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9657     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9658   { test "$extra_verbose" = "yes" && cat << EOF
9659     Defining $ac_tr_lib
9660 EOF
9661 cat >> confdefs.h <<EOF
9662 #define $ac_tr_lib 1
9663 EOF
9664 }
9665
9666   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9667
9668 else
9669   echo "$ac_t""no" 1>&6
9670 fi
9671
9672  }
9673   fi
9674     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9675     
9676 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9677 echo "configure:9678: checking for jl_dic_list_e in -lwnn" >&5
9678 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9679
9680 xe_check_libs=" -lwnn "
9681 cat > conftest.$ac_ext <<EOF
9682 #line 9683 "configure"
9683 #include "confdefs.h"
9684 /* Override any gcc2 internal prototype to avoid an error.  */
9685 /* We use char because int might match the return type of a gcc2
9686     builtin and then its argument prototype would still apply.  */
9687 char jl_dic_list_e();
9688
9689 int main() {
9690 jl_dic_list_e()
9691 ; return 0; }
9692 EOF
9693 if { (eval echo configure:9694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9694   rm -rf conftest*
9695   eval "ac_cv_lib_$ac_lib_var=yes"
9696 else
9697   echo "configure: failed program was:" >&5
9698   cat conftest.$ac_ext >&5
9699   rm -rf conftest*
9700   eval "ac_cv_lib_$ac_lib_var=no"
9701 fi
9702 rm -f conftest*
9703 xe_check_libs=""
9704
9705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9706   echo "$ac_t""yes" 1>&6
9707   libwnn=wnn
9708 else
9709   echo "$ac_t""no" 1>&6
9710 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9711 echo "configure:9712: checking for jl_dic_list_e in -lwnn4" >&5
9712 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9713
9714 xe_check_libs=" -lwnn4 "
9715 cat > conftest.$ac_ext <<EOF
9716 #line 9717 "configure"
9717 #include "confdefs.h"
9718 /* Override any gcc2 internal prototype to avoid an error.  */
9719 /* We use char because int might match the return type of a gcc2
9720     builtin and then its argument prototype would still apply.  */
9721 char jl_dic_list_e();
9722
9723 int main() {
9724 jl_dic_list_e()
9725 ; return 0; }
9726 EOF
9727 if { (eval echo configure:9728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9728   rm -rf conftest*
9729   eval "ac_cv_lib_$ac_lib_var=yes"
9730 else
9731   echo "configure: failed program was:" >&5
9732   cat conftest.$ac_ext >&5
9733   rm -rf conftest*
9734   eval "ac_cv_lib_$ac_lib_var=no"
9735 fi
9736 rm -f conftest*
9737 xe_check_libs=""
9738
9739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9740   echo "$ac_t""yes" 1>&6
9741   libwnn=wnn4
9742 else
9743   echo "$ac_t""no" 1>&6
9744 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9745 echo "configure:9746: checking for jl_dic_list_e in -lwnn6" >&5
9746 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9747
9748 xe_check_libs=" -lwnn6 "
9749 cat > conftest.$ac_ext <<EOF
9750 #line 9751 "configure"
9751 #include "confdefs.h"
9752 /* Override any gcc2 internal prototype to avoid an error.  */
9753 /* We use char because int might match the return type of a gcc2
9754     builtin and then its argument prototype would still apply.  */
9755 char jl_dic_list_e();
9756
9757 int main() {
9758 jl_dic_list_e()
9759 ; return 0; }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9762   rm -rf conftest*
9763   eval "ac_cv_lib_$ac_lib_var=yes"
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -rf conftest*
9768   eval "ac_cv_lib_$ac_lib_var=no"
9769 fi
9770 rm -f conftest*
9771 xe_check_libs=""
9772
9773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9774   echo "$ac_t""yes" 1>&6
9775   libwnn=wnn6
9776 else
9777   echo "$ac_t""no" 1>&6
9778 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9779 echo "configure:9780: checking for dic_list_e in -lwnn6_fromsrc" >&5
9780 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9781
9782 xe_check_libs=" -lwnn6_fromsrc "
9783 cat > conftest.$ac_ext <<EOF
9784 #line 9785 "configure"
9785 #include "confdefs.h"
9786 /* Override any gcc2 internal prototype to avoid an error.  */
9787 /* We use char because int might match the return type of a gcc2
9788     builtin and then its argument prototype would still apply.  */
9789 char dic_list_e();
9790
9791 int main() {
9792 dic_list_e()
9793 ; return 0; }
9794 EOF
9795 if { (eval echo configure:9796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9796   rm -rf conftest*
9797   eval "ac_cv_lib_$ac_lib_var=yes"
9798 else
9799   echo "configure: failed program was:" >&5
9800   cat conftest.$ac_ext >&5
9801   rm -rf conftest*
9802   eval "ac_cv_lib_$ac_lib_var=no"
9803 fi
9804 rm -f conftest*
9805 xe_check_libs=""
9806
9807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9808   echo "$ac_t""yes" 1>&6
9809   libwnn=wnn6_fromsrc
9810 else
9811   echo "$ac_t""no" 1>&6
9812 with_wnn=no
9813 fi
9814
9815
9816 fi
9817
9818
9819 fi
9820
9821
9822 fi
9823
9824
9825   fi
9826   test -z "$with_wnn" && with_wnn=yes
9827   if test "$with_wnn" = "yes"; then
9828     { test "$extra_verbose" = "yes" && cat << \EOF
9829     Defining HAVE_WNN
9830 EOF
9831 cat >> confdefs.h <<\EOF
9832 #define HAVE_WNN 1
9833 EOF
9834 }
9835
9836     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9837     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9838    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9839  fi
9840     if test "$with_wnn6" != "no"; then
9841       
9842 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9843 echo "configure:9844: checking for jl_fi_dic_list in -l$libwnn" >&5
9844 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9845
9846 xe_check_libs=" -l$libwnn "
9847 cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850 /* Override any gcc2 internal prototype to avoid an error.  */
9851 /* We use char because int might match the return type of a gcc2
9852     builtin and then its argument prototype would still apply.  */
9853 char jl_fi_dic_list();
9854
9855 int main() {
9856 jl_fi_dic_list()
9857 ; return 0; }
9858 EOF
9859 if { (eval echo configure:9860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9860   rm -rf conftest*
9861   eval "ac_cv_lib_$ac_lib_var=yes"
9862 else
9863   echo "configure: failed program was:" >&5
9864   cat conftest.$ac_ext >&5
9865   rm -rf conftest*
9866   eval "ac_cv_lib_$ac_lib_var=no"
9867 fi
9868 rm -f conftest*
9869 xe_check_libs=""
9870
9871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9872   echo "$ac_t""yes" 1>&6
9873   with_wnn6=yes
9874 else
9875   echo "$ac_t""no" 1>&6
9876 fi
9877
9878
9879       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9880     Defining WNN6
9881 EOF
9882 cat >> confdefs.h <<\EOF
9883 #define WNN6 1
9884 EOF
9885 }
9886
9887     fi
9888   fi
9889
9890     canna_includes_found=no
9891   if test "$with_canna" != "no"; then
9892     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9893 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9894 echo "configure:9895: checking for canna/jrkanji.h" >&5
9895
9896 cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 #include <canna/jrkanji.h>
9900 EOF
9901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9902 { (eval echo configure:9903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9904 if test -z "$ac_err"; then
9905   rm -rf conftest*
9906   eval "ac_cv_header_$ac_safe=yes"
9907 else
9908   echo "$ac_err" >&5
9909   echo "configure: failed program was:" >&5
9910   cat conftest.$ac_ext >&5
9911   rm -rf conftest*
9912   eval "ac_cv_header_$ac_safe=no"
9913 fi
9914 rm -f conftest*
9915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9916   echo "$ac_t""yes" 1>&6
9917   canna_includes_found=yes
9918 else
9919   echo "$ac_t""no" 1>&6
9920 fi
9921
9922   fi
9923   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9924       -d "/usr/local/canna/include"; then
9925     save_c_switch_site="$c_switch_site"
9926     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9927     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9928 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9929 echo "configure:9930: checking for canna/jrkanji.h" >&5
9930
9931 cat > conftest.$ac_ext <<EOF
9932 #line 9933 "configure"
9933 #include "confdefs.h"
9934 #include <canna/jrkanji.h>
9935 EOF
9936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9937 { (eval echo configure:9938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9939 if test -z "$ac_err"; then
9940   rm -rf conftest*
9941   eval "ac_cv_header_$ac_safe=yes"
9942 else
9943   echo "$ac_err" >&5
9944   echo "configure: failed program was:" >&5
9945   cat conftest.$ac_ext >&5
9946   rm -rf conftest*
9947   eval "ac_cv_header_$ac_safe=no"
9948 fi
9949 rm -f conftest*
9950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9951   echo "$ac_t""yes" 1>&6
9952   canna_includes_found=yes
9953 else
9954   echo "$ac_t""no" 1>&6
9955 fi
9956
9957     if test "$canna_includes_found" != "yes"; then
9958       c_switch_site="$save_c_switch_site"
9959       with_canna="no"
9960     fi
9961   fi
9962
9963   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9964 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9965 echo "configure:9966: checking for canna/RK.h" >&5
9966
9967 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 #include <canna/RK.h>
9971 EOF
9972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9973 { (eval echo configure:9974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9975 if test -z "$ac_err"; then
9976   rm -rf conftest*
9977   eval "ac_cv_header_$ac_safe=yes"
9978 else
9979   echo "$ac_err" >&5
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   eval "ac_cv_header_$ac_safe=no"
9984 fi
9985 rm -f conftest*
9986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9987   echo "$ac_t""yes" 1>&6
9988   :
9989 else
9990   echo "$ac_t""no" 1>&6
9991 with_canna=no
9992 fi
9993  }
9994   test -z "$with_canna" && { 
9995 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9996 echo "configure:9997: checking for RkBgnBun in -lRKC" >&5
9997 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9998
9999 xe_check_libs=" -lRKC "
10000 cat > conftest.$ac_ext <<EOF
10001 #line 10002 "configure"
10002 #include "confdefs.h"
10003 /* Override any gcc2 internal prototype to avoid an error.  */
10004 /* We use char because int might match the return type of a gcc2
10005     builtin and then its argument prototype would still apply.  */
10006 char RkBgnBun();
10007
10008 int main() {
10009 RkBgnBun()
10010 ; return 0; }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10013   rm -rf conftest*
10014   eval "ac_cv_lib_$ac_lib_var=yes"
10015 else
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018   rm -rf conftest*
10019   eval "ac_cv_lib_$ac_lib_var=no"
10020 fi
10021 rm -f conftest*
10022 xe_check_libs=""
10023
10024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10025   echo "$ac_t""yes" 1>&6
10026   :
10027 else
10028   echo "$ac_t""no" 1>&6
10029 with_canna=no
10030 fi
10031
10032  }
10033   test -z "$with_canna" && { 
10034 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10035 echo "configure:10036: checking for jrKanjiControl in -lcanna" >&5
10036 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10037
10038 xe_check_libs=" -lcanna "
10039 cat > conftest.$ac_ext <<EOF
10040 #line 10041 "configure"
10041 #include "confdefs.h"
10042 /* Override any gcc2 internal prototype to avoid an error.  */
10043 /* We use char because int might match the return type of a gcc2
10044     builtin and then its argument prototype would still apply.  */
10045 char jrKanjiControl();
10046
10047 int main() {
10048 jrKanjiControl()
10049 ; return 0; }
10050 EOF
10051 if { (eval echo configure:10052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10052   rm -rf conftest*
10053   eval "ac_cv_lib_$ac_lib_var=yes"
10054 else
10055   echo "configure: failed program was:" >&5
10056   cat conftest.$ac_ext >&5
10057   rm -rf conftest*
10058   eval "ac_cv_lib_$ac_lib_var=no"
10059 fi
10060 rm -f conftest*
10061 xe_check_libs=""
10062
10063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10064   echo "$ac_t""yes" 1>&6
10065   :
10066 else
10067   echo "$ac_t""no" 1>&6
10068 with_canna=no
10069 fi
10070
10071  }
10072   test -z "$with_canna" && with_canna=yes
10073   if test "$with_canna" = "yes"; then
10074     { test "$extra_verbose" = "yes" && cat << \EOF
10075     Defining HAVE_CANNA
10076 EOF
10077 cat >> confdefs.h <<\EOF
10078 #define HAVE_CANNA 1
10079 EOF
10080 }
10081
10082     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10083     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10084    echo "    xemacs will be linked with \"mule-canna.o\""
10085  fi
10086   fi
10087
10088 else   for feature in xim canna wnn; do
10089     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10090       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10091     fi
10092     eval "with_${feature}=no"
10093   done
10094 fi 
10095
10096 if test "$need_motif" = "yes" ; then
10097   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10098     
10099 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10100 echo "configure:10101: checking for layout_object_getvalue in -li18n" >&5
10101 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10102
10103 xe_check_libs=" -li18n "
10104 cat > conftest.$ac_ext <<EOF
10105 #line 10106 "configure"
10106 #include "confdefs.h"
10107 /* Override any gcc2 internal prototype to avoid an error.  */
10108 /* We use char because int might match the return type of a gcc2
10109     builtin and then its argument prototype would still apply.  */
10110 char layout_object_getvalue();
10111
10112 int main() {
10113 layout_object_getvalue()
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10117   rm -rf conftest*
10118   eval "ac_cv_lib_$ac_lib_var=yes"
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   eval "ac_cv_lib_$ac_lib_var=no"
10124 fi
10125 rm -f conftest*
10126 xe_check_libs=""
10127
10128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10129   echo "$ac_t""yes" 1>&6
10130   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10131 else
10132   echo "$ac_t""no" 1>&6
10133 fi
10134
10135
10136   
10137 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10138     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10139   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10140   
10141         runpath="" runpath_dirs=""
10142   if test -n "$LD_RUN_PATH"; then
10143     runpath="$LD_RUN_PATH"
10144   elif test "$GCC" = "yes"; then
10145         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10146     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10147     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10148     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10149       case "$arg" in P,* | -L* | -R* )
10150         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10151           {
10152 xe_runpath_dir="$dir"
10153   test "$xe_runpath_dir" != "/lib"     -a \
10154         "$xe_runpath_dir" != "/usr/lib" -a \
10155         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10156   eval "$xe_add_unique_runpath_dir"
10157 }
10158         done ;;
10159       esac
10160     done
10161     ld_switch_run="$ld_switch_run_save"
10162     rm -f conftest*
10163   else
10164         for arg in $ld_switch_site $ld_switch_x_site; do
10165       case "$arg" in -L*) {
10166 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10167   test "$xe_runpath_dir" != "/lib"     -a \
10168         "$xe_runpath_dir" != "/usr/lib" -a \
10169         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10170   eval "$xe_add_unique_runpath_dir"
10171 };; esac
10172     done
10173         if test "$opsys $need_motif" = "sol2 yes"; then
10174       xe_runpath_dir="/opt/SUNWdt/lib";
10175       eval "$xe_add_unique_runpath_dir";
10176     fi
10177   fi 
10178   if test -n "$runpath"; then
10179     ld_switch_run="${dash_r}${runpath}"
10180     
10181 if test "$GCC" = "yes"; then
10182   set x $ld_switch_run; shift; ld_switch_run=""
10183   while test -n "$1"; do
10184     case $1 in
10185       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10186       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10187       -Xlinker* ) ;;
10188       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10189     esac
10190     shift
10191   done
10192 fi
10193     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10194   fi
10195 fi
10196
10197 fi
10198
10199 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10200 do
10201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10202 echo "configure:10203: checking for $ac_func" >&5
10203
10204 cat > conftest.$ac_ext <<EOF
10205 #line 10206 "configure"
10206 #include "confdefs.h"
10207 /* System header to define __stub macros and hopefully few prototypes,
10208     which can conflict with char $ac_func(); below.  */
10209 #include <assert.h>
10210 /* Override any gcc2 internal prototype to avoid an error.  */
10211 /* We use char because int might match the return type of a gcc2
10212     builtin and then its argument prototype would still apply.  */
10213 char $ac_func();
10214
10215 int main() {
10216
10217 /* The GNU C library defines this for functions which it implements
10218     to always fail with ENOSYS.  Some functions are actually named
10219     something starting with __ and the normal name is an alias.  */
10220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10221 choke me
10222 #else
10223 $ac_func();
10224 #endif
10225
10226 ; return 0; }
10227 EOF
10228 if { (eval echo configure:10229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10229   rm -rf conftest*
10230   eval "ac_cv_func_$ac_func=yes"
10231 else
10232   echo "configure: failed program was:" >&5
10233   cat conftest.$ac_ext >&5
10234   rm -rf conftest*
10235   eval "ac_cv_func_$ac_func=no"
10236 fi
10237 rm -f conftest*
10238
10239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10240   echo "$ac_t""yes" 1>&6
10241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10242   { test "$extra_verbose" = "yes" && cat << EOF
10243     Defining $ac_tr_func
10244 EOF
10245 cat >> confdefs.h <<EOF
10246 #define $ac_tr_func 1
10247 EOF
10248 }
10249  
10250 else
10251   echo "$ac_t""no" 1>&6
10252 fi
10253 done
10254
10255
10256 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10257 do
10258 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10259 echo "configure:10260: checking for $ac_func" >&5
10260
10261 cat > conftest.$ac_ext <<EOF
10262 #line 10263 "configure"
10263 #include "confdefs.h"
10264 /* System header to define __stub macros and hopefully few prototypes,
10265     which can conflict with char $ac_func(); below.  */
10266 #include <assert.h>
10267 /* Override any gcc2 internal prototype to avoid an error.  */
10268 /* We use char because int might match the return type of a gcc2
10269     builtin and then its argument prototype would still apply.  */
10270 char $ac_func();
10271
10272 int main() {
10273
10274 /* The GNU C library defines this for functions which it implements
10275     to always fail with ENOSYS.  Some functions are actually named
10276     something starting with __ and the normal name is an alias.  */
10277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10278 choke me
10279 #else
10280 $ac_func();
10281 #endif
10282
10283 ; return 0; }
10284 EOF
10285 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10286   rm -rf conftest*
10287   eval "ac_cv_func_$ac_func=yes"
10288 else
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_func_$ac_func=no"
10293 fi
10294 rm -f conftest*
10295
10296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10297   echo "$ac_t""yes" 1>&6
10298     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10299   { test "$extra_verbose" = "yes" && cat << EOF
10300     Defining $ac_tr_func
10301 EOF
10302 cat >> confdefs.h <<EOF
10303 #define $ac_tr_func 1
10304 EOF
10305 }
10306  
10307 else
10308   echo "$ac_t""no" 1>&6
10309 fi
10310 done
10311
10312
10313 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10314 echo "configure:10315: checking for openpty" >&5
10315
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 /* System header to define __stub macros and hopefully few prototypes,
10320     which can conflict with char openpty(); below.  */
10321 #include <assert.h>
10322 /* Override any gcc2 internal prototype to avoid an error.  */
10323 /* We use char because int might match the return type of a gcc2
10324     builtin and then its argument prototype would still apply.  */
10325 char openpty();
10326
10327 int main() {
10328
10329 /* The GNU C library defines this for functions which it implements
10330     to always fail with ENOSYS.  Some functions are actually named
10331     something starting with __ and the normal name is an alias.  */
10332 #if defined (__stub_openpty) || defined (__stub___openpty)
10333 choke me
10334 #else
10335 openpty();
10336 #endif
10337
10338 ; return 0; }
10339 EOF
10340 if { (eval echo configure:10341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10341   rm -rf conftest*
10342   eval "ac_cv_func_openpty=yes"
10343 else
10344   echo "configure: failed program was:" >&5
10345   cat conftest.$ac_ext >&5
10346   rm -rf conftest*
10347   eval "ac_cv_func_openpty=no"
10348 fi
10349 rm -f conftest*
10350
10351 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10352   echo "$ac_t""yes" 1>&6
10353   have_openpty=yes
10354 else
10355   echo "$ac_t""no" 1>&6
10356
10357   
10358 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10359 echo "configure:10360: checking for openpty in -lutil" >&5
10360 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10361
10362 xe_check_libs=" -lutil "
10363 cat > conftest.$ac_ext <<EOF
10364 #line 10365 "configure"
10365 #include "confdefs.h"
10366 /* Override any gcc2 internal prototype to avoid an error.  */
10367 /* We use char because int might match the return type of a gcc2
10368     builtin and then its argument prototype would still apply.  */
10369 char openpty();
10370
10371 int main() {
10372 openpty()
10373 ; return 0; }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10376   rm -rf conftest*
10377   eval "ac_cv_lib_$ac_lib_var=yes"
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   eval "ac_cv_lib_$ac_lib_var=no"
10383 fi
10384 rm -f conftest*
10385 xe_check_libs=""
10386
10387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10388   echo "$ac_t""yes" 1>&6
10389   have_openpty=yes need_libutil=yes
10390 else
10391   echo "$ac_t""no" 1>&6
10392 fi
10393
10394
10395 fi
10396
10397 if test "$have_openpty" = "yes"; then
10398   { test "$extra_verbose" = "yes" && cat << \EOF
10399     Defining HAVE_OPENPTY
10400 EOF
10401 cat >> confdefs.h <<\EOF
10402 #define HAVE_OPENPTY 1
10403 EOF
10404 }
10405
10406   for ac_hdr in pty.h libutil.h
10407 do
10408 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10409 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10410 echo "configure:10411: checking for $ac_hdr" >&5
10411
10412 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 #include <$ac_hdr>
10416 EOF
10417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10418 { (eval echo configure:10419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10420 if test -z "$ac_err"; then
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=yes"
10423 else
10424   echo "$ac_err" >&5
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_header_$ac_safe=no"
10429 fi
10430 rm -f conftest*
10431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10432   echo "$ac_t""yes" 1>&6
10433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10434   { test "$extra_verbose" = "yes" && cat << EOF
10435     Defining $ac_tr_hdr
10436 EOF
10437 cat >> confdefs.h <<EOF
10438 #define $ac_tr_hdr 1
10439 EOF
10440 }
10441  
10442 else
10443   echo "$ac_t""no" 1>&6
10444 fi
10445 done
10446
10447   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10448 fi
10449
10450 for ac_hdr in stropts.h
10451 do
10452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10454 echo "configure:10455: checking for $ac_hdr" >&5
10455
10456 cat > conftest.$ac_ext <<EOF
10457 #line 10458 "configure"
10458 #include "confdefs.h"
10459 #include <$ac_hdr>
10460 EOF
10461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10462 { (eval echo configure:10463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10464 if test -z "$ac_err"; then
10465   rm -rf conftest*
10466   eval "ac_cv_header_$ac_safe=yes"
10467 else
10468   echo "$ac_err" >&5
10469   echo "configure: failed program was:" >&5
10470   cat conftest.$ac_ext >&5
10471   rm -rf conftest*
10472   eval "ac_cv_header_$ac_safe=no"
10473 fi
10474 rm -f conftest*
10475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10476   echo "$ac_t""yes" 1>&6
10477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10478   { test "$extra_verbose" = "yes" && cat << EOF
10479     Defining $ac_tr_hdr
10480 EOF
10481 cat >> confdefs.h <<EOF
10482 #define $ac_tr_hdr 1
10483 EOF
10484 }
10485  
10486 else
10487   echo "$ac_t""no" 1>&6
10488 fi
10489 done
10490
10491 if test "$ac_cv_header_stropts_h" = "yes"; then
10492   for ac_func in isastream
10493 do
10494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10495 echo "configure:10496: checking for $ac_func" >&5
10496
10497 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 /* System header to define __stub macros and hopefully few prototypes,
10501     which can conflict with char $ac_func(); below.  */
10502 #include <assert.h>
10503 /* Override any gcc2 internal prototype to avoid an error.  */
10504 /* We use char because int might match the return type of a gcc2
10505     builtin and then its argument prototype would still apply.  */
10506 char $ac_func();
10507
10508 int main() {
10509
10510 /* The GNU C library defines this for functions which it implements
10511     to always fail with ENOSYS.  Some functions are actually named
10512     something starting with __ and the normal name is an alias.  */
10513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10514 choke me
10515 #else
10516 $ac_func();
10517 #endif
10518
10519 ; return 0; }
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10522   rm -rf conftest*
10523   eval "ac_cv_func_$ac_func=yes"
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   eval "ac_cv_func_$ac_func=no"
10529 fi
10530 rm -f conftest*
10531
10532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10533   echo "$ac_t""yes" 1>&6
10534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10535   { test "$extra_verbose" = "yes" && cat << EOF
10536     Defining $ac_tr_func
10537 EOF
10538 cat >> confdefs.h <<EOF
10539 #define $ac_tr_func 1
10540 EOF
10541 }
10542  
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546 done
10547
10548   for ac_hdr in strtio.h
10549 do
10550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10552 echo "configure:10553: checking for $ac_hdr" >&5
10553
10554 cat > conftest.$ac_ext <<EOF
10555 #line 10556 "configure"
10556 #include "confdefs.h"
10557 #include <$ac_hdr>
10558 EOF
10559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10560 { (eval echo configure:10561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10562 if test -z "$ac_err"; then
10563   rm -rf conftest*
10564   eval "ac_cv_header_$ac_safe=yes"
10565 else
10566   echo "$ac_err" >&5
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -rf conftest*
10570   eval "ac_cv_header_$ac_safe=no"
10571 fi
10572 rm -f conftest*
10573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10574   echo "$ac_t""yes" 1>&6
10575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10576   { test "$extra_verbose" = "yes" && cat << EOF
10577     Defining $ac_tr_hdr
10578 EOF
10579 cat >> confdefs.h <<EOF
10580 #define $ac_tr_hdr 1
10581 EOF
10582 }
10583  
10584 else
10585   echo "$ac_t""no" 1>&6
10586 fi
10587 done
10588  fi
10589
10590 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10591    echo "    xemacs will be linked with \"realpath.o\""
10592  fi
10593
10594 for ac_func in getloadavg
10595 do
10596 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10597 echo "configure:10598: checking for $ac_func" >&5
10598
10599 cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 /* System header to define __stub macros and hopefully few prototypes,
10603     which can conflict with char $ac_func(); below.  */
10604 #include <assert.h>
10605 /* Override any gcc2 internal prototype to avoid an error.  */
10606 /* We use char because int might match the return type of a gcc2
10607     builtin and then its argument prototype would still apply.  */
10608 char $ac_func();
10609
10610 int main() {
10611
10612 /* The GNU C library defines this for functions which it implements
10613     to always fail with ENOSYS.  Some functions are actually named
10614     something starting with __ and the normal name is an alias.  */
10615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10616 choke me
10617 #else
10618 $ac_func();
10619 #endif
10620
10621 ; return 0; }
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10624   rm -rf conftest*
10625   eval "ac_cv_func_$ac_func=yes"
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   eval "ac_cv_func_$ac_func=no"
10631 fi
10632 rm -f conftest*
10633
10634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10635   echo "$ac_t""yes" 1>&6
10636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10637   { test "$extra_verbose" = "yes" && cat << EOF
10638     Defining $ac_tr_func
10639 EOF
10640 cat >> confdefs.h <<EOF
10641 #define $ac_tr_func 1
10642 EOF
10643 }
10644  
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648 done
10649
10650
10651 if test "$ac_cv_func_getloadavg" = "yes"; then
10652         for ac_hdr in sys/loadavg.h
10653 do
10654 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10655 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10656 echo "configure:10657: checking for $ac_hdr" >&5
10657
10658 cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661 #include <$ac_hdr>
10662 EOF
10663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10664 { (eval echo configure:10665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10666 if test -z "$ac_err"; then
10667   rm -rf conftest*
10668   eval "ac_cv_header_$ac_safe=yes"
10669 else
10670   echo "$ac_err" >&5
10671   echo "configure: failed program was:" >&5
10672   cat conftest.$ac_ext >&5
10673   rm -rf conftest*
10674   eval "ac_cv_header_$ac_safe=no"
10675 fi
10676 rm -f conftest*
10677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10678   echo "$ac_t""yes" 1>&6
10679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10680   { test "$extra_verbose" = "yes" && cat << EOF
10681     Defining $ac_tr_hdr
10682 EOF
10683 cat >> confdefs.h <<EOF
10684 #define $ac_tr_hdr 1
10685 EOF
10686 }
10687  
10688 else
10689   echo "$ac_t""no" 1>&6
10690 fi
10691 done
10692
10693 else
10694     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10695    echo "    xemacs will be linked with \"getloadavg.o\""
10696  fi
10697
10698     
10699 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10700 echo "configure:10701: checking for kstat_open in -lkstat" >&5
10701 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10702
10703 xe_check_libs=" -lkstat "
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707 /* Override any gcc2 internal prototype to avoid an error.  */
10708 /* We use char because int might match the return type of a gcc2
10709     builtin and then its argument prototype would still apply.  */
10710 char kstat_open();
10711
10712 int main() {
10713 kstat_open()
10714 ; return 0; }
10715 EOF
10716 if { (eval echo configure:10717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10717   rm -rf conftest*
10718   eval "ac_cv_lib_$ac_lib_var=yes"
10719 else
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -rf conftest*
10723   eval "ac_cv_lib_$ac_lib_var=no"
10724 fi
10725 rm -f conftest*
10726 xe_check_libs=""
10727
10728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10729   echo "$ac_t""yes" 1>&6
10730     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10731     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10732   { test "$extra_verbose" = "yes" && cat << EOF
10733     Defining $ac_tr_lib
10734 EOF
10735 cat >> confdefs.h <<EOF
10736 #define $ac_tr_lib 1
10737 EOF
10738 }
10739
10740   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10741
10742 else
10743   echo "$ac_t""no" 1>&6
10744 fi
10745
10746
10747   for ac_hdr in kstat.h
10748 do
10749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10751 echo "configure:10752: checking for $ac_hdr" >&5
10752
10753 cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756 #include <$ac_hdr>
10757 EOF
10758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10759 { (eval echo configure:10760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10761 if test -z "$ac_err"; then
10762   rm -rf conftest*
10763   eval "ac_cv_header_$ac_safe=yes"
10764 else
10765   echo "$ac_err" >&5
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -rf conftest*
10769   eval "ac_cv_header_$ac_safe=no"
10770 fi
10771 rm -f conftest*
10772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10773   echo "$ac_t""yes" 1>&6
10774     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10775   { test "$extra_verbose" = "yes" && cat << EOF
10776     Defining $ac_tr_hdr
10777 EOF
10778 cat >> confdefs.h <<EOF
10779 #define $ac_tr_hdr 1
10780 EOF
10781 }
10782  
10783 else
10784   echo "$ac_t""no" 1>&6
10785 fi
10786 done
10787
10788
10789     
10790 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10791 echo "configure:10792: checking for kvm_read in -lkvm" >&5
10792 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10793
10794 xe_check_libs=" -lkvm "
10795 cat > conftest.$ac_ext <<EOF
10796 #line 10797 "configure"
10797 #include "confdefs.h"
10798 /* Override any gcc2 internal prototype to avoid an error.  */
10799 /* We use char because int might match the return type of a gcc2
10800     builtin and then its argument prototype would still apply.  */
10801 char kvm_read();
10802
10803 int main() {
10804 kvm_read()
10805 ; return 0; }
10806 EOF
10807 if { (eval echo configure:10808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10808   rm -rf conftest*
10809   eval "ac_cv_lib_$ac_lib_var=yes"
10810 else
10811   echo "configure: failed program was:" >&5
10812   cat conftest.$ac_ext >&5
10813   rm -rf conftest*
10814   eval "ac_cv_lib_$ac_lib_var=no"
10815 fi
10816 rm -f conftest*
10817 xe_check_libs=""
10818
10819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10820   echo "$ac_t""yes" 1>&6
10821     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10822     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10823   { test "$extra_verbose" = "yes" && cat << EOF
10824     Defining $ac_tr_lib
10825 EOF
10826 cat >> confdefs.h <<EOF
10827 #define $ac_tr_lib 1
10828 EOF
10829 }
10830
10831   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10832
10833 else
10834   echo "$ac_t""no" 1>&6
10835 fi
10836
10837
10838 fi
10839
10840 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10841 echo "configure:10842: checking whether netdb declares h_errno" >&5
10842 cat > conftest.$ac_ext <<EOF
10843 #line 10844 "configure"
10844 #include "confdefs.h"
10845 #include <netdb.h>
10846 int main() {
10847 return h_errno;
10848 ; return 0; }
10849 EOF
10850 if { (eval echo configure:10851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10851   rm -rf conftest*
10852   echo "$ac_t""yes" 1>&6
10853    { test "$extra_verbose" = "yes" && cat << \EOF
10854     Defining HAVE_H_ERRNO
10855 EOF
10856 cat >> confdefs.h <<\EOF
10857 #define HAVE_H_ERRNO 1
10858 EOF
10859 }
10860
10861 else
10862   echo "configure: failed program was:" >&5
10863   cat conftest.$ac_ext >&5
10864   rm -rf conftest*
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 rm -f conftest*
10868
10869 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10870 echo "configure:10871: checking for sigsetjmp" >&5
10871 cat > conftest.$ac_ext <<EOF
10872 #line 10873 "configure"
10873 #include "confdefs.h"
10874 #include <setjmp.h>
10875 int main() {
10876 sigjmp_buf bar; sigsetjmp (bar, 0);
10877 ; return 0; }
10878 EOF
10879 if { (eval echo configure:10880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10880   rm -rf conftest*
10881   echo "$ac_t""yes" 1>&6
10882    { test "$extra_verbose" = "yes" && cat << \EOF
10883     Defining HAVE_SIGSETJMP
10884 EOF
10885 cat >> confdefs.h <<\EOF
10886 #define HAVE_SIGSETJMP 1
10887 EOF
10888 }
10889
10890 else
10891   echo "configure: failed program was:" >&5
10892   cat conftest.$ac_ext >&5
10893   rm -rf conftest*
10894   echo "$ac_t""no" 1>&6
10895 fi
10896 rm -f conftest*
10897
10898 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10899 echo "configure:10900: checking whether localtime caches TZ" >&5
10900
10901 if test "$ac_cv_func_tzset" = "yes"; then
10902 cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 #include <time.h>
10906 #if STDC_HEADERS
10907 # include <stdlib.h>
10908 #endif
10909 extern char **environ;
10910 unset_TZ ()
10911 {
10912   char **from, **to;
10913   for (to = from = environ; (*to = *from); from++)
10914     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10915       to++;
10916 }
10917 char TZ_GMT0[] = "TZ=GMT0";
10918 char TZ_PST8[] = "TZ=PST8";
10919 main()
10920 {
10921   time_t now = time ((time_t *) 0);
10922   int hour_GMT0, hour_unset;
10923   if (putenv (TZ_GMT0) != 0)
10924     exit (1);
10925   hour_GMT0 = localtime (&now)->tm_hour;
10926   unset_TZ ();
10927   hour_unset = localtime (&now)->tm_hour;
10928   if (putenv (TZ_PST8) != 0)
10929     exit (1);
10930   if (localtime (&now)->tm_hour == hour_GMT0)
10931     exit (1);
10932   unset_TZ ();
10933   if (localtime (&now)->tm_hour != hour_unset)
10934     exit (1);
10935   exit (0);
10936 }
10937 EOF
10938 if { (eval echo configure:10939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10939 then
10940   emacs_cv_localtime_cache=no
10941 else
10942   conftest_rc="$?"
10943   echo "configure: failed program was:" >&5
10944   cat conftest.$ac_ext >&5
10945   rm -fr conftest*
10946   emacs_cv_localtime_cache=yes
10947 fi
10948 rm -fr conftest*
10949 else
10950         # If we lack tzset, report that localtime does not cache TZ,
10951         # since we can't invalidate the cache if we don't have tzset.
10952         emacs_cv_localtime_cache=no
10953 fi
10954 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10955 if test $emacs_cv_localtime_cache = yes; then
10956   { test "$extra_verbose" = "yes" && cat << \EOF
10957     Defining LOCALTIME_CACHE
10958 EOF
10959 cat >> confdefs.h <<\EOF
10960 #define LOCALTIME_CACHE 1
10961 EOF
10962 }
10963
10964 fi
10965
10966 if test "$HAVE_TIMEVAL" = "yes"; then
10967 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10968 echo "configure:10969: checking whether gettimeofday accepts one or two arguments" >&5
10969 cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972
10973 #ifdef TIME_WITH_SYS_TIME
10974 #include <sys/time.h>
10975 #include <time.h>
10976 #else
10977 #ifdef HAVE_SYS_TIME_H
10978 #include <sys/time.h>
10979 #else
10980 #include <time.h>
10981 #endif
10982 #endif
10983   
10984 int main() {
10985
10986   struct timeval time;
10987   gettimeofday (&time, 0);
10988
10989 ; return 0; }
10990 EOF
10991 if { (eval echo configure:10992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10992   rm -rf conftest*
10993   echo "$ac_t""two" 1>&6
10994 else
10995   echo "configure: failed program was:" >&5
10996   cat conftest.$ac_ext >&5
10997   rm -rf conftest*
10998   echo "$ac_t""one" 1>&6
10999    { test "$extra_verbose" = "yes" && cat << \EOF
11000     Defining GETTIMEOFDAY_ONE_ARGUMENT
11001 EOF
11002 cat >> confdefs.h <<\EOF
11003 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11004 EOF
11005 }
11006
11007 fi
11008 rm -f conftest*
11009 fi
11010
11011
11012 echo $ac_n "checking for inline""... $ac_c" 1>&6
11013 echo "configure:11014: checking for inline" >&5
11014
11015 ac_cv_c_inline=no
11016 for ac_kw in inline __inline__ __inline; do
11017   cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020
11021 int main() {
11022 } $ac_kw foo() {
11023 ; return 0; }
11024 EOF
11025 if { (eval echo configure:11026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11026   rm -rf conftest*
11027   ac_cv_c_inline=$ac_kw; break
11028 else
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031 fi
11032 rm -f conftest*
11033 done
11034
11035
11036 echo "$ac_t""$ac_cv_c_inline" 1>&6
11037 case "$ac_cv_c_inline" in
11038   inline | yes) ;;
11039   no) { test "$extra_verbose" = "yes" && cat << \EOF
11040     Defining inline = 
11041 EOF
11042 cat >> confdefs.h <<\EOF
11043 #define inline 
11044 EOF
11045 }
11046  ;;
11047   *)  { test "$extra_verbose" = "yes" && cat << EOF
11048     Defining inline = $ac_cv_c_inline
11049 EOF
11050 cat >> confdefs.h <<EOF
11051 #define inline $ac_cv_c_inline
11052 EOF
11053 }
11054  ;;
11055 esac
11056
11057 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11058    echo "    xemacs will be linked with \"inline.o\""
11059  fi
11060
11061
11062 if test "$__DECC" != "yes"; then
11063   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11064 # for constant arguments.  Useless!
11065 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11066 echo "configure:11067: checking for working alloca.h" >&5
11067
11068 cat > conftest.$ac_ext <<EOF
11069 #line 11070 "configure"
11070 #include "confdefs.h"
11071 #include <alloca.h>
11072 int main() {
11073 char *p = alloca(2 * sizeof(int));
11074 ; return 0; }
11075 EOF
11076 if { (eval echo configure:11077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11077   rm -rf conftest*
11078   ac_cv_header_alloca_h=yes
11079 else
11080   echo "configure: failed program was:" >&5
11081   cat conftest.$ac_ext >&5
11082   rm -rf conftest*
11083   ac_cv_header_alloca_h=no
11084 fi
11085 rm -f conftest*
11086
11087 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11088 if test $ac_cv_header_alloca_h = yes; then
11089   { test "$extra_verbose" = "yes" && cat << \EOF
11090     Defining HAVE_ALLOCA_H
11091 EOF
11092 cat >> confdefs.h <<\EOF
11093 #define HAVE_ALLOCA_H 1
11094 EOF
11095 }
11096
11097 fi
11098
11099 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11100 echo "configure:11101: checking for alloca" >&5
11101
11102 cat > conftest.$ac_ext <<EOF
11103 #line 11104 "configure"
11104 #include "confdefs.h"
11105
11106 #ifdef __GNUC__
11107 # define alloca __builtin_alloca
11108 #else
11109 # ifdef _MSC_VER
11110 #  include <malloc.h>
11111 #  define alloca _alloca
11112 # else
11113 #  if HAVE_ALLOCA_H
11114 #   include <alloca.h>
11115 #  else
11116 #   ifdef _AIX
11117  #pragma alloca
11118 #   else
11119 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11120 char *alloca ();
11121 #    endif
11122 #   endif
11123 #  endif
11124 # endif
11125 #endif
11126
11127 int main() {
11128 char *p = (char *) alloca(1);
11129 ; return 0; }
11130 EOF
11131 if { (eval echo configure:11132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11132   rm -rf conftest*
11133   ac_cv_func_alloca_works=yes
11134 else
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -rf conftest*
11138   ac_cv_func_alloca_works=no
11139 fi
11140 rm -f conftest*
11141
11142 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11143 if test $ac_cv_func_alloca_works = yes; then
11144   { test "$extra_verbose" = "yes" && cat << \EOF
11145     Defining HAVE_ALLOCA
11146 EOF
11147 cat >> confdefs.h <<\EOF
11148 #define HAVE_ALLOCA 1
11149 EOF
11150 }
11151
11152 fi
11153
11154 if test $ac_cv_func_alloca_works = no; then
11155   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11156   # that cause trouble.  Some versions do not even contain alloca or
11157   # contain a buggy version.  If you still want to use their alloca,
11158   # use ar to extract alloca.o from them instead of compiling alloca.c.
11159   ALLOCA=alloca.${ac_objext}
11160   { test "$extra_verbose" = "yes" && cat << \EOF
11161     Defining C_ALLOCA
11162 EOF
11163 cat >> confdefs.h <<\EOF
11164 #define C_ALLOCA 1
11165 EOF
11166 }
11167
11168
11169 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11170 echo "configure:11171: checking whether alloca needs Cray hooks" >&5
11171
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 #if defined(CRAY) && ! defined(CRAY2)
11176 webecray
11177 #else
11178 wenotbecray
11179 #endif
11180
11181 EOF
11182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11183   egrep "webecray" >/dev/null 2>&1; then
11184   rm -rf conftest*
11185   ac_cv_os_cray=yes
11186 else
11187   rm -rf conftest*
11188   ac_cv_os_cray=no
11189 fi
11190 rm -f conftest*
11191
11192
11193 echo "$ac_t""$ac_cv_os_cray" 1>&6
11194 if test $ac_cv_os_cray = yes; then
11195 for ac_func in _getb67 GETB67 getb67; do
11196   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11197 echo "configure:11198: checking for $ac_func" >&5
11198
11199 cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 /* System header to define __stub macros and hopefully few prototypes,
11203     which can conflict with char $ac_func(); below.  */
11204 #include <assert.h>
11205 /* Override any gcc2 internal prototype to avoid an error.  */
11206 /* We use char because int might match the return type of a gcc2
11207     builtin and then its argument prototype would still apply.  */
11208 char $ac_func();
11209
11210 int main() {
11211
11212 /* The GNU C library defines this for functions which it implements
11213     to always fail with ENOSYS.  Some functions are actually named
11214     something starting with __ and the normal name is an alias.  */
11215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11216 choke me
11217 #else
11218 $ac_func();
11219 #endif
11220
11221 ; return 0; }
11222 EOF
11223 if { (eval echo configure:11224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11224   rm -rf conftest*
11225   eval "ac_cv_func_$ac_func=yes"
11226 else
11227   echo "configure: failed program was:" >&5
11228   cat conftest.$ac_ext >&5
11229   rm -rf conftest*
11230   eval "ac_cv_func_$ac_func=no"
11231 fi
11232 rm -f conftest*
11233
11234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11235   echo "$ac_t""yes" 1>&6
11236   { test "$extra_verbose" = "yes" && cat << EOF
11237     Defining CRAY_STACKSEG_END = $ac_func
11238 EOF
11239 cat >> confdefs.h <<EOF
11240 #define CRAY_STACKSEG_END $ac_func
11241 EOF
11242 }
11243
11244   break
11245 else
11246   echo "$ac_t""no" 1>&6
11247 fi
11248
11249 done
11250 fi
11251
11252 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11253 echo "configure:11254: checking stack direction for C alloca" >&5
11254
11255 cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 find_stack_direction ()
11259 {
11260   static char *addr = 0;
11261   auto char dummy;
11262   if (addr == 0)
11263     {
11264       addr = &dummy;
11265       return find_stack_direction ();
11266     }
11267   else
11268     return (&dummy > addr) ? 1 : -1;
11269 }
11270 main ()
11271 {
11272   exit (find_stack_direction() < 0);
11273 }
11274 EOF
11275 if { (eval echo configure:11276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11276 then
11277   ac_cv_c_stack_direction=1
11278 else
11279   conftest_rc="$?"
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -fr conftest*
11283   ac_cv_c_stack_direction=-1
11284 fi
11285 rm -fr conftest*
11286
11287 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11288 { test "$extra_verbose" = "yes" && cat << EOF
11289     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11290 EOF
11291 cat >> confdefs.h <<EOF
11292 #define STACK_DIRECTION $ac_cv_c_stack_direction
11293 EOF
11294 }
11295
11296 fi
11297
11298   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11299    echo "    xemacs will be linked with \"$ALLOCA\""
11300  fi
11301 fi
11302
11303 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11304 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11305 echo "configure:11306: checking for vfork.h" >&5
11306
11307 cat > conftest.$ac_ext <<EOF
11308 #line 11309 "configure"
11309 #include "confdefs.h"
11310 #include <vfork.h>
11311 EOF
11312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11313 { (eval echo configure:11314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11315 if test -z "$ac_err"; then
11316   rm -rf conftest*
11317   eval "ac_cv_header_$ac_safe=yes"
11318 else
11319   echo "$ac_err" >&5
11320   echo "configure: failed program was:" >&5
11321   cat conftest.$ac_ext >&5
11322   rm -rf conftest*
11323   eval "ac_cv_header_$ac_safe=no"
11324 fi
11325 rm -f conftest*
11326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11327   echo "$ac_t""yes" 1>&6
11328   { test "$extra_verbose" = "yes" && cat << \EOF
11329     Defining HAVE_VFORK_H
11330 EOF
11331 cat >> confdefs.h <<\EOF
11332 #define HAVE_VFORK_H 1
11333 EOF
11334 }
11335
11336 else
11337   echo "$ac_t""no" 1>&6
11338 fi
11339
11340 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11341 echo "configure:11342: checking for working vfork" >&5
11342
11343 cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 /* Thanks to Paul Eggert for this test.  */
11347 #include <stdio.h>
11348 #include <sys/types.h>
11349 #include <sys/stat.h>
11350 #ifdef HAVE_UNISTD_H
11351 #include <unistd.h>
11352 #endif
11353 #ifdef HAVE_VFORK_H
11354 #include <vfork.h>
11355 #endif
11356 /* On some sparc systems, changes by the child to local and incoming
11357    argument registers are propagated back to the parent.
11358    The compiler is told about this with #include <vfork.h>,
11359    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11360    Test for this by using a static variable whose address
11361    is put into a register that is clobbered by the vfork.  */
11362 static
11363 #ifdef __cplusplus
11364 sparc_address_test (int arg)
11365 #else
11366 sparc_address_test (arg) int arg;
11367 #endif
11368 {
11369   static pid_t child;
11370   if (!child) {
11371     child = vfork ();
11372     if (child < 0) {
11373       perror ("vfork");
11374       _exit(2);
11375     }
11376     if (!child) {
11377       arg = getpid();
11378       write(-1, "", 0);
11379       _exit (arg);
11380     }
11381   }
11382 }
11383 main() {
11384   pid_t parent = getpid ();
11385   pid_t child;
11386
11387   sparc_address_test ();
11388
11389   child = vfork ();
11390
11391   if (child == 0) {
11392     /* Here is another test for sparc vfork register problems.
11393        This test uses lots of local variables, at least
11394        as many local variables as main has allocated so far
11395        including compiler temporaries.  4 locals are enough for
11396        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11397        A buggy compiler should reuse the register of parent
11398        for one of the local variables, since it will think that
11399        parent can't possibly be used any more in this routine.
11400        Assigning to the local variable will thus munge parent
11401        in the parent process.  */
11402     pid_t
11403       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11404       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11405     /* Convince the compiler that p..p7 are live; otherwise, it might
11406        use the same hardware register for all 8 local variables.  */
11407     if (p != p1 || p != p2 || p != p3 || p != p4
11408         || p != p5 || p != p6 || p != p7)
11409       _exit(1);
11410
11411     /* On some systems (e.g. IRIX 3.3),
11412        vfork doesn't separate parent from child file descriptors.
11413        If the child closes a descriptor before it execs or exits,
11414        this munges the parent's descriptor as well.
11415        Test for this by closing stdout in the child.  */
11416     _exit(close(fileno(stdout)) != 0);
11417   } else {
11418     int status;
11419     struct stat st;
11420
11421     while (wait(&status) != child)
11422       ;
11423     exit(
11424          /* Was there some problem with vforking?  */
11425          child < 0
11426
11427          /* Did the child fail?  (This shouldn't happen.)  */
11428          || status
11429
11430          /* Did the vfork/compiler bug occur?  */
11431          || parent != getpid()
11432
11433          /* Did the file descriptor bug occur?  */
11434          || fstat(fileno(stdout), &st) != 0
11435          );
11436   }
11437 }
11438 EOF
11439 if { (eval echo configure:11440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11440 then
11441   ac_cv_func_vfork_works=yes
11442 else
11443   conftest_rc="$?"
11444   echo "configure: failed program was:" >&5
11445   cat conftest.$ac_ext >&5
11446   rm -fr conftest*
11447   ac_cv_func_vfork_works=no
11448 fi
11449 rm -fr conftest*
11450
11451 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11452 if test $ac_cv_func_vfork_works = no; then
11453   { test "$extra_verbose" = "yes" && cat << \EOF
11454     Defining vfork = fork
11455 EOF
11456 cat >> confdefs.h <<\EOF
11457 #define vfork fork
11458 EOF
11459 }
11460
11461 fi
11462
11463
11464 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11465 echo "configure:11466: checking for working strcoll" >&5
11466
11467 cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470 #include <string.h>
11471 main ()
11472 {
11473   exit (strcoll ("abc", "def") >= 0 ||
11474         strcoll ("ABC", "DEF") >= 0 ||
11475         strcoll ("123", "456") >= 0);
11476 }
11477 EOF
11478 if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11479 then
11480   ac_cv_func_strcoll_works=yes
11481 else
11482   conftest_rc="$?"
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -fr conftest*
11486   ac_cv_func_strcoll_works=no
11487 fi
11488 rm -fr conftest*
11489
11490 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11491 if test $ac_cv_func_strcoll_works = yes; then
11492   { test "$extra_verbose" = "yes" && cat << \EOF
11493     Defining HAVE_STRCOLL
11494 EOF
11495 cat >> confdefs.h <<\EOF
11496 #define HAVE_STRCOLL 1
11497 EOF
11498 }
11499
11500 fi
11501
11502
11503 for ac_func in getpgrp
11504 do
11505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11506 echo "configure:11507: checking for $ac_func" >&5
11507
11508 cat > conftest.$ac_ext <<EOF
11509 #line 11510 "configure"
11510 #include "confdefs.h"
11511 /* System header to define __stub macros and hopefully few prototypes,
11512     which can conflict with char $ac_func(); below.  */
11513 #include <assert.h>
11514 /* Override any gcc2 internal prototype to avoid an error.  */
11515 /* We use char because int might match the return type of a gcc2
11516     builtin and then its argument prototype would still apply.  */
11517 char $ac_func();
11518
11519 int main() {
11520
11521 /* The GNU C library defines this for functions which it implements
11522     to always fail with ENOSYS.  Some functions are actually named
11523     something starting with __ and the normal name is an alias.  */
11524 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11525 choke me
11526 #else
11527 $ac_func();
11528 #endif
11529
11530 ; return 0; }
11531 EOF
11532 if { (eval echo configure:11533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11533   rm -rf conftest*
11534   eval "ac_cv_func_$ac_func=yes"
11535 else
11536   echo "configure: failed program was:" >&5
11537   cat conftest.$ac_ext >&5
11538   rm -rf conftest*
11539   eval "ac_cv_func_$ac_func=no"
11540 fi
11541 rm -f conftest*
11542
11543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11544   echo "$ac_t""yes" 1>&6
11545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11546   { test "$extra_verbose" = "yes" && cat << EOF
11547     Defining $ac_tr_func
11548 EOF
11549 cat >> confdefs.h <<EOF
11550 #define $ac_tr_func 1
11551 EOF
11552 }
11553  
11554 else
11555   echo "$ac_t""no" 1>&6
11556 fi
11557 done
11558
11559 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11560 echo "configure:11561: checking whether getpgrp takes no argument" >&5
11561
11562 cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565
11566 /*
11567  * If this system has a BSD-style getpgrp(),
11568  * which takes a pid argument, exit unsuccessfully.
11569  *
11570  * Snarfed from Chet Ramey's bash pgrp.c test program
11571  */
11572 #include <stdio.h>
11573 #include <sys/types.h>
11574
11575 int     pid;
11576 int     pg1, pg2, pg3, pg4;
11577 int     ng, np, s, child;
11578
11579 main()
11580 {
11581         pid = getpid();
11582         pg1 = getpgrp(0);
11583         pg2 = getpgrp();
11584         pg3 = getpgrp(pid);
11585         pg4 = getpgrp(1);
11586
11587         /*
11588          * If all of these values are the same, it's pretty sure that
11589          * we're on a system that ignores getpgrp's first argument.
11590          */
11591         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11592                 exit(0);
11593
11594         child = fork();
11595         if (child < 0)
11596                 exit(1);
11597         else if (child == 0) {
11598                 np = getpid();
11599                 /*
11600                  * If this is Sys V, this will not work; pgrp will be
11601                  * set to np because setpgrp just changes a pgrp to be
11602                  * the same as the pid.
11603                  */
11604                 setpgrp(np, pg1);
11605                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11606                 if (ng == pg1) {
11607                         exit(1);
11608                 } else {
11609                         exit(0);
11610                 }
11611         } else {
11612                 wait(&s);
11613                 exit(s>>8);
11614         }
11615 }
11616
11617 EOF
11618 if { (eval echo configure:11619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11619 then
11620   ac_cv_func_getpgrp_void=yes
11621 else
11622   conftest_rc="$?"
11623   echo "configure: failed program was:" >&5
11624   cat conftest.$ac_ext >&5
11625   rm -fr conftest*
11626   ac_cv_func_getpgrp_void=no
11627 fi
11628 rm -fr conftest*
11629
11630
11631 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11632 if test $ac_cv_func_getpgrp_void = yes; then
11633   { test "$extra_verbose" = "yes" && cat << \EOF
11634     Defining GETPGRP_VOID
11635 EOF
11636 cat >> confdefs.h <<\EOF
11637 #define GETPGRP_VOID 1
11638 EOF
11639 }
11640
11641 fi
11642
11643
11644 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11645 echo "configure:11646: checking for working mmap" >&5
11646 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11647 cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650 #include <stdio.h>
11651 #include <unistd.h>
11652 #include <fcntl.h>
11653 #include <sys/mman.h>
11654
11655 #ifndef MAP_VARIABLE
11656 #define MAP_VARIABLE 0
11657 #endif
11658
11659 #ifndef MAP_FAILED
11660 #define MAP_FAILED -1
11661 #endif
11662
11663 int main (int argc, char *argv[])
11664 {
11665   int fd = -1;
11666   caddr_t p;
11667 #ifndef MAP_ANONYMOUS
11668   fd = open ("/dev/zero", O_RDWR);
11669   if (fd < 0)
11670     return 1;
11671 #define MAP_ANONYMOUS 0
11672 #endif
11673   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11674            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11675            fd, 0) != (void *) MAP_FAILED)
11676     return 0;
11677   perror ("conftest: mmap failed");
11678   return 1;
11679 }
11680 EOF
11681 if { (eval echo configure:11682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11682 then
11683   have_mmap=yes
11684 else
11685   conftest_rc="$?"
11686   echo "configure: failed program was:" >&5
11687   cat conftest.$ac_ext >&5
11688   rm -fr conftest*
11689   have_mmap=no
11690 fi
11691 rm -fr conftest* ;;
11692 esac
11693 echo "$ac_t""$have_mmap" 1>&6
11694 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11695     Defining HAVE_MMAP
11696 EOF
11697 cat >> confdefs.h <<\EOF
11698 #define HAVE_MMAP 1
11699 EOF
11700 }
11701
11702
11703 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11704 if test "$rel_alloc $have_mmap" = "default yes"; then
11705   if test "$doug_lea_malloc" = "yes"; then
11706         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11707 echo "configure:11708: checking for M_MMAP_THRESHOLD" >&5
11708     cat > conftest.$ac_ext <<EOF
11709 #line 11710 "configure"
11710 #include "confdefs.h"
11711 #include <malloc.h>
11712 int main() {
11713
11714 #ifndef M_MMAP_THRESHOLD
11715 #error No M_MMAP_THRESHOLD :-(
11716 !@+$%^&*_)(_ - unlikely to compile...
11717 #endif
11718
11719 ; return 0; }
11720 EOF
11721 if { (eval echo configure:11722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11722   rm -rf conftest*
11723   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11724 else
11725   echo "configure: failed program was:" >&5
11726   cat conftest.$ac_ext >&5
11727   rm -rf conftest*
11728   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11729 fi
11730 rm -f conftest*
11731   else
11732     rel_alloc=yes
11733   fi
11734 fi
11735 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11736     Defining REL_ALLOC
11737 EOF
11738 cat >> confdefs.h <<\EOF
11739 #define REL_ALLOC 1
11740 EOF
11741 }
11742
11743
11744 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11745 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11746 echo "configure:11747: checking for termios.h" >&5
11747
11748 cat > conftest.$ac_ext <<EOF
11749 #line 11750 "configure"
11750 #include "confdefs.h"
11751 #include <termios.h>
11752 EOF
11753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11754 { (eval echo configure:11755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11756 if test -z "$ac_err"; then
11757   rm -rf conftest*
11758   eval "ac_cv_header_$ac_safe=yes"
11759 else
11760   echo "$ac_err" >&5
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -rf conftest*
11764   eval "ac_cv_header_$ac_safe=no"
11765 fi
11766 rm -f conftest*
11767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11768   echo "$ac_t""yes" 1>&6
11769   { test "$extra_verbose" = "yes" && cat << \EOF
11770     Defining HAVE_TERMIOS
11771 EOF
11772 cat >> confdefs.h <<\EOF
11773 #define HAVE_TERMIOS 1
11774 EOF
11775 }
11776
11777   { test "$extra_verbose" = "yes" && cat << \EOF
11778     Defining SIGNALS_VIA_CHARACTERS
11779 EOF
11780 cat >> confdefs.h <<\EOF
11781 #define SIGNALS_VIA_CHARACTERS 1
11782 EOF
11783 }
11784
11785   { test "$extra_verbose" = "yes" && cat << \EOF
11786     Defining NO_TERMIO
11787 EOF
11788 cat >> confdefs.h <<\EOF
11789 #define NO_TERMIO 1
11790 EOF
11791 }
11792
11793 else
11794   echo "$ac_t""no" 1>&6
11795 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11796 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11797 echo "configure:11798: checking for termio.h" >&5
11798
11799 cat > conftest.$ac_ext <<EOF
11800 #line 11801 "configure"
11801 #include "confdefs.h"
11802 #include <termio.h>
11803 EOF
11804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11805 { (eval echo configure:11806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11807 if test -z "$ac_err"; then
11808   rm -rf conftest*
11809   eval "ac_cv_header_$ac_safe=yes"
11810 else
11811   echo "$ac_err" >&5
11812   echo "configure: failed program was:" >&5
11813   cat conftest.$ac_ext >&5
11814   rm -rf conftest*
11815   eval "ac_cv_header_$ac_safe=no"
11816 fi
11817 rm -f conftest*
11818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11819   echo "$ac_t""yes" 1>&6
11820   { test "$extra_verbose" = "yes" && cat << \EOF
11821     Defining HAVE_TERMIO
11822 EOF
11823 cat >> confdefs.h <<\EOF
11824 #define HAVE_TERMIO 1
11825 EOF
11826 }
11827
11828 else
11829   echo "$ac_t""no" 1>&6
11830 fi
11831
11832 fi
11833
11834
11835
11836 echo $ac_n "checking for socket""... $ac_c" 1>&6
11837 echo "configure:11838: checking for socket" >&5
11838
11839 cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842 /* System header to define __stub macros and hopefully few prototypes,
11843     which can conflict with char socket(); below.  */
11844 #include <assert.h>
11845 /* Override any gcc2 internal prototype to avoid an error.  */
11846 /* We use char because int might match the return type of a gcc2
11847     builtin and then its argument prototype would still apply.  */
11848 char socket();
11849
11850 int main() {
11851
11852 /* The GNU C library defines this for functions which it implements
11853     to always fail with ENOSYS.  Some functions are actually named
11854     something starting with __ and the normal name is an alias.  */
11855 #if defined (__stub_socket) || defined (__stub___socket)
11856 choke me
11857 #else
11858 socket();
11859 #endif
11860
11861 ; return 0; }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11864   rm -rf conftest*
11865   eval "ac_cv_func_socket=yes"
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -rf conftest*
11870   eval "ac_cv_func_socket=no"
11871 fi
11872 rm -f conftest*
11873
11874 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11875   echo "$ac_t""yes" 1>&6
11876   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11877 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11878 echo "configure:11879: checking for netinet/in.h" >&5
11879
11880 cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883 #include <netinet/in.h>
11884 EOF
11885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11886 { (eval echo configure:11887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11888 if test -z "$ac_err"; then
11889   rm -rf conftest*
11890   eval "ac_cv_header_$ac_safe=yes"
11891 else
11892   echo "$ac_err" >&5
11893   echo "configure: failed program was:" >&5
11894   cat conftest.$ac_ext >&5
11895   rm -rf conftest*
11896   eval "ac_cv_header_$ac_safe=no"
11897 fi
11898 rm -f conftest*
11899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11900   echo "$ac_t""yes" 1>&6
11901   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11902 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11903 echo "configure:11904: checking for arpa/inet.h" >&5
11904
11905 cat > conftest.$ac_ext <<EOF
11906 #line 11907 "configure"
11907 #include "confdefs.h"
11908 #include <arpa/inet.h>
11909 EOF
11910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11911 { (eval echo configure:11912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11913 if test -z "$ac_err"; then
11914   rm -rf conftest*
11915   eval "ac_cv_header_$ac_safe=yes"
11916 else
11917   echo "$ac_err" >&5
11918   echo "configure: failed program was:" >&5
11919   cat conftest.$ac_ext >&5
11920   rm -rf conftest*
11921   eval "ac_cv_header_$ac_safe=no"
11922 fi
11923 rm -f conftest*
11924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11925   echo "$ac_t""yes" 1>&6
11926   
11927   { test "$extra_verbose" = "yes" && cat << \EOF
11928     Defining HAVE_SOCKETS
11929 EOF
11930 cat >> confdefs.h <<\EOF
11931 #define HAVE_SOCKETS 1
11932 EOF
11933 }
11934
11935       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11936 echo "configure:11937: checking "for sun_len member in struct sockaddr_un"" >&5
11937       cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940
11941 #include <sys/types.h>
11942 #include <sys/socket.h>
11943 #include <sys/un.h>
11944       
11945 int main() {
11946 static struct sockaddr_un x; x.sun_len = 1;
11947 ; return 0; }
11948 EOF
11949 if { (eval echo configure:11950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11950   rm -rf conftest*
11951   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11952     Defining HAVE_SOCKADDR_SUN_LEN
11953 EOF
11954 cat >> confdefs.h <<\EOF
11955 #define HAVE_SOCKADDR_SUN_LEN 1
11956 EOF
11957 }
11958
11959 else
11960   echo "configure: failed program was:" >&5
11961   cat conftest.$ac_ext >&5
11962   rm -rf conftest*
11963   echo "$ac_t""no" 1>&6
11964 fi
11965 rm -f conftest*
11966       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11967 echo "configure:11968: checking "for ip_mreq struct in netinet/in.h"" >&5
11968       cat > conftest.$ac_ext <<EOF
11969 #line 11970 "configure"
11970 #include "confdefs.h"
11971
11972 #include <sys/types.h>
11973 #include <netinet/in.h>
11974       
11975 int main() {
11976 static struct ip_mreq x;
11977 ; return 0; }
11978 EOF
11979 if { (eval echo configure:11980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11980   rm -rf conftest*
11981   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11982     Defining HAVE_MULTICAST
11983 EOF
11984 cat >> confdefs.h <<\EOF
11985 #define HAVE_MULTICAST 1
11986 EOF
11987 }
11988
11989 else
11990   echo "configure: failed program was:" >&5
11991   cat conftest.$ac_ext >&5
11992   rm -rf conftest*
11993   echo "$ac_t""no" 1>&6
11994 fi
11995 rm -f conftest*
11996 else
11997   echo "$ac_t""no" 1>&6
11998 fi
11999
12000 else
12001   echo "$ac_t""no" 1>&6
12002 fi
12003
12004 else
12005   echo "$ac_t""no" 1>&6
12006 fi
12007
12008
12009 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12010 echo "configure:12011: checking for msgget" >&5
12011
12012 cat > conftest.$ac_ext <<EOF
12013 #line 12014 "configure"
12014 #include "confdefs.h"
12015 /* System header to define __stub macros and hopefully few prototypes,
12016     which can conflict with char msgget(); below.  */
12017 #include <assert.h>
12018 /* Override any gcc2 internal prototype to avoid an error.  */
12019 /* We use char because int might match the return type of a gcc2
12020     builtin and then its argument prototype would still apply.  */
12021 char msgget();
12022
12023 int main() {
12024
12025 /* The GNU C library defines this for functions which it implements
12026     to always fail with ENOSYS.  Some functions are actually named
12027     something starting with __ and the normal name is an alias.  */
12028 #if defined (__stub_msgget) || defined (__stub___msgget)
12029 choke me
12030 #else
12031 msgget();
12032 #endif
12033
12034 ; return 0; }
12035 EOF
12036 if { (eval echo configure:12037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12037   rm -rf conftest*
12038   eval "ac_cv_func_msgget=yes"
12039 else
12040   echo "configure: failed program was:" >&5
12041   cat conftest.$ac_ext >&5
12042   rm -rf conftest*
12043   eval "ac_cv_func_msgget=no"
12044 fi
12045 rm -f conftest*
12046
12047 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12048   echo "$ac_t""yes" 1>&6
12049   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12050 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12051 echo "configure:12052: checking for sys/ipc.h" >&5
12052
12053 cat > conftest.$ac_ext <<EOF
12054 #line 12055 "configure"
12055 #include "confdefs.h"
12056 #include <sys/ipc.h>
12057 EOF
12058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12059 { (eval echo configure:12060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12061 if test -z "$ac_err"; then
12062   rm -rf conftest*
12063   eval "ac_cv_header_$ac_safe=yes"
12064 else
12065   echo "$ac_err" >&5
12066   echo "configure: failed program was:" >&5
12067   cat conftest.$ac_ext >&5
12068   rm -rf conftest*
12069   eval "ac_cv_header_$ac_safe=no"
12070 fi
12071 rm -f conftest*
12072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12073   echo "$ac_t""yes" 1>&6
12074   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12075 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12076 echo "configure:12077: checking for sys/msg.h" >&5
12077
12078 cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 #include <sys/msg.h>
12082 EOF
12083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12084 { (eval echo configure:12085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12086 if test -z "$ac_err"; then
12087   rm -rf conftest*
12088   eval "ac_cv_header_$ac_safe=yes"
12089 else
12090   echo "$ac_err" >&5
12091   echo "configure: failed program was:" >&5
12092   cat conftest.$ac_ext >&5
12093   rm -rf conftest*
12094   eval "ac_cv_header_$ac_safe=no"
12095 fi
12096 rm -f conftest*
12097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12098   echo "$ac_t""yes" 1>&6
12099   { test "$extra_verbose" = "yes" && cat << \EOF
12100     Defining HAVE_SYSVIPC
12101 EOF
12102 cat >> confdefs.h <<\EOF
12103 #define HAVE_SYSVIPC 1
12104 EOF
12105 }
12106
12107 else
12108   echo "$ac_t""no" 1>&6
12109 fi
12110
12111 else
12112   echo "$ac_t""no" 1>&6
12113 fi
12114
12115 else
12116   echo "$ac_t""no" 1>&6
12117 fi
12118
12119
12120 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12121 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12122 echo "configure:12123: checking for dirent.h" >&5
12123
12124 cat > conftest.$ac_ext <<EOF
12125 #line 12126 "configure"
12126 #include "confdefs.h"
12127 #include <dirent.h>
12128 EOF
12129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12130 { (eval echo configure:12131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12132 if test -z "$ac_err"; then
12133   rm -rf conftest*
12134   eval "ac_cv_header_$ac_safe=yes"
12135 else
12136   echo "$ac_err" >&5
12137   echo "configure: failed program was:" >&5
12138   cat conftest.$ac_ext >&5
12139   rm -rf conftest*
12140   eval "ac_cv_header_$ac_safe=no"
12141 fi
12142 rm -f conftest*
12143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12144   echo "$ac_t""yes" 1>&6
12145   { test "$extra_verbose" = "yes" && cat << \EOF
12146     Defining SYSV_SYSTEM_DIR
12147 EOF
12148 cat >> confdefs.h <<\EOF
12149 #define SYSV_SYSTEM_DIR 1
12150 EOF
12151 }
12152
12153 else
12154   echo "$ac_t""no" 1>&6
12155 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12156 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12157 echo "configure:12158: checking for sys/dir.h" >&5
12158
12159 cat > conftest.$ac_ext <<EOF
12160 #line 12161 "configure"
12161 #include "confdefs.h"
12162 #include <sys/dir.h>
12163 EOF
12164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12165 { (eval echo configure:12166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12167 if test -z "$ac_err"; then
12168   rm -rf conftest*
12169   eval "ac_cv_header_$ac_safe=yes"
12170 else
12171   echo "$ac_err" >&5
12172   echo "configure: failed program was:" >&5
12173   cat conftest.$ac_ext >&5
12174   rm -rf conftest*
12175   eval "ac_cv_header_$ac_safe=no"
12176 fi
12177 rm -f conftest*
12178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12179   echo "$ac_t""yes" 1>&6
12180   :
12181 else
12182   echo "$ac_t""no" 1>&6
12183 { test "$extra_verbose" = "yes" && cat << \EOF
12184     Defining NONSYSTEM_DIR_LIBRARY
12185 EOF
12186 cat >> confdefs.h <<\EOF
12187 #define NONSYSTEM_DIR_LIBRARY 1
12188 EOF
12189 }
12190
12191 fi
12192
12193 fi
12194
12195
12196 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12197 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12198 echo "configure:12199: checking for nlist.h" >&5
12199
12200 cat > conftest.$ac_ext <<EOF
12201 #line 12202 "configure"
12202 #include "confdefs.h"
12203 #include <nlist.h>
12204 EOF
12205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12206 { (eval echo configure:12207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12208 if test -z "$ac_err"; then
12209   rm -rf conftest*
12210   eval "ac_cv_header_$ac_safe=yes"
12211 else
12212   echo "$ac_err" >&5
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   eval "ac_cv_header_$ac_safe=no"
12217 fi
12218 rm -f conftest*
12219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12220   echo "$ac_t""yes" 1>&6
12221   { test "$extra_verbose" = "yes" && cat << \EOF
12222     Defining NLIST_STRUCT
12223 EOF
12224 cat >> confdefs.h <<\EOF
12225 #define NLIST_STRUCT 1
12226 EOF
12227 }
12228
12229 else
12230   echo "$ac_t""no" 1>&6
12231 fi
12232
12233
12234
12235 echo "checking "for sound support"" 1>&6
12236 echo "configure:12237: checking "for sound support"" >&5
12237 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12238
12239 if test "$with_native_sound" != "no"; then
12240     if test -n "$native_sound_lib"; then
12241     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12242 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12243 echo "configure:12244: checking for multimedia/audio_device.h" >&5
12244
12245 cat > conftest.$ac_ext <<EOF
12246 #line 12247 "configure"
12247 #include "confdefs.h"
12248 #include <multimedia/audio_device.h>
12249 EOF
12250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12251 { (eval echo configure:12252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12253 if test -z "$ac_err"; then
12254   rm -rf conftest*
12255   eval "ac_cv_header_$ac_safe=yes"
12256 else
12257   echo "$ac_err" >&5
12258   echo "configure: failed program was:" >&5
12259   cat conftest.$ac_ext >&5
12260   rm -rf conftest*
12261   eval "ac_cv_header_$ac_safe=no"
12262 fi
12263 rm -f conftest*
12264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12265   echo "$ac_t""yes" 1>&6
12266   sound_found=yes sound_cflags=""
12267       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12268    echo "    xemacs will be linked with \"sunplay.o\""
12269  fi
12270 else
12271   echo "$ac_t""no" 1>&6
12272 fi
12273
12274   fi
12275
12276     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12277     sound_found=yes
12278     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12279    echo "    xemacs will be linked with \"sunplay.o\""
12280  fi
12281     if test -d "/usr/demo/SOUND/include"
12282       then sound_cflags="-I/usr/demo/SOUND/include"
12283       else sound_cflags="-I/usr/demo/SOUND"
12284     fi
12285     if test -z "$native_sound_lib" ; then
12286       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12287         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12288         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12289       fi
12290     fi
12291   fi
12292
12293     if test -z "$sound_found"; then
12294     case "$canonical" in
12295     *-sgi-* )
12296       if test -z "$native_sound_lib"; then
12297         
12298 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12299 echo "configure:12300: checking for ALopenport in -laudio" >&5
12300 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12301
12302 xe_check_libs=" -laudio "
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 ALopenport();
12310
12311 int main() {
12312 ALopenport()
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   native_sound_lib="-laudio"
12330 else
12331   echo "$ac_t""no" 1>&6
12332 fi
12333
12334
12335       fi
12336       if test -n "$native_sound_lib"; then
12337         sound_found=yes sound_cflags=""
12338         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12339    echo "    xemacs will be linked with \"sgiplay.o\""
12340  fi
12341       fi ;;
12342     hppa*-hp-hpux* )
12343       if test -z "$native_sound_lib"; then
12344         
12345 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12346 echo "configure:12347: checking for AOpenAudio in -lAlib" >&5
12347 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12348
12349 xe_check_libs=" -lAlib "
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 AOpenAudio();
12357
12358 int main() {
12359 AOpenAudio()
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   native_sound_lib="-lAlib"
12377 else
12378   echo "$ac_t""no" 1>&6
12379 fi
12380
12381
12382       fi
12383       if test -n "$native_sound_lib"; then
12384         sound_found=yes
12385         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12386    echo "    xemacs will be linked with \"hpplay.o\""
12387  fi
12388         if test "$GCC" = "yes" # Kludge city
12389           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12390           else sound_cflags="+e -I/usr/audio/examples"
12391         fi
12392       fi ;;
12393     esac
12394   fi
12395
12396     if test -z "$sound_found"; then
12397     for dir in "machine" "sys" "linux"; do
12398       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12399 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12400 echo "configure:12401: checking for ${dir}/soundcard.h" >&5
12401
12402 cat > conftest.$ac_ext <<EOF
12403 #line 12404 "configure"
12404 #include "confdefs.h"
12405 #include <${dir}/soundcard.h>
12406 EOF
12407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12408 { (eval echo configure:12409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12410 if test -z "$ac_err"; then
12411   rm -rf conftest*
12412   eval "ac_cv_header_$ac_safe=yes"
12413 else
12414   echo "$ac_err" >&5
12415   echo "configure: failed program was:" >&5
12416   cat conftest.$ac_ext >&5
12417   rm -rf conftest*
12418   eval "ac_cv_header_$ac_safe=no"
12419 fi
12420 rm -f conftest*
12421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12422   echo "$ac_t""yes" 1>&6
12423   sound_found=yes
12424        need_miscplay=yes
12425         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12426    echo "    xemacs will be linked with \"linuxplay.o\""
12427  fi
12428         { test "$extra_verbose" = "yes" && cat << EOF
12429     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12430 EOF
12431 cat >> confdefs.h <<EOF
12432 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12433 EOF
12434 }
12435
12436         break
12437 else
12438   echo "$ac_t""no" 1>&6
12439 fi
12440
12441     done
12442   fi
12443
12444     if test -z "$sound_found"; then
12445     if test "$with_msw" = "yes"; then
12446     sound_found=yes
12447     native_sound_lib=
12448     fi
12449   fi
12450
12451   test "$sound_found" = "yes" && with_native_sound=yes
12452 fi
12453
12454 if test "$with_native_sound" = "yes"; then
12455   { test "$extra_verbose" = "yes" && cat << \EOF
12456     Defining HAVE_NATIVE_SOUND
12457 EOF
12458 cat >> confdefs.h <<\EOF
12459 #define HAVE_NATIVE_SOUND 1
12460 EOF
12461 }
12462
12463   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12464 fi
12465
12466 if test "$with_nas_sound" != "no"; then
12467   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12468 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12469 echo "configure:12470: checking for audio/audiolib.h" >&5
12470
12471 cat > conftest.$ac_ext <<EOF
12472 #line 12473 "configure"
12473 #include "confdefs.h"
12474 #include <audio/audiolib.h>
12475 EOF
12476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12477 { (eval echo configure:12478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12479 if test -z "$ac_err"; then
12480   rm -rf conftest*
12481   eval "ac_cv_header_$ac_safe=yes"
12482 else
12483   echo "$ac_err" >&5
12484   echo "configure: failed program was:" >&5
12485   cat conftest.$ac_ext >&5
12486   rm -rf conftest*
12487   eval "ac_cv_header_$ac_safe=no"
12488 fi
12489 rm -f conftest*
12490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12491   echo "$ac_t""yes" 1>&6
12492   
12493     
12494 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12495 echo "configure:12496: checking for AuOpenServer in -laudio" >&5
12496 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12497
12498 xe_check_libs=" -laudio "
12499 cat > conftest.$ac_ext <<EOF
12500 #line 12501 "configure"
12501 #include "confdefs.h"
12502 /* Override any gcc2 internal prototype to avoid an error.  */
12503 /* We use char because int might match the return type of a gcc2
12504     builtin and then its argument prototype would still apply.  */
12505 char AuOpenServer();
12506
12507 int main() {
12508 AuOpenServer()
12509 ; return 0; }
12510 EOF
12511 if { (eval echo configure:12512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12512   rm -rf conftest*
12513   eval "ac_cv_lib_$ac_lib_var=yes"
12514 else
12515   echo "configure: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   rm -rf conftest*
12518   eval "ac_cv_lib_$ac_lib_var=no"
12519 fi
12520 rm -f conftest*
12521 xe_check_libs=""
12522
12523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12524   echo "$ac_t""yes" 1>&6
12525   have_nas_sound=yes
12526 else
12527   echo "$ac_t""no" 1>&6
12528 fi
12529
12530
12531 else
12532   echo "$ac_t""no" 1>&6
12533 fi
12534
12535   if test "$have_nas_sound" = "yes"; then
12536     with_nas_sound=yes
12537     { test "$extra_verbose" = "yes" && cat << \EOF
12538     Defining HAVE_NAS_SOUND
12539 EOF
12540 cat >> confdefs.h <<\EOF
12541 #define HAVE_NAS_SOUND 1
12542 EOF
12543 }
12544
12545     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12546    echo "    xemacs will be linked with \"nas.o\""
12547  fi
12548     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12549             cat > conftest.$ac_ext <<EOF
12550 #line 12551 "configure"
12551 #include "confdefs.h"
12552 #include <audio/Xtutil.h>
12553 EOF
12554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12555   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12556   :
12557 else
12558   rm -rf conftest*
12559   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12560     Defining NAS_NO_ERROR_JUMP
12561 EOF
12562 cat >> confdefs.h <<\EOF
12563 #define NAS_NO_ERROR_JUMP 1
12564 EOF
12565 }
12566
12567 fi
12568 rm -f conftest*
12569
12570   else
12571     test "$with_nas_sound" = "yes" && \
12572       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12573     with_nas_sound=no
12574   fi
12575 fi
12576
12577 if test "$with_esd_sound" != "no"; then
12578   # Extract the first word of "esd-config", so it can be a program name with args.
12579 set dummy esd-config; ac_word=$2
12580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12581 echo "configure:12582: checking for $ac_word" >&5
12582
12583 if test -n "$have_esd_config"; then
12584   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12585 else
12586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12587   ac_dummy="$PATH"
12588   for ac_dir in $ac_dummy; do
12589     test -z "$ac_dir" && ac_dir=.
12590     if test -f $ac_dir/$ac_word; then
12591       ac_cv_prog_have_esd_config="yes"
12592       break
12593     fi
12594   done
12595   IFS="$ac_save_ifs"
12596   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12597 fi
12598 have_esd_config="$ac_cv_prog_have_esd_config"
12599 if test -n "$have_esd_config"; then
12600   echo "$ac_t""$have_esd_config" 1>&6
12601 else
12602   echo "$ac_t""no" 1>&6
12603 fi
12604
12605   if test "$have_esd_config" = "yes"; then
12606     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12607     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
12608     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12609     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12610 echo "configure:12611: checking for esd_play_stream" >&5
12611
12612 cat > conftest.$ac_ext <<EOF
12613 #line 12614 "configure"
12614 #include "confdefs.h"
12615 /* System header to define __stub macros and hopefully few prototypes,
12616     which can conflict with char esd_play_stream(); below.  */
12617 #include <assert.h>
12618 /* Override any gcc2 internal prototype to avoid an error.  */
12619 /* We use char because int might match the return type of a gcc2
12620     builtin and then its argument prototype would still apply.  */
12621 char esd_play_stream();
12622
12623 int main() {
12624
12625 /* The GNU C library defines this for functions which it implements
12626     to always fail with ENOSYS.  Some functions are actually named
12627     something starting with __ and the normal name is an alias.  */
12628 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12629 choke me
12630 #else
12631 esd_play_stream();
12632 #endif
12633
12634 ; return 0; }
12635 EOF
12636 if { (eval echo configure:12637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12637   rm -rf conftest*
12638   eval "ac_cv_func_esd_play_stream=yes"
12639 else
12640   echo "configure: failed program was:" >&5
12641   cat conftest.$ac_ext >&5
12642   rm -rf conftest*
12643   eval "ac_cv_func_esd_play_stream=no"
12644 fi
12645 rm -f conftest*
12646
12647 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12648   echo "$ac_t""yes" 1>&6
12649   have_esd_sound=yes
12650 else
12651   echo "$ac_t""no" 1>&6
12652 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12653 fi
12654
12655   fi
12656
12657   if test "$have_esd_sound" = "yes"; then
12658     with_esd_sound=yes
12659     need_miscplay=yes
12660     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12661    echo "    xemacs will be linked with \"esd.o\""
12662  fi
12663     { test "$extra_verbose" = "yes" && cat << \EOF
12664     Defining HAVE_ESD_SOUND
12665 EOF
12666 cat >> confdefs.h <<\EOF
12667 #define HAVE_ESD_SOUND 1
12668 EOF
12669 }
12670
12671   else
12672     test "$with_esd_sound" = "yes" && \
12673       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12674     with_esd_sound=no
12675   fi
12676 fi
12677
12678 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12679    echo "    xemacs will be linked with \"miscplay.o\""
12680  fi
12681
12682
12683 test -z "$with_tty" && with_tty=yes
12684
12685 if test "$with_tty" = "yes"  ; then
12686   echo "checking for TTY-related features" 1>&6
12687 echo "configure:12688: checking for TTY-related features" >&5
12688   { test "$extra_verbose" = "yes" && cat << \EOF
12689     Defining HAVE_TTY
12690 EOF
12691 cat >> confdefs.h <<\EOF
12692 #define HAVE_TTY 1
12693 EOF
12694 }
12695
12696   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
12697    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\""
12698  fi
12699
12700     if test -z "$with_ncurses"; then
12701     
12702 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12703 echo "configure:12704: checking for tgetent in -lncurses" >&5
12704 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12705
12706 xe_check_libs=" -lncurses "
12707 cat > conftest.$ac_ext <<EOF
12708 #line 12709 "configure"
12709 #include "confdefs.h"
12710 /* Override any gcc2 internal prototype to avoid an error.  */
12711 /* We use char because int might match the return type of a gcc2
12712     builtin and then its argument prototype would still apply.  */
12713 char tgetent();
12714
12715 int main() {
12716 tgetent()
12717 ; return 0; }
12718 EOF
12719 if { (eval echo configure:12720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12720   rm -rf conftest*
12721   eval "ac_cv_lib_$ac_lib_var=yes"
12722 else
12723   echo "configure: failed program was:" >&5
12724   cat conftest.$ac_ext >&5
12725   rm -rf conftest*
12726   eval "ac_cv_lib_$ac_lib_var=no"
12727 fi
12728 rm -f conftest*
12729 xe_check_libs=""
12730
12731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12732   echo "$ac_t""yes" 1>&6
12733   with_ncurses=yes
12734 else
12735   echo "$ac_t""no" 1>&6
12736 with_ncurses=no
12737 fi
12738
12739
12740   fi
12741   if test "$with_ncurses" = "yes"; then
12742     { test "$extra_verbose" = "yes" && cat << \EOF
12743     Defining HAVE_NCURSES
12744 EOF
12745 cat >> confdefs.h <<\EOF
12746 #define HAVE_NCURSES 1
12747 EOF
12748 }
12749
12750     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12751 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12752 echo "configure:12753: checking for ncurses/curses.h" >&5
12753
12754 cat > conftest.$ac_ext <<EOF
12755 #line 12756 "configure"
12756 #include "confdefs.h"
12757 #include <ncurses/curses.h>
12758 EOF
12759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12760 { (eval echo configure:12761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12762 if test -z "$ac_err"; then
12763   rm -rf conftest*
12764   eval "ac_cv_header_$ac_safe=yes"
12765 else
12766   echo "$ac_err" >&5
12767   echo "configure: failed program was:" >&5
12768   cat conftest.$ac_ext >&5
12769   rm -rf conftest*
12770   eval "ac_cv_header_$ac_safe=no"
12771 fi
12772 rm -f conftest*
12773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12774   echo "$ac_t""yes" 1>&6
12775   curses_h_file=ncurses/curses.h
12776 else
12777   echo "$ac_t""no" 1>&6
12778 fi
12779
12780     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12781 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12782 echo "configure:12783: checking for ncurses/term.h" >&5
12783
12784 cat > conftest.$ac_ext <<EOF
12785 #line 12786 "configure"
12786 #include "confdefs.h"
12787 #include <ncurses/term.h>
12788 EOF
12789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12790 { (eval echo configure:12791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12792 if test -z "$ac_err"; then
12793   rm -rf conftest*
12794   eval "ac_cv_header_$ac_safe=yes"
12795 else
12796   echo "$ac_err" >&5
12797   echo "configure: failed program was:" >&5
12798   cat conftest.$ac_ext >&5
12799   rm -rf conftest*
12800   eval "ac_cv_header_$ac_safe=no"
12801 fi
12802 rm -f conftest*
12803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12804   echo "$ac_t""yes" 1>&6
12805   term_h_file=ncurses/term.h
12806 else
12807   echo "$ac_t""no" 1>&6
12808 fi
12809
12810     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12811    echo "    xemacs will be linked with \"terminfo.o\""
12812  fi
12813     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12814
12815     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12816                         save_c_switch_site="$c_switch_site"
12817       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12818       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12819 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12820 echo "configure:12821: checking for ncurses/curses.h" >&5
12821
12822 cat > conftest.$ac_ext <<EOF
12823 #line 12824 "configure"
12824 #include "confdefs.h"
12825 #include <ncurses/curses.h>
12826 EOF
12827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12828 { (eval echo configure:12829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12830 if test -z "$ac_err"; then
12831   rm -rf conftest*
12832   eval "ac_cv_header_$ac_safe=yes"
12833 else
12834   echo "$ac_err" >&5
12835   echo "configure: failed program was:" >&5
12836   cat conftest.$ac_ext >&5
12837   rm -rf conftest*
12838   eval "ac_cv_header_$ac_safe=no"
12839 fi
12840 rm -f conftest*
12841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12842   echo "$ac_t""yes" 1>&6
12843   curses_h_file=ncurses/curses.h
12844 else
12845   echo "$ac_t""no" 1>&6
12846 fi
12847
12848       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12849         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12850         else c_switch_site="$save_c_switch_site"
12851       fi
12852     fi
12853   else         if test "$have_terminfo" = "yes"; then
12854       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12855    echo "    xemacs will be linked with \"terminfo.o\""
12856  fi
12857       if test -n "$libs_termcap"; then
12858         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12859       else
12860         for lib in curses termlib termcap; do
12861           
12862 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12863 echo "configure:12864: checking for tgetent in -l$lib" >&5
12864 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12865
12866 xe_check_libs=" -l$lib "
12867 cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870 /* Override any gcc2 internal prototype to avoid an error.  */
12871 /* We use char because int might match the return type of a gcc2
12872     builtin and then its argument prototype would still apply.  */
12873 char tgetent();
12874
12875 int main() {
12876 tgetent()
12877 ; return 0; }
12878 EOF
12879 if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12880   rm -rf conftest*
12881   eval "ac_cv_lib_$ac_lib_var=yes"
12882 else
12883   echo "configure: failed program was:" >&5
12884   cat conftest.$ac_ext >&5
12885   rm -rf conftest*
12886   eval "ac_cv_lib_$ac_lib_var=no"
12887 fi
12888 rm -f conftest*
12889 xe_check_libs=""
12890
12891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12892   echo "$ac_t""yes" 1>&6
12893   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12894 else
12895   echo "$ac_t""no" 1>&6
12896 fi
12897
12898
12899         done
12900       fi
12901     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12902    echo "    xemacs will be linked with \"tparam.o\""
12903  fi
12904                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12905       if test -n "$libs_termcap"; then
12906         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12907       else
12908         
12909 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12910 echo "configure:12911: checking for tgetent in -lcurses" >&5
12911 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12912
12913 xe_check_libs=" -lcurses "
12914 cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 /* Override any gcc2 internal prototype to avoid an error.  */
12918 /* We use char because int might match the return type of a gcc2
12919     builtin and then its argument prototype would still apply.  */
12920 char tgetent();
12921
12922 int main() {
12923 tgetent()
12924 ; return 0; }
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12927   rm -rf conftest*
12928   eval "ac_cv_lib_$ac_lib_var=yes"
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   eval "ac_cv_lib_$ac_lib_var=no"
12934 fi
12935 rm -f conftest*
12936 xe_check_libs=""
12937
12938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12939   echo "$ac_t""yes" 1>&6
12940   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12941 else
12942   echo "$ac_t""no" 1>&6
12943 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12944 echo "configure:12945: checking for tgetent in -ltermcap" >&5
12945 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12946
12947 xe_check_libs=" -ltermcap "
12948 cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 /* Override any gcc2 internal prototype to avoid an error.  */
12952 /* We use char because int might match the return type of a gcc2
12953     builtin and then its argument prototype would still apply.  */
12954 char tgetent();
12955
12956 int main() {
12957 tgetent()
12958 ; return 0; }
12959 EOF
12960 if { (eval echo configure:12961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12961   rm -rf conftest*
12962   eval "ac_cv_lib_$ac_lib_var=yes"
12963 else
12964   echo "configure: failed program was:" >&5
12965   cat conftest.$ac_ext >&5
12966   rm -rf conftest*
12967   eval "ac_cv_lib_$ac_lib_var=no"
12968 fi
12969 rm -f conftest*
12970 xe_check_libs=""
12971
12972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12973   echo "$ac_t""yes" 1>&6
12974   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12975 else
12976   echo "$ac_t""no" 1>&6
12977 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12978    echo "    xemacs will be linked with \"termcap.o\""
12979  fi
12980 fi
12981
12982
12983 fi
12984
12985
12986       fi
12987     fi
12988   fi
12989   { test "$extra_verbose" = "yes" && cat << EOF
12990     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12991 EOF
12992 cat >> confdefs.h <<EOF
12993 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12994 EOF
12995 }
12996
12997   { test "$extra_verbose" = "yes" && cat << EOF
12998     Defining TERM_H_FILE = "${term_h_file-term.h}"
12999 EOF
13000 cat >> confdefs.h <<EOF
13001 #define TERM_H_FILE "${term_h_file-term.h}"
13002 EOF
13003 }
13004
13005
13006     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13007 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13008 echo "configure:13009: checking for gpm.h" >&5
13009
13010 cat > conftest.$ac_ext <<EOF
13011 #line 13012 "configure"
13012 #include "confdefs.h"
13013 #include <gpm.h>
13014 EOF
13015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13016 { (eval echo configure:13017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13018 if test -z "$ac_err"; then
13019   rm -rf conftest*
13020   eval "ac_cv_header_$ac_safe=yes"
13021 else
13022   echo "$ac_err" >&5
13023   echo "configure: failed program was:" >&5
13024   cat conftest.$ac_ext >&5
13025   rm -rf conftest*
13026   eval "ac_cv_header_$ac_safe=no"
13027 fi
13028 rm -f conftest*
13029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13030   echo "$ac_t""yes" 1>&6
13031   :
13032 else
13033   echo "$ac_t""no" 1>&6
13034 with_gpm=no
13035 fi
13036  }
13037   test -z "$with_gpm" && { 
13038 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13039 echo "configure:13040: checking for Gpm_Open in -lgpm" >&5
13040 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13041
13042 xe_check_libs=" -lgpm "
13043 cat > conftest.$ac_ext <<EOF
13044 #line 13045 "configure"
13045 #include "confdefs.h"
13046 /* Override any gcc2 internal prototype to avoid an error.  */
13047 /* We use char because int might match the return type of a gcc2
13048     builtin and then its argument prototype would still apply.  */
13049 char Gpm_Open();
13050
13051 int main() {
13052 Gpm_Open()
13053 ; return 0; }
13054 EOF
13055 if { (eval echo configure:13056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13056   rm -rf conftest*
13057   eval "ac_cv_lib_$ac_lib_var=yes"
13058 else
13059   echo "configure: failed program was:" >&5
13060   cat conftest.$ac_ext >&5
13061   rm -rf conftest*
13062   eval "ac_cv_lib_$ac_lib_var=no"
13063 fi
13064 rm -f conftest*
13065 xe_check_libs=""
13066
13067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13068   echo "$ac_t""yes" 1>&6
13069   with_gpm=yes
13070 else
13071   echo "$ac_t""no" 1>&6
13072 with_gpm=no
13073 fi
13074
13075  }
13076   if test "$with_gpm" = "yes"; then
13077     { test "$extra_verbose" = "yes" && cat << \EOF
13078     Defining HAVE_GPM
13079 EOF
13080 cat >> confdefs.h <<\EOF
13081 #define HAVE_GPM 1
13082 EOF
13083 }
13084
13085     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13086    echo "    xemacs will be linked with \"gpmevent.o\""
13087  fi
13088     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13089   fi
13090
13091 else   for feature in ncurses gpm; do
13092     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13093       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13094     fi
13095     eval "with_${feature}=no"
13096   done
13097 fi 
13098 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13099    echo "    xemacs will be linked with \"event-unixoid.o\""
13100  fi
13101
13102
13103 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13104   != "no no no" && echo "checking for database support" 1>&6
13105 echo "configure:13106: checking for database support" >&5
13106
13107 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13108   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13109 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13110 echo "configure:13111: checking for ndbm.h" >&5
13111
13112 cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 #include <ndbm.h>
13116 EOF
13117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13118 { (eval echo configure:13119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13120 if test -z "$ac_err"; then
13121   rm -rf conftest*
13122   eval "ac_cv_header_$ac_safe=yes"
13123 else
13124   echo "$ac_err" >&5
13125   echo "configure: failed program was:" >&5
13126   cat conftest.$ac_ext >&5
13127   rm -rf conftest*
13128   eval "ac_cv_header_$ac_safe=no"
13129 fi
13130 rm -f conftest*
13131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13132   echo "$ac_t""yes" 1>&6
13133   :
13134 else
13135   echo "$ac_t""no" 1>&6
13136
13137     test "$with_database_gdbm" = "yes" -o \
13138          "$with_database_dbm"  = "yes" && \
13139       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13140     with_database_gdbm=no with_database_dbm=no
13141 fi
13142
13143 fi
13144
13145 if test "$with_database_gdbm" != "no"; then
13146   
13147 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13148 echo "configure:13149: checking for dbm_open in -lgdbm" >&5
13149 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13150
13151 xe_check_libs=" -lgdbm "
13152 cat > conftest.$ac_ext <<EOF
13153 #line 13154 "configure"
13154 #include "confdefs.h"
13155 /* Override any gcc2 internal prototype to avoid an error.  */
13156 /* We use char because int might match the return type of a gcc2
13157     builtin and then its argument prototype would still apply.  */
13158 char dbm_open();
13159
13160 int main() {
13161 dbm_open()
13162 ; return 0; }
13163 EOF
13164 if { (eval echo configure:13165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13165   rm -rf conftest*
13166   eval "ac_cv_lib_$ac_lib_var=yes"
13167 else
13168   echo "configure: failed program was:" >&5
13169   cat conftest.$ac_ext >&5
13170   rm -rf conftest*
13171   eval "ac_cv_lib_$ac_lib_var=no"
13172 fi
13173 rm -f conftest*
13174 xe_check_libs=""
13175
13176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13177   echo "$ac_t""yes" 1>&6
13178   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13179 else
13180   echo "$ac_t""no" 1>&6
13181 if test "$with_database_gdbm" = "yes"; then
13182      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13183    fi
13184    with_database_gdbm=no
13185 fi
13186
13187
13188 fi
13189
13190 if test "$with_database_dbm" != "no"; then
13191   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13192 echo "configure:13193: checking for dbm_open" >&5
13193
13194 cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197 /* System header to define __stub macros and hopefully few prototypes,
13198     which can conflict with char dbm_open(); below.  */
13199 #include <assert.h>
13200 /* Override any gcc2 internal prototype to avoid an error.  */
13201 /* We use char because int might match the return type of a gcc2
13202     builtin and then its argument prototype would still apply.  */
13203 char dbm_open();
13204
13205 int main() {
13206
13207 /* The GNU C library defines this for functions which it implements
13208     to always fail with ENOSYS.  Some functions are actually named
13209     something starting with __ and the normal name is an alias.  */
13210 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13211 choke me
13212 #else
13213 dbm_open();
13214 #endif
13215
13216 ; return 0; }
13217 EOF
13218 if { (eval echo configure:13219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13219   rm -rf conftest*
13220   eval "ac_cv_func_dbm_open=yes"
13221 else
13222   echo "configure: failed program was:" >&5
13223   cat conftest.$ac_ext >&5
13224   rm -rf conftest*
13225   eval "ac_cv_func_dbm_open=no"
13226 fi
13227 rm -f conftest*
13228
13229 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13230   echo "$ac_t""yes" 1>&6
13231   with_database_dbm=yes libdbm=
13232 else
13233   echo "$ac_t""no" 1>&6
13234
13235     
13236 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13237 echo "configure:13238: checking for dbm_open in -ldbm" >&5
13238 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13239
13240 xe_check_libs=" -ldbm "
13241 cat > conftest.$ac_ext <<EOF
13242 #line 13243 "configure"
13243 #include "confdefs.h"
13244 /* Override any gcc2 internal prototype to avoid an error.  */
13245 /* We use char because int might match the return type of a gcc2
13246     builtin and then its argument prototype would still apply.  */
13247 char dbm_open();
13248
13249 int main() {
13250 dbm_open()
13251 ; return 0; }
13252 EOF
13253 if { (eval echo configure:13254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13254   rm -rf conftest*
13255   eval "ac_cv_lib_$ac_lib_var=yes"
13256 else
13257   echo "configure: failed program was:" >&5
13258   cat conftest.$ac_ext >&5
13259   rm -rf conftest*
13260   eval "ac_cv_lib_$ac_lib_var=no"
13261 fi
13262 rm -f conftest*
13263 xe_check_libs=""
13264
13265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13266   echo "$ac_t""yes" 1>&6
13267   with_database_dbm=yes libdbm=-ldbm
13268 else
13269   echo "$ac_t""no" 1>&6
13270 test "$with_database_dbm" = "yes" && \
13271         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13272       with_database_dbm=no
13273 fi
13274
13275
13276 fi
13277
13278 fi
13279
13280 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13281 test "$with_database_gdbm" = "yes" -o \
13282      "$with_database_dbm"  = "yes" && \
13283   { test "$extra_verbose" = "yes" && cat << \EOF
13284     Defining HAVE_DBM
13285 EOF
13286 cat >> confdefs.h <<\EOF
13287 #define HAVE_DBM 1
13288 EOF
13289 }
13290
13291
13292 if test "$with_database_berkdb" != "no"; then
13293   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13294 echo "configure:13295: checking for Berkeley db.h" >&5
13295   for header in "db/db.h" "db.h"; do
13296     cat > conftest.$ac_ext <<EOF
13297 #line 13298 "configure"
13298 #include "confdefs.h"
13299
13300 #include <stdlib.h>
13301 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13302 #ifdef HAVE_INTTYPES_H
13303 #define __BIT_TYPES_DEFINED__
13304 #include <inttypes.h>
13305 typedef uint8_t  u_int8_t;
13306 typedef uint16_t u_int16_t;
13307 typedef uint32_t u_int32_t;
13308 #ifdef WE_DONT_NEED_QUADS
13309 typedef uint64_t u_int64_t;
13310 #endif
13311 #endif
13312 #endif
13313 #include <$header>
13314
13315 int main() {
13316
13317 ; return 0; }
13318 EOF
13319 if { (eval echo configure:13320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13320   rm -rf conftest*
13321   db_h_file="$header"; break
13322 else
13323   echo "configure: failed program was:" >&5
13324   cat conftest.$ac_ext >&5
13325 fi
13326 rm -f conftest*
13327   done
13328   if test -z "$db_h_file"
13329   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13330   else echo "$ac_t""$db_h_file" 1>&6
13331   fi
13332
13333   if test "$with_database_berkdb" != "no"; then
13334     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13335 echo "configure:13336: checking for Berkeley DB version" >&5
13336     cat > conftest.$ac_ext <<EOF
13337 #line 13338 "configure"
13338 #include "confdefs.h"
13339 #include <$db_h_file>
13340 #if DB_VERSION_MAJOR > 1
13341 yes
13342 #endif
13343
13344 EOF
13345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13346   egrep "yes" >/dev/null 2>&1; then
13347   rm -rf conftest*
13348   cat > conftest.$ac_ext <<EOF
13349 #line 13350 "configure"
13350 #include "confdefs.h"
13351 #include <$db_h_file>
13352 #if DB_VERSION_MAJOR > 2
13353 yes
13354 #endif
13355
13356 EOF
13357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13358   egrep "yes" >/dev/null 2>&1; then
13359   rm -rf conftest*
13360   echo "$ac_t""3" 1>&6; dbfunc=db_create
13361 else
13362   rm -rf conftest*
13363   
13364     echo "$ac_t""2" 1>&6; dbfunc=db_open
13365 fi
13366 rm -f conftest*
13367
13368 else
13369   rm -rf conftest*
13370   
13371     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13372 fi
13373 rm -f conftest*
13374
13375     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13376 echo "configure:13377: checking for $dbfunc" >&5
13377
13378 cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 /* System header to define __stub macros and hopefully few prototypes,
13382     which can conflict with char $dbfunc(); below.  */
13383 #include <assert.h>
13384 /* Override any gcc2 internal prototype to avoid an error.  */
13385 /* We use char because int might match the return type of a gcc2
13386     builtin and then its argument prototype would still apply.  */
13387 char $dbfunc();
13388
13389 int main() {
13390
13391 /* The GNU C library defines this for functions which it implements
13392     to always fail with ENOSYS.  Some functions are actually named
13393     something starting with __ and the normal name is an alias.  */
13394 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13395 choke me
13396 #else
13397 $dbfunc();
13398 #endif
13399
13400 ; return 0; }
13401 EOF
13402 if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13403   rm -rf conftest*
13404   eval "ac_cv_func_$dbfunc=yes"
13405 else
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -rf conftest*
13409   eval "ac_cv_func_$dbfunc=no"
13410 fi
13411 rm -f conftest*
13412
13413 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13414   echo "$ac_t""yes" 1>&6
13415   with_database_berkdb=yes need_libdb=no
13416 else
13417   echo "$ac_t""no" 1>&6
13418
13419     
13420 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13421 echo "configure:13422: checking for $dbfunc in -ldb" >&5
13422 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13423
13424 xe_check_libs=" -ldb "
13425 cat > conftest.$ac_ext <<EOF
13426 #line 13427 "configure"
13427 #include "confdefs.h"
13428 /* Override any gcc2 internal prototype to avoid an error.  */
13429 /* We use char because int might match the return type of a gcc2
13430     builtin and then its argument prototype would still apply.  */
13431 char $dbfunc();
13432
13433 int main() {
13434 $dbfunc()
13435 ; return 0; }
13436 EOF
13437 if { (eval echo configure:13438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13438   rm -rf conftest*
13439   eval "ac_cv_lib_$ac_lib_var=yes"
13440 else
13441   echo "configure: failed program was:" >&5
13442   cat conftest.$ac_ext >&5
13443   rm -rf conftest*
13444   eval "ac_cv_lib_$ac_lib_var=no"
13445 fi
13446 rm -f conftest*
13447 xe_check_libs=""
13448
13449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13450   echo "$ac_t""yes" 1>&6
13451   with_database_berkdb=yes need_libdb=yes
13452 else
13453   echo "$ac_t""no" 1>&6
13454 fi
13455
13456
13457 fi
13458
13459   fi
13460
13461   if test "$with_database_berkdb" = "yes"; then
13462     { test "$extra_verbose" = "yes" && cat << EOF
13463     Defining DB_H_FILE = "$db_h_file"
13464 EOF
13465 cat >> confdefs.h <<EOF
13466 #define DB_H_FILE "$db_h_file"
13467 EOF
13468 }
13469
13470     { test "$extra_verbose" = "yes" && cat << \EOF
13471     Defining HAVE_BERKELEY_DB
13472 EOF
13473 cat >> confdefs.h <<\EOF
13474 #define HAVE_BERKELEY_DB 1
13475 EOF
13476 }
13477
13478     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13479   else with_database_berkdb=no
13480   fi
13481 fi
13482
13483 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13484      != "no no no"; then
13485   { test "$extra_verbose" = "yes" && cat << \EOF
13486     Defining HAVE_DATABASE
13487 EOF
13488 cat >> confdefs.h <<\EOF
13489 #define HAVE_DATABASE 1
13490 EOF
13491 }
13492
13493   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13494    echo "    xemacs will be linked with \"database.o\""
13495  fi
13496 fi
13497
13498 if test "$with_socks" = "yes"; then
13499   
13500 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13501 echo "configure:13502: checking for SOCKSinit in -lsocks" >&5
13502 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13503
13504 xe_check_libs=" -lsocks "
13505 cat > conftest.$ac_ext <<EOF
13506 #line 13507 "configure"
13507 #include "confdefs.h"
13508 /* Override any gcc2 internal prototype to avoid an error.  */
13509 /* We use char because int might match the return type of a gcc2
13510     builtin and then its argument prototype would still apply.  */
13511 char SOCKSinit();
13512
13513 int main() {
13514 SOCKSinit()
13515 ; return 0; }
13516 EOF
13517 if { (eval echo configure:13518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13518   rm -rf conftest*
13519   eval "ac_cv_lib_$ac_lib_var=yes"
13520 else
13521   echo "configure: failed program was:" >&5
13522   cat conftest.$ac_ext >&5
13523   rm -rf conftest*
13524   eval "ac_cv_lib_$ac_lib_var=no"
13525 fi
13526 rm -f conftest*
13527 xe_check_libs=""
13528
13529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13530   echo "$ac_t""yes" 1>&6
13531     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13532     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13533   { test "$extra_verbose" = "yes" && cat << EOF
13534     Defining $ac_tr_lib
13535 EOF
13536 cat >> confdefs.h <<EOF
13537 #define $ac_tr_lib 1
13538 EOF
13539 }
13540
13541   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13542
13543 else
13544   echo "$ac_t""no" 1>&6
13545 fi
13546
13547
13548   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13549     Defining HAVE_SOCKS
13550 EOF
13551 cat >> confdefs.h <<\EOF
13552 #define HAVE_SOCKS 1
13553 EOF
13554 }
13555
13556 fi
13557
13558 if test "$usage_tracking" = "yes"; then
13559   { test "$extra_verbose" = "yes" && cat << \EOF
13560     Defining USAGE_TRACKING
13561 EOF
13562 cat >> confdefs.h <<\EOF
13563 #define USAGE_TRACKING 1
13564 EOF
13565 }
13566
13567   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13568 fi
13569
13570 if test "$with_modules" != "no"; then
13571   echo "checking for module support" 1>&6
13572 echo "configure:13573: checking for module support" >&5
13573
13574     if test "$with_msw" = "yes"; then
13575     have_dl=yes;
13576   else
13577         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13578 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13579 echo "configure:13580: checking for dlfcn.h" >&5
13580
13581 cat > conftest.$ac_ext <<EOF
13582 #line 13583 "configure"
13583 #include "confdefs.h"
13584 #include <dlfcn.h>
13585 EOF
13586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13587 { (eval echo configure:13588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13589 if test -z "$ac_err"; then
13590   rm -rf conftest*
13591   eval "ac_cv_header_$ac_safe=yes"
13592 else
13593   echo "$ac_err" >&5
13594   echo "configure: failed program was:" >&5
13595   cat conftest.$ac_ext >&5
13596   rm -rf conftest*
13597   eval "ac_cv_header_$ac_safe=no"
13598 fi
13599 rm -f conftest*
13600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13601   echo "$ac_t""yes" 1>&6
13602   
13603       
13604 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13605 echo "configure:13606: checking for dlopen in -ldl" >&5
13606 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
13607
13608 xe_check_libs=" -ldl "
13609 cat > conftest.$ac_ext <<EOF
13610 #line 13611 "configure"
13611 #include "confdefs.h"
13612 /* Override any gcc2 internal prototype to avoid an error.  */
13613 /* We use char because int might match the return type of a gcc2
13614     builtin and then its argument prototype would still apply.  */
13615 char dlopen();
13616
13617 int main() {
13618 dlopen()
13619 ; return 0; }
13620 EOF
13621 if { (eval echo configure:13622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13622   rm -rf conftest*
13623   eval "ac_cv_lib_$ac_lib_var=yes"
13624 else
13625   echo "configure: failed program was:" >&5
13626   cat conftest.$ac_ext >&5
13627   rm -rf conftest*
13628   eval "ac_cv_lib_$ac_lib_var=no"
13629 fi
13630 rm -f conftest*
13631 xe_check_libs=""
13632
13633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13634   echo "$ac_t""yes" 1>&6
13635   have_dl=yes libdl=dl
13636 else
13637   echo "$ac_t""no" 1>&6
13638
13639 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13640 echo "configure:13641: checking for dlopen in -lc" >&5
13641 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
13642
13643 xe_check_libs=" -lc "
13644 cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 /* Override any gcc2 internal prototype to avoid an error.  */
13648 /* We use char because int might match the return type of a gcc2
13649     builtin and then its argument prototype would still apply.  */
13650 char dlopen();
13651
13652 int main() {
13653 dlopen()
13654 ; return 0; }
13655 EOF
13656 if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13657   rm -rf conftest*
13658   eval "ac_cv_lib_$ac_lib_var=yes"
13659 else
13660   echo "configure: failed program was:" >&5
13661   cat conftest.$ac_ext >&5
13662   rm -rf conftest*
13663   eval "ac_cv_lib_$ac_lib_var=no"
13664 fi
13665 rm -f conftest*
13666 xe_check_libs=""
13667
13668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13669   echo "$ac_t""yes" 1>&6
13670   have_dl=yes 
13671 else
13672   echo "$ac_t""no" 1>&6
13673 fi
13674
13675
13676 fi
13677
13678
13679 else
13680   echo "$ac_t""no" 1>&6
13681 fi
13682
13683     if test -n "$have_dl"; then
13684       { test "$extra_verbose" = "yes" && cat << \EOF
13685     Defining HAVE_DLOPEN
13686 EOF
13687 cat >> confdefs.h <<\EOF
13688 #define HAVE_DLOPEN 1
13689 EOF
13690 }
13691
13692     else
13693       
13694 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13695 echo "configure:13696: checking for shl_load in -ldld" >&5
13696 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13697
13698 xe_check_libs=" -ldld "
13699 cat > conftest.$ac_ext <<EOF
13700 #line 13701 "configure"
13701 #include "confdefs.h"
13702 /* Override any gcc2 internal prototype to avoid an error.  */
13703 /* We use char because int might match the return type of a gcc2
13704     builtin and then its argument prototype would still apply.  */
13705 char shl_load();
13706
13707 int main() {
13708 shl_load()
13709 ; return 0; }
13710 EOF
13711 if { (eval echo configure:13712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13712   rm -rf conftest*
13713   eval "ac_cv_lib_$ac_lib_var=yes"
13714 else
13715   echo "configure: failed program was:" >&5
13716   cat conftest.$ac_ext >&5
13717   rm -rf conftest*
13718   eval "ac_cv_lib_$ac_lib_var=no"
13719 fi
13720 rm -f conftest*
13721 xe_check_libs=""
13722
13723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13724   echo "$ac_t""yes" 1>&6
13725   libdl=dld have_dl=yes;
13726         { test "$extra_verbose" = "yes" && cat << \EOF
13727     Defining HAVE_SHL_LOAD
13728 EOF
13729 cat >> confdefs.h <<\EOF
13730 #define HAVE_SHL_LOAD 1
13731 EOF
13732 }
13733
13734 else
13735   echo "$ac_t""no" 1>&6
13736
13737 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13738 echo "configure:13739: checking for dld_init in -ldld" >&5
13739 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13740
13741 xe_check_libs=" -ldld "
13742 cat > conftest.$ac_ext <<EOF
13743 #line 13744 "configure"
13744 #include "confdefs.h"
13745 /* Override any gcc2 internal prototype to avoid an error.  */
13746 /* We use char because int might match the return type of a gcc2
13747     builtin and then its argument prototype would still apply.  */
13748 char dld_init();
13749
13750 int main() {
13751 dld_init()
13752 ; return 0; }
13753 EOF
13754 if { (eval echo configure:13755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13755   rm -rf conftest*
13756   eval "ac_cv_lib_$ac_lib_var=yes"
13757 else
13758   echo "configure: failed program was:" >&5
13759   cat conftest.$ac_ext >&5
13760   rm -rf conftest*
13761   eval "ac_cv_lib_$ac_lib_var=no"
13762 fi
13763 rm -f conftest*
13764 xe_check_libs=""
13765
13766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13767   echo "$ac_t""yes" 1>&6
13768   libdl=dld have_dl=yes;
13769         { test "$extra_verbose" = "yes" && cat << \EOF
13770     Defining HAVE_DLD_INIT
13771 EOF
13772 cat >> confdefs.h <<\EOF
13773 #define HAVE_DLD_INIT 1
13774 EOF
13775 }
13776
13777 else
13778   echo "$ac_t""no" 1>&6
13779 fi
13780
13781
13782 fi
13783
13784
13785     fi
13786   fi 
13787   if test -n "$have_dl"; then
13788         
13789 dll_ld=
13790 dll_ldflags=
13791 dll_cflags=
13792 dll_post=
13793 dll_ldo="-o"
13794 ld_dynamic_link_flags=
13795 xehost=$canonical
13796 xealias=$internal_configuration
13797
13798 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13799 echo "configure:13800: checking how to build dynamic libraries for ${xehost}" >&5
13800 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13801 case "$xehost" in
13802 *-*-linux-gnu*) ;;
13803 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13804 esac
13805
13806 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13807 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13808 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13809
13810 case "$xehost_os" in
13811 aix3*)
13812   # AIX sometimes has problems with the GCC collect2 program.  For some
13813   # reason, if we set the COLLECT_NAMES environment variable, the problems
13814   # vanish in a puff of smoke.
13815   if test "${COLLECT_NAMES+set}" != set; then
13816     COLLECT_NAMES=
13817     export COLLECT_NAMES
13818   fi
13819   ;;
13820 esac
13821
13822 # Now see if the compiler is really GCC.
13823 if test "$GCC" = "yes"; then
13824   XEGCC=yes
13825 else
13826   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13827 echo "configure:13828: checking checking whether we are using GNU C" >&5
13828   cat > conftest.$ac_ext <<EOF
13829 #line 13830 "configure"
13830 #include "confdefs.h"
13831
13832 #ifdef __GNUC__
13833   yes;
13834 #endif
13835
13836 EOF
13837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13838   egrep "yes" >/dev/null 2>&1; then
13839   rm -rf conftest*
13840   XEGCC=yes
13841 else
13842   rm -rf conftest*
13843   XEGCC=no
13844 fi
13845 rm -f conftest*
13846
13847   echo "$ac_t""${XEGCC}" 1>&6
13848 fi
13849
13850 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13851 echo "configure:13852: checking how to produce PIC code" >&5
13852 wl=
13853
13854 can_build_shared=yes
13855 if test "$XEGCC" = yes; then
13856   wl='-Wl,'
13857
13858   case "$xehost_os" in
13859   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13860     # PIC is the default for these OSes.
13861     ;;
13862
13863   aix3* | aix4* | os2*)
13864     # We can build DLLs from non-PIC.
13865     ;;
13866   amigaos*)
13867     # FIXME: we need at least 68020 code to build shared libraries, but
13868     # adding the `-m68020' flag to GCC prevents building anything better,
13869     # like `-m68040'.
13870     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13871     ;;
13872   *cygwin* | *mingw* )
13873     # PIC is the default
13874     ;;
13875   *)
13876     dll_cflags='-fPIC'
13877     ;;
13878   esac
13879 else
13880   # PORTME Check for PIC flags for the system compiler.
13881   case "$xehost_os" in
13882   hpux9* | hpux1[0-9]*)
13883     # Is there a better link_static_flag that works with the bundled CC?
13884     wl='-Wl,'
13885     dll_cflags='+Z'
13886     ;;
13887
13888   irix5* | irix6*)
13889     wl='-Wl,'
13890     # PIC (with -KPIC) is the default.
13891     ;;
13892
13893   os2*)
13894     # We can build DLLs from non-PIC.
13895     ;;
13896
13897   osf3* | osf4*)
13898     # All OSF/1 code is PIC.
13899     wl='-Wl,'
13900     ;;
13901
13902   sco3.2v5*)
13903     dll_cflags='-belf -Kpic'
13904     wl='-Wl,'
13905     ;;
13906
13907   unixware*)
13908     dll_cflags="-KPIC"
13909     wl="-Wl,"
13910     ;;
13911
13912   sysv4*)
13913     dll_cflags="-KPIC"
13914     wl="-Wl,"
13915     ;;
13916
13917   sysv5*)
13918     dll_cflags="-KPIC"
13919     wl="-Wl,"
13920     ;;
13921
13922   solaris2*)
13923     dll_cflags='-KPIC'
13924     wl='-Wl,'
13925     ;;
13926
13927   sunos4*)
13928     dll_cflags='-PIC'
13929     wl='-Qoption ld '
13930     ;;
13931
13932   uts4*)
13933     dll_cflags='-pic'
13934     ;;
13935
13936   *)
13937     can_build_shared=no
13938     ;;
13939   esac
13940 fi
13941
13942 if test -n "$dll_cflags"; then
13943   echo "$ac_t""${dll_cflags}" 1>&6
13944
13945   # Check to make sure the dll_cflags actually works.
13946   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13947 echo "configure:13948: checking if PIC flag ${dll_cflags} really works" >&5
13948   save_CFLAGS="$CFLAGS"
13949   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13950   cat > conftest.$ac_ext <<EOF
13951 #line 13952 "configure"
13952 #include "confdefs.h"
13953
13954 int main() {
13955 int x=0;
13956 ; return 0; }
13957 EOF
13958 if { (eval echo configure:13959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13959   rm -rf conftest*
13960   
13961     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13962     # reports no error.  So, we need to grep stderr for (Bundled).
13963     if grep '(Bundled)' config.log >/dev/null; then
13964       echo "$ac_t""no" 1>&6
13965       can_build_shared=no
13966       dll_cflags=
13967     else
13968       echo "$ac_t""yes" 1>&6
13969     fi
13970 else
13971   echo "configure: failed program was:" >&5
13972   cat conftest.$ac_ext >&5
13973   rm -rf conftest*
13974   echo "$ac_t""no" 1>&6
13975     can_build_shared=no
13976     dll_cflags=
13977 fi
13978 rm -f conftest*
13979   CFLAGS="$save_CFLAGS"
13980 else
13981   echo "$ac_t""none" 1>&6
13982 fi
13983
13984 if test "$can_build_shared" = "yes"; then
13985 cc_produces_so=no
13986 xldf=
13987 xcldf=
13988 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13989 echo "configure:13990: checking if C compiler can produce shared libraries" >&5
13990 if test "$XEGCC" = yes; then
13991   xcldf="-shared"
13992   xldf="-shared"
13993 else # Not using GCC
13994   case "$xehost_os" in
13995     aix3* | aix4*)
13996       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13997       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13998       ;;
13999
14000     freebsd2* | netbsd* | openbsd*)
14001       xldf="-Bshareable"
14002       xcldf="${wl}-Bshareable"
14003       ;;
14004
14005     freebsd3*)
14006       xcldf="-shared"
14007       ;;
14008
14009     hpux*)
14010       xldf="-b +s"
14011       xcldf="${wl}-b ${wl}+s"
14012       ;;
14013
14014     irix5* | irix6* | osf3* | osf4*)
14015       xcldf="${wl}-shared"
14016       xldf="-shared"
14017       ;;
14018
14019     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14020       xcldf="-G"
14021       xldf="-G"
14022       ;;
14023
14024     sunos4*)
14025       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14026       xldf="-assert pure-text -Bstatic"
14027       ;;
14028   esac
14029 fi # End if if we are using gcc
14030
14031 if test -n "$xcldf"; then
14032   save_LDFLAGS=$LDFLAGS
14033   save_LIBS=$LIBS
14034   save_xe_libs=$xe_libs
14035   LDFLAGS="$xcldf $LDFLAGS"
14036   LIBS=
14037   xe_libs=
14038   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14039   cat > conftest.$ac_ext <<EOF
14040 #line 14041 "configure"
14041 #include "confdefs.h"
14042
14043 int main() {
14044 int x=0;
14045 ; return 0; }
14046 EOF
14047 if { (eval echo configure:14048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14048   rm -rf conftest*
14049   cc_produces_so=yes
14050 else
14051   echo "configure: failed program was:" >&5
14052   cat conftest.$ac_ext >&5
14053   rm -rf conftest*
14054   cc_produces_so=no
14055 fi
14056 rm -f conftest*
14057   LDFLAGS=$save_LDFLAGS
14058   LIBS=$save_LIBS
14059   xe_libs=$save_xe_libs
14060   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14061 else
14062   cc_produces_so=no
14063 fi
14064 echo "$ac_t""${cc_produces_so}" 1>&6
14065
14066 LTLD=$LD
14067 if test -z "$LTLD"; then
14068   ac_prog=ld
14069   if test "$XEGCC" = yes; then
14070     # Check if gcc -print-prog-name=ld gives a path.
14071     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14072 echo "configure:14073: checking for ld used by GCC" >&5
14073     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14074     case "$ac_prog" in
14075     # Accept absolute paths.
14076     /*)
14077       if test -z "$LTLD"; then
14078         case "$ac_prog" in
14079           *gcc-lib*) LTLD="$CC"
14080                      ;;
14081           *)         LTLD="$ac_prog"
14082                      ;;
14083         esac
14084       fi
14085       ;;
14086     "")
14087       # If it fails, then pretend we aren't using GCC.
14088       ac_prog=ld
14089       ;;
14090     *)
14091       # If it is relative, then search for the first ld in PATH.
14092       with_gnu_ld=unknown
14093       ;;
14094     esac
14095   else
14096     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14097 echo "configure:14098: checking for GNU ld" >&5
14098   fi
14099
14100   if test -z "$LTLD"; then
14101     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14102     for ac_dir in $PATH; do
14103       test -z "$ac_dir" && ac_dir=.
14104       if test -f "$ac_dir/$ac_prog"; then
14105         LTLD="$ac_dir/$ac_prog"
14106         # Check to see if the program is GNU ld.  I'd rather use --version,
14107         # but apparently some GNU ld's only accept -v.
14108         # Break only if it was the GNU/non-GNU ld that we prefer.
14109         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14110           xe_gnu_ld=yes
14111         else
14112           xe_gnu_ld=no
14113         fi
14114       fi
14115     done
14116     IFS="$ac_save_ifs"
14117   fi
14118
14119   if test -n "$LTLD"; then
14120     echo "$ac_t""${LTLD}" 1>&6
14121   else
14122     echo "$ac_t""no" 1>&6
14123   fi
14124
14125   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14126     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14127     exit 1
14128   fi
14129 fi
14130
14131 ld_dynamic_link_flags=
14132
14133 # Check to see if it really is or isn't GNU ld.
14134 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14135 echo "configure:14136: checking if the linker is GNU ld" >&5
14136 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14137 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14138   xe_gnu_ld=yes
14139 else
14140   xe_gnu_ld=no
14141 fi
14142 echo "$ac_t""${xe_gnu_ld}" 1>&6
14143
14144 case "$xehost_os" in
14145   amigaos* | sunos4*)
14146     # On these operating systems, we should treat GNU ld like the system ld.
14147     gnu_ld_acts_native=yes
14148     ;;
14149   *)
14150     gnu_ld_acts_native=no
14151     ;;
14152 esac
14153
14154 if test "$cc_produces_so" = "yes"; then
14155   dll_ld=$CC
14156   dll_ldflags=$xcldf
14157   can_build_shared=yes
14158   ld_shlibs=yes
14159 else
14160   # OK - only NOW do we futz about with ld.
14161   # See if the linker supports building shared libraries.
14162   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14163 echo "configure:14164: checking whether the linker supports shared libraries" >&5
14164   dll_ld=$CC
14165   dll_ldflags=$LDFLAGS
14166   ld_shlibs=yes
14167   can_build_shared=yes
14168   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14169     # See if GNU ld supports shared libraries.
14170     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14171       dll_ld=$CC
14172       dll_ldflags="-shared"
14173       ld_shlibs=yes
14174     else
14175       ld_shlibs=no
14176     fi
14177   else
14178     # PORTME fill in a description of your system's linker (not GNU ld)
14179     case "$xehost_os" in
14180     aix3*)
14181       dll_ld=$LTLD
14182       dll_ldflags=$xldf
14183       ;;
14184
14185     aix4*)
14186       dll_ldflags=$xcldf
14187       ;;
14188
14189     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14190     # support.  Future versions do this automatically, but an explicit c++rt0.o
14191     # doesn't break anything, and helps significantly (at the cost of a little
14192     # extra space).
14193     freebsd2.2*)
14194       dll_ld=$LTLD
14195       dll_ldflags=$xldf
14196       dll_post="/usr/lib/c++rt0.o"
14197       ;;
14198
14199     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14200     freebsd2*)
14201       dll_ld=$LTLD
14202       dll_ldflags="-Bshareable"
14203       ;;
14204
14205     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14206     freebsd3*)
14207       dll_ldflags="-shared"
14208       ;;
14209
14210     hpux*)
14211       dll_ld=$LTLD
14212       dll_ldflags=$xldf
14213       ;;
14214
14215     irix5* | irix6*)
14216       dll_ld=$LTLD
14217       dll_ldflags=$xldf
14218       ;;
14219
14220     netbsd*)
14221       # Tested with NetBSD 1.2 ld
14222       dll_ld=$LTLD
14223       dll_ldflags=$xldf
14224       ;;
14225
14226     openbsd*)
14227       dll_ld=$LTLD
14228       dll_ldflags=$xldf
14229       ;;
14230
14231     osf3* | osf4*)
14232       dll_ld=$LTLD
14233       dll_ldflags=$xldf
14234       ;;
14235
14236     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14237     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14238       dll_ld=$LTLD
14239       case "$dll_ld" in
14240         *gcc*) dll_ldflags="-shared"
14241                dll_ld=$CC
14242                ;;
14243         *)     dll_ldflags="-G"
14244                ;;
14245       esac
14246       ;;
14247
14248     sunos4*)
14249       if test "$XEGCC" = yes; then
14250         dll_ld=$CC
14251       else
14252         dll_ld=$LTLD
14253       fi
14254       dll_ldflags=$xldf
14255       ;;
14256
14257     uts4*)
14258       dll_ld=$LTLD
14259       dll_ldflags="-G"
14260       ;;
14261
14262     bsdi*)
14263       dll_ldflags="-r"
14264       dll_ld="shlicc2"
14265       ;;
14266
14267     *)
14268       ld_shlibs=no
14269       can_build_shared=no
14270       ;;
14271     esac
14272   fi
14273   echo "$ac_t""${ld_shlibs}" 1>&6
14274   if test "$ld_shlibs" = "no"; then
14275     can_build_shared=no
14276   fi
14277 fi # End of if cc_produces_so = no
14278
14279
14280 if test "$xe_gnu_ld" = yes; then
14281   if test "$ld_shlibs" = yes; then
14282     ld_dynamic_link_flags="${wl}-export-dynamic"
14283   fi
14284 fi
14285
14286 if test -z "$ld_dynamic_link_flags"; then
14287   case "$xehost_os" in
14288   aix3*)
14289     ld_dynamic_link_flags=
14290     ;;
14291
14292   aix4*)
14293     ld_dynamic_link_flags=
14294     ;;
14295
14296   freebsd2.2*)
14297     ld_dynamic_link_flags=
14298     ;;
14299
14300   freebsd2*)
14301     ld_dynamic_link_flags=
14302     ;;
14303
14304   freebsd3*)
14305     ld_dynamic_link_flags=
14306     ;;
14307
14308   hpux*)
14309     ld_dynamic_link_flags="${wl}-E"
14310     ;;
14311
14312   irix5* | irix6*)
14313     ld_dynamic_link_flags=
14314     ;;
14315
14316   netbsd*)
14317     ld_dynamic_link_flags=
14318     ;;
14319
14320   openbsd*)
14321     ld_dynamic_link_flags=
14322     ;;
14323
14324   osf3* | osf4*)
14325     ld_dynamic_link_flags=
14326     ;;
14327
14328   solaris2* | solaris7*)
14329     ld_dynamic_link_flags=
14330     ;;
14331
14332   sco3.2v5* | unixware* | sysv5* | sysv4*)
14333     ld_dynamic_link_flags="${wl}-Bexport"
14334     ;;
14335
14336   sunos4*)
14337     ld_dynamic_link_flags=
14338     ;;
14339
14340   uts4*)
14341     ld_dynamic_link_flags=
14342     ;;
14343
14344   bsdi*)
14345     ld_dynamic_link_flags=
14346     ;;
14347
14348   esac
14349 fi # End of if -z ld_dynamic_link_flags
14350 fi # End of if test "$can_build_shared" = "yes"
14351
14352
14353
14354
14355
14356
14357
14358
14359   fi
14360
14361   if test "$can_build_shared" = "yes"; then
14362     { test "$extra_verbose" = "yes" && cat << \EOF
14363     Defining HAVE_SHLIB
14364 EOF
14365 cat >> confdefs.h <<\EOF
14366 #define HAVE_SHLIB 1
14367 EOF
14368 }
14369
14370     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14371    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14372  fi
14373     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14374     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14375     for ac_func in dlerror _dlerror
14376 do
14377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14378 echo "configure:14379: checking for $ac_func" >&5
14379
14380 cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383 /* System header to define __stub macros and hopefully few prototypes,
14384     which can conflict with char $ac_func(); below.  */
14385 #include <assert.h>
14386 /* Override any gcc2 internal prototype to avoid an error.  */
14387 /* We use char because int might match the return type of a gcc2
14388     builtin and then its argument prototype would still apply.  */
14389 char $ac_func();
14390
14391 int main() {
14392
14393 /* The GNU C library defines this for functions which it implements
14394     to always fail with ENOSYS.  Some functions are actually named
14395     something starting with __ and the normal name is an alias.  */
14396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14397 choke me
14398 #else
14399 $ac_func();
14400 #endif
14401
14402 ; return 0; }
14403 EOF
14404 if { (eval echo configure:14405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14405   rm -rf conftest*
14406   eval "ac_cv_func_$ac_func=yes"
14407 else
14408   echo "configure: failed program was:" >&5
14409   cat conftest.$ac_ext >&5
14410   rm -rf conftest*
14411   eval "ac_cv_func_$ac_func=no"
14412 fi
14413 rm -f conftest*
14414
14415 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14416   echo "$ac_t""yes" 1>&6
14417     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14418   { test "$extra_verbose" = "yes" && cat << EOF
14419     Defining $ac_tr_func
14420 EOF
14421 cat >> confdefs.h <<EOF
14422 #define $ac_tr_func 1
14423 EOF
14424 }
14425  
14426 else
14427   echo "$ac_t""no" 1>&6
14428 fi
14429 done
14430
14431     with_modules=yes
14432   else
14433     if test "$with_modules" = "yes"; then
14434       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14435     else
14436       echo "configure: warning: "Module support cannot be provided."" 1>&2
14437     fi
14438     with_modules=no
14439   fi
14440 fi
14441
14442 cat > conftest.$ac_ext <<EOF
14443 #line 14444 "configure"
14444 #include "confdefs.h"
14445 int main(int c,char *v[]){return 0;}
14446 EOF
14447 if { (eval echo configure:14448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14448 then
14449   :
14450 else
14451   conftest_rc="$?"
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -fr conftest*
14455   
14456   echo ""
14457   echo "*** PANIC *** The C compiler can no longer build working executables."
14458   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14459   echo "*** PANIC *** The most likely reason for this problem is that configure"
14460   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14461   echo "*** PANIC *** found at run time."
14462   echo "*** PANIC ***"
14463   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14464   echo "*** PANIC *** On other systems, try telling configure where to find the"
14465   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14466   echo "*** PANIC ***"
14467   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14468   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14469   echo "*** PANIC *** on your system.  Don't do that."
14470   exit 1
14471 fi
14472 rm -fr conftest*
14473
14474 if test "$win32_processes" = "yes"; then
14475   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14476    echo "    xemacs will be linked with \"process-nt.o\""
14477  fi
14478 else
14479   { test "$extra_verbose" = "yes" && cat << \EOF
14480     Defining HAVE_UNIX_PROCESSES
14481 EOF
14482 cat >> confdefs.h <<\EOF
14483 #define HAVE_UNIX_PROCESSES 1
14484 EOF
14485 }
14486
14487   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14488    echo "    xemacs will be linked with \"process-unix.o\""
14489  fi
14490 fi
14491
14492
14493
14494 T=""
14495 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14496 CFLAGS="$T"
14497
14498
14499 T=""
14500 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14501 extra_objs="$T"
14502
14503
14504 T=""
14505 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
14506 c_switch_general="$T"
14507
14508
14509 T=""
14510 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14511 c_switch_window_system="$T"
14512
14513
14514 T=""
14515 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14516 c_switch_all="$T"
14517
14518
14519 T=""
14520 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
14521 ld_switch_general="$T"
14522
14523
14524 T=""
14525 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14526 ld_switch_window_system="$T"
14527
14528
14529 T=""
14530 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14531 ld_switch_all="$T"
14532
14533
14534 T=""
14535 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14536 ld_libs_general="$T"
14537
14538
14539 T=""
14540 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
14541 ld_libs_window_system="$T"
14542
14543
14544 T=""
14545 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14546 ld_libs_all="$T"
14547
14548
14549
14550 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14551 internal_makefile_list="Makefile.in"
14552 SUBDIR_MAKEFILES=''
14553 test -d lock || mkdir lock
14554 for dir in $MAKE_SUBDIR; do
14555   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14556         test -d "$d" || mkdir "$d"; cd "$d"
14557       done ) ;;
14558    * ) test -d "$dir" || mkdir "$dir" ;;
14559   esac
14560   
14561 T=""
14562 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14563 SUBDIR_MAKEFILES="$T"
14564
14565   
14566 T=""
14567 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14568 internal_makefile_list="$T"
14569
14570 done
14571
14572
14573
14574
14575 for dir in src/s src/m; do
14576   if test ! -d "$dir" ; then
14577     echo Making symbolic link to "$srcdir/$dir"
14578     ${LN_S} "$srcdir/$dir" "$dir"
14579   fi
14580 done
14581
14582 if test "$extra_verbose" = "yes"; then
14583   echo ""
14584   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
14585   echo ""
14586 fi
14587
14588
14589 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14590   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14591   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14592 fi
14593
14594 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14595   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14596   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14597 fi
14598
14599 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14600   test "$extra_verbose" = "yes" && echo "creating TAGS"
14601   echo "\f
14602 $srcdir/TAGS,include" > "TAGS"
14603 fi
14604
14605 if test "$__SUNPRO_C" = "yes"; then
14606   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14607   ( echo "# For use with Sun WorkShop's Source browser."
14608     echo "# See sbquery(1) and sbinit(4) for more information"
14609     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14610   ) > .sbinit
14611 fi
14612
14613 rm -f core
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633 PREFIX=$prefix
14634 while true; do
14635   case "$PREFIX" in
14636     *\$* ) eval "PREFIX=$PREFIX" ;;
14637     *) break ;;
14638   esac
14639 done
14640
14641
14642
14643
14644 EXEC_PREFIX=$exec_prefix
14645 while true; do
14646   case "$EXEC_PREFIX" in
14647     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14648     *) break ;;
14649   esac
14650 done
14651
14652
14653
14654
14655 INFODIR=$infodir
14656 while true; do
14657   case "$INFODIR" in
14658     *\$* ) eval "INFODIR=$INFODIR" ;;
14659     *) break ;;
14660   esac
14661 done
14662
14663
14664
14665
14666 INFOPATH=$infopath
14667 while true; do
14668   case "$INFOPATH" in
14669     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14670     *) break ;;
14671   esac
14672 done
14673
14674
14675
14676
14677 PACKAGE_PATH=$package_path
14678 while true; do
14679   case "$PACKAGE_PATH" in
14680     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14681     *) break ;;
14682   esac
14683 done
14684
14685
14686
14687
14688 LISPDIR=$lispdir
14689 while true; do
14690   case "$LISPDIR" in
14691     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14692     *) break ;;
14693   esac
14694 done
14695
14696
14697
14698
14699 MODULEDIR=$moduledir
14700 while true; do
14701   case "$MODULEDIR" in
14702     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14703     *) break ;;
14704   esac
14705 done
14706
14707
14708
14709
14710 SITELISPDIR=$sitelispdir
14711 while true; do
14712   case "$SITELISPDIR" in
14713     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14714     *) break ;;
14715   esac
14716 done
14717
14718
14719
14720
14721 SITEMODULEDIR=$sitemoduledir
14722 while true; do
14723   case "$SITEMODULEDIR" in
14724     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14725     *) break ;;
14726   esac
14727 done
14728
14729
14730
14731
14732 ETCDIR=$etcdir
14733 while true; do
14734   case "$ETCDIR" in
14735     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14736     *) break ;;
14737   esac
14738 done
14739
14740
14741
14742
14743 DOCDIR=$docdir
14744 while true; do
14745   case "$DOCDIR" in
14746     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14747     *) break ;;
14748   esac
14749 done
14750
14751
14752
14753
14754 ARCHLIBDIR=$archlibdir
14755 while true; do
14756   case "$ARCHLIBDIR" in
14757     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14758     *) break ;;
14759   esac
14760 done
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14782
14783
14784
14785
14786
14787
14788
14789 : ${XEMACS_CC:=$CC}
14790
14791
14792 if test "$with_prefix" = "yes"; then
14793   { test "$extra_verbose" = "yes" && cat << \EOF
14794     Defining PREFIX_USER_DEFINED
14795 EOF
14796 cat >> confdefs.h <<\EOF
14797 #define PREFIX_USER_DEFINED 1
14798 EOF
14799 }
14800
14801 fi
14802
14803 if test "$with_site_lisp" = "no"; then
14804   { test "$extra_verbose" = "yes" && cat << \EOF
14805     Defining INHIBIT_SITE_LISP
14806 EOF
14807 cat >> confdefs.h <<\EOF
14808 #define INHIBIT_SITE_LISP 1
14809 EOF
14810 }
14811
14812 fi
14813 if test "$with_site_modules" = "no"; then
14814   { test "$extra_verbose" = "yes" && cat << \EOF
14815     Defining INHIBIT_SITE_MODULES
14816 EOF
14817 cat >> confdefs.h <<\EOF
14818 #define INHIBIT_SITE_MODULES 1
14819 EOF
14820 }
14821
14822 fi
14823
14824
14825 T=""
14826 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14827 ac_configure_args="$T"
14828
14829 { test "$extra_verbose" = "yes" && cat << EOF
14830     Defining EMACS_CONFIGURATION = "$configuration"
14831 EOF
14832 cat >> confdefs.h <<EOF
14833 #define EMACS_CONFIGURATION "$configuration"
14834 EOF
14835 }
14836
14837 { test "$extra_verbose" = "yes" && cat << EOF
14838     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14839 EOF
14840 cat >> confdefs.h <<EOF
14841 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14842 EOF
14843 }
14844
14845
14846
14847 null_string=""
14848 { test "$extra_verbose" = "yes" && cat << EOF
14849     Defining LD_SWITCH_X_SITE = $null_string
14850 EOF
14851 cat >> confdefs.h <<EOF
14852 #define LD_SWITCH_X_SITE $null_string
14853 EOF
14854 }
14855
14856 { test "$extra_verbose" = "yes" && cat << EOF
14857     Defining LD_SWITCH_X_SITE_AUX = $null_string
14858 EOF
14859 cat >> confdefs.h <<EOF
14860 #define LD_SWITCH_X_SITE_AUX $null_string
14861 EOF
14862 }
14863
14864 { test "$extra_verbose" = "yes" && cat << EOF
14865     Defining C_SWITCH_X_SITE = $null_string
14866 EOF
14867 cat >> confdefs.h <<EOF
14868 #define C_SWITCH_X_SITE $null_string
14869 EOF
14870 }
14871
14872 { test "$extra_verbose" = "yes" && cat << EOF
14873     Defining LD_SWITCH_SITE = $null_string
14874 EOF
14875 cat >> confdefs.h <<EOF
14876 #define LD_SWITCH_SITE $null_string
14877 EOF
14878 }
14879
14880 { test "$extra_verbose" = "yes" && cat << EOF
14881     Defining C_SWITCH_SITE = $null_string
14882 EOF
14883 cat >> confdefs.h <<EOF
14884 #define C_SWITCH_SITE $null_string
14885 EOF
14886 }
14887
14888
14889
14890 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14891     Defining GNU_MALLOC
14892 EOF
14893 cat >> confdefs.h <<\EOF
14894 #define GNU_MALLOC 1
14895 EOF
14896 }
14897
14898 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14899     Defining USE_SYSTEM_MALLOC
14900 EOF
14901 cat >> confdefs.h <<\EOF
14902 #define USE_SYSTEM_MALLOC 1
14903 EOF
14904 }
14905
14906 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14907     Defining USE_DEBUG_MALLOC
14908 EOF
14909 cat >> confdefs.h <<\EOF
14910 #define USE_DEBUG_MALLOC 1
14911 EOF
14912 }
14913
14914                                               { test "$extra_verbose" = "yes" && cat << \EOF
14915     Defining USE_SYSTEM_MALLOC
14916 EOF
14917 cat >> confdefs.h <<\EOF
14918 #define USE_SYSTEM_MALLOC 1
14919 EOF
14920 }
14921
14922 fi
14923 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14924     Defining I18N3
14925 EOF
14926 cat >> confdefs.h <<\EOF
14927 #define I18N3 1
14928 EOF
14929 }
14930
14931 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14932     Defining USE_GCC
14933 EOF
14934 cat >> confdefs.h <<\EOF
14935 #define USE_GCC 1
14936 EOF
14937 }
14938
14939 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14940     Defining EXTERNAL_WIDGET
14941 EOF
14942 cat >> confdefs.h <<\EOF
14943 #define EXTERNAL_WIDGET 1
14944 EOF
14945 }
14946
14947 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14948     Defining QUICK_BUILD
14949 EOF
14950 cat >> confdefs.h <<\EOF
14951 #define QUICK_BUILD 1
14952 EOF
14953 }
14954
14955 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14956     Defining PURIFY
14957 EOF
14958 cat >> confdefs.h <<\EOF
14959 #define PURIFY 1
14960 EOF
14961 }
14962
14963 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14964     Defining QUANTIFY
14965 EOF
14966 cat >> confdefs.h <<\EOF
14967 #define QUANTIFY 1
14968 EOF
14969 }
14970
14971 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14972     Defining MAIL_USE_POP
14973 EOF
14974 cat >> confdefs.h <<\EOF
14975 #define MAIL_USE_POP 1
14976 EOF
14977 }
14978
14979 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14980     Defining KERBEROS
14981 EOF
14982 cat >> confdefs.h <<\EOF
14983 #define KERBEROS 1
14984 EOF
14985 }
14986
14987 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14988     Defining HESIOD
14989 EOF
14990 cat >> confdefs.h <<\EOF
14991 #define HESIOD 1
14992 EOF
14993 }
14994
14995 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14996     Defining USE_UNION_TYPE
14997 EOF
14998 cat >> confdefs.h <<\EOF
14999 #define USE_UNION_TYPE 1
15000 EOF
15001 }
15002
15003 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15004     Defining PDUMP
15005 EOF
15006 cat >> confdefs.h <<\EOF
15007 #define PDUMP 1
15008 EOF
15009 }
15010
15011
15012
15013 (
15014 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15015 else
15016   echo "uname -a: `uname -a`"
15017 fi
15018 echo ""
15019 echo "$0 $quoted_arguments"
15020 ) > Installation
15021
15022 if test ! -z ${emacs_beta_version} ; then
15023   if test -z "${emacs_is_beta}" ; then
15024         xemacs_betaname=".${emacs_beta_version}"
15025   else
15026         xemacs_betaname="-b${emacs_beta_version}"
15027   fi
15028 else
15029   xemacs_betaname=""
15030 fi
15031
15032 (
15033 echo "
15034
15035 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15036 "
15037 echo "
15038 Compilation / Installation:"
15039 echo "  Source code location:              $srcdir"
15040 echo "  Installation prefix:               $prefix"
15041 if test -n "$site_includes"; then
15042   echo "  Additional header files:           $site_includes"
15043 fi
15044 if test -n "$site_libraries"; then
15045   echo "  Additional libraries:              $site_libraries"
15046 fi
15047 if test -n "$site_prefixes"; then
15048   echo "  Additional prefixes:               $site_prefixes"
15049 fi
15050 if test -n "$runpath"; then
15051   echo "  Runtime library search path:       $runpath"
15052 fi
15053
15054 if test -n "$opsysfile"
15055 then echo "  Operating system description file: \`$opsysfile'"
15056 else echo "  Not using any operating system description file"
15057 fi
15058 if test -n "$machfile"
15059 then echo "  Machine description file:          \`$machfile'"
15060 else echo "  Not using any machine description file"
15061 fi
15062
15063 echo "  Compiler:                          $CC $CFLAGS"
15064 echo "  Relocating allocator for buffers:  $rel_alloc"
15065 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15066
15067 echo "
15068 Window System:"
15069 if test "$with_msw" = "yes"; then
15070   echo "  Compiling in support for the Microsoft window system."
15071 fi
15072 if test "$with_x11" = "yes"; then
15073   echo "  Compiling in support for the X window system:"
15074   echo "    - X Windows headers location:                 $x_includes"
15075   echo "    - X Windows libraries location:               $x_libraries"
15076   if test "$with_xauth" != yes; then
15077     echo "    - Xau (X authority) not available."
15078   fi
15079   if test "$with_xmu" != yes; then
15080     echo "    - Xmu library not available; substituting equivalent routines."
15081   fi
15082   if test "$with_wmcommand" != no; then
15083     echo "    - Handling WM_COMMAND properly."
15084   fi
15085 fi
15086 if test "$need_athena" = "yes"; then
15087   echo "  Compiling in support for the Athena widget set:"
15088   echo "    - Athena headers location:                    $athena_h_path"
15089   echo "    - Athena library to link:                     $athena_lib"
15090 fi
15091 case "$with_menubars" in
15092   lucid ) echo "  Using Lucid menubars." ;;
15093   motif ) echo "  Using Motif menubars."
15094           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15095           echo "             We recommend using the Lucid menubar instead."
15096           echo "             Re-run configure with --with-menubars='lucid'." ;;
15097     msw ) echo "  Using MS-Windows menubars." ;;
15098 esac
15099 case "$with_scrollbars" in
15100   lucid  ) echo "  Using Lucid scrollbars."      ;;
15101   motif  ) echo "  Using Motif scrollbars."      ;;
15102   athena ) echo "  Using Athena scrollbars."     ;;
15103      msw ) echo "  Using MS-Windows scrollbars." ;;
15104 esac
15105 case "$with_dialogs" in
15106   motif  ) echo "  Using Motif dialog boxes."
15107            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15108              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15109              echo "             We recommend using the Athena dialog boxes instead."
15110              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15111              echo "             Read the PROBLEMS file for more information."
15112            fi; fi ;;
15113   athena ) echo "  Using Athena dialog boxes."     ;;
15114      msw ) echo "  Using MS-Windows dialog boxes." ;;
15115 esac
15116 case "$with_widgets" in
15117   motif  ) echo "  Using Motif native widgets."      ;;
15118   athena ) echo "  Using Athena native widgets."     ;;
15119      msw ) echo "  Using MS-Windows native widgets." ;;
15120 esac
15121 if test "$with_dragndrop" = yes; then
15122   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15123   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15124 fi
15125
15126 echo "
15127 TTY:"
15128 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15129 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15130
15131 echo "
15132 Images:"
15133 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15134 if test "$with_xpm" = yes; then
15135   echo "  Compiling in support for XPM  images."
15136 elif test "$with_x11" = yes; then
15137   echo "  WARNING: -----------------------------------------------------------"
15138   echo "  WARNING: Compiling without XPM image support."
15139   if test "$xpm_problem" != ""; then
15140     echo "  Reason: $xpm_problem"
15141   fi
15142   echo "  WARNING: You should strongly consider installing XPM."
15143   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15144   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15145   echo "  WARNING: -----------------------------------------------------------"
15146 fi
15147 if test "$with_png" = yes; then
15148   echo "  Compiling in support for PNG  images."
15149 elif test "$window_system" != "none"; then
15150   echo "  WARNING: -----------------------------------------------------------"
15151   echo "  WARNING: Compiling without PNG image support."
15152   if test "$png_problem" != ""; then
15153     echo "  Reason: $png_problem"
15154   fi
15155   echo "  WARNING: You should strongly consider installing the PNG libraries."
15156   echo "  WARNING: Otherwise certain images and glyphs may not display."
15157   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15158   echo "  WARNING: -----------------------------------------------------------"
15159 fi
15160 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15161 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15162 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15163
15164 echo "
15165 Sound:"
15166 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15167 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15168 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15169 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15170
15171 echo "
15172 Databases:"
15173 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15174 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15175 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15176 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15177 if test "$with_postgresql" = yes; then
15178   echo "  Compiling in support for PostgreSQL."
15179   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15180   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15181 fi
15182
15183 echo "
15184 Internationalization:"
15185 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15186 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15187 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15188 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15189 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15190 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15191 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15192 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15193 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15194 if test "$with_wnn" = yes; then
15195   echo "  Compiling in support for the WNN input method on Mule."
15196   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15197 fi
15198 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15199
15200 echo "
15201 Mail:"
15202 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15203 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15204 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15205 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15206
15207 echo "
15208 Other Features:"
15209 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15210 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15211 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15212 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15213 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15214 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15215 test "$pdump" = yes && echo "  Using the new portable dumper."
15216 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15217 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15218 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15219   != "no no no no no no"; then
15220   echo "  WARNING: ---------------------------------------------------------"
15221   echo "  WARNING: Compiling in support for runtime error checking."
15222   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15223   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15224   echo "  WARNING: ---------------------------------------------------------"
15225 fi
15226 echo ""
15227 ) | tee -a Installation
15228 echo ""
15229
15230
15231 # Remove any trailing slashes in these variables.
15232 test -n "$prefix" &&
15233   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15234 test -n "$exec_prefix" &&
15235   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15236
15237
15238 for file in $internal_makefile_list; do
15239   test "$file" = src/Makefile.in && \
15240     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15241   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15242 done
15243 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15244 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
15245
15246 trap '' 1 2 15
15247
15248 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15249
15250 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15251 # Let make expand exec_prefix.
15252 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15253
15254 # Any assignment to VPATH causes Sun make to only execute
15255 # the first set of double-colon rules, so remove it if not needed.
15256 # If there is a colon in the path, we need to keep it.
15257 if test "x$srcdir" = x.; then
15258   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15259 fi
15260
15261 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15262
15263 DEFS=-DHAVE_CONFIG_H
15264
15265 # Without the "./", some shells look in PATH for config.status.
15266 : ${CONFIG_STATUS=./config.status}
15267
15268 echo creating $CONFIG_STATUS
15269 rm -f $CONFIG_STATUS
15270 cat > $CONFIG_STATUS <<EOF
15271 #! /bin/sh
15272 # Generated automatically by configure.
15273 # Run this file to recreate the current configuration.
15274 # This directory was configured as follows,
15275 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15276 #
15277 # $0 $ac_configure_args
15278 #
15279 # Compiler output produced by configure, useful for debugging
15280 # configure, is in ./config.log if it exists.
15281
15282 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15283 for ac_option
15284 do
15285   case "\$ac_option" in
15286   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15287     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15288     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15289   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15290     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15291     exit 0 ;;
15292   -help | --help | --hel | --he | --h)
15293     echo "\$ac_cs_usage"; exit 0 ;;
15294   *) echo "\$ac_cs_usage"; exit 1 ;;
15295   esac
15296 done
15297
15298 ac_given_srcdir=$srcdir
15299 ac_given_INSTALL="$INSTALL"
15300
15301 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15302 EOF
15303 cat >> $CONFIG_STATUS <<EOF
15304
15305 # Protect against being on the right side of a sed subst in config.status.
15306 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15307  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15308 $ac_vpsub
15309 $extrasub
15310 s%@SHELL@%$SHELL%g
15311 s%@CFLAGS@%$CFLAGS%g
15312 s%@CPPFLAGS@%$CPPFLAGS%g
15313 s%@CXXFLAGS@%$CXXFLAGS%g
15314 s%@FFLAGS@%$FFLAGS%g
15315 s%@DEFS@%$DEFS%g
15316 s%@LDFLAGS@%$LDFLAGS%g
15317 s%@LIBS@%$LIBS%g
15318 s%@exec_prefix@%$exec_prefix%g
15319 s%@prefix@%$prefix%g
15320 s%@program_transform_name@%$program_transform_name%g
15321 s%@bindir@%$bindir%g
15322 s%@sbindir@%$sbindir%g
15323 s%@libexecdir@%$libexecdir%g
15324 s%@datadir@%$datadir%g
15325 s%@sysconfdir@%$sysconfdir%g
15326 s%@sharedstatedir@%$sharedstatedir%g
15327 s%@localstatedir@%$localstatedir%g
15328 s%@libdir@%$libdir%g
15329 s%@includedir@%$includedir%g
15330 s%@oldincludedir@%$oldincludedir%g
15331 s%@infodir@%$infodir%g
15332 s%@mandir@%$mandir%g
15333 s%@LN_S@%$LN_S%g
15334 s%@blddir@%$blddir%g
15335 s%@CC@%$CC%g
15336 s%@CPP@%$CPP%g
15337 s%@start_flags@%$start_flags%g
15338 s%@ld_switch_shared@%$ld_switch_shared%g
15339 s%@start_files@%$start_files%g
15340 s%@ld@%$ld%g
15341 s%@lib_gcc@%$lib_gcc%g
15342 s%@RANLIB@%$RANLIB%g
15343 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15344 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15345 s%@INSTALL_DATA@%$INSTALL_DATA%g
15346 s%@YACC@%$YACC%g
15347 s%@SET_MAKE@%$SET_MAKE%g
15348 s%@X_CFLAGS@%$X_CFLAGS%g
15349 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15350 s%@X_LIBS@%$X_LIBS%g
15351 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15352 s%@install_pp@%$install_pp%g
15353 s%@libs_xauth@%$libs_xauth%g
15354 s%@dnd_objs@%$dnd_objs%g
15355 s%@lwlib_objs@%$lwlib_objs%g
15356 s%@ALLOCA@%$ALLOCA%g
15357 s%@have_esd_config@%$have_esd_config%g
15358 s%@dll_ld@%$dll_ld%g
15359 s%@dll_cflags@%$dll_cflags%g
15360 s%@dll_ldflags@%$dll_ldflags%g
15361 s%@dll_post@%$dll_post%g
15362 s%@dll_ldo@%$dll_ldo%g
15363 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15364 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15365 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15366 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15367 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15368 s%@PROGNAME@%$PROGNAME%g
15369 s%@version@%$version%g
15370 s%@configuration@%$configuration%g
15371 s%@canonical@%$canonical%g
15372 s%@inststaticdir@%$inststaticdir%g
15373 s%@instvardir@%$instvardir%g
15374 s%@srcdir@%$srcdir%g
15375 s%@pkgdir@%$pkgdir%g
15376 s%@statedir@%$statedir%g
15377 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15378 s%@PREFIX@%$PREFIX%g
15379 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15380 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15381 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15382 s%@INFODIR@%$INFODIR%g
15383 s%@infopath@%$infopath%g
15384 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15385 s%@INFOPATH@%$INFOPATH%g
15386 s%@package_path@%$package_path%g
15387 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15388 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15389 s%@lispdir@%$lispdir%g
15390 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15391 s%@LISPDIR@%$LISPDIR%g
15392 s%@moduledir@%$moduledir%g
15393 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15394 s%@MODULEDIR@%$MODULEDIR%g
15395 s%@sitelispdir@%$sitelispdir%g
15396 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15397 s%@SITELISPDIR@%$SITELISPDIR%g
15398 s%@sitemoduledir@%$sitemoduledir%g
15399 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15400 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15401 s%@etcdir@%$etcdir%g
15402 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15403 s%@ETCDIR@%$ETCDIR%g
15404 s%@docdir@%$docdir%g
15405 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15406 s%@DOCDIR@%$DOCDIR%g
15407 s%@archlibdir@%$archlibdir%g
15408 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15409 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15410 s%@bitmapdir@%$bitmapdir%g
15411 s%@extra_objs@%$extra_objs%g
15412 s%@machfile@%$machfile%g
15413 s%@opsysfile@%$opsysfile%g
15414 s%@c_switch_general@%$c_switch_general%g
15415 s%@c_switch_window_system@%$c_switch_window_system%g
15416 s%@c_switch_all@%$c_switch_all%g
15417 s%@ld_switch_general@%$ld_switch_general%g
15418 s%@ld_switch_window_system@%$ld_switch_window_system%g
15419 s%@ld_switch_all@%$ld_switch_all%g
15420 s%@ld_libs_general@%$ld_libs_general%g
15421 s%@ld_libs_window_system@%$ld_libs_window_system%g
15422 s%@ld_libs_all@%$ld_libs_all%g
15423 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15424 s%@native_sound_lib@%$native_sound_lib%g
15425 s%@sound_cflags@%$sound_cflags%g
15426 s%@dynodump_arch@%$dynodump_arch%g
15427 s%@XEMACS_CC@%$XEMACS_CC%g
15428 s%@internal_makefile_list@%$internal_makefile_list%g
15429
15430 CEOF
15431 EOF
15432
15433 cat >> $CONFIG_STATUS <<\EOF
15434
15435 # Split the substitutions into bite-sized pieces for seds with
15436 # small command number limits, like on Digital OSF/1 and HP-UX.
15437 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15438 ac_file=1 # Number of current file.
15439 ac_beg=1 # First line for current file.
15440 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15441 ac_more_lines=:
15442 ac_sed_cmds=""
15443 while $ac_more_lines; do
15444   if test $ac_beg -gt 1; then
15445     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15446   else
15447     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15448   fi
15449   if test ! -s conftest.s$ac_file; then
15450     ac_more_lines=false
15451     rm -f conftest.s$ac_file
15452   else
15453     if test -z "$ac_sed_cmds"; then
15454       ac_sed_cmds="sed -f conftest.s$ac_file"
15455     else
15456       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15457     fi
15458     ac_file=`expr $ac_file + 1`
15459     ac_beg=$ac_end
15460     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15461   fi
15462 done
15463 if test -z "$ac_sed_cmds"; then
15464   ac_sed_cmds=cat
15465 fi
15466 EOF
15467
15468 cat >> $CONFIG_STATUS <<EOF
15469
15470 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15471 EOF
15472 cat >> $CONFIG_STATUS <<\EOF
15473 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15474   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15475   case "$ac_file" in
15476   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15477        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15478   *) ac_file_in="${ac_file}.in" ;;
15479   esac
15480
15481   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15482
15483   # Remove last slash and all that follows it.  Not all systems have dirname.
15484   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15485   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15486     # The file is in a subdirectory.
15487     test ! -d "$ac_dir" && mkdir "$ac_dir"
15488     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15489     # A "../" for each directory in $ac_dir_suffix.
15490     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15491   else
15492     ac_dir_suffix= ac_dots=
15493   fi
15494
15495   case "$ac_given_srcdir" in
15496   .)  srcdir=.
15497       if test -z "$ac_dots"; then top_srcdir=.
15498       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15499   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15500   *) # Relative path.
15501     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15502     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15503   esac
15504
15505   case "$ac_given_INSTALL" in
15506   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15507   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15508   esac
15509
15510   echo creating "$ac_file"
15511   rm -f "$ac_file"
15512   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15513   case "$ac_file" in
15514   *Makefile*) ac_comsub="1i\\
15515 # $configure_input" ;;
15516   *) ac_comsub= ;;
15517   esac
15518
15519   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15520   sed -e "$ac_comsub
15521 s%@configure_input@%$configure_input%g
15522 s%@srcdir@%$srcdir%g
15523 s%@top_srcdir@%$top_srcdir%g
15524 s%@INSTALL@%$INSTALL%g
15525 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15526 fi; done
15527 rm -f conftest.s*
15528
15529 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15530 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15531 #
15532 # ac_d sets the value in "#define NAME VALUE" lines.
15533 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15534 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15535 ac_dC='\3'
15536 ac_dD='%g'
15537 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15538 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15539 ac_uB='\([      ]\)%\1#\2define\3'
15540 ac_uC=' '
15541 ac_uD='\4%g'
15542 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15543 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15544 ac_eB='$%\1#\2define\3'
15545 ac_eC=' '
15546 ac_eD='%g'
15547
15548 if test "${CONFIG_HEADERS+set}" != set; then
15549 EOF
15550 cat >> $CONFIG_STATUS <<EOF
15551   CONFIG_HEADERS="src/config.h lwlib/config.h"
15552 EOF
15553 cat >> $CONFIG_STATUS <<\EOF
15554 fi
15555 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15556   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15557   case "$ac_file" in
15558   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15559        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15560   *) ac_file_in="${ac_file}.in" ;;
15561   esac
15562
15563   echo creating $ac_file
15564
15565   rm -f conftest.frag conftest.in conftest.out
15566   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15567   cat $ac_file_inputs > conftest.in
15568
15569 EOF
15570
15571 # Transform confdefs.h into a sed script conftest.vals that substitutes
15572 # the proper values into config.h.in to produce config.h.  And first:
15573 # Protect against being on the right side of a sed subst in config.status.
15574 # Protect against being in an unquoted here document in config.status.
15575 rm -f conftest.vals
15576 cat > conftest.hdr <<\EOF
15577 s/[\\&%]/\\&/g
15578 s%[\\$`]%\\&%g
15579 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15580 s%ac_d%ac_u%gp
15581 s%ac_u%ac_e%gp
15582 EOF
15583 sed -n -f conftest.hdr confdefs.h > conftest.vals
15584 rm -f conftest.hdr
15585
15586 # This sed command replaces #undef with comments.  This is necessary, for
15587 # example, in the case of _POSIX_SOURCE, which is predefined and required
15588 # on some systems where configure will not decide to define it.
15589 cat >> conftest.vals <<\EOF
15590 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15591 EOF
15592
15593 # Break up conftest.vals because some shells have a limit on
15594 # the size of here documents, and old seds have small limits too.
15595
15596 rm -f conftest.tail
15597 while :
15598 do
15599   ac_lines=`grep -c . conftest.vals`
15600   # grep -c gives empty output for an empty file on some AIX systems.
15601   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15602   # Write a limited-size here document to conftest.frag.
15603   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15604   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15605   echo 'CEOF
15606   sed -f conftest.frag conftest.in > conftest.out
15607   rm -f conftest.in
15608   mv conftest.out conftest.in
15609 ' >> $CONFIG_STATUS
15610   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15611   rm -f conftest.vals
15612   mv conftest.tail conftest.vals
15613 done
15614 rm -f conftest.vals
15615
15616 cat >> $CONFIG_STATUS <<\EOF
15617   rm -f conftest.frag conftest.h
15618   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15619   cat conftest.in >> conftest.h
15620   rm -f conftest.in
15621   if cmp -s $ac_file conftest.h 2>/dev/null; then
15622     echo "$ac_file is unchanged"
15623     rm -f conftest.h
15624   else
15625     # Remove last slash and all that follows it.  Not all systems have dirname.
15626       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15627       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15628       # The file is in a subdirectory.
15629       test ! -d "$ac_dir" && mkdir "$ac_dir"
15630     fi
15631     rm -f $ac_file
15632     mv conftest.h $ac_file
15633   fi
15634 fi; done
15635
15636 EOF
15637 cat >> $CONFIG_STATUS <<EOF
15638 CPP="$CPP"
15639  top_srcdir="$srcdir"
15640  MAKE_SUBDIR="$MAKE_SUBDIR"
15641
15642 EOF
15643 cat >> $CONFIG_STATUS <<\EOF
15644 for dir in . $MAKE_SUBDIR; do
15645   (
15646     cd $dir
15647     rm -f junk.c
15648     < Makefile.in \
15649       sed -e '/^# Generated/d' \
15650           -e 's%/\*\*/#.*%%' \
15651           -e 's/^ *# */#/' \
15652           -e '/^##/d' \
15653           -e '/^#/ {
15654 p
15655 d
15656 }'        \
15657           -e '/./ {
15658 s/\([\"]\)/\\\1/g
15659 s/^/"/
15660 s/$/"/
15661 }'  > junk.c;
15662
15663
15664
15665     echo creating $dir/Makefile
15666 $CPP -I. -I${top_srcdir}/src  junk.c \
15667   | sed -e 's/^\#.*//'          \
15668         -e 's/^[        ][      ]*$//'\
15669         -e 's/^ /       /'              \
15670         -e '/^[ \f]*$/d' \
15671         -e '/^\"/ {
15672         s/\\\([\"]\)/\1/g
15673         s/^[    ]*\"//
15674         s/\"[   ]*$//
15675 }' > Makefile.new
15676     chmod 444 Makefile.new
15677     mv -f Makefile.new Makefile
15678
15679     echo creating $dir/GNUmakefile
15680 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15681   | sed -e 's/^\#.*//'          \
15682         -e 's/^[        ][      ]*$//'\
15683         -e 's/^ /       /'              \
15684         -e '/^[ \f]*$/d' \
15685         -e '/^\"/ {
15686         s/\\\([\"]\)/\1/g
15687         s/^[    ]*\"//
15688         s/\"[   ]*$//
15689 }' > Makefile.new
15690     chmod 444 Makefile.new
15691     mv -f Makefile.new GNUmakefile
15692
15693     rm -f junk.c
15694   )
15695 done
15696
15697 sed < config.status >> lib-src/config.values \
15698   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15699   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15700   -e 's/^\([^ ]*\) $/\1 ""/' \
15701   -e 's/ 1$/ t/'
15702
15703
15704 exit 0
15705 EOF
15706 chmod +x $CONFIG_STATUS
15707 rm -fr confdefs* $ac_clean_files
15708 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1