30da12e588809ce016d612bba51d2a969e3d6e18
[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, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 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) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 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
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump="no"
261 with_dragndrop="no"
262 with_ipv6_cname="yes"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_utf_2000   | \
343         with_text_coding| \
344         with_file_coding| \
345         with_canna      | \
346         with_wnn        | \
347         with_wnn6       | \
348         with_workshop   | \
349         with_sparcworks | \
350         with_tooltalk   | \
351         with_ldap       | \
352         with_postgresql | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         with_netinstall | \
359         with_ipv6_cname | \
360         external_widget | \
361         verbose         | \
362         extra_verbose   | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         quick_build )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 Option \`all' or \`none' must be first in the list.
476 The default is to autodetect native and NAS 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                 { 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                 { 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              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
715     Defining DOCDIR_USER_DEFINED
716 EOF
717 cat >> confdefs.h <<\EOF
718 #define DOCDIR_USER_DEFINED 1
719 EOF
720 }
721  ;;
722              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
723     Defining ARCHLIBDIR_USER_DEFINED
724 EOF
725 cat >> confdefs.h <<\EOF
726 #define ARCHLIBDIR_USER_DEFINED 1
727 EOF
728 }
729  ;;
730            esac
731         ;;
732
733                 "no_create" ) ;;
734
735                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
736
737                 "with_menubars"   | \
738         "with_scrollbars" | \
739         "with_dialogs"    | \
740         "with_widgets" )
741           case "$val" in
742             l | lu | luc | luci | lucid )               val=lucid  ;;
743             mo | mot | moti | motif )                   val=motif  ;;
744             a | at | ath | athe | athen | athena )      val=athena ;;
745             n | no | non | none )                       val=no     ;;
746             y | ye | yes )                              val=yes    ;;
747             g | gt | gtk )                              val=gtk    ;;
748             ms | msw )                                  val=msw    ;;
749             * ) (echo "$progname: Usage error:"
750 echo " " "The \`--$optname' option must have one of these values:
751   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
752 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
753           esac
754           eval "$opt=\"$val\""
755         ;;
756
757                 "use_minimal_tagbits" | \
758         "use_indexed_lrecord_implementation" | \
759         "run_in_place"  | \
760         "const_is_losing" | \
761         "with_gnu_make" )
762           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
763         ;;
764
765                 * ) (echo "$progname: Usage error:"
766 echo " " "Unrecognized option: $arg"
767 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
768
769       esac
770     ;;
771
772         *-*-*) configuration="$arg" ;;
773
774         *) (echo "$progname: Usage error:"
775 echo " " "Unrecognized argument: $arg"
776 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
777
778   esac
779 done
780
781
782 test -n "$cpp"      && CPP="$cpp"
783 test -n "$cppflags" && CPPFLAGS="$cppflags"
784 test -n "$libs"     && LIBS="$libs"
785 test -n "$ldflags"  && LDFLAGS="$ldflags"
786
787 eval set x "$quoted_arguments"; shift
788
789 test "$extra_verbose" = "yes" && verbose=yes
790
791 test -n "$with_x" && with_x11="$with_x"
792
793 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
794   test "$with_system_malloc" = "default" && with_system_malloc=yes
795 fi
796
797
798
799 if test "$with_cde $with_tooltalk" = "yes no"; then
800   (echo "$progname: Usage error:"
801 echo " " "--with-cde requires --with-tooltalk"
802 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
803 elif test "$with_tooltalk" = "no" ; then with_cde=no
804 elif test "$with_cde" = "yes"; then with_tooltalk=yes
805 fi
806
807
808 case "$srcdir" in
809
810     "" )
811     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
812       if test -f "$dir/src/lisp.h" -a \
813               -f "$dir/lisp/version.el" ; then
814         srcdir="$dir"
815         break
816       fi
817     done
818     if test -z "$srcdir" ; then
819       (echo "$progname: Usage error:"
820 echo " " "Neither the current directory nor its parent seem to
821   contain the XEmacs sources.  If you do not want to build XEmacs in its
822   source tree, you should run \`$progname' in the directory in which
823   you wish to build XEmacs, using the \`--srcdir' option to say where the
824   sources may be found."
825 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
826     fi
827   ;;
828
829     * )
830     if test ! -f "$srcdir/src/lisp.h" -o \
831             ! -f "$srcdir/lisp/version.el" ; then
832       (echo "$progname: Usage error:"
833 echo " " "The directory specified with the \`--srcdir' option,
834   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
835   either run the \`$progname' script at the top of the XEmacs source
836   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
837 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
838     fi
839   ;;
840 esac
841
842 if test -z "$configuration"; then
843     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
844   if test -z "$configuration"; then
845     (echo "$progname: Usage error:"
846 echo " " "XEmacs has not been ported to this host type.
847 Try explicitly specifying the CONFIGURATION when rerunning configure."
848 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
849   fi
850 fi
851
852 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
853 echo "configure:854: checking whether ln -s works" >&5
854
855 rm -f conftestdata
856 if ln -s X conftestdata 2>/dev/null
857 then
858   rm -f conftestdata
859   ac_cv_prog_LN_S="ln -s"
860 else
861   ac_cv_prog_LN_S=ln
862 fi
863 LN_S="$ac_cv_prog_LN_S"
864 if test "$ac_cv_prog_LN_S" = "ln -s"; then
865   echo "$ac_t""yes" 1>&6
866 else
867   echo "$ac_t""no" 1>&6
868 fi
869
870
871 for dir in lisp etc man info tests; do
872   if test ! -d "$dir" ; then
873     echo Making symbolic link to "$srcdir/$dir"
874     ${LN_S} "$srcdir/$dir" "$dir"
875   fi
876 done
877
878
879 absolute_pwd="`pwd`";
880 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
881 then blddir="$PWD"
882 else blddir="$absolute_pwd"; if test -d "/net"; then
883   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
884   blddir=`echo "$blddir" | \
885    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
886 fi
887 fi
888
889
890 case "$srcdir" in
891   /* ) ;;
892   .  ) srcdir="$blddir" ;;
893   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
894   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
895   srcdir=`echo "$srcdir" | \
896    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
897 fi ;;
898 esac
899
900 if test `pwd` != `sh -c cd $srcdir && pwd`  \
901    && test -f "$srcdir/src/config.h"; then
902   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
903    echo "   as a build directory right now; it has been configured in its own"
904    echo "   right.  To configure in another directory as well, you MUST"
905    echo "   use GNU make.  If you do not have GNU make, then you must"
906    echo "   now do \`make distclean' in $srcdir,"
907    echo "   and then run $progname again.") >&2
908   extrasub='/^VPATH[     ]*=/c\
909 vpath %.c $(srcdir)\
910 vpath %.h $(srcdir)\
911 vpath %.y $(srcdir)\
912 vpath %.l $(srcdir)\
913 vpath %.s $(srcdir)\
914 vpath %.in $(srcdir)'
915 fi
916
917 . "$srcdir/version.sh" || exit 1;
918 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
919 : "${extra_verbose=$beta}"
920 version="${emacs_major_version}.${emacs_minor_version}"
921 { test "$extra_verbose" = "yes" && cat << EOF
922     Defining EMACS_MAJOR_VERSION = $emacs_major_version
923 EOF
924 cat >> confdefs.h <<EOF
925 #define EMACS_MAJOR_VERSION $emacs_major_version
926 EOF
927 }
928
929 { test "$extra_verbose" = "yes" && cat << EOF
930     Defining EMACS_MINOR_VERSION = $emacs_minor_version
931 EOF
932 cat >> confdefs.h <<EOF
933 #define EMACS_MINOR_VERSION $emacs_minor_version
934 EOF
935 }
936
937 if test -n "$emacs_beta_version" ; then
938   if test "$beta" = "yes"; then
939         version="${version}-b${emacs_beta_version}"
940         { test "$extra_verbose" = "yes" && cat << EOF
941     Defining EMACS_BETA_VERSION = $emacs_beta_version
942 EOF
943 cat >> confdefs.h <<EOF
944 #define EMACS_BETA_VERSION $emacs_beta_version
945 EOF
946 }
947
948   else
949         version="${version}.${emacs_beta_version}"
950         { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_PATCH_LEVEL $emacs_beta_version
955 EOF
956 }
957
958   fi
959 fi
960 { test "$extra_verbose" = "yes" && cat << EOF
961     Defining XEMACS_CODENAME = "$xemacs_codename"
962 EOF
963 cat >> confdefs.h <<EOF
964 #define XEMACS_CODENAME "$xemacs_codename"
965 EOF
966 }
967
968 { test "$extra_verbose" = "yes" && cat << EOF
969     Defining EMACS_VERSION = "$version"
970 EOF
971 cat >> confdefs.h <<EOF
972 #define EMACS_VERSION "$version"
973 EOF
974 }
975
976
977 if test "$with_infodock" = "yes"; then
978   if test ! -f ../../ID-INSTALL; then
979     echo "Cannot build InfoDock without InfoDock sources"
980     with_infodock=no
981   fi
982 fi
983
984 if test "$with_infodock" = "yes"; then
985       { test "$extra_verbose" = "yes" && cat << EOF
986     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
987 EOF
988 cat >> confdefs.h <<EOF
989 #define INFODOCK_MAJOR_VERSION $infodock_major_version
990 EOF
991 }
992
993   { test "$extra_verbose" = "yes" && cat << EOF
994     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
995 EOF
996 cat >> confdefs.h <<EOF
997 #define INFODOCK_MINOR_VERSION $infodock_minor_version
998 EOF
999 }
1000
1001   { test "$extra_verbose" = "yes" && cat << EOF
1002     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1003 EOF
1004 cat >> confdefs.h <<EOF
1005 #define INFODOCK_BUILD_VERSION $infodock_build_version
1006 EOF
1007 }
1008
1009   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1010   PROGNAME=infodock
1011   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1012 else
1013   PROGNAME=xemacs
1014 fi
1015
1016 { test "$extra_verbose" = "yes" && cat << EOF
1017     Defining EMACS_PROGNAME = "$PROGNAME"
1018 EOF
1019 cat >> confdefs.h <<EOF
1020 #define EMACS_PROGNAME "$PROGNAME"
1021 EOF
1022 }
1023
1024
1025 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1026 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1027     Defining ERROR_CHECK_EXTENTS
1028 EOF
1029 cat >> confdefs.h <<\EOF
1030 #define ERROR_CHECK_EXTENTS 1
1031 EOF
1032 }
1033
1034 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1035     Defining ERROR_CHECK_TYPECHECK
1036 EOF
1037 cat >> confdefs.h <<\EOF
1038 #define ERROR_CHECK_TYPECHECK 1
1039 EOF
1040 }
1041
1042 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1043     Defining ERROR_CHECK_BUFPOS
1044 EOF
1045 cat >> confdefs.h <<\EOF
1046 #define ERROR_CHECK_BUFPOS 1
1047 EOF
1048 }
1049
1050 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1051     Defining ERROR_CHECK_GC
1052 EOF
1053 cat >> confdefs.h <<\EOF
1054 #define ERROR_CHECK_GC 1
1055 EOF
1056 }
1057
1058 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1059     Defining ERROR_CHECK_MALLOC
1060 EOF
1061 cat >> confdefs.h <<\EOF
1062 #define ERROR_CHECK_MALLOC 1
1063 EOF
1064 }
1065
1066 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1067     Defining ERROR_CHECK_BYTE_CODE
1068 EOF
1069 cat >> confdefs.h <<\EOF
1070 #define ERROR_CHECK_BYTE_CODE 1
1071 EOF
1072 }
1073
1074 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1075     Defining ERROR_CHECK_GLYPHS
1076 EOF
1077 cat >> confdefs.h <<\EOF
1078 #define ERROR_CHECK_GLYPHS 1
1079 EOF
1080 }
1081
1082 if test "${debug:=$beta}" = "yes"; then
1083   use_assertions=yes memory_usage_stats=yes
1084   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1085    echo "    xemacs will be linked with \"debug.o\""
1086  fi
1087   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1088    echo "    xemacs will be linked with \"tests.o\""
1089  fi
1090   { test "$extra_verbose" = "yes" && cat << \EOF
1091     Defining DEBUG_XEMACS
1092 EOF
1093 cat >> confdefs.h <<\EOF
1094 #define DEBUG_XEMACS 1
1095 EOF
1096 }
1097
1098 fi
1099 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1100     Defining USE_ASSERTIONS
1101 EOF
1102 cat >> confdefs.h <<\EOF
1103 #define USE_ASSERTIONS 1
1104 EOF
1105 }
1106
1107 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1108     Defining MEMORY_USAGE_STATS
1109 EOF
1110 cat >> confdefs.h <<\EOF
1111 #define MEMORY_USAGE_STATS 1
1112 EOF
1113 }
1114
1115
1116
1117 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1118 echo "configure:1119: checking "host system type"" >&5
1119 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1120 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1121 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1122 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1123 echo "$ac_t""$configuration" 1>&6
1124
1125
1126
1127
1128
1129 machine='' opsys=''
1130
1131 case "$canonical" in
1132   sparc-*-*        ) machine=sparc ;;
1133   alpha*-*-*       ) machine=alpha ;;
1134   vax-*-*          ) machine=vax ;;
1135   mips-dec-*       ) machine=pmax ;;
1136   mips-sgi-irix6*  ) machine=iris6d ;;
1137   mips-sgi-*       ) machine=iris4d ;;
1138   mips*-linux      ) machine=mips ;;
1139   romp-ibm-*       ) machine=ibmrt ;;
1140   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1141   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1142   powerpc*-*       ) machine=powerpc ;;
1143   hppa-*-*         ) machine=hp800 ;;
1144   m88k-dg-*        ) machine=aviion ;;
1145   m68*-sony-*      ) machine=news ;;
1146   mips-sony-*      ) machine=news-risc ;;
1147   clipper-*        ) machine=clipper ;;
1148   arm*             ) machine=arm ;;
1149   ns32k-*          ) machine=ns32000 ;;
1150 esac
1151
1152 case "$canonical" in
1153   *-*-linux*    ) opsys=linux ;;
1154   *-*-netbsd*   ) opsys=netbsd ;;
1155   *-*-openbsd*  ) opsys=openbsd ;;
1156   *-*-nextstep* ) opsys=nextstep ;;
1157   *-*-vms       ) opsys=vms ;;
1158
1159     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1160   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1161   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1162   *-dec-osf3*                ) opsys=decosf3-1 ;;
1163   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1164
1165     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1166   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1167   *-*-ultrix* )         opsys=ultrix4-3 ;;
1168
1169     *-*-aix3.1*  ) opsys=aix3-1 ;;
1170   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1171   *-*-aix3*    ) opsys=aix3-2   ;;
1172   *-*-aix4.0*  ) opsys=aix4     ;;
1173   *-*-aix4.1*  ) opsys=aix4-1   ;;
1174   *-*-aix4*    ) opsys=aix4-2   ;;
1175
1176     *-gnu* )                    opsys=gnu    ;;
1177   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1178   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1179   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1180   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1181   *-*-aos*   )                  opsys=bsd4-3 ;;
1182   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1183   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1184   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1185   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1186   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1187   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1188         if test -z "$NON_GNU_CPP" ; then
1189           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1190             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1191           done
1192         fi
1193         opsys=usg5-4-2 ;;
1194     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1195     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1196 esac
1197
1198 case "$canonical" in
1199
1200     *-*-netbsd* )
1201     case "$canonical" in
1202       i[3-9]86-*-netbsd*) machine=intel386 ;;
1203       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1204                                             machine=hp9000s300 ;;
1205       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1206       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1207     esac
1208   ;;
1209
1210     *-*-openbsd* )
1211     case "${canonical}" in
1212       i386-*-openbsd*)          machine=intel386 ;;
1213       m68k-*-openbsd*)          machine=hp9000s300 ;;
1214       mipsel-*-openbsd*)        machine=pmax ;;
1215      esac
1216    ;;
1217
1218     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1219   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1220
1221     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1222   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1223
1224     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1225
1226     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1227
1228     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1229
1230     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1231
1232     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1233
1234     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1235   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1236   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1237
1238   
1239     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1240
1241     *-convex-bsd* | *-convex-convexos* )
1242     machine=convex opsys=bsd4-3
1243     NON_GNU_CPP="cc -E -P"
1244   ;;
1245
1246     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1247
1248     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1249   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1250   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1251   m88k-dg-dgux*                           ) opsys=dgux     ;;
1252
1253     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1254   m88k-motorola-sysv4* )
1255                     machine=delta88k opsys=usg5-4-2
1256   ;;
1257   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1258
1259     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1260   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1261
1262     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1263
1264     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1265   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1266   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1267
1268       m88k-harris-cxux* )
1269         case "`uname -r`" in
1270        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1271        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1272     esac
1273     NON_GNU_CPP="/lib/cpp"
1274   ;;
1275     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1276     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1277
1278     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1279
1280     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1281
1282     *-hp-hpux* )
1283         case "$canonical" in
1284       m68*  ) machine=hp9000s300 ;;
1285       hppa* ) machine=hp800      ;;
1286     esac
1287
1288     case "$canonical" in
1289       *-hp-hpux7*  )  opsys=hpux   ;;
1290       *-hp-hpux8*  )  opsys=hpux8  ;;
1291       *-hp-hpux9*  )  opsys=hpux9  ;;
1292       *-hp-hpux10* )  opsys=hpux10 ;;
1293       *-hp-hpux11* )  opsys=hpux11 ;;
1294       *            )  opsys=hpux   ;;
1295     esac
1296
1297         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1298    echo "    xemacs will be linked with \"strcat.o\""
1299  fi ;; esac
1300
1301     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1302         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1303     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1304
1305     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1306   ;;
1307
1308     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1309   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1310
1311     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1312   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1313   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1314   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1315   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1316   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1317
1318     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1319   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1320
1321     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1322
1323     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1324
1325     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1326
1327     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1328
1329       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1330
1331     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1332
1333     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1334
1335     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1336
1337     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1338
1339         mips-mips-usg* ) machine=mips4 ;;
1340   mips-mips-riscos4 )
1341     machine=mips4
1342     NON_GNU_CC="cc -systype bsd43"
1343     NON_GNU_CPP="cc -systype bsd43 -E"
1344     case "$canonical" in
1345       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1346       mips-mips-riscos5* ) opsys=riscos5 ;;
1347     esac
1348   ;;
1349   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1350   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1351
1352     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1353
1354     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1355
1356     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1357   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1358
1359     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1360
1361     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1362
1363     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1364
1365     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1366
1367     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1368   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1369
1370     mips-siemens-sysv* | mips-sni-sysv*)
1371     machine=mips-siemens opsys=usg5-4
1372     NON_GNU_CC=/usr/ccs/bin/cc
1373     NON_GNU_CPP=/usr/ccs/lib/cpp
1374   ;;
1375
1376     mips-nec-sysv*)
1377     machine=mips-nec
1378     NON_GNU_CC=/usr/ccs/bin/cc
1379     NON_GNU_CPP=/usr/ccs/lib/cpp
1380   ;;
1381
1382       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1383   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1384     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1385   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1386   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1387   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1388   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1389   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1390   mips-sgi-irix*      ) opsys=irix5-0 ;;
1391
1392     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1393   *-sony-news* ) opsys=newsos5 ;;
1394
1395     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1396
1397     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1398         case "$canonical" in
1399       m68*-sunos1* )             machine=sun1     ;;
1400       m68*-sunos2* )             machine=sun2     ;;
1401       m68* )                     machine=sun3     ;;
1402       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1403       i*86-*-* )                 machine=intel386 ;;
1404       rs6000* )                  machine=rs6000   ;;
1405     esac
1406
1407         case "$canonical" in *-sunos5*)
1408       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1409     esac
1410
1411                     case "$canonical" in
1412       *-sunos4* )
1413         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1414         : ;;
1415       *-solaris2* )
1416         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1417         RANLIB=':' ;;
1418     esac
1419
1420     case "$canonical" in
1421       *-solaris*          )
1422         opsys=sol2
1423         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1424         { test "$extra_verbose" = "yes" && cat << EOF
1425     Defining OS_RELEASE = $os_release
1426 EOF
1427 cat >> confdefs.h <<EOF
1428 #define OS_RELEASE $os_release
1429 EOF
1430 }
1431  ;;
1432
1433             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1434       *-sunos4.0*         ) opsys=sunos4-0      ;;
1435       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1436       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1437       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1438       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1439       *-mach*             ) opsys=mach-bsd4-3   ;;
1440       *                   ) opsys=bsd4-2        ;;
1441     esac
1442
1443     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1444
1445         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1446   ;;
1447
1448     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1449
1450     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1451   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1452
1453     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1454
1455     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1456
1457     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1458       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1459
1460     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1461
1462     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1463
1464     vax-dec-* )
1465     case "$canonical" in
1466       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1467       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1468       *-mach* )                         opsys=mach-bsd4-3 ;;
1469     esac
1470   ;;
1471
1472     ns16k-whitechapel-* ) machine=mg1 ;;
1473
1474     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1475
1476     i[3-9]86-*-* )
1477     machine=intel386
1478     case "$canonical" in
1479       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1480       *-isc2.2* )               opsys=isc2-2 ;;
1481       *-isc4.0* )               opsys=isc4-0 ;;
1482       *-isc4.* )                opsys=isc4-1
1483                                 GCC_TEST_OPTIONS=-posix
1484                                 NON_GCC_TEST_OPTIONS=-Xp
1485                                 ;;
1486       *-isc* )                  opsys=isc3-0 ;;
1487       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1488       *-esix* )                 opsys=esix ;;
1489       *-mach* )                 opsys=mach-bsd4-3 ;;
1490       *-xenix* )                opsys=xenix ;;
1491       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1492       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1493       *-bsdi4* )                opsys=bsdos4 ;;
1494       *-bsdi3* )                opsys=bsdos3 ;;
1495       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1496       *-bsdi2* )                opsys=bsdos2 ;;
1497       *-sco3.2v5* )             opsys=sco5 ;;
1498       *-sysv5* )                opsys=sco7 ;;
1499       *-386bsd* )               opsys=386bsd ;;
1500       *-freebsd* )              opsys=freebsd ;;
1501       *-nextstep* )             opsys=nextstep ;;
1502       *-pc-cygwin* )            opsys=cygwin32 ;;
1503       *-pc-mingw* )             opsys=mingw32 ;
1504                                 test -z "$with_tty" && with_tty="no";;
1505           esac
1506   ;;
1507
1508     m68k-*-linux* ) machine=m68k opsys=linux ;;
1509
1510 esac
1511
1512 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1513
1514 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1515
1516 if test -r "${srcdir}/src/m/${machine}.h"; then
1517   machfile="m/${machine}.h"
1518   { test "$extra_verbose" = "yes" && cat << EOF
1519     Defining config_machfile = "$machfile"
1520 EOF
1521 cat >> confdefs.h <<EOF
1522 #define config_machfile "$machfile"
1523 EOF
1524 }
1525
1526 else
1527   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1528   echo "Using configure-time autodetection only."
1529 fi
1530
1531 if test -r "${srcdir}/src/s/${opsys}.h"; then
1532   opsysfile="s/${opsys}.h"
1533   { test "$extra_verbose" = "yes" && cat << EOF
1534     Defining config_opsysfile = "$opsysfile"
1535 EOF
1536 cat >> confdefs.h <<EOF
1537 #define config_opsysfile "$opsysfile"
1538 EOF
1539 }
1540
1541 else
1542   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1543   echo "Using configure-time autodetection only."
1544 fi
1545
1546
1547 if test -z "$dynamic"; then
1548   case "$opsys" in
1549     hpux* | sunos4* ) dynamic=no ;;
1550     *) dynamic=yes ;;
1551   esac
1552 fi
1553 if test "$dynamic" = "yes"; then
1554   case "$opsys" in
1555     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1556     decosf* ) ld_call_shared="-call_shared" ;;
1557   esac
1558 else   case "$opsys" in
1559     sol2 )
1560       echo "Static linking is not supported on Solaris 2."
1561       echo "Rerun configure without specifying --dynamic=no."
1562       exit 1 ;;
1563     linux   ) ld_call_shared="-Bstatic" ;;
1564     decosf* ) ld_call_shared="-non_shared" ;;
1565   esac
1566 fi
1567
1568 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1569
1570 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1571 { test "$extra_verbose" = "yes" && cat << EOF
1572     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1573 EOF
1574 cat >> confdefs.h <<EOF
1575 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1576 EOF
1577 }
1578
1579
1580
1581 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1582 if test "$with_workshop $with_tooltalk" = "yes no"; then
1583   (echo "$progname: Usage error:"
1584 echo " " "--with-workshop requires --with-tooltalk"
1585 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1586 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1587 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1588 fi
1589
1590 if test "$with_workshop" = "yes"; then
1591   { test "$extra_verbose" = "yes" && cat << \EOF
1592     Defining SUNPRO
1593 EOF
1594 cat >> confdefs.h <<\EOF
1595 #define SUNPRO 1
1596 EOF
1597 }
1598
1599   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1600    echo "    xemacs will be linked with \"sunpro.o\""
1601  fi
1602 fi
1603
1604 if test "$with_clash_detection" != "no"; then
1605   { test "$extra_verbose" = "yes" && cat << \EOF
1606     Defining CLASH_DETECTION
1607 EOF
1608 cat >> confdefs.h <<\EOF
1609 #define CLASH_DETECTION 1
1610 EOF
1611 }
1612
1613   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1614    echo "    xemacs will be linked with \"filelock.o\""
1615  fi
1616 fi
1617
1618 test -n "$compiler" && CC="$compiler"
1619 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1620 fi
1621
1622 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1623 if test "${CFLAGS-unset}" != unset
1624   then cflags_specified=yes;
1625   else cflags_specified=no;
1626 fi
1627
1628 xe_save_CFLAGS="$CFLAGS"
1629
1630 # Extract the first word of "gcc", so it can be a program name with args.
1631 set dummy gcc; ac_word=$2
1632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1633 echo "configure:1634: checking for $ac_word" >&5
1634
1635 if test -n "$CC"; then
1636   ac_cv_prog_CC="$CC" # Let the user override the test.
1637 else
1638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1639   ac_dummy="$PATH"
1640   for ac_dir in $ac_dummy; do
1641     test -z "$ac_dir" && ac_dir=.
1642     if test -f $ac_dir/$ac_word; then
1643       ac_cv_prog_CC="gcc"
1644       break
1645     fi
1646   done
1647   IFS="$ac_save_ifs"
1648 fi
1649 CC="$ac_cv_prog_CC"
1650 if test -n "$CC"; then
1651   echo "$ac_t""$CC" 1>&6
1652 else
1653   echo "$ac_t""no" 1>&6
1654 fi
1655
1656 if test -z "$CC"; then
1657   # Extract the first word of "cc", so it can be a program name with args.
1658 set dummy cc; ac_word=$2
1659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1660 echo "configure:1661: checking for $ac_word" >&5
1661
1662 if test -n "$CC"; then
1663   ac_cv_prog_CC="$CC" # Let the user override the test.
1664 else
1665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1666   ac_prog_rejected=no
1667   ac_dummy="$PATH"
1668   for ac_dir in $ac_dummy; do
1669     test -z "$ac_dir" && ac_dir=.
1670     if test -f $ac_dir/$ac_word; then
1671       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1672         ac_prog_rejected=yes
1673         continue
1674       fi
1675       ac_cv_prog_CC="cc"
1676       break
1677     fi
1678   done
1679   IFS="$ac_save_ifs"
1680 if test $ac_prog_rejected = yes; then
1681   # We found a bogon in the path, so make sure we never use it.
1682   set dummy $ac_cv_prog_CC
1683   shift
1684   if test $# -gt 0; then
1685     # We chose a different compiler from the bogus one.
1686     # However, it has the same basename, so the bogon will be chosen
1687     # first if we set CC to just the basename; use the full file name.
1688     shift
1689     set dummy "$ac_dir/$ac_word" "$@"
1690     shift
1691     ac_cv_prog_CC="$@"
1692   fi
1693 fi
1694 fi
1695 CC="$ac_cv_prog_CC"
1696 if test -n "$CC"; then
1697   echo "$ac_t""$CC" 1>&6
1698 else
1699   echo "$ac_t""no" 1>&6
1700 fi
1701
1702   if test -z "$CC"; then
1703     case "`uname -s`" in
1704     *win32* | *WIN32*)
1705       # Extract the first word of "cl", so it can be a program name with args.
1706 set dummy cl; ac_word=$2
1707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_word" >&5
1709
1710 if test -n "$CC"; then
1711   ac_cv_prog_CC="$CC" # Let the user override the test.
1712 else
1713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1714   ac_dummy="$PATH"
1715   for ac_dir in $ac_dummy; do
1716     test -z "$ac_dir" && ac_dir=.
1717     if test -f $ac_dir/$ac_word; then
1718       ac_cv_prog_CC="cl"
1719       break
1720     fi
1721   done
1722   IFS="$ac_save_ifs"
1723 fi
1724 CC="$ac_cv_prog_CC"
1725 if test -n "$CC"; then
1726   echo "$ac_t""$CC" 1>&6
1727 else
1728   echo "$ac_t""no" 1>&6
1729 fi
1730  ;;
1731     esac
1732   fi
1733   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1734 fi
1735
1736 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1737 echo "configure:1738: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1738
1739 ac_ext=c
1740 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1741 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1742 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1743 ac_cpp='$CPP '"$xe_cppflags"
1744 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1745 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1746 cross_compiling=no
1747
1748 cat > conftest.$ac_ext << EOF
1749
1750 #line 1751 "configure"
1751 #include "confdefs.h"
1752
1753 main(){return(0);}
1754 EOF
1755 if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1756   ac_cv_prog_cc_works=yes
1757   # If we can't run a trivial program, we are probably using a cross compiler.
1758   if (./conftest; exit) 2>/dev/null; then
1759     ac_cv_prog_cc_cross=no
1760   else
1761     ac_cv_prog_cc_cross=yes
1762   fi
1763 else
1764   echo "configure: failed program was:" >&5
1765   cat conftest.$ac_ext >&5
1766   ac_cv_prog_cc_works=no
1767 fi
1768 rm -fr conftest*
1769 ac_ext=c
1770 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1771 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1772 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1773 ac_cpp='$CPP '"$xe_cppflags"
1774 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1775 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1776 cross_compiling=no
1777
1778 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1779 if test $ac_cv_prog_cc_works = no; then
1780   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1781 fi
1782 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1783 echo "configure:1784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1784 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1785 cross_compiling=$ac_cv_prog_cc_cross
1786
1787 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1788 echo "configure:1789: checking whether we are using GNU C" >&5
1789
1790 cat > conftest.c <<EOF
1791 #ifdef __GNUC__
1792   yes;
1793 #endif
1794 EOF
1795 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1796   ac_cv_prog_gcc=yes
1797 else
1798   ac_cv_prog_gcc=no
1799 fi
1800
1801 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1802
1803 if test $ac_cv_prog_gcc = yes; then
1804   GCC=yes
1805 else
1806   GCC=
1807 fi
1808
1809 ac_test_CFLAGS="${CFLAGS+set}"
1810 ac_save_CFLAGS="$CFLAGS"
1811 CFLAGS=
1812 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1813 echo "configure:1814: checking whether ${CC-cc} accepts -g" >&5
1814
1815 echo 'void f(){}' > conftest.c
1816 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1817   ac_cv_prog_cc_g=yes
1818 else
1819   ac_cv_prog_cc_g=no
1820 fi
1821 rm -f conftest*
1822
1823
1824 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1825 if test "$ac_test_CFLAGS" = set; then
1826   CFLAGS="$ac_save_CFLAGS"
1827 elif test $ac_cv_prog_cc_g = yes; then
1828   if test "$GCC" = yes; then
1829     CFLAGS="-g -O2"
1830   else
1831     CFLAGS="-g"
1832   fi
1833 else
1834   if test "$GCC" = yes; then
1835     CFLAGS="-O2"
1836   else
1837     CFLAGS=
1838   fi
1839 fi
1840  
1841 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1842   CC=${NON_GNU_CC-cc}
1843   # Extract the first word of "gcc", so it can be a program name with args.
1844 set dummy gcc; ac_word=$2
1845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1846 echo "configure:1847: checking for $ac_word" >&5
1847
1848 if test -n "$CC"; then
1849   ac_cv_prog_CC="$CC" # Let the user override the test.
1850 else
1851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1852   ac_dummy="$PATH"
1853   for ac_dir in $ac_dummy; do
1854     test -z "$ac_dir" && ac_dir=.
1855     if test -f $ac_dir/$ac_word; then
1856       ac_cv_prog_CC="gcc"
1857       break
1858     fi
1859   done
1860   IFS="$ac_save_ifs"
1861 fi
1862 CC="$ac_cv_prog_CC"
1863 if test -n "$CC"; then
1864   echo "$ac_t""$CC" 1>&6
1865 else
1866   echo "$ac_t""no" 1>&6
1867 fi
1868
1869 if test -z "$CC"; then
1870   # Extract the first word of "cc", so it can be a program name with args.
1871 set dummy cc; ac_word=$2
1872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1873 echo "configure:1874: checking for $ac_word" >&5
1874
1875 if test -n "$CC"; then
1876   ac_cv_prog_CC="$CC" # Let the user override the test.
1877 else
1878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1879   ac_prog_rejected=no
1880   ac_dummy="$PATH"
1881   for ac_dir in $ac_dummy; do
1882     test -z "$ac_dir" && ac_dir=.
1883     if test -f $ac_dir/$ac_word; then
1884       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1885         ac_prog_rejected=yes
1886         continue
1887       fi
1888       ac_cv_prog_CC="cc"
1889       break
1890     fi
1891   done
1892   IFS="$ac_save_ifs"
1893 if test $ac_prog_rejected = yes; then
1894   # We found a bogon in the path, so make sure we never use it.
1895   set dummy $ac_cv_prog_CC
1896   shift
1897   if test $# -gt 0; then
1898     # We chose a different compiler from the bogus one.
1899     # However, it has the same basename, so the bogon will be chosen
1900     # first if we set CC to just the basename; use the full file name.
1901     shift
1902     set dummy "$ac_dir/$ac_word" "$@"
1903     shift
1904     ac_cv_prog_CC="$@"
1905   fi
1906 fi
1907 fi
1908 CC="$ac_cv_prog_CC"
1909 if test -n "$CC"; then
1910   echo "$ac_t""$CC" 1>&6
1911 else
1912   echo "$ac_t""no" 1>&6
1913 fi
1914
1915   if test -z "$CC"; then
1916     case "`uname -s`" in
1917     *win32* | *WIN32*)
1918       # Extract the first word of "cl", so it can be a program name with args.
1919 set dummy cl; ac_word=$2
1920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1921 echo "configure:1922: checking for $ac_word" >&5
1922
1923 if test -n "$CC"; then
1924   ac_cv_prog_CC="$CC" # Let the user override the test.
1925 else
1926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1927   ac_dummy="$PATH"
1928   for ac_dir in $ac_dummy; do
1929     test -z "$ac_dir" && ac_dir=.
1930     if test -f $ac_dir/$ac_word; then
1931       ac_cv_prog_CC="cl"
1932       break
1933     fi
1934   done
1935   IFS="$ac_save_ifs"
1936 fi
1937 CC="$ac_cv_prog_CC"
1938 if test -n "$CC"; then
1939   echo "$ac_t""$CC" 1>&6
1940 else
1941   echo "$ac_t""no" 1>&6
1942 fi
1943  ;;
1944     esac
1945   fi
1946   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1947 fi
1948
1949 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1950 echo "configure:1951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1951
1952 ac_ext=c
1953 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1954 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1955 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1956 ac_cpp='$CPP '"$xe_cppflags"
1957 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1958 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1959 cross_compiling=no
1960
1961 cat > conftest.$ac_ext << EOF
1962
1963 #line 1964 "configure"
1964 #include "confdefs.h"
1965
1966 main(){return(0);}
1967 EOF
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1969   ac_cv_prog_cc_works=yes
1970   # If we can't run a trivial program, we are probably using a cross compiler.
1971   if (./conftest; exit) 2>/dev/null; then
1972     ac_cv_prog_cc_cross=no
1973   else
1974     ac_cv_prog_cc_cross=yes
1975   fi
1976 else
1977   echo "configure: failed program was:" >&5
1978   cat conftest.$ac_ext >&5
1979   ac_cv_prog_cc_works=no
1980 fi
1981 rm -fr conftest*
1982 ac_ext=c
1983 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1984 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1985 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1986 ac_cpp='$CPP '"$xe_cppflags"
1987 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1988 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1989 cross_compiling=no
1990
1991 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1992 if test $ac_cv_prog_cc_works = no; then
1993   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1994 fi
1995 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1996 echo "configure:1997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1997 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1998 cross_compiling=$ac_cv_prog_cc_cross
1999
2000 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether we are using GNU C" >&5
2002
2003 cat > conftest.c <<EOF
2004 #ifdef __GNUC__
2005   yes;
2006 #endif
2007 EOF
2008 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2009   ac_cv_prog_gcc=yes
2010 else
2011   ac_cv_prog_gcc=no
2012 fi
2013
2014 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2015
2016 if test $ac_cv_prog_gcc = yes; then
2017   GCC=yes
2018 else
2019   GCC=
2020 fi
2021
2022 ac_test_CFLAGS="${CFLAGS+set}"
2023 ac_save_CFLAGS="$CFLAGS"
2024 CFLAGS=
2025 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2026 echo "configure:2027: checking whether ${CC-cc} accepts -g" >&5
2027
2028 echo 'void f(){}' > conftest.c
2029 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2030   ac_cv_prog_cc_g=yes
2031 else
2032   ac_cv_prog_cc_g=no
2033 fi
2034 rm -f conftest*
2035
2036
2037 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2038 if test "$ac_test_CFLAGS" = set; then
2039   CFLAGS="$ac_save_CFLAGS"
2040 elif test $ac_cv_prog_cc_g = yes; then
2041   if test "$GCC" = yes; then
2042     CFLAGS="-g -O2"
2043   else
2044     CFLAGS="-g"
2045   fi
2046 else
2047   if test "$GCC" = yes; then
2048     CFLAGS="-O2"
2049   else
2050     CFLAGS=
2051   fi
2052 fi
2053
2054 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2055   CC=gcc
2056   # Extract the first word of "gcc", so it can be a program name with args.
2057 set dummy gcc; ac_word=$2
2058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2059 echo "configure:2060: checking for $ac_word" >&5
2060
2061 if test -n "$CC"; then
2062   ac_cv_prog_CC="$CC" # Let the user override the test.
2063 else
2064   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2065   ac_dummy="$PATH"
2066   for ac_dir in $ac_dummy; do
2067     test -z "$ac_dir" && ac_dir=.
2068     if test -f $ac_dir/$ac_word; then
2069       ac_cv_prog_CC="gcc"
2070       break
2071     fi
2072   done
2073   IFS="$ac_save_ifs"
2074 fi
2075 CC="$ac_cv_prog_CC"
2076 if test -n "$CC"; then
2077   echo "$ac_t""$CC" 1>&6
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081
2082 if test -z "$CC"; then
2083   # Extract the first word of "cc", so it can be a program name with args.
2084 set dummy cc; ac_word=$2
2085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2086 echo "configure:2087: checking for $ac_word" >&5
2087
2088 if test -n "$CC"; then
2089   ac_cv_prog_CC="$CC" # Let the user override the test.
2090 else
2091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2092   ac_prog_rejected=no
2093   ac_dummy="$PATH"
2094   for ac_dir in $ac_dummy; do
2095     test -z "$ac_dir" && ac_dir=.
2096     if test -f $ac_dir/$ac_word; then
2097       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2098         ac_prog_rejected=yes
2099         continue
2100       fi
2101       ac_cv_prog_CC="cc"
2102       break
2103     fi
2104   done
2105   IFS="$ac_save_ifs"
2106 if test $ac_prog_rejected = yes; then
2107   # We found a bogon in the path, so make sure we never use it.
2108   set dummy $ac_cv_prog_CC
2109   shift
2110   if test $# -gt 0; then
2111     # We chose a different compiler from the bogus one.
2112     # However, it has the same basename, so the bogon will be chosen
2113     # first if we set CC to just the basename; use the full file name.
2114     shift
2115     set dummy "$ac_dir/$ac_word" "$@"
2116     shift
2117     ac_cv_prog_CC="$@"
2118   fi
2119 fi
2120 fi
2121 CC="$ac_cv_prog_CC"
2122 if test -n "$CC"; then
2123   echo "$ac_t""$CC" 1>&6
2124 else
2125   echo "$ac_t""no" 1>&6
2126 fi
2127
2128   if test -z "$CC"; then
2129     case "`uname -s`" in
2130     *win32* | *WIN32*)
2131       # Extract the first word of "cl", so it can be a program name with args.
2132 set dummy cl; ac_word=$2
2133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2134 echo "configure:2135: checking for $ac_word" >&5
2135
2136 if test -n "$CC"; then
2137   ac_cv_prog_CC="$CC" # Let the user override the test.
2138 else
2139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2140   ac_dummy="$PATH"
2141   for ac_dir in $ac_dummy; do
2142     test -z "$ac_dir" && ac_dir=.
2143     if test -f $ac_dir/$ac_word; then
2144       ac_cv_prog_CC="cl"
2145       break
2146     fi
2147   done
2148   IFS="$ac_save_ifs"
2149 fi
2150 CC="$ac_cv_prog_CC"
2151 if test -n "$CC"; then
2152   echo "$ac_t""$CC" 1>&6
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156  ;;
2157     esac
2158   fi
2159   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2160 fi
2161
2162 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2163 echo "configure:2164: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2164
2165 ac_ext=c
2166 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2167 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2168 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2169 ac_cpp='$CPP '"$xe_cppflags"
2170 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2171 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2172 cross_compiling=no
2173
2174 cat > conftest.$ac_ext << EOF
2175
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178
2179 main(){return(0);}
2180 EOF
2181 if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2182   ac_cv_prog_cc_works=yes
2183   # If we can't run a trivial program, we are probably using a cross compiler.
2184   if (./conftest; exit) 2>/dev/null; then
2185     ac_cv_prog_cc_cross=no
2186   else
2187     ac_cv_prog_cc_cross=yes
2188   fi
2189 else
2190   echo "configure: failed program was:" >&5
2191   cat conftest.$ac_ext >&5
2192   ac_cv_prog_cc_works=no
2193 fi
2194 rm -fr conftest*
2195 ac_ext=c
2196 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2197 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2198 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2199 ac_cpp='$CPP '"$xe_cppflags"
2200 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2201 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2202 cross_compiling=no
2203
2204 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2205 if test $ac_cv_prog_cc_works = no; then
2206   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2207 fi
2208 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2209 echo "configure:2210: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2210 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2211 cross_compiling=$ac_cv_prog_cc_cross
2212
2213 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2214 echo "configure:2215: checking whether we are using GNU C" >&5
2215
2216 cat > conftest.c <<EOF
2217 #ifdef __GNUC__
2218   yes;
2219 #endif
2220 EOF
2221 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2222   ac_cv_prog_gcc=yes
2223 else
2224   ac_cv_prog_gcc=no
2225 fi
2226
2227 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2228
2229 if test $ac_cv_prog_gcc = yes; then
2230   GCC=yes
2231 else
2232   GCC=
2233 fi
2234
2235 ac_test_CFLAGS="${CFLAGS+set}"
2236 ac_save_CFLAGS="$CFLAGS"
2237 CFLAGS=
2238 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2239 echo "configure:2240: checking whether ${CC-cc} accepts -g" >&5
2240
2241 echo 'void f(){}' > conftest.c
2242 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2243   ac_cv_prog_cc_g=yes
2244 else
2245   ac_cv_prog_cc_g=no
2246 fi
2247 rm -f conftest*
2248
2249
2250 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2251 if test "$ac_test_CFLAGS" = set; then
2252   CFLAGS="$ac_save_CFLAGS"
2253 elif test $ac_cv_prog_cc_g = yes; then
2254   if test "$GCC" = yes; then
2255     CFLAGS="-g -O2"
2256   else
2257     CFLAGS="-g"
2258   fi
2259 else
2260   if test "$GCC" = yes; then
2261     CFLAGS="-O2"
2262   else
2263     CFLAGS=
2264   fi
2265 fi
2266
2267 fi
2268 CFLAGS="$xe_save_CFLAGS"
2269
2270
2271 test -n "$CPP" -a -d "$CPP" && CPP=
2272
2273 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2274
2275 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2276 echo "configure:2277: checking how to run the C preprocessor" >&5
2277 # On Suns, sometimes $CPP names a directory.
2278 if test -n "$CPP" && test -d "$CPP"; then
2279   CPP=
2280 fi
2281 if test -z "$CPP"; then
2282
2283   # This must be in double quotes, not single quotes, because CPP may get
2284   # substituted into the Makefile and "${CC-cc}" will confuse make.
2285   CPP="${CC-cc} -E"
2286   # On the NeXT, cc -E runs the code through the compiler's parser,
2287   # not just through cpp.
2288   cat > conftest.$ac_ext <<EOF
2289 #line 2290 "configure"
2290 #include "confdefs.h"
2291 #include <assert.h>
2292 Syntax Error
2293 EOF
2294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2295 { (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2297 if test -z "$ac_err"; then
2298   :
2299 else
2300   echo "$ac_err" >&5
2301   echo "configure: failed program was:" >&5
2302   cat conftest.$ac_ext >&5
2303   rm -rf conftest*
2304   CPP="${CC-cc} -E -traditional-cpp"
2305   cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309 Syntax Error
2310 EOF
2311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2312 { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2314 if test -z "$ac_err"; then
2315   :
2316 else
2317   echo "$ac_err" >&5
2318   echo "configure: failed program was:" >&5
2319   cat conftest.$ac_ext >&5
2320   rm -rf conftest*
2321   CPP="${CC-cc} -nologo -E"
2322   cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 #include <assert.h>
2326 Syntax Error
2327 EOF
2328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2329 { (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2331 if test -z "$ac_err"; then
2332   :
2333 else
2334   echo "$ac_err" >&5
2335   echo "configure: failed program was:" >&5
2336   cat conftest.$ac_ext >&5
2337   rm -rf conftest*
2338   CPP=/lib/cpp
2339 fi
2340 rm -f conftest*
2341 fi
2342 rm -f conftest*
2343 fi
2344 rm -f conftest*
2345   ac_cv_prog_CPP="$CPP"
2346   CPP="$ac_cv_prog_CPP"
2347 else
2348   ac_cv_prog_CPP="$CPP"
2349 fi
2350 echo "$ac_t""$CPP" 1>&6
2351
2352
2353
2354 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2355 echo "configure:2356: checking for AIX" >&5
2356 cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 #ifdef _AIX
2360   yes
2361 #endif
2362
2363 EOF
2364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2365   egrep "yes" >/dev/null 2>&1; then
2366   rm -rf conftest*
2367   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2368     Defining _ALL_SOURCE
2369 EOF
2370 cat >> confdefs.h <<\EOF
2371 #define _ALL_SOURCE 1
2372 EOF
2373 }
2374
2375 else
2376   rm -rf conftest*
2377   echo "$ac_t""no" 1>&6
2378 fi
2379 rm -f conftest*
2380
2381  
2382
2383 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2384 echo "configure:2385: checking for GNU libc" >&5
2385 cat > conftest.$ac_ext <<EOF
2386 #line 2387 "configure"
2387 #include "confdefs.h"
2388 #include <features.h>
2389 int main() {
2390
2391 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2392 #error Not a GNU libc system :-(
2393 ******* ======= ******** &&&&&&&&
2394 #endif
2395
2396 ; return 0; }
2397 EOF
2398 if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2399   rm -rf conftest*
2400   have_glibc=yes
2401 else
2402   echo "configure: failed program was:" >&5
2403   cat conftest.$ac_ext >&5
2404   rm -rf conftest*
2405   have_glibc=no
2406 fi
2407 rm -f conftest*
2408 echo "$ac_t""$have_glibc" 1>&6
2409 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2410     Defining _GNU_SOURCE
2411 EOF
2412 cat >> confdefs.h <<\EOF
2413 #define _GNU_SOURCE 1
2414 EOF
2415 }
2416
2417
2418 case "$opsys" in
2419   sol2)
2420    { test "$extra_verbose" = "yes" && cat << \EOF
2421     Defining __EXTENSIONS__
2422 EOF
2423 cat >> confdefs.h <<\EOF
2424 #define __EXTENSIONS__ 1
2425 EOF
2426 }
2427
2428       if test "$os_release" -ge 55; then
2429      { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining _XOPEN_SOURCE = 500
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define _XOPEN_SOURCE 500
2434 EOF
2435 }
2436
2437      { test "$extra_verbose" = "yes" && cat << \EOF
2438     Defining _XOPEN_SOURCE_EXTENDED
2439 EOF
2440 cat >> confdefs.h <<\EOF
2441 #define _XOPEN_SOURCE_EXTENDED 1
2442 EOF
2443 }
2444
2445    fi ;;
2446   linux)
2447     { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining _POSIX_C_SOURCE = 199506L
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define _POSIX_C_SOURCE 199506L
2452 EOF
2453 }
2454
2455     { test "$extra_verbose" = "yes" && cat << \EOF
2456     Defining _XOPEN_SOURCE = 500
2457 EOF
2458 cat >> confdefs.h <<\EOF
2459 #define _XOPEN_SOURCE 500
2460 EOF
2461 }
2462
2463     { test "$extra_verbose" = "yes" && cat << \EOF
2464     Defining _XOPEN_SOURCE_EXTENDED
2465 EOF
2466 cat >> confdefs.h <<\EOF
2467 #define _XOPEN_SOURCE_EXTENDED 1
2468 EOF
2469 }
2470
2471     ;;
2472 esac
2473
2474 cat > conftest.$ac_ext <<EOF
2475 #line 2476 "configure"
2476 #include "confdefs.h"
2477 int main () {
2478 #if defined __SUNPRO_C
2479 return 11;
2480 #elif defined __DECC
2481 return 12;
2482 #elif defined __USLC__ && defined __SCO_VERSION__
2483 return 13;
2484 #else
2485 return 0;
2486 #endif
2487 }
2488 EOF
2489 if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2490 then
2491   :
2492 else
2493   conftest_rc="$?"
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -fr conftest*
2497   case "$conftest_rc" in
2498   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2499   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2500   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2501 esac
2502 fi
2503 rm -fr conftest*
2504
2505
2506
2507
2508 echo "Extracting information from the machine- and system-dependent headers..."
2509
2510 tempcname="conftest.c"
2511
2512
2513
2514 cat > $tempcname < confdefs.h
2515 cat >> $tempcname <<EOF
2516 #define NOT_C_CODE
2517 #define C_SWITCH_SITE
2518 #define C_SWITCH_X_SITE
2519 #define LD_SWITCH_SITE
2520 #define LD_SWITCH_X_SITE
2521 #define LD_SWITCH_X_SITE_AUX
2522 #define OS_RELEASE $os_release
2523
2524 #ifdef config_opsysfile
2525 #include "$srcdir/src/$opsysfile"
2526 #endif
2527
2528 #ifdef config_machfile
2529 #include "$srcdir/src/$machfile"
2530 #endif
2531
2532 #ifndef LIBS_MACHINE
2533 #define LIBS_MACHINE
2534 #endif
2535 configure___ libs_machine=LIBS_MACHINE
2536
2537 #ifndef LIBS_SYSTEM
2538 #define LIBS_SYSTEM
2539 #endif
2540 configure___ libs_system=LIBS_SYSTEM
2541
2542 #ifndef LIBS_TERMCAP
2543 #define LIBS_TERMCAP
2544 #endif
2545 configure___ libs_termcap=LIBS_TERMCAP
2546
2547 #ifndef LIB_STANDARD
2548 #define LIB_STANDARD
2549 #endif
2550 configure___ libs_standard=LIB_STANDARD
2551
2552
2553 #ifndef OBJECTS_MACHINE
2554 #define OBJECTS_MACHINE
2555 #endif
2556 configure___ objects_machine=OBJECTS_MACHINE
2557
2558 #ifndef OBJECTS_SYSTEM
2559 #define OBJECTS_SYSTEM
2560 #endif
2561 configure___ objects_system=OBJECTS_SYSTEM
2562
2563
2564 #ifndef C_SWITCH_MACHINE
2565 #define C_SWITCH_MACHINE
2566 #endif
2567 configure___ c_switch_machine=C_SWITCH_MACHINE
2568
2569 #ifndef C_SWITCH_SYSTEM
2570 #define C_SWITCH_SYSTEM
2571 #endif
2572 configure___ c_switch_system=C_SWITCH_SYSTEM
2573
2574
2575 #ifndef LD_SWITCH_MACHINE
2576 #define LD_SWITCH_MACHINE
2577 #endif
2578 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2579
2580 #ifndef LD_SWITCH_SYSTEM
2581 #define LD_SWITCH_SYSTEM
2582 #endif
2583 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2584
2585
2586 #ifndef UNEXEC
2587 #define UNEXEC "unexec.o"
2588 #endif
2589 configure___ unexec=UNEXEC
2590
2591
2592 #ifndef LD_SWITCH_SHARED
2593 #define LD_SWITCH_SHARED "-c"
2594 #endif
2595 configure___ ld_switch_shared=LD_SWITCH_SHARED
2596
2597
2598 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2599 configure___ ordinary_ld=ORDINARY_LD
2600
2601 #ifdef ORDINARY_LINK
2602 #define LD ORDINARY_LD
2603 #else /* no ORDINARY LINK */
2604 #ifdef COFF_ENCAPSULATE
2605 #define LD "\$(CC) -nostdlib"
2606 #else /* not COFF_ENCAPSULATE */
2607 #ifdef LINKER
2608 #define LD LINKER
2609 #else /* ! defined (LINKER) */
2610 #define LD "ld"
2611 #endif /* ! defined (LINKER) */
2612 #endif /* ! defined (COFF_ENCAPSULATE) */
2613 #endif /* not ORDINARY_LINK */
2614 configure___ ld=LD
2615
2616 #ifndef LIB_GCC
2617 #define LIB_GCC
2618 #endif
2619 configure___ lib_gcc=LIB_GCC
2620
2621 #ifndef LD_TEXT_START_ADDR
2622 #define LD_TEXT_START_ADDR
2623 #endif
2624 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2625
2626
2627 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2628 #ifdef NO_REMAP
2629 #ifdef COFF_ENCAPSULATE
2630 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2631 #else /* ! defined (COFF_ENCAPSULATE) */
2632 #define START_FILES "pre-crt0.o /lib/crt0.o"
2633 #endif /* ! defined (COFF_ENCAPSULATE) */
2634 #else /* ! defined (NO_REMAP) */
2635 #define START_FILES "ecrt0.o"
2636 #endif /* ! defined (NO_REMAP) */
2637 #endif /* no ORDINARY_LINK */
2638 #ifndef START_FILES
2639 #define START_FILES
2640 #endif
2641 configure___ start_files=START_FILES
2642
2643 #ifdef ORDINARY_LINK
2644 configure___ ordinary_link=yes
2645 #else
2646 configure___ ordinary_link=no
2647 #endif
2648
2649 #ifdef SYSTEM_MALLOC
2650 configure___ system_malloc=yes
2651 #else
2652 configure___ system_malloc=no
2653 #endif
2654
2655 #ifdef TERMINFO
2656 configure___ have_terminfo=yes
2657 #else
2658 configure___ have_terminfo=no
2659 #endif
2660
2661 #ifdef MAIL_USE_FLOCK
2662 configure___ mail_use_flock=yes
2663 #else
2664 configure___ mail_use_flock=no
2665 #endif
2666
2667 #ifdef MAIL_USE_LOCKF
2668 configure___ mail_use_lockf=yes
2669 #else
2670 configure___ mail_use_lockf=no
2671 #endif
2672
2673 #ifdef MAIL_USE_LOCKING
2674 configure___ mail_use_locking=yes
2675 #else
2676 configure___ mail_use_locking=no
2677 #endif
2678
2679 #ifdef HAVE_WIN32_PROCESSES
2680 configure___ win32_processes=yes
2681 #else
2682 configure___ win32_processes=no
2683 #endif
2684
2685 EOF
2686
2687 CPP=`eval "echo $CPP $CPPFLAGS"`
2688 eval `$CPP -Isrc $tempcname \
2689         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2690
2691 rm $tempcname
2692
2693 if test "$pdump" = "yes"; then
2694   ordinary_link="yes"
2695   ld="${ordinary_ld}"
2696   start_files=
2697   libs_standard=
2698   unexec=
2699   lib_gcc=
2700 fi
2701
2702 test "$extra_verbose" = "yes" && \
2703   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 ""
2704
2705 case "$opsys" in mingw* | cygwin*)
2706   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2707   cygwin_include=`eval "dirname $cygwin_include"` ;
2708   cygwin_include="-I$cygwin_include/../include" ;
2709   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2710   case "$opsys" in mingw*)
2711     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2712   esac
2713   ;;
2714 esac
2715
2716 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2717
2718
2719 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2720
2721 if test "$__USLC__" = yes; then
2722   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2723 echo "configure:2724: checking for whether the -Kalloca compiler flag is needed" >&5
2724   need_kalloca=no
2725   cat > conftest.$ac_ext <<EOF
2726 #line 2727 "configure"
2727 #include "confdefs.h"
2728
2729 int main() {
2730 void *x = alloca(4);
2731 ; return 0; }
2732 EOF
2733 if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2734   rm -rf conftest*
2735   :
2736 else
2737   echo "configure: failed program was:" >&5
2738   cat conftest.$ac_ext >&5
2739   rm -rf conftest*
2740   
2741     xe_save_c_switch_system="$c_switch_system"
2742     c_switch_system="$c_switch_system -Kalloca"
2743     cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746
2747 int main() {
2748 void *x = alloca(4);
2749 ; return 0; }
2750 EOF
2751 if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2752   rm -rf conftest*
2753    need_kalloca=yes 
2754 else
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757 fi
2758 rm -f conftest*
2759     c_switch_system="$xe_save_c_switch_system"
2760 fi
2761 rm -f conftest*
2762   echo "$ac_t""$need_kalloca" 1>&6
2763   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
2764 fi
2765
2766 if test "$cflags_specified" = "no"; then
2767       if   test "$GCC" = "yes"; then
2768     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2769         CFLAGS="$CFLAGS -Wsign-compare"
2770                 if test "$xemacs_compiler" != "g++"; then
2771       CFLAGS="$CFLAGS -Wshadow"
2772     fi
2773             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2774               elif test "$__SUNPRO_C" = "yes"; then
2775     case "$opsys" in
2776       sol2    ) CFLAGS="-v -xO4" ;;
2777       sunos4* ) CFLAGS="-xO2";;
2778     esac
2779   elif test "$__DECC" = "yes"; then
2780     CFLAGS="-O3"
2781   elif test "$CC" = "xlc"; then
2782     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2783     else
2784     CFLAGS="-O" ;  fi
2785 fi
2786
2787 if test "$GCC" = "yes"; then
2788 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2789 echo "configure:2790: checking for buggy gcc versions" >&5
2790 GCC_VERSION=`$CC --version`
2791 case `uname -s`:`uname -m`:$GCC_VERSION in
2792                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2793                         case "$CFLAGS" in
2794             *-O2*|*-O3*)
2795                 case "$CFLAGS" in
2796                     *-fno-schedule-insns*) ;;
2797                     *)
2798                         echo "$ac_t""yes" 1>&6
2799                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2800                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2801                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2802                         ;;
2803                 esac
2804                 ;;
2805         esac
2806         ;;
2807                     Linux:alpha:egcs-2.91.*)
2808         echo "$ac_t""yes" 1>&6
2809         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2810         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2811         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2812         ;;
2813     *:i*86*:2.7.2*)
2814         case "$CFLAGS" in
2815             *-O2*|*-O3*)
2816                 case "$GCC_VERSION" in
2817                     2.7.2)
2818                         case "$CFLAGS" in
2819                             *-fno-strength-reduce*) ;;
2820                             *)
2821                                 echo "$ac_t""yes" 1>&6
2822                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2823                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2824                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2825                                 ;;
2826                         esac
2827                         ;;
2828                 esac
2829                 case "$CFLAGS" in
2830                  *-fno-caller-saves*) ;;
2831                  *)
2832                     echo "$ac_t""yes" 1>&6
2833                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2834                     echo "configure: warning: -fno-caller-saves." 1>&2
2835                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2836                     ;;
2837                 esac
2838                 ;;
2839         esac
2840         ;;
2841 esac
2842 echo "$ac_t""no" 1>&6
2843 fi
2844
2845
2846 if test "$GCC" = "yes"; then
2847   set x $ld_switch_system; shift; ld_switch_system=""
2848   while test -n "$1"; do
2849     case $1 in
2850       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2851       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2852       -Xlinker* ) ;;
2853       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2854     esac
2855     shift
2856   done
2857 fi
2858
2859 if test "$GCC" = "yes"; then
2860   set x $ld_switch_machine; shift; ld_switch_machine=""
2861   while test -n "$1"; do
2862     case $1 in
2863       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2864       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2865       -Xlinker* ) ;;
2866       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2867     esac
2868     shift
2869   done
2870 fi
2871
2872 if test "$GCC" = "yes"; then
2873   set x $LDFLAGS; shift; LDFLAGS=""
2874   while test -n "$1"; do
2875     case $1 in
2876       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2877       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2878       -Xlinker* ) ;;
2879       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2880     esac
2881     shift
2882   done
2883 fi
2884
2885 if test "$GCC" = "yes"; then
2886   set x $ld_call_shared; shift; ld_call_shared=""
2887   while test -n "$1"; do
2888     case $1 in
2889       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2890       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2891       -Xlinker* ) ;;
2892       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2893     esac
2894     shift
2895   done
2896 fi
2897
2898 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2899    echo "    xemacs will be linked with \"$objects_machine\""
2900  fi
2901 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2902    echo "    xemacs will be linked with \"$objects_system\""
2903  fi
2904 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2905    echo "    xemacs will be linked with \"$unexec\""
2906  fi
2907 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2908    echo "    xemacs will be linked with \"dumper.o\""
2909  fi
2910
2911 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2912 echo "configure:2913: checking for dynodump" >&5
2913 if test "$unexec" != "unexsol2.o"; then
2914   echo "$ac_t""no" 1>&6
2915 else
2916   echo "$ac_t""yes" 1>&6
2917   { test "$extra_verbose" = "yes" && cat << \EOF
2918     Defining DYNODUMP
2919 EOF
2920 cat >> confdefs.h <<\EOF
2921 #define DYNODUMP 1
2922 EOF
2923 }
2924
2925   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2926   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2927   case "$machine" in
2928     sparc   ) dynodump_arch=sparc ;;
2929     *86*    ) dynodump_arch=i386  ;;
2930     powerpc ) dynodump_arch=ppc   ;;
2931   esac
2932     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
2933 fi
2934
2935
2936 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2937
2938 if test "$unexec" = "unexaix.o"; then
2939   if   test "$dynamic" = "no"; then
2940   start_flags="-Wl,-bnso,-bnodelcsect"
2941   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2942   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2943     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2944   done
2945   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2946     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2947   done
2948   
2949 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2950 echo "configure:2951: checking for terminateAndUnload in -lC" >&5
2951 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2952
2953 xe_check_libs=" -lC "
2954 cat > conftest.$ac_ext <<EOF
2955 #line 2956 "configure"
2956 #include "confdefs.h"
2957 /* Override any gcc2 internal prototype to avoid an error.  */
2958 /* We use char because int might match the return type of a gcc2
2959     builtin and then its argument prototype would still apply.  */
2960 char terminateAndUnload();
2961
2962 int main() {
2963 terminateAndUnload()
2964 ; return 0; }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2967   rm -rf conftest*
2968   eval "ac_cv_lib_$ac_lib_var=yes"
2969 else
2970   echo "configure: failed program was:" >&5
2971   cat conftest.$ac_ext >&5
2972   rm -rf conftest*
2973   eval "ac_cv_lib_$ac_lib_var=no"
2974 fi
2975 rm -f conftest*
2976 xe_check_libs=""
2977
2978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2979   echo "$ac_t""yes" 1>&6
2980   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2981 else
2982   echo "$ac_t""no" 1>&6
2983 fi
2984
2985
2986   fi
2987 elif test -n "$ld_text_start_addr"; then
2988   start_flags="-T $ld_text_start_addr -e __start"
2989 fi
2990
2991
2992
2993
2994 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2995  test -z "$linker" &&  linker='$(CC) -nostdlib'
2996  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2997 fi
2998 test "$GCC" != "yes" && lib_gcc=
2999
3000
3001
3002
3003
3004 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3005 if test -n "$site_libraries"; then
3006   for arg in $site_libraries; do
3007     case "$arg" in
3008      -* ) ;;
3009      * ) test -d "$arg" || \
3010            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3011        arg="-L${arg}" ;;
3012     esac
3013     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3014   done
3015 fi
3016
3017 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3018 if test -n "$site_includes"; then
3019   for arg in $site_includes; do
3020     case "$arg" in
3021       -* ) ;;
3022       * ) test -d "$arg" || \
3023            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3024       arg="-I${arg}" ;;
3025     esac
3026     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3027   done
3028 fi
3029
3030 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3031 if test -n "$site_prefixes"; then
3032   for dir in $site_prefixes; do
3033     lib_dir="${dir}/lib"
3034     inc_dir="${dir}/include"
3035     if test ! -d "$dir"; then
3036       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3037     elif test ! -d "$lib_dir"; then
3038       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3039     else
3040       if test -d "$inc_dir"; then
3041         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
3042       fi
3043       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
3044     fi
3045   done
3046 fi
3047
3048
3049 for dir in "/usr/ccs/lib"; do
3050   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
3051 done
3052
3053 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3054 if test -n "$site_runtime_libraries"; then
3055   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3056   export LD_RUN_PATH
3057 fi
3058
3059
3060
3061
3062
3063 if test -n "$add_runtime_path"; then :;
3064 elif test "$dynamic" = "no"; then add_runtime_path=no
3065 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3066 else case "$opsys" in
3067        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3068        * ) add_runtime_path=no ;;
3069      esac
3070 fi
3071
3072 if test "$add_runtime_path" = "yes"; then
3073       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3074 echo "configure:3075: checking "for runtime libraries flag"" >&5
3075   case "$opsys" in
3076     sol2 ) dash_r="-R" ;;
3077     decosf* | linux* | irix*) dash_r="-rpath " ;;
3078     *)
3079       dash_r=""
3080       for try_dash_r in "-R" "-R " "-rpath "; do
3081         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3082         
3083 if test "$GCC" = "yes"; then
3084   set x $xe_check_libs; shift; xe_check_libs=""
3085   while test -n "$1"; do
3086     case $1 in
3087       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3088       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3089       -Xlinker* ) ;;
3090       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3091     esac
3092     shift
3093   done
3094 fi
3095         cat > conftest.$ac_ext <<EOF
3096 #line 3097 "configure"
3097 #include "confdefs.h"
3098
3099 int main() {
3100
3101 ; return 0; }
3102 EOF
3103 if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3104   rm -rf conftest*
3105   dash_r="$try_dash_r"
3106 else
3107   echo "configure: failed program was:" >&5
3108   cat conftest.$ac_ext >&5
3109 fi
3110 rm -f conftest*
3111         xe_check_libs=""
3112         test -n "$dash_r" && break
3113       done ;;
3114   esac
3115   if test -n "$dash_r";
3116     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3117     else echo "$ac_t""NONE" 1>&6
3118   fi
3119 fi
3120
3121 xe_add_unique_runpath_dir='
3122   xe_add_p=yes
3123   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3124   done
3125   if test "$xe_add_p" = "yes"; then
3126     test -n "$runpath" && runpath="${runpath}:"
3127     runpath="${runpath}${xe_runpath_dir}"
3128     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3129   fi'
3130
3131
3132
3133
3134 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3135     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3136   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3137   
3138         runpath="" runpath_dirs=""
3139   if test -n "$LD_RUN_PATH"; then
3140     runpath="$LD_RUN_PATH"
3141   elif test "$GCC" = "yes"; then
3142         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3143     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3144     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3145     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3146       case "$arg" in P,* | -L* | -R* )
3147         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3148           {
3149 xe_runpath_dir="$dir"
3150   test "$xe_runpath_dir" != "/lib"     -a \
3151         "$xe_runpath_dir" != "/usr/lib" -a \
3152         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3153   eval "$xe_add_unique_runpath_dir"
3154 }
3155         done ;;
3156       esac
3157     done
3158     ld_switch_run="$ld_switch_run_save"
3159     rm -f conftest*
3160   else
3161         for arg in $ld_switch_site $ld_switch_x_site; do
3162       case "$arg" in -L*) {
3163 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3164   test "$xe_runpath_dir" != "/lib"     -a \
3165         "$xe_runpath_dir" != "/usr/lib" -a \
3166         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3167   eval "$xe_add_unique_runpath_dir"
3168 };; esac
3169     done
3170         if test "$opsys $need_motif" = "sol2 yes"; then
3171       xe_runpath_dir="/opt/SUNWdt/lib";
3172       eval "$xe_add_unique_runpath_dir";
3173     fi
3174   fi 
3175   if test -n "$runpath"; then
3176     ld_switch_run="${dash_r}${runpath}"
3177     
3178 if test "$GCC" = "yes"; then
3179   set x $ld_switch_run; shift; ld_switch_run=""
3180   while test -n "$1"; do
3181     case $1 in
3182       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3183       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3184       -Xlinker* ) ;;
3185       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3186     esac
3187     shift
3188   done
3189 fi
3190     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3191   fi
3192 fi
3193
3194
3195
3196 GNU_MALLOC=yes
3197 if test "$with_dlmalloc" != "no"; then
3198         doug_lea_malloc=yes
3199 else
3200         doug_lea_malloc=no
3201 fi
3202 after_morecore_hook_exists=yes
3203 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3204 echo "configure:3205: checking for malloc_set_state" >&5
3205
3206 cat > conftest.$ac_ext <<EOF
3207 #line 3208 "configure"
3208 #include "confdefs.h"
3209 /* System header to define __stub macros and hopefully few prototypes,
3210     which can conflict with char malloc_set_state(); below.  */
3211 #include <assert.h>
3212 /* Override any gcc2 internal prototype to avoid an error.  */
3213 /* We use char because int might match the return type of a gcc2
3214     builtin and then its argument prototype would still apply.  */
3215 char malloc_set_state();
3216
3217 int main() {
3218
3219 /* The GNU C library defines this for functions which it implements
3220     to always fail with ENOSYS.  Some functions are actually named
3221     something starting with __ and the normal name is an alias.  */
3222 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3223 choke me
3224 #else
3225 malloc_set_state();
3226 #endif
3227
3228 ; return 0; }
3229 EOF
3230 if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3231   rm -rf conftest*
3232   eval "ac_cv_func_malloc_set_state=yes"
3233 else
3234   echo "configure: failed program was:" >&5
3235   cat conftest.$ac_ext >&5
3236   rm -rf conftest*
3237   eval "ac_cv_func_malloc_set_state=no"
3238 fi
3239 rm -f conftest*
3240
3241 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3242   echo "$ac_t""yes" 1>&6
3243   :
3244 else
3245   echo "$ac_t""no" 1>&6
3246 doug_lea_malloc=no
3247 fi
3248
3249 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3250 echo "configure:3251: checking whether __after_morecore_hook exists" >&5
3251 cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 extern void (* __after_morecore_hook)();
3255 int main() {
3256 __after_morecore_hook = 0
3257 ; return 0; }
3258 EOF
3259 if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3260   rm -rf conftest*
3261   echo "$ac_t""yes" 1>&6
3262 else
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   echo "$ac_t""no" 1>&6
3267    after_morecore_hook_exists=no
3268 fi
3269 rm -f conftest*
3270 if test "$system_malloc" = "yes" ; then
3271   GNU_MALLOC=no
3272   GNU_MALLOC_reason="
3273     - The GNU allocators don't work with this system configuration."
3274 elif test "$with_system_malloc" = "yes" ; then
3275   GNU_MALLOC=no
3276   GNU_MALLOC_reason="
3277     - User chose not to use GNU allocators."
3278 elif test "$with_debug_malloc" = "yes" ; then
3279   GNU_MALLOC=no
3280   GNU_MALLOC_reason="
3281     - User chose to use Debugging Malloc."
3282 fi
3283
3284 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3285   GNU_MALLOC_reason="
3286     - Using Doug Lea's new malloc from the GNU C Library."
3287   { test "$extra_verbose" = "yes" && cat << \EOF
3288     Defining DOUG_LEA_MALLOC
3289 EOF
3290 cat >> confdefs.h <<\EOF
3291 #define DOUG_LEA_MALLOC 1
3292 EOF
3293 }
3294
3295   if test "$after_morecore_hook_exists" = "no" ; then
3296     GNU_MALLOC_reason="
3297     - Using Doug Lea's new malloc from the Linux C Library."
3298     { test "$extra_verbose" = "yes" && cat << \EOF
3299     Defining _NO_MALLOC_WARNING_
3300 EOF
3301 cat >> confdefs.h <<\EOF
3302 #define _NO_MALLOC_WARNING_ 1
3303 EOF
3304 }
3305
3306   fi
3307 fi
3308
3309
3310
3311
3312 # Extract the first word of "ranlib", so it can be a program name with args.
3313 set dummy ranlib; ac_word=$2
3314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_word" >&5
3316
3317 if test -n "$RANLIB"; then
3318   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3319 else
3320   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3321   ac_dummy="$PATH"
3322   for ac_dir in $ac_dummy; do
3323     test -z "$ac_dir" && ac_dir=.
3324     if test -f $ac_dir/$ac_word; then
3325       ac_cv_prog_RANLIB="ranlib"
3326       break
3327     fi
3328   done
3329   IFS="$ac_save_ifs"
3330   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3331 fi
3332 RANLIB="$ac_cv_prog_RANLIB"
3333 if test -n "$RANLIB"; then
3334   echo "$ac_t""$RANLIB" 1>&6
3335 else
3336   echo "$ac_t""no" 1>&6
3337 fi
3338
3339 ac_aux_dir=
3340 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3341   if test -f $ac_dir/install-sh; then
3342     ac_aux_dir=$ac_dir
3343     ac_install_sh="$ac_aux_dir/install-sh -c"
3344     break
3345   elif test -f $ac_dir/install.sh; then
3346     ac_aux_dir=$ac_dir
3347     ac_install_sh="$ac_aux_dir/install.sh -c"
3348     break
3349   fi
3350 done
3351 if test -z "$ac_aux_dir"; then
3352   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3353 fi
3354 ac_config_guess=$ac_aux_dir/config.guess
3355 ac_config_sub=$ac_aux_dir/config.sub
3356 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3357
3358 # Find a good install program.  We prefer a C program (faster),
3359 # so one script is as good as another.  But avoid the broken or
3360 # incompatible versions:
3361 # SysV /etc/install, /usr/sbin/install
3362 # SunOS /usr/etc/install
3363 # IRIX /sbin/install
3364 # AIX /bin/install
3365 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3366 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3367 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3368 # ./install, which can be erroneously created by make from ./install.sh.
3369 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3370 echo "configure:3371: checking for a BSD compatible install" >&5
3371 if test -z "$INSTALL"; then
3372
3373   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3374   for ac_dir in $PATH; do
3375     # Account for people who put trailing slashes in PATH elements.
3376     case "$ac_dir/" in
3377     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3378     *)
3379       # OSF1 and SCO ODT 3.0 have their own names for install.
3380       # Don't use installbsd from OSF since it installs stuff as root
3381       # by default.
3382       for ac_prog in ginstall scoinst install; do
3383         if test -f $ac_dir/$ac_prog; then
3384           if test $ac_prog = install &&
3385             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3386             # AIX install.  It has an incompatible calling convention.
3387             :
3388           else
3389             ac_cv_path_install="$ac_dir/$ac_prog -c"
3390             break 2
3391           fi
3392         fi
3393       done
3394       ;;
3395     esac
3396   done
3397   IFS="$ac_save_IFS"
3398
3399   if test "${ac_cv_path_install+set}" = set; then
3400     INSTALL="$ac_cv_path_install"
3401   else
3402     # As a last resort, use the slow shell script.  We don't cache a
3403     # path for INSTALL within a source directory, because that will
3404     # break other packages using the cache if that directory is
3405     # removed, or if the path is relative.
3406     INSTALL="$ac_install_sh"
3407   fi
3408 fi
3409 echo "$ac_t""$INSTALL" 1>&6
3410
3411 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3412 # It thinks the first close brace ends the variable substitution.
3413 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3414
3415 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3416
3417 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3418
3419 for ac_prog in 'bison -y' byacc
3420 do
3421 # Extract the first word of "$ac_prog", so it can be a program name with args.
3422 set dummy $ac_prog; ac_word=$2
3423 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3424 echo "configure:3425: checking for $ac_word" >&5
3425
3426 if test -n "$YACC"; then
3427   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3428 else
3429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3430   ac_dummy="$PATH"
3431   for ac_dir in $ac_dummy; do
3432     test -z "$ac_dir" && ac_dir=.
3433     if test -f $ac_dir/$ac_word; then
3434       ac_cv_prog_YACC="$ac_prog"
3435       break
3436     fi
3437   done
3438   IFS="$ac_save_ifs"
3439 fi
3440 YACC="$ac_cv_prog_YACC"
3441 if test -n "$YACC"; then
3442   echo "$ac_t""$YACC" 1>&6
3443 else
3444   echo "$ac_t""no" 1>&6
3445 fi
3446
3447 test -n "$YACC" && break
3448 done
3449 test -n "$YACC" || YACC="yacc"
3450
3451
3452 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h 
3453 do
3454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3456 echo "configure:3457: checking for $ac_hdr" >&5
3457
3458 cat > conftest.$ac_ext <<EOF
3459 #line 3460 "configure"
3460 #include "confdefs.h"
3461 #include <$ac_hdr>
3462 EOF
3463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3464 { (eval echo configure:3465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3466 if test -z "$ac_err"; then
3467   rm -rf conftest*
3468   eval "ac_cv_header_$ac_safe=yes"
3469 else
3470   echo "$ac_err" >&5
3471   echo "configure: failed program was:" >&5
3472   cat conftest.$ac_ext >&5
3473   rm -rf conftest*
3474   eval "ac_cv_header_$ac_safe=no"
3475 fi
3476 rm -f conftest*
3477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3478   echo "$ac_t""yes" 1>&6
3479     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3480   { test "$extra_verbose" = "yes" && cat << EOF
3481     Defining $ac_tr_hdr
3482 EOF
3483 cat >> confdefs.h <<EOF
3484 #define $ac_tr_hdr 1
3485 EOF
3486 }
3487  
3488 else
3489   echo "$ac_t""no" 1>&6
3490 fi
3491 done
3492
3493 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3494 echo "configure:3495: checking for sys/wait.h that is POSIX.1 compatible" >&5
3495
3496 cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499 #include <sys/types.h>
3500 #include <sys/wait.h>
3501 #ifndef WEXITSTATUS
3502 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3503 #endif
3504 #ifndef WIFEXITED
3505 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3506 #endif
3507 int main() {
3508 int s;
3509 wait (&s);
3510 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3514   rm -rf conftest*
3515   ac_cv_header_sys_wait_h=yes
3516 else
3517   echo "configure: failed program was:" >&5
3518   cat conftest.$ac_ext >&5
3519   rm -rf conftest*
3520   ac_cv_header_sys_wait_h=no
3521 fi
3522 rm -f conftest*
3523
3524 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3525 if test $ac_cv_header_sys_wait_h = yes; then
3526   { test "$extra_verbose" = "yes" && cat << \EOF
3527     Defining HAVE_SYS_WAIT_H
3528 EOF
3529 cat >> confdefs.h <<\EOF
3530 #define HAVE_SYS_WAIT_H 1
3531 EOF
3532 }
3533
3534 fi
3535
3536 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3537 echo "configure:3538: checking for ANSI C header files" >&5
3538
3539 cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <stdlib.h>
3543 #include <stdarg.h>
3544 #include <string.h>
3545 #include <float.h>
3546 EOF
3547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3548 { (eval echo configure:3549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3550 if test -z "$ac_err"; then
3551   rm -rf conftest*
3552   ac_cv_header_stdc=yes
3553 else
3554   echo "$ac_err" >&5
3555   echo "configure: failed program was:" >&5
3556   cat conftest.$ac_ext >&5
3557   rm -rf conftest*
3558   ac_cv_header_stdc=no
3559 fi
3560 rm -f conftest*
3561
3562 if test $ac_cv_header_stdc = yes; then
3563   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3564 cat > conftest.$ac_ext <<EOF
3565 #line 3566 "configure"
3566 #include "confdefs.h"
3567 #include <string.h>
3568 EOF
3569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3570   egrep "memchr" >/dev/null 2>&1; then
3571   :
3572 else
3573   rm -rf conftest*
3574   ac_cv_header_stdc=no
3575 fi
3576 rm -f conftest*
3577
3578 fi
3579
3580 if test $ac_cv_header_stdc = yes; then
3581   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3582 cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <stdlib.h>
3586 EOF
3587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3588   egrep "free" >/dev/null 2>&1; then
3589   :
3590 else
3591   rm -rf conftest*
3592   ac_cv_header_stdc=no
3593 fi
3594 rm -f conftest*
3595
3596 fi
3597
3598 if test $ac_cv_header_stdc = yes; then
3599   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 #include <ctype.h>
3604 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3605 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3606 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3607 int main () { int i; for (i = 0; i < 256; i++)
3608 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3609 exit (0); }
3610
3611 EOF
3612 if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3613 then
3614   :
3615 else
3616   conftest_rc="$?"
3617   echo "configure: failed program was:" >&5
3618   cat conftest.$ac_ext >&5
3619   rm -fr conftest*
3620   ac_cv_header_stdc=no
3621 fi
3622 rm -fr conftest*
3623 fi
3624
3625 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3626 if test $ac_cv_header_stdc = yes; then
3627   { test "$extra_verbose" = "yes" && cat << \EOF
3628     Defining STDC_HEADERS
3629 EOF
3630 cat >> confdefs.h <<\EOF
3631 #define STDC_HEADERS 1
3632 EOF
3633 }
3634
3635 fi
3636
3637 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3638 echo "configure:3639: checking whether time.h and sys/time.h may both be included" >&5
3639
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <sys/types.h>
3644 #include <sys/time.h>
3645 #include <time.h>
3646 int main() {
3647 struct tm *tp;
3648 ; return 0; }
3649 EOF
3650 if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3651   rm -rf conftest*
3652   ac_cv_header_time=yes
3653 else
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   ac_cv_header_time=no
3658 fi
3659 rm -f conftest*
3660
3661 echo "$ac_t""$ac_cv_header_time" 1>&6
3662 if test $ac_cv_header_time = yes; then
3663   { test "$extra_verbose" = "yes" && cat << \EOF
3664     Defining TIME_WITH_SYS_TIME
3665 EOF
3666 cat >> confdefs.h <<\EOF
3667 #define TIME_WITH_SYS_TIME 1
3668 EOF
3669 }
3670
3671 fi
3672
3673 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3674 echo "configure:3675: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3675
3676 cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <sys/types.h>
3680 #include <signal.h>
3681 /* NetBSD declares sys_siglist in unistd.h.  */
3682 #ifdef HAVE_UNISTD_H
3683 #include <unistd.h>
3684 #endif
3685 int main() {
3686 char *msg = *(sys_siglist + 1);
3687 ; return 0; }
3688 EOF
3689 if { (eval echo configure:3690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3690   rm -rf conftest*
3691   ac_cv_decl_sys_siglist=yes
3692 else
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   ac_cv_decl_sys_siglist=no
3697 fi
3698 rm -f conftest*
3699
3700 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3701 if test $ac_cv_decl_sys_siglist = yes; then
3702   { test "$extra_verbose" = "yes" && cat << \EOF
3703     Defining SYS_SIGLIST_DECLARED
3704 EOF
3705 cat >> confdefs.h <<\EOF
3706 #define SYS_SIGLIST_DECLARED 1
3707 EOF
3708 }
3709
3710 fi
3711
3712
3713
3714 echo $ac_n "checking for utime""... $ac_c" 1>&6
3715 echo "configure:3716: checking for utime" >&5
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 #include <sys/types.h>
3720 #include <utime.h>
3721 int main() {
3722 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3723 ; return 0; }
3724 EOF
3725 if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3726   rm -rf conftest*
3727   echo "$ac_t""yes" 1>&6
3728    { test "$extra_verbose" = "yes" && cat << \EOF
3729     Defining HAVE_UTIME
3730 EOF
3731 cat >> confdefs.h <<\EOF
3732 #define HAVE_UTIME 1
3733 EOF
3734 }
3735
3736 else
3737   echo "configure: failed program was:" >&5
3738   cat conftest.$ac_ext >&5
3739   rm -rf conftest*
3740   echo "$ac_t""no" 1>&6
3741       for ac_func in utimes
3742 do
3743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3744 echo "configure:3745: checking for $ac_func" >&5
3745
3746 cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 /* System header to define __stub macros and hopefully few prototypes,
3750     which can conflict with char $ac_func(); below.  */
3751 #include <assert.h>
3752 /* Override any gcc2 internal prototype to avoid an error.  */
3753 /* We use char because int might match the return type of a gcc2
3754     builtin and then its argument prototype would still apply.  */
3755 char $ac_func();
3756
3757 int main() {
3758
3759 /* The GNU C library defines this for functions which it implements
3760     to always fail with ENOSYS.  Some functions are actually named
3761     something starting with __ and the normal name is an alias.  */
3762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3763 choke me
3764 #else
3765 $ac_func();
3766 #endif
3767
3768 ; return 0; }
3769 EOF
3770 if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3771   rm -rf conftest*
3772   eval "ac_cv_func_$ac_func=yes"
3773 else
3774   echo "configure: failed program was:" >&5
3775   cat conftest.$ac_ext >&5
3776   rm -rf conftest*
3777   eval "ac_cv_func_$ac_func=no"
3778 fi
3779 rm -f conftest*
3780
3781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3782   echo "$ac_t""yes" 1>&6
3783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3784   { test "$extra_verbose" = "yes" && cat << EOF
3785     Defining $ac_tr_func
3786 EOF
3787 cat >> confdefs.h <<EOF
3788 #define $ac_tr_func 1
3789 EOF
3790 }
3791  
3792 else
3793   echo "$ac_t""no" 1>&6
3794 fi
3795 done
3796
3797 fi
3798 rm -f conftest*
3799
3800
3801 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3802 echo "configure:3803: checking return type of signal handlers" >&5
3803
3804 cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 #include <sys/types.h>
3808 #include <signal.h>
3809 #ifdef signal
3810 #undef signal
3811 #endif
3812 #ifdef __cplusplus
3813 extern "C" void (*signal (int, void (*)(int)))(int);
3814 #else
3815 void (*signal ()) ();
3816 #endif
3817
3818 int main() {
3819 int i;
3820 ; return 0; }
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3823   rm -rf conftest*
3824   ac_cv_type_signal=void
3825 else
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   ac_cv_type_signal=int
3830 fi
3831 rm -f conftest*
3832
3833 echo "$ac_t""$ac_cv_type_signal" 1>&6
3834 { test "$extra_verbose" = "yes" && cat << EOF
3835     Defining RETSIGTYPE = $ac_cv_type_signal
3836 EOF
3837 cat >> confdefs.h <<EOF
3838 #define RETSIGTYPE $ac_cv_type_signal
3839 EOF
3840 }
3841
3842
3843 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3844 echo "configure:3845: checking for size_t" >&5
3845
3846 cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849 #include <sys/types.h>
3850 #if STDC_HEADERS
3851 #include <stdlib.h>
3852 #include <stddef.h>
3853 #endif
3854 EOF
3855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3856   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3857   rm -rf conftest*
3858   ac_cv_type_size_t=yes
3859 else
3860   rm -rf conftest*
3861   ac_cv_type_size_t=no
3862 fi
3863 rm -f conftest*
3864
3865 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3866 if test $ac_cv_type_size_t = no; then
3867   { test "$extra_verbose" = "yes" && cat << \EOF
3868     Defining size_t = unsigned
3869 EOF
3870 cat >> confdefs.h <<\EOF
3871 #define size_t unsigned
3872 EOF
3873 }
3874
3875 fi
3876
3877 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3878 echo "configure:3879: checking for pid_t" >&5
3879
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883 #include <sys/types.h>
3884 #if STDC_HEADERS
3885 #include <stdlib.h>
3886 #include <stddef.h>
3887 #endif
3888 EOF
3889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3890   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3891   rm -rf conftest*
3892   ac_cv_type_pid_t=yes
3893 else
3894   rm -rf conftest*
3895   ac_cv_type_pid_t=no
3896 fi
3897 rm -f conftest*
3898
3899 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3900 if test $ac_cv_type_pid_t = no; then
3901   { test "$extra_verbose" = "yes" && cat << \EOF
3902     Defining pid_t = int
3903 EOF
3904 cat >> confdefs.h <<\EOF
3905 #define pid_t int
3906 EOF
3907 }
3908
3909 fi
3910
3911 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3912 echo "configure:3913: checking for uid_t in sys/types.h" >&5
3913
3914 cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 #include <sys/types.h>
3918 EOF
3919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3920   egrep "uid_t" >/dev/null 2>&1; then
3921   rm -rf conftest*
3922   ac_cv_type_uid_t=yes
3923 else
3924   rm -rf conftest*
3925   ac_cv_type_uid_t=no
3926 fi
3927 rm -f conftest*
3928
3929
3930 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3931 if test $ac_cv_type_uid_t = no; then
3932   { test "$extra_verbose" = "yes" && cat << \EOF
3933     Defining uid_t = int
3934 EOF
3935 cat >> confdefs.h <<\EOF
3936 #define uid_t int
3937 EOF
3938 }
3939
3940   { test "$extra_verbose" = "yes" && cat << \EOF
3941     Defining gid_t = int
3942 EOF
3943 cat >> confdefs.h <<\EOF
3944 #define gid_t int
3945 EOF
3946 }
3947
3948 fi
3949
3950 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3951 echo "configure:3952: checking for mode_t" >&5
3952
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 #include <sys/types.h>
3957 #if STDC_HEADERS
3958 #include <stdlib.h>
3959 #include <stddef.h>
3960 #endif
3961 EOF
3962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3963   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3964   rm -rf conftest*
3965   ac_cv_type_mode_t=yes
3966 else
3967   rm -rf conftest*
3968   ac_cv_type_mode_t=no
3969 fi
3970 rm -f conftest*
3971
3972 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3973 if test $ac_cv_type_mode_t = no; then
3974   { test "$extra_verbose" = "yes" && cat << \EOF
3975     Defining mode_t = int
3976 EOF
3977 cat >> confdefs.h <<\EOF
3978 #define mode_t int
3979 EOF
3980 }
3981
3982 fi
3983
3984 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3985 echo "configure:3986: checking for off_t" >&5
3986
3987 cat > conftest.$ac_ext <<EOF
3988 #line 3989 "configure"
3989 #include "confdefs.h"
3990 #include <sys/types.h>
3991 #if STDC_HEADERS
3992 #include <stdlib.h>
3993 #include <stddef.h>
3994 #endif
3995 EOF
3996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3997   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3998   rm -rf conftest*
3999   ac_cv_type_off_t=yes
4000 else
4001   rm -rf conftest*
4002   ac_cv_type_off_t=no
4003 fi
4004 rm -f conftest*
4005
4006 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4007 if test $ac_cv_type_off_t = no; then
4008   { test "$extra_verbose" = "yes" && cat << \EOF
4009     Defining off_t = long
4010 EOF
4011 cat >> confdefs.h <<\EOF
4012 #define off_t long
4013 EOF
4014 }
4015
4016 fi
4017
4018 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4019 echo "configure:4020: checking for ssize_t" >&5
4020
4021 cat > conftest.$ac_ext <<EOF
4022 #line 4023 "configure"
4023 #include "confdefs.h"
4024 #include <sys/types.h>
4025 #if STDC_HEADERS
4026 #include <stdlib.h>
4027 #include <stddef.h>
4028 #endif
4029 EOF
4030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4031   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4032   rm -rf conftest*
4033   ac_cv_type_ssize_t=yes
4034 else
4035   rm -rf conftest*
4036   ac_cv_type_ssize_t=no
4037 fi
4038 rm -f conftest*
4039
4040 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4041 if test $ac_cv_type_ssize_t = no; then
4042   { test "$extra_verbose" = "yes" && cat << \EOF
4043     Defining ssize_t = int
4044 EOF
4045 cat >> confdefs.h <<\EOF
4046 #define ssize_t int
4047 EOF
4048 }
4049
4050 fi
4051
4052
4053 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4054 echo "configure:4055: checking for socklen_t" >&5
4055 cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #include <sys/socket.h>
4059 socklen_t x;
4060
4061 int main() {
4062
4063 ; return 0; }
4064 EOF
4065 if { (eval echo configure:4066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4066   rm -rf conftest*
4067   echo "$ac_t""yes" 1>&6
4068 else
4069   echo "configure: failed program was:" >&5
4070   cat conftest.$ac_ext >&5
4071   rm -rf conftest*
4072   
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 #include <sys/socket.h>
4077 int accept (int, struct sockaddr *, size_t *);
4078
4079 int main() {
4080
4081 ; return 0; }
4082 EOF
4083 if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4084   rm -rf conftest*
4085   
4086 echo "$ac_t""size_t" 1>&6
4087 { test "$extra_verbose" = "yes" && cat << \EOF
4088     Defining socklen_t = size_t
4089 EOF
4090 cat >> confdefs.h <<\EOF
4091 #define socklen_t size_t
4092 EOF
4093 }
4094
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   
4100 echo "$ac_t""int" 1>&6
4101 { test "$extra_verbose" = "yes" && cat << \EOF
4102     Defining socklen_t = int
4103 EOF
4104 cat >> confdefs.h <<\EOF
4105 #define socklen_t int
4106 EOF
4107 }
4108
4109 fi
4110 rm -f conftest*
4111 fi
4112 rm -f conftest*
4113
4114 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4115 echo "configure:4116: checking for struct timeval" >&5
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 #ifdef TIME_WITH_SYS_TIME
4120 #include <sys/time.h>
4121 #include <time.h>
4122 #else
4123 #ifdef HAVE_SYS_TIME_H
4124 #include <sys/time.h>
4125 #else
4126 #include <time.h>
4127 #endif
4128 #endif
4129 int main() {
4130 static struct timeval x; x.tv_sec = x.tv_usec;
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4134   rm -rf conftest*
4135   echo "$ac_t""yes" 1>&6
4136   HAVE_TIMEVAL=yes
4137   { test "$extra_verbose" = "yes" && cat << \EOF
4138     Defining HAVE_TIMEVAL
4139 EOF
4140 cat >> confdefs.h <<\EOF
4141 #define HAVE_TIMEVAL 1
4142 EOF
4143 }
4144
4145 else
4146   echo "configure: failed program was:" >&5
4147   cat conftest.$ac_ext >&5
4148   rm -rf conftest*
4149   echo "$ac_t""no" 1>&6
4150    HAVE_TIMEVAL=no
4151 fi
4152 rm -f conftest*
4153
4154 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4155 echo "configure:4156: checking whether struct tm is in sys/time.h or time.h" >&5
4156
4157 cat > conftest.$ac_ext <<EOF
4158 #line 4159 "configure"
4159 #include "confdefs.h"
4160 #include <sys/types.h>
4161 #include <time.h>
4162 int main() {
4163 struct tm *tp; tp->tm_sec;
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4167   rm -rf conftest*
4168   ac_cv_struct_tm=time.h
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   ac_cv_struct_tm=sys/time.h
4174 fi
4175 rm -f conftest*
4176
4177 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4178 if test $ac_cv_struct_tm = sys/time.h; then
4179   { test "$extra_verbose" = "yes" && cat << \EOF
4180     Defining TM_IN_SYS_TIME
4181 EOF
4182 cat >> confdefs.h <<\EOF
4183 #define TM_IN_SYS_TIME 1
4184 EOF
4185 }
4186
4187 fi
4188
4189 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4190 echo "configure:4191: checking for tm_zone in struct tm" >&5
4191
4192 cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <sys/types.h>
4196 #include <$ac_cv_struct_tm>
4197 int main() {
4198 struct tm tm; tm.tm_zone;
4199 ; return 0; }
4200 EOF
4201 if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4202   rm -rf conftest*
4203   ac_cv_struct_tm_zone=yes
4204 else
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   ac_cv_struct_tm_zone=no
4209 fi
4210 rm -f conftest*
4211
4212 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4213 if test "$ac_cv_struct_tm_zone" = yes; then
4214   { test "$extra_verbose" = "yes" && cat << \EOF
4215     Defining HAVE_TM_ZONE
4216 EOF
4217 cat >> confdefs.h <<\EOF
4218 #define HAVE_TM_ZONE 1
4219 EOF
4220 }
4221
4222 else
4223   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4224 echo "configure:4225: checking for tzname" >&5
4225
4226 cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 #include <time.h>
4230 #ifndef tzname /* For SGI.  */
4231 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4232 #endif
4233 int main() {
4234 atoi(*tzname);
4235 ; return 0; }
4236 EOF
4237 if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4238   rm -rf conftest*
4239   ac_cv_var_tzname=yes
4240 else
4241   echo "configure: failed program was:" >&5
4242   cat conftest.$ac_ext >&5
4243   rm -rf conftest*
4244   ac_cv_var_tzname=no
4245 fi
4246 rm -f conftest*
4247
4248 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4249   if test $ac_cv_var_tzname = yes; then
4250     { test "$extra_verbose" = "yes" && cat << \EOF
4251     Defining HAVE_TZNAME
4252 EOF
4253 cat >> confdefs.h <<\EOF
4254 #define HAVE_TZNAME 1
4255 EOF
4256 }
4257
4258   fi
4259 fi
4260
4261
4262 echo $ac_n "checking for working const""... $ac_c" 1>&6
4263 echo "configure:4264: checking for working const" >&5
4264
4265 cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268
4269 int main() {
4270
4271 /* Ultrix mips cc rejects this.  */
4272 typedef int charset[2]; const charset x;
4273 /* SunOS 4.1.1 cc rejects this.  */
4274 char const *const *ccp;
4275 char **p;
4276 /* NEC SVR4.0.2 mips cc rejects this.  */
4277 struct point {int x, y;};
4278 static struct point const zero = {0,0};
4279 /* AIX XL C 1.02.0.0 rejects this.
4280    It does not let you subtract one const X* pointer from another in an arm
4281    of an if-expression whose if-part is not a constant expression */
4282 const char *g = "string";
4283 ccp = &g + (g ? g-g : 0);
4284 /* HPUX 7.0 cc rejects these. */
4285 ++ccp;
4286 p = (char**) ccp;
4287 ccp = (char const *const *) p;
4288 { /* SCO 3.2v4 cc rejects this.  */
4289   char *t;
4290   char const *s = 0 ? (char *) 0 : (char const *) 0;
4291
4292   *t++ = 0;
4293 }
4294 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4295   int x[] = {25, 17};
4296   const int *foo = &x[0];
4297   ++foo;
4298 }
4299 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4300   typedef const int *iptr;
4301   iptr p = 0;
4302   ++p;
4303 }
4304 { /* AIX XL C 1.02.0.0 rejects this saying
4305      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4306   struct s { int j; const int *ap[3]; };
4307   struct s *b; b->j = 5;
4308 }
4309 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4310   const int foo = 10;
4311 }
4312
4313 ; return 0; }
4314 EOF
4315 if { (eval echo configure:4316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4316   rm -rf conftest*
4317   ac_cv_c_const=yes
4318 else
4319   echo "configure: failed program was:" >&5
4320   cat conftest.$ac_ext >&5
4321   rm -rf conftest*
4322   ac_cv_c_const=no
4323 fi
4324 rm -f conftest*
4325
4326 echo "$ac_t""$ac_cv_c_const" 1>&6
4327 if test $ac_cv_c_const = no; then
4328   { test "$extra_verbose" = "yes" && cat << \EOF
4329     Defining const = 
4330 EOF
4331 cat >> confdefs.h <<\EOF
4332 #define const 
4333 EOF
4334 }
4335
4336 fi
4337
4338
4339 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4340 echo "configure:4341: checking whether ${MAKE-make} sets \${MAKE}" >&5
4341 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4342
4343 cat > conftestmake <<\EOF
4344 all:
4345         @echo 'ac_maketemp="${MAKE}"'
4346 EOF
4347 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4348 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4349 if test -n "$ac_maketemp"; then
4350   eval ac_cv_prog_make_${ac_make}_set=yes
4351 else
4352   eval ac_cv_prog_make_${ac_make}_set=no
4353 fi
4354 rm -f conftestmake
4355 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4356   echo "$ac_t""yes" 1>&6
4357   SET_MAKE=
4358 else
4359   echo "$ac_t""no" 1>&6
4360   SET_MAKE="MAKE=${MAKE-make}"
4361 fi
4362
4363
4364 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4365 echo "configure:4366: checking whether byte ordering is bigendian" >&5
4366
4367 ac_cv_c_bigendian=unknown
4368 # See if sys/param.h defines the BYTE_ORDER macro.
4369 cat > conftest.$ac_ext <<EOF
4370 #line 4371 "configure"
4371 #include "confdefs.h"
4372 #include <sys/types.h>
4373 #include <sys/param.h>
4374 int main() {
4375
4376 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4377  bogus endian macros
4378 #endif
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4382   rm -rf conftest*
4383   # It does; now see whether it defined to BIG_ENDIAN or not.
4384 cat > conftest.$ac_ext <<EOF
4385 #line 4386 "configure"
4386 #include "confdefs.h"
4387 #include <sys/types.h>
4388 #include <sys/param.h>
4389 int main() {
4390
4391 #if BYTE_ORDER != BIG_ENDIAN
4392  not big endian
4393 #endif
4394 ; return 0; }
4395 EOF
4396 if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4397   rm -rf conftest*
4398   ac_cv_c_bigendian=yes
4399 else
4400   echo "configure: failed program was:" >&5
4401   cat conftest.$ac_ext >&5
4402   rm -rf conftest*
4403   ac_cv_c_bigendian=no
4404 fi
4405 rm -f conftest*
4406 else
4407   echo "configure: failed program was:" >&5
4408   cat conftest.$ac_ext >&5
4409 fi
4410 rm -f conftest*
4411 if test $ac_cv_c_bigendian = unknown; then
4412 cat > conftest.$ac_ext <<EOF
4413 #line 4414 "configure"
4414 #include "confdefs.h"
4415 main () {
4416   /* Are we little or big endian?  From Harbison&Steele.  */
4417   union
4418   {
4419     long l;
4420     char c[sizeof (long)];
4421   } u;
4422   u.l = 1;
4423   exit (u.c[sizeof (long) - 1] == 1);
4424 }
4425 EOF
4426 if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4427 then
4428   ac_cv_c_bigendian=no
4429 else
4430   conftest_rc="$?"
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -fr conftest*
4434   ac_cv_c_bigendian=yes
4435 fi
4436 rm -fr conftest*
4437 fi
4438
4439 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4440 if test $ac_cv_c_bigendian = yes; then
4441   { test "$extra_verbose" = "yes" && cat << \EOF
4442     Defining WORDS_BIGENDIAN
4443 EOF
4444 cat >> confdefs.h <<\EOF
4445 #define WORDS_BIGENDIAN 1
4446 EOF
4447 }
4448
4449 fi
4450
4451
4452 echo $ac_n "checking size of short""... $ac_c" 1>&6
4453 echo "configure:4454: checking size of short" >&5
4454
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 #include <stdio.h>
4459 #include <sys/types.h>
4460 main()
4461 {
4462   FILE *f=fopen("conftestval", "w");
4463   if (!f) exit(1);
4464   fprintf(f, "%d\n", sizeof(short));
4465   exit(0);
4466 }
4467 EOF
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4469 then
4470   ac_cv_sizeof_short=`cat conftestval`
4471 else
4472   conftest_rc="$?"
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -fr conftest*
4476   ac_cv_sizeof_short=0
4477 fi
4478 rm -fr conftest*
4479 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4480 { test "$extra_verbose" = "yes" && cat << EOF
4481     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4482 EOF
4483 cat >> confdefs.h <<EOF
4484 #define SIZEOF_SHORT $ac_cv_sizeof_short
4485 EOF
4486 }
4487
4488
4489 if test "$ac_cv_sizeof_short" = 0; then
4490   echo ""
4491   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4492   echo "*** PANIC *** Please examine config.log for compilation errors."
4493   exit 1
4494 fi
4495 echo $ac_n "checking size of int""... $ac_c" 1>&6
4496 echo "configure:4497: checking size of int" >&5
4497
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 #include <stdio.h>
4502 #include <sys/types.h>
4503 main()
4504 {
4505   FILE *f=fopen("conftestval", "w");
4506   if (!f) exit(1);
4507   fprintf(f, "%d\n", sizeof(int));
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_int=`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_int=0
4520 fi
4521 rm -fr conftest*
4522 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4523 { test "$extra_verbose" = "yes" && cat << EOF
4524     Defining SIZEOF_INT = $ac_cv_sizeof_int
4525 EOF
4526 cat >> confdefs.h <<EOF
4527 #define SIZEOF_INT $ac_cv_sizeof_int
4528 EOF
4529 }
4530
4531
4532 echo $ac_n "checking size of long""... $ac_c" 1>&6
4533 echo "configure:4534: checking size of long" >&5
4534
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 #include <stdio.h>
4539 #include <sys/types.h>
4540 main()
4541 {
4542   FILE *f=fopen("conftestval", "w");
4543   if (!f) exit(1);
4544   fprintf(f, "%d\n", sizeof(long));
4545   exit(0);
4546 }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4549 then
4550   ac_cv_sizeof_long=`cat conftestval`
4551 else
4552   conftest_rc="$?"
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -fr conftest*
4556   ac_cv_sizeof_long=0
4557 fi
4558 rm -fr conftest*
4559 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4560 { test "$extra_verbose" = "yes" && cat << EOF
4561     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4562 EOF
4563 cat >> confdefs.h <<EOF
4564 #define SIZEOF_LONG $ac_cv_sizeof_long
4565 EOF
4566 }
4567
4568
4569 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4570 echo "configure:4571: checking size of long long" >&5
4571
4572 cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575 #include <stdio.h>
4576 #include <sys/types.h>
4577 main()
4578 {
4579   FILE *f=fopen("conftestval", "w");
4580   if (!f) exit(1);
4581   fprintf(f, "%d\n", sizeof(long long));
4582   exit(0);
4583 }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4586 then
4587   ac_cv_sizeof_long_long=`cat conftestval`
4588 else
4589   conftest_rc="$?"
4590   echo "configure: failed program was:" >&5
4591   cat conftest.$ac_ext >&5
4592   rm -fr conftest*
4593   ac_cv_sizeof_long_long=0
4594 fi
4595 rm -fr conftest*
4596 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4597 { test "$extra_verbose" = "yes" && cat << EOF
4598     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4599 EOF
4600 cat >> confdefs.h <<EOF
4601 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4602 EOF
4603 }
4604
4605
4606 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4607 echo "configure:4608: checking size of void *" >&5
4608
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 #include <stdio.h>
4613 #include <sys/types.h>
4614 main()
4615 {
4616   FILE *f=fopen("conftestval", "w");
4617   if (!f) exit(1);
4618   fprintf(f, "%d\n", sizeof(void *));
4619   exit(0);
4620 }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4623 then
4624   ac_cv_sizeof_void_p=`cat conftestval`
4625 else
4626   conftest_rc="$?"
4627   echo "configure: failed program was:" >&5
4628   cat conftest.$ac_ext >&5
4629   rm -fr conftest*
4630   ac_cv_sizeof_void_p=0
4631 fi
4632 rm -fr conftest*
4633 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4634 { test "$extra_verbose" = "yes" && cat << EOF
4635     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4636 EOF
4637 cat >> confdefs.h <<EOF
4638 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4639 EOF
4640 }
4641
4642
4643
4644 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4645 echo "configure:4646: checking for long file names" >&5
4646
4647 ac_cv_sys_long_file_names=yes
4648 # Test for long file names in all the places we know might matter:
4649 #      .                the current directory, where building will happen
4650 #      $prefix/lib      where we will be installing things
4651 #      $exec_prefix/lib likewise
4652 # eval it to expand exec_prefix.
4653 #      $TMPDIR          if set, where it might want to write temporary files
4654 # if $TMPDIR is not set:
4655 #      /tmp             where it might want to write temporary files
4656 #      /var/tmp         likewise
4657 #      /usr/tmp         likewise
4658 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4659   ac_tmpdirs="$TMPDIR"
4660 else
4661   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4662 fi
4663 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4664   test -d $ac_dir || continue
4665   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4666   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4667   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4668   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4669   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4670     ac_cv_sys_long_file_names=no
4671     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4672     break
4673   fi
4674   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4675 done
4676
4677 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4678 if test $ac_cv_sys_long_file_names = yes; then
4679   { test "$extra_verbose" = "yes" && cat << \EOF
4680     Defining HAVE_LONG_FILE_NAMES
4681 EOF
4682 cat >> confdefs.h <<\EOF
4683 #define HAVE_LONG_FILE_NAMES 1
4684 EOF
4685 }
4686
4687 fi
4688
4689
4690 echo $ac_n "checking for sin""... $ac_c" 1>&6
4691 echo "configure:4692: checking for sin" >&5
4692
4693 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696 /* System header to define __stub macros and hopefully few prototypes,
4697     which can conflict with char sin(); below.  */
4698 #include <assert.h>
4699 /* Override any gcc2 internal prototype to avoid an error.  */
4700 /* We use char because int might match the return type of a gcc2
4701     builtin and then its argument prototype would still apply.  */
4702 char sin();
4703
4704 int main() {
4705
4706 /* The GNU C library defines this for functions which it implements
4707     to always fail with ENOSYS.  Some functions are actually named
4708     something starting with __ and the normal name is an alias.  */
4709 #if defined (__stub_sin) || defined (__stub___sin)
4710 choke me
4711 #else
4712 sin();
4713 #endif
4714
4715 ; return 0; }
4716 EOF
4717 if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718   rm -rf conftest*
4719   eval "ac_cv_func_sin=yes"
4720 else
4721   echo "configure: failed program was:" >&5
4722   cat conftest.$ac_ext >&5
4723   rm -rf conftest*
4724   eval "ac_cv_func_sin=no"
4725 fi
4726 rm -f conftest*
4727
4728 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4729   echo "$ac_t""yes" 1>&6
4730   :
4731 else
4732   echo "$ac_t""no" 1>&6
4733
4734 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4735 echo "configure:4736: checking for sin in -lm" >&5
4736 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4737
4738 xe_check_libs=" -lm "
4739 cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 /* We use char because int might match the return type of a gcc2
4744     builtin and then its argument prototype would still apply.  */
4745 char sin();
4746
4747 int main() {
4748 sin()
4749 ; return 0; }
4750 EOF
4751 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4752   rm -rf conftest*
4753   eval "ac_cv_lib_$ac_lib_var=yes"
4754 else
4755   echo "configure: failed program was:" >&5
4756   cat conftest.$ac_ext >&5
4757   rm -rf conftest*
4758   eval "ac_cv_lib_$ac_lib_var=no"
4759 fi
4760 rm -f conftest*
4761 xe_check_libs=""
4762
4763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4764   echo "$ac_t""yes" 1>&6
4765     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4766     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4767   { test "$extra_verbose" = "yes" && cat << EOF
4768     Defining $ac_tr_lib
4769 EOF
4770 cat >> confdefs.h <<EOF
4771 #define $ac_tr_lib 1
4772 EOF
4773 }
4774
4775   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4776
4777 else
4778   echo "$ac_t""no" 1>&6
4779 fi
4780
4781
4782 fi
4783
4784
4785 { test "$extra_verbose" = "yes" && cat << \EOF
4786     Defining LISP_FLOAT_TYPE
4787 EOF
4788 cat >> confdefs.h <<\EOF
4789 #define LISP_FLOAT_TYPE 1
4790 EOF
4791 }
4792
4793
4794 cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4797 #include <math.h>
4798 int main() {
4799 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4800 ; return 0; }
4801 EOF
4802 if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4803   rm -rf conftest*
4804   { test "$extra_verbose" = "yes" && cat << \EOF
4805     Defining HAVE_INVERSE_HYPERBOLIC
4806 EOF
4807 cat >> confdefs.h <<\EOF
4808 #define HAVE_INVERSE_HYPERBOLIC 1
4809 EOF
4810 }
4811
4812 else
4813   echo "configure: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815 fi
4816 rm -f conftest*
4817
4818 echo "checking type of mail spool file locking" 1>&6
4819 echo "configure:4820: checking type of mail spool file locking" >&5
4820 for ac_func in lockf flock
4821 do
4822 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4823 echo "configure:4824: checking for $ac_func" >&5
4824
4825 cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 /* System header to define __stub macros and hopefully few prototypes,
4829     which can conflict with char $ac_func(); below.  */
4830 #include <assert.h>
4831 /* Override any gcc2 internal prototype to avoid an error.  */
4832 /* We use char because int might match the return type of a gcc2
4833     builtin and then its argument prototype would still apply.  */
4834 char $ac_func();
4835
4836 int main() {
4837
4838 /* The GNU C library defines this for functions which it implements
4839     to always fail with ENOSYS.  Some functions are actually named
4840     something starting with __ and the normal name is an alias.  */
4841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4842 choke me
4843 #else
4844 $ac_func();
4845 #endif
4846
4847 ; return 0; }
4848 EOF
4849 if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4850   rm -rf conftest*
4851   eval "ac_cv_func_$ac_func=yes"
4852 else
4853   echo "configure: failed program was:" >&5
4854   cat conftest.$ac_ext >&5
4855   rm -rf conftest*
4856   eval "ac_cv_func_$ac_func=no"
4857 fi
4858 rm -f conftest*
4859
4860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4861   echo "$ac_t""yes" 1>&6
4862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4863   { test "$extra_verbose" = "yes" && cat << EOF
4864     Defining $ac_tr_func
4865 EOF
4866 cat >> confdefs.h <<EOF
4867 #define $ac_tr_func 1
4868 EOF
4869 }
4870  
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874 done
4875
4876 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4877 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4878 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4879 if   test -z "$mail_locking"; then
4880   case "$opsys" in cygwin* | mingw*)
4881     mail_locking=pop ;;
4882   esac
4883 fi
4884
4885 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4886     Defining MAIL_LOCK_LOCKF
4887 EOF
4888 cat >> confdefs.h <<\EOF
4889 #define MAIL_LOCK_LOCKF 1
4890 EOF
4891 }
4892
4893 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4894     Defining MAIL_LOCK_FLOCK
4895 EOF
4896 cat >> confdefs.h <<\EOF
4897 #define MAIL_LOCK_FLOCK 1
4898 EOF
4899 }
4900
4901 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4902     Defining MAIL_LOCK_LOCKING
4903 EOF
4904 cat >> confdefs.h <<\EOF
4905 #define MAIL_LOCK_LOCKING 1
4906 EOF
4907 }
4908
4909 elif test "$mail_locking" = "pop"; then
4910   with_pop=yes
4911   mail_locking=
4912 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4913     Defining MAIL_LOCK_DOT
4914 EOF
4915 cat >> confdefs.h <<\EOF
4916 #define MAIL_LOCK_DOT 1
4917 EOF
4918 }
4919
4920 fi
4921 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4922   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4923 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4924   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4925 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4926   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4927
4928 case "$opsys" in decosf*)
4929   
4930 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4931 echo "configure:4932: checking for cma_open in -lpthreads" >&5
4932 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4933
4934 xe_check_libs=" -lpthreads "
4935 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 /* We use char because int might match the return type of a gcc2
4940     builtin and then its argument prototype would still apply.  */
4941 char cma_open();
4942
4943 int main() {
4944 cma_open()
4945 ; return 0; }
4946 EOF
4947 if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4948   rm -rf conftest*
4949   eval "ac_cv_lib_$ac_lib_var=yes"
4950 else
4951   echo "configure: failed program was:" >&5
4952   cat conftest.$ac_ext >&5
4953   rm -rf conftest*
4954   eval "ac_cv_lib_$ac_lib_var=no"
4955 fi
4956 rm -f conftest*
4957 xe_check_libs=""
4958
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4960   echo "$ac_t""yes" 1>&6
4961     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4963   { test "$extra_verbose" = "yes" && cat << EOF
4964     Defining $ac_tr_lib
4965 EOF
4966 cat >> confdefs.h <<EOF
4967 #define $ac_tr_lib 1
4968 EOF
4969 }
4970
4971   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4972
4973 else
4974   echo "$ac_t""no" 1>&6
4975 fi
4976
4977
4978   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4979     c_switch_site="$c_switch_site -threads" ;;
4980 esac
4981
4982 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4983 echo "configure:4984: checking whether the -xildoff compiler flag is required" >&5
4984 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4985   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4986     then echo "$ac_t""no" 1>&6;
4987     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
4988   fi
4989   else echo "$ac_t""no" 1>&6
4990 fi
4991
4992 if test "$opsys" = "sol2"; then
4993   if test "$os_release" -ge 56; then
4994     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4995 echo "configure:4996: checking for \"-z ignore\" linker flag" >&5
4996     case "`ld -h 2>&1`" in
4997       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4998         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4999       *) echo "$ac_t""no" 1>&6 ;;
5000     esac
5001   fi
5002 fi
5003
5004
5005 echo "checking "for specified window system"" 1>&6
5006 echo "configure:5007: checking "for specified window system"" >&5
5007
5008
5009 GNOME_CONFIG=no
5010 GTK_CONFIG=no
5011
5012 if test "$with_gnome" != "no"; then
5013    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5014 echo "configure:5015: checking for GNOME configuration script" >&5
5015    for possible in gnome-config
5016    do
5017       possible_version=`${possible} --version 2> /dev/null`
5018       if test "x${possible_version}" != "x"; then
5019               GNOME_CONFIG="${possible}"
5020               with_gnome=yes
5021               with_gtk=yes
5022               break
5023       fi
5024    done
5025    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5026 fi
5027
5028 if test "${GNOME_CONFIG}" != "no"; then
5029       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5030       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5031       { test "$extra_verbose" = "yes" && cat << \EOF
5032     Defining HAVE_GNOME
5033 EOF
5034 cat >> confdefs.h <<\EOF
5035 #define HAVE_GNOME 1
5036 EOF
5037 }
5038
5039       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5040       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5041 fi
5042
5043 if test "$with_gtk" != "no";then
5044    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5045 echo "configure:5046: checking for GTK configuration script" >&5
5046    for possible in gtk12-config gtk14-config gtk-config
5047    do
5048       possible_version=`${possible} --version 2> /dev/null`
5049       if test "x${possible_version}" != "x"; then
5050               GTK_CONFIG="${possible}"
5051       fi
5052       case "${possible_version}" in
5053         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5054         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5055         1.2.*)
5056                 with_gtk=yes
5057                 break
5058                 ;;
5059         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5060       esac
5061    done
5062    echo "$ac_t""${GTK_CONFIG}" 1>&6
5063 fi
5064
5065 if test "${GTK_CONFIG}" != "no"; then
5066       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5067 echo "configure:5068: checking gtk version" >&5
5068       GTK_VERSION=`${GTK_CONFIG} --version`
5069       echo "$ac_t""${GTK_VERSION}" 1>&6
5070
5071       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5072 echo "configure:5073: checking gtk libs" >&5
5073       GTK_LIBS=`${GTK_CONFIG} --libs`
5074       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5075       echo "$ac_t""${GTK_LIBS}" 1>&6
5076
5077       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5078 echo "configure:5079: checking gtk cflags" >&5
5079       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5080       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5081       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5082
5083       
5084 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5085 echo "configure:5086: checking for main in -lgdk_imlib" >&5
5086 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5087
5088 xe_check_libs=" -lgdk_imlib "
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092
5093 int main() {
5094 main()
5095 ; return 0; }
5096 EOF
5097 if { (eval echo configure:5098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5098   rm -rf conftest*
5099   eval "ac_cv_lib_$ac_lib_var=yes"
5100 else
5101   echo "configure: failed program was:" >&5
5102   cat conftest.$ac_ext >&5
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=no"
5105 fi
5106 rm -f conftest*
5107 xe_check_libs=""
5108
5109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5110   echo "$ac_t""yes" 1>&6
5111   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5112 else
5113   echo "$ac_t""no" 1>&6
5114 fi
5115
5116
5117       
5118 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5119 echo "configure:5120: checking for Imlib_init in -lImlib" >&5
5120 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5121
5122 xe_check_libs=" -lImlib "
5123 cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char Imlib_init();
5130
5131 int main() {
5132 Imlib_init()
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_lib_$ac_lib_var=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_lib_$ac_lib_var=no"
5143 fi
5144 rm -f conftest*
5145 xe_check_libs=""
5146
5147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5148   echo "$ac_t""yes" 1>&6
5149   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5150 else
5151   echo "$ac_t""no" 1>&6
5152 fi
5153
5154
5155       for ac_func in gdk_imlib_init
5156 do
5157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5158 echo "configure:5159: checking for $ac_func" >&5
5159
5160 cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 /* System header to define __stub macros and hopefully few prototypes,
5164     which can conflict with char $ac_func(); below.  */
5165 #include <assert.h>
5166 /* Override any gcc2 internal prototype to avoid an error.  */
5167 /* We use char because int might match the return type of a gcc2
5168     builtin and then its argument prototype would still apply.  */
5169 char $ac_func();
5170
5171 int main() {
5172
5173 /* The GNU C library defines this for functions which it implements
5174     to always fail with ENOSYS.  Some functions are actually named
5175     something starting with __ and the normal name is an alias.  */
5176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5177 choke me
5178 #else
5179 $ac_func();
5180 #endif
5181
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5185   rm -rf conftest*
5186   eval "ac_cv_func_$ac_func=yes"
5187 else
5188   echo "configure: failed program was:" >&5
5189   cat conftest.$ac_ext >&5
5190   rm -rf conftest*
5191   eval "ac_cv_func_$ac_func=no"
5192 fi
5193 rm -f conftest*
5194
5195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5196   echo "$ac_t""yes" 1>&6
5197     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5198   { test "$extra_verbose" = "yes" && cat << EOF
5199     Defining $ac_tr_func
5200 EOF
5201 cat >> confdefs.h <<EOF
5202 #define $ac_tr_func 1
5203 EOF
5204 }
5205  
5206 else
5207   echo "$ac_t""no" 1>&6
5208 fi
5209 done
5210
5211
5212       { test "$extra_verbose" = "yes" && cat << \EOF
5213     Defining HAVE_XPM
5214 EOF
5215 cat >> confdefs.h <<\EOF
5216 #define HAVE_XPM 1
5217 EOF
5218 }
5219
5220       { test "$extra_verbose" = "yes" && cat << \EOF
5221     Defining HAVE_GTK
5222 EOF
5223 cat >> confdefs.h <<\EOF
5224 #define HAVE_GTK 1
5225 EOF
5226 }
5227
5228       
5229
5230       window_system=gtk
5231       with_gtk=yes
5232       with_x11=no
5233
5234       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5235       test "${with_toolbars}" != no && with_toolbars=gtk
5236       test "${with_menubars}" != "no" && with_menubars=gtk
5237       test "${with_dialogs}" != "no" && with_dialogs=gtk
5238       test "${with_widgets}" != "no" && with_widgets=gtk
5239
5240       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5241    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5242  fi
5243       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5244    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5245  fi
5246       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5247    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5248  fi
5249       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5250    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5251  fi
5252
5253             OLD_CFLAGS="${CFLAGS}"
5254       OLD_CPPFLAGS="${CPPFLAGS}"
5255       OLD_LDFLAGS="${LDFLAGS}"
5256       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5257       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5258       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5259       for ac_hdr in glade/glade.h glade.h
5260 do
5261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5263 echo "configure:5264: checking for $ac_hdr" >&5
5264
5265 cat > conftest.$ac_ext <<EOF
5266 #line 5267 "configure"
5267 #include "confdefs.h"
5268 #include <$ac_hdr>
5269 EOF
5270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5271 { (eval echo configure:5272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5273 if test -z "$ac_err"; then
5274   rm -rf conftest*
5275   eval "ac_cv_header_$ac_safe=yes"
5276 else
5277   echo "$ac_err" >&5
5278   echo "configure: failed program was:" >&5
5279   cat conftest.$ac_ext >&5
5280   rm -rf conftest*
5281   eval "ac_cv_header_$ac_safe=no"
5282 fi
5283 rm -f conftest*
5284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5285   echo "$ac_t""yes" 1>&6
5286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5287   { test "$extra_verbose" = "yes" && cat << EOF
5288     Defining $ac_tr_hdr
5289 EOF
5290 cat >> confdefs.h <<EOF
5291 #define $ac_tr_hdr 1
5292 EOF
5293 }
5294  
5295 else
5296   echo "$ac_t""no" 1>&6
5297 fi
5298 done
5299
5300       
5301 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5302 echo "configure:5303: checking for main in -lxml" >&5
5303 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5304
5305 xe_check_libs=" -lxml "
5306 cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309
5310 int main() {
5311 main()
5312 ; return 0; }
5313 EOF
5314 if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5315   rm -rf conftest*
5316   eval "ac_cv_lib_$ac_lib_var=yes"
5317 else
5318   echo "configure: failed program was:" >&5
5319   cat conftest.$ac_ext >&5
5320   rm -rf conftest*
5321   eval "ac_cv_lib_$ac_lib_var=no"
5322 fi
5323 rm -f conftest*
5324 xe_check_libs=""
5325
5326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5327   echo "$ac_t""yes" 1>&6
5328   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5329 else
5330   echo "$ac_t""no" 1>&6
5331 fi
5332
5333
5334       
5335 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5336 echo "configure:5337: checking for main in -lglade" >&5
5337 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5338
5339 xe_check_libs=" -lglade "
5340 cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343
5344 int main() {
5345 main()
5346 ; return 0; }
5347 EOF
5348 if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5349   rm -rf conftest*
5350   eval "ac_cv_lib_$ac_lib_var=yes"
5351 else
5352   echo "configure: failed program was:" >&5
5353   cat conftest.$ac_ext >&5
5354   rm -rf conftest*
5355   eval "ac_cv_lib_$ac_lib_var=no"
5356 fi
5357 rm -f conftest*
5358 xe_check_libs=""
5359
5360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5361   echo "$ac_t""yes" 1>&6
5362   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5363 else
5364   echo "$ac_t""no" 1>&6
5365 fi
5366
5367
5368       
5369 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5370 echo "configure:5371: checking for main in -lglade-gnome" >&5
5371 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5372
5373 xe_check_libs=" -lglade-gnome "
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377
5378 int main() {
5379 main()
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=yes"
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=no"
5390 fi
5391 rm -f conftest*
5392 xe_check_libs=""
5393
5394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5395   echo "$ac_t""yes" 1>&6
5396   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5397 else
5398   echo "$ac_t""no" 1>&6
5399 fi
5400
5401
5402       cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 #include <glade/glade-xml.h>
5406 EOF
5407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5408   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5409   rm -rf conftest*
5410   echo "$ac_t""yes" 1>&6
5411                        { test "$extra_verbose" = "yes" && cat << \EOF
5412     Defining LIBGLADE_XML_TXTDOMAIN = 1
5413 EOF
5414 cat >> confdefs.h <<\EOF
5415 #define LIBGLADE_XML_TXTDOMAIN 1
5416 EOF
5417 }
5418
5419 else
5420   rm -rf conftest*
5421   echo "$ac_t""no" 1>&6
5422 fi
5423 rm -f conftest*
5424
5425       CFLAGS="${OLD_CFLAGS}"
5426       CPPFLAGS="${OLD_CPPFLAGS}"
5427       LDFLAGS="${OLD_LDFLAGS}"
5428 fi
5429
5430
5431 if test "$with_x11" != "no"; then
5432     test "$x_includes $x_libraries" != "NONE NONE" && \
5433    window_system=x11 with_x11=yes
5434
5435         
5436       if test "$x_includes $x_libraries" = "NONE NONE" \
5437     -a -n "$OPENWINHOME" \
5438     -a "$OPENWINHOME" != "/usr/openwin" \
5439     -a -d "$OPENWINHOME"; then
5440       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5441       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5442       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5443   fi
5444
5445   if test "$x_includes" = "NONE"; then
5446                     for dir in "/usr/X11" "/usr/X11R6"; do
5447       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5448     done
5449   fi
5450
5451   if test "$x_libraries" = "NONE"; then
5452     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5453       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5454     done
5455   fi
5456
5457   # If we find X, set shell vars x_includes and x_libraries to the
5458 # paths, otherwise set no_x=yes.
5459 # Uses ac_ vars as temps to allow command line to override cache and checks.
5460 # --without-x overrides everything else, but does not touch the cache.
5461 echo $ac_n "checking for X""... $ac_c" 1>&6
5462 echo "configure:5463: checking for X" >&5
5463
5464 # Check whether --with-x or --without-x was given.
5465 if test "${with_x+set}" = set; then
5466   withval="$with_x"
5467   :
5468 fi
5469
5470 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5471 if test "x$with_x" = xno; then
5472   # The user explicitly disabled X.
5473   have_x=disabled
5474 else
5475   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5476     # Both variables are already set.
5477     have_x=yes
5478   else
5479
5480 # One or both of the vars are not set, and there is no cached value.
5481 ac_x_includes=NO ac_x_libraries=NO
5482 rm -fr conftestdir
5483 if mkdir conftestdir; then
5484   cd conftestdir
5485   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5486   cat > Imakefile <<'EOF'
5487 acfindx:
5488         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5489 EOF
5490   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5491     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5492     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5493     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5494     for ac_extension in a so sl; do
5495       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5496         test -f $ac_im_libdir/libX11.$ac_extension; then
5497         ac_im_usrlibdir=$ac_im_libdir; break
5498       fi
5499     done
5500     # Screen out bogus values from the imake configuration.  They are
5501     # bogus both because they are the default anyway, and because
5502     # using them would break gcc on systems where it needs fixed includes.
5503     case "$ac_im_incroot" in
5504         /usr/include) ;;
5505         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5506     esac
5507     case "$ac_im_usrlibdir" in
5508         /usr/lib | /lib) ;;
5509         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5510     esac
5511   fi
5512   cd ..
5513   rm -fr conftestdir
5514 fi
5515
5516 if test "$ac_x_includes" = NO; then
5517   # Guess where to find include files, by looking for this one X11 .h file.
5518   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5519
5520   # First, try using that file with no special directory specified.
5521 cat > conftest.$ac_ext <<EOF
5522 #line 5523 "configure"
5523 #include "confdefs.h"
5524 #include <$x_direct_test_include>
5525 EOF
5526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5527 { (eval echo configure:5528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5529 if test -z "$ac_err"; then
5530   rm -rf conftest*
5531   # We can compile using X headers with no special include directory.
5532 ac_x_includes=
5533 else
5534   echo "$ac_err" >&5
5535   echo "configure: failed program was:" >&5
5536   cat conftest.$ac_ext >&5
5537   rm -rf conftest*
5538   # Look for the header file in a standard set of common directories.
5539 # Check X11 before X11Rn because it is often a symlink to the current release.
5540   for ac_dir in               \
5541     /usr/X11/include          \
5542     /usr/X11R6/include        \
5543     /usr/X11R5/include        \
5544     /usr/X11R4/include        \
5545                               \
5546     /usr/include/X11          \
5547     /usr/include/X11R6        \
5548     /usr/include/X11R5        \
5549     /usr/include/X11R4        \
5550                               \
5551     /usr/local/X11/include    \
5552     /usr/local/X11R6/include  \
5553     /usr/local/X11R5/include  \
5554     /usr/local/X11R4/include  \
5555                               \
5556     /usr/local/include/X11    \
5557     /usr/local/include/X11R6  \
5558     /usr/local/include/X11R5  \
5559     /usr/local/include/X11R4  \
5560                               \
5561     /usr/X386/include         \
5562     /usr/x386/include         \
5563     /usr/XFree86/include/X11  \
5564                               \
5565     /usr/include              \
5566     /usr/local/include        \
5567     /usr/unsupported/include  \
5568     /usr/athena/include       \
5569     /usr/local/x11r5/include  \
5570     /usr/lpp/Xamples/include  \
5571                               \
5572     /usr/openwin/include      \
5573     /usr/openwin/share/include \
5574     ; \
5575   do
5576     if test -r "$ac_dir/$x_direct_test_include"; then
5577       ac_x_includes=$ac_dir
5578       break
5579     fi
5580   done
5581 fi
5582 rm -f conftest*
5583 fi # $ac_x_includes = NO
5584
5585 if test "$ac_x_libraries" = NO; then
5586   # Check for the libraries.
5587
5588   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5589   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5590
5591   # See if we find them without any special options.
5592   # Don't add to $LIBS permanently.
5593   ac_save_LIBS="$LIBS"
5594   LIBS="-l$x_direct_test_library $LIBS"
5595 cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598
5599 int main() {
5600 ${x_direct_test_function}()
5601 ; return 0; }
5602 EOF
5603 if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5604   rm -rf conftest*
5605   LIBS="$ac_save_LIBS"
5606 # We can link X programs with no special library path.
5607 ac_x_libraries=
5608 else
5609   echo "configure: failed program was:" >&5
5610   cat conftest.$ac_ext >&5
5611   rm -rf conftest*
5612   LIBS="$ac_save_LIBS"
5613 # First see if replacing the include by lib works.
5614 # Check X11 before X11Rn because it is often a symlink to the current release.
5615 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5616     /usr/X11/lib          \
5617     /usr/X11R6/lib        \
5618     /usr/X11R5/lib        \
5619     /usr/X11R4/lib        \
5620                           \
5621     /usr/lib/X11          \
5622     /usr/lib/X11R6        \
5623     /usr/lib/X11R5        \
5624     /usr/lib/X11R4        \
5625                           \
5626     /usr/local/X11/lib    \
5627     /usr/local/X11R6/lib  \
5628     /usr/local/X11R5/lib  \
5629     /usr/local/X11R4/lib  \
5630                           \
5631     /usr/local/lib/X11    \
5632     /usr/local/lib/X11R6  \
5633     /usr/local/lib/X11R5  \
5634     /usr/local/lib/X11R4  \
5635                           \
5636     /usr/X386/lib         \
5637     /usr/x386/lib         \
5638     /usr/XFree86/lib/X11  \
5639                           \
5640     /usr/lib              \
5641     /usr/local/lib        \
5642     /usr/unsupported/lib  \
5643     /usr/athena/lib       \
5644     /usr/local/x11r5/lib  \
5645     /usr/lpp/Xamples/lib  \
5646     /lib/usr/lib/X11      \
5647                           \
5648     /usr/openwin/lib      \
5649     /usr/openwin/share/lib \
5650     ; \
5651 do
5652   for ac_extension in a so sl; do
5653     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5654       ac_x_libraries=$ac_dir
5655       break 2
5656     fi
5657   done
5658 done
5659 fi
5660 rm -f conftest*
5661 fi # $ac_x_libraries = NO
5662
5663 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5664   # Didn't find X anywhere.  Cache the known absence of X.
5665   ac_cv_have_x="have_x=no"
5666 else
5667   # Record where we found X for the cache.
5668   ac_cv_have_x="have_x=yes \
5669                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5670 fi
5671   fi
5672   eval "$ac_cv_have_x"
5673 fi # $with_x != no
5674
5675 if test "$have_x" != yes; then
5676   echo "$ac_t""$have_x" 1>&6
5677   no_x=yes
5678 else
5679   # If each of the values was on the command line, it overrides each guess.
5680   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5681   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5682   # Update the cache value to reflect the command line values.
5683   ac_cv_have_x="have_x=yes \
5684                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5685   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5686 fi
5687
5688 if test "$no_x" = yes; then
5689   # Not all programs may use this symbol, but it does not hurt to define it.
5690   { test "$extra_verbose" = "yes" && cat << \EOF
5691     Defining X_DISPLAY_MISSING
5692 EOF
5693 cat >> confdefs.h <<\EOF
5694 #define X_DISPLAY_MISSING 1
5695 EOF
5696 }
5697
5698   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5699 else
5700   if test -n "$x_includes"; then
5701     X_CFLAGS="$X_CFLAGS -I$x_includes"
5702   fi
5703
5704   # It would also be nice to do this for all -L options, not just this one.
5705   if test -n "$x_libraries"; then
5706     X_LIBS="$X_LIBS -L$x_libraries"
5707     # For Solaris; some versions of Sun CC require a space after -R and
5708     # others require no space.  Words are not sufficient . . . .
5709     case "`(uname -sr) 2>/dev/null`" in
5710     "SunOS 5"*)
5711       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5712 echo "configure:5713: checking whether -R must be followed by a space" >&5
5713       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5714       cat > conftest.$ac_ext <<EOF
5715 #line 5716 "configure"
5716 #include "confdefs.h"
5717
5718 int main() {
5719
5720 ; return 0; }
5721 EOF
5722 if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5723   rm -rf conftest*
5724   ac_R_nospace=yes
5725 else
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   ac_R_nospace=no
5730 fi
5731 rm -f conftest*
5732       if test $ac_R_nospace = yes; then
5733         echo "$ac_t""no" 1>&6
5734         X_LIBS="$X_LIBS -R$x_libraries"
5735       else
5736         LIBS="$ac_xsave_LIBS -R $x_libraries"
5737         cat > conftest.$ac_ext <<EOF
5738 #line 5739 "configure"
5739 #include "confdefs.h"
5740
5741 int main() {
5742
5743 ; return 0; }
5744 EOF
5745 if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746   rm -rf conftest*
5747   ac_R_space=yes
5748 else
5749   echo "configure: failed program was:" >&5
5750   cat conftest.$ac_ext >&5
5751   rm -rf conftest*
5752   ac_R_space=no
5753 fi
5754 rm -f conftest*
5755         if test $ac_R_space = yes; then
5756           echo "$ac_t""yes" 1>&6
5757           X_LIBS="$X_LIBS -R $x_libraries"
5758         else
5759           echo "$ac_t""neither works" 1>&6
5760         fi
5761       fi
5762       LIBS="$ac_xsave_LIBS"
5763     esac
5764   fi
5765
5766   # Check for system-dependent libraries X programs must link with.
5767   # Do this before checking for the system-independent R6 libraries
5768   # (-lICE), since we may need -lsocket or whatever for X linking.
5769
5770   if test "$ISC" = yes; then
5771     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5772   else
5773     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5774     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5775     # the Alpha needs dnet_stub (dnet does not exist).
5776     if test "$with_dnet" = "no" ; then
5777 ac_cv_lib_dnet_dnet_ntoa=no
5778 else
5779
5780 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5781 echo "configure:5782: checking for dnet_ntoa in -ldnet" >&5
5782 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5783
5784 xe_check_libs=" -ldnet "
5785 cat > conftest.$ac_ext <<EOF
5786 #line 5787 "configure"
5787 #include "confdefs.h"
5788 /* Override any gcc2 internal prototype to avoid an error.  */
5789 /* We use char because int might match the return type of a gcc2
5790     builtin and then its argument prototype would still apply.  */
5791 char dnet_ntoa();
5792
5793 int main() {
5794 dnet_ntoa()
5795 ; return 0; }
5796 EOF
5797 if { (eval echo configure:5798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5798   rm -rf conftest*
5799   eval "ac_cv_lib_$ac_lib_var=yes"
5800 else
5801   echo "configure: failed program was:" >&5
5802   cat conftest.$ac_ext >&5
5803   rm -rf conftest*
5804   eval "ac_cv_lib_$ac_lib_var=no"
5805 fi
5806 rm -f conftest*
5807 xe_check_libs=""
5808
5809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5810   echo "$ac_t""yes" 1>&6
5811   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5812 else
5813   echo "$ac_t""no" 1>&6
5814 fi
5815
5816 fi
5817
5818     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5819       
5820 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5821 echo "configure:5822: checking for dnet_ntoa in -ldnet_stub" >&5
5822 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5823
5824 xe_check_libs=" -ldnet_stub "
5825 cat > conftest.$ac_ext <<EOF
5826 #line 5827 "configure"
5827 #include "confdefs.h"
5828 /* Override any gcc2 internal prototype to avoid an error.  */
5829 /* We use char because int might match the return type of a gcc2
5830     builtin and then its argument prototype would still apply.  */
5831 char dnet_ntoa();
5832
5833 int main() {
5834 dnet_ntoa()
5835 ; return 0; }
5836 EOF
5837 if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5838   rm -rf conftest*
5839   eval "ac_cv_lib_$ac_lib_var=yes"
5840 else
5841   echo "configure: failed program was:" >&5
5842   cat conftest.$ac_ext >&5
5843   rm -rf conftest*
5844   eval "ac_cv_lib_$ac_lib_var=no"
5845 fi
5846 rm -f conftest*
5847 xe_check_libs=""
5848
5849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5850   echo "$ac_t""yes" 1>&6
5851   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5852 else
5853   echo "$ac_t""no" 1>&6
5854 fi
5855
5856
5857     fi
5858
5859     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5860     # to get the SysV transport functions.
5861     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5862     # needs -lnsl.
5863     # The nsl library prevents programs from opening the X display
5864     # on Irix 5.2, according to dickey@clark.net.
5865     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5866 echo "configure:5867: checking for gethostbyname" >&5
5867
5868 cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871 /* System header to define __stub macros and hopefully few prototypes,
5872     which can conflict with char gethostbyname(); below.  */
5873 #include <assert.h>
5874 /* Override any gcc2 internal prototype to avoid an error.  */
5875 /* We use char because int might match the return type of a gcc2
5876     builtin and then its argument prototype would still apply.  */
5877 char gethostbyname();
5878
5879 int main() {
5880
5881 /* The GNU C library defines this for functions which it implements
5882     to always fail with ENOSYS.  Some functions are actually named
5883     something starting with __ and the normal name is an alias.  */
5884 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5885 choke me
5886 #else
5887 gethostbyname();
5888 #endif
5889
5890 ; return 0; }
5891 EOF
5892 if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5893   rm -rf conftest*
5894   eval "ac_cv_func_gethostbyname=yes"
5895 else
5896   echo "configure: failed program was:" >&5
5897   cat conftest.$ac_ext >&5
5898   rm -rf conftest*
5899   eval "ac_cv_func_gethostbyname=no"
5900 fi
5901 rm -f conftest*
5902
5903 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5904   echo "$ac_t""yes" 1>&6
5905   :
5906 else
5907   echo "$ac_t""no" 1>&6
5908 fi
5909
5910     if test $ac_cv_func_gethostbyname = no; then
5911       
5912 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5913 echo "configure:5914: checking for gethostbyname in -lnsl" >&5
5914 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5915
5916 xe_check_libs=" -lnsl "
5917 cat > conftest.$ac_ext <<EOF
5918 #line 5919 "configure"
5919 #include "confdefs.h"
5920 /* Override any gcc2 internal prototype to avoid an error.  */
5921 /* We use char because int might match the return type of a gcc2
5922     builtin and then its argument prototype would still apply.  */
5923 char gethostbyname();
5924
5925 int main() {
5926 gethostbyname()
5927 ; return 0; }
5928 EOF
5929 if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5930   rm -rf conftest*
5931   eval "ac_cv_lib_$ac_lib_var=yes"
5932 else
5933   echo "configure: failed program was:" >&5
5934   cat conftest.$ac_ext >&5
5935   rm -rf conftest*
5936   eval "ac_cv_lib_$ac_lib_var=no"
5937 fi
5938 rm -f conftest*
5939 xe_check_libs=""
5940
5941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5942   echo "$ac_t""yes" 1>&6
5943   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5944 else
5945   echo "$ac_t""no" 1>&6
5946 fi
5947
5948
5949     fi
5950
5951     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5952     # socket/setsockopt and other routines are undefined under SCO ODT
5953     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5954     # on later versions), says simon@lia.di.epfl.ch: it contains
5955     # gethostby* variants that don't use the nameserver (or something).
5956     # -lsocket must be given before -lnsl if both are needed.
5957     # We assume that if connect needs -lnsl, so does gethostbyname.
5958     echo $ac_n "checking for connect""... $ac_c" 1>&6
5959 echo "configure:5960: checking for connect" >&5
5960
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 /* System header to define __stub macros and hopefully few prototypes,
5965     which can conflict with char connect(); below.  */
5966 #include <assert.h>
5967 /* Override any gcc2 internal prototype to avoid an error.  */
5968 /* We use char because int might match the return type of a gcc2
5969     builtin and then its argument prototype would still apply.  */
5970 char connect();
5971
5972 int main() {
5973
5974 /* The GNU C library defines this for functions which it implements
5975     to always fail with ENOSYS.  Some functions are actually named
5976     something starting with __ and the normal name is an alias.  */
5977 #if defined (__stub_connect) || defined (__stub___connect)
5978 choke me
5979 #else
5980 connect();
5981 #endif
5982
5983 ; return 0; }
5984 EOF
5985 if { (eval echo configure:5986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5986   rm -rf conftest*
5987   eval "ac_cv_func_connect=yes"
5988 else
5989   echo "configure: failed program was:" >&5
5990   cat conftest.$ac_ext >&5
5991   rm -rf conftest*
5992   eval "ac_cv_func_connect=no"
5993 fi
5994 rm -f conftest*
5995
5996 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5997   echo "$ac_t""yes" 1>&6
5998   :
5999 else
6000   echo "$ac_t""no" 1>&6
6001 fi
6002
6003     if test $ac_cv_func_connect = no; then
6004       
6005 xe_msg_checking="for connect in -lsocket"
6006 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6007 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6008 echo "configure:6009: checking "$xe_msg_checking"" >&5
6009 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6010
6011 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6012 cat > conftest.$ac_ext <<EOF
6013 #line 6014 "configure"
6014 #include "confdefs.h"
6015 /* Override any gcc2 internal prototype to avoid an error.  */
6016 /* We use char because int might match the return type of a gcc2
6017     builtin and then its argument prototype would still apply.  */
6018 char connect();
6019
6020 int main() {
6021 connect()
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=yes"
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_lib_$ac_lib_var=no"
6032 fi
6033 rm -f conftest*
6034 xe_check_libs=""
6035
6036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6037   echo "$ac_t""yes" 1>&6
6038   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042
6043
6044     fi
6045
6046     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6047     echo $ac_n "checking for remove""... $ac_c" 1>&6
6048 echo "configure:6049: checking for remove" >&5
6049
6050 cat > conftest.$ac_ext <<EOF
6051 #line 6052 "configure"
6052 #include "confdefs.h"
6053 /* System header to define __stub macros and hopefully few prototypes,
6054     which can conflict with char remove(); below.  */
6055 #include <assert.h>
6056 /* Override any gcc2 internal prototype to avoid an error.  */
6057 /* We use char because int might match the return type of a gcc2
6058     builtin and then its argument prototype would still apply.  */
6059 char remove();
6060
6061 int main() {
6062
6063 /* The GNU C library defines this for functions which it implements
6064     to always fail with ENOSYS.  Some functions are actually named
6065     something starting with __ and the normal name is an alias.  */
6066 #if defined (__stub_remove) || defined (__stub___remove)
6067 choke me
6068 #else
6069 remove();
6070 #endif
6071
6072 ; return 0; }
6073 EOF
6074 if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6075   rm -rf conftest*
6076   eval "ac_cv_func_remove=yes"
6077 else
6078   echo "configure: failed program was:" >&5
6079   cat conftest.$ac_ext >&5
6080   rm -rf conftest*
6081   eval "ac_cv_func_remove=no"
6082 fi
6083 rm -f conftest*
6084
6085 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6086   echo "$ac_t""yes" 1>&6
6087   :
6088 else
6089   echo "$ac_t""no" 1>&6
6090 fi
6091
6092     if test $ac_cv_func_remove = no; then
6093       
6094 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6095 echo "configure:6096: checking for remove in -lposix" >&5
6096 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6097
6098 xe_check_libs=" -lposix "
6099 cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 /* Override any gcc2 internal prototype to avoid an error.  */
6103 /* We use char because int might match the return type of a gcc2
6104     builtin and then its argument prototype would still apply.  */
6105 char remove();
6106
6107 int main() {
6108 remove()
6109 ; return 0; }
6110 EOF
6111 if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112   rm -rf conftest*
6113   eval "ac_cv_lib_$ac_lib_var=yes"
6114 else
6115   echo "configure: failed program was:" >&5
6116   cat conftest.$ac_ext >&5
6117   rm -rf conftest*
6118   eval "ac_cv_lib_$ac_lib_var=no"
6119 fi
6120 rm -f conftest*
6121 xe_check_libs=""
6122
6123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6124   echo "$ac_t""yes" 1>&6
6125   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6126 else
6127   echo "$ac_t""no" 1>&6
6128 fi
6129
6130
6131     fi
6132
6133     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6134     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6135 echo "configure:6136: checking for shmat" >&5
6136
6137 cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141     which can conflict with char shmat(); below.  */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char shmat();
6147
6148 int main() {
6149
6150 /* The GNU C library defines this for functions which it implements
6151     to always fail with ENOSYS.  Some functions are actually named
6152     something starting with __ and the normal name is an alias.  */
6153 #if defined (__stub_shmat) || defined (__stub___shmat)
6154 choke me
6155 #else
6156 shmat();
6157 #endif
6158
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162   rm -rf conftest*
6163   eval "ac_cv_func_shmat=yes"
6164 else
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -rf conftest*
6168   eval "ac_cv_func_shmat=no"
6169 fi
6170 rm -f conftest*
6171
6172 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6173   echo "$ac_t""yes" 1>&6
6174   :
6175 else
6176   echo "$ac_t""no" 1>&6
6177 fi
6178
6179     if test $ac_cv_func_shmat = no; then
6180       
6181 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6182 echo "configure:6183: checking for shmat in -lipc" >&5
6183 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6184
6185 xe_check_libs=" -lipc "
6186 cat > conftest.$ac_ext <<EOF
6187 #line 6188 "configure"
6188 #include "confdefs.h"
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 /* We use char because int might match the return type of a gcc2
6191     builtin and then its argument prototype would still apply.  */
6192 char shmat();
6193
6194 int main() {
6195 shmat()
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=no"
6206 fi
6207 rm -f conftest*
6208 xe_check_libs=""
6209
6210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6211   echo "$ac_t""yes" 1>&6
6212   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6213 else
6214   echo "$ac_t""no" 1>&6
6215 fi
6216
6217
6218     fi
6219   fi
6220
6221   # Check for libraries that X11R6 Xt/Xaw programs need.
6222   ac_save_LDFLAGS="$LDFLAGS"
6223   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6224   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6225   # check for ICE first), but we must link in the order -lSM -lICE or
6226   # we get undefined symbols.  So assume we have SM if we have ICE.
6227   # These have to be linked with before -lX11, unlike the other
6228   # libraries we check for below, so use a different variable.
6229   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6230   
6231 xe_msg_checking="for IceConnectionNumber in -lICE"
6232 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6233 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6234 echo "configure:6235: checking "$xe_msg_checking"" >&5
6235 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6236
6237 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6238 cat > conftest.$ac_ext <<EOF
6239 #line 6240 "configure"
6240 #include "confdefs.h"
6241 /* Override any gcc2 internal prototype to avoid an error.  */
6242 /* We use char because int might match the return type of a gcc2
6243     builtin and then its argument prototype would still apply.  */
6244 char IceConnectionNumber();
6245
6246 int main() {
6247 IceConnectionNumber()
6248 ; return 0; }
6249 EOF
6250 if { (eval echo configure:6251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6251   rm -rf conftest*
6252   eval "ac_cv_lib_$ac_lib_var=yes"
6253 else
6254   echo "configure: failed program was:" >&5
6255   cat conftest.$ac_ext >&5
6256   rm -rf conftest*
6257   eval "ac_cv_lib_$ac_lib_var=no"
6258 fi
6259 rm -f conftest*
6260 xe_check_libs=""
6261
6262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6263   echo "$ac_t""yes" 1>&6
6264   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6265 else
6266   echo "$ac_t""no" 1>&6
6267 fi
6268
6269
6270   LDFLAGS="$ac_save_LDFLAGS"
6271
6272 fi
6273  # Autoconf claims to find X library and include dirs for us.
6274   if test "$no_x" = "yes"
6275   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6276   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6277   fi
6278 fi
6279
6280
6281 if test "$with_x11" = "yes"; then
6282   { test "$extra_verbose" = "yes" && cat << \EOF
6283     Defining HAVE_X_WINDOWS
6284 EOF
6285 cat >> confdefs.h <<\EOF
6286 #define HAVE_X_WINDOWS 1
6287 EOF
6288 }
6289
6290   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6291   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6292
6293       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6294     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6295     if test -d "$lib_dir" -a -d "$inc_dir"; then
6296       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6297         x_libraries="$lib_dir $x_libraries"
6298         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6299       esac
6300       case "$x_includes" in "$inc_dir"* ) ;; *)
6301         x_includes="$inc_dir $x_includes"
6302         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6303       esac
6304       break;       fi
6305   done
6306
6307     for rel in "X11R6" "X11R5" "X11R4"; do
6308     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6309     if test -d "$lib_dir" -a -d "$inc_dir"; then
6310       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6311         x_libraries="$x_libraries $lib_dir"
6312         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6313       esac
6314       case "$x_includes" in "$inc_dir"* ) ;; *)
6315         x_includes="$x_includes $inc_dir"
6316         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6317       esac
6318       break;     fi
6319   done
6320
6321     case "$opsys" in
6322   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 ;;
6323   esac
6324
6325   ld_switch_x_site="$X_LIBS"
6326
6327   
6328 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6329     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6330   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6331   
6332         runpath="" runpath_dirs=""
6333   if test -n "$LD_RUN_PATH"; then
6334     runpath="$LD_RUN_PATH"
6335   elif test "$GCC" = "yes"; then
6336         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6337     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6338     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6339     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6340       case "$arg" in P,* | -L* | -R* )
6341         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6342           {
6343 xe_runpath_dir="$dir"
6344   test "$xe_runpath_dir" != "/lib"     -a \
6345         "$xe_runpath_dir" != "/usr/lib" -a \
6346         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6347   eval "$xe_add_unique_runpath_dir"
6348 }
6349         done ;;
6350       esac
6351     done
6352     ld_switch_run="$ld_switch_run_save"
6353     rm -f conftest*
6354   else
6355         for arg in $ld_switch_site $ld_switch_x_site; do
6356       case "$arg" in -L*) {
6357 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6358   test "$xe_runpath_dir" != "/lib"     -a \
6359         "$xe_runpath_dir" != "/usr/lib" -a \
6360         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6361   eval "$xe_add_unique_runpath_dir"
6362 };; esac
6363     done
6364         if test "$opsys $need_motif" = "sol2 yes"; then
6365       xe_runpath_dir="/opt/SUNWdt/lib";
6366       eval "$xe_add_unique_runpath_dir";
6367     fi
6368   fi 
6369   if test -n "$runpath"; then
6370     ld_switch_run="${dash_r}${runpath}"
6371     
6372 if test "$GCC" = "yes"; then
6373   set x $ld_switch_run; shift; ld_switch_run=""
6374   while test -n "$1"; do
6375     case $1 in
6376       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6377       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6378       -Xlinker* ) ;;
6379       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6380     esac
6381     shift
6382   done
6383 fi
6384     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6385   fi
6386 fi
6387
6388
6389   if test "$extra_verbose" = "yes"; then
6390     echo; echo "X11 compilation variables:"
6391     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6392     echo
6393   fi
6394
6395             bitmapdirs=
6396   if test "$x_includes" != NONE; then
6397     for i in $x_includes; do
6398       if test -d "$i/bitmaps"; then
6399         bitmapdirs="$i/bitmaps:$bitmapdirs"
6400       fi
6401       if test -d "$i/X11/bitmaps"; then
6402         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6403       fi
6404     done
6405     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6406   fi
6407   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6408     Defining BITMAPDIR = "$bitmapdirs"
6409 EOF
6410 cat >> confdefs.h <<EOF
6411 #define BITMAPDIR "$bitmapdirs"
6412 EOF
6413 }
6414
6415
6416     echo "checking for X defines extracted by xmkmf" 1>&6
6417 echo "configure:6418: checking for X defines extracted by xmkmf" >&5
6418   rm -fr conftestdir
6419   if mkdir conftestdir; then
6420     cd conftestdir
6421     cat > Imakefile <<'EOF'
6422 xetest:
6423         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6424 EOF
6425     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6426       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6427       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6428     fi
6429     cd ..
6430     rm -fr conftestdir
6431     for word in $xmkmf_defines; do
6432       case "$word" in 
6433       -D__STDC__*) ;;
6434       -D* )
6435         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6436         case "$word" in
6437           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6438           *     ) val=1 ;;
6439         esac
6440         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6441           if test "$val" = "1"
6442             then { test "$extra_verbose" = "yes" && cat << EOF
6443     Defining $sym
6444 EOF
6445 cat >> confdefs.h <<EOF
6446 #define $sym 1
6447 EOF
6448 }
6449
6450             else { test "$extra_verbose" = "yes" && cat << EOF
6451     Defining $sym = $val
6452 EOF
6453 cat >> confdefs.h <<EOF
6454 #define $sym $val
6455 EOF
6456 }
6457
6458           fi
6459         fi  ;;
6460       esac
6461     done
6462   fi
6463
6464     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6465 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6466 echo "configure:6467: checking for X11/Intrinsic.h" >&5
6467
6468 cat > conftest.$ac_ext <<EOF
6469 #line 6470 "configure"
6470 #include "confdefs.h"
6471 #include <X11/Intrinsic.h>
6472 EOF
6473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6474 { (eval echo configure:6475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6476 if test -z "$ac_err"; then
6477   rm -rf conftest*
6478   eval "ac_cv_header_$ac_safe=yes"
6479 else
6480   echo "$ac_err" >&5
6481   echo "configure: failed program was:" >&5
6482   cat conftest.$ac_ext >&5
6483   rm -rf conftest*
6484   eval "ac_cv_header_$ac_safe=no"
6485 fi
6486 rm -f conftest*
6487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6488   echo "$ac_t""yes" 1>&6
6489   :
6490 else
6491   echo "$ac_t""no" 1>&6
6492 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6493 fi
6494
6495
6496       
6497 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6498 echo "configure:6499: checking for XOpenDisplay in -lX11" >&5
6499 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6500
6501 xe_check_libs=" -lX11 "
6502 cat > conftest.$ac_ext <<EOF
6503 #line 6504 "configure"
6504 #include "confdefs.h"
6505 /* Override any gcc2 internal prototype to avoid an error.  */
6506 /* We use char because int might match the return type of a gcc2
6507     builtin and then its argument prototype would still apply.  */
6508 char XOpenDisplay();
6509
6510 int main() {
6511 XOpenDisplay()
6512 ; return 0; }
6513 EOF
6514 if { (eval echo configure:6515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6515   rm -rf conftest*
6516   eval "ac_cv_lib_$ac_lib_var=yes"
6517 else
6518   echo "configure: failed program was:" >&5
6519   cat conftest.$ac_ext >&5
6520   rm -rf conftest*
6521   eval "ac_cv_lib_$ac_lib_var=no"
6522 fi
6523 rm -f conftest*
6524 xe_check_libs=""
6525
6526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6527   echo "$ac_t""yes" 1>&6
6528   have_lib_x11=yes
6529 else
6530   echo "$ac_t""no" 1>&6
6531 fi
6532
6533
6534   if test "$have_lib_x11" != "yes"; then
6535     
6536 xe_msg_checking="for XGetFontProperty in -lX11"
6537 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6538 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6539 echo "configure:6540: checking "$xe_msg_checking"" >&5
6540 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6541
6542 xe_check_libs=" -lX11 -b i486-linuxaout"
6543 cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* Override any gcc2 internal prototype to avoid an error.  */
6547 /* We use char because int might match the return type of a gcc2
6548     builtin and then its argument prototype would still apply.  */
6549 char XGetFontProperty();
6550
6551 int main() {
6552 XGetFontProperty()
6553 ; return 0; }
6554 EOF
6555 if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6556   rm -rf conftest*
6557   eval "ac_cv_lib_$ac_lib_var=yes"
6558 else
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -rf conftest*
6562   eval "ac_cv_lib_$ac_lib_var=no"
6563 fi
6564 rm -f conftest*
6565 xe_check_libs=""
6566
6567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6568   echo "$ac_t""yes" 1>&6
6569   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6570 else
6571   echo "$ac_t""no" 1>&6
6572 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6573 fi
6574
6575
6576   fi
6577   libs_x="-lX11"
6578   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6579
6580     
6581 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6582 echo "configure:6583: checking for XShapeSelectInput in -lXext" >&5
6583 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6584
6585 xe_check_libs=" -lXext "
6586 cat > conftest.$ac_ext <<EOF
6587 #line 6588 "configure"
6588 #include "confdefs.h"
6589 /* Override any gcc2 internal prototype to avoid an error.  */
6590 /* We use char because int might match the return type of a gcc2
6591     builtin and then its argument prototype would still apply.  */
6592 char XShapeSelectInput();
6593
6594 int main() {
6595 XShapeSelectInput()
6596 ; return 0; }
6597 EOF
6598 if { (eval echo configure:6599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6599   rm -rf conftest*
6600   eval "ac_cv_lib_$ac_lib_var=yes"
6601 else
6602   echo "configure: failed program was:" >&5
6603   cat conftest.$ac_ext >&5
6604   rm -rf conftest*
6605   eval "ac_cv_lib_$ac_lib_var=no"
6606 fi
6607 rm -f conftest*
6608 xe_check_libs=""
6609
6610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6611   echo "$ac_t""yes" 1>&6
6612   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6613 else
6614   echo "$ac_t""no" 1>&6
6615 fi
6616
6617
6618
6619     
6620 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6621 echo "configure:6622: checking for XtOpenDisplay in -lXt" >&5
6622 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6623
6624 xe_check_libs=" -lXt "
6625 cat > conftest.$ac_ext <<EOF
6626 #line 6627 "configure"
6627 #include "confdefs.h"
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 /* We use char because int might match the return type of a gcc2
6630     builtin and then its argument prototype would still apply.  */
6631 char XtOpenDisplay();
6632
6633 int main() {
6634 XtOpenDisplay()
6635 ; return 0; }
6636 EOF
6637 if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6638   rm -rf conftest*
6639   eval "ac_cv_lib_$ac_lib_var=yes"
6640 else
6641   echo "configure: failed program was:" >&5
6642   cat conftest.$ac_ext >&5
6643   rm -rf conftest*
6644   eval "ac_cv_lib_$ac_lib_var=no"
6645 fi
6646 rm -f conftest*
6647 xe_check_libs=""
6648
6649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6650   echo "$ac_t""yes" 1>&6
6651   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6652 else
6653   echo "$ac_t""no" 1>&6
6654 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6655 fi
6656
6657
6658
6659   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6660 echo "configure:6661: checking the version of X11 being used" >&5
6661   cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 #include <X11/Intrinsic.h>
6665     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6666 EOF
6667 if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6668 then
6669   ./conftest foobar; x11_release=$?
6670 else
6671   conftest_rc="$?"
6672   echo "configure: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674   rm -fr conftest*
6675   x11_release=4
6676 fi
6677 rm -fr conftest*
6678   echo "$ac_t""R${x11_release}" 1>&6
6679   { test "$extra_verbose" = "yes" && cat << EOF
6680     Defining THIS_IS_X11R${x11_release}
6681 EOF
6682 cat >> confdefs.h <<EOF
6683 #define THIS_IS_X11R${x11_release} 1
6684 EOF
6685 }
6686
6687
6688   if test "${x11_release}" = "4"; then
6689     case "$with_widgets" in
6690       "" | "no") with_widgets=no ;;
6691       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6692     esac
6693   fi
6694
6695   for ac_func in XConvertCase
6696 do
6697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6698 echo "configure:6699: checking for $ac_func" >&5
6699
6700 cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* System header to define __stub macros and hopefully few prototypes,
6704     which can conflict with char $ac_func(); below.  */
6705 #include <assert.h>
6706 /* Override any gcc2 internal prototype to avoid an error.  */
6707 /* We use char because int might match the return type of a gcc2
6708     builtin and then its argument prototype would still apply.  */
6709 char $ac_func();
6710
6711 int main() {
6712
6713 /* The GNU C library defines this for functions which it implements
6714     to always fail with ENOSYS.  Some functions are actually named
6715     something starting with __ and the normal name is an alias.  */
6716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6717 choke me
6718 #else
6719 $ac_func();
6720 #endif
6721
6722 ; return 0; }
6723 EOF
6724 if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6725   rm -rf conftest*
6726   eval "ac_cv_func_$ac_func=yes"
6727 else
6728   echo "configure: failed program was:" >&5
6729   cat conftest.$ac_ext >&5
6730   rm -rf conftest*
6731   eval "ac_cv_func_$ac_func=no"
6732 fi
6733 rm -f conftest*
6734
6735 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6738   { test "$extra_verbose" = "yes" && cat << EOF
6739     Defining $ac_tr_func
6740 EOF
6741 cat >> confdefs.h <<EOF
6742 #define $ac_tr_func 1
6743 EOF
6744 }
6745  
6746 else
6747   echo "$ac_t""no" 1>&6
6748 fi
6749 done
6750
6751
6752   for ac_hdr in X11/Xlocale.h
6753 do
6754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6756 echo "configure:6757: checking for $ac_hdr" >&5
6757
6758 cat > conftest.$ac_ext <<EOF
6759 #line 6760 "configure"
6760 #include "confdefs.h"
6761 #include <$ac_hdr>
6762 EOF
6763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6764 { (eval echo configure:6765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6766 if test -z "$ac_err"; then
6767   rm -rf conftest*
6768   eval "ac_cv_header_$ac_safe=yes"
6769 else
6770   echo "$ac_err" >&5
6771   echo "configure: failed program was:" >&5
6772   cat conftest.$ac_ext >&5
6773   rm -rf conftest*
6774   eval "ac_cv_header_$ac_safe=no"
6775 fi
6776 rm -f conftest*
6777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6778   echo "$ac_t""yes" 1>&6
6779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6780   { test "$extra_verbose" = "yes" && cat << EOF
6781     Defining $ac_tr_hdr
6782 EOF
6783 cat >> confdefs.h <<EOF
6784 #define $ac_tr_hdr 1
6785 EOF
6786 }
6787  
6788 else
6789   echo "$ac_t""no" 1>&6
6790 fi
6791 done
6792
6793
6794     for ac_func in XRegisterIMInstantiateCallback
6795 do
6796 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6797 echo "configure:6798: checking for $ac_func" >&5
6798
6799 cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 /* System header to define __stub macros and hopefully few prototypes,
6803     which can conflict with char $ac_func(); below.  */
6804 #include <assert.h>
6805 /* Override any gcc2 internal prototype to avoid an error.  */
6806 /* We use char because int might match the return type of a gcc2
6807     builtin and then its argument prototype would still apply.  */
6808 char $ac_func();
6809
6810 int main() {
6811
6812 /* The GNU C library defines this for functions which it implements
6813     to always fail with ENOSYS.  Some functions are actually named
6814     something starting with __ and the normal name is an alias.  */
6815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6816 choke me
6817 #else
6818 $ac_func();
6819 #endif
6820
6821 ; return 0; }
6822 EOF
6823 if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6824   rm -rf conftest*
6825   eval "ac_cv_func_$ac_func=yes"
6826 else
6827   echo "configure: failed program was:" >&5
6828   cat conftest.$ac_ext >&5
6829   rm -rf conftest*
6830   eval "ac_cv_func_$ac_func=no"
6831 fi
6832 rm -f conftest*
6833
6834 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6835   echo "$ac_t""yes" 1>&6
6836     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6837   { test "$extra_verbose" = "yes" && cat << EOF
6838     Defining $ac_tr_func
6839 EOF
6840 cat >> confdefs.h <<EOF
6841 #define $ac_tr_func 1
6842 EOF
6843 }
6844  
6845 else
6846   echo "$ac_t""no" 1>&6
6847 fi
6848 done
6849
6850   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6851 echo "configure:6852: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6852   cat > conftest.$ac_ext <<EOF
6853 #line 6854 "configure"
6854 #include "confdefs.h"
6855
6856 #define NeedFunctionPrototypes 1
6857 #include <X11/Xlib.h>
6858 extern Bool XRegisterIMInstantiateCallback(
6859    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6860
6861 int main() {
6862
6863 ; return 0; }
6864 EOF
6865 if { (eval echo configure:6866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6866   rm -rf conftest*
6867   echo "$ac_t""yes" 1>&6
6868 else
6869   echo "configure: failed program was:" >&5
6870   cat conftest.$ac_ext >&5
6871   rm -rf conftest*
6872   echo "$ac_t""no" 1>&6
6873    { test "$extra_verbose" = "yes" && cat << \EOF
6874     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6875 EOF
6876 cat >> confdefs.h <<\EOF
6877 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6878 EOF
6879 }
6880
6881 fi
6882 rm -f conftest*
6883
6884     test -z "$with_xmu" && { 
6885 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6886 echo "configure:6887: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6887 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6888
6889 xe_check_libs=" -lXmu "
6890 cat > conftest.$ac_ext <<EOF
6891 #line 6892 "configure"
6892 #include "confdefs.h"
6893 /* Override any gcc2 internal prototype to avoid an error.  */
6894 /* We use char because int might match the return type of a gcc2
6895     builtin and then its argument prototype would still apply.  */
6896 char XmuReadBitmapDataFromFile();
6897
6898 int main() {
6899 XmuReadBitmapDataFromFile()
6900 ; return 0; }
6901 EOF
6902 if { (eval echo configure:6903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6903   rm -rf conftest*
6904   eval "ac_cv_lib_$ac_lib_var=yes"
6905 else
6906   echo "configure: failed program was:" >&5
6907   cat conftest.$ac_ext >&5
6908   rm -rf conftest*
6909   eval "ac_cv_lib_$ac_lib_var=no"
6910 fi
6911 rm -f conftest*
6912 xe_check_libs=""
6913
6914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6915   echo "$ac_t""yes" 1>&6
6916   with_xmu=yes
6917 else
6918   echo "$ac_t""no" 1>&6
6919 with_xmu=no
6920 fi
6921
6922  }
6923   if test "$with_xmu" = "no"; then
6924     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6925    echo "    xemacs will be linked with \"xmu.o\""
6926  fi
6927   else
6928     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6929     { test "$extra_verbose" = "yes" && cat << \EOF
6930     Defining HAVE_XMU
6931 EOF
6932 cat >> confdefs.h <<\EOF
6933 #define HAVE_XMU 1
6934 EOF
6935 }
6936
6937   fi
6938
6939       
6940 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6941 echo "configure:6942: checking for main in -lXbsd" >&5
6942 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6943
6944 xe_check_libs=" -lXbsd "
6945 cat > conftest.$ac_ext <<EOF
6946 #line 6947 "configure"
6947 #include "confdefs.h"
6948
6949 int main() {
6950 main()
6951 ; return 0; }
6952 EOF
6953 if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6954   rm -rf conftest*
6955   eval "ac_cv_lib_$ac_lib_var=yes"
6956 else
6957   echo "configure: failed program was:" >&5
6958   cat conftest.$ac_ext >&5
6959   rm -rf conftest*
6960   eval "ac_cv_lib_$ac_lib_var=no"
6961 fi
6962 rm -f conftest*
6963 xe_check_libs=""
6964
6965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6966   echo "$ac_t""yes" 1>&6
6967   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6968 else
6969   echo "$ac_t""no" 1>&6
6970 fi
6971
6972
6973
6974     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6975         if test "$GCC" = "yes"; then
6976       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6977       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6978     else
6979       case "$CC" in
6980         "xlc" ) CC="xlc_r" ;;
6981         "xlC" ) CC="xlC_r" ;;
6982         "cc"  ) CC="cc_r" ;;
6983       esac
6984     fi
6985   fi
6986
6987 fi 
6988 if test "$with_msw" != "no"; then
6989   echo "checking for MS-Windows" 1>&6
6990 echo "configure:6991: checking for MS-Windows" >&5
6991   
6992 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6993 echo "configure:6994: checking for main in -lgdi32" >&5
6994 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6995
6996 xe_check_libs=" -lgdi32 "
6997 cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000
7001 int main() {
7002 main()
7003 ; return 0; }
7004 EOF
7005 if { (eval echo configure:7006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7006   rm -rf conftest*
7007   eval "ac_cv_lib_$ac_lib_var=yes"
7008 else
7009   echo "configure: failed program was:" >&5
7010   cat conftest.$ac_ext >&5
7011   rm -rf conftest*
7012   eval "ac_cv_lib_$ac_lib_var=no"
7013 fi
7014 rm -f conftest*
7015 xe_check_libs=""
7016
7017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7018   echo "$ac_t""yes" 1>&6
7019   with_msw=yes
7020 else
7021   echo "$ac_t""no" 1>&6
7022 fi
7023
7024
7025   if test "$with_msw" = "yes"; then
7026     { test "$extra_verbose" = "yes" && cat << \EOF
7027     Defining HAVE_MS_WINDOWS
7028 EOF
7029 cat >> confdefs.h <<\EOF
7030 #define HAVE_MS_WINDOWS 1
7031 EOF
7032 }
7033
7034
7035         if test "$with_netinstall" = "yes"; then
7036       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7037       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7038       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7039     fi
7040
7041     install_pp="$blddir/lib-src/installexe.sh"
7042     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
7043     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7044     if test "$window_system" != x11; then
7045         window_system=msw
7046         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7047             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7048    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7049  fi
7050         test "$with_menubars"   != "no" && with_menubars=msw \
7051             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7052    echo "    xemacs will be linked with \"menubar-msw.o\""
7053  fi
7054         test "$with_toolbars"   != "no" && with_toolbars=msw \
7055             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7056    echo "    xemacs will be linked with \"toolbar-msw.o\""
7057  fi
7058         test "$with_dialogs"   != "no" && with_dialogs=msw \
7059             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7060    echo "    xemacs will be linked with \"dialog-msw.o\""
7061  fi
7062         test "$with_widgets"   != "no" && with_widgets=msw
7063     else
7064         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7065    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7066  fi
7067         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7068    echo "    xemacs will be linked with \"menubar-msw.o\""
7069  fi
7070         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7071    echo "    xemacs will be linked with \"toolbar-msw.o\""
7072  fi
7073         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7074    echo "    xemacs will be linked with \"dialog-msw.o\""
7075  fi
7076     fi
7077         cat > conftest.$ac_ext <<EOF
7078 #line 7079 "configure"
7079 #include "confdefs.h"
7080 #include <fcntl.h>
7081     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7082 EOF
7083 if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7084 then
7085   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7086     Defining HAVE_MSG_SELECT
7087 EOF
7088 cat >> confdefs.h <<\EOF
7089 #define HAVE_MSG_SELECT 1
7090 EOF
7091 }
7092
7093 else
7094   conftest_rc="$?"
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097 fi
7098 rm -fr conftest*
7099     with_file_coding=yes
7100     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
7101    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\""
7102  fi
7103   fi
7104 fi
7105
7106
7107
7108 test -z "$window_system" && window_system="none"
7109
7110 if test "$window_system" = "none"; then
7111   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7112   do
7113     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7114        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7115     fi
7116     eval "with_${feature}=no"
7117   done
7118 else
7119   test -z "$with_toolbars" && with_toolbars=yes
7120 fi
7121
7122 if test "$with_msw" != "yes"; then
7123   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7124   do
7125     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7126        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7127     fi
7128     eval "with_${feature}=no"
7129   done
7130 else
7131   :
7132 fi
7133
7134 if test "$with_x11" != "yes"; then
7135             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7136   do
7137     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7138        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7139     fi
7140     eval "with_${feature}=no"
7141   done
7142 fi
7143
7144 if test "$with_x11" = "yes"; then
7145   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7146 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7147 echo "configure:7148: checking for X11/extensions/shape.h" >&5
7148
7149 cat > conftest.$ac_ext <<EOF
7150 #line 7151 "configure"
7151 #include "confdefs.h"
7152 #include <X11/extensions/shape.h>
7153 EOF
7154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7155 { (eval echo configure:7156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7157 if test -z "$ac_err"; then
7158   rm -rf conftest*
7159   eval "ac_cv_header_$ac_safe=yes"
7160 else
7161   echo "$ac_err" >&5
7162   echo "configure: failed program was:" >&5
7163   cat conftest.$ac_ext >&5
7164   rm -rf conftest*
7165   eval "ac_cv_header_$ac_safe=no"
7166 fi
7167 rm -f conftest*
7168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7169   echo "$ac_t""yes" 1>&6
7170   
7171    { test "$extra_verbose" = "yes" && cat << \EOF
7172     Defining HAVE_BALLOON_HELP
7173 EOF
7174 cat >> confdefs.h <<\EOF
7175 #define HAVE_BALLOON_HELP 1
7176 EOF
7177 }
7178
7179    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7180    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7181  fi
7182 else
7183   echo "$ac_t""no" 1>&6
7184 fi
7185
7186 fi
7187
7188 bitmapdir=
7189
7190 case "$window_system" in
7191   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7192   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7193   gtk  )
7194        HAVE_X_WINDOWS=no
7195        test "$with_gnome" = "yes" && echo "  Using GNOME."
7196        test "$with_gnome" = "no" && echo "  Using GTK."
7197        ;;
7198   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7199 esac
7200
7201 case "$x_libraries" in *X11R4* )
7202   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7203   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7204 esac
7205
7206 echo "checking for WM_COMMAND option" 1>&6
7207 echo "configure:7208: checking for WM_COMMAND option" >&5;
7208 if test "$with_wmcommand" != "no"; then
7209   { test "$extra_verbose" = "yes" && cat << \EOF
7210     Defining HAVE_WMCOMMAND
7211 EOF
7212 cat >> confdefs.h <<\EOF
7213 #define HAVE_WMCOMMAND 1
7214 EOF
7215 }
7216
7217 fi
7218
7219 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7220 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7221 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7222 echo "configure:7223: checking for X11/Xauth.h" >&5
7223
7224 cat > conftest.$ac_ext <<EOF
7225 #line 7226 "configure"
7226 #include "confdefs.h"
7227 #include <X11/Xauth.h>
7228 EOF
7229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7230 { (eval echo configure:7231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7232 if test -z "$ac_err"; then
7233   rm -rf conftest*
7234   eval "ac_cv_header_$ac_safe=yes"
7235 else
7236   echo "$ac_err" >&5
7237   echo "configure: failed program was:" >&5
7238   cat conftest.$ac_ext >&5
7239   rm -rf conftest*
7240   eval "ac_cv_header_$ac_safe=no"
7241 fi
7242 rm -f conftest*
7243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7244   echo "$ac_t""yes" 1>&6
7245   :
7246 else
7247   echo "$ac_t""no" 1>&6
7248 with_xauth=no
7249 fi
7250  }
7251 test -z "$with_xauth" && { 
7252 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7253 echo "configure:7254: checking for XauGetAuthByAddr in -lXau" >&5
7254 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7255
7256 xe_check_libs=" -lXau "
7257 cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 /* Override any gcc2 internal prototype to avoid an error.  */
7261 /* We use char because int might match the return type of a gcc2
7262     builtin and then its argument prototype would still apply.  */
7263 char XauGetAuthByAddr();
7264
7265 int main() {
7266 XauGetAuthByAddr()
7267 ; return 0; }
7268 EOF
7269 if { (eval echo configure:7270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7270   rm -rf conftest*
7271   eval "ac_cv_lib_$ac_lib_var=yes"
7272 else
7273   echo "configure: failed program was:" >&5
7274   cat conftest.$ac_ext >&5
7275   rm -rf conftest*
7276   eval "ac_cv_lib_$ac_lib_var=no"
7277 fi
7278 rm -f conftest*
7279 xe_check_libs=""
7280
7281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7282   echo "$ac_t""yes" 1>&6
7283   :
7284 else
7285   echo "$ac_t""no" 1>&6
7286 with_xauth=no
7287 fi
7288
7289  }
7290 test -z "$with_xauth" && with_xauth=yes
7291 if test "$with_xauth" = "yes"; then
7292   { test "$extra_verbose" = "yes" && cat << \EOF
7293     Defining HAVE_XAUTH
7294 EOF
7295 cat >> confdefs.h <<\EOF
7296 #define HAVE_XAUTH 1
7297 EOF
7298 }
7299
7300   
7301 T=""
7302 for W in $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
7303 libs_xauth="$T"
7304
7305 fi
7306
7307
7308
7309
7310 if test "$with_tooltalk" != "no" ; then
7311       for dir in "" "Tt/" "desktop/" ; do
7312     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7313 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7314 echo "configure:7315: checking for ${dir}tt_c.h" >&5
7315
7316 cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319 #include <${dir}tt_c.h>
7320 EOF
7321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7322 { (eval echo configure:7323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7324 if test -z "$ac_err"; then
7325   rm -rf conftest*
7326   eval "ac_cv_header_$ac_safe=yes"
7327 else
7328   echo "$ac_err" >&5
7329   echo "configure: failed program was:" >&5
7330   cat conftest.$ac_ext >&5
7331   rm -rf conftest*
7332   eval "ac_cv_header_$ac_safe=no"
7333 fi
7334 rm -f conftest*
7335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337   tt_c_h_file="${dir}tt_c.h"; break
7338 else
7339   echo "$ac_t""no" 1>&6
7340 fi
7341
7342   done
7343   if test -z "$tt_c_h_file"; then
7344     if test "$with_tooltalk" = "yes"; then
7345       (echo "$progname: Usage error:"
7346 echo " " "Unable to find required tooltalk header files."
7347 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7348     fi
7349     with_tooltalk=no
7350   fi
7351 fi
7352 if test "$with_tooltalk" != "no" ; then
7353   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7354     
7355 xe_msg_checking="for tt_message_create in -ltt"
7356 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7357 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7358 echo "configure:7359: checking "$xe_msg_checking"" >&5
7359 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7360
7361 xe_check_libs=" -ltt $extra_libs"
7362 cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 /* Override any gcc2 internal prototype to avoid an error.  */
7366 /* We use char because int might match the return type of a gcc2
7367     builtin and then its argument prototype would still apply.  */
7368 char tt_message_create();
7369
7370 int main() {
7371 tt_message_create()
7372 ; return 0; }
7373 EOF
7374 if { (eval echo configure:7375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7375   rm -rf conftest*
7376   eval "ac_cv_lib_$ac_lib_var=yes"
7377 else
7378   echo "configure: failed program was:" >&5
7379   cat conftest.$ac_ext >&5
7380   rm -rf conftest*
7381   eval "ac_cv_lib_$ac_lib_var=no"
7382 fi
7383 rm -f conftest*
7384 xe_check_libs=""
7385
7386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7387   echo "$ac_t""yes" 1>&6
7388   tt_libs="-ltt $extra_libs"; break
7389 else
7390   echo "$ac_t""no" 1>&6
7391 :
7392 fi
7393
7394
7395   done
7396   if test -z "$tt_libs"; then
7397     if test "$with_tooltalk" = "yes"; then
7398       (echo "$progname: Usage error:"
7399 echo " " "Unable to find required tooltalk libraries."
7400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7401     fi
7402     with_tooltalk=no
7403   fi
7404 fi
7405 test -z "$with_tooltalk" && with_tooltalk=yes
7406 if test "$with_tooltalk" = "yes"; then
7407   { test "$extra_verbose" = "yes" && cat << \EOF
7408     Defining TOOLTALK
7409 EOF
7410 cat >> confdefs.h <<\EOF
7411 #define TOOLTALK 1
7412 EOF
7413 }
7414
7415   { test "$extra_verbose" = "yes" && cat << EOF
7416     Defining TT_C_H_FILE = "$tt_c_h_file"
7417 EOF
7418 cat >> confdefs.h <<EOF
7419 #define TT_C_H_FILE "$tt_c_h_file"
7420 EOF
7421 }
7422
7423   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7424   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7425    echo "    xemacs will be linked with \"tooltalk.o\""
7426  fi
7427 fi
7428
7429 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7430 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7431 echo "configure:7432: checking for Dt/Dt.h" >&5
7432
7433 cat > conftest.$ac_ext <<EOF
7434 #line 7435 "configure"
7435 #include "confdefs.h"
7436 #include <Dt/Dt.h>
7437 EOF
7438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7439 { (eval echo configure:7440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7441 if test -z "$ac_err"; then
7442   rm -rf conftest*
7443   eval "ac_cv_header_$ac_safe=yes"
7444 else
7445   echo "$ac_err" >&5
7446   echo "configure: failed program was:" >&5
7447   cat conftest.$ac_ext >&5
7448   rm -rf conftest*
7449   eval "ac_cv_header_$ac_safe=no"
7450 fi
7451 rm -f conftest*
7452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7453   echo "$ac_t""yes" 1>&6
7454   :
7455 else
7456   echo "$ac_t""no" 1>&6
7457 with_cde=no
7458 fi
7459  }
7460 test -z "$with_cde" && { 
7461 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7462 echo "configure:7463: checking for DtDndDragStart in -lDtSvc" >&5
7463 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7464
7465 xe_check_libs=" -lDtSvc "
7466 cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 /* Override any gcc2 internal prototype to avoid an error.  */
7470 /* We use char because int might match the return type of a gcc2
7471     builtin and then its argument prototype would still apply.  */
7472 char DtDndDragStart();
7473
7474 int main() {
7475 DtDndDragStart()
7476 ; return 0; }
7477 EOF
7478 if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7479   rm -rf conftest*
7480   eval "ac_cv_lib_$ac_lib_var=yes"
7481 else
7482   echo "configure: failed program was:" >&5
7483   cat conftest.$ac_ext >&5
7484   rm -rf conftest*
7485   eval "ac_cv_lib_$ac_lib_var=no"
7486 fi
7487 rm -f conftest*
7488 xe_check_libs=""
7489
7490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7491   echo "$ac_t""yes" 1>&6
7492   :
7493 else
7494   echo "$ac_t""no" 1>&6
7495 with_cde=no
7496 fi
7497
7498  }
7499 test -z "$with_cde" && with_cde=yes
7500 if test "$with_dragndrop" = no; then
7501   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7502   with_cde=no
7503 fi
7504 if test "$with_cde" = "yes" ; then
7505   { test "$extra_verbose" = "yes" && cat << \EOF
7506     Defining HAVE_CDE
7507 EOF
7508 cat >> confdefs.h <<\EOF
7509 #define HAVE_CDE 1
7510 EOF
7511 }
7512
7513   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7514   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7515   with_tooltalk=yes # CDE requires Tooltalk
7516   need_motif=yes    # CDE requires Motif
7517 fi
7518
7519 test "$window_system" != "x11" && with_offix=no
7520 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7521   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7522   with_offix=no
7523 fi
7524 if test "$with_dragndrop" = no; then
7525   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7526   with_offix=no
7527 fi
7528 if test "$with_cde" = yes; then
7529   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7530   with_offix=no
7531 fi
7532 test -z "$with_offix" && with_offix=no
7533 if test "$with_offix" = "yes"; then
7534   { test "$extra_verbose" = "yes" && cat << \EOF
7535     Defining HAVE_OFFIX_DND
7536 EOF
7537 cat >> confdefs.h <<\EOF
7538 #define HAVE_OFFIX_DND 1
7539 EOF
7540 }
7541
7542   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7543   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7544 fi
7545 if test "$with_gtk" = "yes"; then
7546    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7547 fi
7548
7549 if test "$with_dragndrop" != "no" ; then
7550   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7551 echo "configure:7552: checking if drag and drop API is needed" >&5
7552   if test -n "$dragndrop_proto" ; then
7553     with_dragndrop=yes
7554     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7555     { test "$extra_verbose" = "yes" && cat << \EOF
7556     Defining HAVE_DRAGNDROP
7557 EOF
7558 cat >> confdefs.h <<\EOF
7559 #define HAVE_DRAGNDROP 1
7560 EOF
7561 }
7562
7563     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7564   else
7565     with_dragndrop=no
7566     echo "$ac_t""no" 1>&6
7567   fi
7568 fi
7569
7570 echo "checking for LDAP" 1>&6
7571 echo "configure:7572: checking for LDAP" >&5
7572 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7573 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7574 echo "configure:7575: checking for ldap.h" >&5
7575
7576 cat > conftest.$ac_ext <<EOF
7577 #line 7578 "configure"
7578 #include "confdefs.h"
7579 #include <ldap.h>
7580 EOF
7581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7582 { (eval echo configure:7583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7584 if test -z "$ac_err"; then
7585   rm -rf conftest*
7586   eval "ac_cv_header_$ac_safe=yes"
7587 else
7588   echo "$ac_err" >&5
7589   echo "configure: failed program was:" >&5
7590   cat conftest.$ac_ext >&5
7591   rm -rf conftest*
7592   eval "ac_cv_header_$ac_safe=no"
7593 fi
7594 rm -f conftest*
7595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7596   echo "$ac_t""yes" 1>&6
7597   :
7598 else
7599   echo "$ac_t""no" 1>&6
7600 with_ldap=no
7601 fi
7602  }
7603 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7604 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7605 echo "configure:7606: checking for lber.h" >&5
7606
7607 cat > conftest.$ac_ext <<EOF
7608 #line 7609 "configure"
7609 #include "confdefs.h"
7610 #include <lber.h>
7611 EOF
7612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613 { (eval echo configure:7614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7615 if test -z "$ac_err"; then
7616   rm -rf conftest*
7617   eval "ac_cv_header_$ac_safe=yes"
7618 else
7619   echo "$ac_err" >&5
7620   echo "configure: failed program was:" >&5
7621   cat conftest.$ac_ext >&5
7622   rm -rf conftest*
7623   eval "ac_cv_header_$ac_safe=no"
7624 fi
7625 rm -f conftest*
7626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7627   echo "$ac_t""yes" 1>&6
7628   :
7629 else
7630   echo "$ac_t""no" 1>&6
7631 with_ldap=no
7632 fi
7633  }
7634 if test "$with_ldap" != "no"; then
7635   
7636 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7637 echo "configure:7638: checking for ldap_search in -lldap" >&5
7638 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7639
7640 xe_check_libs=" -lldap "
7641 cat > conftest.$ac_ext <<EOF
7642 #line 7643 "configure"
7643 #include "confdefs.h"
7644 /* Override any gcc2 internal prototype to avoid an error.  */
7645 /* We use char because int might match the return type of a gcc2
7646     builtin and then its argument prototype would still apply.  */
7647 char ldap_search();
7648
7649 int main() {
7650 ldap_search()
7651 ; return 0; }
7652 EOF
7653 if { (eval echo configure:7654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7654   rm -rf conftest*
7655   eval "ac_cv_lib_$ac_lib_var=yes"
7656 else
7657   echo "configure: failed program was:" >&5
7658   cat conftest.$ac_ext >&5
7659   rm -rf conftest*
7660   eval "ac_cv_lib_$ac_lib_var=no"
7661 fi
7662 rm -f conftest*
7663 xe_check_libs=""
7664
7665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7666   echo "$ac_t""yes" 1>&6
7667   with_ldap_nolber=yes
7668 else
7669   echo "$ac_t""no" 1>&6
7670 with_ldap_nolber=no
7671 fi
7672
7673
7674   test "$with_ldap_nolber" = "no" && { 
7675 xe_msg_checking="for ldap_open in -lldap"
7676 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7677 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7678 echo "configure:7679: checking "$xe_msg_checking"" >&5
7679 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7680
7681 xe_check_libs=" -lldap -llber"
7682 cat > conftest.$ac_ext <<EOF
7683 #line 7684 "configure"
7684 #include "confdefs.h"
7685 /* Override any gcc2 internal prototype to avoid an error.  */
7686 /* We use char because int might match the return type of a gcc2
7687     builtin and then its argument prototype would still apply.  */
7688 char ldap_open();
7689
7690 int main() {
7691 ldap_open()
7692 ; return 0; }
7693 EOF
7694 if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7695   rm -rf conftest*
7696   eval "ac_cv_lib_$ac_lib_var=yes"
7697 else
7698   echo "configure: failed program was:" >&5
7699   cat conftest.$ac_ext >&5
7700   rm -rf conftest*
7701   eval "ac_cv_lib_$ac_lib_var=no"
7702 fi
7703 rm -f conftest*
7704 xe_check_libs=""
7705
7706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7707   echo "$ac_t""yes" 1>&6
7708   with_ldap_lber=yes
7709 else
7710   echo "$ac_t""no" 1>&6
7711 with_ldap_lber=no
7712 fi
7713
7714  }
7715   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7716 xe_msg_checking="for ldap_open in -lldap"
7717 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7718 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7719 echo "configure:7720: checking "$xe_msg_checking"" >&5
7720 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7721
7722 xe_check_libs=" -lldap -llber -lkrb"
7723 cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* Override any gcc2 internal prototype to avoid an error.  */
7727 /* We use char because int might match the return type of a gcc2
7728     builtin and then its argument prototype would still apply.  */
7729 char ldap_open();
7730
7731 int main() {
7732 ldap_open()
7733 ; return 0; }
7734 EOF
7735 if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7736   rm -rf conftest*
7737   eval "ac_cv_lib_$ac_lib_var=yes"
7738 else
7739   echo "configure: failed program was:" >&5
7740   cat conftest.$ac_ext >&5
7741   rm -rf conftest*
7742   eval "ac_cv_lib_$ac_lib_var=no"
7743 fi
7744 rm -f conftest*
7745 xe_check_libs=""
7746
7747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7748   echo "$ac_t""yes" 1>&6
7749   with_ldap_krb=yes
7750 else
7751   echo "$ac_t""no" 1>&6
7752 with_ldap_krb=no
7753 fi
7754
7755  }
7756   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7757 xe_msg_checking="for ldap_open in -lldap"
7758 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7759 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7760 echo "configure:7761: checking "$xe_msg_checking"" >&5
7761 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7762
7763 xe_check_libs=" -lldap -llber -lkrb -ldes"
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 /* Override any gcc2 internal prototype to avoid an error.  */
7768 /* We use char because int might match the return type of a gcc2
7769     builtin and then its argument prototype would still apply.  */
7770 char ldap_open();
7771
7772 int main() {
7773 ldap_open()
7774 ; return 0; }
7775 EOF
7776 if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7777   rm -rf conftest*
7778   eval "ac_cv_lib_$ac_lib_var=yes"
7779 else
7780   echo "configure: failed program was:" >&5
7781   cat conftest.$ac_ext >&5
7782   rm -rf conftest*
7783   eval "ac_cv_lib_$ac_lib_var=no"
7784 fi
7785 rm -f conftest*
7786 xe_check_libs=""
7787
7788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7789   echo "$ac_t""yes" 1>&6
7790   with_ldap_krbdes=yes
7791 else
7792   echo "$ac_t""no" 1>&6
7793 with_ldap_krbdes=no
7794 fi
7795
7796  }
7797   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
7798 fi
7799 if test "$with_ldap" = "yes"; then
7800   { test "$extra_verbose" = "yes" && cat << \EOF
7801     Defining HAVE_LDAP
7802 EOF
7803 cat >> confdefs.h <<\EOF
7804 #define HAVE_LDAP 1
7805 EOF
7806 }
7807
7808   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7809    echo "    xemacs will be linked with \"eldap.o\""
7810  fi
7811   if test "$with_ldap_nolber" = "yes" ; then
7812     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7813   else
7814     if test "$with_ldap_krb" = "yes" ; then
7815       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7816     fi
7817     if test "$with_ldap_krbdes" = "yes" ; then
7818       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7819       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7820     fi
7821     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7822     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7823   fi
7824   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7825 do
7826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7827 echo "configure:7828: checking for $ac_func" >&5
7828
7829 cat > conftest.$ac_ext <<EOF
7830 #line 7831 "configure"
7831 #include "confdefs.h"
7832 /* System header to define __stub macros and hopefully few prototypes,
7833     which can conflict with char $ac_func(); below.  */
7834 #include <assert.h>
7835 /* Override any gcc2 internal prototype to avoid an error.  */
7836 /* We use char because int might match the return type of a gcc2
7837     builtin and then its argument prototype would still apply.  */
7838 char $ac_func();
7839
7840 int main() {
7841
7842 /* The GNU C library defines this for functions which it implements
7843     to always fail with ENOSYS.  Some functions are actually named
7844     something starting with __ and the normal name is an alias.  */
7845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7846 choke me
7847 #else
7848 $ac_func();
7849 #endif
7850
7851 ; return 0; }
7852 EOF
7853 if { (eval echo configure:7854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7854   rm -rf conftest*
7855   eval "ac_cv_func_$ac_func=yes"
7856 else
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -rf conftest*
7860   eval "ac_cv_func_$ac_func=no"
7861 fi
7862 rm -f conftest*
7863
7864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7865   echo "$ac_t""yes" 1>&6
7866     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7867   { test "$extra_verbose" = "yes" && cat << EOF
7868     Defining $ac_tr_func
7869 EOF
7870 cat >> confdefs.h <<EOF
7871 #define $ac_tr_func 1
7872 EOF
7873 }
7874  
7875 else
7876   echo "$ac_t""no" 1>&6
7877 fi
7878 done
7879
7880 fi
7881
7882 if test "$with_postgresql" != "no"; then
7883   echo "checking for PostgreSQL" 1>&6
7884 echo "configure:7885: checking for PostgreSQL" >&5
7885
7886   for header_dir in "" "pgsql/" "postgresql/"; do
7887     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7888 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7889 echo "configure:7890: checking for ${header_dir}libpq-fe.h" >&5
7890
7891 cat > conftest.$ac_ext <<EOF
7892 #line 7893 "configure"
7893 #include "confdefs.h"
7894 #include <${header_dir}libpq-fe.h>
7895 EOF
7896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7897 { (eval echo configure:7898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7899 if test -z "$ac_err"; then
7900   rm -rf conftest*
7901   eval "ac_cv_header_$ac_safe=yes"
7902 else
7903   echo "$ac_err" >&5
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   eval "ac_cv_header_$ac_safe=no"
7908 fi
7909 rm -f conftest*
7910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7911   echo "$ac_t""yes" 1>&6
7912   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7913 else
7914   echo "$ac_t""no" 1>&6
7915 fi
7916
7917   done
7918
7919   test -n "$libpq_fe_h_file" && { 
7920 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7921 echo "configure:7922: checking for PQconnectdb in -lpq" >&5
7922 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7923
7924 xe_check_libs=" -lpq "
7925 cat > conftest.$ac_ext <<EOF
7926 #line 7927 "configure"
7927 #include "confdefs.h"
7928 /* Override any gcc2 internal prototype to avoid an error.  */
7929 /* We use char because int might match the return type of a gcc2
7930     builtin and then its argument prototype would still apply.  */
7931 char PQconnectdb();
7932
7933 int main() {
7934 PQconnectdb()
7935 ; return 0; }
7936 EOF
7937 if { (eval echo configure:7938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7938   rm -rf conftest*
7939   eval "ac_cv_lib_$ac_lib_var=yes"
7940 else
7941   echo "configure: failed program was:" >&5
7942   cat conftest.$ac_ext >&5
7943   rm -rf conftest*
7944   eval "ac_cv_lib_$ac_lib_var=no"
7945 fi
7946 rm -f conftest*
7947 xe_check_libs=""
7948
7949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7950   echo "$ac_t""yes" 1>&6
7951   have_libpq=yes
7952 else
7953   echo "$ac_t""no" 1>&6
7954 fi
7955
7956  }
7957
7958   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7959     with_postgresql=yes
7960     { test "$extra_verbose" = "yes" && cat << \EOF
7961     Defining HAVE_POSTGRESQL
7962 EOF
7963 cat >> confdefs.h <<\EOF
7964 #define HAVE_POSTGRESQL 1
7965 EOF
7966 }
7967
7968     
7969 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7970 echo "configure:7971: checking for PQconnectStart in -lpq" >&5
7971 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7972
7973 xe_check_libs=" -lpq "
7974 cat > conftest.$ac_ext <<EOF
7975 #line 7976 "configure"
7976 #include "confdefs.h"
7977 /* Override any gcc2 internal prototype to avoid an error.  */
7978 /* We use char because int might match the return type of a gcc2
7979     builtin and then its argument prototype would still apply.  */
7980 char PQconnectStart();
7981
7982 int main() {
7983 PQconnectStart()
7984 ; return 0; }
7985 EOF
7986 if { (eval echo configure:7987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7987   rm -rf conftest*
7988   eval "ac_cv_lib_$ac_lib_var=yes"
7989 else
7990   echo "configure: failed program was:" >&5
7991   cat conftest.$ac_ext >&5
7992   rm -rf conftest*
7993   eval "ac_cv_lib_$ac_lib_var=no"
7994 fi
7995 rm -f conftest*
7996 xe_check_libs=""
7997
7998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7999   echo "$ac_t""yes" 1>&6
8000   with_postgresqlv7=yes;
8001                  { test "$extra_verbose" = "yes" && cat << \EOF
8002     Defining HAVE_POSTGRESQLV7
8003 EOF
8004 cat >> confdefs.h <<\EOF
8005 #define HAVE_POSTGRESQLV7 1
8006 EOF
8007 }
8008
8009 else
8010   echo "$ac_t""no" 1>&6
8011 fi
8012
8013
8014     { test "$extra_verbose" = "yes" && cat << EOF
8015     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8016 EOF
8017 cat >> confdefs.h <<EOF
8018 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8019 EOF
8020 }
8021
8022     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8023     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8024    echo "    xemacs will be linked with \"postgresql.o\""
8025  fi
8026   elif test "$with_postgresql" = "yes"; then
8027     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8028   fi
8029 fi
8030
8031
8032 if test "$window_system" != "none"; then
8033   echo "checking for graphics libraries" 1>&6
8034 echo "configure:8035: checking for graphics libraries" >&5
8035
8036       libpath_xpm=
8037   incpath_xpm=
8038   case "$opsys" in 
8039     cygwin*)
8040       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8041       cygwin_top=`eval "dirname ${cygwin_top}"`;
8042       cygwin_top="${cygwin_top}/..";
8043       case "$window_system" in
8044                 x11)  ;;
8045                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8046              incpath_xpm="-I${cygwin_top}/include/noX"
8047               ;;
8048                 gtk)  ;;
8049                 none) ;;
8050                 *)    ;;
8051       esac
8052       ;;
8053         *) ;;
8054   esac
8055     xpm_problem=""
8056   if test -z "$with_xpm"; then
8057     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8058     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8059     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8060 echo "configure:8061: checking for Xpm - no older than 3.4f" >&5
8061     xe_check_libs=-lXpm
8062     cat > conftest.$ac_ext <<EOF
8063 #line 8064 "configure"
8064 #include "confdefs.h"
8065 #define XPM_NUMBERS
8066 #include <X11/xpm.h>
8067     int main(int c, char **v) {
8068     return c == 1 ? 0 :
8069       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8070       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8071 EOF
8072 if { (eval echo configure:8073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8073 then
8074   ./conftest dummy_arg; xpm_status=$?;
8075       if test "$xpm_status" = "0"; then
8076         with_xpm=yes;
8077       else
8078         with_xpm=no;
8079         if test "$xpm_status" = "1"; then
8080           xpm_problem="Xpm library version and header file version don't match!"
8081         elif test "$xpm_status" = "2"; then
8082           xpm_problem="Xpm library version is too old!"
8083         else
8084           xpm_problem="Internal xpm detection logic error!"
8085         fi
8086         echo "
8087 *** WARNING *** $xpm_problem
8088   I'm not touching that with a 10-foot pole!
8089   If you really want to use the installed version of Xpm, rerun
8090   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8091     fi
8092 else
8093   conftest_rc="$?"
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -fr conftest*
8097   with_xpm=no
8098 fi
8099 rm -fr conftest*
8100     xe_check_libs=
8101     echo "$ac_t""$with_xpm" 1>&6
8102   fi
8103   if test "$with_xpm" = "yes"; then
8104                 { test "$extra_verbose" = "yes" && cat << \EOF
8105     Defining HAVE_XPM
8106 EOF
8107 cat >> confdefs.h <<\EOF
8108 #define HAVE_XPM 1
8109 EOF
8110 }
8111
8112     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8113     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8114     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8115     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8116 echo "configure:8117: checking for \"FOR_MSW\" xpm" >&5
8117     xe_check_libs=-lXpm
8118     cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121
8122 int main() {
8123 XpmCreatePixmapFromData()
8124 ; return 0; }
8125 EOF
8126 if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8127   rm -rf conftest*
8128   xpm_for_msw=no
8129 else
8130   echo "configure: failed program was:" >&5
8131   cat conftest.$ac_ext >&5
8132   rm -rf conftest*
8133   xpm_for_msw=yes
8134 fi
8135 rm -f conftest*
8136     xe_check_libs=
8137     echo "$ac_t""$xpm_for_msw" 1>&6
8138     if test "$xpm_for_msw" = "yes"; then
8139       { test "$extra_verbose" = "yes" && cat << \EOF
8140     Defining FOR_MSW
8141 EOF
8142 cat >> confdefs.h <<\EOF
8143 #define FOR_MSW 1
8144 EOF
8145 }
8146
8147     fi
8148   fi
8149
8150     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8151 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8152 echo "configure:8153: checking for compface.h" >&5
8153
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 #include <compface.h>
8158 EOF
8159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8160 { (eval echo configure:8161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8162 if test -z "$ac_err"; then
8163   rm -rf conftest*
8164   eval "ac_cv_header_$ac_safe=yes"
8165 else
8166   echo "$ac_err" >&5
8167   echo "configure: failed program was:" >&5
8168   cat conftest.$ac_ext >&5
8169   rm -rf conftest*
8170   eval "ac_cv_header_$ac_safe=no"
8171 fi
8172 rm -f conftest*
8173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8174   echo "$ac_t""yes" 1>&6
8175   :
8176 else
8177   echo "$ac_t""no" 1>&6
8178 with_xface=no
8179 fi
8180  }
8181   test -z "$with_xface" && { 
8182 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8183 echo "configure:8184: checking for UnGenFace in -lcompface" >&5
8184 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8185
8186 xe_check_libs=" -lcompface "
8187 cat > conftest.$ac_ext <<EOF
8188 #line 8189 "configure"
8189 #include "confdefs.h"
8190 /* Override any gcc2 internal prototype to avoid an error.  */
8191 /* We use char because int might match the return type of a gcc2
8192     builtin and then its argument prototype would still apply.  */
8193 char UnGenFace();
8194
8195 int main() {
8196 UnGenFace()
8197 ; return 0; }
8198 EOF
8199 if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8200   rm -rf conftest*
8201   eval "ac_cv_lib_$ac_lib_var=yes"
8202 else
8203   echo "configure: failed program was:" >&5
8204   cat conftest.$ac_ext >&5
8205   rm -rf conftest*
8206   eval "ac_cv_lib_$ac_lib_var=no"
8207 fi
8208 rm -f conftest*
8209 xe_check_libs=""
8210
8211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8212   echo "$ac_t""yes" 1>&6
8213   : 
8214 else
8215   echo "$ac_t""no" 1>&6
8216 with_xface=no
8217 fi
8218
8219  }
8220   test -z "$with_xface" && with_xface=yes
8221   if test "$with_xface" = "yes"; then
8222     { test "$extra_verbose" = "yes" && cat << \EOF
8223     Defining HAVE_XFACE
8224 EOF
8225 cat >> confdefs.h <<\EOF
8226 #define HAVE_XFACE 1
8227 EOF
8228 }
8229
8230     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8231   fi
8232
8233         if test "$with_gif" != "no"; then
8234     with_gif="yes"
8235     { test "$extra_verbose" = "yes" && cat << \EOF
8236     Defining HAVE_GIF
8237 EOF
8238 cat >> confdefs.h <<\EOF
8239 #define HAVE_GIF 1
8240 EOF
8241 }
8242
8243     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8244    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8245  fi
8246   fi
8247
8248       if test "$with_png $with_tiff" != "no no"; then
8249     
8250 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8251 echo "configure:8252: checking for inflate in -lc" >&5
8252 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8253
8254 xe_check_libs=" -lc "
8255 cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 /* Override any gcc2 internal prototype to avoid an error.  */
8259 /* We use char because int might match the return type of a gcc2
8260     builtin and then its argument prototype would still apply.  */
8261 char inflate();
8262
8263 int main() {
8264 inflate()
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   eval "ac_cv_lib_$ac_lib_var=yes"
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=no"
8275 fi
8276 rm -f conftest*
8277 xe_check_libs=""
8278
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8280   echo "$ac_t""yes" 1>&6
8281   :
8282 else
8283   echo "$ac_t""no" 1>&6
8284
8285 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8286 echo "configure:8287: checking for inflate in -lz" >&5
8287 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8288
8289 xe_check_libs=" -lz "
8290 cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* Override any gcc2 internal prototype to avoid an error.  */
8294 /* We use char because int might match the return type of a gcc2
8295     builtin and then its argument prototype would still apply.  */
8296 char inflate();
8297
8298 int main() {
8299 inflate()
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=yes"
8305 else
8306   echo "configure: failed program was:" >&5
8307   cat conftest.$ac_ext >&5
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=no"
8310 fi
8311 rm -f conftest*
8312 xe_check_libs=""
8313
8314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8315   echo "$ac_t""yes" 1>&6
8316   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8317 else
8318   echo "$ac_t""no" 1>&6
8319
8320 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8321 echo "configure:8322: checking for inflate in -lgz" >&5
8322 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8323
8324 xe_check_libs=" -lgz "
8325 cat > conftest.$ac_ext <<EOF
8326 #line 8327 "configure"
8327 #include "confdefs.h"
8328 /* Override any gcc2 internal prototype to avoid an error.  */
8329 /* We use char because int might match the return type of a gcc2
8330     builtin and then its argument prototype would still apply.  */
8331 char inflate();
8332
8333 int main() {
8334 inflate()
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   eval "ac_cv_lib_$ac_lib_var=yes"
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   eval "ac_cv_lib_$ac_lib_var=no"
8345 fi
8346 rm -f conftest*
8347 xe_check_libs=""
8348
8349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8350   echo "$ac_t""yes" 1>&6
8351   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8352 else
8353   echo "$ac_t""no" 1>&6
8354 fi
8355
8356
8357 fi
8358
8359
8360 fi
8361
8362
8363   fi
8364
8365     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8366 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8367 echo "configure:8368: checking for jpeglib.h" >&5
8368
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 #include <jpeglib.h>
8373 EOF
8374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8375 { (eval echo configure:8376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8377 if test -z "$ac_err"; then
8378   rm -rf conftest*
8379   eval "ac_cv_header_$ac_safe=yes"
8380 else
8381   echo "$ac_err" >&5
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_header_$ac_safe=no"
8386 fi
8387 rm -f conftest*
8388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   :
8391 else
8392   echo "$ac_t""no" 1>&6
8393 with_jpeg=no
8394 fi
8395  }
8396   test -z "$with_jpeg" && { 
8397 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8398 echo "configure:8399: checking for jpeg_destroy_decompress in -ljpeg" >&5
8399 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8400
8401 xe_check_libs=" -ljpeg "
8402 cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8405 /* Override any gcc2 internal prototype to avoid an error.  */
8406 /* We use char because int might match the return type of a gcc2
8407     builtin and then its argument prototype would still apply.  */
8408 char jpeg_destroy_decompress();
8409
8410 int main() {
8411 jpeg_destroy_decompress()
8412 ; return 0; }
8413 EOF
8414 if { (eval echo configure:8415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8415   rm -rf conftest*
8416   eval "ac_cv_lib_$ac_lib_var=yes"
8417 else
8418   echo "configure: failed program was:" >&5
8419   cat conftest.$ac_ext >&5
8420   rm -rf conftest*
8421   eval "ac_cv_lib_$ac_lib_var=no"
8422 fi
8423 rm -f conftest*
8424 xe_check_libs=""
8425
8426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8427   echo "$ac_t""yes" 1>&6
8428   :
8429 else
8430   echo "$ac_t""no" 1>&6
8431 with_jpeg=no
8432 fi
8433
8434  }
8435   test -z "$with_jpeg" && with_jpeg=yes
8436   if test "$with_jpeg" = "yes"; then
8437     { test "$extra_verbose" = "yes" && cat << \EOF
8438     Defining HAVE_JPEG
8439 EOF
8440 cat >> confdefs.h <<\EOF
8441 #define HAVE_JPEG 1
8442 EOF
8443 }
8444
8445     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8446   fi
8447
8448     png_problem=""
8449   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8450 echo "configure:8451: checking for pow" >&5
8451
8452 cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 /* System header to define __stub macros and hopefully few prototypes,
8456     which can conflict with char pow(); below.  */
8457 #include <assert.h>
8458 /* Override any gcc2 internal prototype to avoid an error.  */
8459 /* We use char because int might match the return type of a gcc2
8460     builtin and then its argument prototype would still apply.  */
8461 char pow();
8462
8463 int main() {
8464
8465 /* The GNU C library defines this for functions which it implements
8466     to always fail with ENOSYS.  Some functions are actually named
8467     something starting with __ and the normal name is an alias.  */
8468 #if defined (__stub_pow) || defined (__stub___pow)
8469 choke me
8470 #else
8471 pow();
8472 #endif
8473
8474 ; return 0; }
8475 EOF
8476 if { (eval echo configure:8477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8477   rm -rf conftest*
8478   eval "ac_cv_func_pow=yes"
8479 else
8480   echo "configure: failed program was:" >&5
8481   cat conftest.$ac_ext >&5
8482   rm -rf conftest*
8483   eval "ac_cv_func_pow=no"
8484 fi
8485 rm -f conftest*
8486
8487 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8488   echo "$ac_t""yes" 1>&6
8489   :
8490 else
8491   echo "$ac_t""no" 1>&6
8492 with_png=no
8493 fi
8494  }
8495   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8496 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8497 echo "configure:8498: checking for png.h" >&5
8498
8499 cat > conftest.$ac_ext <<EOF
8500 #line 8501 "configure"
8501 #include "confdefs.h"
8502 #include <png.h>
8503 EOF
8504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8505 { (eval echo configure:8506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8507 if test -z "$ac_err"; then
8508   rm -rf conftest*
8509   eval "ac_cv_header_$ac_safe=yes"
8510 else
8511   echo "$ac_err" >&5
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   eval "ac_cv_header_$ac_safe=no"
8516 fi
8517 rm -f conftest*
8518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8519   echo "$ac_t""yes" 1>&6
8520   :
8521 else
8522   echo "$ac_t""no" 1>&6
8523 with_png=no
8524 fi
8525  }
8526   test -z "$with_png" && { 
8527 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8528 echo "configure:8529: checking for png_read_image in -lpng" >&5
8529 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8530
8531 xe_check_libs=" -lpng "
8532 cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 /* Override any gcc2 internal prototype to avoid an error.  */
8536 /* We use char because int might match the return type of a gcc2
8537     builtin and then its argument prototype would still apply.  */
8538 char png_read_image();
8539
8540 int main() {
8541 png_read_image()
8542 ; return 0; }
8543 EOF
8544 if { (eval echo configure:8545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8545   rm -rf conftest*
8546   eval "ac_cv_lib_$ac_lib_var=yes"
8547 else
8548   echo "configure: failed program was:" >&5
8549   cat conftest.$ac_ext >&5
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=no"
8552 fi
8553 rm -f conftest*
8554 xe_check_libs=""
8555
8556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8557   echo "$ac_t""yes" 1>&6
8558   :
8559 else
8560   echo "$ac_t""no" 1>&6
8561 with_png=no
8562 fi
8563
8564  }
8565   if test -z "$with_png"; then
8566     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8567 echo "configure:8568: checking for workable png version information" >&5
8568     xe_check_libs="-lpng -lz"
8569     cat > conftest.$ac_ext <<EOF
8570 #line 8571 "configure"
8571 #include "confdefs.h"
8572 #include <png.h>
8573     int main(int c, char **v) {
8574     if (c == 1) return 0;
8575     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8576     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8577 EOF
8578 if { (eval echo configure:8579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8579 then
8580   ./conftest dummy_arg; png_status=$?;
8581       if test "$png_status" = "0"; then
8582         with_png=yes;
8583       else
8584         with_png=no;
8585         if test "$png_status" = "1"; then
8586           png_problem="PNG library version and header file don't match!"
8587         elif test "$png_status" = "2"; then
8588           png_problem="PNG library version too old (pre 1.0.2)!"
8589         fi
8590         echo "
8591 *** WARNING *** $png_problem
8592   I'm not touching that with a 10-foot pole!
8593   If you really want to use the installed version of libPNG, rerun
8594   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8595     fi
8596 else
8597   conftest_rc="$?"
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -fr conftest*
8601   with_png=no
8602 fi
8603 rm -fr conftest*
8604     xe_check_libs=
8605     echo "$ac_t""$with_png" 1>&6
8606   fi
8607   if test "$with_png" = "yes"; then
8608     { test "$extra_verbose" = "yes" && cat << \EOF
8609     Defining HAVE_PNG
8610 EOF
8611 cat >> confdefs.h <<\EOF
8612 #define HAVE_PNG 1
8613 EOF
8614 }
8615
8616     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8617   fi
8618
8619     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8620 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8621 echo "configure:8622: checking for tiffio.h" >&5
8622
8623 cat > conftest.$ac_ext <<EOF
8624 #line 8625 "configure"
8625 #include "confdefs.h"
8626 #include <tiffio.h>
8627 EOF
8628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8629 { (eval echo configure:8630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8631 if test -z "$ac_err"; then
8632   rm -rf conftest*
8633   eval "ac_cv_header_$ac_safe=yes"
8634 else
8635   echo "$ac_err" >&5
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -rf conftest*
8639   eval "ac_cv_header_$ac_safe=no"
8640 fi
8641 rm -f conftest*
8642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8643   echo "$ac_t""yes" 1>&6
8644   :
8645 else
8646   echo "$ac_t""no" 1>&6
8647 with_tiff=no
8648 fi
8649  }
8650   test -z "$with_tiff" && { 
8651 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8652 echo "configure:8653: checking for TIFFClientOpen in -ltiff" >&5
8653 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8654
8655 xe_check_libs=" -ltiff "
8656 cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 /* Override any gcc2 internal prototype to avoid an error.  */
8660 /* We use char because int might match the return type of a gcc2
8661     builtin and then its argument prototype would still apply.  */
8662 char TIFFClientOpen();
8663
8664 int main() {
8665 TIFFClientOpen()
8666 ; return 0; }
8667 EOF
8668 if { (eval echo configure:8669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8669   rm -rf conftest*
8670   eval "ac_cv_lib_$ac_lib_var=yes"
8671 else
8672   echo "configure: failed program was:" >&5
8673   cat conftest.$ac_ext >&5
8674   rm -rf conftest*
8675   eval "ac_cv_lib_$ac_lib_var=no"
8676 fi
8677 rm -f conftest*
8678 xe_check_libs=""
8679
8680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8681   echo "$ac_t""yes" 1>&6
8682   :
8683 else
8684   echo "$ac_t""no" 1>&6
8685 with_tiff=no
8686 fi
8687
8688  }
8689   test -z "$with_tiff" && with_tiff=yes
8690   if test "$with_tiff" = "yes"; then
8691     { test "$extra_verbose" = "yes" && cat << \EOF
8692     Defining HAVE_TIFF
8693 EOF
8694 cat >> confdefs.h <<\EOF
8695 #define HAVE_TIFF 1
8696 EOF
8697 }
8698
8699     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8700   fi
8701 fi
8702
8703
8704 if test "$with_gtk" = "yes"; then
8705     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8706 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8707 echo "configure:8708: checking for compface.h" >&5
8708
8709 cat > conftest.$ac_ext <<EOF
8710 #line 8711 "configure"
8711 #include "confdefs.h"
8712 #include <compface.h>
8713 EOF
8714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8715 { (eval echo configure:8716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8717 if test -z "$ac_err"; then
8718   rm -rf conftest*
8719   eval "ac_cv_header_$ac_safe=yes"
8720 else
8721   echo "$ac_err" >&5
8722   echo "configure: failed program was:" >&5
8723   cat conftest.$ac_ext >&5
8724   rm -rf conftest*
8725   eval "ac_cv_header_$ac_safe=no"
8726 fi
8727 rm -f conftest*
8728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8729   echo "$ac_t""yes" 1>&6
8730   :
8731 else
8732   echo "$ac_t""no" 1>&6
8733 with_xface=no
8734 fi
8735  }
8736   test -z "$with_xface" && { 
8737 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8738 echo "configure:8739: checking for UnGenFace in -lcompface" >&5
8739 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8740
8741 xe_check_libs=" -lcompface "
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 /* Override any gcc2 internal prototype to avoid an error.  */
8746 /* We use char because int might match the return type of a gcc2
8747     builtin and then its argument prototype would still apply.  */
8748 char UnGenFace();
8749
8750 int main() {
8751 UnGenFace()
8752 ; return 0; }
8753 EOF
8754 if { (eval echo configure:8755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8755   rm -rf conftest*
8756   eval "ac_cv_lib_$ac_lib_var=yes"
8757 else
8758   echo "configure: failed program was:" >&5
8759   cat conftest.$ac_ext >&5
8760   rm -rf conftest*
8761   eval "ac_cv_lib_$ac_lib_var=no"
8762 fi
8763 rm -f conftest*
8764 xe_check_libs=""
8765
8766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8767   echo "$ac_t""yes" 1>&6
8768   : 
8769 else
8770   echo "$ac_t""no" 1>&6
8771 with_xface=no
8772 fi
8773
8774  }
8775   test -z "$with_xface" && with_xface=yes
8776   if test "$with_xface" = "yes"; then
8777     { test "$extra_verbose" = "yes" && cat << \EOF
8778     Defining HAVE_XFACE
8779 EOF
8780 cat >> confdefs.h <<\EOF
8781 #define HAVE_XFACE 1
8782 EOF
8783 }
8784
8785     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8786   fi
8787 fi
8788
8789
8790
8791 if test "$with_x11" = "yes"; then
8792   echo "checking for X11 graphics libraries" 1>&6
8793 echo "configure:8794: checking for X11 graphics libraries" >&5
8794 fi
8795
8796 if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
8797   echo "checking for the Athena widgets" 1>&6
8798 echo "configure:8799: checking for the Athena widgets" >&5
8799
8800     case "$with_athena" in
8801         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8802     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8803     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8804     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8805     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8806     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8807   esac
8808
8809     if test "$athena_3d" = "no"; then
8810     
8811 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8812 echo "configure:8813: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8813 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8814
8815 xe_check_libs=" -l$athena_variant "
8816 cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 /* Override any gcc2 internal prototype to avoid an error.  */
8820 /* We use char because int might match the return type of a gcc2
8821     builtin and then its argument prototype would still apply.  */
8822 char XawScrollbarSetThumb();
8823
8824 int main() {
8825 XawScrollbarSetThumb()
8826 ; return 0; }
8827 EOF
8828 if { (eval echo configure:8829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8829   rm -rf conftest*
8830   eval "ac_cv_lib_$ac_lib_var=yes"
8831 else
8832   echo "configure: failed program was:" >&5
8833   cat conftest.$ac_ext >&5
8834   rm -rf conftest*
8835   eval "ac_cv_lib_$ac_lib_var=no"
8836 fi
8837 rm -f conftest*
8838 xe_check_libs=""
8839
8840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8841   echo "$ac_t""yes" 1>&6
8842           
8843 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8844 echo "configure:8845: checking for threeDClassRec in -l$athena_variant" >&5
8845 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8846
8847 xe_check_libs=" -l$athena_variant "
8848 cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 /* Override any gcc2 internal prototype to avoid an error.  */
8852 /* We use char because int might match the return type of a gcc2
8853     builtin and then its argument prototype would still apply.  */
8854 char threeDClassRec();
8855
8856 int main() {
8857 threeDClassRec()
8858 ; return 0; }
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8861   rm -rf conftest*
8862   eval "ac_cv_lib_$ac_lib_var=yes"
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -rf conftest*
8867   eval "ac_cv_lib_$ac_lib_var=no"
8868 fi
8869 rm -f conftest*
8870 xe_check_libs=""
8871
8872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8873   echo "$ac_t""yes" 1>&6
8874   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8875 else
8876   echo "$ac_t""no" 1>&6
8877 athena_lib=$athena_variant
8878 fi
8879
8880
8881       
8882 else
8883   echo "$ac_t""no" 1>&6
8884 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8885 fi
8886
8887
8888   else
8889         
8890 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8891 echo "configure:8892: checking for threeDClassRec in -l$athena_variant" >&5
8892 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8893
8894 xe_check_libs=" -l$athena_variant "
8895 cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* Override any gcc2 internal prototype to avoid an error.  */
8899 /* We use char because int might match the return type of a gcc2
8900     builtin and then its argument prototype would still apply.  */
8901 char threeDClassRec();
8902
8903 int main() {
8904 threeDClassRec()
8905 ; return 0; }
8906 EOF
8907 if { (eval echo configure:8908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8908   rm -rf conftest*
8909   eval "ac_cv_lib_$ac_lib_var=yes"
8910 else
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_lib_$ac_lib_var=no"
8915 fi
8916 rm -f conftest*
8917 xe_check_libs=""
8918
8919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8920   echo "$ac_t""yes" 1>&6
8921   athena_lib=$athena_variant
8922 else
8923   echo "$ac_t""no" 1>&6
8924 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8925 echo "configure:8926: checking for threeDClassRec in -lXaw" >&5
8926 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8927
8928 xe_check_libs=" -lXaw "
8929 cat > conftest.$ac_ext <<EOF
8930 #line 8931 "configure"
8931 #include "confdefs.h"
8932 /* Override any gcc2 internal prototype to avoid an error.  */
8933 /* We use char because int might match the return type of a gcc2
8934     builtin and then its argument prototype would still apply.  */
8935 char threeDClassRec();
8936
8937 int main() {
8938 threeDClassRec()
8939 ; return 0; }
8940 EOF
8941 if { (eval echo configure:8942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8942   rm -rf conftest*
8943   eval "ac_cv_lib_$ac_lib_var=yes"
8944 else
8945   echo "configure: failed program was:" >&5
8946   cat conftest.$ac_ext >&5
8947   rm -rf conftest*
8948   eval "ac_cv_lib_$ac_lib_var=no"
8949 fi
8950 rm -f conftest*
8951 xe_check_libs=""
8952
8953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8954   echo "$ac_t""yes" 1>&6
8955   athena_lib=Xaw;
8956           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8957         
8958 else
8959   echo "$ac_t""no" 1>&6
8960 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8961 fi
8962
8963
8964 fi
8965
8966
8967   fi
8968
8969     if test "$athena_3d" = "no"; then
8970     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8971 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8972 echo "configure:8973: checking for X11/Xaw/ThreeD.h" >&5
8973
8974 cat > conftest.$ac_ext <<EOF
8975 #line 8976 "configure"
8976 #include "confdefs.h"
8977 #include <X11/Xaw/ThreeD.h>
8978 EOF
8979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8980 { (eval echo configure:8981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8982 if test -z "$ac_err"; then
8983   rm -rf conftest*
8984   eval "ac_cv_header_$ac_safe=yes"
8985 else
8986   echo "$ac_err" >&5
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -rf conftest*
8990   eval "ac_cv_header_$ac_safe=no"
8991 fi
8992 rm -f conftest*
8993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8994   echo "$ac_t""yes" 1>&6
8995   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8996 else
8997   echo "$ac_t""no" 1>&6
8998 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8999 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9000 echo "configure:9001: checking for X11/Xaw/XawInit.h" >&5
9001
9002 cat > conftest.$ac_ext <<EOF
9003 #line 9004 "configure"
9004 #include "confdefs.h"
9005 #include <X11/Xaw/XawInit.h>
9006 EOF
9007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9008 { (eval echo configure:9009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9010 if test -z "$ac_err"; then
9011   rm -rf conftest*
9012   eval "ac_cv_header_$ac_safe=yes"
9013 else
9014   echo "$ac_err" >&5
9015   echo "configure: failed program was:" >&5
9016   cat conftest.$ac_ext >&5
9017   rm -rf conftest*
9018   eval "ac_cv_header_$ac_safe=no"
9019 fi
9020 rm -f conftest*
9021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9022   echo "$ac_t""yes" 1>&6
9023   athena_h_path=X11/Xaw
9024 else
9025   echo "$ac_t""no" 1>&6
9026 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9027 fi
9028
9029 fi
9030
9031   else
9032             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9033 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9034 echo "configure:9035: checking for X11/$athena_variant/XawInit.h" >&5
9035
9036 cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 #include <X11/$athena_variant/XawInit.h>
9040 EOF
9041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9042 { (eval echo configure:9043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9044 if test -z "$ac_err"; then
9045   rm -rf conftest*
9046   eval "ac_cv_header_$ac_safe=yes"
9047 else
9048   echo "$ac_err" >&5
9049   echo "configure: failed program was:" >&5
9050   cat conftest.$ac_ext >&5
9051   rm -rf conftest*
9052   eval "ac_cv_header_$ac_safe=no"
9053 fi
9054 rm -f conftest*
9055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9056   echo "$ac_t""yes" 1>&6
9057   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9058 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9059 echo "configure:9060: checking for X11/$athena_variant/ThreeD.h" >&5
9060
9061 cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 #include <X11/$athena_variant/ThreeD.h>
9065 EOF
9066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9067 { (eval echo configure:9068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9069 if test -z "$ac_err"; then
9070   rm -rf conftest*
9071   eval "ac_cv_header_$ac_safe=yes"
9072 else
9073   echo "$ac_err" >&5
9074   echo "configure: failed program was:" >&5
9075   cat conftest.$ac_ext >&5
9076   rm -rf conftest*
9077   eval "ac_cv_header_$ac_safe=no"
9078 fi
9079 rm -f conftest*
9080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9081   echo "$ac_t""yes" 1>&6
9082   athena_h_path=X11/$athena_variant
9083 else
9084   echo "$ac_t""no" 1>&6
9085 fi
9086
9087 else
9088   echo "$ac_t""no" 1>&6
9089 fi
9090
9091
9092         if test -z "$athena_h_path"; then
9093       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9094 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9095 echo "configure:9096: checking for $athena_variant/XawInit.h" >&5
9096
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 #include <$athena_variant/XawInit.h>
9101 EOF
9102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9103 { (eval echo configure:9104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9105 if test -z "$ac_err"; then
9106   rm -rf conftest*
9107   eval "ac_cv_header_$ac_safe=yes"
9108 else
9109   echo "$ac_err" >&5
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -rf conftest*
9113   eval "ac_cv_header_$ac_safe=no"
9114 fi
9115 rm -f conftest*
9116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9117   echo "$ac_t""yes" 1>&6
9118   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9119 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9120 echo "configure:9121: checking for $athena_variant/ThreeD.h" >&5
9121
9122 cat > conftest.$ac_ext <<EOF
9123 #line 9124 "configure"
9124 #include "confdefs.h"
9125 #include <$athena_variant/ThreeD.h>
9126 EOF
9127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9128 { (eval echo configure:9129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9130 if test -z "$ac_err"; then
9131   rm -rf conftest*
9132   eval "ac_cv_header_$ac_safe=yes"
9133 else
9134   echo "$ac_err" >&5
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   eval "ac_cv_header_$ac_safe=no"
9139 fi
9140 rm -f conftest*
9141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143   athena_h_path=$athena_variant
9144 else
9145   echo "$ac_t""no" 1>&6
9146 fi
9147
9148 else
9149   echo "$ac_t""no" 1>&6
9150 fi
9151
9152     fi
9153
9154         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9155       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9156 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9157 echo "configure:9158: checking for X11/Xaw3d/XawInit.h" >&5
9158
9159 cat > conftest.$ac_ext <<EOF
9160 #line 9161 "configure"
9161 #include "confdefs.h"
9162 #include <X11/Xaw3d/XawInit.h>
9163 EOF
9164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9165 { (eval echo configure:9166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9167 if test -z "$ac_err"; then
9168   rm -rf conftest*
9169   eval "ac_cv_header_$ac_safe=yes"
9170 else
9171   echo "$ac_err" >&5
9172   echo "configure: failed program was:" >&5
9173   cat conftest.$ac_ext >&5
9174   rm -rf conftest*
9175   eval "ac_cv_header_$ac_safe=no"
9176 fi
9177 rm -f conftest*
9178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9179   echo "$ac_t""yes" 1>&6
9180   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9181 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9182 echo "configure:9183: checking for X11/Xaw3d/ThreeD.h" >&5
9183
9184 cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187 #include <X11/Xaw3d/ThreeD.h>
9188 EOF
9189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9190 { (eval echo configure:9191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9192 if test -z "$ac_err"; then
9193   rm -rf conftest*
9194   eval "ac_cv_header_$ac_safe=yes"
9195 else
9196   echo "$ac_err" >&5
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_header_$ac_safe=no"
9201 fi
9202 rm -f conftest*
9203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9204   echo "$ac_t""yes" 1>&6
9205   
9206             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9207             athena_h_path=X11/Xaw3d
9208           
9209 else
9210   echo "$ac_t""no" 1>&6
9211 fi
9212
9213 else
9214   echo "$ac_t""no" 1>&6
9215 fi
9216
9217     fi
9218
9219         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9220       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9221 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9222 echo "configure:9223: checking for Xaw3d/XawInit.h" >&5
9223
9224 cat > conftest.$ac_ext <<EOF
9225 #line 9226 "configure"
9226 #include "confdefs.h"
9227 #include <Xaw3d/XawInit.h>
9228 EOF
9229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9230 { (eval echo configure:9231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9232 if test -z "$ac_err"; then
9233   rm -rf conftest*
9234   eval "ac_cv_header_$ac_safe=yes"
9235 else
9236   echo "$ac_err" >&5
9237   echo "configure: failed program was:" >&5
9238   cat conftest.$ac_ext >&5
9239   rm -rf conftest*
9240   eval "ac_cv_header_$ac_safe=no"
9241 fi
9242 rm -f conftest*
9243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9244   echo "$ac_t""yes" 1>&6
9245   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9246 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9247 echo "configure:9248: checking for Xaw3d/ThreeD.h" >&5
9248
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 #include <Xaw3d/ThreeD.h>
9253 EOF
9254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9255 { (eval echo configure:9256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9257 if test -z "$ac_err"; then
9258   rm -rf conftest*
9259   eval "ac_cv_header_$ac_safe=yes"
9260 else
9261   echo "$ac_err" >&5
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   eval "ac_cv_header_$ac_safe=no"
9266 fi
9267 rm -f conftest*
9268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9269   echo "$ac_t""yes" 1>&6
9270   
9271             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9272             athena_h_path=Xaw3d
9273           
9274 else
9275   echo "$ac_t""no" 1>&6
9276 fi
9277
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281
9282     fi
9283
9284             if test -z "$athena_h_path"; then
9285       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9286 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9287 echo "configure:9288: checking for X11/Xaw/ThreeD.h" >&5
9288
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 #include <X11/Xaw/ThreeD.h>
9293 EOF
9294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9295 { (eval echo configure:9296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9297 if test -z "$ac_err"; then
9298   rm -rf conftest*
9299   eval "ac_cv_header_$ac_safe=yes"
9300 else
9301   echo "$ac_err" >&5
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_header_$ac_safe=no"
9306 fi
9307 rm -f conftest*
9308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9309   echo "$ac_t""yes" 1>&6
9310   
9311           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9312           athena_h_path=X11/Xaw
9313         
9314 else
9315   echo "$ac_t""no" 1>&6
9316 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9317 fi
9318
9319     fi
9320   fi
9321
9322     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9323     have_xaw=yes
9324   else
9325     have_xaw=no
9326   fi
9327
9328 else
9329   have_xaw=no
9330 fi 
9331 if test "$with_x11" = "yes"; then
9332     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9333 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9334 echo "configure:9335: checking for Xm/Xm.h" >&5
9335
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 #include <Xm/Xm.h>
9340 EOF
9341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9342 { (eval echo configure:9343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9344 if test -z "$ac_err"; then
9345   rm -rf conftest*
9346   eval "ac_cv_header_$ac_safe=yes"
9347 else
9348   echo "$ac_err" >&5
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -rf conftest*
9352   eval "ac_cv_header_$ac_safe=no"
9353 fi
9354 rm -f conftest*
9355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9356   echo "$ac_t""yes" 1>&6
9357   
9358 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9359 echo "configure:9360: checking for XmStringFree in -lXm" >&5
9360 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9361
9362 xe_check_libs=" -lXm "
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char XmStringFree();
9370
9371 int main() {
9372 XmStringFree()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 xe_check_libs=""
9386
9387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9388   echo "$ac_t""yes" 1>&6
9389   have_motif=yes
9390 else
9391   echo "$ac_t""no" 1>&6
9392 have_motif=no
9393 fi
9394
9395
9396 else
9397   echo "$ac_t""no" 1>&6
9398 have_motif=no
9399 fi
9400
9401
9402   if test "$have_motif" = "yes"; then
9403         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9404 echo "configure:9405: checking for Lesstif" >&5
9405     cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 #include <Xm/Xm.h>
9409 #ifdef LESSTIF_VERSION
9410 yes
9411 #endif
9412
9413 EOF
9414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9415   egrep "yes" >/dev/null 2>&1; then
9416   rm -rf conftest*
9417   have_lesstif=yes
9418 else
9419   rm -rf conftest*
9420   have_lesstif=no
9421 fi
9422 rm -f conftest*
9423
9424   echo "$ac_t""$have_lesstif" 1>&6
9425   fi
9426
9427 fi 
9428
9429 case "$with_menubars" in "" | "yes" | "athena" )
9430   with_menubars="lucid" ;;
9431 esac
9432 case "$with_dialogs" in "" | "yes" | "lucid" )
9433   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9434   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9435   else with_dialogs=no
9436   fi ;;
9437 esac
9438 case "$with_scrollbars" in "" | "yes" )
9439   with_scrollbars="lucid" ;;
9440 esac
9441 case "$with_widgets" in "" | "yes" | "lucid")
9442   if   test "$have_motif" = "yes"; then with_widgets="motif"
9443   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9444   else with_widgets=no
9445   fi ;;
9446 esac
9447
9448 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9449
9450 case "$all_widgets" in
9451   *athena* )
9452     if test "$have_xaw" != "yes"; then
9453       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9454     fi
9455
9456         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9457
9458         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9459
9460                     { test "$extra_verbose" = "yes" && cat << EOF
9461     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9462 EOF
9463 cat >> confdefs.h <<EOF
9464 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9465 EOF
9466 }
9467
9468     { test "$extra_verbose" = "yes" && cat << EOF
9469     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9470 EOF
9471 cat >> confdefs.h <<EOF
9472 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9473 EOF
9474 }
9475
9476     { test "$extra_verbose" = "yes" && cat << EOF
9477     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9478 EOF
9479 cat >> confdefs.h <<EOF
9480 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9481 EOF
9482 }
9483
9484     { test "$extra_verbose" = "yes" && cat << EOF
9485     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9486 EOF
9487 cat >> confdefs.h <<EOF
9488 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9489 EOF
9490 }
9491
9492     { test "$extra_verbose" = "yes" && cat << EOF
9493     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9494 EOF
9495 cat >> confdefs.h <<EOF
9496 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9497 EOF
9498 }
9499
9500     { test "$extra_verbose" = "yes" && cat << EOF
9501     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9502 EOF
9503 cat >> confdefs.h <<EOF
9504 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9505 EOF
9506 }
9507
9508     { test "$extra_verbose" = "yes" && cat << EOF
9509     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9510 EOF
9511 cat >> confdefs.h <<EOF
9512 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9513 EOF
9514 }
9515
9516     { test "$extra_verbose" = "yes" && cat << EOF
9517     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9518 EOF
9519 cat >> confdefs.h <<EOF
9520 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9521 EOF
9522 }
9523
9524     { test "$extra_verbose" = "yes" && cat << EOF
9525     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9526 EOF
9527 cat >> confdefs.h <<EOF
9528 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9529 EOF
9530 }
9531
9532     { test "$extra_verbose" = "yes" && cat << EOF
9533     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9534 EOF
9535 cat >> confdefs.h <<EOF
9536 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9537 EOF
9538 }
9539
9540
9541     { test "$extra_verbose" = "yes" && cat << \EOF
9542     Defining LWLIB_USES_ATHENA
9543 EOF
9544 cat >> confdefs.h <<\EOF
9545 #define LWLIB_USES_ATHENA 1
9546 EOF
9547 }
9548
9549     { test "$extra_verbose" = "yes" && cat << \EOF
9550     Defining NEED_ATHENA
9551 EOF
9552 cat >> confdefs.h <<\EOF
9553 #define NEED_ATHENA 1
9554 EOF
9555 }
9556
9557     need_athena="yes"
9558
9559     if test "$athena_3d" = "yes"; then
9560       { test "$extra_verbose" = "yes" && cat << \EOF
9561     Defining HAVE_ATHENA_3D
9562 EOF
9563 cat >> confdefs.h <<\EOF
9564 #define HAVE_ATHENA_3D 1
9565 EOF
9566 }
9567
9568     fi
9569   ;;
9570 esac
9571
9572 case "$all_widgets" in *motif* )
9573   { test "$extra_verbose" = "yes" && cat << \EOF
9574     Defining LWLIB_USES_MOTIF
9575 EOF
9576 cat >> confdefs.h <<\EOF
9577 #define LWLIB_USES_MOTIF 1
9578 EOF
9579 }
9580
9581   { test "$extra_verbose" = "yes" && cat << \EOF
9582     Defining NEED_MOTIF
9583 EOF
9584 cat >> confdefs.h <<\EOF
9585 #define NEED_MOTIF 1
9586 EOF
9587 }
9588
9589   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9590   need_motif=yes ;;
9591 esac
9592
9593 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9594 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9595 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9596 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9597         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9598 case "$with_widgets" in athena* )
9599         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;;
9600 esac
9601 case "$all_widgets" in *lucid* )
9602   { test "$extra_verbose" = "yes" && cat << \EOF
9603     Defining NEED_LUCID
9604 EOF
9605 cat >> confdefs.h <<\EOF
9606 #define NEED_LUCID 1
9607 EOF
9608 }
9609
9610   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9611 esac
9612
9613
9614
9615 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9616     Defining LWLIB_SCROLLBARS_ATHENA
9617 EOF
9618 cat >> confdefs.h <<\EOF
9619 #define LWLIB_SCROLLBARS_ATHENA 1
9620 EOF
9621 }
9622
9623 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9624     Defining LWLIB_DIALOGS_ATHENA
9625 EOF
9626 cat >> confdefs.h <<\EOF
9627 #define LWLIB_DIALOGS_ATHENA 1
9628 EOF
9629 }
9630
9631
9632 if test "$athena_3d" = "yes"; then
9633   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9634     Defining LWLIB_SCROLLBARS_ATHENA3D
9635 EOF
9636 cat >> confdefs.h <<\EOF
9637 #define LWLIB_SCROLLBARS_ATHENA3D 1
9638 EOF
9639 }
9640
9641   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9642     Defining LWLIB_DIALOGS_ATHENA3D
9643 EOF
9644 cat >> confdefs.h <<\EOF
9645 #define LWLIB_DIALOGS_ATHENA3D 1
9646 EOF
9647 }
9648
9649 fi
9650
9651 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9652     Defining LWLIB_WIDGETS_ATHENA
9653 EOF
9654 cat >> confdefs.h <<\EOF
9655 #define LWLIB_WIDGETS_ATHENA 1
9656 EOF
9657 }
9658 ;; esac
9659 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9660         { test "$extra_verbose" = "yes" && cat << \EOF
9661     Defining LWLIB_TABS_LUCID
9662 EOF
9663 cat >> confdefs.h <<\EOF
9664 #define LWLIB_TABS_LUCID 1
9665 EOF
9666 }
9667
9668
9669 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9670     Defining HAVE_MENUBARS
9671 EOF
9672 cat >> confdefs.h <<\EOF
9673 #define HAVE_MENUBARS 1
9674 EOF
9675 }
9676
9677 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9678     Defining HAVE_SCROLLBARS
9679 EOF
9680 cat >> confdefs.h <<\EOF
9681 #define HAVE_SCROLLBARS 1
9682 EOF
9683 }
9684
9685 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9686     Defining HAVE_DIALOGS
9687 EOF
9688 cat >> confdefs.h <<\EOF
9689 #define HAVE_DIALOGS 1
9690 EOF
9691 }
9692
9693 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9694     Defining HAVE_TOOLBARS
9695 EOF
9696 cat >> confdefs.h <<\EOF
9697 #define HAVE_TOOLBARS 1
9698 EOF
9699 }
9700
9701 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9702     Defining HAVE_WIDGETS
9703 EOF
9704 cat >> confdefs.h <<\EOF
9705 #define HAVE_WIDGETS 1
9706 EOF
9707 }
9708
9709
9710 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9711     Defining LWLIB_MENUBARS_LUCID
9712 EOF
9713 cat >> confdefs.h <<\EOF
9714 #define LWLIB_MENUBARS_LUCID 1
9715 EOF
9716 }
9717
9718 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9719     Defining LWLIB_SCROLLBARS_LUCID
9720 EOF
9721 cat >> confdefs.h <<\EOF
9722 #define LWLIB_SCROLLBARS_LUCID 1
9723 EOF
9724 }
9725
9726
9727 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9728     Defining LWLIB_MENUBARS_MOTIF
9729 EOF
9730 cat >> confdefs.h <<\EOF
9731 #define LWLIB_MENUBARS_MOTIF 1
9732 EOF
9733 }
9734
9735 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9736     Defining LWLIB_SCROLLBARS_MOTIF
9737 EOF
9738 cat >> confdefs.h <<\EOF
9739 #define LWLIB_SCROLLBARS_MOTIF 1
9740 EOF
9741 }
9742
9743 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9744     Defining LWLIB_DIALOGS_MOTIF
9745 EOF
9746 cat >> confdefs.h <<\EOF
9747 #define LWLIB_DIALOGS_MOTIF 1
9748 EOF
9749 }
9750
9751 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9752     Defining LWLIB_WIDGETS_MOTIF
9753 EOF
9754 cat >> confdefs.h <<\EOF
9755 #define LWLIB_WIDGETS_MOTIF 1
9756 EOF
9757 }
9758
9759
9760 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9761    echo "    xemacs will be linked with \"menubar.o\""
9762  fi
9763 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9764    echo "    xemacs will be linked with \"scrollbar.o\""
9765  fi
9766 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9767    echo "    xemacs will be linked with \"dialog.o\""
9768  fi
9769 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9770    echo "    xemacs will be linked with \"toolbar.o\""
9771  fi
9772
9773 if test "$with_gtk" = "yes"; then
9774   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9775    echo "    xemacs will be linked with \"menubar-gtk.o\""
9776  fi
9777   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9778    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9779  fi
9780   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9781    echo "    xemacs will be linked with \"dialog-gtk.o\""
9782  fi
9783   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9784    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9785  fi
9786   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9787    echo "    xemacs will be linked with \"gui-gtk.o\""
9788  fi
9789 fi
9790
9791 if test "$with_x11" = "yes"; then
9792   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9793    echo "    xemacs will be linked with \"menubar-x.o\""
9794  fi
9795   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9796    echo "    xemacs will be linked with \"scrollbar-x.o\""
9797  fi
9798   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9799    echo "    xemacs will be linked with \"dialog-x.o\""
9800  fi
9801   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9802    echo "    xemacs will be linked with \"toolbar-x.o\""
9803  fi
9804   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9805    echo "    xemacs will be linked with \"gui-x.o\""
9806  fi
9807 fi
9808
9809
9810 test -z "$with_mule" && with_mule=no
9811 test -z "$with_file_coding" && with_file_coding=no
9812
9813
9814 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9815   { test "$extra_verbose" = "yes" && cat << \EOF
9816     Defining FILE_CODING
9817 EOF
9818 cat >> confdefs.h <<\EOF
9819 #define FILE_CODING 1
9820 EOF
9821 }
9822
9823   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9824    echo "    xemacs will be linked with \"file-coding.o\""
9825  fi
9826 fi
9827
9828 if test "$with_mule" = "yes" ; then
9829   echo "checking for Mule-related features" 1>&6
9830 echo "configure:9831: checking for Mule-related features" >&5
9831   { test "$extra_verbose" = "yes" && cat << \EOF
9832     Defining MULE
9833 EOF
9834 cat >> confdefs.h <<\EOF
9835 #define MULE 1
9836 EOF
9837 }
9838
9839   { test "$extra_verbose" = "yes" && cat << \EOF
9840     Defining FILE_CODING
9841 EOF
9842 cat >> confdefs.h <<\EOF
9843 #define FILE_CODING 1
9844 EOF
9845 }
9846
9847   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9848    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9849  fi
9850   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9851     { test "$extra_verbose" = "yes" && cat << \EOF
9852     Defining TEXT_CODING
9853 EOF
9854 cat >> confdefs.h <<\EOF
9855 #define TEXT_CODING 1
9856 EOF
9857 }
9858
9859     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9860    echo "    xemacs will be linked with \"text-coding.o\""
9861  fi
9862   else
9863     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9864    echo "    xemacs will be linked with \"file-coding.o\""
9865  fi
9866   fi
9867     for ac_hdr in libintl.h
9868 do
9869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9871 echo "configure:9872: checking for $ac_hdr" >&5
9872
9873 cat > conftest.$ac_ext <<EOF
9874 #line 9875 "configure"
9875 #include "confdefs.h"
9876 #include <$ac_hdr>
9877 EOF
9878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9879 { (eval echo configure:9880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9881 if test -z "$ac_err"; then
9882   rm -rf conftest*
9883   eval "ac_cv_header_$ac_safe=yes"
9884 else
9885   echo "$ac_err" >&5
9886   echo "configure: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888   rm -rf conftest*
9889   eval "ac_cv_header_$ac_safe=no"
9890 fi
9891 rm -f conftest*
9892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9893   echo "$ac_t""yes" 1>&6
9894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9895   { test "$extra_verbose" = "yes" && cat << EOF
9896     Defining $ac_tr_hdr
9897 EOF
9898 cat >> confdefs.h <<EOF
9899 #define $ac_tr_hdr 1
9900 EOF
9901 }
9902  
9903 else
9904   echo "$ac_t""no" 1>&6
9905 fi
9906 done
9907
9908   
9909 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9910 echo "configure:9911: checking for strerror in -lintl" >&5
9911 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9912
9913 xe_check_libs=" -lintl "
9914 cat > conftest.$ac_ext <<EOF
9915 #line 9916 "configure"
9916 #include "confdefs.h"
9917 /* Override any gcc2 internal prototype to avoid an error.  */
9918 /* We use char because int might match the return type of a gcc2
9919     builtin and then its argument prototype would still apply.  */
9920 char strerror();
9921
9922 int main() {
9923 strerror()
9924 ; return 0; }
9925 EOF
9926 if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9927   rm -rf conftest*
9928   eval "ac_cv_lib_$ac_lib_var=yes"
9929 else
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   eval "ac_cv_lib_$ac_lib_var=no"
9934 fi
9935 rm -f conftest*
9936 xe_check_libs=""
9937
9938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9939   echo "$ac_t""yes" 1>&6
9940     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9941     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9942   { test "$extra_verbose" = "yes" && cat << EOF
9943     Defining $ac_tr_lib
9944 EOF
9945 cat >> confdefs.h <<EOF
9946 #define $ac_tr_lib 1
9947 EOF
9948 }
9949
9950   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9951
9952 else
9953   echo "$ac_t""no" 1>&6
9954 fi
9955
9956
9957
9958   if test "$with_utf_2000" = "yes" ; then
9959     { test "$extra_verbose" = "yes" && cat << \EOF
9960     Defining CHAR_IS_UCS4
9961 EOF
9962 cat >> confdefs.h <<\EOF
9963 #define CHAR_IS_UCS4 1
9964 EOF
9965 }
9966
9967     { test "$extra_verbose" = "yes" && cat << \EOF
9968     Defining UTF2000
9969 EOF
9970 cat >> confdefs.h <<\EOF
9971 #define UTF2000 1
9972 EOF
9973 }
9974
9975   fi
9976
9977   echo "checking for Mule input methods" 1>&6
9978 echo "configure:9979: checking for Mule input methods" >&5
9979         case "$with_xim" in "" | "yes" )
9980     echo "checking for XIM" 1>&6
9981 echo "configure:9982: checking for XIM" >&5
9982     
9983 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9984 echo "configure:9985: checking for XOpenIM in -lX11" >&5
9985 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9986
9987 xe_check_libs=" -lX11 "
9988 cat > conftest.$ac_ext <<EOF
9989 #line 9990 "configure"
9990 #include "confdefs.h"
9991 /* Override any gcc2 internal prototype to avoid an error.  */
9992 /* We use char because int might match the return type of a gcc2
9993     builtin and then its argument prototype would still apply.  */
9994 char XOpenIM();
9995
9996 int main() {
9997 XOpenIM()
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10001   rm -rf conftest*
10002   eval "ac_cv_lib_$ac_lib_var=yes"
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   eval "ac_cv_lib_$ac_lib_var=no"
10008 fi
10009 rm -f conftest*
10010 xe_check_libs=""
10011
10012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10013   echo "$ac_t""yes" 1>&6
10014   with_xim=xlib
10015 else
10016   echo "$ac_t""no" 1>&6
10017 with_xim=no
10018 fi
10019
10020
10021         if test "$have_motif $have_lesstif" = "yes no"; then
10022       
10023 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10024 echo "configure:10025: checking for XmImMbLookupString in -lXm" >&5
10025 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10026
10027 xe_check_libs=" -lXm "
10028 cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 /* Override any gcc2 internal prototype to avoid an error.  */
10032 /* We use char because int might match the return type of a gcc2
10033     builtin and then its argument prototype would still apply.  */
10034 char XmImMbLookupString();
10035
10036 int main() {
10037 XmImMbLookupString()
10038 ; return 0; }
10039 EOF
10040 if { (eval echo configure:10041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=yes"
10043 else
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   eval "ac_cv_lib_$ac_lib_var=no"
10048 fi
10049 rm -f conftest*
10050 xe_check_libs=""
10051
10052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10053   echo "$ac_t""yes" 1>&6
10054   with_xim=motif
10055 else
10056   echo "$ac_t""no" 1>&6
10057 fi
10058
10059
10060     fi ;;
10061   esac
10062   if test "$with_xim" != "no"; then
10063     { test "$extra_verbose" = "yes" && cat << \EOF
10064     Defining HAVE_XIM
10065 EOF
10066 cat >> confdefs.h <<\EOF
10067 #define HAVE_XIM 1
10068 EOF
10069 }
10070
10071     if test "$with_xim" = "xlib"; then
10072       { test "$extra_verbose" = "yes" && cat << \EOF
10073     Defining XIM_XLIB
10074 EOF
10075 cat >> confdefs.h <<\EOF
10076 #define XIM_XLIB 1
10077 EOF
10078 }
10079
10080       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10081    echo "    xemacs will be linked with \"input-method-xlib.o\""
10082  fi
10083     fi
10084     if test "$with_xim" = "motif"; then
10085       { test "$extra_verbose" = "yes" && cat << \EOF
10086     Defining XIM_MOTIF
10087 EOF
10088 cat >> confdefs.h <<\EOF
10089 #define XIM_MOTIF 1
10090 EOF
10091 }
10092
10093       need_motif=yes
10094       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10095    echo "    xemacs will be linked with \"input-method-motif.o\""
10096  fi
10097     fi
10098     if test "$with_xim" = "motif"; then
10099       with_xfs=no
10100     fi
10101   fi
10102
10103     if test "$with_xfs" = "yes" ; then
10104     echo "checking for XFontSet" 1>&6
10105 echo "configure:10106: checking for XFontSet" >&5
10106     
10107 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10108 echo "configure:10109: checking for XmbDrawString in -lX11" >&5
10109 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10110
10111 xe_check_libs=" -lX11 "
10112 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 /* Override any gcc2 internal prototype to avoid an error.  */
10116 /* We use char because int might match the return type of a gcc2
10117     builtin and then its argument prototype would still apply.  */
10118 char XmbDrawString();
10119
10120 int main() {
10121 XmbDrawString()
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=yes"
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_lib_$ac_lib_var=no"
10132 fi
10133 rm -f conftest*
10134 xe_check_libs=""
10135
10136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10137   echo "$ac_t""yes" 1>&6
10138   :
10139 else
10140   echo "$ac_t""no" 1>&6
10141 with_xfs=no
10142 fi
10143
10144
10145     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10146       { test "$extra_verbose" = "yes" && cat << \EOF
10147     Defining USE_XFONTSET
10148 EOF
10149 cat >> confdefs.h <<\EOF
10150 #define USE_XFONTSET 1
10151 EOF
10152 }
10153
10154       if test "$with_xim" = "no" ; then
10155         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10156    echo "    xemacs will be linked with \"input-method-xlib.o\""
10157  fi
10158       fi
10159     fi
10160   fi 
10161     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10162   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10163 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10164 echo "configure:10165: checking for wnn/jllib.h" >&5
10165
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 #include <wnn/jllib.h>
10170 EOF
10171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10172 { (eval echo configure:10173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10174 if test -z "$ac_err"; then
10175   rm -rf conftest*
10176   eval "ac_cv_header_$ac_safe=yes"
10177 else
10178   echo "$ac_err" >&5
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_header_$ac_safe=no"
10183 fi
10184 rm -f conftest*
10185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187   :
10188 else
10189   echo "$ac_t""no" 1>&6
10190 with_wnn=no
10191 fi
10192  }
10193     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10194 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10195 echo "configure:10196: checking for wnn/commonhd.h" >&5
10196
10197 cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 #include <wnn/commonhd.h>
10201 EOF
10202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10203 { (eval echo configure:10204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10205 if test -z "$ac_err"; then
10206   rm -rf conftest*
10207   eval "ac_cv_header_$ac_safe=yes"
10208 else
10209   echo "$ac_err" >&5
10210   echo "configure: failed program was:" >&5
10211   cat conftest.$ac_ext >&5
10212   rm -rf conftest*
10213   eval "ac_cv_header_$ac_safe=no"
10214 fi
10215 rm -f conftest*
10216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10217   echo "$ac_t""yes" 1>&6
10218   :
10219 else
10220   echo "$ac_t""no" 1>&6
10221 with_wnn=no
10222 fi
10223  }
10224     if test "$with_wnn" != "no"; then
10225     for ac_func in crypt
10226 do
10227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10228 echo "configure:10229: checking for $ac_func" >&5
10229
10230 cat > conftest.$ac_ext <<EOF
10231 #line 10232 "configure"
10232 #include "confdefs.h"
10233 /* System header to define __stub macros and hopefully few prototypes,
10234     which can conflict with char $ac_func(); below.  */
10235 #include <assert.h>
10236 /* Override any gcc2 internal prototype to avoid an error.  */
10237 /* We use char because int might match the return type of a gcc2
10238     builtin and then its argument prototype would still apply.  */
10239 char $ac_func();
10240
10241 int main() {
10242
10243 /* The GNU C library defines this for functions which it implements
10244     to always fail with ENOSYS.  Some functions are actually named
10245     something starting with __ and the normal name is an alias.  */
10246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10247 choke me
10248 #else
10249 $ac_func();
10250 #endif
10251
10252 ; return 0; }
10253 EOF
10254 if { (eval echo configure:10255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10255   rm -rf conftest*
10256   eval "ac_cv_func_$ac_func=yes"
10257 else
10258   echo "configure: failed program was:" >&5
10259   cat conftest.$ac_ext >&5
10260   rm -rf conftest*
10261   eval "ac_cv_func_$ac_func=no"
10262 fi
10263 rm -f conftest*
10264
10265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10266   echo "$ac_t""yes" 1>&6
10267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10268   { test "$extra_verbose" = "yes" && cat << EOF
10269     Defining $ac_tr_func
10270 EOF
10271 cat >> confdefs.h <<EOF
10272 #define $ac_tr_func 1
10273 EOF
10274 }
10275  
10276 else
10277   echo "$ac_t""no" 1>&6
10278 fi
10279 done
10280
10281     test "$ac_cv_func_crypt" != "yes" && { 
10282 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10283 echo "configure:10284: checking for crypt in -lcrypt" >&5
10284 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10285
10286 xe_check_libs=" -lcrypt "
10287 cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290 /* Override any gcc2 internal prototype to avoid an error.  */
10291 /* We use char because int might match the return type of a gcc2
10292     builtin and then its argument prototype would still apply.  */
10293 char crypt();
10294
10295 int main() {
10296 crypt()
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10300   rm -rf conftest*
10301   eval "ac_cv_lib_$ac_lib_var=yes"
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_lib_$ac_lib_var=no"
10307 fi
10308 rm -f conftest*
10309 xe_check_libs=""
10310
10311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10312   echo "$ac_t""yes" 1>&6
10313     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10315   { test "$extra_verbose" = "yes" && cat << EOF
10316     Defining $ac_tr_lib
10317 EOF
10318 cat >> confdefs.h <<EOF
10319 #define $ac_tr_lib 1
10320 EOF
10321 }
10322
10323   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10324
10325 else
10326   echo "$ac_t""no" 1>&6
10327 fi
10328
10329  }
10330   fi
10331     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10332     
10333 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10334 echo "configure:10335: checking for jl_dic_list_e in -lwnn" >&5
10335 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10336
10337 xe_check_libs=" -lwnn "
10338 cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341 /* Override any gcc2 internal prototype to avoid an error.  */
10342 /* We use char because int might match the return type of a gcc2
10343     builtin and then its argument prototype would still apply.  */
10344 char jl_dic_list_e();
10345
10346 int main() {
10347 jl_dic_list_e()
10348 ; return 0; }
10349 EOF
10350 if { (eval echo configure:10351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10351   rm -rf conftest*
10352   eval "ac_cv_lib_$ac_lib_var=yes"
10353 else
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   eval "ac_cv_lib_$ac_lib_var=no"
10358 fi
10359 rm -f conftest*
10360 xe_check_libs=""
10361
10362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10363   echo "$ac_t""yes" 1>&6
10364   libwnn=wnn
10365 else
10366   echo "$ac_t""no" 1>&6
10367 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10368 echo "configure:10369: checking for jl_dic_list_e in -lwnn4" >&5
10369 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10370
10371 xe_check_libs=" -lwnn4 "
10372 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375 /* Override any gcc2 internal prototype to avoid an error.  */
10376 /* We use char because int might match the return type of a gcc2
10377     builtin and then its argument prototype would still apply.  */
10378 char jl_dic_list_e();
10379
10380 int main() {
10381 jl_dic_list_e()
10382 ; return 0; }
10383 EOF
10384 if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10385   rm -rf conftest*
10386   eval "ac_cv_lib_$ac_lib_var=yes"
10387 else
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -rf conftest*
10391   eval "ac_cv_lib_$ac_lib_var=no"
10392 fi
10393 rm -f conftest*
10394 xe_check_libs=""
10395
10396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10397   echo "$ac_t""yes" 1>&6
10398   libwnn=wnn4
10399 else
10400   echo "$ac_t""no" 1>&6
10401 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10402 echo "configure:10403: checking for jl_dic_list_e in -lwnn6" >&5
10403 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10404
10405 xe_check_libs=" -lwnn6 "
10406 cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 /* Override any gcc2 internal prototype to avoid an error.  */
10410 /* We use char because int might match the return type of a gcc2
10411     builtin and then its argument prototype would still apply.  */
10412 char jl_dic_list_e();
10413
10414 int main() {
10415 jl_dic_list_e()
10416 ; return 0; }
10417 EOF
10418 if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10419   rm -rf conftest*
10420   eval "ac_cv_lib_$ac_lib_var=yes"
10421 else
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -rf conftest*
10425   eval "ac_cv_lib_$ac_lib_var=no"
10426 fi
10427 rm -f conftest*
10428 xe_check_libs=""
10429
10430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10431   echo "$ac_t""yes" 1>&6
10432   libwnn=wnn6
10433 else
10434   echo "$ac_t""no" 1>&6
10435 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10436 echo "configure:10437: checking for dic_list_e in -lwnn6_fromsrc" >&5
10437 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10438
10439 xe_check_libs=" -lwnn6_fromsrc "
10440 cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443 /* Override any gcc2 internal prototype to avoid an error.  */
10444 /* We use char because int might match the return type of a gcc2
10445     builtin and then its argument prototype would still apply.  */
10446 char dic_list_e();
10447
10448 int main() {
10449 dic_list_e()
10450 ; return 0; }
10451 EOF
10452 if { (eval echo configure:10453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10453   rm -rf conftest*
10454   eval "ac_cv_lib_$ac_lib_var=yes"
10455 else
10456   echo "configure: failed program was:" >&5
10457   cat conftest.$ac_ext >&5
10458   rm -rf conftest*
10459   eval "ac_cv_lib_$ac_lib_var=no"
10460 fi
10461 rm -f conftest*
10462 xe_check_libs=""
10463
10464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10465   echo "$ac_t""yes" 1>&6
10466   libwnn=wnn6_fromsrc
10467 else
10468   echo "$ac_t""no" 1>&6
10469 with_wnn=no
10470 fi
10471
10472
10473 fi
10474
10475
10476 fi
10477
10478
10479 fi
10480
10481
10482   fi
10483   test -z "$with_wnn" && with_wnn=yes
10484   if test "$with_wnn" = "yes"; then
10485     { test "$extra_verbose" = "yes" && cat << \EOF
10486     Defining HAVE_WNN
10487 EOF
10488 cat >> confdefs.h <<\EOF
10489 #define HAVE_WNN 1
10490 EOF
10491 }
10492
10493     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10494     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10495    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10496  fi
10497     if test "$with_wnn6" != "no"; then
10498       
10499 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10500 echo "configure:10501: checking for jl_fi_dic_list in -l$libwnn" >&5
10501 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10502
10503 xe_check_libs=" -l$libwnn "
10504 cat > conftest.$ac_ext <<EOF
10505 #line 10506 "configure"
10506 #include "confdefs.h"
10507 /* Override any gcc2 internal prototype to avoid an error.  */
10508 /* We use char because int might match the return type of a gcc2
10509     builtin and then its argument prototype would still apply.  */
10510 char jl_fi_dic_list();
10511
10512 int main() {
10513 jl_fi_dic_list()
10514 ; return 0; }
10515 EOF
10516 if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10517   rm -rf conftest*
10518   eval "ac_cv_lib_$ac_lib_var=yes"
10519 else
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -rf conftest*
10523   eval "ac_cv_lib_$ac_lib_var=no"
10524 fi
10525 rm -f conftest*
10526 xe_check_libs=""
10527
10528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10529   echo "$ac_t""yes" 1>&6
10530   with_wnn6=yes
10531 else
10532   echo "$ac_t""no" 1>&6
10533 fi
10534
10535
10536       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10537     Defining WNN6
10538 EOF
10539 cat >> confdefs.h <<\EOF
10540 #define WNN6 1
10541 EOF
10542 }
10543
10544     fi
10545   fi
10546
10547     canna_includes_found=no
10548   if test "$with_canna" != "no"; then
10549     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10550 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10551 echo "configure:10552: checking for canna/jrkanji.h" >&5
10552
10553 cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 #include <canna/jrkanji.h>
10557 EOF
10558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10559 { (eval echo configure:10560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10561 if test -z "$ac_err"; then
10562   rm -rf conftest*
10563   eval "ac_cv_header_$ac_safe=yes"
10564 else
10565   echo "$ac_err" >&5
10566   echo "configure: failed program was:" >&5
10567   cat conftest.$ac_ext >&5
10568   rm -rf conftest*
10569   eval "ac_cv_header_$ac_safe=no"
10570 fi
10571 rm -f conftest*
10572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10573   echo "$ac_t""yes" 1>&6
10574   canna_includes_found=yes
10575 else
10576   echo "$ac_t""no" 1>&6
10577 fi
10578
10579   fi
10580   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10581       -d "/usr/local/canna/include"; then
10582     save_c_switch_site="$c_switch_site"
10583     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10584     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10585 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10586 echo "configure:10587: checking for canna/jrkanji.h" >&5
10587
10588 cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591 #include <canna/jrkanji.h>
10592 EOF
10593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10594 { (eval echo configure:10595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10596 if test -z "$ac_err"; then
10597   rm -rf conftest*
10598   eval "ac_cv_header_$ac_safe=yes"
10599 else
10600   echo "$ac_err" >&5
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -rf conftest*
10604   eval "ac_cv_header_$ac_safe=no"
10605 fi
10606 rm -f conftest*
10607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10608   echo "$ac_t""yes" 1>&6
10609   canna_includes_found=yes
10610 else
10611   echo "$ac_t""no" 1>&6
10612 fi
10613
10614     if test "$canna_includes_found" != "yes"; then
10615       c_switch_site="$save_c_switch_site"
10616       with_canna="no"
10617     fi
10618   fi
10619
10620   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10621 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10622 echo "configure:10623: checking for canna/RK.h" >&5
10623
10624 cat > conftest.$ac_ext <<EOF
10625 #line 10626 "configure"
10626 #include "confdefs.h"
10627 #include <canna/RK.h>
10628 EOF
10629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10630 { (eval echo configure:10631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10632 if test -z "$ac_err"; then
10633   rm -rf conftest*
10634   eval "ac_cv_header_$ac_safe=yes"
10635 else
10636   echo "$ac_err" >&5
10637   echo "configure: failed program was:" >&5
10638   cat conftest.$ac_ext >&5
10639   rm -rf conftest*
10640   eval "ac_cv_header_$ac_safe=no"
10641 fi
10642 rm -f conftest*
10643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10644   echo "$ac_t""yes" 1>&6
10645   :
10646 else
10647   echo "$ac_t""no" 1>&6
10648 with_canna=no
10649 fi
10650  }
10651   test -z "$with_canna" && { 
10652 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10653 echo "configure:10654: checking for RkBgnBun in -lRKC" >&5
10654 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10655
10656 xe_check_libs=" -lRKC "
10657 cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 /* Override any gcc2 internal prototype to avoid an error.  */
10661 /* We use char because int might match the return type of a gcc2
10662     builtin and then its argument prototype would still apply.  */
10663 char RkBgnBun();
10664
10665 int main() {
10666 RkBgnBun()
10667 ; return 0; }
10668 EOF
10669 if { (eval echo configure:10670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10670   rm -rf conftest*
10671   eval "ac_cv_lib_$ac_lib_var=yes"
10672 else
10673   echo "configure: failed program was:" >&5
10674   cat conftest.$ac_ext >&5
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=no"
10677 fi
10678 rm -f conftest*
10679 xe_check_libs=""
10680
10681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10682   echo "$ac_t""yes" 1>&6
10683   :
10684 else
10685   echo "$ac_t""no" 1>&6
10686 with_canna=no
10687 fi
10688
10689  }
10690   test -z "$with_canna" && { 
10691 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10692 echo "configure:10693: checking for jrKanjiControl in -lcanna" >&5
10693 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10694
10695 xe_check_libs=" -lcanna "
10696 cat > conftest.$ac_ext <<EOF
10697 #line 10698 "configure"
10698 #include "confdefs.h"
10699 /* Override any gcc2 internal prototype to avoid an error.  */
10700 /* We use char because int might match the return type of a gcc2
10701     builtin and then its argument prototype would still apply.  */
10702 char jrKanjiControl();
10703
10704 int main() {
10705 jrKanjiControl()
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10709   rm -rf conftest*
10710   eval "ac_cv_lib_$ac_lib_var=yes"
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   eval "ac_cv_lib_$ac_lib_var=no"
10716 fi
10717 rm -f conftest*
10718 xe_check_libs=""
10719
10720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10721   echo "$ac_t""yes" 1>&6
10722   :
10723 else
10724   echo "$ac_t""no" 1>&6
10725 with_canna=no
10726 fi
10727
10728  }
10729   test -z "$with_canna" && with_canna=yes
10730   if test "$with_canna" = "yes"; then
10731     { test "$extra_verbose" = "yes" && cat << \EOF
10732     Defining HAVE_CANNA
10733 EOF
10734 cat >> confdefs.h <<\EOF
10735 #define HAVE_CANNA 1
10736 EOF
10737 }
10738
10739     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10740     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10741    echo "    xemacs will be linked with \"mule-canna.o\""
10742  fi
10743   fi
10744
10745 else   for feature in xim canna wnn; do
10746     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10747       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10748     fi
10749     eval "with_${feature}=no"
10750   done
10751 fi 
10752
10753 if test "$need_motif" = "yes" ; then
10754   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10755     
10756 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10757 echo "configure:10758: checking for layout_object_getvalue in -li18n" >&5
10758 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10759
10760 xe_check_libs=" -li18n "
10761 cat > conftest.$ac_ext <<EOF
10762 #line 10763 "configure"
10763 #include "confdefs.h"
10764 /* Override any gcc2 internal prototype to avoid an error.  */
10765 /* We use char because int might match the return type of a gcc2
10766     builtin and then its argument prototype would still apply.  */
10767 char layout_object_getvalue();
10768
10769 int main() {
10770 layout_object_getvalue()
10771 ; return 0; }
10772 EOF
10773 if { (eval echo configure:10774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10774   rm -rf conftest*
10775   eval "ac_cv_lib_$ac_lib_var=yes"
10776 else
10777   echo "configure: failed program was:" >&5
10778   cat conftest.$ac_ext >&5
10779   rm -rf conftest*
10780   eval "ac_cv_lib_$ac_lib_var=no"
10781 fi
10782 rm -f conftest*
10783 xe_check_libs=""
10784
10785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10786   echo "$ac_t""yes" 1>&6
10787   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10788 else
10789   echo "$ac_t""no" 1>&6
10790 fi
10791
10792
10793   
10794 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10795     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10796   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10797   
10798         runpath="" runpath_dirs=""
10799   if test -n "$LD_RUN_PATH"; then
10800     runpath="$LD_RUN_PATH"
10801   elif test "$GCC" = "yes"; then
10802         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10803     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10804     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10805     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10806       case "$arg" in P,* | -L* | -R* )
10807         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10808           {
10809 xe_runpath_dir="$dir"
10810   test "$xe_runpath_dir" != "/lib"     -a \
10811         "$xe_runpath_dir" != "/usr/lib" -a \
10812         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10813   eval "$xe_add_unique_runpath_dir"
10814 }
10815         done ;;
10816       esac
10817     done
10818     ld_switch_run="$ld_switch_run_save"
10819     rm -f conftest*
10820   else
10821         for arg in $ld_switch_site $ld_switch_x_site; do
10822       case "$arg" in -L*) {
10823 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10824   test "$xe_runpath_dir" != "/lib"     -a \
10825         "$xe_runpath_dir" != "/usr/lib" -a \
10826         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10827   eval "$xe_add_unique_runpath_dir"
10828 };; esac
10829     done
10830         if test "$opsys $need_motif" = "sol2 yes"; then
10831       xe_runpath_dir="/opt/SUNWdt/lib";
10832       eval "$xe_add_unique_runpath_dir";
10833     fi
10834   fi 
10835   if test -n "$runpath"; then
10836     ld_switch_run="${dash_r}${runpath}"
10837     
10838 if test "$GCC" = "yes"; then
10839   set x $ld_switch_run; shift; ld_switch_run=""
10840   while test -n "$1"; do
10841     case $1 in
10842       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10843       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10844       -Xlinker* ) ;;
10845       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10846     esac
10847     shift
10848   done
10849 fi
10850     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10851   fi
10852 fi
10853
10854 fi
10855
10856 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 waitpid vsnprintf fsync ftruncate umask
10857 do
10858 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10859 echo "configure:10860: checking for $ac_func" >&5
10860
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 /* System header to define __stub macros and hopefully few prototypes,
10865     which can conflict with char $ac_func(); below.  */
10866 #include <assert.h>
10867 /* Override any gcc2 internal prototype to avoid an error.  */
10868 /* We use char because int might match the return type of a gcc2
10869     builtin and then its argument prototype would still apply.  */
10870 char $ac_func();
10871
10872 int main() {
10873
10874 /* The GNU C library defines this for functions which it implements
10875     to always fail with ENOSYS.  Some functions are actually named
10876     something starting with __ and the normal name is an alias.  */
10877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10878 choke me
10879 #else
10880 $ac_func();
10881 #endif
10882
10883 ; return 0; }
10884 EOF
10885 if { (eval echo configure:10886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10886   rm -rf conftest*
10887   eval "ac_cv_func_$ac_func=yes"
10888 else
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_func_$ac_func=no"
10893 fi
10894 rm -f conftest*
10895
10896 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10897   echo "$ac_t""yes" 1>&6
10898     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10899   { test "$extra_verbose" = "yes" && cat << EOF
10900     Defining $ac_tr_func
10901 EOF
10902 cat >> confdefs.h <<EOF
10903 #define $ac_tr_func 1
10904 EOF
10905 }
10906  
10907 else
10908   echo "$ac_t""no" 1>&6
10909 fi
10910 done
10911
10912
10913
10914 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10915 do
10916 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10917 echo "configure:10918: checking for $ac_func" >&5
10918
10919 cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 /* System header to define __stub macros and hopefully few prototypes,
10923     which can conflict with char $ac_func(); below.  */
10924 #include <assert.h>
10925 /* Override any gcc2 internal prototype to avoid an error.  */
10926 /* We use char because int might match the return type of a gcc2
10927     builtin and then its argument prototype would still apply.  */
10928 char $ac_func();
10929
10930 int main() {
10931
10932 /* The GNU C library defines this for functions which it implements
10933     to always fail with ENOSYS.  Some functions are actually named
10934     something starting with __ and the normal name is an alias.  */
10935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10936 choke me
10937 #else
10938 $ac_func();
10939 #endif
10940
10941 ; return 0; }
10942 EOF
10943 if { (eval echo configure:10944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10944   rm -rf conftest*
10945   eval "ac_cv_func_$ac_func=yes"
10946 else
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -rf conftest*
10950   eval "ac_cv_func_$ac_func=no"
10951 fi
10952 rm -f conftest*
10953
10954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10955   echo "$ac_t""yes" 1>&6
10956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10957   { test "$extra_verbose" = "yes" && cat << EOF
10958     Defining $ac_tr_func
10959 EOF
10960 cat >> confdefs.h <<EOF
10961 #define $ac_tr_func 1
10962 EOF
10963 }
10964  
10965 else
10966   echo "$ac_t""no" 1>&6
10967 fi
10968 done
10969
10970
10971 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10972 echo "configure:10973: checking for openpty" >&5
10973
10974 cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977 /* System header to define __stub macros and hopefully few prototypes,
10978     which can conflict with char openpty(); below.  */
10979 #include <assert.h>
10980 /* Override any gcc2 internal prototype to avoid an error.  */
10981 /* We use char because int might match the return type of a gcc2
10982     builtin and then its argument prototype would still apply.  */
10983 char openpty();
10984
10985 int main() {
10986
10987 /* The GNU C library defines this for functions which it implements
10988     to always fail with ENOSYS.  Some functions are actually named
10989     something starting with __ and the normal name is an alias.  */
10990 #if defined (__stub_openpty) || defined (__stub___openpty)
10991 choke me
10992 #else
10993 openpty();
10994 #endif
10995
10996 ; return 0; }
10997 EOF
10998 if { (eval echo configure:10999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10999   rm -rf conftest*
11000   eval "ac_cv_func_openpty=yes"
11001 else
11002   echo "configure: failed program was:" >&5
11003   cat conftest.$ac_ext >&5
11004   rm -rf conftest*
11005   eval "ac_cv_func_openpty=no"
11006 fi
11007 rm -f conftest*
11008
11009 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11010   echo "$ac_t""yes" 1>&6
11011   have_openpty=yes
11012 else
11013   echo "$ac_t""no" 1>&6
11014
11015   
11016 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11017 echo "configure:11018: checking for openpty in -lutil" >&5
11018 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11019
11020 xe_check_libs=" -lutil "
11021 cat > conftest.$ac_ext <<EOF
11022 #line 11023 "configure"
11023 #include "confdefs.h"
11024 /* Override any gcc2 internal prototype to avoid an error.  */
11025 /* We use char because int might match the return type of a gcc2
11026     builtin and then its argument prototype would still apply.  */
11027 char openpty();
11028
11029 int main() {
11030 openpty()
11031 ; return 0; }
11032 EOF
11033 if { (eval echo configure:11034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11034   rm -rf conftest*
11035   eval "ac_cv_lib_$ac_lib_var=yes"
11036 else
11037   echo "configure: failed program was:" >&5
11038   cat conftest.$ac_ext >&5
11039   rm -rf conftest*
11040   eval "ac_cv_lib_$ac_lib_var=no"
11041 fi
11042 rm -f conftest*
11043 xe_check_libs=""
11044
11045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11046   echo "$ac_t""yes" 1>&6
11047   have_openpty=yes need_libutil=yes
11048 else
11049   echo "$ac_t""no" 1>&6
11050 fi
11051
11052
11053 fi
11054
11055 if test "$have_openpty" = "yes"; then
11056   { test "$extra_verbose" = "yes" && cat << \EOF
11057     Defining HAVE_OPENPTY
11058 EOF
11059 cat >> confdefs.h <<\EOF
11060 #define HAVE_OPENPTY 1
11061 EOF
11062 }
11063
11064   for ac_hdr in pty.h libutil.h util.h
11065 do
11066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11068 echo "configure:11069: checking for $ac_hdr" >&5
11069
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 #include <$ac_hdr>
11074 EOF
11075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11076 { (eval echo configure:11077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11078 if test -z "$ac_err"; then
11079   rm -rf conftest*
11080   eval "ac_cv_header_$ac_safe=yes"
11081 else
11082   echo "$ac_err" >&5
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   eval "ac_cv_header_$ac_safe=no"
11087 fi
11088 rm -f conftest*
11089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11090   echo "$ac_t""yes" 1>&6
11091     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11092   { test "$extra_verbose" = "yes" && cat << EOF
11093     Defining $ac_tr_hdr
11094 EOF
11095 cat >> confdefs.h <<EOF
11096 #define $ac_tr_hdr 1
11097 EOF
11098 }
11099  break
11100 else
11101   echo "$ac_t""no" 1>&6
11102 fi
11103 done
11104
11105   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11106 fi
11107
11108 for ac_hdr in stropts.h
11109 do
11110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11112 echo "configure:11113: checking for $ac_hdr" >&5
11113
11114 cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117 #include <$ac_hdr>
11118 EOF
11119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11120 { (eval echo configure:11121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11122 if test -z "$ac_err"; then
11123   rm -rf conftest*
11124   eval "ac_cv_header_$ac_safe=yes"
11125 else
11126   echo "$ac_err" >&5
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_header_$ac_safe=no"
11131 fi
11132 rm -f conftest*
11133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11134   echo "$ac_t""yes" 1>&6
11135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11136   { test "$extra_verbose" = "yes" && cat << EOF
11137     Defining $ac_tr_hdr
11138 EOF
11139 cat >> confdefs.h <<EOF
11140 #define $ac_tr_hdr 1
11141 EOF
11142 }
11143  
11144 else
11145   echo "$ac_t""no" 1>&6
11146 fi
11147 done
11148
11149 if test "$ac_cv_header_stropts_h" = "yes"; then
11150   for ac_func in isastream
11151 do
11152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11153 echo "configure:11154: checking for $ac_func" >&5
11154
11155 cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 /* System header to define __stub macros and hopefully few prototypes,
11159     which can conflict with char $ac_func(); below.  */
11160 #include <assert.h>
11161 /* Override any gcc2 internal prototype to avoid an error.  */
11162 /* We use char because int might match the return type of a gcc2
11163     builtin and then its argument prototype would still apply.  */
11164 char $ac_func();
11165
11166 int main() {
11167
11168 /* The GNU C library defines this for functions which it implements
11169     to always fail with ENOSYS.  Some functions are actually named
11170     something starting with __ and the normal name is an alias.  */
11171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11172 choke me
11173 #else
11174 $ac_func();
11175 #endif
11176
11177 ; return 0; }
11178 EOF
11179 if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11180   rm -rf conftest*
11181   eval "ac_cv_func_$ac_func=yes"
11182 else
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_func_$ac_func=no"
11187 fi
11188 rm -f conftest*
11189
11190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11193   { test "$extra_verbose" = "yes" && cat << EOF
11194     Defining $ac_tr_func
11195 EOF
11196 cat >> confdefs.h <<EOF
11197 #define $ac_tr_func 1
11198 EOF
11199 }
11200  
11201 else
11202   echo "$ac_t""no" 1>&6
11203 fi
11204 done
11205
11206   for ac_hdr in strtio.h
11207 do
11208 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11209 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11210 echo "configure:11211: checking for $ac_hdr" >&5
11211
11212 cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 #include <$ac_hdr>
11216 EOF
11217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11218 { (eval echo configure:11219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11220 if test -z "$ac_err"; then
11221   rm -rf conftest*
11222   eval "ac_cv_header_$ac_safe=yes"
11223 else
11224   echo "$ac_err" >&5
11225   echo "configure: failed program was:" >&5
11226   cat conftest.$ac_ext >&5
11227   rm -rf conftest*
11228   eval "ac_cv_header_$ac_safe=no"
11229 fi
11230 rm -f conftest*
11231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11232   echo "$ac_t""yes" 1>&6
11233     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11234   { test "$extra_verbose" = "yes" && cat << EOF
11235     Defining $ac_tr_hdr
11236 EOF
11237 cat >> confdefs.h <<EOF
11238 #define $ac_tr_hdr 1
11239 EOF
11240 }
11241  
11242 else
11243   echo "$ac_t""no" 1>&6
11244 fi
11245 done
11246  fi
11247
11248 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11249    echo "    xemacs will be linked with \"realpath.o\""
11250  fi
11251
11252 for ac_func in getloadavg
11253 do
11254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11255 echo "configure:11256: checking for $ac_func" >&5
11256
11257 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 /* System header to define __stub macros and hopefully few prototypes,
11261     which can conflict with char $ac_func(); below.  */
11262 #include <assert.h>
11263 /* Override any gcc2 internal prototype to avoid an error.  */
11264 /* We use char because int might match the return type of a gcc2
11265     builtin and then its argument prototype would still apply.  */
11266 char $ac_func();
11267
11268 int main() {
11269
11270 /* The GNU C library defines this for functions which it implements
11271     to always fail with ENOSYS.  Some functions are actually named
11272     something starting with __ and the normal name is an alias.  */
11273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11274 choke me
11275 #else
11276 $ac_func();
11277 #endif
11278
11279 ; return 0; }
11280 EOF
11281 if { (eval echo configure:11282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11282   rm -rf conftest*
11283   eval "ac_cv_func_$ac_func=yes"
11284 else
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -rf conftest*
11288   eval "ac_cv_func_$ac_func=no"
11289 fi
11290 rm -f conftest*
11291
11292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11295   { test "$extra_verbose" = "yes" && cat << EOF
11296     Defining $ac_tr_func
11297 EOF
11298 cat >> confdefs.h <<EOF
11299 #define $ac_tr_func 1
11300 EOF
11301 }
11302  
11303 else
11304   echo "$ac_t""no" 1>&6
11305 fi
11306 done
11307
11308
11309 if test "$ac_cv_func_getloadavg" = "yes"; then
11310         for ac_hdr in sys/loadavg.h
11311 do
11312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11314 echo "configure:11315: checking for $ac_hdr" >&5
11315
11316 cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319 #include <$ac_hdr>
11320 EOF
11321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11322 { (eval echo configure:11323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11324 if test -z "$ac_err"; then
11325   rm -rf conftest*
11326   eval "ac_cv_header_$ac_safe=yes"
11327 else
11328   echo "$ac_err" >&5
11329   echo "configure: failed program was:" >&5
11330   cat conftest.$ac_ext >&5
11331   rm -rf conftest*
11332   eval "ac_cv_header_$ac_safe=no"
11333 fi
11334 rm -f conftest*
11335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11336   echo "$ac_t""yes" 1>&6
11337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11338   { test "$extra_verbose" = "yes" && cat << EOF
11339     Defining $ac_tr_hdr
11340 EOF
11341 cat >> confdefs.h <<EOF
11342 #define $ac_tr_hdr 1
11343 EOF
11344 }
11345  
11346 else
11347   echo "$ac_t""no" 1>&6
11348 fi
11349 done
11350
11351 else
11352     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11353    echo "    xemacs will be linked with \"getloadavg.o\""
11354  fi
11355
11356     
11357 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11358 echo "configure:11359: checking for kstat_open in -lkstat" >&5
11359 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11360
11361 xe_check_libs=" -lkstat "
11362 cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365 /* Override any gcc2 internal prototype to avoid an error.  */
11366 /* We use char because int might match the return type of a gcc2
11367     builtin and then its argument prototype would still apply.  */
11368 char kstat_open();
11369
11370 int main() {
11371 kstat_open()
11372 ; return 0; }
11373 EOF
11374 if { (eval echo configure:11375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11375   rm -rf conftest*
11376   eval "ac_cv_lib_$ac_lib_var=yes"
11377 else
11378   echo "configure: failed program was:" >&5
11379   cat conftest.$ac_ext >&5
11380   rm -rf conftest*
11381   eval "ac_cv_lib_$ac_lib_var=no"
11382 fi
11383 rm -f conftest*
11384 xe_check_libs=""
11385
11386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11387   echo "$ac_t""yes" 1>&6
11388     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11389     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11390   { test "$extra_verbose" = "yes" && cat << EOF
11391     Defining $ac_tr_lib
11392 EOF
11393 cat >> confdefs.h <<EOF
11394 #define $ac_tr_lib 1
11395 EOF
11396 }
11397
11398   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11399
11400 else
11401   echo "$ac_t""no" 1>&6
11402 fi
11403
11404
11405   for ac_hdr in kstat.h
11406 do
11407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11409 echo "configure:11410: checking for $ac_hdr" >&5
11410
11411 cat > conftest.$ac_ext <<EOF
11412 #line 11413 "configure"
11413 #include "confdefs.h"
11414 #include <$ac_hdr>
11415 EOF
11416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11417 { (eval echo configure:11418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11419 if test -z "$ac_err"; then
11420   rm -rf conftest*
11421   eval "ac_cv_header_$ac_safe=yes"
11422 else
11423   echo "$ac_err" >&5
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   eval "ac_cv_header_$ac_safe=no"
11428 fi
11429 rm -f conftest*
11430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11431   echo "$ac_t""yes" 1>&6
11432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11433   { test "$extra_verbose" = "yes" && cat << EOF
11434     Defining $ac_tr_hdr
11435 EOF
11436 cat >> confdefs.h <<EOF
11437 #define $ac_tr_hdr 1
11438 EOF
11439 }
11440  
11441 else
11442   echo "$ac_t""no" 1>&6
11443 fi
11444 done
11445
11446
11447     
11448 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11449 echo "configure:11450: checking for kvm_read in -lkvm" >&5
11450 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11451
11452 xe_check_libs=" -lkvm "
11453 cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 /* Override any gcc2 internal prototype to avoid an error.  */
11457 /* We use char because int might match the return type of a gcc2
11458     builtin and then its argument prototype would still apply.  */
11459 char kvm_read();
11460
11461 int main() {
11462 kvm_read()
11463 ; return 0; }
11464 EOF
11465 if { (eval echo configure:11466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11466   rm -rf conftest*
11467   eval "ac_cv_lib_$ac_lib_var=yes"
11468 else
11469   echo "configure: failed program was:" >&5
11470   cat conftest.$ac_ext >&5
11471   rm -rf conftest*
11472   eval "ac_cv_lib_$ac_lib_var=no"
11473 fi
11474 rm -f conftest*
11475 xe_check_libs=""
11476
11477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11478   echo "$ac_t""yes" 1>&6
11479     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11480     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11481   { test "$extra_verbose" = "yes" && cat << EOF
11482     Defining $ac_tr_lib
11483 EOF
11484 cat >> confdefs.h <<EOF
11485 #define $ac_tr_lib 1
11486 EOF
11487 }
11488
11489   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11490
11491 else
11492   echo "$ac_t""no" 1>&6
11493 fi
11494
11495
11496 fi
11497
11498 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11499 echo "configure:11500: checking whether netdb declares h_errno" >&5
11500 cat > conftest.$ac_ext <<EOF
11501 #line 11502 "configure"
11502 #include "confdefs.h"
11503 #include <netdb.h>
11504 int main() {
11505 return h_errno;
11506 ; return 0; }
11507 EOF
11508 if { (eval echo configure:11509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11509   rm -rf conftest*
11510   echo "$ac_t""yes" 1>&6
11511    { test "$extra_verbose" = "yes" && cat << \EOF
11512     Defining HAVE_H_ERRNO
11513 EOF
11514 cat >> confdefs.h <<\EOF
11515 #define HAVE_H_ERRNO 1
11516 EOF
11517 }
11518
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -rf conftest*
11523   echo "$ac_t""no" 1>&6
11524 fi
11525 rm -f conftest*
11526
11527 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11528 echo "configure:11529: checking for sigsetjmp" >&5
11529 cat > conftest.$ac_ext <<EOF
11530 #line 11531 "configure"
11531 #include "confdefs.h"
11532 #include <setjmp.h>
11533 int main() {
11534 sigjmp_buf bar; sigsetjmp (bar, 0);
11535 ; return 0; }
11536 EOF
11537 if { (eval echo configure:11538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11538   rm -rf conftest*
11539   echo "$ac_t""yes" 1>&6
11540    { test "$extra_verbose" = "yes" && cat << \EOF
11541     Defining HAVE_SIGSETJMP
11542 EOF
11543 cat >> confdefs.h <<\EOF
11544 #define HAVE_SIGSETJMP 1
11545 EOF
11546 }
11547
11548 else
11549   echo "configure: failed program was:" >&5
11550   cat conftest.$ac_ext >&5
11551   rm -rf conftest*
11552   echo "$ac_t""no" 1>&6
11553 fi
11554 rm -f conftest*
11555
11556 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11557 echo "configure:11558: checking whether localtime caches TZ" >&5
11558
11559 if test "$ac_cv_func_tzset" = "yes"; then
11560 cat > conftest.$ac_ext <<EOF
11561 #line 11562 "configure"
11562 #include "confdefs.h"
11563 #include <time.h>
11564 #if STDC_HEADERS
11565 # include <stdlib.h>
11566 #endif
11567 extern char **environ;
11568 unset_TZ ()
11569 {
11570   char **from, **to;
11571   for (to = from = environ; (*to = *from); from++)
11572     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11573       to++;
11574 }
11575 char TZ_GMT0[] = "TZ=GMT0";
11576 char TZ_PST8[] = "TZ=PST8";
11577 main()
11578 {
11579   time_t now = time ((time_t *) 0);
11580   int hour_GMT0, hour_unset;
11581   if (putenv (TZ_GMT0) != 0)
11582     exit (1);
11583   hour_GMT0 = localtime (&now)->tm_hour;
11584   unset_TZ ();
11585   hour_unset = localtime (&now)->tm_hour;
11586   if (putenv (TZ_PST8) != 0)
11587     exit (1);
11588   if (localtime (&now)->tm_hour == hour_GMT0)
11589     exit (1);
11590   unset_TZ ();
11591   if (localtime (&now)->tm_hour != hour_unset)
11592     exit (1);
11593   exit (0);
11594 }
11595 EOF
11596 if { (eval echo configure:11597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11597 then
11598   emacs_cv_localtime_cache=no
11599 else
11600   conftest_rc="$?"
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -fr conftest*
11604   emacs_cv_localtime_cache=yes
11605 fi
11606 rm -fr conftest*
11607 else
11608         # If we lack tzset, report that localtime does not cache TZ,
11609         # since we can't invalidate the cache if we don't have tzset.
11610         emacs_cv_localtime_cache=no
11611 fi
11612 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11613 if test $emacs_cv_localtime_cache = yes; then
11614   { test "$extra_verbose" = "yes" && cat << \EOF
11615     Defining LOCALTIME_CACHE
11616 EOF
11617 cat >> confdefs.h <<\EOF
11618 #define LOCALTIME_CACHE 1
11619 EOF
11620 }
11621
11622 fi
11623
11624 if test "$HAVE_TIMEVAL" = "yes"; then
11625 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11626 echo "configure:11627: checking whether gettimeofday accepts one or two arguments" >&5
11627 cat > conftest.$ac_ext <<EOF
11628 #line 11629 "configure"
11629 #include "confdefs.h"
11630
11631 #ifdef TIME_WITH_SYS_TIME
11632 #include <sys/time.h>
11633 #include <time.h>
11634 #else
11635 #ifdef HAVE_SYS_TIME_H
11636 #include <sys/time.h>
11637 #else
11638 #include <time.h>
11639 #endif
11640 #endif
11641   
11642 int main() {
11643
11644   struct timeval time;
11645   gettimeofday (&time, 0);
11646
11647 ; return 0; }
11648 EOF
11649 if { (eval echo configure:11650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11650   rm -rf conftest*
11651   echo "$ac_t""two" 1>&6
11652 else
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -rf conftest*
11656   echo "$ac_t""one" 1>&6
11657    { test "$extra_verbose" = "yes" && cat << \EOF
11658     Defining GETTIMEOFDAY_ONE_ARGUMENT
11659 EOF
11660 cat >> confdefs.h <<\EOF
11661 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11662 EOF
11663 }
11664
11665 fi
11666 rm -f conftest*
11667 fi
11668
11669
11670 echo $ac_n "checking for inline""... $ac_c" 1>&6
11671 echo "configure:11672: checking for inline" >&5
11672
11673 ac_cv_c_inline=no
11674 for ac_kw in inline __inline__ __inline; do
11675   cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678
11679 int main() {
11680 } $ac_kw foo() {
11681 ; return 0; }
11682 EOF
11683 if { (eval echo configure:11684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11684   rm -rf conftest*
11685   ac_cv_c_inline=$ac_kw; break
11686 else
11687   echo "configure: failed program was:" >&5
11688   cat conftest.$ac_ext >&5
11689 fi
11690 rm -f conftest*
11691 done
11692
11693
11694 echo "$ac_t""$ac_cv_c_inline" 1>&6
11695 case "$ac_cv_c_inline" in
11696   inline | yes) ;;
11697   no) { test "$extra_verbose" = "yes" && cat << \EOF
11698     Defining inline = 
11699 EOF
11700 cat >> confdefs.h <<\EOF
11701 #define inline 
11702 EOF
11703 }
11704  ;;
11705   *)  { test "$extra_verbose" = "yes" && cat << EOF
11706     Defining inline = $ac_cv_c_inline
11707 EOF
11708 cat >> confdefs.h <<EOF
11709 #define inline $ac_cv_c_inline
11710 EOF
11711 }
11712  ;;
11713 esac
11714
11715 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11716    echo "    xemacs will be linked with \"inline.o\""
11717  fi
11718
11719
11720 if test "$__DECC" != "yes"; then
11721   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11722 # for constant arguments.  Useless!
11723 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11724 echo "configure:11725: checking for working alloca.h" >&5
11725
11726 cat > conftest.$ac_ext <<EOF
11727 #line 11728 "configure"
11728 #include "confdefs.h"
11729 #include <alloca.h>
11730 int main() {
11731 char *p = alloca(2 * sizeof(int));
11732 ; return 0; }
11733 EOF
11734 if { (eval echo configure:11735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11735   rm -rf conftest*
11736   ac_cv_header_alloca_h=yes
11737 else
11738   echo "configure: failed program was:" >&5
11739   cat conftest.$ac_ext >&5
11740   rm -rf conftest*
11741   ac_cv_header_alloca_h=no
11742 fi
11743 rm -f conftest*
11744
11745 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11746 if test $ac_cv_header_alloca_h = yes; then
11747   { test "$extra_verbose" = "yes" && cat << \EOF
11748     Defining HAVE_ALLOCA_H
11749 EOF
11750 cat >> confdefs.h <<\EOF
11751 #define HAVE_ALLOCA_H 1
11752 EOF
11753 }
11754
11755 fi
11756
11757 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11758 echo "configure:11759: checking for alloca" >&5
11759
11760 cat > conftest.$ac_ext <<EOF
11761 #line 11762 "configure"
11762 #include "confdefs.h"
11763
11764 #ifdef __GNUC__
11765 # define alloca __builtin_alloca
11766 #else
11767 # ifdef _MSC_VER
11768 #  include <malloc.h>
11769 #  define alloca _alloca
11770 # else
11771 #  if HAVE_ALLOCA_H
11772 #   include <alloca.h>
11773 #  else
11774 #   ifdef _AIX
11775  #pragma alloca
11776 #   else
11777 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11778 char *alloca ();
11779 #    endif
11780 #   endif
11781 #  endif
11782 # endif
11783 #endif
11784
11785 int main() {
11786 char *p = (char *) alloca(1);
11787 ; return 0; }
11788 EOF
11789 if { (eval echo configure:11790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11790   rm -rf conftest*
11791   ac_cv_func_alloca_works=yes
11792 else
11793   echo "configure: failed program was:" >&5
11794   cat conftest.$ac_ext >&5
11795   rm -rf conftest*
11796   ac_cv_func_alloca_works=no
11797 fi
11798 rm -f conftest*
11799
11800 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11801 if test $ac_cv_func_alloca_works = yes; then
11802   { test "$extra_verbose" = "yes" && cat << \EOF
11803     Defining HAVE_ALLOCA
11804 EOF
11805 cat >> confdefs.h <<\EOF
11806 #define HAVE_ALLOCA 1
11807 EOF
11808 }
11809
11810 fi
11811
11812 if test $ac_cv_func_alloca_works = no; then
11813   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11814   # that cause trouble.  Some versions do not even contain alloca or
11815   # contain a buggy version.  If you still want to use their alloca,
11816   # use ar to extract alloca.o from them instead of compiling alloca.c.
11817   ALLOCA=alloca.${ac_objext}
11818   { test "$extra_verbose" = "yes" && cat << \EOF
11819     Defining C_ALLOCA
11820 EOF
11821 cat >> confdefs.h <<\EOF
11822 #define C_ALLOCA 1
11823 EOF
11824 }
11825
11826
11827 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11828 echo "configure:11829: checking whether alloca needs Cray hooks" >&5
11829
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 #if defined(CRAY) && ! defined(CRAY2)
11834 webecray
11835 #else
11836 wenotbecray
11837 #endif
11838
11839 EOF
11840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11841   egrep "webecray" >/dev/null 2>&1; then
11842   rm -rf conftest*
11843   ac_cv_os_cray=yes
11844 else
11845   rm -rf conftest*
11846   ac_cv_os_cray=no
11847 fi
11848 rm -f conftest*
11849
11850
11851 echo "$ac_t""$ac_cv_os_cray" 1>&6
11852 if test $ac_cv_os_cray = yes; then
11853 for ac_func in _getb67 GETB67 getb67; do
11854   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11855 echo "configure:11856: checking for $ac_func" >&5
11856
11857 cat > conftest.$ac_ext <<EOF
11858 #line 11859 "configure"
11859 #include "confdefs.h"
11860 /* System header to define __stub macros and hopefully few prototypes,
11861     which can conflict with char $ac_func(); below.  */
11862 #include <assert.h>
11863 /* Override any gcc2 internal prototype to avoid an error.  */
11864 /* We use char because int might match the return type of a gcc2
11865     builtin and then its argument prototype would still apply.  */
11866 char $ac_func();
11867
11868 int main() {
11869
11870 /* The GNU C library defines this for functions which it implements
11871     to always fail with ENOSYS.  Some functions are actually named
11872     something starting with __ and the normal name is an alias.  */
11873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11874 choke me
11875 #else
11876 $ac_func();
11877 #endif
11878
11879 ; return 0; }
11880 EOF
11881 if { (eval echo configure:11882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11882   rm -rf conftest*
11883   eval "ac_cv_func_$ac_func=yes"
11884 else
11885   echo "configure: failed program was:" >&5
11886   cat conftest.$ac_ext >&5
11887   rm -rf conftest*
11888   eval "ac_cv_func_$ac_func=no"
11889 fi
11890 rm -f conftest*
11891
11892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11893   echo "$ac_t""yes" 1>&6
11894   { test "$extra_verbose" = "yes" && cat << EOF
11895     Defining CRAY_STACKSEG_END = $ac_func
11896 EOF
11897 cat >> confdefs.h <<EOF
11898 #define CRAY_STACKSEG_END $ac_func
11899 EOF
11900 }
11901
11902   break
11903 else
11904   echo "$ac_t""no" 1>&6
11905 fi
11906
11907 done
11908 fi
11909
11910 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11911 echo "configure:11912: checking stack direction for C alloca" >&5
11912
11913 cat > conftest.$ac_ext <<EOF
11914 #line 11915 "configure"
11915 #include "confdefs.h"
11916 find_stack_direction ()
11917 {
11918   static char *addr = 0;
11919   auto char dummy;
11920   if (addr == 0)
11921     {
11922       addr = &dummy;
11923       return find_stack_direction ();
11924     }
11925   else
11926     return (&dummy > addr) ? 1 : -1;
11927 }
11928 main ()
11929 {
11930   exit (find_stack_direction() < 0);
11931 }
11932 EOF
11933 if { (eval echo configure:11934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11934 then
11935   ac_cv_c_stack_direction=1
11936 else
11937   conftest_rc="$?"
11938   echo "configure: failed program was:" >&5
11939   cat conftest.$ac_ext >&5
11940   rm -fr conftest*
11941   ac_cv_c_stack_direction=-1
11942 fi
11943 rm -fr conftest*
11944
11945 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11946 { test "$extra_verbose" = "yes" && cat << EOF
11947     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11948 EOF
11949 cat >> confdefs.h <<EOF
11950 #define STACK_DIRECTION $ac_cv_c_stack_direction
11951 EOF
11952 }
11953
11954 fi
11955
11956   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11957    echo "    xemacs will be linked with \"$ALLOCA\""
11958  fi
11959 fi
11960
11961 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11962 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11963 echo "configure:11964: checking for vfork.h" >&5
11964
11965 cat > conftest.$ac_ext <<EOF
11966 #line 11967 "configure"
11967 #include "confdefs.h"
11968 #include <vfork.h>
11969 EOF
11970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11971 { (eval echo configure:11972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11973 if test -z "$ac_err"; then
11974   rm -rf conftest*
11975   eval "ac_cv_header_$ac_safe=yes"
11976 else
11977   echo "$ac_err" >&5
11978   echo "configure: failed program was:" >&5
11979   cat conftest.$ac_ext >&5
11980   rm -rf conftest*
11981   eval "ac_cv_header_$ac_safe=no"
11982 fi
11983 rm -f conftest*
11984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11985   echo "$ac_t""yes" 1>&6
11986   { test "$extra_verbose" = "yes" && cat << \EOF
11987     Defining HAVE_VFORK_H
11988 EOF
11989 cat >> confdefs.h <<\EOF
11990 #define HAVE_VFORK_H 1
11991 EOF
11992 }
11993
11994 else
11995   echo "$ac_t""no" 1>&6
11996 fi
11997
11998 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11999 echo "configure:12000: checking for working vfork" >&5
12000
12001 cat > conftest.$ac_ext <<EOF
12002 #line 12003 "configure"
12003 #include "confdefs.h"
12004 /* Thanks to Paul Eggert for this test.  */
12005 #include <stdio.h>
12006 #include <sys/types.h>
12007 #include <sys/stat.h>
12008 #ifdef HAVE_UNISTD_H
12009 #include <unistd.h>
12010 #endif
12011 #ifdef HAVE_VFORK_H
12012 #include <vfork.h>
12013 #endif
12014 /* On some sparc systems, changes by the child to local and incoming
12015    argument registers are propagated back to the parent.
12016    The compiler is told about this with #include <vfork.h>,
12017    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12018    Test for this by using a static variable whose address
12019    is put into a register that is clobbered by the vfork.  */
12020 static
12021 #ifdef __cplusplus
12022 sparc_address_test (int arg)
12023 #else
12024 sparc_address_test (arg) int arg;
12025 #endif
12026 {
12027   static pid_t child;
12028   if (!child) {
12029     child = vfork ();
12030     if (child < 0) {
12031       perror ("vfork");
12032       _exit(2);
12033     }
12034     if (!child) {
12035       arg = getpid();
12036       write(-1, "", 0);
12037       _exit (arg);
12038     }
12039   }
12040 }
12041 main() {
12042   pid_t parent = getpid ();
12043   pid_t child;
12044
12045   sparc_address_test ();
12046
12047   child = vfork ();
12048
12049   if (child == 0) {
12050     /* Here is another test for sparc vfork register problems.
12051        This test uses lots of local variables, at least
12052        as many local variables as main has allocated so far
12053        including compiler temporaries.  4 locals are enough for
12054        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12055        A buggy compiler should reuse the register of parent
12056        for one of the local variables, since it will think that
12057        parent can't possibly be used any more in this routine.
12058        Assigning to the local variable will thus munge parent
12059        in the parent process.  */
12060     pid_t
12061       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12062       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12063     /* Convince the compiler that p..p7 are live; otherwise, it might
12064        use the same hardware register for all 8 local variables.  */
12065     if (p != p1 || p != p2 || p != p3 || p != p4
12066         || p != p5 || p != p6 || p != p7)
12067       _exit(1);
12068
12069     /* On some systems (e.g. IRIX 3.3),
12070        vfork doesn't separate parent from child file descriptors.
12071        If the child closes a descriptor before it execs or exits,
12072        this munges the parent's descriptor as well.
12073        Test for this by closing stdout in the child.  */
12074     _exit(close(fileno(stdout)) != 0);
12075   } else {
12076     int status;
12077     struct stat st;
12078
12079     while (wait(&status) != child)
12080       ;
12081     exit(
12082          /* Was there some problem with vforking?  */
12083          child < 0
12084
12085          /* Did the child fail?  (This shouldn't happen.)  */
12086          || status
12087
12088          /* Did the vfork/compiler bug occur?  */
12089          || parent != getpid()
12090
12091          /* Did the file descriptor bug occur?  */
12092          || fstat(fileno(stdout), &st) != 0
12093          );
12094   }
12095 }
12096 EOF
12097 if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12098 then
12099   ac_cv_func_vfork_works=yes
12100 else
12101   conftest_rc="$?"
12102   echo "configure: failed program was:" >&5
12103   cat conftest.$ac_ext >&5
12104   rm -fr conftest*
12105   ac_cv_func_vfork_works=no
12106 fi
12107 rm -fr conftest*
12108
12109 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12110 if test $ac_cv_func_vfork_works = no; then
12111   { test "$extra_verbose" = "yes" && cat << \EOF
12112     Defining vfork = fork
12113 EOF
12114 cat >> confdefs.h <<\EOF
12115 #define vfork fork
12116 EOF
12117 }
12118
12119 fi
12120
12121
12122 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12123 echo "configure:12124: checking for working strcoll" >&5
12124
12125 cat > conftest.$ac_ext <<EOF
12126 #line 12127 "configure"
12127 #include "confdefs.h"
12128 #include <string.h>
12129 main ()
12130 {
12131   exit (strcoll ("abc", "def") >= 0 ||
12132         strcoll ("ABC", "DEF") >= 0 ||
12133         strcoll ("123", "456") >= 0);
12134 }
12135 EOF
12136 if { (eval echo configure:12137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12137 then
12138   ac_cv_func_strcoll_works=yes
12139 else
12140   conftest_rc="$?"
12141   echo "configure: failed program was:" >&5
12142   cat conftest.$ac_ext >&5
12143   rm -fr conftest*
12144   ac_cv_func_strcoll_works=no
12145 fi
12146 rm -fr conftest*
12147
12148 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12149 if test $ac_cv_func_strcoll_works = yes; then
12150   { test "$extra_verbose" = "yes" && cat << \EOF
12151     Defining HAVE_STRCOLL
12152 EOF
12153 cat >> confdefs.h <<\EOF
12154 #define HAVE_STRCOLL 1
12155 EOF
12156 }
12157
12158 fi
12159
12160
12161 for ac_func in getpgrp
12162 do
12163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12164 echo "configure:12165: checking for $ac_func" >&5
12165
12166 cat > conftest.$ac_ext <<EOF
12167 #line 12168 "configure"
12168 #include "confdefs.h"
12169 /* System header to define __stub macros and hopefully few prototypes,
12170     which can conflict with char $ac_func(); below.  */
12171 #include <assert.h>
12172 /* Override any gcc2 internal prototype to avoid an error.  */
12173 /* We use char because int might match the return type of a gcc2
12174     builtin and then its argument prototype would still apply.  */
12175 char $ac_func();
12176
12177 int main() {
12178
12179 /* The GNU C library defines this for functions which it implements
12180     to always fail with ENOSYS.  Some functions are actually named
12181     something starting with __ and the normal name is an alias.  */
12182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12183 choke me
12184 #else
12185 $ac_func();
12186 #endif
12187
12188 ; return 0; }
12189 EOF
12190 if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12191   rm -rf conftest*
12192   eval "ac_cv_func_$ac_func=yes"
12193 else
12194   echo "configure: failed program was:" >&5
12195   cat conftest.$ac_ext >&5
12196   rm -rf conftest*
12197   eval "ac_cv_func_$ac_func=no"
12198 fi
12199 rm -f conftest*
12200
12201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12202   echo "$ac_t""yes" 1>&6
12203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12204   { test "$extra_verbose" = "yes" && cat << EOF
12205     Defining $ac_tr_func
12206 EOF
12207 cat >> confdefs.h <<EOF
12208 #define $ac_tr_func 1
12209 EOF
12210 }
12211  
12212 else
12213   echo "$ac_t""no" 1>&6
12214 fi
12215 done
12216
12217 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12218 echo "configure:12219: checking whether getpgrp takes no argument" >&5
12219
12220 cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223
12224 /*
12225  * If this system has a BSD-style getpgrp(),
12226  * which takes a pid argument, exit unsuccessfully.
12227  *
12228  * Snarfed from Chet Ramey's bash pgrp.c test program
12229  */
12230 #include <stdio.h>
12231 #include <sys/types.h>
12232
12233 int     pid;
12234 int     pg1, pg2, pg3, pg4;
12235 int     ng, np, s, child;
12236
12237 main()
12238 {
12239         pid = getpid();
12240         pg1 = getpgrp(0);
12241         pg2 = getpgrp();
12242         pg3 = getpgrp(pid);
12243         pg4 = getpgrp(1);
12244
12245         /*
12246          * If all of these values are the same, it's pretty sure that
12247          * we're on a system that ignores getpgrp's first argument.
12248          */
12249         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12250                 exit(0);
12251
12252         child = fork();
12253         if (child < 0)
12254                 exit(1);
12255         else if (child == 0) {
12256                 np = getpid();
12257                 /*
12258                  * If this is Sys V, this will not work; pgrp will be
12259                  * set to np because setpgrp just changes a pgrp to be
12260                  * the same as the pid.
12261                  */
12262                 setpgrp(np, pg1);
12263                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12264                 if (ng == pg1) {
12265                         exit(1);
12266                 } else {
12267                         exit(0);
12268                 }
12269         } else {
12270                 wait(&s);
12271                 exit(s>>8);
12272         }
12273 }
12274
12275 EOF
12276 if { (eval echo configure:12277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12277 then
12278   ac_cv_func_getpgrp_void=yes
12279 else
12280   conftest_rc="$?"
12281   echo "configure: failed program was:" >&5
12282   cat conftest.$ac_ext >&5
12283   rm -fr conftest*
12284   ac_cv_func_getpgrp_void=no
12285 fi
12286 rm -fr conftest*
12287
12288
12289 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12290 if test $ac_cv_func_getpgrp_void = yes; then
12291   { test "$extra_verbose" = "yes" && cat << \EOF
12292     Defining GETPGRP_VOID
12293 EOF
12294 cat >> confdefs.h <<\EOF
12295 #define GETPGRP_VOID 1
12296 EOF
12297 }
12298
12299 fi
12300
12301
12302 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12303 echo "configure:12304: checking for working mmap" >&5
12304 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12305 cat > conftest.$ac_ext <<EOF
12306 #line 12307 "configure"
12307 #include "confdefs.h"
12308 #include <stdio.h>
12309 #include <unistd.h>
12310 #include <fcntl.h>
12311 #include <sys/mman.h>
12312
12313 #ifndef MAP_VARIABLE
12314 #define MAP_VARIABLE 0
12315 #endif
12316
12317 #ifndef MAP_FAILED
12318 #define MAP_FAILED -1
12319 #endif
12320
12321 int main (int argc, char *argv[])
12322 {
12323   int fd = -1;
12324   caddr_t p;
12325 #ifndef MAP_ANONYMOUS
12326   fd = open ("/dev/zero", O_RDWR);
12327   if (fd < 0)
12328     return 1;
12329 #define MAP_ANONYMOUS 0
12330 #endif
12331   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12332            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12333            fd, 0) != (void *) MAP_FAILED)
12334     return 0;
12335   perror ("conftest: mmap failed");
12336   return 1;
12337 }
12338 EOF
12339 if { (eval echo configure:12340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12340 then
12341   have_mmap=yes
12342 else
12343   conftest_rc="$?"
12344   echo "configure: failed program was:" >&5
12345   cat conftest.$ac_ext >&5
12346   rm -fr conftest*
12347   have_mmap=no
12348 fi
12349 rm -fr conftest* ;;
12350 esac
12351 echo "$ac_t""$have_mmap" 1>&6
12352 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12353     Defining HAVE_MMAP
12354 EOF
12355 cat >> confdefs.h <<\EOF
12356 #define HAVE_MMAP 1
12357 EOF
12358 }
12359
12360
12361 case "$opsys" in cygwin*) 
12362         test "$rel_alloc" = "default" && rel_alloc=no ;;
12363 esac
12364 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12365 if test "$rel_alloc $have_mmap" = "default yes"; then
12366   if test "$doug_lea_malloc" = "yes"; then
12367         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12368 echo "configure:12369: checking for M_MMAP_THRESHOLD" >&5
12369     cat > conftest.$ac_ext <<EOF
12370 #line 12371 "configure"
12371 #include "confdefs.h"
12372 #include <malloc.h>
12373 int main() {
12374
12375 #ifndef M_MMAP_THRESHOLD
12376 #error No M_MMAP_THRESHOLD :-(
12377 !@+$%^&*_)(_ - unlikely to compile...
12378 #endif
12379
12380 ; return 0; }
12381 EOF
12382 if { (eval echo configure:12383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12383   rm -rf conftest*
12384   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12385 else
12386   echo "configure: failed program was:" >&5
12387   cat conftest.$ac_ext >&5
12388   rm -rf conftest*
12389   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12390 fi
12391 rm -f conftest*
12392   else
12393     rel_alloc=yes
12394   fi
12395 fi
12396 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12397     Defining REL_ALLOC
12398 EOF
12399 cat >> confdefs.h <<\EOF
12400 #define REL_ALLOC 1
12401 EOF
12402 }
12403
12404
12405 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12406 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12407 echo "configure:12408: checking for termios.h" >&5
12408
12409 cat > conftest.$ac_ext <<EOF
12410 #line 12411 "configure"
12411 #include "confdefs.h"
12412 #include <termios.h>
12413 EOF
12414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12415 { (eval echo configure:12416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12417 if test -z "$ac_err"; then
12418   rm -rf conftest*
12419   eval "ac_cv_header_$ac_safe=yes"
12420 else
12421   echo "$ac_err" >&5
12422   echo "configure: failed program was:" >&5
12423   cat conftest.$ac_ext >&5
12424   rm -rf conftest*
12425   eval "ac_cv_header_$ac_safe=no"
12426 fi
12427 rm -f conftest*
12428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12429   echo "$ac_t""yes" 1>&6
12430   { test "$extra_verbose" = "yes" && cat << \EOF
12431     Defining HAVE_TERMIOS
12432 EOF
12433 cat >> confdefs.h <<\EOF
12434 #define HAVE_TERMIOS 1
12435 EOF
12436 }
12437
12438   { test "$extra_verbose" = "yes" && cat << \EOF
12439     Defining SIGNALS_VIA_CHARACTERS
12440 EOF
12441 cat >> confdefs.h <<\EOF
12442 #define SIGNALS_VIA_CHARACTERS 1
12443 EOF
12444 }
12445
12446   { test "$extra_verbose" = "yes" && cat << \EOF
12447     Defining NO_TERMIO
12448 EOF
12449 cat >> confdefs.h <<\EOF
12450 #define NO_TERMIO 1
12451 EOF
12452 }
12453
12454 else
12455   echo "$ac_t""no" 1>&6
12456 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12457 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12458 echo "configure:12459: checking for termio.h" >&5
12459
12460 cat > conftest.$ac_ext <<EOF
12461 #line 12462 "configure"
12462 #include "confdefs.h"
12463 #include <termio.h>
12464 EOF
12465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12466 { (eval echo configure:12467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12468 if test -z "$ac_err"; then
12469   rm -rf conftest*
12470   eval "ac_cv_header_$ac_safe=yes"
12471 else
12472   echo "$ac_err" >&5
12473   echo "configure: failed program was:" >&5
12474   cat conftest.$ac_ext >&5
12475   rm -rf conftest*
12476   eval "ac_cv_header_$ac_safe=no"
12477 fi
12478 rm -f conftest*
12479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12480   echo "$ac_t""yes" 1>&6
12481   { test "$extra_verbose" = "yes" && cat << \EOF
12482     Defining HAVE_TERMIO
12483 EOF
12484 cat >> confdefs.h <<\EOF
12485 #define HAVE_TERMIO 1
12486 EOF
12487 }
12488
12489 else
12490   echo "$ac_t""no" 1>&6
12491 fi
12492
12493 fi
12494
12495
12496
12497 echo $ac_n "checking for socket""... $ac_c" 1>&6
12498 echo "configure:12499: checking for socket" >&5
12499
12500 cat > conftest.$ac_ext <<EOF
12501 #line 12502 "configure"
12502 #include "confdefs.h"
12503 /* System header to define __stub macros and hopefully few prototypes,
12504     which can conflict with char socket(); below.  */
12505 #include <assert.h>
12506 /* Override any gcc2 internal prototype to avoid an error.  */
12507 /* We use char because int might match the return type of a gcc2
12508     builtin and then its argument prototype would still apply.  */
12509 char socket();
12510
12511 int main() {
12512
12513 /* The GNU C library defines this for functions which it implements
12514     to always fail with ENOSYS.  Some functions are actually named
12515     something starting with __ and the normal name is an alias.  */
12516 #if defined (__stub_socket) || defined (__stub___socket)
12517 choke me
12518 #else
12519 socket();
12520 #endif
12521
12522 ; return 0; }
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12525   rm -rf conftest*
12526   eval "ac_cv_func_socket=yes"
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   eval "ac_cv_func_socket=no"
12532 fi
12533 rm -f conftest*
12534
12535 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12536   echo "$ac_t""yes" 1>&6
12537   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12538 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12539 echo "configure:12540: checking for netinet/in.h" >&5
12540
12541 cat > conftest.$ac_ext <<EOF
12542 #line 12543 "configure"
12543 #include "confdefs.h"
12544 #include <netinet/in.h>
12545 EOF
12546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12547 { (eval echo configure:12548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12549 if test -z "$ac_err"; then
12550   rm -rf conftest*
12551   eval "ac_cv_header_$ac_safe=yes"
12552 else
12553   echo "$ac_err" >&5
12554   echo "configure: failed program was:" >&5
12555   cat conftest.$ac_ext >&5
12556   rm -rf conftest*
12557   eval "ac_cv_header_$ac_safe=no"
12558 fi
12559 rm -f conftest*
12560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12561   echo "$ac_t""yes" 1>&6
12562   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12563 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12564 echo "configure:12565: checking for arpa/inet.h" >&5
12565
12566 cat > conftest.$ac_ext <<EOF
12567 #line 12568 "configure"
12568 #include "confdefs.h"
12569 #include <arpa/inet.h>
12570 EOF
12571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12572 { (eval echo configure:12573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12574 if test -z "$ac_err"; then
12575   rm -rf conftest*
12576   eval "ac_cv_header_$ac_safe=yes"
12577 else
12578   echo "$ac_err" >&5
12579   echo "configure: failed program was:" >&5
12580   cat conftest.$ac_ext >&5
12581   rm -rf conftest*
12582   eval "ac_cv_header_$ac_safe=no"
12583 fi
12584 rm -f conftest*
12585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12586   echo "$ac_t""yes" 1>&6
12587   
12588   { test "$extra_verbose" = "yes" && cat << \EOF
12589     Defining HAVE_SOCKETS
12590 EOF
12591 cat >> confdefs.h <<\EOF
12592 #define HAVE_SOCKETS 1
12593 EOF
12594 }
12595
12596       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12597 echo "configure:12598: checking "for sun_len member in struct sockaddr_un"" >&5
12598       cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601
12602 #include <sys/types.h>
12603 #include <sys/socket.h>
12604 #include <sys/un.h>
12605       
12606 int main() {
12607 static struct sockaddr_un x; x.sun_len = 1;
12608 ; return 0; }
12609 EOF
12610 if { (eval echo configure:12611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12611   rm -rf conftest*
12612   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12613     Defining HAVE_SOCKADDR_SUN_LEN
12614 EOF
12615 cat >> confdefs.h <<\EOF
12616 #define HAVE_SOCKADDR_SUN_LEN 1
12617 EOF
12618 }
12619
12620 else
12621   echo "configure: failed program was:" >&5
12622   cat conftest.$ac_ext >&5
12623   rm -rf conftest*
12624   echo "$ac_t""no" 1>&6
12625 fi
12626 rm -f conftest*
12627       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12628 echo "configure:12629: checking "for ip_mreq struct in netinet/in.h"" >&5
12629       cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632
12633 #include <sys/types.h>
12634 #include <netinet/in.h>
12635       
12636 int main() {
12637 static struct ip_mreq x;
12638 ; return 0; }
12639 EOF
12640 if { (eval echo configure:12641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12641   rm -rf conftest*
12642   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12643     Defining HAVE_MULTICAST
12644 EOF
12645 cat >> confdefs.h <<\EOF
12646 #define HAVE_MULTICAST 1
12647 EOF
12648 }
12649
12650 else
12651   echo "configure: failed program was:" >&5
12652   cat conftest.$ac_ext >&5
12653   rm -rf conftest*
12654   echo "$ac_t""no" 1>&6
12655 fi
12656 rm -f conftest*
12657 else
12658   echo "$ac_t""no" 1>&6
12659 fi
12660
12661 else
12662   echo "$ac_t""no" 1>&6
12663 fi
12664
12665 else
12666   echo "$ac_t""no" 1>&6
12667 fi
12668
12669
12670 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12671 echo "configure:12672: checking for msgget" >&5
12672
12673 cat > conftest.$ac_ext <<EOF
12674 #line 12675 "configure"
12675 #include "confdefs.h"
12676 /* System header to define __stub macros and hopefully few prototypes,
12677     which can conflict with char msgget(); below.  */
12678 #include <assert.h>
12679 /* Override any gcc2 internal prototype to avoid an error.  */
12680 /* We use char because int might match the return type of a gcc2
12681     builtin and then its argument prototype would still apply.  */
12682 char msgget();
12683
12684 int main() {
12685
12686 /* The GNU C library defines this for functions which it implements
12687     to always fail with ENOSYS.  Some functions are actually named
12688     something starting with __ and the normal name is an alias.  */
12689 #if defined (__stub_msgget) || defined (__stub___msgget)
12690 choke me
12691 #else
12692 msgget();
12693 #endif
12694
12695 ; return 0; }
12696 EOF
12697 if { (eval echo configure:12698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12698   rm -rf conftest*
12699   eval "ac_cv_func_msgget=yes"
12700 else
12701   echo "configure: failed program was:" >&5
12702   cat conftest.$ac_ext >&5
12703   rm -rf conftest*
12704   eval "ac_cv_func_msgget=no"
12705 fi
12706 rm -f conftest*
12707
12708 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12709   echo "$ac_t""yes" 1>&6
12710   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12711 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12712 echo "configure:12713: checking for sys/ipc.h" >&5
12713
12714 cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 #include <sys/ipc.h>
12718 EOF
12719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12720 { (eval echo configure:12721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12722 if test -z "$ac_err"; then
12723   rm -rf conftest*
12724   eval "ac_cv_header_$ac_safe=yes"
12725 else
12726   echo "$ac_err" >&5
12727   echo "configure: failed program was:" >&5
12728   cat conftest.$ac_ext >&5
12729   rm -rf conftest*
12730   eval "ac_cv_header_$ac_safe=no"
12731 fi
12732 rm -f conftest*
12733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12734   echo "$ac_t""yes" 1>&6
12735   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12736 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12737 echo "configure:12738: checking for sys/msg.h" >&5
12738
12739 cat > conftest.$ac_ext <<EOF
12740 #line 12741 "configure"
12741 #include "confdefs.h"
12742 #include <sys/msg.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   { test "$extra_verbose" = "yes" && cat << \EOF
12761     Defining HAVE_SYSVIPC
12762 EOF
12763 cat >> confdefs.h <<\EOF
12764 #define HAVE_SYSVIPC 1
12765 EOF
12766 }
12767
12768 else
12769   echo "$ac_t""no" 1>&6
12770 fi
12771
12772 else
12773   echo "$ac_t""no" 1>&6
12774 fi
12775
12776 else
12777   echo "$ac_t""no" 1>&6
12778 fi
12779
12780
12781 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12782 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12783 echo "configure:12784: checking for dirent.h" >&5
12784
12785 cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 #include <dirent.h>
12789 EOF
12790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12791 { (eval echo configure:12792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12793 if test -z "$ac_err"; then
12794   rm -rf conftest*
12795   eval "ac_cv_header_$ac_safe=yes"
12796 else
12797   echo "$ac_err" >&5
12798   echo "configure: failed program was:" >&5
12799   cat conftest.$ac_ext >&5
12800   rm -rf conftest*
12801   eval "ac_cv_header_$ac_safe=no"
12802 fi
12803 rm -f conftest*
12804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12805   echo "$ac_t""yes" 1>&6
12806   { test "$extra_verbose" = "yes" && cat << \EOF
12807     Defining SYSV_SYSTEM_DIR
12808 EOF
12809 cat >> confdefs.h <<\EOF
12810 #define SYSV_SYSTEM_DIR 1
12811 EOF
12812 }
12813
12814 else
12815   echo "$ac_t""no" 1>&6
12816 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12817 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12818 echo "configure:12819: checking for sys/dir.h" >&5
12819
12820 cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 #include <sys/dir.h>
12824 EOF
12825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12826 { (eval echo configure:12827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12828 if test -z "$ac_err"; then
12829   rm -rf conftest*
12830   eval "ac_cv_header_$ac_safe=yes"
12831 else
12832   echo "$ac_err" >&5
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -rf conftest*
12836   eval "ac_cv_header_$ac_safe=no"
12837 fi
12838 rm -f conftest*
12839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12840   echo "$ac_t""yes" 1>&6
12841   :
12842 else
12843   echo "$ac_t""no" 1>&6
12844 { test "$extra_verbose" = "yes" && cat << \EOF
12845     Defining NONSYSTEM_DIR_LIBRARY
12846 EOF
12847 cat >> confdefs.h <<\EOF
12848 #define NONSYSTEM_DIR_LIBRARY 1
12849 EOF
12850 }
12851
12852 fi
12853
12854 fi
12855
12856
12857 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12858 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12859 echo "configure:12860: checking for nlist.h" >&5
12860
12861 cat > conftest.$ac_ext <<EOF
12862 #line 12863 "configure"
12863 #include "confdefs.h"
12864 #include <nlist.h>
12865 EOF
12866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12867 { (eval echo configure:12868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12869 if test -z "$ac_err"; then
12870   rm -rf conftest*
12871   eval "ac_cv_header_$ac_safe=yes"
12872 else
12873   echo "$ac_err" >&5
12874   echo "configure: failed program was:" >&5
12875   cat conftest.$ac_ext >&5
12876   rm -rf conftest*
12877   eval "ac_cv_header_$ac_safe=no"
12878 fi
12879 rm -f conftest*
12880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12881   echo "$ac_t""yes" 1>&6
12882   { test "$extra_verbose" = "yes" && cat << \EOF
12883     Defining NLIST_STRUCT
12884 EOF
12885 cat >> confdefs.h <<\EOF
12886 #define NLIST_STRUCT 1
12887 EOF
12888 }
12889
12890 else
12891   echo "$ac_t""no" 1>&6
12892 fi
12893
12894
12895
12896 echo "checking "for sound support"" 1>&6
12897 echo "configure:12898: checking "for sound support"" >&5
12898 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12899
12900 if test "$with_native_sound" != "no"; then
12901     if test -n "$native_sound_lib"; then
12902     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12903 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12904 echo "configure:12905: checking for multimedia/audio_device.h" >&5
12905
12906 cat > conftest.$ac_ext <<EOF
12907 #line 12908 "configure"
12908 #include "confdefs.h"
12909 #include <multimedia/audio_device.h>
12910 EOF
12911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12912 { (eval echo configure:12913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12914 if test -z "$ac_err"; then
12915   rm -rf conftest*
12916   eval "ac_cv_header_$ac_safe=yes"
12917 else
12918   echo "$ac_err" >&5
12919   echo "configure: failed program was:" >&5
12920   cat conftest.$ac_ext >&5
12921   rm -rf conftest*
12922   eval "ac_cv_header_$ac_safe=no"
12923 fi
12924 rm -f conftest*
12925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12926   echo "$ac_t""yes" 1>&6
12927   sound_found=yes sound_cflags=""
12928       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12929    echo "    xemacs will be linked with \"sunplay.o\""
12930  fi
12931 else
12932   echo "$ac_t""no" 1>&6
12933 fi
12934
12935   fi
12936
12937     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12938     sound_found=yes
12939     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12940    echo "    xemacs will be linked with \"sunplay.o\""
12941  fi
12942     if test -d "/usr/demo/SOUND/include"
12943       then sound_cflags="-I/usr/demo/SOUND/include"
12944       else sound_cflags="-I/usr/demo/SOUND"
12945     fi
12946     if test -z "$native_sound_lib" ; then
12947       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12948         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12949         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12950       fi
12951     fi
12952   fi
12953
12954     if test -z "$sound_found"; then
12955     case "$canonical" in
12956     *-sgi-* )
12957       if test -z "$native_sound_lib"; then
12958         
12959 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12960 echo "configure:12961: checking for ALopenport in -laudio" >&5
12961 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12962
12963 xe_check_libs=" -laudio "
12964 cat > conftest.$ac_ext <<EOF
12965 #line 12966 "configure"
12966 #include "confdefs.h"
12967 /* Override any gcc2 internal prototype to avoid an error.  */
12968 /* We use char because int might match the return type of a gcc2
12969     builtin and then its argument prototype would still apply.  */
12970 char ALopenport();
12971
12972 int main() {
12973 ALopenport()
12974 ; return 0; }
12975 EOF
12976 if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12977   rm -rf conftest*
12978   eval "ac_cv_lib_$ac_lib_var=yes"
12979 else
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -rf conftest*
12983   eval "ac_cv_lib_$ac_lib_var=no"
12984 fi
12985 rm -f conftest*
12986 xe_check_libs=""
12987
12988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12989   echo "$ac_t""yes" 1>&6
12990   native_sound_lib="-laudio"
12991 else
12992   echo "$ac_t""no" 1>&6
12993 fi
12994
12995
12996       fi
12997       if test -n "$native_sound_lib"; then
12998         sound_found=yes sound_cflags=""
12999         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13000    echo "    xemacs will be linked with \"sgiplay.o\""
13001  fi
13002       fi ;;
13003     hppa*-hp-hpux* )
13004       if test -z "$native_sound_lib"; then
13005         
13006 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13007 echo "configure:13008: checking for AOpenAudio in -lAlib" >&5
13008 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13009
13010 xe_check_libs=" -lAlib "
13011 cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 /* Override any gcc2 internal prototype to avoid an error.  */
13015 /* We use char because int might match the return type of a gcc2
13016     builtin and then its argument prototype would still apply.  */
13017 char AOpenAudio();
13018
13019 int main() {
13020 AOpenAudio()
13021 ; return 0; }
13022 EOF
13023 if { (eval echo configure:13024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13024   rm -rf conftest*
13025   eval "ac_cv_lib_$ac_lib_var=yes"
13026 else
13027   echo "configure: failed program was:" >&5
13028   cat conftest.$ac_ext >&5
13029   rm -rf conftest*
13030   eval "ac_cv_lib_$ac_lib_var=no"
13031 fi
13032 rm -f conftest*
13033 xe_check_libs=""
13034
13035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13036   echo "$ac_t""yes" 1>&6
13037   native_sound_lib="-lAlib"
13038 else
13039   echo "$ac_t""no" 1>&6
13040 fi
13041
13042
13043       fi
13044       if test -n "$native_sound_lib"; then
13045         sound_found=yes
13046         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13047    echo "    xemacs will be linked with \"hpplay.o\""
13048  fi
13049         if test "$GCC" = "yes" # Kludge city
13050           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13051           else sound_cflags="+e -I/usr/audio/examples"
13052         fi
13053       fi ;;
13054     esac
13055   fi
13056
13057     if test -z "$sound_found"; then
13058     if test "$with_msw" = "yes"; then
13059     sound_found=yes
13060     native_sound_lib=
13061     fi
13062   fi
13063
13064     if test -z "$sound_found"; then
13065     for dir in "machine" "sys" "linux"; do
13066       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13067 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13068 echo "configure:13069: checking for ${dir}/soundcard.h" >&5
13069
13070 cat > conftest.$ac_ext <<EOF
13071 #line 13072 "configure"
13072 #include "confdefs.h"
13073 #include <${dir}/soundcard.h>
13074 EOF
13075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13076 { (eval echo configure:13077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13078 if test -z "$ac_err"; then
13079   rm -rf conftest*
13080   eval "ac_cv_header_$ac_safe=yes"
13081 else
13082   echo "$ac_err" >&5
13083   echo "configure: failed program was:" >&5
13084   cat conftest.$ac_ext >&5
13085   rm -rf conftest*
13086   eval "ac_cv_header_$ac_safe=no"
13087 fi
13088 rm -f conftest*
13089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13090   echo "$ac_t""yes" 1>&6
13091   sound_found=yes
13092        need_miscplay=yes
13093         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13094    echo "    xemacs will be linked with \"linuxplay.o\""
13095  fi
13096         { test "$extra_verbose" = "yes" && cat << EOF
13097     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13098 EOF
13099 cat >> confdefs.h <<EOF
13100 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13101 EOF
13102 }
13103
13104         break
13105 else
13106   echo "$ac_t""no" 1>&6
13107 fi
13108
13109     done
13110   fi
13111
13112   test "$sound_found" = "yes" && with_native_sound=yes
13113 fi
13114
13115 if test "$with_native_sound" = "yes"; then
13116   { test "$extra_verbose" = "yes" && cat << \EOF
13117     Defining HAVE_NATIVE_SOUND
13118 EOF
13119 cat >> confdefs.h <<\EOF
13120 #define HAVE_NATIVE_SOUND 1
13121 EOF
13122 }
13123
13124   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13125 fi
13126
13127 if test "$with_nas_sound" != "no"; then
13128   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13129 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13130 echo "configure:13131: checking for audio/audiolib.h" >&5
13131
13132 cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135 #include <audio/audiolib.h>
13136 EOF
13137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13138 { (eval echo configure:13139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13140 if test -z "$ac_err"; then
13141   rm -rf conftest*
13142   eval "ac_cv_header_$ac_safe=yes"
13143 else
13144   echo "$ac_err" >&5
13145   echo "configure: failed program was:" >&5
13146   cat conftest.$ac_ext >&5
13147   rm -rf conftest*
13148   eval "ac_cv_header_$ac_safe=no"
13149 fi
13150 rm -f conftest*
13151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13152   echo "$ac_t""yes" 1>&6
13153   
13154     
13155 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13156 echo "configure:13157: checking for AuOpenServer in -laudio" >&5
13157 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13158
13159 xe_check_libs=" -laudio "
13160 cat > conftest.$ac_ext <<EOF
13161 #line 13162 "configure"
13162 #include "confdefs.h"
13163 /* Override any gcc2 internal prototype to avoid an error.  */
13164 /* We use char because int might match the return type of a gcc2
13165     builtin and then its argument prototype would still apply.  */
13166 char AuOpenServer();
13167
13168 int main() {
13169 AuOpenServer()
13170 ; return 0; }
13171 EOF
13172 if { (eval echo configure:13173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13173   rm -rf conftest*
13174   eval "ac_cv_lib_$ac_lib_var=yes"
13175 else
13176   echo "configure: failed program was:" >&5
13177   cat conftest.$ac_ext >&5
13178   rm -rf conftest*
13179   eval "ac_cv_lib_$ac_lib_var=no"
13180 fi
13181 rm -f conftest*
13182 xe_check_libs=""
13183
13184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13185   echo "$ac_t""yes" 1>&6
13186   have_nas_sound=yes
13187 else
13188   echo "$ac_t""no" 1>&6
13189 fi
13190
13191
13192 else
13193   echo "$ac_t""no" 1>&6
13194 fi
13195
13196   if test "$have_nas_sound" = "yes"; then
13197     with_nas_sound=yes
13198     { test "$extra_verbose" = "yes" && cat << \EOF
13199     Defining HAVE_NAS_SOUND
13200 EOF
13201 cat >> confdefs.h <<\EOF
13202 #define HAVE_NAS_SOUND 1
13203 EOF
13204 }
13205
13206     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13207    echo "    xemacs will be linked with \"nas.o\""
13208  fi
13209     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13210             cat > conftest.$ac_ext <<EOF
13211 #line 13212 "configure"
13212 #include "confdefs.h"
13213 #include <audio/Xtutil.h>
13214 EOF
13215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13216   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13217   :
13218 else
13219   rm -rf conftest*
13220   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13221     Defining NAS_NO_ERROR_JUMP
13222 EOF
13223 cat >> confdefs.h <<\EOF
13224 #define NAS_NO_ERROR_JUMP 1
13225 EOF
13226 }
13227
13228 fi
13229 rm -f conftest*
13230
13231   else
13232     test "$with_nas_sound" = "yes" && \
13233       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13234     with_nas_sound=no
13235   fi
13236 fi
13237
13238 if test "$with_esd_sound" != "no"; then
13239   # Extract the first word of "esd-config", so it can be a program name with args.
13240 set dummy esd-config; ac_word=$2
13241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13242 echo "configure:13243: checking for $ac_word" >&5
13243
13244 if test -n "$have_esd_config"; then
13245   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13246 else
13247   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13248   ac_dummy="$PATH"
13249   for ac_dir in $ac_dummy; do
13250     test -z "$ac_dir" && ac_dir=.
13251     if test -f $ac_dir/$ac_word; then
13252       ac_cv_prog_have_esd_config="yes"
13253       break
13254     fi
13255   done
13256   IFS="$ac_save_ifs"
13257   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13258 fi
13259 have_esd_config="$ac_cv_prog_have_esd_config"
13260 if test -n "$have_esd_config"; then
13261   echo "$ac_t""$have_esd_config" 1>&6
13262 else
13263   echo "$ac_t""no" 1>&6
13264 fi
13265
13266   if test "$have_esd_config" = "yes"; then
13267     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13268     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
13269     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13270     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13271 echo "configure:13272: checking for esd_play_stream" >&5
13272
13273 cat > conftest.$ac_ext <<EOF
13274 #line 13275 "configure"
13275 #include "confdefs.h"
13276 /* System header to define __stub macros and hopefully few prototypes,
13277     which can conflict with char esd_play_stream(); below.  */
13278 #include <assert.h>
13279 /* Override any gcc2 internal prototype to avoid an error.  */
13280 /* We use char because int might match the return type of a gcc2
13281     builtin and then its argument prototype would still apply.  */
13282 char esd_play_stream();
13283
13284 int main() {
13285
13286 /* The GNU C library defines this for functions which it implements
13287     to always fail with ENOSYS.  Some functions are actually named
13288     something starting with __ and the normal name is an alias.  */
13289 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13290 choke me
13291 #else
13292 esd_play_stream();
13293 #endif
13294
13295 ; return 0; }
13296 EOF
13297 if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13298   rm -rf conftest*
13299   eval "ac_cv_func_esd_play_stream=yes"
13300 else
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -rf conftest*
13304   eval "ac_cv_func_esd_play_stream=no"
13305 fi
13306 rm -f conftest*
13307
13308 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13309   echo "$ac_t""yes" 1>&6
13310   have_esd_sound=yes
13311 else
13312   echo "$ac_t""no" 1>&6
13313 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13314 fi
13315
13316   fi
13317
13318   if test "$have_esd_sound" = "yes"; then
13319     with_esd_sound=yes
13320     need_miscplay=yes
13321     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13322    echo "    xemacs will be linked with \"esd.o\""
13323  fi
13324     { test "$extra_verbose" = "yes" && cat << \EOF
13325     Defining HAVE_ESD_SOUND
13326 EOF
13327 cat >> confdefs.h <<\EOF
13328 #define HAVE_ESD_SOUND 1
13329 EOF
13330 }
13331
13332   else
13333     test "$with_esd_sound" = "yes" && \
13334       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13335     with_esd_sound=no
13336   fi
13337 fi
13338
13339 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13340    echo "    xemacs will be linked with \"miscplay.o\""
13341  fi
13342
13343
13344 test -z "$with_tty" && with_tty=yes
13345
13346 if test "$with_tty" = "yes"  ; then
13347   echo "checking for TTY-related features" 1>&6
13348 echo "configure:13349: checking for TTY-related features" >&5
13349   { test "$extra_verbose" = "yes" && cat << \EOF
13350     Defining HAVE_TTY
13351 EOF
13352 cat >> confdefs.h <<\EOF
13353 #define HAVE_TTY 1
13354 EOF
13355 }
13356
13357   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
13358    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\""
13359  fi
13360
13361     if test -z "$with_ncurses"; then
13362     
13363 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13364 echo "configure:13365: checking for tgetent in -lncurses" >&5
13365 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13366
13367 xe_check_libs=" -lncurses "
13368 cat > conftest.$ac_ext <<EOF
13369 #line 13370 "configure"
13370 #include "confdefs.h"
13371 /* Override any gcc2 internal prototype to avoid an error.  */
13372 /* We use char because int might match the return type of a gcc2
13373     builtin and then its argument prototype would still apply.  */
13374 char tgetent();
13375
13376 int main() {
13377 tgetent()
13378 ; return 0; }
13379 EOF
13380 if { (eval echo configure:13381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13381   rm -rf conftest*
13382   eval "ac_cv_lib_$ac_lib_var=yes"
13383 else
13384   echo "configure: failed program was:" >&5
13385   cat conftest.$ac_ext >&5
13386   rm -rf conftest*
13387   eval "ac_cv_lib_$ac_lib_var=no"
13388 fi
13389 rm -f conftest*
13390 xe_check_libs=""
13391
13392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13393   echo "$ac_t""yes" 1>&6
13394   with_ncurses=yes
13395 else
13396   echo "$ac_t""no" 1>&6
13397 with_ncurses=no
13398 fi
13399
13400
13401   fi
13402   if test "$with_ncurses" = "yes"; then
13403     { test "$extra_verbose" = "yes" && cat << \EOF
13404     Defining HAVE_NCURSES
13405 EOF
13406 cat >> confdefs.h <<\EOF
13407 #define HAVE_NCURSES 1
13408 EOF
13409 }
13410
13411     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13412 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13413 echo "configure:13414: checking for ncurses/curses.h" >&5
13414
13415 cat > conftest.$ac_ext <<EOF
13416 #line 13417 "configure"
13417 #include "confdefs.h"
13418 #include <ncurses/curses.h>
13419 EOF
13420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13421 { (eval echo configure:13422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13423 if test -z "$ac_err"; then
13424   rm -rf conftest*
13425   eval "ac_cv_header_$ac_safe=yes"
13426 else
13427   echo "$ac_err" >&5
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   eval "ac_cv_header_$ac_safe=no"
13432 fi
13433 rm -f conftest*
13434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13435   echo "$ac_t""yes" 1>&6
13436   curses_h_file=ncurses/curses.h
13437 else
13438   echo "$ac_t""no" 1>&6
13439 fi
13440
13441     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13442 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13443 echo "configure:13444: checking for ncurses/term.h" >&5
13444
13445 cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 #include <ncurses/term.h>
13449 EOF
13450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13451 { (eval echo configure:13452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13453 if test -z "$ac_err"; then
13454   rm -rf conftest*
13455   eval "ac_cv_header_$ac_safe=yes"
13456 else
13457   echo "$ac_err" >&5
13458   echo "configure: failed program was:" >&5
13459   cat conftest.$ac_ext >&5
13460   rm -rf conftest*
13461   eval "ac_cv_header_$ac_safe=no"
13462 fi
13463 rm -f conftest*
13464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13465   echo "$ac_t""yes" 1>&6
13466   term_h_file=ncurses/term.h
13467 else
13468   echo "$ac_t""no" 1>&6
13469 fi
13470
13471     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13472    echo "    xemacs will be linked with \"terminfo.o\""
13473  fi
13474     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13475
13476     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13477                         save_c_switch_site="$c_switch_site"
13478       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13479       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13480 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13481 echo "configure:13482: checking for ncurses/curses.h" >&5
13482
13483 cat > conftest.$ac_ext <<EOF
13484 #line 13485 "configure"
13485 #include "confdefs.h"
13486 #include <ncurses/curses.h>
13487 EOF
13488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13489 { (eval echo configure:13490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13491 if test -z "$ac_err"; then
13492   rm -rf conftest*
13493   eval "ac_cv_header_$ac_safe=yes"
13494 else
13495   echo "$ac_err" >&5
13496   echo "configure: failed program was:" >&5
13497   cat conftest.$ac_ext >&5
13498   rm -rf conftest*
13499   eval "ac_cv_header_$ac_safe=no"
13500 fi
13501 rm -f conftest*
13502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13503   echo "$ac_t""yes" 1>&6
13504   curses_h_file=ncurses/curses.h
13505 else
13506   echo "$ac_t""no" 1>&6
13507 fi
13508
13509       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13510         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13511         else c_switch_site="$save_c_switch_site"
13512       fi
13513     fi
13514   else         if test "$have_terminfo" = "yes"; then
13515       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13516    echo "    xemacs will be linked with \"terminfo.o\""
13517  fi
13518       if test -n "$libs_termcap"; then
13519         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13520       else
13521         for lib in curses termlib termcap; do
13522           
13523 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13524 echo "configure:13525: checking for tgetent in -l$lib" >&5
13525 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13526
13527 xe_check_libs=" -l$lib "
13528 cat > conftest.$ac_ext <<EOF
13529 #line 13530 "configure"
13530 #include "confdefs.h"
13531 /* Override any gcc2 internal prototype to avoid an error.  */
13532 /* We use char because int might match the return type of a gcc2
13533     builtin and then its argument prototype would still apply.  */
13534 char tgetent();
13535
13536 int main() {
13537 tgetent()
13538 ; return 0; }
13539 EOF
13540 if { (eval echo configure:13541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13541   rm -rf conftest*
13542   eval "ac_cv_lib_$ac_lib_var=yes"
13543 else
13544   echo "configure: failed program was:" >&5
13545   cat conftest.$ac_ext >&5
13546   rm -rf conftest*
13547   eval "ac_cv_lib_$ac_lib_var=no"
13548 fi
13549 rm -f conftest*
13550 xe_check_libs=""
13551
13552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13553   echo "$ac_t""yes" 1>&6
13554   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13555 else
13556   echo "$ac_t""no" 1>&6
13557 fi
13558
13559
13560         done
13561       fi
13562     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13563    echo "    xemacs will be linked with \"tparam.o\""
13564  fi
13565                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13566       if test -n "$libs_termcap"; then
13567         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13568       else
13569         
13570 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13571 echo "configure:13572: checking for tgetent in -lcurses" >&5
13572 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13573
13574 xe_check_libs=" -lcurses "
13575 cat > conftest.$ac_ext <<EOF
13576 #line 13577 "configure"
13577 #include "confdefs.h"
13578 /* Override any gcc2 internal prototype to avoid an error.  */
13579 /* We use char because int might match the return type of a gcc2
13580     builtin and then its argument prototype would still apply.  */
13581 char tgetent();
13582
13583 int main() {
13584 tgetent()
13585 ; return 0; }
13586 EOF
13587 if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13588   rm -rf conftest*
13589   eval "ac_cv_lib_$ac_lib_var=yes"
13590 else
13591   echo "configure: failed program was:" >&5
13592   cat conftest.$ac_ext >&5
13593   rm -rf conftest*
13594   eval "ac_cv_lib_$ac_lib_var=no"
13595 fi
13596 rm -f conftest*
13597 xe_check_libs=""
13598
13599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13600   echo "$ac_t""yes" 1>&6
13601   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13602 else
13603   echo "$ac_t""no" 1>&6
13604 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13605 echo "configure:13606: checking for tgetent in -ltermcap" >&5
13606 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13607
13608 xe_check_libs=" -ltermcap "
13609 cat > conftest.$ac_ext <<EOF
13610 #line 13611 "configure"
13611 #include "confdefs.h"
13612 /* Override any gcc2 internal prototype to avoid an error.  */
13613 /* We use char because int might match the return type of a gcc2
13614     builtin and then its argument prototype would still apply.  */
13615 char tgetent();
13616
13617 int main() {
13618 tgetent()
13619 ; return 0; }
13620 EOF
13621 if { (eval echo configure:13622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13622   rm -rf conftest*
13623   eval "ac_cv_lib_$ac_lib_var=yes"
13624 else
13625   echo "configure: failed program was:" >&5
13626   cat conftest.$ac_ext >&5
13627   rm -rf conftest*
13628   eval "ac_cv_lib_$ac_lib_var=no"
13629 fi
13630 rm -f conftest*
13631 xe_check_libs=""
13632
13633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13634   echo "$ac_t""yes" 1>&6
13635   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13636 else
13637   echo "$ac_t""no" 1>&6
13638 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13639    echo "    xemacs will be linked with \"termcap.o\""
13640  fi
13641 fi
13642
13643
13644 fi
13645
13646
13647       fi
13648     fi
13649   fi
13650   { test "$extra_verbose" = "yes" && cat << EOF
13651     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13652 EOF
13653 cat >> confdefs.h <<EOF
13654 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13655 EOF
13656 }
13657
13658   { test "$extra_verbose" = "yes" && cat << EOF
13659     Defining TERM_H_FILE = "${term_h_file-term.h}"
13660 EOF
13661 cat >> confdefs.h <<EOF
13662 #define TERM_H_FILE "${term_h_file-term.h}"
13663 EOF
13664 }
13665
13666
13667     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13668 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13669 echo "configure:13670: checking for gpm.h" >&5
13670
13671 cat > conftest.$ac_ext <<EOF
13672 #line 13673 "configure"
13673 #include "confdefs.h"
13674 #include <gpm.h>
13675 EOF
13676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13677 { (eval echo configure:13678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13679 if test -z "$ac_err"; then
13680   rm -rf conftest*
13681   eval "ac_cv_header_$ac_safe=yes"
13682 else
13683   echo "$ac_err" >&5
13684   echo "configure: failed program was:" >&5
13685   cat conftest.$ac_ext >&5
13686   rm -rf conftest*
13687   eval "ac_cv_header_$ac_safe=no"
13688 fi
13689 rm -f conftest*
13690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13691   echo "$ac_t""yes" 1>&6
13692   :
13693 else
13694   echo "$ac_t""no" 1>&6
13695 with_gpm=no
13696 fi
13697  }
13698   test -z "$with_gpm" && { 
13699 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13700 echo "configure:13701: checking for Gpm_Open in -lgpm" >&5
13701 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13702
13703 xe_check_libs=" -lgpm "
13704 cat > conftest.$ac_ext <<EOF
13705 #line 13706 "configure"
13706 #include "confdefs.h"
13707 /* Override any gcc2 internal prototype to avoid an error.  */
13708 /* We use char because int might match the return type of a gcc2
13709     builtin and then its argument prototype would still apply.  */
13710 char Gpm_Open();
13711
13712 int main() {
13713 Gpm_Open()
13714 ; return 0; }
13715 EOF
13716 if { (eval echo configure:13717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13717   rm -rf conftest*
13718   eval "ac_cv_lib_$ac_lib_var=yes"
13719 else
13720   echo "configure: failed program was:" >&5
13721   cat conftest.$ac_ext >&5
13722   rm -rf conftest*
13723   eval "ac_cv_lib_$ac_lib_var=no"
13724 fi
13725 rm -f conftest*
13726 xe_check_libs=""
13727
13728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13729   echo "$ac_t""yes" 1>&6
13730   with_gpm=yes
13731 else
13732   echo "$ac_t""no" 1>&6
13733 with_gpm=no
13734 fi
13735
13736  }
13737   if test "$with_gpm" = "yes"; then
13738     { test "$extra_verbose" = "yes" && cat << \EOF
13739     Defining HAVE_GPM
13740 EOF
13741 cat >> confdefs.h <<\EOF
13742 #define HAVE_GPM 1
13743 EOF
13744 }
13745
13746     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13747    echo "    xemacs will be linked with \"gpmevent.o\""
13748  fi
13749     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13750   fi
13751
13752 else   for feature in ncurses gpm; do
13753     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13754       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13755     fi
13756     eval "with_${feature}=no"
13757   done
13758 fi 
13759 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13760    echo "    xemacs will be linked with \"event-unixoid.o\""
13761  fi
13762
13763
13764 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13765   != "no no no" && echo "checking for database support" 1>&6
13766 echo "configure:13767: checking for database support" >&5
13767
13768 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13769   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13770 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13771 echo "configure:13772: checking for ndbm.h" >&5
13772
13773 cat > conftest.$ac_ext <<EOF
13774 #line 13775 "configure"
13775 #include "confdefs.h"
13776 #include <ndbm.h>
13777 EOF
13778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13779 { (eval echo configure:13780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13781 if test -z "$ac_err"; then
13782   rm -rf conftest*
13783   eval "ac_cv_header_$ac_safe=yes"
13784 else
13785   echo "$ac_err" >&5
13786   echo "configure: failed program was:" >&5
13787   cat conftest.$ac_ext >&5
13788   rm -rf conftest*
13789   eval "ac_cv_header_$ac_safe=no"
13790 fi
13791 rm -f conftest*
13792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13793   echo "$ac_t""yes" 1>&6
13794   :
13795 else
13796   echo "$ac_t""no" 1>&6
13797
13798     test "$with_database_gdbm" = "yes" -o \
13799          "$with_database_dbm"  = "yes" && \
13800       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13801     with_database_gdbm=no with_database_dbm=no
13802 fi
13803
13804 fi
13805
13806 if test "$with_database_gdbm" != "no"; then
13807   
13808 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13809 echo "configure:13810: checking for dbm_open in -lgdbm" >&5
13810 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13811
13812 xe_check_libs=" -lgdbm "
13813 cat > conftest.$ac_ext <<EOF
13814 #line 13815 "configure"
13815 #include "confdefs.h"
13816 /* Override any gcc2 internal prototype to avoid an error.  */
13817 /* We use char because int might match the return type of a gcc2
13818     builtin and then its argument prototype would still apply.  */
13819 char dbm_open();
13820
13821 int main() {
13822 dbm_open()
13823 ; return 0; }
13824 EOF
13825 if { (eval echo configure:13826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13826   rm -rf conftest*
13827   eval "ac_cv_lib_$ac_lib_var=yes"
13828 else
13829   echo "configure: failed program was:" >&5
13830   cat conftest.$ac_ext >&5
13831   rm -rf conftest*
13832   eval "ac_cv_lib_$ac_lib_var=no"
13833 fi
13834 rm -f conftest*
13835 xe_check_libs=""
13836
13837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13838   echo "$ac_t""yes" 1>&6
13839   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13840 else
13841   echo "$ac_t""no" 1>&6
13842 if test "$with_database_gdbm" = "yes"; then
13843      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13844    fi
13845    with_database_gdbm=no
13846 fi
13847
13848
13849 fi
13850
13851 if test "$with_database_dbm" != "no"; then
13852   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13853 echo "configure:13854: checking for dbm_open" >&5
13854
13855 cat > conftest.$ac_ext <<EOF
13856 #line 13857 "configure"
13857 #include "confdefs.h"
13858 /* System header to define __stub macros and hopefully few prototypes,
13859     which can conflict with char dbm_open(); below.  */
13860 #include <assert.h>
13861 /* Override any gcc2 internal prototype to avoid an error.  */
13862 /* We use char because int might match the return type of a gcc2
13863     builtin and then its argument prototype would still apply.  */
13864 char dbm_open();
13865
13866 int main() {
13867
13868 /* The GNU C library defines this for functions which it implements
13869     to always fail with ENOSYS.  Some functions are actually named
13870     something starting with __ and the normal name is an alias.  */
13871 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13872 choke me
13873 #else
13874 dbm_open();
13875 #endif
13876
13877 ; return 0; }
13878 EOF
13879 if { (eval echo configure:13880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13880   rm -rf conftest*
13881   eval "ac_cv_func_dbm_open=yes"
13882 else
13883   echo "configure: failed program was:" >&5
13884   cat conftest.$ac_ext >&5
13885   rm -rf conftest*
13886   eval "ac_cv_func_dbm_open=no"
13887 fi
13888 rm -f conftest*
13889
13890 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13891   echo "$ac_t""yes" 1>&6
13892   with_database_dbm=yes libdbm=
13893 else
13894   echo "$ac_t""no" 1>&6
13895
13896     
13897 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13898 echo "configure:13899: checking for dbm_open in -ldbm" >&5
13899 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13900
13901 xe_check_libs=" -ldbm "
13902 cat > conftest.$ac_ext <<EOF
13903 #line 13904 "configure"
13904 #include "confdefs.h"
13905 /* Override any gcc2 internal prototype to avoid an error.  */
13906 /* We use char because int might match the return type of a gcc2
13907     builtin and then its argument prototype would still apply.  */
13908 char dbm_open();
13909
13910 int main() {
13911 dbm_open()
13912 ; return 0; }
13913 EOF
13914 if { (eval echo configure:13915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13915   rm -rf conftest*
13916   eval "ac_cv_lib_$ac_lib_var=yes"
13917 else
13918   echo "configure: failed program was:" >&5
13919   cat conftest.$ac_ext >&5
13920   rm -rf conftest*
13921   eval "ac_cv_lib_$ac_lib_var=no"
13922 fi
13923 rm -f conftest*
13924 xe_check_libs=""
13925
13926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13927   echo "$ac_t""yes" 1>&6
13928   with_database_dbm=yes libdbm=-ldbm
13929 else
13930   echo "$ac_t""no" 1>&6
13931 test "$with_database_dbm" = "yes" && \
13932         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13933       with_database_dbm=no
13934 fi
13935
13936
13937 fi
13938
13939 fi
13940
13941 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13942 test "$with_database_gdbm" = "yes" -o \
13943      "$with_database_dbm"  = "yes" && \
13944   { test "$extra_verbose" = "yes" && cat << \EOF
13945     Defining HAVE_DBM
13946 EOF
13947 cat >> confdefs.h <<\EOF
13948 #define HAVE_DBM 1
13949 EOF
13950 }
13951
13952
13953 if test "$with_database_berkdb" != "no"; then
13954   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13955 echo "configure:13956: checking for Berkeley db.h" >&5
13956   for header in "db/db.h" "db.h"; do
13957     cat > conftest.$ac_ext <<EOF
13958 #line 13959 "configure"
13959 #include "confdefs.h"
13960
13961 #include <stdlib.h>
13962 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13963 #ifdef HAVE_INTTYPES_H
13964 #define __BIT_TYPES_DEFINED__
13965 #include <inttypes.h>
13966 typedef uint8_t  u_int8_t;
13967 typedef uint16_t u_int16_t;
13968 typedef uint32_t u_int32_t;
13969 #ifdef WE_DONT_NEED_QUADS
13970 typedef uint64_t u_int64_t;
13971 #endif
13972 #endif
13973 #endif
13974 #include <$header>
13975
13976 int main() {
13977
13978 ; return 0; }
13979 EOF
13980 if { (eval echo configure:13981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13981   rm -rf conftest*
13982   db_h_file="$header"; break
13983 else
13984   echo "configure: failed program was:" >&5
13985   cat conftest.$ac_ext >&5
13986 fi
13987 rm -f conftest*
13988   done
13989   if test -z "$db_h_file"
13990   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13991   else echo "$ac_t""$db_h_file" 1>&6
13992   fi
13993
13994   if test "$with_database_berkdb" != "no"; then
13995     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13996 echo "configure:13997: checking for Berkeley DB version" >&5
13997     cat > conftest.$ac_ext <<EOF
13998 #line 13999 "configure"
13999 #include "confdefs.h"
14000 #include <$db_h_file>
14001 #if DB_VERSION_MAJOR > 1
14002 yes
14003 #endif
14004
14005 EOF
14006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14007   egrep "yes" >/dev/null 2>&1; then
14008   rm -rf conftest*
14009   cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012 #include <$db_h_file>
14013 #if DB_VERSION_MAJOR > 2
14014 yes
14015 #endif
14016
14017 EOF
14018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14019   egrep "yes" >/dev/null 2>&1; then
14020   rm -rf conftest*
14021   echo "$ac_t""3" 1>&6; dbfunc=db_create
14022 else
14023   rm -rf conftest*
14024   
14025     echo "$ac_t""2" 1>&6; dbfunc=db_open
14026 fi
14027 rm -f conftest*
14028
14029 else
14030   rm -rf conftest*
14031   
14032     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14033 fi
14034 rm -f conftest*
14035
14036     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14037 echo "configure:14038: checking for $dbfunc" >&5
14038
14039 cat > conftest.$ac_ext <<EOF
14040 #line 14041 "configure"
14041 #include "confdefs.h"
14042 /* System header to define __stub macros and hopefully few prototypes,
14043     which can conflict with char $dbfunc(); below.  */
14044 #include <assert.h>
14045 /* Override any gcc2 internal prototype to avoid an error.  */
14046 /* We use char because int might match the return type of a gcc2
14047     builtin and then its argument prototype would still apply.  */
14048 char $dbfunc();
14049
14050 int main() {
14051
14052 /* The GNU C library defines this for functions which it implements
14053     to always fail with ENOSYS.  Some functions are actually named
14054     something starting with __ and the normal name is an alias.  */
14055 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14056 choke me
14057 #else
14058 $dbfunc();
14059 #endif
14060
14061 ; return 0; }
14062 EOF
14063 if { (eval echo configure:14064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14064   rm -rf conftest*
14065   eval "ac_cv_func_$dbfunc=yes"
14066 else
14067   echo "configure: failed program was:" >&5
14068   cat conftest.$ac_ext >&5
14069   rm -rf conftest*
14070   eval "ac_cv_func_$dbfunc=no"
14071 fi
14072 rm -f conftest*
14073
14074 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14075   echo "$ac_t""yes" 1>&6
14076   with_database_berkdb=yes need_libdb=no
14077 else
14078   echo "$ac_t""no" 1>&6
14079
14080     
14081 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14082 echo "configure:14083: checking for $dbfunc in -ldb" >&5
14083 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14084
14085 xe_check_libs=" -ldb "
14086 cat > conftest.$ac_ext <<EOF
14087 #line 14088 "configure"
14088 #include "confdefs.h"
14089 /* Override any gcc2 internal prototype to avoid an error.  */
14090 /* We use char because int might match the return type of a gcc2
14091     builtin and then its argument prototype would still apply.  */
14092 char $dbfunc();
14093
14094 int main() {
14095 $dbfunc()
14096 ; return 0; }
14097 EOF
14098 if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14099   rm -rf conftest*
14100   eval "ac_cv_lib_$ac_lib_var=yes"
14101 else
14102   echo "configure: failed program was:" >&5
14103   cat conftest.$ac_ext >&5
14104   rm -rf conftest*
14105   eval "ac_cv_lib_$ac_lib_var=no"
14106 fi
14107 rm -f conftest*
14108 xe_check_libs=""
14109
14110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14111   echo "$ac_t""yes" 1>&6
14112   with_database_berkdb=yes need_libdb=yes
14113 else
14114   echo "$ac_t""no" 1>&6
14115 fi
14116
14117
14118 fi
14119
14120   fi
14121
14122   if test "$with_database_berkdb" = "yes"; then
14123     { test "$extra_verbose" = "yes" && cat << EOF
14124     Defining DB_H_FILE = "$db_h_file"
14125 EOF
14126 cat >> confdefs.h <<EOF
14127 #define DB_H_FILE "$db_h_file"
14128 EOF
14129 }
14130
14131     { test "$extra_verbose" = "yes" && cat << \EOF
14132     Defining HAVE_BERKELEY_DB
14133 EOF
14134 cat >> confdefs.h <<\EOF
14135 #define HAVE_BERKELEY_DB 1
14136 EOF
14137 }
14138
14139     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14140   else with_database_berkdb=no
14141   fi
14142 fi
14143
14144 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14145      != "no no no"; then
14146   { test "$extra_verbose" = "yes" && cat << \EOF
14147     Defining HAVE_DATABASE
14148 EOF
14149 cat >> confdefs.h <<\EOF
14150 #define HAVE_DATABASE 1
14151 EOF
14152 }
14153
14154   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14155    echo "    xemacs will be linked with \"database.o\""
14156  fi
14157   if test "$with_utf_2000" = "yes"; then
14158     { test "$extra_verbose" = "yes" && cat << \EOF
14159     Defining HAVE_CHISE_CLIENT
14160 EOF
14161 cat >> confdefs.h <<\EOF
14162 #define HAVE_CHISE_CLIENT 1
14163 EOF
14164 }
14165
14166   fi
14167 fi
14168
14169 if test "$with_socks" = "yes"; then
14170   
14171 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14172 echo "configure:14173: checking for SOCKSinit in -lsocks" >&5
14173 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14174
14175 xe_check_libs=" -lsocks "
14176 cat > conftest.$ac_ext <<EOF
14177 #line 14178 "configure"
14178 #include "confdefs.h"
14179 /* Override any gcc2 internal prototype to avoid an error.  */
14180 /* We use char because int might match the return type of a gcc2
14181     builtin and then its argument prototype would still apply.  */
14182 char SOCKSinit();
14183
14184 int main() {
14185 SOCKSinit()
14186 ; return 0; }
14187 EOF
14188 if { (eval echo configure:14189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14189   rm -rf conftest*
14190   eval "ac_cv_lib_$ac_lib_var=yes"
14191 else
14192   echo "configure: failed program was:" >&5
14193   cat conftest.$ac_ext >&5
14194   rm -rf conftest*
14195   eval "ac_cv_lib_$ac_lib_var=no"
14196 fi
14197 rm -f conftest*
14198 xe_check_libs=""
14199
14200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14201   echo "$ac_t""yes" 1>&6
14202     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14203     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14204   { test "$extra_verbose" = "yes" && cat << EOF
14205     Defining $ac_tr_lib
14206 EOF
14207 cat >> confdefs.h <<EOF
14208 #define $ac_tr_lib 1
14209 EOF
14210 }
14211
14212   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14213
14214 else
14215   echo "$ac_t""no" 1>&6
14216 fi
14217
14218
14219   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14220     Defining HAVE_SOCKS
14221 EOF
14222 cat >> confdefs.h <<\EOF
14223 #define HAVE_SOCKS 1
14224 EOF
14225 }
14226
14227 fi
14228
14229 if test "$usage_tracking" = "yes"; then
14230   { test "$extra_verbose" = "yes" && cat << \EOF
14231     Defining USAGE_TRACKING
14232 EOF
14233 cat >> confdefs.h <<\EOF
14234 #define USAGE_TRACKING 1
14235 EOF
14236 }
14237
14238   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14239 fi
14240
14241 if test "$with_modules" != "no"; then
14242   echo "checking for module support" 1>&6
14243 echo "configure:14244: checking for module support" >&5
14244
14245     if test "$with_msw" = "yes"; then
14246     have_dl=yes;
14247   else
14248         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14249 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14250 echo "configure:14251: checking for dlfcn.h" >&5
14251
14252 cat > conftest.$ac_ext <<EOF
14253 #line 14254 "configure"
14254 #include "confdefs.h"
14255 #include <dlfcn.h>
14256 EOF
14257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14258 { (eval echo configure:14259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14260 if test -z "$ac_err"; then
14261   rm -rf conftest*
14262   eval "ac_cv_header_$ac_safe=yes"
14263 else
14264   echo "$ac_err" >&5
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   eval "ac_cv_header_$ac_safe=no"
14269 fi
14270 rm -f conftest*
14271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14272   echo "$ac_t""yes" 1>&6
14273   
14274       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14275 echo "configure:14276: checking for dlopen in -lc" >&5
14276       cat > conftest.$ac_ext <<EOF
14277 #line 14278 "configure"
14278 #include "confdefs.h"
14279 #include <dlfcn.h>
14280 int main() {
14281         dlopen ("", 0);
14282 ; return 0; }
14283 EOF
14284 if { (eval echo configure:14285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14285   rm -rf conftest*
14286    have_dl=yes 
14287 else
14288   echo "configure: failed program was:" >&5
14289   cat conftest.$ac_ext >&5
14290   rm -rf conftest*
14291   
14292       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14293 echo "configure:14294: checking for dlopen in -ldl" >&5
14294       ac_save_LIBS="$LIBS"
14295       LIBS="-ldl $LIBS"
14296       cat > conftest.$ac_ext <<EOF
14297 #line 14298 "configure"
14298 #include "confdefs.h"
14299 #include <dlfcn.h>
14300 int main() {
14301         dlopen ("", 0);
14302 ; return 0; }
14303 EOF
14304 if { (eval echo configure:14305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14305   rm -rf conftest*
14306    have_dl=yes 
14307 else
14308   echo "configure: failed program was:" >&5
14309   cat conftest.$ac_ext >&5
14310   rm -rf conftest*
14311   LIBS="$ac_save_LIBS"
14312 fi
14313 rm -f conftest*
14314       ac_save_LIBS=
14315 fi
14316 rm -f conftest*
14317 else
14318   echo "$ac_t""no" 1>&6
14319 fi
14320
14321     if test -n "$have_dl"; then
14322       { test "$extra_verbose" = "yes" && cat << \EOF
14323     Defining HAVE_DLOPEN
14324 EOF
14325 cat >> confdefs.h <<\EOF
14326 #define HAVE_DLOPEN 1
14327 EOF
14328 }
14329
14330     else
14331       
14332 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14333 echo "configure:14334: checking for shl_load in -ldld" >&5
14334 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14335
14336 xe_check_libs=" -ldld "
14337 cat > conftest.$ac_ext <<EOF
14338 #line 14339 "configure"
14339 #include "confdefs.h"
14340 /* Override any gcc2 internal prototype to avoid an error.  */
14341 /* We use char because int might match the return type of a gcc2
14342     builtin and then its argument prototype would still apply.  */
14343 char shl_load();
14344
14345 int main() {
14346 shl_load()
14347 ; return 0; }
14348 EOF
14349 if { (eval echo configure:14350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14350   rm -rf conftest*
14351   eval "ac_cv_lib_$ac_lib_var=yes"
14352 else
14353   echo "configure: failed program was:" >&5
14354   cat conftest.$ac_ext >&5
14355   rm -rf conftest*
14356   eval "ac_cv_lib_$ac_lib_var=no"
14357 fi
14358 rm -f conftest*
14359 xe_check_libs=""
14360
14361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14362   echo "$ac_t""yes" 1>&6
14363   libdl=dld have_dl=yes;
14364         { test "$extra_verbose" = "yes" && cat << \EOF
14365     Defining HAVE_SHL_LOAD
14366 EOF
14367 cat >> confdefs.h <<\EOF
14368 #define HAVE_SHL_LOAD 1
14369 EOF
14370 }
14371
14372 else
14373   echo "$ac_t""no" 1>&6
14374
14375 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14376 echo "configure:14377: checking for dld_init in -ldld" >&5
14377 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14378
14379 xe_check_libs=" -ldld "
14380 cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383 /* Override any gcc2 internal prototype to avoid an error.  */
14384 /* We use char because int might match the return type of a gcc2
14385     builtin and then its argument prototype would still apply.  */
14386 char dld_init();
14387
14388 int main() {
14389 dld_init()
14390 ; return 0; }
14391 EOF
14392 if { (eval echo configure:14393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14393   rm -rf conftest*
14394   eval "ac_cv_lib_$ac_lib_var=yes"
14395 else
14396   echo "configure: failed program was:" >&5
14397   cat conftest.$ac_ext >&5
14398   rm -rf conftest*
14399   eval "ac_cv_lib_$ac_lib_var=no"
14400 fi
14401 rm -f conftest*
14402 xe_check_libs=""
14403
14404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14405   echo "$ac_t""yes" 1>&6
14406   libdl=dld have_dl=yes;
14407         { test "$extra_verbose" = "yes" && cat << \EOF
14408     Defining HAVE_DLD_INIT
14409 EOF
14410 cat >> confdefs.h <<\EOF
14411 #define HAVE_DLD_INIT 1
14412 EOF
14413 }
14414
14415 else
14416   echo "$ac_t""no" 1>&6
14417 fi
14418
14419
14420 fi
14421
14422
14423     fi
14424   fi 
14425   if test -n "$have_dl"; then
14426         
14427 dll_ld=
14428 dll_ldflags=
14429 dll_cflags=
14430 dll_post=
14431 dll_ldo="-o"
14432 ld_dynamic_link_flags=
14433 xehost=$canonical
14434 xealias=$internal_configuration
14435
14436 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14437 echo "configure:14438: checking how to build dynamic libraries for ${xehost}" >&5
14438 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14439 case "$xehost" in
14440 *-*-linux-gnu*) ;;
14441 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14442 esac
14443
14444 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14445 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14446 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14447
14448 case "$xehost_os" in
14449 aix3*)
14450   # AIX sometimes has problems with the GCC collect2 program.  For some
14451   # reason, if we set the COLLECT_NAMES environment variable, the problems
14452   # vanish in a puff of smoke.
14453   if test "${COLLECT_NAMES+set}" != set; then
14454     COLLECT_NAMES=
14455     export COLLECT_NAMES
14456   fi
14457   ;;
14458 esac
14459
14460 # Now see if the compiler is really GCC.
14461 if test "$GCC" = "yes"; then
14462   XEGCC=yes
14463 else
14464   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14465 echo "configure:14466: checking checking whether we are using GNU C" >&5
14466   cat > conftest.$ac_ext <<EOF
14467 #line 14468 "configure"
14468 #include "confdefs.h"
14469
14470 #ifdef __GNUC__
14471   yes;
14472 #endif
14473
14474 EOF
14475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14476   egrep "yes" >/dev/null 2>&1; then
14477   rm -rf conftest*
14478   XEGCC=yes
14479 else
14480   rm -rf conftest*
14481   XEGCC=no
14482 fi
14483 rm -f conftest*
14484
14485   echo "$ac_t""${XEGCC}" 1>&6
14486 fi
14487
14488 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14489 echo "configure:14490: checking how to produce PIC code" >&5
14490 wl=
14491
14492 can_build_shared=yes
14493 if test "$XEGCC" = yes; then
14494   wl='-Wl,'
14495
14496   case "$xehost_os" in
14497   aix[3-9]* | irix[5-9]* | osf[3-9])
14498     # PIC is the default for these OSes.
14499     ;;
14500
14501   os2*)
14502     # We can build DLLs from non-PIC.
14503     ;;
14504   amigaos*)
14505     # FIXME: we need at least 68020 code to build shared libraries, but
14506     # adding the `-m68020' flag to GCC prevents building anything better,
14507     # like `-m68040'.
14508     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14509     ;;
14510   *cygwin* | *mingw* )
14511     # PIC is the default
14512     ;;
14513   *)
14514     dll_cflags='-fPIC'
14515     ;;
14516   esac
14517 else
14518   # PORTME Check for PIC flags for the system compiler.
14519   case "$xehost_os" in
14520   hpux9* | hpux1[0-9]*)
14521     # Is there a better link_static_flag that works with the bundled CC?
14522     wl='-Wl,'
14523     dll_cflags='+Z'
14524     ;;
14525
14526   irix[5-9]*)
14527     wl='-Wl,'
14528     # PIC (with -KPIC) is the default.
14529     ;;
14530
14531   os2*)
14532     # We can build DLLs from non-PIC.
14533     ;;
14534
14535   osf[3-9]*)
14536     # All OSF/1 code is PIC.
14537     wl='-Wl,'
14538     ;;
14539
14540   aix[3-9]*)
14541     # All AIX code is PIC.
14542     wl='-Wl,'
14543     ;;
14544
14545   sco3.2v5*)
14546     dll_cflags='-belf -Kpic'
14547     wl='-Wl,'
14548     ;;
14549
14550   unixware*)
14551     dll_cflags="-KPIC"
14552     wl="-Wl,"
14553     ;;
14554
14555   sysv4*)
14556     dll_cflags="-KPIC"
14557     wl="-Wl,"
14558     ;;
14559
14560   sysv5*)
14561     dll_cflags="-KPIC"
14562     wl="-Wl,"
14563     ;;
14564
14565   solaris2*)
14566     dll_cflags='-KPIC'
14567     wl='-Wl,'
14568     ;;
14569
14570   sunos4*)
14571     dll_cflags='-PIC'
14572     wl='-Qoption ld '
14573     ;;
14574
14575   uts4*)
14576     dll_cflags='-pic'
14577     ;;
14578
14579   *)
14580     can_build_shared=no
14581     ;;
14582   esac
14583 fi
14584
14585 if test -n "$dll_cflags"; then
14586   echo "$ac_t""${dll_cflags}" 1>&6
14587
14588   # Check to make sure the dll_cflags actually works.
14589   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14590 echo "configure:14591: checking if PIC flag ${dll_cflags} really works" >&5
14591   save_CFLAGS="$CFLAGS"
14592   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14593   cat > conftest.$ac_ext <<EOF
14594 #line 14595 "configure"
14595 #include "confdefs.h"
14596
14597 int main() {
14598 int x=0;
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14602   rm -rf conftest*
14603   
14604     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14605     # reports no error.  So, we need to grep stderr for (Bundled).
14606     if grep '(Bundled)' config.log >/dev/null; then
14607       echo "$ac_t""no" 1>&6
14608       can_build_shared=no
14609       dll_cflags=
14610     else
14611       echo "$ac_t""yes" 1>&6
14612     fi
14613 else
14614   echo "configure: failed program was:" >&5
14615   cat conftest.$ac_ext >&5
14616   rm -rf conftest*
14617   echo "$ac_t""no" 1>&6
14618     can_build_shared=no
14619     dll_cflags=
14620 fi
14621 rm -f conftest*
14622   CFLAGS="$save_CFLAGS"
14623 else
14624   echo "$ac_t""none" 1>&6
14625 fi
14626
14627 if test "$can_build_shared" = "yes"; then
14628 cc_produces_so=no
14629 xldf=
14630 xcldf=
14631 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14632 echo "configure:14633: checking if C compiler can produce shared libraries" >&5
14633 if test "$XEGCC" = yes; then
14634   xcldf="-shared"
14635   xldf="-shared"
14636 else # Not using GCC
14637   case "$xehost_os" in
14638     aix[3-9]*)
14639       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14640       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14641       ;;
14642
14643     freebsd2* | netbsd* | openbsd*)
14644       xldf="-Bshareable"
14645       xcldf="${wl}-Bshareable"
14646       ;;
14647
14648     freebsd3*)
14649       xcldf="-shared"
14650       ;;
14651
14652     hpux*)
14653       xldf="-b +s"
14654       xcldf="${wl}-b ${wl}+s"
14655       ;;
14656
14657     irix[5-9]* | osf[3-9]*)
14658       xcldf="${wl}-shared"
14659       xldf="-shared"
14660       ;;
14661
14662     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14663       xcldf="-G"
14664       xldf="-G"
14665       ;;
14666
14667     sunos4*)
14668       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14669       xldf="-assert pure-text -Bstatic"
14670       ;;
14671   esac
14672 fi # End if if we are using gcc
14673
14674 if test -n "$xcldf"; then
14675   save_LDFLAGS=$LDFLAGS
14676   save_LIBS=$LIBS
14677   save_xe_libs=$xe_libs
14678   LDFLAGS="$xcldf $LDFLAGS"
14679   LIBS=
14680   xe_libs=
14681   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14682   cat > conftest.$ac_ext <<EOF
14683 #line 14684 "configure"
14684 #include "confdefs.h"
14685
14686 int main() {
14687 int x=0;
14688 ; return 0; }
14689 EOF
14690 if { (eval echo configure:14691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14691   rm -rf conftest*
14692   cc_produces_so=yes
14693 else
14694   echo "configure: failed program was:" >&5
14695   cat conftest.$ac_ext >&5
14696   rm -rf conftest*
14697   cc_produces_so=no
14698 fi
14699 rm -f conftest*
14700   LDFLAGS=$save_LDFLAGS
14701   LIBS=$save_LIBS
14702   xe_libs=$save_xe_libs
14703   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14704 else
14705   cc_produces_so=no
14706 fi
14707 echo "$ac_t""${cc_produces_so}" 1>&6
14708
14709 LTLD=$LD
14710 if test -z "$LTLD"; then
14711   ac_prog=ld
14712   if test "$XEGCC" = yes; then
14713     # Check if gcc -print-prog-name=ld gives a path.
14714     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14715 echo "configure:14716: checking for ld used by GCC" >&5
14716     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14717     case "$ac_prog" in
14718     # Accept absolute paths.
14719     /*)
14720       if test -z "$LTLD"; then
14721 #        case "$ac_prog" in
14722 #          *gcc-lib*) LTLD="$CC"
14723 #                     ;;
14724 #          *)
14725          LTLD="$ac_prog"
14726 #                     ;;
14727 #        esac
14728       fi
14729       ;;
14730     "")
14731       # If it fails, then pretend we aren't using GCC.
14732       ac_prog=ld
14733       ;;
14734     *)
14735       # If it is relative, then search for the first ld in PATH.
14736       with_gnu_ld=unknown
14737       ;;
14738     esac
14739   else
14740     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14741 echo "configure:14742: checking for GNU ld" >&5
14742   fi
14743
14744   if test -z "$LTLD"; then
14745     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14746     for ac_dir in $PATH; do
14747       test -z "$ac_dir" && ac_dir=.
14748       if test -f "$ac_dir/$ac_prog"; then
14749         LTLD="$ac_dir/$ac_prog"
14750         # Check to see if the program is GNU ld.  I'd rather use --version,
14751         # but apparently some GNU ld's only accept -v.
14752         # Break only if it was the GNU/non-GNU ld that we prefer.
14753         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14754           xe_gnu_ld=yes
14755         else
14756           xe_gnu_ld=no
14757         fi
14758       fi
14759     done
14760     IFS="$ac_save_ifs"
14761   fi
14762
14763   if test -n "$LTLD"; then
14764     echo "$ac_t""${LTLD}" 1>&6
14765   else
14766     echo "$ac_t""no" 1>&6
14767   fi
14768
14769   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14770     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14771     exit 1
14772   fi
14773 fi
14774
14775 ld_dynamic_link_flags=
14776
14777 # Check to see if it really is or isn't GNU ld.
14778 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14779 echo "configure:14780: checking if the linker is GNU ld" >&5
14780 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14781 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14782   xe_gnu_ld=yes
14783 else
14784   xe_gnu_ld=no
14785 fi
14786 echo "$ac_t""${xe_gnu_ld}" 1>&6
14787
14788 case "$xehost_os" in
14789   amigaos* | sunos4*)
14790     # On these operating systems, we should treat GNU ld like the system ld.
14791     gnu_ld_acts_native=yes
14792     ;;
14793   *)
14794     gnu_ld_acts_native=no
14795     ;;
14796 esac
14797
14798 if test "$cc_produces_so" = "yes"; then
14799   dll_ld=$CC
14800   dll_ldflags=$xcldf
14801   can_build_shared=yes
14802   ld_shlibs=yes
14803 else
14804   # OK - only NOW do we futz about with ld.
14805   # See if the linker supports building shared libraries.
14806   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14807 echo "configure:14808: checking whether the linker supports shared libraries" >&5
14808   dll_ld=$CC
14809   dll_ldflags=$LDFLAGS
14810   ld_shlibs=yes
14811   can_build_shared=yes
14812   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14813     # See if GNU ld supports shared libraries.
14814     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14815       dll_ld=$CC
14816       dll_ldflags="-shared"
14817       ld_shlibs=yes
14818     else
14819       ld_shlibs=no
14820     fi
14821   else
14822     # PORTME fill in a description of your system's linker (not GNU ld)
14823     case "$xehost_os" in
14824     aix3*)
14825       dll_ld=$LTLD
14826       dll_ldflags=$xldf
14827       ;;
14828
14829     aix[4-9]*)
14830       dll_ldflags=$xcldf
14831       ;;
14832
14833     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14834     # support.  Future versions do this automatically, but an explicit c++rt0.o
14835     # doesn't break anything, and helps significantly (at the cost of a little
14836     # extra space).
14837     freebsd2.2*)
14838       dll_ld=$LTLD
14839       dll_ldflags=$xldf
14840       dll_post="/usr/lib/c++rt0.o"
14841       ;;
14842
14843     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14844     freebsd2*)
14845       dll_ld=$LTLD
14846       dll_ldflags="-Bshareable"
14847       ;;
14848
14849     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14850     freebsd3*)
14851       dll_ldflags="-shared"
14852       ;;
14853
14854     hpux*)
14855       dll_ld=$LTLD
14856       dll_ldflags=$xldf
14857       ;;
14858
14859     irix[5-9]*)
14860       dll_ld=$LTLD
14861       dll_ldflags=$xldf
14862       ;;
14863
14864     netbsd*)
14865       # Tested with NetBSD 1.2 ld
14866       dll_ld=$LTLD
14867       dll_ldflags=$xldf
14868       ;;
14869
14870     openbsd*)
14871       dll_ld=$LTLD
14872       dll_ldflags=$xldf
14873       ;;
14874
14875     osf3* | osf4*)
14876       dll_ld=$LTLD
14877       dll_ldflags=$xldf
14878       ;;
14879
14880     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14881     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14882       dll_ld=$LTLD
14883       case "$dll_ld" in
14884         *gcc*) dll_ldflags="-shared"
14885                dll_ld=$CC
14886                ;;
14887         *)     dll_ldflags="-G"
14888                ;;
14889       esac
14890       ;;
14891
14892     sunos4*)
14893       if test "$XEGCC" = yes; then
14894         dll_ld=$CC
14895       else
14896         dll_ld=$LTLD
14897       fi
14898       dll_ldflags=$xldf
14899       ;;
14900
14901     uts4*)
14902       dll_ld=$LTLD
14903       dll_ldflags="-G"
14904       ;;
14905
14906     bsdi*)
14907       dll_ldflags="-r"
14908       dll_ld="shlicc2"
14909       ;;
14910
14911     *)
14912       ld_shlibs=no
14913       can_build_shared=no
14914       ;;
14915     esac
14916   fi
14917   echo "$ac_t""${ld_shlibs}" 1>&6
14918   if test "$ld_shlibs" = "no"; then
14919     can_build_shared=no
14920   fi
14921 fi # End of if cc_produces_so = no
14922
14923
14924 if test "$xe_gnu_ld" = yes; then
14925   if test "$ld_shlibs" = yes; then
14926     ld_dynamic_link_flags="${wl}-export-dynamic"
14927   fi
14928 fi
14929
14930 if test -z "$ld_dynamic_link_flags"; then
14931   case "$xehost_os" in
14932   aix[3-9]*)
14933     ld_dynamic_link_flags=
14934     ;;
14935
14936   freebsd2.2*)
14937     ld_dynamic_link_flags=
14938     ;;
14939
14940   freebsd2*)
14941     ld_dynamic_link_flags=
14942     ;;
14943
14944   freebsd3*)
14945     ld_dynamic_link_flags=
14946     ;;
14947
14948   hpux*)
14949     ld_dynamic_link_flags="${wl}-E"
14950     ;;
14951
14952   irix[5-9]*)
14953     ld_dynamic_link_flags=
14954     ;;
14955
14956   netbsd*)
14957     ld_dynamic_link_flags=
14958     ;;
14959
14960   openbsd*)
14961     ld_dynamic_link_flags=
14962     ;;
14963
14964   osf3* | osf4*)
14965     ld_dynamic_link_flags=
14966     ;;
14967
14968   solaris2* | solaris7*)
14969     ld_dynamic_link_flags=
14970     ;;
14971
14972   sco3.2v5* | unixware* | sysv5* | sysv4*)
14973     ld_dynamic_link_flags="${wl}-Bexport"
14974     ;;
14975
14976   sunos4*)
14977     ld_dynamic_link_flags=
14978     ;;
14979
14980   uts4*)
14981     ld_dynamic_link_flags=
14982     ;;
14983
14984   bsdi*)
14985     ld_dynamic_link_flags=
14986     ;;
14987
14988   esac
14989 fi # End of if -z ld_dynamic_link_flags
14990 fi # End of if test "$can_build_shared" = "yes"
14991
14992
14993
14994
14995
14996
14997
14998
14999   fi
15000
15001   if test "$can_build_shared" = "yes"; then
15002     { test "$extra_verbose" = "yes" && cat << \EOF
15003     Defining HAVE_SHLIB
15004 EOF
15005 cat >> confdefs.h <<\EOF
15006 #define HAVE_SHLIB 1
15007 EOF
15008 }
15009
15010     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15011    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15012  fi
15013     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15014     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15015     for ac_func in dlerror _dlerror
15016 do
15017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15018 echo "configure:15019: checking for $ac_func" >&5
15019
15020 cat > conftest.$ac_ext <<EOF
15021 #line 15022 "configure"
15022 #include "confdefs.h"
15023 /* System header to define __stub macros and hopefully few prototypes,
15024     which can conflict with char $ac_func(); below.  */
15025 #include <assert.h>
15026 /* Override any gcc2 internal prototype to avoid an error.  */
15027 /* We use char because int might match the return type of a gcc2
15028     builtin and then its argument prototype would still apply.  */
15029 char $ac_func();
15030
15031 int main() {
15032
15033 /* The GNU C library defines this for functions which it implements
15034     to always fail with ENOSYS.  Some functions are actually named
15035     something starting with __ and the normal name is an alias.  */
15036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15037 choke me
15038 #else
15039 $ac_func();
15040 #endif
15041
15042 ; return 0; }
15043 EOF
15044 if { (eval echo configure:15045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15045   rm -rf conftest*
15046   eval "ac_cv_func_$ac_func=yes"
15047 else
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   rm -rf conftest*
15051   eval "ac_cv_func_$ac_func=no"
15052 fi
15053 rm -f conftest*
15054
15055 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15056   echo "$ac_t""yes" 1>&6
15057     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15058   { test "$extra_verbose" = "yes" && cat << EOF
15059     Defining $ac_tr_func
15060 EOF
15061 cat >> confdefs.h <<EOF
15062 #define $ac_tr_func 1
15063 EOF
15064 }
15065  
15066 else
15067   echo "$ac_t""no" 1>&6
15068 fi
15069 done
15070
15071     with_modules=yes
15072   else
15073     if test "$with_modules" = "yes"; then
15074       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15075     else
15076       echo "configure: warning: "Module support cannot be provided."" 1>&2
15077     fi
15078     with_modules=no
15079   fi
15080 fi
15081
15082 cat > conftest.$ac_ext <<EOF
15083 #line 15084 "configure"
15084 #include "confdefs.h"
15085 int main(int c,char *v[]){return 0;}
15086 EOF
15087 if { (eval echo configure:15088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15088 then
15089   :
15090 else
15091   conftest_rc="$?"
15092   echo "configure: failed program was:" >&5
15093   cat conftest.$ac_ext >&5
15094   rm -fr conftest*
15095   
15096   echo ""
15097   echo "*** PANIC *** The C compiler can no longer build working executables."
15098   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15099   echo "*** PANIC *** The most likely reason for this problem is that configure"
15100   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15101   echo "*** PANIC *** found at run time."
15102   echo "*** PANIC ***"
15103   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15104   echo "*** PANIC *** On other systems, try telling configure where to find the"
15105   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15106   echo "*** PANIC ***"
15107   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15108   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15109   echo "*** PANIC *** on your system.  Don't do that."
15110   exit 1
15111 fi
15112 rm -fr conftest*
15113
15114 if test "$win32_processes" = "yes"; then
15115   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15116    echo "    xemacs will be linked with \"process-nt.o\""
15117  fi
15118 else
15119   { test "$extra_verbose" = "yes" && cat << \EOF
15120     Defining HAVE_UNIX_PROCESSES
15121 EOF
15122 cat >> confdefs.h <<\EOF
15123 #define HAVE_UNIX_PROCESSES 1
15124 EOF
15125 }
15126
15127   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15128    echo "    xemacs will be linked with \"process-unix.o\""
15129  fi
15130 fi
15131
15132
15133
15134 T=""
15135 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15136 CFLAGS="$T"
15137
15138
15139 T=""
15140 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15141 extra_objs="$T"
15142
15143
15144 T=""
15145 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
15146 c_switch_general="$T"
15147
15148
15149 T=""
15150 for W in $c_switch_x_site $c_switch_gtk $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15151 c_switch_window_system="$T"
15152
15153
15154 T=""
15155 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15156 c_switch_all="$T"
15157
15158
15159 T=""
15160 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
15161 ld_switch_general="$T"
15162
15163
15164 T=""
15165 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15166 ld_switch_window_system="$T"
15167
15168
15169 T=""
15170 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15171 ld_switch_all="$T"
15172
15173
15174 T=""
15175 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15176 ld_libs_general="$T"
15177
15178
15179 T=""
15180 for W in $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15181 ld_libs_window_system="$T"
15182
15183
15184 T=""
15185 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15186 ld_libs_all="$T"
15187
15188
15189
15190 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15191 internal_makefile_list="Makefile.in"
15192 SUBDIR_MAKEFILES=''
15193 test -d lock || mkdir lock
15194 for dir in $MAKE_SUBDIR; do
15195   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15196         test -d "$d" || mkdir "$d"; cd "$d"
15197       done ) ;;
15198    * ) test -d "$dir" || mkdir "$dir" ;;
15199   esac
15200   
15201 T=""
15202 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15203 SUBDIR_MAKEFILES="$T"
15204
15205   
15206 T=""
15207 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15208 internal_makefile_list="$T"
15209
15210 done
15211
15212
15213
15214
15215 for dir in src/s src/m; do
15216   if test ! -d "$dir" ; then
15217     echo Making symbolic link to "$srcdir/$dir"
15218     ${LN_S} "$srcdir/$dir" "$dir"
15219   fi
15220 done
15221
15222 if test "$extra_verbose" = "yes"; then
15223   echo ""
15224   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
15225   echo ""
15226 fi
15227
15228
15229 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15230   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15231   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15232 fi
15233
15234 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15235   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15236   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15237 fi
15238
15239 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15240   test "$extra_verbose" = "yes" && echo "creating TAGS"
15241   echo "\f
15242 $srcdir/TAGS,include" > "TAGS"
15243 fi
15244
15245 if test "$__SUNPRO_C" = "yes"; then
15246   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15247   ( echo "# For use with Sun WorkShop's Source browser."
15248     echo "# See sbquery(1) and sbinit(4) for more information"
15249     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15250   ) > .sbinit
15251 fi
15252
15253 rm -f core
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274 PREFIX=$prefix
15275 while true; do
15276   case "$PREFIX" in
15277     *\$* ) eval "PREFIX=$PREFIX" ;;
15278     *) break ;;
15279   esac
15280 done
15281
15282
15283
15284
15285 EXEC_PREFIX=$exec_prefix
15286 while true; do
15287   case "$EXEC_PREFIX" in
15288     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15289     *) break ;;
15290   esac
15291 done
15292
15293
15294
15295
15296 INFODIR=$infodir
15297 while true; do
15298   case "$INFODIR" in
15299     *\$* ) eval "INFODIR=$INFODIR" ;;
15300     *) break ;;
15301   esac
15302 done
15303
15304
15305
15306
15307 INFOPATH=$infopath
15308 while true; do
15309   case "$INFOPATH" in
15310     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15311     *) break ;;
15312   esac
15313 done
15314
15315
15316
15317
15318 PACKAGE_PATH=$package_path
15319 while true; do
15320   case "$PACKAGE_PATH" in
15321     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15322     *) break ;;
15323   esac
15324 done
15325
15326
15327
15328
15329 LISPDIR=$lispdir
15330 while true; do
15331   case "$LISPDIR" in
15332     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15333     *) break ;;
15334   esac
15335 done
15336
15337
15338
15339
15340 MODULEDIR=$moduledir
15341 while true; do
15342   case "$MODULEDIR" in
15343     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15344     *) break ;;
15345   esac
15346 done
15347
15348
15349
15350
15351 SITELISPDIR=$sitelispdir
15352 while true; do
15353   case "$SITELISPDIR" in
15354     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15355     *) break ;;
15356   esac
15357 done
15358
15359
15360
15361
15362 SITEMODULEDIR=$sitemoduledir
15363 while true; do
15364   case "$SITEMODULEDIR" in
15365     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15366     *) break ;;
15367   esac
15368 done
15369
15370
15371
15372
15373 ETCDIR=$etcdir
15374 while true; do
15375   case "$ETCDIR" in
15376     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15377     *) break ;;
15378   esac
15379 done
15380
15381
15382
15383
15384 DOCDIR=$docdir
15385 while true; do
15386   case "$DOCDIR" in
15387     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15388     *) break ;;
15389   esac
15390 done
15391
15392
15393
15394
15395 ARCHLIBDIR=$archlibdir
15396 while true; do
15397   case "$ARCHLIBDIR" in
15398     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15399     *) break ;;
15400   esac
15401 done
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15423
15424
15425
15426
15427
15428
15429
15430 : ${XEMACS_CC:=$CC}
15431
15432
15433 if test "$with_prefix" = "yes"; then
15434   { test "$extra_verbose" = "yes" && cat << \EOF
15435     Defining PREFIX_USER_DEFINED
15436 EOF
15437 cat >> confdefs.h <<\EOF
15438 #define PREFIX_USER_DEFINED 1
15439 EOF
15440 }
15441
15442 fi
15443
15444 if test "$with_site_lisp" = "no"; then
15445   { test "$extra_verbose" = "yes" && cat << \EOF
15446     Defining INHIBIT_SITE_LISP
15447 EOF
15448 cat >> confdefs.h <<\EOF
15449 #define INHIBIT_SITE_LISP 1
15450 EOF
15451 }
15452
15453 fi
15454 if test "$with_site_modules" = "no"; then
15455   { test "$extra_verbose" = "yes" && cat << \EOF
15456     Defining INHIBIT_SITE_MODULES
15457 EOF
15458 cat >> confdefs.h <<\EOF
15459 #define INHIBIT_SITE_MODULES 1
15460 EOF
15461 }
15462
15463 fi
15464
15465
15466 T=""
15467 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15468 ac_configure_args="$T"
15469
15470 { test "$extra_verbose" = "yes" && cat << EOF
15471     Defining EMACS_CONFIGURATION = "$configuration"
15472 EOF
15473 cat >> confdefs.h <<EOF
15474 #define EMACS_CONFIGURATION "$configuration"
15475 EOF
15476 }
15477
15478 { test "$extra_verbose" = "yes" && cat << EOF
15479     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15480 EOF
15481 cat >> confdefs.h <<EOF
15482 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15483 EOF
15484 }
15485
15486
15487
15488 null_string=""
15489 { test "$extra_verbose" = "yes" && cat << EOF
15490     Defining LD_SWITCH_X_SITE = $null_string
15491 EOF
15492 cat >> confdefs.h <<EOF
15493 #define LD_SWITCH_X_SITE $null_string
15494 EOF
15495 }
15496
15497 { test "$extra_verbose" = "yes" && cat << EOF
15498     Defining LD_SWITCH_X_SITE_AUX = $null_string
15499 EOF
15500 cat >> confdefs.h <<EOF
15501 #define LD_SWITCH_X_SITE_AUX $null_string
15502 EOF
15503 }
15504
15505 { test "$extra_verbose" = "yes" && cat << EOF
15506     Defining C_SWITCH_X_SITE = $null_string
15507 EOF
15508 cat >> confdefs.h <<EOF
15509 #define C_SWITCH_X_SITE $null_string
15510 EOF
15511 }
15512
15513 { test "$extra_verbose" = "yes" && cat << EOF
15514     Defining LD_SWITCH_SITE = $null_string
15515 EOF
15516 cat >> confdefs.h <<EOF
15517 #define LD_SWITCH_SITE $null_string
15518 EOF
15519 }
15520
15521 { test "$extra_verbose" = "yes" && cat << EOF
15522     Defining C_SWITCH_SITE = $null_string
15523 EOF
15524 cat >> confdefs.h <<EOF
15525 #define C_SWITCH_SITE $null_string
15526 EOF
15527 }
15528
15529
15530
15531 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15532     Defining GNU_MALLOC
15533 EOF
15534 cat >> confdefs.h <<\EOF
15535 #define GNU_MALLOC 1
15536 EOF
15537 }
15538
15539 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15540     Defining USE_SYSTEM_MALLOC
15541 EOF
15542 cat >> confdefs.h <<\EOF
15543 #define USE_SYSTEM_MALLOC 1
15544 EOF
15545 }
15546
15547 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15548     Defining USE_DEBUG_MALLOC
15549 EOF
15550 cat >> confdefs.h <<\EOF
15551 #define USE_DEBUG_MALLOC 1
15552 EOF
15553 }
15554
15555                                               { test "$extra_verbose" = "yes" && cat << \EOF
15556     Defining USE_SYSTEM_MALLOC
15557 EOF
15558 cat >> confdefs.h <<\EOF
15559 #define USE_SYSTEM_MALLOC 1
15560 EOF
15561 }
15562
15563 fi
15564 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15565     Defining I18N3
15566 EOF
15567 cat >> confdefs.h <<\EOF
15568 #define I18N3 1
15569 EOF
15570 }
15571
15572 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15573     Defining USE_GCC
15574 EOF
15575 cat >> confdefs.h <<\EOF
15576 #define USE_GCC 1
15577 EOF
15578 }
15579
15580 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15581     Defining EXTERNAL_WIDGET
15582 EOF
15583 cat >> confdefs.h <<\EOF
15584 #define EXTERNAL_WIDGET 1
15585 EOF
15586 }
15587
15588 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15589     Defining QUICK_BUILD
15590 EOF
15591 cat >> confdefs.h <<\EOF
15592 #define QUICK_BUILD 1
15593 EOF
15594 }
15595
15596 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15597     Defining PURIFY
15598 EOF
15599 cat >> confdefs.h <<\EOF
15600 #define PURIFY 1
15601 EOF
15602 }
15603
15604 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15605     Defining QUANTIFY
15606 EOF
15607 cat >> confdefs.h <<\EOF
15608 #define QUANTIFY 1
15609 EOF
15610 }
15611
15612 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15613     Defining MAIL_USE_POP
15614 EOF
15615 cat >> confdefs.h <<\EOF
15616 #define MAIL_USE_POP 1
15617 EOF
15618 }
15619
15620 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15621     Defining KERBEROS
15622 EOF
15623 cat >> confdefs.h <<\EOF
15624 #define KERBEROS 1
15625 EOF
15626 }
15627
15628 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15629     Defining HESIOD
15630 EOF
15631 cat >> confdefs.h <<\EOF
15632 #define HESIOD 1
15633 EOF
15634 }
15635
15636 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15637     Defining USE_UNION_TYPE
15638 EOF
15639 cat >> confdefs.h <<\EOF
15640 #define USE_UNION_TYPE 1
15641 EOF
15642 }
15643
15644 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15645     Defining PDUMP
15646 EOF
15647 cat >> confdefs.h <<\EOF
15648 #define PDUMP 1
15649 EOF
15650 }
15651
15652 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15653     Defining IPV6_CANONICALIZE
15654 EOF
15655 cat >> confdefs.h <<\EOF
15656 #define IPV6_CANONICALIZE 1
15657 EOF
15658 }
15659
15660
15661
15662 (
15663 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15664 else
15665   echo "uname -a: `uname -a`"
15666 fi
15667 echo ""
15668 echo "$0 $quoted_arguments"
15669 ) > Installation
15670
15671 if test ! -z ${emacs_beta_version} ; then
15672   if test -z "${emacs_is_beta}" ; then
15673         xemacs_betaname=".${emacs_beta_version}"
15674   else
15675         xemacs_betaname="-b${emacs_beta_version}"
15676   fi
15677 else
15678   xemacs_betaname=""
15679 fi
15680
15681 (
15682 echo "
15683
15684 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15685 "
15686 echo "
15687 Compilation / Installation:"
15688 echo "  Source code location:              $srcdir"
15689 echo "  Installation prefix:               $prefix"
15690 if test -n "$site_includes"; then
15691   echo "  Additional header files:           $site_includes"
15692 fi
15693 if test -n "$site_libraries"; then
15694   echo "  Additional libraries:              $site_libraries"
15695 fi
15696 if test -n "$site_prefixes"; then
15697   echo "  Additional prefixes:               $site_prefixes"
15698 fi
15699 if test -n "$runpath"; then
15700   echo "  Runtime library search path:       $runpath"
15701 fi
15702
15703 if test -n "$opsysfile"
15704 then echo "  Operating system description file: \`$opsysfile'"
15705 else echo "  Not using any operating system description file"
15706 fi
15707 if test -n "$machfile"
15708 then echo "  Machine description file:          \`$machfile'"
15709 else echo "  Not using any machine description file"
15710 fi
15711
15712 echo "  Compiler:                          $CC $CFLAGS"
15713 echo "  Relocating allocator for buffers:  $rel_alloc"
15714 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15715
15716 echo "
15717 Window System:"
15718 if test "$with_msw" = "yes"; then
15719   echo "  Compiling in support for the Microsoft window system."
15720 fi
15721 if test "$with_x11" = "yes"; then
15722   echo "  Compiling in support for the X window system:"
15723   echo "    - X Windows headers location:                 $x_includes"
15724   echo "    - X Windows libraries location:               $x_libraries"
15725   if test "$with_xauth" != yes; then
15726     echo "    - Xau (X authority) not available."
15727   fi
15728   if test "$with_xmu" != yes; then
15729     echo "    - Xmu library not available; substituting equivalent routines."
15730   fi
15731   if test "$with_wmcommand" != no; then
15732     echo "    - Handling WM_COMMAND properly."
15733   fi
15734 fi
15735 if test "$need_athena" = "yes"; then
15736   echo "  Compiling in support for the Athena widget set:"
15737   echo "    - Athena headers location:                    $athena_h_path"
15738   echo "    - Athena library to link:                     $athena_lib"
15739 fi
15740 case "$with_menubars" in
15741   gtk   ) echo "  Using GTK menubars."   ;;
15742   lucid ) echo "  Using Lucid menubars." ;;
15743   motif ) echo "  Using Motif menubars."
15744           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15745           echo "             We recommend using the Lucid menubar instead."
15746           echo "             Re-run configure with --with-menubars='lucid'." ;;
15747     msw ) echo "  Using MS-Windows menubars." ;;
15748 esac
15749 case "$with_scrollbars" in
15750   gtk    ) echo "  Using GTK scrollbars."        ;;
15751   lucid  ) echo "  Using Lucid scrollbars."      ;;
15752   motif  ) echo "  Using Motif scrollbars."      ;;
15753   athena ) echo "  Using Athena scrollbars."     ;;
15754      msw ) echo "  Using MS-Windows scrollbars." ;;
15755 esac
15756 case "$with_dialogs" in
15757   gtk    ) echo "  Using GTK dialog boxes." ;;
15758   motif  ) echo "  Using Motif dialog boxes."
15759            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15760              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15761              echo "             We recommend using the Athena dialog boxes instead."
15762              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15763              echo "             Read the PROBLEMS file for more information."
15764            fi; fi ;;
15765   athena ) echo "  Using Athena dialog boxes."     ;;
15766      msw ) echo "  Using MS-Windows dialog boxes." ;;
15767 esac
15768 case "$with_widgets" in
15769   gtk    ) echo "  Using GTK native widgets."        ;;
15770   motif  ) echo "  Using Motif native widgets."      ;;
15771   athena ) echo "  Using Athena native widgets."     ;;
15772      msw ) echo "  Using MS-Windows native widgets." ;;
15773 esac
15774 if test "$with_dragndrop" = yes; then
15775   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15776   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15777 fi
15778
15779 echo "
15780 TTY:"
15781 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15782 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15783
15784 echo "
15785 Images:"
15786 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15787 if test "$with_xpm" = yes; then
15788   echo "  Compiling in support for XPM  images."
15789 elif test "$with_x11" = yes; then
15790   echo "  WARNING: -----------------------------------------------------------"
15791   echo "  WARNING: Compiling without XPM image support."
15792   if test "$xpm_problem" != ""; then
15793     echo "  Reason: $xpm_problem"
15794   fi
15795   echo "  WARNING: You should strongly consider installing XPM."
15796   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15797   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15798   echo "  WARNING: -----------------------------------------------------------"
15799 fi
15800 if test "$with_png" = yes; then
15801   echo "  Compiling in support for PNG  images."
15802 elif test "$window_system" != "none"; then
15803   echo "  WARNING: -----------------------------------------------------------"
15804   echo "  WARNING: Compiling without PNG image support."
15805   if test "$png_problem" != ""; then
15806     echo "  Reason: $png_problem"
15807   fi
15808   echo "  WARNING: You should strongly consider installing the PNG libraries."
15809   echo "  WARNING: Otherwise certain images and glyphs may not display."
15810   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15811   echo "  WARNING: -----------------------------------------------------------"
15812 fi
15813 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15814 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15815 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15816
15817 echo "
15818 Sound:"
15819 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15820 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15821 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15822 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15823
15824 echo "
15825 Databases:"
15826 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15827 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15828 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15829 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15830 if test "$with_postgresql" = yes; then
15831   echo "  Compiling in support for PostgreSQL."
15832   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15833   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15834 fi
15835
15836 echo "
15837 Internationalization:"
15838 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15839 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15840 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15841 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15842 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15843 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15844 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15845 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15846 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15847 if test "$with_wnn" = yes; then
15848   echo "  Compiling in support for the WNN input method on Mule."
15849   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15850 fi
15851 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15852
15853 echo "
15854 Mail:"
15855 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15856 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15857 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15858 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15859
15860 echo "
15861 Other Features:"
15862 test "with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15863 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15864 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15865 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15866 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15867 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15868 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15869 test "$pdump" = yes && echo "  Using the new portable dumper."
15870 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15871 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15872 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15873   != "no no no no no no"; then
15874   echo "  WARNING: ---------------------------------------------------------"
15875   echo "  WARNING: Compiling in support for runtime error checking."
15876   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15877   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15878   echo "  WARNING: ---------------------------------------------------------"
15879 fi
15880 echo ""
15881 ) | tee -a Installation
15882 echo ""
15883
15884
15885 # Remove any trailing slashes in these variables.
15886 test -n "$prefix" &&
15887   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15888 test -n "$exec_prefix" &&
15889   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15890
15891
15892 for file in $internal_makefile_list; do
15893   test "$file" = src/Makefile.in && \
15894     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15895   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15896 done
15897 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15898 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
15899
15900 trap '' 1 2 15
15901
15902 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15903
15904 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15905 # Let make expand exec_prefix.
15906 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15907
15908 # Any assignment to VPATH causes Sun make to only execute
15909 # the first set of double-colon rules, so remove it if not needed.
15910 # If there is a colon in the path, we need to keep it.
15911 if test "x$srcdir" = x.; then
15912   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15913 fi
15914
15915 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15916
15917 DEFS=-DHAVE_CONFIG_H
15918
15919 # Without the "./", some shells look in PATH for config.status.
15920 : ${CONFIG_STATUS=./config.status}
15921
15922 echo creating $CONFIG_STATUS
15923 rm -f $CONFIG_STATUS
15924 cat > $CONFIG_STATUS <<EOF
15925 #! /bin/sh
15926 # Generated automatically by configure.
15927 # Run this file to recreate the current configuration.
15928 # This directory was configured as follows,
15929 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15930 #
15931 # $0 $ac_configure_args
15932 #
15933 # Compiler output produced by configure, useful for debugging
15934 # configure, is in ./config.log if it exists.
15935
15936 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15937 for ac_option
15938 do
15939   case "\$ac_option" in
15940   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15941     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15942     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15943   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15944     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15945     exit 0 ;;
15946   -help | --help | --hel | --he | --h)
15947     echo "\$ac_cs_usage"; exit 0 ;;
15948   *) echo "\$ac_cs_usage"; exit 1 ;;
15949   esac
15950 done
15951
15952 ac_given_srcdir=$srcdir
15953 ac_given_INSTALL="$INSTALL"
15954
15955 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15956 EOF
15957 cat >> $CONFIG_STATUS <<EOF
15958
15959 # Protect against being on the right side of a sed subst in config.status.
15960 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15961  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15962 $ac_vpsub
15963 $extrasub
15964 s%@SHELL@%$SHELL%g
15965 s%@CFLAGS@%$CFLAGS%g
15966 s%@CPPFLAGS@%$CPPFLAGS%g
15967 s%@CXXFLAGS@%$CXXFLAGS%g
15968 s%@FFLAGS@%$FFLAGS%g
15969 s%@DEFS@%$DEFS%g
15970 s%@LDFLAGS@%$LDFLAGS%g
15971 s%@LIBS@%$LIBS%g
15972 s%@exec_prefix@%$exec_prefix%g
15973 s%@prefix@%$prefix%g
15974 s%@program_transform_name@%$program_transform_name%g
15975 s%@bindir@%$bindir%g
15976 s%@sbindir@%$sbindir%g
15977 s%@libexecdir@%$libexecdir%g
15978 s%@datadir@%$datadir%g
15979 s%@sysconfdir@%$sysconfdir%g
15980 s%@sharedstatedir@%$sharedstatedir%g
15981 s%@localstatedir@%$localstatedir%g
15982 s%@libdir@%$libdir%g
15983 s%@includedir@%$includedir%g
15984 s%@oldincludedir@%$oldincludedir%g
15985 s%@infodir@%$infodir%g
15986 s%@mandir@%$mandir%g
15987 s%@LN_S@%$LN_S%g
15988 s%@blddir@%$blddir%g
15989 s%@CC@%$CC%g
15990 s%@CPP@%$CPP%g
15991 s%@start_flags@%$start_flags%g
15992 s%@ld_switch_shared@%$ld_switch_shared%g
15993 s%@start_files@%$start_files%g
15994 s%@ld@%$ld%g
15995 s%@lib_gcc@%$lib_gcc%g
15996 s%@RANLIB@%$RANLIB%g
15997 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15998 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15999 s%@INSTALL_DATA@%$INSTALL_DATA%g
16000 s%@YACC@%$YACC%g
16001 s%@SET_MAKE@%$SET_MAKE%g
16002 s%@GTK_CONFIG@%$GTK_CONFIG%g
16003 s%@X_CFLAGS@%$X_CFLAGS%g
16004 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16005 s%@X_LIBS@%$X_LIBS%g
16006 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16007 s%@install_pp@%$install_pp%g
16008 s%@libs_xauth@%$libs_xauth%g
16009 s%@dnd_objs@%$dnd_objs%g
16010 s%@lwlib_objs@%$lwlib_objs%g
16011 s%@ALLOCA@%$ALLOCA%g
16012 s%@have_esd_config@%$have_esd_config%g
16013 s%@dll_ld@%$dll_ld%g
16014 s%@dll_cflags@%$dll_cflags%g
16015 s%@dll_ldflags@%$dll_ldflags%g
16016 s%@dll_post@%$dll_post%g
16017 s%@dll_ldo@%$dll_ldo%g
16018 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16019 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16020 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16021 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16022 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16023 s%@PROGNAME@%$PROGNAME%g
16024 s%@version@%$version%g
16025 s%@configuration@%$configuration%g
16026 s%@canonical@%$canonical%g
16027 s%@inststaticdir@%$inststaticdir%g
16028 s%@instvardir@%$instvardir%g
16029 s%@srcdir@%$srcdir%g
16030 s%@pkgdir@%$pkgdir%g
16031 s%@statedir@%$statedir%g
16032 s%@extra_includes@%$extra_includes%g
16033 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16034 s%@PREFIX@%$PREFIX%g
16035 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16036 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16037 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16038 s%@INFODIR@%$INFODIR%g
16039 s%@infopath@%$infopath%g
16040 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16041 s%@INFOPATH@%$INFOPATH%g
16042 s%@package_path@%$package_path%g
16043 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16044 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16045 s%@lispdir@%$lispdir%g
16046 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16047 s%@LISPDIR@%$LISPDIR%g
16048 s%@moduledir@%$moduledir%g
16049 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16050 s%@MODULEDIR@%$MODULEDIR%g
16051 s%@sitelispdir@%$sitelispdir%g
16052 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16053 s%@SITELISPDIR@%$SITELISPDIR%g
16054 s%@sitemoduledir@%$sitemoduledir%g
16055 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16056 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16057 s%@etcdir@%$etcdir%g
16058 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16059 s%@ETCDIR@%$ETCDIR%g
16060 s%@docdir@%$docdir%g
16061 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16062 s%@DOCDIR@%$DOCDIR%g
16063 s%@archlibdir@%$archlibdir%g
16064 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16065 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16066 s%@bitmapdir@%$bitmapdir%g
16067 s%@extra_objs@%$extra_objs%g
16068 s%@machfile@%$machfile%g
16069 s%@opsysfile@%$opsysfile%g
16070 s%@c_switch_general@%$c_switch_general%g
16071 s%@c_switch_window_system@%$c_switch_window_system%g
16072 s%@c_switch_all@%$c_switch_all%g
16073 s%@ld_switch_general@%$ld_switch_general%g
16074 s%@ld_switch_window_system@%$ld_switch_window_system%g
16075 s%@ld_switch_all@%$ld_switch_all%g
16076 s%@ld_libs_general@%$ld_libs_general%g
16077 s%@ld_libs_window_system@%$ld_libs_window_system%g
16078 s%@ld_libs_all@%$ld_libs_all%g
16079 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16080 s%@native_sound_lib@%$native_sound_lib%g
16081 s%@sound_cflags@%$sound_cflags%g
16082 s%@dynodump_arch@%$dynodump_arch%g
16083 s%@XEMACS_CC@%$XEMACS_CC%g
16084 s%@internal_makefile_list@%$internal_makefile_list%g
16085
16086 CEOF
16087 EOF
16088
16089 cat >> $CONFIG_STATUS <<\EOF
16090
16091 # Split the substitutions into bite-sized pieces for seds with
16092 # small command number limits, like on Digital OSF/1 and HP-UX.
16093 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16094 ac_file=1 # Number of current file.
16095 ac_beg=1 # First line for current file.
16096 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16097 ac_more_lines=:
16098 ac_sed_cmds=""
16099 while $ac_more_lines; do
16100   if test $ac_beg -gt 1; then
16101     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16102   else
16103     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16104   fi
16105   if test ! -s conftest.s$ac_file; then
16106     ac_more_lines=false
16107     rm -f conftest.s$ac_file
16108   else
16109     if test -z "$ac_sed_cmds"; then
16110       ac_sed_cmds="sed -f conftest.s$ac_file"
16111     else
16112       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16113     fi
16114     ac_file=`expr $ac_file + 1`
16115     ac_beg=$ac_end
16116     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16117   fi
16118 done
16119 if test -z "$ac_sed_cmds"; then
16120   ac_sed_cmds=cat
16121 fi
16122 EOF
16123
16124 cat >> $CONFIG_STATUS <<EOF
16125
16126 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16127 EOF
16128 cat >> $CONFIG_STATUS <<\EOF
16129 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16130   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16131   case "$ac_file" in
16132   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16133        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16134   *) ac_file_in="${ac_file}.in" ;;
16135   esac
16136
16137   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16138
16139   # Remove last slash and all that follows it.  Not all systems have dirname.
16140   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16141   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16142     # The file is in a subdirectory.
16143     test ! -d "$ac_dir" && mkdir "$ac_dir"
16144     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16145     # A "../" for each directory in $ac_dir_suffix.
16146     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16147   else
16148     ac_dir_suffix= ac_dots=
16149   fi
16150
16151   case "$ac_given_srcdir" in
16152   .)  srcdir=.
16153       if test -z "$ac_dots"; then top_srcdir=.
16154       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16155   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16156   *) # Relative path.
16157     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16158     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16159   esac
16160
16161   case "$ac_given_INSTALL" in
16162   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16163   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16164   esac
16165
16166   echo creating "$ac_file"
16167   rm -f "$ac_file"
16168   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16169   case "$ac_file" in
16170   *Makefile*) ac_comsub="1i\\
16171 # $configure_input" ;;
16172   *) ac_comsub= ;;
16173   esac
16174
16175   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16176   sed -e "$ac_comsub
16177 s%@configure_input@%$configure_input%g
16178 s%@srcdir@%$srcdir%g
16179 s%@top_srcdir@%$top_srcdir%g
16180 s%@INSTALL@%$INSTALL%g
16181 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16182 fi; done
16183 rm -f conftest.s*
16184
16185 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16186 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16187 #
16188 # ac_d sets the value in "#define NAME VALUE" lines.
16189 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16190 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16191 ac_dC='\3'
16192 ac_dD='%g'
16193 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16194 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16195 ac_uB='\([      ]\)%\1#\2define\3'
16196 ac_uC=' '
16197 ac_uD='\4%g'
16198 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16199 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16200 ac_eB='$%\1#\2define\3'
16201 ac_eC=' '
16202 ac_eD='%g'
16203
16204 if test "${CONFIG_HEADERS+set}" != set; then
16205 EOF
16206 cat >> $CONFIG_STATUS <<EOF
16207   CONFIG_HEADERS="src/config.h lwlib/config.h"
16208 EOF
16209 cat >> $CONFIG_STATUS <<\EOF
16210 fi
16211 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16212   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16213   case "$ac_file" in
16214   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16215        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16216   *) ac_file_in="${ac_file}.in" ;;
16217   esac
16218
16219   echo creating $ac_file
16220
16221   rm -f conftest.frag conftest.in conftest.out
16222   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16223   cat $ac_file_inputs > conftest.in
16224
16225 EOF
16226
16227 # Transform confdefs.h into a sed script conftest.vals that substitutes
16228 # the proper values into config.h.in to produce config.h.  And first:
16229 # Protect against being on the right side of a sed subst in config.status.
16230 # Protect against being in an unquoted here document in config.status.
16231 rm -f conftest.vals
16232 cat > conftest.hdr <<\EOF
16233 s/[\\&%]/\\&/g
16234 s%[\\$`]%\\&%g
16235 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16236 s%ac_d%ac_u%gp
16237 s%ac_u%ac_e%gp
16238 EOF
16239 sed -n -f conftest.hdr confdefs.h > conftest.vals
16240 rm -f conftest.hdr
16241
16242 # This sed command replaces #undef with comments.  This is necessary, for
16243 # example, in the case of _POSIX_SOURCE, which is predefined and required
16244 # on some systems where configure will not decide to define it.
16245 cat >> conftest.vals <<\EOF
16246 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16247 EOF
16248
16249 # Break up conftest.vals because some shells have a limit on
16250 # the size of here documents, and old seds have small limits too.
16251
16252 rm -f conftest.tail
16253 while :
16254 do
16255   ac_lines=`grep -c . conftest.vals`
16256   # grep -c gives empty output for an empty file on some AIX systems.
16257   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16258   # Write a limited-size here document to conftest.frag.
16259   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16260   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16261   echo 'CEOF
16262   sed -f conftest.frag conftest.in > conftest.out
16263   rm -f conftest.in
16264   mv conftest.out conftest.in
16265 ' >> $CONFIG_STATUS
16266   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16267   rm -f conftest.vals
16268   mv conftest.tail conftest.vals
16269 done
16270 rm -f conftest.vals
16271
16272 cat >> $CONFIG_STATUS <<\EOF
16273   rm -f conftest.frag conftest.h
16274   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16275   cat conftest.in >> conftest.h
16276   rm -f conftest.in
16277   if cmp -s $ac_file conftest.h 2>/dev/null; then
16278     echo "$ac_file is unchanged"
16279     rm -f conftest.h
16280   else
16281     # Remove last slash and all that follows it.  Not all systems have dirname.
16282       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16283       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16284       # The file is in a subdirectory.
16285       test ! -d "$ac_dir" && mkdir "$ac_dir"
16286     fi
16287     rm -f $ac_file
16288     mv conftest.h $ac_file
16289   fi
16290 fi; done
16291
16292 EOF
16293 cat >> $CONFIG_STATUS <<EOF
16294 CPP="$CPP"
16295  top_srcdir="$srcdir"
16296  MAKE_SUBDIR="$MAKE_SUBDIR"
16297
16298 EOF
16299 cat >> $CONFIG_STATUS <<\EOF
16300 for dir in . $MAKE_SUBDIR; do
16301   (
16302     cd $dir
16303     rm -f junk.c
16304     < Makefile.in \
16305       sed -e '/^# Generated/d' \
16306           -e 's%/\*\*/#.*%%' \
16307           -e 's/^ *# */#/' \
16308           -e '/^##/d' \
16309           -e '/^#/ {
16310 p
16311 d
16312 }'        \
16313           -e '/./ {
16314 s/\([\"]\)/\\\1/g
16315 s/^/"/
16316 s/$/"/
16317 }'  > junk.c;
16318
16319
16320
16321     echo creating $dir/Makefile
16322 $CPP -I. -I${top_srcdir}/src  junk.c \
16323   | sed -e 's/^\#.*//'          \
16324         -e 's/^[        ][      ]*$//'\
16325         -e 's/^ /       /'              \
16326         -e '/^[ \f]*$/d' \
16327         -e '/^\"/ {
16328         s/\\\([\"]\)/\1/g
16329         s/^[    ]*\"//
16330         s/\"[   ]*$//
16331 }' > Makefile.new
16332     chmod 444 Makefile.new
16333     mv -f Makefile.new Makefile
16334
16335     echo creating $dir/GNUmakefile
16336 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16337   | sed -e 's/^\#.*//'          \
16338         -e 's/^[        ][      ]*$//'\
16339         -e 's/^ /       /'              \
16340         -e '/^[ \f]*$/d' \
16341         -e '/^\"/ {
16342         s/\\\([\"]\)/\1/g
16343         s/^[    ]*\"//
16344         s/\"[   ]*$//
16345 }' > Makefile.new
16346     chmod 444 Makefile.new
16347     mv -f Makefile.new GNUmakefile
16348
16349     rm -f junk.c
16350   )
16351 done
16352
16353 sed < config.status >> lib-src/config.values \
16354   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16355   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16356   -e 's/^\([^ ]*\) $/\1 ""/' \
16357   -e 's/ 1$/ t/'
16358
16359
16360 exit 0
16361 EOF
16362 chmod +x $CONFIG_STATUS
16363 rm -fr confdefs* $ac_clean_files
16364 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1