c3df64cac8381aab817ea83102190acaaf511cc7
[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-osf4*                ) opsys=decosf4-0 ;;
1146
1147     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1148   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1149   *-*-ultrix* )         opsys=ultrix4-3 ;;
1150
1151     *-*-aix3.1*  ) opsys=aix3-1 ;;
1152   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1153   *-*-aix3*    ) opsys=aix3-2   ;;
1154   *-*-aix4.0*  ) opsys=aix4     ;;
1155   *-*-aix4.1*  ) opsys=aix4-1   ;;
1156   *-*-aix4*    ) opsys=aix4-2   ;;
1157
1158     *-gnu* )                    opsys=gnu    ;;
1159   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1160   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1161   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1162   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1163   *-*-aos*   )                  opsys=bsd4-3 ;;
1164   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1165   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1166   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1167   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1168   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1169   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1170         if test -z "$NON_GNU_CPP" ; then
1171           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1172             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1173           done
1174         fi
1175         opsys=usg5-4-2 ;;
1176     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1177     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1178 esac
1179
1180 case "$canonical" in
1181
1182     *-*-netbsd* )
1183     case "$canonical" in
1184       i[3-9]86-*-netbsd*) machine=intel386 ;;
1185       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1186                                             machine=hp9000s300 ;;
1187       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1188       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1189     esac
1190   ;;
1191
1192     *-*-openbsd* )
1193     case "${canonical}" in
1194       i386-*-openbsd*)          machine=intel386 ;;
1195       m68k-*-openbsd*)          machine=hp9000s300 ;;
1196       mipsel-*-openbsd*)        machine=pmax ;;
1197      esac
1198    ;;
1199
1200     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1201   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1202
1203     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1204   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1205
1206     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1207
1208     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1209
1210     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1211
1212     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1213
1214     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1215
1216     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1217   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1218   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1219
1220   
1221     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1222
1223     *-convex-bsd* | *-convex-convexos* )
1224     machine=convex opsys=bsd4-3
1225     NON_GNU_CPP="cc -E -P"
1226   ;;
1227
1228     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1229
1230     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1231   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1232   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1233   m88k-dg-dgux*                           ) opsys=dgux     ;;
1234
1235     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1236   m88k-motorola-sysv4* )
1237                     machine=delta88k opsys=usg5-4-2
1238   ;;
1239   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1240
1241     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1242   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1243
1244     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1245
1246     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1247   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1248   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1249
1250       m88k-harris-cxux* )
1251         case "`uname -r`" in
1252        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1253        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1254     esac
1255     NON_GNU_CPP="/lib/cpp"
1256   ;;
1257     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1258     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1259
1260     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1261
1262     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1263
1264     *-hp-hpux* )
1265         case "$canonical" in
1266       m68*  ) machine=hp9000s300 ;;
1267       hppa* ) machine=hp800      ;;
1268     esac
1269
1270     case "$canonical" in
1271       *-hp-hpux7*  )  opsys=hpux   ;;
1272       *-hp-hpux8*  )  opsys=hpux8  ;;
1273       *-hp-hpux9*  )  opsys=hpux9  ;;
1274       *-hp-hpux10* )  opsys=hpux10 ;;
1275       *-hp-hpux11* )  opsys=hpux11 ;;
1276       *            )  opsys=hpux   ;;
1277     esac
1278
1279         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1280    echo "    xemacs will be linked with \"strcat.o\""
1281  fi ;; esac
1282
1283     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1284         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1285     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1286
1287     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1288   ;;
1289
1290     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1291   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1292
1293     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1294   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1295   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1296   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1297   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1298   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1299
1300     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1301   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1302
1303     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1304
1305     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1306
1307     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1308
1309     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1310
1311       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1312
1313     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1314
1315     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1316
1317     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1318
1319     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1320
1321         mips-mips-usg* ) machine=mips4 ;;
1322   mips-mips-riscos4 )
1323     machine=mips4
1324     NON_GNU_CC="cc -systype bsd43"
1325     NON_GNU_CPP="cc -systype bsd43 -E"
1326     case "$canonical" in
1327       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1328       mips-mips-riscos5* ) opsys=riscos5 ;;
1329     esac
1330   ;;
1331   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1332   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1333
1334     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1335
1336     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1337
1338     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1339   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1340
1341     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1342
1343     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1344
1345     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1346
1347     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1348
1349     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1350   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1351
1352     mips-siemens-sysv* | mips-sni-sysv*)
1353     machine=mips-siemens opsys=usg5-4
1354     NON_GNU_CC=/usr/ccs/bin/cc
1355     NON_GNU_CPP=/usr/ccs/lib/cpp
1356   ;;
1357
1358     mips-nec-sysv*)
1359     machine=mips-nec
1360     NON_GNU_CC=/usr/ccs/bin/cc
1361     NON_GNU_CPP=/usr/ccs/lib/cpp
1362   ;;
1363
1364       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1365   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1366     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1367   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1368   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1369   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1370   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1371   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1372   mips-sgi-irix*      ) opsys=irix5-0 ;;
1373
1374     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1375   *-sony-news* ) opsys=newsos5 ;;
1376
1377     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1378
1379     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1380         case "$canonical" in
1381       m68*-sunos1* )             machine=sun1     ;;
1382       m68*-sunos2* )             machine=sun2     ;;
1383       m68* )                     machine=sun3     ;;
1384       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1385       i*86-*-* )                 machine=intel386 ;;
1386       rs6000* )                  machine=rs6000   ;;
1387     esac
1388
1389         case "$canonical" in *-sunos5*)
1390       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1391     esac
1392
1393                     case "$canonical" in
1394       *-sunos4* )
1395         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1396         : ;;
1397       *-solaris2* )
1398         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1399         RANLIB=':' ;;
1400     esac
1401
1402     case "$canonical" in
1403       *-solaris*          )
1404         opsys=sol2
1405         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1406         { test "$extra_verbose" = "yes" && cat << EOF
1407     Defining OS_RELEASE = $os_release
1408 EOF
1409 cat >> confdefs.h <<EOF
1410 #define OS_RELEASE $os_release
1411 EOF
1412 }
1413  ;;
1414
1415             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1416       *-sunos4.0*         ) opsys=sunos4-0      ;;
1417       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1418       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1419       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1420       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1421       *-mach*             ) opsys=mach-bsd4-3   ;;
1422       *                   ) opsys=bsd4-2        ;;
1423     esac
1424
1425     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1426
1427         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1428   ;;
1429
1430     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1431
1432     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1433   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1434
1435     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1436
1437     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1438
1439     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1440       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1441
1442     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1443
1444     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1445
1446     vax-dec-* )
1447     case "$canonical" in
1448       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1449       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1450       *-mach* )                         opsys=mach-bsd4-3 ;;
1451     esac
1452   ;;
1453
1454     ns16k-whitechapel-* ) machine=mg1 ;;
1455
1456     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1457
1458     i[3-9]86-*-* )
1459     machine=intel386
1460     case "$canonical" in
1461       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1462       *-isc2.2* )               opsys=isc2-2 ;;
1463       *-isc4.0* )               opsys=isc4-0 ;;
1464       *-isc4.* )                opsys=isc4-1
1465                                 GCC_TEST_OPTIONS=-posix
1466                                 NON_GCC_TEST_OPTIONS=-Xp
1467                                 ;;
1468       *-isc* )                  opsys=isc3-0 ;;
1469       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1470       *-esix* )                 opsys=esix ;;
1471       *-mach* )                 opsys=mach-bsd4-3 ;;
1472       *-xenix* )                opsys=xenix ;;
1473       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1474       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1475       *-bsdi4* )                opsys=bsdos4 ;;
1476       *-bsdi3* )                opsys=bsdos3 ;;
1477       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1478       *-bsdi2* )                opsys=bsdos2 ;;
1479       *-sco3.2v5* )             opsys=sco5 ;
1480                                                         if test "$dynamic" = "yes" ; then
1481                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1482         else
1483                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1484         fi ;;
1485       *-sysv5* )                opsys=sco7 ;;
1486       *-386bsd* )               opsys=386bsd ;;
1487       *-freebsd* )              opsys=freebsd ;;
1488       *-nextstep* )             opsys=nextstep ;;
1489       *-pc-cygwin* )            opsys=cygwin32 ;;
1490       *-pc-mingw* )             opsys=mingw32 ;
1491                                 test -z "$with_tty" && with_tty="no";;
1492           esac
1493   ;;
1494
1495     m68k-*-linux* ) machine=m68k opsys=linux ;;
1496
1497 esac
1498
1499 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1500 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1501
1502 if test -r "${srcdir}/src/m/${machine}.h"; then
1503   machfile="m/${machine}.h"
1504   { test "$extra_verbose" = "yes" && cat << EOF
1505     Defining config_machfile = "$machfile"
1506 EOF
1507 cat >> confdefs.h <<EOF
1508 #define config_machfile "$machfile"
1509 EOF
1510 }
1511
1512 else
1513   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1514   echo "Using configure-time autodetection only."
1515 fi
1516
1517 if test -r "${srcdir}/src/s/${opsys}.h"; then
1518   opsysfile="s/${opsys}.h"
1519   { test "$extra_verbose" = "yes" && cat << EOF
1520     Defining config_opsysfile = "$opsysfile"
1521 EOF
1522 cat >> confdefs.h <<EOF
1523 #define config_opsysfile "$opsysfile"
1524 EOF
1525 }
1526
1527 else
1528   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1529   echo "Using configure-time autodetection only."
1530 fi
1531
1532
1533 if test -z "$dynamic"; then
1534   case "$opsys" in
1535     hpux* | sunos4* ) dynamic=no ;;
1536     *) dynamic=yes ;;
1537   esac
1538 fi
1539 if test "$dynamic" = "yes"; then
1540   case "$opsys" in
1541     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1542     decosf* ) ld_call_shared="-call_shared" ;;
1543   esac
1544 else   case "$opsys" in
1545     sol2 )
1546       echo "Static linking is not supported on Solaris 2."
1547       echo "Rerun configure without specifying --dynamic=no."
1548       exit 1 ;;
1549     linux   ) ld_call_shared="-Bstatic" ;;
1550     decosf* ) ld_call_shared="-non_shared" ;;
1551   esac
1552 fi
1553
1554 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1555
1556 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1557 { test "$extra_verbose" = "yes" && cat << EOF
1558     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1559 EOF
1560 cat >> confdefs.h <<EOF
1561 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1562 EOF
1563 }
1564
1565
1566
1567 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1568 if test "$with_workshop $with_tooltalk" = "yes no"; then
1569   (echo "$progname: Usage error:"
1570 echo " " "--with-workshop requires --with-tooltalk"
1571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1572 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1573 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1574 fi
1575
1576 if test "$with_workshop" = "yes"; then
1577   { test "$extra_verbose" = "yes" && cat << \EOF
1578     Defining SUNPRO
1579 EOF
1580 cat >> confdefs.h <<\EOF
1581 #define SUNPRO 1
1582 EOF
1583 }
1584
1585   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1586    echo "    xemacs will be linked with \"sunpro.o\""
1587  fi
1588 fi
1589
1590 if test "$with_clash_detection" != "no"; then
1591   { test "$extra_verbose" = "yes" && cat << \EOF
1592     Defining CLASH_DETECTION
1593 EOF
1594 cat >> confdefs.h <<\EOF
1595 #define CLASH_DETECTION 1
1596 EOF
1597 }
1598
1599   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1600    echo "    xemacs will be linked with \"filelock.o\""
1601  fi
1602 fi
1603
1604 test -n "$compiler" && CC="$compiler"
1605 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1606 fi
1607
1608 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1609 if test "${CFLAGS-unset}" != unset
1610   then cflags_specified=yes;
1611   else cflags_specified=no;
1612 fi
1613
1614 xe_save_CFLAGS="$CFLAGS"
1615
1616 # Extract the first word of "gcc", so it can be a program name with args.
1617 set dummy gcc; ac_word=$2
1618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1619 echo "configure:1620: checking for $ac_word" >&5
1620
1621 if test -n "$CC"; then
1622   ac_cv_prog_CC="$CC" # Let the user override the test.
1623 else
1624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1625   ac_dummy="$PATH"
1626   for ac_dir in $ac_dummy; do
1627     test -z "$ac_dir" && ac_dir=.
1628     if test -f $ac_dir/$ac_word; then
1629       ac_cv_prog_CC="gcc"
1630       break
1631     fi
1632   done
1633   IFS="$ac_save_ifs"
1634 fi
1635 CC="$ac_cv_prog_CC"
1636 if test -n "$CC"; then
1637   echo "$ac_t""$CC" 1>&6
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641
1642 if test -z "$CC"; then
1643   # Extract the first word of "cc", so it can be a program name with args.
1644 set dummy cc; ac_word=$2
1645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1646 echo "configure:1647: checking for $ac_word" >&5
1647
1648 if test -n "$CC"; then
1649   ac_cv_prog_CC="$CC" # Let the user override the test.
1650 else
1651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1652   ac_prog_rejected=no
1653   ac_dummy="$PATH"
1654   for ac_dir in $ac_dummy; do
1655     test -z "$ac_dir" && ac_dir=.
1656     if test -f $ac_dir/$ac_word; then
1657       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1658         ac_prog_rejected=yes
1659         continue
1660       fi
1661       ac_cv_prog_CC="cc"
1662       break
1663     fi
1664   done
1665   IFS="$ac_save_ifs"
1666 if test $ac_prog_rejected = yes; then
1667   # We found a bogon in the path, so make sure we never use it.
1668   set dummy $ac_cv_prog_CC
1669   shift
1670   if test $# -gt 0; then
1671     # We chose a different compiler from the bogus one.
1672     # However, it has the same basename, so the bogon will be chosen
1673     # first if we set CC to just the basename; use the full file name.
1674     shift
1675     set dummy "$ac_dir/$ac_word" "$@"
1676     shift
1677     ac_cv_prog_CC="$@"
1678   fi
1679 fi
1680 fi
1681 CC="$ac_cv_prog_CC"
1682 if test -n "$CC"; then
1683   echo "$ac_t""$CC" 1>&6
1684 else
1685   echo "$ac_t""no" 1>&6
1686 fi
1687
1688   if test -z "$CC"; then
1689     case "`uname -s`" in
1690     *win32* | *WIN32*)
1691       # Extract the first word of "cl", so it can be a program name with args.
1692 set dummy cl; ac_word=$2
1693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1694 echo "configure:1695: checking for $ac_word" >&5
1695
1696 if test -n "$CC"; then
1697   ac_cv_prog_CC="$CC" # Let the user override the test.
1698 else
1699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1700   ac_dummy="$PATH"
1701   for ac_dir in $ac_dummy; do
1702     test -z "$ac_dir" && ac_dir=.
1703     if test -f $ac_dir/$ac_word; then
1704       ac_cv_prog_CC="cl"
1705       break
1706     fi
1707   done
1708   IFS="$ac_save_ifs"
1709 fi
1710 CC="$ac_cv_prog_CC"
1711 if test -n "$CC"; then
1712   echo "$ac_t""$CC" 1>&6
1713 else
1714   echo "$ac_t""no" 1>&6
1715 fi
1716  ;;
1717     esac
1718   fi
1719   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1720 fi
1721
1722 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1723 echo "configure:1724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1724
1725 ac_ext=c
1726 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1727 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1728 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1729 ac_cpp='$CPP '"$xe_cppflags"
1730 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1731 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1732 cross_compiling=no
1733
1734 cat > conftest.$ac_ext << EOF
1735
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738
1739 main(){return(0);}
1740 EOF
1741 if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742   ac_cv_prog_cc_works=yes
1743   # If we can't run a trivial program, we are probably using a cross compiler.
1744   if (./conftest; exit) 2>/dev/null; then
1745     ac_cv_prog_cc_cross=no
1746   else
1747     ac_cv_prog_cc_cross=yes
1748   fi
1749 else
1750   echo "configure: failed program was:" >&5
1751   cat conftest.$ac_ext >&5
1752   ac_cv_prog_cc_works=no
1753 fi
1754 rm -fr conftest*
1755 ac_ext=c
1756 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1757 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1758 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1759 ac_cpp='$CPP '"$xe_cppflags"
1760 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1761 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1762 cross_compiling=no
1763
1764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1765 if test $ac_cv_prog_cc_works = no; then
1766   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1767 fi
1768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1769 echo "configure:1770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1771 cross_compiling=$ac_cv_prog_cc_cross
1772
1773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1774 echo "configure:1775: checking whether we are using GNU C" >&5
1775
1776 cat > conftest.c <<EOF
1777 #ifdef __GNUC__
1778   yes;
1779 #endif
1780 EOF
1781 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1782   ac_cv_prog_gcc=yes
1783 else
1784   ac_cv_prog_gcc=no
1785 fi
1786
1787 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1788
1789 if test $ac_cv_prog_gcc = yes; then
1790   GCC=yes
1791 else
1792   GCC=
1793 fi
1794
1795 ac_test_CFLAGS="${CFLAGS+set}"
1796 ac_save_CFLAGS="$CFLAGS"
1797 CFLAGS=
1798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1799 echo "configure:1800: checking whether ${CC-cc} accepts -g" >&5
1800
1801 echo 'void f(){}' > conftest.c
1802 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1803   ac_cv_prog_cc_g=yes
1804 else
1805   ac_cv_prog_cc_g=no
1806 fi
1807 rm -f conftest*
1808
1809
1810 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1811 if test "$ac_test_CFLAGS" = set; then
1812   CFLAGS="$ac_save_CFLAGS"
1813 elif test $ac_cv_prog_cc_g = yes; then
1814   if test "$GCC" = yes; then
1815     CFLAGS="-g -O2"
1816   else
1817     CFLAGS="-g"
1818   fi
1819 else
1820   if test "$GCC" = yes; then
1821     CFLAGS="-O2"
1822   else
1823     CFLAGS=
1824   fi
1825 fi
1826  
1827 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1828   CC=${NON_GNU_CC-cc}
1829   # Extract the first word of "gcc", so it can be a program name with args.
1830 set dummy gcc; ac_word=$2
1831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1832 echo "configure:1833: checking for $ac_word" >&5
1833
1834 if test -n "$CC"; then
1835   ac_cv_prog_CC="$CC" # Let the user override the test.
1836 else
1837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1838   ac_dummy="$PATH"
1839   for ac_dir in $ac_dummy; do
1840     test -z "$ac_dir" && ac_dir=.
1841     if test -f $ac_dir/$ac_word; then
1842       ac_cv_prog_CC="gcc"
1843       break
1844     fi
1845   done
1846   IFS="$ac_save_ifs"
1847 fi
1848 CC="$ac_cv_prog_CC"
1849 if test -n "$CC"; then
1850   echo "$ac_t""$CC" 1>&6
1851 else
1852   echo "$ac_t""no" 1>&6
1853 fi
1854
1855 if test -z "$CC"; then
1856   # Extract the first word of "cc", so it can be a program name with args.
1857 set dummy cc; ac_word=$2
1858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1859 echo "configure:1860: checking for $ac_word" >&5
1860
1861 if test -n "$CC"; then
1862   ac_cv_prog_CC="$CC" # Let the user override the test.
1863 else
1864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1865   ac_prog_rejected=no
1866   ac_dummy="$PATH"
1867   for ac_dir in $ac_dummy; do
1868     test -z "$ac_dir" && ac_dir=.
1869     if test -f $ac_dir/$ac_word; then
1870       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1871         ac_prog_rejected=yes
1872         continue
1873       fi
1874       ac_cv_prog_CC="cc"
1875       break
1876     fi
1877   done
1878   IFS="$ac_save_ifs"
1879 if test $ac_prog_rejected = yes; then
1880   # We found a bogon in the path, so make sure we never use it.
1881   set dummy $ac_cv_prog_CC
1882   shift
1883   if test $# -gt 0; then
1884     # We chose a different compiler from the bogus one.
1885     # However, it has the same basename, so the bogon will be chosen
1886     # first if we set CC to just the basename; use the full file name.
1887     shift
1888     set dummy "$ac_dir/$ac_word" "$@"
1889     shift
1890     ac_cv_prog_CC="$@"
1891   fi
1892 fi
1893 fi
1894 CC="$ac_cv_prog_CC"
1895 if test -n "$CC"; then
1896   echo "$ac_t""$CC" 1>&6
1897 else
1898   echo "$ac_t""no" 1>&6
1899 fi
1900
1901   if test -z "$CC"; then
1902     case "`uname -s`" in
1903     *win32* | *WIN32*)
1904       # Extract the first word of "cl", so it can be a program name with args.
1905 set dummy cl; ac_word=$2
1906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_word" >&5
1908
1909 if test -n "$CC"; then
1910   ac_cv_prog_CC="$CC" # Let the user override the test.
1911 else
1912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1913   ac_dummy="$PATH"
1914   for ac_dir in $ac_dummy; do
1915     test -z "$ac_dir" && ac_dir=.
1916     if test -f $ac_dir/$ac_word; then
1917       ac_cv_prog_CC="cl"
1918       break
1919     fi
1920   done
1921   IFS="$ac_save_ifs"
1922 fi
1923 CC="$ac_cv_prog_CC"
1924 if test -n "$CC"; then
1925   echo "$ac_t""$CC" 1>&6
1926 else
1927   echo "$ac_t""no" 1>&6
1928 fi
1929  ;;
1930     esac
1931   fi
1932   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1933 fi
1934
1935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1936 echo "configure:1937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1937
1938 ac_ext=c
1939 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1940 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1941 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1942 ac_cpp='$CPP '"$xe_cppflags"
1943 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1944 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1945 cross_compiling=no
1946
1947 cat > conftest.$ac_ext << EOF
1948
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951
1952 main(){return(0);}
1953 EOF
1954 if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1955   ac_cv_prog_cc_works=yes
1956   # If we can't run a trivial program, we are probably using a cross compiler.
1957   if (./conftest; exit) 2>/dev/null; then
1958     ac_cv_prog_cc_cross=no
1959   else
1960     ac_cv_prog_cc_cross=yes
1961   fi
1962 else
1963   echo "configure: failed program was:" >&5
1964   cat conftest.$ac_ext >&5
1965   ac_cv_prog_cc_works=no
1966 fi
1967 rm -fr conftest*
1968 ac_ext=c
1969 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1970 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1971 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1972 ac_cpp='$CPP '"$xe_cppflags"
1973 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1974 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1975 cross_compiling=no
1976
1977 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1978 if test $ac_cv_prog_cc_works = no; then
1979   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1980 fi
1981 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1982 echo "configure:1983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1983 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1984 cross_compiling=$ac_cv_prog_cc_cross
1985
1986 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1987 echo "configure:1988: checking whether we are using GNU C" >&5
1988
1989 cat > conftest.c <<EOF
1990 #ifdef __GNUC__
1991   yes;
1992 #endif
1993 EOF
1994 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1995   ac_cv_prog_gcc=yes
1996 else
1997   ac_cv_prog_gcc=no
1998 fi
1999
2000 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2001
2002 if test $ac_cv_prog_gcc = yes; then
2003   GCC=yes
2004 else
2005   GCC=
2006 fi
2007
2008 ac_test_CFLAGS="${CFLAGS+set}"
2009 ac_save_CFLAGS="$CFLAGS"
2010 CFLAGS=
2011 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2012 echo "configure:2013: checking whether ${CC-cc} accepts -g" >&5
2013
2014 echo 'void f(){}' > conftest.c
2015 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2016   ac_cv_prog_cc_g=yes
2017 else
2018   ac_cv_prog_cc_g=no
2019 fi
2020 rm -f conftest*
2021
2022
2023 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2024 if test "$ac_test_CFLAGS" = set; then
2025   CFLAGS="$ac_save_CFLAGS"
2026 elif test $ac_cv_prog_cc_g = yes; then
2027   if test "$GCC" = yes; then
2028     CFLAGS="-g -O2"
2029   else
2030     CFLAGS="-g"
2031   fi
2032 else
2033   if test "$GCC" = yes; then
2034     CFLAGS="-O2"
2035   else
2036     CFLAGS=
2037   fi
2038 fi
2039
2040 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2041   CC=gcc
2042   # Extract the first word of "gcc", so it can be a program name with args.
2043 set dummy gcc; ac_word=$2
2044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2045 echo "configure:2046: checking for $ac_word" >&5
2046
2047 if test -n "$CC"; then
2048   ac_cv_prog_CC="$CC" # Let the user override the test.
2049 else
2050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2051   ac_dummy="$PATH"
2052   for ac_dir in $ac_dummy; do
2053     test -z "$ac_dir" && ac_dir=.
2054     if test -f $ac_dir/$ac_word; then
2055       ac_cv_prog_CC="gcc"
2056       break
2057     fi
2058   done
2059   IFS="$ac_save_ifs"
2060 fi
2061 CC="$ac_cv_prog_CC"
2062 if test -n "$CC"; then
2063   echo "$ac_t""$CC" 1>&6
2064 else
2065   echo "$ac_t""no" 1>&6
2066 fi
2067
2068 if test -z "$CC"; then
2069   # Extract the first word of "cc", so it can be a program name with args.
2070 set dummy cc; ac_word=$2
2071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2072 echo "configure:2073: checking for $ac_word" >&5
2073
2074 if test -n "$CC"; then
2075   ac_cv_prog_CC="$CC" # Let the user override the test.
2076 else
2077   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2078   ac_prog_rejected=no
2079   ac_dummy="$PATH"
2080   for ac_dir in $ac_dummy; do
2081     test -z "$ac_dir" && ac_dir=.
2082     if test -f $ac_dir/$ac_word; then
2083       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2084         ac_prog_rejected=yes
2085         continue
2086       fi
2087       ac_cv_prog_CC="cc"
2088       break
2089     fi
2090   done
2091   IFS="$ac_save_ifs"
2092 if test $ac_prog_rejected = yes; then
2093   # We found a bogon in the path, so make sure we never use it.
2094   set dummy $ac_cv_prog_CC
2095   shift
2096   if test $# -gt 0; then
2097     # We chose a different compiler from the bogus one.
2098     # However, it has the same basename, so the bogon will be chosen
2099     # first if we set CC to just the basename; use the full file name.
2100     shift
2101     set dummy "$ac_dir/$ac_word" "$@"
2102     shift
2103     ac_cv_prog_CC="$@"
2104   fi
2105 fi
2106 fi
2107 CC="$ac_cv_prog_CC"
2108 if test -n "$CC"; then
2109   echo "$ac_t""$CC" 1>&6
2110 else
2111   echo "$ac_t""no" 1>&6
2112 fi
2113
2114   if test -z "$CC"; then
2115     case "`uname -s`" in
2116     *win32* | *WIN32*)
2117       # Extract the first word of "cl", so it can be a program name with args.
2118 set dummy cl; ac_word=$2
2119 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2120 echo "configure:2121: checking for $ac_word" >&5
2121
2122 if test -n "$CC"; then
2123   ac_cv_prog_CC="$CC" # Let the user override the test.
2124 else
2125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2126   ac_dummy="$PATH"
2127   for ac_dir in $ac_dummy; do
2128     test -z "$ac_dir" && ac_dir=.
2129     if test -f $ac_dir/$ac_word; then
2130       ac_cv_prog_CC="cl"
2131       break
2132     fi
2133   done
2134   IFS="$ac_save_ifs"
2135 fi
2136 CC="$ac_cv_prog_CC"
2137 if test -n "$CC"; then
2138   echo "$ac_t""$CC" 1>&6
2139 else
2140   echo "$ac_t""no" 1>&6
2141 fi
2142  ;;
2143     esac
2144   fi
2145   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2146 fi
2147
2148 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2149 echo "configure:2150: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2150
2151 ac_ext=c
2152 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2153 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2154 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2155 ac_cpp='$CPP '"$xe_cppflags"
2156 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2157 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2158 cross_compiling=no
2159
2160 cat > conftest.$ac_ext << EOF
2161
2162 #line 2163 "configure"
2163 #include "confdefs.h"
2164
2165 main(){return(0);}
2166 EOF
2167 if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2168   ac_cv_prog_cc_works=yes
2169   # If we can't run a trivial program, we are probably using a cross compiler.
2170   if (./conftest; exit) 2>/dev/null; then
2171     ac_cv_prog_cc_cross=no
2172   else
2173     ac_cv_prog_cc_cross=yes
2174   fi
2175 else
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   ac_cv_prog_cc_works=no
2179 fi
2180 rm -fr conftest*
2181 ac_ext=c
2182 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2183 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2184 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2185 ac_cpp='$CPP '"$xe_cppflags"
2186 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2187 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2188 cross_compiling=no
2189
2190 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2191 if test $ac_cv_prog_cc_works = no; then
2192   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2193 fi
2194 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2195 echo "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2196 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2197 cross_compiling=$ac_cv_prog_cc_cross
2198
2199 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2200 echo "configure:2201: checking whether we are using GNU C" >&5
2201
2202 cat > conftest.c <<EOF
2203 #ifdef __GNUC__
2204   yes;
2205 #endif
2206 EOF
2207 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2208   ac_cv_prog_gcc=yes
2209 else
2210   ac_cv_prog_gcc=no
2211 fi
2212
2213 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2214
2215 if test $ac_cv_prog_gcc = yes; then
2216   GCC=yes
2217 else
2218   GCC=
2219 fi
2220
2221 ac_test_CFLAGS="${CFLAGS+set}"
2222 ac_save_CFLAGS="$CFLAGS"
2223 CFLAGS=
2224 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2225 echo "configure:2226: checking whether ${CC-cc} accepts -g" >&5
2226
2227 echo 'void f(){}' > conftest.c
2228 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2229   ac_cv_prog_cc_g=yes
2230 else
2231   ac_cv_prog_cc_g=no
2232 fi
2233 rm -f conftest*
2234
2235
2236 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2237 if test "$ac_test_CFLAGS" = set; then
2238   CFLAGS="$ac_save_CFLAGS"
2239 elif test $ac_cv_prog_cc_g = yes; then
2240   if test "$GCC" = yes; then
2241     CFLAGS="-g -O2"
2242   else
2243     CFLAGS="-g"
2244   fi
2245 else
2246   if test "$GCC" = yes; then
2247     CFLAGS="-O2"
2248   else
2249     CFLAGS=
2250   fi
2251 fi
2252
2253 fi
2254 CFLAGS="$xe_save_CFLAGS"
2255
2256
2257 test -n "$CPP" -a -d "$CPP" && CPP=
2258
2259 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2260
2261 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2262 echo "configure:2263: checking how to run the C preprocessor" >&5
2263 # On Suns, sometimes $CPP names a directory.
2264 if test -n "$CPP" && test -d "$CPP"; then
2265   CPP=
2266 fi
2267 if test -z "$CPP"; then
2268
2269   # This must be in double quotes, not single quotes, because CPP may get
2270   # substituted into the Makefile and "${CC-cc}" will confuse make.
2271   CPP="${CC-cc} -E"
2272   # On the NeXT, cc -E runs the code through the compiler's parser,
2273   # not just through cpp.
2274   cat > conftest.$ac_ext <<EOF
2275 #line 2276 "configure"
2276 #include "confdefs.h"
2277 #include <assert.h>
2278 Syntax Error
2279 EOF
2280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2281 { (eval echo configure:2282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2283 if test -z "$ac_err"; then
2284   :
2285 else
2286   echo "$ac_err" >&5
2287   echo "configure: failed program was:" >&5
2288   cat conftest.$ac_ext >&5
2289   rm -rf conftest*
2290   CPP="${CC-cc} -E -traditional-cpp"
2291   cat > conftest.$ac_ext <<EOF
2292 #line 2293 "configure"
2293 #include "confdefs.h"
2294 #include <assert.h>
2295 Syntax Error
2296 EOF
2297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2298 { (eval echo configure:2299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2300 if test -z "$ac_err"; then
2301   :
2302 else
2303   echo "$ac_err" >&5
2304   echo "configure: failed program was:" >&5
2305   cat conftest.$ac_ext >&5
2306   rm -rf conftest*
2307   CPP="${CC-cc} -nologo -E"
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <assert.h>
2312 Syntax Error
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   :
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   CPP=/lib/cpp
2325 fi
2326 rm -f conftest*
2327 fi
2328 rm -f conftest*
2329 fi
2330 rm -f conftest*
2331   ac_cv_prog_CPP="$CPP"
2332   CPP="$ac_cv_prog_CPP"
2333 else
2334   ac_cv_prog_CPP="$CPP"
2335 fi
2336 echo "$ac_t""$CPP" 1>&6
2337
2338
2339
2340 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2341 echo "configure:2342: checking for AIX" >&5
2342 cat > conftest.$ac_ext <<EOF
2343 #line 2344 "configure"
2344 #include "confdefs.h"
2345 #ifdef _AIX
2346   yes
2347 #endif
2348
2349 EOF
2350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351   egrep "yes" >/dev/null 2>&1; then
2352   rm -rf conftest*
2353   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2354     Defining _ALL_SOURCE
2355 EOF
2356 cat >> confdefs.h <<\EOF
2357 #define _ALL_SOURCE 1
2358 EOF
2359 }
2360
2361 else
2362   rm -rf conftest*
2363   echo "$ac_t""no" 1>&6
2364 fi
2365 rm -f conftest*
2366
2367  
2368
2369 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2370 echo "configure:2371: checking for GNU libc" >&5
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2373 "configure"
2373 #include "confdefs.h"
2374 #include <features.h>
2375 int main() {
2376
2377 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2378 #error Not a GNU libc system :-(
2379 ******* ======= ******** &&&&&&&&
2380 #endif
2381
2382 ; return 0; }
2383 EOF
2384 if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2385   rm -rf conftest*
2386   have_glibc=yes
2387 else
2388   echo "configure: failed program was:" >&5
2389   cat conftest.$ac_ext >&5
2390   rm -rf conftest*
2391   have_glibc=no
2392 fi
2393 rm -f conftest*
2394 echo "$ac_t""$have_glibc" 1>&6
2395 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2396     Defining _GNU_SOURCE
2397 EOF
2398 cat >> confdefs.h <<\EOF
2399 #define _GNU_SOURCE 1
2400 EOF
2401 }
2402
2403
2404 case "$opsys" in
2405   sol2)
2406    { test "$extra_verbose" = "yes" && cat << \EOF
2407     Defining __EXTENSIONS__
2408 EOF
2409 cat >> confdefs.h <<\EOF
2410 #define __EXTENSIONS__ 1
2411 EOF
2412 }
2413
2414       if test "$os_release" -ge 55; then
2415      { test "$extra_verbose" = "yes" && cat << \EOF
2416     Defining _XOPEN_SOURCE = 500
2417 EOF
2418 cat >> confdefs.h <<\EOF
2419 #define _XOPEN_SOURCE 500
2420 EOF
2421 }
2422
2423      { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining _XOPEN_SOURCE_EXTENDED
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define _XOPEN_SOURCE_EXTENDED 1
2428 EOF
2429 }
2430
2431    fi ;;
2432   linux)
2433     { test "$extra_verbose" = "yes" && cat << \EOF
2434     Defining _POSIX_C_SOURCE = 199506L
2435 EOF
2436 cat >> confdefs.h <<\EOF
2437 #define _POSIX_C_SOURCE 199506L
2438 EOF
2439 }
2440
2441     { test "$extra_verbose" = "yes" && cat << \EOF
2442     Defining _XOPEN_SOURCE = 500
2443 EOF
2444 cat >> confdefs.h <<\EOF
2445 #define _XOPEN_SOURCE 500
2446 EOF
2447 }
2448
2449     { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE_EXTENDED
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE_EXTENDED 1
2454 EOF
2455 }
2456
2457     ;;
2458 esac
2459
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463 int main () {
2464 #if defined __SUNPRO_C
2465 return 11;
2466 #elif defined __DECC
2467 return 12;
2468 #elif defined __USLC__ && defined __SCO_VERSION__
2469 return 13;
2470 #else
2471 return 0;
2472 #endif
2473 }
2474 EOF
2475 if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2476 then
2477   :
2478 else
2479   conftest_rc="$?"
2480   echo "configure: failed program was:" >&5
2481   cat conftest.$ac_ext >&5
2482   rm -fr conftest*
2483   case "$conftest_rc" in
2484   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2485   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2486   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2487 esac
2488 fi
2489 rm -fr conftest*
2490
2491
2492
2493
2494 echo "Extracting information from the machine- and system-dependent headers..."
2495
2496 tempcname="conftest.c"
2497
2498
2499
2500 cat > $tempcname < confdefs.h
2501 cat >> $tempcname <<EOF
2502 #define NOT_C_CODE
2503 #define C_SWITCH_SITE
2504 #define C_SWITCH_X_SITE
2505 #define LD_SWITCH_SITE
2506 #define LD_SWITCH_X_SITE
2507 #define LD_SWITCH_X_SITE_AUX
2508 #define OS_RELEASE $os_release
2509
2510 #ifdef config_opsysfile
2511 #include "$srcdir/src/$opsysfile"
2512 #endif
2513
2514 #ifdef config_machfile
2515 #include "$srcdir/src/$machfile"
2516 #endif
2517
2518 #ifndef LIBS_MACHINE
2519 #define LIBS_MACHINE
2520 #endif
2521 configure___ libs_machine=LIBS_MACHINE
2522
2523 #ifndef LIBS_SYSTEM
2524 #define LIBS_SYSTEM
2525 #endif
2526 configure___ libs_system=LIBS_SYSTEM
2527
2528 #ifndef LIBS_TERMCAP
2529 #define LIBS_TERMCAP
2530 #endif
2531 configure___ libs_termcap=LIBS_TERMCAP
2532
2533 #ifndef LIB_STANDARD
2534 #define LIB_STANDARD
2535 #endif
2536 configure___ libs_standard=LIB_STANDARD
2537
2538
2539 #ifndef OBJECTS_MACHINE
2540 #define OBJECTS_MACHINE
2541 #endif
2542 configure___ objects_machine=OBJECTS_MACHINE
2543
2544 #ifndef OBJECTS_SYSTEM
2545 #define OBJECTS_SYSTEM
2546 #endif
2547 configure___ objects_system=OBJECTS_SYSTEM
2548
2549
2550 #ifndef C_SWITCH_MACHINE
2551 #define C_SWITCH_MACHINE
2552 #endif
2553 configure___ c_switch_machine=C_SWITCH_MACHINE
2554
2555 #ifndef C_SWITCH_SYSTEM
2556 #define C_SWITCH_SYSTEM
2557 #endif
2558 configure___ c_switch_system=C_SWITCH_SYSTEM
2559
2560
2561 #ifndef LD_SWITCH_MACHINE
2562 #define LD_SWITCH_MACHINE
2563 #endif
2564 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2565
2566 #ifndef LD_SWITCH_SYSTEM
2567 #define LD_SWITCH_SYSTEM
2568 #endif
2569 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2570
2571
2572 #ifndef UNEXEC
2573 #define UNEXEC "unexec.o"
2574 #endif
2575 configure___ unexec=UNEXEC
2576
2577
2578 #ifndef LD_SWITCH_SHARED
2579 #define LD_SWITCH_SHARED "-c"
2580 #endif
2581 configure___ ld_switch_shared=LD_SWITCH_SHARED
2582
2583
2584 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2585 configure___ ordinary_ld=ORDINARY_LD
2586
2587 #ifdef ORDINARY_LINK
2588 #define LD ORDINARY_LD
2589 #else /* no ORDINARY LINK */
2590 #ifdef COFF_ENCAPSULATE
2591 #define LD "\$(CC) -nostdlib"
2592 #else /* not COFF_ENCAPSULATE */
2593 #ifdef LINKER
2594 #define LD LINKER
2595 #else /* ! defined (LINKER) */
2596 #define LD "ld"
2597 #endif /* ! defined (LINKER) */
2598 #endif /* ! defined (COFF_ENCAPSULATE) */
2599 #endif /* not ORDINARY_LINK */
2600 configure___ ld=LD
2601
2602 #ifndef LIB_GCC
2603 #define LIB_GCC
2604 #endif
2605 configure___ lib_gcc=LIB_GCC
2606
2607 #ifndef LD_TEXT_START_ADDR
2608 #define LD_TEXT_START_ADDR
2609 #endif
2610 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2611
2612
2613 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2614 #ifdef NO_REMAP
2615 #ifdef COFF_ENCAPSULATE
2616 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2617 #else /* ! defined (COFF_ENCAPSULATE) */
2618 #define START_FILES "pre-crt0.o /lib/crt0.o"
2619 #endif /* ! defined (COFF_ENCAPSULATE) */
2620 #else /* ! defined (NO_REMAP) */
2621 #define START_FILES "ecrt0.o"
2622 #endif /* ! defined (NO_REMAP) */
2623 #endif /* no ORDINARY_LINK */
2624 #ifndef START_FILES
2625 #define START_FILES
2626 #endif
2627 configure___ start_files=START_FILES
2628
2629 #ifdef ORDINARY_LINK
2630 configure___ ordinary_link=yes
2631 #else
2632 configure___ ordinary_link=no
2633 #endif
2634
2635 #ifdef SYSTEM_MALLOC
2636 configure___ system_malloc=yes
2637 #else
2638 configure___ system_malloc=no
2639 #endif
2640
2641 #ifdef TERMINFO
2642 configure___ have_terminfo=yes
2643 #else
2644 configure___ have_terminfo=no
2645 #endif
2646
2647 #ifdef MAIL_USE_FLOCK
2648 configure___ mail_use_flock=yes
2649 #else
2650 configure___ mail_use_flock=no
2651 #endif
2652
2653 #ifdef MAIL_USE_LOCKF
2654 configure___ mail_use_lockf=yes
2655 #else
2656 configure___ mail_use_lockf=no
2657 #endif
2658
2659 #ifdef MAIL_USE_LOCKING
2660 configure___ mail_use_locking=yes
2661 #else
2662 configure___ mail_use_locking=no
2663 #endif
2664
2665 #ifdef HAVE_WIN32_PROCESSES
2666 configure___ win32_processes=yes
2667 #else
2668 configure___ win32_processes=no
2669 #endif
2670
2671 EOF
2672
2673 CPP=`eval "echo $CPP $CPPFLAGS"`
2674 eval `$CPP -Isrc $tempcname \
2675         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2676
2677 rm $tempcname
2678
2679 if test "$pdump" = "yes"; then
2680   ordinary_link="yes"
2681   ld="${ordinary_ld}"
2682   start_files=
2683   libs_standard=
2684   unexec=
2685   lib_gcc=
2686 fi
2687
2688 test "$extra_verbose" = "yes" && \
2689   for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   ld_switch_machine ld_switch_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
2690
2691 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2692         mingw_include=`eval "dirname $mingw_include"` ;
2693         mingw_include="-I$mingw_include/../include/mingw32" ;
2694         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2695 esac
2696
2697 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2698
2699
2700 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2701
2702 if test "$__USLC__" = yes; then
2703   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2704 echo "configure:2705: checking for whether the -Kalloca compiler flag is needed" >&5
2705   need_kalloca=no
2706   cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709
2710 int main() {
2711 void *x = alloca(4);
2712 ; return 0; }
2713 EOF
2714 if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2715   rm -rf conftest*
2716   :
2717 else
2718   echo "configure: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   rm -rf conftest*
2721   
2722     xe_save_c_switch_system="$c_switch_system"
2723     c_switch_system="$c_switch_system -Kalloca"
2724     cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727
2728 int main() {
2729 void *x = alloca(4);
2730 ; return 0; }
2731 EOF
2732 if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733   rm -rf conftest*
2734    need_kalloca=yes 
2735 else
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738 fi
2739 rm -f conftest*
2740     c_switch_system="$xe_save_c_switch_system"
2741 fi
2742 rm -f conftest*
2743   echo "$ac_t""$need_kalloca" 1>&6
2744   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2745 fi
2746
2747 if test "$cflags_specified" = "no"; then
2748       if   test "$GCC" = "yes"; then
2749     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2750               elif test "$__SUNPRO_C" = "yes"; then
2751     case "$opsys" in
2752       sol2    ) CFLAGS="-v -xO4" ;;
2753       sunos4* ) CFLAGS="-xO2";;
2754     esac
2755   elif test "$__DECC" = "yes"; then
2756     CFLAGS="-O3"
2757   elif test "$CC" = "xlc"; then
2758     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2759     else
2760     CFLAGS="-O" ;  fi
2761 fi
2762
2763 if test "$GCC" = "yes"; then
2764 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2765 echo "configure:2766: checking for buggy gcc versions" >&5
2766 GCC_VERSION=`$CC --version`
2767 case `uname -s`:`uname -m`:$GCC_VERSION in
2768                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2769                         case "$CFLAGS" in
2770             *-O2*|*-O3*)
2771                 case "$CFLAGS" in
2772                     *-fno-schedule-insns*) ;;
2773                     *)
2774                         echo "$ac_t""yes" 1>&6
2775                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2776                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2777                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2778                         ;;
2779                 esac
2780                 ;;
2781         esac
2782         ;;
2783                     Linux:alpha:egcs-2.91.*)
2784         echo "$ac_t""yes" 1>&6
2785         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2786         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2787         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2788         ;;
2789     *:i*86*:2.7.2*)
2790         case "$GCC_VERSION" in
2791             2.7.2)
2792                 case "$CFLAGS" in
2793                     *-O2*|*-O3*)
2794                         case "$CFLAGS" in
2795                             *-fno-strength-reduce*) ;;
2796                             *)
2797                                 echo "$ac_t""yes" 1>&6
2798                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2799                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2800                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2801                                 ;;
2802                         esac
2803                         ;;
2804                 esac
2805                 ;;
2806         esac
2807         case "$CFLAGS" in
2808          *-fno-caller-saves*) ;;
2809          *)
2810             echo "$ac_t""yes" 1>&6
2811             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2812             echo "configure: warning: -fno-caller-saves." 1>&2
2813             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2814             ;;
2815         esac
2816         ;;
2817 esac
2818 echo "$ac_t""no" 1>&6
2819 fi
2820
2821
2822 if test "$GCC" = "yes"; then
2823   set x $ld_switch_system; shift; ld_switch_system=""
2824   while test -n "$1"; do
2825     case $1 in
2826       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2827       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2828       -Xlinker* ) ;;
2829       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2830     esac
2831     shift
2832   done
2833 fi
2834
2835 if test "$GCC" = "yes"; then
2836   set x $ld_switch_machine; shift; ld_switch_machine=""
2837   while test -n "$1"; do
2838     case $1 in
2839       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2840       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2841       -Xlinker* ) ;;
2842       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2843     esac
2844     shift
2845   done
2846 fi
2847
2848 if test "$GCC" = "yes"; then
2849   set x $LDFLAGS; shift; LDFLAGS=""
2850   while test -n "$1"; do
2851     case $1 in
2852       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2853       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2854       -Xlinker* ) ;;
2855       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2856     esac
2857     shift
2858   done
2859 fi
2860
2861 if test "$GCC" = "yes"; then
2862   set x $ld_call_shared; shift; ld_call_shared=""
2863   while test -n "$1"; do
2864     case $1 in
2865       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2866       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2867       -Xlinker* ) ;;
2868       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2869     esac
2870     shift
2871   done
2872 fi
2873
2874 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2875    echo "    xemacs will be linked with \"$objects_machine\""
2876  fi
2877 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2878    echo "    xemacs will be linked with \"$objects_system\""
2879  fi
2880 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2881    echo "    xemacs will be linked with \"$unexec\""
2882  fi
2883 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2884    echo "    xemacs will be linked with \"dumper.o\""
2885  fi
2886
2887 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2888 echo "configure:2889: checking for dynodump" >&5
2889 if test "$unexec" != "unexsol2.o"; then
2890   echo "$ac_t""no" 1>&6
2891 else
2892   echo "$ac_t""yes" 1>&6
2893   { test "$extra_verbose" = "yes" && cat << \EOF
2894     Defining DYNODUMP
2895 EOF
2896 cat >> confdefs.h <<\EOF
2897 #define DYNODUMP 1
2898 EOF
2899 }
2900
2901   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2902   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2903   case "$machine" in
2904     sparc   ) dynodump_arch=sparc ;;
2905     *86*    ) dynodump_arch=i386  ;;
2906     powerpc ) dynodump_arch=ppc   ;;
2907   esac
2908     test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
2909 fi
2910
2911
2912 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2913
2914 if test "$unexec" = "unexaix.o"; then
2915   if   test "$dynamic" = "no"; then
2916   start_flags="-Wl,-bnso,-bnodelcsect"
2917   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2918   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2919     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2920   done
2921   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2922     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2923   done
2924   
2925 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2926 echo "configure:2927: checking for terminateAndUnload in -lC" >&5
2927 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2928
2929 xe_check_libs=" -lC "
2930 cat > conftest.$ac_ext <<EOF
2931 #line 2932 "configure"
2932 #include "confdefs.h"
2933 /* Override any gcc2 internal prototype to avoid an error.  */
2934 /* We use char because int might match the return type of a gcc2
2935     builtin and then its argument prototype would still apply.  */
2936 char terminateAndUnload();
2937
2938 int main() {
2939 terminateAndUnload()
2940 ; return 0; }
2941 EOF
2942 if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2943   rm -rf conftest*
2944   eval "ac_cv_lib_$ac_lib_var=yes"
2945 else
2946   echo "configure: failed program was:" >&5
2947   cat conftest.$ac_ext >&5
2948   rm -rf conftest*
2949   eval "ac_cv_lib_$ac_lib_var=no"
2950 fi
2951 rm -f conftest*
2952 xe_check_libs=""
2953
2954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2955   echo "$ac_t""yes" 1>&6
2956   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961
2962   fi
2963 elif test -n "$ld_text_start_addr"; then
2964   start_flags="-T $ld_text_start_addr -e __start"
2965 fi
2966
2967
2968
2969
2970 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2971  test -z "$linker" &&  linker='$(CC) -nostdlib'
2972  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2973 fi
2974 test "$GCC" != "yes" && lib_gcc=
2975
2976
2977
2978
2979
2980 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2981 if test -n "$site_libraries"; then
2982   for arg in $site_libraries; do
2983     case "$arg" in
2984      -* ) ;;
2985      * ) test -d "$arg" || \
2986            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2987        arg="-L${arg}" ;;
2988     esac
2989     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2990   done
2991 fi
2992
2993 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2994 if test -n "$site_includes"; then
2995   for arg in $site_includes; do
2996     case "$arg" in
2997       -* ) ;;
2998       * ) test -d "$arg" || \
2999            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3000       arg="-I${arg}" ;;
3001     esac
3002     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3003   done
3004 fi
3005
3006 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3007 if test -n "$site_prefixes"; then
3008   for dir in $site_prefixes; do
3009     lib_dir="${dir}/lib"
3010     inc_dir="${dir}/include"
3011     if test ! -d "$dir"; then
3012       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3013     elif test ! -d "$lib_dir"; then
3014       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3015     else
3016       if test -d "$inc_dir"; then
3017         c_switch_site="$c_switch_site "-I$inc_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I$inc_dir"\" to \$c_switch_site"; fi
3018       fi
3019       ld_switch_site="$ld_switch_site "-L$lib_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi
3020     fi
3021   done
3022 fi
3023
3024
3025 for dir in "/usr/ccs/lib"; do
3026   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3027 done
3028
3029 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3030 if test -n "$site_runtime_libraries"; then
3031   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3032   export LD_RUN_PATH
3033 fi
3034
3035
3036
3037
3038
3039 if test -n "$add_runtime_path"; then :;
3040 elif test "$dynamic" = "no"; then add_runtime_path=no
3041 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3042 else case "$opsys" in
3043        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3044        * ) add_runtime_path=no ;;
3045      esac
3046 fi
3047
3048 if test "$add_runtime_path" = "yes"; then
3049       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3050 echo "configure:3051: checking "for runtime libraries flag"" >&5
3051   case "$opsys" in
3052     sol2 ) dash_r="-R" ;;
3053     decosf* | linux* | irix*) dash_r="-rpath " ;;
3054     *)
3055       dash_r=""
3056       for try_dash_r in "-R" "-R " "-rpath "; do
3057         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3058         
3059 if test "$GCC" = "yes"; then
3060   set x $xe_check_libs; shift; xe_check_libs=""
3061   while test -n "$1"; do
3062     case $1 in
3063       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3064       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3065       -Xlinker* ) ;;
3066       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3067     esac
3068     shift
3069   done
3070 fi
3071         cat > conftest.$ac_ext <<EOF
3072 #line 3073 "configure"
3073 #include "confdefs.h"
3074
3075 int main() {
3076
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080   rm -rf conftest*
3081   dash_r="$try_dash_r"
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085 fi
3086 rm -f conftest*
3087         xe_check_libs=""
3088         test -n "$dash_r" && break
3089       done ;;
3090   esac
3091   if test -n "$dash_r";
3092     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3093     else echo "$ac_t""NONE" 1>&6
3094   fi
3095 fi
3096
3097 xe_add_unique_runpath_dir='
3098   xe_add_p=yes
3099   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3100   done
3101   if test "$xe_add_p" = "yes"; then
3102     test -n "$runpath" && runpath="${runpath}:"
3103     runpath="${runpath}${xe_runpath_dir}"
3104     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3105   fi'
3106
3107
3108
3109
3110 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3111     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3112   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3113   
3114         runpath="" runpath_dirs=""
3115   if test -n "$LD_RUN_PATH"; then
3116     runpath="$LD_RUN_PATH"
3117   elif test "$GCC" = "yes"; then
3118         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3119     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3120     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3121     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3122       case "$arg" in P,* | -L* | -R* )
3123         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3124           {
3125 xe_runpath_dir="$dir"
3126   test "$xe_runpath_dir" != "/lib"     -a \
3127         "$xe_runpath_dir" != "/usr/lib" -a \
3128         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3129   eval "$xe_add_unique_runpath_dir"
3130 }
3131         done ;;
3132       esac
3133     done
3134     ld_switch_run="$ld_switch_run_save"
3135     rm -f conftest*
3136   else
3137         for arg in $ld_switch_site $ld_switch_x_site; do
3138       case "$arg" in -L*) {
3139 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3140   test "$xe_runpath_dir" != "/lib"     -a \
3141         "$xe_runpath_dir" != "/usr/lib" -a \
3142         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3143   eval "$xe_add_unique_runpath_dir"
3144 };; esac
3145     done
3146         if test "$opsys $need_motif" = "sol2 yes"; then
3147       xe_runpath_dir="/opt/SUNWdt/lib";
3148       eval "$xe_add_unique_runpath_dir";
3149     fi
3150   fi 
3151   if test -n "$runpath"; then
3152     ld_switch_run="${dash_r}${runpath}"
3153     
3154 if test "$GCC" = "yes"; then
3155   set x $ld_switch_run; shift; ld_switch_run=""
3156   while test -n "$1"; do
3157     case $1 in
3158       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3159       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3160       -Xlinker* ) ;;
3161       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3162     esac
3163     shift
3164   done
3165 fi
3166     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3167   fi
3168 fi
3169
3170
3171
3172
3173 GNU_MALLOC=yes
3174 if test "$with_dlmalloc" != "no"; then
3175         doug_lea_malloc=yes
3176 else
3177         doug_lea_malloc=no
3178 fi
3179 after_morecore_hook_exists=yes
3180 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3181 echo "configure:3182: checking for malloc_set_state" >&5
3182
3183 cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186 /* System header to define __stub macros and hopefully few prototypes,
3187     which can conflict with char malloc_set_state(); below.  */
3188 #include <assert.h>
3189 /* Override any gcc2 internal prototype to avoid an error.  */
3190 /* We use char because int might match the return type of a gcc2
3191     builtin and then its argument prototype would still apply.  */
3192 char malloc_set_state();
3193
3194 int main() {
3195
3196 /* The GNU C library defines this for functions which it implements
3197     to always fail with ENOSYS.  Some functions are actually named
3198     something starting with __ and the normal name is an alias.  */
3199 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3200 choke me
3201 #else
3202 malloc_set_state();
3203 #endif
3204
3205 ; return 0; }
3206 EOF
3207 if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3208   rm -rf conftest*
3209   eval "ac_cv_func_malloc_set_state=yes"
3210 else
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   eval "ac_cv_func_malloc_set_state=no"
3215 fi
3216 rm -f conftest*
3217
3218 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3219   echo "$ac_t""yes" 1>&6
3220   :
3221 else
3222   echo "$ac_t""no" 1>&6
3223 doug_lea_malloc=no
3224 fi
3225
3226 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3227 echo "configure:3228: checking whether __after_morecore_hook exists" >&5
3228 cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231 extern void (* __after_morecore_hook)();
3232 int main() {
3233 __after_morecore_hook = 0
3234 ; return 0; }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3237   rm -rf conftest*
3238   echo "$ac_t""yes" 1>&6
3239 else
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   echo "$ac_t""no" 1>&6
3244    after_morecore_hook_exists=no
3245 fi
3246 rm -f conftest*
3247 if test "$system_malloc" = "yes" ; then
3248   GNU_MALLOC=no
3249   GNU_MALLOC_reason="
3250     - The GNU allocators don't work with this system configuration."
3251 elif test "$with_system_malloc" = "yes" ; then
3252   GNU_MALLOC=no
3253   GNU_MALLOC_reason="
3254     - User chose not to use GNU allocators."
3255 elif test "$with_debug_malloc" = "yes" ; then
3256   GNU_MALLOC=no
3257   GNU_MALLOC_reason="
3258     - User chose to use Debugging Malloc."
3259 fi
3260
3261 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3262   GNU_MALLOC_reason="
3263     - Using Doug Lea's new malloc from the GNU C Library."
3264   { test "$extra_verbose" = "yes" && cat << \EOF
3265     Defining DOUG_LEA_MALLOC
3266 EOF
3267 cat >> confdefs.h <<\EOF
3268 #define DOUG_LEA_MALLOC 1
3269 EOF
3270 }
3271
3272   if test "$after_morecore_hook_exists" = "no" ; then
3273     GNU_MALLOC_reason="
3274     - Using Doug Lea's new malloc from the Linux C Library."
3275     { test "$extra_verbose" = "yes" && cat << \EOF
3276     Defining _NO_MALLOC_WARNING_
3277 EOF
3278 cat >> confdefs.h <<\EOF
3279 #define _NO_MALLOC_WARNING_ 1
3280 EOF
3281 }
3282
3283   fi
3284 fi
3285
3286
3287
3288
3289 # Extract the first word of "ranlib", so it can be a program name with args.
3290 set dummy ranlib; ac_word=$2
3291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3292 echo "configure:3293: checking for $ac_word" >&5
3293
3294 if test -n "$RANLIB"; then
3295   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3296 else
3297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3298   ac_dummy="$PATH"
3299   for ac_dir in $ac_dummy; do
3300     test -z "$ac_dir" && ac_dir=.
3301     if test -f $ac_dir/$ac_word; then
3302       ac_cv_prog_RANLIB="ranlib"
3303       break
3304     fi
3305   done
3306   IFS="$ac_save_ifs"
3307   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3308 fi
3309 RANLIB="$ac_cv_prog_RANLIB"
3310 if test -n "$RANLIB"; then
3311   echo "$ac_t""$RANLIB" 1>&6
3312 else
3313   echo "$ac_t""no" 1>&6
3314 fi
3315
3316 ac_aux_dir=
3317 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3318   if test -f $ac_dir/install-sh; then
3319     ac_aux_dir=$ac_dir
3320     ac_install_sh="$ac_aux_dir/install-sh -c"
3321     break
3322   elif test -f $ac_dir/install.sh; then
3323     ac_aux_dir=$ac_dir
3324     ac_install_sh="$ac_aux_dir/install.sh -c"
3325     break
3326   fi
3327 done
3328 if test -z "$ac_aux_dir"; then
3329   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3330 fi
3331 ac_config_guess=$ac_aux_dir/config.guess
3332 ac_config_sub=$ac_aux_dir/config.sub
3333 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3334
3335 # Find a good install program.  We prefer a C program (faster),
3336 # so one script is as good as another.  But avoid the broken or
3337 # incompatible versions:
3338 # SysV /etc/install, /usr/sbin/install
3339 # SunOS /usr/etc/install
3340 # IRIX /sbin/install
3341 # AIX /bin/install
3342 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3343 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3344 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3345 # ./install, which can be erroneously created by make from ./install.sh.
3346 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3347 echo "configure:3348: checking for a BSD compatible install" >&5
3348 if test -z "$INSTALL"; then
3349
3350   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3351   for ac_dir in $PATH; do
3352     # Account for people who put trailing slashes in PATH elements.
3353     case "$ac_dir/" in
3354     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3355     *)
3356       # OSF1 and SCO ODT 3.0 have their own names for install.
3357       # Don't use installbsd from OSF since it installs stuff as root
3358       # by default.
3359       for ac_prog in ginstall scoinst install; do
3360         if test -f $ac_dir/$ac_prog; then
3361           if test $ac_prog = install &&
3362             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3363             # AIX install.  It has an incompatible calling convention.
3364             :
3365           else
3366             ac_cv_path_install="$ac_dir/$ac_prog -c"
3367             break 2
3368           fi
3369         fi
3370       done
3371       ;;
3372     esac
3373   done
3374   IFS="$ac_save_IFS"
3375
3376   if test "${ac_cv_path_install+set}" = set; then
3377     INSTALL="$ac_cv_path_install"
3378   else
3379     # As a last resort, use the slow shell script.  We don't cache a
3380     # path for INSTALL within a source directory, because that will
3381     # break other packages using the cache if that directory is
3382     # removed, or if the path is relative.
3383     INSTALL="$ac_install_sh"
3384   fi
3385 fi
3386 echo "$ac_t""$INSTALL" 1>&6
3387
3388 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3389 # It thinks the first close brace ends the variable substitution.
3390 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3391
3392 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3393
3394 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3395
3396 for ac_prog in 'bison -y' byacc
3397 do
3398 # Extract the first word of "$ac_prog", so it can be a program name with args.
3399 set dummy $ac_prog; ac_word=$2
3400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3401 echo "configure:3402: checking for $ac_word" >&5
3402
3403 if test -n "$YACC"; then
3404   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH"
3408   for ac_dir in $ac_dummy; do
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_prog_YACC="$ac_prog"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 fi
3417 YACC="$ac_cv_prog_YACC"
3418 if test -n "$YACC"; then
3419   echo "$ac_t""$YACC" 1>&6
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423
3424 test -n "$YACC" && break
3425 done
3426 test -n "$YACC" || YACC="yacc"
3427
3428
3429 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h   utime.h 
3430 do
3431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3433 echo "configure:3434: checking for $ac_hdr" >&5
3434
3435 cat > conftest.$ac_ext <<EOF
3436 #line 3437 "configure"
3437 #include "confdefs.h"
3438 #include <$ac_hdr>
3439 EOF
3440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3441 { (eval echo configure:3442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3443 if test -z "$ac_err"; then
3444   rm -rf conftest*
3445   eval "ac_cv_header_$ac_safe=yes"
3446 else
3447   echo "$ac_err" >&5
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450   rm -rf conftest*
3451   eval "ac_cv_header_$ac_safe=no"
3452 fi
3453 rm -f conftest*
3454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3455   echo "$ac_t""yes" 1>&6
3456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3457   { test "$extra_verbose" = "yes" && cat << EOF
3458     Defining $ac_tr_hdr
3459 EOF
3460 cat >> confdefs.h <<EOF
3461 #define $ac_tr_hdr 1
3462 EOF
3463 }
3464  
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468 done
3469
3470 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3471 echo "configure:3472: checking for sys/wait.h that is POSIX.1 compatible" >&5
3472
3473 cat > conftest.$ac_ext <<EOF
3474 #line 3475 "configure"
3475 #include "confdefs.h"
3476 #include <sys/types.h>
3477 #include <sys/wait.h>
3478 #ifndef WEXITSTATUS
3479 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3480 #endif
3481 #ifndef WIFEXITED
3482 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3483 #endif
3484 int main() {
3485 int s;
3486 wait (&s);
3487 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3488 ; return 0; }
3489 EOF
3490 if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3491   rm -rf conftest*
3492   ac_cv_header_sys_wait_h=yes
3493 else
3494   echo "configure: failed program was:" >&5
3495   cat conftest.$ac_ext >&5
3496   rm -rf conftest*
3497   ac_cv_header_sys_wait_h=no
3498 fi
3499 rm -f conftest*
3500
3501 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3502 if test $ac_cv_header_sys_wait_h = yes; then
3503   { test "$extra_verbose" = "yes" && cat << \EOF
3504     Defining HAVE_SYS_WAIT_H
3505 EOF
3506 cat >> confdefs.h <<\EOF
3507 #define HAVE_SYS_WAIT_H 1
3508 EOF
3509 }
3510
3511 fi
3512
3513 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3514 echo "configure:3515: checking for ANSI C header files" >&5
3515
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 #include <stdlib.h>
3520 #include <stdarg.h>
3521 #include <string.h>
3522 #include <float.h>
3523 EOF
3524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3525 { (eval echo configure:3526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3527 if test -z "$ac_err"; then
3528   rm -rf conftest*
3529   ac_cv_header_stdc=yes
3530 else
3531   echo "$ac_err" >&5
3532   echo "configure: failed program was:" >&5
3533   cat conftest.$ac_ext >&5
3534   rm -rf conftest*
3535   ac_cv_header_stdc=no
3536 fi
3537 rm -f conftest*
3538
3539 if test $ac_cv_header_stdc = yes; then
3540   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 #include <string.h>
3545 EOF
3546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3547   egrep "memchr" >/dev/null 2>&1; then
3548   :
3549 else
3550   rm -rf conftest*
3551   ac_cv_header_stdc=no
3552 fi
3553 rm -f conftest*
3554
3555 fi
3556
3557 if test $ac_cv_header_stdc = yes; then
3558   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 #include <stdlib.h>
3563 EOF
3564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3565   egrep "free" >/dev/null 2>&1; then
3566   :
3567 else
3568   rm -rf conftest*
3569   ac_cv_header_stdc=no
3570 fi
3571 rm -f conftest*
3572
3573 fi
3574
3575 if test $ac_cv_header_stdc = yes; then
3576   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3577 cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <ctype.h>
3581 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3582 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3583 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3584 int main () { int i; for (i = 0; i < 256; i++)
3585 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3586 exit (0); }
3587
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3590 then
3591   :
3592 else
3593   conftest_rc="$?"
3594   echo "configure: failed program was:" >&5
3595   cat conftest.$ac_ext >&5
3596   rm -fr conftest*
3597   ac_cv_header_stdc=no
3598 fi
3599 rm -fr conftest*
3600 fi
3601
3602 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3603 if test $ac_cv_header_stdc = yes; then
3604   { test "$extra_verbose" = "yes" && cat << \EOF
3605     Defining STDC_HEADERS
3606 EOF
3607 cat >> confdefs.h <<\EOF
3608 #define STDC_HEADERS 1
3609 EOF
3610 }
3611
3612 fi
3613
3614 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3615 echo "configure:3616: checking whether time.h and sys/time.h may both be included" >&5
3616
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <sys/types.h>
3621 #include <sys/time.h>
3622 #include <time.h>
3623 int main() {
3624 struct tm *tp;
3625 ; return 0; }
3626 EOF
3627 if { (eval echo configure:3628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3628   rm -rf conftest*
3629   ac_cv_header_time=yes
3630 else
3631   echo "configure: failed program was:" >&5
3632   cat conftest.$ac_ext >&5
3633   rm -rf conftest*
3634   ac_cv_header_time=no
3635 fi
3636 rm -f conftest*
3637
3638 echo "$ac_t""$ac_cv_header_time" 1>&6
3639 if test $ac_cv_header_time = yes; then
3640   { test "$extra_verbose" = "yes" && cat << \EOF
3641     Defining TIME_WITH_SYS_TIME
3642 EOF
3643 cat >> confdefs.h <<\EOF
3644 #define TIME_WITH_SYS_TIME 1
3645 EOF
3646 }
3647
3648 fi
3649
3650 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3651 echo "configure:3652: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3652
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <sys/types.h>
3657 #include <signal.h>
3658 /* NetBSD declares sys_siglist in unistd.h.  */
3659 #ifdef HAVE_UNISTD_H
3660 #include <unistd.h>
3661 #endif
3662 int main() {
3663 char *msg = *(sys_siglist + 1);
3664 ; return 0; }
3665 EOF
3666 if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3667   rm -rf conftest*
3668   ac_cv_decl_sys_siglist=yes
3669 else
3670   echo "configure: failed program was:" >&5
3671   cat conftest.$ac_ext >&5
3672   rm -rf conftest*
3673   ac_cv_decl_sys_siglist=no
3674 fi
3675 rm -f conftest*
3676
3677 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3678 if test $ac_cv_decl_sys_siglist = yes; then
3679   { test "$extra_verbose" = "yes" && cat << \EOF
3680     Defining SYS_SIGLIST_DECLARED
3681 EOF
3682 cat >> confdefs.h <<\EOF
3683 #define SYS_SIGLIST_DECLARED 1
3684 EOF
3685 }
3686
3687 fi
3688
3689
3690 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3691 echo "configure:3692: checking for struct utimbuf" >&5
3692 cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 #ifdef TIME_WITH_SYS_TIME
3696 #include <sys/time.h>
3697 #include <time.h>
3698 #else
3699 #ifdef HAVE_SYS_TIME_H
3700 #include <sys/time.h>
3701 #else
3702 #include <time.h>
3703 #endif
3704 #endif
3705 #ifdef HAVE_UTIME_H
3706 #include <utime.h>
3707 #endif
3708 int main() {
3709 static struct utimbuf x; x.actime = x.modtime;
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   rm -rf conftest*
3714   echo "$ac_t""yes" 1>&6
3715    { test "$extra_verbose" = "yes" && cat << \EOF
3716     Defining HAVE_STRUCT_UTIMBUF
3717 EOF
3718 cat >> confdefs.h <<\EOF
3719 #define HAVE_STRUCT_UTIMBUF 1
3720 EOF
3721 }
3722
3723 else
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   echo "$ac_t""no" 1>&6
3728 fi
3729 rm -f conftest*
3730
3731 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3732 echo "configure:3733: checking return type of signal handlers" >&5
3733
3734 cat > conftest.$ac_ext <<EOF
3735 #line 3736 "configure"
3736 #include "confdefs.h"
3737 #include <sys/types.h>
3738 #include <signal.h>
3739 #ifdef signal
3740 #undef signal
3741 #endif
3742 #ifdef __cplusplus
3743 extern "C" void (*signal (int, void (*)(int)))(int);
3744 #else
3745 void (*signal ()) ();
3746 #endif
3747
3748 int main() {
3749 int i;
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   ac_cv_type_signal=void
3755 else
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   ac_cv_type_signal=int
3760 fi
3761 rm -f conftest*
3762
3763 echo "$ac_t""$ac_cv_type_signal" 1>&6
3764 { test "$extra_verbose" = "yes" && cat << EOF
3765     Defining RETSIGTYPE = $ac_cv_type_signal
3766 EOF
3767 cat >> confdefs.h <<EOF
3768 #define RETSIGTYPE $ac_cv_type_signal
3769 EOF
3770 }
3771
3772
3773 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3774 echo "configure:3775: checking for size_t" >&5
3775
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <sys/types.h>
3780 #if STDC_HEADERS
3781 #include <stdlib.h>
3782 #include <stddef.h>
3783 #endif
3784 EOF
3785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3786   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3787   rm -rf conftest*
3788   ac_cv_type_size_t=yes
3789 else
3790   rm -rf conftest*
3791   ac_cv_type_size_t=no
3792 fi
3793 rm -f conftest*
3794
3795 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3796 if test $ac_cv_type_size_t = no; then
3797   { test "$extra_verbose" = "yes" && cat << \EOF
3798     Defining size_t = unsigned
3799 EOF
3800 cat >> confdefs.h <<\EOF
3801 #define size_t unsigned
3802 EOF
3803 }
3804
3805 fi
3806
3807 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3808 echo "configure:3809: checking for pid_t" >&5
3809
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 #include <sys/types.h>
3814 #if STDC_HEADERS
3815 #include <stdlib.h>
3816 #include <stddef.h>
3817 #endif
3818 EOF
3819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3820   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3821   rm -rf conftest*
3822   ac_cv_type_pid_t=yes
3823 else
3824   rm -rf conftest*
3825   ac_cv_type_pid_t=no
3826 fi
3827 rm -f conftest*
3828
3829 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3830 if test $ac_cv_type_pid_t = no; then
3831   { test "$extra_verbose" = "yes" && cat << \EOF
3832     Defining pid_t = int
3833 EOF
3834 cat >> confdefs.h <<\EOF
3835 #define pid_t int
3836 EOF
3837 }
3838
3839 fi
3840
3841 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3842 echo "configure:3843: checking for uid_t in sys/types.h" >&5
3843
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <sys/types.h>
3848 EOF
3849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3850   egrep "uid_t" >/dev/null 2>&1; then
3851   rm -rf conftest*
3852   ac_cv_type_uid_t=yes
3853 else
3854   rm -rf conftest*
3855   ac_cv_type_uid_t=no
3856 fi
3857 rm -f conftest*
3858
3859
3860 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3861 if test $ac_cv_type_uid_t = no; then
3862   { test "$extra_verbose" = "yes" && cat << \EOF
3863     Defining uid_t = int
3864 EOF
3865 cat >> confdefs.h <<\EOF
3866 #define uid_t int
3867 EOF
3868 }
3869
3870   { test "$extra_verbose" = "yes" && cat << \EOF
3871     Defining gid_t = int
3872 EOF
3873 cat >> confdefs.h <<\EOF
3874 #define gid_t int
3875 EOF
3876 }
3877
3878 fi
3879
3880 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3881 echo "configure:3882: checking for mode_t" >&5
3882
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <sys/types.h>
3887 #if STDC_HEADERS
3888 #include <stdlib.h>
3889 #include <stddef.h>
3890 #endif
3891 EOF
3892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3893   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3894   rm -rf conftest*
3895   ac_cv_type_mode_t=yes
3896 else
3897   rm -rf conftest*
3898   ac_cv_type_mode_t=no
3899 fi
3900 rm -f conftest*
3901
3902 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3903 if test $ac_cv_type_mode_t = no; then
3904   { test "$extra_verbose" = "yes" && cat << \EOF
3905     Defining mode_t = int
3906 EOF
3907 cat >> confdefs.h <<\EOF
3908 #define mode_t int
3909 EOF
3910 }
3911
3912 fi
3913
3914 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3915 echo "configure:3916: checking for off_t" >&5
3916
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <sys/types.h>
3921 #if STDC_HEADERS
3922 #include <stdlib.h>
3923 #include <stddef.h>
3924 #endif
3925 EOF
3926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3927   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3928   rm -rf conftest*
3929   ac_cv_type_off_t=yes
3930 else
3931   rm -rf conftest*
3932   ac_cv_type_off_t=no
3933 fi
3934 rm -f conftest*
3935
3936 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3937 if test $ac_cv_type_off_t = no; then
3938   { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining off_t = long
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define off_t long
3943 EOF
3944 }
3945
3946 fi
3947
3948 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3949 echo "configure:3950: checking for ssize_t" >&5
3950
3951 cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <sys/types.h>
3955 #if STDC_HEADERS
3956 #include <stdlib.h>
3957 #include <stddef.h>
3958 #endif
3959 EOF
3960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3962   rm -rf conftest*
3963   ac_cv_type_ssize_t=yes
3964 else
3965   rm -rf conftest*
3966   ac_cv_type_ssize_t=no
3967 fi
3968 rm -f conftest*
3969
3970 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3971 if test $ac_cv_type_ssize_t = no; then
3972   { test "$extra_verbose" = "yes" && cat << \EOF
3973     Defining ssize_t = int
3974 EOF
3975 cat >> confdefs.h <<\EOF
3976 #define ssize_t int
3977 EOF
3978 }
3979
3980 fi
3981
3982
3983 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3984 echo "configure:3985: checking for socklen_t" >&5
3985 cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 #include <sys/socket.h>
3989 socklen_t x;
3990
3991 int main() {
3992
3993 ; return 0; }
3994 EOF
3995 if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3996   rm -rf conftest*
3997   echo "$ac_t""yes" 1>&6
3998 else
3999   echo "configure: failed program was:" >&5
4000   cat conftest.$ac_ext >&5
4001   rm -rf conftest*
4002   
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <sys/socket.h>
4007 int accept (int, struct sockaddr *, size_t *);
4008
4009 int main() {
4010
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014   rm -rf conftest*
4015   
4016 echo "$ac_t""size_t" 1>&6
4017 { test "$extra_verbose" = "yes" && cat << \EOF
4018     Defining socklen_t = size_t
4019 EOF
4020 cat >> confdefs.h <<\EOF
4021 #define socklen_t size_t
4022 EOF
4023 }
4024
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   
4030 echo "$ac_t""int" 1>&6
4031 { test "$extra_verbose" = "yes" && cat << \EOF
4032     Defining socklen_t = int
4033 EOF
4034 cat >> confdefs.h <<\EOF
4035 #define socklen_t int
4036 EOF
4037 }
4038
4039 fi
4040 rm -f conftest*
4041 fi
4042 rm -f conftest*
4043
4044 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4045 echo "configure:4046: checking for struct timeval" >&5
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #ifdef TIME_WITH_SYS_TIME
4050 #include <sys/time.h>
4051 #include <time.h>
4052 #else
4053 #ifdef HAVE_SYS_TIME_H
4054 #include <sys/time.h>
4055 #else
4056 #include <time.h>
4057 #endif
4058 #endif
4059 int main() {
4060 static struct timeval x; x.tv_sec = x.tv_usec;
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4064   rm -rf conftest*
4065   echo "$ac_t""yes" 1>&6
4066   HAVE_TIMEVAL=yes
4067   { test "$extra_verbose" = "yes" && cat << \EOF
4068     Defining HAVE_TIMEVAL
4069 EOF
4070 cat >> confdefs.h <<\EOF
4071 #define HAVE_TIMEVAL 1
4072 EOF
4073 }
4074
4075 else
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   echo "$ac_t""no" 1>&6
4080    HAVE_TIMEVAL=no
4081 fi
4082 rm -f conftest*
4083
4084 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4085 echo "configure:4086: checking whether struct tm is in sys/time.h or time.h" >&5
4086
4087 cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 #include <sys/types.h>
4091 #include <time.h>
4092 int main() {
4093 struct tm *tp; tp->tm_sec;
4094 ; return 0; }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4097   rm -rf conftest*
4098   ac_cv_struct_tm=time.h
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -rf conftest*
4103   ac_cv_struct_tm=sys/time.h
4104 fi
4105 rm -f conftest*
4106
4107 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4108 if test $ac_cv_struct_tm = sys/time.h; then
4109   { test "$extra_verbose" = "yes" && cat << \EOF
4110     Defining TM_IN_SYS_TIME
4111 EOF
4112 cat >> confdefs.h <<\EOF
4113 #define TM_IN_SYS_TIME 1
4114 EOF
4115 }
4116
4117 fi
4118
4119 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4120 echo "configure:4121: checking for tm_zone in struct tm" >&5
4121
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4124 "configure"
4124 #include "confdefs.h"
4125 #include <sys/types.h>
4126 #include <$ac_cv_struct_tm>
4127 int main() {
4128 struct tm tm; tm.tm_zone;
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   rm -rf conftest*
4133   ac_cv_struct_tm_zone=yes
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   ac_cv_struct_tm_zone=no
4139 fi
4140 rm -f conftest*
4141
4142 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4143 if test "$ac_cv_struct_tm_zone" = yes; then
4144   { test "$extra_verbose" = "yes" && cat << \EOF
4145     Defining HAVE_TM_ZONE
4146 EOF
4147 cat >> confdefs.h <<\EOF
4148 #define HAVE_TM_ZONE 1
4149 EOF
4150 }
4151
4152 else
4153   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4154 echo "configure:4155: checking for tzname" >&5
4155
4156 cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 #include <time.h>
4160 #ifndef tzname /* For SGI.  */
4161 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4162 #endif
4163 int main() {
4164 atoi(*tzname);
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4168   rm -rf conftest*
4169   ac_cv_var_tzname=yes
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   ac_cv_var_tzname=no
4175 fi
4176 rm -f conftest*
4177
4178 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4179   if test $ac_cv_var_tzname = yes; then
4180     { test "$extra_verbose" = "yes" && cat << \EOF
4181     Defining HAVE_TZNAME
4182 EOF
4183 cat >> confdefs.h <<\EOF
4184 #define HAVE_TZNAME 1
4185 EOF
4186 }
4187
4188   fi
4189 fi
4190
4191
4192 echo $ac_n "checking for working const""... $ac_c" 1>&6
4193 echo "configure:4194: checking for working const" >&5
4194
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198
4199 int main() {
4200
4201 /* Ultrix mips cc rejects this.  */
4202 typedef int charset[2]; const charset x;
4203 /* SunOS 4.1.1 cc rejects this.  */
4204 char const *const *ccp;
4205 char **p;
4206 /* NEC SVR4.0.2 mips cc rejects this.  */
4207 struct point {int x, y;};
4208 static struct point const zero = {0,0};
4209 /* AIX XL C 1.02.0.0 rejects this.
4210    It does not let you subtract one const X* pointer from another in an arm
4211    of an if-expression whose if-part is not a constant expression */
4212 const char *g = "string";
4213 ccp = &g + (g ? g-g : 0);
4214 /* HPUX 7.0 cc rejects these. */
4215 ++ccp;
4216 p = (char**) ccp;
4217 ccp = (char const *const *) p;
4218 { /* SCO 3.2v4 cc rejects this.  */
4219   char *t;
4220   char const *s = 0 ? (char *) 0 : (char const *) 0;
4221
4222   *t++ = 0;
4223 }
4224 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4225   int x[] = {25, 17};
4226   const int *foo = &x[0];
4227   ++foo;
4228 }
4229 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4230   typedef const int *iptr;
4231   iptr p = 0;
4232   ++p;
4233 }
4234 { /* AIX XL C 1.02.0.0 rejects this saying
4235      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4236   struct s { int j; const int *ap[3]; };
4237   struct s *b; b->j = 5;
4238 }
4239 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4240   const int foo = 10;
4241 }
4242
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4246   rm -rf conftest*
4247   ac_cv_c_const=yes
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   ac_cv_c_const=no
4253 fi
4254 rm -f conftest*
4255
4256 echo "$ac_t""$ac_cv_c_const" 1>&6
4257 if test $ac_cv_c_const = no; then
4258   { test "$extra_verbose" = "yes" && cat << \EOF
4259     Defining const = 
4260 EOF
4261 cat >> confdefs.h <<\EOF
4262 #define const 
4263 EOF
4264 }
4265
4266 fi
4267
4268
4269 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4270 echo "configure:4271: checking whether ${MAKE-make} sets \${MAKE}" >&5
4271 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4272
4273 cat > conftestmake <<\EOF
4274 all:
4275         @echo 'ac_maketemp="${MAKE}"'
4276 EOF
4277 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4278 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4279 if test -n "$ac_maketemp"; then
4280   eval ac_cv_prog_make_${ac_make}_set=yes
4281 else
4282   eval ac_cv_prog_make_${ac_make}_set=no
4283 fi
4284 rm -f conftestmake
4285 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4286   echo "$ac_t""yes" 1>&6
4287   SET_MAKE=
4288 else
4289   echo "$ac_t""no" 1>&6
4290   SET_MAKE="MAKE=${MAKE-make}"
4291 fi
4292
4293
4294 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4295 echo "configure:4296: checking whether byte ordering is bigendian" >&5
4296
4297 ac_cv_c_bigendian=unknown
4298 # See if sys/param.h defines the BYTE_ORDER macro.
4299 cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 #include <sys/types.h>
4303 #include <sys/param.h>
4304 int main() {
4305
4306 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4307  bogus endian macros
4308 #endif
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4312   rm -rf conftest*
4313   # It does; now see whether it defined to BIG_ENDIAN or not.
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <sys/types.h>
4318 #include <sys/param.h>
4319 int main() {
4320
4321 #if BYTE_ORDER != BIG_ENDIAN
4322  not big endian
4323 #endif
4324 ; return 0; }
4325 EOF
4326 if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4327   rm -rf conftest*
4328   ac_cv_c_bigendian=yes
4329 else
4330   echo "configure: failed program was:" >&5
4331   cat conftest.$ac_ext >&5
4332   rm -rf conftest*
4333   ac_cv_c_bigendian=no
4334 fi
4335 rm -f conftest*
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339 fi
4340 rm -f conftest*
4341 if test $ac_cv_c_bigendian = unknown; then
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 main () {
4346   /* Are we little or big endian?  From Harbison&Steele.  */
4347   union
4348   {
4349     long l;
4350     char c[sizeof (long)];
4351   } u;
4352   u.l = 1;
4353   exit (u.c[sizeof (long) - 1] == 1);
4354 }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4357 then
4358   ac_cv_c_bigendian=no
4359 else
4360   conftest_rc="$?"
4361   echo "configure: failed program was:" >&5
4362   cat conftest.$ac_ext >&5
4363   rm -fr conftest*
4364   ac_cv_c_bigendian=yes
4365 fi
4366 rm -fr conftest*
4367 fi
4368
4369 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4370 if test $ac_cv_c_bigendian = yes; then
4371   { test "$extra_verbose" = "yes" && cat << \EOF
4372     Defining WORDS_BIGENDIAN
4373 EOF
4374 cat >> confdefs.h <<\EOF
4375 #define WORDS_BIGENDIAN 1
4376 EOF
4377 }
4378
4379 fi
4380
4381
4382 echo $ac_n "checking size of short""... $ac_c" 1>&6
4383 echo "configure:4384: checking size of short" >&5
4384
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388 #include <stdio.h>
4389 main()
4390 {
4391   FILE *f=fopen("conftestval", "w");
4392   if (!f) exit(1);
4393   fprintf(f, "%d\n", sizeof(short));
4394   exit(0);
4395 }
4396 EOF
4397 if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4398 then
4399   ac_cv_sizeof_short=`cat conftestval`
4400 else
4401   conftest_rc="$?"
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -fr conftest*
4405   ac_cv_sizeof_short=0
4406 fi
4407 rm -fr conftest*
4408 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4409 { test "$extra_verbose" = "yes" && cat << EOF
4410     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4411 EOF
4412 cat >> confdefs.h <<EOF
4413 #define SIZEOF_SHORT $ac_cv_sizeof_short
4414 EOF
4415 }
4416
4417
4418 if test "$ac_cv_sizeof_short" = 0; then
4419   echo ""
4420   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4421   echo "*** PANIC *** Please examine config.log for compilation errors."
4422   exit 1
4423 fi
4424 echo $ac_n "checking size of int""... $ac_c" 1>&6
4425 echo "configure:4426: checking size of int" >&5
4426
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <stdio.h>
4431 main()
4432 {
4433   FILE *f=fopen("conftestval", "w");
4434   if (!f) exit(1);
4435   fprintf(f, "%d\n", sizeof(int));
4436   exit(0);
4437 }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4440 then
4441   ac_cv_sizeof_int=`cat conftestval`
4442 else
4443   conftest_rc="$?"
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -fr conftest*
4447   ac_cv_sizeof_int=0
4448 fi
4449 rm -fr conftest*
4450 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4451 { test "$extra_verbose" = "yes" && cat << EOF
4452     Defining SIZEOF_INT = $ac_cv_sizeof_int
4453 EOF
4454 cat >> confdefs.h <<EOF
4455 #define SIZEOF_INT $ac_cv_sizeof_int
4456 EOF
4457 }
4458
4459
4460 echo $ac_n "checking size of long""... $ac_c" 1>&6
4461 echo "configure:4462: checking size of long" >&5
4462
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 #include <stdio.h>
4467 main()
4468 {
4469   FILE *f=fopen("conftestval", "w");
4470   if (!f) exit(1);
4471   fprintf(f, "%d\n", sizeof(long));
4472   exit(0);
4473 }
4474 EOF
4475 if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4476 then
4477   ac_cv_sizeof_long=`cat conftestval`
4478 else
4479   conftest_rc="$?"
4480   echo "configure: failed program was:" >&5
4481   cat conftest.$ac_ext >&5
4482   rm -fr conftest*
4483   ac_cv_sizeof_long=0
4484 fi
4485 rm -fr conftest*
4486 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4487 { test "$extra_verbose" = "yes" && cat << EOF
4488     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4489 EOF
4490 cat >> confdefs.h <<EOF
4491 #define SIZEOF_LONG $ac_cv_sizeof_long
4492 EOF
4493 }
4494
4495
4496 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4497 echo "configure:4498: checking size of long long" >&5
4498
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 #include <stdio.h>
4503 main()
4504 {
4505   FILE *f=fopen("conftestval", "w");
4506   if (!f) exit(1);
4507   fprintf(f, "%d\n", sizeof(long long));
4508   exit(0);
4509 }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4512 then
4513   ac_cv_sizeof_long_long=`cat conftestval`
4514 else
4515   conftest_rc="$?"
4516   echo "configure: failed program was:" >&5
4517   cat conftest.$ac_ext >&5
4518   rm -fr conftest*
4519   ac_cv_sizeof_long_long=0
4520 fi
4521 rm -fr conftest*
4522 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4523 { test "$extra_verbose" = "yes" && cat << EOF
4524     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4525 EOF
4526 cat >> confdefs.h <<EOF
4527 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4528 EOF
4529 }
4530
4531
4532 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4533 echo "configure:4534: checking size of void *" >&5
4534
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 #include <stdio.h>
4539 main()
4540 {
4541   FILE *f=fopen("conftestval", "w");
4542   if (!f) exit(1);
4543   fprintf(f, "%d\n", sizeof(void *));
4544   exit(0);
4545 }
4546 EOF
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4548 then
4549   ac_cv_sizeof_void_p=`cat conftestval`
4550 else
4551   conftest_rc="$?"
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -fr conftest*
4555   ac_cv_sizeof_void_p=0
4556 fi
4557 rm -fr conftest*
4558 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4559 { test "$extra_verbose" = "yes" && cat << EOF
4560     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4561 EOF
4562 cat >> confdefs.h <<EOF
4563 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4564 EOF
4565 }
4566
4567
4568
4569 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4570 echo "configure:4571: checking for long file names" >&5
4571
4572 ac_cv_sys_long_file_names=yes
4573 # Test for long file names in all the places we know might matter:
4574 #      .                the current directory, where building will happen
4575 #      $prefix/lib      where we will be installing things
4576 #      $exec_prefix/lib likewise
4577 # eval it to expand exec_prefix.
4578 #      $TMPDIR          if set, where it might want to write temporary files
4579 # if $TMPDIR is not set:
4580 #      /tmp             where it might want to write temporary files
4581 #      /var/tmp         likewise
4582 #      /usr/tmp         likewise
4583 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4584   ac_tmpdirs="$TMPDIR"
4585 else
4586   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4587 fi
4588 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4589   test -d $ac_dir || continue
4590   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4591   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4592   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4593   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4594   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4595     ac_cv_sys_long_file_names=no
4596     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4597     break
4598   fi
4599   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4600 done
4601
4602 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4603 if test $ac_cv_sys_long_file_names = yes; then
4604   { test "$extra_verbose" = "yes" && cat << \EOF
4605     Defining HAVE_LONG_FILE_NAMES
4606 EOF
4607 cat >> confdefs.h <<\EOF
4608 #define HAVE_LONG_FILE_NAMES 1
4609 EOF
4610 }
4611
4612 fi
4613
4614
4615 echo $ac_n "checking for sin""... $ac_c" 1>&6
4616 echo "configure:4617: checking for sin" >&5
4617
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 /* System header to define __stub macros and hopefully few prototypes,
4622     which can conflict with char sin(); below.  */
4623 #include <assert.h>
4624 /* Override any gcc2 internal prototype to avoid an error.  */
4625 /* We use char because int might match the return type of a gcc2
4626     builtin and then its argument prototype would still apply.  */
4627 char sin();
4628
4629 int main() {
4630
4631 /* The GNU C library defines this for functions which it implements
4632     to always fail with ENOSYS.  Some functions are actually named
4633     something starting with __ and the normal name is an alias.  */
4634 #if defined (__stub_sin) || defined (__stub___sin)
4635 choke me
4636 #else
4637 sin();
4638 #endif
4639
4640 ; return 0; }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4643   rm -rf conftest*
4644   eval "ac_cv_func_sin=yes"
4645 else
4646   echo "configure: failed program was:" >&5
4647   cat conftest.$ac_ext >&5
4648   rm -rf conftest*
4649   eval "ac_cv_func_sin=no"
4650 fi
4651 rm -f conftest*
4652
4653 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655   :
4656 else
4657   echo "$ac_t""no" 1>&6
4658
4659 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4660 echo "configure:4661: checking for sin in -lm" >&5
4661 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4662
4663 xe_check_libs=" -lm "
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667 /* Override any gcc2 internal prototype to avoid an error.  */
4668 /* We use char because int might match the return type of a gcc2
4669     builtin and then its argument prototype would still apply.  */
4670 char sin();
4671
4672 int main() {
4673 sin()
4674 ; return 0; }
4675 EOF
4676 if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4677   rm -rf conftest*
4678   eval "ac_cv_lib_$ac_lib_var=yes"
4679 else
4680   echo "configure: failed program was:" >&5
4681   cat conftest.$ac_ext >&5
4682   rm -rf conftest*
4683   eval "ac_cv_lib_$ac_lib_var=no"
4684 fi
4685 rm -f conftest*
4686 xe_check_libs=""
4687
4688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4689   echo "$ac_t""yes" 1>&6
4690     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4691     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4692   { test "$extra_verbose" = "yes" && cat << EOF
4693     Defining $ac_tr_lib
4694 EOF
4695 cat >> confdefs.h <<EOF
4696 #define $ac_tr_lib 1
4697 EOF
4698 }
4699
4700   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4701
4702 else
4703   echo "$ac_t""no" 1>&6
4704 fi
4705
4706
4707 fi
4708
4709
4710 { test "$extra_verbose" = "yes" && cat << \EOF
4711     Defining LISP_FLOAT_TYPE
4712 EOF
4713 cat >> confdefs.h <<\EOF
4714 #define LISP_FLOAT_TYPE 1
4715 EOF
4716 }
4717
4718
4719 cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 #include <math.h>
4723 int main() {
4724 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   { test "$extra_verbose" = "yes" && cat << \EOF
4730     Defining HAVE_INVERSE_HYPERBOLIC
4731 EOF
4732 cat >> confdefs.h <<\EOF
4733 #define HAVE_INVERSE_HYPERBOLIC 1
4734 EOF
4735 }
4736
4737 else
4738   echo "configure: failed program was:" >&5
4739   cat conftest.$ac_ext >&5
4740 fi
4741 rm -f conftest*
4742
4743 echo "checking type of mail spool file locking" 1>&6
4744 echo "configure:4745: checking type of mail spool file locking" >&5
4745 for ac_func in lockf flock
4746 do
4747 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4748 echo "configure:4749: checking for $ac_func" >&5
4749
4750 cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 /* System header to define __stub macros and hopefully few prototypes,
4754     which can conflict with char $ac_func(); below.  */
4755 #include <assert.h>
4756 /* Override any gcc2 internal prototype to avoid an error.  */
4757 /* We use char because int might match the return type of a gcc2
4758     builtin and then its argument prototype would still apply.  */
4759 char $ac_func();
4760
4761 int main() {
4762
4763 /* The GNU C library defines this for functions which it implements
4764     to always fail with ENOSYS.  Some functions are actually named
4765     something starting with __ and the normal name is an alias.  */
4766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4767 choke me
4768 #else
4769 $ac_func();
4770 #endif
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   eval "ac_cv_func_$ac_func=yes"
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   eval "ac_cv_func_$ac_func=no"
4782 fi
4783 rm -f conftest*
4784
4785 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4786   echo "$ac_t""yes" 1>&6
4787     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4788   { test "$extra_verbose" = "yes" && cat << EOF
4789     Defining $ac_tr_func
4790 EOF
4791 cat >> confdefs.h <<EOF
4792 #define $ac_tr_func 1
4793 EOF
4794 }
4795  
4796 else
4797   echo "$ac_t""no" 1>&6
4798 fi
4799 done
4800
4801 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4802 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4803 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4804 if   test -z "$mail_locking"; then
4805   case "$opsys" in cygwin* | mingw*)
4806     mail_locking=pop ;;
4807   esac
4808 fi
4809
4810 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4811     Defining MAIL_LOCK_LOCKF
4812 EOF
4813 cat >> confdefs.h <<\EOF
4814 #define MAIL_LOCK_LOCKF 1
4815 EOF
4816 }
4817
4818 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4819     Defining MAIL_LOCK_FLOCK
4820 EOF
4821 cat >> confdefs.h <<\EOF
4822 #define MAIL_LOCK_FLOCK 1
4823 EOF
4824 }
4825
4826 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4827     Defining MAIL_LOCK_LOCKING
4828 EOF
4829 cat >> confdefs.h <<\EOF
4830 #define MAIL_LOCK_LOCKING 1
4831 EOF
4832 }
4833
4834 elif test "$mail_locking" = "pop"; then
4835   with_pop=yes
4836   mail_locking=
4837 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4838     Defining MAIL_LOCK_DOT
4839 EOF
4840 cat >> confdefs.h <<\EOF
4841 #define MAIL_LOCK_DOT 1
4842 EOF
4843 }
4844
4845 fi
4846 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4847   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4848 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4849   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4850 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4851   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4852
4853 case "$opsys" in decosf*)
4854   
4855 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4856 echo "configure:4857: checking for cma_open in -lpthreads" >&5
4857 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4858
4859 xe_check_libs=" -lpthreads "
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 /* We use char because int might match the return type of a gcc2
4865     builtin and then its argument prototype would still apply.  */
4866 char cma_open();
4867
4868 int main() {
4869 cma_open()
4870 ; return 0; }
4871 EOF
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873   rm -rf conftest*
4874   eval "ac_cv_lib_$ac_lib_var=yes"
4875 else
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_lib_$ac_lib_var=no"
4880 fi
4881 rm -f conftest*
4882 xe_check_libs=""
4883
4884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4885   echo "$ac_t""yes" 1>&6
4886     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4887     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4888   { test "$extra_verbose" = "yes" && cat << EOF
4889     Defining $ac_tr_lib
4890 EOF
4891 cat >> confdefs.h <<EOF
4892 #define $ac_tr_lib 1
4893 EOF
4894 }
4895
4896   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4897
4898 else
4899   echo "$ac_t""no" 1>&6
4900 fi
4901
4902
4903   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4904     c_switch_site="$c_switch_site -threads" ;;
4905 esac
4906
4907 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4908 echo "configure:4909: checking whether the -xildoff compiler flag is required" >&5
4909 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4910   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4911     then echo "$ac_t""no" 1>&6;
4912     else echo "$ac_t""yes" 1>&6; ld_switch_site="$ld_switch_site -xildoff" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-xildoff\" to \$ld_switch_site"; fi
4913   fi
4914   else echo "$ac_t""no" 1>&6
4915 fi
4916
4917 if test "$opsys" = "sol2"; then
4918   if test "$os_release" -ge 56; then
4919     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4920 echo "configure:4921: checking for \"-z ignore\" linker flag" >&5
4921     case "`ld -h 2>&1`" in
4922       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4923         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4924       *) echo "$ac_t""no" 1>&6 ;;
4925     esac
4926   fi
4927 fi
4928
4929
4930 echo "checking "for specified window system"" 1>&6
4931 echo "configure:4932: checking "for specified window system"" >&5
4932
4933 if test "$with_x11" != "no"; then
4934     test "$x_includes $x_libraries" != "NONE NONE" && \
4935    window_system=x11 with_x11=yes
4936
4937         
4938       if test "$x_includes $x_libraries" = "NONE NONE" \
4939     -a -n "$OPENWINHOME" \
4940     -a "$OPENWINHOME" != "/usr/openwin" \
4941     -a -d "$OPENWINHOME"; then
4942       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4943       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4944       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4945   fi
4946
4947   if test "$x_includes" = "NONE"; then
4948                     for dir in "/usr/X11" "/usr/X11R6"; do
4949       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4950     done
4951   fi
4952
4953   if test "$x_libraries" = "NONE"; then
4954     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4955       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4956     done
4957   fi
4958
4959   # If we find X, set shell vars x_includes and x_libraries to the
4960 # paths, otherwise set no_x=yes.
4961 # Uses ac_ vars as temps to allow command line to override cache and checks.
4962 # --without-x overrides everything else, but does not touch the cache.
4963 echo $ac_n "checking for X""... $ac_c" 1>&6
4964 echo "configure:4965: checking for X" >&5
4965
4966 # Check whether --with-x or --without-x was given.
4967 if test "${with_x+set}" = set; then
4968   withval="$with_x"
4969   :
4970 fi
4971
4972 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4973 if test "x$with_x" = xno; then
4974   # The user explicitly disabled X.
4975   have_x=disabled
4976 else
4977   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4978     # Both variables are already set.
4979     have_x=yes
4980   else
4981
4982 # One or both of the vars are not set, and there is no cached value.
4983 ac_x_includes=NO ac_x_libraries=NO
4984 rm -fr conftestdir
4985 if mkdir conftestdir; then
4986   cd conftestdir
4987   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4988   cat > Imakefile <<'EOF'
4989 acfindx:
4990         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4991 EOF
4992   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4993     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4994     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4995     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4996     for ac_extension in a so sl; do
4997       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4998         test -f $ac_im_libdir/libX11.$ac_extension; then
4999         ac_im_usrlibdir=$ac_im_libdir; break
5000       fi
5001     done
5002     # Screen out bogus values from the imake configuration.  They are
5003     # bogus both because they are the default anyway, and because
5004     # using them would break gcc on systems where it needs fixed includes.
5005     case "$ac_im_incroot" in
5006         /usr/include) ;;
5007         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5008     esac
5009     case "$ac_im_usrlibdir" in
5010         /usr/lib | /lib) ;;
5011         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5012     esac
5013   fi
5014   cd ..
5015   rm -fr conftestdir
5016 fi
5017
5018 if test "$ac_x_includes" = NO; then
5019   # Guess where to find include files, by looking for this one X11 .h file.
5020   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5021
5022   # First, try using that file with no special directory specified.
5023 cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5026 #include <$x_direct_test_include>
5027 EOF
5028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5029 { (eval echo configure:5030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5031 if test -z "$ac_err"; then
5032   rm -rf conftest*
5033   # We can compile using X headers with no special include directory.
5034 ac_x_includes=
5035 else
5036   echo "$ac_err" >&5
5037   echo "configure: failed program was:" >&5
5038   cat conftest.$ac_ext >&5
5039   rm -rf conftest*
5040   # Look for the header file in a standard set of common directories.
5041 # Check X11 before X11Rn because it is often a symlink to the current release.
5042   for ac_dir in               \
5043     /usr/X11/include          \
5044     /usr/X11R6/include        \
5045     /usr/X11R5/include        \
5046     /usr/X11R4/include        \
5047                               \
5048     /usr/include/X11          \
5049     /usr/include/X11R6        \
5050     /usr/include/X11R5        \
5051     /usr/include/X11R4        \
5052                               \
5053     /usr/local/X11/include    \
5054     /usr/local/X11R6/include  \
5055     /usr/local/X11R5/include  \
5056     /usr/local/X11R4/include  \
5057                               \
5058     /usr/local/include/X11    \
5059     /usr/local/include/X11R6  \
5060     /usr/local/include/X11R5  \
5061     /usr/local/include/X11R4  \
5062                               \
5063     /usr/X386/include         \
5064     /usr/x386/include         \
5065     /usr/XFree86/include/X11  \
5066                               \
5067     /usr/include              \
5068     /usr/local/include        \
5069     /usr/unsupported/include  \
5070     /usr/athena/include       \
5071     /usr/local/x11r5/include  \
5072     /usr/lpp/Xamples/include  \
5073                               \
5074     /usr/openwin/include      \
5075     /usr/openwin/share/include \
5076     ; \
5077   do
5078     if test -r "$ac_dir/$x_direct_test_include"; then
5079       ac_x_includes=$ac_dir
5080       break
5081     fi
5082   done
5083 fi
5084 rm -f conftest*
5085 fi # $ac_x_includes = NO
5086
5087 if test "$ac_x_libraries" = NO; then
5088   # Check for the libraries.
5089
5090   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5091   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5092
5093   # See if we find them without any special options.
5094   # Don't add to $LIBS permanently.
5095   ac_save_LIBS="$LIBS"
5096   LIBS="-l$x_direct_test_library $LIBS"
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100
5101 int main() {
5102 ${x_direct_test_function}()
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   LIBS="$ac_save_LIBS"
5108 # We can link X programs with no special library path.
5109 ac_x_libraries=
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113   rm -rf conftest*
5114   LIBS="$ac_save_LIBS"
5115 # First see if replacing the include by lib works.
5116 # Check X11 before X11Rn because it is often a symlink to the current release.
5117 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5118     /usr/X11/lib          \
5119     /usr/X11R6/lib        \
5120     /usr/X11R5/lib        \
5121     /usr/X11R4/lib        \
5122                           \
5123     /usr/lib/X11          \
5124     /usr/lib/X11R6        \
5125     /usr/lib/X11R5        \
5126     /usr/lib/X11R4        \
5127                           \
5128     /usr/local/X11/lib    \
5129     /usr/local/X11R6/lib  \
5130     /usr/local/X11R5/lib  \
5131     /usr/local/X11R4/lib  \
5132                           \
5133     /usr/local/lib/X11    \
5134     /usr/local/lib/X11R6  \
5135     /usr/local/lib/X11R5  \
5136     /usr/local/lib/X11R4  \
5137                           \
5138     /usr/X386/lib         \
5139     /usr/x386/lib         \
5140     /usr/XFree86/lib/X11  \
5141                           \
5142     /usr/lib              \
5143     /usr/local/lib        \
5144     /usr/unsupported/lib  \
5145     /usr/athena/lib       \
5146     /usr/local/x11r5/lib  \
5147     /usr/lpp/Xamples/lib  \
5148     /lib/usr/lib/X11      \
5149                           \
5150     /usr/openwin/lib      \
5151     /usr/openwin/share/lib \
5152     ; \
5153 do
5154   for ac_extension in a so sl; do
5155     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5156       ac_x_libraries=$ac_dir
5157       break 2
5158     fi
5159   done
5160 done
5161 fi
5162 rm -f conftest*
5163 fi # $ac_x_libraries = NO
5164
5165 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5166   # Didn't find X anywhere.  Cache the known absence of X.
5167   ac_cv_have_x="have_x=no"
5168 else
5169   # Record where we found X for the cache.
5170   ac_cv_have_x="have_x=yes \
5171                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5172 fi
5173   fi
5174   eval "$ac_cv_have_x"
5175 fi # $with_x != no
5176
5177 if test "$have_x" != yes; then
5178   echo "$ac_t""$have_x" 1>&6
5179   no_x=yes
5180 else
5181   # If each of the values was on the command line, it overrides each guess.
5182   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5183   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5184   # Update the cache value to reflect the command line values.
5185   ac_cv_have_x="have_x=yes \
5186                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5187   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5188 fi
5189
5190 if test "$no_x" = yes; then
5191   # Not all programs may use this symbol, but it does not hurt to define it.
5192   { test "$extra_verbose" = "yes" && cat << \EOF
5193     Defining X_DISPLAY_MISSING
5194 EOF
5195 cat >> confdefs.h <<\EOF
5196 #define X_DISPLAY_MISSING 1
5197 EOF
5198 }
5199
5200   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5201 else
5202   if test -n "$x_includes"; then
5203     X_CFLAGS="$X_CFLAGS -I$x_includes"
5204   fi
5205
5206   # It would also be nice to do this for all -L options, not just this one.
5207   if test -n "$x_libraries"; then
5208     X_LIBS="$X_LIBS -L$x_libraries"
5209     # For Solaris; some versions of Sun CC require a space after -R and
5210     # others require no space.  Words are not sufficient . . . .
5211     case "`(uname -sr) 2>/dev/null`" in
5212     "SunOS 5"*)
5213       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5214 echo "configure:5215: checking whether -R must be followed by a space" >&5
5215       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5216       cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219
5220 int main() {
5221
5222 ; return 0; }
5223 EOF
5224 if { (eval echo configure:5225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5225   rm -rf conftest*
5226   ac_R_nospace=yes
5227 else
5228   echo "configure: failed program was:" >&5
5229   cat conftest.$ac_ext >&5
5230   rm -rf conftest*
5231   ac_R_nospace=no
5232 fi
5233 rm -f conftest*
5234       if test $ac_R_nospace = yes; then
5235         echo "$ac_t""no" 1>&6
5236         X_LIBS="$X_LIBS -R$x_libraries"
5237       else
5238         LIBS="$ac_xsave_LIBS -R $x_libraries"
5239         cat > conftest.$ac_ext <<EOF
5240 #line 5241 "configure"
5241 #include "confdefs.h"
5242
5243 int main() {
5244
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248   rm -rf conftest*
5249   ac_R_space=yes
5250 else
5251   echo "configure: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   rm -rf conftest*
5254   ac_R_space=no
5255 fi
5256 rm -f conftest*
5257         if test $ac_R_space = yes; then
5258           echo "$ac_t""yes" 1>&6
5259           X_LIBS="$X_LIBS -R $x_libraries"
5260         else
5261           echo "$ac_t""neither works" 1>&6
5262         fi
5263       fi
5264       LIBS="$ac_xsave_LIBS"
5265     esac
5266   fi
5267
5268   # Check for system-dependent libraries X programs must link with.
5269   # Do this before checking for the system-independent R6 libraries
5270   # (-lICE), since we may need -lsocket or whatever for X linking.
5271
5272   if test "$ISC" = yes; then
5273     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5274   else
5275     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5276     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5277     # the Alpha needs dnet_stub (dnet does not exist).
5278     if test "$with_dnet" = "no" ; then
5279 ac_cv_lib_dnet_dnet_ntoa=no
5280 else
5281
5282 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5283 echo "configure:5284: checking for dnet_ntoa in -ldnet" >&5
5284 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5285
5286 xe_check_libs=" -ldnet "
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 /* Override any gcc2 internal prototype to avoid an error.  */
5291 /* We use char because int might match the return type of a gcc2
5292     builtin and then its argument prototype would still apply.  */
5293 char dnet_ntoa();
5294
5295 int main() {
5296 dnet_ntoa()
5297 ; return 0; }
5298 EOF
5299 if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5300   rm -rf conftest*
5301   eval "ac_cv_lib_$ac_lib_var=yes"
5302 else
5303   echo "configure: failed program was:" >&5
5304   cat conftest.$ac_ext >&5
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=no"
5307 fi
5308 rm -f conftest*
5309 xe_check_libs=""
5310
5311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5312   echo "$ac_t""yes" 1>&6
5313   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5314 else
5315   echo "$ac_t""no" 1>&6
5316 fi
5317
5318 fi
5319
5320     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5321       
5322 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5323 echo "configure:5324: checking for dnet_ntoa in -ldnet_stub" >&5
5324 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5325
5326 xe_check_libs=" -ldnet_stub "
5327 cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330 /* Override any gcc2 internal prototype to avoid an error.  */
5331 /* We use char because int might match the return type of a gcc2
5332     builtin and then its argument prototype would still apply.  */
5333 char dnet_ntoa();
5334
5335 int main() {
5336 dnet_ntoa()
5337 ; return 0; }
5338 EOF
5339 if { (eval echo configure:5340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5340   rm -rf conftest*
5341   eval "ac_cv_lib_$ac_lib_var=yes"
5342 else
5343   echo "configure: failed program was:" >&5
5344   cat conftest.$ac_ext >&5
5345   rm -rf conftest*
5346   eval "ac_cv_lib_$ac_lib_var=no"
5347 fi
5348 rm -f conftest*
5349 xe_check_libs=""
5350
5351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5352   echo "$ac_t""yes" 1>&6
5353   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5354 else
5355   echo "$ac_t""no" 1>&6
5356 fi
5357
5358
5359     fi
5360
5361     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5362     # to get the SysV transport functions.
5363     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5364     # needs -lnsl.
5365     # The nsl library prevents programs from opening the X display
5366     # on Irix 5.2, according to dickey@clark.net.
5367     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5368 echo "configure:5369: checking for gethostbyname" >&5
5369
5370 cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373 /* System header to define __stub macros and hopefully few prototypes,
5374     which can conflict with char gethostbyname(); below.  */
5375 #include <assert.h>
5376 /* Override any gcc2 internal prototype to avoid an error.  */
5377 /* We use char because int might match the return type of a gcc2
5378     builtin and then its argument prototype would still apply.  */
5379 char gethostbyname();
5380
5381 int main() {
5382
5383 /* The GNU C library defines this for functions which it implements
5384     to always fail with ENOSYS.  Some functions are actually named
5385     something starting with __ and the normal name is an alias.  */
5386 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5387 choke me
5388 #else
5389 gethostbyname();
5390 #endif
5391
5392 ; return 0; }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5395   rm -rf conftest*
5396   eval "ac_cv_func_gethostbyname=yes"
5397 else
5398   echo "configure: failed program was:" >&5
5399   cat conftest.$ac_ext >&5
5400   rm -rf conftest*
5401   eval "ac_cv_func_gethostbyname=no"
5402 fi
5403 rm -f conftest*
5404
5405 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5406   echo "$ac_t""yes" 1>&6
5407   :
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411
5412     if test $ac_cv_func_gethostbyname = no; then
5413       
5414 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5415 echo "configure:5416: checking for gethostbyname in -lnsl" >&5
5416 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5417
5418 xe_check_libs=" -lnsl "
5419 cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 /* Override any gcc2 internal prototype to avoid an error.  */
5423 /* We use char because int might match the return type of a gcc2
5424     builtin and then its argument prototype would still apply.  */
5425 char gethostbyname();
5426
5427 int main() {
5428 gethostbyname()
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5432   rm -rf conftest*
5433   eval "ac_cv_lib_$ac_lib_var=yes"
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   eval "ac_cv_lib_$ac_lib_var=no"
5439 fi
5440 rm -f conftest*
5441 xe_check_libs=""
5442
5443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5444   echo "$ac_t""yes" 1>&6
5445   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449
5450
5451     fi
5452
5453     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5454     # socket/setsockopt and other routines are undefined under SCO ODT
5455     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5456     # on later versions), says simon@lia.di.epfl.ch: it contains
5457     # gethostby* variants that don't use the nameserver (or something).
5458     # -lsocket must be given before -lnsl if both are needed.
5459     # We assume that if connect needs -lnsl, so does gethostbyname.
5460     echo $ac_n "checking for connect""... $ac_c" 1>&6
5461 echo "configure:5462: checking for connect" >&5
5462
5463 cat > conftest.$ac_ext <<EOF
5464 #line 5465 "configure"
5465 #include "confdefs.h"
5466 /* System header to define __stub macros and hopefully few prototypes,
5467     which can conflict with char connect(); below.  */
5468 #include <assert.h>
5469 /* Override any gcc2 internal prototype to avoid an error.  */
5470 /* We use char because int might match the return type of a gcc2
5471     builtin and then its argument prototype would still apply.  */
5472 char connect();
5473
5474 int main() {
5475
5476 /* The GNU C library defines this for functions which it implements
5477     to always fail with ENOSYS.  Some functions are actually named
5478     something starting with __ and the normal name is an alias.  */
5479 #if defined (__stub_connect) || defined (__stub___connect)
5480 choke me
5481 #else
5482 connect();
5483 #endif
5484
5485 ; return 0; }
5486 EOF
5487 if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5488   rm -rf conftest*
5489   eval "ac_cv_func_connect=yes"
5490 else
5491   echo "configure: failed program was:" >&5
5492   cat conftest.$ac_ext >&5
5493   rm -rf conftest*
5494   eval "ac_cv_func_connect=no"
5495 fi
5496 rm -f conftest*
5497
5498 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5499   echo "$ac_t""yes" 1>&6
5500   :
5501 else
5502   echo "$ac_t""no" 1>&6
5503 fi
5504
5505     if test $ac_cv_func_connect = no; then
5506       
5507 xe_msg_checking="for connect in -lsocket"
5508 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5509 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5510 echo "configure:5511: checking "$xe_msg_checking"" >&5
5511 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5512
5513 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5514 cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 /* We use char because int might match the return type of a gcc2
5519     builtin and then its argument prototype would still apply.  */
5520 char connect();
5521
5522 int main() {
5523 connect()
5524 ; return 0; }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5527   rm -rf conftest*
5528   eval "ac_cv_lib_$ac_lib_var=yes"
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -rf conftest*
5533   eval "ac_cv_lib_$ac_lib_var=no"
5534 fi
5535 rm -f conftest*
5536 xe_check_libs=""
5537
5538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5539   echo "$ac_t""yes" 1>&6
5540   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5541 else
5542   echo "$ac_t""no" 1>&6
5543 fi
5544
5545
5546     fi
5547
5548     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5549     echo $ac_n "checking for remove""... $ac_c" 1>&6
5550 echo "configure:5551: checking for remove" >&5
5551
5552 cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 /* System header to define __stub macros and hopefully few prototypes,
5556     which can conflict with char remove(); below.  */
5557 #include <assert.h>
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char remove();
5562
5563 int main() {
5564
5565 /* The GNU C library defines this for functions which it implements
5566     to always fail with ENOSYS.  Some functions are actually named
5567     something starting with __ and the normal name is an alias.  */
5568 #if defined (__stub_remove) || defined (__stub___remove)
5569 choke me
5570 #else
5571 remove();
5572 #endif
5573
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5577   rm -rf conftest*
5578   eval "ac_cv_func_remove=yes"
5579 else
5580   echo "configure: failed program was:" >&5
5581   cat conftest.$ac_ext >&5
5582   rm -rf conftest*
5583   eval "ac_cv_func_remove=no"
5584 fi
5585 rm -f conftest*
5586
5587 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5588   echo "$ac_t""yes" 1>&6
5589   :
5590 else
5591   echo "$ac_t""no" 1>&6
5592 fi
5593
5594     if test $ac_cv_func_remove = no; then
5595       
5596 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5597 echo "configure:5598: checking for remove in -lposix" >&5
5598 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5599
5600 xe_check_libs=" -lposix "
5601 cat > conftest.$ac_ext <<EOF
5602 #line 5603 "configure"
5603 #include "confdefs.h"
5604 /* Override any gcc2 internal prototype to avoid an error.  */
5605 /* We use char because int might match the return type of a gcc2
5606     builtin and then its argument prototype would still apply.  */
5607 char remove();
5608
5609 int main() {
5610 remove()
5611 ; return 0; }
5612 EOF
5613 if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5614   rm -rf conftest*
5615   eval "ac_cv_lib_$ac_lib_var=yes"
5616 else
5617   echo "configure: failed program was:" >&5
5618   cat conftest.$ac_ext >&5
5619   rm -rf conftest*
5620   eval "ac_cv_lib_$ac_lib_var=no"
5621 fi
5622 rm -f conftest*
5623 xe_check_libs=""
5624
5625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5626   echo "$ac_t""yes" 1>&6
5627   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5628 else
5629   echo "$ac_t""no" 1>&6
5630 fi
5631
5632
5633     fi
5634
5635     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5636     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5637 echo "configure:5638: checking for shmat" >&5
5638
5639 cat > conftest.$ac_ext <<EOF
5640 #line 5641 "configure"
5641 #include "confdefs.h"
5642 /* System header to define __stub macros and hopefully few prototypes,
5643     which can conflict with char shmat(); below.  */
5644 #include <assert.h>
5645 /* Override any gcc2 internal prototype to avoid an error.  */
5646 /* We use char because int might match the return type of a gcc2
5647     builtin and then its argument prototype would still apply.  */
5648 char shmat();
5649
5650 int main() {
5651
5652 /* The GNU C library defines this for functions which it implements
5653     to always fail with ENOSYS.  Some functions are actually named
5654     something starting with __ and the normal name is an alias.  */
5655 #if defined (__stub_shmat) || defined (__stub___shmat)
5656 choke me
5657 #else
5658 shmat();
5659 #endif
5660
5661 ; return 0; }
5662 EOF
5663 if { (eval echo configure:5664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5664   rm -rf conftest*
5665   eval "ac_cv_func_shmat=yes"
5666 else
5667   echo "configure: failed program was:" >&5
5668   cat conftest.$ac_ext >&5
5669   rm -rf conftest*
5670   eval "ac_cv_func_shmat=no"
5671 fi
5672 rm -f conftest*
5673
5674 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676   :
5677 else
5678   echo "$ac_t""no" 1>&6
5679 fi
5680
5681     if test $ac_cv_func_shmat = no; then
5682       
5683 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5684 echo "configure:5685: checking for shmat in -lipc" >&5
5685 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5686
5687 xe_check_libs=" -lipc "
5688 cat > conftest.$ac_ext <<EOF
5689 #line 5690 "configure"
5690 #include "confdefs.h"
5691 /* Override any gcc2 internal prototype to avoid an error.  */
5692 /* We use char because int might match the return type of a gcc2
5693     builtin and then its argument prototype would still apply.  */
5694 char shmat();
5695
5696 int main() {
5697 shmat()
5698 ; return 0; }
5699 EOF
5700 if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5701   rm -rf conftest*
5702   eval "ac_cv_lib_$ac_lib_var=yes"
5703 else
5704   echo "configure: failed program was:" >&5
5705   cat conftest.$ac_ext >&5
5706   rm -rf conftest*
5707   eval "ac_cv_lib_$ac_lib_var=no"
5708 fi
5709 rm -f conftest*
5710 xe_check_libs=""
5711
5712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5713   echo "$ac_t""yes" 1>&6
5714   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5715 else
5716   echo "$ac_t""no" 1>&6
5717 fi
5718
5719
5720     fi
5721   fi
5722
5723   # Check for libraries that X11R6 Xt/Xaw programs need.
5724   ac_save_LDFLAGS="$LDFLAGS"
5725   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5726   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5727   # check for ICE first), but we must link in the order -lSM -lICE or
5728   # we get undefined symbols.  So assume we have SM if we have ICE.
5729   # These have to be linked with before -lX11, unlike the other
5730   # libraries we check for below, so use a different variable.
5731   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5732   
5733 xe_msg_checking="for IceConnectionNumber in -lICE"
5734 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5735 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5736 echo "configure:5737: checking "$xe_msg_checking"" >&5
5737 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5738
5739 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5740 cat > conftest.$ac_ext <<EOF
5741 #line 5742 "configure"
5742 #include "confdefs.h"
5743 /* Override any gcc2 internal prototype to avoid an error.  */
5744 /* We use char because int might match the return type of a gcc2
5745     builtin and then its argument prototype would still apply.  */
5746 char IceConnectionNumber();
5747
5748 int main() {
5749 IceConnectionNumber()
5750 ; return 0; }
5751 EOF
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753   rm -rf conftest*
5754   eval "ac_cv_lib_$ac_lib_var=yes"
5755 else
5756   echo "configure: failed program was:" >&5
5757   cat conftest.$ac_ext >&5
5758   rm -rf conftest*
5759   eval "ac_cv_lib_$ac_lib_var=no"
5760 fi
5761 rm -f conftest*
5762 xe_check_libs=""
5763
5764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5765   echo "$ac_t""yes" 1>&6
5766   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5767 else
5768   echo "$ac_t""no" 1>&6
5769 fi
5770
5771
5772   LDFLAGS="$ac_save_LDFLAGS"
5773
5774 fi
5775  # Autoconf claims to find X library and include dirs for us.
5776   if test "$no_x" = "yes"
5777   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5778   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5779   fi
5780 fi
5781
5782 case "$with_x11" in
5783   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5784   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5785 esac
5786
5787 if test "$with_x11" = "yes"; then
5788   { test "$extra_verbose" = "yes" && cat << \EOF
5789     Defining HAVE_X_WINDOWS
5790 EOF
5791 cat >> confdefs.h <<\EOF
5792 #define HAVE_X_WINDOWS 1
5793 EOF
5794 }
5795
5796   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5797   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5798
5799       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5800     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5801     if test -d "$lib_dir" -a -d "$inc_dir"; then
5802       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5803         x_libraries="$lib_dir $x_libraries"
5804         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5805       esac
5806       case "$x_includes" in "$inc_dir"* ) ;; *)
5807         x_includes="$inc_dir $x_includes"
5808         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5809       esac
5810       break;       fi
5811   done
5812
5813     for rel in "X11R6" "X11R5" "X11R4"; do
5814     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5815     if test -d "$lib_dir" -a -d "$inc_dir"; then
5816       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5817         x_libraries="$x_libraries $lib_dir"
5818         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5819       esac
5820       case "$x_includes" in "$inc_dir"* ) ;; *)
5821         x_includes="$x_includes $inc_dir"
5822         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5823       esac
5824       break;     fi
5825   done
5826
5827     case "$opsys" in
5828   decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
5829   esac
5830
5831   ld_switch_x_site="$X_LIBS"
5832
5833   
5834 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5835     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5836   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5837   
5838         runpath="" runpath_dirs=""
5839   if test -n "$LD_RUN_PATH"; then
5840     runpath="$LD_RUN_PATH"
5841   elif test "$GCC" = "yes"; then
5842         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5843     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5844     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5845     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5846       case "$arg" in P,* | -L* | -R* )
5847         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5848           {
5849 xe_runpath_dir="$dir"
5850   test "$xe_runpath_dir" != "/lib"     -a \
5851         "$xe_runpath_dir" != "/usr/lib" -a \
5852         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5853   eval "$xe_add_unique_runpath_dir"
5854 }
5855         done ;;
5856       esac
5857     done
5858     ld_switch_run="$ld_switch_run_save"
5859     rm -f conftest*
5860   else
5861         for arg in $ld_switch_site $ld_switch_x_site; do
5862       case "$arg" in -L*) {
5863 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5864   test "$xe_runpath_dir" != "/lib"     -a \
5865         "$xe_runpath_dir" != "/usr/lib" -a \
5866         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5867   eval "$xe_add_unique_runpath_dir"
5868 };; esac
5869     done
5870         if test "$opsys $need_motif" = "sol2 yes"; then
5871       xe_runpath_dir="/opt/SUNWdt/lib";
5872       eval "$xe_add_unique_runpath_dir";
5873     fi
5874   fi 
5875   if test -n "$runpath"; then
5876     ld_switch_run="${dash_r}${runpath}"
5877     
5878 if test "$GCC" = "yes"; then
5879   set x $ld_switch_run; shift; ld_switch_run=""
5880   while test -n "$1"; do
5881     case $1 in
5882       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5883       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5884       -Xlinker* ) ;;
5885       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5886     esac
5887     shift
5888   done
5889 fi
5890     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5891   fi
5892 fi
5893
5894
5895   if test "$extra_verbose" = "yes"; then
5896     echo; echo "X11 compilation variables:"
5897     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5898     echo
5899   fi
5900
5901             bitmapdirs=
5902   if test "$x_includes" != NONE; then
5903     for i in $x_includes; do
5904       if test -d "$i/bitmaps"; then
5905         bitmapdirs="$i/bitmaps:$bitmapdirs"
5906       fi
5907       if test -d "$i/X11/bitmaps"; then
5908         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5909       fi
5910     done
5911     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5912   fi
5913   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5914     Defining BITMAPDIR = "$bitmapdirs"
5915 EOF
5916 cat >> confdefs.h <<EOF
5917 #define BITMAPDIR "$bitmapdirs"
5918 EOF
5919 }
5920
5921
5922     echo "checking for X defines extracted by xmkmf" 1>&6
5923 echo "configure:5924: checking for X defines extracted by xmkmf" >&5
5924   rm -fr conftestdir
5925   if mkdir conftestdir; then
5926     cd conftestdir
5927     cat > Imakefile <<'EOF'
5928 xetest:
5929         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5930 EOF
5931     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5932       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5933       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5934     fi
5935     cd ..
5936     rm -fr conftestdir
5937     for word in $xmkmf_defines; do
5938       case "$word" in -D* )
5939         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5940         case "$word" in
5941           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5942           *     ) val=1 ;;
5943         esac
5944         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5945           if test "$val" = "1"
5946             then { test "$extra_verbose" = "yes" && cat << EOF
5947     Defining $sym
5948 EOF
5949 cat >> confdefs.h <<EOF
5950 #define $sym 1
5951 EOF
5952 }
5953
5954             else { test "$extra_verbose" = "yes" && cat << EOF
5955     Defining $sym = $val
5956 EOF
5957 cat >> confdefs.h <<EOF
5958 #define $sym $val
5959 EOF
5960 }
5961
5962           fi
5963         fi  ;;
5964       esac
5965     done
5966   fi
5967
5968     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5969 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5970 echo "configure:5971: checking for X11/Intrinsic.h" >&5
5971
5972 cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 #include <X11/Intrinsic.h>
5976 EOF
5977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5978 { (eval echo configure:5979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5980 if test -z "$ac_err"; then
5981   rm -rf conftest*
5982   eval "ac_cv_header_$ac_safe=yes"
5983 else
5984   echo "$ac_err" >&5
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -rf conftest*
5988   eval "ac_cv_header_$ac_safe=no"
5989 fi
5990 rm -f conftest*
5991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5992   echo "$ac_t""yes" 1>&6
5993   :
5994 else
5995   echo "$ac_t""no" 1>&6
5996 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5997 fi
5998
5999
6000       
6001 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6002 echo "configure:6003: checking for XOpenDisplay in -lX11" >&5
6003 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6004
6005 xe_check_libs=" -lX11 "
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 /* Override any gcc2 internal prototype to avoid an error.  */
6010 /* We use char because int might match the return type of a gcc2
6011     builtin and then its argument prototype would still apply.  */
6012 char XOpenDisplay();
6013
6014 int main() {
6015 XOpenDisplay()
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_lib_$ac_lib_var=no"
6026 fi
6027 rm -f conftest*
6028 xe_check_libs=""
6029
6030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6031   echo "$ac_t""yes" 1>&6
6032   have_lib_x11=yes
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036
6037
6038   if test "$have_lib_x11" != "yes"; then
6039     
6040 xe_msg_checking="for XGetFontProperty in -lX11"
6041 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6042 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6043 echo "configure:6044: checking "$xe_msg_checking"" >&5
6044 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6045
6046 xe_check_libs=" -lX11 -b i486-linuxaout"
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char XGetFontProperty();
6054
6055 int main() {
6056 XGetFontProperty()
6057 ; return 0; }
6058 EOF
6059 if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6060   rm -rf conftest*
6061   eval "ac_cv_lib_$ac_lib_var=yes"
6062 else
6063   echo "configure: failed program was:" >&5
6064   cat conftest.$ac_ext >&5
6065   rm -rf conftest*
6066   eval "ac_cv_lib_$ac_lib_var=no"
6067 fi
6068 rm -f conftest*
6069 xe_check_libs=""
6070
6071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6072   echo "$ac_t""yes" 1>&6
6073   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6074 else
6075   echo "$ac_t""no" 1>&6
6076 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6077 fi
6078
6079
6080   fi
6081   libs_x="-lX11"
6082   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6083
6084     
6085 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6086 echo "configure:6087: checking for XShapeSelectInput in -lXext" >&5
6087 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6088
6089 xe_check_libs=" -lXext "
6090 cat > conftest.$ac_ext <<EOF
6091 #line 6092 "configure"
6092 #include "confdefs.h"
6093 /* Override any gcc2 internal prototype to avoid an error.  */
6094 /* We use char because int might match the return type of a gcc2
6095     builtin and then its argument prototype would still apply.  */
6096 char XShapeSelectInput();
6097
6098 int main() {
6099 XShapeSelectInput()
6100 ; return 0; }
6101 EOF
6102 if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6103   rm -rf conftest*
6104   eval "ac_cv_lib_$ac_lib_var=yes"
6105 else
6106   echo "configure: failed program was:" >&5
6107   cat conftest.$ac_ext >&5
6108   rm -rf conftest*
6109   eval "ac_cv_lib_$ac_lib_var=no"
6110 fi
6111 rm -f conftest*
6112 xe_check_libs=""
6113
6114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6115   echo "$ac_t""yes" 1>&6
6116   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6117 else
6118   echo "$ac_t""no" 1>&6
6119 fi
6120
6121
6122
6123     
6124 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6125 echo "configure:6126: checking for XtOpenDisplay in -lXt" >&5
6126 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6127
6128 xe_check_libs=" -lXt "
6129 cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char XtOpenDisplay();
6136
6137 int main() {
6138 XtOpenDisplay()
6139 ; return 0; }
6140 EOF
6141 if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142   rm -rf conftest*
6143   eval "ac_cv_lib_$ac_lib_var=yes"
6144 else
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   eval "ac_cv_lib_$ac_lib_var=no"
6149 fi
6150 rm -f conftest*
6151 xe_check_libs=""
6152
6153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6154   echo "$ac_t""yes" 1>&6
6155   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6156 else
6157   echo "$ac_t""no" 1>&6
6158 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6159 fi
6160
6161
6162
6163   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6164 echo "configure:6165: checking the version of X11 being used" >&5
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 #include <X11/Intrinsic.h>
6169     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6170 EOF
6171 if { (eval echo configure:6172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6172 then
6173   ./conftest foobar; x11_release=$?
6174 else
6175   conftest_rc="$?"
6176   echo "configure: failed program was:" >&5
6177   cat conftest.$ac_ext >&5
6178   rm -fr conftest*
6179   x11_release=4
6180 fi
6181 rm -fr conftest*
6182   echo "$ac_t""R${x11_release}" 1>&6
6183   { test "$extra_verbose" = "yes" && cat << EOF
6184     Defining THIS_IS_X11R${x11_release}
6185 EOF
6186 cat >> confdefs.h <<EOF
6187 #define THIS_IS_X11R${x11_release} 1
6188 EOF
6189 }
6190
6191
6192   if test "${x11_release}" = "4"; then
6193     case "$with_widgets" in
6194       "" | "no") with_widgets=no ;;
6195       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6196     esac
6197   fi
6198
6199   for ac_func in XConvertCase
6200 do
6201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6202 echo "configure:6203: checking for $ac_func" >&5
6203
6204 cat > conftest.$ac_ext <<EOF
6205 #line 6206 "configure"
6206 #include "confdefs.h"
6207 /* System header to define __stub macros and hopefully few prototypes,
6208     which can conflict with char $ac_func(); below.  */
6209 #include <assert.h>
6210 /* Override any gcc2 internal prototype to avoid an error.  */
6211 /* We use char because int might match the return type of a gcc2
6212     builtin and then its argument prototype would still apply.  */
6213 char $ac_func();
6214
6215 int main() {
6216
6217 /* The GNU C library defines this for functions which it implements
6218     to always fail with ENOSYS.  Some functions are actually named
6219     something starting with __ and the normal name is an alias.  */
6220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6221 choke me
6222 #else
6223 $ac_func();
6224 #endif
6225
6226 ; return 0; }
6227 EOF
6228 if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6229   rm -rf conftest*
6230   eval "ac_cv_func_$ac_func=yes"
6231 else
6232   echo "configure: failed program was:" >&5
6233   cat conftest.$ac_ext >&5
6234   rm -rf conftest*
6235   eval "ac_cv_func_$ac_func=no"
6236 fi
6237 rm -f conftest*
6238
6239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6242   { test "$extra_verbose" = "yes" && cat << EOF
6243     Defining $ac_tr_func
6244 EOF
6245 cat >> confdefs.h <<EOF
6246 #define $ac_tr_func 1
6247 EOF
6248 }
6249  
6250 else
6251   echo "$ac_t""no" 1>&6
6252 fi
6253 done
6254
6255
6256   for ac_hdr in X11/Xlocale.h
6257 do
6258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6260 echo "configure:6261: checking for $ac_hdr" >&5
6261
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 #include <$ac_hdr>
6266 EOF
6267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6268 { (eval echo configure:6269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6270 if test -z "$ac_err"; then
6271   rm -rf conftest*
6272   eval "ac_cv_header_$ac_safe=yes"
6273 else
6274   echo "$ac_err" >&5
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   eval "ac_cv_header_$ac_safe=no"
6279 fi
6280 rm -f conftest*
6281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6282   echo "$ac_t""yes" 1>&6
6283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6284   { test "$extra_verbose" = "yes" && cat << EOF
6285     Defining $ac_tr_hdr
6286 EOF
6287 cat >> confdefs.h <<EOF
6288 #define $ac_tr_hdr 1
6289 EOF
6290 }
6291  
6292 else
6293   echo "$ac_t""no" 1>&6
6294 fi
6295 done
6296
6297
6298     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6299 echo "configure:6300: checking for XFree86" >&5
6300   if test -d "/usr/X386/include" -o \
6301           -f "/etc/XF86Config"    -o \
6302           -f "/etc/X11/XF86Config" -o \
6303           -f "/usr/X11R6/lib/X11/XF86Config"; then
6304     echo "$ac_t""yes" 1>&6
6305     { test "$extra_verbose" = "yes" && cat << \EOF
6306     Defining HAVE_XFREE386
6307 EOF
6308 cat >> confdefs.h <<\EOF
6309 #define HAVE_XFREE386 1
6310 EOF
6311 }
6312
6313   else
6314     echo "$ac_t""no" 1>&6
6315   fi
6316
6317     test -z "$with_xmu" && { 
6318 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6319 echo "configure:6320: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6320 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6321
6322 xe_check_libs=" -lXmu "
6323 cat > conftest.$ac_ext <<EOF
6324 #line 6325 "configure"
6325 #include "confdefs.h"
6326 /* Override any gcc2 internal prototype to avoid an error.  */
6327 /* We use char because int might match the return type of a gcc2
6328     builtin and then its argument prototype would still apply.  */
6329 char XmuReadBitmapDataFromFile();
6330
6331 int main() {
6332 XmuReadBitmapDataFromFile()
6333 ; return 0; }
6334 EOF
6335 if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6336   rm -rf conftest*
6337   eval "ac_cv_lib_$ac_lib_var=yes"
6338 else
6339   echo "configure: failed program was:" >&5
6340   cat conftest.$ac_ext >&5
6341   rm -rf conftest*
6342   eval "ac_cv_lib_$ac_lib_var=no"
6343 fi
6344 rm -f conftest*
6345 xe_check_libs=""
6346
6347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6348   echo "$ac_t""yes" 1>&6
6349   with_xmu=yes
6350 else
6351   echo "$ac_t""no" 1>&6
6352 with_xmu=no
6353 fi
6354
6355  }
6356   if test "$with_xmu" = "no"; then
6357     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6358    echo "    xemacs will be linked with \"xmu.o\""
6359  fi
6360   else
6361     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6362     { test "$extra_verbose" = "yes" && cat << \EOF
6363     Defining HAVE_XMU
6364 EOF
6365 cat >> confdefs.h <<\EOF
6366 #define HAVE_XMU 1
6367 EOF
6368 }
6369
6370   fi
6371
6372       
6373 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6374 echo "configure:6375: checking for main in -lXbsd" >&5
6375 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6376
6377 xe_check_libs=" -lXbsd "
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381
6382 int main() {
6383 main()
6384 ; return 0; }
6385 EOF
6386 if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6387   rm -rf conftest*
6388   eval "ac_cv_lib_$ac_lib_var=yes"
6389 else
6390   echo "configure: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   rm -rf conftest*
6393   eval "ac_cv_lib_$ac_lib_var=no"
6394 fi
6395 rm -f conftest*
6396 xe_check_libs=""
6397
6398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6399   echo "$ac_t""yes" 1>&6
6400   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6401 else
6402   echo "$ac_t""no" 1>&6
6403 fi
6404
6405
6406
6407     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6408         if test "$GCC" = "yes"; then
6409       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6410       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6411     else
6412       case "$CC" in
6413         "xlc" ) CC="xlc_r" ;;
6414         "xlC" ) CC="xlC_r" ;;
6415         "cc"  ) CC="cc_r" ;;
6416       esac
6417     fi
6418   fi
6419
6420 fi 
6421 if test "$with_msw" != "no"; then
6422   echo "checking for MS-Windows" 1>&6
6423 echo "configure:6424: checking for MS-Windows" >&5
6424   
6425 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6426 echo "configure:6427: checking for main in -lgdi32" >&5
6427 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6428
6429 xe_check_libs=" -lgdi32 "
6430 cat > conftest.$ac_ext <<EOF
6431 #line 6432 "configure"
6432 #include "confdefs.h"
6433
6434 int main() {
6435 main()
6436 ; return 0; }
6437 EOF
6438 if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6439   rm -rf conftest*
6440   eval "ac_cv_lib_$ac_lib_var=yes"
6441 else
6442   echo "configure: failed program was:" >&5
6443   cat conftest.$ac_ext >&5
6444   rm -rf conftest*
6445   eval "ac_cv_lib_$ac_lib_var=no"
6446 fi
6447 rm -f conftest*
6448 xe_check_libs=""
6449
6450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6451   echo "$ac_t""yes" 1>&6
6452   with_msw=yes
6453 else
6454   echo "$ac_t""no" 1>&6
6455 fi
6456
6457
6458   if test "$with_msw" = "yes"; then
6459     { test "$extra_verbose" = "yes" && cat << \EOF
6460     Defining HAVE_MS_WINDOWS
6461 EOF
6462 cat >> confdefs.h <<\EOF
6463 #define HAVE_MS_WINDOWS 1
6464 EOF
6465 }
6466
6467     install_pp="$blddir/lib-src/installexe.sh"
6468     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
6469     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6470     if test "$window_system" != x11; then
6471         window_system=msw
6472         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6473             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6474    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6475  fi
6476         test "$with_menubars"   != "no" && with_menubars=msw \
6477             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6478    echo "    xemacs will be linked with \"menubar-msw.o\""
6479  fi
6480         test "$with_toolbars"   != "no" && with_toolbars=msw \
6481             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6482    echo "    xemacs will be linked with \"toolbar-msw.o\""
6483  fi
6484         test "$with_dialogs"   != "no" && with_dialogs=msw \
6485             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6486    echo "    xemacs will be linked with \"dialog-msw.o\""
6487  fi
6488         test "$with_widgets"   != "no" && with_widgets=msw
6489     else
6490         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6491    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6492  fi
6493         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6494    echo "    xemacs will be linked with \"menubar-msw.o\""
6495  fi
6496         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6497    echo "    xemacs will be linked with \"toolbar-msw.o\""
6498  fi
6499         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6500    echo "    xemacs will be linked with \"dialog-msw.o\""
6501  fi
6502     fi
6503         cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 #include <fcntl.h>
6507     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6508 EOF
6509 if { (eval echo configure:6510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6510 then
6511   { test "$extra_verbose" = "yes" && cat << \EOF
6512     Defining HAVE_MSG_SELECT
6513 EOF
6514 cat >> confdefs.h <<\EOF
6515 #define HAVE_MSG_SELECT 1
6516 EOF
6517 }
6518
6519 else
6520   conftest_rc="$?"
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523 fi
6524 rm -fr conftest*
6525     with_file_coding=yes
6526     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
6527    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\""
6528  fi
6529   fi
6530 fi
6531
6532
6533
6534 test -z "$window_system" && window_system="none"
6535
6536 if test "$window_system" = "none"; then
6537   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6538   do
6539     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6540        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6541     fi
6542     eval "with_${feature}=no"
6543   done
6544 else
6545   test -z "$with_toolbars" && with_toolbars=yes
6546 fi
6547
6548 if test "$with_msw" != "yes"; then
6549   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6550   do
6551     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6552        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6553     fi
6554     eval "with_${feature}=no"
6555   done
6556 else
6557   :
6558 fi
6559
6560 if test "$with_x11" != "yes"; then
6561             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6562   do
6563     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6564        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6565     fi
6566     eval "with_${feature}=no"
6567   done
6568 fi
6569
6570 if test "$with_x11" = "yes"; then
6571   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6572 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6573 echo "configure:6574: checking for X11/extensions/shape.h" >&5
6574
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 #include <X11/extensions/shape.h>
6579 EOF
6580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6581 { (eval echo configure:6582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6583 if test -z "$ac_err"; then
6584   rm -rf conftest*
6585   eval "ac_cv_header_$ac_safe=yes"
6586 else
6587   echo "$ac_err" >&5
6588   echo "configure: failed program was:" >&5
6589   cat conftest.$ac_ext >&5
6590   rm -rf conftest*
6591   eval "ac_cv_header_$ac_safe=no"
6592 fi
6593 rm -f conftest*
6594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6595   echo "$ac_t""yes" 1>&6
6596   
6597    { test "$extra_verbose" = "yes" && cat << \EOF
6598     Defining HAVE_BALLOON_HELP
6599 EOF
6600 cat >> confdefs.h <<\EOF
6601 #define HAVE_BALLOON_HELP 1
6602 EOF
6603 }
6604
6605    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6606    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6607  fi
6608 else
6609   echo "$ac_t""no" 1>&6
6610 fi
6611
6612 fi
6613
6614 bitmapdir=
6615
6616 case "$window_system" in
6617   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6618   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6619   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6620 esac
6621
6622 case "$x_libraries" in *X11R4* )
6623   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6624   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6625 esac
6626
6627 echo "checking for WM_COMMAND option" 1>&6
6628 echo "configure:6629: checking for WM_COMMAND option" >&5;
6629 if test "$with_wmcommand" != "no"; then
6630   { test "$extra_verbose" = "yes" && cat << \EOF
6631     Defining HAVE_WMCOMMAND
6632 EOF
6633 cat >> confdefs.h <<\EOF
6634 #define HAVE_WMCOMMAND 1
6635 EOF
6636 }
6637
6638 fi
6639
6640 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6641 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6642 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6643 echo "configure:6644: checking for X11/Xauth.h" >&5
6644
6645 cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 #include <X11/Xauth.h>
6649 EOF
6650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6651 { (eval echo configure:6652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6653 if test -z "$ac_err"; then
6654   rm -rf conftest*
6655   eval "ac_cv_header_$ac_safe=yes"
6656 else
6657   echo "$ac_err" >&5
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -rf conftest*
6661   eval "ac_cv_header_$ac_safe=no"
6662 fi
6663 rm -f conftest*
6664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6665   echo "$ac_t""yes" 1>&6
6666   :
6667 else
6668   echo "$ac_t""no" 1>&6
6669 with_xauth=no
6670 fi
6671  }
6672 test -z "$with_xauth" && { 
6673 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6674 echo "configure:6675: checking for XauGetAuthByAddr in -lXau" >&5
6675 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6676
6677 xe_check_libs=" -lXau "
6678 cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 /* Override any gcc2 internal prototype to avoid an error.  */
6682 /* We use char because int might match the return type of a gcc2
6683     builtin and then its argument prototype would still apply.  */
6684 char XauGetAuthByAddr();
6685
6686 int main() {
6687 XauGetAuthByAddr()
6688 ; return 0; }
6689 EOF
6690 if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6691   rm -rf conftest*
6692   eval "ac_cv_lib_$ac_lib_var=yes"
6693 else
6694   echo "configure: failed program was:" >&5
6695   cat conftest.$ac_ext >&5
6696   rm -rf conftest*
6697   eval "ac_cv_lib_$ac_lib_var=no"
6698 fi
6699 rm -f conftest*
6700 xe_check_libs=""
6701
6702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6703   echo "$ac_t""yes" 1>&6
6704   :
6705 else
6706   echo "$ac_t""no" 1>&6
6707 with_xauth=no
6708 fi
6709
6710  }
6711 test -z "$with_xauth" && with_xauth=yes
6712 if test "$with_xauth" = "yes"; then
6713   { test "$extra_verbose" = "yes" && cat << \EOF
6714     Defining HAVE_XAUTH
6715 EOF
6716 cat >> confdefs.h <<\EOF
6717 #define HAVE_XAUTH 1
6718 EOF
6719 }
6720
6721   
6722 T=""
6723 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
6724 libs_xauth="$T"
6725
6726 fi
6727
6728
6729
6730
6731 if test "$with_tooltalk" != "no" ; then
6732       for dir in "" "Tt/" "desktop/" ; do
6733     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6734 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6735 echo "configure:6736: checking for ${dir}tt_c.h" >&5
6736
6737 cat > conftest.$ac_ext <<EOF
6738 #line 6739 "configure"
6739 #include "confdefs.h"
6740 #include <${dir}tt_c.h>
6741 EOF
6742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6743 { (eval echo configure:6744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6745 if test -z "$ac_err"; then
6746   rm -rf conftest*
6747   eval "ac_cv_header_$ac_safe=yes"
6748 else
6749   echo "$ac_err" >&5
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_header_$ac_safe=no"
6754 fi
6755 rm -f conftest*
6756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6757   echo "$ac_t""yes" 1>&6
6758   tt_c_h_file="${dir}tt_c.h"; break
6759 else
6760   echo "$ac_t""no" 1>&6
6761 fi
6762
6763   done
6764   if test -z "$tt_c_h_file"; then
6765     if test "$with_tooltalk" = "yes"; then
6766       (echo "$progname: Usage error:"
6767 echo " " "Unable to find required tooltalk header files."
6768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6769     fi
6770     with_tooltalk=no
6771   fi
6772 fi
6773 if test "$with_tooltalk" != "no" ; then
6774   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6775     
6776 xe_msg_checking="for tt_message_create in -ltt"
6777 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6778 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6779 echo "configure:6780: checking "$xe_msg_checking"" >&5
6780 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6781
6782 xe_check_libs=" -ltt $extra_libs"
6783 cat > conftest.$ac_ext <<EOF
6784 #line 6785 "configure"
6785 #include "confdefs.h"
6786 /* Override any gcc2 internal prototype to avoid an error.  */
6787 /* We use char because int might match the return type of a gcc2
6788     builtin and then its argument prototype would still apply.  */
6789 char tt_message_create();
6790
6791 int main() {
6792 tt_message_create()
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796   rm -rf conftest*
6797   eval "ac_cv_lib_$ac_lib_var=yes"
6798 else
6799   echo "configure: failed program was:" >&5
6800   cat conftest.$ac_ext >&5
6801   rm -rf conftest*
6802   eval "ac_cv_lib_$ac_lib_var=no"
6803 fi
6804 rm -f conftest*
6805 xe_check_libs=""
6806
6807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6808   echo "$ac_t""yes" 1>&6
6809   tt_libs="-ltt $extra_libs"; break
6810 else
6811   echo "$ac_t""no" 1>&6
6812 :
6813 fi
6814
6815
6816   done
6817   if test -z "$tt_libs"; then
6818     if test "$with_tooltalk" = "yes"; then
6819       (echo "$progname: Usage error:"
6820 echo " " "Unable to find required tooltalk libraries."
6821 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6822     fi
6823     with_tooltalk=no
6824   fi
6825 fi
6826 test -z "$with_tooltalk" && with_tooltalk=yes
6827 if test "$with_tooltalk" = "yes"; then
6828   { test "$extra_verbose" = "yes" && cat << \EOF
6829     Defining TOOLTALK
6830 EOF
6831 cat >> confdefs.h <<\EOF
6832 #define TOOLTALK 1
6833 EOF
6834 }
6835
6836   { test "$extra_verbose" = "yes" && cat << EOF
6837     Defining TT_C_H_FILE = "$tt_c_h_file"
6838 EOF
6839 cat >> confdefs.h <<EOF
6840 #define TT_C_H_FILE "$tt_c_h_file"
6841 EOF
6842 }
6843
6844   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6845   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6846    echo "    xemacs will be linked with \"tooltalk.o\""
6847  fi
6848 fi
6849
6850 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6851 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6852 echo "configure:6853: checking for Dt/Dt.h" >&5
6853
6854 cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 #include <Dt/Dt.h>
6858 EOF
6859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6860 { (eval echo configure:6861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6862 if test -z "$ac_err"; then
6863   rm -rf conftest*
6864   eval "ac_cv_header_$ac_safe=yes"
6865 else
6866   echo "$ac_err" >&5
6867   echo "configure: failed program was:" >&5
6868   cat conftest.$ac_ext >&5
6869   rm -rf conftest*
6870   eval "ac_cv_header_$ac_safe=no"
6871 fi
6872 rm -f conftest*
6873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6874   echo "$ac_t""yes" 1>&6
6875   :
6876 else
6877   echo "$ac_t""no" 1>&6
6878 with_cde=no
6879 fi
6880  }
6881 test -z "$with_cde" && { 
6882 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6883 echo "configure:6884: checking for DtDndDragStart in -lDtSvc" >&5
6884 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6885
6886 xe_check_libs=" -lDtSvc "
6887 cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6890 /* Override any gcc2 internal prototype to avoid an error.  */
6891 /* We use char because int might match the return type of a gcc2
6892     builtin and then its argument prototype would still apply.  */
6893 char DtDndDragStart();
6894
6895 int main() {
6896 DtDndDragStart()
6897 ; return 0; }
6898 EOF
6899 if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6900   rm -rf conftest*
6901   eval "ac_cv_lib_$ac_lib_var=yes"
6902 else
6903   echo "configure: failed program was:" >&5
6904   cat conftest.$ac_ext >&5
6905   rm -rf conftest*
6906   eval "ac_cv_lib_$ac_lib_var=no"
6907 fi
6908 rm -f conftest*
6909 xe_check_libs=""
6910
6911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6912   echo "$ac_t""yes" 1>&6
6913   :
6914 else
6915   echo "$ac_t""no" 1>&6
6916 with_cde=no
6917 fi
6918
6919  }
6920 test -z "$with_cde" && with_cde=yes
6921 if test "$with_dragndrop" = no; then
6922   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6923   with_cde=no
6924 fi
6925 if test "$with_cde" = "yes" ; then
6926   { test "$extra_verbose" = "yes" && cat << \EOF
6927     Defining HAVE_CDE
6928 EOF
6929 cat >> confdefs.h <<\EOF
6930 #define HAVE_CDE 1
6931 EOF
6932 }
6933
6934   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6935   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6936   with_tooltalk=yes # CDE requires Tooltalk
6937   need_motif=yes    # CDE requires Motif
6938 fi
6939
6940 test "$window_system" != "x11" && with_offix=no
6941 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6942   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6943   with_offix=no
6944 fi
6945 if test "$with_dragndrop" = no; then
6946   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6947   with_offix=no
6948 fi
6949 if test "$with_cde" = yes; then
6950   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6951   with_offix=no
6952 fi
6953 test -z "$with_offix" && with_offix=no
6954 if test "$with_offix" = "yes"; then
6955   { test "$extra_verbose" = "yes" && cat << \EOF
6956     Defining HAVE_OFFIX_DND
6957 EOF
6958 cat >> confdefs.h <<\EOF
6959 #define HAVE_OFFIX_DND 1
6960 EOF
6961 }
6962
6963   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6964   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6965 fi
6966
6967 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6968 echo "configure:6969: checking if drag and drop API is needed" >&5
6969 if test "$with_dragndrop" != "no" ; then
6970   if test -n "$dragndrop_proto" ; then
6971     with_dragndrop=yes
6972     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6973     { test "$extra_verbose" = "yes" && cat << \EOF
6974     Defining HAVE_DRAGNDROP
6975 EOF
6976 cat >> confdefs.h <<\EOF
6977 #define HAVE_DRAGNDROP 1
6978 EOF
6979 }
6980
6981     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6982   else
6983     with_dragndrop=no
6984     echo "$ac_t""no" 1>&6
6985   fi
6986 fi
6987
6988 echo "checking for LDAP" 1>&6
6989 echo "configure:6990: checking for LDAP" >&5
6990 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6991 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6992 echo "configure:6993: checking for ldap.h" >&5
6993
6994 cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997 #include <ldap.h>
6998 EOF
6999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7000 { (eval echo configure:7001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7002 if test -z "$ac_err"; then
7003   rm -rf conftest*
7004   eval "ac_cv_header_$ac_safe=yes"
7005 else
7006   echo "$ac_err" >&5
7007   echo "configure: failed program was:" >&5
7008   cat conftest.$ac_ext >&5
7009   rm -rf conftest*
7010   eval "ac_cv_header_$ac_safe=no"
7011 fi
7012 rm -f conftest*
7013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7014   echo "$ac_t""yes" 1>&6
7015   :
7016 else
7017   echo "$ac_t""no" 1>&6
7018 with_ldap=no
7019 fi
7020  }
7021 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7022 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7023 echo "configure:7024: checking for lber.h" >&5
7024
7025 cat > conftest.$ac_ext <<EOF
7026 #line 7027 "configure"
7027 #include "confdefs.h"
7028 #include <lber.h>
7029 EOF
7030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7031 { (eval echo configure:7032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7033 if test -z "$ac_err"; then
7034   rm -rf conftest*
7035   eval "ac_cv_header_$ac_safe=yes"
7036 else
7037   echo "$ac_err" >&5
7038   echo "configure: failed program was:" >&5
7039   cat conftest.$ac_ext >&5
7040   rm -rf conftest*
7041   eval "ac_cv_header_$ac_safe=no"
7042 fi
7043 rm -f conftest*
7044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7045   echo "$ac_t""yes" 1>&6
7046   :
7047 else
7048   echo "$ac_t""no" 1>&6
7049 with_ldap=no
7050 fi
7051  }
7052 if test "$with_ldap" != "no"; then
7053   
7054 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7055 echo "configure:7056: checking for ldap_search in -lldap" >&5
7056 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7057
7058 xe_check_libs=" -lldap "
7059 cat > conftest.$ac_ext <<EOF
7060 #line 7061 "configure"
7061 #include "confdefs.h"
7062 /* Override any gcc2 internal prototype to avoid an error.  */
7063 /* We use char because int might match the return type of a gcc2
7064     builtin and then its argument prototype would still apply.  */
7065 char ldap_search();
7066
7067 int main() {
7068 ldap_search()
7069 ; return 0; }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7072   rm -rf conftest*
7073   eval "ac_cv_lib_$ac_lib_var=yes"
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -rf conftest*
7078   eval "ac_cv_lib_$ac_lib_var=no"
7079 fi
7080 rm -f conftest*
7081 xe_check_libs=""
7082
7083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7084   echo "$ac_t""yes" 1>&6
7085   with_ldap_nolber=yes
7086 else
7087   echo "$ac_t""no" 1>&6
7088 with_ldap_nolber=no
7089 fi
7090
7091
7092   test "$with_ldap_nolber" = "no" && { 
7093 xe_msg_checking="for ldap_open in -lldap"
7094 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7095 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7096 echo "configure:7097: checking "$xe_msg_checking"" >&5
7097 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7098
7099 xe_check_libs=" -lldap -llber"
7100 cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103 /* Override any gcc2 internal prototype to avoid an error.  */
7104 /* We use char because int might match the return type of a gcc2
7105     builtin and then its argument prototype would still apply.  */
7106 char ldap_open();
7107
7108 int main() {
7109 ldap_open()
7110 ; return 0; }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=yes"
7115 else
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   eval "ac_cv_lib_$ac_lib_var=no"
7120 fi
7121 rm -f conftest*
7122 xe_check_libs=""
7123
7124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7125   echo "$ac_t""yes" 1>&6
7126   with_ldap_lber=yes
7127 else
7128   echo "$ac_t""no" 1>&6
7129 with_ldap_lber=no
7130 fi
7131
7132  }
7133   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7134 xe_msg_checking="for ldap_open in -lldap"
7135 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7136 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7137 echo "configure:7138: checking "$xe_msg_checking"" >&5
7138 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7139
7140 xe_check_libs=" -lldap -llber -lkrb"
7141 cat > conftest.$ac_ext <<EOF
7142 #line 7143 "configure"
7143 #include "confdefs.h"
7144 /* Override any gcc2 internal prototype to avoid an error.  */
7145 /* We use char because int might match the return type of a gcc2
7146     builtin and then its argument prototype would still apply.  */
7147 char ldap_open();
7148
7149 int main() {
7150 ldap_open()
7151 ; return 0; }
7152 EOF
7153 if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7154   rm -rf conftest*
7155   eval "ac_cv_lib_$ac_lib_var=yes"
7156 else
7157   echo "configure: failed program was:" >&5
7158   cat conftest.$ac_ext >&5
7159   rm -rf conftest*
7160   eval "ac_cv_lib_$ac_lib_var=no"
7161 fi
7162 rm -f conftest*
7163 xe_check_libs=""
7164
7165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7166   echo "$ac_t""yes" 1>&6
7167   with_ldap_krb=yes
7168 else
7169   echo "$ac_t""no" 1>&6
7170 with_ldap_krb=no
7171 fi
7172
7173  }
7174   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7175 xe_msg_checking="for ldap_open in -lldap"
7176 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7177 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7178 echo "configure:7179: checking "$xe_msg_checking"" >&5
7179 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7180
7181 xe_check_libs=" -lldap -llber -lkrb -ldes"
7182 cat > conftest.$ac_ext <<EOF
7183 #line 7184 "configure"
7184 #include "confdefs.h"
7185 /* Override any gcc2 internal prototype to avoid an error.  */
7186 /* We use char because int might match the return type of a gcc2
7187     builtin and then its argument prototype would still apply.  */
7188 char ldap_open();
7189
7190 int main() {
7191 ldap_open()
7192 ; return 0; }
7193 EOF
7194 if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7195   rm -rf conftest*
7196   eval "ac_cv_lib_$ac_lib_var=yes"
7197 else
7198   echo "configure: failed program was:" >&5
7199   cat conftest.$ac_ext >&5
7200   rm -rf conftest*
7201   eval "ac_cv_lib_$ac_lib_var=no"
7202 fi
7203 rm -f conftest*
7204 xe_check_libs=""
7205
7206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7207   echo "$ac_t""yes" 1>&6
7208   with_ldap_krbdes=yes
7209 else
7210   echo "$ac_t""no" 1>&6
7211 with_ldap_krbdes=no
7212 fi
7213
7214  }
7215   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
7216 fi
7217 if test "$with_ldap" = "yes"; then
7218   { test "$extra_verbose" = "yes" && cat << \EOF
7219     Defining HAVE_LDAP
7220 EOF
7221 cat >> confdefs.h <<\EOF
7222 #define HAVE_LDAP 1
7223 EOF
7224 }
7225
7226   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7227    echo "    xemacs will be linked with \"eldap.o\""
7228  fi
7229   if test "$with_ldap_nolber" = "yes" ; then
7230     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7231   else
7232     if test "$with_ldap_krb" = "yes" ; then
7233       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7234     fi
7235     if test "$with_ldap_krbdes" = "yes" ; then
7236       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7237       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7238     fi
7239     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7240     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7241   fi
7242   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7243 do
7244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7245 echo "configure:7246: checking for $ac_func" >&5
7246
7247 cat > conftest.$ac_ext <<EOF
7248 #line 7249 "configure"
7249 #include "confdefs.h"
7250 /* System header to define __stub macros and hopefully few prototypes,
7251     which can conflict with char $ac_func(); below.  */
7252 #include <assert.h>
7253 /* Override any gcc2 internal prototype to avoid an error.  */
7254 /* We use char because int might match the return type of a gcc2
7255     builtin and then its argument prototype would still apply.  */
7256 char $ac_func();
7257
7258 int main() {
7259
7260 /* The GNU C library defines this for functions which it implements
7261     to always fail with ENOSYS.  Some functions are actually named
7262     something starting with __ and the normal name is an alias.  */
7263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7264 choke me
7265 #else
7266 $ac_func();
7267 #endif
7268
7269 ; return 0; }
7270 EOF
7271 if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7272   rm -rf conftest*
7273   eval "ac_cv_func_$ac_func=yes"
7274 else
7275   echo "configure: failed program was:" >&5
7276   cat conftest.$ac_ext >&5
7277   rm -rf conftest*
7278   eval "ac_cv_func_$ac_func=no"
7279 fi
7280 rm -f conftest*
7281
7282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7283   echo "$ac_t""yes" 1>&6
7284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7285   { test "$extra_verbose" = "yes" && cat << EOF
7286     Defining $ac_tr_func
7287 EOF
7288 cat >> confdefs.h <<EOF
7289 #define $ac_tr_func 1
7290 EOF
7291 }
7292  
7293 else
7294   echo "$ac_t""no" 1>&6
7295 fi
7296 done
7297
7298 fi
7299
7300 if test "$with_postgresql" != "no"; then
7301   echo "checking for PostgreSQL" 1>&6
7302 echo "configure:7303: checking for PostgreSQL" >&5
7303
7304   for header_dir in "" "pgsql/" "postgresql/"; do
7305     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7306 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7307 echo "configure:7308: checking for ${header_dir}libpq-fe.h" >&5
7308
7309 cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 #include <${header_dir}libpq-fe.h>
7313 EOF
7314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7315 { (eval echo configure:7316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7317 if test -z "$ac_err"; then
7318   rm -rf conftest*
7319   eval "ac_cv_header_$ac_safe=yes"
7320 else
7321   echo "$ac_err" >&5
7322   echo "configure: failed program was:" >&5
7323   cat conftest.$ac_ext >&5
7324   rm -rf conftest*
7325   eval "ac_cv_header_$ac_safe=no"
7326 fi
7327 rm -f conftest*
7328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7329   echo "$ac_t""yes" 1>&6
7330   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7331 else
7332   echo "$ac_t""no" 1>&6
7333 fi
7334
7335   done
7336
7337   test -n "$libpq_fe_h_file" && { 
7338 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7339 echo "configure:7340: checking for PQconnectdb in -lpq" >&5
7340 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7341
7342 xe_check_libs=" -lpq "
7343 cat > conftest.$ac_ext <<EOF
7344 #line 7345 "configure"
7345 #include "confdefs.h"
7346 /* Override any gcc2 internal prototype to avoid an error.  */
7347 /* We use char because int might match the return type of a gcc2
7348     builtin and then its argument prototype would still apply.  */
7349 char PQconnectdb();
7350
7351 int main() {
7352 PQconnectdb()
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356   rm -rf conftest*
7357   eval "ac_cv_lib_$ac_lib_var=yes"
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   eval "ac_cv_lib_$ac_lib_var=no"
7363 fi
7364 rm -f conftest*
7365 xe_check_libs=""
7366
7367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7368   echo "$ac_t""yes" 1>&6
7369   have_libpq=yes
7370 else
7371   echo "$ac_t""no" 1>&6
7372 fi
7373
7374  }
7375
7376   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7377     with_postgresql=yes
7378     { test "$extra_verbose" = "yes" && cat << \EOF
7379     Defining HAVE_POSTGRESQL
7380 EOF
7381 cat >> confdefs.h <<\EOF
7382 #define HAVE_POSTGRESQL 1
7383 EOF
7384 }
7385
7386     
7387 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7388 echo "configure:7389: checking for PQconnectStart in -lpq" >&5
7389 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7390
7391 xe_check_libs=" -lpq "
7392 cat > conftest.$ac_ext <<EOF
7393 #line 7394 "configure"
7394 #include "confdefs.h"
7395 /* Override any gcc2 internal prototype to avoid an error.  */
7396 /* We use char because int might match the return type of a gcc2
7397     builtin and then its argument prototype would still apply.  */
7398 char PQconnectStart();
7399
7400 int main() {
7401 PQconnectStart()
7402 ; return 0; }
7403 EOF
7404 if { (eval echo configure:7405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7405   rm -rf conftest*
7406   eval "ac_cv_lib_$ac_lib_var=yes"
7407 else
7408   echo "configure: failed program was:" >&5
7409   cat conftest.$ac_ext >&5
7410   rm -rf conftest*
7411   eval "ac_cv_lib_$ac_lib_var=no"
7412 fi
7413 rm -f conftest*
7414 xe_check_libs=""
7415
7416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7417   echo "$ac_t""yes" 1>&6
7418   with_postgresqlv7=yes;
7419                  { test "$extra_verbose" = "yes" && cat << \EOF
7420     Defining HAVE_POSTGRESQLV7
7421 EOF
7422 cat >> confdefs.h <<\EOF
7423 #define HAVE_POSTGRESQLV7 1
7424 EOF
7425 }
7426
7427 else
7428   echo "$ac_t""no" 1>&6
7429 fi
7430
7431
7432     { test "$extra_verbose" = "yes" && cat << EOF
7433     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7434 EOF
7435 cat >> confdefs.h <<EOF
7436 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7437 EOF
7438 }
7439
7440     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7441     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7442    echo "    xemacs will be linked with \"postgresql.o\""
7443  fi
7444   elif test "$with_postgresql" = "yes"; then
7445     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7446   fi
7447 fi
7448
7449
7450 if test "$window_system" != "none"; then
7451   echo "checking for graphics libraries" 1>&6
7452 echo "configure:7453: checking for graphics libraries" >&5
7453
7454     xpm_problem=""
7455   if test -z "$with_xpm"; then
7456     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7457 echo "configure:7458: checking for Xpm - no older than 3.4f" >&5
7458     xe_check_libs=-lXpm
7459     cat > conftest.$ac_ext <<EOF
7460 #line 7461 "configure"
7461 #include "confdefs.h"
7462 #define XPM_NUMBERS
7463 #include <X11/xpm.h>
7464     int main(int c, char **v) {
7465     return c == 1 ? 0 :
7466       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7467       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7468 EOF
7469 if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7470 then
7471   ./conftest dummy_arg; xpm_status=$?;
7472       if test "$xpm_status" = "0"; then
7473         with_xpm=yes;
7474       else
7475         with_xpm=no;
7476         if test "$xpm_status" = "1"; then
7477           xpm_problem="Xpm library version and header file version don't match!"
7478         elif test "$xpm_status" = "2"; then
7479           xpm_problem="Xpm library version is too old!"
7480         else
7481           xpm_problem="Internal xpm detection logic error!"
7482         fi
7483         echo "
7484 *** WARNING *** $xpm_problem
7485   I'm not touching that with a 10-foot pole!
7486   If you really want to use the installed version of Xpm, rerun
7487   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7488     fi
7489 else
7490   conftest_rc="$?"
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -fr conftest*
7494   with_xpm=no
7495 fi
7496 rm -fr conftest*
7497     xe_check_libs=
7498     echo "$ac_t""$with_xpm" 1>&6
7499   fi
7500   if test "$with_xpm" = "yes"; then
7501     { test "$extra_verbose" = "yes" && cat << \EOF
7502     Defining HAVE_XPM
7503 EOF
7504 cat >> confdefs.h <<\EOF
7505 #define HAVE_XPM 1
7506 EOF
7507 }
7508
7509     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7510     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7511 echo "configure:7512: checking for \"FOR_MSW\" xpm" >&5
7512     xe_check_libs=-lXpm
7513     cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516
7517 int main() {
7518 XpmCreatePixmapFromData()
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7522   rm -rf conftest*
7523   xpm_for_msw=no
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   xpm_for_msw=yes
7529 fi
7530 rm -f conftest*
7531     xe_check_libs=
7532     echo "$ac_t""$xpm_for_msw" 1>&6
7533     if test "$xpm_for_msw" = "yes"; then
7534       { test "$extra_verbose" = "yes" && cat << \EOF
7535     Defining FOR_MSW
7536 EOF
7537 cat >> confdefs.h <<\EOF
7538 #define FOR_MSW 1
7539 EOF
7540 }
7541
7542     fi
7543   fi
7544
7545     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7546 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7547 echo "configure:7548: checking for compface.h" >&5
7548
7549 cat > conftest.$ac_ext <<EOF
7550 #line 7551 "configure"
7551 #include "confdefs.h"
7552 #include <compface.h>
7553 EOF
7554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7555 { (eval echo configure:7556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7557 if test -z "$ac_err"; then
7558   rm -rf conftest*
7559   eval "ac_cv_header_$ac_safe=yes"
7560 else
7561   echo "$ac_err" >&5
7562   echo "configure: failed program was:" >&5
7563   cat conftest.$ac_ext >&5
7564   rm -rf conftest*
7565   eval "ac_cv_header_$ac_safe=no"
7566 fi
7567 rm -f conftest*
7568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7569   echo "$ac_t""yes" 1>&6
7570   :
7571 else
7572   echo "$ac_t""no" 1>&6
7573 with_xface=no
7574 fi
7575  }
7576   test -z "$with_xface" && { 
7577 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7578 echo "configure:7579: checking for UnGenFace in -lcompface" >&5
7579 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7580
7581 xe_check_libs=" -lcompface "
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char UnGenFace();
7589
7590 int main() {
7591 UnGenFace()
7592 ; return 0; }
7593 EOF
7594 if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=yes"
7597 else
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_lib_$ac_lib_var=no"
7602 fi
7603 rm -f conftest*
7604 xe_check_libs=""
7605
7606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7607   echo "$ac_t""yes" 1>&6
7608   : 
7609 else
7610   echo "$ac_t""no" 1>&6
7611 with_xface=no
7612 fi
7613
7614  }
7615   test -z "$with_xface" && with_xface=yes
7616   if test "$with_xface" = "yes"; then
7617     { test "$extra_verbose" = "yes" && cat << \EOF
7618     Defining HAVE_XFACE
7619 EOF
7620 cat >> confdefs.h <<\EOF
7621 #define HAVE_XFACE 1
7622 EOF
7623 }
7624
7625     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7626   fi
7627
7628         if test "$with_gif" != "no"; then
7629     with_gif="yes"
7630     { test "$extra_verbose" = "yes" && cat << \EOF
7631     Defining HAVE_GIF
7632 EOF
7633 cat >> confdefs.h <<\EOF
7634 #define HAVE_GIF 1
7635 EOF
7636 }
7637
7638     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7639    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7640  fi
7641   fi
7642
7643       if test "$with_png $with_tiff" != "no no"; then
7644     
7645 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7646 echo "configure:7647: checking for inflate in -lc" >&5
7647 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7648
7649 xe_check_libs=" -lc "
7650 cat > conftest.$ac_ext <<EOF
7651 #line 7652 "configure"
7652 #include "confdefs.h"
7653 /* Override any gcc2 internal prototype to avoid an error.  */
7654 /* We use char because int might match the return type of a gcc2
7655     builtin and then its argument prototype would still apply.  */
7656 char inflate();
7657
7658 int main() {
7659 inflate()
7660 ; return 0; }
7661 EOF
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7663   rm -rf conftest*
7664   eval "ac_cv_lib_$ac_lib_var=yes"
7665 else
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -rf conftest*
7669   eval "ac_cv_lib_$ac_lib_var=no"
7670 fi
7671 rm -f conftest*
7672 xe_check_libs=""
7673
7674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7675   echo "$ac_t""yes" 1>&6
7676   :
7677 else
7678   echo "$ac_t""no" 1>&6
7679
7680 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7681 echo "configure:7682: checking for inflate in -lz" >&5
7682 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7683
7684 xe_check_libs=" -lz "
7685 cat > conftest.$ac_ext <<EOF
7686 #line 7687 "configure"
7687 #include "confdefs.h"
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 /* We use char because int might match the return type of a gcc2
7690     builtin and then its argument prototype would still apply.  */
7691 char inflate();
7692
7693 int main() {
7694 inflate()
7695 ; return 0; }
7696 EOF
7697 if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7698   rm -rf conftest*
7699   eval "ac_cv_lib_$ac_lib_var=yes"
7700 else
7701   echo "configure: failed program was:" >&5
7702   cat conftest.$ac_ext >&5
7703   rm -rf conftest*
7704   eval "ac_cv_lib_$ac_lib_var=no"
7705 fi
7706 rm -f conftest*
7707 xe_check_libs=""
7708
7709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7710   echo "$ac_t""yes" 1>&6
7711   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7712 else
7713   echo "$ac_t""no" 1>&6
7714
7715 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7716 echo "configure:7717: checking for inflate in -lgz" >&5
7717 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7718
7719 xe_check_libs=" -lgz "
7720 cat > conftest.$ac_ext <<EOF
7721 #line 7722 "configure"
7722 #include "confdefs.h"
7723 /* Override any gcc2 internal prototype to avoid an error.  */
7724 /* We use char because int might match the return type of a gcc2
7725     builtin and then its argument prototype would still apply.  */
7726 char inflate();
7727
7728 int main() {
7729 inflate()
7730 ; return 0; }
7731 EOF
7732 if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7733   rm -rf conftest*
7734   eval "ac_cv_lib_$ac_lib_var=yes"
7735 else
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   eval "ac_cv_lib_$ac_lib_var=no"
7740 fi
7741 rm -f conftest*
7742 xe_check_libs=""
7743
7744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7745   echo "$ac_t""yes" 1>&6
7746   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7747 else
7748   echo "$ac_t""no" 1>&6
7749 fi
7750
7751
7752 fi
7753
7754
7755 fi
7756
7757
7758   fi
7759
7760     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7761 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7762 echo "configure:7763: checking for jpeglib.h" >&5
7763
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 #include <jpeglib.h>
7768 EOF
7769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7770 { (eval echo configure:7771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7772 if test -z "$ac_err"; then
7773   rm -rf conftest*
7774   eval "ac_cv_header_$ac_safe=yes"
7775 else
7776   echo "$ac_err" >&5
7777   echo "configure: failed program was:" >&5
7778   cat conftest.$ac_ext >&5
7779   rm -rf conftest*
7780   eval "ac_cv_header_$ac_safe=no"
7781 fi
7782 rm -f conftest*
7783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7784   echo "$ac_t""yes" 1>&6
7785   :
7786 else
7787   echo "$ac_t""no" 1>&6
7788 with_jpeg=no
7789 fi
7790  }
7791   test -z "$with_jpeg" && { 
7792 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7793 echo "configure:7794: checking for jpeg_destroy_decompress in -ljpeg" >&5
7794 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7795
7796 xe_check_libs=" -ljpeg "
7797 cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800 /* Override any gcc2 internal prototype to avoid an error.  */
7801 /* We use char because int might match the return type of a gcc2
7802     builtin and then its argument prototype would still apply.  */
7803 char jpeg_destroy_decompress();
7804
7805 int main() {
7806 jpeg_destroy_decompress()
7807 ; return 0; }
7808 EOF
7809 if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7810   rm -rf conftest*
7811   eval "ac_cv_lib_$ac_lib_var=yes"
7812 else
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -rf conftest*
7816   eval "ac_cv_lib_$ac_lib_var=no"
7817 fi
7818 rm -f conftest*
7819 xe_check_libs=""
7820
7821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7822   echo "$ac_t""yes" 1>&6
7823   :
7824 else
7825   echo "$ac_t""no" 1>&6
7826 with_jpeg=no
7827 fi
7828
7829  }
7830   test -z "$with_jpeg" && with_jpeg=yes
7831   if test "$with_jpeg" = "yes"; then
7832     { test "$extra_verbose" = "yes" && cat << \EOF
7833     Defining HAVE_JPEG
7834 EOF
7835 cat >> confdefs.h <<\EOF
7836 #define HAVE_JPEG 1
7837 EOF
7838 }
7839
7840     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7841   fi
7842
7843     png_problem=""
7844   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7845 echo "configure:7846: checking for pow" >&5
7846
7847 cat > conftest.$ac_ext <<EOF
7848 #line 7849 "configure"
7849 #include "confdefs.h"
7850 /* System header to define __stub macros and hopefully few prototypes,
7851     which can conflict with char pow(); below.  */
7852 #include <assert.h>
7853 /* Override any gcc2 internal prototype to avoid an error.  */
7854 /* We use char because int might match the return type of a gcc2
7855     builtin and then its argument prototype would still apply.  */
7856 char pow();
7857
7858 int main() {
7859
7860 /* The GNU C library defines this for functions which it implements
7861     to always fail with ENOSYS.  Some functions are actually named
7862     something starting with __ and the normal name is an alias.  */
7863 #if defined (__stub_pow) || defined (__stub___pow)
7864 choke me
7865 #else
7866 pow();
7867 #endif
7868
7869 ; return 0; }
7870 EOF
7871 if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7872   rm -rf conftest*
7873   eval "ac_cv_func_pow=yes"
7874 else
7875   echo "configure: failed program was:" >&5
7876   cat conftest.$ac_ext >&5
7877   rm -rf conftest*
7878   eval "ac_cv_func_pow=no"
7879 fi
7880 rm -f conftest*
7881
7882 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7883   echo "$ac_t""yes" 1>&6
7884   :
7885 else
7886   echo "$ac_t""no" 1>&6
7887 with_png=no
7888 fi
7889  }
7890   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7891 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7892 echo "configure:7893: checking for png.h" >&5
7893
7894 cat > conftest.$ac_ext <<EOF
7895 #line 7896 "configure"
7896 #include "confdefs.h"
7897 #include <png.h>
7898 EOF
7899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7900 { (eval echo configure:7901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7902 if test -z "$ac_err"; then
7903   rm -rf conftest*
7904   eval "ac_cv_header_$ac_safe=yes"
7905 else
7906   echo "$ac_err" >&5
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   eval "ac_cv_header_$ac_safe=no"
7911 fi
7912 rm -f conftest*
7913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7914   echo "$ac_t""yes" 1>&6
7915   :
7916 else
7917   echo "$ac_t""no" 1>&6
7918 with_png=no
7919 fi
7920  }
7921   test -z "$with_png" && { 
7922 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7923 echo "configure:7924: checking for png_read_image in -lpng" >&5
7924 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7925
7926 xe_check_libs=" -lpng "
7927 cat > conftest.$ac_ext <<EOF
7928 #line 7929 "configure"
7929 #include "confdefs.h"
7930 /* Override any gcc2 internal prototype to avoid an error.  */
7931 /* We use char because int might match the return type of a gcc2
7932     builtin and then its argument prototype would still apply.  */
7933 char png_read_image();
7934
7935 int main() {
7936 png_read_image()
7937 ; return 0; }
7938 EOF
7939 if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7940   rm -rf conftest*
7941   eval "ac_cv_lib_$ac_lib_var=yes"
7942 else
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_lib_$ac_lib_var=no"
7947 fi
7948 rm -f conftest*
7949 xe_check_libs=""
7950
7951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7952   echo "$ac_t""yes" 1>&6
7953   :
7954 else
7955   echo "$ac_t""no" 1>&6
7956 with_png=no
7957 fi
7958
7959  }
7960   if test -z "$with_png"; then
7961     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7962 echo "configure:7963: checking for workable png version information" >&5
7963     xe_check_libs="-lpng -lz"
7964     cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 #include <png.h>
7968     int main(int c, char **v) {
7969     if (c == 1) return 0;
7970     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7971     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7974 then
7975   ./conftest dummy_arg; png_status=$?;
7976       if test "$png_status" = "0"; then
7977         with_png=yes;
7978       else
7979         with_png=no;
7980         if test "$png_status" = "1"; then
7981           png_problem="PNG library version and header file don't match!"
7982         elif test "$png_status" = "2"; then
7983           png_problem="PNG library version too old (pre 1.0.2)!"
7984         fi
7985         echo "
7986 *** WARNING *** $png_problem
7987   I'm not touching that with a 10-foot pole!
7988   If you really want to use the installed version of libPNG, rerun
7989   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7990     fi
7991 else
7992   conftest_rc="$?"
7993   echo "configure: failed program was:" >&5
7994   cat conftest.$ac_ext >&5
7995   rm -fr conftest*
7996   with_png=no
7997 fi
7998 rm -fr conftest*
7999     xe_check_libs=
8000     echo "$ac_t""$with_png" 1>&6
8001   fi
8002   if test "$with_png" = "yes"; then
8003     { test "$extra_verbose" = "yes" && cat << \EOF
8004     Defining HAVE_PNG
8005 EOF
8006 cat >> confdefs.h <<\EOF
8007 #define HAVE_PNG 1
8008 EOF
8009 }
8010
8011     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8012   fi
8013
8014     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8015 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8016 echo "configure:8017: checking for tiffio.h" >&5
8017
8018 cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 #include <tiffio.h>
8022 EOF
8023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8024 { (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8026 if test -z "$ac_err"; then
8027   rm -rf conftest*
8028   eval "ac_cv_header_$ac_safe=yes"
8029 else
8030   echo "$ac_err" >&5
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_header_$ac_safe=no"
8035 fi
8036 rm -f conftest*
8037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039   :
8040 else
8041   echo "$ac_t""no" 1>&6
8042 with_tiff=no
8043 fi
8044  }
8045   test -z "$with_tiff" && { 
8046 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8047 echo "configure:8048: checking for TIFFClientOpen in -ltiff" >&5
8048 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8049
8050 xe_check_libs=" -ltiff "
8051 cat > conftest.$ac_ext <<EOF
8052 #line 8053 "configure"
8053 #include "confdefs.h"
8054 /* Override any gcc2 internal prototype to avoid an error.  */
8055 /* We use char because int might match the return type of a gcc2
8056     builtin and then its argument prototype would still apply.  */
8057 char TIFFClientOpen();
8058
8059 int main() {
8060 TIFFClientOpen()
8061 ; return 0; }
8062 EOF
8063 if { (eval echo configure:8064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8064   rm -rf conftest*
8065   eval "ac_cv_lib_$ac_lib_var=yes"
8066 else
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -rf conftest*
8070   eval "ac_cv_lib_$ac_lib_var=no"
8071 fi
8072 rm -f conftest*
8073 xe_check_libs=""
8074
8075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8076   echo "$ac_t""yes" 1>&6
8077   :
8078 else
8079   echo "$ac_t""no" 1>&6
8080 with_tiff=no
8081 fi
8082
8083  }
8084   test -z "$with_tiff" && with_tiff=yes
8085   if test "$with_tiff" = "yes"; then
8086     { test "$extra_verbose" = "yes" && cat << \EOF
8087     Defining HAVE_TIFF
8088 EOF
8089 cat >> confdefs.h <<\EOF
8090 #define HAVE_TIFF 1
8091 EOF
8092 }
8093
8094     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8095   fi
8096 fi
8097
8098
8099 if test "$with_x11" = "yes"; then
8100
8101   echo "checking for X11 graphics libraries" 1>&6
8102 echo "configure:8103: checking for X11 graphics libraries" >&5
8103
8104   echo "checking for the Athena widgets" 1>&6
8105 echo "configure:8106: checking for the Athena widgets" >&5
8106
8107     case "$with_athena" in
8108         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8109     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8110     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8111     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8112     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8113     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8114   esac
8115
8116     if test "$athena_3d" = "no"; then
8117     
8118 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8119 echo "configure:8120: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8120 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8121
8122 xe_check_libs=" -l$athena_variant "
8123 cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 /* Override any gcc2 internal prototype to avoid an error.  */
8127 /* We use char because int might match the return type of a gcc2
8128     builtin and then its argument prototype would still apply.  */
8129 char XawScrollbarSetThumb();
8130
8131 int main() {
8132 XawScrollbarSetThumb()
8133 ; return 0; }
8134 EOF
8135 if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8136   rm -rf conftest*
8137   eval "ac_cv_lib_$ac_lib_var=yes"
8138 else
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141   rm -rf conftest*
8142   eval "ac_cv_lib_$ac_lib_var=no"
8143 fi
8144 rm -f conftest*
8145 xe_check_libs=""
8146
8147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8148   echo "$ac_t""yes" 1>&6
8149           
8150 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8151 echo "configure:8152: checking for threeDClassRec in -l$athena_variant" >&5
8152 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8153
8154 xe_check_libs=" -l$athena_variant "
8155 cat > conftest.$ac_ext <<EOF
8156 #line 8157 "configure"
8157 #include "confdefs.h"
8158 /* Override any gcc2 internal prototype to avoid an error.  */
8159 /* We use char because int might match the return type of a gcc2
8160     builtin and then its argument prototype would still apply.  */
8161 char threeDClassRec();
8162
8163 int main() {
8164 threeDClassRec()
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8168   rm -rf conftest*
8169   eval "ac_cv_lib_$ac_lib_var=yes"
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_lib_$ac_lib_var=no"
8175 fi
8176 rm -f conftest*
8177 xe_check_libs=""
8178
8179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8180   echo "$ac_t""yes" 1>&6
8181   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8182 else
8183   echo "$ac_t""no" 1>&6
8184 athena_lib=$athena_variant
8185 fi
8186
8187
8188       
8189 else
8190   echo "$ac_t""no" 1>&6
8191 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8192 fi
8193
8194
8195   else
8196         
8197 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8198 echo "configure:8199: checking for threeDClassRec in -l$athena_variant" >&5
8199 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8200
8201 xe_check_libs=" -l$athena_variant "
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char threeDClassRec();
8209
8210 int main() {
8211 threeDClassRec()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 xe_check_libs=""
8225
8226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8227   echo "$ac_t""yes" 1>&6
8228   athena_lib=$athena_variant
8229 else
8230   echo "$ac_t""no" 1>&6
8231 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8232 echo "configure:8233: checking for threeDClassRec in -lXaw" >&5
8233 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8234
8235 xe_check_libs=" -lXaw "
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   athena_lib=Xaw;
8263           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8264         
8265 else
8266   echo "$ac_t""no" 1>&6
8267 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8268 fi
8269
8270
8271 fi
8272
8273
8274   fi
8275
8276     if test "$athena_3d" = "no"; then
8277     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8278 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8279 echo "configure:8280: checking for X11/Xaw/ThreeD.h" >&5
8280
8281 cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <X11/Xaw/ThreeD.h>
8285 EOF
8286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8287 { (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8289 if test -z "$ac_err"; then
8290   rm -rf conftest*
8291   eval "ac_cv_header_$ac_safe=yes"
8292 else
8293   echo "$ac_err" >&5
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8303 else
8304   echo "$ac_t""no" 1>&6
8305 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8306 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8307 echo "configure:8308: checking for X11/Xaw/XawInit.h" >&5
8308
8309 cat > conftest.$ac_ext <<EOF
8310 #line 8311 "configure"
8311 #include "confdefs.h"
8312 #include <X11/Xaw/XawInit.h>
8313 EOF
8314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8315 { (eval echo configure:8316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8317 if test -z "$ac_err"; then
8318   rm -rf conftest*
8319   eval "ac_cv_header_$ac_safe=yes"
8320 else
8321   echo "$ac_err" >&5
8322   echo "configure: failed program was:" >&5
8323   cat conftest.$ac_ext >&5
8324   rm -rf conftest*
8325   eval "ac_cv_header_$ac_safe=no"
8326 fi
8327 rm -f conftest*
8328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8329   echo "$ac_t""yes" 1>&6
8330   athena_h_path=X11/Xaw
8331 else
8332   echo "$ac_t""no" 1>&6
8333 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8334 fi
8335
8336 fi
8337
8338   else
8339             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8340 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8341 echo "configure:8342: checking for X11/$athena_variant/XawInit.h" >&5
8342
8343 cat > conftest.$ac_ext <<EOF
8344 #line 8345 "configure"
8345 #include "confdefs.h"
8346 #include <X11/$athena_variant/XawInit.h>
8347 EOF
8348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8349 { (eval echo configure:8350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8351 if test -z "$ac_err"; then
8352   rm -rf conftest*
8353   eval "ac_cv_header_$ac_safe=yes"
8354 else
8355   echo "$ac_err" >&5
8356   echo "configure: failed program was:" >&5
8357   cat conftest.$ac_ext >&5
8358   rm -rf conftest*
8359   eval "ac_cv_header_$ac_safe=no"
8360 fi
8361 rm -f conftest*
8362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8363   echo "$ac_t""yes" 1>&6
8364   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8365 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8366 echo "configure:8367: checking for X11/$athena_variant/ThreeD.h" >&5
8367
8368 cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 #include <X11/$athena_variant/ThreeD.h>
8372 EOF
8373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8374 { (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8376 if test -z "$ac_err"; then
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=yes"
8379 else
8380   echo "$ac_err" >&5
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   eval "ac_cv_header_$ac_safe=no"
8385 fi
8386 rm -f conftest*
8387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8388   echo "$ac_t""yes" 1>&6
8389   athena_h_path=X11/$athena_variant
8390 else
8391   echo "$ac_t""no" 1>&6
8392 fi
8393
8394 else
8395   echo "$ac_t""no" 1>&6
8396 fi
8397
8398
8399         if test -z "$athena_h_path"; then
8400       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8401 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8402 echo "configure:8403: checking for $athena_variant/XawInit.h" >&5
8403
8404 cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 #include <$athena_variant/XawInit.h>
8408 EOF
8409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8410 { (eval echo configure:8411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8412 if test -z "$ac_err"; then
8413   rm -rf conftest*
8414   eval "ac_cv_header_$ac_safe=yes"
8415 else
8416   echo "$ac_err" >&5
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=no"
8421 fi
8422 rm -f conftest*
8423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8424   echo "$ac_t""yes" 1>&6
8425   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8426 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8427 echo "configure:8428: checking for $athena_variant/ThreeD.h" >&5
8428
8429 cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <$athena_variant/ThreeD.h>
8433 EOF
8434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8435 { (eval echo configure:8436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8437 if test -z "$ac_err"; then
8438   rm -rf conftest*
8439   eval "ac_cv_header_$ac_safe=yes"
8440 else
8441   echo "$ac_err" >&5
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -rf conftest*
8445   eval "ac_cv_header_$ac_safe=no"
8446 fi
8447 rm -f conftest*
8448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8449   echo "$ac_t""yes" 1>&6
8450   athena_h_path=$athena_variant
8451 else
8452   echo "$ac_t""no" 1>&6
8453 fi
8454
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458
8459     fi
8460
8461         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8462       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8463 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8464 echo "configure:8465: checking for X11/Xaw3d/XawInit.h" >&5
8465
8466 cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 #include <X11/Xaw3d/XawInit.h>
8470 EOF
8471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8472 { (eval echo configure:8473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8474 if test -z "$ac_err"; then
8475   rm -rf conftest*
8476   eval "ac_cv_header_$ac_safe=yes"
8477 else
8478   echo "$ac_err" >&5
8479   echo "configure: failed program was:" >&5
8480   cat conftest.$ac_ext >&5
8481   rm -rf conftest*
8482   eval "ac_cv_header_$ac_safe=no"
8483 fi
8484 rm -f conftest*
8485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8486   echo "$ac_t""yes" 1>&6
8487   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8488 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8489 echo "configure:8490: checking for X11/Xaw3d/ThreeD.h" >&5
8490
8491 cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 #include <X11/Xaw3d/ThreeD.h>
8495 EOF
8496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8497 { (eval echo configure:8498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8499 if test -z "$ac_err"; then
8500   rm -rf conftest*
8501   eval "ac_cv_header_$ac_safe=yes"
8502 else
8503   echo "$ac_err" >&5
8504   echo "configure: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   rm -rf conftest*
8507   eval "ac_cv_header_$ac_safe=no"
8508 fi
8509 rm -f conftest*
8510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8511   echo "$ac_t""yes" 1>&6
8512   
8513             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8514             athena_h_path=X11/Xaw3d
8515           
8516 else
8517   echo "$ac_t""no" 1>&6
8518 fi
8519
8520 else
8521   echo "$ac_t""no" 1>&6
8522 fi
8523
8524     fi
8525
8526         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8527       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8528 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8529 echo "configure:8530: checking for Xaw3d/XawInit.h" >&5
8530
8531 cat > conftest.$ac_ext <<EOF
8532 #line 8533 "configure"
8533 #include "confdefs.h"
8534 #include <Xaw3d/XawInit.h>
8535 EOF
8536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8537 { (eval echo configure:8538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8539 if test -z "$ac_err"; then
8540   rm -rf conftest*
8541   eval "ac_cv_header_$ac_safe=yes"
8542 else
8543   echo "$ac_err" >&5
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   eval "ac_cv_header_$ac_safe=no"
8548 fi
8549 rm -f conftest*
8550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8551   echo "$ac_t""yes" 1>&6
8552   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8553 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8554 echo "configure:8555: checking for Xaw3d/ThreeD.h" >&5
8555
8556 cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 #include <Xaw3d/ThreeD.h>
8560 EOF
8561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8562 { (eval echo configure:8563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8564 if test -z "$ac_err"; then
8565   rm -rf conftest*
8566   eval "ac_cv_header_$ac_safe=yes"
8567 else
8568   echo "$ac_err" >&5
8569   echo "configure: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   rm -rf conftest*
8572   eval "ac_cv_header_$ac_safe=no"
8573 fi
8574 rm -f conftest*
8575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8576   echo "$ac_t""yes" 1>&6
8577   
8578             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8579             athena_h_path=Xaw3d
8580           
8581 else
8582   echo "$ac_t""no" 1>&6
8583 fi
8584
8585 else
8586   echo "$ac_t""no" 1>&6
8587 fi
8588
8589     fi
8590
8591             if test -z "$athena_h_path"; then
8592       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8593 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8594 echo "configure:8595: checking for X11/Xaw/ThreeD.h" >&5
8595
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <X11/Xaw/ThreeD.h>
8600 EOF
8601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8602 { (eval echo configure:8603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8604 if test -z "$ac_err"; then
8605   rm -rf conftest*
8606   eval "ac_cv_header_$ac_safe=yes"
8607 else
8608   echo "$ac_err" >&5
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -rf conftest*
8612   eval "ac_cv_header_$ac_safe=no"
8613 fi
8614 rm -f conftest*
8615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617   
8618           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8619           athena_h_path=X11/Xaw
8620         
8621 else
8622   echo "$ac_t""no" 1>&6
8623 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8624 fi
8625
8626     fi
8627   fi
8628
8629     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8630     have_xaw=yes
8631   else
8632     have_xaw=no
8633   fi
8634
8635     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8636 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8637 echo "configure:8638: checking for Xm/Xm.h" >&5
8638
8639 cat > conftest.$ac_ext <<EOF
8640 #line 8641 "configure"
8641 #include "confdefs.h"
8642 #include <Xm/Xm.h>
8643 EOF
8644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8645 { (eval echo configure:8646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8647 if test -z "$ac_err"; then
8648   rm -rf conftest*
8649   eval "ac_cv_header_$ac_safe=yes"
8650 else
8651   echo "$ac_err" >&5
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654   rm -rf conftest*
8655   eval "ac_cv_header_$ac_safe=no"
8656 fi
8657 rm -f conftest*
8658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   
8661 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8662 echo "configure:8663: checking for XmStringFree in -lXm" >&5
8663 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8664
8665 xe_check_libs=" -lXm "
8666 cat > conftest.$ac_ext <<EOF
8667 #line 8668 "configure"
8668 #include "confdefs.h"
8669 /* Override any gcc2 internal prototype to avoid an error.  */
8670 /* We use char because int might match the return type of a gcc2
8671     builtin and then its argument prototype would still apply.  */
8672 char XmStringFree();
8673
8674 int main() {
8675 XmStringFree()
8676 ; return 0; }
8677 EOF
8678 if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8679   rm -rf conftest*
8680   eval "ac_cv_lib_$ac_lib_var=yes"
8681 else
8682   echo "configure: failed program was:" >&5
8683   cat conftest.$ac_ext >&5
8684   rm -rf conftest*
8685   eval "ac_cv_lib_$ac_lib_var=no"
8686 fi
8687 rm -f conftest*
8688 xe_check_libs=""
8689
8690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8691   echo "$ac_t""yes" 1>&6
8692   have_motif=yes
8693 else
8694   echo "$ac_t""no" 1>&6
8695 have_motif=no
8696 fi
8697
8698
8699 else
8700   echo "$ac_t""no" 1>&6
8701 have_motif=no
8702 fi
8703
8704
8705   if test "$have_motif" = "yes"; then
8706         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8707 echo "configure:8708: checking for Lesstif" >&5
8708     cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 #include <Xm/Xm.h>
8712 #ifdef LESSTIF_VERSION
8713 yes
8714 #endif
8715
8716 EOF
8717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8718   egrep "yes" >/dev/null 2>&1; then
8719   rm -rf conftest*
8720   have_lesstif=yes
8721 else
8722   rm -rf conftest*
8723   have_lesstif=no
8724 fi
8725 rm -f conftest*
8726
8727   echo "$ac_t""$have_lesstif" 1>&6
8728   fi
8729
8730 fi 
8731
8732 case "$with_menubars" in "" | "yes" | "athena" )
8733   with_menubars="lucid" ;;
8734 esac
8735 case "$with_dialogs" in "" | "yes" | "lucid" )
8736   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8737   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8738   else with_dialogs=no
8739   fi ;;
8740 esac
8741 case "$with_scrollbars" in "" | "yes" )
8742   with_scrollbars="lucid" ;;
8743 esac
8744 case "$with_widgets" in "" | "yes" | "lucid")
8745   if   test "$have_motif" = "yes"; then with_widgets="motif"
8746   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8747   else with_widgets=no
8748   fi ;;
8749 esac
8750
8751 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8752
8753 case "$all_widgets" in
8754   *athena* )
8755     if test "$have_xaw" != "yes"; then
8756       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8757     fi
8758
8759         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8760
8761         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8762
8763                     { test "$extra_verbose" = "yes" && cat << EOF
8764     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8765 EOF
8766 cat >> confdefs.h <<EOF
8767 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8768 EOF
8769 }
8770
8771     { test "$extra_verbose" = "yes" && cat << EOF
8772     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8773 EOF
8774 cat >> confdefs.h <<EOF
8775 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8776 EOF
8777 }
8778
8779     { test "$extra_verbose" = "yes" && cat << EOF
8780     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8781 EOF
8782 cat >> confdefs.h <<EOF
8783 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8784 EOF
8785 }
8786
8787     { test "$extra_verbose" = "yes" && cat << EOF
8788     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8789 EOF
8790 cat >> confdefs.h <<EOF
8791 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8792 EOF
8793 }
8794
8795     { test "$extra_verbose" = "yes" && cat << EOF
8796     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8797 EOF
8798 cat >> confdefs.h <<EOF
8799 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8800 EOF
8801 }
8802
8803     { test "$extra_verbose" = "yes" && cat << EOF
8804     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8805 EOF
8806 cat >> confdefs.h <<EOF
8807 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8808 EOF
8809 }
8810
8811     { test "$extra_verbose" = "yes" && cat << EOF
8812     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8813 EOF
8814 cat >> confdefs.h <<EOF
8815 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8816 EOF
8817 }
8818
8819     { test "$extra_verbose" = "yes" && cat << EOF
8820     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8821 EOF
8822 cat >> confdefs.h <<EOF
8823 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8824 EOF
8825 }
8826
8827     { test "$extra_verbose" = "yes" && cat << EOF
8828     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8829 EOF
8830 cat >> confdefs.h <<EOF
8831 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8832 EOF
8833 }
8834
8835     { test "$extra_verbose" = "yes" && cat << EOF
8836     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8837 EOF
8838 cat >> confdefs.h <<EOF
8839 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8840 EOF
8841 }
8842
8843
8844     { test "$extra_verbose" = "yes" && cat << \EOF
8845     Defining LWLIB_USES_ATHENA
8846 EOF
8847 cat >> confdefs.h <<\EOF
8848 #define LWLIB_USES_ATHENA 1
8849 EOF
8850 }
8851
8852     { test "$extra_verbose" = "yes" && cat << \EOF
8853     Defining NEED_ATHENA
8854 EOF
8855 cat >> confdefs.h <<\EOF
8856 #define NEED_ATHENA 1
8857 EOF
8858 }
8859
8860     need_athena="yes"
8861
8862     if test "$athena_3d" = "yes"; then
8863       { test "$extra_verbose" = "yes" && cat << \EOF
8864     Defining HAVE_ATHENA_3D
8865 EOF
8866 cat >> confdefs.h <<\EOF
8867 #define HAVE_ATHENA_3D 1
8868 EOF
8869 }
8870
8871     fi
8872   ;;
8873 esac
8874
8875 case "$all_widgets" in *motif* )
8876   { test "$extra_verbose" = "yes" && cat << \EOF
8877     Defining LWLIB_USES_MOTIF
8878 EOF
8879 cat >> confdefs.h <<\EOF
8880 #define LWLIB_USES_MOTIF 1
8881 EOF
8882 }
8883
8884   { test "$extra_verbose" = "yes" && cat << \EOF
8885     Defining NEED_MOTIF
8886 EOF
8887 cat >> confdefs.h <<\EOF
8888 #define NEED_MOTIF 1
8889 EOF
8890 }
8891
8892   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8893   need_motif=yes ;;
8894 esac
8895
8896 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8897 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8898 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8899 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8900         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8901 case "$with_widgets" in athena* )
8902         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;;
8903 esac
8904 case "$all_widgets" in *lucid* )
8905   { test "$extra_verbose" = "yes" && cat << \EOF
8906     Defining NEED_LUCID
8907 EOF
8908 cat >> confdefs.h <<\EOF
8909 #define NEED_LUCID 1
8910 EOF
8911 }
8912
8913   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8914 esac
8915
8916
8917
8918 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8919     Defining LWLIB_SCROLLBARS_ATHENA
8920 EOF
8921 cat >> confdefs.h <<\EOF
8922 #define LWLIB_SCROLLBARS_ATHENA 1
8923 EOF
8924 }
8925
8926 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8927     Defining LWLIB_DIALOGS_ATHENA
8928 EOF
8929 cat >> confdefs.h <<\EOF
8930 #define LWLIB_DIALOGS_ATHENA 1
8931 EOF
8932 }
8933
8934
8935 if test "$athena_3d" = "yes"; then
8936   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8937     Defining LWLIB_SCROLLBARS_ATHENA3D
8938 EOF
8939 cat >> confdefs.h <<\EOF
8940 #define LWLIB_SCROLLBARS_ATHENA3D 1
8941 EOF
8942 }
8943
8944   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8945     Defining LWLIB_DIALOGS_ATHENA3D
8946 EOF
8947 cat >> confdefs.h <<\EOF
8948 #define LWLIB_DIALOGS_ATHENA3D 1
8949 EOF
8950 }
8951
8952 fi
8953
8954 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8955     Defining LWLIB_WIDGETS_ATHENA
8956 EOF
8957 cat >> confdefs.h <<\EOF
8958 #define LWLIB_WIDGETS_ATHENA 1
8959 EOF
8960 }
8961 ;; esac
8962 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8963         { test "$extra_verbose" = "yes" && cat << \EOF
8964     Defining LWLIB_TABS_LUCID
8965 EOF
8966 cat >> confdefs.h <<\EOF
8967 #define LWLIB_TABS_LUCID 1
8968 EOF
8969 }
8970
8971
8972 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8973     Defining HAVE_MENUBARS
8974 EOF
8975 cat >> confdefs.h <<\EOF
8976 #define HAVE_MENUBARS 1
8977 EOF
8978 }
8979
8980 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8981     Defining HAVE_SCROLLBARS
8982 EOF
8983 cat >> confdefs.h <<\EOF
8984 #define HAVE_SCROLLBARS 1
8985 EOF
8986 }
8987
8988 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8989     Defining HAVE_DIALOGS
8990 EOF
8991 cat >> confdefs.h <<\EOF
8992 #define HAVE_DIALOGS 1
8993 EOF
8994 }
8995
8996 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8997     Defining HAVE_TOOLBARS
8998 EOF
8999 cat >> confdefs.h <<\EOF
9000 #define HAVE_TOOLBARS 1
9001 EOF
9002 }
9003
9004 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9005     Defining HAVE_WIDGETS
9006 EOF
9007 cat >> confdefs.h <<\EOF
9008 #define HAVE_WIDGETS 1
9009 EOF
9010 }
9011
9012
9013 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9014     Defining LWLIB_MENUBARS_LUCID
9015 EOF
9016 cat >> confdefs.h <<\EOF
9017 #define LWLIB_MENUBARS_LUCID 1
9018 EOF
9019 }
9020
9021 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9022     Defining LWLIB_SCROLLBARS_LUCID
9023 EOF
9024 cat >> confdefs.h <<\EOF
9025 #define LWLIB_SCROLLBARS_LUCID 1
9026 EOF
9027 }
9028
9029
9030 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9031     Defining LWLIB_MENUBARS_MOTIF
9032 EOF
9033 cat >> confdefs.h <<\EOF
9034 #define LWLIB_MENUBARS_MOTIF 1
9035 EOF
9036 }
9037
9038 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9039     Defining LWLIB_SCROLLBARS_MOTIF
9040 EOF
9041 cat >> confdefs.h <<\EOF
9042 #define LWLIB_SCROLLBARS_MOTIF 1
9043 EOF
9044 }
9045
9046 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9047     Defining LWLIB_DIALOGS_MOTIF
9048 EOF
9049 cat >> confdefs.h <<\EOF
9050 #define LWLIB_DIALOGS_MOTIF 1
9051 EOF
9052 }
9053
9054 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9055     Defining LWLIB_WIDGETS_MOTIF
9056 EOF
9057 cat >> confdefs.h <<\EOF
9058 #define LWLIB_WIDGETS_MOTIF 1
9059 EOF
9060 }
9061
9062
9063 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9064    echo "    xemacs will be linked with \"menubar.o\""
9065  fi
9066 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9067    echo "    xemacs will be linked with \"scrollbar.o\""
9068  fi
9069 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9070    echo "    xemacs will be linked with \"dialog.o\""
9071  fi
9072 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9073    echo "    xemacs will be linked with \"toolbar.o\""
9074  fi
9075
9076 if test "$with_x11" = "yes"; then
9077   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9078    echo "    xemacs will be linked with \"menubar-x.o\""
9079  fi
9080   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9081    echo "    xemacs will be linked with \"scrollbar-x.o\""
9082  fi
9083   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9084    echo "    xemacs will be linked with \"dialog-x.o\""
9085  fi
9086   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9087    echo "    xemacs will be linked with \"toolbar-x.o\""
9088  fi
9089   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9090    echo "    xemacs will be linked with \"gui-x.o\""
9091  fi
9092 fi
9093
9094
9095 test -z "$with_mule" && with_mule=no
9096 test -z "$with_file_coding" && with_file_coding=no
9097
9098
9099 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9100   { test "$extra_verbose" = "yes" && cat << \EOF
9101     Defining FILE_CODING
9102 EOF
9103 cat >> confdefs.h <<\EOF
9104 #define FILE_CODING 1
9105 EOF
9106 }
9107
9108   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9109    echo "    xemacs will be linked with \"file-coding.o\""
9110  fi
9111 fi
9112
9113 if test "$with_mule" = "yes" ; then
9114   echo "checking for Mule-related features" 1>&6
9115 echo "configure:9116: checking for Mule-related features" >&5
9116   { test "$extra_verbose" = "yes" && cat << \EOF
9117     Defining MULE
9118 EOF
9119 cat >> confdefs.h <<\EOF
9120 #define MULE 1
9121 EOF
9122 }
9123
9124   { test "$extra_verbose" = "yes" && cat << \EOF
9125     Defining FILE_CODING
9126 EOF
9127 cat >> confdefs.h <<\EOF
9128 #define FILE_CODING 1
9129 EOF
9130 }
9131
9132   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9133    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9134  fi
9135   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9136     { test "$extra_verbose" = "yes" && cat << \EOF
9137     Defining TEXT_CODING
9138 EOF
9139 cat >> confdefs.h <<\EOF
9140 #define TEXT_CODING 1
9141 EOF
9142 }
9143
9144     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9145    echo "    xemacs will be linked with \"text-coding.o\""
9146  fi
9147   else
9148     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9149    echo "    xemacs will be linked with \"file-coding.o\""
9150  fi
9151   fi
9152     for ac_hdr in libintl.h
9153 do
9154 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9155 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9156 echo "configure:9157: checking for $ac_hdr" >&5
9157
9158 cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161 #include <$ac_hdr>
9162 EOF
9163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9164 { (eval echo configure:9165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9166 if test -z "$ac_err"; then
9167   rm -rf conftest*
9168   eval "ac_cv_header_$ac_safe=yes"
9169 else
9170   echo "$ac_err" >&5
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_header_$ac_safe=no"
9175 fi
9176 rm -f conftest*
9177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9178   echo "$ac_t""yes" 1>&6
9179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9180   { test "$extra_verbose" = "yes" && cat << EOF
9181     Defining $ac_tr_hdr
9182 EOF
9183 cat >> confdefs.h <<EOF
9184 #define $ac_tr_hdr 1
9185 EOF
9186 }
9187  
9188 else
9189   echo "$ac_t""no" 1>&6
9190 fi
9191 done
9192
9193   
9194 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9195 echo "configure:9196: checking for strerror in -lintl" >&5
9196 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9197
9198 xe_check_libs=" -lintl "
9199 cat > conftest.$ac_ext <<EOF
9200 #line 9201 "configure"
9201 #include "confdefs.h"
9202 /* Override any gcc2 internal prototype to avoid an error.  */
9203 /* We use char because int might match the return type of a gcc2
9204     builtin and then its argument prototype would still apply.  */
9205 char strerror();
9206
9207 int main() {
9208 strerror()
9209 ; return 0; }
9210 EOF
9211 if { (eval echo configure:9212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9212   rm -rf conftest*
9213   eval "ac_cv_lib_$ac_lib_var=yes"
9214 else
9215   echo "configure: failed program was:" >&5
9216   cat conftest.$ac_ext >&5
9217   rm -rf conftest*
9218   eval "ac_cv_lib_$ac_lib_var=no"
9219 fi
9220 rm -f conftest*
9221 xe_check_libs=""
9222
9223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9224   echo "$ac_t""yes" 1>&6
9225     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9226     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9227   { test "$extra_verbose" = "yes" && cat << EOF
9228     Defining $ac_tr_lib
9229 EOF
9230 cat >> confdefs.h <<EOF
9231 #define $ac_tr_lib 1
9232 EOF
9233 }
9234
9235   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9236
9237 else
9238   echo "$ac_t""no" 1>&6
9239 fi
9240
9241
9242
9243   if test "$with_utf_2000" = "yes" ; then
9244     { test "$extra_verbose" = "yes" && cat << \EOF
9245     Defining CHAR_IS_UCS4
9246 EOF
9247 cat >> confdefs.h <<\EOF
9248 #define CHAR_IS_UCS4 1
9249 EOF
9250 }
9251
9252     { test "$extra_verbose" = "yes" && cat << \EOF
9253     Defining UTF2000
9254 EOF
9255 cat >> confdefs.h <<\EOF
9256 #define UTF2000 1
9257 EOF
9258 }
9259
9260     { test "$extra_verbose" = "yes" && cat << \EOF
9261     Defining HAVE_GGC
9262 EOF
9263 cat >> confdefs.h <<\EOF
9264 #define HAVE_GGC 1
9265 EOF
9266 }
9267
9268   fi
9269
9270   echo "checking for Mule input methods" 1>&6
9271 echo "configure:9272: checking for Mule input methods" >&5
9272         case "$with_xim" in "" | "yes" )
9273     echo "checking for XIM" 1>&6
9274 echo "configure:9275: checking for XIM" >&5
9275     
9276 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9277 echo "configure:9278: checking for XOpenIM in -lX11" >&5
9278 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9279
9280 xe_check_libs=" -lX11 "
9281 cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284 /* Override any gcc2 internal prototype to avoid an error.  */
9285 /* We use char because int might match the return type of a gcc2
9286     builtin and then its argument prototype would still apply.  */
9287 char XOpenIM();
9288
9289 int main() {
9290 XOpenIM()
9291 ; return 0; }
9292 EOF
9293 if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9294   rm -rf conftest*
9295   eval "ac_cv_lib_$ac_lib_var=yes"
9296 else
9297   echo "configure: failed program was:" >&5
9298   cat conftest.$ac_ext >&5
9299   rm -rf conftest*
9300   eval "ac_cv_lib_$ac_lib_var=no"
9301 fi
9302 rm -f conftest*
9303 xe_check_libs=""
9304
9305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9306   echo "$ac_t""yes" 1>&6
9307   with_xim=xlib
9308 else
9309   echo "$ac_t""no" 1>&6
9310 with_xim=no
9311 fi
9312
9313
9314         if test "$have_motif $have_lesstif" = "yes no"; then
9315       
9316 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9317 echo "configure:9318: checking for XmImMbLookupString in -lXm" >&5
9318 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9319
9320 xe_check_libs=" -lXm "
9321 cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9324 /* Override any gcc2 internal prototype to avoid an error.  */
9325 /* We use char because int might match the return type of a gcc2
9326     builtin and then its argument prototype would still apply.  */
9327 char XmImMbLookupString();
9328
9329 int main() {
9330 XmImMbLookupString()
9331 ; return 0; }
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=yes"
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -rf conftest*
9340   eval "ac_cv_lib_$ac_lib_var=no"
9341 fi
9342 rm -f conftest*
9343 xe_check_libs=""
9344
9345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9346   echo "$ac_t""yes" 1>&6
9347   with_xim=motif
9348 else
9349   echo "$ac_t""no" 1>&6
9350 fi
9351
9352
9353     fi ;;
9354   esac
9355   if test "$with_xim" != "no"; then
9356     { test "$extra_verbose" = "yes" && cat << \EOF
9357     Defining HAVE_XIM
9358 EOF
9359 cat >> confdefs.h <<\EOF
9360 #define HAVE_XIM 1
9361 EOF
9362 }
9363
9364     if test "$with_xim" = "xlib"; then
9365       { test "$extra_verbose" = "yes" && cat << \EOF
9366     Defining XIM_XLIB
9367 EOF
9368 cat >> confdefs.h <<\EOF
9369 #define XIM_XLIB 1
9370 EOF
9371 }
9372
9373       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9374    echo "    xemacs will be linked with \"input-method-xlib.o\""
9375  fi
9376     fi
9377     if test "$with_xim" = "motif"; then
9378       { test "$extra_verbose" = "yes" && cat << \EOF
9379     Defining XIM_MOTIF
9380 EOF
9381 cat >> confdefs.h <<\EOF
9382 #define XIM_MOTIF 1
9383 EOF
9384 }
9385
9386       need_motif=yes
9387       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9388    echo "    xemacs will be linked with \"input-method-motif.o\""
9389  fi
9390     fi
9391     if test "$with_xim" = "motif"; then
9392       with_xfs=no
9393     fi
9394   fi
9395
9396     if test "$with_xfs" = "yes" ; then
9397     echo "checking for XFontSet" 1>&6
9398 echo "configure:9399: checking for XFontSet" >&5
9399     
9400 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9401 echo "configure:9402: checking for XmbDrawString in -lX11" >&5
9402 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9403
9404 xe_check_libs=" -lX11 "
9405 cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 /* Override any gcc2 internal prototype to avoid an error.  */
9409 /* We use char because int might match the return type of a gcc2
9410     builtin and then its argument prototype would still apply.  */
9411 char XmbDrawString();
9412
9413 int main() {
9414 XmbDrawString()
9415 ; return 0; }
9416 EOF
9417 if { (eval echo configure:9418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9418   rm -rf conftest*
9419   eval "ac_cv_lib_$ac_lib_var=yes"
9420 else
9421   echo "configure: failed program was:" >&5
9422   cat conftest.$ac_ext >&5
9423   rm -rf conftest*
9424   eval "ac_cv_lib_$ac_lib_var=no"
9425 fi
9426 rm -f conftest*
9427 xe_check_libs=""
9428
9429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9430   echo "$ac_t""yes" 1>&6
9431   :
9432 else
9433   echo "$ac_t""no" 1>&6
9434 with_xfs=no
9435 fi
9436
9437
9438     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9439       { test "$extra_verbose" = "yes" && cat << \EOF
9440     Defining USE_XFONTSET
9441 EOF
9442 cat >> confdefs.h <<\EOF
9443 #define USE_XFONTSET 1
9444 EOF
9445 }
9446
9447       if test "$with_xim" = "no" ; then
9448         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9449    echo "    xemacs will be linked with \"input-method-xfs.o\""
9450  fi
9451       fi
9452     fi
9453   fi 
9454     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9455   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9456 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9457 echo "configure:9458: checking for wnn/jllib.h" >&5
9458
9459 cat > conftest.$ac_ext <<EOF
9460 #line 9461 "configure"
9461 #include "confdefs.h"
9462 #include <wnn/jllib.h>
9463 EOF
9464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9465 { (eval echo configure:9466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9467 if test -z "$ac_err"; then
9468   rm -rf conftest*
9469   eval "ac_cv_header_$ac_safe=yes"
9470 else
9471   echo "$ac_err" >&5
9472   echo "configure: failed program was:" >&5
9473   cat conftest.$ac_ext >&5
9474   rm -rf conftest*
9475   eval "ac_cv_header_$ac_safe=no"
9476 fi
9477 rm -f conftest*
9478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9479   echo "$ac_t""yes" 1>&6
9480   :
9481 else
9482   echo "$ac_t""no" 1>&6
9483 with_wnn=no
9484 fi
9485  }
9486     if test "$with_wnn" != "no"; then
9487     for ac_func in crypt
9488 do
9489 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9490 echo "configure:9491: checking for $ac_func" >&5
9491
9492 cat > conftest.$ac_ext <<EOF
9493 #line 9494 "configure"
9494 #include "confdefs.h"
9495 /* System header to define __stub macros and hopefully few prototypes,
9496     which can conflict with char $ac_func(); below.  */
9497 #include <assert.h>
9498 /* Override any gcc2 internal prototype to avoid an error.  */
9499 /* We use char because int might match the return type of a gcc2
9500     builtin and then its argument prototype would still apply.  */
9501 char $ac_func();
9502
9503 int main() {
9504
9505 /* The GNU C library defines this for functions which it implements
9506     to always fail with ENOSYS.  Some functions are actually named
9507     something starting with __ and the normal name is an alias.  */
9508 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9509 choke me
9510 #else
9511 $ac_func();
9512 #endif
9513
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9517   rm -rf conftest*
9518   eval "ac_cv_func_$ac_func=yes"
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   eval "ac_cv_func_$ac_func=no"
9524 fi
9525 rm -f conftest*
9526
9527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9528   echo "$ac_t""yes" 1>&6
9529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9530   { test "$extra_verbose" = "yes" && cat << EOF
9531     Defining $ac_tr_func
9532 EOF
9533 cat >> confdefs.h <<EOF
9534 #define $ac_tr_func 1
9535 EOF
9536 }
9537  
9538 else
9539   echo "$ac_t""no" 1>&6
9540 fi
9541 done
9542
9543     test "$ac_cv_func_crypt" != "yes" && { 
9544 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9545 echo "configure:9546: checking for crypt in -lcrypt" >&5
9546 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9547
9548 xe_check_libs=" -lcrypt "
9549 cat > conftest.$ac_ext <<EOF
9550 #line 9551 "configure"
9551 #include "confdefs.h"
9552 /* Override any gcc2 internal prototype to avoid an error.  */
9553 /* We use char because int might match the return type of a gcc2
9554     builtin and then its argument prototype would still apply.  */
9555 char crypt();
9556
9557 int main() {
9558 crypt()
9559 ; return 0; }
9560 EOF
9561 if { (eval echo configure:9562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9562   rm -rf conftest*
9563   eval "ac_cv_lib_$ac_lib_var=yes"
9564 else
9565   echo "configure: failed program was:" >&5
9566   cat conftest.$ac_ext >&5
9567   rm -rf conftest*
9568   eval "ac_cv_lib_$ac_lib_var=no"
9569 fi
9570 rm -f conftest*
9571 xe_check_libs=""
9572
9573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9574   echo "$ac_t""yes" 1>&6
9575     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9576     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9577   { test "$extra_verbose" = "yes" && cat << EOF
9578     Defining $ac_tr_lib
9579 EOF
9580 cat >> confdefs.h <<EOF
9581 #define $ac_tr_lib 1
9582 EOF
9583 }
9584
9585   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9586
9587 else
9588   echo "$ac_t""no" 1>&6
9589 fi
9590
9591  }
9592   fi
9593     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9594     
9595 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9596 echo "configure:9597: checking for jl_dic_list_e in -lwnn" >&5
9597 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9598
9599 xe_check_libs=" -lwnn "
9600 cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 /* Override any gcc2 internal prototype to avoid an error.  */
9604 /* We use char because int might match the return type of a gcc2
9605     builtin and then its argument prototype would still apply.  */
9606 char jl_dic_list_e();
9607
9608 int main() {
9609 jl_dic_list_e()
9610 ; return 0; }
9611 EOF
9612 if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9613   rm -rf conftest*
9614   eval "ac_cv_lib_$ac_lib_var=yes"
9615 else
9616   echo "configure: failed program was:" >&5
9617   cat conftest.$ac_ext >&5
9618   rm -rf conftest*
9619   eval "ac_cv_lib_$ac_lib_var=no"
9620 fi
9621 rm -f conftest*
9622 xe_check_libs=""
9623
9624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9625   echo "$ac_t""yes" 1>&6
9626   libwnn=wnn
9627 else
9628   echo "$ac_t""no" 1>&6
9629 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9630 echo "configure:9631: checking for jl_dic_list_e in -lwnn4" >&5
9631 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9632
9633 xe_check_libs=" -lwnn4 "
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 /* Override any gcc2 internal prototype to avoid an error.  */
9638 /* We use char because int might match the return type of a gcc2
9639     builtin and then its argument prototype would still apply.  */
9640 char jl_dic_list_e();
9641
9642 int main() {
9643 jl_dic_list_e()
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9647   rm -rf conftest*
9648   eval "ac_cv_lib_$ac_lib_var=yes"
9649 else
9650   echo "configure: failed program was:" >&5
9651   cat conftest.$ac_ext >&5
9652   rm -rf conftest*
9653   eval "ac_cv_lib_$ac_lib_var=no"
9654 fi
9655 rm -f conftest*
9656 xe_check_libs=""
9657
9658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9659   echo "$ac_t""yes" 1>&6
9660   libwnn=wnn4
9661 else
9662   echo "$ac_t""no" 1>&6
9663 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9664 echo "configure:9665: checking for jl_dic_list_e in -lwnn6" >&5
9665 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9666
9667 xe_check_libs=" -lwnn6 "
9668 cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671 /* Override any gcc2 internal prototype to avoid an error.  */
9672 /* We use char because int might match the return type of a gcc2
9673     builtin and then its argument prototype would still apply.  */
9674 char jl_dic_list_e();
9675
9676 int main() {
9677 jl_dic_list_e()
9678 ; return 0; }
9679 EOF
9680 if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9681   rm -rf conftest*
9682   eval "ac_cv_lib_$ac_lib_var=yes"
9683 else
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -rf conftest*
9687   eval "ac_cv_lib_$ac_lib_var=no"
9688 fi
9689 rm -f conftest*
9690 xe_check_libs=""
9691
9692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9693   echo "$ac_t""yes" 1>&6
9694   libwnn=wnn6
9695 else
9696   echo "$ac_t""no" 1>&6
9697 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9698 echo "configure:9699: checking for dic_list_e in -lwnn6_fromsrc" >&5
9699 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9700
9701 xe_check_libs=" -lwnn6_fromsrc "
9702 cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 /* Override any gcc2 internal prototype to avoid an error.  */
9706 /* We use char because int might match the return type of a gcc2
9707     builtin and then its argument prototype would still apply.  */
9708 char dic_list_e();
9709
9710 int main() {
9711 dic_list_e()
9712 ; return 0; }
9713 EOF
9714 if { (eval echo configure:9715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9715   rm -rf conftest*
9716   eval "ac_cv_lib_$ac_lib_var=yes"
9717 else
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   eval "ac_cv_lib_$ac_lib_var=no"
9722 fi
9723 rm -f conftest*
9724 xe_check_libs=""
9725
9726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9727   echo "$ac_t""yes" 1>&6
9728   libwnn=wnn6_fromsrc
9729 else
9730   echo "$ac_t""no" 1>&6
9731 with_wnn=no
9732 fi
9733
9734
9735 fi
9736
9737
9738 fi
9739
9740
9741 fi
9742
9743
9744   fi
9745   test -z "$with_wnn" && with_wnn=yes
9746   if test "$with_wnn" = "yes"; then
9747     { test "$extra_verbose" = "yes" && cat << \EOF
9748     Defining HAVE_WNN
9749 EOF
9750 cat >> confdefs.h <<\EOF
9751 #define HAVE_WNN 1
9752 EOF
9753 }
9754
9755     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9756     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9757    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9758  fi
9759     if test "$with_wnn6" != "no"; then
9760       
9761 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9762 echo "configure:9763: checking for jl_fi_dic_list in -l$libwnn" >&5
9763 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9764
9765 xe_check_libs=" -l$libwnn "
9766 cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769 /* Override any gcc2 internal prototype to avoid an error.  */
9770 /* We use char because int might match the return type of a gcc2
9771     builtin and then its argument prototype would still apply.  */
9772 char jl_fi_dic_list();
9773
9774 int main() {
9775 jl_fi_dic_list()
9776 ; return 0; }
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9779   rm -rf conftest*
9780   eval "ac_cv_lib_$ac_lib_var=yes"
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -rf conftest*
9785   eval "ac_cv_lib_$ac_lib_var=no"
9786 fi
9787 rm -f conftest*
9788 xe_check_libs=""
9789
9790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9791   echo "$ac_t""yes" 1>&6
9792   with_wnn6=yes
9793 else
9794   echo "$ac_t""no" 1>&6
9795 fi
9796
9797
9798       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9799     Defining WNN6
9800 EOF
9801 cat >> confdefs.h <<\EOF
9802 #define WNN6 1
9803 EOF
9804 }
9805
9806     fi
9807   fi
9808
9809     canna_includes_found=no
9810   if test "$with_canna" != "no"; then
9811     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9812 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9813 echo "configure:9814: checking for canna/jrkanji.h" >&5
9814
9815 cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 #include <canna/jrkanji.h>
9819 EOF
9820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9821 { (eval echo configure:9822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9823 if test -z "$ac_err"; then
9824   rm -rf conftest*
9825   eval "ac_cv_header_$ac_safe=yes"
9826 else
9827   echo "$ac_err" >&5
9828   echo "configure: failed program was:" >&5
9829   cat conftest.$ac_ext >&5
9830   rm -rf conftest*
9831   eval "ac_cv_header_$ac_safe=no"
9832 fi
9833 rm -f conftest*
9834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9835   echo "$ac_t""yes" 1>&6
9836   canna_includes_found=yes
9837 else
9838   echo "$ac_t""no" 1>&6
9839 fi
9840
9841   fi
9842   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9843       -d "/usr/local/canna/include"; then
9844     save_c_switch_site="$c_switch_site"
9845     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9846     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9847 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9848 echo "configure:9849: checking for canna/jrkanji.h" >&5
9849
9850 cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 #include <canna/jrkanji.h>
9854 EOF
9855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9856 { (eval echo configure:9857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9858 if test -z "$ac_err"; then
9859   rm -rf conftest*
9860   eval "ac_cv_header_$ac_safe=yes"
9861 else
9862   echo "$ac_err" >&5
9863   echo "configure: failed program was:" >&5
9864   cat conftest.$ac_ext >&5
9865   rm -rf conftest*
9866   eval "ac_cv_header_$ac_safe=no"
9867 fi
9868 rm -f conftest*
9869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9870   echo "$ac_t""yes" 1>&6
9871   canna_includes_found=yes
9872 else
9873   echo "$ac_t""no" 1>&6
9874 fi
9875
9876     if test "$canna_includes_found" != "yes"; then
9877       c_switch_site="$save_c_switch_site"
9878       with_canna="no"
9879     fi
9880   fi
9881
9882   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9883 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9884 echo "configure:9885: checking for canna/RK.h" >&5
9885
9886 cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889 #include <canna/RK.h>
9890 EOF
9891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9892 { (eval echo configure:9893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9894 if test -z "$ac_err"; then
9895   rm -rf conftest*
9896   eval "ac_cv_header_$ac_safe=yes"
9897 else
9898   echo "$ac_err" >&5
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -rf conftest*
9902   eval "ac_cv_header_$ac_safe=no"
9903 fi
9904 rm -f conftest*
9905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9906   echo "$ac_t""yes" 1>&6
9907   :
9908 else
9909   echo "$ac_t""no" 1>&6
9910 with_canna=no
9911 fi
9912  }
9913   test -z "$with_canna" && { 
9914 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9915 echo "configure:9916: checking for RkBgnBun in -lRKC" >&5
9916 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9917
9918 xe_check_libs=" -lRKC "
9919 cat > conftest.$ac_ext <<EOF
9920 #line 9921 "configure"
9921 #include "confdefs.h"
9922 /* Override any gcc2 internal prototype to avoid an error.  */
9923 /* We use char because int might match the return type of a gcc2
9924     builtin and then its argument prototype would still apply.  */
9925 char RkBgnBun();
9926
9927 int main() {
9928 RkBgnBun()
9929 ; return 0; }
9930 EOF
9931 if { (eval echo configure:9932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9932   rm -rf conftest*
9933   eval "ac_cv_lib_$ac_lib_var=yes"
9934 else
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -rf conftest*
9938   eval "ac_cv_lib_$ac_lib_var=no"
9939 fi
9940 rm -f conftest*
9941 xe_check_libs=""
9942
9943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9944   echo "$ac_t""yes" 1>&6
9945   :
9946 else
9947   echo "$ac_t""no" 1>&6
9948 with_canna=no
9949 fi
9950
9951  }
9952   test -z "$with_canna" && { 
9953 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9954 echo "configure:9955: checking for jrKanjiControl in -lcanna" >&5
9955 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9956
9957 xe_check_libs=" -lcanna "
9958 cat > conftest.$ac_ext <<EOF
9959 #line 9960 "configure"
9960 #include "confdefs.h"
9961 /* Override any gcc2 internal prototype to avoid an error.  */
9962 /* We use char because int might match the return type of a gcc2
9963     builtin and then its argument prototype would still apply.  */
9964 char jrKanjiControl();
9965
9966 int main() {
9967 jrKanjiControl()
9968 ; return 0; }
9969 EOF
9970 if { (eval echo configure:9971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9971   rm -rf conftest*
9972   eval "ac_cv_lib_$ac_lib_var=yes"
9973 else
9974   echo "configure: failed program was:" >&5
9975   cat conftest.$ac_ext >&5
9976   rm -rf conftest*
9977   eval "ac_cv_lib_$ac_lib_var=no"
9978 fi
9979 rm -f conftest*
9980 xe_check_libs=""
9981
9982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9983   echo "$ac_t""yes" 1>&6
9984   :
9985 else
9986   echo "$ac_t""no" 1>&6
9987 with_canna=no
9988 fi
9989
9990  }
9991   test -z "$with_canna" && with_canna=yes
9992   if test "$with_canna" = "yes"; then
9993     { test "$extra_verbose" = "yes" && cat << \EOF
9994     Defining HAVE_CANNA
9995 EOF
9996 cat >> confdefs.h <<\EOF
9997 #define HAVE_CANNA 1
9998 EOF
9999 }
10000
10001     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10002     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10003    echo "    xemacs will be linked with \"mule-canna.o\""
10004  fi
10005   fi
10006
10007 else   for feature in xim canna wnn; do
10008     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10009       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10010     fi
10011     eval "with_${feature}=no"
10012   done
10013 fi 
10014
10015 if test "$need_motif" = "yes" ; then
10016   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10017     
10018 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10019 echo "configure:10020: checking for layout_object_getvalue in -li18n" >&5
10020 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10021
10022 xe_check_libs=" -li18n "
10023 cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 /* Override any gcc2 internal prototype to avoid an error.  */
10027 /* We use char because int might match the return type of a gcc2
10028     builtin and then its argument prototype would still apply.  */
10029 char layout_object_getvalue();
10030
10031 int main() {
10032 layout_object_getvalue()
10033 ; return 0; }
10034 EOF
10035 if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10036   rm -rf conftest*
10037   eval "ac_cv_lib_$ac_lib_var=yes"
10038 else
10039   echo "configure: failed program was:" >&5
10040   cat conftest.$ac_ext >&5
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=no"
10043 fi
10044 rm -f conftest*
10045 xe_check_libs=""
10046
10047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10048   echo "$ac_t""yes" 1>&6
10049   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10050 else
10051   echo "$ac_t""no" 1>&6
10052 fi
10053
10054
10055   
10056 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10057     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10058   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10059   
10060         runpath="" runpath_dirs=""
10061   if test -n "$LD_RUN_PATH"; then
10062     runpath="$LD_RUN_PATH"
10063   elif test "$GCC" = "yes"; then
10064         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10065     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10066     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10067     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10068       case "$arg" in P,* | -L* | -R* )
10069         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10070           {
10071 xe_runpath_dir="$dir"
10072   test "$xe_runpath_dir" != "/lib"     -a \
10073         "$xe_runpath_dir" != "/usr/lib" -a \
10074         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10075   eval "$xe_add_unique_runpath_dir"
10076 }
10077         done ;;
10078       esac
10079     done
10080     ld_switch_run="$ld_switch_run_save"
10081     rm -f conftest*
10082   else
10083         for arg in $ld_switch_site $ld_switch_x_site; do
10084       case "$arg" in -L*) {
10085 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10086   test "$xe_runpath_dir" != "/lib"     -a \
10087         "$xe_runpath_dir" != "/usr/lib" -a \
10088         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10089   eval "$xe_add_unique_runpath_dir"
10090 };; esac
10091     done
10092         if test "$opsys $need_motif" = "sol2 yes"; then
10093       xe_runpath_dir="/opt/SUNWdt/lib";
10094       eval "$xe_add_unique_runpath_dir";
10095     fi
10096   fi 
10097   if test -n "$runpath"; then
10098     ld_switch_run="${dash_r}${runpath}"
10099     
10100 if test "$GCC" = "yes"; then
10101   set x $ld_switch_run; shift; ld_switch_run=""
10102   while test -n "$1"; do
10103     case $1 in
10104       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10105       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10106       -Xlinker* ) ;;
10107       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10108     esac
10109     shift
10110   done
10111 fi
10112     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10113   fi
10114 fi
10115
10116 fi
10117
10118 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
10119 do
10120 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10121 echo "configure:10122: checking for $ac_func" >&5
10122
10123 cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126 /* System header to define __stub macros and hopefully few prototypes,
10127     which can conflict with char $ac_func(); below.  */
10128 #include <assert.h>
10129 /* Override any gcc2 internal prototype to avoid an error.  */
10130 /* We use char because int might match the return type of a gcc2
10131     builtin and then its argument prototype would still apply.  */
10132 char $ac_func();
10133
10134 int main() {
10135
10136 /* The GNU C library defines this for functions which it implements
10137     to always fail with ENOSYS.  Some functions are actually named
10138     something starting with __ and the normal name is an alias.  */
10139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10140 choke me
10141 #else
10142 $ac_func();
10143 #endif
10144
10145 ; return 0; }
10146 EOF
10147 if { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10148   rm -rf conftest*
10149   eval "ac_cv_func_$ac_func=yes"
10150 else
10151   echo "configure: failed program was:" >&5
10152   cat conftest.$ac_ext >&5
10153   rm -rf conftest*
10154   eval "ac_cv_func_$ac_func=no"
10155 fi
10156 rm -f conftest*
10157
10158 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10159   echo "$ac_t""yes" 1>&6
10160     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10161   { test "$extra_verbose" = "yes" && cat << EOF
10162     Defining $ac_tr_func
10163 EOF
10164 cat >> confdefs.h <<EOF
10165 #define $ac_tr_func 1
10166 EOF
10167 }
10168  
10169 else
10170   echo "$ac_t""no" 1>&6
10171 fi
10172 done
10173
10174
10175 for ac_func in getpt _getpt grantpt unlockpt ptsname killpg tcgetpgrp
10176 do
10177 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10178 echo "configure:10179: checking for $ac_func" >&5
10179
10180 cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 /* System header to define __stub macros and hopefully few prototypes,
10184     which can conflict with char $ac_func(); below.  */
10185 #include <assert.h>
10186 /* Override any gcc2 internal prototype to avoid an error.  */
10187 /* We use char because int might match the return type of a gcc2
10188     builtin and then its argument prototype would still apply.  */
10189 char $ac_func();
10190
10191 int main() {
10192
10193 /* The GNU C library defines this for functions which it implements
10194     to always fail with ENOSYS.  Some functions are actually named
10195     something starting with __ and the normal name is an alias.  */
10196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10197 choke me
10198 #else
10199 $ac_func();
10200 #endif
10201
10202 ; return 0; }
10203 EOF
10204 if { (eval echo configure:10205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10205   rm -rf conftest*
10206   eval "ac_cv_func_$ac_func=yes"
10207 else
10208   echo "configure: failed program was:" >&5
10209   cat conftest.$ac_ext >&5
10210   rm -rf conftest*
10211   eval "ac_cv_func_$ac_func=no"
10212 fi
10213 rm -f conftest*
10214
10215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10216   echo "$ac_t""yes" 1>&6
10217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10218   { test "$extra_verbose" = "yes" && cat << EOF
10219     Defining $ac_tr_func
10220 EOF
10221 cat >> confdefs.h <<EOF
10222 #define $ac_tr_func 1
10223 EOF
10224 }
10225  
10226 else
10227   echo "$ac_t""no" 1>&6
10228 fi
10229 done
10230
10231
10232 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10233 echo "configure:10234: checking for openpty" >&5
10234
10235 cat > conftest.$ac_ext <<EOF
10236 #line 10237 "configure"
10237 #include "confdefs.h"
10238 /* System header to define __stub macros and hopefully few prototypes,
10239     which can conflict with char openpty(); below.  */
10240 #include <assert.h>
10241 /* Override any gcc2 internal prototype to avoid an error.  */
10242 /* We use char because int might match the return type of a gcc2
10243     builtin and then its argument prototype would still apply.  */
10244 char openpty();
10245
10246 int main() {
10247
10248 /* The GNU C library defines this for functions which it implements
10249     to always fail with ENOSYS.  Some functions are actually named
10250     something starting with __ and the normal name is an alias.  */
10251 #if defined (__stub_openpty) || defined (__stub___openpty)
10252 choke me
10253 #else
10254 openpty();
10255 #endif
10256
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10260   rm -rf conftest*
10261   eval "ac_cv_func_openpty=yes"
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   eval "ac_cv_func_openpty=no"
10267 fi
10268 rm -f conftest*
10269
10270 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10271   echo "$ac_t""yes" 1>&6
10272   have_openpty=yes
10273 else
10274   echo "$ac_t""no" 1>&6
10275
10276   
10277 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10278 echo "configure:10279: checking for openpty in -lutil" >&5
10279 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10280
10281 xe_check_libs=" -lutil "
10282 cat > conftest.$ac_ext <<EOF
10283 #line 10284 "configure"
10284 #include "confdefs.h"
10285 /* Override any gcc2 internal prototype to avoid an error.  */
10286 /* We use char because int might match the return type of a gcc2
10287     builtin and then its argument prototype would still apply.  */
10288 char openpty();
10289
10290 int main() {
10291 openpty()
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295   rm -rf conftest*
10296   eval "ac_cv_lib_$ac_lib_var=yes"
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   eval "ac_cv_lib_$ac_lib_var=no"
10302 fi
10303 rm -f conftest*
10304 xe_check_libs=""
10305
10306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10307   echo "$ac_t""yes" 1>&6
10308   have_openpty=yes need_libutil=yes
10309 else
10310   echo "$ac_t""no" 1>&6
10311 fi
10312
10313
10314 fi
10315
10316 if test "$have_openpty" = "yes"; then
10317   { test "$extra_verbose" = "yes" && cat << \EOF
10318     Defining HAVE_OPENPTY
10319 EOF
10320 cat >> confdefs.h <<\EOF
10321 #define HAVE_OPENPTY 1
10322 EOF
10323 }
10324
10325   for ac_hdr in pty.h libutil.h
10326 do
10327 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10328 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10329 echo "configure:10330: checking for $ac_hdr" >&5
10330
10331 cat > conftest.$ac_ext <<EOF
10332 #line 10333 "configure"
10333 #include "confdefs.h"
10334 #include <$ac_hdr>
10335 EOF
10336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10337 { (eval echo configure:10338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10339 if test -z "$ac_err"; then
10340   rm -rf conftest*
10341   eval "ac_cv_header_$ac_safe=yes"
10342 else
10343   echo "$ac_err" >&5
10344   echo "configure: failed program was:" >&5
10345   cat conftest.$ac_ext >&5
10346   rm -rf conftest*
10347   eval "ac_cv_header_$ac_safe=no"
10348 fi
10349 rm -f conftest*
10350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10351   echo "$ac_t""yes" 1>&6
10352     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10353   { test "$extra_verbose" = "yes" && cat << EOF
10354     Defining $ac_tr_hdr
10355 EOF
10356 cat >> confdefs.h <<EOF
10357 #define $ac_tr_hdr 1
10358 EOF
10359 }
10360  
10361 else
10362   echo "$ac_t""no" 1>&6
10363 fi
10364 done
10365
10366   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10367 fi
10368
10369 for ac_hdr in sys/stropts.h
10370 do
10371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10373 echo "configure:10374: checking for $ac_hdr" >&5
10374
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 #include <$ac_hdr>
10379 EOF
10380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10381 { (eval echo configure:10382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10383 if test -z "$ac_err"; then
10384   rm -rf conftest*
10385   eval "ac_cv_header_$ac_safe=yes"
10386 else
10387   echo "$ac_err" >&5
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -rf conftest*
10391   eval "ac_cv_header_$ac_safe=no"
10392 fi
10393 rm -f conftest*
10394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10395   echo "$ac_t""yes" 1>&6
10396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10397   { test "$extra_verbose" = "yes" && cat << EOF
10398     Defining $ac_tr_hdr
10399 EOF
10400 cat >> confdefs.h <<EOF
10401 #define $ac_tr_hdr 1
10402 EOF
10403 }
10404  
10405 else
10406   echo "$ac_t""no" 1>&6
10407 fi
10408 done
10409
10410 if test "$ac_cv_header_sys_stropts_h" = "yes"; then
10411   for ac_func in isastream
10412 do
10413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10414 echo "configure:10415: checking for $ac_func" >&5
10415
10416 cat > conftest.$ac_ext <<EOF
10417 #line 10418 "configure"
10418 #include "confdefs.h"
10419 /* System header to define __stub macros and hopefully few prototypes,
10420     which can conflict with char $ac_func(); below.  */
10421 #include <assert.h>
10422 /* Override any gcc2 internal prototype to avoid an error.  */
10423 /* We use char because int might match the return type of a gcc2
10424     builtin and then its argument prototype would still apply.  */
10425 char $ac_func();
10426
10427 int main() {
10428
10429 /* The GNU C library defines this for functions which it implements
10430     to always fail with ENOSYS.  Some functions are actually named
10431     something starting with __ and the normal name is an alias.  */
10432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10433 choke me
10434 #else
10435 $ac_func();
10436 #endif
10437
10438 ; return 0; }
10439 EOF
10440 if { (eval echo configure:10441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10441   rm -rf conftest*
10442   eval "ac_cv_func_$ac_func=yes"
10443 else
10444   echo "configure: failed program was:" >&5
10445   cat conftest.$ac_ext >&5
10446   rm -rf conftest*
10447   eval "ac_cv_func_$ac_func=no"
10448 fi
10449 rm -f conftest*
10450
10451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10452   echo "$ac_t""yes" 1>&6
10453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10454   { test "$extra_verbose" = "yes" && cat << EOF
10455     Defining $ac_tr_func
10456 EOF
10457 cat >> confdefs.h <<EOF
10458 #define $ac_tr_func 1
10459 EOF
10460 }
10461  
10462 else
10463   echo "$ac_t""no" 1>&6
10464 fi
10465 done
10466
10467   for ac_hdr in sys/strtio.h
10468 do
10469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10471 echo "configure:10472: checking for $ac_hdr" >&5
10472
10473 cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476 #include <$ac_hdr>
10477 EOF
10478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10479 { (eval echo configure:10480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10481 if test -z "$ac_err"; then
10482   rm -rf conftest*
10483   eval "ac_cv_header_$ac_safe=yes"
10484 else
10485   echo "$ac_err" >&5
10486   echo "configure: failed program was:" >&5
10487   cat conftest.$ac_ext >&5
10488   rm -rf conftest*
10489   eval "ac_cv_header_$ac_safe=no"
10490 fi
10491 rm -f conftest*
10492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10493   echo "$ac_t""yes" 1>&6
10494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10495   { test "$extra_verbose" = "yes" && cat << EOF
10496     Defining $ac_tr_hdr
10497 EOF
10498 cat >> confdefs.h <<EOF
10499 #define $ac_tr_hdr 1
10500 EOF
10501 }
10502  
10503 else
10504   echo "$ac_t""no" 1>&6
10505 fi
10506 done
10507  fi
10508
10509 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10510    echo "    xemacs will be linked with \"realpath.o\""
10511  fi
10512
10513 for ac_func in getloadavg
10514 do
10515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10516 echo "configure:10517: checking for $ac_func" >&5
10517
10518 cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521 /* System header to define __stub macros and hopefully few prototypes,
10522     which can conflict with char $ac_func(); below.  */
10523 #include <assert.h>
10524 /* Override any gcc2 internal prototype to avoid an error.  */
10525 /* We use char because int might match the return type of a gcc2
10526     builtin and then its argument prototype would still apply.  */
10527 char $ac_func();
10528
10529 int main() {
10530
10531 /* The GNU C library defines this for functions which it implements
10532     to always fail with ENOSYS.  Some functions are actually named
10533     something starting with __ and the normal name is an alias.  */
10534 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10535 choke me
10536 #else
10537 $ac_func();
10538 #endif
10539
10540 ; return 0; }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10543   rm -rf conftest*
10544   eval "ac_cv_func_$ac_func=yes"
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -rf conftest*
10549   eval "ac_cv_func_$ac_func=no"
10550 fi
10551 rm -f conftest*
10552
10553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10554   echo "$ac_t""yes" 1>&6
10555     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10556   { test "$extra_verbose" = "yes" && cat << EOF
10557     Defining $ac_tr_func
10558 EOF
10559 cat >> confdefs.h <<EOF
10560 #define $ac_tr_func 1
10561 EOF
10562 }
10563  
10564 else
10565   echo "$ac_t""no" 1>&6
10566 fi
10567 done
10568
10569
10570 if test "$ac_cv_func_getloadavg" = "yes"; then
10571         for ac_hdr in sys/loadavg.h
10572 do
10573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10575 echo "configure:10576: checking for $ac_hdr" >&5
10576
10577 cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580 #include <$ac_hdr>
10581 EOF
10582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10583 { (eval echo configure:10584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10585 if test -z "$ac_err"; then
10586   rm -rf conftest*
10587   eval "ac_cv_header_$ac_safe=yes"
10588 else
10589   echo "$ac_err" >&5
10590   echo "configure: failed program was:" >&5
10591   cat conftest.$ac_ext >&5
10592   rm -rf conftest*
10593   eval "ac_cv_header_$ac_safe=no"
10594 fi
10595 rm -f conftest*
10596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10597   echo "$ac_t""yes" 1>&6
10598     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10599   { test "$extra_verbose" = "yes" && cat << EOF
10600     Defining $ac_tr_hdr
10601 EOF
10602 cat >> confdefs.h <<EOF
10603 #define $ac_tr_hdr 1
10604 EOF
10605 }
10606  
10607 else
10608   echo "$ac_t""no" 1>&6
10609 fi
10610 done
10611
10612 else
10613     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10614    echo "    xemacs will be linked with \"getloadavg.o\""
10615  fi
10616
10617     
10618 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10619 echo "configure:10620: checking for kstat_open in -lkstat" >&5
10620 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10621
10622 xe_check_libs=" -lkstat "
10623 cat > conftest.$ac_ext <<EOF
10624 #line 10625 "configure"
10625 #include "confdefs.h"
10626 /* Override any gcc2 internal prototype to avoid an error.  */
10627 /* We use char because int might match the return type of a gcc2
10628     builtin and then its argument prototype would still apply.  */
10629 char kstat_open();
10630
10631 int main() {
10632 kstat_open()
10633 ; return 0; }
10634 EOF
10635 if { (eval echo configure:10636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10636   rm -rf conftest*
10637   eval "ac_cv_lib_$ac_lib_var=yes"
10638 else
10639   echo "configure: failed program was:" >&5
10640   cat conftest.$ac_ext >&5
10641   rm -rf conftest*
10642   eval "ac_cv_lib_$ac_lib_var=no"
10643 fi
10644 rm -f conftest*
10645 xe_check_libs=""
10646
10647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10648   echo "$ac_t""yes" 1>&6
10649     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10650     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10651   { test "$extra_verbose" = "yes" && cat << EOF
10652     Defining $ac_tr_lib
10653 EOF
10654 cat >> confdefs.h <<EOF
10655 #define $ac_tr_lib 1
10656 EOF
10657 }
10658
10659   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10660
10661 else
10662   echo "$ac_t""no" 1>&6
10663 fi
10664
10665
10666   for ac_hdr in kstat.h
10667 do
10668 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10669 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10670 echo "configure:10671: checking for $ac_hdr" >&5
10671
10672 cat > conftest.$ac_ext <<EOF
10673 #line 10674 "configure"
10674 #include "confdefs.h"
10675 #include <$ac_hdr>
10676 EOF
10677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10678 { (eval echo configure:10679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10680 if test -z "$ac_err"; then
10681   rm -rf conftest*
10682   eval "ac_cv_header_$ac_safe=yes"
10683 else
10684   echo "$ac_err" >&5
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_header_$ac_safe=no"
10689 fi
10690 rm -f conftest*
10691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10692   echo "$ac_t""yes" 1>&6
10693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10694   { test "$extra_verbose" = "yes" && cat << EOF
10695     Defining $ac_tr_hdr
10696 EOF
10697 cat >> confdefs.h <<EOF
10698 #define $ac_tr_hdr 1
10699 EOF
10700 }
10701  
10702 else
10703   echo "$ac_t""no" 1>&6
10704 fi
10705 done
10706
10707
10708     
10709 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10710 echo "configure:10711: checking for kvm_read in -lkvm" >&5
10711 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10712
10713 xe_check_libs=" -lkvm "
10714 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717 /* Override any gcc2 internal prototype to avoid an error.  */
10718 /* We use char because int might match the return type of a gcc2
10719     builtin and then its argument prototype would still apply.  */
10720 char kvm_read();
10721
10722 int main() {
10723 kvm_read()
10724 ; return 0; }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=yes"
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_lib_$ac_lib_var=no"
10734 fi
10735 rm -f conftest*
10736 xe_check_libs=""
10737
10738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10739   echo "$ac_t""yes" 1>&6
10740     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10741     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10742   { test "$extra_verbose" = "yes" && cat << EOF
10743     Defining $ac_tr_lib
10744 EOF
10745 cat >> confdefs.h <<EOF
10746 #define $ac_tr_lib 1
10747 EOF
10748 }
10749
10750   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10751
10752 else
10753   echo "$ac_t""no" 1>&6
10754 fi
10755
10756
10757 fi
10758
10759 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10760 echo "configure:10761: checking whether netdb declares h_errno" >&5
10761 cat > conftest.$ac_ext <<EOF
10762 #line 10763 "configure"
10763 #include "confdefs.h"
10764 #include <netdb.h>
10765 int main() {
10766 return h_errno;
10767 ; return 0; }
10768 EOF
10769 if { (eval echo configure:10770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10770   rm -rf conftest*
10771   echo "$ac_t""yes" 1>&6
10772    { test "$extra_verbose" = "yes" && cat << \EOF
10773     Defining HAVE_H_ERRNO
10774 EOF
10775 cat >> confdefs.h <<\EOF
10776 #define HAVE_H_ERRNO 1
10777 EOF
10778 }
10779
10780 else
10781   echo "configure: failed program was:" >&5
10782   cat conftest.$ac_ext >&5
10783   rm -rf conftest*
10784   echo "$ac_t""no" 1>&6
10785 fi
10786 rm -f conftest*
10787
10788 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10789 echo "configure:10790: checking for sigsetjmp" >&5
10790 cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <setjmp.h>
10794 int main() {
10795 sigjmp_buf bar; sigsetjmp (bar, 0);
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10799   rm -rf conftest*
10800   echo "$ac_t""yes" 1>&6
10801    { test "$extra_verbose" = "yes" && cat << \EOF
10802     Defining HAVE_SIGSETJMP
10803 EOF
10804 cat >> confdefs.h <<\EOF
10805 #define HAVE_SIGSETJMP 1
10806 EOF
10807 }
10808
10809 else
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   echo "$ac_t""no" 1>&6
10814 fi
10815 rm -f conftest*
10816
10817 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10818 echo "configure:10819: checking whether localtime caches TZ" >&5
10819
10820 if test "$ac_cv_func_tzset" = "yes"; then
10821 cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 #include <time.h>
10825 #if STDC_HEADERS
10826 # include <stdlib.h>
10827 #endif
10828 extern char **environ;
10829 unset_TZ ()
10830 {
10831   char **from, **to;
10832   for (to = from = environ; (*to = *from); from++)
10833     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10834       to++;
10835 }
10836 char TZ_GMT0[] = "TZ=GMT0";
10837 char TZ_PST8[] = "TZ=PST8";
10838 main()
10839 {
10840   time_t now = time ((time_t *) 0);
10841   int hour_GMT0, hour_unset;
10842   if (putenv (TZ_GMT0) != 0)
10843     exit (1);
10844   hour_GMT0 = localtime (&now)->tm_hour;
10845   unset_TZ ();
10846   hour_unset = localtime (&now)->tm_hour;
10847   if (putenv (TZ_PST8) != 0)
10848     exit (1);
10849   if (localtime (&now)->tm_hour == hour_GMT0)
10850     exit (1);
10851   unset_TZ ();
10852   if (localtime (&now)->tm_hour != hour_unset)
10853     exit (1);
10854   exit (0);
10855 }
10856 EOF
10857 if { (eval echo configure:10858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10858 then
10859   emacs_cv_localtime_cache=no
10860 else
10861   conftest_rc="$?"
10862   echo "configure: failed program was:" >&5
10863   cat conftest.$ac_ext >&5
10864   rm -fr conftest*
10865   emacs_cv_localtime_cache=yes
10866 fi
10867 rm -fr conftest*
10868 else
10869         # If we lack tzset, report that localtime does not cache TZ,
10870         # since we can't invalidate the cache if we don't have tzset.
10871         emacs_cv_localtime_cache=no
10872 fi
10873 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10874 if test $emacs_cv_localtime_cache = yes; then
10875   { test "$extra_verbose" = "yes" && cat << \EOF
10876     Defining LOCALTIME_CACHE
10877 EOF
10878 cat >> confdefs.h <<\EOF
10879 #define LOCALTIME_CACHE 1
10880 EOF
10881 }
10882
10883 fi
10884
10885 if test "$HAVE_TIMEVAL" = "yes"; then
10886 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10887 echo "configure:10888: checking whether gettimeofday accepts one or two arguments" >&5
10888 cat > conftest.$ac_ext <<EOF
10889 #line 10890 "configure"
10890 #include "confdefs.h"
10891
10892 #ifdef TIME_WITH_SYS_TIME
10893 #include <sys/time.h>
10894 #include <time.h>
10895 #else
10896 #ifdef HAVE_SYS_TIME_H
10897 #include <sys/time.h>
10898 #else
10899 #include <time.h>
10900 #endif
10901 #endif
10902   
10903 int main() {
10904
10905   struct timeval time;
10906   gettimeofday (&time, 0);
10907
10908 ; return 0; }
10909 EOF
10910 if { (eval echo configure:10911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10911   rm -rf conftest*
10912   echo "$ac_t""two" 1>&6
10913 else
10914   echo "configure: failed program was:" >&5
10915   cat conftest.$ac_ext >&5
10916   rm -rf conftest*
10917   echo "$ac_t""one" 1>&6
10918    { test "$extra_verbose" = "yes" && cat << \EOF
10919     Defining GETTIMEOFDAY_ONE_ARGUMENT
10920 EOF
10921 cat >> confdefs.h <<\EOF
10922 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10923 EOF
10924 }
10925
10926 fi
10927 rm -f conftest*
10928 fi
10929
10930
10931 echo $ac_n "checking for inline""... $ac_c" 1>&6
10932 echo "configure:10933: checking for inline" >&5
10933
10934 ac_cv_c_inline=no
10935 for ac_kw in inline __inline__ __inline; do
10936   cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939
10940 int main() {
10941 } $ac_kw foo() {
10942 ; return 0; }
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10945   rm -rf conftest*
10946   ac_cv_c_inline=$ac_kw; break
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950 fi
10951 rm -f conftest*
10952 done
10953
10954
10955 echo "$ac_t""$ac_cv_c_inline" 1>&6
10956 case "$ac_cv_c_inline" in
10957   inline | yes) ;;
10958   no) { test "$extra_verbose" = "yes" && cat << \EOF
10959     Defining inline = 
10960 EOF
10961 cat >> confdefs.h <<\EOF
10962 #define inline 
10963 EOF
10964 }
10965  ;;
10966   *)  { test "$extra_verbose" = "yes" && cat << EOF
10967     Defining inline = $ac_cv_c_inline
10968 EOF
10969 cat >> confdefs.h <<EOF
10970 #define inline $ac_cv_c_inline
10971 EOF
10972 }
10973  ;;
10974 esac
10975
10976 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10977    echo "    xemacs will be linked with \"inline.o\""
10978  fi
10979
10980
10981 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10982 # for constant arguments.  Useless!
10983 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10984 echo "configure:10985: checking for working alloca.h" >&5
10985
10986 cat > conftest.$ac_ext <<EOF
10987 #line 10988 "configure"
10988 #include "confdefs.h"
10989 #include <alloca.h>
10990 int main() {
10991 char *p = alloca(2 * sizeof(int));
10992 ; return 0; }
10993 EOF
10994 if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10995   rm -rf conftest*
10996   ac_cv_header_alloca_h=yes
10997 else
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   ac_cv_header_alloca_h=no
11002 fi
11003 rm -f conftest*
11004
11005 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11006 if test $ac_cv_header_alloca_h = yes; then
11007   { test "$extra_verbose" = "yes" && cat << \EOF
11008     Defining HAVE_ALLOCA_H
11009 EOF
11010 cat >> confdefs.h <<\EOF
11011 #define HAVE_ALLOCA_H 1
11012 EOF
11013 }
11014
11015 fi
11016
11017 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11018 echo "configure:11019: checking for alloca" >&5
11019
11020 cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023
11024 #ifdef __GNUC__
11025 # define alloca __builtin_alloca
11026 #else
11027 # ifdef _MSC_VER
11028 #  include <malloc.h>
11029 #  define alloca _alloca
11030 # else
11031 #  if HAVE_ALLOCA_H
11032 #   include <alloca.h>
11033 #  else
11034 #   ifdef _AIX
11035  #pragma alloca
11036 #   else
11037 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11038 char *alloca ();
11039 #    endif
11040 #   endif
11041 #  endif
11042 # endif
11043 #endif
11044
11045 int main() {
11046 char *p = (char *) alloca(1);
11047 ; return 0; }
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11050   rm -rf conftest*
11051   ac_cv_func_alloca_works=yes
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -rf conftest*
11056   ac_cv_func_alloca_works=no
11057 fi
11058 rm -f conftest*
11059
11060 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11061 if test $ac_cv_func_alloca_works = yes; then
11062   { test "$extra_verbose" = "yes" && cat << \EOF
11063     Defining HAVE_ALLOCA
11064 EOF
11065 cat >> confdefs.h <<\EOF
11066 #define HAVE_ALLOCA 1
11067 EOF
11068 }
11069
11070 fi
11071
11072 if test $ac_cv_func_alloca_works = no; then
11073   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11074   # that cause trouble.  Some versions do not even contain alloca or
11075   # contain a buggy version.  If you still want to use their alloca,
11076   # use ar to extract alloca.o from them instead of compiling alloca.c.
11077   ALLOCA=alloca.${ac_objext}
11078   { test "$extra_verbose" = "yes" && cat << \EOF
11079     Defining C_ALLOCA
11080 EOF
11081 cat >> confdefs.h <<\EOF
11082 #define C_ALLOCA 1
11083 EOF
11084 }
11085
11086
11087 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11088 echo "configure:11089: checking whether alloca needs Cray hooks" >&5
11089
11090 cat > conftest.$ac_ext <<EOF
11091 #line 11092 "configure"
11092 #include "confdefs.h"
11093 #if defined(CRAY) && ! defined(CRAY2)
11094 webecray
11095 #else
11096 wenotbecray
11097 #endif
11098
11099 EOF
11100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11101   egrep "webecray" >/dev/null 2>&1; then
11102   rm -rf conftest*
11103   ac_cv_os_cray=yes
11104 else
11105   rm -rf conftest*
11106   ac_cv_os_cray=no
11107 fi
11108 rm -f conftest*
11109
11110
11111 echo "$ac_t""$ac_cv_os_cray" 1>&6
11112 if test $ac_cv_os_cray = yes; then
11113 for ac_func in _getb67 GETB67 getb67; do
11114   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11115 echo "configure:11116: checking for $ac_func" >&5
11116
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120 /* System header to define __stub macros and hopefully few prototypes,
11121     which can conflict with char $ac_func(); below.  */
11122 #include <assert.h>
11123 /* Override any gcc2 internal prototype to avoid an error.  */
11124 /* We use char because int might match the return type of a gcc2
11125     builtin and then its argument prototype would still apply.  */
11126 char $ac_func();
11127
11128 int main() {
11129
11130 /* The GNU C library defines this for functions which it implements
11131     to always fail with ENOSYS.  Some functions are actually named
11132     something starting with __ and the normal name is an alias.  */
11133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11134 choke me
11135 #else
11136 $ac_func();
11137 #endif
11138
11139 ; return 0; }
11140 EOF
11141 if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11142   rm -rf conftest*
11143   eval "ac_cv_func_$ac_func=yes"
11144 else
11145   echo "configure: failed program was:" >&5
11146   cat conftest.$ac_ext >&5
11147   rm -rf conftest*
11148   eval "ac_cv_func_$ac_func=no"
11149 fi
11150 rm -f conftest*
11151
11152 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154   { test "$extra_verbose" = "yes" && cat << EOF
11155     Defining CRAY_STACKSEG_END = $ac_func
11156 EOF
11157 cat >> confdefs.h <<EOF
11158 #define CRAY_STACKSEG_END $ac_func
11159 EOF
11160 }
11161
11162   break
11163 else
11164   echo "$ac_t""no" 1>&6
11165 fi
11166
11167 done
11168 fi
11169
11170 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11171 echo "configure:11172: checking stack direction for C alloca" >&5
11172
11173 cat > conftest.$ac_ext <<EOF
11174 #line 11175 "configure"
11175 #include "confdefs.h"
11176 find_stack_direction ()
11177 {
11178   static char *addr = 0;
11179   auto char dummy;
11180   if (addr == 0)
11181     {
11182       addr = &dummy;
11183       return find_stack_direction ();
11184     }
11185   else
11186     return (&dummy > addr) ? 1 : -1;
11187 }
11188 main ()
11189 {
11190   exit (find_stack_direction() < 0);
11191 }
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11194 then
11195   ac_cv_c_stack_direction=1
11196 else
11197   conftest_rc="$?"
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -fr conftest*
11201   ac_cv_c_stack_direction=-1
11202 fi
11203 rm -fr conftest*
11204
11205 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11206 { test "$extra_verbose" = "yes" && cat << EOF
11207     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11208 EOF
11209 cat >> confdefs.h <<EOF
11210 #define STACK_DIRECTION $ac_cv_c_stack_direction
11211 EOF
11212 }
11213
11214 fi
11215
11216 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11217    echo "    xemacs will be linked with \"$ALLOCA\""
11218  fi
11219
11220 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11221 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11222 echo "configure:11223: checking for vfork.h" >&5
11223
11224 cat > conftest.$ac_ext <<EOF
11225 #line 11226 "configure"
11226 #include "confdefs.h"
11227 #include <vfork.h>
11228 EOF
11229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11230 { (eval echo configure:11231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11232 if test -z "$ac_err"; then
11233   rm -rf conftest*
11234   eval "ac_cv_header_$ac_safe=yes"
11235 else
11236   echo "$ac_err" >&5
11237   echo "configure: failed program was:" >&5
11238   cat conftest.$ac_ext >&5
11239   rm -rf conftest*
11240   eval "ac_cv_header_$ac_safe=no"
11241 fi
11242 rm -f conftest*
11243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11244   echo "$ac_t""yes" 1>&6
11245   { test "$extra_verbose" = "yes" && cat << \EOF
11246     Defining HAVE_VFORK_H
11247 EOF
11248 cat >> confdefs.h <<\EOF
11249 #define HAVE_VFORK_H 1
11250 EOF
11251 }
11252
11253 else
11254   echo "$ac_t""no" 1>&6
11255 fi
11256
11257 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11258 echo "configure:11259: checking for working vfork" >&5
11259
11260 cat > conftest.$ac_ext <<EOF
11261 #line 11262 "configure"
11262 #include "confdefs.h"
11263 /* Thanks to Paul Eggert for this test.  */
11264 #include <stdio.h>
11265 #include <sys/types.h>
11266 #include <sys/stat.h>
11267 #ifdef HAVE_UNISTD_H
11268 #include <unistd.h>
11269 #endif
11270 #ifdef HAVE_VFORK_H
11271 #include <vfork.h>
11272 #endif
11273 /* On some sparc systems, changes by the child to local and incoming
11274    argument registers are propagated back to the parent.
11275    The compiler is told about this with #include <vfork.h>,
11276    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11277    Test for this by using a static variable whose address
11278    is put into a register that is clobbered by the vfork.  */
11279 static
11280 #ifdef __cplusplus
11281 sparc_address_test (int arg)
11282 #else
11283 sparc_address_test (arg) int arg;
11284 #endif
11285 {
11286   static pid_t child;
11287   if (!child) {
11288     child = vfork ();
11289     if (child < 0) {
11290       perror ("vfork");
11291       _exit(2);
11292     }
11293     if (!child) {
11294       arg = getpid();
11295       write(-1, "", 0);
11296       _exit (arg);
11297     }
11298   }
11299 }
11300 main() {
11301   pid_t parent = getpid ();
11302   pid_t child;
11303
11304   sparc_address_test ();
11305
11306   child = vfork ();
11307
11308   if (child == 0) {
11309     /* Here is another test for sparc vfork register problems.
11310        This test uses lots of local variables, at least
11311        as many local variables as main has allocated so far
11312        including compiler temporaries.  4 locals are enough for
11313        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11314        A buggy compiler should reuse the register of parent
11315        for one of the local variables, since it will think that
11316        parent can't possibly be used any more in this routine.
11317        Assigning to the local variable will thus munge parent
11318        in the parent process.  */
11319     pid_t
11320       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11321       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11322     /* Convince the compiler that p..p7 are live; otherwise, it might
11323        use the same hardware register for all 8 local variables.  */
11324     if (p != p1 || p != p2 || p != p3 || p != p4
11325         || p != p5 || p != p6 || p != p7)
11326       _exit(1);
11327
11328     /* On some systems (e.g. IRIX 3.3),
11329        vfork doesn't separate parent from child file descriptors.
11330        If the child closes a descriptor before it execs or exits,
11331        this munges the parent's descriptor as well.
11332        Test for this by closing stdout in the child.  */
11333     _exit(close(fileno(stdout)) != 0);
11334   } else {
11335     int status;
11336     struct stat st;
11337
11338     while (wait(&status) != child)
11339       ;
11340     exit(
11341          /* Was there some problem with vforking?  */
11342          child < 0
11343
11344          /* Did the child fail?  (This shouldn't happen.)  */
11345          || status
11346
11347          /* Did the vfork/compiler bug occur?  */
11348          || parent != getpid()
11349
11350          /* Did the file descriptor bug occur?  */
11351          || fstat(fileno(stdout), &st) != 0
11352          );
11353   }
11354 }
11355 EOF
11356 if { (eval echo configure:11357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11357 then
11358   ac_cv_func_vfork_works=yes
11359 else
11360   conftest_rc="$?"
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -fr conftest*
11364   ac_cv_func_vfork_works=no
11365 fi
11366 rm -fr conftest*
11367
11368 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11369 if test $ac_cv_func_vfork_works = no; then
11370   { test "$extra_verbose" = "yes" && cat << \EOF
11371     Defining vfork = fork
11372 EOF
11373 cat >> confdefs.h <<\EOF
11374 #define vfork fork
11375 EOF
11376 }
11377
11378 fi
11379
11380
11381 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11382 echo "configure:11383: checking for working strcoll" >&5
11383
11384 cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387 #include <string.h>
11388 main ()
11389 {
11390   exit (strcoll ("abc", "def") >= 0 ||
11391         strcoll ("ABC", "DEF") >= 0 ||
11392         strcoll ("123", "456") >= 0);
11393 }
11394 EOF
11395 if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11396 then
11397   ac_cv_func_strcoll_works=yes
11398 else
11399   conftest_rc="$?"
11400   echo "configure: failed program was:" >&5
11401   cat conftest.$ac_ext >&5
11402   rm -fr conftest*
11403   ac_cv_func_strcoll_works=no
11404 fi
11405 rm -fr conftest*
11406
11407 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11408 if test $ac_cv_func_strcoll_works = yes; then
11409   { test "$extra_verbose" = "yes" && cat << \EOF
11410     Defining HAVE_STRCOLL
11411 EOF
11412 cat >> confdefs.h <<\EOF
11413 #define HAVE_STRCOLL 1
11414 EOF
11415 }
11416
11417 fi
11418
11419
11420 for ac_func in getpgrp
11421 do
11422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11423 echo "configure:11424: checking for $ac_func" >&5
11424
11425 cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428 /* System header to define __stub macros and hopefully few prototypes,
11429     which can conflict with char $ac_func(); below.  */
11430 #include <assert.h>
11431 /* Override any gcc2 internal prototype to avoid an error.  */
11432 /* We use char because int might match the return type of a gcc2
11433     builtin and then its argument prototype would still apply.  */
11434 char $ac_func();
11435
11436 int main() {
11437
11438 /* The GNU C library defines this for functions which it implements
11439     to always fail with ENOSYS.  Some functions are actually named
11440     something starting with __ and the normal name is an alias.  */
11441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11442 choke me
11443 #else
11444 $ac_func();
11445 #endif
11446
11447 ; return 0; }
11448 EOF
11449 if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11450   rm -rf conftest*
11451   eval "ac_cv_func_$ac_func=yes"
11452 else
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -rf conftest*
11456   eval "ac_cv_func_$ac_func=no"
11457 fi
11458 rm -f conftest*
11459
11460 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11461   echo "$ac_t""yes" 1>&6
11462     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11463   { test "$extra_verbose" = "yes" && cat << EOF
11464     Defining $ac_tr_func
11465 EOF
11466 cat >> confdefs.h <<EOF
11467 #define $ac_tr_func 1
11468 EOF
11469 }
11470  
11471 else
11472   echo "$ac_t""no" 1>&6
11473 fi
11474 done
11475
11476 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11477 echo "configure:11478: checking whether getpgrp takes no argument" >&5
11478
11479 cat > conftest.$ac_ext <<EOF
11480 #line 11481 "configure"
11481 #include "confdefs.h"
11482
11483 /*
11484  * If this system has a BSD-style getpgrp(),
11485  * which takes a pid argument, exit unsuccessfully.
11486  *
11487  * Snarfed from Chet Ramey's bash pgrp.c test program
11488  */
11489 #include <stdio.h>
11490 #include <sys/types.h>
11491
11492 int     pid;
11493 int     pg1, pg2, pg3, pg4;
11494 int     ng, np, s, child;
11495
11496 main()
11497 {
11498         pid = getpid();
11499         pg1 = getpgrp(0);
11500         pg2 = getpgrp();
11501         pg3 = getpgrp(pid);
11502         pg4 = getpgrp(1);
11503
11504         /*
11505          * If all of these values are the same, it's pretty sure that
11506          * we're on a system that ignores getpgrp's first argument.
11507          */
11508         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11509                 exit(0);
11510
11511         child = fork();
11512         if (child < 0)
11513                 exit(1);
11514         else if (child == 0) {
11515                 np = getpid();
11516                 /*
11517                  * If this is Sys V, this will not work; pgrp will be
11518                  * set to np because setpgrp just changes a pgrp to be
11519                  * the same as the pid.
11520                  */
11521                 setpgrp(np, pg1);
11522                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11523                 if (ng == pg1) {
11524                         exit(1);
11525                 } else {
11526                         exit(0);
11527                 }
11528         } else {
11529                 wait(&s);
11530                 exit(s>>8);
11531         }
11532 }
11533
11534 EOF
11535 if { (eval echo configure:11536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11536 then
11537   ac_cv_func_getpgrp_void=yes
11538 else
11539   conftest_rc="$?"
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -fr conftest*
11543   ac_cv_func_getpgrp_void=no
11544 fi
11545 rm -fr conftest*
11546
11547
11548 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11549 if test $ac_cv_func_getpgrp_void = yes; then
11550   { test "$extra_verbose" = "yes" && cat << \EOF
11551     Defining GETPGRP_VOID
11552 EOF
11553 cat >> confdefs.h <<\EOF
11554 #define GETPGRP_VOID 1
11555 EOF
11556 }
11557
11558 fi
11559
11560
11561 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11562 echo "configure:11563: checking for working mmap" >&5
11563 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11564 cat > conftest.$ac_ext <<EOF
11565 #line 11566 "configure"
11566 #include "confdefs.h"
11567 #include <stdio.h>
11568 #include <unistd.h>
11569 #include <fcntl.h>
11570 #include <sys/mman.h>
11571
11572 #ifndef MAP_VARIABLE
11573 #define MAP_VARIABLE 0
11574 #endif
11575
11576 #ifndef MAP_FAILED
11577 #define MAP_FAILED -1
11578 #endif
11579
11580 int main (int argc, char *argv[])
11581 {
11582   int fd = -1;
11583   caddr_t p;
11584 #ifndef MAP_ANONYMOUS
11585   fd = open ("/dev/zero", O_RDWR);
11586   if (fd < 0)
11587     return 1;
11588 #define MAP_ANONYMOUS 0
11589 #endif
11590   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11591            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11592            fd, 0) != (void *) MAP_FAILED)
11593     return 0;
11594   perror ("conftest: mmap failed");
11595   return 1;
11596 }
11597 EOF
11598 if { (eval echo configure:11599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11599 then
11600   have_mmap=yes
11601 else
11602   conftest_rc="$?"
11603   echo "configure: failed program was:" >&5
11604   cat conftest.$ac_ext >&5
11605   rm -fr conftest*
11606   have_mmap=no
11607 fi
11608 rm -fr conftest* ;;
11609 esac
11610 echo "$ac_t""$have_mmap" 1>&6
11611 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11612     Defining HAVE_MMAP
11613 EOF
11614 cat >> confdefs.h <<\EOF
11615 #define HAVE_MMAP 1
11616 EOF
11617 }
11618
11619
11620 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11621 if test "$rel_alloc $have_mmap" = "default yes"; then
11622   if test "$doug_lea_malloc" = "yes"; then
11623         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11624 echo "configure:11625: checking for M_MMAP_THRESHOLD" >&5
11625     cat > conftest.$ac_ext <<EOF
11626 #line 11627 "configure"
11627 #include "confdefs.h"
11628 #include <malloc.h>
11629 int main() {
11630
11631 #ifndef M_MMAP_THRESHOLD
11632 #error No M_MMAP_THRESHOLD :-(
11633 !@+$%^&*_)(_ - unlikely to compile...
11634 #endif
11635
11636 ; return 0; }
11637 EOF
11638 if { (eval echo configure:11639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11639   rm -rf conftest*
11640   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11641 else
11642   echo "configure: failed program was:" >&5
11643   cat conftest.$ac_ext >&5
11644   rm -rf conftest*
11645   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11646 fi
11647 rm -f conftest*
11648   else
11649     rel_alloc=yes
11650   fi
11651 fi
11652 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11653     Defining REL_ALLOC
11654 EOF
11655 cat >> confdefs.h <<\EOF
11656 #define REL_ALLOC 1
11657 EOF
11658 }
11659
11660
11661 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11662 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11663 echo "configure:11664: checking for termios.h" >&5
11664
11665 cat > conftest.$ac_ext <<EOF
11666 #line 11667 "configure"
11667 #include "confdefs.h"
11668 #include <termios.h>
11669 EOF
11670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11671 { (eval echo configure:11672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11673 if test -z "$ac_err"; then
11674   rm -rf conftest*
11675   eval "ac_cv_header_$ac_safe=yes"
11676 else
11677   echo "$ac_err" >&5
11678   echo "configure: failed program was:" >&5
11679   cat conftest.$ac_ext >&5
11680   rm -rf conftest*
11681   eval "ac_cv_header_$ac_safe=no"
11682 fi
11683 rm -f conftest*
11684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11685   echo "$ac_t""yes" 1>&6
11686   { test "$extra_verbose" = "yes" && cat << \EOF
11687     Defining HAVE_TERMIOS
11688 EOF
11689 cat >> confdefs.h <<\EOF
11690 #define HAVE_TERMIOS 1
11691 EOF
11692 }
11693
11694   { test "$extra_verbose" = "yes" && cat << \EOF
11695     Defining SIGNALS_VIA_CHARACTERS
11696 EOF
11697 cat >> confdefs.h <<\EOF
11698 #define SIGNALS_VIA_CHARACTERS 1
11699 EOF
11700 }
11701
11702   { test "$extra_verbose" = "yes" && cat << \EOF
11703     Defining NO_TERMIO
11704 EOF
11705 cat >> confdefs.h <<\EOF
11706 #define NO_TERMIO 1
11707 EOF
11708 }
11709
11710 else
11711   echo "$ac_t""no" 1>&6
11712 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11713 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11714 echo "configure:11715: checking for termio.h" >&5
11715
11716 cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719 #include <termio.h>
11720 EOF
11721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11722 { (eval echo configure:11723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11724 if test -z "$ac_err"; then
11725   rm -rf conftest*
11726   eval "ac_cv_header_$ac_safe=yes"
11727 else
11728   echo "$ac_err" >&5
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -rf conftest*
11732   eval "ac_cv_header_$ac_safe=no"
11733 fi
11734 rm -f conftest*
11735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11736   echo "$ac_t""yes" 1>&6
11737   { test "$extra_verbose" = "yes" && cat << \EOF
11738     Defining HAVE_TERMIO
11739 EOF
11740 cat >> confdefs.h <<\EOF
11741 #define HAVE_TERMIO 1
11742 EOF
11743 }
11744
11745 else
11746   echo "$ac_t""no" 1>&6
11747 fi
11748
11749 fi
11750
11751
11752
11753 echo $ac_n "checking for socket""... $ac_c" 1>&6
11754 echo "configure:11755: checking for socket" >&5
11755
11756 cat > conftest.$ac_ext <<EOF
11757 #line 11758 "configure"
11758 #include "confdefs.h"
11759 /* System header to define __stub macros and hopefully few prototypes,
11760     which can conflict with char socket(); below.  */
11761 #include <assert.h>
11762 /* Override any gcc2 internal prototype to avoid an error.  */
11763 /* We use char because int might match the return type of a gcc2
11764     builtin and then its argument prototype would still apply.  */
11765 char socket();
11766
11767 int main() {
11768
11769 /* The GNU C library defines this for functions which it implements
11770     to always fail with ENOSYS.  Some functions are actually named
11771     something starting with __ and the normal name is an alias.  */
11772 #if defined (__stub_socket) || defined (__stub___socket)
11773 choke me
11774 #else
11775 socket();
11776 #endif
11777
11778 ; return 0; }
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11781   rm -rf conftest*
11782   eval "ac_cv_func_socket=yes"
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   eval "ac_cv_func_socket=no"
11788 fi
11789 rm -f conftest*
11790
11791 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11792   echo "$ac_t""yes" 1>&6
11793   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11794 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11795 echo "configure:11796: checking for netinet/in.h" >&5
11796
11797 cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800 #include <netinet/in.h>
11801 EOF
11802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11803 { (eval echo configure:11804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11805 if test -z "$ac_err"; then
11806   rm -rf conftest*
11807   eval "ac_cv_header_$ac_safe=yes"
11808 else
11809   echo "$ac_err" >&5
11810   echo "configure: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   rm -rf conftest*
11813   eval "ac_cv_header_$ac_safe=no"
11814 fi
11815 rm -f conftest*
11816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11817   echo "$ac_t""yes" 1>&6
11818   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11819 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11820 echo "configure:11821: checking for arpa/inet.h" >&5
11821
11822 cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825 #include <arpa/inet.h>
11826 EOF
11827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11828 { (eval echo configure:11829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11830 if test -z "$ac_err"; then
11831   rm -rf conftest*
11832   eval "ac_cv_header_$ac_safe=yes"
11833 else
11834   echo "$ac_err" >&5
11835   echo "configure: failed program was:" >&5
11836   cat conftest.$ac_ext >&5
11837   rm -rf conftest*
11838   eval "ac_cv_header_$ac_safe=no"
11839 fi
11840 rm -f conftest*
11841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11842   echo "$ac_t""yes" 1>&6
11843   
11844   { test "$extra_verbose" = "yes" && cat << \EOF
11845     Defining HAVE_SOCKETS
11846 EOF
11847 cat >> confdefs.h <<\EOF
11848 #define HAVE_SOCKETS 1
11849 EOF
11850 }
11851
11852       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11853 echo "configure:11854: checking "for sun_len member in struct sockaddr_un"" >&5
11854       cat > conftest.$ac_ext <<EOF
11855 #line 11856 "configure"
11856 #include "confdefs.h"
11857
11858 #include <sys/types.h>
11859 #include <sys/socket.h>
11860 #include <sys/un.h>
11861       
11862 int main() {
11863 static struct sockaddr_un x; x.sun_len = 1;
11864 ; return 0; }
11865 EOF
11866 if { (eval echo configure:11867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11867   rm -rf conftest*
11868   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11869     Defining HAVE_SOCKADDR_SUN_LEN
11870 EOF
11871 cat >> confdefs.h <<\EOF
11872 #define HAVE_SOCKADDR_SUN_LEN 1
11873 EOF
11874 }
11875
11876 else
11877   echo "configure: failed program was:" >&5
11878   cat conftest.$ac_ext >&5
11879   rm -rf conftest*
11880   echo "$ac_t""no" 1>&6
11881 fi
11882 rm -f conftest*
11883       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11884 echo "configure:11885: checking "for ip_mreq struct in netinet/in.h"" >&5
11885       cat > conftest.$ac_ext <<EOF
11886 #line 11887 "configure"
11887 #include "confdefs.h"
11888
11889 #include <sys/types.h>
11890 #include <netinet/in.h>
11891       
11892 int main() {
11893 static struct ip_mreq x;
11894 ; return 0; }
11895 EOF
11896 if { (eval echo configure:11897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11897   rm -rf conftest*
11898   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11899     Defining HAVE_MULTICAST
11900 EOF
11901 cat >> confdefs.h <<\EOF
11902 #define HAVE_MULTICAST 1
11903 EOF
11904 }
11905
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -rf conftest*
11910   echo "$ac_t""no" 1>&6
11911 fi
11912 rm -f conftest*
11913 else
11914   echo "$ac_t""no" 1>&6
11915 fi
11916
11917 else
11918   echo "$ac_t""no" 1>&6
11919 fi
11920
11921 else
11922   echo "$ac_t""no" 1>&6
11923 fi
11924
11925
11926 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11927 echo "configure:11928: checking for msgget" >&5
11928
11929 cat > conftest.$ac_ext <<EOF
11930 #line 11931 "configure"
11931 #include "confdefs.h"
11932 /* System header to define __stub macros and hopefully few prototypes,
11933     which can conflict with char msgget(); below.  */
11934 #include <assert.h>
11935 /* Override any gcc2 internal prototype to avoid an error.  */
11936 /* We use char because int might match the return type of a gcc2
11937     builtin and then its argument prototype would still apply.  */
11938 char msgget();
11939
11940 int main() {
11941
11942 /* The GNU C library defines this for functions which it implements
11943     to always fail with ENOSYS.  Some functions are actually named
11944     something starting with __ and the normal name is an alias.  */
11945 #if defined (__stub_msgget) || defined (__stub___msgget)
11946 choke me
11947 #else
11948 msgget();
11949 #endif
11950
11951 ; return 0; }
11952 EOF
11953 if { (eval echo configure:11954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11954   rm -rf conftest*
11955   eval "ac_cv_func_msgget=yes"
11956 else
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -rf conftest*
11960   eval "ac_cv_func_msgget=no"
11961 fi
11962 rm -f conftest*
11963
11964 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11965   echo "$ac_t""yes" 1>&6
11966   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11967 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11968 echo "configure:11969: checking for sys/ipc.h" >&5
11969
11970 cat > conftest.$ac_ext <<EOF
11971 #line 11972 "configure"
11972 #include "confdefs.h"
11973 #include <sys/ipc.h>
11974 EOF
11975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11976 { (eval echo configure:11977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11978 if test -z "$ac_err"; then
11979   rm -rf conftest*
11980   eval "ac_cv_header_$ac_safe=yes"
11981 else
11982   echo "$ac_err" >&5
11983   echo "configure: failed program was:" >&5
11984   cat conftest.$ac_ext >&5
11985   rm -rf conftest*
11986   eval "ac_cv_header_$ac_safe=no"
11987 fi
11988 rm -f conftest*
11989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11990   echo "$ac_t""yes" 1>&6
11991   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11992 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11993 echo "configure:11994: checking for sys/msg.h" >&5
11994
11995 cat > conftest.$ac_ext <<EOF
11996 #line 11997 "configure"
11997 #include "confdefs.h"
11998 #include <sys/msg.h>
11999 EOF
12000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12001 { (eval echo configure:12002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12003 if test -z "$ac_err"; then
12004   rm -rf conftest*
12005   eval "ac_cv_header_$ac_safe=yes"
12006 else
12007   echo "$ac_err" >&5
12008   echo "configure: failed program was:" >&5
12009   cat conftest.$ac_ext >&5
12010   rm -rf conftest*
12011   eval "ac_cv_header_$ac_safe=no"
12012 fi
12013 rm -f conftest*
12014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12015   echo "$ac_t""yes" 1>&6
12016   { test "$extra_verbose" = "yes" && cat << \EOF
12017     Defining HAVE_SYSVIPC
12018 EOF
12019 cat >> confdefs.h <<\EOF
12020 #define HAVE_SYSVIPC 1
12021 EOF
12022 }
12023
12024 else
12025   echo "$ac_t""no" 1>&6
12026 fi
12027
12028 else
12029   echo "$ac_t""no" 1>&6
12030 fi
12031
12032 else
12033   echo "$ac_t""no" 1>&6
12034 fi
12035
12036
12037 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12038 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12039 echo "configure:12040: checking for dirent.h" >&5
12040
12041 cat > conftest.$ac_ext <<EOF
12042 #line 12043 "configure"
12043 #include "confdefs.h"
12044 #include <dirent.h>
12045 EOF
12046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12047 { (eval echo configure:12048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12049 if test -z "$ac_err"; then
12050   rm -rf conftest*
12051   eval "ac_cv_header_$ac_safe=yes"
12052 else
12053   echo "$ac_err" >&5
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   eval "ac_cv_header_$ac_safe=no"
12058 fi
12059 rm -f conftest*
12060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12061   echo "$ac_t""yes" 1>&6
12062   { test "$extra_verbose" = "yes" && cat << \EOF
12063     Defining SYSV_SYSTEM_DIR
12064 EOF
12065 cat >> confdefs.h <<\EOF
12066 #define SYSV_SYSTEM_DIR 1
12067 EOF
12068 }
12069
12070 else
12071   echo "$ac_t""no" 1>&6
12072 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12073 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12074 echo "configure:12075: checking for sys/dir.h" >&5
12075
12076 cat > conftest.$ac_ext <<EOF
12077 #line 12078 "configure"
12078 #include "confdefs.h"
12079 #include <sys/dir.h>
12080 EOF
12081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12082 { (eval echo configure:12083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12084 if test -z "$ac_err"; then
12085   rm -rf conftest*
12086   eval "ac_cv_header_$ac_safe=yes"
12087 else
12088   echo "$ac_err" >&5
12089   echo "configure: failed program was:" >&5
12090   cat conftest.$ac_ext >&5
12091   rm -rf conftest*
12092   eval "ac_cv_header_$ac_safe=no"
12093 fi
12094 rm -f conftest*
12095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12096   echo "$ac_t""yes" 1>&6
12097   :
12098 else
12099   echo "$ac_t""no" 1>&6
12100 { test "$extra_verbose" = "yes" && cat << \EOF
12101     Defining NONSYSTEM_DIR_LIBRARY
12102 EOF
12103 cat >> confdefs.h <<\EOF
12104 #define NONSYSTEM_DIR_LIBRARY 1
12105 EOF
12106 }
12107
12108 fi
12109
12110 fi
12111
12112
12113 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12114 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12115 echo "configure:12116: checking for nlist.h" >&5
12116
12117 cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120 #include <nlist.h>
12121 EOF
12122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12123 { (eval echo configure:12124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12125 if test -z "$ac_err"; then
12126   rm -rf conftest*
12127   eval "ac_cv_header_$ac_safe=yes"
12128 else
12129   echo "$ac_err" >&5
12130   echo "configure: failed program was:" >&5
12131   cat conftest.$ac_ext >&5
12132   rm -rf conftest*
12133   eval "ac_cv_header_$ac_safe=no"
12134 fi
12135 rm -f conftest*
12136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12137   echo "$ac_t""yes" 1>&6
12138   { test "$extra_verbose" = "yes" && cat << \EOF
12139     Defining NLIST_STRUCT
12140 EOF
12141 cat >> confdefs.h <<\EOF
12142 #define NLIST_STRUCT 1
12143 EOF
12144 }
12145
12146 else
12147   echo "$ac_t""no" 1>&6
12148 fi
12149
12150
12151
12152 echo "checking "for sound support"" 1>&6
12153 echo "configure:12154: checking "for sound support"" >&5
12154 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12155
12156 if test "$with_native_sound" != "no"; then
12157     if test -n "$native_sound_lib"; then
12158     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12159 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12160 echo "configure:12161: checking for multimedia/audio_device.h" >&5
12161
12162 cat > conftest.$ac_ext <<EOF
12163 #line 12164 "configure"
12164 #include "confdefs.h"
12165 #include <multimedia/audio_device.h>
12166 EOF
12167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12168 { (eval echo configure:12169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12170 if test -z "$ac_err"; then
12171   rm -rf conftest*
12172   eval "ac_cv_header_$ac_safe=yes"
12173 else
12174   echo "$ac_err" >&5
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -rf conftest*
12178   eval "ac_cv_header_$ac_safe=no"
12179 fi
12180 rm -f conftest*
12181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12182   echo "$ac_t""yes" 1>&6
12183   sound_found=yes sound_cflags=""
12184       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12185    echo "    xemacs will be linked with \"sunplay.o\""
12186  fi
12187 else
12188   echo "$ac_t""no" 1>&6
12189 fi
12190
12191   fi
12192
12193     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12194     sound_found=yes
12195     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12196    echo "    xemacs will be linked with \"sunplay.o\""
12197  fi
12198     if test -d "/usr/demo/SOUND/include"
12199       then sound_cflags="-I/usr/demo/SOUND/include"
12200       else sound_cflags="-I/usr/demo/SOUND"
12201     fi
12202     if test -z "$native_sound_lib" ; then
12203       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12204         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12205         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12206       fi
12207     fi
12208   fi
12209
12210     if test -z "$sound_found"; then
12211     case "$canonical" in
12212     *-sgi-* )
12213       if test -z "$native_sound_lib"; then
12214         
12215 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12216 echo "configure:12217: checking for ALopenport in -laudio" >&5
12217 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12218
12219 xe_check_libs=" -laudio "
12220 cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 /* Override any gcc2 internal prototype to avoid an error.  */
12224 /* We use char because int might match the return type of a gcc2
12225     builtin and then its argument prototype would still apply.  */
12226 char ALopenport();
12227
12228 int main() {
12229 ALopenport()
12230 ; return 0; }
12231 EOF
12232 if { (eval echo configure:12233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12233   rm -rf conftest*
12234   eval "ac_cv_lib_$ac_lib_var=yes"
12235 else
12236   echo "configure: failed program was:" >&5
12237   cat conftest.$ac_ext >&5
12238   rm -rf conftest*
12239   eval "ac_cv_lib_$ac_lib_var=no"
12240 fi
12241 rm -f conftest*
12242 xe_check_libs=""
12243
12244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12245   echo "$ac_t""yes" 1>&6
12246   native_sound_lib="-laudio"
12247 else
12248   echo "$ac_t""no" 1>&6
12249 fi
12250
12251
12252       fi
12253       if test -n "$native_sound_lib"; then
12254         sound_found=yes sound_cflags=""
12255         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12256    echo "    xemacs will be linked with \"sgiplay.o\""
12257  fi
12258       fi ;;
12259     hppa*-hp-hpux* )
12260       if test -z "$native_sound_lib"; then
12261         
12262 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12263 echo "configure:12264: checking for AOpenAudio in -lAlib" >&5
12264 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12265
12266 xe_check_libs=" -lAlib "
12267 cat > conftest.$ac_ext <<EOF
12268 #line 12269 "configure"
12269 #include "confdefs.h"
12270 /* Override any gcc2 internal prototype to avoid an error.  */
12271 /* We use char because int might match the return type of a gcc2
12272     builtin and then its argument prototype would still apply.  */
12273 char AOpenAudio();
12274
12275 int main() {
12276 AOpenAudio()
12277 ; return 0; }
12278 EOF
12279 if { (eval echo configure:12280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12280   rm -rf conftest*
12281   eval "ac_cv_lib_$ac_lib_var=yes"
12282 else
12283   echo "configure: failed program was:" >&5
12284   cat conftest.$ac_ext >&5
12285   rm -rf conftest*
12286   eval "ac_cv_lib_$ac_lib_var=no"
12287 fi
12288 rm -f conftest*
12289 xe_check_libs=""
12290
12291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12292   echo "$ac_t""yes" 1>&6
12293   native_sound_lib="-lAlib"
12294 else
12295   echo "$ac_t""no" 1>&6
12296 fi
12297
12298
12299       fi
12300       if test -n "$native_sound_lib"; then
12301         sound_found=yes
12302         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12303    echo "    xemacs will be linked with \"hpplay.o\""
12304  fi
12305         if test "$GCC" = "yes" # Kludge city
12306           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12307           else sound_cflags="+e -I/usr/audio/examples"
12308         fi
12309       fi ;;
12310     esac
12311   fi
12312
12313     if test -z "$sound_found"; then
12314     for dir in "machine" "sys" "linux"; do
12315       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12316 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12317 echo "configure:12318: checking for ${dir}/soundcard.h" >&5
12318
12319 cat > conftest.$ac_ext <<EOF
12320 #line 12321 "configure"
12321 #include "confdefs.h"
12322 #include <${dir}/soundcard.h>
12323 EOF
12324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12325 { (eval echo configure:12326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12327 if test -z "$ac_err"; then
12328   rm -rf conftest*
12329   eval "ac_cv_header_$ac_safe=yes"
12330 else
12331   echo "$ac_err" >&5
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -rf conftest*
12335   eval "ac_cv_header_$ac_safe=no"
12336 fi
12337 rm -f conftest*
12338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12339   echo "$ac_t""yes" 1>&6
12340   sound_found=yes
12341        need_miscplay=yes
12342         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12343    echo "    xemacs will be linked with \"linuxplay.o\""
12344  fi
12345         { test "$extra_verbose" = "yes" && cat << EOF
12346     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12347 EOF
12348 cat >> confdefs.h <<EOF
12349 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12350 EOF
12351 }
12352
12353         break
12354 else
12355   echo "$ac_t""no" 1>&6
12356 fi
12357
12358     done
12359   fi
12360
12361     if test -z "$sound_found"; then
12362     if test "$with_msw" = "yes"; then
12363     sound_found=yes
12364     native_sound_lib=
12365     fi
12366   fi
12367
12368   test "$sound_found" = "yes" && with_native_sound=yes
12369 fi
12370
12371 if test "$with_native_sound" = "yes"; then
12372   { test "$extra_verbose" = "yes" && cat << \EOF
12373     Defining HAVE_NATIVE_SOUND
12374 EOF
12375 cat >> confdefs.h <<\EOF
12376 #define HAVE_NATIVE_SOUND 1
12377 EOF
12378 }
12379
12380   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12381 fi
12382
12383 if test "$with_nas_sound" != "no"; then
12384   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12385 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12386 echo "configure:12387: checking for audio/audiolib.h" >&5
12387
12388 cat > conftest.$ac_ext <<EOF
12389 #line 12390 "configure"
12390 #include "confdefs.h"
12391 #include <audio/audiolib.h>
12392 EOF
12393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12394 { (eval echo configure:12395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12396 if test -z "$ac_err"; then
12397   rm -rf conftest*
12398   eval "ac_cv_header_$ac_safe=yes"
12399 else
12400   echo "$ac_err" >&5
12401   echo "configure: failed program was:" >&5
12402   cat conftest.$ac_ext >&5
12403   rm -rf conftest*
12404   eval "ac_cv_header_$ac_safe=no"
12405 fi
12406 rm -f conftest*
12407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12408   echo "$ac_t""yes" 1>&6
12409   
12410     
12411 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12412 echo "configure:12413: checking for AuOpenServer in -laudio" >&5
12413 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12414
12415 xe_check_libs=" -laudio "
12416 cat > conftest.$ac_ext <<EOF
12417 #line 12418 "configure"
12418 #include "confdefs.h"
12419 /* Override any gcc2 internal prototype to avoid an error.  */
12420 /* We use char because int might match the return type of a gcc2
12421     builtin and then its argument prototype would still apply.  */
12422 char AuOpenServer();
12423
12424 int main() {
12425 AuOpenServer()
12426 ; return 0; }
12427 EOF
12428 if { (eval echo configure:12429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12429   rm -rf conftest*
12430   eval "ac_cv_lib_$ac_lib_var=yes"
12431 else
12432   echo "configure: failed program was:" >&5
12433   cat conftest.$ac_ext >&5
12434   rm -rf conftest*
12435   eval "ac_cv_lib_$ac_lib_var=no"
12436 fi
12437 rm -f conftest*
12438 xe_check_libs=""
12439
12440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12441   echo "$ac_t""yes" 1>&6
12442   have_nas_sound=yes
12443 else
12444   echo "$ac_t""no" 1>&6
12445 fi
12446
12447
12448 else
12449   echo "$ac_t""no" 1>&6
12450 fi
12451
12452   if test "$have_nas_sound" = "yes"; then
12453     with_nas_sound=yes
12454     { test "$extra_verbose" = "yes" && cat << \EOF
12455     Defining HAVE_NAS_SOUND
12456 EOF
12457 cat >> confdefs.h <<\EOF
12458 #define HAVE_NAS_SOUND 1
12459 EOF
12460 }
12461
12462     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12463    echo "    xemacs will be linked with \"nas.o\""
12464  fi
12465     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12466             cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 #include <audio/Xtutil.h>
12470 EOF
12471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12472   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12473   :
12474 else
12475   rm -rf conftest*
12476   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12477     Defining NAS_NO_ERROR_JUMP
12478 EOF
12479 cat >> confdefs.h <<\EOF
12480 #define NAS_NO_ERROR_JUMP 1
12481 EOF
12482 }
12483
12484 fi
12485 rm -f conftest*
12486
12487   else
12488     test "$with_nas_sound" = "yes" && \
12489       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12490     with_nas_sound=no
12491   fi
12492 fi
12493
12494 if test "$with_esd_sound" != "no"; then
12495   # Extract the first word of "esd-config", so it can be a program name with args.
12496 set dummy esd-config; ac_word=$2
12497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12498 echo "configure:12499: checking for $ac_word" >&5
12499
12500 if test -n "$have_esd_config"; then
12501   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12502 else
12503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12504   ac_dummy="$PATH"
12505   for ac_dir in $ac_dummy; do
12506     test -z "$ac_dir" && ac_dir=.
12507     if test -f $ac_dir/$ac_word; then
12508       ac_cv_prog_have_esd_config="yes"
12509       break
12510     fi
12511   done
12512   IFS="$ac_save_ifs"
12513   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12514 fi
12515 have_esd_config="$ac_cv_prog_have_esd_config"
12516 if test -n "$have_esd_config"; then
12517   echo "$ac_t""$have_esd_config" 1>&6
12518 else
12519   echo "$ac_t""no" 1>&6
12520 fi
12521
12522   if test "$have_esd_config" = "yes"; then
12523     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12524     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
12525     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12526     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12527 echo "configure:12528: checking for esd_play_stream" >&5
12528
12529 cat > conftest.$ac_ext <<EOF
12530 #line 12531 "configure"
12531 #include "confdefs.h"
12532 /* System header to define __stub macros and hopefully few prototypes,
12533     which can conflict with char esd_play_stream(); below.  */
12534 #include <assert.h>
12535 /* Override any gcc2 internal prototype to avoid an error.  */
12536 /* We use char because int might match the return type of a gcc2
12537     builtin and then its argument prototype would still apply.  */
12538 char esd_play_stream();
12539
12540 int main() {
12541
12542 /* The GNU C library defines this for functions which it implements
12543     to always fail with ENOSYS.  Some functions are actually named
12544     something starting with __ and the normal name is an alias.  */
12545 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12546 choke me
12547 #else
12548 esd_play_stream();
12549 #endif
12550
12551 ; return 0; }
12552 EOF
12553 if { (eval echo configure:12554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12554   rm -rf conftest*
12555   eval "ac_cv_func_esd_play_stream=yes"
12556 else
12557   echo "configure: failed program was:" >&5
12558   cat conftest.$ac_ext >&5
12559   rm -rf conftest*
12560   eval "ac_cv_func_esd_play_stream=no"
12561 fi
12562 rm -f conftest*
12563
12564 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12565   echo "$ac_t""yes" 1>&6
12566   have_esd_sound=yes
12567 else
12568   echo "$ac_t""no" 1>&6
12569 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12570 fi
12571
12572   fi
12573
12574   if test "$have_esd_sound" = "yes"; then
12575     with_esd_sound=yes
12576     need_miscplay=yes
12577     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12578    echo "    xemacs will be linked with \"esd.o\""
12579  fi
12580     { test "$extra_verbose" = "yes" && cat << \EOF
12581     Defining HAVE_ESD_SOUND
12582 EOF
12583 cat >> confdefs.h <<\EOF
12584 #define HAVE_ESD_SOUND 1
12585 EOF
12586 }
12587
12588   else
12589     test "$with_esd_sound" = "yes" && \
12590       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12591     with_esd_sound=no
12592   fi
12593 fi
12594
12595 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12596    echo "    xemacs will be linked with \"miscplay.o\""
12597  fi
12598
12599
12600 test -z "$with_tty" && with_tty=yes
12601
12602 if test "$with_tty" = "yes"  ; then
12603   echo "checking for TTY-related features" 1>&6
12604 echo "configure:12605: checking for TTY-related features" >&5
12605   { test "$extra_verbose" = "yes" && cat << \EOF
12606     Defining HAVE_TTY
12607 EOF
12608 cat >> confdefs.h <<\EOF
12609 #define HAVE_TTY 1
12610 EOF
12611 }
12612
12613   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
12614    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\""
12615  fi
12616
12617     if test -z "$with_ncurses"; then
12618     
12619 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12620 echo "configure:12621: checking for tgetent in -lncurses" >&5
12621 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12622
12623 xe_check_libs=" -lncurses "
12624 cat > conftest.$ac_ext <<EOF
12625 #line 12626 "configure"
12626 #include "confdefs.h"
12627 /* Override any gcc2 internal prototype to avoid an error.  */
12628 /* We use char because int might match the return type of a gcc2
12629     builtin and then its argument prototype would still apply.  */
12630 char tgetent();
12631
12632 int main() {
12633 tgetent()
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_lib_$ac_lib_var=yes"
12639 else
12640   echo "configure: failed program was:" >&5
12641   cat conftest.$ac_ext >&5
12642   rm -rf conftest*
12643   eval "ac_cv_lib_$ac_lib_var=no"
12644 fi
12645 rm -f conftest*
12646 xe_check_libs=""
12647
12648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12649   echo "$ac_t""yes" 1>&6
12650   with_ncurses=yes
12651 else
12652   echo "$ac_t""no" 1>&6
12653 with_ncurses=no
12654 fi
12655
12656
12657   fi
12658   if test "$with_ncurses" = "yes"; then
12659     { test "$extra_verbose" = "yes" && cat << \EOF
12660     Defining HAVE_NCURSES
12661 EOF
12662 cat >> confdefs.h <<\EOF
12663 #define HAVE_NCURSES 1
12664 EOF
12665 }
12666
12667     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12668 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12669 echo "configure:12670: checking for ncurses/curses.h" >&5
12670
12671 cat > conftest.$ac_ext <<EOF
12672 #line 12673 "configure"
12673 #include "confdefs.h"
12674 #include <ncurses/curses.h>
12675 EOF
12676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12677 { (eval echo configure:12678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12679 if test -z "$ac_err"; then
12680   rm -rf conftest*
12681   eval "ac_cv_header_$ac_safe=yes"
12682 else
12683   echo "$ac_err" >&5
12684   echo "configure: failed program was:" >&5
12685   cat conftest.$ac_ext >&5
12686   rm -rf conftest*
12687   eval "ac_cv_header_$ac_safe=no"
12688 fi
12689 rm -f conftest*
12690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12691   echo "$ac_t""yes" 1>&6
12692   curses_h_file=ncurses/curses.h
12693 else
12694   echo "$ac_t""no" 1>&6
12695 fi
12696
12697     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12698 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12699 echo "configure:12700: checking for ncurses/term.h" >&5
12700
12701 cat > conftest.$ac_ext <<EOF
12702 #line 12703 "configure"
12703 #include "confdefs.h"
12704 #include <ncurses/term.h>
12705 EOF
12706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12707 { (eval echo configure:12708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12709 if test -z "$ac_err"; then
12710   rm -rf conftest*
12711   eval "ac_cv_header_$ac_safe=yes"
12712 else
12713   echo "$ac_err" >&5
12714   echo "configure: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   rm -rf conftest*
12717   eval "ac_cv_header_$ac_safe=no"
12718 fi
12719 rm -f conftest*
12720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12721   echo "$ac_t""yes" 1>&6
12722   term_h_file=ncurses/term.h
12723 else
12724   echo "$ac_t""no" 1>&6
12725 fi
12726
12727     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12728    echo "    xemacs will be linked with \"terminfo.o\""
12729  fi
12730     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12731
12732     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12733                         save_c_switch_site="$c_switch_site"
12734       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12735       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12736 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12737 echo "configure:12738: checking for ncurses/curses.h" >&5
12738
12739 cat > conftest.$ac_ext <<EOF
12740 #line 12741 "configure"
12741 #include "confdefs.h"
12742 #include <ncurses/curses.h>
12743 EOF
12744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12745 { (eval echo configure:12746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12747 if test -z "$ac_err"; then
12748   rm -rf conftest*
12749   eval "ac_cv_header_$ac_safe=yes"
12750 else
12751   echo "$ac_err" >&5
12752   echo "configure: failed program was:" >&5
12753   cat conftest.$ac_ext >&5
12754   rm -rf conftest*
12755   eval "ac_cv_header_$ac_safe=no"
12756 fi
12757 rm -f conftest*
12758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12759   echo "$ac_t""yes" 1>&6
12760   curses_h_file=ncurses/curses.h
12761 else
12762   echo "$ac_t""no" 1>&6
12763 fi
12764
12765       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12766         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12767         else c_switch_site="$save_c_switch_site"
12768       fi
12769     fi
12770   else         if test "$have_terminfo" = "yes"; then
12771       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12772    echo "    xemacs will be linked with \"terminfo.o\""
12773  fi
12774       if test -n "$libs_termcap"; then
12775         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12776       else
12777         for lib in curses termlib termcap; do
12778           
12779 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12780 echo "configure:12781: checking for tgetent in -l$lib" >&5
12781 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12782
12783 xe_check_libs=" -l$lib "
12784 cat > conftest.$ac_ext <<EOF
12785 #line 12786 "configure"
12786 #include "confdefs.h"
12787 /* Override any gcc2 internal prototype to avoid an error.  */
12788 /* We use char because int might match the return type of a gcc2
12789     builtin and then its argument prototype would still apply.  */
12790 char tgetent();
12791
12792 int main() {
12793 tgetent()
12794 ; return 0; }
12795 EOF
12796 if { (eval echo configure:12797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12797   rm -rf conftest*
12798   eval "ac_cv_lib_$ac_lib_var=yes"
12799 else
12800   echo "configure: failed program was:" >&5
12801   cat conftest.$ac_ext >&5
12802   rm -rf conftest*
12803   eval "ac_cv_lib_$ac_lib_var=no"
12804 fi
12805 rm -f conftest*
12806 xe_check_libs=""
12807
12808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12809   echo "$ac_t""yes" 1>&6
12810   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12811 else
12812   echo "$ac_t""no" 1>&6
12813 fi
12814
12815
12816         done
12817       fi
12818     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12819    echo "    xemacs will be linked with \"tparam.o\""
12820  fi
12821                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12822       if test -n "$libs_termcap"; then
12823         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12824       else
12825         
12826 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12827 echo "configure:12828: checking for tgetent in -lcurses" >&5
12828 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12829
12830 xe_check_libs=" -lcurses "
12831 cat > conftest.$ac_ext <<EOF
12832 #line 12833 "configure"
12833 #include "confdefs.h"
12834 /* Override any gcc2 internal prototype to avoid an error.  */
12835 /* We use char because int might match the return type of a gcc2
12836     builtin and then its argument prototype would still apply.  */
12837 char tgetent();
12838
12839 int main() {
12840 tgetent()
12841 ; return 0; }
12842 EOF
12843 if { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12844   rm -rf conftest*
12845   eval "ac_cv_lib_$ac_lib_var=yes"
12846 else
12847   echo "configure: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   rm -rf conftest*
12850   eval "ac_cv_lib_$ac_lib_var=no"
12851 fi
12852 rm -f conftest*
12853 xe_check_libs=""
12854
12855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12856   echo "$ac_t""yes" 1>&6
12857   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12858 else
12859   echo "$ac_t""no" 1>&6
12860 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12861 echo "configure:12862: checking for tgetent in -ltermcap" >&5
12862 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12863
12864 xe_check_libs=" -ltermcap "
12865 cat > conftest.$ac_ext <<EOF
12866 #line 12867 "configure"
12867 #include "confdefs.h"
12868 /* Override any gcc2 internal prototype to avoid an error.  */
12869 /* We use char because int might match the return type of a gcc2
12870     builtin and then its argument prototype would still apply.  */
12871 char tgetent();
12872
12873 int main() {
12874 tgetent()
12875 ; return 0; }
12876 EOF
12877 if { (eval echo configure:12878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12878   rm -rf conftest*
12879   eval "ac_cv_lib_$ac_lib_var=yes"
12880 else
12881   echo "configure: failed program was:" >&5
12882   cat conftest.$ac_ext >&5
12883   rm -rf conftest*
12884   eval "ac_cv_lib_$ac_lib_var=no"
12885 fi
12886 rm -f conftest*
12887 xe_check_libs=""
12888
12889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12890   echo "$ac_t""yes" 1>&6
12891   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12892 else
12893   echo "$ac_t""no" 1>&6
12894 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12895    echo "    xemacs will be linked with \"termcap.o\""
12896  fi
12897 fi
12898
12899
12900 fi
12901
12902
12903       fi
12904     fi
12905   fi
12906   { test "$extra_verbose" = "yes" && cat << EOF
12907     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12908 EOF
12909 cat >> confdefs.h <<EOF
12910 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12911 EOF
12912 }
12913
12914   { test "$extra_verbose" = "yes" && cat << EOF
12915     Defining TERM_H_FILE = "${term_h_file-term.h}"
12916 EOF
12917 cat >> confdefs.h <<EOF
12918 #define TERM_H_FILE "${term_h_file-term.h}"
12919 EOF
12920 }
12921
12922
12923     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12924 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12925 echo "configure:12926: checking for gpm.h" >&5
12926
12927 cat > conftest.$ac_ext <<EOF
12928 #line 12929 "configure"
12929 #include "confdefs.h"
12930 #include <gpm.h>
12931 EOF
12932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12933 { (eval echo configure:12934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12935 if test -z "$ac_err"; then
12936   rm -rf conftest*
12937   eval "ac_cv_header_$ac_safe=yes"
12938 else
12939   echo "$ac_err" >&5
12940   echo "configure: failed program was:" >&5
12941   cat conftest.$ac_ext >&5
12942   rm -rf conftest*
12943   eval "ac_cv_header_$ac_safe=no"
12944 fi
12945 rm -f conftest*
12946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12947   echo "$ac_t""yes" 1>&6
12948   :
12949 else
12950   echo "$ac_t""no" 1>&6
12951 with_gpm=no
12952 fi
12953  }
12954   test -z "$with_gpm" && { 
12955 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12956 echo "configure:12957: checking for Gpm_Open in -lgpm" >&5
12957 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12958
12959 xe_check_libs=" -lgpm "
12960 cat > conftest.$ac_ext <<EOF
12961 #line 12962 "configure"
12962 #include "confdefs.h"
12963 /* Override any gcc2 internal prototype to avoid an error.  */
12964 /* We use char because int might match the return type of a gcc2
12965     builtin and then its argument prototype would still apply.  */
12966 char Gpm_Open();
12967
12968 int main() {
12969 Gpm_Open()
12970 ; return 0; }
12971 EOF
12972 if { (eval echo configure:12973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12973   rm -rf conftest*
12974   eval "ac_cv_lib_$ac_lib_var=yes"
12975 else
12976   echo "configure: failed program was:" >&5
12977   cat conftest.$ac_ext >&5
12978   rm -rf conftest*
12979   eval "ac_cv_lib_$ac_lib_var=no"
12980 fi
12981 rm -f conftest*
12982 xe_check_libs=""
12983
12984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12985   echo "$ac_t""yes" 1>&6
12986   with_gpm=yes
12987 else
12988   echo "$ac_t""no" 1>&6
12989 with_gpm=no
12990 fi
12991
12992  }
12993   if test "$with_gpm" = "yes"; then
12994     { test "$extra_verbose" = "yes" && cat << \EOF
12995     Defining HAVE_GPM
12996 EOF
12997 cat >> confdefs.h <<\EOF
12998 #define HAVE_GPM 1
12999 EOF
13000 }
13001
13002     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13003    echo "    xemacs will be linked with \"gpmevent.o\""
13004  fi
13005     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13006   fi
13007
13008 else   for feature in ncurses gpm; do
13009     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13010       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13011     fi
13012     eval "with_${feature}=no"
13013   done
13014 fi 
13015 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13016    echo "    xemacs will be linked with \"event-unixoid.o\""
13017  fi
13018
13019
13020 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13021   != "no no no" && echo "checking for database support" 1>&6
13022 echo "configure:13023: checking for database support" >&5
13023
13024 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13025   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13026 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13027 echo "configure:13028: checking for ndbm.h" >&5
13028
13029 cat > conftest.$ac_ext <<EOF
13030 #line 13031 "configure"
13031 #include "confdefs.h"
13032 #include <ndbm.h>
13033 EOF
13034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13035 { (eval echo configure:13036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13037 if test -z "$ac_err"; then
13038   rm -rf conftest*
13039   eval "ac_cv_header_$ac_safe=yes"
13040 else
13041   echo "$ac_err" >&5
13042   echo "configure: failed program was:" >&5
13043   cat conftest.$ac_ext >&5
13044   rm -rf conftest*
13045   eval "ac_cv_header_$ac_safe=no"
13046 fi
13047 rm -f conftest*
13048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13049   echo "$ac_t""yes" 1>&6
13050   :
13051 else
13052   echo "$ac_t""no" 1>&6
13053
13054     test "$with_database_gdbm" = "yes" -o \
13055          "$with_database_dbm"  = "yes" && \
13056       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13057     with_database_gdbm=no with_database_dbm=no
13058 fi
13059
13060 fi
13061
13062 if test "$with_database_gdbm" != "no"; then
13063   
13064 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13065 echo "configure:13066: checking for dbm_open in -lgdbm" >&5
13066 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13067
13068 xe_check_libs=" -lgdbm "
13069 cat > conftest.$ac_ext <<EOF
13070 #line 13071 "configure"
13071 #include "confdefs.h"
13072 /* Override any gcc2 internal prototype to avoid an error.  */
13073 /* We use char because int might match the return type of a gcc2
13074     builtin and then its argument prototype would still apply.  */
13075 char dbm_open();
13076
13077 int main() {
13078 dbm_open()
13079 ; return 0; }
13080 EOF
13081 if { (eval echo configure:13082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13082   rm -rf conftest*
13083   eval "ac_cv_lib_$ac_lib_var=yes"
13084 else
13085   echo "configure: failed program was:" >&5
13086   cat conftest.$ac_ext >&5
13087   rm -rf conftest*
13088   eval "ac_cv_lib_$ac_lib_var=no"
13089 fi
13090 rm -f conftest*
13091 xe_check_libs=""
13092
13093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13094   echo "$ac_t""yes" 1>&6
13095   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13096 else
13097   echo "$ac_t""no" 1>&6
13098 if test "$with_database_gdbm" = "yes"; then
13099      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13100    fi
13101    with_database_gdbm=no
13102 fi
13103
13104
13105 fi
13106
13107 if test "$with_database_dbm" != "no"; then
13108   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13109 echo "configure:13110: checking for dbm_open" >&5
13110
13111 cat > conftest.$ac_ext <<EOF
13112 #line 13113 "configure"
13113 #include "confdefs.h"
13114 /* System header to define __stub macros and hopefully few prototypes,
13115     which can conflict with char dbm_open(); below.  */
13116 #include <assert.h>
13117 /* Override any gcc2 internal prototype to avoid an error.  */
13118 /* We use char because int might match the return type of a gcc2
13119     builtin and then its argument prototype would still apply.  */
13120 char dbm_open();
13121
13122 int main() {
13123
13124 /* The GNU C library defines this for functions which it implements
13125     to always fail with ENOSYS.  Some functions are actually named
13126     something starting with __ and the normal name is an alias.  */
13127 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13128 choke me
13129 #else
13130 dbm_open();
13131 #endif
13132
13133 ; return 0; }
13134 EOF
13135 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13136   rm -rf conftest*
13137   eval "ac_cv_func_dbm_open=yes"
13138 else
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_func_dbm_open=no"
13143 fi
13144 rm -f conftest*
13145
13146 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13147   echo "$ac_t""yes" 1>&6
13148   with_database_dbm=yes libdbm=
13149 else
13150   echo "$ac_t""no" 1>&6
13151
13152     
13153 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13154 echo "configure:13155: checking for dbm_open in -ldbm" >&5
13155 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13156
13157 xe_check_libs=" -ldbm "
13158 cat > conftest.$ac_ext <<EOF
13159 #line 13160 "configure"
13160 #include "confdefs.h"
13161 /* Override any gcc2 internal prototype to avoid an error.  */
13162 /* We use char because int might match the return type of a gcc2
13163     builtin and then its argument prototype would still apply.  */
13164 char dbm_open();
13165
13166 int main() {
13167 dbm_open()
13168 ; return 0; }
13169 EOF
13170 if { (eval echo configure:13171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13171   rm -rf conftest*
13172   eval "ac_cv_lib_$ac_lib_var=yes"
13173 else
13174   echo "configure: failed program was:" >&5
13175   cat conftest.$ac_ext >&5
13176   rm -rf conftest*
13177   eval "ac_cv_lib_$ac_lib_var=no"
13178 fi
13179 rm -f conftest*
13180 xe_check_libs=""
13181
13182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13183   echo "$ac_t""yes" 1>&6
13184   with_database_dbm=yes libdbm=-ldbm
13185 else
13186   echo "$ac_t""no" 1>&6
13187 test "$with_database_dbm" = "yes" && \
13188         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13189       with_database_dbm=no
13190 fi
13191
13192
13193 fi
13194
13195 fi
13196
13197 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13198 test "$with_database_gdbm" = "yes" -o \
13199      "$with_database_dbm"  = "yes" && \
13200   { test "$extra_verbose" = "yes" && cat << \EOF
13201     Defining HAVE_DBM
13202 EOF
13203 cat >> confdefs.h <<\EOF
13204 #define HAVE_DBM 1
13205 EOF
13206 }
13207
13208
13209 if test "$with_database_berkdb" != "no"; then
13210   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13211 echo "configure:13212: checking for Berkeley db.h" >&5
13212   for header in "db/db.h" "db.h"; do
13213     cat > conftest.$ac_ext <<EOF
13214 #line 13215 "configure"
13215 #include "confdefs.h"
13216
13217 #include <stdlib.h>
13218 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13219 #ifdef HAVE_INTTYPES_H
13220 #define __BIT_TYPES_DEFINED__
13221 #include <inttypes.h>
13222 typedef uint8_t  u_int8_t;
13223 typedef uint16_t u_int16_t;
13224 typedef uint32_t u_int32_t;
13225 #ifdef WE_DONT_NEED_QUADS
13226 typedef uint64_t u_int64_t;
13227 #endif
13228 #endif
13229 #endif
13230 #include <$header>
13231
13232 int main() {
13233
13234 ; return 0; }
13235 EOF
13236 if { (eval echo configure:13237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13237   rm -rf conftest*
13238   db_h_file="$header"; break
13239 else
13240   echo "configure: failed program was:" >&5
13241   cat conftest.$ac_ext >&5
13242 fi
13243 rm -f conftest*
13244   done
13245   if test -z "$db_h_file"
13246   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13247   else echo "$ac_t""$db_h_file" 1>&6
13248   fi
13249
13250   if test "$with_database_berkdb" != "no"; then
13251     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13252 echo "configure:13253: checking for Berkeley DB version" >&5
13253     cat > conftest.$ac_ext <<EOF
13254 #line 13255 "configure"
13255 #include "confdefs.h"
13256 #include <$db_h_file>
13257 #if DB_VERSION_MAJOR > 1
13258 yes
13259 #endif
13260
13261 EOF
13262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13263   egrep "yes" >/dev/null 2>&1; then
13264   rm -rf conftest*
13265   echo "$ac_t""2" 1>&6; dbfunc=db_open
13266 else
13267   rm -rf conftest*
13268   echo "$ac_t""1" 1>&6; dbfunc=dbopen
13269 fi
13270 rm -f conftest*
13271
13272     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13273 echo "configure:13274: checking for $dbfunc" >&5
13274
13275 cat > conftest.$ac_ext <<EOF
13276 #line 13277 "configure"
13277 #include "confdefs.h"
13278 /* System header to define __stub macros and hopefully few prototypes,
13279     which can conflict with char $dbfunc(); below.  */
13280 #include <assert.h>
13281 /* Override any gcc2 internal prototype to avoid an error.  */
13282 /* We use char because int might match the return type of a gcc2
13283     builtin and then its argument prototype would still apply.  */
13284 char $dbfunc();
13285
13286 int main() {
13287
13288 /* The GNU C library defines this for functions which it implements
13289     to always fail with ENOSYS.  Some functions are actually named
13290     something starting with __ and the normal name is an alias.  */
13291 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13292 choke me
13293 #else
13294 $dbfunc();
13295 #endif
13296
13297 ; return 0; }
13298 EOF
13299 if { (eval echo configure:13300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13300   rm -rf conftest*
13301   eval "ac_cv_func_$dbfunc=yes"
13302 else
13303   echo "configure: failed program was:" >&5
13304   cat conftest.$ac_ext >&5
13305   rm -rf conftest*
13306   eval "ac_cv_func_$dbfunc=no"
13307 fi
13308 rm -f conftest*
13309
13310 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13311   echo "$ac_t""yes" 1>&6
13312   with_database_berkdb=yes need_libdb=no
13313 else
13314   echo "$ac_t""no" 1>&6
13315
13316     
13317 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13318 echo "configure:13319: checking for $dbfunc in -ldb" >&5
13319 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13320
13321 xe_check_libs=" -ldb "
13322 cat > conftest.$ac_ext <<EOF
13323 #line 13324 "configure"
13324 #include "confdefs.h"
13325 /* Override any gcc2 internal prototype to avoid an error.  */
13326 /* We use char because int might match the return type of a gcc2
13327     builtin and then its argument prototype would still apply.  */
13328 char $dbfunc();
13329
13330 int main() {
13331 $dbfunc()
13332 ; return 0; }
13333 EOF
13334 if { (eval echo configure:13335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13335   rm -rf conftest*
13336   eval "ac_cv_lib_$ac_lib_var=yes"
13337 else
13338   echo "configure: failed program was:" >&5
13339   cat conftest.$ac_ext >&5
13340   rm -rf conftest*
13341   eval "ac_cv_lib_$ac_lib_var=no"
13342 fi
13343 rm -f conftest*
13344 xe_check_libs=""
13345
13346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13347   echo "$ac_t""yes" 1>&6
13348   with_database_berkdb=yes need_libdb=yes
13349 else
13350   echo "$ac_t""no" 1>&6
13351 fi
13352
13353
13354 fi
13355
13356   fi
13357
13358   if test "$with_database_berkdb" = "yes"; then
13359     { test "$extra_verbose" = "yes" && cat << EOF
13360     Defining DB_H_FILE = "$db_h_file"
13361 EOF
13362 cat >> confdefs.h <<EOF
13363 #define DB_H_FILE "$db_h_file"
13364 EOF
13365 }
13366
13367     { test "$extra_verbose" = "yes" && cat << \EOF
13368     Defining HAVE_BERKELEY_DB
13369 EOF
13370 cat >> confdefs.h <<\EOF
13371 #define HAVE_BERKELEY_DB 1
13372 EOF
13373 }
13374
13375     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13376   else with_database_berkdb=no
13377   fi
13378 fi
13379
13380 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13381      != "no no no"; then
13382   { test "$extra_verbose" = "yes" && cat << \EOF
13383     Defining HAVE_DATABASE
13384 EOF
13385 cat >> confdefs.h <<\EOF
13386 #define HAVE_DATABASE 1
13387 EOF
13388 }
13389
13390   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13391    echo "    xemacs will be linked with \"database.o\""
13392  fi
13393 fi
13394
13395 if test "$with_socks" = "yes"; then
13396   
13397 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13398 echo "configure:13399: checking for SOCKSinit in -lsocks" >&5
13399 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13400
13401 xe_check_libs=" -lsocks "
13402 cat > conftest.$ac_ext <<EOF
13403 #line 13404 "configure"
13404 #include "confdefs.h"
13405 /* Override any gcc2 internal prototype to avoid an error.  */
13406 /* We use char because int might match the return type of a gcc2
13407     builtin and then its argument prototype would still apply.  */
13408 char SOCKSinit();
13409
13410 int main() {
13411 SOCKSinit()
13412 ; return 0; }
13413 EOF
13414 if { (eval echo configure:13415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13415   rm -rf conftest*
13416   eval "ac_cv_lib_$ac_lib_var=yes"
13417 else
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   eval "ac_cv_lib_$ac_lib_var=no"
13422 fi
13423 rm -f conftest*
13424 xe_check_libs=""
13425
13426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13427   echo "$ac_t""yes" 1>&6
13428     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13429     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13430   { test "$extra_verbose" = "yes" && cat << EOF
13431     Defining $ac_tr_lib
13432 EOF
13433 cat >> confdefs.h <<EOF
13434 #define $ac_tr_lib 1
13435 EOF
13436 }
13437
13438   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13439
13440 else
13441   echo "$ac_t""no" 1>&6
13442 fi
13443
13444
13445   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13446     Defining HAVE_SOCKS
13447 EOF
13448 cat >> confdefs.h <<\EOF
13449 #define HAVE_SOCKS 1
13450 EOF
13451 }
13452
13453 fi
13454
13455 if test "$usage_tracking" = "yes"; then
13456   { test "$extra_verbose" = "yes" && cat << \EOF
13457     Defining USAGE_TRACKING
13458 EOF
13459 cat >> confdefs.h <<\EOF
13460 #define USAGE_TRACKING 1
13461 EOF
13462 }
13463
13464   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13465 fi
13466
13467 if test "$with_modules" != "no"; then
13468   echo "checking for module support" 1>&6
13469 echo "configure:13470: checking for module support" >&5
13470
13471     if test "$with_msw" = "yes"; then
13472     have_dl=yes;
13473   else
13474         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13475 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13476 echo "configure:13477: checking for dlfcn.h" >&5
13477
13478 cat > conftest.$ac_ext <<EOF
13479 #line 13480 "configure"
13480 #include "confdefs.h"
13481 #include <dlfcn.h>
13482 EOF
13483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13484 { (eval echo configure:13485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13486 if test -z "$ac_err"; then
13487   rm -rf conftest*
13488   eval "ac_cv_header_$ac_safe=yes"
13489 else
13490   echo "$ac_err" >&5
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   eval "ac_cv_header_$ac_safe=no"
13495 fi
13496 rm -f conftest*
13497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13498   echo "$ac_t""yes" 1>&6
13499   
13500       
13501 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13502 echo "configure:13503: checking for dlopen in -ldl" >&5
13503 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
13504
13505 xe_check_libs=" -ldl "
13506 cat > conftest.$ac_ext <<EOF
13507 #line 13508 "configure"
13508 #include "confdefs.h"
13509 /* Override any gcc2 internal prototype to avoid an error.  */
13510 /* We use char because int might match the return type of a gcc2
13511     builtin and then its argument prototype would still apply.  */
13512 char dlopen();
13513
13514 int main() {
13515 dlopen()
13516 ; return 0; }
13517 EOF
13518 if { (eval echo configure:13519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13519   rm -rf conftest*
13520   eval "ac_cv_lib_$ac_lib_var=yes"
13521 else
13522   echo "configure: failed program was:" >&5
13523   cat conftest.$ac_ext >&5
13524   rm -rf conftest*
13525   eval "ac_cv_lib_$ac_lib_var=no"
13526 fi
13527 rm -f conftest*
13528 xe_check_libs=""
13529
13530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13531   echo "$ac_t""yes" 1>&6
13532   have_dl=yes libdl=dl
13533 else
13534   echo "$ac_t""no" 1>&6
13535
13536 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13537 echo "configure:13538: checking for dlopen in -lc" >&5
13538 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
13539
13540 xe_check_libs=" -lc "
13541 cat > conftest.$ac_ext <<EOF
13542 #line 13543 "configure"
13543 #include "confdefs.h"
13544 /* Override any gcc2 internal prototype to avoid an error.  */
13545 /* We use char because int might match the return type of a gcc2
13546     builtin and then its argument prototype would still apply.  */
13547 char dlopen();
13548
13549 int main() {
13550 dlopen()
13551 ; return 0; }
13552 EOF
13553 if { (eval echo configure:13554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13554   rm -rf conftest*
13555   eval "ac_cv_lib_$ac_lib_var=yes"
13556 else
13557   echo "configure: failed program was:" >&5
13558   cat conftest.$ac_ext >&5
13559   rm -rf conftest*
13560   eval "ac_cv_lib_$ac_lib_var=no"
13561 fi
13562 rm -f conftest*
13563 xe_check_libs=""
13564
13565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13566   echo "$ac_t""yes" 1>&6
13567   have_dl=yes 
13568 else
13569   echo "$ac_t""no" 1>&6
13570 fi
13571
13572
13573 fi
13574
13575
13576 else
13577   echo "$ac_t""no" 1>&6
13578 fi
13579
13580     if test -n "$have_dl"; then
13581       { test "$extra_verbose" = "yes" && cat << \EOF
13582     Defining HAVE_DLOPEN
13583 EOF
13584 cat >> confdefs.h <<\EOF
13585 #define HAVE_DLOPEN 1
13586 EOF
13587 }
13588
13589     else
13590       
13591 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13592 echo "configure:13593: checking for shl_load in -ldld" >&5
13593 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13594
13595 xe_check_libs=" -ldld "
13596 cat > conftest.$ac_ext <<EOF
13597 #line 13598 "configure"
13598 #include "confdefs.h"
13599 /* Override any gcc2 internal prototype to avoid an error.  */
13600 /* We use char because int might match the return type of a gcc2
13601     builtin and then its argument prototype would still apply.  */
13602 char shl_load();
13603
13604 int main() {
13605 shl_load()
13606 ; return 0; }
13607 EOF
13608 if { (eval echo configure:13609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13609   rm -rf conftest*
13610   eval "ac_cv_lib_$ac_lib_var=yes"
13611 else
13612   echo "configure: failed program was:" >&5
13613   cat conftest.$ac_ext >&5
13614   rm -rf conftest*
13615   eval "ac_cv_lib_$ac_lib_var=no"
13616 fi
13617 rm -f conftest*
13618 xe_check_libs=""
13619
13620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13621   echo "$ac_t""yes" 1>&6
13622   libdl=dld have_dl=yes;
13623         { test "$extra_verbose" = "yes" && cat << \EOF
13624     Defining HAVE_SHL_LOAD
13625 EOF
13626 cat >> confdefs.h <<\EOF
13627 #define HAVE_SHL_LOAD 1
13628 EOF
13629 }
13630
13631 else
13632   echo "$ac_t""no" 1>&6
13633
13634 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13635 echo "configure:13636: checking for dld_init in -ldld" >&5
13636 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13637
13638 xe_check_libs=" -ldld "
13639 cat > conftest.$ac_ext <<EOF
13640 #line 13641 "configure"
13641 #include "confdefs.h"
13642 /* Override any gcc2 internal prototype to avoid an error.  */
13643 /* We use char because int might match the return type of a gcc2
13644     builtin and then its argument prototype would still apply.  */
13645 char dld_init();
13646
13647 int main() {
13648 dld_init()
13649 ; return 0; }
13650 EOF
13651 if { (eval echo configure:13652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13652   rm -rf conftest*
13653   eval "ac_cv_lib_$ac_lib_var=yes"
13654 else
13655   echo "configure: failed program was:" >&5
13656   cat conftest.$ac_ext >&5
13657   rm -rf conftest*
13658   eval "ac_cv_lib_$ac_lib_var=no"
13659 fi
13660 rm -f conftest*
13661 xe_check_libs=""
13662
13663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13664   echo "$ac_t""yes" 1>&6
13665   libdl=dld have_dl=yes;
13666         { test "$extra_verbose" = "yes" && cat << \EOF
13667     Defining HAVE_DLD_INIT
13668 EOF
13669 cat >> confdefs.h <<\EOF
13670 #define HAVE_DLD_INIT 1
13671 EOF
13672 }
13673
13674 else
13675   echo "$ac_t""no" 1>&6
13676 fi
13677
13678
13679 fi
13680
13681
13682     fi
13683   fi 
13684   if test -n "$have_dl"; then
13685         
13686 dll_ld=
13687 dll_ldflags=
13688 dll_cflags=
13689 dll_post=
13690 dll_ldo="-o"
13691 ld_dynamic_link_flags=
13692 xehost=$canonical
13693 xealias=$internal_configuration
13694
13695 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13696 echo "configure:13697: checking how to build dynamic libraries for ${xehost}" >&5
13697 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13698 case "$xehost" in
13699 *-*-linux-gnu*) ;;
13700 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13701 esac
13702
13703 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13704 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13705 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13706
13707 case "$xehost_os" in
13708 aix3*)
13709   # AIX sometimes has problems with the GCC collect2 program.  For some
13710   # reason, if we set the COLLECT_NAMES environment variable, the problems
13711   # vanish in a puff of smoke.
13712   if test "${COLLECT_NAMES+set}" != set; then
13713     COLLECT_NAMES=
13714     export COLLECT_NAMES
13715   fi
13716   ;;
13717 esac
13718
13719 # Now see if the compiler is really GCC.
13720 if test "$GCC" = "yes"; then
13721   XEGCC=yes
13722 else
13723   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13724 echo "configure:13725: checking checking whether we are using GNU C" >&5
13725   cat > conftest.$ac_ext <<EOF
13726 #line 13727 "configure"
13727 #include "confdefs.h"
13728
13729 #ifdef __GNUC__
13730   yes;
13731 #endif
13732
13733 EOF
13734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13735   egrep "yes" >/dev/null 2>&1; then
13736   rm -rf conftest*
13737   XEGCC=yes
13738 else
13739   rm -rf conftest*
13740   XEGCC=no
13741 fi
13742 rm -f conftest*
13743
13744   echo "$ac_t""${XEGCC}" 1>&6
13745 fi
13746
13747 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13748 echo "configure:13749: checking how to produce PIC code" >&5
13749 wl=
13750
13751 can_build_shared=yes
13752 if test "$XEGCC" = yes; then
13753   wl='-Wl,'
13754
13755   case "$xehost_os" in
13756   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13757     # PIC is the default for these OSes.
13758     ;;
13759
13760   aix3* | aix4* | os2*)
13761     # We can build DLLs from non-PIC.
13762     ;;
13763   amigaos*)
13764     # FIXME: we need at least 68020 code to build shared libraries, but
13765     # adding the `-m68020' flag to GCC prevents building anything better,
13766     # like `-m68040'.
13767     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13768     ;;
13769   *cygwin* | *mingw* )
13770     # PIC is the default
13771     ;;
13772   *)
13773     dll_cflags='-fPIC'
13774     ;;
13775   esac
13776 else
13777   # PORTME Check for PIC flags for the system compiler.
13778   case "$xehost_os" in
13779   hpux9* | hpux1[0-9]*)
13780     # Is there a better link_static_flag that works with the bundled CC?
13781     wl='-Wl,'
13782     dll_cflags='+Z'
13783     ;;
13784
13785   irix5* | irix6*)
13786     wl='-Wl,'
13787     # PIC (with -KPIC) is the default.
13788     ;;
13789
13790   os2*)
13791     # We can build DLLs from non-PIC.
13792     ;;
13793
13794   osf3* | osf4*)
13795     # All OSF/1 code is PIC.
13796     wl='-Wl,'
13797     ;;
13798
13799   sco3.2v5*)
13800     dll_cflags='-belf -Kpic'
13801     wl='-Wl,'
13802     ;;
13803
13804   unixware*)
13805     dll_cflags="-KPIC"
13806     wl="-Wl,"
13807     ;;
13808
13809   sysv4*)
13810     dll_cflags="-KPIC"
13811     wl="-Wl,"
13812     ;;
13813
13814   sysv5*)
13815     dll_cflags="-KPIC"
13816     wl="-Wl,"
13817     ;;
13818
13819   solaris2*)
13820     dll_cflags='-KPIC'
13821     wl='-Wl,'
13822     ;;
13823
13824   sunos4*)
13825     dll_cflags='-PIC'
13826     wl='-Qoption ld '
13827     ;;
13828
13829   uts4*)
13830     dll_cflags='-pic'
13831     ;;
13832
13833   *)
13834     can_build_shared=no
13835     ;;
13836   esac
13837 fi
13838
13839 if test -n "$dll_cflags"; then
13840   echo "$ac_t""${dll_cflags}" 1>&6
13841
13842   # Check to make sure the dll_cflags actually works.
13843   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13844 echo "configure:13845: checking if PIC flag ${dll_cflags} really works" >&5
13845   save_CFLAGS="$CFLAGS"
13846   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13847   cat > conftest.$ac_ext <<EOF
13848 #line 13849 "configure"
13849 #include "confdefs.h"
13850
13851 int main() {
13852 int x=0;
13853 ; return 0; }
13854 EOF
13855 if { (eval echo configure:13856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13856   rm -rf conftest*
13857   
13858     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13859     # reports no error.  So, we need to grep stderr for (Bundled).
13860     if grep '(Bundled)' config.log >/dev/null; then
13861       echo "$ac_t""no" 1>&6
13862       can_build_shared=no
13863       dll_cflags=
13864     else
13865       echo "$ac_t""yes" 1>&6
13866     fi
13867 else
13868   echo "configure: failed program was:" >&5
13869   cat conftest.$ac_ext >&5
13870   rm -rf conftest*
13871   echo "$ac_t""no" 1>&6
13872     can_build_shared=no
13873     dll_cflags=
13874 fi
13875 rm -f conftest*
13876   CFLAGS="$save_CFLAGS"
13877 else
13878   echo "$ac_t""none" 1>&6
13879 fi
13880
13881 if test "$can_build_shared" = "yes"; then
13882 cc_produces_so=no
13883 xldf=
13884 xcldf=
13885 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13886 echo "configure:13887: checking if C compiler can produce shared libraries" >&5
13887 if test "$XEGCC" = yes; then
13888   xcldf="-shared"
13889   xldf="-shared"
13890 else # Not using GCC
13891   case "$xehost_os" in
13892     aix3* | aix4*)
13893       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13894       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13895       ;;
13896
13897     freebsd2* | netbsd* | openbsd*)
13898       xldf="-Bshareable"
13899       xcldf="${wl}-Bshareable"
13900       ;;
13901
13902     freebsd3*)
13903       xcldf="-shared"
13904       ;;
13905
13906     hpux*)
13907       xldf="-b +s"
13908       xcldf="${wl}-b ${wl}+s"
13909       ;;
13910
13911     irix5* | irix6* | osf3* | osf4*)
13912       xcldf="${wl}-shared"
13913       xldf="-shared"
13914       ;;
13915
13916     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13917       xcldf="-G"
13918       xldf="-G"
13919       ;;
13920
13921     sunos4*)
13922       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13923       xldf="-assert pure-text -Bstatic"
13924       ;;
13925   esac
13926 fi # End if if we are using gcc
13927
13928 if test -n "$xcldf"; then
13929   save_LDFLAGS=$LDFLAGS
13930   save_LIBS=$LIBS
13931   save_xe_libs=$xe_libs
13932   LDFLAGS="$xcldf $LDFLAGS"
13933   LIBS=
13934   xe_libs=
13935   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13936   cat > conftest.$ac_ext <<EOF
13937 #line 13938 "configure"
13938 #include "confdefs.h"
13939
13940 int main() {
13941 int x=0;
13942 ; return 0; }
13943 EOF
13944 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13945   rm -rf conftest*
13946   cc_produces_so=yes
13947 else
13948   echo "configure: failed program was:" >&5
13949   cat conftest.$ac_ext >&5
13950   rm -rf conftest*
13951   cc_produces_so=no
13952 fi
13953 rm -f conftest*
13954   LDFLAGS=$save_LDFLAGS
13955   LIBS=$save_LIBS
13956   xe_libs=$save_xe_libs
13957   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13958 else
13959   cc_produces_so=no
13960 fi
13961 echo "$ac_t""${cc_produces_so}" 1>&6
13962
13963 LTLD=$LD
13964 if test -z "$LTLD"; then
13965   ac_prog=ld
13966   if test "$XEGCC" = yes; then
13967     # Check if gcc -print-prog-name=ld gives a path.
13968     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13969 echo "configure:13970: checking for ld used by GCC" >&5
13970     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13971     case "$ac_prog" in
13972     # Accept absolute paths.
13973     /*)
13974       if test -z "$LTLD"; then
13975         case "$ac_prog" in
13976           *gcc-lib*) LTLD="$CC"
13977                      ;;
13978           *)         LTLD="$ac_prog"
13979                      ;;
13980         esac
13981       fi
13982       ;;
13983     "")
13984       # If it fails, then pretend we aren't using GCC.
13985       ac_prog=ld
13986       ;;
13987     *)
13988       # If it is relative, then search for the first ld in PATH.
13989       with_gnu_ld=unknown
13990       ;;
13991     esac
13992   else
13993     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13994 echo "configure:13995: checking for GNU ld" >&5
13995   fi
13996
13997   if test -z "$LTLD"; then
13998     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13999     for ac_dir in $PATH; do
14000       test -z "$ac_dir" && ac_dir=.
14001       if test -f "$ac_dir/$ac_prog"; then
14002         LTLD="$ac_dir/$ac_prog"
14003         # Check to see if the program is GNU ld.  I'd rather use --version,
14004         # but apparently some GNU ld's only accept -v.
14005         # Break only if it was the GNU/non-GNU ld that we prefer.
14006         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14007           xe_gnu_ld=yes
14008         else
14009           xe_gnu_ld=no
14010         fi
14011       fi
14012     done
14013     IFS="$ac_save_ifs"
14014   fi
14015
14016   if test -n "$LTLD"; then
14017     echo "$ac_t""${LTLD}" 1>&6
14018   else
14019     echo "$ac_t""no" 1>&6
14020   fi
14021
14022   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14023     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14024     exit 1
14025   fi
14026 fi
14027
14028 ld_dynamic_link_flags=
14029
14030 # Check to see if it really is or isn't GNU ld.
14031 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14032 echo "configure:14033: checking if the linker is GNU ld" >&5
14033 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14034 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14035   xe_gnu_ld=yes
14036 else
14037   xe_gnu_ld=no
14038 fi
14039 echo "$ac_t""${xe_gnu_ld}" 1>&6
14040
14041 case "$xehost_os" in
14042   amigaos* | sunos4*)
14043     # On these operating systems, we should treat GNU ld like the system ld.
14044     gnu_ld_acts_native=yes
14045     ;;
14046   *)
14047     gnu_ld_acts_native=no
14048     ;;
14049 esac
14050
14051 if test "$cc_produces_so" = "yes"; then
14052   dll_ld=$CC
14053   dll_ldflags=$xcldf
14054   can_build_shared=yes
14055   ld_shlibs=yes
14056 else
14057   # OK - only NOW do we futz about with ld.
14058   # See if the linker supports building shared libraries.
14059   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14060 echo "configure:14061: checking whether the linker supports shared libraries" >&5
14061   dll_ld=$CC
14062   dll_ldflags=$LDFLAGS
14063   ld_shlibs=yes
14064   can_build_shared=yes
14065   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14066     # See if GNU ld supports shared libraries.
14067     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14068       dll_ld=$CC
14069       dll_ldflags="-shared"
14070       ld_shlibs=yes
14071     else
14072       ld_shlibs=no
14073     fi
14074   else
14075     # PORTME fill in a description of your system's linker (not GNU ld)
14076     case "$xehost_os" in
14077     aix3*)
14078       dll_ld=$LTLD
14079       dll_ldflags=$xldf
14080       ;;
14081
14082     aix4*)
14083       dll_ldflags=$xcldf
14084       ;;
14085
14086     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14087     # support.  Future versions do this automatically, but an explicit c++rt0.o
14088     # doesn't break anything, and helps significantly (at the cost of a little
14089     # extra space).
14090     freebsd2.2*)
14091       dll_ld=$LTLD
14092       dll_ldflags=$xldf
14093       dll_post="/usr/lib/c++rt0.o"
14094       ;;
14095
14096     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14097     freebsd2*)
14098       dll_ld=$LTLD
14099       dll_ldflags="-Bshareable"
14100       ;;
14101
14102     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14103     freebsd3*)
14104       dll_ldflags="-shared"
14105       ;;
14106
14107     hpux*)
14108       dll_ld=$LTLD
14109       dll_ldflags=$xldf
14110       ;;
14111
14112     irix5* | irix6*)
14113       dll_ld=$LTLD
14114       dll_ldflags=$xldf
14115       ;;
14116
14117     netbsd*)
14118       # Tested with NetBSD 1.2 ld
14119       dll_ld=$LTLD
14120       dll_ldflags=$xldf
14121       ;;
14122
14123     openbsd*)
14124       dll_ld=$LTLD
14125       dll_ldflags=$xldf
14126       ;;
14127
14128     osf3* | osf4*)
14129       dll_ld=$LTLD
14130       dll_ldflags=$xldf
14131       ;;
14132
14133     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14134     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14135       dll_ld=$LTLD
14136       case "$dll_ld" in
14137         *gcc*) dll_ldflags="-shared"
14138                dll_ld=$CC
14139                ;;
14140         *)     dll_ldflags="-G"
14141                ;;
14142       esac
14143       ;;
14144
14145     sunos4*)
14146       if test "$XEGCC" = yes; then
14147         dll_ld=$CC
14148       else
14149         dll_ld=$LTLD
14150       fi
14151       dll_ldflags=$xldf
14152       ;;
14153
14154     uts4*)
14155       dll_ld=$LTLD
14156       dll_ldflags="-G"
14157       ;;
14158
14159     bsdi*)
14160       dll_ldflags="-r"
14161       dll_ld="shlicc2"
14162       ;;
14163
14164     *)
14165       ld_shlibs=no
14166       can_build_shared=no
14167       ;;
14168     esac
14169   fi
14170   echo "$ac_t""${ld_shlibs}" 1>&6
14171   if test "$ld_shlibs" = "no"; then
14172     can_build_shared=no
14173   fi
14174 fi # End of if cc_produces_so = no
14175
14176
14177 if test "$xe_gnu_ld" = yes; then
14178   if test "$ld_shlibs" = yes; then
14179     ld_dynamic_link_flags="${wl}-export-dynamic"
14180   fi
14181 fi
14182
14183 if test -z "$ld_dynamic_link_flags"; then
14184   case "$xehost_os" in
14185   aix3*)
14186     ld_dynamic_link_flags=
14187     ;;
14188
14189   aix4*)
14190     ld_dynamic_link_flags=
14191     ;;
14192
14193   freebsd2.2*)
14194     ld_dynamic_link_flags=
14195     ;;
14196
14197   freebsd2*)
14198     ld_dynamic_link_flags=
14199     ;;
14200
14201   freebsd3*)
14202     ld_dynamic_link_flags=
14203     ;;
14204
14205   hpux*)
14206     ld_dynamic_link_flags="${wl}-E"
14207     ;;
14208
14209   irix5* | irix6*)
14210     ld_dynamic_link_flags=
14211     ;;
14212
14213   netbsd*)
14214     ld_dynamic_link_flags=
14215     ;;
14216
14217   openbsd*)
14218     ld_dynamic_link_flags=
14219     ;;
14220
14221   osf3* | osf4*)
14222     ld_dynamic_link_flags=
14223     ;;
14224
14225   solaris2* | solaris7*)
14226     ld_dynamic_link_flags=
14227     ;;
14228
14229   sco3.2v5* | unixware* | sysv5* | sysv4*)
14230     ld_dynamic_link_flags="${wl}-Bexport"
14231     ;;
14232
14233   sunos4*)
14234     ld_dynamic_link_flags=
14235     ;;
14236
14237   uts4*)
14238     ld_dynamic_link_flags=
14239     ;;
14240
14241   bsdi*)
14242     ld_dynamic_link_flags=
14243     ;;
14244
14245   esac
14246 fi # End of if -z ld_dynamic_link_flags
14247 fi # End of if test "$can_build_shared" = "yes"
14248
14249
14250
14251
14252
14253
14254
14255
14256   fi
14257
14258   if test "$can_build_shared" = "yes"; then
14259     { test "$extra_verbose" = "yes" && cat << \EOF
14260     Defining HAVE_SHLIB
14261 EOF
14262 cat >> confdefs.h <<\EOF
14263 #define HAVE_SHLIB 1
14264 EOF
14265 }
14266
14267     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14268    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14269  fi
14270     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14271     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14272     for ac_func in dlerror _dlerror
14273 do
14274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14275 echo "configure:14276: checking for $ac_func" >&5
14276
14277 cat > conftest.$ac_ext <<EOF
14278 #line 14279 "configure"
14279 #include "confdefs.h"
14280 /* System header to define __stub macros and hopefully few prototypes,
14281     which can conflict with char $ac_func(); below.  */
14282 #include <assert.h>
14283 /* Override any gcc2 internal prototype to avoid an error.  */
14284 /* We use char because int might match the return type of a gcc2
14285     builtin and then its argument prototype would still apply.  */
14286 char $ac_func();
14287
14288 int main() {
14289
14290 /* The GNU C library defines this for functions which it implements
14291     to always fail with ENOSYS.  Some functions are actually named
14292     something starting with __ and the normal name is an alias.  */
14293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14294 choke me
14295 #else
14296 $ac_func();
14297 #endif
14298
14299 ; return 0; }
14300 EOF
14301 if { (eval echo configure:14302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14302   rm -rf conftest*
14303   eval "ac_cv_func_$ac_func=yes"
14304 else
14305   echo "configure: failed program was:" >&5
14306   cat conftest.$ac_ext >&5
14307   rm -rf conftest*
14308   eval "ac_cv_func_$ac_func=no"
14309 fi
14310 rm -f conftest*
14311
14312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14313   echo "$ac_t""yes" 1>&6
14314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14315   { test "$extra_verbose" = "yes" && cat << EOF
14316     Defining $ac_tr_func
14317 EOF
14318 cat >> confdefs.h <<EOF
14319 #define $ac_tr_func 1
14320 EOF
14321 }
14322  
14323 else
14324   echo "$ac_t""no" 1>&6
14325 fi
14326 done
14327
14328     with_modules=yes
14329   else
14330     if test "$with_modules" = "yes"; then
14331       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14332     else
14333       echo "configure: warning: "Module support cannot be provided."" 1>&2
14334     fi
14335     with_modules=no
14336   fi
14337 fi
14338
14339 cat > conftest.$ac_ext <<EOF
14340 #line 14341 "configure"
14341 #include "confdefs.h"
14342 int main(int c,char *v[]){return 0;}
14343 EOF
14344 if { (eval echo configure:14345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14345 then
14346   :
14347 else
14348   conftest_rc="$?"
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -fr conftest*
14352   
14353   echo ""
14354   echo "*** PANIC *** The C compiler can no longer build working executables."
14355   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14356   echo "*** PANIC *** The most likely reason for this problem is that configure"
14357   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14358   echo "*** PANIC *** found at run time."
14359   echo "*** PANIC ***"
14360   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14361   echo "*** PANIC *** On other systems, try telling configure where to find the"
14362   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14363   echo "*** PANIC ***"
14364   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14365   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14366   echo "*** PANIC *** on your system.  Don't do that."
14367   exit 1
14368 fi
14369 rm -fr conftest*
14370
14371 if test "$win32_processes" = "yes"; then
14372   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14373    echo "    xemacs will be linked with \"process-nt.o\""
14374  fi
14375 else
14376   { test "$extra_verbose" = "yes" && cat << \EOF
14377     Defining HAVE_UNIX_PROCESSES
14378 EOF
14379 cat >> confdefs.h <<\EOF
14380 #define HAVE_UNIX_PROCESSES 1
14381 EOF
14382 }
14383
14384   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14385    echo "    xemacs will be linked with \"process-unix.o\""
14386  fi
14387 fi
14388
14389
14390
14391 T=""
14392 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14393 CFLAGS="$T"
14394
14395
14396 T=""
14397 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14398 extra_objs="$T"
14399
14400
14401 T=""
14402 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
14403 c_switch_general="$T"
14404
14405
14406 T=""
14407 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14408 c_switch_window_system="$T"
14409
14410
14411 T=""
14412 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14413 c_switch_all="$T"
14414
14415
14416 T=""
14417 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
14418 ld_switch_general="$T"
14419
14420
14421 T=""
14422 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14423 ld_switch_window_system="$T"
14424
14425
14426 T=""
14427 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14428 ld_switch_all="$T"
14429
14430
14431 T=""
14432 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14433 ld_libs_general="$T"
14434
14435
14436 T=""
14437 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
14438 ld_libs_window_system="$T"
14439
14440
14441 T=""
14442 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14443 ld_libs_all="$T"
14444
14445
14446
14447 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14448 internal_makefile_list="Makefile.in"
14449 SUBDIR_MAKEFILES=''
14450 test -d lock || mkdir lock
14451 for dir in $MAKE_SUBDIR; do
14452   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14453         test -d "$d" || mkdir "$d"; cd "$d"
14454       done ) ;;
14455    * ) test -d "$dir" || mkdir "$dir" ;;
14456   esac
14457   
14458 T=""
14459 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14460 SUBDIR_MAKEFILES="$T"
14461
14462   
14463 T=""
14464 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14465 internal_makefile_list="$T"
14466
14467 done
14468
14469
14470
14471
14472 for dir in src/s src/m; do
14473   if test ! -d "$dir" ; then
14474     echo Making symbolic link to "$srcdir/$dir"
14475     ${LN_S} "$srcdir/$dir" "$dir"
14476   fi
14477 done
14478
14479 if test "$extra_verbose" = "yes"; then
14480   echo ""
14481   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
14482   echo ""
14483 fi
14484
14485
14486 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14487   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14488   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14489 fi
14490
14491 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14492   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14493   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14494 fi
14495
14496 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14497   test "$extra_verbose" = "yes" && echo "creating TAGS"
14498   echo "\f
14499 $srcdir/TAGS,include" > "TAGS"
14500 fi
14501
14502 if test "$__SUNPRO_C" = "yes"; then
14503   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14504   ( echo "# For use with Sun WorkShop's Source browser."
14505     echo "# See sbquery(1) and sbinit(4) for more information"
14506     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14507   ) > .sbinit
14508 fi
14509
14510 rm -f core
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530 PREFIX=$prefix
14531 while true; do
14532   case "$PREFIX" in
14533     *\$* ) eval "PREFIX=$PREFIX" ;;
14534     *) break ;;
14535   esac
14536 done
14537
14538
14539
14540
14541 EXEC_PREFIX=$exec_prefix
14542 while true; do
14543   case "$EXEC_PREFIX" in
14544     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14545     *) break ;;
14546   esac
14547 done
14548
14549
14550
14551
14552 INFODIR=$infodir
14553 while true; do
14554   case "$INFODIR" in
14555     *\$* ) eval "INFODIR=$INFODIR" ;;
14556     *) break ;;
14557   esac
14558 done
14559
14560
14561
14562
14563 INFOPATH=$infopath
14564 while true; do
14565   case "$INFOPATH" in
14566     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14567     *) break ;;
14568   esac
14569 done
14570
14571
14572
14573
14574 PACKAGE_PATH=$package_path
14575 while true; do
14576   case "$PACKAGE_PATH" in
14577     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14578     *) break ;;
14579   esac
14580 done
14581
14582
14583
14584
14585 LISPDIR=$lispdir
14586 while true; do
14587   case "$LISPDIR" in
14588     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14589     *) break ;;
14590   esac
14591 done
14592
14593
14594
14595
14596 MODULEDIR=$moduledir
14597 while true; do
14598   case "$MODULEDIR" in
14599     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14600     *) break ;;
14601   esac
14602 done
14603
14604
14605
14606
14607 SITELISPDIR=$sitelispdir
14608 while true; do
14609   case "$SITELISPDIR" in
14610     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14611     *) break ;;
14612   esac
14613 done
14614
14615
14616
14617
14618 SITEMODULEDIR=$sitemoduledir
14619 while true; do
14620   case "$SITEMODULEDIR" in
14621     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14622     *) break ;;
14623   esac
14624 done
14625
14626
14627
14628
14629 ETCDIR=$etcdir
14630 while true; do
14631   case "$ETCDIR" in
14632     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14633     *) break ;;
14634   esac
14635 done
14636
14637
14638
14639
14640 DOCDIR=$docdir
14641 while true; do
14642   case "$DOCDIR" in
14643     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14644     *) break ;;
14645   esac
14646 done
14647
14648
14649
14650
14651 ARCHLIBDIR=$archlibdir
14652 while true; do
14653   case "$ARCHLIBDIR" in
14654     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14655     *) break ;;
14656   esac
14657 done
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14679
14680
14681
14682
14683
14684
14685
14686 : ${XEMACS_CC:=$CC}
14687
14688
14689 if test "$with_prefix" = "yes"; then
14690   { test "$extra_verbose" = "yes" && cat << \EOF
14691     Defining PREFIX_USER_DEFINED
14692 EOF
14693 cat >> confdefs.h <<\EOF
14694 #define PREFIX_USER_DEFINED 1
14695 EOF
14696 }
14697
14698 fi
14699
14700 if test "$with_site_lisp" = "no"; then
14701   { test "$extra_verbose" = "yes" && cat << \EOF
14702     Defining INHIBIT_SITE_LISP
14703 EOF
14704 cat >> confdefs.h <<\EOF
14705 #define INHIBIT_SITE_LISP 1
14706 EOF
14707 }
14708
14709 fi
14710 if test "$with_site_modules" = "no"; then
14711   { test "$extra_verbose" = "yes" && cat << \EOF
14712     Defining INHIBIT_SITE_MODULES
14713 EOF
14714 cat >> confdefs.h <<\EOF
14715 #define INHIBIT_SITE_MODULES 1
14716 EOF
14717 }
14718
14719 fi
14720
14721
14722 T=""
14723 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14724 ac_configure_args="$T"
14725
14726 { test "$extra_verbose" = "yes" && cat << EOF
14727     Defining EMACS_CONFIGURATION = "$configuration"
14728 EOF
14729 cat >> confdefs.h <<EOF
14730 #define EMACS_CONFIGURATION "$configuration"
14731 EOF
14732 }
14733
14734 { test "$extra_verbose" = "yes" && cat << EOF
14735     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14736 EOF
14737 cat >> confdefs.h <<EOF
14738 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14739 EOF
14740 }
14741
14742
14743
14744 null_string=""
14745 { test "$extra_verbose" = "yes" && cat << EOF
14746     Defining LD_SWITCH_X_SITE = $null_string
14747 EOF
14748 cat >> confdefs.h <<EOF
14749 #define LD_SWITCH_X_SITE $null_string
14750 EOF
14751 }
14752
14753 { test "$extra_verbose" = "yes" && cat << EOF
14754     Defining LD_SWITCH_X_SITE_AUX = $null_string
14755 EOF
14756 cat >> confdefs.h <<EOF
14757 #define LD_SWITCH_X_SITE_AUX $null_string
14758 EOF
14759 }
14760
14761 { test "$extra_verbose" = "yes" && cat << EOF
14762     Defining C_SWITCH_X_SITE = $null_string
14763 EOF
14764 cat >> confdefs.h <<EOF
14765 #define C_SWITCH_X_SITE $null_string
14766 EOF
14767 }
14768
14769 { test "$extra_verbose" = "yes" && cat << EOF
14770     Defining LD_SWITCH_SITE = $null_string
14771 EOF
14772 cat >> confdefs.h <<EOF
14773 #define LD_SWITCH_SITE $null_string
14774 EOF
14775 }
14776
14777 { test "$extra_verbose" = "yes" && cat << EOF
14778     Defining C_SWITCH_SITE = $null_string
14779 EOF
14780 cat >> confdefs.h <<EOF
14781 #define C_SWITCH_SITE $null_string
14782 EOF
14783 }
14784
14785
14786
14787 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14788     Defining GNU_MALLOC
14789 EOF
14790 cat >> confdefs.h <<\EOF
14791 #define GNU_MALLOC 1
14792 EOF
14793 }
14794
14795 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14796     Defining USE_SYSTEM_MALLOC
14797 EOF
14798 cat >> confdefs.h <<\EOF
14799 #define USE_SYSTEM_MALLOC 1
14800 EOF
14801 }
14802
14803 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14804     Defining USE_DEBUG_MALLOC
14805 EOF
14806 cat >> confdefs.h <<\EOF
14807 #define USE_DEBUG_MALLOC 1
14808 EOF
14809 }
14810
14811                                               { test "$extra_verbose" = "yes" && cat << \EOF
14812     Defining USE_SYSTEM_MALLOC
14813 EOF
14814 cat >> confdefs.h <<\EOF
14815 #define USE_SYSTEM_MALLOC 1
14816 EOF
14817 }
14818
14819 fi
14820 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14821     Defining I18N3
14822 EOF
14823 cat >> confdefs.h <<\EOF
14824 #define I18N3 1
14825 EOF
14826 }
14827
14828 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14829     Defining USE_GCC
14830 EOF
14831 cat >> confdefs.h <<\EOF
14832 #define USE_GCC 1
14833 EOF
14834 }
14835
14836 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14837     Defining EXTERNAL_WIDGET
14838 EOF
14839 cat >> confdefs.h <<\EOF
14840 #define EXTERNAL_WIDGET 1
14841 EOF
14842 }
14843
14844 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14845     Defining QUICK_BUILD
14846 EOF
14847 cat >> confdefs.h <<\EOF
14848 #define QUICK_BUILD 1
14849 EOF
14850 }
14851
14852 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14853     Defining PURIFY
14854 EOF
14855 cat >> confdefs.h <<\EOF
14856 #define PURIFY 1
14857 EOF
14858 }
14859
14860 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14861     Defining QUANTIFY
14862 EOF
14863 cat >> confdefs.h <<\EOF
14864 #define QUANTIFY 1
14865 EOF
14866 }
14867
14868 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14869     Defining MAIL_USE_POP
14870 EOF
14871 cat >> confdefs.h <<\EOF
14872 #define MAIL_USE_POP 1
14873 EOF
14874 }
14875
14876 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14877     Defining KERBEROS
14878 EOF
14879 cat >> confdefs.h <<\EOF
14880 #define KERBEROS 1
14881 EOF
14882 }
14883
14884 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14885     Defining HESIOD
14886 EOF
14887 cat >> confdefs.h <<\EOF
14888 #define HESIOD 1
14889 EOF
14890 }
14891
14892 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14893     Defining USE_UNION_TYPE
14894 EOF
14895 cat >> confdefs.h <<\EOF
14896 #define USE_UNION_TYPE 1
14897 EOF
14898 }
14899
14900 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14901     Defining PDUMP
14902 EOF
14903 cat >> confdefs.h <<\EOF
14904 #define PDUMP 1
14905 EOF
14906 }
14907
14908
14909
14910 (
14911 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14912 else
14913   echo "uname -a: `uname -a`"
14914 fi
14915 echo ""
14916 echo "$0 $quoted_arguments"
14917 ) > Installation
14918
14919 if test ! -z ${emacs_beta_version} ; then
14920   if test -z "${emacs_is_beta}" ; then
14921         xemacs_betaname=".${emacs_beta_version}"
14922   else
14923         xemacs_betaname="-b${emacs_beta_version}"
14924   fi
14925 else
14926   xemacs_betaname=""
14927 fi
14928
14929 (
14930 echo "
14931
14932 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14933 "
14934 echo "
14935 Compilation / Installation:"
14936 echo "  Source code location:              $srcdir"
14937 echo "  Installation prefix:               $prefix"
14938 if test -n "$site_includes"; then
14939   echo "  Additional header files:           $site_includes"
14940 fi
14941 if test -n "$site_libraries"; then
14942   echo "  Additional libraries:              $site_libraries"
14943 fi
14944 if test -n "$site_prefixes"; then
14945   echo "  Additional prefixes:               $site_prefixes"
14946 fi
14947 if test -n "$runpath"; then
14948   echo "  Runtime library search path:       $runpath"
14949 fi
14950
14951 if test -n "$opsysfile"
14952 then echo "  Operating system description file: \`$opsysfile'"
14953 else echo "  Not using any operating system description file"
14954 fi
14955 if test -n "$machfile"
14956 then echo "  Machine description file:          \`$machfile'"
14957 else echo "  Not using any machine description file"
14958 fi
14959
14960 echo "  Compiler:                          $CC $CFLAGS"
14961 echo "  Relocating allocator for buffers:  $rel_alloc"
14962 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
14963
14964 echo "
14965 Window System:"
14966 if test "$with_msw" = "yes"; then
14967   echo "  Compiling in support for the Microsoft window system."
14968 fi
14969 if test "$with_x11" = "yes"; then
14970   echo "  Compiling in support for the X window system:"
14971   echo "    - X Windows headers location:                 $x_includes"
14972   echo "    - X Windows libraries location:               $x_libraries"
14973   if test "$with_xauth" != yes; then
14974     echo "    - Xau (X authority) not available."
14975   fi
14976   if test "$with_xmu" != yes; then
14977     echo "    - Xmu library not available; substituting equivalent routines."
14978   fi
14979   if test "$with_wmcommand" != no; then
14980     echo "    - Handling WM_COMMAND properly."
14981   fi
14982 fi
14983 if test "$need_athena" = "yes"; then
14984   echo "  Compiling in support for the Athena widget set:"
14985   echo "    - Athena headers location:                    $athena_h_path"
14986   echo "    - Athena library to link:                     $athena_lib"
14987 fi
14988 case "$with_menubars" in
14989   lucid ) echo "  Using Lucid menubars." ;;
14990   motif ) echo "  Using Motif menubars."
14991           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14992           echo "             We recommend using the Lucid menubar instead."
14993           echo "             Re-run configure with --with-menubars='lucid'." ;;
14994     msw ) echo "  Using MS-Windows menubars." ;;
14995 esac
14996 case "$with_scrollbars" in
14997   lucid  ) echo "  Using Lucid scrollbars."      ;;
14998   motif  ) echo "  Using Motif scrollbars."      ;;
14999   athena ) echo "  Using Athena scrollbars."     ;;
15000      msw ) echo "  Using MS-Windows scrollbars." ;;
15001 esac
15002 case "$with_dialogs" in
15003   motif  ) echo "  Using Motif dialog boxes."
15004            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15005              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15006              echo "             We recommend using the Athena dialog boxes instead."
15007              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15008              echo "             Read the PROBLEMS file for more information."
15009            fi; fi ;;
15010   athena ) echo "  Using Athena dialog boxes."     ;;
15011      msw ) echo "  Using MS-Windows dialog boxes." ;;
15012 esac
15013 case "$with_widgets" in
15014   motif  ) echo "  Using Motif native widgets."      ;;
15015   athena ) echo "  Using Athena native widgets."     ;;
15016      msw ) echo "  Using MS-Windows native widgets." ;;
15017 esac
15018 if test "$with_dragndrop" = yes; then
15019   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15020   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15021 fi
15022
15023 echo "
15024 TTY:"
15025 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15026 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15027
15028 echo "
15029 Images:"
15030 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15031 if test "$with_xpm" = yes; then
15032   echo "  Compiling in support for XPM  images."
15033 elif test "$with_x11" = yes; then
15034   echo "  WARNING: -----------------------------------------------------------"
15035   echo "  WARNING: Compiling without XPM image support."
15036   if test "$xpm_problem" != ""; then
15037     echo "  Reason: $xpm_problem"
15038   fi
15039   echo "  WARNING: You should strongly consider installing XPM."
15040   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15041   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15042   echo "  WARNING: -----------------------------------------------------------"
15043 fi
15044 if test "$with_png" = yes; then
15045   echo "  Compiling in support for PNG  images."
15046 elif test "$window_system" != "none"; then
15047   echo "  WARNING: -----------------------------------------------------------"
15048   echo "  WARNING: Compiling without PNG image support."
15049   if test "$png_problem" != ""; then
15050     echo "  Reason: $png_problem"
15051   fi
15052   echo "  WARNING: You should strongly consider installing the PNG libraries."
15053   echo "  WARNING: Otherwise certain images and glyphs may not display."
15054   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15055   echo "  WARNING: -----------------------------------------------------------"
15056 fi
15057 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15058 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15059 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15060
15061 echo "
15062 Sound:"
15063 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15064 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15065 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15066 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15067
15068 echo "
15069 Databases:"
15070 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15071 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15072 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15073 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15074 if test "$with_postgresql" = yes; then
15075   echo "  Compiling in support for PostgreSQL."
15076   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15077   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15078 fi
15079
15080 echo "
15081 Internationalization:"
15082 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15083 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15084 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15085 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15086 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15087 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15088 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15089 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15090 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15091 if test "$with_wnn" = yes; then
15092   echo "  Compiling in support for the WNN input method on Mule."
15093   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15094 fi
15095 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15096
15097 echo "
15098 Mail:"
15099 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15100 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15101 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15102 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15103
15104 echo "
15105 Other Features:"
15106 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15107 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15108 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15109 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15110 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15111 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15112 test "$pdump" = yes && echo "  Using the new portable dumper."
15113 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15114 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15115 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15116   != "no no no no no no"; then
15117   echo "  WARNING: ---------------------------------------------------------"
15118   echo "  WARNING: Compiling in support for runtime error checking."
15119   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15120   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15121   echo "  WARNING: ---------------------------------------------------------"
15122 fi
15123 echo ""
15124 ) | tee -a Installation
15125 echo ""
15126
15127
15128 # Remove any trailing slashes in these variables.
15129 test -n "$prefix" &&
15130   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15131 test -n "$exec_prefix" &&
15132   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15133
15134
15135 for file in $internal_makefile_list; do
15136   test "$file" = src/Makefile.in && \
15137     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15138   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15139 done
15140 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15141 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
15142
15143 trap '' 1 2 15
15144
15145 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15146
15147 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15148 # Let make expand exec_prefix.
15149 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15150
15151 # Any assignment to VPATH causes Sun make to only execute
15152 # the first set of double-colon rules, so remove it if not needed.
15153 # If there is a colon in the path, we need to keep it.
15154 if test "x$srcdir" = x.; then
15155   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15156 fi
15157
15158 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15159
15160 DEFS=-DHAVE_CONFIG_H
15161
15162 # Without the "./", some shells look in PATH for config.status.
15163 : ${CONFIG_STATUS=./config.status}
15164
15165 echo creating $CONFIG_STATUS
15166 rm -f $CONFIG_STATUS
15167 cat > $CONFIG_STATUS <<EOF
15168 #! /bin/sh
15169 # Generated automatically by configure.
15170 # Run this file to recreate the current configuration.
15171 # This directory was configured as follows,
15172 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15173 #
15174 # $0 $ac_configure_args
15175 #
15176 # Compiler output produced by configure, useful for debugging
15177 # configure, is in ./config.log if it exists.
15178
15179 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15180 for ac_option
15181 do
15182   case "\$ac_option" in
15183   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15184     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15185     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15186   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15187     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15188     exit 0 ;;
15189   -help | --help | --hel | --he | --h)
15190     echo "\$ac_cs_usage"; exit 0 ;;
15191   *) echo "\$ac_cs_usage"; exit 1 ;;
15192   esac
15193 done
15194
15195 ac_given_srcdir=$srcdir
15196 ac_given_INSTALL="$INSTALL"
15197
15198 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15199 EOF
15200 cat >> $CONFIG_STATUS <<EOF
15201
15202 # Protect against being on the right side of a sed subst in config.status.
15203 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15204  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15205 $ac_vpsub
15206 $extrasub
15207 s%@SHELL@%$SHELL%g
15208 s%@CFLAGS@%$CFLAGS%g
15209 s%@CPPFLAGS@%$CPPFLAGS%g
15210 s%@CXXFLAGS@%$CXXFLAGS%g
15211 s%@FFLAGS@%$FFLAGS%g
15212 s%@DEFS@%$DEFS%g
15213 s%@LDFLAGS@%$LDFLAGS%g
15214 s%@LIBS@%$LIBS%g
15215 s%@exec_prefix@%$exec_prefix%g
15216 s%@prefix@%$prefix%g
15217 s%@program_transform_name@%$program_transform_name%g
15218 s%@bindir@%$bindir%g
15219 s%@sbindir@%$sbindir%g
15220 s%@libexecdir@%$libexecdir%g
15221 s%@datadir@%$datadir%g
15222 s%@sysconfdir@%$sysconfdir%g
15223 s%@sharedstatedir@%$sharedstatedir%g
15224 s%@localstatedir@%$localstatedir%g
15225 s%@libdir@%$libdir%g
15226 s%@includedir@%$includedir%g
15227 s%@oldincludedir@%$oldincludedir%g
15228 s%@infodir@%$infodir%g
15229 s%@mandir@%$mandir%g
15230 s%@LN_S@%$LN_S%g
15231 s%@blddir@%$blddir%g
15232 s%@CC@%$CC%g
15233 s%@CPP@%$CPP%g
15234 s%@start_flags@%$start_flags%g
15235 s%@ld_switch_shared@%$ld_switch_shared%g
15236 s%@start_files@%$start_files%g
15237 s%@ld@%$ld%g
15238 s%@lib_gcc@%$lib_gcc%g
15239 s%@RANLIB@%$RANLIB%g
15240 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15241 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15242 s%@INSTALL_DATA@%$INSTALL_DATA%g
15243 s%@YACC@%$YACC%g
15244 s%@SET_MAKE@%$SET_MAKE%g
15245 s%@X_CFLAGS@%$X_CFLAGS%g
15246 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15247 s%@X_LIBS@%$X_LIBS%g
15248 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15249 s%@install_pp@%$install_pp%g
15250 s%@libs_xauth@%$libs_xauth%g
15251 s%@dnd_objs@%$dnd_objs%g
15252 s%@lwlib_objs@%$lwlib_objs%g
15253 s%@ALLOCA@%$ALLOCA%g
15254 s%@have_esd_config@%$have_esd_config%g
15255 s%@dll_ld@%$dll_ld%g
15256 s%@dll_cflags@%$dll_cflags%g
15257 s%@dll_ldflags@%$dll_ldflags%g
15258 s%@dll_post@%$dll_post%g
15259 s%@dll_ldo@%$dll_ldo%g
15260 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15261 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15262 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15263 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15264 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15265 s%@PROGNAME@%$PROGNAME%g
15266 s%@version@%$version%g
15267 s%@configuration@%$configuration%g
15268 s%@canonical@%$canonical%g
15269 s%@inststaticdir@%$inststaticdir%g
15270 s%@instvardir@%$instvardir%g
15271 s%@srcdir@%$srcdir%g
15272 s%@pkgdir@%$pkgdir%g
15273 s%@statedir@%$statedir%g
15274 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15275 s%@PREFIX@%$PREFIX%g
15276 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15277 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15278 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15279 s%@INFODIR@%$INFODIR%g
15280 s%@infopath@%$infopath%g
15281 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15282 s%@INFOPATH@%$INFOPATH%g
15283 s%@package_path@%$package_path%g
15284 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15285 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15286 s%@lispdir@%$lispdir%g
15287 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15288 s%@LISPDIR@%$LISPDIR%g
15289 s%@moduledir@%$moduledir%g
15290 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15291 s%@MODULEDIR@%$MODULEDIR%g
15292 s%@sitelispdir@%$sitelispdir%g
15293 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15294 s%@SITELISPDIR@%$SITELISPDIR%g
15295 s%@sitemoduledir@%$sitemoduledir%g
15296 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15297 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15298 s%@etcdir@%$etcdir%g
15299 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15300 s%@ETCDIR@%$ETCDIR%g
15301 s%@docdir@%$docdir%g
15302 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15303 s%@DOCDIR@%$DOCDIR%g
15304 s%@archlibdir@%$archlibdir%g
15305 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15306 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15307 s%@bitmapdir@%$bitmapdir%g
15308 s%@extra_objs@%$extra_objs%g
15309 s%@machfile@%$machfile%g
15310 s%@opsysfile@%$opsysfile%g
15311 s%@c_switch_general@%$c_switch_general%g
15312 s%@c_switch_window_system@%$c_switch_window_system%g
15313 s%@c_switch_all@%$c_switch_all%g
15314 s%@ld_switch_general@%$ld_switch_general%g
15315 s%@ld_switch_window_system@%$ld_switch_window_system%g
15316 s%@ld_switch_all@%$ld_switch_all%g
15317 s%@ld_libs_general@%$ld_libs_general%g
15318 s%@ld_libs_window_system@%$ld_libs_window_system%g
15319 s%@ld_libs_all@%$ld_libs_all%g
15320 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15321 s%@native_sound_lib@%$native_sound_lib%g
15322 s%@sound_cflags@%$sound_cflags%g
15323 s%@dynodump_arch@%$dynodump_arch%g
15324 s%@XEMACS_CC@%$XEMACS_CC%g
15325 s%@internal_makefile_list@%$internal_makefile_list%g
15326
15327 CEOF
15328 EOF
15329
15330 cat >> $CONFIG_STATUS <<\EOF
15331
15332 # Split the substitutions into bite-sized pieces for seds with
15333 # small command number limits, like on Digital OSF/1 and HP-UX.
15334 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15335 ac_file=1 # Number of current file.
15336 ac_beg=1 # First line for current file.
15337 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15338 ac_more_lines=:
15339 ac_sed_cmds=""
15340 while $ac_more_lines; do
15341   if test $ac_beg -gt 1; then
15342     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15343   else
15344     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15345   fi
15346   if test ! -s conftest.s$ac_file; then
15347     ac_more_lines=false
15348     rm -f conftest.s$ac_file
15349   else
15350     if test -z "$ac_sed_cmds"; then
15351       ac_sed_cmds="sed -f conftest.s$ac_file"
15352     else
15353       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15354     fi
15355     ac_file=`expr $ac_file + 1`
15356     ac_beg=$ac_end
15357     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15358   fi
15359 done
15360 if test -z "$ac_sed_cmds"; then
15361   ac_sed_cmds=cat
15362 fi
15363 EOF
15364
15365 cat >> $CONFIG_STATUS <<EOF
15366
15367 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15368 EOF
15369 cat >> $CONFIG_STATUS <<\EOF
15370 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15371   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15372   case "$ac_file" in
15373   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15374        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15375   *) ac_file_in="${ac_file}.in" ;;
15376   esac
15377
15378   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15379
15380   # Remove last slash and all that follows it.  Not all systems have dirname.
15381   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15382   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15383     # The file is in a subdirectory.
15384     test ! -d "$ac_dir" && mkdir "$ac_dir"
15385     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15386     # A "../" for each directory in $ac_dir_suffix.
15387     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15388   else
15389     ac_dir_suffix= ac_dots=
15390   fi
15391
15392   case "$ac_given_srcdir" in
15393   .)  srcdir=.
15394       if test -z "$ac_dots"; then top_srcdir=.
15395       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15396   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15397   *) # Relative path.
15398     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15399     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15400   esac
15401
15402   case "$ac_given_INSTALL" in
15403   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15404   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15405   esac
15406
15407   echo creating "$ac_file"
15408   rm -f "$ac_file"
15409   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15410   case "$ac_file" in
15411   *Makefile*) ac_comsub="1i\\
15412 # $configure_input" ;;
15413   *) ac_comsub= ;;
15414   esac
15415
15416   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15417   sed -e "$ac_comsub
15418 s%@configure_input@%$configure_input%g
15419 s%@srcdir@%$srcdir%g
15420 s%@top_srcdir@%$top_srcdir%g
15421 s%@INSTALL@%$INSTALL%g
15422 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15423 fi; done
15424 rm -f conftest.s*
15425
15426 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15427 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15428 #
15429 # ac_d sets the value in "#define NAME VALUE" lines.
15430 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15431 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15432 ac_dC='\3'
15433 ac_dD='%g'
15434 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15435 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15436 ac_uB='\([      ]\)%\1#\2define\3'
15437 ac_uC=' '
15438 ac_uD='\4%g'
15439 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15440 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15441 ac_eB='$%\1#\2define\3'
15442 ac_eC=' '
15443 ac_eD='%g'
15444
15445 if test "${CONFIG_HEADERS+set}" != set; then
15446 EOF
15447 cat >> $CONFIG_STATUS <<EOF
15448   CONFIG_HEADERS="src/config.h lwlib/config.h"
15449 EOF
15450 cat >> $CONFIG_STATUS <<\EOF
15451 fi
15452 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15453   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15454   case "$ac_file" in
15455   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15456        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15457   *) ac_file_in="${ac_file}.in" ;;
15458   esac
15459
15460   echo creating $ac_file
15461
15462   rm -f conftest.frag conftest.in conftest.out
15463   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15464   cat $ac_file_inputs > conftest.in
15465
15466 EOF
15467
15468 # Transform confdefs.h into a sed script conftest.vals that substitutes
15469 # the proper values into config.h.in to produce config.h.  And first:
15470 # Protect against being on the right side of a sed subst in config.status.
15471 # Protect against being in an unquoted here document in config.status.
15472 rm -f conftest.vals
15473 cat > conftest.hdr <<\EOF
15474 s/[\\&%]/\\&/g
15475 s%[\\$`]%\\&%g
15476 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15477 s%ac_d%ac_u%gp
15478 s%ac_u%ac_e%gp
15479 EOF
15480 sed -n -f conftest.hdr confdefs.h > conftest.vals
15481 rm -f conftest.hdr
15482
15483 # This sed command replaces #undef with comments.  This is necessary, for
15484 # example, in the case of _POSIX_SOURCE, which is predefined and required
15485 # on some systems where configure will not decide to define it.
15486 cat >> conftest.vals <<\EOF
15487 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15488 EOF
15489
15490 # Break up conftest.vals because some shells have a limit on
15491 # the size of here documents, and old seds have small limits too.
15492
15493 rm -f conftest.tail
15494 while :
15495 do
15496   ac_lines=`grep -c . conftest.vals`
15497   # grep -c gives empty output for an empty file on some AIX systems.
15498   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15499   # Write a limited-size here document to conftest.frag.
15500   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15501   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15502   echo 'CEOF
15503   sed -f conftest.frag conftest.in > conftest.out
15504   rm -f conftest.in
15505   mv conftest.out conftest.in
15506 ' >> $CONFIG_STATUS
15507   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15508   rm -f conftest.vals
15509   mv conftest.tail conftest.vals
15510 done
15511 rm -f conftest.vals
15512
15513 cat >> $CONFIG_STATUS <<\EOF
15514   rm -f conftest.frag conftest.h
15515   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15516   cat conftest.in >> conftest.h
15517   rm -f conftest.in
15518   if cmp -s $ac_file conftest.h 2>/dev/null; then
15519     echo "$ac_file is unchanged"
15520     rm -f conftest.h
15521   else
15522     # Remove last slash and all that follows it.  Not all systems have dirname.
15523       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15524       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15525       # The file is in a subdirectory.
15526       test ! -d "$ac_dir" && mkdir "$ac_dir"
15527     fi
15528     rm -f $ac_file
15529     mv conftest.h $ac_file
15530   fi
15531 fi; done
15532
15533 EOF
15534 cat >> $CONFIG_STATUS <<EOF
15535 CPP="$CPP"
15536  top_srcdir="$srcdir"
15537  MAKE_SUBDIR="$MAKE_SUBDIR"
15538
15539 EOF
15540 cat >> $CONFIG_STATUS <<\EOF
15541 for dir in . $MAKE_SUBDIR; do
15542   (
15543     cd $dir
15544     rm -f junk.c
15545     < Makefile.in \
15546       sed -e '/^# Generated/d' \
15547           -e 's%/\*\*/#.*%%' \
15548           -e 's/^ *# */#/' \
15549           -e '/^##/d' \
15550           -e '/^#/ {
15551 p
15552 d
15553 }'        \
15554           -e '/./ {
15555 s/\([\"]\)/\\\1/g
15556 s/^/"/
15557 s/$/"/
15558 }'  > junk.c;
15559
15560
15561
15562     echo creating $dir/Makefile
15563 $CPP -I. -I${top_srcdir}/src  junk.c \
15564   | sed -e 's/^\#.*//'          \
15565         -e 's/^[        ][      ]*$//'\
15566         -e 's/^ /       /'              \
15567         -e '/^[ \f]*$/d' \
15568         -e '/^\"/ {
15569         s/\\\([\"]\)/\1/g
15570         s/^[    ]*\"//
15571         s/\"[   ]*$//
15572 }' > Makefile.new
15573     chmod 444 Makefile.new
15574     mv -f Makefile.new Makefile
15575
15576     echo creating $dir/GNUmakefile
15577 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15578   | sed -e 's/^\#.*//'          \
15579         -e 's/^[        ][      ]*$//'\
15580         -e 's/^ /       /'              \
15581         -e '/^[ \f]*$/d' \
15582         -e '/^\"/ {
15583         s/\\\([\"]\)/\1/g
15584         s/^[    ]*\"//
15585         s/\"[   ]*$//
15586 }' > Makefile.new
15587     chmod 444 Makefile.new
15588     mv -f Makefile.new GNUmakefile
15589
15590     rm -f junk.c
15591   )
15592 done
15593
15594 sed < config.status >> lib-src/config.values \
15595   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15596   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15597   -e 's/^\([^ ]*\) $/\1 ""/' \
15598   -e 's/ 1$/ t/'
15599
15600
15601 exit 0
15602 EOF
15603 chmod +x $CONFIG_STATUS
15604 rm -fr confdefs* $ac_clean_files
15605 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1