XEmacs 21.4.20 "Double Solitaire".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 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, 2005 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 use_regex_malloc='yes'
252 with_esd_sound='no'
253 native_sound_lib=''
254 with_gtk='no'
255 with_gnome='no'
256 use_assertions="yes"
257 with_toolbars=""
258 with_tty=""
259 use_union_type="no"
260 with_dnet=""
261 pdump=''
262 with_dragndrop="no"
263 with_ipv6_cname="no"
264
265
266
267
268 arguments="$@"
269
270 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
271 quoted_arguments=
272 for i in "$@"; do
273    case "$i" in
274    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275    | --no-cr | --no-c) ;;
276    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
278    *)
279    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
280    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
281    esac
282 done
283
284 while test $# != 0; do
285   arg="$1"; shift
286   case "$arg" in
287     --no-create|--no-recursion) ;;
288         -* )
289             case "$arg" in
290         -*=*)
291           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
292           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
293           valomitted=no
294         ;;
295                                                                           -*)
296                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
297           val="yes" valomitted=yes
298         ;;
299       esac
300
301             optname="$opt"
302       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
303
304             case "${valomitted}-${opt}" in yes-without_* )
305         opt=`echo $opt | sed 's/without/with/'`
306         valomitted="no" val="no" ;;
307       esac
308
309             case "$opt" in
310
311         with_site_lisp  | \
312         with_prefix     | \
313         with_site_modules | \
314         with_x          | \
315         with_x11        | \
316         with_gtk        | \
317         with_gnome      | \
318         with_msw        | \
319         with_gcc        | \
320         dynamic         | \
321         with_ncurses    | \
322         with_dnet       | \
323         with_socks      | \
324         with_dragndrop  | \
325         with_cde        | \
326         with_offix      | \
327         with_gpm        | \
328         with_xpm        | \
329         with_xface      | \
330         with_gif        | \
331         with_jpeg       | \
332         with_png        | \
333         with_tiff       | \
334         with_wmcommand  | \
335         with_xmu        | \
336         with_purify     | \
337         with_quantify   | \
338         with_toolbars   | \
339         with_tty        | \
340         with_xfs        | \
341         with_i18n3      | \
342         with_mule       | \
343         with_file_coding| \
344         with_canna      | \
345         with_wnn        | \
346         with_wnn6       | \
347         with_workshop   | \
348         with_sparcworks | \
349         with_tooltalk   | \
350         with_ldap       | \
351         with_postgresql | \
352         with_pop        | \
353         with_kerberos   | \
354         with_hesiod     | \
355         with_dnet       | \
356         with_infodock   | \
357         with_netinstall | \
358         with_ipv6_cname | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         usage_tracking  | \
363         use_union_type  | \
364         pdump           | \
365         debug           | \
366         use_assertions  | \
367         use_regex_malloc | \
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 | moduledir )
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                         "")                                             val=yes    ;;
748             g | gt | gtk )                              val=gtk    ;;
749             ms | msw )                                  val=msw    ;;
750             * ) (echo "$progname: Usage error:"
751 echo " " "The \`--$optname' option must have one of these values:
752   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
753 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
754           esac
755           eval "$opt=\"$val\""
756         ;;
757
758                 "use_minimal_tagbits" | \
759         "use_indexed_lrecord_implementation" | \
760         "run_in_place"  | \
761         "const_is_losing" | \
762         "with_gnu_make" )
763           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
764         ;;
765
766                 * ) (echo "$progname: Usage error:"
767 echo " " "Unrecognized option: $arg"
768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
769
770       esac
771     ;;
772
773         *-*-*) configuration="$arg" ;;
774
775         *) (echo "$progname: Usage error:"
776 echo " " "Unrecognized argument: $arg"
777 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
778
779   esac
780 done
781
782
783 test -n "$cpp"      && CPP="$cpp"
784 test -n "$cppflags" && CPPFLAGS="$cppflags"
785 test -n "$libs"     && LIBS="$libs"
786 test -n "$ldflags"  && LDFLAGS="$ldflags"
787
788 eval set x "$quoted_arguments"; shift
789
790 test "$extra_verbose" = "yes" && verbose=yes
791
792 test -n "$with_x" && with_x11="$with_x"
793
794 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
795   test "$with_system_malloc" = "default" && with_system_malloc=yes
796 fi
797
798
799
800 if test "$with_cde $with_tooltalk" = "yes no"; then
801   (echo "$progname: Usage error:"
802 echo " " "--with-cde requires --with-tooltalk"
803 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
804 elif test "$with_tooltalk" = "no" ; then with_cde=no
805 elif test "$with_cde" = "yes"; then with_tooltalk=yes
806 fi
807
808
809 case "$srcdir" in
810
811     "" )
812     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
813       if test -f "$dir/src/lisp.h" -a \
814               -f "$dir/lisp/version.el" ; then
815         srcdir="$dir"
816         break
817       fi
818     done
819     if test -z "$srcdir" ; then
820       (echo "$progname: Usage error:"
821 echo " " "Neither the current directory nor its parent seem to
822   contain the XEmacs sources.  If you do not want to build XEmacs in its
823   source tree, you should run \`$progname' in the directory in which
824   you wish to build XEmacs, using the \`--srcdir' option to say where the
825   sources may be found."
826 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
827     fi
828   ;;
829
830     * )
831     if test ! -f "$srcdir/src/lisp.h" -o \
832             ! -f "$srcdir/lisp/version.el" ; then
833       (echo "$progname: Usage error:"
834 echo " " "The directory specified with the \`--srcdir' option,
835   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
836   either run the \`$progname' script at the top of the XEmacs source
837   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
838 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
839     fi
840   ;;
841 esac
842
843 if test -z "$configuration"; then
844     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
845   if test -z "$configuration"; then
846     (echo "$progname: Usage error:"
847 echo " " "XEmacs has not been ported to this host type.
848 Try explicitly specifying the CONFIGURATION when rerunning configure."
849 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
850   fi
851 fi
852
853 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
854 echo "configure:855: checking whether ln -s works" >&5
855
856 rm -f conftestdata
857 if ln -s X conftestdata 2>/dev/null
858 then
859   rm -f conftestdata
860   ac_cv_prog_LN_S="ln -s"
861 else
862   ac_cv_prog_LN_S=ln
863 fi
864 LN_S="$ac_cv_prog_LN_S"
865 if test "$ac_cv_prog_LN_S" = "ln -s"; then
866   echo "$ac_t""yes" 1>&6
867 else
868   echo "$ac_t""no" 1>&6
869 fi
870
871
872 for dir in lisp etc man info tests; do
873   if test ! -d "$dir" ; then
874     echo Making symbolic link to "$srcdir/$dir"
875     ${LN_S} "$srcdir/$dir" "$dir"
876   fi
877 done
878
879
880 absolute_pwd="`pwd`";
881 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
882 then blddir="$PWD"
883 else blddir="$absolute_pwd"; if test -d "/net"; then
884   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
885   blddir=`echo "$blddir" | \
886    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
887 fi
888 fi
889
890
891 case "$srcdir" in
892   /* ) ;;
893   .  ) srcdir="$blddir" ;;
894   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
895   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
896   srcdir=`echo "$srcdir" | \
897    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
898 fi ;;
899 esac
900
901 if test `pwd` != `sh -c cd $srcdir && pwd`  \
902    && test -f "$srcdir/src/config.h"; then
903   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
904    echo "   as a build directory right now; it has been configured in its own"
905    echo "   right.  To configure in another directory as well, you MUST"
906    echo "   use GNU make.  If you do not have GNU make, then you must"
907    echo "   now do \`make distclean' in $srcdir,"
908    echo "   and then run $progname again.") >&2
909   extrasub='/^VPATH[     ]*=/c\
910 vpath %.c $(srcdir)\
911 vpath %.h $(srcdir)\
912 vpath %.y $(srcdir)\
913 vpath %.l $(srcdir)\
914 vpath %.s $(srcdir)\
915 vpath %.in $(srcdir)'
916 fi
917
918 . "$srcdir/version.sh" || exit 1;
919 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
920 : "${extra_verbose=$beta}"
921 version="${emacs_major_version}.${emacs_minor_version}"
922 { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_MAJOR_VERSION = $emacs_major_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_MAJOR_VERSION $emacs_major_version
927 EOF
928 }
929
930 { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_MINOR_VERSION = $emacs_minor_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_MINOR_VERSION $emacs_minor_version
935 EOF
936 }
937
938 if test -n "$emacs_beta_version" ; then
939   if test "$beta" = "yes"; then
940         version="${version}-b${emacs_beta_version}"
941         { test "$extra_verbose" = "yes" && cat << EOF
942     Defining EMACS_BETA_VERSION = $emacs_beta_version
943 EOF
944 cat >> confdefs.h <<EOF
945 #define EMACS_BETA_VERSION $emacs_beta_version
946 EOF
947 }
948
949   else
950         version="${version}.${emacs_beta_version}"
951         { test "$extra_verbose" = "yes" && cat << EOF
952     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
953 EOF
954 cat >> confdefs.h <<EOF
955 #define EMACS_PATCH_LEVEL $emacs_beta_version
956 EOF
957 }
958
959   fi
960 fi
961 { test "$extra_verbose" = "yes" && cat << EOF
962     Defining XEMACS_CODENAME = "$xemacs_codename"
963 EOF
964 cat >> confdefs.h <<EOF
965 #define XEMACS_CODENAME "$xemacs_codename"
966 EOF
967 }
968
969 { test "$extra_verbose" = "yes" && cat << EOF
970     Defining EMACS_VERSION = "$version"
971 EOF
972 cat >> confdefs.h <<EOF
973 #define EMACS_VERSION "$version"
974 EOF
975 }
976
977
978 if test "$with_infodock" = "yes"; then
979   if test ! -f ../../ID-INSTALL; then
980     echo "Cannot build InfoDock without InfoDock sources"
981     with_infodock=no
982   fi
983 fi
984
985 if test "$with_infodock" = "yes"; then
986       { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_MAJOR_VERSION $infodock_major_version
991 EOF
992 }
993
994   { test "$extra_verbose" = "yes" && cat << EOF
995     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
996 EOF
997 cat >> confdefs.h <<EOF
998 #define INFODOCK_MINOR_VERSION $infodock_minor_version
999 EOF
1000 }
1001
1002   { test "$extra_verbose" = "yes" && cat << EOF
1003     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1004 EOF
1005 cat >> confdefs.h <<EOF
1006 #define INFODOCK_BUILD_VERSION $infodock_build_version
1007 EOF
1008 }
1009
1010   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1011   PROGNAME=infodock
1012   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1013 else
1014   PROGNAME=xemacs
1015 fi
1016
1017 { test "$extra_verbose" = "yes" && cat << EOF
1018     Defining EMACS_PROGNAME = "$PROGNAME"
1019 EOF
1020 cat >> confdefs.h <<EOF
1021 #define EMACS_PROGNAME "$PROGNAME"
1022 EOF
1023 }
1024
1025
1026 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1027 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_EXTENTS
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_EXTENTS 1
1032 EOF
1033 }
1034
1035 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_TYPECHECK
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_TYPECHECK 1
1040 EOF
1041 }
1042
1043 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_BUFPOS
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_BUFPOS 1
1048 EOF
1049 }
1050
1051 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_GC
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_GC 1
1056 EOF
1057 }
1058
1059 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_MALLOC
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_MALLOC 1
1064 EOF
1065 }
1066
1067 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining ERROR_CHECK_BYTE_CODE
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define ERROR_CHECK_BYTE_CODE 1
1072 EOF
1073 }
1074
1075 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1076     Defining ERROR_CHECK_GLYPHS
1077 EOF
1078 cat >> confdefs.h <<\EOF
1079 #define ERROR_CHECK_GLYPHS 1
1080 EOF
1081 }
1082
1083 if test "${debug:=$beta}" = "yes"; then
1084   use_assertions=yes memory_usage_stats=yes
1085   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1086    echo "    xemacs will be linked with \"debug.o\""
1087  fi
1088   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"tests.o\""
1090  fi
1091   { test "$extra_verbose" = "yes" && cat << \EOF
1092     Defining DEBUG_XEMACS
1093 EOF
1094 cat >> confdefs.h <<\EOF
1095 #define DEBUG_XEMACS 1
1096 EOF
1097 }
1098
1099 fi
1100 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1101     Defining USE_ASSERTIONS
1102 EOF
1103 cat >> confdefs.h <<\EOF
1104 #define USE_ASSERTIONS 1
1105 EOF
1106 }
1107
1108 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1109     Defining MEMORY_USAGE_STATS
1110 EOF
1111 cat >> confdefs.h <<\EOF
1112 #define MEMORY_USAGE_STATS 1
1113 EOF
1114 }
1115
1116
1117
1118 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1119 echo "configure:1120: checking "host system type"" >&5
1120 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1121 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1122 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1123 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1124 echo "$ac_t""$configuration" 1>&6
1125
1126
1127
1128
1129
1130 machine='' opsys=''
1131
1132 case "$canonical" in
1133   sparc-*-*        ) machine=sparc ;;
1134   alpha*-*-*       ) machine=alpha ;;
1135   vax-*-*          ) machine=vax ;;
1136   mips-dec-*       ) machine=pmax ;;
1137   mips-sgi-irix6*  ) machine=iris6d ;;
1138   mips-sgi-*       ) machine=iris4d ;;
1139   mips*-linux      ) machine=mips ;;
1140   romp-ibm-*       ) machine=ibmrt ;;
1141   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1142   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1143   powerpc*-*       ) machine=powerpc ;;
1144   hppa-*-*         ) machine=hp800 ;;
1145   m88k-dg-*        ) machine=aviion ;;
1146   m68*-sony-*      ) machine=news ;;
1147   mips-sony-*      ) machine=news-risc ;;
1148   clipper-*        ) machine=clipper ;;
1149   arm*             ) machine=arm ;;
1150   ns32k-*          ) machine=ns32000 ;;
1151 esac
1152
1153 case "$canonical" in
1154   *-*-linux*    ) opsys=linux ;;
1155   *-*-netbsd*   ) opsys=netbsd ;;
1156   *-*-openbsd*  ) opsys=openbsd ;;
1157   *-*-nextstep* ) opsys=nextstep ;;
1158   *-*-vms       ) opsys=vms ;;
1159
1160     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1161   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1162   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1163   *-dec-osf3*                ) opsys=decosf3-1 ;;
1164   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1165
1166     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1167   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1168   *-*-ultrix* )         opsys=ultrix4-3 ;;
1169
1170     *-*-aix3.1*     ) opsys=aix3-1   ;;
1171   *-*-aix3.2.5    ) opsys=aix3-2-5 ;;
1172   *-*-aix3*       ) opsys=aix3-2   ;;
1173   *-*-aix4.0*     ) opsys=aix4     ;;
1174   *-*-aix4.1*     ) opsys=aix4-1   ;;
1175   *-*-aix[4-9]* ) opsys=aix4-2   ;;
1176
1177     *-gnu* )                    opsys=gnu    ;;
1178   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1179   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1180   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1181   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1182   *-*-aos*   )                  opsys=bsd4-3 ;;
1183   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1184   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1185   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1186   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1187   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1188   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1189         if test -z "$NON_GNU_CPP" ; then
1190           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1191             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1192           done
1193         fi
1194         opsys=usg5-4-2 ;;
1195     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1196     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1197 esac
1198
1199 case "$canonical" in
1200
1201     *-*-netbsd* )
1202     case "$canonical" in
1203       i[3-9]86-*-netbsd*) machine=intel386 ;;
1204       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1205                                             machine=hp9000s300 ;;
1206       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1207       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1208     esac
1209   ;;
1210
1211     *-*-openbsd* )
1212     case "${canonical}" in
1213       i386-*-openbsd*)          machine=intel386 ;;
1214       m68k-*-openbsd*)          machine=hp9000s300 ;;
1215       mipsel-*-openbsd*)        machine=pmax ;;
1216      esac
1217    ;;
1218
1219     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1220   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1221
1222     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1223   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1224
1225     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1226
1227     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1228
1229     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1230
1231     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1232
1233     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1234
1235     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1236   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1237   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1238
1239   
1240     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1241
1242     *-convex-bsd* | *-convex-convexos* )
1243     machine=convex opsys=bsd4-3
1244     NON_GNU_CPP="cc -E -P"
1245   ;;
1246
1247     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1248
1249     *-*-darwin*)
1250     opsys=darwin
1251     RANLIB="ranlib -c"     ;;
1252
1253     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1254   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1255   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1256   m88k-dg-dgux*                           ) opsys=dgux     ;;
1257
1258     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1259   m88k-motorola-sysv4* )
1260                     machine=delta88k opsys=usg5-4-2
1261   ;;
1262   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1263
1264     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1265   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1266
1267     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1268
1269     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1270   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1271   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1272
1273       m88k-harris-cxux* )
1274         case "`uname -r`" in
1275        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1276        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1277     esac
1278     NON_GNU_CPP="/lib/cpp"
1279   ;;
1280     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1281     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1282
1283     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1284
1285     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1286
1287     *-hp-hpux* )
1288         case "$canonical" in
1289       m68*  ) machine=hp9000s300 ;;
1290       hppa* ) machine=hp800      ;;
1291     esac
1292
1293     case "$canonical" in
1294       *-hp-hpux7*  )  opsys=hpux   ;;
1295       *-hp-hpux8*  )  opsys=hpux8  ;;
1296       *-hp-hpux9*  )  opsys=hpux9  ;;
1297       *-hp-hpux10* )  opsys=hpux10 ;;
1298       *-hp-hpux11* )  opsys=hpux11 ;;
1299       *            )  opsys=hpux   ;;
1300     esac
1301
1302         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1303    echo "    xemacs will be linked with \"strcat.o\""
1304  fi ;; esac
1305
1306     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1307         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1308     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1309
1310     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1311   ;;
1312
1313     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1314   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1315
1316     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1317   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1318   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1319   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1320   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1321   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1322
1323     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1324   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1325
1326     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1327
1328     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1329
1330     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1331
1332     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1333
1334       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1335
1336     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1337
1338     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1339
1340     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1341
1342     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1343
1344         mips-mips-usg* ) machine=mips4 ;;
1345   mips-mips-riscos4 )
1346     machine=mips4
1347     NON_GNU_CC="cc -systype bsd43"
1348     NON_GNU_CPP="cc -systype bsd43 -E"
1349     case "$canonical" in
1350       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1351       mips-mips-riscos5* ) opsys=riscos5 ;;
1352     esac
1353   ;;
1354   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1355   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1356
1357     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1358
1359     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1360
1361     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1362   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1363
1364     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1365
1366     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1367
1368     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1369
1370     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1371
1372     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1373   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1374
1375     mips-siemens-sysv* | mips-sni-sysv*)
1376     machine=mips-siemens opsys=usg5-4
1377     NON_GNU_CC=/usr/ccs/bin/cc
1378     NON_GNU_CPP=/usr/ccs/lib/cpp
1379   ;;
1380
1381     mips-nec-sysv*)
1382     machine=mips-nec
1383     NON_GNU_CC=/usr/ccs/bin/cc
1384     NON_GNU_CPP=/usr/ccs/lib/cpp
1385   ;;
1386
1387       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1388   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1389     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1390   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1391   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1392   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1393   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1394   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1395   mips-sgi-irix*      ) opsys=irix5-0 ;;
1396
1397     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1398   *-sony-news* ) opsys=newsos5 ;;
1399
1400     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1401
1402     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1403         case "$canonical" in
1404       m68*-sunos1* )             machine=sun1     ;;
1405       m68*-sunos2* )             machine=sun2     ;;
1406       m68* )                     machine=sun3     ;;
1407       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1408       i*86-*-* )                 machine=intel386 ;;
1409       rs6000* )                  machine=rs6000   ;;
1410     esac
1411
1412         case "$canonical" in *-sunos5*)
1413       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1414     esac
1415
1416                     case "$canonical" in
1417       *-sunos4* )
1418         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1419         : ;;
1420       *-solaris2* )
1421         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1422         RANLIB=':' ;;
1423     esac
1424
1425     case "$canonical" in
1426       *-solaris* )
1427         opsys=sol2
1428         os_release_major=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1/'`
1429         os_release_minor=`uname -r | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/'`
1430         case "$os_release_minor" in [0-9])
1431           os_release_minor="0${os_release_minor}";;
1432         esac
1433         os_release="${os_release_major}${os_release_minor}"
1434         { test "$extra_verbose" = "yes" && cat << EOF
1435     Defining OS_RELEASE = $os_release
1436 EOF
1437 cat >> confdefs.h <<EOF
1438 #define OS_RELEASE $os_release
1439 EOF
1440 }
1441  ;;
1442
1443             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1444       *-sunos4.0*         ) opsys=sunos4-0      ;;
1445       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1446       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1447       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1448       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1449       *-mach*             ) opsys=mach-bsd4-3   ;;
1450       *                   ) opsys=bsd4-2        ;;
1451     esac
1452
1453     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1454
1455         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1456   ;;
1457
1458     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1459
1460     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1461   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1462
1463     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1464
1465     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1466
1467     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1468       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1469
1470     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1471
1472     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1473
1474     vax-dec-* )
1475     case "$canonical" in
1476       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1477       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1478       *-mach* )                         opsys=mach-bsd4-3 ;;
1479     esac
1480   ;;
1481
1482     ns16k-whitechapel-* ) machine=mg1 ;;
1483
1484     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1485
1486     i[3-9]86-*-* )
1487     machine=intel386
1488     case "$canonical" in
1489       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1490       *-isc2.2* )               opsys=isc2-2 ;;
1491       *-isc4.0* )               opsys=isc4-0 ;;
1492       *-isc4.* )                opsys=isc4-1
1493                                 GCC_TEST_OPTIONS=-posix
1494                                 NON_GCC_TEST_OPTIONS=-Xp
1495                                 ;;
1496       *-isc* )                  opsys=isc3-0 ;;
1497       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1498       *-esix* )                 opsys=esix ;;
1499       *-mach* )                 opsys=mach-bsd4-3 ;;
1500       *-xenix* )                opsys=xenix ;;
1501       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1502       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1503       *-bsdi4* )                opsys=bsdos4 ;;
1504       *-bsdi3* )                opsys=bsdos3 ;;
1505       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1506       *-bsdi2* )                opsys=bsdos2 ;;
1507       *-sco3.2v5* )             opsys=sco5 ;;
1508       *-sysv5* )                opsys=sco7 ;;
1509       *-386bsd* )               opsys=386bsd ;;
1510       *-freebsd* )              opsys=freebsd ;;
1511       *-nextstep* )             opsys=nextstep ;;
1512       *-pc-cygwin* )            opsys=cygwin32 ;;
1513       *-pc-mingw* )             opsys=mingw32 ;
1514                                 test -z "$with_tty" && with_tty="no";;
1515           esac
1516   ;;
1517
1518     m68k-*-linux* ) machine=m68k opsys=linux ;;
1519
1520 esac
1521
1522 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1523
1524 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1525
1526 if test -r "${srcdir}/src/m/${machine}.h"; then
1527   machfile="m/${machine}.h"
1528   { test "$extra_verbose" = "yes" && cat << EOF
1529     Defining config_machfile = "$machfile"
1530 EOF
1531 cat >> confdefs.h <<EOF
1532 #define config_machfile "$machfile"
1533 EOF
1534 }
1535
1536 else
1537   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1538   echo "Using configure-time autodetection only."
1539 fi
1540
1541 if test -r "${srcdir}/src/s/${opsys}.h"; then
1542   opsysfile="s/${opsys}.h"
1543   { test "$extra_verbose" = "yes" && cat << EOF
1544     Defining config_opsysfile = "$opsysfile"
1545 EOF
1546 cat >> confdefs.h <<EOF
1547 #define config_opsysfile "$opsysfile"
1548 EOF
1549 }
1550
1551 else
1552   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1553   echo "Using configure-time autodetection only."
1554 fi
1555
1556
1557 if test -z "$pdump"; then
1558   case "$opsys" in
1559     linux* )  pdump=yes ;;        darwin )  pdump=yes ;;        cygwin* ) pdump=yes ;;        *)        pdump=no ;;
1560   esac
1561 fi
1562
1563 if test -z "$dynamic"; then
1564   case "$opsys" in
1565     hpux* | sunos4* ) dynamic=no ;;
1566     *) dynamic=yes ;;
1567   esac
1568 fi
1569 if test "$dynamic" = "yes"; then
1570   case "$opsys" in
1571     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1572     decosf* ) ld_call_shared="-call_shared" ;;
1573     darwin ) { test "$extra_verbose" = "yes" && cat << \EOF
1574     Defining DLSYM_NEEDS_UNDERSCORE
1575 EOF
1576 cat >> confdefs.h <<\EOF
1577 #define DLSYM_NEEDS_UNDERSCORE 1
1578 EOF
1579 }
1580  ;;
1581   esac
1582 else   case "$opsys" in
1583     sol2 )
1584       echo "Static linking is not supported on Solaris 2."
1585       echo "Rerun configure without specifying --dynamic=no."
1586       exit 1 ;;
1587     linux   ) ld_call_shared="-Bstatic" ;;
1588     decosf* ) ld_call_shared="-non_shared" ;;
1589   esac
1590 fi
1591
1592 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1593
1594 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1595 { test "$extra_verbose" = "yes" && cat << EOF
1596     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1597 EOF
1598 cat >> confdefs.h <<EOF
1599 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1600 EOF
1601 }
1602
1603
1604
1605 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1606 if test "$with_workshop $with_tooltalk" = "yes no"; then
1607   (echo "$progname: Usage error:"
1608 echo " " "--with-workshop requires --with-tooltalk"
1609 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1610 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1611 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1612 fi
1613
1614 if test "$with_workshop" = "yes"; then
1615   { test "$extra_verbose" = "yes" && cat << \EOF
1616     Defining SUNPRO
1617 EOF
1618 cat >> confdefs.h <<\EOF
1619 #define SUNPRO 1
1620 EOF
1621 }
1622
1623   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1624    echo "    xemacs will be linked with \"sunpro.o\""
1625  fi
1626 fi
1627
1628 if test "$with_clash_detection" != "no"; then
1629   { test "$extra_verbose" = "yes" && cat << \EOF
1630     Defining CLASH_DETECTION
1631 EOF
1632 cat >> confdefs.h <<\EOF
1633 #define CLASH_DETECTION 1
1634 EOF
1635 }
1636
1637   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1638    echo "    xemacs will be linked with \"filelock.o\""
1639  fi
1640 fi
1641
1642 test -n "$compiler" && CC="$compiler"
1643 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1644 fi
1645
1646 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1647 if test "${CFLAGS-unset}" != unset
1648   then cflags_specified=yes;
1649   else cflags_specified=no;
1650 fi
1651
1652 xe_save_CFLAGS="$CFLAGS"
1653
1654 # Extract the first word of "gcc", so it can be a program name with args.
1655 set dummy gcc; ac_word=$2
1656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1657 echo "configure:1658: checking for $ac_word" >&5
1658
1659 if test -n "$CC"; then
1660   ac_cv_prog_CC="$CC" # Let the user override the test.
1661 else
1662   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1663   ac_dummy="$PATH"
1664   for ac_dir in $ac_dummy; do
1665     test -z "$ac_dir" && ac_dir=.
1666     if test -f $ac_dir/$ac_word; then
1667       ac_cv_prog_CC="gcc"
1668       break
1669     fi
1670   done
1671   IFS="$ac_save_ifs"
1672 fi
1673 CC="$ac_cv_prog_CC"
1674 if test -n "$CC"; then
1675   echo "$ac_t""$CC" 1>&6
1676 else
1677   echo "$ac_t""no" 1>&6
1678 fi
1679
1680 if test -z "$CC"; then
1681   # Extract the first word of "cc", so it can be a program name with args.
1682 set dummy cc; ac_word=$2
1683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1684 echo "configure:1685: checking for $ac_word" >&5
1685
1686 if test -n "$CC"; then
1687   ac_cv_prog_CC="$CC" # Let the user override the test.
1688 else
1689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1690   ac_prog_rejected=no
1691   ac_dummy="$PATH"
1692   for ac_dir in $ac_dummy; do
1693     test -z "$ac_dir" && ac_dir=.
1694     if test -f $ac_dir/$ac_word; then
1695       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1696         ac_prog_rejected=yes
1697         continue
1698       fi
1699       ac_cv_prog_CC="cc"
1700       break
1701     fi
1702   done
1703   IFS="$ac_save_ifs"
1704 if test $ac_prog_rejected = yes; then
1705   # We found a bogon in the path, so make sure we never use it.
1706   set dummy $ac_cv_prog_CC
1707   shift
1708   if test $# -gt 0; then
1709     # We chose a different compiler from the bogus one.
1710     # However, it has the same basename, so the bogon will be chosen
1711     # first if we set CC to just the basename; use the full file name.
1712     shift
1713     set dummy "$ac_dir/$ac_word" "$@"
1714     shift
1715     ac_cv_prog_CC="$@"
1716   fi
1717 fi
1718 fi
1719 CC="$ac_cv_prog_CC"
1720 if test -n "$CC"; then
1721   echo "$ac_t""$CC" 1>&6
1722 else
1723   echo "$ac_t""no" 1>&6
1724 fi
1725
1726   if test -z "$CC"; then
1727     case "`uname -s`" in
1728     *win32* | *WIN32*)
1729       # Extract the first word of "cl", so it can be a program name with args.
1730 set dummy cl; ac_word=$2
1731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1732 echo "configure:1733: checking for $ac_word" >&5
1733
1734 if test -n "$CC"; then
1735   ac_cv_prog_CC="$CC" # Let the user override the test.
1736 else
1737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1738   ac_dummy="$PATH"
1739   for ac_dir in $ac_dummy; do
1740     test -z "$ac_dir" && ac_dir=.
1741     if test -f $ac_dir/$ac_word; then
1742       ac_cv_prog_CC="cl"
1743       break
1744     fi
1745   done
1746   IFS="$ac_save_ifs"
1747 fi
1748 CC="$ac_cv_prog_CC"
1749 if test -n "$CC"; then
1750   echo "$ac_t""$CC" 1>&6
1751 else
1752   echo "$ac_t""no" 1>&6
1753 fi
1754  ;;
1755     esac
1756   fi
1757   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1758 fi
1759
1760 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1761 echo "configure:1762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1762
1763 ac_ext=c
1764 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1765 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1766 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'
1767 ac_cpp='$CPP '"$xe_cppflags"
1768 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1769 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1770 cross_compiling=no
1771
1772 cat > conftest.$ac_ext << EOF
1773
1774 #line 1775 "configure"
1775 #include "confdefs.h"
1776
1777 main(){return(0);}
1778 EOF
1779 if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1780   ac_cv_prog_cc_works=yes
1781   # If we can't run a trivial program, we are probably using a cross compiler.
1782   if (./conftest; exit) 2>/dev/null; then
1783     ac_cv_prog_cc_cross=no
1784   else
1785     ac_cv_prog_cc_cross=yes
1786   fi
1787 else
1788   echo "configure: failed program was:" >&5
1789   cat conftest.$ac_ext >&5
1790   ac_cv_prog_cc_works=no
1791 fi
1792 rm -fr conftest*
1793 ac_ext=c
1794 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1795 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1796 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'
1797 ac_cpp='$CPP '"$xe_cppflags"
1798 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1799 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1800 cross_compiling=no
1801
1802 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1803 if test $ac_cv_prog_cc_works = no; then
1804   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1805 fi
1806 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1807 echo "configure:1808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1808 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1809 cross_compiling=$ac_cv_prog_cc_cross
1810
1811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1812 echo "configure:1813: checking whether we are using GNU C" >&5
1813
1814 cat > conftest.c <<EOF
1815 #ifdef __GNUC__
1816   yes;
1817 #endif
1818 EOF
1819 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1820   ac_cv_prog_gcc=yes
1821 else
1822   ac_cv_prog_gcc=no
1823 fi
1824
1825 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1826
1827 if test $ac_cv_prog_gcc = yes; then
1828   GCC=yes
1829 else
1830   GCC=
1831 fi
1832
1833 ac_test_CFLAGS="${CFLAGS+set}"
1834 ac_save_CFLAGS="$CFLAGS"
1835 CFLAGS=
1836 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1837 echo "configure:1838: checking whether ${CC-cc} accepts -g" >&5
1838
1839 echo 'void f(){}' > conftest.c
1840 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1841   ac_cv_prog_cc_g=yes
1842 else
1843   ac_cv_prog_cc_g=no
1844 fi
1845 rm -f conftest*
1846
1847
1848 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1849 if test "$ac_test_CFLAGS" = set; then
1850   CFLAGS="$ac_save_CFLAGS"
1851 elif test $ac_cv_prog_cc_g = yes; then
1852   if test "$GCC" = yes; then
1853     CFLAGS="-g -O2"
1854   else
1855     CFLAGS="-g"
1856   fi
1857 else
1858   if test "$GCC" = yes; then
1859     CFLAGS="-O2"
1860   else
1861     CFLAGS=
1862   fi
1863 fi
1864  
1865 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1866   CC=${NON_GNU_CC-cc}
1867   # Extract the first word of "gcc", so it can be a program name with args.
1868 set dummy gcc; ac_word=$2
1869 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1870 echo "configure:1871: checking for $ac_word" >&5
1871
1872 if test -n "$CC"; then
1873   ac_cv_prog_CC="$CC" # Let the user override the test.
1874 else
1875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1876   ac_dummy="$PATH"
1877   for ac_dir in $ac_dummy; do
1878     test -z "$ac_dir" && ac_dir=.
1879     if test -f $ac_dir/$ac_word; then
1880       ac_cv_prog_CC="gcc"
1881       break
1882     fi
1883   done
1884   IFS="$ac_save_ifs"
1885 fi
1886 CC="$ac_cv_prog_CC"
1887 if test -n "$CC"; then
1888   echo "$ac_t""$CC" 1>&6
1889 else
1890   echo "$ac_t""no" 1>&6
1891 fi
1892
1893 if test -z "$CC"; then
1894   # Extract the first word of "cc", so it can be a program name with args.
1895 set dummy cc; ac_word=$2
1896 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1897 echo "configure:1898: checking for $ac_word" >&5
1898
1899 if test -n "$CC"; then
1900   ac_cv_prog_CC="$CC" # Let the user override the test.
1901 else
1902   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1903   ac_prog_rejected=no
1904   ac_dummy="$PATH"
1905   for ac_dir in $ac_dummy; do
1906     test -z "$ac_dir" && ac_dir=.
1907     if test -f $ac_dir/$ac_word; then
1908       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1909         ac_prog_rejected=yes
1910         continue
1911       fi
1912       ac_cv_prog_CC="cc"
1913       break
1914     fi
1915   done
1916   IFS="$ac_save_ifs"
1917 if test $ac_prog_rejected = yes; then
1918   # We found a bogon in the path, so make sure we never use it.
1919   set dummy $ac_cv_prog_CC
1920   shift
1921   if test $# -gt 0; then
1922     # We chose a different compiler from the bogus one.
1923     # However, it has the same basename, so the bogon will be chosen
1924     # first if we set CC to just the basename; use the full file name.
1925     shift
1926     set dummy "$ac_dir/$ac_word" "$@"
1927     shift
1928     ac_cv_prog_CC="$@"
1929   fi
1930 fi
1931 fi
1932 CC="$ac_cv_prog_CC"
1933 if test -n "$CC"; then
1934   echo "$ac_t""$CC" 1>&6
1935 else
1936   echo "$ac_t""no" 1>&6
1937 fi
1938
1939   if test -z "$CC"; then
1940     case "`uname -s`" in
1941     *win32* | *WIN32*)
1942       # Extract the first word of "cl", so it can be a program name with args.
1943 set dummy cl; ac_word=$2
1944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1945 echo "configure:1946: checking for $ac_word" >&5
1946
1947 if test -n "$CC"; then
1948   ac_cv_prog_CC="$CC" # Let the user override the test.
1949 else
1950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1951   ac_dummy="$PATH"
1952   for ac_dir in $ac_dummy; do
1953     test -z "$ac_dir" && ac_dir=.
1954     if test -f $ac_dir/$ac_word; then
1955       ac_cv_prog_CC="cl"
1956       break
1957     fi
1958   done
1959   IFS="$ac_save_ifs"
1960 fi
1961 CC="$ac_cv_prog_CC"
1962 if test -n "$CC"; then
1963   echo "$ac_t""$CC" 1>&6
1964 else
1965   echo "$ac_t""no" 1>&6
1966 fi
1967  ;;
1968     esac
1969   fi
1970   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1971 fi
1972
1973 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1974 echo "configure:1975: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1975
1976 ac_ext=c
1977 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1978 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1979 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'
1980 ac_cpp='$CPP '"$xe_cppflags"
1981 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1982 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1983 cross_compiling=no
1984
1985 cat > conftest.$ac_ext << EOF
1986
1987 #line 1988 "configure"
1988 #include "confdefs.h"
1989
1990 main(){return(0);}
1991 EOF
1992 if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993   ac_cv_prog_cc_works=yes
1994   # If we can't run a trivial program, we are probably using a cross compiler.
1995   if (./conftest; exit) 2>/dev/null; then
1996     ac_cv_prog_cc_cross=no
1997   else
1998     ac_cv_prog_cc_cross=yes
1999   fi
2000 else
2001   echo "configure: failed program was:" >&5
2002   cat conftest.$ac_ext >&5
2003   ac_cv_prog_cc_works=no
2004 fi
2005 rm -fr conftest*
2006 ac_ext=c
2007 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2008 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2009 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'
2010 ac_cpp='$CPP '"$xe_cppflags"
2011 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2012 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2013 cross_compiling=no
2014
2015 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2016 if test $ac_cv_prog_cc_works = no; then
2017   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2018 fi
2019 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2020 echo "configure:2021: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2021 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2022 cross_compiling=$ac_cv_prog_cc_cross
2023
2024 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2025 echo "configure:2026: checking whether we are using GNU C" >&5
2026
2027 cat > conftest.c <<EOF
2028 #ifdef __GNUC__
2029   yes;
2030 #endif
2031 EOF
2032 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2033   ac_cv_prog_gcc=yes
2034 else
2035   ac_cv_prog_gcc=no
2036 fi
2037
2038 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2039
2040 if test $ac_cv_prog_gcc = yes; then
2041   GCC=yes
2042 else
2043   GCC=
2044 fi
2045
2046 ac_test_CFLAGS="${CFLAGS+set}"
2047 ac_save_CFLAGS="$CFLAGS"
2048 CFLAGS=
2049 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2050 echo "configure:2051: checking whether ${CC-cc} accepts -g" >&5
2051
2052 echo 'void f(){}' > conftest.c
2053 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2054   ac_cv_prog_cc_g=yes
2055 else
2056   ac_cv_prog_cc_g=no
2057 fi
2058 rm -f conftest*
2059
2060
2061 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2062 if test "$ac_test_CFLAGS" = set; then
2063   CFLAGS="$ac_save_CFLAGS"
2064 elif test $ac_cv_prog_cc_g = yes; then
2065   if test "$GCC" = yes; then
2066     CFLAGS="-g -O2"
2067   else
2068     CFLAGS="-g"
2069   fi
2070 else
2071   if test "$GCC" = yes; then
2072     CFLAGS="-O2"
2073   else
2074     CFLAGS=
2075   fi
2076 fi
2077
2078 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2079   CC=gcc
2080   # Extract the first word of "gcc", so it can be a program name with args.
2081 set dummy gcc; ac_word=$2
2082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_word" >&5
2084
2085 if test -n "$CC"; then
2086   ac_cv_prog_CC="$CC" # Let the user override the test.
2087 else
2088   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2089   ac_dummy="$PATH"
2090   for ac_dir in $ac_dummy; do
2091     test -z "$ac_dir" && ac_dir=.
2092     if test -f $ac_dir/$ac_word; then
2093       ac_cv_prog_CC="gcc"
2094       break
2095     fi
2096   done
2097   IFS="$ac_save_ifs"
2098 fi
2099 CC="$ac_cv_prog_CC"
2100 if test -n "$CC"; then
2101   echo "$ac_t""$CC" 1>&6
2102 else
2103   echo "$ac_t""no" 1>&6
2104 fi
2105
2106 if test -z "$CC"; then
2107   # Extract the first word of "cc", so it can be a program name with args.
2108 set dummy cc; ac_word=$2
2109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2110 echo "configure:2111: checking for $ac_word" >&5
2111
2112 if test -n "$CC"; then
2113   ac_cv_prog_CC="$CC" # Let the user override the test.
2114 else
2115   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2116   ac_prog_rejected=no
2117   ac_dummy="$PATH"
2118   for ac_dir in $ac_dummy; do
2119     test -z "$ac_dir" && ac_dir=.
2120     if test -f $ac_dir/$ac_word; then
2121       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2122         ac_prog_rejected=yes
2123         continue
2124       fi
2125       ac_cv_prog_CC="cc"
2126       break
2127     fi
2128   done
2129   IFS="$ac_save_ifs"
2130 if test $ac_prog_rejected = yes; then
2131   # We found a bogon in the path, so make sure we never use it.
2132   set dummy $ac_cv_prog_CC
2133   shift
2134   if test $# -gt 0; then
2135     # We chose a different compiler from the bogus one.
2136     # However, it has the same basename, so the bogon will be chosen
2137     # first if we set CC to just the basename; use the full file name.
2138     shift
2139     set dummy "$ac_dir/$ac_word" "$@"
2140     shift
2141     ac_cv_prog_CC="$@"
2142   fi
2143 fi
2144 fi
2145 CC="$ac_cv_prog_CC"
2146 if test -n "$CC"; then
2147   echo "$ac_t""$CC" 1>&6
2148 else
2149   echo "$ac_t""no" 1>&6
2150 fi
2151
2152   if test -z "$CC"; then
2153     case "`uname -s`" in
2154     *win32* | *WIN32*)
2155       # Extract the first word of "cl", so it can be a program name with args.
2156 set dummy cl; ac_word=$2
2157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2158 echo "configure:2159: checking for $ac_word" >&5
2159
2160 if test -n "$CC"; then
2161   ac_cv_prog_CC="$CC" # Let the user override the test.
2162 else
2163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2164   ac_dummy="$PATH"
2165   for ac_dir in $ac_dummy; do
2166     test -z "$ac_dir" && ac_dir=.
2167     if test -f $ac_dir/$ac_word; then
2168       ac_cv_prog_CC="cl"
2169       break
2170     fi
2171   done
2172   IFS="$ac_save_ifs"
2173 fi
2174 CC="$ac_cv_prog_CC"
2175 if test -n "$CC"; then
2176   echo "$ac_t""$CC" 1>&6
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180  ;;
2181     esac
2182   fi
2183   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2184 fi
2185
2186 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2187 echo "configure:2188: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2188
2189 ac_ext=c
2190 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2191 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2192 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'
2193 ac_cpp='$CPP '"$xe_cppflags"
2194 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2195 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2196 cross_compiling=no
2197
2198 cat > conftest.$ac_ext << EOF
2199
2200 #line 2201 "configure"
2201 #include "confdefs.h"
2202
2203 main(){return(0);}
2204 EOF
2205 if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2206   ac_cv_prog_cc_works=yes
2207   # If we can't run a trivial program, we are probably using a cross compiler.
2208   if (./conftest; exit) 2>/dev/null; then
2209     ac_cv_prog_cc_cross=no
2210   else
2211     ac_cv_prog_cc_cross=yes
2212   fi
2213 else
2214   echo "configure: failed program was:" >&5
2215   cat conftest.$ac_ext >&5
2216   ac_cv_prog_cc_works=no
2217 fi
2218 rm -fr conftest*
2219 ac_ext=c
2220 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2221 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2222 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'
2223 ac_cpp='$CPP '"$xe_cppflags"
2224 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2225 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2226 cross_compiling=no
2227
2228 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2229 if test $ac_cv_prog_cc_works = no; then
2230   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2231 fi
2232 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2233 echo "configure:2234: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2234 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2235 cross_compiling=$ac_cv_prog_cc_cross
2236
2237 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2238 echo "configure:2239: checking whether we are using GNU C" >&5
2239
2240 cat > conftest.c <<EOF
2241 #ifdef __GNUC__
2242   yes;
2243 #endif
2244 EOF
2245 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2246   ac_cv_prog_gcc=yes
2247 else
2248   ac_cv_prog_gcc=no
2249 fi
2250
2251 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2252
2253 if test $ac_cv_prog_gcc = yes; then
2254   GCC=yes
2255 else
2256   GCC=
2257 fi
2258
2259 ac_test_CFLAGS="${CFLAGS+set}"
2260 ac_save_CFLAGS="$CFLAGS"
2261 CFLAGS=
2262 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2263 echo "configure:2264: checking whether ${CC-cc} accepts -g" >&5
2264
2265 echo 'void f(){}' > conftest.c
2266 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2267   ac_cv_prog_cc_g=yes
2268 else
2269   ac_cv_prog_cc_g=no
2270 fi
2271 rm -f conftest*
2272
2273
2274 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2275 if test "$ac_test_CFLAGS" = set; then
2276   CFLAGS="$ac_save_CFLAGS"
2277 elif test $ac_cv_prog_cc_g = yes; then
2278   if test "$GCC" = yes; then
2279     CFLAGS="-g -O2"
2280   else
2281     CFLAGS="-g"
2282   fi
2283 else
2284   if test "$GCC" = yes; then
2285     CFLAGS="-O2"
2286   else
2287     CFLAGS=
2288   fi
2289 fi
2290
2291 fi
2292 CFLAGS="$xe_save_CFLAGS"
2293
2294
2295 test -n "$CPP" -a -d "$CPP" && CPP=
2296
2297 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2298
2299 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2300 echo "configure:2301: checking how to run the C preprocessor" >&5
2301 # On Suns, sometimes $CPP names a directory.
2302 if test -n "$CPP" && test -d "$CPP"; then
2303   CPP=
2304 fi
2305 if test -z "$CPP"; then
2306
2307   # This must be in double quotes, not single quotes, because CPP may get
2308   # substituted into the Makefile and "${CC-cc}" will confuse make.
2309   CPP="${CC-cc} -E"
2310   # On the NeXT, cc -E runs the code through the compiler's parser,
2311   # not just through cpp.
2312   cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 #include <assert.h>
2316 Syntax Error
2317 EOF
2318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2319 { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321 if test -z "$ac_err"; then
2322   :
2323 else
2324   echo "$ac_err" >&5
2325   echo "configure: failed program was:" >&5
2326   cat conftest.$ac_ext >&5
2327   rm -rf conftest*
2328   CPP="${CC-cc} -E -traditional-cpp"
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <assert.h>
2333 Syntax Error
2334 EOF
2335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2336 { (eval echo configure:2337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2338 if test -z "$ac_err"; then
2339   :
2340 else
2341   echo "$ac_err" >&5
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   CPP="${CC-cc} -nologo -E"
2346   cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349 #include <assert.h>
2350 Syntax Error
2351 EOF
2352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2353 { (eval echo configure:2354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2355 if test -z "$ac_err"; then
2356   :
2357 else
2358   echo "$ac_err" >&5
2359   echo "configure: failed program was:" >&5
2360   cat conftest.$ac_ext >&5
2361   rm -rf conftest*
2362   CPP=/lib/cpp
2363 fi
2364 rm -f conftest*
2365 fi
2366 rm -f conftest*
2367 fi
2368 rm -f conftest*
2369   ac_cv_prog_CPP="$CPP"
2370   CPP="$ac_cv_prog_CPP"
2371 else
2372   ac_cv_prog_CPP="$CPP"
2373 fi
2374 echo "$ac_t""$CPP" 1>&6
2375
2376
2377
2378 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2379 echo "configure:2380: checking for AIX" >&5
2380 cat > conftest.$ac_ext <<EOF
2381 #line 2382 "configure"
2382 #include "confdefs.h"
2383 #ifdef _AIX
2384   yes
2385 #endif
2386
2387 EOF
2388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2389   egrep "yes" >/dev/null 2>&1; then
2390   rm -rf conftest*
2391   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2392     Defining _ALL_SOURCE
2393 EOF
2394 cat >> confdefs.h <<\EOF
2395 #define _ALL_SOURCE 1
2396 EOF
2397 }
2398
2399 else
2400   rm -rf conftest*
2401   echo "$ac_t""no" 1>&6
2402 fi
2403 rm -f conftest*
2404
2405  
2406
2407 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2408 echo "configure:2409: checking for GNU libc" >&5
2409 cat > conftest.$ac_ext <<EOF
2410 #line 2411 "configure"
2411 #include "confdefs.h"
2412 #include <features.h>
2413 int main() {
2414
2415 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2416 #error Not a GNU libc system :-(
2417 ******* ======= ******** &&&&&&&&
2418 #endif
2419
2420 ; return 0; }
2421 EOF
2422 if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2423   rm -rf conftest*
2424   have_glibc=yes
2425 else
2426   echo "configure: failed program was:" >&5
2427   cat conftest.$ac_ext >&5
2428   rm -rf conftest*
2429   have_glibc=no
2430 fi
2431 rm -f conftest*
2432 echo "$ac_t""$have_glibc" 1>&6
2433 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2434     Defining _GNU_SOURCE
2435 EOF
2436 cat >> confdefs.h <<\EOF
2437 #define _GNU_SOURCE 1
2438 EOF
2439 }
2440
2441
2442 case "$opsys" in
2443   sol2)
2444    { test "$extra_verbose" = "yes" && cat << \EOF
2445     Defining __EXTENSIONS__
2446 EOF
2447 cat >> confdefs.h <<\EOF
2448 #define __EXTENSIONS__ 1
2449 EOF
2450 }
2451
2452       if test "$os_release" -ge 505; then
2453      { test "$extra_verbose" = "yes" && cat << \EOF
2454     Defining _XOPEN_SOURCE = 500
2455 EOF
2456 cat >> confdefs.h <<\EOF
2457 #define _XOPEN_SOURCE 500
2458 EOF
2459 }
2460
2461      { test "$extra_verbose" = "yes" && cat << \EOF
2462     Defining _XOPEN_SOURCE_EXTENDED
2463 EOF
2464 cat >> confdefs.h <<\EOF
2465 #define _XOPEN_SOURCE_EXTENDED 1
2466 EOF
2467 }
2468
2469    fi ;;
2470   linux)
2471     { test "$extra_verbose" = "yes" && cat << \EOF
2472     Defining _POSIX_C_SOURCE = 199506L
2473 EOF
2474 cat >> confdefs.h <<\EOF
2475 #define _POSIX_C_SOURCE 199506L
2476 EOF
2477 }
2478
2479     { test "$extra_verbose" = "yes" && cat << \EOF
2480     Defining _XOPEN_SOURCE = 500
2481 EOF
2482 cat >> confdefs.h <<\EOF
2483 #define _XOPEN_SOURCE 500
2484 EOF
2485 }
2486
2487     { test "$extra_verbose" = "yes" && cat << \EOF
2488     Defining _XOPEN_SOURCE_EXTENDED
2489 EOF
2490 cat >> confdefs.h <<\EOF
2491 #define _XOPEN_SOURCE_EXTENDED 1
2492 EOF
2493 }
2494
2495     ;;
2496 esac
2497
2498 cat > conftest.$ac_ext <<EOF
2499 #line 2500 "configure"
2500 #include "confdefs.h"
2501 int main () {
2502 #if defined __SUNPRO_C
2503 return 11;
2504 #elif defined __DECC
2505 return 12;
2506 #elif defined __USLC__ && defined __SCO_VERSION__
2507 return 13;
2508 #elif defined __INTEL_COMPILER
2509 return 14;
2510 #else
2511 return 0;
2512 #endif
2513 }
2514 EOF
2515 if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2516 then
2517   :
2518 else
2519   conftest_rc="$?"
2520   echo "configure: failed program was:" >&5
2521   cat conftest.$ac_ext >&5
2522   rm -fr conftest*
2523   case "$conftest_rc" in
2524   11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
2525   12) echo "You appear to be using the DEC C compiler."    ; __DECC=yes ;;
2526   13) echo "You appear to be using the SCO C compiler."    ; __USLC__=yes ;;
2527   14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
2528             GCC=no ;;
2529 esac
2530 fi
2531 rm -fr conftest*
2532
2533
2534
2535
2536 echo "Extracting information from the machine- and system-dependent headers..."
2537
2538 tempcname="conftest.c"
2539
2540
2541
2542 cat > $tempcname < confdefs.h
2543 cat >> $tempcname <<EOF
2544 #define NOT_C_CODE
2545 #define C_SWITCH_SITE
2546 #define C_SWITCH_X_SITE
2547 #define LD_SWITCH_SITE
2548 #define LD_SWITCH_X_SITE
2549 #define LD_SWITCH_X_SITE_AUX
2550 #define OS_RELEASE $os_release
2551
2552 #ifdef config_opsysfile
2553 #include "$srcdir/src/$opsysfile"
2554 #endif
2555
2556 #ifdef config_machfile
2557 #include "$srcdir/src/$machfile"
2558 #endif
2559
2560 #ifndef LIBS_MACHINE
2561 #define LIBS_MACHINE
2562 #endif
2563 configure___ libs_machine=LIBS_MACHINE
2564
2565 #ifndef LIBS_SYSTEM
2566 #define LIBS_SYSTEM
2567 #endif
2568 configure___ libs_system=LIBS_SYSTEM
2569
2570 #ifndef LIBS_TERMCAP
2571 #define LIBS_TERMCAP
2572 #endif
2573 configure___ libs_termcap=LIBS_TERMCAP
2574
2575 #ifndef LIB_STANDARD
2576 #define LIB_STANDARD
2577 #endif
2578 configure___ libs_standard=LIB_STANDARD
2579
2580
2581 #ifndef OBJECTS_MACHINE
2582 #define OBJECTS_MACHINE
2583 #endif
2584 configure___ objects_machine=OBJECTS_MACHINE
2585
2586 #ifndef OBJECTS_SYSTEM
2587 #define OBJECTS_SYSTEM
2588 #endif
2589 configure___ objects_system=OBJECTS_SYSTEM
2590
2591
2592 #ifndef C_SWITCH_MACHINE
2593 #define C_SWITCH_MACHINE
2594 #endif
2595 configure___ c_switch_machine=C_SWITCH_MACHINE
2596
2597 #ifndef C_SWITCH_SYSTEM
2598 #define C_SWITCH_SYSTEM
2599 #endif
2600 configure___ c_switch_system=C_SWITCH_SYSTEM
2601
2602
2603 #ifndef LD_SWITCH_MACHINE
2604 #define LD_SWITCH_MACHINE
2605 #endif
2606 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2607
2608 #ifndef LD_SWITCH_SYSTEM
2609 #define LD_SWITCH_SYSTEM
2610 #endif
2611 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2612
2613
2614 #ifndef UNEXEC
2615 #define UNEXEC "unexec.o"
2616 #endif
2617 configure___ unexec=UNEXEC
2618
2619
2620 #ifndef LD_SWITCH_SHARED
2621 #define LD_SWITCH_SHARED "-c"
2622 #endif
2623 configure___ ld_switch_shared=LD_SWITCH_SHARED
2624
2625
2626 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2627 configure___ ordinary_ld=ORDINARY_LD
2628
2629 #ifdef ORDINARY_LINK
2630 #define LD ORDINARY_LD
2631 #else /* no ORDINARY LINK */
2632 #ifdef COFF_ENCAPSULATE
2633 #define LD "\$(CC) -nostdlib"
2634 #else /* not COFF_ENCAPSULATE */
2635 #ifdef LINKER
2636 #define LD LINKER
2637 #else /* ! defined (LINKER) */
2638 #define LD "ld"
2639 #endif /* ! defined (LINKER) */
2640 #endif /* ! defined (COFF_ENCAPSULATE) */
2641 #endif /* not ORDINARY_LINK */
2642 configure___ ld=LD
2643
2644 #ifndef LIB_GCC
2645 #define LIB_GCC
2646 #endif
2647 configure___ lib_gcc=LIB_GCC
2648
2649 #ifndef LD_TEXT_START_ADDR
2650 #define LD_TEXT_START_ADDR
2651 #endif
2652 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2653
2654
2655 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2656 #ifdef NO_REMAP
2657 #ifdef COFF_ENCAPSULATE
2658 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2659 #else /* ! defined (COFF_ENCAPSULATE) */
2660 #define START_FILES "pre-crt0.o /lib/crt0.o"
2661 #endif /* ! defined (COFF_ENCAPSULATE) */
2662 #else /* ! defined (NO_REMAP) */
2663 #define START_FILES "ecrt0.o"
2664 #endif /* ! defined (NO_REMAP) */
2665 #endif /* no ORDINARY_LINK */
2666 #ifndef START_FILES
2667 #define START_FILES
2668 #endif
2669 configure___ start_files=START_FILES
2670
2671 #ifdef ORDINARY_LINK
2672 configure___ ordinary_link=yes
2673 #else
2674 configure___ ordinary_link=no
2675 #endif
2676
2677 #ifdef SYSTEM_MALLOC
2678 configure___ system_malloc=yes
2679 #else
2680 configure___ system_malloc=no
2681 #endif
2682
2683 #ifdef TERMINFO
2684 configure___ have_terminfo=yes
2685 #else
2686 configure___ have_terminfo=no
2687 #endif
2688
2689 #ifdef MAIL_USE_FLOCK
2690 configure___ mail_use_flock=yes
2691 #else
2692 configure___ mail_use_flock=no
2693 #endif
2694
2695 #ifdef MAIL_USE_LOCKF
2696 configure___ mail_use_lockf=yes
2697 #else
2698 configure___ mail_use_lockf=no
2699 #endif
2700
2701 #ifdef MAIL_USE_LOCKING
2702 configure___ mail_use_locking=yes
2703 #else
2704 configure___ mail_use_locking=no
2705 #endif
2706
2707 #ifdef HAVE_WIN32_PROCESSES
2708 configure___ win32_processes=yes
2709 #else
2710 configure___ win32_processes=no
2711 #endif
2712
2713 EOF
2714
2715 CPP=`eval "echo $CPP $CPPFLAGS"`
2716 eval `$CPP -Isrc $tempcname \
2717         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2718
2719 rm $tempcname
2720
2721 if test "$pdump" = "yes"; then
2722   ordinary_link="yes"
2723   ld="${ordinary_ld}"
2724   start_files=
2725   libs_standard=
2726   unexec=
2727   lib_gcc=
2728 fi
2729
2730 test "$extra_verbose" = "yes" && \
2731   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 ""
2732
2733 case "$opsys" in mingw* | cygwin*)
2734   cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
2735   cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"`
2736   cygwin_include="-I$cygwin_include/include" ;
2737   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2738   case "$opsys" in mingw*)
2739     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2740   esac
2741   ;;
2742 esac
2743
2744 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2745
2746
2747 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2748
2749 if test "$__USLC__" = yes; then
2750   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2751 echo "configure:2752: checking for whether the -Kalloca compiler flag is needed" >&5
2752   need_kalloca=no
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756
2757 int main() {
2758 void *x = alloca(4);
2759 ; return 0; }
2760 EOF
2761 if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2762   rm -rf conftest*
2763   :
2764 else
2765   echo "configure: failed program was:" >&5
2766   cat conftest.$ac_ext >&5
2767   rm -rf conftest*
2768   
2769     xe_save_c_switch_system="$c_switch_system"
2770     c_switch_system="$c_switch_system -Kalloca"
2771     cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2774
2775 int main() {
2776 void *x = alloca(4);
2777 ; return 0; }
2778 EOF
2779 if { (eval echo configure:2780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2780   rm -rf conftest*
2781    need_kalloca=yes 
2782 else
2783   echo "configure: failed program was:" >&5
2784   cat conftest.$ac_ext >&5
2785 fi
2786 rm -f conftest*
2787     c_switch_system="$xe_save_c_switch_system"
2788 fi
2789 rm -f conftest*
2790   echo "$ac_t""$need_kalloca" 1>&6
2791   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
2792 fi
2793
2794 if test "$cflags_specified" = "no"; then
2795       if   test "$GCC" = "yes"; then
2796     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2797         CFLAGS="$CFLAGS -Wsign-compare"
2798         case "`gcc -v --help 2>&1`" in
2799       *-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
2800     esac
2801                 if test "$xemacs_compiler" != "g++"; then
2802       CFLAGS="$CFLAGS -Wshadow"
2803     fi
2804             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2805               elif test "$__SUNPRO_C" = "yes"; then
2806     case "$opsys" in
2807       sol2    ) CFLAGS="-v -xO4" ;;
2808       sunos4* ) CFLAGS="-xO2";;
2809     esac
2810   elif test "$__DECC" = "yes"; then
2811     CFLAGS="-O3"
2812   elif test "$CC" = "xlc"; then
2813     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2814   elif test "$__ICC" = "yes"; then
2815     CFLAGS="-g -O3 -Ob2 -Wall -W1"
2816     else
2817     CFLAGS="-O" ;  fi
2818 fi
2819
2820 if test "$GCC" = "yes"; then
2821 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2822 echo "configure:2823: checking for buggy gcc versions" >&5
2823 GCC_VERSION=`$CC --version`
2824 case `uname -s`:`uname -m`:$GCC_VERSION in
2825                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2826                         case "$CFLAGS" in
2827             *-O2*|*-O3*)
2828                 case "$CFLAGS" in
2829                     *-fno-schedule-insns*) ;;
2830                     *)
2831                         echo "$ac_t""yes" 1>&6
2832                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2833                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2834                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2835                         ;;
2836                 esac
2837                 ;;
2838         esac
2839         ;;
2840                     Linux:alpha:egcs-2.91.*)
2841         echo "$ac_t""yes" 1>&6
2842         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2843         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2844         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2845         ;;
2846     *:i*86*:2.7.2*)
2847         case "$CFLAGS" in
2848             *-O2*|*-O3*)
2849                 case "$GCC_VERSION" in
2850                     2.7.2)
2851                         case "$CFLAGS" in
2852                             *-fno-strength-reduce*) ;;
2853                             *)
2854                                 echo "$ac_t""yes" 1>&6
2855                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2856                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2857                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2858                                 ;;
2859                         esac
2860                         ;;
2861                 esac
2862                 case "$CFLAGS" in
2863                  *-fno-caller-saves*) ;;
2864                  *)
2865                     echo "$ac_t""yes" 1>&6
2866                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2867                     echo "configure: warning: -fno-caller-saves." 1>&2
2868                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2869                     ;;
2870                 esac
2871                 ;;
2872         esac
2873         ;;
2874 esac
2875 echo "$ac_t""no" 1>&6
2876 fi
2877
2878 if test "$pdump" != "yes"; then
2879   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2880 echo "configure:2881: checking for \"-z nocombreloc\" linker flag" >&5
2881   case "`ld --help 2>&1`" in
2882     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2883       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2884     *) echo "$ac_t""no" 1>&6 ;;
2885   esac
2886 fi
2887
2888
2889
2890 if test "$GCC" = "yes"; then
2891   set x $ld_switch_system; shift; ld_switch_system=""
2892   while test -n "$1"; do
2893     case $1 in
2894       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2895       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2896       -Xlinker* ) ;;
2897       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2898     esac
2899     shift
2900   done
2901 fi
2902
2903 if test "$GCC" = "yes"; then
2904   set x $ld_switch_machine; shift; ld_switch_machine=""
2905   while test -n "$1"; do
2906     case $1 in
2907       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2908       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2909       -Xlinker* ) ;;
2910       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2911     esac
2912     shift
2913   done
2914 fi
2915
2916 if test "$GCC" = "yes"; then
2917   set x $ld_switch_site; shift; ld_switch_site=""
2918   while test -n "$1"; do
2919     case $1 in
2920       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2921       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2922       -Xlinker* ) ;;
2923       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2924     esac
2925     shift
2926   done
2927 fi
2928
2929 if test "$GCC" = "yes"; then
2930   set x $LDFLAGS; shift; LDFLAGS=""
2931   while test -n "$1"; do
2932     case $1 in
2933       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2934       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2935       -Xlinker* ) ;;
2936       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2937     esac
2938     shift
2939   done
2940 fi
2941
2942 if test "$GCC" = "yes"; then
2943   set x $ld_call_shared; shift; ld_call_shared=""
2944   while test -n "$1"; do
2945     case $1 in
2946       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2947       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2948       -Xlinker* ) ;;
2949       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2950     esac
2951     shift
2952   done
2953 fi
2954
2955 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2956    echo "    xemacs will be linked with \"$objects_machine\""
2957  fi
2958 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2959    echo "    xemacs will be linked with \"$objects_system\""
2960  fi
2961 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2962    echo "    xemacs will be linked with \"$unexec\""
2963  fi
2964 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2965    echo "    xemacs will be linked with \"dumper.o\""
2966  fi
2967
2968 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2969 echo "configure:2970: checking for dynodump" >&5
2970 if test "$unexec" != "unexsol2.o"; then
2971   echo "$ac_t""no" 1>&6
2972 else
2973   echo "$ac_t""yes" 1>&6
2974   { test "$extra_verbose" = "yes" && cat << \EOF
2975     Defining DYNODUMP
2976 EOF
2977 cat >> confdefs.h <<\EOF
2978 #define DYNODUMP 1
2979 EOF
2980 }
2981
2982   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2983   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2984   case "$machine" in
2985     sparc   ) dynodump_arch=sparc ;;
2986     *86*    ) dynodump_arch=i386  ;;
2987     powerpc ) dynodump_arch=ppc   ;;
2988   esac
2989 fi
2990
2991
2992
2993 if test "$unexec" = "unexaix.o"; then
2994   if   test "$dynamic" = "no"; then
2995   start_flags="-Wl,-bnso,-bnodelcsect"
2996   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2997   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2998     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2999   done
3000   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
3001     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
3002   done
3003   
3004 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
3005 echo "configure:3006: checking for terminateAndUnload in -lC" >&5
3006 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
3007
3008 xe_check_libs=" -lC "
3009 cat > conftest.$ac_ext <<EOF
3010 #line 3011 "configure"
3011 #include "confdefs.h"
3012 /* Override any gcc2 internal prototype to avoid an error.  */
3013 /* We use char because int might match the return type of a gcc2
3014     builtin and then its argument prototype would still apply.  */
3015 char terminateAndUnload();
3016
3017 int main() {
3018 terminateAndUnload()
3019 ; return 0; }
3020 EOF
3021 if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3022   rm -rf conftest*
3023   eval "ac_cv_lib_$ac_lib_var=yes"
3024 else
3025   echo "configure: failed program was:" >&5
3026   cat conftest.$ac_ext >&5
3027   rm -rf conftest*
3028   eval "ac_cv_lib_$ac_lib_var=no"
3029 fi
3030 rm -f conftest*
3031 xe_check_libs=""
3032
3033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3034   echo "$ac_t""yes" 1>&6
3035   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3036 else
3037   echo "$ac_t""no" 1>&6
3038 fi
3039
3040
3041   fi
3042 elif test -n "$ld_text_start_addr"; then
3043   start_flags="-T $ld_text_start_addr -e __start"
3044 fi
3045
3046
3047
3048
3049 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3050  test -z "$linker" &&  linker='$(CC) -nostdlib'
3051  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3052 fi
3053 test "$GCC" != "yes" && lib_gcc=
3054
3055
3056
3057
3058
3059 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3060 if test -n "$site_libraries"; then
3061   for arg in $site_libraries; do
3062     case "$arg" in
3063      -* ) ;;
3064      * ) test -d "$arg" || \
3065            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3066        arg="-L${arg}" ;;
3067     esac
3068     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3069   done
3070 fi
3071
3072 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3073 if test -n "$site_includes"; then
3074   for arg in $site_includes; do
3075     case "$arg" in
3076       -* ) ;;
3077       * ) test -d "$arg" || \
3078            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3079       arg="-I${arg}" ;;
3080     esac
3081     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3082   done
3083 fi
3084
3085 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3086 if test -n "$site_prefixes"; then
3087   for dir in $site_prefixes; do
3088     lib_dir="${dir}/lib"
3089     inc_dir="${dir}/include"
3090     if test ! -d "$dir"; then
3091       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3092     elif test ! -d "$lib_dir"; then
3093       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3094     else
3095       if test -d "$inc_dir"; then
3096         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
3097       fi
3098       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
3099     fi
3100   done
3101 fi
3102
3103
3104 for dir in "/usr/ccs/lib"; do
3105   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
3106 done
3107
3108 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3109 if test -n "$site_runtime_libraries"; then
3110   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3111   export LD_RUN_PATH
3112 fi
3113
3114
3115
3116
3117
3118 if test -n "$add_runtime_path"; then :;
3119 elif test "$dynamic" = "no"; then add_runtime_path=no
3120 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3121 else case "$opsys" in
3122        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3123        * ) add_runtime_path=no ;;
3124      esac
3125 fi
3126
3127 if test "$add_runtime_path" = "yes"; then
3128       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3129 echo "configure:3130: checking "for runtime libraries flag"" >&5
3130   case "$opsys" in
3131     sol2 ) dash_r="-R" ;;
3132     decosf* | linux* | irix*) dash_r="-rpath " ;;
3133     *)
3134       dash_r=""
3135       for try_dash_r in "-R" "-R " "-rpath "; do
3136         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3137         
3138 if test "$GCC" = "yes"; then
3139   set x $xe_check_libs; shift; xe_check_libs=""
3140   while test -n "$1"; do
3141     case $1 in
3142       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3143       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3144       -Xlinker* ) ;;
3145       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3146     esac
3147     shift
3148   done
3149 fi
3150         cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153
3154 int main() {
3155
3156 ; return 0; }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3159   rm -rf conftest*
3160   dash_r="$try_dash_r"
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164 fi
3165 rm -f conftest*
3166         xe_check_libs=""
3167         test -n "$dash_r" && break
3168       done ;;
3169   esac
3170   if test -n "$dash_r";
3171     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3172     else echo "$ac_t""NONE" 1>&6
3173   fi
3174 fi
3175
3176 xe_add_unique_runpath_dir='
3177   xe_add_p=yes
3178   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3179   done
3180   if test "$xe_add_p" = "yes"; then
3181     test -n "$runpath" && runpath="${runpath}:"
3182     runpath="${runpath}${xe_runpath_dir}"
3183     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3184   fi'
3185
3186
3187
3188
3189 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3190     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3191   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3192   
3193         runpath="" runpath_dirs=""
3194   if test -n "$LD_RUN_PATH"; then
3195     runpath="$LD_RUN_PATH"
3196   elif test "$GCC" = "yes"; then
3197         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3198     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3199     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3200     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3201       case "$arg" in P,* | -L* | -R* )
3202         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3203           {
3204 xe_runpath_dir="$dir"
3205   test "$xe_runpath_dir" != "/lib"     -a \
3206         "$xe_runpath_dir" != "/usr/lib" -a \
3207         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3208   eval "$xe_add_unique_runpath_dir"
3209 }
3210         done ;;
3211       esac
3212     done
3213     ld_switch_run="$ld_switch_run_save"
3214     rm -f conftest*
3215   else
3216         for arg in $ld_switch_site $ld_switch_x_site; do
3217       case "$arg" in -L*) {
3218 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3219   test "$xe_runpath_dir" != "/lib"     -a \
3220         "$xe_runpath_dir" != "/usr/lib" -a \
3221         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3222   eval "$xe_add_unique_runpath_dir"
3223 };; esac
3224     done
3225             if test "$opsys $need_motif" = "sol2 yes"; then
3226       xe_runpath_dir="/opt/SUNWdt/lib";
3227       eval "$xe_add_unique_runpath_dir";
3228     fi
3229   fi 
3230   if test -n "$runpath"; then
3231     ld_switch_run="${dash_r}${runpath}"
3232     
3233 if test "$GCC" = "yes"; then
3234   set x $ld_switch_run; shift; ld_switch_run=""
3235   while test -n "$1"; do
3236     case $1 in
3237       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3238       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3239       -Xlinker* ) ;;
3240       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3241     esac
3242     shift
3243   done
3244 fi
3245     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3246   fi
3247 fi
3248
3249
3250
3251 GNU_MALLOC=yes
3252 if test "$with_dlmalloc" != "no"; then
3253         doug_lea_malloc=yes
3254 else
3255         doug_lea_malloc=no
3256 fi
3257 after_morecore_hook_exists=yes
3258 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3259 echo "configure:3260: checking for malloc_set_state" >&5
3260
3261 cat > conftest.$ac_ext <<EOF
3262 #line 3263 "configure"
3263 #include "confdefs.h"
3264 /* System header to define __stub macros and hopefully few prototypes,
3265     which can conflict with char malloc_set_state(); below.  */
3266 #include <assert.h>
3267 /* Override any gcc2 internal prototype to avoid an error.  */
3268 /* We use char because int might match the return type of a gcc2
3269     builtin and then its argument prototype would still apply.  */
3270 char malloc_set_state();
3271
3272 int main() {
3273
3274 /* The GNU C library defines this for functions which it implements
3275     to always fail with ENOSYS.  Some functions are actually named
3276     something starting with __ and the normal name is an alias.  */
3277 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3278 choke me
3279 #else
3280 malloc_set_state();
3281 #endif
3282
3283 ; return 0; }
3284 EOF
3285 if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3286   rm -rf conftest*
3287   eval "ac_cv_func_malloc_set_state=yes"
3288 else
3289   echo "configure: failed program was:" >&5
3290   cat conftest.$ac_ext >&5
3291   rm -rf conftest*
3292   eval "ac_cv_func_malloc_set_state=no"
3293 fi
3294 rm -f conftest*
3295
3296 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3297   echo "$ac_t""yes" 1>&6
3298   :
3299 else
3300   echo "$ac_t""no" 1>&6
3301 doug_lea_malloc=no
3302 fi
3303
3304 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3305 echo "configure:3306: checking whether __after_morecore_hook exists" >&5
3306 cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 extern void (* __after_morecore_hook)();
3310 int main() {
3311 __after_morecore_hook = 0
3312 ; return 0; }
3313 EOF
3314 if { (eval echo configure:3315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3315   rm -rf conftest*
3316   echo "$ac_t""yes" 1>&6
3317 else
3318   echo "configure: failed program was:" >&5
3319   cat conftest.$ac_ext >&5
3320   rm -rf conftest*
3321   echo "$ac_t""no" 1>&6
3322    after_morecore_hook_exists=no
3323 fi
3324 rm -f conftest*
3325 if test "$system_malloc" = "yes" ; then
3326   GNU_MALLOC=no
3327   GNU_MALLOC_reason="
3328     - The GNU allocators don't work with this system configuration."
3329 elif test "$with_system_malloc" = "yes" ; then
3330   GNU_MALLOC=no
3331   GNU_MALLOC_reason="
3332     - User chose not to use GNU allocators."
3333 elif test "$with_debug_malloc" = "yes" ; then
3334   GNU_MALLOC=no
3335   GNU_MALLOC_reason="
3336     - User chose to use Debugging Malloc."
3337 fi
3338
3339 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3340   GNU_MALLOC_reason="
3341     - Using Doug Lea's new malloc from the GNU C Library."
3342   { test "$extra_verbose" = "yes" && cat << \EOF
3343     Defining DOUG_LEA_MALLOC
3344 EOF
3345 cat >> confdefs.h <<\EOF
3346 #define DOUG_LEA_MALLOC 1
3347 EOF
3348 }
3349
3350   if test "$after_morecore_hook_exists" = "no" ; then
3351     GNU_MALLOC_reason="
3352     - Using Doug Lea's new malloc from the Linux C Library."
3353     { test "$extra_verbose" = "yes" && cat << \EOF
3354     Defining _NO_MALLOC_WARNING_
3355 EOF
3356 cat >> confdefs.h <<\EOF
3357 #define _NO_MALLOC_WARNING_ 1
3358 EOF
3359 }
3360
3361   fi
3362 fi
3363
3364
3365
3366
3367 # Extract the first word of "ranlib", so it can be a program name with args.
3368 set dummy ranlib; ac_word=$2
3369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3370 echo "configure:3371: checking for $ac_word" >&5
3371
3372 if test -n "$RANLIB"; then
3373   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3374 else
3375   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3376   ac_dummy="$PATH"
3377   for ac_dir in $ac_dummy; do
3378     test -z "$ac_dir" && ac_dir=.
3379     if test -f $ac_dir/$ac_word; then
3380       ac_cv_prog_RANLIB="ranlib"
3381       break
3382     fi
3383   done
3384   IFS="$ac_save_ifs"
3385   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3386 fi
3387 RANLIB="$ac_cv_prog_RANLIB"
3388 if test -n "$RANLIB"; then
3389   echo "$ac_t""$RANLIB" 1>&6
3390 else
3391   echo "$ac_t""no" 1>&6
3392 fi
3393
3394 ac_aux_dir=
3395 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3396   if test -f $ac_dir/install-sh; then
3397     ac_aux_dir=$ac_dir
3398     ac_install_sh="$ac_aux_dir/install-sh -c"
3399     break
3400   elif test -f $ac_dir/install.sh; then
3401     ac_aux_dir=$ac_dir
3402     ac_install_sh="$ac_aux_dir/install.sh -c"
3403     break
3404   fi
3405 done
3406 if test -z "$ac_aux_dir"; then
3407   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3408 fi
3409 ac_config_guess=$ac_aux_dir/config.guess
3410 ac_config_sub=$ac_aux_dir/config.sub
3411 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3412
3413 # Find a good install program.  We prefer a C program (faster),
3414 # so one script is as good as another.  But avoid the broken or
3415 # incompatible versions:
3416 # SysV /etc/install, /usr/sbin/install
3417 # SunOS /usr/etc/install
3418 # IRIX /sbin/install
3419 # AIX /bin/install
3420 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3421 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3422 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3423 # ./install, which can be erroneously created by make from ./install.sh.
3424 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3425 echo "configure:3426: checking for a BSD compatible install" >&5
3426 if test -z "$INSTALL"; then
3427
3428   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3429   for ac_dir in $PATH; do
3430     # Account for people who put trailing slashes in PATH elements.
3431     case "$ac_dir/" in
3432     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3433     *)
3434       # OSF1 and SCO ODT 3.0 have their own names for install.
3435       # Don't use installbsd from OSF since it installs stuff as root
3436       # by default.
3437       for ac_prog in ginstall scoinst install; do
3438         if test -f $ac_dir/$ac_prog; then
3439           if test $ac_prog = install &&
3440             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3441             # AIX install.  It has an incompatible calling convention.
3442             :
3443           else
3444             ac_cv_path_install="$ac_dir/$ac_prog -c"
3445             break 2
3446           fi
3447         fi
3448       done
3449       ;;
3450     esac
3451   done
3452   IFS="$ac_save_IFS"
3453
3454   if test "${ac_cv_path_install+set}" = set; then
3455     INSTALL="$ac_cv_path_install"
3456   else
3457     # As a last resort, use the slow shell script.  We don't cache a
3458     # path for INSTALL within a source directory, because that will
3459     # break other packages using the cache if that directory is
3460     # removed, or if the path is relative.
3461     INSTALL="$ac_install_sh"
3462   fi
3463 fi
3464 echo "$ac_t""$INSTALL" 1>&6
3465
3466 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3467 # It thinks the first close brace ends the variable substitution.
3468 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3469
3470 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3471
3472 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3473
3474 for ac_prog in 'bison -y' byacc
3475 do
3476 # Extract the first word of "$ac_prog", so it can be a program name with args.
3477 set dummy $ac_prog; ac_word=$2
3478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3479 echo "configure:3480: checking for $ac_word" >&5
3480
3481 if test -n "$YACC"; then
3482   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3483 else
3484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3485   ac_dummy="$PATH"
3486   for ac_dir in $ac_dummy; do
3487     test -z "$ac_dir" && ac_dir=.
3488     if test -f $ac_dir/$ac_word; then
3489       ac_cv_prog_YACC="$ac_prog"
3490       break
3491     fi
3492   done
3493   IFS="$ac_save_ifs"
3494 fi
3495 YACC="$ac_cv_prog_YACC"
3496 if test -n "$YACC"; then
3497   echo "$ac_t""$YACC" 1>&6
3498 else
3499   echo "$ac_t""no" 1>&6
3500 fi
3501
3502 test -n "$YACC" && break
3503 done
3504 test -n "$YACC" || YACC="yacc"
3505
3506
3507 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 
3508 do
3509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3511 echo "configure:3512: checking for $ac_hdr" >&5
3512
3513 cat > conftest.$ac_ext <<EOF
3514 #line 3515 "configure"
3515 #include "confdefs.h"
3516 #include <$ac_hdr>
3517 EOF
3518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3519 { (eval echo configure:3520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3521 if test -z "$ac_err"; then
3522   rm -rf conftest*
3523   eval "ac_cv_header_$ac_safe=yes"
3524 else
3525   echo "$ac_err" >&5
3526   echo "configure: failed program was:" >&5
3527   cat conftest.$ac_ext >&5
3528   rm -rf conftest*
3529   eval "ac_cv_header_$ac_safe=no"
3530 fi
3531 rm -f conftest*
3532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3533   echo "$ac_t""yes" 1>&6
3534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3535   { test "$extra_verbose" = "yes" && cat << EOF
3536     Defining $ac_tr_hdr
3537 EOF
3538 cat >> confdefs.h <<EOF
3539 #define $ac_tr_hdr 1
3540 EOF
3541 }
3542  
3543 else
3544   echo "$ac_t""no" 1>&6
3545 fi
3546 done
3547
3548 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3549 echo "configure:3550: checking for sys/wait.h that is POSIX.1 compatible" >&5
3550
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <sys/types.h>
3555 #include <sys/wait.h>
3556 #ifndef WEXITSTATUS
3557 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3558 #endif
3559 #ifndef WIFEXITED
3560 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3561 #endif
3562 int main() {
3563 int s;
3564 wait (&s);
3565 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3566 ; return 0; }
3567 EOF
3568 if { (eval echo configure:3569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3569   rm -rf conftest*
3570   ac_cv_header_sys_wait_h=yes
3571 else
3572   echo "configure: failed program was:" >&5
3573   cat conftest.$ac_ext >&5
3574   rm -rf conftest*
3575   ac_cv_header_sys_wait_h=no
3576 fi
3577 rm -f conftest*
3578
3579 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3580 if test $ac_cv_header_sys_wait_h = yes; then
3581   { test "$extra_verbose" = "yes" && cat << \EOF
3582     Defining HAVE_SYS_WAIT_H
3583 EOF
3584 cat >> confdefs.h <<\EOF
3585 #define HAVE_SYS_WAIT_H 1
3586 EOF
3587 }
3588
3589 fi
3590
3591 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3592 echo "configure:3593: checking for ANSI C header files" >&5
3593
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 #include <stdlib.h>
3598 #include <stdarg.h>
3599 #include <string.h>
3600 #include <float.h>
3601 EOF
3602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3603 { (eval echo configure:3604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3605 if test -z "$ac_err"; then
3606   rm -rf conftest*
3607   ac_cv_header_stdc=yes
3608 else
3609   echo "$ac_err" >&5
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   ac_cv_header_stdc=no
3614 fi
3615 rm -f conftest*
3616
3617 if test $ac_cv_header_stdc = yes; then
3618   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3619 cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 #include <string.h>
3623 EOF
3624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3625   egrep "memchr" >/dev/null 2>&1; then
3626   :
3627 else
3628   rm -rf conftest*
3629   ac_cv_header_stdc=no
3630 fi
3631 rm -f conftest*
3632
3633 fi
3634
3635 if test $ac_cv_header_stdc = yes; then
3636   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 #include <stdlib.h>
3641 EOF
3642 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3643   egrep "free" >/dev/null 2>&1; then
3644   :
3645 else
3646   rm -rf conftest*
3647   ac_cv_header_stdc=no
3648 fi
3649 rm -f conftest*
3650
3651 fi
3652
3653 if test $ac_cv_header_stdc = yes; then
3654   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3655 cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 #include <ctype.h>
3659 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3660 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3661 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3662 int main () { int i; for (i = 0; i < 256; i++)
3663 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3664 exit (0); }
3665
3666 EOF
3667 if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3668 then
3669   :
3670 else
3671   conftest_rc="$?"
3672   echo "configure: failed program was:" >&5
3673   cat conftest.$ac_ext >&5
3674   rm -fr conftest*
3675   ac_cv_header_stdc=no
3676 fi
3677 rm -fr conftest*
3678 fi
3679
3680 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3681 if test $ac_cv_header_stdc = yes; then
3682   { test "$extra_verbose" = "yes" && cat << \EOF
3683     Defining STDC_HEADERS
3684 EOF
3685 cat >> confdefs.h <<\EOF
3686 #define STDC_HEADERS 1
3687 EOF
3688 }
3689
3690 fi
3691
3692 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3693 echo "configure:3694: checking whether time.h and sys/time.h may both be included" >&5
3694
3695 cat > conftest.$ac_ext <<EOF
3696 #line 3697 "configure"
3697 #include "confdefs.h"
3698 #include <sys/types.h>
3699 #include <sys/time.h>
3700 #include <time.h>
3701 int main() {
3702 struct tm *tp;
3703 ; return 0; }
3704 EOF
3705 if { (eval echo configure:3706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3706   rm -rf conftest*
3707   ac_cv_header_time=yes
3708 else
3709   echo "configure: failed program was:" >&5
3710   cat conftest.$ac_ext >&5
3711   rm -rf conftest*
3712   ac_cv_header_time=no
3713 fi
3714 rm -f conftest*
3715
3716 echo "$ac_t""$ac_cv_header_time" 1>&6
3717 if test $ac_cv_header_time = yes; then
3718   { test "$extra_verbose" = "yes" && cat << \EOF
3719     Defining TIME_WITH_SYS_TIME
3720 EOF
3721 cat >> confdefs.h <<\EOF
3722 #define TIME_WITH_SYS_TIME 1
3723 EOF
3724 }
3725
3726 fi
3727
3728 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3729 echo "configure:3730: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3730
3731 cat > conftest.$ac_ext <<EOF
3732 #line 3733 "configure"
3733 #include "confdefs.h"
3734 #include <sys/types.h>
3735 #include <signal.h>
3736 /* NetBSD declares sys_siglist in unistd.h.  */
3737 #ifdef HAVE_UNISTD_H
3738 #include <unistd.h>
3739 #endif
3740 int main() {
3741 char *msg = *(sys_siglist + 1);
3742 ; return 0; }
3743 EOF
3744 if { (eval echo configure:3745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3745   rm -rf conftest*
3746   ac_cv_decl_sys_siglist=yes
3747 else
3748   echo "configure: failed program was:" >&5
3749   cat conftest.$ac_ext >&5
3750   rm -rf conftest*
3751   ac_cv_decl_sys_siglist=no
3752 fi
3753 rm -f conftest*
3754
3755 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3756 if test $ac_cv_decl_sys_siglist = yes; then
3757   { test "$extra_verbose" = "yes" && cat << \EOF
3758     Defining SYS_SIGLIST_DECLARED
3759 EOF
3760 cat >> confdefs.h <<\EOF
3761 #define SYS_SIGLIST_DECLARED 1
3762 EOF
3763 }
3764
3765 fi
3766
3767
3768
3769 echo $ac_n "checking for utime""... $ac_c" 1>&6
3770 echo "configure:3771: checking for utime" >&5
3771 cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 #include <sys/types.h>
3775 #include <utime.h>
3776 int main() {
3777 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3781   rm -rf conftest*
3782   echo "$ac_t""yes" 1>&6
3783    { test "$extra_verbose" = "yes" && cat << \EOF
3784     Defining HAVE_UTIME
3785 EOF
3786 cat >> confdefs.h <<\EOF
3787 #define HAVE_UTIME 1
3788 EOF
3789 }
3790
3791 else
3792   echo "configure: failed program was:" >&5
3793   cat conftest.$ac_ext >&5
3794   rm -rf conftest*
3795   echo "$ac_t""no" 1>&6
3796       for ac_func in utimes
3797 do
3798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3799 echo "configure:3800: checking for $ac_func" >&5
3800
3801 cat > conftest.$ac_ext <<EOF
3802 #line 3803 "configure"
3803 #include "confdefs.h"
3804 /* System header to define __stub macros and hopefully few prototypes,
3805     which can conflict with char $ac_func(); below.  */
3806 #include <assert.h>
3807 /* Override any gcc2 internal prototype to avoid an error.  */
3808 /* We use char because int might match the return type of a gcc2
3809     builtin and then its argument prototype would still apply.  */
3810 char $ac_func();
3811
3812 int main() {
3813
3814 /* The GNU C library defines this for functions which it implements
3815     to always fail with ENOSYS.  Some functions are actually named
3816     something starting with __ and the normal name is an alias.  */
3817 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3818 choke me
3819 #else
3820 $ac_func();
3821 #endif
3822
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3826   rm -rf conftest*
3827   eval "ac_cv_func_$ac_func=yes"
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   eval "ac_cv_func_$ac_func=no"
3833 fi
3834 rm -f conftest*
3835
3836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3837   echo "$ac_t""yes" 1>&6
3838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3839   { test "$extra_verbose" = "yes" && cat << EOF
3840     Defining $ac_tr_func
3841 EOF
3842 cat >> confdefs.h <<EOF
3843 #define $ac_tr_func 1
3844 EOF
3845 }
3846  
3847 else
3848   echo "$ac_t""no" 1>&6
3849 fi
3850 done
3851
3852 fi
3853 rm -f conftest*
3854
3855
3856 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3857 echo "configure:3858: checking return type of signal handlers" >&5
3858
3859 cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 #include <sys/types.h>
3863 #include <signal.h>
3864 #ifdef signal
3865 #undef signal
3866 #endif
3867 #ifdef __cplusplus
3868 extern "C" void (*signal (int, void (*)(int)))(int);
3869 #else
3870 void (*signal ()) ();
3871 #endif
3872
3873 int main() {
3874 int i;
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_type_signal=void
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_type_signal=int
3885 fi
3886 rm -f conftest*
3887
3888 echo "$ac_t""$ac_cv_type_signal" 1>&6
3889 { test "$extra_verbose" = "yes" && cat << EOF
3890     Defining RETSIGTYPE = $ac_cv_type_signal
3891 EOF
3892 cat >> confdefs.h <<EOF
3893 #define RETSIGTYPE $ac_cv_type_signal
3894 EOF
3895 }
3896
3897
3898 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3899 echo "configure:3900: checking for size_t" >&5
3900
3901 cat > conftest.$ac_ext <<EOF
3902 #line 3903 "configure"
3903 #include "confdefs.h"
3904 #include <sys/types.h>
3905 #if STDC_HEADERS
3906 #include <stdlib.h>
3907 #include <stddef.h>
3908 #endif
3909 EOF
3910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3911   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3912   rm -rf conftest*
3913   ac_cv_type_size_t=yes
3914 else
3915   rm -rf conftest*
3916   ac_cv_type_size_t=no
3917 fi
3918 rm -f conftest*
3919
3920 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3921 if test $ac_cv_type_size_t = no; then
3922   { test "$extra_verbose" = "yes" && cat << \EOF
3923     Defining size_t = unsigned
3924 EOF
3925 cat >> confdefs.h <<\EOF
3926 #define size_t unsigned
3927 EOF
3928 }
3929
3930 fi
3931
3932 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3933 echo "configure:3934: checking for pid_t" >&5
3934
3935 cat > conftest.$ac_ext <<EOF
3936 #line 3937 "configure"
3937 #include "confdefs.h"
3938 #include <sys/types.h>
3939 #if STDC_HEADERS
3940 #include <stdlib.h>
3941 #include <stddef.h>
3942 #endif
3943 EOF
3944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3945   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3946   rm -rf conftest*
3947   ac_cv_type_pid_t=yes
3948 else
3949   rm -rf conftest*
3950   ac_cv_type_pid_t=no
3951 fi
3952 rm -f conftest*
3953
3954 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3955 if test $ac_cv_type_pid_t = no; then
3956   { test "$extra_verbose" = "yes" && cat << \EOF
3957     Defining pid_t = int
3958 EOF
3959 cat >> confdefs.h <<\EOF
3960 #define pid_t int
3961 EOF
3962 }
3963
3964 fi
3965
3966 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3967 echo "configure:3968: checking for uid_t in sys/types.h" >&5
3968
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 #include <sys/types.h>
3973 EOF
3974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3975   egrep "uid_t" >/dev/null 2>&1; then
3976   rm -rf conftest*
3977   ac_cv_type_uid_t=yes
3978 else
3979   rm -rf conftest*
3980   ac_cv_type_uid_t=no
3981 fi
3982 rm -f conftest*
3983
3984
3985 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3986 if test $ac_cv_type_uid_t = no; then
3987   { test "$extra_verbose" = "yes" && cat << \EOF
3988     Defining uid_t = int
3989 EOF
3990 cat >> confdefs.h <<\EOF
3991 #define uid_t int
3992 EOF
3993 }
3994
3995   { test "$extra_verbose" = "yes" && cat << \EOF
3996     Defining gid_t = int
3997 EOF
3998 cat >> confdefs.h <<\EOF
3999 #define gid_t int
4000 EOF
4001 }
4002
4003 fi
4004
4005 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4006 echo "configure:4007: checking for mode_t" >&5
4007
4008 cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011 #include <sys/types.h>
4012 #if STDC_HEADERS
4013 #include <stdlib.h>
4014 #include <stddef.h>
4015 #endif
4016 EOF
4017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4018   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4019   rm -rf conftest*
4020   ac_cv_type_mode_t=yes
4021 else
4022   rm -rf conftest*
4023   ac_cv_type_mode_t=no
4024 fi
4025 rm -f conftest*
4026
4027 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4028 if test $ac_cv_type_mode_t = no; then
4029   { test "$extra_verbose" = "yes" && cat << \EOF
4030     Defining mode_t = int
4031 EOF
4032 cat >> confdefs.h <<\EOF
4033 #define mode_t int
4034 EOF
4035 }
4036
4037 fi
4038
4039 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4040 echo "configure:4041: checking for off_t" >&5
4041
4042 cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045 #include <sys/types.h>
4046 #if STDC_HEADERS
4047 #include <stdlib.h>
4048 #include <stddef.h>
4049 #endif
4050 EOF
4051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4052   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4053   rm -rf conftest*
4054   ac_cv_type_off_t=yes
4055 else
4056   rm -rf conftest*
4057   ac_cv_type_off_t=no
4058 fi
4059 rm -f conftest*
4060
4061 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4062 if test $ac_cv_type_off_t = no; then
4063   { test "$extra_verbose" = "yes" && cat << \EOF
4064     Defining off_t = long
4065 EOF
4066 cat >> confdefs.h <<\EOF
4067 #define off_t long
4068 EOF
4069 }
4070
4071 fi
4072
4073 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4074 echo "configure:4075: checking for ssize_t" >&5
4075
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 #include <sys/types.h>
4080 #if STDC_HEADERS
4081 #include <stdlib.h>
4082 #include <stddef.h>
4083 #endif
4084 EOF
4085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4086   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4087   rm -rf conftest*
4088   ac_cv_type_ssize_t=yes
4089 else
4090   rm -rf conftest*
4091   ac_cv_type_ssize_t=no
4092 fi
4093 rm -f conftest*
4094
4095 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4096 if test $ac_cv_type_ssize_t = no; then
4097   { test "$extra_verbose" = "yes" && cat << \EOF
4098     Defining ssize_t = int
4099 EOF
4100 cat >> confdefs.h <<\EOF
4101 #define ssize_t int
4102 EOF
4103 }
4104
4105 fi
4106
4107
4108 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4109 echo "configure:4110: checking for socklen_t" >&5
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113 #include <sys/types.h>
4114 #include <sys/socket.h>
4115 socklen_t x;
4116
4117 int main() {
4118
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   echo "$ac_t""yes" 1>&6
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   
4129 cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <sys/types.h>
4133 #include <sys/socket.h>
4134 int accept (int, struct sockaddr *, size_t *);
4135
4136 int main() {
4137
4138 ; return 0; }
4139 EOF
4140 if { (eval echo configure:4141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4141   rm -rf conftest*
4142   
4143 echo "$ac_t""size_t" 1>&6
4144 { test "$extra_verbose" = "yes" && cat << \EOF
4145     Defining socklen_t = size_t
4146 EOF
4147 cat >> confdefs.h <<\EOF
4148 #define socklen_t size_t
4149 EOF
4150 }
4151
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   
4157 echo "$ac_t""int" 1>&6
4158 { test "$extra_verbose" = "yes" && cat << \EOF
4159     Defining socklen_t = int
4160 EOF
4161 cat >> confdefs.h <<\EOF
4162 #define socklen_t int
4163 EOF
4164 }
4165
4166 fi
4167 rm -f conftest*
4168 fi
4169 rm -f conftest*
4170
4171 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4172 echo "configure:4173: checking for struct timeval" >&5
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 #ifdef TIME_WITH_SYS_TIME
4177 #include <sys/time.h>
4178 #include <time.h>
4179 #else
4180 #ifdef HAVE_SYS_TIME_H
4181 #include <sys/time.h>
4182 #else
4183 #include <time.h>
4184 #endif
4185 #endif
4186 int main() {
4187 static struct timeval x; x.tv_sec = x.tv_usec;
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4191   rm -rf conftest*
4192   echo "$ac_t""yes" 1>&6
4193   HAVE_TIMEVAL=yes
4194   { test "$extra_verbose" = "yes" && cat << \EOF
4195     Defining HAVE_TIMEVAL
4196 EOF
4197 cat >> confdefs.h <<\EOF
4198 #define HAVE_TIMEVAL 1
4199 EOF
4200 }
4201
4202 else
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   echo "$ac_t""no" 1>&6
4207    HAVE_TIMEVAL=no
4208 fi
4209 rm -f conftest*
4210
4211 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4212 echo "configure:4213: checking whether struct tm is in sys/time.h or time.h" >&5
4213
4214 cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <sys/types.h>
4218 #include <time.h>
4219 int main() {
4220 struct tm *tp; tp->tm_sec;
4221 ; return 0; }
4222 EOF
4223 if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4224   rm -rf conftest*
4225   ac_cv_struct_tm=time.h
4226 else
4227   echo "configure: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229   rm -rf conftest*
4230   ac_cv_struct_tm=sys/time.h
4231 fi
4232 rm -f conftest*
4233
4234 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4235 if test $ac_cv_struct_tm = sys/time.h; then
4236   { test "$extra_verbose" = "yes" && cat << \EOF
4237     Defining TM_IN_SYS_TIME
4238 EOF
4239 cat >> confdefs.h <<\EOF
4240 #define TM_IN_SYS_TIME 1
4241 EOF
4242 }
4243
4244 fi
4245
4246 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4247 echo "configure:4248: checking for tm_zone in struct tm" >&5
4248
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 #include <sys/types.h>
4253 #include <$ac_cv_struct_tm>
4254 int main() {
4255 struct tm tm; tm.tm_zone;
4256 ; return 0; }
4257 EOF
4258 if { (eval echo configure:4259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4259   rm -rf conftest*
4260   ac_cv_struct_tm_zone=yes
4261 else
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -rf conftest*
4265   ac_cv_struct_tm_zone=no
4266 fi
4267 rm -f conftest*
4268
4269 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4270 if test "$ac_cv_struct_tm_zone" = yes; then
4271   { test "$extra_verbose" = "yes" && cat << \EOF
4272     Defining HAVE_TM_ZONE
4273 EOF
4274 cat >> confdefs.h <<\EOF
4275 #define HAVE_TM_ZONE 1
4276 EOF
4277 }
4278
4279 else
4280   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4281 echo "configure:4282: checking for tzname" >&5
4282
4283 cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4286 #include <time.h>
4287 #ifndef tzname /* For SGI.  */
4288 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4289 #endif
4290 int main() {
4291 atoi(*tzname);
4292 ; return 0; }
4293 EOF
4294 if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4295   rm -rf conftest*
4296   ac_cv_var_tzname=yes
4297 else
4298   echo "configure: failed program was:" >&5
4299   cat conftest.$ac_ext >&5
4300   rm -rf conftest*
4301   ac_cv_var_tzname=no
4302 fi
4303 rm -f conftest*
4304
4305 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4306   if test $ac_cv_var_tzname = yes; then
4307     { test "$extra_verbose" = "yes" && cat << \EOF
4308     Defining HAVE_TZNAME
4309 EOF
4310 cat >> confdefs.h <<\EOF
4311 #define HAVE_TZNAME 1
4312 EOF
4313 }
4314
4315   fi
4316 fi
4317
4318
4319 echo $ac_n "checking for working const""... $ac_c" 1>&6
4320 echo "configure:4321: checking for working const" >&5
4321
4322 cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325
4326 int main() {
4327
4328 /* Ultrix mips cc rejects this.  */
4329 typedef int charset[2]; const charset x;
4330 /* SunOS 4.1.1 cc rejects this.  */
4331 char const *const *ccp;
4332 char **p;
4333 /* NEC SVR4.0.2 mips cc rejects this.  */
4334 struct point {int x, y;};
4335 static struct point const zero = {0,0};
4336 /* AIX XL C 1.02.0.0 rejects this.
4337    It does not let you subtract one const X* pointer from another in an arm
4338    of an if-expression whose if-part is not a constant expression */
4339 const char *g = "string";
4340 ccp = &g + (g ? g-g : 0);
4341 /* HPUX 7.0 cc rejects these. */
4342 ++ccp;
4343 p = (char**) ccp;
4344 ccp = (char const *const *) p;
4345 { /* SCO 3.2v4 cc rejects this.  */
4346   char *t;
4347   char const *s = 0 ? (char *) 0 : (char const *) 0;
4348
4349   *t++ = 0;
4350 }
4351 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4352   int x[] = {25, 17};
4353   const int *foo = &x[0];
4354   ++foo;
4355 }
4356 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4357   typedef const int *iptr;
4358   iptr p = 0;
4359   ++p;
4360 }
4361 { /* AIX XL C 1.02.0.0 rejects this saying
4362      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4363   struct s { int j; const int *ap[3]; };
4364   struct s *b; b->j = 5;
4365 }
4366 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4367   const int foo = 10;
4368 }
4369
4370 ; return 0; }
4371 EOF
4372 if { (eval echo configure:4373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4373   rm -rf conftest*
4374   ac_cv_c_const=yes
4375 else
4376   echo "configure: failed program was:" >&5
4377   cat conftest.$ac_ext >&5
4378   rm -rf conftest*
4379   ac_cv_c_const=no
4380 fi
4381 rm -f conftest*
4382
4383 echo "$ac_t""$ac_cv_c_const" 1>&6
4384 if test $ac_cv_c_const = no; then
4385   { test "$extra_verbose" = "yes" && cat << \EOF
4386     Defining const = 
4387 EOF
4388 cat >> confdefs.h <<\EOF
4389 #define const 
4390 EOF
4391 }
4392
4393 fi
4394
4395
4396 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4397 echo "configure:4398: checking whether ${MAKE-make} sets \${MAKE}" >&5
4398 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4399
4400 cat > conftestmake <<\EOF
4401 all:
4402         @echo 'ac_maketemp="${MAKE}"'
4403 EOF
4404 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4405 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4406 if test -n "$ac_maketemp"; then
4407   eval ac_cv_prog_make_${ac_make}_set=yes
4408 else
4409   eval ac_cv_prog_make_${ac_make}_set=no
4410 fi
4411 rm -f conftestmake
4412 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4413   echo "$ac_t""yes" 1>&6
4414   SET_MAKE=
4415 else
4416   echo "$ac_t""no" 1>&6
4417   SET_MAKE="MAKE=${MAKE-make}"
4418 fi
4419
4420
4421 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4422 echo "configure:4423: checking whether byte ordering is bigendian" >&5
4423
4424 ac_cv_c_bigendian=unknown
4425 # See if sys/param.h defines the BYTE_ORDER macro.
4426 cat > conftest.$ac_ext <<EOF
4427 #line 4428 "configure"
4428 #include "confdefs.h"
4429 #include <sys/types.h>
4430 #include <sys/param.h>
4431 int main() {
4432
4433 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4434  bogus endian macros
4435 #endif
4436 ; return 0; }
4437 EOF
4438 if { (eval echo configure:4439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4439   rm -rf conftest*
4440   # It does; now see whether it defined to BIG_ENDIAN or not.
4441 cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444 #include <sys/types.h>
4445 #include <sys/param.h>
4446 int main() {
4447
4448 #if BYTE_ORDER != BIG_ENDIAN
4449  not big endian
4450 #endif
4451 ; return 0; }
4452 EOF
4453 if { (eval echo configure:4454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4454   rm -rf conftest*
4455   ac_cv_c_bigendian=yes
4456 else
4457   echo "configure: failed program was:" >&5
4458   cat conftest.$ac_ext >&5
4459   rm -rf conftest*
4460   ac_cv_c_bigendian=no
4461 fi
4462 rm -f conftest*
4463 else
4464   echo "configure: failed program was:" >&5
4465   cat conftest.$ac_ext >&5
4466 fi
4467 rm -f conftest*
4468 if test $ac_cv_c_bigendian = unknown; then
4469 cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472 main () {
4473   /* Are we little or big endian?  From Harbison&Steele.  */
4474   union
4475   {
4476     long l;
4477     char c[sizeof (long)];
4478   } u;
4479   u.l = 1;
4480   exit (u.c[sizeof (long) - 1] == 1);
4481 }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4484 then
4485   ac_cv_c_bigendian=no
4486 else
4487   conftest_rc="$?"
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -fr conftest*
4491   ac_cv_c_bigendian=yes
4492 fi
4493 rm -fr conftest*
4494 fi
4495
4496 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4497 if test $ac_cv_c_bigendian = yes; then
4498   { test "$extra_verbose" = "yes" && cat << \EOF
4499     Defining WORDS_BIGENDIAN
4500 EOF
4501 cat >> confdefs.h <<\EOF
4502 #define WORDS_BIGENDIAN 1
4503 EOF
4504 }
4505
4506 fi
4507
4508
4509 echo $ac_n "checking size of short""... $ac_c" 1>&6
4510 echo "configure:4511: checking size of short" >&5
4511
4512 cat > conftest.$ac_ext <<EOF
4513 #line 4514 "configure"
4514 #include "confdefs.h"
4515 #include <stdio.h>
4516 main()
4517 {
4518   FILE *f=fopen("conftestval", "w");
4519   if (!f) exit(1);
4520   fprintf(f, "%d\n", sizeof(short));
4521   exit(0);
4522 }
4523 EOF
4524 if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4525 then
4526   ac_cv_sizeof_short=`cat conftestval`
4527 else
4528   conftest_rc="$?"
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -fr conftest*
4532   ac_cv_sizeof_short=0
4533 fi
4534 rm -fr conftest*
4535 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4536 { test "$extra_verbose" = "yes" && cat << EOF
4537     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4538 EOF
4539 cat >> confdefs.h <<EOF
4540 #define SIZEOF_SHORT $ac_cv_sizeof_short
4541 EOF
4542 }
4543
4544
4545 if test "$ac_cv_sizeof_short" = 0; then
4546   echo ""
4547   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4548   echo "*** PANIC *** Please examine config.log for compilation errors."
4549   exit 1
4550 fi
4551 echo $ac_n "checking size of int""... $ac_c" 1>&6
4552 echo "configure:4553: checking size of int" >&5
4553
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 #include <stdio.h>
4558 main()
4559 {
4560   FILE *f=fopen("conftestval", "w");
4561   if (!f) exit(1);
4562   fprintf(f, "%d\n", sizeof(int));
4563   exit(0);
4564 }
4565 EOF
4566 if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4567 then
4568   ac_cv_sizeof_int=`cat conftestval`
4569 else
4570   conftest_rc="$?"
4571   echo "configure: failed program was:" >&5
4572   cat conftest.$ac_ext >&5
4573   rm -fr conftest*
4574   ac_cv_sizeof_int=0
4575 fi
4576 rm -fr conftest*
4577 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4578 { test "$extra_verbose" = "yes" && cat << EOF
4579     Defining SIZEOF_INT = $ac_cv_sizeof_int
4580 EOF
4581 cat >> confdefs.h <<EOF
4582 #define SIZEOF_INT $ac_cv_sizeof_int
4583 EOF
4584 }
4585
4586
4587 echo $ac_n "checking size of long""... $ac_c" 1>&6
4588 echo "configure:4589: checking size of long" >&5
4589
4590 cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <stdio.h>
4594 main()
4595 {
4596   FILE *f=fopen("conftestval", "w");
4597   if (!f) exit(1);
4598   fprintf(f, "%d\n", sizeof(long));
4599   exit(0);
4600 }
4601 EOF
4602 if { (eval echo configure:4603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4603 then
4604   ac_cv_sizeof_long=`cat conftestval`
4605 else
4606   conftest_rc="$?"
4607   echo "configure: failed program was:" >&5
4608   cat conftest.$ac_ext >&5
4609   rm -fr conftest*
4610   ac_cv_sizeof_long=0
4611 fi
4612 rm -fr conftest*
4613 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4614 { test "$extra_verbose" = "yes" && cat << EOF
4615     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4616 EOF
4617 cat >> confdefs.h <<EOF
4618 #define SIZEOF_LONG $ac_cv_sizeof_long
4619 EOF
4620 }
4621
4622
4623 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4624 echo "configure:4625: checking size of long long" >&5
4625
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 #include <stdio.h>
4630 main()
4631 {
4632   FILE *f=fopen("conftestval", "w");
4633   if (!f) exit(1);
4634   fprintf(f, "%d\n", sizeof(long long));
4635   exit(0);
4636 }
4637 EOF
4638 if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4639 then
4640   ac_cv_sizeof_long_long=`cat conftestval`
4641 else
4642   conftest_rc="$?"
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -fr conftest*
4646   ac_cv_sizeof_long_long=0
4647 fi
4648 rm -fr conftest*
4649 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4650 { test "$extra_verbose" = "yes" && cat << EOF
4651     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4652 EOF
4653 cat >> confdefs.h <<EOF
4654 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4655 EOF
4656 }
4657
4658
4659 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4660 echo "configure:4661: checking size of void *" >&5
4661
4662 cat > conftest.$ac_ext <<EOF
4663 #line 4664 "configure"
4664 #include "confdefs.h"
4665 #include <stdio.h>
4666 main()
4667 {
4668   FILE *f=fopen("conftestval", "w");
4669   if (!f) exit(1);
4670   fprintf(f, "%d\n", sizeof(void *));
4671   exit(0);
4672 }
4673 EOF
4674 if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4675 then
4676   ac_cv_sizeof_void_p=`cat conftestval`
4677 else
4678   conftest_rc="$?"
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -fr conftest*
4682   ac_cv_sizeof_void_p=0
4683 fi
4684 rm -fr conftest*
4685 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4686 { test "$extra_verbose" = "yes" && cat << EOF
4687     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4688 EOF
4689 cat >> confdefs.h <<EOF
4690 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4691 EOF
4692 }
4693
4694
4695
4696 case $opsys in
4697   cygwin* ) cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <cygwin/types.h>
4701 EOF
4702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4703   egrep "typedef.*intptr_t;" >/dev/null 2>&1; then
4704   rm -rf conftest*
4705   echo "$ac_t""yes" 1>&6
4706                              { test "$extra_verbose" = "yes" && cat << \EOF
4707     Defining INTPTR_T_IN_CYGWIN_TYPES_H = 1
4708 EOF
4709 cat >> confdefs.h <<\EOF
4710 #define INTPTR_T_IN_CYGWIN_TYPES_H 1
4711 EOF
4712 }
4713
4714 else
4715   rm -rf conftest*
4716   echo "$ac_t""no" 1>&6
4717 fi
4718 rm -f conftest*
4719  ;;
4720 esac
4721
4722 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4723 echo "configure:4724: checking for long file names" >&5
4724
4725 ac_cv_sys_long_file_names=yes
4726 # Test for long file names in all the places we know might matter:
4727 #      .                the current directory, where building will happen
4728 #      $prefix/lib      where we will be installing things
4729 #      $exec_prefix/lib likewise
4730 # eval it to expand exec_prefix.
4731 #      $TMPDIR          if set, where it might want to write temporary files
4732 # if $TMPDIR is not set:
4733 #      /tmp             where it might want to write temporary files
4734 #      /var/tmp         likewise
4735 #      /usr/tmp         likewise
4736 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4737   ac_tmpdirs="$TMPDIR"
4738 else
4739   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4740 fi
4741 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4742   test -d $ac_dir || continue
4743   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4744   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4745   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4746   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4747   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4748     ac_cv_sys_long_file_names=no
4749     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4750     break
4751   fi
4752   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4753 done
4754
4755 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4756 if test $ac_cv_sys_long_file_names = yes; then
4757   { test "$extra_verbose" = "yes" && cat << \EOF
4758     Defining HAVE_LONG_FILE_NAMES
4759 EOF
4760 cat >> confdefs.h <<\EOF
4761 #define HAVE_LONG_FILE_NAMES 1
4762 EOF
4763 }
4764
4765 fi
4766
4767
4768 echo $ac_n "checking for sin""... $ac_c" 1>&6
4769 echo "configure:4770: checking for sin" >&5
4770
4771 cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774 /* System header to define __stub macros and hopefully few prototypes,
4775     which can conflict with char sin(); below.  */
4776 #include <assert.h>
4777 /* Override any gcc2 internal prototype to avoid an error.  */
4778 /* We use char because int might match the return type of a gcc2
4779     builtin and then its argument prototype would still apply.  */
4780 char sin();
4781
4782 int main() {
4783
4784 /* The GNU C library defines this for functions which it implements
4785     to always fail with ENOSYS.  Some functions are actually named
4786     something starting with __ and the normal name is an alias.  */
4787 #if defined (__stub_sin) || defined (__stub___sin)
4788 choke me
4789 #else
4790 sin();
4791 #endif
4792
4793 ; return 0; }
4794 EOF
4795 if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4796   rm -rf conftest*
4797   eval "ac_cv_func_sin=yes"
4798 else
4799   echo "configure: failed program was:" >&5
4800   cat conftest.$ac_ext >&5
4801   rm -rf conftest*
4802   eval "ac_cv_func_sin=no"
4803 fi
4804 rm -f conftest*
4805
4806 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4807   echo "$ac_t""yes" 1>&6
4808   :
4809 else
4810   echo "$ac_t""no" 1>&6
4811
4812 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4813 echo "configure:4814: checking for sin in -lm" >&5
4814 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4815
4816 xe_check_libs=" -lm "
4817 cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4820 /* Override any gcc2 internal prototype to avoid an error.  */
4821 /* We use char because int might match the return type of a gcc2
4822     builtin and then its argument prototype would still apply.  */
4823 char sin();
4824
4825 int main() {
4826 sin()
4827 ; return 0; }
4828 EOF
4829 if { (eval echo configure:4830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4830   rm -rf conftest*
4831   eval "ac_cv_lib_$ac_lib_var=yes"
4832 else
4833   echo "configure: failed program was:" >&5
4834   cat conftest.$ac_ext >&5
4835   rm -rf conftest*
4836   eval "ac_cv_lib_$ac_lib_var=no"
4837 fi
4838 rm -f conftest*
4839 xe_check_libs=""
4840
4841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4842   echo "$ac_t""yes" 1>&6
4843     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4844     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4845   { test "$extra_verbose" = "yes" && cat << EOF
4846     Defining $ac_tr_lib
4847 EOF
4848 cat >> confdefs.h <<EOF
4849 #define $ac_tr_lib 1
4850 EOF
4851 }
4852
4853   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4854
4855 else
4856   echo "$ac_t""no" 1>&6
4857 fi
4858
4859
4860 fi
4861
4862
4863 { test "$extra_verbose" = "yes" && cat << \EOF
4864     Defining LISP_FLOAT_TYPE
4865 EOF
4866 cat >> confdefs.h <<\EOF
4867 #define LISP_FLOAT_TYPE 1
4868 EOF
4869 }
4870
4871
4872 cat > conftest.$ac_ext <<EOF
4873 #line 4874 "configure"
4874 #include "confdefs.h"
4875 #include <math.h>
4876 int main() {
4877 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4878 ; return 0; }
4879 EOF
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881   rm -rf conftest*
4882   { test "$extra_verbose" = "yes" && cat << \EOF
4883     Defining HAVE_INVERSE_HYPERBOLIC
4884 EOF
4885 cat >> confdefs.h <<\EOF
4886 #define HAVE_INVERSE_HYPERBOLIC 1
4887 EOF
4888 }
4889
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893 fi
4894 rm -f conftest*
4895
4896 echo "checking type of mail spool file locking" 1>&6
4897 echo "configure:4898: checking type of mail spool file locking" >&5
4898 for ac_func in lockf flock
4899 do
4900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4901 echo "configure:4902: checking for $ac_func" >&5
4902
4903 cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 /* System header to define __stub macros and hopefully few prototypes,
4907     which can conflict with char $ac_func(); below.  */
4908 #include <assert.h>
4909 /* Override any gcc2 internal prototype to avoid an error.  */
4910 /* We use char because int might match the return type of a gcc2
4911     builtin and then its argument prototype would still apply.  */
4912 char $ac_func();
4913
4914 int main() {
4915
4916 /* The GNU C library defines this for functions which it implements
4917     to always fail with ENOSYS.  Some functions are actually named
4918     something starting with __ and the normal name is an alias.  */
4919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4920 choke me
4921 #else
4922 $ac_func();
4923 #endif
4924
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   eval "ac_cv_func_$ac_func=yes"
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   eval "ac_cv_func_$ac_func=no"
4935 fi
4936 rm -f conftest*
4937
4938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4941   { test "$extra_verbose" = "yes" && cat << EOF
4942     Defining $ac_tr_func
4943 EOF
4944 cat >> confdefs.h <<EOF
4945 #define $ac_tr_func 1
4946 EOF
4947 }
4948  
4949 else
4950   echo "$ac_t""no" 1>&6
4951 fi
4952 done
4953
4954 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4955 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4956 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4957 if   test -z "$mail_locking"; then
4958   case "$opsys" in cygwin* | mingw*)
4959     mail_locking=pop ;;
4960   esac
4961 fi
4962
4963 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4964     Defining MAIL_LOCK_LOCKF
4965 EOF
4966 cat >> confdefs.h <<\EOF
4967 #define MAIL_LOCK_LOCKF 1
4968 EOF
4969 }
4970
4971 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4972     Defining MAIL_LOCK_FLOCK
4973 EOF
4974 cat >> confdefs.h <<\EOF
4975 #define MAIL_LOCK_FLOCK 1
4976 EOF
4977 }
4978
4979 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4980     Defining MAIL_LOCK_LOCKING
4981 EOF
4982 cat >> confdefs.h <<\EOF
4983 #define MAIL_LOCK_LOCKING 1
4984 EOF
4985 }
4986
4987 elif test "$mail_locking" = "pop"; then
4988   with_pop=yes
4989   mail_locking=
4990 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4991     Defining MAIL_LOCK_DOT
4992 EOF
4993 cat >> confdefs.h <<\EOF
4994 #define MAIL_LOCK_DOT 1
4995 EOF
4996 }
4997
4998 fi
4999 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
5000   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
5001 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
5002   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
5003 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
5004   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
5005
5006 case "$opsys" in decosf*)
5007   
5008 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
5009 echo "configure:5010: checking for cma_open in -lpthreads" >&5
5010 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
5011
5012 xe_check_libs=" -lpthreads "
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016 /* Override any gcc2 internal prototype to avoid an error.  */
5017 /* We use char because int might match the return type of a gcc2
5018     builtin and then its argument prototype would still apply.  */
5019 char cma_open();
5020
5021 int main() {
5022 cma_open()
5023 ; return 0; }
5024 EOF
5025 if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=yes"
5028 else
5029   echo "configure: failed program was:" >&5
5030   cat conftest.$ac_ext >&5
5031   rm -rf conftest*
5032   eval "ac_cv_lib_$ac_lib_var=no"
5033 fi
5034 rm -f conftest*
5035 xe_check_libs=""
5036
5037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5038   echo "$ac_t""yes" 1>&6
5039     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5040     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5041   { test "$extra_verbose" = "yes" && cat << EOF
5042     Defining $ac_tr_lib
5043 EOF
5044 cat >> confdefs.h <<EOF
5045 #define $ac_tr_lib 1
5046 EOF
5047 }
5048
5049   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5050
5051 else
5052   echo "$ac_t""no" 1>&6
5053 fi
5054
5055
5056   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5057     c_switch_site="$c_switch_site -threads" ;;
5058 esac
5059
5060
5061 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5062 echo "configure:5063: checking whether the -xildoff compiler flag is required" >&5
5063 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5064   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5065     then echo "$ac_t""no" 1>&6;
5066     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
5067   fi
5068   else echo "$ac_t""no" 1>&6
5069 fi
5070
5071 if test "$opsys" = "sol2"; then
5072   if test "$os_release" -ge 506; then
5073     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5074 echo "configure:5075: checking for \"-z ignore\" linker flag" >&5
5075     case "`ld -h 2>&1`" in
5076       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5077         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5078       *) echo "$ac_t""no" 1>&6 ;;
5079     esac
5080   fi
5081 fi
5082
5083
5084 echo "checking "for specified window system"" 1>&6
5085 echo "configure:5086: checking "for specified window system"" >&5
5086
5087
5088 GNOME_CONFIG=no
5089 GTK_CONFIG=no
5090
5091 if test "$with_gnome" != "no"; then
5092    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5093 echo "configure:5094: checking for GNOME configuration script" >&5
5094    for possible in gnome-config
5095    do
5096       possible_version=`${possible} --version 2> /dev/null`
5097       if test "x${possible_version}" != "x"; then
5098               GNOME_CONFIG="${possible}"
5099               with_gnome=yes
5100               with_gtk=yes
5101               break
5102       fi
5103    done
5104    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5105 fi
5106
5107 if test "${GNOME_CONFIG}" != "no"; then
5108       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5109       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5110       { test "$extra_verbose" = "yes" && cat << \EOF
5111     Defining HAVE_GNOME
5112 EOF
5113 cat >> confdefs.h <<\EOF
5114 #define HAVE_GNOME 1
5115 EOF
5116 }
5117
5118       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5119       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5120 fi
5121
5122 if test "$with_gtk" != "no";then
5123    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5124 echo "configure:5125: checking for GTK configuration script" >&5
5125    for possible in gtk12-config gtk14-config gtk-config
5126    do
5127       possible_version=`${possible} --version 2> /dev/null`
5128       if test "x${possible_version}" != "x"; then
5129               GTK_CONFIG="${possible}"
5130               case "${possible_version}" in
5131                 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5132                 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5133                 1.2.*)
5134                         with_gtk=yes
5135                         break
5136                         ;;
5137                 *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5138               esac
5139       fi
5140    done
5141    echo "$ac_t""${GTK_CONFIG}" 1>&6
5142 fi
5143
5144 if test "${GTK_CONFIG}" != "no"; then
5145       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5146 echo "configure:5147: checking gtk version" >&5
5147       GTK_VERSION=`${GTK_CONFIG} --version`
5148       echo "$ac_t""${GTK_VERSION}" 1>&6
5149
5150       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5151 echo "configure:5152: checking gtk libs" >&5
5152       GTK_LIBS=`${GTK_CONFIG} --libs`
5153       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5154       echo "$ac_t""${GTK_LIBS}" 1>&6
5155
5156       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5157 echo "configure:5158: checking gtk cflags" >&5
5158       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5159       if test "$GCC" = "yes"; then
5160         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5161       fi
5162       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5163       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5164
5165       
5166 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5167 echo "configure:5168: checking for main in -lgdk_imlib" >&5
5168 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5169
5170 xe_check_libs=" -lgdk_imlib "
5171 cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174
5175 int main() {
5176 main()
5177 ; return 0; }
5178 EOF
5179 if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=yes"
5182 else
5183   echo "configure: failed program was:" >&5
5184   cat conftest.$ac_ext >&5
5185   rm -rf conftest*
5186   eval "ac_cv_lib_$ac_lib_var=no"
5187 fi
5188 rm -f conftest*
5189 xe_check_libs=""
5190
5191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5192   echo "$ac_t""yes" 1>&6
5193   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5194 else
5195   echo "$ac_t""no" 1>&6
5196 fi
5197
5198
5199       
5200 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5201 echo "configure:5202: checking for Imlib_init in -lImlib" >&5
5202 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5203
5204 xe_check_libs=" -lImlib "
5205 cat > conftest.$ac_ext <<EOF
5206 #line 5207 "configure"
5207 #include "confdefs.h"
5208 /* Override any gcc2 internal prototype to avoid an error.  */
5209 /* We use char because int might match the return type of a gcc2
5210     builtin and then its argument prototype would still apply.  */
5211 char Imlib_init();
5212
5213 int main() {
5214 Imlib_init()
5215 ; return 0; }
5216 EOF
5217 if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5218   rm -rf conftest*
5219   eval "ac_cv_lib_$ac_lib_var=yes"
5220 else
5221   echo "configure: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=no"
5225 fi
5226 rm -f conftest*
5227 xe_check_libs=""
5228
5229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5230   echo "$ac_t""yes" 1>&6
5231   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5232 else
5233   echo "$ac_t""no" 1>&6
5234 fi
5235
5236
5237       for ac_func in gdk_imlib_init
5238 do
5239 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5240 echo "configure:5241: checking for $ac_func" >&5
5241
5242 cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245 /* System header to define __stub macros and hopefully few prototypes,
5246     which can conflict with char $ac_func(); below.  */
5247 #include <assert.h>
5248 /* Override any gcc2 internal prototype to avoid an error.  */
5249 /* We use char because int might match the return type of a gcc2
5250     builtin and then its argument prototype would still apply.  */
5251 char $ac_func();
5252
5253 int main() {
5254
5255 /* The GNU C library defines this for functions which it implements
5256     to always fail with ENOSYS.  Some functions are actually named
5257     something starting with __ and the normal name is an alias.  */
5258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5259 choke me
5260 #else
5261 $ac_func();
5262 #endif
5263
5264 ; return 0; }
5265 EOF
5266 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5267   rm -rf conftest*
5268   eval "ac_cv_func_$ac_func=yes"
5269 else
5270   echo "configure: failed program was:" >&5
5271   cat conftest.$ac_ext >&5
5272   rm -rf conftest*
5273   eval "ac_cv_func_$ac_func=no"
5274 fi
5275 rm -f conftest*
5276
5277 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5278   echo "$ac_t""yes" 1>&6
5279     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5280   { test "$extra_verbose" = "yes" && cat << EOF
5281     Defining $ac_tr_func
5282 EOF
5283 cat >> confdefs.h <<EOF
5284 #define $ac_tr_func 1
5285 EOF
5286 }
5287  
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291 done
5292
5293
5294       { test "$extra_verbose" = "yes" && cat << \EOF
5295     Defining HAVE_XPM
5296 EOF
5297 cat >> confdefs.h <<\EOF
5298 #define HAVE_XPM 1
5299 EOF
5300 }
5301
5302       { test "$extra_verbose" = "yes" && cat << \EOF
5303     Defining HAVE_GTK
5304 EOF
5305 cat >> confdefs.h <<\EOF
5306 #define HAVE_GTK 1
5307 EOF
5308 }
5309
5310       
5311
5312       window_system=gtk
5313       with_gtk=yes
5314       with_x11=no
5315
5316       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5317       test "${with_toolbars}" != no && with_toolbars=gtk
5318       test "${with_menubars}" != "no" && with_menubars=gtk
5319       test "${with_dialogs}" != "no" && with_dialogs=gtk
5320       test "${with_widgets}" != "no" && with_widgets=gtk
5321
5322       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5323    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5324  fi
5325       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5326    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5327  fi
5328       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5329    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5330  fi
5331       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5332    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5333  fi
5334
5335             OLD_CFLAGS="${CFLAGS}"
5336       OLD_CPPFLAGS="${CPPFLAGS}"
5337       OLD_LDFLAGS="${LDFLAGS}"
5338       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5339       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5340       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5341       for ac_hdr in glade/glade.h glade.h
5342 do
5343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5345 echo "configure:5346: checking for $ac_hdr" >&5
5346
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350 #include <$ac_hdr>
5351 EOF
5352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5353 { (eval echo configure:5354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5355 if test -z "$ac_err"; then
5356   rm -rf conftest*
5357   eval "ac_cv_header_$ac_safe=yes"
5358 else
5359   echo "$ac_err" >&5
5360   echo "configure: failed program was:" >&5
5361   cat conftest.$ac_ext >&5
5362   rm -rf conftest*
5363   eval "ac_cv_header_$ac_safe=no"
5364 fi
5365 rm -f conftest*
5366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5367   echo "$ac_t""yes" 1>&6
5368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5369   { test "$extra_verbose" = "yes" && cat << EOF
5370     Defining $ac_tr_hdr
5371 EOF
5372 cat >> confdefs.h <<EOF
5373 #define $ac_tr_hdr 1
5374 EOF
5375 }
5376  
5377 else
5378   echo "$ac_t""no" 1>&6
5379 fi
5380 done
5381
5382       
5383 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5384 echo "configure:5385: checking for main in -lxml" >&5
5385 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5386
5387 xe_check_libs=" -lxml "
5388 cat > conftest.$ac_ext <<EOF
5389 #line 5390 "configure"
5390 #include "confdefs.h"
5391
5392 int main() {
5393 main()
5394 ; return 0; }
5395 EOF
5396 if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5397   rm -rf conftest*
5398   eval "ac_cv_lib_$ac_lib_var=yes"
5399 else
5400   echo "configure: failed program was:" >&5
5401   cat conftest.$ac_ext >&5
5402   rm -rf conftest*
5403   eval "ac_cv_lib_$ac_lib_var=no"
5404 fi
5405 rm -f conftest*
5406 xe_check_libs=""
5407
5408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5409   echo "$ac_t""yes" 1>&6
5410   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5411 else
5412   echo "$ac_t""no" 1>&6
5413 fi
5414
5415
5416       
5417 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5418 echo "configure:5419: checking for main in -lglade" >&5
5419 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5420
5421 xe_check_libs=" -lglade "
5422 cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5425
5426 int main() {
5427 main()
5428 ; return 0; }
5429 EOF
5430 if { (eval echo configure:5431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5431   rm -rf conftest*
5432   eval "ac_cv_lib_$ac_lib_var=yes"
5433 else
5434   echo "configure: failed program was:" >&5
5435   cat conftest.$ac_ext >&5
5436   rm -rf conftest*
5437   eval "ac_cv_lib_$ac_lib_var=no"
5438 fi
5439 rm -f conftest*
5440 xe_check_libs=""
5441
5442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5443   echo "$ac_t""yes" 1>&6
5444   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5445 else
5446   echo "$ac_t""no" 1>&6
5447 fi
5448
5449
5450       
5451 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5452 echo "configure:5453: checking for main in -lglade-gnome" >&5
5453 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5454
5455 xe_check_libs=" -lglade-gnome "
5456 cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459
5460 int main() {
5461 main()
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5465   rm -rf conftest*
5466   eval "ac_cv_lib_$ac_lib_var=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=no"
5472 fi
5473 rm -f conftest*
5474 xe_check_libs=""
5475
5476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5477   echo "$ac_t""yes" 1>&6
5478   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5479 else
5480   echo "$ac_t""no" 1>&6
5481 fi
5482
5483
5484       cat > conftest.$ac_ext <<EOF
5485 #line 5486 "configure"
5486 #include "confdefs.h"
5487 #include <glade/glade-xml.h>
5488 EOF
5489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5490   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5491   rm -rf conftest*
5492   echo "$ac_t""yes" 1>&6
5493                        { test "$extra_verbose" = "yes" && cat << \EOF
5494     Defining LIBGLADE_XML_TXTDOMAIN = 1
5495 EOF
5496 cat >> confdefs.h <<\EOF
5497 #define LIBGLADE_XML_TXTDOMAIN 1
5498 EOF
5499 }
5500
5501 else
5502   rm -rf conftest*
5503   echo "$ac_t""no" 1>&6
5504 fi
5505 rm -f conftest*
5506
5507       CFLAGS="${OLD_CFLAGS}"
5508       CPPFLAGS="${OLD_CPPFLAGS}"
5509       LDFLAGS="${OLD_LDFLAGS}"
5510 fi
5511
5512
5513 if test "$with_x11" != "no"; then
5514     test "$x_includes $x_libraries" != "NONE NONE" && \
5515    window_system=x11 with_x11=yes
5516
5517         
5518       if test "$x_includes $x_libraries" = "NONE NONE" \
5519     -a -n "$OPENWINHOME" \
5520     -a "$OPENWINHOME" != "/usr/openwin" \
5521     -a -d "$OPENWINHOME"; then
5522       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5523       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5524       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5525   fi
5526
5527   if test "$x_includes" = "NONE"; then
5528                     for dir in "/usr/X11" "/usr/X11R6"; do
5529       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5530     done
5531   fi
5532
5533   if test "$x_libraries" = "NONE"; then
5534     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5535       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5536     done
5537   fi
5538
5539   # If we find X, set shell vars x_includes and x_libraries to the
5540 # paths, otherwise set no_x=yes.
5541 # Uses ac_ vars as temps to allow command line to override cache and checks.
5542 # --without-x overrides everything else, but does not touch the cache.
5543 echo $ac_n "checking for X""... $ac_c" 1>&6
5544 echo "configure:5545: checking for X" >&5
5545
5546 # Check whether --with-x or --without-x was given.
5547 if test "${with_x+set}" = set; then
5548   withval="$with_x"
5549   :
5550 fi
5551
5552 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5553 if test "x$with_x" = xno; then
5554   # The user explicitly disabled X.
5555   have_x=disabled
5556 else
5557   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5558     # Both variables are already set.
5559     have_x=yes
5560   else
5561
5562 # One or both of the vars are not set, and there is no cached value.
5563 ac_x_includes=NO ac_x_libraries=NO
5564 rm -fr conftestdir
5565 if mkdir conftestdir; then
5566   cd conftestdir
5567   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5568   cat > Imakefile <<'EOF'
5569 acfindx:
5570         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5571 EOF
5572   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5573     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5574     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5575     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5576     for ac_extension in a so sl; do
5577       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5578         test -f $ac_im_libdir/libX11.$ac_extension; then
5579         ac_im_usrlibdir=$ac_im_libdir; break
5580       fi
5581     done
5582     # Screen out bogus values from the imake configuration.  They are
5583     # bogus both because they are the default anyway, and because
5584     # using them would break gcc on systems where it needs fixed includes.
5585     case "$ac_im_incroot" in
5586         /usr/include) ;;
5587         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5588     esac
5589     case "$ac_im_usrlibdir" in
5590         /usr/lib | /lib) ;;
5591         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5592     esac
5593   fi
5594   cd ..
5595   rm -fr conftestdir
5596 fi
5597
5598 if test "$ac_x_includes" = NO; then
5599   # Guess where to find include files, by looking for this one X11 .h file.
5600   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5601
5602   # First, try using that file with no special directory specified.
5603 cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606 #include <$x_direct_test_include>
5607 EOF
5608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5609 { (eval echo configure:5610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5611 if test -z "$ac_err"; then
5612   rm -rf conftest*
5613   # We can compile using X headers with no special include directory.
5614 ac_x_includes=
5615 else
5616   echo "$ac_err" >&5
5617   echo "configure: failed program was:" >&5
5618   cat conftest.$ac_ext >&5
5619   rm -rf conftest*
5620   # Look for the header file in a standard set of common directories.
5621 # Check X11 before X11Rn because it is often a symlink to the current release.
5622   for ac_dir in               \
5623     /usr/X11/include          \
5624     /usr/X11R6/include        \
5625     /usr/X11R5/include        \
5626     /usr/X11R4/include        \
5627                               \
5628     /usr/include/X11          \
5629     /usr/include/X11R6        \
5630     /usr/include/X11R5        \
5631     /usr/include/X11R4        \
5632                               \
5633     /usr/local/X11/include    \
5634     /usr/local/X11R6/include  \
5635     /usr/local/X11R5/include  \
5636     /usr/local/X11R4/include  \
5637                               \
5638     /usr/local/include/X11    \
5639     /usr/local/include/X11R6  \
5640     /usr/local/include/X11R5  \
5641     /usr/local/include/X11R4  \
5642                               \
5643     /usr/X386/include         \
5644     /usr/x386/include         \
5645     /usr/XFree86/include/X11  \
5646                               \
5647     /usr/include              \
5648     /usr/local/include        \
5649     /usr/unsupported/include  \
5650     /usr/athena/include       \
5651     /usr/local/x11r5/include  \
5652     /usr/lpp/Xamples/include  \
5653                               \
5654     /usr/openwin/include      \
5655     /usr/openwin/share/include \
5656     ; \
5657   do
5658     if test -r "$ac_dir/$x_direct_test_include"; then
5659       ac_x_includes=$ac_dir
5660       break
5661     fi
5662   done
5663 fi
5664 rm -f conftest*
5665 fi # $ac_x_includes = NO
5666
5667 if test "$ac_x_libraries" = NO; then
5668   # Check for the libraries.
5669
5670   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5671   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5672
5673   # See if we find them without any special options.
5674   # Don't add to $LIBS permanently.
5675   ac_save_LIBS="$LIBS"
5676   LIBS="-l$x_direct_test_library $LIBS"
5677 cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680
5681 int main() {
5682 ${x_direct_test_function}()
5683 ; return 0; }
5684 EOF
5685 if { (eval echo configure:5686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5686   rm -rf conftest*
5687   LIBS="$ac_save_LIBS"
5688 # We can link X programs with no special library path.
5689 ac_x_libraries=
5690 else
5691   echo "configure: failed program was:" >&5
5692   cat conftest.$ac_ext >&5
5693   rm -rf conftest*
5694   LIBS="$ac_save_LIBS"
5695 # First see if replacing the include by lib works.
5696 # Check X11 before X11Rn because it is often a symlink to the current release.
5697 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5698     /usr/X11/lib          \
5699     /usr/X11R6/lib        \
5700     /usr/X11R5/lib        \
5701     /usr/X11R4/lib        \
5702                           \
5703     /usr/lib/X11          \
5704     /usr/lib/X11R6        \
5705     /usr/lib/X11R5        \
5706     /usr/lib/X11R4        \
5707                           \
5708     /usr/local/X11/lib    \
5709     /usr/local/X11R6/lib  \
5710     /usr/local/X11R5/lib  \
5711     /usr/local/X11R4/lib  \
5712                           \
5713     /usr/local/lib/X11    \
5714     /usr/local/lib/X11R6  \
5715     /usr/local/lib/X11R5  \
5716     /usr/local/lib/X11R4  \
5717                           \
5718     /usr/X386/lib         \
5719     /usr/x386/lib         \
5720     /usr/XFree86/lib/X11  \
5721                           \
5722     /usr/lib              \
5723     /usr/local/lib        \
5724     /usr/unsupported/lib  \
5725     /usr/athena/lib       \
5726     /usr/local/x11r5/lib  \
5727     /usr/lpp/Xamples/lib  \
5728     /lib/usr/lib/X11      \
5729                           \
5730     /usr/openwin/lib      \
5731     /usr/openwin/share/lib \
5732     ; \
5733 do
5734   for ac_extension in a so sl; do
5735     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5736       ac_x_libraries=$ac_dir
5737       break 2
5738     fi
5739   done
5740 done
5741 fi
5742 rm -f conftest*
5743 fi # $ac_x_libraries = NO
5744
5745 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5746   # Didn't find X anywhere.  Cache the known absence of X.
5747   ac_cv_have_x="have_x=no"
5748 else
5749   # Record where we found X for the cache.
5750   ac_cv_have_x="have_x=yes \
5751                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5752 fi
5753   fi
5754   eval "$ac_cv_have_x"
5755 fi # $with_x != no
5756
5757 if test "$have_x" != yes; then
5758   echo "$ac_t""$have_x" 1>&6
5759   no_x=yes
5760 else
5761   # If each of the values was on the command line, it overrides each guess.
5762   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5763   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5764   # Update the cache value to reflect the command line values.
5765   ac_cv_have_x="have_x=yes \
5766                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5767   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5768 fi
5769
5770 if test "$no_x" = yes; then
5771   # Not all programs may use this symbol, but it does not hurt to define it.
5772   { test "$extra_verbose" = "yes" && cat << \EOF
5773     Defining X_DISPLAY_MISSING
5774 EOF
5775 cat >> confdefs.h <<\EOF
5776 #define X_DISPLAY_MISSING 1
5777 EOF
5778 }
5779
5780   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5781 else
5782   if test -n "$x_includes"; then
5783     X_CFLAGS="$X_CFLAGS -I$x_includes"
5784   fi
5785
5786   # It would also be nice to do this for all -L options, not just this one.
5787   if test -n "$x_libraries"; then
5788     X_LIBS="$X_LIBS -L$x_libraries"
5789     # For Solaris; some versions of Sun CC require a space after -R and
5790     # others require no space.  Words are not sufficient . . . .
5791     case "`(uname -sr) 2>/dev/null`" in
5792     "SunOS 5"*)
5793       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5794 echo "configure:5795: checking whether -R must be followed by a space" >&5
5795       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5796       cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799
5800 int main() {
5801
5802 ; return 0; }
5803 EOF
5804 if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5805   rm -rf conftest*
5806   ac_R_nospace=yes
5807 else
5808   echo "configure: failed program was:" >&5
5809   cat conftest.$ac_ext >&5
5810   rm -rf conftest*
5811   ac_R_nospace=no
5812 fi
5813 rm -f conftest*
5814       if test $ac_R_nospace = yes; then
5815         echo "$ac_t""no" 1>&6
5816         X_LIBS="$X_LIBS -R$x_libraries"
5817       else
5818         LIBS="$ac_xsave_LIBS -R $x_libraries"
5819         cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822
5823 int main() {
5824
5825 ; return 0; }
5826 EOF
5827 if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5828   rm -rf conftest*
5829   ac_R_space=yes
5830 else
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -rf conftest*
5834   ac_R_space=no
5835 fi
5836 rm -f conftest*
5837         if test $ac_R_space = yes; then
5838           echo "$ac_t""yes" 1>&6
5839           X_LIBS="$X_LIBS -R $x_libraries"
5840         else
5841           echo "$ac_t""neither works" 1>&6
5842         fi
5843       fi
5844       LIBS="$ac_xsave_LIBS"
5845     esac
5846   fi
5847
5848   # Check for system-dependent libraries X programs must link with.
5849   # Do this before checking for the system-independent R6 libraries
5850   # (-lICE), since we may need -lsocket or whatever for X linking.
5851
5852   if test "$ISC" = yes; then
5853     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5854   else
5855     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5856     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5857     # the Alpha needs dnet_stub (dnet does not exist).
5858     if test "$with_dnet" = "no" ; then
5859 ac_cv_lib_dnet_dnet_ntoa=no
5860 else
5861
5862 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5863 echo "configure:5864: checking for dnet_ntoa in -ldnet" >&5
5864 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5865
5866 xe_check_libs=" -ldnet "
5867 cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 /* Override any gcc2 internal prototype to avoid an error.  */
5871 /* We use char because int might match the return type of a gcc2
5872     builtin and then its argument prototype would still apply.  */
5873 char dnet_ntoa();
5874
5875 int main() {
5876 dnet_ntoa()
5877 ; return 0; }
5878 EOF
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5880   rm -rf conftest*
5881   eval "ac_cv_lib_$ac_lib_var=yes"
5882 else
5883   echo "configure: failed program was:" >&5
5884   cat conftest.$ac_ext >&5
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=no"
5887 fi
5888 rm -f conftest*
5889 xe_check_libs=""
5890
5891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5892   echo "$ac_t""yes" 1>&6
5893   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5894 else
5895   echo "$ac_t""no" 1>&6
5896 fi
5897
5898 fi
5899
5900     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5901       
5902 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5903 echo "configure:5904: checking for dnet_ntoa in -ldnet_stub" >&5
5904 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5905
5906 xe_check_libs=" -ldnet_stub "
5907 cat > conftest.$ac_ext <<EOF
5908 #line 5909 "configure"
5909 #include "confdefs.h"
5910 /* Override any gcc2 internal prototype to avoid an error.  */
5911 /* We use char because int might match the return type of a gcc2
5912     builtin and then its argument prototype would still apply.  */
5913 char dnet_ntoa();
5914
5915 int main() {
5916 dnet_ntoa()
5917 ; return 0; }
5918 EOF
5919 if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5920   rm -rf conftest*
5921   eval "ac_cv_lib_$ac_lib_var=yes"
5922 else
5923   echo "configure: failed program was:" >&5
5924   cat conftest.$ac_ext >&5
5925   rm -rf conftest*
5926   eval "ac_cv_lib_$ac_lib_var=no"
5927 fi
5928 rm -f conftest*
5929 xe_check_libs=""
5930
5931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5932   echo "$ac_t""yes" 1>&6
5933   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5934 else
5935   echo "$ac_t""no" 1>&6
5936 fi
5937
5938
5939     fi
5940
5941     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5942     # to get the SysV transport functions.
5943     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5944     # needs -lnsl.
5945     # The nsl library prevents programs from opening the X display
5946     # on Irix 5.2, according to dickey@clark.net.
5947     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5948 echo "configure:5949: checking for gethostbyname" >&5
5949
5950 cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 /* System header to define __stub macros and hopefully few prototypes,
5954     which can conflict with char gethostbyname(); below.  */
5955 #include <assert.h>
5956 /* Override any gcc2 internal prototype to avoid an error.  */
5957 /* We use char because int might match the return type of a gcc2
5958     builtin and then its argument prototype would still apply.  */
5959 char gethostbyname();
5960
5961 int main() {
5962
5963 /* The GNU C library defines this for functions which it implements
5964     to always fail with ENOSYS.  Some functions are actually named
5965     something starting with __ and the normal name is an alias.  */
5966 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5967 choke me
5968 #else
5969 gethostbyname();
5970 #endif
5971
5972 ; return 0; }
5973 EOF
5974 if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5975   rm -rf conftest*
5976   eval "ac_cv_func_gethostbyname=yes"
5977 else
5978   echo "configure: failed program was:" >&5
5979   cat conftest.$ac_ext >&5
5980   rm -rf conftest*
5981   eval "ac_cv_func_gethostbyname=no"
5982 fi
5983 rm -f conftest*
5984
5985 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5986   echo "$ac_t""yes" 1>&6
5987   :
5988 else
5989   echo "$ac_t""no" 1>&6
5990 fi
5991
5992     if test $ac_cv_func_gethostbyname = no; then
5993       
5994 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5995 echo "configure:5996: checking for gethostbyname in -lnsl" >&5
5996 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5997
5998 xe_check_libs=" -lnsl "
5999 cat > conftest.$ac_ext <<EOF
6000 #line 6001 "configure"
6001 #include "confdefs.h"
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char gethostbyname();
6006
6007 int main() {
6008 gethostbyname()
6009 ; return 0; }
6010 EOF
6011 if { (eval echo configure:6012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6012   rm -rf conftest*
6013   eval "ac_cv_lib_$ac_lib_var=yes"
6014 else
6015   echo "configure: failed program was:" >&5
6016   cat conftest.$ac_ext >&5
6017   rm -rf conftest*
6018   eval "ac_cv_lib_$ac_lib_var=no"
6019 fi
6020 rm -f conftest*
6021 xe_check_libs=""
6022
6023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6024   echo "$ac_t""yes" 1>&6
6025   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6026 else
6027   echo "$ac_t""no" 1>&6
6028 fi
6029
6030
6031     fi
6032
6033     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6034     # socket/setsockopt and other routines are undefined under SCO ODT
6035     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6036     # on later versions), says simon@lia.di.epfl.ch: it contains
6037     # gethostby* variants that don't use the nameserver (or something).
6038     # -lsocket must be given before -lnsl if both are needed.
6039     # We assume that if connect needs -lnsl, so does gethostbyname.
6040     echo $ac_n "checking for connect""... $ac_c" 1>&6
6041 echo "configure:6042: checking for connect" >&5
6042
6043 cat > conftest.$ac_ext <<EOF
6044 #line 6045 "configure"
6045 #include "confdefs.h"
6046 /* System header to define __stub macros and hopefully few prototypes,
6047     which can conflict with char connect(); below.  */
6048 #include <assert.h>
6049 /* Override any gcc2 internal prototype to avoid an error.  */
6050 /* We use char because int might match the return type of a gcc2
6051     builtin and then its argument prototype would still apply.  */
6052 char connect();
6053
6054 int main() {
6055
6056 /* The GNU C library defines this for functions which it implements
6057     to always fail with ENOSYS.  Some functions are actually named
6058     something starting with __ and the normal name is an alias.  */
6059 #if defined (__stub_connect) || defined (__stub___connect)
6060 choke me
6061 #else
6062 connect();
6063 #endif
6064
6065 ; return 0; }
6066 EOF
6067 if { (eval echo configure:6068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6068   rm -rf conftest*
6069   eval "ac_cv_func_connect=yes"
6070 else
6071   echo "configure: failed program was:" >&5
6072   cat conftest.$ac_ext >&5
6073   rm -rf conftest*
6074   eval "ac_cv_func_connect=no"
6075 fi
6076 rm -f conftest*
6077
6078 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080   :
6081 else
6082   echo "$ac_t""no" 1>&6
6083 fi
6084
6085     if test $ac_cv_func_connect = no; then
6086       
6087 xe_msg_checking="for connect in -lsocket"
6088 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6089 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6090 echo "configure:6091: checking "$xe_msg_checking"" >&5
6091 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6092
6093 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6094 cat > conftest.$ac_ext <<EOF
6095 #line 6096 "configure"
6096 #include "confdefs.h"
6097 /* Override any gcc2 internal prototype to avoid an error.  */
6098 /* We use char because int might match the return type of a gcc2
6099     builtin and then its argument prototype would still apply.  */
6100 char connect();
6101
6102 int main() {
6103 connect()
6104 ; return 0; }
6105 EOF
6106 if { (eval echo configure:6107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6107   rm -rf conftest*
6108   eval "ac_cv_lib_$ac_lib_var=yes"
6109 else
6110   echo "configure: failed program was:" >&5
6111   cat conftest.$ac_ext >&5
6112   rm -rf conftest*
6113   eval "ac_cv_lib_$ac_lib_var=no"
6114 fi
6115 rm -f conftest*
6116 xe_check_libs=""
6117
6118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6119   echo "$ac_t""yes" 1>&6
6120   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6121 else
6122   echo "$ac_t""no" 1>&6
6123 fi
6124
6125
6126     fi
6127
6128     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6129     echo $ac_n "checking for remove""... $ac_c" 1>&6
6130 echo "configure:6131: checking for remove" >&5
6131
6132 cat > conftest.$ac_ext <<EOF
6133 #line 6134 "configure"
6134 #include "confdefs.h"
6135 /* System header to define __stub macros and hopefully few prototypes,
6136     which can conflict with char remove(); below.  */
6137 #include <assert.h>
6138 /* Override any gcc2 internal prototype to avoid an error.  */
6139 /* We use char because int might match the return type of a gcc2
6140     builtin and then its argument prototype would still apply.  */
6141 char remove();
6142
6143 int main() {
6144
6145 /* The GNU C library defines this for functions which it implements
6146     to always fail with ENOSYS.  Some functions are actually named
6147     something starting with __ and the normal name is an alias.  */
6148 #if defined (__stub_remove) || defined (__stub___remove)
6149 choke me
6150 #else
6151 remove();
6152 #endif
6153
6154 ; return 0; }
6155 EOF
6156 if { (eval echo configure:6157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6157   rm -rf conftest*
6158   eval "ac_cv_func_remove=yes"
6159 else
6160   echo "configure: failed program was:" >&5
6161   cat conftest.$ac_ext >&5
6162   rm -rf conftest*
6163   eval "ac_cv_func_remove=no"
6164 fi
6165 rm -f conftest*
6166
6167 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6168   echo "$ac_t""yes" 1>&6
6169   :
6170 else
6171   echo "$ac_t""no" 1>&6
6172 fi
6173
6174     if test $ac_cv_func_remove = no; then
6175       
6176 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6177 echo "configure:6178: checking for remove in -lposix" >&5
6178 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6179
6180 xe_check_libs=" -lposix "
6181 cat > conftest.$ac_ext <<EOF
6182 #line 6183 "configure"
6183 #include "confdefs.h"
6184 /* Override any gcc2 internal prototype to avoid an error.  */
6185 /* We use char because int might match the return type of a gcc2
6186     builtin and then its argument prototype would still apply.  */
6187 char remove();
6188
6189 int main() {
6190 remove()
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   eval "ac_cv_lib_$ac_lib_var=yes"
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=no"
6201 fi
6202 rm -f conftest*
6203 xe_check_libs=""
6204
6205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6206   echo "$ac_t""yes" 1>&6
6207   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211
6212
6213     fi
6214
6215     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6216     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6217 echo "configure:6218: checking for shmat" >&5
6218
6219 cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 /* System header to define __stub macros and hopefully few prototypes,
6223     which can conflict with char shmat(); below.  */
6224 #include <assert.h>
6225 /* Override any gcc2 internal prototype to avoid an error.  */
6226 /* We use char because int might match the return type of a gcc2
6227     builtin and then its argument prototype would still apply.  */
6228 char shmat();
6229
6230 int main() {
6231
6232 /* The GNU C library defines this for functions which it implements
6233     to always fail with ENOSYS.  Some functions are actually named
6234     something starting with __ and the normal name is an alias.  */
6235 #if defined (__stub_shmat) || defined (__stub___shmat)
6236 choke me
6237 #else
6238 shmat();
6239 #endif
6240
6241 ; return 0; }
6242 EOF
6243 if { (eval echo configure:6244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6244   rm -rf conftest*
6245   eval "ac_cv_func_shmat=yes"
6246 else
6247   echo "configure: failed program was:" >&5
6248   cat conftest.$ac_ext >&5
6249   rm -rf conftest*
6250   eval "ac_cv_func_shmat=no"
6251 fi
6252 rm -f conftest*
6253
6254 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6255   echo "$ac_t""yes" 1>&6
6256   :
6257 else
6258   echo "$ac_t""no" 1>&6
6259 fi
6260
6261     if test $ac_cv_func_shmat = no; then
6262       
6263 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6264 echo "configure:6265: checking for shmat in -lipc" >&5
6265 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6266
6267 xe_check_libs=" -lipc "
6268 cat > conftest.$ac_ext <<EOF
6269 #line 6270 "configure"
6270 #include "confdefs.h"
6271 /* Override any gcc2 internal prototype to avoid an error.  */
6272 /* We use char because int might match the return type of a gcc2
6273     builtin and then its argument prototype would still apply.  */
6274 char shmat();
6275
6276 int main() {
6277 shmat()
6278 ; return 0; }
6279 EOF
6280 if { (eval echo configure:6281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6281   rm -rf conftest*
6282   eval "ac_cv_lib_$ac_lib_var=yes"
6283 else
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=no"
6288 fi
6289 rm -f conftest*
6290 xe_check_libs=""
6291
6292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6293   echo "$ac_t""yes" 1>&6
6294   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6295 else
6296   echo "$ac_t""no" 1>&6
6297 fi
6298
6299
6300     fi
6301   fi
6302
6303   # Check for libraries that X11R6 Xt/Xaw programs need.
6304   ac_save_LDFLAGS="$LDFLAGS"
6305   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6306   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6307   # check for ICE first), but we must link in the order -lSM -lICE or
6308   # we get undefined symbols.  So assume we have SM if we have ICE.
6309   # These have to be linked with before -lX11, unlike the other
6310   # libraries we check for below, so use a different variable.
6311   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6312   
6313 xe_msg_checking="for IceConnectionNumber in -lICE"
6314 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6315 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6316 echo "configure:6317: checking "$xe_msg_checking"" >&5
6317 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6318
6319 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6320 cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323 /* Override any gcc2 internal prototype to avoid an error.  */
6324 /* We use char because int might match the return type of a gcc2
6325     builtin and then its argument prototype would still apply.  */
6326 char IceConnectionNumber();
6327
6328 int main() {
6329 IceConnectionNumber()
6330 ; return 0; }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333   rm -rf conftest*
6334   eval "ac_cv_lib_$ac_lib_var=yes"
6335 else
6336   echo "configure: failed program was:" >&5
6337   cat conftest.$ac_ext >&5
6338   rm -rf conftest*
6339   eval "ac_cv_lib_$ac_lib_var=no"
6340 fi
6341 rm -f conftest*
6342 xe_check_libs=""
6343
6344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6345   echo "$ac_t""yes" 1>&6
6346   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6347 else
6348   echo "$ac_t""no" 1>&6
6349 fi
6350
6351
6352   LDFLAGS="$ac_save_LDFLAGS"
6353
6354 fi
6355  # Autoconf claims to find X library and include dirs for us.
6356   if test "$no_x" = "yes"
6357   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6358   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6359   fi
6360 fi
6361
6362
6363 if test "$with_x11" = "yes"; then
6364   { test "$extra_verbose" = "yes" && cat << \EOF
6365     Defining HAVE_X_WINDOWS
6366 EOF
6367 cat >> confdefs.h <<\EOF
6368 #define HAVE_X_WINDOWS 1
6369 EOF
6370 }
6371
6372   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6373   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6374
6375
6376     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
6377 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
6378 echo "configure:6379: checking for Xm/Xm.h" >&5
6379
6380 cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 #include <Xm/Xm.h>
6384 EOF
6385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6386 { (eval echo configure:6387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6388 if test -z "$ac_err"; then
6389   rm -rf conftest*
6390   eval "ac_cv_header_$ac_safe=yes"
6391 else
6392   echo "$ac_err" >&5
6393   echo "configure: failed program was:" >&5
6394   cat conftest.$ac_ext >&5
6395   rm -rf conftest*
6396   eval "ac_cv_header_$ac_safe=no"
6397 fi
6398 rm -f conftest*
6399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6400   echo "$ac_t""yes" 1>&6
6401   
6402 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
6403 echo "configure:6404: checking for XmStringFree in -lXm" >&5
6404 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
6405
6406 xe_check_libs=" -lXm "
6407 cat > conftest.$ac_ext <<EOF
6408 #line 6409 "configure"
6409 #include "confdefs.h"
6410 /* Override any gcc2 internal prototype to avoid an error.  */
6411 /* We use char because int might match the return type of a gcc2
6412     builtin and then its argument prototype would still apply.  */
6413 char XmStringFree();
6414
6415 int main() {
6416 XmStringFree()
6417 ; return 0; }
6418 EOF
6419 if { (eval echo configure:6420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6420   rm -rf conftest*
6421   eval "ac_cv_lib_$ac_lib_var=yes"
6422 else
6423   echo "configure: failed program was:" >&5
6424   cat conftest.$ac_ext >&5
6425   rm -rf conftest*
6426   eval "ac_cv_lib_$ac_lib_var=no"
6427 fi
6428 rm -f conftest*
6429 xe_check_libs=""
6430
6431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6432   echo "$ac_t""yes" 1>&6
6433   got_motif=yes
6434 else
6435   echo "$ac_t""no" 1>&6
6436 fi
6437
6438
6439 else
6440   echo "$ac_t""no" 1>&6
6441 fi
6442
6443
6444   if test "$got_motif" != "yes"; then
6445             for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
6446                    "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6447       inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6448       if test -d "$lib_dir" -a -d "$inc_dir"; then
6449         case "$x_libraries" in *"$lib_dir"* ) ;; *)
6450           x_libraries="$lib_dir $x_libraries"
6451           X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6452         esac
6453         case "$x_includes" in "$inc_dir"* ) ;; *)
6454           x_includes="$inc_dir $x_includes"
6455           X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6456         esac
6457         break;  fi
6458     done
6459   fi
6460
6461     for rel in "X11R6" "X11R5" "X11R4"; do
6462     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6463     if test -d "$lib_dir" -a -d "$inc_dir"; then
6464       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6465         x_libraries="$x_libraries $lib_dir"
6466         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6467       esac
6468       case "$x_includes" in "$inc_dir"* ) ;; *)
6469         x_includes="$x_includes $inc_dir"
6470         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6471       esac
6472       break;     fi
6473   done
6474
6475     case "$opsys" in
6476   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 ;;
6477   esac
6478
6479   ld_switch_x_site="$X_LIBS"
6480
6481   
6482 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6483     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6484   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6485   
6486         runpath="" runpath_dirs=""
6487   if test -n "$LD_RUN_PATH"; then
6488     runpath="$LD_RUN_PATH"
6489   elif test "$GCC" = "yes"; then
6490         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6491     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6492     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6493     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6494       case "$arg" in P,* | -L* | -R* )
6495         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6496           {
6497 xe_runpath_dir="$dir"
6498   test "$xe_runpath_dir" != "/lib"     -a \
6499         "$xe_runpath_dir" != "/usr/lib" -a \
6500         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6501   eval "$xe_add_unique_runpath_dir"
6502 }
6503         done ;;
6504       esac
6505     done
6506     ld_switch_run="$ld_switch_run_save"
6507     rm -f conftest*
6508   else
6509         for arg in $ld_switch_site $ld_switch_x_site; do
6510       case "$arg" in -L*) {
6511 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6512   test "$xe_runpath_dir" != "/lib"     -a \
6513         "$xe_runpath_dir" != "/usr/lib" -a \
6514         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6515   eval "$xe_add_unique_runpath_dir"
6516 };; esac
6517     done
6518             if test "$opsys $need_motif" = "sol2 yes"; then
6519       xe_runpath_dir="/opt/SUNWdt/lib";
6520       eval "$xe_add_unique_runpath_dir";
6521     fi
6522   fi 
6523   if test -n "$runpath"; then
6524     ld_switch_run="${dash_r}${runpath}"
6525     
6526 if test "$GCC" = "yes"; then
6527   set x $ld_switch_run; shift; ld_switch_run=""
6528   while test -n "$1"; do
6529     case $1 in
6530       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6531       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6532       -Xlinker* ) ;;
6533       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6534     esac
6535     shift
6536   done
6537 fi
6538     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6539   fi
6540 fi
6541
6542
6543   if test "$extra_verbose" = "yes"; then
6544     echo; echo "X11 compilation variables:"
6545     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6546     echo
6547   fi
6548
6549             bitmapdirs=
6550   if test "$x_includes" != NONE; then
6551     for i in $x_includes; do
6552       if test -d "$i/bitmaps"; then
6553         bitmapdirs="$i/bitmaps:$bitmapdirs"
6554       fi
6555       if test -d "$i/X11/bitmaps"; then
6556         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6557       fi
6558     done
6559     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6560   fi
6561   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6562     Defining BITMAPDIR = "$bitmapdirs"
6563 EOF
6564 cat >> confdefs.h <<EOF
6565 #define BITMAPDIR "$bitmapdirs"
6566 EOF
6567 }
6568
6569
6570     echo "checking for X defines extracted by xmkmf" 1>&6
6571 echo "configure:6572: checking for X defines extracted by xmkmf" >&5
6572   rm -fr conftestdir
6573   if mkdir conftestdir; then
6574     cd conftestdir
6575     cat > Imakefile <<'EOF'
6576 xetest:
6577         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6578 EOF
6579     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6580       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6581       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6582     fi
6583     cd ..
6584     rm -fr conftestdir
6585     for word in $xmkmf_defines; do
6586       case "$word" in 
6587       -D__STDC__*) ;;
6588       -D* )
6589         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6590         case "$word" in
6591           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6592           *     ) val=1 ;;
6593         esac
6594         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6595           if test "$val" = "1"
6596             then { test "$extra_verbose" = "yes" && cat << EOF
6597     Defining $sym
6598 EOF
6599 cat >> confdefs.h <<EOF
6600 #define $sym 1
6601 EOF
6602 }
6603
6604             else { test "$extra_verbose" = "yes" && cat << EOF
6605     Defining $sym = $val
6606 EOF
6607 cat >> confdefs.h <<EOF
6608 #define $sym $val
6609 EOF
6610 }
6611
6612           fi
6613         fi  ;;
6614       esac
6615     done
6616   fi
6617
6618     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6619 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6620 echo "configure:6621: checking for X11/Intrinsic.h" >&5
6621
6622 cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 #include <X11/Intrinsic.h>
6626 EOF
6627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6628 { (eval echo configure:6629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6630 if test -z "$ac_err"; then
6631   rm -rf conftest*
6632   eval "ac_cv_header_$ac_safe=yes"
6633 else
6634   echo "$ac_err" >&5
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   eval "ac_cv_header_$ac_safe=no"
6639 fi
6640 rm -f conftest*
6641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6642   echo "$ac_t""yes" 1>&6
6643   :
6644 else
6645   echo "$ac_t""no" 1>&6
6646 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6647 fi
6648
6649
6650       
6651 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6652 echo "configure:6653: checking for XOpenDisplay in -lX11" >&5
6653 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6654
6655 xe_check_libs=" -lX11 "
6656 cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 /* Override any gcc2 internal prototype to avoid an error.  */
6660 /* We use char because int might match the return type of a gcc2
6661     builtin and then its argument prototype would still apply.  */
6662 char XOpenDisplay();
6663
6664 int main() {
6665 XOpenDisplay()
6666 ; return 0; }
6667 EOF
6668 if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6669   rm -rf conftest*
6670   eval "ac_cv_lib_$ac_lib_var=yes"
6671 else
6672   echo "configure: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=no"
6676 fi
6677 rm -f conftest*
6678 xe_check_libs=""
6679
6680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6681   echo "$ac_t""yes" 1>&6
6682   have_lib_x11=yes
6683 else
6684   echo "$ac_t""no" 1>&6
6685 fi
6686
6687
6688   if test "$have_lib_x11" != "yes"; then
6689     
6690 xe_msg_checking="for XGetFontProperty in -lX11"
6691 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6692 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6693 echo "configure:6694: checking "$xe_msg_checking"" >&5
6694 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6695
6696 xe_check_libs=" -lX11 -b i486-linuxaout"
6697 cat > conftest.$ac_ext <<EOF
6698 #line 6699 "configure"
6699 #include "confdefs.h"
6700 /* Override any gcc2 internal prototype to avoid an error.  */
6701 /* We use char because int might match the return type of a gcc2
6702     builtin and then its argument prototype would still apply.  */
6703 char XGetFontProperty();
6704
6705 int main() {
6706 XGetFontProperty()
6707 ; return 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6710   rm -rf conftest*
6711   eval "ac_cv_lib_$ac_lib_var=yes"
6712 else
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -rf conftest*
6716   eval "ac_cv_lib_$ac_lib_var=no"
6717 fi
6718 rm -f conftest*
6719 xe_check_libs=""
6720
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6722   echo "$ac_t""yes" 1>&6
6723   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6724 else
6725   echo "$ac_t""no" 1>&6
6726 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6727 fi
6728
6729
6730   fi
6731   libs_x="-lX11"
6732   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6733
6734     
6735 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6736 echo "configure:6737: checking for XShapeSelectInput in -lXext" >&5
6737 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6738
6739 xe_check_libs=" -lXext "
6740 cat > conftest.$ac_ext <<EOF
6741 #line 6742 "configure"
6742 #include "confdefs.h"
6743 /* Override any gcc2 internal prototype to avoid an error.  */
6744 /* We use char because int might match the return type of a gcc2
6745     builtin and then its argument prototype would still apply.  */
6746 char XShapeSelectInput();
6747
6748 int main() {
6749 XShapeSelectInput()
6750 ; return 0; }
6751 EOF
6752 if { (eval echo configure:6753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6753   rm -rf conftest*
6754   eval "ac_cv_lib_$ac_lib_var=yes"
6755 else
6756   echo "configure: failed program was:" >&5
6757   cat conftest.$ac_ext >&5
6758   rm -rf conftest*
6759   eval "ac_cv_lib_$ac_lib_var=no"
6760 fi
6761 rm -f conftest*
6762 xe_check_libs=""
6763
6764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6765   echo "$ac_t""yes" 1>&6
6766   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6767 else
6768   echo "$ac_t""no" 1>&6
6769 fi
6770
6771
6772
6773     
6774 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6775 echo "configure:6776: checking for XtOpenDisplay in -lXt" >&5
6776 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6777
6778 xe_check_libs=" -lXt "
6779 cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782 /* Override any gcc2 internal prototype to avoid an error.  */
6783 /* We use char because int might match the return type of a gcc2
6784     builtin and then its argument prototype would still apply.  */
6785 char XtOpenDisplay();
6786
6787 int main() {
6788 XtOpenDisplay()
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_lib_$ac_lib_var=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_lib_$ac_lib_var=no"
6799 fi
6800 rm -f conftest*
6801 xe_check_libs=""
6802
6803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6804   echo "$ac_t""yes" 1>&6
6805   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6806 else
6807   echo "$ac_t""no" 1>&6
6808 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6809 fi
6810
6811
6812
6813   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6814 echo "configure:6815: checking the version of X11 being used" >&5
6815   cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6818 #include <X11/Intrinsic.h>
6819     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6822 then
6823   ./conftest foobar; x11_release=$?
6824 else
6825   conftest_rc="$?"
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -fr conftest*
6829   x11_release=4
6830 fi
6831 rm -fr conftest*
6832   echo "$ac_t""R${x11_release}" 1>&6
6833   { test "$extra_verbose" = "yes" && cat << EOF
6834     Defining THIS_IS_X11R${x11_release}
6835 EOF
6836 cat >> confdefs.h <<EOF
6837 #define THIS_IS_X11R${x11_release} 1
6838 EOF
6839 }
6840
6841
6842   if test "${x11_release}" = "4"; then
6843     case "$with_widgets" in
6844       "" | "no") with_widgets=no ;;
6845       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6846     esac
6847   fi
6848
6849   for ac_func in XConvertCase XtRegisterDrawable
6850 do
6851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6852 echo "configure:6853: checking for $ac_func" >&5
6853
6854 cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 /* System header to define __stub macros and hopefully few prototypes,
6858     which can conflict with char $ac_func(); below.  */
6859 #include <assert.h>
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char $ac_func();
6864
6865 int main() {
6866
6867 /* The GNU C library defines this for functions which it implements
6868     to always fail with ENOSYS.  Some functions are actually named
6869     something starting with __ and the normal name is an alias.  */
6870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6871 choke me
6872 #else
6873 $ac_func();
6874 #endif
6875
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879   rm -rf conftest*
6880   eval "ac_cv_func_$ac_func=yes"
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   eval "ac_cv_func_$ac_func=no"
6886 fi
6887 rm -f conftest*
6888
6889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6890   echo "$ac_t""yes" 1>&6
6891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6892   { test "$extra_verbose" = "yes" && cat << EOF
6893     Defining $ac_tr_func
6894 EOF
6895 cat >> confdefs.h <<EOF
6896 #define $ac_tr_func 1
6897 EOF
6898 }
6899  
6900 else
6901   echo "$ac_t""no" 1>&6
6902 fi
6903 done
6904
6905
6906   for ac_hdr in X11/Xlocale.h
6907 do
6908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6910 echo "configure:6911: checking for $ac_hdr" >&5
6911
6912 cat > conftest.$ac_ext <<EOF
6913 #line 6914 "configure"
6914 #include "confdefs.h"
6915 #include <$ac_hdr>
6916 EOF
6917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6918 { (eval echo configure:6919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6920 if test -z "$ac_err"; then
6921   rm -rf conftest*
6922   eval "ac_cv_header_$ac_safe=yes"
6923 else
6924   echo "$ac_err" >&5
6925   echo "configure: failed program was:" >&5
6926   cat conftest.$ac_ext >&5
6927   rm -rf conftest*
6928   eval "ac_cv_header_$ac_safe=no"
6929 fi
6930 rm -f conftest*
6931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6932   echo "$ac_t""yes" 1>&6
6933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6934   { test "$extra_verbose" = "yes" && cat << EOF
6935     Defining $ac_tr_hdr
6936 EOF
6937 cat >> confdefs.h <<EOF
6938 #define $ac_tr_hdr 1
6939 EOF
6940 }
6941  
6942 else
6943   echo "$ac_t""no" 1>&6
6944 fi
6945 done
6946
6947
6948     for ac_func in XRegisterIMInstantiateCallback
6949 do
6950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6951 echo "configure:6952: checking for $ac_func" >&5
6952
6953 cat > conftest.$ac_ext <<EOF
6954 #line 6955 "configure"
6955 #include "confdefs.h"
6956 /* System header to define __stub macros and hopefully few prototypes,
6957     which can conflict with char $ac_func(); below.  */
6958 #include <assert.h>
6959 /* Override any gcc2 internal prototype to avoid an error.  */
6960 /* We use char because int might match the return type of a gcc2
6961     builtin and then its argument prototype would still apply.  */
6962 char $ac_func();
6963
6964 int main() {
6965
6966 /* The GNU C library defines this for functions which it implements
6967     to always fail with ENOSYS.  Some functions are actually named
6968     something starting with __ and the normal name is an alias.  */
6969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6970 choke me
6971 #else
6972 $ac_func();
6973 #endif
6974
6975 ; return 0; }
6976 EOF
6977 if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6978   rm -rf conftest*
6979   eval "ac_cv_func_$ac_func=yes"
6980 else
6981   echo "configure: failed program was:" >&5
6982   cat conftest.$ac_ext >&5
6983   rm -rf conftest*
6984   eval "ac_cv_func_$ac_func=no"
6985 fi
6986 rm -f conftest*
6987
6988 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6989   echo "$ac_t""yes" 1>&6
6990     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6991   { test "$extra_verbose" = "yes" && cat << EOF
6992     Defining $ac_tr_func
6993 EOF
6994 cat >> confdefs.h <<EOF
6995 #define $ac_tr_func 1
6996 EOF
6997 }
6998  
6999 else
7000   echo "$ac_t""no" 1>&6
7001 fi
7002 done
7003
7004   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
7005 echo "configure:7006: checking for standard XRegisterIMInstantiateCallback prototype" >&5
7006   cat > conftest.$ac_ext <<EOF
7007 #line 7008 "configure"
7008 #include "confdefs.h"
7009
7010 #define NeedFunctionPrototypes 1
7011 #include <X11/Xlib.h>
7012 extern Bool XRegisterIMInstantiateCallback(
7013    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
7014
7015 int main() {
7016
7017 ; return 0; }
7018 EOF
7019 if { (eval echo configure:7020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7020   rm -rf conftest*
7021   echo "$ac_t""yes" 1>&6
7022 else
7023   echo "configure: failed program was:" >&5
7024   cat conftest.$ac_ext >&5
7025   rm -rf conftest*
7026   echo "$ac_t""no" 1>&6
7027    { test "$extra_verbose" = "yes" && cat << \EOF
7028     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
7029 EOF
7030 cat >> confdefs.h <<\EOF
7031 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
7032 EOF
7033 }
7034
7035 fi
7036 rm -f conftest*
7037
7038     test -z "$with_xmu" && { 
7039 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
7040 echo "configure:7041: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
7041 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
7042
7043 xe_check_libs=" -lXmu "
7044 cat > conftest.$ac_ext <<EOF
7045 #line 7046 "configure"
7046 #include "confdefs.h"
7047 /* Override any gcc2 internal prototype to avoid an error.  */
7048 /* We use char because int might match the return type of a gcc2
7049     builtin and then its argument prototype would still apply.  */
7050 char XmuReadBitmapDataFromFile();
7051
7052 int main() {
7053 XmuReadBitmapDataFromFile()
7054 ; return 0; }
7055 EOF
7056 if { (eval echo configure:7057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7057   rm -rf conftest*
7058   eval "ac_cv_lib_$ac_lib_var=yes"
7059 else
7060   echo "configure: failed program was:" >&5
7061   cat conftest.$ac_ext >&5
7062   rm -rf conftest*
7063   eval "ac_cv_lib_$ac_lib_var=no"
7064 fi
7065 rm -f conftest*
7066 xe_check_libs=""
7067
7068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7069   echo "$ac_t""yes" 1>&6
7070   with_xmu=yes
7071 else
7072   echo "$ac_t""no" 1>&6
7073 with_xmu=no
7074 fi
7075
7076  }
7077   if test "$with_xmu" = "no"; then
7078     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
7079    echo "    xemacs will be linked with \"xmu.o\""
7080  fi
7081   else
7082     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
7083     { test "$extra_verbose" = "yes" && cat << \EOF
7084     Defining HAVE_XMU
7085 EOF
7086 cat >> confdefs.h <<\EOF
7087 #define HAVE_XMU 1
7088 EOF
7089 }
7090
7091   fi
7092
7093       
7094 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7095 echo "configure:7096: checking for main in -lXbsd" >&5
7096 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
7097
7098 xe_check_libs=" -lXbsd "
7099 cat > conftest.$ac_ext <<EOF
7100 #line 7101 "configure"
7101 #include "confdefs.h"
7102
7103 int main() {
7104 main()
7105 ; return 0; }
7106 EOF
7107 if { (eval echo configure:7108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7108   rm -rf conftest*
7109   eval "ac_cv_lib_$ac_lib_var=yes"
7110 else
7111   echo "configure: failed program was:" >&5
7112   cat conftest.$ac_ext >&5
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=no"
7115 fi
7116 rm -f conftest*
7117 xe_check_libs=""
7118
7119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7120   echo "$ac_t""yes" 1>&6
7121   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7122 else
7123   echo "$ac_t""no" 1>&6
7124 fi
7125
7126
7127
7128     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7129         if test "$GCC" = "yes"; then
7130                   echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6
7131 echo "configure:7132: checking for name of AIX gcc threads option" >&5
7132       case `$CC -v --help 2>&1` in
7133         *-mthreads*) aix_threads=-mthreads ;;
7134                   *) aix_threads=-pthread  ;;
7135       esac
7136       echo "$ac_t""$aix_threads" 1>&6
7137       X_CFLAGS="$aix_threads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$X_CFLAGS"; fi
7138       libs_x="$aix_threads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$aix_threads\" to \$libs_x"; fi
7139     else
7140             case "$CC" in *_r) : ;;
7141         *)
7142          xe_save_CC="$CC"
7143          CC="${CC}_r"
7144          echo $ac_n "checking size of short""... $ac_c" 1>&6
7145 echo "configure:7146: checking size of short" >&5
7146
7147 cat > conftest.$ac_ext <<EOF
7148 #line 7149 "configure"
7149 #include "confdefs.h"
7150 #include <stdio.h>
7151 main()
7152 {
7153   FILE *f=fopen("conftestval", "w");
7154   if (!f) exit(1);
7155   fprintf(f, "%d\n", sizeof(short));
7156   exit(0);
7157 }
7158 EOF
7159 if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7160 then
7161   ac_cv_sizeof_short=`cat conftestval`
7162 else
7163   conftest_rc="$?"
7164   echo "configure: failed program was:" >&5
7165   cat conftest.$ac_ext >&5
7166   rm -fr conftest*
7167   ac_cv_sizeof_short=0
7168 fi
7169 rm -fr conftest*
7170 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7171 { test "$extra_verbose" = "yes" && cat << EOF
7172     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
7173 EOF
7174 cat >> confdefs.h <<EOF
7175 #define SIZEOF_SHORT $ac_cv_sizeof_short
7176 EOF
7177 }
7178
7179
7180          test "$ac_cv_sizeof_short" = 0 && CC="$xe_save_CC" ;;
7181       esac
7182     fi
7183   fi
7184
7185 fi 
7186 if test "$with_msw" != "no"; then
7187   echo "checking for MS-Windows" 1>&6
7188 echo "configure:7189: checking for MS-Windows" >&5
7189   
7190 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7191 echo "configure:7192: checking for main in -lgdi32" >&5
7192 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7193
7194 xe_check_libs=" -lgdi32 "
7195 cat > conftest.$ac_ext <<EOF
7196 #line 7197 "configure"
7197 #include "confdefs.h"
7198
7199 int main() {
7200 main()
7201 ; return 0; }
7202 EOF
7203 if { (eval echo configure:7204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7204   rm -rf conftest*
7205   eval "ac_cv_lib_$ac_lib_var=yes"
7206 else
7207   echo "configure: failed program was:" >&5
7208   cat conftest.$ac_ext >&5
7209   rm -rf conftest*
7210   eval "ac_cv_lib_$ac_lib_var=no"
7211 fi
7212 rm -f conftest*
7213 xe_check_libs=""
7214
7215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7216   echo "$ac_t""yes" 1>&6
7217   with_msw=yes
7218 else
7219   echo "$ac_t""no" 1>&6
7220 fi
7221
7222
7223   if test "$with_msw" = "yes"; then
7224     { test "$extra_verbose" = "yes" && cat << \EOF
7225     Defining HAVE_MS_WINDOWS
7226 EOF
7227 cat >> confdefs.h <<\EOF
7228 #define HAVE_MS_WINDOWS 1
7229 EOF
7230 }
7231
7232
7233         if test "$with_netinstall" = "yes"; then
7234       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7235       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7236       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7237     fi
7238
7239     install_pp="$srcdir/lib-src/installexe.sh"
7240     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lkernel32 -lwinspool\" to \$libs_system"; fi
7241     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7242     if test "$window_system" != x11; then
7243         window_system=msw
7244         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7245             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7246    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7247  fi
7248         test "$with_menubars"   != "no" && with_menubars=msw \
7249             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7250    echo "    xemacs will be linked with \"menubar-msw.o\""
7251  fi
7252         test "$with_toolbars"   != "no" && with_toolbars=msw \
7253             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7254    echo "    xemacs will be linked with \"toolbar-msw.o\""
7255  fi
7256         test "$with_dialogs"   != "no" && with_dialogs=msw \
7257             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7258    echo "    xemacs will be linked with \"dialog-msw.o\""
7259  fi
7260         test "$with_widgets"   != "no" && with_widgets=msw
7261     else
7262         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7263    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7264  fi
7265         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7266    echo "    xemacs will be linked with \"menubar-msw.o\""
7267  fi
7268         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7269    echo "    xemacs will be linked with \"toolbar-msw.o\""
7270  fi
7271         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7272    echo "    xemacs will be linked with \"dialog-msw.o\""
7273  fi
7274     fi
7275         cat > conftest.$ac_ext <<EOF
7276 #line 7277 "configure"
7277 #include "confdefs.h"
7278 #include <fcntl.h>
7279     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7280 EOF
7281 if { (eval echo configure:7282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7282 then
7283   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7284     Defining HAVE_MSG_SELECT
7285 EOF
7286 cat >> confdefs.h <<\EOF
7287 #define HAVE_MSG_SELECT 1
7288 EOF
7289 }
7290
7291 else
7292   conftest_rc="$?"
7293   echo "configure: failed program was:" >&5
7294   cat conftest.$ac_ext >&5
7295 fi
7296 rm -fr conftest*
7297     with_file_coding=yes
7298     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
7299    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\""
7300  fi
7301   fi
7302 fi
7303
7304
7305
7306 test -z "$window_system" && window_system="none"
7307
7308 if test "$window_system" = "none"; then
7309   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7310   do
7311     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7312        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7313     fi
7314     eval "with_${feature}=no"
7315   done
7316 else
7317   test -z "$with_toolbars" && with_toolbars=yes
7318 fi
7319
7320 if test "$with_msw" != "yes"; then
7321   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7322   do
7323     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7324        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7325     fi
7326     eval "with_${feature}=no"
7327   done
7328 else
7329   :
7330 fi
7331
7332 if test "$with_x11" != "yes"; then
7333             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7334   do
7335     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7336        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7337     fi
7338     eval "with_${feature}=no"
7339   done
7340 fi
7341
7342 if test "$with_x11" = "yes"; then
7343   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7344 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7345 echo "configure:7346: checking for X11/extensions/shape.h" >&5
7346
7347 cat > conftest.$ac_ext <<EOF
7348 #line 7349 "configure"
7349 #include "confdefs.h"
7350 #include <X11/extensions/shape.h>
7351 EOF
7352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7353 { (eval echo configure:7354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7355 if test -z "$ac_err"; then
7356   rm -rf conftest*
7357   eval "ac_cv_header_$ac_safe=yes"
7358 else
7359   echo "$ac_err" >&5
7360   echo "configure: failed program was:" >&5
7361   cat conftest.$ac_ext >&5
7362   rm -rf conftest*
7363   eval "ac_cv_header_$ac_safe=no"
7364 fi
7365 rm -f conftest*
7366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7367   echo "$ac_t""yes" 1>&6
7368   
7369    { test "$extra_verbose" = "yes" && cat << \EOF
7370     Defining HAVE_BALLOON_HELP
7371 EOF
7372 cat >> confdefs.h <<\EOF
7373 #define HAVE_BALLOON_HELP 1
7374 EOF
7375 }
7376
7377    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7378    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7379  fi
7380 else
7381   echo "$ac_t""no" 1>&6
7382 fi
7383
7384 fi
7385
7386 bitmapdir=
7387
7388 case "$window_system" in
7389   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7390   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7391   gtk  )
7392        HAVE_X_WINDOWS=no
7393        test "$with_gnome" = "yes" && echo "  Using GNOME."
7394        test "$with_gnome" = "no" && echo "  Using GTK."
7395        ;;
7396   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7397 esac
7398
7399 case "$x_libraries" in *X11R4* )
7400   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7401   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7402 esac
7403
7404 echo "checking for WM_COMMAND option" 1>&6
7405 echo "configure:7406: checking for WM_COMMAND option" >&5;
7406 if test "$with_wmcommand" != "no"; then
7407   { test "$extra_verbose" = "yes" && cat << \EOF
7408     Defining HAVE_WMCOMMAND
7409 EOF
7410 cat >> confdefs.h <<\EOF
7411 #define HAVE_WMCOMMAND 1
7412 EOF
7413 }
7414
7415 fi
7416
7417 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7418 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7419 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7420 echo "configure:7421: checking for X11/Xauth.h" >&5
7421
7422 cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425 #include <X11/Xauth.h>
7426 EOF
7427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7428 { (eval echo configure:7429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7430 if test -z "$ac_err"; then
7431   rm -rf conftest*
7432   eval "ac_cv_header_$ac_safe=yes"
7433 else
7434   echo "$ac_err" >&5
7435   echo "configure: failed program was:" >&5
7436   cat conftest.$ac_ext >&5
7437   rm -rf conftest*
7438   eval "ac_cv_header_$ac_safe=no"
7439 fi
7440 rm -f conftest*
7441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7442   echo "$ac_t""yes" 1>&6
7443   :
7444 else
7445   echo "$ac_t""no" 1>&6
7446 with_xauth=no
7447 fi
7448  }
7449 test -z "$with_xauth" && { 
7450 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7451 echo "configure:7452: checking for XauGetAuthByAddr in -lXau" >&5
7452 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7453
7454 xe_check_libs=" -lXau "
7455 cat > conftest.$ac_ext <<EOF
7456 #line 7457 "configure"
7457 #include "confdefs.h"
7458 /* Override any gcc2 internal prototype to avoid an error.  */
7459 /* We use char because int might match the return type of a gcc2
7460     builtin and then its argument prototype would still apply.  */
7461 char XauGetAuthByAddr();
7462
7463 int main() {
7464 XauGetAuthByAddr()
7465 ; return 0; }
7466 EOF
7467 if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7468   rm -rf conftest*
7469   eval "ac_cv_lib_$ac_lib_var=yes"
7470 else
7471   echo "configure: failed program was:" >&5
7472   cat conftest.$ac_ext >&5
7473   rm -rf conftest*
7474   eval "ac_cv_lib_$ac_lib_var=no"
7475 fi
7476 rm -f conftest*
7477 xe_check_libs=""
7478
7479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7480   echo "$ac_t""yes" 1>&6
7481   :
7482 else
7483   echo "$ac_t""no" 1>&6
7484 with_xauth=no
7485 fi
7486
7487  }
7488 test -z "$with_xauth" && with_xauth=yes
7489 if test "$with_xauth" = "yes"; then
7490   { test "$extra_verbose" = "yes" && cat << \EOF
7491     Defining HAVE_XAUTH
7492 EOF
7493 cat >> confdefs.h <<\EOF
7494 #define HAVE_XAUTH 1
7495 EOF
7496 }
7497
7498   
7499 T=""
7500 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
7501 libs_xauth="$T"
7502
7503 fi
7504
7505
7506
7507
7508 if test "$with_tooltalk" != "no" ; then
7509       for dir in "" "Tt/" "desktop/" ; do
7510     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7511 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7512 echo "configure:7513: checking for ${dir}tt_c.h" >&5
7513
7514 cat > conftest.$ac_ext <<EOF
7515 #line 7516 "configure"
7516 #include "confdefs.h"
7517 #include <${dir}tt_c.h>
7518 EOF
7519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7520 { (eval echo configure:7521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7522 if test -z "$ac_err"; then
7523   rm -rf conftest*
7524   eval "ac_cv_header_$ac_safe=yes"
7525 else
7526   echo "$ac_err" >&5
7527   echo "configure: failed program was:" >&5
7528   cat conftest.$ac_ext >&5
7529   rm -rf conftest*
7530   eval "ac_cv_header_$ac_safe=no"
7531 fi
7532 rm -f conftest*
7533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7534   echo "$ac_t""yes" 1>&6
7535   tt_c_h_file="${dir}tt_c.h"; break
7536 else
7537   echo "$ac_t""no" 1>&6
7538 fi
7539
7540   done
7541   if test -z "$tt_c_h_file"; then
7542     if test "$with_tooltalk" = "yes"; then
7543       (echo "$progname: Usage error:"
7544 echo " " "Unable to find required tooltalk header files."
7545 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7546     fi
7547     with_tooltalk=no
7548   fi
7549 fi
7550 if test "$with_tooltalk" != "no" ; then
7551   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7552     
7553 xe_msg_checking="for tt_message_create in -ltt"
7554 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7555 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7556 echo "configure:7557: checking "$xe_msg_checking"" >&5
7557 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7558
7559 xe_check_libs=" -ltt $extra_libs"
7560 cat > conftest.$ac_ext <<EOF
7561 #line 7562 "configure"
7562 #include "confdefs.h"
7563 /* Override any gcc2 internal prototype to avoid an error.  */
7564 /* We use char because int might match the return type of a gcc2
7565     builtin and then its argument prototype would still apply.  */
7566 char tt_message_create();
7567
7568 int main() {
7569 tt_message_create()
7570 ; return 0; }
7571 EOF
7572 if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7573   rm -rf conftest*
7574   eval "ac_cv_lib_$ac_lib_var=yes"
7575 else
7576   echo "configure: failed program was:" >&5
7577   cat conftest.$ac_ext >&5
7578   rm -rf conftest*
7579   eval "ac_cv_lib_$ac_lib_var=no"
7580 fi
7581 rm -f conftest*
7582 xe_check_libs=""
7583
7584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7585   echo "$ac_t""yes" 1>&6
7586   tt_libs="-ltt $extra_libs"; break
7587 else
7588   echo "$ac_t""no" 1>&6
7589 :
7590 fi
7591
7592
7593   done
7594   if test -z "$tt_libs"; then
7595     if test "$with_tooltalk" = "yes"; then
7596       (echo "$progname: Usage error:"
7597 echo " " "Unable to find required tooltalk libraries."
7598 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7599     fi
7600     with_tooltalk=no
7601   fi
7602 fi
7603 test -z "$with_tooltalk" && with_tooltalk=yes
7604 if test "$with_tooltalk" = "yes"; then
7605   { test "$extra_verbose" = "yes" && cat << \EOF
7606     Defining TOOLTALK
7607 EOF
7608 cat >> confdefs.h <<\EOF
7609 #define TOOLTALK 1
7610 EOF
7611 }
7612
7613   { test "$extra_verbose" = "yes" && cat << EOF
7614     Defining TT_C_H_FILE = "$tt_c_h_file"
7615 EOF
7616 cat >> confdefs.h <<EOF
7617 #define TT_C_H_FILE "$tt_c_h_file"
7618 EOF
7619 }
7620
7621   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7622   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7623    echo "    xemacs will be linked with \"tooltalk.o\""
7624  fi
7625 fi
7626
7627 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7628 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7629 echo "configure:7630: checking for Dt/Dt.h" >&5
7630
7631 cat > conftest.$ac_ext <<EOF
7632 #line 7633 "configure"
7633 #include "confdefs.h"
7634 #include <Dt/Dt.h>
7635 EOF
7636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7637 { (eval echo configure:7638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7639 if test -z "$ac_err"; then
7640   rm -rf conftest*
7641   eval "ac_cv_header_$ac_safe=yes"
7642 else
7643   echo "$ac_err" >&5
7644   echo "configure: failed program was:" >&5
7645   cat conftest.$ac_ext >&5
7646   rm -rf conftest*
7647   eval "ac_cv_header_$ac_safe=no"
7648 fi
7649 rm -f conftest*
7650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7651   echo "$ac_t""yes" 1>&6
7652   :
7653 else
7654   echo "$ac_t""no" 1>&6
7655 with_cde=no
7656 fi
7657  }
7658 test -z "$with_cde" && { 
7659 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7660 echo "configure:7661: checking for DtDndDragStart in -lDtSvc" >&5
7661 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7662
7663 xe_check_libs=" -lDtSvc "
7664 cat > conftest.$ac_ext <<EOF
7665 #line 7666 "configure"
7666 #include "confdefs.h"
7667 /* Override any gcc2 internal prototype to avoid an error.  */
7668 /* We use char because int might match the return type of a gcc2
7669     builtin and then its argument prototype would still apply.  */
7670 char DtDndDragStart();
7671
7672 int main() {
7673 DtDndDragStart()
7674 ; return 0; }
7675 EOF
7676 if { (eval echo configure:7677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7677   rm -rf conftest*
7678   eval "ac_cv_lib_$ac_lib_var=yes"
7679 else
7680   echo "configure: failed program was:" >&5
7681   cat conftest.$ac_ext >&5
7682   rm -rf conftest*
7683   eval "ac_cv_lib_$ac_lib_var=no"
7684 fi
7685 rm -f conftest*
7686 xe_check_libs=""
7687
7688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7689   echo "$ac_t""yes" 1>&6
7690   :
7691 else
7692   echo "$ac_t""no" 1>&6
7693 with_cde=no
7694 fi
7695
7696  }
7697 test -z "$with_cde" && with_cde=yes
7698 if test "$with_dragndrop" = no; then
7699   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7700   with_cde=no
7701 fi
7702 if test "$with_cde" = "yes" ; then
7703   { test "$extra_verbose" = "yes" && cat << \EOF
7704     Defining HAVE_CDE
7705 EOF
7706 cat >> confdefs.h <<\EOF
7707 #define HAVE_CDE 1
7708 EOF
7709 }
7710
7711   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7712   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7713   with_tooltalk=yes # CDE requires Tooltalk
7714   need_motif=yes    # CDE requires Motif
7715 fi
7716
7717 test "$window_system" != "x11" && with_offix=no
7718 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7719   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7720   with_offix=no
7721 fi
7722 if test "$with_dragndrop" = no; then
7723   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7724   with_offix=no
7725 fi
7726 if test "$with_cde" = yes; then
7727   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7728   with_offix=no
7729 fi
7730 test -z "$with_offix" && with_offix=no
7731 if test "$with_offix" = "yes"; then
7732   { test "$extra_verbose" = "yes" && cat << \EOF
7733     Defining HAVE_OFFIX_DND
7734 EOF
7735 cat >> confdefs.h <<\EOF
7736 #define HAVE_OFFIX_DND 1
7737 EOF
7738 }
7739
7740   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7741   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7742 fi
7743 if test "$with_gtk" = "yes"; then
7744    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7745 fi
7746
7747 if test "$with_dragndrop" != "no" ; then
7748   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7749 echo "configure:7750: checking if drag and drop API is needed" >&5
7750   if test -n "$dragndrop_proto" ; then
7751     with_dragndrop=yes
7752     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7753     { test "$extra_verbose" = "yes" && cat << \EOF
7754     Defining HAVE_DRAGNDROP
7755 EOF
7756 cat >> confdefs.h <<\EOF
7757 #define HAVE_DRAGNDROP 1
7758 EOF
7759 }
7760
7761     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7762   else
7763     with_dragndrop=no
7764     echo "$ac_t""no" 1>&6
7765   fi
7766 fi
7767
7768 echo "checking for LDAP" 1>&6
7769 echo "configure:7770: checking for LDAP" >&5
7770 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7771 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7772 echo "configure:7773: checking for ldap.h" >&5
7773
7774 cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777 #include <ldap.h>
7778 EOF
7779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7780 { (eval echo configure:7781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7782 if test -z "$ac_err"; then
7783   rm -rf conftest*
7784   eval "ac_cv_header_$ac_safe=yes"
7785 else
7786   echo "$ac_err" >&5
7787   echo "configure: failed program was:" >&5
7788   cat conftest.$ac_ext >&5
7789   rm -rf conftest*
7790   eval "ac_cv_header_$ac_safe=no"
7791 fi
7792 rm -f conftest*
7793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7794   echo "$ac_t""yes" 1>&6
7795   :
7796 else
7797   echo "$ac_t""no" 1>&6
7798 with_ldap=no
7799 fi
7800  }
7801 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7802 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7803 echo "configure:7804: checking for lber.h" >&5
7804
7805 cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 #include <lber.h>
7809 EOF
7810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7811 { (eval echo configure:7812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7813 if test -z "$ac_err"; then
7814   rm -rf conftest*
7815   eval "ac_cv_header_$ac_safe=yes"
7816 else
7817   echo "$ac_err" >&5
7818   echo "configure: failed program was:" >&5
7819   cat conftest.$ac_ext >&5
7820   rm -rf conftest*
7821   eval "ac_cv_header_$ac_safe=no"
7822 fi
7823 rm -f conftest*
7824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7825   echo "$ac_t""yes" 1>&6
7826   :
7827 else
7828   echo "$ac_t""no" 1>&6
7829 with_ldap=no
7830 fi
7831  }
7832 if test no != "$with_ldap";then
7833   if test . != "${ldap_libs+.}";then
7834     ldap_libs=
7835     echo $ac_n "checking for ldap_open""... $ac_c" 1>&6
7836 echo "configure:7837: checking for ldap_open" >&5
7837
7838 cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* System header to define __stub macros and hopefully few prototypes,
7842     which can conflict with char ldap_open(); below.  */
7843 #include <assert.h>
7844 /* Override any gcc2 internal prototype to avoid an error.  */
7845 /* We use char because int might match the return type of a gcc2
7846     builtin and then its argument prototype would still apply.  */
7847 char ldap_open();
7848
7849 int main() {
7850
7851 /* The GNU C library defines this for functions which it implements
7852     to always fail with ENOSYS.  Some functions are actually named
7853     something starting with __ and the normal name is an alias.  */
7854 #if defined (__stub_ldap_open) || defined (__stub___ldap_open)
7855 choke me
7856 #else
7857 ldap_open();
7858 #endif
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   eval "ac_cv_func_ldap_open=yes"
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   eval "ac_cv_func_ldap_open=no"
7870 fi
7871 rm -f conftest*
7872
7873 if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then
7874   echo "$ac_t""yes" 1>&6
7875         with_ldap=yes
7876       test yes = "$extra_verbose" &&
7877         echo "Setting ldap_libs to $ldap_libs"
7878 else
7879   echo "$ac_t""no" 1>&6
7880       
7881 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
7882 echo "configure:7883: checking for ldap_open in -lldap" >&5
7883 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7884
7885 xe_check_libs=" -lldap "
7886 cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 /* Override any gcc2 internal prototype to avoid an error.  */
7890 /* We use char because int might match the return type of a gcc2
7891     builtin and then its argument prototype would still apply.  */
7892 char ldap_open();
7893
7894 int main() {
7895 ldap_open()
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7899   rm -rf conftest*
7900   eval "ac_cv_lib_$ac_lib_var=yes"
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   eval "ac_cv_lib_$ac_lib_var=no"
7906 fi
7907 rm -f conftest*
7908 xe_check_libs=""
7909
7910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7911   echo "$ac_t""yes" 1>&6
7912   with_ldap=yes
7913 else
7914   echo "$ac_t""no" 1>&6
7915 ldap_needs_lber=yes ldap_other_libs=-llber
7916         
7917 xe_msg_checking="for ldap_open in -lldap"
7918 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7919 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7920 echo "configure:7921: checking "$xe_msg_checking"" >&5
7921 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7922
7923 xe_check_libs=" -lldap $ldap_other_libs"
7924 cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 /* Override any gcc2 internal prototype to avoid an error.  */
7928 /* We use char because int might match the return type of a gcc2
7929     builtin and then its argument prototype would still apply.  */
7930 char ldap_open();
7931
7932 int main() {
7933 ldap_open()
7934 ; return 0; }
7935 EOF
7936 if { (eval echo configure:7937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7937   rm -rf conftest*
7938   eval "ac_cv_lib_$ac_lib_var=yes"
7939 else
7940   echo "configure: failed program was:" >&5
7941   cat conftest.$ac_ext >&5
7942   rm -rf conftest*
7943   eval "ac_cv_lib_$ac_lib_var=no"
7944 fi
7945 rm -f conftest*
7946 xe_check_libs=""
7947
7948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7949   echo "$ac_t""yes" 1>&6
7950   with_ldap=yes
7951 else
7952   echo "$ac_t""no" 1>&6
7953 ldap_needs_krb=yes ldap_other_libs="$ldap_other_libs -lkrb"
7954           
7955 xe_msg_checking="for ldap_open in -lldap"
7956 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7957 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7958 echo "configure:7959: checking "$xe_msg_checking"" >&5
7959 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7960
7961 xe_check_libs=" -lldap $ldap_other_libs"
7962 cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965 /* Override any gcc2 internal prototype to avoid an error.  */
7966 /* We use char because int might match the return type of a gcc2
7967     builtin and then its argument prototype would still apply.  */
7968 char ldap_open();
7969
7970 int main() {
7971 ldap_open()
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7975   rm -rf conftest*
7976   eval "ac_cv_lib_$ac_lib_var=yes"
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   eval "ac_cv_lib_$ac_lib_var=no"
7982 fi
7983 rm -f conftest*
7984 xe_check_libs=""
7985
7986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7987   echo "$ac_t""yes" 1>&6
7988   with_ldap=yes
7989 else
7990   echo "$ac_t""no" 1>&6
7991 ldap_needs_des=yes ldap_other_libs="$ldap_other_libs -ldes"
7992             
7993 xe_msg_checking="for ldap_open in -lldap"
7994 test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs"
7995 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7996 echo "configure:7997: checking "$xe_msg_checking"" >&5
7997 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7998
7999 xe_check_libs=" -lldap $ldap_other_libs"
8000 cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* Override any gcc2 internal prototype to avoid an error.  */
8004 /* We use char because int might match the return type of a gcc2
8005     builtin and then its argument prototype would still apply.  */
8006 char ldap_open();
8007
8008 int main() {
8009 ldap_open()
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8013   rm -rf conftest*
8014   eval "ac_cv_lib_$ac_lib_var=yes"
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   eval "ac_cv_lib_$ac_lib_var=no"
8020 fi
8021 rm -f conftest*
8022 xe_check_libs=""
8023
8024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8025   echo "$ac_t""yes" 1>&6
8026   with_ldap=yes
8027 else
8028   echo "$ac_t""no" 1>&6
8029 with_ldap=no
8030 fi
8031
8032
8033 fi
8034
8035
8036 fi
8037
8038
8039 fi
8040
8041
8042       if test yes = "$with_ldap" -a yes != "$ldap_needs_lber";then
8043         echo $ac_n "checking for LDAP_OPT_ON definition""... $ac_c" 1>&6
8044 echo "configure:8045: checking for LDAP_OPT_ON definition" >&5
8045
8046 cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 #include <lber.h>
8050 #include <ldap.h>
8051 #ifdef LDAP_OPT_ON
8052 /* Relying on const defined by ac_c_const (upper case). */
8053 const void *const v = LDAP_OPT_ON;
8054 #else /* !defined (LDAP_OPT_ON) */
8055 choke me
8056 #endif /* !defined (LDAP_OPT_ON) */
8057 int main() {
8058
8059 ; return 0; }
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8062   rm -rf conftest*
8063   xe_cv_have_LDAP_OPT_ON=yes
8064 else
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067   rm -rf conftest*
8068   xe_cv_have_LDAP_OPT_ON=no
8069 fi
8070 rm -f conftest*
8071
8072 echo "$ac_t""$xe_cv_have_LDAP_OPT_ON" 1>&6
8073         if test yes = "$xe_cv_have_LDAP_OPT_ON";then
8074           echo $ac_n "checking LDAP_OPT_ON linking""... $ac_c" 1>&6
8075 echo "configure:8076: checking LDAP_OPT_ON linking" >&5
8076
8077 xe_save_LIBS="$LIBS"
8078             LIBS="-lldap $LIBS"
8079 cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 #include <lber.h>
8083 #include <ldap.h>
8084 const void *const v = LDAP_OPT_ON;
8085 int main() {
8086
8087 ; return 0; }
8088 EOF
8089 if { (eval echo configure:8090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8090   rm -rf conftest*
8091   xe_cv_LDAP_OPT_ON_links=yes
8092 else
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   xe_cv_LDAP_OPT_ON_links=no
8097 fi
8098 rm -f conftest*
8099             LIBS="$xe_save_LIBS"
8100
8101 echo "$ac_t""$xe_cv_LDAP_OPT_ON_links" 1>&6
8102           if test yes != "$xe_cv_LDAP_OPT_ON_links";then
8103             ldap_needs_lber=yes ldap_other_libs=-llber
8104             echo $ac_n "checking LDAP_OPT_ON linking with -llber""... $ac_c" 1>&6
8105 echo "configure:8106: checking LDAP_OPT_ON linking with -llber" >&5
8106
8107 xe_save_LIBS="$LIBS"
8108               LIBS="-lldap $ldap_other_libs $LIBS"
8109 cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 #include <lber.h>
8113 #include <ldap.h>
8114 const void *const v = LDAP_OPT_ON;
8115 int main() {
8116
8117 ; return 0; }
8118 EOF
8119 if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8120   rm -rf conftest*
8121   xe_cv_LDAP_OPT_ON_links_w_lber=yes
8122 else
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -rf conftest*
8126   xe_cv_LDAP_OPT_ON_links_w_lber=no
8127 fi
8128 rm -f conftest*
8129               LIBS="$xe_save_LIBS"
8130
8131 echo "$ac_t""$xe_cv_LDAP_OPT_ON_links_w_lber" 1>&6
8132             if test yes != "$xe_cv_LDAP_OPT_ON_links_w_lber";then
8133               with_ldap=no
8134             fi
8135           fi
8136         fi
8137       fi
8138       if test yes = "$with_ldap";then
8139         if test yes = "$ldap_needs_des";then
8140           ldap_libs="-ldes $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$ldap_libs"; fi
8141         fi
8142         if test yes = "$ldap_needs_krb";then
8143           ldap_libs="-lkrb $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$ldap_libs"; fi
8144         fi
8145         if test yes = "$ldap_needs_lber";then
8146           ldap_libs="-llber $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$ldap_libs"; fi
8147         fi
8148         ldap_libs="-lldap $ldap_libs" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$ldap_libs"; fi
8149       fi
8150 fi
8151
8152   else
8153     save_LIBS="$LIBS" LIBS="$ldap_libs $LIBS"
8154     echo $ac_n "checking for ldap_open""... $ac_c" 1>&6
8155 echo "configure:8156: checking for ldap_open" >&5
8156
8157 cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 /* System header to define __stub macros and hopefully few prototypes,
8161     which can conflict with char ldap_open(); below.  */
8162 #include <assert.h>
8163 /* Override any gcc2 internal prototype to avoid an error.  */
8164 /* We use char because int might match the return type of a gcc2
8165     builtin and then its argument prototype would still apply.  */
8166 char ldap_open();
8167
8168 int main() {
8169
8170 /* The GNU C library defines this for functions which it implements
8171     to always fail with ENOSYS.  Some functions are actually named
8172     something starting with __ and the normal name is an alias.  */
8173 #if defined (__stub_ldap_open) || defined (__stub___ldap_open)
8174 choke me
8175 #else
8176 ldap_open();
8177 #endif
8178
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8182   rm -rf conftest*
8183   eval "ac_cv_func_ldap_open=yes"
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187   rm -rf conftest*
8188   eval "ac_cv_func_ldap_open=no"
8189 fi
8190 rm -f conftest*
8191
8192 if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then
8193   echo "$ac_t""yes" 1>&6
8194         with_ldap=yes
8195       test yes = "$extra_verbose" &&
8196         echo "Setting ldap_libs to $ldap_libs"
8197 else
8198   echo "$ac_t""no" 1>&6
8199       with_ldap=no
8200 fi
8201
8202     LIBS="$save_LIBS"
8203   fi
8204 fi
8205 if test "$with_ldap" = "yes"; then
8206   { test "$extra_verbose" = "yes" && cat << \EOF
8207     Defining HAVE_LDAP
8208 EOF
8209 cat >> confdefs.h <<\EOF
8210 #define HAVE_LDAP 1
8211 EOF
8212 }
8213
8214   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
8215    echo "    xemacs will be linked with \"eldap.o\""
8216  fi
8217   LIBS="$ldap_libs $LIBS"
8218   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
8219 do
8220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8221 echo "configure:8222: checking for $ac_func" >&5
8222
8223 cat > conftest.$ac_ext <<EOF
8224 #line 8225 "configure"
8225 #include "confdefs.h"
8226 /* System header to define __stub macros and hopefully few prototypes,
8227     which can conflict with char $ac_func(); below.  */
8228 #include <assert.h>
8229 /* Override any gcc2 internal prototype to avoid an error.  */
8230 /* We use char because int might match the return type of a gcc2
8231     builtin and then its argument prototype would still apply.  */
8232 char $ac_func();
8233
8234 int main() {
8235
8236 /* The GNU C library defines this for functions which it implements
8237     to always fail with ENOSYS.  Some functions are actually named
8238     something starting with __ and the normal name is an alias.  */
8239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8240 choke me
8241 #else
8242 $ac_func();
8243 #endif
8244
8245 ; return 0; }
8246 EOF
8247 if { (eval echo configure:8248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8248   rm -rf conftest*
8249   eval "ac_cv_func_$ac_func=yes"
8250 else
8251   echo "configure: failed program was:" >&5
8252   cat conftest.$ac_ext >&5
8253   rm -rf conftest*
8254   eval "ac_cv_func_$ac_func=no"
8255 fi
8256 rm -f conftest*
8257
8258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8259   echo "$ac_t""yes" 1>&6
8260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8261   { test "$extra_verbose" = "yes" && cat << EOF
8262     Defining $ac_tr_func
8263 EOF
8264 cat >> confdefs.h <<EOF
8265 #define $ac_tr_func 1
8266 EOF
8267 }
8268  
8269 else
8270   echo "$ac_t""no" 1>&6
8271 fi
8272 done
8273
8274 fi
8275
8276 if test "$with_postgresql" != "no"; then
8277   echo "checking for PostgreSQL" 1>&6
8278 echo "configure:8279: checking for PostgreSQL" >&5
8279
8280   for header_dir in "" "pgsql/" "postgresql/"; do
8281     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
8282 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
8283 echo "configure:8284: checking for ${header_dir}libpq-fe.h" >&5
8284
8285 cat > conftest.$ac_ext <<EOF
8286 #line 8287 "configure"
8287 #include "confdefs.h"
8288 #include <${header_dir}libpq-fe.h>
8289 EOF
8290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8291 { (eval echo configure:8292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8293 if test -z "$ac_err"; then
8294   rm -rf conftest*
8295   eval "ac_cv_header_$ac_safe=yes"
8296 else
8297   echo "$ac_err" >&5
8298   echo "configure: failed program was:" >&5
8299   cat conftest.$ac_ext >&5
8300   rm -rf conftest*
8301   eval "ac_cv_header_$ac_safe=no"
8302 fi
8303 rm -f conftest*
8304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8305   echo "$ac_t""yes" 1>&6
8306   libpq_fe_h_file=${header_dir}libpq-fe.h; break
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310
8311   done
8312
8313   test -n "$libpq_fe_h_file" && { 
8314 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
8315 echo "configure:8316: checking for PQconnectdb in -lpq" >&5
8316 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
8317
8318 xe_check_libs=" -lpq "
8319 cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322 /* Override any gcc2 internal prototype to avoid an error.  */
8323 /* We use char because int might match the return type of a gcc2
8324     builtin and then its argument prototype would still apply.  */
8325 char PQconnectdb();
8326
8327 int main() {
8328 PQconnectdb()
8329 ; return 0; }
8330 EOF
8331 if { (eval echo configure:8332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8332   rm -rf conftest*
8333   eval "ac_cv_lib_$ac_lib_var=yes"
8334 else
8335   echo "configure: failed program was:" >&5
8336   cat conftest.$ac_ext >&5
8337   rm -rf conftest*
8338   eval "ac_cv_lib_$ac_lib_var=no"
8339 fi
8340 rm -f conftest*
8341 xe_check_libs=""
8342
8343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8344   echo "$ac_t""yes" 1>&6
8345   have_libpq=yes
8346 else
8347   echo "$ac_t""no" 1>&6
8348 fi
8349
8350  }
8351
8352   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
8353     with_postgresql=yes
8354     { test "$extra_verbose" = "yes" && cat << \EOF
8355     Defining HAVE_POSTGRESQL
8356 EOF
8357 cat >> confdefs.h <<\EOF
8358 #define HAVE_POSTGRESQL 1
8359 EOF
8360 }
8361
8362     
8363 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8364 echo "configure:8365: checking for PQconnectStart in -lpq" >&5
8365 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8366
8367 xe_check_libs=" -lpq "
8368 cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 /* Override any gcc2 internal prototype to avoid an error.  */
8372 /* We use char because int might match the return type of a gcc2
8373     builtin and then its argument prototype would still apply.  */
8374 char PQconnectStart();
8375
8376 int main() {
8377 PQconnectStart()
8378 ; return 0; }
8379 EOF
8380 if { (eval echo configure:8381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=yes"
8383 else
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -rf conftest*
8387   eval "ac_cv_lib_$ac_lib_var=no"
8388 fi
8389 rm -f conftest*
8390 xe_check_libs=""
8391
8392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8393   echo "$ac_t""yes" 1>&6
8394   with_postgresqlv7=yes;
8395                  { test "$extra_verbose" = "yes" && cat << \EOF
8396     Defining HAVE_POSTGRESQLV7
8397 EOF
8398 cat >> confdefs.h <<\EOF
8399 #define HAVE_POSTGRESQLV7 1
8400 EOF
8401 }
8402
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406
8407
8408     { test "$extra_verbose" = "yes" && cat << EOF
8409     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8410 EOF
8411 cat >> confdefs.h <<EOF
8412 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8413 EOF
8414 }
8415
8416     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8417     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8418    echo "    xemacs will be linked with \"postgresql.o\""
8419  fi
8420   elif test "$with_postgresql" = "yes"; then
8421     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8422   fi
8423 fi
8424
8425
8426 if test "$window_system" != "none"; then
8427   echo "checking for graphics libraries" 1>&6
8428 echo "configure:8429: checking for graphics libraries" >&5
8429
8430       libpath_xpm=
8431   incpath_xpm=
8432   libname_xpm="-lXpm"
8433   case "$opsys" in 
8434     cygwin*)
8435       cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
8436       cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"`
8437       case "$window_system" in
8438                 x11)  ;;
8439                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8440              incpath_xpm="-I${cygwin_top}/include/noX"
8441              libname_xpm="-lXpm-noX"
8442               ;;
8443                 gtk)  ;;
8444                 none) ;;
8445                 *)    ;;
8446       esac
8447       ;;
8448         *) ;;
8449   esac
8450     xpm_problem=""
8451   if test -z "$with_xpm"; then
8452     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8453     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8454     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8455 echo "configure:8456: checking for Xpm - no older than 3.4f" >&5
8456     xe_check_libs="$libname_xpm"
8457     cat > conftest.$ac_ext <<EOF
8458 #line 8459 "configure"
8459 #include "confdefs.h"
8460 #define XPM_NUMBERS
8461 #include <X11/xpm.h>
8462     int main(int c, char **v) {
8463     return c == 1 ? 0 :
8464       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8465       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8466 EOF
8467 if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8468 then
8469   ./conftest dummy_arg; xpm_status=$?;
8470       if test "$xpm_status" = "0"; then
8471         with_xpm=yes;
8472       else
8473         with_xpm=no;
8474         if test "$xpm_status" = "1"; then
8475           xpm_problem="Xpm library version and header file version don't match!"
8476         elif test "$xpm_status" = "2"; then
8477           xpm_problem="Xpm library version is too old!"
8478         else
8479           xpm_problem="Internal xpm detection logic error!"
8480         fi
8481         echo "
8482 *** WARNING *** $xpm_problem
8483   I'm not touching that with a 10-foot pole!
8484   If you really want to use the installed version of Xpm, rerun
8485   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8486     fi
8487 else
8488   conftest_rc="$?"
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -fr conftest*
8492   with_xpm=no
8493 fi
8494 rm -fr conftest*
8495     xe_check_libs=
8496     echo "$ac_t""$with_xpm" 1>&6
8497   fi
8498   if test "$with_xpm" = "yes"; then
8499                 { test "$extra_verbose" = "yes" && cat << \EOF
8500     Defining HAVE_XPM
8501 EOF
8502 cat >> confdefs.h <<\EOF
8503 #define HAVE_XPM 1
8504 EOF
8505 }
8506
8507     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8508     libs_x=""$libname_xpm" $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libname_xpm"\" to \$libs_x"; fi
8509     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8510     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8511 echo "configure:8512: checking for \"FOR_MSW\" xpm" >&5
8512     xe_check_libs="$libname_xpm"
8513     cat > conftest.$ac_ext <<EOF
8514 #line 8515 "configure"
8515 #include "confdefs.h"
8516
8517 int main() {
8518 XpmCreatePixmapFromData()
8519 ; return 0; }
8520 EOF
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522   rm -rf conftest*
8523   xpm_for_msw=no
8524 else
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   xpm_for_msw=yes
8529 fi
8530 rm -f conftest*
8531     xe_check_libs=
8532     echo "$ac_t""$xpm_for_msw" 1>&6
8533     if test "$xpm_for_msw" = "yes"; then
8534       { test "$extra_verbose" = "yes" && cat << \EOF
8535     Defining FOR_MSW
8536 EOF
8537 cat >> confdefs.h <<\EOF
8538 #define FOR_MSW 1
8539 EOF
8540 }
8541
8542     fi
8543   fi
8544
8545     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8546 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8547 echo "configure:8548: checking for compface.h" >&5
8548
8549 cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 #include <compface.h>
8553 EOF
8554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8555 { (eval echo configure:8556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8557 if test -z "$ac_err"; then
8558   rm -rf conftest*
8559   eval "ac_cv_header_$ac_safe=yes"
8560 else
8561   echo "$ac_err" >&5
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   eval "ac_cv_header_$ac_safe=no"
8566 fi
8567 rm -f conftest*
8568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570   :
8571 else
8572   echo "$ac_t""no" 1>&6
8573 with_xface=no
8574 fi
8575  }
8576   test -z "$with_xface" && { 
8577 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8578 echo "configure:8579: checking for UnGenFace in -lcompface" >&5
8579 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8580
8581 xe_check_libs=" -lcompface "
8582 cat > conftest.$ac_ext <<EOF
8583 #line 8584 "configure"
8584 #include "confdefs.h"
8585 /* Override any gcc2 internal prototype to avoid an error.  */
8586 /* We use char because int might match the return type of a gcc2
8587     builtin and then its argument prototype would still apply.  */
8588 char UnGenFace();
8589
8590 int main() {
8591 UnGenFace()
8592 ; return 0; }
8593 EOF
8594 if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8595   rm -rf conftest*
8596   eval "ac_cv_lib_$ac_lib_var=yes"
8597 else
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -rf conftest*
8601   eval "ac_cv_lib_$ac_lib_var=no"
8602 fi
8603 rm -f conftest*
8604 xe_check_libs=""
8605
8606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8607   echo "$ac_t""yes" 1>&6
8608   : 
8609 else
8610   echo "$ac_t""no" 1>&6
8611 with_xface=no
8612 fi
8613
8614  }
8615   test -z "$with_xface" && with_xface=yes
8616   if test "$with_xface" = "yes"; then
8617     { test "$extra_verbose" = "yes" && cat << \EOF
8618     Defining HAVE_XFACE
8619 EOF
8620 cat >> confdefs.h <<\EOF
8621 #define HAVE_XFACE 1
8622 EOF
8623 }
8624
8625     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8626   fi
8627
8628         if test "$with_gif" != "no"; then
8629     with_gif="yes"
8630     { test "$extra_verbose" = "yes" && cat << \EOF
8631     Defining HAVE_GIF
8632 EOF
8633 cat >> confdefs.h <<\EOF
8634 #define HAVE_GIF 1
8635 EOF
8636 }
8637
8638     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8639    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8640  fi
8641   fi
8642
8643       if test "$with_png $with_tiff" != "no no"; then
8644     
8645 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8646 echo "configure:8647: checking for inflate in -lc" >&5
8647 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8648
8649 xe_check_libs=" -lc "
8650 cat > conftest.$ac_ext <<EOF
8651 #line 8652 "configure"
8652 #include "confdefs.h"
8653 /* Override any gcc2 internal prototype to avoid an error.  */
8654 /* We use char because int might match the return type of a gcc2
8655     builtin and then its argument prototype would still apply.  */
8656 char inflate();
8657
8658 int main() {
8659 inflate()
8660 ; return 0; }
8661 EOF
8662 if { (eval echo configure:8663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8663   rm -rf conftest*
8664   eval "ac_cv_lib_$ac_lib_var=yes"
8665 else
8666   echo "configure: failed program was:" >&5
8667   cat conftest.$ac_ext >&5
8668   rm -rf conftest*
8669   eval "ac_cv_lib_$ac_lib_var=no"
8670 fi
8671 rm -f conftest*
8672 xe_check_libs=""
8673
8674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8675   echo "$ac_t""yes" 1>&6
8676   :
8677 else
8678   echo "$ac_t""no" 1>&6
8679
8680 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8681 echo "configure:8682: checking for inflate in -lz" >&5
8682 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8683
8684 xe_check_libs=" -lz "
8685 cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 /* Override any gcc2 internal prototype to avoid an error.  */
8689 /* We use char because int might match the return type of a gcc2
8690     builtin and then its argument prototype would still apply.  */
8691 char inflate();
8692
8693 int main() {
8694 inflate()
8695 ; return 0; }
8696 EOF
8697 if { (eval echo configure:8698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8698   rm -rf conftest*
8699   eval "ac_cv_lib_$ac_lib_var=yes"
8700 else
8701   echo "configure: failed program was:" >&5
8702   cat conftest.$ac_ext >&5
8703   rm -rf conftest*
8704   eval "ac_cv_lib_$ac_lib_var=no"
8705 fi
8706 rm -f conftest*
8707 xe_check_libs=""
8708
8709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8710   echo "$ac_t""yes" 1>&6
8711   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8712 else
8713   echo "$ac_t""no" 1>&6
8714
8715 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8716 echo "configure:8717: checking for inflate in -lgz" >&5
8717 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8718
8719 xe_check_libs=" -lgz "
8720 cat > conftest.$ac_ext <<EOF
8721 #line 8722 "configure"
8722 #include "confdefs.h"
8723 /* Override any gcc2 internal prototype to avoid an error.  */
8724 /* We use char because int might match the return type of a gcc2
8725     builtin and then its argument prototype would still apply.  */
8726 char inflate();
8727
8728 int main() {
8729 inflate()
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8733   rm -rf conftest*
8734   eval "ac_cv_lib_$ac_lib_var=yes"
8735 else
8736   echo "configure: failed program was:" >&5
8737   cat conftest.$ac_ext >&5
8738   rm -rf conftest*
8739   eval "ac_cv_lib_$ac_lib_var=no"
8740 fi
8741 rm -f conftest*
8742 xe_check_libs=""
8743
8744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8745   echo "$ac_t""yes" 1>&6
8746   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8747 else
8748   echo "$ac_t""no" 1>&6
8749 fi
8750
8751
8752 fi
8753
8754
8755 fi
8756
8757
8758   fi
8759
8760     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8761 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8762 echo "configure:8763: checking for jpeglib.h" >&5
8763
8764 cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 #include <jpeglib.h>
8768 EOF
8769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8770 { (eval echo configure:8771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8772 if test -z "$ac_err"; then
8773   rm -rf conftest*
8774   eval "ac_cv_header_$ac_safe=yes"
8775 else
8776   echo "$ac_err" >&5
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   eval "ac_cv_header_$ac_safe=no"
8781 fi
8782 rm -f conftest*
8783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8784   echo "$ac_t""yes" 1>&6
8785   :
8786 else
8787   echo "$ac_t""no" 1>&6
8788 with_jpeg=no
8789 fi
8790  }
8791   test -z "$with_jpeg" && { 
8792 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8793 echo "configure:8794: checking for jpeg_destroy_decompress in -ljpeg" >&5
8794 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8795
8796 xe_check_libs=" -ljpeg "
8797 cat > conftest.$ac_ext <<EOF
8798 #line 8799 "configure"
8799 #include "confdefs.h"
8800 /* Override any gcc2 internal prototype to avoid an error.  */
8801 /* We use char because int might match the return type of a gcc2
8802     builtin and then its argument prototype would still apply.  */
8803 char jpeg_destroy_decompress();
8804
8805 int main() {
8806 jpeg_destroy_decompress()
8807 ; return 0; }
8808 EOF
8809 if { (eval echo configure:8810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8810   rm -rf conftest*
8811   eval "ac_cv_lib_$ac_lib_var=yes"
8812 else
8813   echo "configure: failed program was:" >&5
8814   cat conftest.$ac_ext >&5
8815   rm -rf conftest*
8816   eval "ac_cv_lib_$ac_lib_var=no"
8817 fi
8818 rm -f conftest*
8819 xe_check_libs=""
8820
8821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8822   echo "$ac_t""yes" 1>&6
8823   :
8824 else
8825   echo "$ac_t""no" 1>&6
8826 with_jpeg=no
8827 fi
8828
8829  }
8830   test -z "$with_jpeg" && with_jpeg=yes
8831   if test "$with_jpeg" = "yes"; then
8832     { test "$extra_verbose" = "yes" && cat << \EOF
8833     Defining HAVE_JPEG
8834 EOF
8835 cat >> confdefs.h <<\EOF
8836 #define HAVE_JPEG 1
8837 EOF
8838 }
8839
8840     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8841   fi
8842
8843     png_problem=""
8844   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8845 echo "configure:8846: checking for pow" >&5
8846
8847 cat > conftest.$ac_ext <<EOF
8848 #line 8849 "configure"
8849 #include "confdefs.h"
8850 /* System header to define __stub macros and hopefully few prototypes,
8851     which can conflict with char pow(); below.  */
8852 #include <assert.h>
8853 /* Override any gcc2 internal prototype to avoid an error.  */
8854 /* We use char because int might match the return type of a gcc2
8855     builtin and then its argument prototype would still apply.  */
8856 char pow();
8857
8858 int main() {
8859
8860 /* The GNU C library defines this for functions which it implements
8861     to always fail with ENOSYS.  Some functions are actually named
8862     something starting with __ and the normal name is an alias.  */
8863 #if defined (__stub_pow) || defined (__stub___pow)
8864 choke me
8865 #else
8866 pow();
8867 #endif
8868
8869 ; return 0; }
8870 EOF
8871 if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8872   rm -rf conftest*
8873   eval "ac_cv_func_pow=yes"
8874 else
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -rf conftest*
8878   eval "ac_cv_func_pow=no"
8879 fi
8880 rm -f conftest*
8881
8882 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8883   echo "$ac_t""yes" 1>&6
8884   :
8885 else
8886   echo "$ac_t""no" 1>&6
8887 with_png=no
8888 fi
8889  }
8890   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8891 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8892 echo "configure:8893: checking for png.h" >&5
8893
8894 cat > conftest.$ac_ext <<EOF
8895 #line 8896 "configure"
8896 #include "confdefs.h"
8897 #include <png.h>
8898 EOF
8899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8900 { (eval echo configure:8901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8902 if test -z "$ac_err"; then
8903   rm -rf conftest*
8904   eval "ac_cv_header_$ac_safe=yes"
8905 else
8906   echo "$ac_err" >&5
8907   echo "configure: failed program was:" >&5
8908   cat conftest.$ac_ext >&5
8909   rm -rf conftest*
8910   eval "ac_cv_header_$ac_safe=no"
8911 fi
8912 rm -f conftest*
8913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8914   echo "$ac_t""yes" 1>&6
8915   :
8916 else
8917   echo "$ac_t""no" 1>&6
8918 with_png=no
8919 fi
8920  }
8921   test -z "$with_png" && { 
8922 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8923 echo "configure:8924: checking for png_read_image in -lpng" >&5
8924 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8925
8926 xe_check_libs=" -lpng "
8927 cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 /* Override any gcc2 internal prototype to avoid an error.  */
8931 /* We use char because int might match the return type of a gcc2
8932     builtin and then its argument prototype would still apply.  */
8933 char png_read_image();
8934
8935 int main() {
8936 png_read_image()
8937 ; return 0; }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8940   rm -rf conftest*
8941   eval "ac_cv_lib_$ac_lib_var=yes"
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   eval "ac_cv_lib_$ac_lib_var=no"
8947 fi
8948 rm -f conftest*
8949 xe_check_libs=""
8950
8951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8952   echo "$ac_t""yes" 1>&6
8953   :
8954 else
8955   echo "$ac_t""no" 1>&6
8956 with_png=no
8957 fi
8958
8959  }
8960   if test -z "$with_png"; then
8961     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8962 echo "configure:8963: checking for workable png version information" >&5
8963     xe_check_libs="-lpng -lz"
8964     cat > conftest.$ac_ext <<EOF
8965 #line 8966 "configure"
8966 #include "confdefs.h"
8967 #include <png.h>
8968     int main(int c, char **v) {
8969     if (c == 1) return 0;
8970     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8971     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8974 then
8975   ./conftest dummy_arg; png_status=$?;
8976       if test "$png_status" = "0"; then
8977         with_png=yes;
8978       else
8979         with_png=no;
8980         if test "$png_status" = "1"; then
8981           png_problem="PNG library version and header file don't match!"
8982         elif test "$png_status" = "2"; then
8983           png_problem="PNG library version too old (pre 1.0.2)!"
8984         fi
8985         echo "
8986 *** WARNING *** $png_problem
8987   I'm not touching that with a 10-foot pole!
8988   If you really want to use the installed version of libPNG, rerun
8989   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8990     fi
8991 else
8992   conftest_rc="$?"
8993   echo "configure: failed program was:" >&5
8994   cat conftest.$ac_ext >&5
8995   rm -fr conftest*
8996   with_png=no
8997 fi
8998 rm -fr conftest*
8999     xe_check_libs=
9000     echo "$ac_t""$with_png" 1>&6
9001   fi
9002   if test "$with_png" = "yes"; then
9003     { test "$extra_verbose" = "yes" && cat << \EOF
9004     Defining HAVE_PNG
9005 EOF
9006 cat >> confdefs.h <<\EOF
9007 #define HAVE_PNG 1
9008 EOF
9009 }
9010
9011     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
9012   fi
9013
9014     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
9015 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
9016 echo "configure:9017: checking for tiffio.h" >&5
9017
9018 cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 #include <tiffio.h>
9022 EOF
9023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9024 { (eval echo configure:9025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9026 if test -z "$ac_err"; then
9027   rm -rf conftest*
9028   eval "ac_cv_header_$ac_safe=yes"
9029 else
9030   echo "$ac_err" >&5
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   eval "ac_cv_header_$ac_safe=no"
9035 fi
9036 rm -f conftest*
9037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039   :
9040 else
9041   echo "$ac_t""no" 1>&6
9042 with_tiff=no
9043 fi
9044  }
9045   test -z "$with_tiff" && { 
9046 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
9047 echo "configure:9048: checking for TIFFClientOpen in -ltiff" >&5
9048 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
9049
9050 xe_check_libs=" -ltiff "
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 /* Override any gcc2 internal prototype to avoid an error.  */
9055 /* We use char because int might match the return type of a gcc2
9056     builtin and then its argument prototype would still apply.  */
9057 char TIFFClientOpen();
9058
9059 int main() {
9060 TIFFClientOpen()
9061 ; return 0; }
9062 EOF
9063 if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9064   rm -rf conftest*
9065   eval "ac_cv_lib_$ac_lib_var=yes"
9066 else
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   eval "ac_cv_lib_$ac_lib_var=no"
9071 fi
9072 rm -f conftest*
9073 xe_check_libs=""
9074
9075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9076   echo "$ac_t""yes" 1>&6
9077   :
9078 else
9079   echo "$ac_t""no" 1>&6
9080 with_tiff=no
9081 fi
9082
9083  }
9084   test -z "$with_tiff" && with_tiff=yes
9085   if test "$with_tiff" = "yes"; then
9086     { test "$extra_verbose" = "yes" && cat << \EOF
9087     Defining HAVE_TIFF
9088 EOF
9089 cat >> confdefs.h <<\EOF
9090 #define HAVE_TIFF 1
9091 EOF
9092 }
9093
9094     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
9095   fi
9096 fi
9097
9098
9099 if test "$with_gtk" = "yes"; then
9100     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
9101 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
9102 echo "configure:9103: checking for compface.h" >&5
9103
9104 cat > conftest.$ac_ext <<EOF
9105 #line 9106 "configure"
9106 #include "confdefs.h"
9107 #include <compface.h>
9108 EOF
9109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9110 { (eval echo configure:9111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9112 if test -z "$ac_err"; then
9113   rm -rf conftest*
9114   eval "ac_cv_header_$ac_safe=yes"
9115 else
9116   echo "$ac_err" >&5
9117   echo "configure: failed program was:" >&5
9118   cat conftest.$ac_ext >&5
9119   rm -rf conftest*
9120   eval "ac_cv_header_$ac_safe=no"
9121 fi
9122 rm -f conftest*
9123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9124   echo "$ac_t""yes" 1>&6
9125   :
9126 else
9127   echo "$ac_t""no" 1>&6
9128 with_xface=no
9129 fi
9130  }
9131   test -z "$with_xface" && { 
9132 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
9133 echo "configure:9134: checking for UnGenFace in -lcompface" >&5
9134 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
9135
9136 xe_check_libs=" -lcompface "
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 /* Override any gcc2 internal prototype to avoid an error.  */
9141 /* We use char because int might match the return type of a gcc2
9142     builtin and then its argument prototype would still apply.  */
9143 char UnGenFace();
9144
9145 int main() {
9146 UnGenFace()
9147 ; return 0; }
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9150   rm -rf conftest*
9151   eval "ac_cv_lib_$ac_lib_var=yes"
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -rf conftest*
9156   eval "ac_cv_lib_$ac_lib_var=no"
9157 fi
9158 rm -f conftest*
9159 xe_check_libs=""
9160
9161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9162   echo "$ac_t""yes" 1>&6
9163   : 
9164 else
9165   echo "$ac_t""no" 1>&6
9166 with_xface=no
9167 fi
9168
9169  }
9170   test -z "$with_xface" && with_xface=yes
9171   if test "$with_xface" = "yes"; then
9172     { test "$extra_verbose" = "yes" && cat << \EOF
9173     Defining HAVE_XFACE
9174 EOF
9175 cat >> confdefs.h <<\EOF
9176 #define HAVE_XFACE 1
9177 EOF
9178 }
9179
9180     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
9181   fi
9182 fi
9183
9184
9185
9186 if test "$with_x11" = "yes"; then
9187   echo "checking for X11 graphics libraries" 1>&6
9188 echo "configure:9189: checking for X11 graphics libraries" >&5
9189 fi
9190
9191 if test "$with_x11" = "yes"; then
9192   echo "checking for the Athena widgets" 1>&6
9193 echo "configure:9194: checking for the Athena widgets" >&5
9194
9195     case "$with_athena" in
9196         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
9197     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
9198     "next")     athena_variant=neXtaw   athena_3d=yes ;;
9199     "95")       athena_variant=Xaw95    athena_3d=yes ;;
9200     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
9201     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
9202   esac
9203
9204   athena_3d_function=Xaw3dComputeBottomShadowRGB
9205
9206     if test "$athena_3d" = "no"; then
9207     
9208 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
9209 echo "configure:9210: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
9210 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
9211
9212 xe_check_libs=" -l$athena_variant "
9213 cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 /* Override any gcc2 internal prototype to avoid an error.  */
9217 /* We use char because int might match the return type of a gcc2
9218     builtin and then its argument prototype would still apply.  */
9219 char XawScrollbarSetThumb();
9220
9221 int main() {
9222 XawScrollbarSetThumb()
9223 ; return 0; }
9224 EOF
9225 if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9226   rm -rf conftest*
9227   eval "ac_cv_lib_$ac_lib_var=yes"
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   eval "ac_cv_lib_$ac_lib_var=no"
9233 fi
9234 rm -f conftest*
9235 xe_check_libs=""
9236
9237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9238   echo "$ac_t""yes" 1>&6
9239           
9240 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9241 echo "configure:9242: checking for $athena_3d_function in -l$athena_variant" >&5
9242 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9243
9244 xe_check_libs=" -l$athena_variant "
9245 cat > conftest.$ac_ext <<EOF
9246 #line 9247 "configure"
9247 #include "confdefs.h"
9248 /* Override any gcc2 internal prototype to avoid an error.  */
9249 /* We use char because int might match the return type of a gcc2
9250     builtin and then its argument prototype would still apply.  */
9251 char $athena_3d_function();
9252
9253 int main() {
9254 $athena_3d_function()
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=yes"
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_lib_$ac_lib_var=no"
9265 fi
9266 rm -f conftest*
9267 xe_check_libs=""
9268
9269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9270   echo "$ac_t""yes" 1>&6
9271   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
9272 else
9273   echo "$ac_t""no" 1>&6
9274 athena_lib=$athena_variant
9275 fi
9276
9277
9278       
9279 else
9280   echo "$ac_t""no" 1>&6
9281 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
9282 fi
9283
9284
9285   else
9286         
9287 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6
9288 echo "configure:9289: checking for $athena_3d_function in -l$athena_variant" >&5
9289 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9290
9291 xe_check_libs=" -l$athena_variant "
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 /* Override any gcc2 internal prototype to avoid an error.  */
9296 /* We use char because int might match the return type of a gcc2
9297     builtin and then its argument prototype would still apply.  */
9298 char $athena_3d_function();
9299
9300 int main() {
9301 $athena_3d_function()
9302 ; return 0; }
9303 EOF
9304 if { (eval echo configure:9305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9305   rm -rf conftest*
9306   eval "ac_cv_lib_$ac_lib_var=yes"
9307 else
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -rf conftest*
9311   eval "ac_cv_lib_$ac_lib_var=no"
9312 fi
9313 rm -f conftest*
9314 xe_check_libs=""
9315
9316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9317   echo "$ac_t""yes" 1>&6
9318   athena_lib=$athena_variant
9319 else
9320   echo "$ac_t""no" 1>&6
9321 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6
9322 echo "configure:9323: checking for $athena_3d_function in -lXaw" >&5
9323 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'`
9324
9325 xe_check_libs=" -lXaw "
9326 cat > conftest.$ac_ext <<EOF
9327 #line 9328 "configure"
9328 #include "confdefs.h"
9329 /* Override any gcc2 internal prototype to avoid an error.  */
9330 /* We use char because int might match the return type of a gcc2
9331     builtin and then its argument prototype would still apply.  */
9332 char $athena_3d_function();
9333
9334 int main() {
9335 $athena_3d_function()
9336 ; return 0; }
9337 EOF
9338 if { (eval echo configure:9339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9339   rm -rf conftest*
9340   eval "ac_cv_lib_$ac_lib_var=yes"
9341 else
9342   echo "configure: failed program was:" >&5
9343   cat conftest.$ac_ext >&5
9344   rm -rf conftest*
9345   eval "ac_cv_lib_$ac_lib_var=no"
9346 fi
9347 rm -f conftest*
9348 xe_check_libs=""
9349
9350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9351   echo "$ac_t""yes" 1>&6
9352   athena_lib=Xaw;
9353           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9354         
9355 else
9356   echo "$ac_t""no" 1>&6
9357 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9358 fi
9359
9360
9361 fi
9362
9363
9364   fi
9365
9366     if test "$athena_3d" = "no"; then
9367     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9368 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9369 echo "configure:9370: checking for X11/Xaw/ThreeD.h" >&5
9370
9371 cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374 #include <X11/Xaw/ThreeD.h>
9375 EOF
9376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9377 { (eval echo configure:9378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9379 if test -z "$ac_err"; then
9380   rm -rf conftest*
9381   eval "ac_cv_header_$ac_safe=yes"
9382 else
9383   echo "$ac_err" >&5
9384   echo "configure: failed program was:" >&5
9385   cat conftest.$ac_ext >&5
9386   rm -rf conftest*
9387   eval "ac_cv_header_$ac_safe=no"
9388 fi
9389 rm -f conftest*
9390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9391   echo "$ac_t""yes" 1>&6
9392   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9393 else
9394   echo "$ac_t""no" 1>&6
9395 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9396 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9397 echo "configure:9398: checking for X11/Xaw/XawInit.h" >&5
9398
9399 cat > conftest.$ac_ext <<EOF
9400 #line 9401 "configure"
9401 #include "confdefs.h"
9402 #include <X11/Xaw/XawInit.h>
9403 EOF
9404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9405 { (eval echo configure:9406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9407 if test -z "$ac_err"; then
9408   rm -rf conftest*
9409   eval "ac_cv_header_$ac_safe=yes"
9410 else
9411   echo "$ac_err" >&5
9412   echo "configure: failed program was:" >&5
9413   cat conftest.$ac_ext >&5
9414   rm -rf conftest*
9415   eval "ac_cv_header_$ac_safe=no"
9416 fi
9417 rm -f conftest*
9418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9419   echo "$ac_t""yes" 1>&6
9420   athena_h_path=X11/Xaw
9421 else
9422   echo "$ac_t""no" 1>&6
9423 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9424 fi
9425
9426 fi
9427
9428   else
9429             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9430 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9431 echo "configure:9432: checking for X11/$athena_variant/XawInit.h" >&5
9432
9433 cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 #include <X11/$athena_variant/XawInit.h>
9437 EOF
9438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9439 { (eval echo configure:9440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9441 if test -z "$ac_err"; then
9442   rm -rf conftest*
9443   eval "ac_cv_header_$ac_safe=yes"
9444 else
9445   echo "$ac_err" >&5
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -rf conftest*
9449   eval "ac_cv_header_$ac_safe=no"
9450 fi
9451 rm -f conftest*
9452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9453   echo "$ac_t""yes" 1>&6
9454   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9455 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9456 echo "configure:9457: checking for X11/$athena_variant/ThreeD.h" >&5
9457
9458 cat > conftest.$ac_ext <<EOF
9459 #line 9460 "configure"
9460 #include "confdefs.h"
9461 #include <X11/$athena_variant/ThreeD.h>
9462 EOF
9463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9464 { (eval echo configure:9465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9466 if test -z "$ac_err"; then
9467   rm -rf conftest*
9468   eval "ac_cv_header_$ac_safe=yes"
9469 else
9470   echo "$ac_err" >&5
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -rf conftest*
9474   eval "ac_cv_header_$ac_safe=no"
9475 fi
9476 rm -f conftest*
9477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9478   echo "$ac_t""yes" 1>&6
9479   athena_h_path=X11/$athena_variant
9480 else
9481   echo "$ac_t""no" 1>&6
9482 fi
9483
9484 else
9485   echo "$ac_t""no" 1>&6
9486 fi
9487
9488
9489         if test -z "$athena_h_path"; then
9490       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9491 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9492 echo "configure:9493: checking for $athena_variant/XawInit.h" >&5
9493
9494 cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497 #include <$athena_variant/XawInit.h>
9498 EOF
9499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9500 { (eval echo configure:9501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9502 if test -z "$ac_err"; then
9503   rm -rf conftest*
9504   eval "ac_cv_header_$ac_safe=yes"
9505 else
9506   echo "$ac_err" >&5
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   eval "ac_cv_header_$ac_safe=no"
9511 fi
9512 rm -f conftest*
9513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9514   echo "$ac_t""yes" 1>&6
9515   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9516 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9517 echo "configure:9518: checking for $athena_variant/ThreeD.h" >&5
9518
9519 cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 #include <$athena_variant/ThreeD.h>
9523 EOF
9524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9525 { (eval echo configure:9526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9527 if test -z "$ac_err"; then
9528   rm -rf conftest*
9529   eval "ac_cv_header_$ac_safe=yes"
9530 else
9531   echo "$ac_err" >&5
9532   echo "configure: failed program was:" >&5
9533   cat conftest.$ac_ext >&5
9534   rm -rf conftest*
9535   eval "ac_cv_header_$ac_safe=no"
9536 fi
9537 rm -f conftest*
9538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9539   echo "$ac_t""yes" 1>&6
9540   athena_h_path=$athena_variant
9541 else
9542   echo "$ac_t""no" 1>&6
9543 fi
9544
9545 else
9546   echo "$ac_t""no" 1>&6
9547 fi
9548
9549     fi
9550
9551         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9552       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9553 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9554 echo "configure:9555: checking for X11/Xaw3d/XawInit.h" >&5
9555
9556 cat > conftest.$ac_ext <<EOF
9557 #line 9558 "configure"
9558 #include "confdefs.h"
9559 #include <X11/Xaw3d/XawInit.h>
9560 EOF
9561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9562 { (eval echo configure:9563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9564 if test -z "$ac_err"; then
9565   rm -rf conftest*
9566   eval "ac_cv_header_$ac_safe=yes"
9567 else
9568   echo "$ac_err" >&5
9569   echo "configure: failed program was:" >&5
9570   cat conftest.$ac_ext >&5
9571   rm -rf conftest*
9572   eval "ac_cv_header_$ac_safe=no"
9573 fi
9574 rm -f conftest*
9575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9576   echo "$ac_t""yes" 1>&6
9577   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9578 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9579 echo "configure:9580: checking for X11/Xaw3d/ThreeD.h" >&5
9580
9581 cat > conftest.$ac_ext <<EOF
9582 #line 9583 "configure"
9583 #include "confdefs.h"
9584 #include <X11/Xaw3d/ThreeD.h>
9585 EOF
9586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9587 { (eval echo configure:9588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9589 if test -z "$ac_err"; then
9590   rm -rf conftest*
9591   eval "ac_cv_header_$ac_safe=yes"
9592 else
9593   echo "$ac_err" >&5
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596   rm -rf conftest*
9597   eval "ac_cv_header_$ac_safe=no"
9598 fi
9599 rm -f conftest*
9600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9601   echo "$ac_t""yes" 1>&6
9602   
9603             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9604             athena_h_path=X11/Xaw3d
9605           
9606 else
9607   echo "$ac_t""no" 1>&6
9608 fi
9609
9610 else
9611   echo "$ac_t""no" 1>&6
9612 fi
9613
9614     fi
9615
9616         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9617       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9618 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9619 echo "configure:9620: checking for Xaw3d/XawInit.h" >&5
9620
9621 cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 #include <Xaw3d/XawInit.h>
9625 EOF
9626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9627 { (eval echo configure:9628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9629 if test -z "$ac_err"; then
9630   rm -rf conftest*
9631   eval "ac_cv_header_$ac_safe=yes"
9632 else
9633   echo "$ac_err" >&5
9634   echo "configure: failed program was:" >&5
9635   cat conftest.$ac_ext >&5
9636   rm -rf conftest*
9637   eval "ac_cv_header_$ac_safe=no"
9638 fi
9639 rm -f conftest*
9640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9641   echo "$ac_t""yes" 1>&6
9642   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9643 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9644 echo "configure:9645: checking for Xaw3d/ThreeD.h" >&5
9645
9646 cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9649 #include <Xaw3d/ThreeD.h>
9650 EOF
9651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9652 { (eval echo configure:9653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9654 if test -z "$ac_err"; then
9655   rm -rf conftest*
9656   eval "ac_cv_header_$ac_safe=yes"
9657 else
9658   echo "$ac_err" >&5
9659   echo "configure: failed program was:" >&5
9660   cat conftest.$ac_ext >&5
9661   rm -rf conftest*
9662   eval "ac_cv_header_$ac_safe=no"
9663 fi
9664 rm -f conftest*
9665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9666   echo "$ac_t""yes" 1>&6
9667   
9668             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9669             athena_h_path=Xaw3d
9670           
9671 else
9672   echo "$ac_t""no" 1>&6
9673 fi
9674
9675 else
9676   echo "$ac_t""no" 1>&6
9677 fi
9678
9679     fi
9680
9681             if test -z "$athena_h_path"; then
9682       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9683 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9684 echo "configure:9685: checking for X11/Xaw/ThreeD.h" >&5
9685
9686 cat > conftest.$ac_ext <<EOF
9687 #line 9688 "configure"
9688 #include "confdefs.h"
9689 #include <X11/Xaw/ThreeD.h>
9690 EOF
9691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9692 { (eval echo configure:9693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9694 if test -z "$ac_err"; then
9695   rm -rf conftest*
9696   eval "ac_cv_header_$ac_safe=yes"
9697 else
9698   echo "$ac_err" >&5
9699   echo "configure: failed program was:" >&5
9700   cat conftest.$ac_ext >&5
9701   rm -rf conftest*
9702   eval "ac_cv_header_$ac_safe=no"
9703 fi
9704 rm -f conftest*
9705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9706   echo "$ac_t""yes" 1>&6
9707   
9708           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9709           athena_h_path=X11/Xaw
9710         
9711 else
9712   echo "$ac_t""no" 1>&6
9713 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9714 fi
9715
9716     fi
9717   fi
9718
9719     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9720     have_xaw=yes
9721   else
9722     have_xaw=no
9723   fi
9724
9725 else
9726   have_xaw=no
9727 fi 
9728 if test "$with_x11" = "yes"; then
9729     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9730 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9731 echo "configure:9732: checking for Xm/Xm.h" >&5
9732
9733 cat > conftest.$ac_ext <<EOF
9734 #line 9735 "configure"
9735 #include "confdefs.h"
9736 #include <Xm/Xm.h>
9737 EOF
9738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9739 { (eval echo configure:9740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9741 if test -z "$ac_err"; then
9742   rm -rf conftest*
9743   eval "ac_cv_header_$ac_safe=yes"
9744 else
9745   echo "$ac_err" >&5
9746   echo "configure: failed program was:" >&5
9747   cat conftest.$ac_ext >&5
9748   rm -rf conftest*
9749   eval "ac_cv_header_$ac_safe=no"
9750 fi
9751 rm -f conftest*
9752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9753   echo "$ac_t""yes" 1>&6
9754   
9755 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9756 echo "configure:9757: checking for XmStringFree in -lXm" >&5
9757 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9758
9759 xe_check_libs=" -lXm "
9760 cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 /* Override any gcc2 internal prototype to avoid an error.  */
9764 /* We use char because int might match the return type of a gcc2
9765     builtin and then its argument prototype would still apply.  */
9766 char XmStringFree();
9767
9768 int main() {
9769 XmStringFree()
9770 ; return 0; }
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9773   rm -rf conftest*
9774   eval "ac_cv_lib_$ac_lib_var=yes"
9775 else
9776   echo "configure: failed program was:" >&5
9777   cat conftest.$ac_ext >&5
9778   rm -rf conftest*
9779   eval "ac_cv_lib_$ac_lib_var=no"
9780 fi
9781 rm -f conftest*
9782 xe_check_libs=""
9783
9784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9785   echo "$ac_t""yes" 1>&6
9786   have_motif=yes
9787 else
9788   echo "$ac_t""no" 1>&6
9789 have_motif=no
9790 fi
9791
9792
9793 else
9794   echo "$ac_t""no" 1>&6
9795 have_motif=no
9796 fi
9797
9798
9799   if test "$have_motif" = "yes"; then
9800         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9801 echo "configure:9802: checking for Lesstif" >&5
9802     cat > conftest.$ac_ext <<EOF
9803 #line 9804 "configure"
9804 #include "confdefs.h"
9805 #include <Xm/Xm.h>
9806 #ifdef LESSTIF_VERSION
9807 yes
9808 #endif
9809
9810 EOF
9811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9812   egrep "yes" >/dev/null 2>&1; then
9813   rm -rf conftest*
9814   have_lesstif=yes
9815 else
9816   rm -rf conftest*
9817   have_lesstif=no
9818 fi
9819 rm -f conftest*
9820
9821   echo "$ac_t""$have_lesstif" 1>&6
9822   fi
9823
9824 fi 
9825
9826 case "$opsys" in
9827   *linux* | cygwin* )  lucid_prefers_motif="no"  ;;
9828   * )        lucid_prefers_motif="yes" ;;
9829 esac
9830
9831 case "$with_menubars" in "" | "yes" | "athena" )
9832   with_menubars="lucid" ;;
9833 esac
9834 case "$with_dialogs" in "" | "yes" | "lucid" )
9835   if test "$lucid_prefers_motif" = "yes"; then
9836     if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9837     elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9838     else with_dialogs=no
9839     fi
9840   else
9841     if   test "$have_xaw"       = "yes"; then with_dialogs="athena"
9842     elif test "$have_motif"     = "yes"; then with_dialogs="motif"
9843     else with_dialogs=no
9844     fi
9845   fi ;;
9846 esac
9847 case "$with_scrollbars" in "" | "yes" )
9848   with_scrollbars="lucid" ;;
9849 esac
9850 case "$with_widgets" in
9851   "yes" | "lucid")
9852     if test "$lucid_prefers_motif" = "yes"; then
9853       if   test "$have_motif" = "yes"; then with_widgets="motif"
9854       elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9855       else with_widgets=no
9856       fi
9857     else
9858       if   test "$have_xaw"   = "yes"; then with_widgets="athena"
9859       elif test "$have_motif" = "yes"; then with_widgets="motif"
9860       else with_widgets=no
9861       fi
9862     fi ;;
9863   "" )
9864     with_widgets=no ;;
9865 esac
9866
9867 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9868
9869 case "$all_widgets" in
9870   *athena* )
9871     if test "$have_xaw" != "yes"; then
9872       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9873     fi
9874
9875         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9876
9877         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9878
9879                     { test "$extra_verbose" = "yes" && cat << EOF
9880     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9881 EOF
9882 cat >> confdefs.h <<EOF
9883 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9884 EOF
9885 }
9886
9887     { test "$extra_verbose" = "yes" && cat << EOF
9888     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9889 EOF
9890 cat >> confdefs.h <<EOF
9891 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9892 EOF
9893 }
9894
9895     { test "$extra_verbose" = "yes" && cat << EOF
9896     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9897 EOF
9898 cat >> confdefs.h <<EOF
9899 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9900 EOF
9901 }
9902
9903     { test "$extra_verbose" = "yes" && cat << EOF
9904     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9905 EOF
9906 cat >> confdefs.h <<EOF
9907 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9908 EOF
9909 }
9910
9911     { test "$extra_verbose" = "yes" && cat << EOF
9912     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9913 EOF
9914 cat >> confdefs.h <<EOF
9915 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9916 EOF
9917 }
9918
9919     { test "$extra_verbose" = "yes" && cat << EOF
9920     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9921 EOF
9922 cat >> confdefs.h <<EOF
9923 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9924 EOF
9925 }
9926
9927     { test "$extra_verbose" = "yes" && cat << EOF
9928     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9929 EOF
9930 cat >> confdefs.h <<EOF
9931 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9932 EOF
9933 }
9934
9935     { test "$extra_verbose" = "yes" && cat << EOF
9936     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9937 EOF
9938 cat >> confdefs.h <<EOF
9939 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9940 EOF
9941 }
9942
9943     { test "$extra_verbose" = "yes" && cat << EOF
9944     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9945 EOF
9946 cat >> confdefs.h <<EOF
9947 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9948 EOF
9949 }
9950
9951     { test "$extra_verbose" = "yes" && cat << EOF
9952     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9953 EOF
9954 cat >> confdefs.h <<EOF
9955 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9956 EOF
9957 }
9958
9959
9960     { test "$extra_verbose" = "yes" && cat << \EOF
9961     Defining LWLIB_USES_ATHENA
9962 EOF
9963 cat >> confdefs.h <<\EOF
9964 #define LWLIB_USES_ATHENA 1
9965 EOF
9966 }
9967
9968     { test "$extra_verbose" = "yes" && cat << \EOF
9969     Defining NEED_ATHENA
9970 EOF
9971 cat >> confdefs.h <<\EOF
9972 #define NEED_ATHENA 1
9973 EOF
9974 }
9975
9976     need_athena="yes"
9977
9978     if test "$athena_3d" = "yes"; then
9979       { test "$extra_verbose" = "yes" && cat << \EOF
9980     Defining HAVE_ATHENA_3D
9981 EOF
9982 cat >> confdefs.h <<\EOF
9983 #define HAVE_ATHENA_3D 1
9984 EOF
9985 }
9986
9987     fi
9988   ;;
9989 esac
9990
9991 case "$all_widgets" in *motif* )
9992   { test "$extra_verbose" = "yes" && cat << \EOF
9993     Defining LWLIB_USES_MOTIF
9994 EOF
9995 cat >> confdefs.h <<\EOF
9996 #define LWLIB_USES_MOTIF 1
9997 EOF
9998 }
9999
10000   { test "$extra_verbose" = "yes" && cat << \EOF
10001     Defining NEED_MOTIF
10002 EOF
10003 cat >> confdefs.h <<\EOF
10004 #define NEED_MOTIF 1
10005 EOF
10006 }
10007
10008   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
10009   need_motif=yes ;;
10010 esac
10011
10012 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
10013 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
10014 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
10015 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
10016         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
10017 case "$with_widgets" in athena* )
10018         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;;
10019 esac
10020 case "$all_widgets" in *lucid* )
10021   { test "$extra_verbose" = "yes" && cat << \EOF
10022     Defining NEED_LUCID
10023 EOF
10024 cat >> confdefs.h <<\EOF
10025 #define NEED_LUCID 1
10026 EOF
10027 }
10028
10029   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
10030 esac
10031
10032
10033
10034 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10035     Defining LWLIB_SCROLLBARS_ATHENA
10036 EOF
10037 cat >> confdefs.h <<\EOF
10038 #define LWLIB_SCROLLBARS_ATHENA 1
10039 EOF
10040 }
10041
10042 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10043     Defining LWLIB_DIALOGS_ATHENA
10044 EOF
10045 cat >> confdefs.h <<\EOF
10046 #define LWLIB_DIALOGS_ATHENA 1
10047 EOF
10048 }
10049
10050
10051 if test "$athena_3d" = "yes"; then
10052   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10053     Defining LWLIB_SCROLLBARS_ATHENA3D
10054 EOF
10055 cat >> confdefs.h <<\EOF
10056 #define LWLIB_SCROLLBARS_ATHENA3D 1
10057 EOF
10058 }
10059
10060   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
10061     Defining LWLIB_DIALOGS_ATHENA3D
10062 EOF
10063 cat >> confdefs.h <<\EOF
10064 #define LWLIB_DIALOGS_ATHENA3D 1
10065 EOF
10066 }
10067
10068 fi
10069
10070 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
10071     Defining LWLIB_WIDGETS_ATHENA
10072 EOF
10073 cat >> confdefs.h <<\EOF
10074 #define LWLIB_WIDGETS_ATHENA 1
10075 EOF
10076 }
10077 ;; esac
10078 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
10079         { test "$extra_verbose" = "yes" && cat << \EOF
10080     Defining LWLIB_TABS_LUCID
10081 EOF
10082 cat >> confdefs.h <<\EOF
10083 #define LWLIB_TABS_LUCID 1
10084 EOF
10085 }
10086
10087
10088 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10089     Defining HAVE_MENUBARS
10090 EOF
10091 cat >> confdefs.h <<\EOF
10092 #define HAVE_MENUBARS 1
10093 EOF
10094 }
10095
10096 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10097     Defining HAVE_SCROLLBARS
10098 EOF
10099 cat >> confdefs.h <<\EOF
10100 #define HAVE_SCROLLBARS 1
10101 EOF
10102 }
10103
10104 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10105     Defining HAVE_DIALOGS
10106 EOF
10107 cat >> confdefs.h <<\EOF
10108 #define HAVE_DIALOGS 1
10109 EOF
10110 }
10111
10112 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10113     Defining HAVE_TOOLBARS
10114 EOF
10115 cat >> confdefs.h <<\EOF
10116 #define HAVE_TOOLBARS 1
10117 EOF
10118 }
10119
10120 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
10121     Defining HAVE_WIDGETS
10122 EOF
10123 cat >> confdefs.h <<\EOF
10124 #define HAVE_WIDGETS 1
10125 EOF
10126 }
10127
10128
10129 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
10130     Defining LWLIB_MENUBARS_LUCID
10131 EOF
10132 cat >> confdefs.h <<\EOF
10133 #define LWLIB_MENUBARS_LUCID 1
10134 EOF
10135 }
10136
10137 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
10138     Defining LWLIB_SCROLLBARS_LUCID
10139 EOF
10140 cat >> confdefs.h <<\EOF
10141 #define LWLIB_SCROLLBARS_LUCID 1
10142 EOF
10143 }
10144
10145
10146 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10147     Defining LWLIB_MENUBARS_MOTIF
10148 EOF
10149 cat >> confdefs.h <<\EOF
10150 #define LWLIB_MENUBARS_MOTIF 1
10151 EOF
10152 }
10153
10154 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10155     Defining LWLIB_SCROLLBARS_MOTIF
10156 EOF
10157 cat >> confdefs.h <<\EOF
10158 #define LWLIB_SCROLLBARS_MOTIF 1
10159 EOF
10160 }
10161
10162 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10163     Defining LWLIB_DIALOGS_MOTIF
10164 EOF
10165 cat >> confdefs.h <<\EOF
10166 #define LWLIB_DIALOGS_MOTIF 1
10167 EOF
10168 }
10169
10170 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
10171     Defining LWLIB_WIDGETS_MOTIF
10172 EOF
10173 cat >> confdefs.h <<\EOF
10174 #define LWLIB_WIDGETS_MOTIF 1
10175 EOF
10176 }
10177
10178
10179 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
10180    echo "    xemacs will be linked with \"menubar.o\""
10181  fi
10182 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
10183    echo "    xemacs will be linked with \"scrollbar.o\""
10184  fi
10185 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
10186    echo "    xemacs will be linked with \"dialog.o\""
10187  fi
10188 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
10189    echo "    xemacs will be linked with \"toolbar.o\""
10190  fi
10191
10192 if test "$with_gtk" = "yes"; then
10193   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10194    echo "    xemacs will be linked with \"menubar-gtk.o\""
10195  fi
10196   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10197    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
10198  fi
10199   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10200    echo "    xemacs will be linked with \"dialog-gtk.o\""
10201  fi
10202   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10203    echo "    xemacs will be linked with \"toolbar-gtk.o\""
10204  fi
10205   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
10206    echo "    xemacs will be linked with \"gui-gtk.o\""
10207  fi
10208 fi
10209
10210 if test "$with_x11" = "yes"; then
10211   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
10212    echo "    xemacs will be linked with \"menubar-x.o\""
10213  fi
10214   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10215    echo "    xemacs will be linked with \"scrollbar-x.o\""
10216  fi
10217   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
10218    echo "    xemacs will be linked with \"dialog-x.o\""
10219  fi
10220   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
10221    echo "    xemacs will be linked with \"toolbar-x.o\""
10222  fi
10223   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
10224    echo "    xemacs will be linked with \"gui-x.o\""
10225  fi
10226 fi
10227
10228
10229 test -z "$with_mule" && with_mule=no
10230 test -z "$with_file_coding" && with_file_coding=no
10231
10232
10233 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
10234   { test "$extra_verbose" = "yes" && cat << \EOF
10235     Defining FILE_CODING
10236 EOF
10237 cat >> confdefs.h <<\EOF
10238 #define FILE_CODING 1
10239 EOF
10240 }
10241
10242   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10243    echo "    xemacs will be linked with \"file-coding.o\""
10244  fi
10245 fi
10246
10247 if test "$with_mule" = "yes" ; then
10248   echo "checking for Mule-related features" 1>&6
10249 echo "configure:10250: checking for Mule-related features" >&5
10250   { test "$extra_verbose" = "yes" && cat << \EOF
10251     Defining MULE
10252 EOF
10253 cat >> confdefs.h <<\EOF
10254 #define MULE 1
10255 EOF
10256 }
10257
10258   { test "$extra_verbose" = "yes" && cat << \EOF
10259     Defining FILE_CODING
10260 EOF
10261 cat >> confdefs.h <<\EOF
10262 #define FILE_CODING 1
10263 EOF
10264 }
10265
10266   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
10267    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
10268  fi
10269
10270     for ac_hdr in libintl.h
10271 do
10272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10274 echo "configure:10275: checking for $ac_hdr" >&5
10275
10276 cat > conftest.$ac_ext <<EOF
10277 #line 10278 "configure"
10278 #include "confdefs.h"
10279 #include <$ac_hdr>
10280 EOF
10281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10282 { (eval echo configure:10283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10284 if test -z "$ac_err"; then
10285   rm -rf conftest*
10286   eval "ac_cv_header_$ac_safe=yes"
10287 else
10288   echo "$ac_err" >&5
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_header_$ac_safe=no"
10293 fi
10294 rm -f conftest*
10295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10296   echo "$ac_t""yes" 1>&6
10297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10298   { test "$extra_verbose" = "yes" && cat << EOF
10299     Defining $ac_tr_hdr
10300 EOF
10301 cat >> confdefs.h <<EOF
10302 #define $ac_tr_hdr 1
10303 EOF
10304 }
10305  
10306 else
10307   echo "$ac_t""no" 1>&6
10308 fi
10309 done
10310
10311   
10312 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
10313 echo "configure:10314: checking for strerror in -lintl" >&5
10314 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
10315
10316 xe_check_libs=" -lintl "
10317 cat > conftest.$ac_ext <<EOF
10318 #line 10319 "configure"
10319 #include "confdefs.h"
10320 /* Override any gcc2 internal prototype to avoid an error.  */
10321 /* We use char because int might match the return type of a gcc2
10322     builtin and then its argument prototype would still apply.  */
10323 char strerror();
10324
10325 int main() {
10326 strerror()
10327 ; return 0; }
10328 EOF
10329 if { (eval echo configure:10330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10330   rm -rf conftest*
10331   eval "ac_cv_lib_$ac_lib_var=yes"
10332 else
10333   echo "configure: failed program was:" >&5
10334   cat conftest.$ac_ext >&5
10335   rm -rf conftest*
10336   eval "ac_cv_lib_$ac_lib_var=no"
10337 fi
10338 rm -f conftest*
10339 xe_check_libs=""
10340
10341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10342   echo "$ac_t""yes" 1>&6
10343     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10345   { test "$extra_verbose" = "yes" && cat << EOF
10346     Defining $ac_tr_lib
10347 EOF
10348 cat >> confdefs.h <<EOF
10349 #define $ac_tr_lib 1
10350 EOF
10351 }
10352
10353   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
10354
10355 else
10356   echo "$ac_t""no" 1>&6
10357 fi
10358
10359
10360
10361   echo "checking for Mule input methods" 1>&6
10362 echo "configure:10363: checking for Mule input methods" >&5
10363         case "$with_xim" in "" | "yes" )
10364     echo "checking for XIM" 1>&6
10365 echo "configure:10366: checking for XIM" >&5
10366     
10367 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10368 echo "configure:10369: checking for XOpenIM in -lX11" >&5
10369 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10370
10371 xe_check_libs=" -lX11 "
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 XOpenIM();
10379
10380 int main() {
10381 XOpenIM()
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   with_xim=xlib
10399 else
10400   echo "$ac_t""no" 1>&6
10401 with_xim=no
10402 fi
10403
10404
10405             if test "$need_motif $have_lesstif" = "yes no"; then
10406       
10407 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10408 echo "configure:10409: checking for XmImMbLookupString in -lXm" >&5
10409 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10410
10411 xe_check_libs=" -lXm "
10412 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 /* Override any gcc2 internal prototype to avoid an error.  */
10416 /* We use char because int might match the return type of a gcc2
10417     builtin and then its argument prototype would still apply.  */
10418 char XmImMbLookupString();
10419
10420 int main() {
10421 XmImMbLookupString()
10422 ; return 0; }
10423 EOF
10424 if { (eval echo configure:10425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10425   rm -rf conftest*
10426   eval "ac_cv_lib_$ac_lib_var=yes"
10427 else
10428   echo "configure: failed program was:" >&5
10429   cat conftest.$ac_ext >&5
10430   rm -rf conftest*
10431   eval "ac_cv_lib_$ac_lib_var=no"
10432 fi
10433 rm -f conftest*
10434 xe_check_libs=""
10435
10436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10437   echo "$ac_t""yes" 1>&6
10438   with_xim=motif
10439 else
10440   echo "$ac_t""no" 1>&6
10441 fi
10442
10443
10444     elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
10445       
10446 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10447 echo "configure:10448: checking for XmImMbLookupString in -lXm" >&5
10448 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10449
10450 xe_check_libs=" -lXm "
10451 cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 /* Override any gcc2 internal prototype to avoid an error.  */
10455 /* We use char because int might match the return type of a gcc2
10456     builtin and then its argument prototype would still apply.  */
10457 char XmImMbLookupString();
10458
10459 int main() {
10460 XmImMbLookupString()
10461 ; return 0; }
10462 EOF
10463 if { (eval echo configure:10464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10464   rm -rf conftest*
10465   eval "ac_cv_lib_$ac_lib_var=yes"
10466 else
10467   echo "configure: failed program was:" >&5
10468   cat conftest.$ac_ext >&5
10469   rm -rf conftest*
10470   eval "ac_cv_lib_$ac_lib_var=no"
10471 fi
10472 rm -f conftest*
10473 xe_check_libs=""
10474
10475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10476   echo "$ac_t""yes" 1>&6
10477   with_xim=motif
10478 else
10479   echo "$ac_t""no" 1>&6
10480 fi
10481
10482
10483     fi ;;
10484   esac
10485   if test "$with_xim" != "no"; then
10486     { test "$extra_verbose" = "yes" && cat << \EOF
10487     Defining HAVE_XIM
10488 EOF
10489 cat >> confdefs.h <<\EOF
10490 #define HAVE_XIM 1
10491 EOF
10492 }
10493
10494     if test "$with_xim" = "xlib"; then
10495       { test "$extra_verbose" = "yes" && cat << \EOF
10496     Defining XIM_XLIB
10497 EOF
10498 cat >> confdefs.h <<\EOF
10499 #define XIM_XLIB 1
10500 EOF
10501 }
10502
10503       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10504    echo "    xemacs will be linked with \"input-method-xlib.o\""
10505  fi
10506     fi
10507     if test "$with_xim" = "motif"; then
10508       { test "$extra_verbose" = "yes" && cat << \EOF
10509     Defining XIM_MOTIF
10510 EOF
10511 cat >> confdefs.h <<\EOF
10512 #define XIM_MOTIF 1
10513 EOF
10514 }
10515
10516       need_motif=yes
10517       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10518    echo "    xemacs will be linked with \"input-method-motif.o\""
10519  fi
10520     fi
10521     if test "$with_xim" = "motif"; then
10522       with_xfs=no
10523     fi
10524   fi
10525
10526     if test "$with_xfs" = "yes" ; then
10527     echo "checking for XFontSet" 1>&6
10528 echo "configure:10529: checking for XFontSet" >&5
10529     
10530 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10531 echo "configure:10532: checking for XmbDrawString in -lX11" >&5
10532 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10533
10534 xe_check_libs=" -lX11 "
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538 /* Override any gcc2 internal prototype to avoid an error.  */
10539 /* We use char because int might match the return type of a gcc2
10540     builtin and then its argument prototype would still apply.  */
10541 char XmbDrawString();
10542
10543 int main() {
10544 XmbDrawString()
10545 ; return 0; }
10546 EOF
10547 if { (eval echo configure:10548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10548   rm -rf conftest*
10549   eval "ac_cv_lib_$ac_lib_var=yes"
10550 else
10551   echo "configure: failed program was:" >&5
10552   cat conftest.$ac_ext >&5
10553   rm -rf conftest*
10554   eval "ac_cv_lib_$ac_lib_var=no"
10555 fi
10556 rm -f conftest*
10557 xe_check_libs=""
10558
10559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10560   echo "$ac_t""yes" 1>&6
10561   :
10562 else
10563   echo "$ac_t""no" 1>&6
10564 with_xfs=no
10565 fi
10566
10567
10568     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10569       { test "$extra_verbose" = "yes" && cat << \EOF
10570     Defining USE_XFONTSET
10571 EOF
10572 cat >> confdefs.h <<\EOF
10573 #define USE_XFONTSET 1
10574 EOF
10575 }
10576
10577       if test "$with_xim" = "no" ; then
10578         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10579    echo "    xemacs will be linked with \"input-method-xlib.o\""
10580  fi
10581       fi
10582     fi
10583   fi 
10584     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10585   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10586 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10587 echo "configure:10588: checking for wnn/jllib.h" >&5
10588
10589 cat > conftest.$ac_ext <<EOF
10590 #line 10591 "configure"
10591 #include "confdefs.h"
10592 #include <wnn/jllib.h>
10593 EOF
10594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10595 { (eval echo configure:10596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10597 if test -z "$ac_err"; then
10598   rm -rf conftest*
10599   eval "ac_cv_header_$ac_safe=yes"
10600 else
10601   echo "$ac_err" >&5
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   eval "ac_cv_header_$ac_safe=no"
10606 fi
10607 rm -f conftest*
10608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10609   echo "$ac_t""yes" 1>&6
10610   :
10611 else
10612   echo "$ac_t""no" 1>&6
10613 with_wnn=no
10614 fi
10615  }
10616     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10617 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10618 echo "configure:10619: checking for wnn/commonhd.h" >&5
10619
10620 cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 #include <wnn/commonhd.h>
10624 EOF
10625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10626 { (eval echo configure:10627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10628 if test -z "$ac_err"; then
10629   rm -rf conftest*
10630   eval "ac_cv_header_$ac_safe=yes"
10631 else
10632   echo "$ac_err" >&5
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_header_$ac_safe=no"
10637 fi
10638 rm -f conftest*
10639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641   :
10642 else
10643   echo "$ac_t""no" 1>&6
10644 with_wnn=no
10645 fi
10646  }
10647     if test "$with_wnn" != "no"; then
10648     for ac_func in crypt
10649 do
10650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10651 echo "configure:10652: checking for $ac_func" >&5
10652
10653 cat > conftest.$ac_ext <<EOF
10654 #line 10655 "configure"
10655 #include "confdefs.h"
10656 /* System header to define __stub macros and hopefully few prototypes,
10657     which can conflict with char $ac_func(); below.  */
10658 #include <assert.h>
10659 /* Override any gcc2 internal prototype to avoid an error.  */
10660 /* We use char because int might match the return type of a gcc2
10661     builtin and then its argument prototype would still apply.  */
10662 char $ac_func();
10663
10664 int main() {
10665
10666 /* The GNU C library defines this for functions which it implements
10667     to always fail with ENOSYS.  Some functions are actually named
10668     something starting with __ and the normal name is an alias.  */
10669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10670 choke me
10671 #else
10672 $ac_func();
10673 #endif
10674
10675 ; return 0; }
10676 EOF
10677 if { (eval echo configure:10678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10678   rm -rf conftest*
10679   eval "ac_cv_func_$ac_func=yes"
10680 else
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_func_$ac_func=no"
10685 fi
10686 rm -f conftest*
10687
10688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10691   { test "$extra_verbose" = "yes" && cat << EOF
10692     Defining $ac_tr_func
10693 EOF
10694 cat >> confdefs.h <<EOF
10695 #define $ac_tr_func 1
10696 EOF
10697 }
10698  
10699 else
10700   echo "$ac_t""no" 1>&6
10701 fi
10702 done
10703
10704     test "$ac_cv_func_crypt" != "yes" && { 
10705 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10706 echo "configure:10707: checking for crypt in -lcrypt" >&5
10707 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10708
10709 xe_check_libs=" -lcrypt "
10710 cat > conftest.$ac_ext <<EOF
10711 #line 10712 "configure"
10712 #include "confdefs.h"
10713 /* Override any gcc2 internal prototype to avoid an error.  */
10714 /* We use char because int might match the return type of a gcc2
10715     builtin and then its argument prototype would still apply.  */
10716 char crypt();
10717
10718 int main() {
10719 crypt()
10720 ; return 0; }
10721 EOF
10722 if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10723   rm -rf conftest*
10724   eval "ac_cv_lib_$ac_lib_var=yes"
10725 else
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -rf conftest*
10729   eval "ac_cv_lib_$ac_lib_var=no"
10730 fi
10731 rm -f conftest*
10732 xe_check_libs=""
10733
10734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10735   echo "$ac_t""yes" 1>&6
10736     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10737     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10738   { test "$extra_verbose" = "yes" && cat << EOF
10739     Defining $ac_tr_lib
10740 EOF
10741 cat >> confdefs.h <<EOF
10742 #define $ac_tr_lib 1
10743 EOF
10744 }
10745
10746   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10747
10748 else
10749   echo "$ac_t""no" 1>&6
10750 fi
10751
10752  }
10753   fi
10754     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10755     
10756 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10757 echo "configure:10758: checking for jl_dic_list_e in -lwnn" >&5
10758 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10759
10760 xe_check_libs=" -lwnn "
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 jl_dic_list_e();
10768
10769 int main() {
10770 jl_dic_list_e()
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   libwnn=wnn
10788 else
10789   echo "$ac_t""no" 1>&6
10790 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10791 echo "configure:10792: checking for jl_dic_list_e in -lwnn4" >&5
10792 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10793
10794 xe_check_libs=" -lwnn4 "
10795 cat > conftest.$ac_ext <<EOF
10796 #line 10797 "configure"
10797 #include "confdefs.h"
10798 /* Override any gcc2 internal prototype to avoid an error.  */
10799 /* We use char because int might match the return type of a gcc2
10800     builtin and then its argument prototype would still apply.  */
10801 char jl_dic_list_e();
10802
10803 int main() {
10804 jl_dic_list_e()
10805 ; return 0; }
10806 EOF
10807 if { (eval echo configure:10808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10808   rm -rf conftest*
10809   eval "ac_cv_lib_$ac_lib_var=yes"
10810 else
10811   echo "configure: failed program was:" >&5
10812   cat conftest.$ac_ext >&5
10813   rm -rf conftest*
10814   eval "ac_cv_lib_$ac_lib_var=no"
10815 fi
10816 rm -f conftest*
10817 xe_check_libs=""
10818
10819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10820   echo "$ac_t""yes" 1>&6
10821   libwnn=wnn4
10822 else
10823   echo "$ac_t""no" 1>&6
10824 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10825 echo "configure:10826: checking for jl_dic_list_e in -lwnn6" >&5
10826 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10827
10828 xe_check_libs=" -lwnn6 "
10829 cat > conftest.$ac_ext <<EOF
10830 #line 10831 "configure"
10831 #include "confdefs.h"
10832 /* Override any gcc2 internal prototype to avoid an error.  */
10833 /* We use char because int might match the return type of a gcc2
10834     builtin and then its argument prototype would still apply.  */
10835 char jl_dic_list_e();
10836
10837 int main() {
10838 jl_dic_list_e()
10839 ; return 0; }
10840 EOF
10841 if { (eval echo configure:10842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10842   rm -rf conftest*
10843   eval "ac_cv_lib_$ac_lib_var=yes"
10844 else
10845   echo "configure: failed program was:" >&5
10846   cat conftest.$ac_ext >&5
10847   rm -rf conftest*
10848   eval "ac_cv_lib_$ac_lib_var=no"
10849 fi
10850 rm -f conftest*
10851 xe_check_libs=""
10852
10853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10854   echo "$ac_t""yes" 1>&6
10855   libwnn=wnn6
10856 else
10857   echo "$ac_t""no" 1>&6
10858 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10859 echo "configure:10860: checking for dic_list_e in -lwnn6_fromsrc" >&5
10860 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10861
10862 xe_check_libs=" -lwnn6_fromsrc "
10863 cat > conftest.$ac_ext <<EOF
10864 #line 10865 "configure"
10865 #include "confdefs.h"
10866 /* Override any gcc2 internal prototype to avoid an error.  */
10867 /* We use char because int might match the return type of a gcc2
10868     builtin and then its argument prototype would still apply.  */
10869 char dic_list_e();
10870
10871 int main() {
10872 dic_list_e()
10873 ; return 0; }
10874 EOF
10875 if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10876   rm -rf conftest*
10877   eval "ac_cv_lib_$ac_lib_var=yes"
10878 else
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   eval "ac_cv_lib_$ac_lib_var=no"
10883 fi
10884 rm -f conftest*
10885 xe_check_libs=""
10886
10887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10888   echo "$ac_t""yes" 1>&6
10889   libwnn=wnn6_fromsrc
10890 else
10891   echo "$ac_t""no" 1>&6
10892 with_wnn=no
10893 fi
10894
10895
10896 fi
10897
10898
10899 fi
10900
10901
10902 fi
10903
10904
10905   fi
10906   test -z "$with_wnn" && with_wnn=yes
10907   if test "$with_wnn" = "yes"; then
10908     { test "$extra_verbose" = "yes" && cat << \EOF
10909     Defining HAVE_WNN
10910 EOF
10911 cat >> confdefs.h <<\EOF
10912 #define HAVE_WNN 1
10913 EOF
10914 }
10915
10916     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10917     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10918    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10919  fi
10920     if test "$with_wnn6" != "no"; then
10921       
10922 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10923 echo "configure:10924: checking for jl_fi_dic_list in -l$libwnn" >&5
10924 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10925
10926 xe_check_libs=" -l$libwnn "
10927 cat > conftest.$ac_ext <<EOF
10928 #line 10929 "configure"
10929 #include "confdefs.h"
10930 /* Override any gcc2 internal prototype to avoid an error.  */
10931 /* We use char because int might match the return type of a gcc2
10932     builtin and then its argument prototype would still apply.  */
10933 char jl_fi_dic_list();
10934
10935 int main() {
10936 jl_fi_dic_list()
10937 ; return 0; }
10938 EOF
10939 if { (eval echo configure:10940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10940   rm -rf conftest*
10941   eval "ac_cv_lib_$ac_lib_var=yes"
10942 else
10943   echo "configure: failed program was:" >&5
10944   cat conftest.$ac_ext >&5
10945   rm -rf conftest*
10946   eval "ac_cv_lib_$ac_lib_var=no"
10947 fi
10948 rm -f conftest*
10949 xe_check_libs=""
10950
10951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10952   echo "$ac_t""yes" 1>&6
10953   with_wnn6=yes
10954 else
10955   echo "$ac_t""no" 1>&6
10956 fi
10957
10958
10959       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10960     Defining WNN6
10961 EOF
10962 cat >> confdefs.h <<\EOF
10963 #define WNN6 1
10964 EOF
10965 }
10966
10967     fi
10968   fi
10969
10970     canna_includes_found=no
10971   if test "$with_canna" != "no"; then
10972     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10973 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10974 echo "configure:10975: checking for canna/jrkanji.h" >&5
10975
10976 cat > conftest.$ac_ext <<EOF
10977 #line 10978 "configure"
10978 #include "confdefs.h"
10979 #include <canna/jrkanji.h>
10980 EOF
10981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10982 { (eval echo configure:10983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10984 if test -z "$ac_err"; then
10985   rm -rf conftest*
10986   eval "ac_cv_header_$ac_safe=yes"
10987 else
10988   echo "$ac_err" >&5
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -rf conftest*
10992   eval "ac_cv_header_$ac_safe=no"
10993 fi
10994 rm -f conftest*
10995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10996   echo "$ac_t""yes" 1>&6
10997   canna_includes_found=yes
10998 else
10999   echo "$ac_t""no" 1>&6
11000 fi
11001
11002   fi
11003   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
11004       -d "/usr/local/canna/include"; then
11005     save_c_switch_site="$c_switch_site"
11006     c_switch_site="$c_switch_site -I/usr/local/canna/include"
11007     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
11008 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
11009 echo "configure:11010: checking for canna/jrkanji.h" >&5
11010
11011 cat > conftest.$ac_ext <<EOF
11012 #line 11013 "configure"
11013 #include "confdefs.h"
11014 #include <canna/jrkanji.h>
11015 EOF
11016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11017 { (eval echo configure:11018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11019 if test -z "$ac_err"; then
11020   rm -rf conftest*
11021   eval "ac_cv_header_$ac_safe=yes"
11022 else
11023   echo "$ac_err" >&5
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -rf conftest*
11027   eval "ac_cv_header_$ac_safe=no"
11028 fi
11029 rm -f conftest*
11030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11031   echo "$ac_t""yes" 1>&6
11032   canna_includes_found=yes
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036
11037     if test "$canna_includes_found" != "yes"; then
11038       c_switch_site="$save_c_switch_site"
11039       with_canna="no"
11040     fi
11041   fi
11042
11043   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
11045 echo "configure:11046: checking for canna/RK.h" >&5
11046
11047 cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050 #include <canna/RK.h>
11051 EOF
11052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11053 { (eval echo configure:11054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11055 if test -z "$ac_err"; then
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=yes"
11058 else
11059   echo "$ac_err" >&5
11060   echo "configure: failed program was:" >&5
11061   cat conftest.$ac_ext >&5
11062   rm -rf conftest*
11063   eval "ac_cv_header_$ac_safe=no"
11064 fi
11065 rm -f conftest*
11066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11067   echo "$ac_t""yes" 1>&6
11068   :
11069 else
11070   echo "$ac_t""no" 1>&6
11071 with_canna=no
11072 fi
11073  }
11074   test -z "$with_canna" && { 
11075 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
11076 echo "configure:11077: checking for RkBgnBun in -lRKC" >&5
11077 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
11078
11079 xe_check_libs=" -lRKC "
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 /* Override any gcc2 internal prototype to avoid an error.  */
11084 /* We use char because int might match the return type of a gcc2
11085     builtin and then its argument prototype would still apply.  */
11086 char RkBgnBun();
11087
11088 int main() {
11089 RkBgnBun()
11090 ; return 0; }
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11093   rm -rf conftest*
11094   eval "ac_cv_lib_$ac_lib_var=yes"
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -rf conftest*
11099   eval "ac_cv_lib_$ac_lib_var=no"
11100 fi
11101 rm -f conftest*
11102 xe_check_libs=""
11103
11104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11105   echo "$ac_t""yes" 1>&6
11106   :
11107 else
11108   echo "$ac_t""no" 1>&6
11109 with_canna=no
11110 fi
11111
11112  }
11113   test -z "$with_canna" && { 
11114 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
11115 echo "configure:11116: checking for jrKanjiControl in -lcanna" >&5
11116 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
11117
11118 xe_check_libs=" -lcanna "
11119 cat > conftest.$ac_ext <<EOF
11120 #line 11121 "configure"
11121 #include "confdefs.h"
11122 /* Override any gcc2 internal prototype to avoid an error.  */
11123 /* We use char because int might match the return type of a gcc2
11124     builtin and then its argument prototype would still apply.  */
11125 char jrKanjiControl();
11126
11127 int main() {
11128 jrKanjiControl()
11129 ; return 0; }
11130 EOF
11131 if { (eval echo configure:11132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11132   rm -rf conftest*
11133   eval "ac_cv_lib_$ac_lib_var=yes"
11134 else
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -rf conftest*
11138   eval "ac_cv_lib_$ac_lib_var=no"
11139 fi
11140 rm -f conftest*
11141 xe_check_libs=""
11142
11143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11144   echo "$ac_t""yes" 1>&6
11145   :
11146 else
11147   echo "$ac_t""no" 1>&6
11148 with_canna=no
11149 fi
11150
11151  }
11152   test -z "$with_canna" && with_canna=yes
11153   if test "$with_canna" = "yes"; then
11154     { test "$extra_verbose" = "yes" && cat << \EOF
11155     Defining HAVE_CANNA
11156 EOF
11157 cat >> confdefs.h <<\EOF
11158 #define HAVE_CANNA 1
11159 EOF
11160 }
11161
11162     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
11163     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
11164    echo "    xemacs will be linked with \"mule-canna.o\""
11165  fi
11166   fi
11167
11168 else   for feature in xim canna wnn; do
11169     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11170       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
11171     fi
11172     eval "with_${feature}=no"
11173   done
11174 fi 
11175
11176 if test "$need_motif" = "yes" ; then
11177   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
11178     
11179 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
11180 echo "configure:11181: checking for layout_object_getvalue in -li18n" >&5
11181 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
11182
11183 xe_check_libs=" -li18n "
11184 cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187 /* Override any gcc2 internal prototype to avoid an error.  */
11188 /* We use char because int might match the return type of a gcc2
11189     builtin and then its argument prototype would still apply.  */
11190 char layout_object_getvalue();
11191
11192 int main() {
11193 layout_object_getvalue()
11194 ; return 0; }
11195 EOF
11196 if { (eval echo configure:11197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11197   rm -rf conftest*
11198   eval "ac_cv_lib_$ac_lib_var=yes"
11199 else
11200   echo "configure: failed program was:" >&5
11201   cat conftest.$ac_ext >&5
11202   rm -rf conftest*
11203   eval "ac_cv_lib_$ac_lib_var=no"
11204 fi
11205 rm -f conftest*
11206 xe_check_libs=""
11207
11208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11209   echo "$ac_t""yes" 1>&6
11210   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
11211 else
11212   echo "$ac_t""no" 1>&6
11213 fi
11214
11215
11216   
11217 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
11218     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11219   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
11220   
11221         runpath="" runpath_dirs=""
11222   if test -n "$LD_RUN_PATH"; then
11223     runpath="$LD_RUN_PATH"
11224   elif test "$GCC" = "yes"; then
11225         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
11226     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
11227     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
11228     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
11229       case "$arg" in P,* | -L* | -R* )
11230         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
11231           {
11232 xe_runpath_dir="$dir"
11233   test "$xe_runpath_dir" != "/lib"     -a \
11234         "$xe_runpath_dir" != "/usr/lib" -a \
11235         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11236   eval "$xe_add_unique_runpath_dir"
11237 }
11238         done ;;
11239       esac
11240     done
11241     ld_switch_run="$ld_switch_run_save"
11242     rm -f conftest*
11243   else
11244         for arg in $ld_switch_site $ld_switch_x_site; do
11245       case "$arg" in -L*) {
11246 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
11247   test "$xe_runpath_dir" != "/lib"     -a \
11248         "$xe_runpath_dir" != "/usr/lib" -a \
11249         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
11250   eval "$xe_add_unique_runpath_dir"
11251 };; esac
11252     done
11253             if test "$opsys $need_motif" = "sol2 yes"; then
11254       xe_runpath_dir="/opt/SUNWdt/lib";
11255       eval "$xe_add_unique_runpath_dir";
11256     fi
11257   fi 
11258   if test -n "$runpath"; then
11259     ld_switch_run="${dash_r}${runpath}"
11260     
11261 if test "$GCC" = "yes"; then
11262   set x $ld_switch_run; shift; ld_switch_run=""
11263   while test -n "$1"; do
11264     case $1 in
11265       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
11266       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
11267       -Xlinker* ) ;;
11268       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
11269     esac
11270     shift
11271   done
11272 fi
11273     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
11274   fi
11275 fi
11276
11277 fi
11278
11279
11280 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
11281 do
11282 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11283 echo "configure:11284: checking for $ac_func" >&5
11284
11285 cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 /* System header to define __stub macros and hopefully few prototypes,
11289     which can conflict with char $ac_func(); below.  */
11290 #include <assert.h>
11291 /* Override any gcc2 internal prototype to avoid an error.  */
11292 /* We use char because int might match the return type of a gcc2
11293     builtin and then its argument prototype would still apply.  */
11294 char $ac_func();
11295
11296 int main() {
11297
11298 /* The GNU C library defines this for functions which it implements
11299     to always fail with ENOSYS.  Some functions are actually named
11300     something starting with __ and the normal name is an alias.  */
11301 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11302 choke me
11303 #else
11304 $ac_func();
11305 #endif
11306
11307 ; return 0; }
11308 EOF
11309 if { (eval echo configure:11310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11310   rm -rf conftest*
11311   eval "ac_cv_func_$ac_func=yes"
11312 else
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_func_$ac_func=no"
11317 fi
11318 rm -f conftest*
11319
11320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11323   { test "$extra_verbose" = "yes" && cat << EOF
11324     Defining $ac_tr_func
11325 EOF
11326 cat >> confdefs.h <<EOF
11327 #define $ac_tr_func 1
11328 EOF
11329 }
11330  
11331 else
11332   echo "$ac_t""no" 1>&6
11333 fi
11334 done
11335
11336
11337 if test "$ac_cv_func_getaddrinfo" != "no" ; then
11338   case "$opsys" in
11339     hpux11* )
11340       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
11341       ac_cv_func_getaddrinfo=no
11342       ;;
11343   esac
11344 fi
11345
11346
11347 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
11348 do
11349 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11350 echo "configure:11351: checking for $ac_func" >&5
11351
11352 cat > conftest.$ac_ext <<EOF
11353 #line 11354 "configure"
11354 #include "confdefs.h"
11355 /* System header to define __stub macros and hopefully few prototypes,
11356     which can conflict with char $ac_func(); below.  */
11357 #include <assert.h>
11358 /* Override any gcc2 internal prototype to avoid an error.  */
11359 /* We use char because int might match the return type of a gcc2
11360     builtin and then its argument prototype would still apply.  */
11361 char $ac_func();
11362
11363 int main() {
11364
11365 /* The GNU C library defines this for functions which it implements
11366     to always fail with ENOSYS.  Some functions are actually named
11367     something starting with __ and the normal name is an alias.  */
11368 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11369 choke me
11370 #else
11371 $ac_func();
11372 #endif
11373
11374 ; return 0; }
11375 EOF
11376 if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11377   rm -rf conftest*
11378   eval "ac_cv_func_$ac_func=yes"
11379 else
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -rf conftest*
11383   eval "ac_cv_func_$ac_func=no"
11384 fi
11385 rm -f conftest*
11386
11387 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11388   echo "$ac_t""yes" 1>&6
11389     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11390   { test "$extra_verbose" = "yes" && cat << EOF
11391     Defining $ac_tr_func
11392 EOF
11393 cat >> confdefs.h <<EOF
11394 #define $ac_tr_func 1
11395 EOF
11396 }
11397  
11398 else
11399   echo "$ac_t""no" 1>&6
11400 fi
11401 done
11402
11403
11404 echo $ac_n "checking for openpty""... $ac_c" 1>&6
11405 echo "configure:11406: checking for openpty" >&5
11406
11407 cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 /* System header to define __stub macros and hopefully few prototypes,
11411     which can conflict with char openpty(); below.  */
11412 #include <assert.h>
11413 /* Override any gcc2 internal prototype to avoid an error.  */
11414 /* We use char because int might match the return type of a gcc2
11415     builtin and then its argument prototype would still apply.  */
11416 char openpty();
11417
11418 int main() {
11419
11420 /* The GNU C library defines this for functions which it implements
11421     to always fail with ENOSYS.  Some functions are actually named
11422     something starting with __ and the normal name is an alias.  */
11423 #if defined (__stub_openpty) || defined (__stub___openpty)
11424 choke me
11425 #else
11426 openpty();
11427 #endif
11428
11429 ; return 0; }
11430 EOF
11431 if { (eval echo configure:11432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11432   rm -rf conftest*
11433   eval "ac_cv_func_openpty=yes"
11434 else
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   eval "ac_cv_func_openpty=no"
11439 fi
11440 rm -f conftest*
11441
11442 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11443   echo "$ac_t""yes" 1>&6
11444   have_openpty=yes
11445 else
11446   echo "$ac_t""no" 1>&6
11447
11448   
11449 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11450 echo "configure:11451: checking for openpty in -lutil" >&5
11451 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11452
11453 xe_check_libs=" -lutil "
11454 cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 /* Override any gcc2 internal prototype to avoid an error.  */
11458 /* We use char because int might match the return type of a gcc2
11459     builtin and then its argument prototype would still apply.  */
11460 char openpty();
11461
11462 int main() {
11463 openpty()
11464 ; return 0; }
11465 EOF
11466 if { (eval echo configure:11467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11467   rm -rf conftest*
11468   eval "ac_cv_lib_$ac_lib_var=yes"
11469 else
11470   echo "configure: failed program was:" >&5
11471   cat conftest.$ac_ext >&5
11472   rm -rf conftest*
11473   eval "ac_cv_lib_$ac_lib_var=no"
11474 fi
11475 rm -f conftest*
11476 xe_check_libs=""
11477
11478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11479   echo "$ac_t""yes" 1>&6
11480   have_openpty=yes need_libutil=yes
11481 else
11482   echo "$ac_t""no" 1>&6
11483 fi
11484
11485
11486 fi
11487
11488 if test "$have_openpty" = "yes"; then
11489   { test "$extra_verbose" = "yes" && cat << \EOF
11490     Defining HAVE_OPENPTY
11491 EOF
11492 cat >> confdefs.h <<\EOF
11493 #define HAVE_OPENPTY 1
11494 EOF
11495 }
11496
11497   for ac_hdr in pty.h libutil.h util.h
11498 do
11499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11501 echo "configure:11502: checking for $ac_hdr" >&5
11502
11503 cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 #include <$ac_hdr>
11507 EOF
11508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11509 { (eval echo configure:11510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11511 if test -z "$ac_err"; then
11512   rm -rf conftest*
11513   eval "ac_cv_header_$ac_safe=yes"
11514 else
11515   echo "$ac_err" >&5
11516   echo "configure: failed program was:" >&5
11517   cat conftest.$ac_ext >&5
11518   rm -rf conftest*
11519   eval "ac_cv_header_$ac_safe=no"
11520 fi
11521 rm -f conftest*
11522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11523   echo "$ac_t""yes" 1>&6
11524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11525   { test "$extra_verbose" = "yes" && cat << EOF
11526     Defining $ac_tr_hdr
11527 EOF
11528 cat >> confdefs.h <<EOF
11529 #define $ac_tr_hdr 1
11530 EOF
11531 }
11532  break
11533 else
11534   echo "$ac_t""no" 1>&6
11535 fi
11536 done
11537
11538   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11539 fi
11540
11541 for ac_hdr in stropts.h
11542 do
11543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11544 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11545 echo "configure:11546: checking for $ac_hdr" >&5
11546
11547 cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 #include <$ac_hdr>
11551 EOF
11552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11553 { (eval echo configure:11554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11555 if test -z "$ac_err"; then
11556   rm -rf conftest*
11557   eval "ac_cv_header_$ac_safe=yes"
11558 else
11559   echo "$ac_err" >&5
11560   echo "configure: failed program was:" >&5
11561   cat conftest.$ac_ext >&5
11562   rm -rf conftest*
11563   eval "ac_cv_header_$ac_safe=no"
11564 fi
11565 rm -f conftest*
11566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11567   echo "$ac_t""yes" 1>&6
11568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11569   { test "$extra_verbose" = "yes" && cat << EOF
11570     Defining $ac_tr_hdr
11571 EOF
11572 cat >> confdefs.h <<EOF
11573 #define $ac_tr_hdr 1
11574 EOF
11575 }
11576  
11577 else
11578   echo "$ac_t""no" 1>&6
11579 fi
11580 done
11581
11582 if test "$ac_cv_header_stropts_h" = "yes"; then
11583   for ac_func in isastream
11584 do
11585 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11586 echo "configure:11587: checking for $ac_func" >&5
11587
11588 cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591 /* System header to define __stub macros and hopefully few prototypes,
11592     which can conflict with char $ac_func(); below.  */
11593 #include <assert.h>
11594 /* Override any gcc2 internal prototype to avoid an error.  */
11595 /* We use char because int might match the return type of a gcc2
11596     builtin and then its argument prototype would still apply.  */
11597 char $ac_func();
11598
11599 int main() {
11600
11601 /* The GNU C library defines this for functions which it implements
11602     to always fail with ENOSYS.  Some functions are actually named
11603     something starting with __ and the normal name is an alias.  */
11604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11605 choke me
11606 #else
11607 $ac_func();
11608 #endif
11609
11610 ; return 0; }
11611 EOF
11612 if { (eval echo configure:11613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11613   rm -rf conftest*
11614   eval "ac_cv_func_$ac_func=yes"
11615 else
11616   echo "configure: failed program was:" >&5
11617   cat conftest.$ac_ext >&5
11618   rm -rf conftest*
11619   eval "ac_cv_func_$ac_func=no"
11620 fi
11621 rm -f conftest*
11622
11623 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11624   echo "$ac_t""yes" 1>&6
11625     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11626   { test "$extra_verbose" = "yes" && cat << EOF
11627     Defining $ac_tr_func
11628 EOF
11629 cat >> confdefs.h <<EOF
11630 #define $ac_tr_func 1
11631 EOF
11632 }
11633  
11634 else
11635   echo "$ac_t""no" 1>&6
11636 fi
11637 done
11638
11639   for ac_hdr in strtio.h
11640 do
11641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11643 echo "configure:11644: checking for $ac_hdr" >&5
11644
11645 cat > conftest.$ac_ext <<EOF
11646 #line 11647 "configure"
11647 #include "confdefs.h"
11648 #include <$ac_hdr>
11649 EOF
11650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11651 { (eval echo configure:11652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11653 if test -z "$ac_err"; then
11654   rm -rf conftest*
11655   eval "ac_cv_header_$ac_safe=yes"
11656 else
11657   echo "$ac_err" >&5
11658   echo "configure: failed program was:" >&5
11659   cat conftest.$ac_ext >&5
11660   rm -rf conftest*
11661   eval "ac_cv_header_$ac_safe=no"
11662 fi
11663 rm -f conftest*
11664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11665   echo "$ac_t""yes" 1>&6
11666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11667   { test "$extra_verbose" = "yes" && cat << EOF
11668     Defining $ac_tr_hdr
11669 EOF
11670 cat >> confdefs.h <<EOF
11671 #define $ac_tr_hdr 1
11672 EOF
11673 }
11674  
11675 else
11676   echo "$ac_t""no" 1>&6
11677 fi
11678 done
11679  fi
11680
11681 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11682    echo "    xemacs will be linked with \"realpath.o\""
11683  fi
11684
11685 for ac_func in getloadavg
11686 do
11687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11688 echo "configure:11689: checking for $ac_func" >&5
11689
11690 cat > conftest.$ac_ext <<EOF
11691 #line 11692 "configure"
11692 #include "confdefs.h"
11693 /* System header to define __stub macros and hopefully few prototypes,
11694     which can conflict with char $ac_func(); below.  */
11695 #include <assert.h>
11696 /* Override any gcc2 internal prototype to avoid an error.  */
11697 /* We use char because int might match the return type of a gcc2
11698     builtin and then its argument prototype would still apply.  */
11699 char $ac_func();
11700
11701 int main() {
11702
11703 /* The GNU C library defines this for functions which it implements
11704     to always fail with ENOSYS.  Some functions are actually named
11705     something starting with __ and the normal name is an alias.  */
11706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11707 choke me
11708 #else
11709 $ac_func();
11710 #endif
11711
11712 ; return 0; }
11713 EOF
11714 if { (eval echo configure:11715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11715   rm -rf conftest*
11716   eval "ac_cv_func_$ac_func=yes"
11717 else
11718   echo "configure: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   rm -rf conftest*
11721   eval "ac_cv_func_$ac_func=no"
11722 fi
11723 rm -f conftest*
11724
11725 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11726   echo "$ac_t""yes" 1>&6
11727     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11728   { test "$extra_verbose" = "yes" && cat << EOF
11729     Defining $ac_tr_func
11730 EOF
11731 cat >> confdefs.h <<EOF
11732 #define $ac_tr_func 1
11733 EOF
11734 }
11735  
11736 else
11737   echo "$ac_t""no" 1>&6
11738 fi
11739 done
11740
11741
11742 if test "$ac_cv_func_getloadavg" = "yes"; then
11743         for ac_hdr in sys/loadavg.h
11744 do
11745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11747 echo "configure:11748: checking for $ac_hdr" >&5
11748
11749 cat > conftest.$ac_ext <<EOF
11750 #line 11751 "configure"
11751 #include "confdefs.h"
11752 #include <$ac_hdr>
11753 EOF
11754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11755 { (eval echo configure:11756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11757 if test -z "$ac_err"; then
11758   rm -rf conftest*
11759   eval "ac_cv_header_$ac_safe=yes"
11760 else
11761   echo "$ac_err" >&5
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -rf conftest*
11765   eval "ac_cv_header_$ac_safe=no"
11766 fi
11767 rm -f conftest*
11768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11769   echo "$ac_t""yes" 1>&6
11770     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11771   { test "$extra_verbose" = "yes" && cat << EOF
11772     Defining $ac_tr_hdr
11773 EOF
11774 cat >> confdefs.h <<EOF
11775 #define $ac_tr_hdr 1
11776 EOF
11777 }
11778  
11779 else
11780   echo "$ac_t""no" 1>&6
11781 fi
11782 done
11783
11784 else
11785     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11786    echo "    xemacs will be linked with \"getloadavg.o\""
11787  fi
11788
11789     
11790 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11791 echo "configure:11792: checking for kstat_open in -lkstat" >&5
11792 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11793
11794 xe_check_libs=" -lkstat "
11795 cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798 /* Override any gcc2 internal prototype to avoid an error.  */
11799 /* We use char because int might match the return type of a gcc2
11800     builtin and then its argument prototype would still apply.  */
11801 char kstat_open();
11802
11803 int main() {
11804 kstat_open()
11805 ; return 0; }
11806 EOF
11807 if { (eval echo configure:11808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11808   rm -rf conftest*
11809   eval "ac_cv_lib_$ac_lib_var=yes"
11810 else
11811   echo "configure: failed program was:" >&5
11812   cat conftest.$ac_ext >&5
11813   rm -rf conftest*
11814   eval "ac_cv_lib_$ac_lib_var=no"
11815 fi
11816 rm -f conftest*
11817 xe_check_libs=""
11818
11819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11820   echo "$ac_t""yes" 1>&6
11821     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11822     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11823   { test "$extra_verbose" = "yes" && cat << EOF
11824     Defining $ac_tr_lib
11825 EOF
11826 cat >> confdefs.h <<EOF
11827 #define $ac_tr_lib 1
11828 EOF
11829 }
11830
11831   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11832
11833 else
11834   echo "$ac_t""no" 1>&6
11835 fi
11836
11837
11838   for ac_hdr in kstat.h
11839 do
11840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11842 echo "configure:11843: checking for $ac_hdr" >&5
11843
11844 cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847 #include <$ac_hdr>
11848 EOF
11849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11850 { (eval echo configure:11851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11852 if test -z "$ac_err"; then
11853   rm -rf conftest*
11854   eval "ac_cv_header_$ac_safe=yes"
11855 else
11856   echo "$ac_err" >&5
11857   echo "configure: failed program was:" >&5
11858   cat conftest.$ac_ext >&5
11859   rm -rf conftest*
11860   eval "ac_cv_header_$ac_safe=no"
11861 fi
11862 rm -f conftest*
11863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11864   echo "$ac_t""yes" 1>&6
11865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11866   { test "$extra_verbose" = "yes" && cat << EOF
11867     Defining $ac_tr_hdr
11868 EOF
11869 cat >> confdefs.h <<EOF
11870 #define $ac_tr_hdr 1
11871 EOF
11872 }
11873  
11874 else
11875   echo "$ac_t""no" 1>&6
11876 fi
11877 done
11878
11879
11880     
11881 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11882 echo "configure:11883: checking for kvm_read in -lkvm" >&5
11883 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11884
11885 xe_check_libs=" -lkvm "
11886 cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 /* Override any gcc2 internal prototype to avoid an error.  */
11890 /* We use char because int might match the return type of a gcc2
11891     builtin and then its argument prototype would still apply.  */
11892 char kvm_read();
11893
11894 int main() {
11895 kvm_read()
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11899   rm -rf conftest*
11900   eval "ac_cv_lib_$ac_lib_var=yes"
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   eval "ac_cv_lib_$ac_lib_var=no"
11906 fi
11907 rm -f conftest*
11908 xe_check_libs=""
11909
11910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11911   echo "$ac_t""yes" 1>&6
11912     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11913     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11914   { test "$extra_verbose" = "yes" && cat << EOF
11915     Defining $ac_tr_lib
11916 EOF
11917 cat >> confdefs.h <<EOF
11918 #define $ac_tr_lib 1
11919 EOF
11920 }
11921
11922   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11923
11924 else
11925   echo "$ac_t""no" 1>&6
11926 fi
11927
11928
11929 fi
11930
11931 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11932 echo "configure:11933: checking whether netdb declares h_errno" >&5
11933 cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936 #include <netdb.h>
11937 int main() {
11938 return h_errno;
11939 ; return 0; }
11940 EOF
11941 if { (eval echo configure:11942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11942   rm -rf conftest*
11943   echo "$ac_t""yes" 1>&6
11944    { test "$extra_verbose" = "yes" && cat << \EOF
11945     Defining HAVE_H_ERRNO
11946 EOF
11947 cat >> confdefs.h <<\EOF
11948 #define HAVE_H_ERRNO 1
11949 EOF
11950 }
11951
11952 else
11953   echo "configure: failed program was:" >&5
11954   cat conftest.$ac_ext >&5
11955   rm -rf conftest*
11956   echo "$ac_t""no" 1>&6
11957 fi
11958 rm -f conftest*
11959
11960 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11961 echo "configure:11962: checking for sigsetjmp" >&5
11962 cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 #include <setjmp.h>
11966 int main() {
11967 sigjmp_buf bar; sigsetjmp (bar, 0);
11968 ; return 0; }
11969 EOF
11970 if { (eval echo configure:11971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11971   rm -rf conftest*
11972   echo "$ac_t""yes" 1>&6
11973    { test "$extra_verbose" = "yes" && cat << \EOF
11974     Defining HAVE_SIGSETJMP
11975 EOF
11976 cat >> confdefs.h <<\EOF
11977 #define HAVE_SIGSETJMP 1
11978 EOF
11979 }
11980
11981 else
11982   echo "configure: failed program was:" >&5
11983   cat conftest.$ac_ext >&5
11984   rm -rf conftest*
11985   echo "$ac_t""no" 1>&6
11986 fi
11987 rm -f conftest*
11988
11989 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11990 echo "configure:11991: checking whether localtime caches TZ" >&5
11991
11992 if test "$ac_cv_func_tzset" = "yes"; then
11993 cat > conftest.$ac_ext <<EOF
11994 #line 11995 "configure"
11995 #include "confdefs.h"
11996 #include <time.h>
11997 #if STDC_HEADERS
11998 # include <stdlib.h>
11999 #endif
12000 extern char **environ;
12001 unset_TZ ()
12002 {
12003   char **from, **to;
12004   for (to = from = environ; (*to = *from); from++)
12005     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
12006       to++;
12007 }
12008 char TZ_GMT0[] = "TZ=GMT0";
12009 char TZ_PST8[] = "TZ=PST8";
12010 main()
12011 {
12012   time_t now = time ((time_t *) 0);
12013   int hour_GMT0, hour_unset;
12014   if (putenv (TZ_GMT0) != 0)
12015     exit (1);
12016   hour_GMT0 = localtime (&now)->tm_hour;
12017   unset_TZ ();
12018   hour_unset = localtime (&now)->tm_hour;
12019   if (putenv (TZ_PST8) != 0)
12020     exit (1);
12021   if (localtime (&now)->tm_hour == hour_GMT0)
12022     exit (1);
12023   unset_TZ ();
12024   if (localtime (&now)->tm_hour != hour_unset)
12025     exit (1);
12026   exit (0);
12027 }
12028 EOF
12029 if { (eval echo configure:12030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12030 then
12031   emacs_cv_localtime_cache=no
12032 else
12033   conftest_rc="$?"
12034   echo "configure: failed program was:" >&5
12035   cat conftest.$ac_ext >&5
12036   rm -fr conftest*
12037   emacs_cv_localtime_cache=yes
12038 fi
12039 rm -fr conftest*
12040 else
12041         # If we lack tzset, report that localtime does not cache TZ,
12042         # since we can't invalidate the cache if we don't have tzset.
12043         emacs_cv_localtime_cache=no
12044 fi
12045 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
12046 if test $emacs_cv_localtime_cache = yes; then
12047   { test "$extra_verbose" = "yes" && cat << \EOF
12048     Defining LOCALTIME_CACHE
12049 EOF
12050 cat >> confdefs.h <<\EOF
12051 #define LOCALTIME_CACHE 1
12052 EOF
12053 }
12054
12055 fi
12056
12057 if test "$HAVE_TIMEVAL" = "yes"; then
12058 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
12059 echo "configure:12060: checking whether gettimeofday accepts one or two arguments" >&5
12060 cat > conftest.$ac_ext <<EOF
12061 #line 12062 "configure"
12062 #include "confdefs.h"
12063
12064 #ifdef TIME_WITH_SYS_TIME
12065 #include <sys/time.h>
12066 #include <time.h>
12067 #else
12068 #ifdef HAVE_SYS_TIME_H
12069 #include <sys/time.h>
12070 #else
12071 #include <time.h>
12072 #endif
12073 #endif
12074   
12075 int main() {
12076
12077   struct timeval time;
12078   gettimeofday (&time, 0);
12079
12080 ; return 0; }
12081 EOF
12082 if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12083   rm -rf conftest*
12084   echo "$ac_t""two" 1>&6
12085 else
12086   echo "configure: failed program was:" >&5
12087   cat conftest.$ac_ext >&5
12088   rm -rf conftest*
12089   echo "$ac_t""one" 1>&6
12090    { test "$extra_verbose" = "yes" && cat << \EOF
12091     Defining GETTIMEOFDAY_ONE_ARGUMENT
12092 EOF
12093 cat >> confdefs.h <<\EOF
12094 #define GETTIMEOFDAY_ONE_ARGUMENT 1
12095 EOF
12096 }
12097
12098 fi
12099 rm -f conftest*
12100 fi
12101
12102
12103 echo $ac_n "checking for inline""... $ac_c" 1>&6
12104 echo "configure:12105: checking for inline" >&5
12105
12106 ac_cv_c_inline=no
12107 for ac_kw in inline __inline__ __inline; do
12108   cat > conftest.$ac_ext <<EOF
12109 #line 12110 "configure"
12110 #include "confdefs.h"
12111
12112 int main() {
12113 } $ac_kw foo() {
12114 ; return 0; }
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12117   rm -rf conftest*
12118   ac_cv_c_inline=$ac_kw; break
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122 fi
12123 rm -f conftest*
12124 done
12125
12126
12127 echo "$ac_t""$ac_cv_c_inline" 1>&6
12128 case "$ac_cv_c_inline" in
12129   inline | yes) ;;
12130   no) { test "$extra_verbose" = "yes" && cat << \EOF
12131     Defining inline = 
12132 EOF
12133 cat >> confdefs.h <<\EOF
12134 #define inline 
12135 EOF
12136 }
12137  ;;
12138   *)  { test "$extra_verbose" = "yes" && cat << EOF
12139     Defining inline = $ac_cv_c_inline
12140 EOF
12141 cat >> confdefs.h <<EOF
12142 #define inline $ac_cv_c_inline
12143 EOF
12144 }
12145  ;;
12146 esac
12147
12148 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
12149    echo "    xemacs will be linked with \"inline.o\""
12150  fi
12151
12152
12153 if test "$__DECC" != "yes"; then
12154   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12155 # for constant arguments.  Useless!
12156 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12157 echo "configure:12158: checking for working alloca.h" >&5
12158
12159 cat > conftest.$ac_ext <<EOF
12160 #line 12161 "configure"
12161 #include "confdefs.h"
12162 #include <alloca.h>
12163 int main() {
12164 char *p = alloca(2 * sizeof(int));
12165 ; return 0; }
12166 EOF
12167 if { (eval echo configure:12168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12168   rm -rf conftest*
12169   ac_cv_header_alloca_h=yes
12170 else
12171   echo "configure: failed program was:" >&5
12172   cat conftest.$ac_ext >&5
12173   rm -rf conftest*
12174   ac_cv_header_alloca_h=no
12175 fi
12176 rm -f conftest*
12177
12178 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12179 if test $ac_cv_header_alloca_h = yes; then
12180   { test "$extra_verbose" = "yes" && cat << \EOF
12181     Defining HAVE_ALLOCA_H
12182 EOF
12183 cat >> confdefs.h <<\EOF
12184 #define HAVE_ALLOCA_H 1
12185 EOF
12186 }
12187
12188 fi
12189
12190 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12191 echo "configure:12192: checking for alloca" >&5
12192
12193 cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196
12197 #ifdef __GNUC__
12198 # define alloca __builtin_alloca
12199 #else
12200 # ifdef _MSC_VER
12201 #  include <malloc.h>
12202 #  define alloca _alloca
12203 # else
12204 #  if HAVE_ALLOCA_H
12205 #   include <alloca.h>
12206 #  else
12207 #   ifdef _AIX
12208  #pragma alloca
12209 #   else
12210 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12211 char *alloca ();
12212 #    endif
12213 #   endif
12214 #  endif
12215 # endif
12216 #endif
12217
12218 int main() {
12219 char *p = (char *) alloca(1);
12220 ; return 0; }
12221 EOF
12222 if { (eval echo configure:12223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12223   rm -rf conftest*
12224   ac_cv_func_alloca_works=yes
12225 else
12226   echo "configure: failed program was:" >&5
12227   cat conftest.$ac_ext >&5
12228   rm -rf conftest*
12229   ac_cv_func_alloca_works=no
12230 fi
12231 rm -f conftest*
12232
12233 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12234 if test $ac_cv_func_alloca_works = yes; then
12235   { test "$extra_verbose" = "yes" && cat << \EOF
12236     Defining HAVE_ALLOCA
12237 EOF
12238 cat >> confdefs.h <<\EOF
12239 #define HAVE_ALLOCA 1
12240 EOF
12241 }
12242
12243 fi
12244
12245 if test $ac_cv_func_alloca_works = no; then
12246   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12247   # that cause trouble.  Some versions do not even contain alloca or
12248   # contain a buggy version.  If you still want to use their alloca,
12249   # use ar to extract alloca.o from them instead of compiling alloca.c.
12250   ALLOCA=alloca.${ac_objext}
12251   { test "$extra_verbose" = "yes" && cat << \EOF
12252     Defining C_ALLOCA
12253 EOF
12254 cat >> confdefs.h <<\EOF
12255 #define C_ALLOCA 1
12256 EOF
12257 }
12258
12259
12260 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
12261 echo "configure:12262: checking whether alloca needs Cray hooks" >&5
12262
12263 cat > conftest.$ac_ext <<EOF
12264 #line 12265 "configure"
12265 #include "confdefs.h"
12266 #if defined(CRAY) && ! defined(CRAY2)
12267 webecray
12268 #else
12269 wenotbecray
12270 #endif
12271
12272 EOF
12273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12274   egrep "webecray" >/dev/null 2>&1; then
12275   rm -rf conftest*
12276   ac_cv_os_cray=yes
12277 else
12278   rm -rf conftest*
12279   ac_cv_os_cray=no
12280 fi
12281 rm -f conftest*
12282
12283
12284 echo "$ac_t""$ac_cv_os_cray" 1>&6
12285 if test $ac_cv_os_cray = yes; then
12286 for ac_func in _getb67 GETB67 getb67; do
12287   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12288 echo "configure:12289: checking for $ac_func" >&5
12289
12290 cat > conftest.$ac_ext <<EOF
12291 #line 12292 "configure"
12292 #include "confdefs.h"
12293 /* System header to define __stub macros and hopefully few prototypes,
12294     which can conflict with char $ac_func(); below.  */
12295 #include <assert.h>
12296 /* Override any gcc2 internal prototype to avoid an error.  */
12297 /* We use char because int might match the return type of a gcc2
12298     builtin and then its argument prototype would still apply.  */
12299 char $ac_func();
12300
12301 int main() {
12302
12303 /* The GNU C library defines this for functions which it implements
12304     to always fail with ENOSYS.  Some functions are actually named
12305     something starting with __ and the normal name is an alias.  */
12306 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12307 choke me
12308 #else
12309 $ac_func();
12310 #endif
12311
12312 ; return 0; }
12313 EOF
12314 if { (eval echo configure:12315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12315   rm -rf conftest*
12316   eval "ac_cv_func_$ac_func=yes"
12317 else
12318   echo "configure: failed program was:" >&5
12319   cat conftest.$ac_ext >&5
12320   rm -rf conftest*
12321   eval "ac_cv_func_$ac_func=no"
12322 fi
12323 rm -f conftest*
12324
12325 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12326   echo "$ac_t""yes" 1>&6
12327   { test "$extra_verbose" = "yes" && cat << EOF
12328     Defining CRAY_STACKSEG_END = $ac_func
12329 EOF
12330 cat >> confdefs.h <<EOF
12331 #define CRAY_STACKSEG_END $ac_func
12332 EOF
12333 }
12334
12335   break
12336 else
12337   echo "$ac_t""no" 1>&6
12338 fi
12339
12340 done
12341 fi
12342
12343 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
12344 echo "configure:12345: checking stack direction for C alloca" >&5
12345
12346 cat > conftest.$ac_ext <<EOF
12347 #line 12348 "configure"
12348 #include "confdefs.h"
12349 find_stack_direction ()
12350 {
12351   static char *addr = 0;
12352   auto char dummy;
12353   if (addr == 0)
12354     {
12355       addr = &dummy;
12356       return find_stack_direction ();
12357     }
12358   else
12359     return (&dummy > addr) ? 1 : -1;
12360 }
12361 main ()
12362 {
12363   exit (find_stack_direction() < 0);
12364 }
12365 EOF
12366 if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12367 then
12368   ac_cv_c_stack_direction=1
12369 else
12370   conftest_rc="$?"
12371   echo "configure: failed program was:" >&5
12372   cat conftest.$ac_ext >&5
12373   rm -fr conftest*
12374   ac_cv_c_stack_direction=-1
12375 fi
12376 rm -fr conftest*
12377
12378 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
12379 { test "$extra_verbose" = "yes" && cat << EOF
12380     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
12381 EOF
12382 cat >> confdefs.h <<EOF
12383 #define STACK_DIRECTION $ac_cv_c_stack_direction
12384 EOF
12385 }
12386
12387 fi
12388
12389   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
12390    echo "    xemacs will be linked with \"$ALLOCA\""
12391  fi
12392 fi
12393
12394 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
12395 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
12396 echo "configure:12397: checking for vfork.h" >&5
12397
12398 cat > conftest.$ac_ext <<EOF
12399 #line 12400 "configure"
12400 #include "confdefs.h"
12401 #include <vfork.h>
12402 EOF
12403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12404 { (eval echo configure:12405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12406 if test -z "$ac_err"; then
12407   rm -rf conftest*
12408   eval "ac_cv_header_$ac_safe=yes"
12409 else
12410   echo "$ac_err" >&5
12411   echo "configure: failed program was:" >&5
12412   cat conftest.$ac_ext >&5
12413   rm -rf conftest*
12414   eval "ac_cv_header_$ac_safe=no"
12415 fi
12416 rm -f conftest*
12417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12418   echo "$ac_t""yes" 1>&6
12419   { test "$extra_verbose" = "yes" && cat << \EOF
12420     Defining HAVE_VFORK_H
12421 EOF
12422 cat >> confdefs.h <<\EOF
12423 #define HAVE_VFORK_H 1
12424 EOF
12425 }
12426
12427 else
12428   echo "$ac_t""no" 1>&6
12429 fi
12430
12431 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12432 echo "configure:12433: checking for working vfork" >&5
12433
12434 cat > conftest.$ac_ext <<EOF
12435 #line 12436 "configure"
12436 #include "confdefs.h"
12437 /* Thanks to Paul Eggert for this test.  */
12438 #include <stdio.h>
12439 #include <sys/types.h>
12440 #include <sys/stat.h>
12441 #ifdef HAVE_UNISTD_H
12442 #include <unistd.h>
12443 #endif
12444 #ifdef HAVE_VFORK_H
12445 #include <vfork.h>
12446 #endif
12447 /* On some sparc systems, changes by the child to local and incoming
12448    argument registers are propagated back to the parent.
12449    The compiler is told about this with #include <vfork.h>,
12450    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12451    Test for this by using a static variable whose address
12452    is put into a register that is clobbered by the vfork.  */
12453 static
12454 #ifdef __cplusplus
12455 sparc_address_test (int arg)
12456 #else
12457 sparc_address_test (arg) int arg;
12458 #endif
12459 {
12460   static pid_t child;
12461   if (!child) {
12462     child = vfork ();
12463     if (child < 0) {
12464       perror ("vfork");
12465       _exit(2);
12466     }
12467     if (!child) {
12468       arg = getpid();
12469       write(-1, "", 0);
12470       _exit (arg);
12471     }
12472   }
12473 }
12474 main() {
12475   pid_t parent = getpid ();
12476   pid_t child;
12477
12478   sparc_address_test ();
12479
12480   child = vfork ();
12481
12482   if (child == 0) {
12483     /* Here is another test for sparc vfork register problems.
12484        This test uses lots of local variables, at least
12485        as many local variables as main has allocated so far
12486        including compiler temporaries.  4 locals are enough for
12487        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12488        A buggy compiler should reuse the register of parent
12489        for one of the local variables, since it will think that
12490        parent can't possibly be used any more in this routine.
12491        Assigning to the local variable will thus munge parent
12492        in the parent process.  */
12493     pid_t
12494       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12495       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12496     /* Convince the compiler that p..p7 are live; otherwise, it might
12497        use the same hardware register for all 8 local variables.  */
12498     if (p != p1 || p != p2 || p != p3 || p != p4
12499         || p != p5 || p != p6 || p != p7)
12500       _exit(1);
12501
12502     /* On some systems (e.g. IRIX 3.3),
12503        vfork doesn't separate parent from child file descriptors.
12504        If the child closes a descriptor before it execs or exits,
12505        this munges the parent's descriptor as well.
12506        Test for this by closing stdout in the child.  */
12507     _exit(close(fileno(stdout)) != 0);
12508   } else {
12509     int status;
12510     struct stat st;
12511
12512     while (wait(&status) != child)
12513       ;
12514     exit(
12515          /* Was there some problem with vforking?  */
12516          child < 0
12517
12518          /* Did the child fail?  (This shouldn't happen.)  */
12519          || status
12520
12521          /* Did the vfork/compiler bug occur?  */
12522          || parent != getpid()
12523
12524          /* Did the file descriptor bug occur?  */
12525          || fstat(fileno(stdout), &st) != 0
12526          );
12527   }
12528 }
12529 EOF
12530 if { (eval echo configure:12531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12531 then
12532   ac_cv_func_vfork_works=yes
12533 else
12534   conftest_rc="$?"
12535   echo "configure: failed program was:" >&5
12536   cat conftest.$ac_ext >&5
12537   rm -fr conftest*
12538   ac_cv_func_vfork_works=no
12539 fi
12540 rm -fr conftest*
12541
12542 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12543 if test $ac_cv_func_vfork_works = no; then
12544   { test "$extra_verbose" = "yes" && cat << \EOF
12545     Defining vfork = fork
12546 EOF
12547 cat >> confdefs.h <<\EOF
12548 #define vfork fork
12549 EOF
12550 }
12551
12552 fi
12553
12554
12555 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12556 echo "configure:12557: checking for working strcoll" >&5
12557
12558 cat > conftest.$ac_ext <<EOF
12559 #line 12560 "configure"
12560 #include "confdefs.h"
12561 #include <string.h>
12562 main ()
12563 {
12564   exit (strcoll ("abc", "def") >= 0 ||
12565         strcoll ("ABC", "DEF") >= 0 ||
12566         strcoll ("123", "456") >= 0);
12567 }
12568 EOF
12569 if { (eval echo configure:12570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12570 then
12571   ac_cv_func_strcoll_works=yes
12572 else
12573   conftest_rc="$?"
12574   echo "configure: failed program was:" >&5
12575   cat conftest.$ac_ext >&5
12576   rm -fr conftest*
12577   ac_cv_func_strcoll_works=no
12578 fi
12579 rm -fr conftest*
12580
12581 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12582 if test $ac_cv_func_strcoll_works = yes; then
12583   { test "$extra_verbose" = "yes" && cat << \EOF
12584     Defining HAVE_STRCOLL
12585 EOF
12586 cat >> confdefs.h <<\EOF
12587 #define HAVE_STRCOLL 1
12588 EOF
12589 }
12590
12591 fi
12592
12593
12594 for ac_func in getpgrp
12595 do
12596 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12597 echo "configure:12598: checking for $ac_func" >&5
12598
12599 cat > conftest.$ac_ext <<EOF
12600 #line 12601 "configure"
12601 #include "confdefs.h"
12602 /* System header to define __stub macros and hopefully few prototypes,
12603     which can conflict with char $ac_func(); below.  */
12604 #include <assert.h>
12605 /* Override any gcc2 internal prototype to avoid an error.  */
12606 /* We use char because int might match the return type of a gcc2
12607     builtin and then its argument prototype would still apply.  */
12608 char $ac_func();
12609
12610 int main() {
12611
12612 /* The GNU C library defines this for functions which it implements
12613     to always fail with ENOSYS.  Some functions are actually named
12614     something starting with __ and the normal name is an alias.  */
12615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12616 choke me
12617 #else
12618 $ac_func();
12619 #endif
12620
12621 ; return 0; }
12622 EOF
12623 if { (eval echo configure:12624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12624   rm -rf conftest*
12625   eval "ac_cv_func_$ac_func=yes"
12626 else
12627   echo "configure: failed program was:" >&5
12628   cat conftest.$ac_ext >&5
12629   rm -rf conftest*
12630   eval "ac_cv_func_$ac_func=no"
12631 fi
12632 rm -f conftest*
12633
12634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12635   echo "$ac_t""yes" 1>&6
12636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12637   { test "$extra_verbose" = "yes" && cat << EOF
12638     Defining $ac_tr_func
12639 EOF
12640 cat >> confdefs.h <<EOF
12641 #define $ac_tr_func 1
12642 EOF
12643 }
12644  
12645 else
12646   echo "$ac_t""no" 1>&6
12647 fi
12648 done
12649
12650 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12651 echo "configure:12652: checking whether getpgrp takes no argument" >&5
12652
12653 cat > conftest.$ac_ext <<EOF
12654 #line 12655 "configure"
12655 #include "confdefs.h"
12656
12657 /*
12658  * If this system has a BSD-style getpgrp(),
12659  * which takes a pid argument, exit unsuccessfully.
12660  *
12661  * Snarfed from Chet Ramey's bash pgrp.c test program
12662  */
12663 #include <stdio.h>
12664 #include <sys/types.h>
12665
12666 int     pid;
12667 int     pg1, pg2, pg3, pg4;
12668 int     ng, np, s, child;
12669
12670 main()
12671 {
12672         pid = getpid();
12673         pg1 = getpgrp(0);
12674         pg2 = getpgrp();
12675         pg3 = getpgrp(pid);
12676         pg4 = getpgrp(1);
12677
12678         /*
12679          * If all of these values are the same, it's pretty sure that
12680          * we're on a system that ignores getpgrp's first argument.
12681          */
12682         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12683                 exit(0);
12684
12685         child = fork();
12686         if (child < 0)
12687                 exit(1);
12688         else if (child == 0) {
12689                 np = getpid();
12690                 /*
12691                  * If this is Sys V, this will not work; pgrp will be
12692                  * set to np because setpgrp just changes a pgrp to be
12693                  * the same as the pid.
12694                  */
12695                 setpgrp(np, pg1);
12696                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12697                 if (ng == pg1) {
12698                         exit(1);
12699                 } else {
12700                         exit(0);
12701                 }
12702         } else {
12703                 wait(&s);
12704                 exit(s>>8);
12705         }
12706 }
12707
12708 EOF
12709 if { (eval echo configure:12710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12710 then
12711   ac_cv_func_getpgrp_void=yes
12712 else
12713   conftest_rc="$?"
12714   echo "configure: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   rm -fr conftest*
12717   ac_cv_func_getpgrp_void=no
12718 fi
12719 rm -fr conftest*
12720
12721
12722 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12723 if test $ac_cv_func_getpgrp_void = yes; then
12724   { test "$extra_verbose" = "yes" && cat << \EOF
12725     Defining GETPGRP_VOID
12726 EOF
12727 cat >> confdefs.h <<\EOF
12728 #define GETPGRP_VOID 1
12729 EOF
12730 }
12731
12732 fi
12733
12734
12735 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12736 echo "configure:12737: checking for working mmap" >&5
12737 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12738 cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 #include <stdio.h>
12742 #include <unistd.h>
12743 #include <fcntl.h>
12744 #include <sys/mman.h>
12745
12746 #ifndef MAP_VARIABLE
12747 #define MAP_VARIABLE 0
12748 #endif
12749
12750 #ifndef MAP_FAILED
12751 #define MAP_FAILED -1
12752 #endif
12753
12754 int main (int argc, char *argv[])
12755 {
12756   int fd = -1;
12757   caddr_t p;
12758 #ifndef MAP_ANONYMOUS
12759   fd = open ("/dev/zero", O_RDWR);
12760   if (fd < 0)
12761     return 1;
12762 #define MAP_ANONYMOUS 0
12763 #endif
12764   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12765            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12766            fd, 0) != (void *) MAP_FAILED)
12767     return 0;
12768   perror ("conftest: mmap failed");
12769   return 1;
12770 }
12771 EOF
12772 if { (eval echo configure:12773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12773 then
12774   have_mmap=yes
12775 else
12776   conftest_rc="$?"
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -fr conftest*
12780   have_mmap=no
12781 fi
12782 rm -fr conftest* ;;
12783 esac
12784 echo "$ac_t""$have_mmap" 1>&6
12785 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12786     Defining HAVE_MMAP
12787 EOF
12788 cat >> confdefs.h <<\EOF
12789 #define HAVE_MMAP 1
12790 EOF
12791 }
12792
12793
12794 case "$opsys" in cygwin*) 
12795         test "$rel_alloc" = "default" && rel_alloc=no ;;
12796 esac
12797 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12798 if test "$rel_alloc $have_mmap" = "default yes"; then
12799   if test "$doug_lea_malloc" = "yes"; then
12800         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12801 echo "configure:12802: checking for M_MMAP_THRESHOLD" >&5
12802     cat > conftest.$ac_ext <<EOF
12803 #line 12804 "configure"
12804 #include "confdefs.h"
12805 #include <malloc.h>
12806 int main() {
12807
12808 #ifndef M_MMAP_THRESHOLD
12809 #error No M_MMAP_THRESHOLD :-(
12810 !@+$%^&*_)(_ - unlikely to compile...
12811 #endif
12812
12813 ; return 0; }
12814 EOF
12815 if { (eval echo configure:12816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12816   rm -rf conftest*
12817   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12818 else
12819   echo "configure: failed program was:" >&5
12820   cat conftest.$ac_ext >&5
12821   rm -rf conftest*
12822   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12823 fi
12824 rm -f conftest*
12825   else
12826     rel_alloc=yes
12827   fi
12828 fi
12829 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12830     Defining REL_ALLOC
12831 EOF
12832 cat >> confdefs.h <<\EOF
12833 #define REL_ALLOC 1
12834 EOF
12835 }
12836
12837
12838 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12839 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12840 echo "configure:12841: checking for termios.h" >&5
12841
12842 cat > conftest.$ac_ext <<EOF
12843 #line 12844 "configure"
12844 #include "confdefs.h"
12845 #include <termios.h>
12846 EOF
12847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12848 { (eval echo configure:12849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12850 if test -z "$ac_err"; then
12851   rm -rf conftest*
12852   eval "ac_cv_header_$ac_safe=yes"
12853 else
12854   echo "$ac_err" >&5
12855   echo "configure: failed program was:" >&5
12856   cat conftest.$ac_ext >&5
12857   rm -rf conftest*
12858   eval "ac_cv_header_$ac_safe=no"
12859 fi
12860 rm -f conftest*
12861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12862   echo "$ac_t""yes" 1>&6
12863   { test "$extra_verbose" = "yes" && cat << \EOF
12864     Defining HAVE_TERMIOS
12865 EOF
12866 cat >> confdefs.h <<\EOF
12867 #define HAVE_TERMIOS 1
12868 EOF
12869 }
12870
12871   { test "$extra_verbose" = "yes" && cat << \EOF
12872     Defining SIGNALS_VIA_CHARACTERS
12873 EOF
12874 cat >> confdefs.h <<\EOF
12875 #define SIGNALS_VIA_CHARACTERS 1
12876 EOF
12877 }
12878
12879   { test "$extra_verbose" = "yes" && cat << \EOF
12880     Defining NO_TERMIO
12881 EOF
12882 cat >> confdefs.h <<\EOF
12883 #define NO_TERMIO 1
12884 EOF
12885 }
12886
12887 else
12888   echo "$ac_t""no" 1>&6
12889 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12890 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12891 echo "configure:12892: checking for termio.h" >&5
12892
12893 cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include <termio.h>
12897 EOF
12898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12899 { (eval echo configure:12900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12901 if test -z "$ac_err"; then
12902   rm -rf conftest*
12903   eval "ac_cv_header_$ac_safe=yes"
12904 else
12905   echo "$ac_err" >&5
12906   echo "configure: failed program was:" >&5
12907   cat conftest.$ac_ext >&5
12908   rm -rf conftest*
12909   eval "ac_cv_header_$ac_safe=no"
12910 fi
12911 rm -f conftest*
12912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12913   echo "$ac_t""yes" 1>&6
12914   { test "$extra_verbose" = "yes" && cat << \EOF
12915     Defining HAVE_TERMIO
12916 EOF
12917 cat >> confdefs.h <<\EOF
12918 #define HAVE_TERMIO 1
12919 EOF
12920 }
12921
12922 else
12923   echo "$ac_t""no" 1>&6
12924 fi
12925
12926 fi
12927
12928
12929
12930 echo $ac_n "checking for socket""... $ac_c" 1>&6
12931 echo "configure:12932: checking for socket" >&5
12932
12933 cat > conftest.$ac_ext <<EOF
12934 #line 12935 "configure"
12935 #include "confdefs.h"
12936 /* System header to define __stub macros and hopefully few prototypes,
12937     which can conflict with char socket(); below.  */
12938 #include <assert.h>
12939 /* Override any gcc2 internal prototype to avoid an error.  */
12940 /* We use char because int might match the return type of a gcc2
12941     builtin and then its argument prototype would still apply.  */
12942 char socket();
12943
12944 int main() {
12945
12946 /* The GNU C library defines this for functions which it implements
12947     to always fail with ENOSYS.  Some functions are actually named
12948     something starting with __ and the normal name is an alias.  */
12949 #if defined (__stub_socket) || defined (__stub___socket)
12950 choke me
12951 #else
12952 socket();
12953 #endif
12954
12955 ; return 0; }
12956 EOF
12957 if { (eval echo configure:12958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12958   rm -rf conftest*
12959   eval "ac_cv_func_socket=yes"
12960 else
12961   echo "configure: failed program was:" >&5
12962   cat conftest.$ac_ext >&5
12963   rm -rf conftest*
12964   eval "ac_cv_func_socket=no"
12965 fi
12966 rm -f conftest*
12967
12968 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12969   echo "$ac_t""yes" 1>&6
12970   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12971 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12972 echo "configure:12973: checking for netinet/in.h" >&5
12973
12974 cat > conftest.$ac_ext <<EOF
12975 #line 12976 "configure"
12976 #include "confdefs.h"
12977 #include <netinet/in.h>
12978 EOF
12979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12980 { (eval echo configure:12981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12982 if test -z "$ac_err"; then
12983   rm -rf conftest*
12984   eval "ac_cv_header_$ac_safe=yes"
12985 else
12986   echo "$ac_err" >&5
12987   echo "configure: failed program was:" >&5
12988   cat conftest.$ac_ext >&5
12989   rm -rf conftest*
12990   eval "ac_cv_header_$ac_safe=no"
12991 fi
12992 rm -f conftest*
12993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12994   echo "$ac_t""yes" 1>&6
12995   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12996 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12997 echo "configure:12998: checking for arpa/inet.h" >&5
12998
12999 cat > conftest.$ac_ext <<EOF
13000 #line 13001 "configure"
13001 #include "confdefs.h"
13002 #include <arpa/inet.h>
13003 EOF
13004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13005 { (eval echo configure:13006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13007 if test -z "$ac_err"; then
13008   rm -rf conftest*
13009   eval "ac_cv_header_$ac_safe=yes"
13010 else
13011   echo "$ac_err" >&5
13012   echo "configure: failed program was:" >&5
13013   cat conftest.$ac_ext >&5
13014   rm -rf conftest*
13015   eval "ac_cv_header_$ac_safe=no"
13016 fi
13017 rm -f conftest*
13018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13019   echo "$ac_t""yes" 1>&6
13020   
13021   { test "$extra_verbose" = "yes" && cat << \EOF
13022     Defining HAVE_SOCKETS
13023 EOF
13024 cat >> confdefs.h <<\EOF
13025 #define HAVE_SOCKETS 1
13026 EOF
13027 }
13028
13029       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
13030 echo "configure:13031: checking "for sun_len member in struct sockaddr_un"" >&5
13031       cat > conftest.$ac_ext <<EOF
13032 #line 13033 "configure"
13033 #include "confdefs.h"
13034
13035 #include <sys/types.h>
13036 #include <sys/socket.h>
13037 #include <sys/un.h>
13038       
13039 int main() {
13040 static struct sockaddr_un x; x.sun_len = 1;
13041 ; return 0; }
13042 EOF
13043 if { (eval echo configure:13044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13044   rm -rf conftest*
13045   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13046     Defining HAVE_SOCKADDR_SUN_LEN
13047 EOF
13048 cat >> confdefs.h <<\EOF
13049 #define HAVE_SOCKADDR_SUN_LEN 1
13050 EOF
13051 }
13052
13053 else
13054   echo "configure: failed program was:" >&5
13055   cat conftest.$ac_ext >&5
13056   rm -rf conftest*
13057   echo "$ac_t""no" 1>&6
13058 fi
13059 rm -f conftest*
13060       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
13061 echo "configure:13062: checking "for ip_mreq struct in netinet/in.h"" >&5
13062       cat > conftest.$ac_ext <<EOF
13063 #line 13064 "configure"
13064 #include "confdefs.h"
13065
13066 #include <sys/types.h>
13067 #include <netinet/in.h>
13068       
13069 int main() {
13070 static struct ip_mreq x;
13071 ; return 0; }
13072 EOF
13073 if { (eval echo configure:13074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13074   rm -rf conftest*
13075   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
13076     Defining HAVE_MULTICAST
13077 EOF
13078 cat >> confdefs.h <<\EOF
13079 #define HAVE_MULTICAST 1
13080 EOF
13081 }
13082
13083 else
13084   echo "configure: failed program was:" >&5
13085   cat conftest.$ac_ext >&5
13086   rm -rf conftest*
13087   echo "$ac_t""no" 1>&6
13088 fi
13089 rm -f conftest*
13090 else
13091   echo "$ac_t""no" 1>&6
13092 fi
13093
13094 else
13095   echo "$ac_t""no" 1>&6
13096 fi
13097
13098 else
13099   echo "$ac_t""no" 1>&6
13100 fi
13101
13102
13103 echo $ac_n "checking for msgget""... $ac_c" 1>&6
13104 echo "configure:13105: checking for msgget" >&5
13105
13106 cat > conftest.$ac_ext <<EOF
13107 #line 13108 "configure"
13108 #include "confdefs.h"
13109 /* System header to define __stub macros and hopefully few prototypes,
13110     which can conflict with char msgget(); below.  */
13111 #include <assert.h>
13112 /* Override any gcc2 internal prototype to avoid an error.  */
13113 /* We use char because int might match the return type of a gcc2
13114     builtin and then its argument prototype would still apply.  */
13115 char msgget();
13116
13117 int main() {
13118
13119 /* The GNU C library defines this for functions which it implements
13120     to always fail with ENOSYS.  Some functions are actually named
13121     something starting with __ and the normal name is an alias.  */
13122 #if defined (__stub_msgget) || defined (__stub___msgget)
13123 choke me
13124 #else
13125 msgget();
13126 #endif
13127
13128 ; return 0; }
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13131   rm -rf conftest*
13132   eval "ac_cv_func_msgget=yes"
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   eval "ac_cv_func_msgget=no"
13138 fi
13139 rm -f conftest*
13140
13141 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
13142   echo "$ac_t""yes" 1>&6
13143   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
13144 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
13145 echo "configure:13146: checking for sys/ipc.h" >&5
13146
13147 cat > conftest.$ac_ext <<EOF
13148 #line 13149 "configure"
13149 #include "confdefs.h"
13150 #include <sys/ipc.h>
13151 EOF
13152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13153 { (eval echo configure:13154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13155 if test -z "$ac_err"; then
13156   rm -rf conftest*
13157   eval "ac_cv_header_$ac_safe=yes"
13158 else
13159   echo "$ac_err" >&5
13160   echo "configure: failed program was:" >&5
13161   cat conftest.$ac_ext >&5
13162   rm -rf conftest*
13163   eval "ac_cv_header_$ac_safe=no"
13164 fi
13165 rm -f conftest*
13166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13167   echo "$ac_t""yes" 1>&6
13168   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
13169 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
13170 echo "configure:13171: checking for sys/msg.h" >&5
13171
13172 cat > conftest.$ac_ext <<EOF
13173 #line 13174 "configure"
13174 #include "confdefs.h"
13175 #include <sys/msg.h>
13176 EOF
13177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13178 { (eval echo configure:13179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13180 if test -z "$ac_err"; then
13181   rm -rf conftest*
13182   eval "ac_cv_header_$ac_safe=yes"
13183 else
13184   echo "$ac_err" >&5
13185   echo "configure: failed program was:" >&5
13186   cat conftest.$ac_ext >&5
13187   rm -rf conftest*
13188   eval "ac_cv_header_$ac_safe=no"
13189 fi
13190 rm -f conftest*
13191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13192   echo "$ac_t""yes" 1>&6
13193   { test "$extra_verbose" = "yes" && cat << \EOF
13194     Defining HAVE_SYSVIPC
13195 EOF
13196 cat >> confdefs.h <<\EOF
13197 #define HAVE_SYSVIPC 1
13198 EOF
13199 }
13200
13201 else
13202   echo "$ac_t""no" 1>&6
13203 fi
13204
13205 else
13206   echo "$ac_t""no" 1>&6
13207 fi
13208
13209 else
13210   echo "$ac_t""no" 1>&6
13211 fi
13212
13213
13214 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
13215 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
13216 echo "configure:13217: checking for dirent.h" >&5
13217
13218 cat > conftest.$ac_ext <<EOF
13219 #line 13220 "configure"
13220 #include "confdefs.h"
13221 #include <dirent.h>
13222 EOF
13223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13224 { (eval echo configure:13225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13226 if test -z "$ac_err"; then
13227   rm -rf conftest*
13228   eval "ac_cv_header_$ac_safe=yes"
13229 else
13230   echo "$ac_err" >&5
13231   echo "configure: failed program was:" >&5
13232   cat conftest.$ac_ext >&5
13233   rm -rf conftest*
13234   eval "ac_cv_header_$ac_safe=no"
13235 fi
13236 rm -f conftest*
13237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13238   echo "$ac_t""yes" 1>&6
13239   { test "$extra_verbose" = "yes" && cat << \EOF
13240     Defining SYSV_SYSTEM_DIR
13241 EOF
13242 cat >> confdefs.h <<\EOF
13243 #define SYSV_SYSTEM_DIR 1
13244 EOF
13245 }
13246
13247 else
13248   echo "$ac_t""no" 1>&6
13249 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
13250 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
13251 echo "configure:13252: checking for sys/dir.h" >&5
13252
13253 cat > conftest.$ac_ext <<EOF
13254 #line 13255 "configure"
13255 #include "confdefs.h"
13256 #include <sys/dir.h>
13257 EOF
13258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13259 { (eval echo configure:13260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13261 if test -z "$ac_err"; then
13262   rm -rf conftest*
13263   eval "ac_cv_header_$ac_safe=yes"
13264 else
13265   echo "$ac_err" >&5
13266   echo "configure: failed program was:" >&5
13267   cat conftest.$ac_ext >&5
13268   rm -rf conftest*
13269   eval "ac_cv_header_$ac_safe=no"
13270 fi
13271 rm -f conftest*
13272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13273   echo "$ac_t""yes" 1>&6
13274   :
13275 else
13276   echo "$ac_t""no" 1>&6
13277 { test "$extra_verbose" = "yes" && cat << \EOF
13278     Defining NONSYSTEM_DIR_LIBRARY
13279 EOF
13280 cat >> confdefs.h <<\EOF
13281 #define NONSYSTEM_DIR_LIBRARY 1
13282 EOF
13283 }
13284
13285 fi
13286
13287 fi
13288
13289
13290 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
13291 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
13292 echo "configure:13293: checking for nlist.h" >&5
13293
13294 cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 #include <nlist.h>
13298 EOF
13299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13300 { (eval echo configure:13301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13302 if test -z "$ac_err"; then
13303   rm -rf conftest*
13304   eval "ac_cv_header_$ac_safe=yes"
13305 else
13306   echo "$ac_err" >&5
13307   echo "configure: failed program was:" >&5
13308   cat conftest.$ac_ext >&5
13309   rm -rf conftest*
13310   eval "ac_cv_header_$ac_safe=no"
13311 fi
13312 rm -f conftest*
13313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13314   echo "$ac_t""yes" 1>&6
13315   { test "$extra_verbose" = "yes" && cat << \EOF
13316     Defining NLIST_STRUCT
13317 EOF
13318 cat >> confdefs.h <<\EOF
13319 #define NLIST_STRUCT 1
13320 EOF
13321 }
13322
13323 else
13324   echo "$ac_t""no" 1>&6
13325 fi
13326
13327
13328
13329 echo "checking "for sound support"" 1>&6
13330 echo "configure:13331: checking "for sound support"" >&5
13331 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
13332
13333 if test "$with_native_sound" != "no"; then
13334     if test -n "$native_sound_lib"; then
13335     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
13336 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
13337 echo "configure:13338: checking for multimedia/audio_device.h" >&5
13338
13339 cat > conftest.$ac_ext <<EOF
13340 #line 13341 "configure"
13341 #include "confdefs.h"
13342 #include <multimedia/audio_device.h>
13343 EOF
13344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13345 { (eval echo configure:13346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13347 if test -z "$ac_err"; then
13348   rm -rf conftest*
13349   eval "ac_cv_header_$ac_safe=yes"
13350 else
13351   echo "$ac_err" >&5
13352   echo "configure: failed program was:" >&5
13353   cat conftest.$ac_ext >&5
13354   rm -rf conftest*
13355   eval "ac_cv_header_$ac_safe=no"
13356 fi
13357 rm -f conftest*
13358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13359   echo "$ac_t""yes" 1>&6
13360   sound_found=yes sound_cflags=""
13361       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13362    echo "    xemacs will be linked with \"sunplay.o\""
13363  fi
13364 else
13365   echo "$ac_t""no" 1>&6
13366 fi
13367
13368   fi
13369
13370     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
13371     if test -d "/usr/demo/SOUND/include/multimedia"; then
13372       sun_sound_cflags="-I/usr/demo/SOUND/include"
13373     elif test -d "/usr/demo/SOUND/multimedia"; then
13374       sun_sound_cflags="-I/usr/demo/SOUND"
13375     fi
13376
13377     if test -n "$native_sound_lib"; then
13378       sun_sound_lib="$native_sound_lib"
13379     elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
13380       sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
13381     elif test -r "/usr/demo/SOUND/libaudio.a"; then
13382       sun_sound_lib="/usr/demo/SOUND/libaudio.a"
13383     fi
13384
13385     if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
13386       native_sound_lib="$sun_sound_lib"
13387       sound_cflags="$sun_sound_cflags"
13388       sound_found=yes
13389       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
13390    echo "    xemacs will be linked with \"sunplay.o\""
13391  fi
13392     fi
13393   fi
13394
13395     if test -z "$sound_found"; then
13396     case "$canonical" in
13397     *-sgi-* )
13398       if test -z "$native_sound_lib"; then
13399         
13400 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
13401 echo "configure:13402: checking for ALopenport in -laudio" >&5
13402 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
13403
13404 xe_check_libs=" -laudio "
13405 cat > conftest.$ac_ext <<EOF
13406 #line 13407 "configure"
13407 #include "confdefs.h"
13408 /* Override any gcc2 internal prototype to avoid an error.  */
13409 /* We use char because int might match the return type of a gcc2
13410     builtin and then its argument prototype would still apply.  */
13411 char ALopenport();
13412
13413 int main() {
13414 ALopenport()
13415 ; return 0; }
13416 EOF
13417 if { (eval echo configure:13418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13418   rm -rf conftest*
13419   eval "ac_cv_lib_$ac_lib_var=yes"
13420 else
13421   echo "configure: failed program was:" >&5
13422   cat conftest.$ac_ext >&5
13423   rm -rf conftest*
13424   eval "ac_cv_lib_$ac_lib_var=no"
13425 fi
13426 rm -f conftest*
13427 xe_check_libs=""
13428
13429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13430   echo "$ac_t""yes" 1>&6
13431   native_sound_lib="-laudio"
13432 else
13433   echo "$ac_t""no" 1>&6
13434 fi
13435
13436
13437       fi
13438       if test -n "$native_sound_lib"; then
13439         sound_found=yes sound_cflags=""
13440         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13441    echo "    xemacs will be linked with \"sgiplay.o\""
13442  fi
13443       fi ;;
13444     hppa*-hp-hpux* )
13445       if test -z "$native_sound_lib"; then
13446         
13447 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13448 echo "configure:13449: checking for AOpenAudio in -lAlib" >&5
13449 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13450
13451 xe_check_libs=" -lAlib "
13452 cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 /* Override any gcc2 internal prototype to avoid an error.  */
13456 /* We use char because int might match the return type of a gcc2
13457     builtin and then its argument prototype would still apply.  */
13458 char AOpenAudio();
13459
13460 int main() {
13461 AOpenAudio()
13462 ; return 0; }
13463 EOF
13464 if { (eval echo configure:13465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13465   rm -rf conftest*
13466   eval "ac_cv_lib_$ac_lib_var=yes"
13467 else
13468   echo "configure: failed program was:" >&5
13469   cat conftest.$ac_ext >&5
13470   rm -rf conftest*
13471   eval "ac_cv_lib_$ac_lib_var=no"
13472 fi
13473 rm -f conftest*
13474 xe_check_libs=""
13475
13476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13477   echo "$ac_t""yes" 1>&6
13478   native_sound_lib="-lAlib"
13479 else
13480   echo "$ac_t""no" 1>&6
13481 fi
13482
13483
13484       fi
13485       if test -n "$native_sound_lib"; then
13486         sound_found=yes
13487         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13488    echo "    xemacs will be linked with \"hpplay.o\""
13489  fi
13490         if test "$GCC" = "yes" # Kludge city
13491           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13492           else sound_cflags="+e -I/usr/audio/examples"
13493         fi
13494       fi ;;
13495     esac
13496   fi
13497
13498     if test -z "$sound_found"; then
13499     if test "$with_msw" = "yes"; then
13500     sound_found=yes
13501     native_sound_lib=
13502     fi
13503   fi
13504
13505     if test -z "$sound_found"; then
13506     for dir in "machine" "sys" "linux"; do
13507       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13508 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13509 echo "configure:13510: checking for ${dir}/soundcard.h" >&5
13510
13511 cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 #include <${dir}/soundcard.h>
13515 EOF
13516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13517 { (eval echo configure:13518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13519 if test -z "$ac_err"; then
13520   rm -rf conftest*
13521   eval "ac_cv_header_$ac_safe=yes"
13522 else
13523   echo "$ac_err" >&5
13524   echo "configure: failed program was:" >&5
13525   cat conftest.$ac_ext >&5
13526   rm -rf conftest*
13527   eval "ac_cv_header_$ac_safe=no"
13528 fi
13529 rm -f conftest*
13530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13531   echo "$ac_t""yes" 1>&6
13532   sound_found=yes
13533        need_miscplay=yes
13534         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13535    echo "    xemacs will be linked with \"linuxplay.o\""
13536  fi
13537         { test "$extra_verbose" = "yes" && cat << EOF
13538     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13539 EOF
13540 cat >> confdefs.h <<EOF
13541 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13542 EOF
13543 }
13544
13545         break
13546 else
13547   echo "$ac_t""no" 1>&6
13548 fi
13549
13550     done
13551   fi
13552
13553   test "$sound_found" = "yes" && with_native_sound=yes
13554 fi
13555
13556 if test "$with_native_sound" = "yes"; then
13557   { test "$extra_verbose" = "yes" && cat << \EOF
13558     Defining HAVE_NATIVE_SOUND
13559 EOF
13560 cat >> confdefs.h <<\EOF
13561 #define HAVE_NATIVE_SOUND 1
13562 EOF
13563 }
13564
13565   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13566 fi
13567
13568 if test "$with_nas_sound" != "no"; then
13569   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13570 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13571 echo "configure:13572: checking for audio/audiolib.h" >&5
13572
13573 cat > conftest.$ac_ext <<EOF
13574 #line 13575 "configure"
13575 #include "confdefs.h"
13576 #include <audio/audiolib.h>
13577 EOF
13578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13579 { (eval echo configure:13580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13581 if test -z "$ac_err"; then
13582   rm -rf conftest*
13583   eval "ac_cv_header_$ac_safe=yes"
13584 else
13585   echo "$ac_err" >&5
13586   echo "configure: failed program was:" >&5
13587   cat conftest.$ac_ext >&5
13588   rm -rf conftest*
13589   eval "ac_cv_header_$ac_safe=no"
13590 fi
13591 rm -f conftest*
13592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13593   echo "$ac_t""yes" 1>&6
13594   
13595     
13596 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13597 echo "configure:13598: checking for AuOpenServer in -laudio" >&5
13598 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13599
13600 xe_check_libs=" -laudio "
13601 cat > conftest.$ac_ext <<EOF
13602 #line 13603 "configure"
13603 #include "confdefs.h"
13604 /* Override any gcc2 internal prototype to avoid an error.  */
13605 /* We use char because int might match the return type of a gcc2
13606     builtin and then its argument prototype would still apply.  */
13607 char AuOpenServer();
13608
13609 int main() {
13610 AuOpenServer()
13611 ; return 0; }
13612 EOF
13613 if { (eval echo configure:13614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13614   rm -rf conftest*
13615   eval "ac_cv_lib_$ac_lib_var=yes"
13616 else
13617   echo "configure: failed program was:" >&5
13618   cat conftest.$ac_ext >&5
13619   rm -rf conftest*
13620   eval "ac_cv_lib_$ac_lib_var=no"
13621 fi
13622 rm -f conftest*
13623 xe_check_libs=""
13624
13625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13626   echo "$ac_t""yes" 1>&6
13627   have_nas_sound=yes
13628 else
13629   echo "$ac_t""no" 1>&6
13630 fi
13631
13632
13633 else
13634   echo "$ac_t""no" 1>&6
13635 fi
13636
13637   if test "$have_nas_sound" = "yes"; then
13638     with_nas_sound=yes
13639     { test "$extra_verbose" = "yes" && cat << \EOF
13640     Defining HAVE_NAS_SOUND
13641 EOF
13642 cat >> confdefs.h <<\EOF
13643 #define HAVE_NAS_SOUND 1
13644 EOF
13645 }
13646
13647     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13648    echo "    xemacs will be linked with \"nas.o\""
13649  fi
13650     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13651             cat > conftest.$ac_ext <<EOF
13652 #line 13653 "configure"
13653 #include "confdefs.h"
13654 #include <audio/Xtutil.h>
13655 EOF
13656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13657   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13658   :
13659 else
13660   rm -rf conftest*
13661   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13662     Defining NAS_NO_ERROR_JUMP
13663 EOF
13664 cat >> confdefs.h <<\EOF
13665 #define NAS_NO_ERROR_JUMP 1
13666 EOF
13667 }
13668
13669 fi
13670 rm -f conftest*
13671
13672   else
13673     test "$with_nas_sound" = "yes" && \
13674       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13675     with_nas_sound=no
13676   fi
13677 fi
13678
13679 if test "$with_esd_sound" != "no"; then
13680   # Extract the first word of "esd-config", so it can be a program name with args.
13681 set dummy esd-config; ac_word=$2
13682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13683 echo "configure:13684: checking for $ac_word" >&5
13684
13685 if test -n "$have_esd_config"; then
13686   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13687 else
13688   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13689   ac_dummy="$PATH"
13690   for ac_dir in $ac_dummy; do
13691     test -z "$ac_dir" && ac_dir=.
13692     if test -f $ac_dir/$ac_word; then
13693       ac_cv_prog_have_esd_config="yes"
13694       break
13695     fi
13696   done
13697   IFS="$ac_save_ifs"
13698   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13699 fi
13700 have_esd_config="$ac_cv_prog_have_esd_config"
13701 if test -n "$have_esd_config"; then
13702   echo "$ac_t""$have_esd_config" 1>&6
13703 else
13704   echo "$ac_t""no" 1>&6
13705 fi
13706
13707   if test "$have_esd_config" = "yes"; then
13708     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13709     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
13710     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13711     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13712 echo "configure:13713: checking for esd_play_stream" >&5
13713
13714 cat > conftest.$ac_ext <<EOF
13715 #line 13716 "configure"
13716 #include "confdefs.h"
13717 /* System header to define __stub macros and hopefully few prototypes,
13718     which can conflict with char esd_play_stream(); below.  */
13719 #include <assert.h>
13720 /* Override any gcc2 internal prototype to avoid an error.  */
13721 /* We use char because int might match the return type of a gcc2
13722     builtin and then its argument prototype would still apply.  */
13723 char esd_play_stream();
13724
13725 int main() {
13726
13727 /* The GNU C library defines this for functions which it implements
13728     to always fail with ENOSYS.  Some functions are actually named
13729     something starting with __ and the normal name is an alias.  */
13730 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13731 choke me
13732 #else
13733 esd_play_stream();
13734 #endif
13735
13736 ; return 0; }
13737 EOF
13738 if { (eval echo configure:13739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13739   rm -rf conftest*
13740   eval "ac_cv_func_esd_play_stream=yes"
13741 else
13742   echo "configure: failed program was:" >&5
13743   cat conftest.$ac_ext >&5
13744   rm -rf conftest*
13745   eval "ac_cv_func_esd_play_stream=no"
13746 fi
13747 rm -f conftest*
13748
13749 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13750   echo "$ac_t""yes" 1>&6
13751   have_esd_sound=yes
13752 else
13753   echo "$ac_t""no" 1>&6
13754 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13755 fi
13756
13757   fi
13758
13759   if test "$have_esd_sound" = "yes"; then
13760     with_esd_sound=yes
13761     need_miscplay=yes
13762     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13763    echo "    xemacs will be linked with \"esd.o\""
13764  fi
13765     { test "$extra_verbose" = "yes" && cat << \EOF
13766     Defining HAVE_ESD_SOUND
13767 EOF
13768 cat >> confdefs.h <<\EOF
13769 #define HAVE_ESD_SOUND 1
13770 EOF
13771 }
13772
13773   else
13774     test "$with_esd_sound" = "yes" && \
13775       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13776     with_esd_sound=no
13777   fi
13778 fi
13779
13780 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13781    echo "    xemacs will be linked with \"miscplay.o\""
13782  fi
13783
13784
13785 test -z "$with_tty" && with_tty=yes
13786
13787 if test "$with_tty" = "yes"  ; then
13788   echo "checking for TTY-related features" 1>&6
13789 echo "configure:13790: checking for TTY-related features" >&5
13790   { test "$extra_verbose" = "yes" && cat << \EOF
13791     Defining HAVE_TTY
13792 EOF
13793 cat >> confdefs.h <<\EOF
13794 #define HAVE_TTY 1
13795 EOF
13796 }
13797
13798   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
13799    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\""
13800  fi
13801
13802     if test -z "$with_ncurses"; then
13803     
13804 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13805 echo "configure:13806: checking for tgetent in -lncurses" >&5
13806 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13807
13808 xe_check_libs=" -lncurses "
13809 cat > conftest.$ac_ext <<EOF
13810 #line 13811 "configure"
13811 #include "confdefs.h"
13812 /* Override any gcc2 internal prototype to avoid an error.  */
13813 /* We use char because int might match the return type of a gcc2
13814     builtin and then its argument prototype would still apply.  */
13815 char tgetent();
13816
13817 int main() {
13818 tgetent()
13819 ; return 0; }
13820 EOF
13821 if { (eval echo configure:13822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13822   rm -rf conftest*
13823   eval "ac_cv_lib_$ac_lib_var=yes"
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -rf conftest*
13828   eval "ac_cv_lib_$ac_lib_var=no"
13829 fi
13830 rm -f conftest*
13831 xe_check_libs=""
13832
13833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13834   echo "$ac_t""yes" 1>&6
13835   with_ncurses=yes
13836 else
13837   echo "$ac_t""no" 1>&6
13838 with_ncurses=no
13839 fi
13840
13841
13842   fi
13843   if test "$with_ncurses" = "yes"; then
13844     { test "$extra_verbose" = "yes" && cat << \EOF
13845     Defining HAVE_NCURSES
13846 EOF
13847 cat >> confdefs.h <<\EOF
13848 #define HAVE_NCURSES 1
13849 EOF
13850 }
13851
13852     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13853 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13854 echo "configure:13855: checking for ncurses/curses.h" >&5
13855
13856 cat > conftest.$ac_ext <<EOF
13857 #line 13858 "configure"
13858 #include "confdefs.h"
13859 #include <ncurses/curses.h>
13860 EOF
13861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13862 { (eval echo configure:13863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13864 if test -z "$ac_err"; then
13865   rm -rf conftest*
13866   eval "ac_cv_header_$ac_safe=yes"
13867 else
13868   echo "$ac_err" >&5
13869   echo "configure: failed program was:" >&5
13870   cat conftest.$ac_ext >&5
13871   rm -rf conftest*
13872   eval "ac_cv_header_$ac_safe=no"
13873 fi
13874 rm -f conftest*
13875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13876   echo "$ac_t""yes" 1>&6
13877   curses_h_file=ncurses/curses.h
13878 else
13879   echo "$ac_t""no" 1>&6
13880 fi
13881
13882     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13883 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13884 echo "configure:13885: checking for ncurses/term.h" >&5
13885
13886 cat > conftest.$ac_ext <<EOF
13887 #line 13888 "configure"
13888 #include "confdefs.h"
13889 #include <ncurses/term.h>
13890 EOF
13891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13892 { (eval echo configure:13893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13894 if test -z "$ac_err"; then
13895   rm -rf conftest*
13896   eval "ac_cv_header_$ac_safe=yes"
13897 else
13898   echo "$ac_err" >&5
13899   echo "configure: failed program was:" >&5
13900   cat conftest.$ac_ext >&5
13901   rm -rf conftest*
13902   eval "ac_cv_header_$ac_safe=no"
13903 fi
13904 rm -f conftest*
13905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13906   echo "$ac_t""yes" 1>&6
13907   term_h_file=ncurses/term.h
13908 else
13909   echo "$ac_t""no" 1>&6
13910 fi
13911
13912     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13913    echo "    xemacs will be linked with \"terminfo.o\""
13914  fi
13915     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13916
13917     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13918                         save_c_switch_site="$c_switch_site"
13919       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13920       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13921 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13922 echo "configure:13923: checking for ncurses/curses.h" >&5
13923
13924 cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 #include <ncurses/curses.h>
13928 EOF
13929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13930 { (eval echo configure:13931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13932 if test -z "$ac_err"; then
13933   rm -rf conftest*
13934   eval "ac_cv_header_$ac_safe=yes"
13935 else
13936   echo "$ac_err" >&5
13937   echo "configure: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939   rm -rf conftest*
13940   eval "ac_cv_header_$ac_safe=no"
13941 fi
13942 rm -f conftest*
13943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13944   echo "$ac_t""yes" 1>&6
13945   curses_h_file=ncurses/curses.h
13946 else
13947   echo "$ac_t""no" 1>&6
13948 fi
13949
13950       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13951         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13952         else c_switch_site="$save_c_switch_site"
13953       fi
13954     fi
13955   else         if test "$have_terminfo" = "yes"; then
13956       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13957    echo "    xemacs will be linked with \"terminfo.o\""
13958  fi
13959       if test -n "$libs_termcap"; then
13960         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13961       else
13962         for lib in curses termlib termcap; do
13963           
13964 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13965 echo "configure:13966: checking for tgetent in -l$lib" >&5
13966 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13967
13968 xe_check_libs=" -l$lib "
13969 cat > conftest.$ac_ext <<EOF
13970 #line 13971 "configure"
13971 #include "confdefs.h"
13972 /* Override any gcc2 internal prototype to avoid an error.  */
13973 /* We use char because int might match the return type of a gcc2
13974     builtin and then its argument prototype would still apply.  */
13975 char tgetent();
13976
13977 int main() {
13978 tgetent()
13979 ; return 0; }
13980 EOF
13981 if { (eval echo configure:13982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13982   rm -rf conftest*
13983   eval "ac_cv_lib_$ac_lib_var=yes"
13984 else
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -rf conftest*
13988   eval "ac_cv_lib_$ac_lib_var=no"
13989 fi
13990 rm -f conftest*
13991 xe_check_libs=""
13992
13993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13994   echo "$ac_t""yes" 1>&6
13995   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13996 else
13997   echo "$ac_t""no" 1>&6
13998 fi
13999
14000
14001         done
14002       fi
14003     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
14004                                 
14005 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
14006 echo "configure:14007: checking for tgoto in -ltermcap" >&5
14007 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
14008
14009 xe_check_libs=" -ltermcap "
14010 cat > conftest.$ac_ext <<EOF
14011 #line 14012 "configure"
14012 #include "confdefs.h"
14013 /* Override any gcc2 internal prototype to avoid an error.  */
14014 /* We use char because int might match the return type of a gcc2
14015     builtin and then its argument prototype would still apply.  */
14016 char tgoto();
14017
14018 int main() {
14019 tgoto()
14020 ; return 0; }
14021 EOF
14022 if { (eval echo configure:14023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14023   rm -rf conftest*
14024   eval "ac_cv_lib_$ac_lib_var=yes"
14025 else
14026   echo "configure: failed program was:" >&5
14027   cat conftest.$ac_ext >&5
14028   rm -rf conftest*
14029   eval "ac_cv_lib_$ac_lib_var=no"
14030 fi
14031 rm -f conftest*
14032 xe_check_libs=""
14033
14034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14035   echo "$ac_t""yes" 1>&6
14036     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14037     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14038   { test "$extra_verbose" = "yes" && cat << EOF
14039     Defining $ac_tr_lib
14040 EOF
14041 cat >> confdefs.h <<EOF
14042 #define $ac_tr_lib 1
14043 EOF
14044 }
14045
14046   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14047
14048 else
14049   echo "$ac_t""no" 1>&6
14050 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14051    echo "    xemacs will be linked with \"tparam.o\""
14052  fi
14053 fi
14054
14055
14056       else
14057         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
14058    echo "    xemacs will be linked with \"tparam.o\""
14059  fi
14060       fi
14061                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
14062       if test -n "$libs_termcap"; then
14063         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
14064       else
14065         
14066 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
14067 echo "configure:14068: checking for tgetent in -lcurses" >&5
14068 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
14069
14070 xe_check_libs=" -lcurses "
14071 cat > conftest.$ac_ext <<EOF
14072 #line 14073 "configure"
14073 #include "confdefs.h"
14074 /* Override any gcc2 internal prototype to avoid an error.  */
14075 /* We use char because int might match the return type of a gcc2
14076     builtin and then its argument prototype would still apply.  */
14077 char tgetent();
14078
14079 int main() {
14080 tgetent()
14081 ; return 0; }
14082 EOF
14083 if { (eval echo configure:14084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14084   rm -rf conftest*
14085   eval "ac_cv_lib_$ac_lib_var=yes"
14086 else
14087   echo "configure: failed program was:" >&5
14088   cat conftest.$ac_ext >&5
14089   rm -rf conftest*
14090   eval "ac_cv_lib_$ac_lib_var=no"
14091 fi
14092 rm -f conftest*
14093 xe_check_libs=""
14094
14095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14096   echo "$ac_t""yes" 1>&6
14097   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
14098 else
14099   echo "$ac_t""no" 1>&6
14100 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
14101 echo "configure:14102: checking for tgetent in -ltermcap" >&5
14102 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
14103
14104 xe_check_libs=" -ltermcap "
14105 cat > conftest.$ac_ext <<EOF
14106 #line 14107 "configure"
14107 #include "confdefs.h"
14108 /* Override any gcc2 internal prototype to avoid an error.  */
14109 /* We use char because int might match the return type of a gcc2
14110     builtin and then its argument prototype would still apply.  */
14111 char tgetent();
14112
14113 int main() {
14114 tgetent()
14115 ; return 0; }
14116 EOF
14117 if { (eval echo configure:14118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14118   rm -rf conftest*
14119   eval "ac_cv_lib_$ac_lib_var=yes"
14120 else
14121   echo "configure: failed program was:" >&5
14122   cat conftest.$ac_ext >&5
14123   rm -rf conftest*
14124   eval "ac_cv_lib_$ac_lib_var=no"
14125 fi
14126 rm -f conftest*
14127 xe_check_libs=""
14128
14129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14130   echo "$ac_t""yes" 1>&6
14131   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
14132 else
14133   echo "$ac_t""no" 1>&6
14134 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
14135    echo "    xemacs will be linked with \"termcap.o\""
14136  fi
14137 fi
14138
14139
14140 fi
14141
14142
14143       fi
14144     fi
14145   fi
14146   { test "$extra_verbose" = "yes" && cat << EOF
14147     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
14148 EOF
14149 cat >> confdefs.h <<EOF
14150 #define CURSES_H_FILE "${curses_h_file-curses.h}"
14151 EOF
14152 }
14153
14154   { test "$extra_verbose" = "yes" && cat << EOF
14155     Defining TERM_H_FILE = "${term_h_file-term.h}"
14156 EOF
14157 cat >> confdefs.h <<EOF
14158 #define TERM_H_FILE "${term_h_file-term.h}"
14159 EOF
14160 }
14161
14162
14163     if test "$with_gpm" != "no"; then
14164     ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
14165 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
14166 echo "configure:14167: checking for gpm.h" >&5
14167
14168 cat > conftest.$ac_ext <<EOF
14169 #line 14170 "configure"
14170 #include "confdefs.h"
14171 #include <gpm.h>
14172 EOF
14173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14174 { (eval echo configure:14175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14176 if test -z "$ac_err"; then
14177   rm -rf conftest*
14178   eval "ac_cv_header_$ac_safe=yes"
14179 else
14180   echo "$ac_err" >&5
14181   echo "configure: failed program was:" >&5
14182   cat conftest.$ac_ext >&5
14183   rm -rf conftest*
14184   eval "ac_cv_header_$ac_safe=no"
14185 fi
14186 rm -f conftest*
14187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14188   echo "$ac_t""yes" 1>&6
14189   
14190       
14191 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
14192 echo "configure:14193: checking for Gpm_Open in -lgpm" >&5
14193 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
14194
14195 xe_check_libs=" -lgpm "
14196 cat > conftest.$ac_ext <<EOF
14197 #line 14198 "configure"
14198 #include "confdefs.h"
14199 /* Override any gcc2 internal prototype to avoid an error.  */
14200 /* We use char because int might match the return type of a gcc2
14201     builtin and then its argument prototype would still apply.  */
14202 char Gpm_Open();
14203
14204 int main() {
14205 Gpm_Open()
14206 ; return 0; }
14207 EOF
14208 if { (eval echo configure:14209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14209   rm -rf conftest*
14210   eval "ac_cv_lib_$ac_lib_var=yes"
14211 else
14212   echo "configure: failed program was:" >&5
14213   cat conftest.$ac_ext >&5
14214   rm -rf conftest*
14215   eval "ac_cv_lib_$ac_lib_var=no"
14216 fi
14217 rm -f conftest*
14218 xe_check_libs=""
14219
14220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14221   echo "$ac_t""yes" 1>&6
14222   have_gpm=yes
14223 else
14224   echo "$ac_t""no" 1>&6
14225 fi
14226
14227
14228 else
14229   echo "$ac_t""no" 1>&6
14230 fi
14231
14232     if test "$have_gpm" = "yes"; then
14233       with_gpm=yes
14234       { test "$extra_verbose" = "yes" && cat << \EOF
14235     Defining HAVE_GPM
14236 EOF
14237 cat >> confdefs.h <<\EOF
14238 #define HAVE_GPM 1
14239 EOF
14240 }
14241
14242       extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
14243    echo "    xemacs will be linked with \"gpmevent.o\""
14244  fi
14245       LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
14246     elif test "$with_gpm" = "yes"; then
14247       { echo "Error:" "GPM requested, but gpm.h or libgpm seems to be missing." >&2; exit 1; }
14248     else
14249       with_gpm=no
14250     fi
14251   fi
14252
14253 else   for feature in ncurses gpm; do
14254     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
14255       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
14256     fi
14257     eval "with_${feature}=no"
14258   done
14259 fi 
14260 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
14261    echo "    xemacs will be linked with \"event-unixoid.o\""
14262  fi
14263
14264
14265 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14266   != "no no no" && echo "checking for database support" 1>&6
14267 echo "configure:14268: checking for database support" >&5
14268
14269 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
14270   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
14271 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
14272 echo "configure:14273: checking for ndbm.h" >&5
14273
14274 cat > conftest.$ac_ext <<EOF
14275 #line 14276 "configure"
14276 #include "confdefs.h"
14277 #include <ndbm.h>
14278 EOF
14279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14280 { (eval echo configure:14281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14282 if test -z "$ac_err"; then
14283   rm -rf conftest*
14284   eval "ac_cv_header_$ac_safe=yes"
14285 else
14286   echo "$ac_err" >&5
14287   echo "configure: failed program was:" >&5
14288   cat conftest.$ac_ext >&5
14289   rm -rf conftest*
14290   eval "ac_cv_header_$ac_safe=no"
14291 fi
14292 rm -f conftest*
14293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14294   echo "$ac_t""yes" 1>&6
14295   :
14296 else
14297   echo "$ac_t""no" 1>&6
14298
14299     test "$with_database_gdbm" = "yes" -o \
14300          "$with_database_dbm"  = "yes" && \
14301       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14302     with_database_gdbm=no with_database_dbm=no
14303 fi
14304
14305 fi
14306
14307 if test "$with_database_gdbm" != "no"; then
14308   
14309 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
14310 echo "configure:14311: checking for dbm_open in -lgdbm" >&5
14311 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
14312
14313 xe_check_libs=" -lgdbm "
14314 cat > conftest.$ac_ext <<EOF
14315 #line 14316 "configure"
14316 #include "confdefs.h"
14317 /* Override any gcc2 internal prototype to avoid an error.  */
14318 /* We use char because int might match the return type of a gcc2
14319     builtin and then its argument prototype would still apply.  */
14320 char dbm_open();
14321
14322 int main() {
14323 dbm_open()
14324 ; return 0; }
14325 EOF
14326 if { (eval echo configure:14327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14327   rm -rf conftest*
14328   eval "ac_cv_lib_$ac_lib_var=yes"
14329 else
14330   echo "configure: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   rm -rf conftest*
14333   eval "ac_cv_lib_$ac_lib_var=no"
14334 fi
14335 rm -f conftest*
14336 xe_check_libs=""
14337
14338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14339   echo "$ac_t""yes" 1>&6
14340   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
14341 else
14342   echo "$ac_t""no" 1>&6
14343 if test "$with_database_gdbm" = "yes"; then
14344      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
14345    fi
14346    with_database_gdbm=no
14347 fi
14348
14349
14350 fi
14351
14352 if test "$with_database_dbm" != "no"; then
14353   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14354 echo "configure:14355: checking for dbm_open" >&5
14355
14356 cat > conftest.$ac_ext <<EOF
14357 #line 14358 "configure"
14358 #include "confdefs.h"
14359 /* System header to define __stub macros and hopefully few prototypes,
14360     which can conflict with char dbm_open(); below.  */
14361 #include <assert.h>
14362 /* Override any gcc2 internal prototype to avoid an error.  */
14363 /* We use char because int might match the return type of a gcc2
14364     builtin and then its argument prototype would still apply.  */
14365 char dbm_open();
14366
14367 int main() {
14368
14369 /* The GNU C library defines this for functions which it implements
14370     to always fail with ENOSYS.  Some functions are actually named
14371     something starting with __ and the normal name is an alias.  */
14372 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14373 choke me
14374 #else
14375 dbm_open();
14376 #endif
14377
14378 ; return 0; }
14379 EOF
14380 if { (eval echo configure:14381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14381   rm -rf conftest*
14382   eval "ac_cv_func_dbm_open=yes"
14383 else
14384   echo "configure: failed program was:" >&5
14385   cat conftest.$ac_ext >&5
14386   rm -rf conftest*
14387   eval "ac_cv_func_dbm_open=no"
14388 fi
14389 rm -f conftest*
14390
14391 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14392   echo "$ac_t""yes" 1>&6
14393   with_database_dbm=yes libdbm=
14394 else
14395   echo "$ac_t""no" 1>&6
14396
14397     
14398 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14399 echo "configure:14400: checking for dbm_open in -ldbm" >&5
14400 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
14401
14402 xe_check_libs=" -ldbm "
14403 cat > conftest.$ac_ext <<EOF
14404 #line 14405 "configure"
14405 #include "confdefs.h"
14406 /* Override any gcc2 internal prototype to avoid an error.  */
14407 /* We use char because int might match the return type of a gcc2
14408     builtin and then its argument prototype would still apply.  */
14409 char dbm_open();
14410
14411 int main() {
14412 dbm_open()
14413 ; return 0; }
14414 EOF
14415 if { (eval echo configure:14416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14416   rm -rf conftest*
14417   eval "ac_cv_lib_$ac_lib_var=yes"
14418 else
14419   echo "configure: failed program was:" >&5
14420   cat conftest.$ac_ext >&5
14421   rm -rf conftest*
14422   eval "ac_cv_lib_$ac_lib_var=no"
14423 fi
14424 rm -f conftest*
14425 xe_check_libs=""
14426
14427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14428   echo "$ac_t""yes" 1>&6
14429   with_database_dbm=yes libdbm=-ldbm
14430 else
14431   echo "$ac_t""no" 1>&6
14432 test "$with_database_dbm" = "yes" && \
14433         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14434       with_database_dbm=no
14435 fi
14436
14437
14438 fi
14439
14440 fi
14441
14442 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14443 test "$with_database_gdbm" = "yes" -o \
14444      "$with_database_dbm"  = "yes" && \
14445   { test "$extra_verbose" = "yes" && cat << \EOF
14446     Defining HAVE_DBM
14447 EOF
14448 cat >> confdefs.h <<\EOF
14449 #define HAVE_DBM 1
14450 EOF
14451 }
14452
14453
14454 echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
14455 echo "configure:14456: checking for u_int8_t" >&5
14456
14457 cat > conftest.$ac_ext <<EOF
14458 #line 14459 "configure"
14459 #include "confdefs.h"
14460 #include <sys/types.h>
14461 #if STDC_HEADERS
14462 #include <stdlib.h>
14463 #include <stddef.h>
14464 #endif
14465 EOF
14466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14467   egrep "(^|[^a-zA-Z_0-9])u_int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14468   rm -rf conftest*
14469   ac_cv_type_u_int8_t=yes
14470 else
14471   rm -rf conftest*
14472   ac_cv_type_u_int8_t=no
14473 fi
14474 rm -f conftest*
14475
14476 echo "$ac_t""$ac_cv_type_u_int8_t" 1>&6
14477 if test $ac_cv_type_u_int8_t = no; then
14478   { test "$extra_verbose" = "yes" && cat << \EOF
14479     Defining u_int8_t = uint8_t
14480 EOF
14481 cat >> confdefs.h <<\EOF
14482 #define u_int8_t uint8_t
14483 EOF
14484 }
14485
14486 fi
14487
14488 if test $ac_cv_type_u_int8_t = yes; then
14489 { test "$extra_verbose" = "yes" && cat << \EOF
14490     Defining HAVE_U_INT8_T = 1
14491 EOF
14492 cat >> confdefs.h <<\EOF
14493 #define HAVE_U_INT8_T 1
14494 EOF
14495 }
14496
14497 fi
14498 echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
14499 echo "configure:14500: checking for u_int16_t" >&5
14500
14501 cat > conftest.$ac_ext <<EOF
14502 #line 14503 "configure"
14503 #include "confdefs.h"
14504 #include <sys/types.h>
14505 #if STDC_HEADERS
14506 #include <stdlib.h>
14507 #include <stddef.h>
14508 #endif
14509 EOF
14510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14511   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14512   rm -rf conftest*
14513   ac_cv_type_u_int16_t=yes
14514 else
14515   rm -rf conftest*
14516   ac_cv_type_u_int16_t=no
14517 fi
14518 rm -f conftest*
14519
14520 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
14521 if test $ac_cv_type_u_int16_t = no; then
14522   { test "$extra_verbose" = "yes" && cat << \EOF
14523     Defining u_int16_t = uint16_t
14524 EOF
14525 cat >> confdefs.h <<\EOF
14526 #define u_int16_t uint16_t
14527 EOF
14528 }
14529
14530 fi
14531
14532 if test $ac_cv_type_u_int16_t = yes; then
14533 { test "$extra_verbose" = "yes" && cat << \EOF
14534     Defining HAVE_U_INT16_T = 1
14535 EOF
14536 cat >> confdefs.h <<\EOF
14537 #define HAVE_U_INT16_T 1
14538 EOF
14539 }
14540
14541 fi
14542 echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
14543 echo "configure:14544: checking for u_int32_t" >&5
14544
14545 cat > conftest.$ac_ext <<EOF
14546 #line 14547 "configure"
14547 #include "confdefs.h"
14548 #include <sys/types.h>
14549 #if STDC_HEADERS
14550 #include <stdlib.h>
14551 #include <stddef.h>
14552 #endif
14553 EOF
14554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14555   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14556   rm -rf conftest*
14557   ac_cv_type_u_int32_t=yes
14558 else
14559   rm -rf conftest*
14560   ac_cv_type_u_int32_t=no
14561 fi
14562 rm -f conftest*
14563
14564 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
14565 if test $ac_cv_type_u_int32_t = no; then
14566   { test "$extra_verbose" = "yes" && cat << \EOF
14567     Defining u_int32_t = uint32_t
14568 EOF
14569 cat >> confdefs.h <<\EOF
14570 #define u_int32_t uint32_t
14571 EOF
14572 }
14573
14574 fi
14575
14576 if test $ac_cv_type_u_int32_t = yes; then
14577 { test "$extra_verbose" = "yes" && cat << \EOF
14578     Defining HAVE_U_INT32_T = 1
14579 EOF
14580 cat >> confdefs.h <<\EOF
14581 #define HAVE_U_INT32_T 1
14582 EOF
14583 }
14584
14585 fi
14586 echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
14587 echo "configure:14588: checking for u_int64_t" >&5
14588
14589 cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 #include <sys/types.h>
14593 #if STDC_HEADERS
14594 #include <stdlib.h>
14595 #include <stddef.h>
14596 #endif
14597 EOF
14598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14599   egrep "(^|[^a-zA-Z_0-9])u_int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14600   rm -rf conftest*
14601   ac_cv_type_u_int64_t=yes
14602 else
14603   rm -rf conftest*
14604   ac_cv_type_u_int64_t=no
14605 fi
14606 rm -f conftest*
14607
14608 echo "$ac_t""$ac_cv_type_u_int64_t" 1>&6
14609 if test $ac_cv_type_u_int64_t = no; then
14610   { test "$extra_verbose" = "yes" && cat << \EOF
14611     Defining u_int64_t = uint64_t
14612 EOF
14613 cat >> confdefs.h <<\EOF
14614 #define u_int64_t uint64_t
14615 EOF
14616 }
14617
14618 fi
14619
14620 if test $ac_cv_type_u_int64_t = yes; then
14621 { test "$extra_verbose" = "yes" && cat << \EOF
14622     Defining HAVE_U_INT64_T = 1
14623 EOF
14624 cat >> confdefs.h <<\EOF
14625 #define HAVE_U_INT64_T 1
14626 EOF
14627 }
14628
14629 fi
14630
14631 if test "$with_database_berkdb" != "no"; then
14632   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14633 echo "configure:14634: checking for Berkeley db.h" >&5
14634   for header in "db/db.h" "db.h"; do
14635     case "$opsys" in
14636         *freebsd*)
14637     cat > conftest.$ac_ext <<EOF
14638 #line 14639 "configure"
14639 #include "confdefs.h"
14640
14641 #include <stdlib.h>
14642 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14643 #ifdef HAVE_INTTYPES_H
14644 #define __BIT_TYPES_DEFINED__
14645 #include <inttypes.h>
14646 #endif
14647 #endif
14648 #include <$header>
14649
14650 int main() {
14651
14652 ; return 0; }
14653 EOF
14654 if { (eval echo configure:14655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14655   rm -rf conftest*
14656   db_h_file="$header"; break
14657 else
14658   echo "configure: failed program was:" >&5
14659   cat conftest.$ac_ext >&5
14660 fi
14661 rm -f conftest*
14662         ;;
14663         *)
14664     cat > conftest.$ac_ext <<EOF
14665 #line 14666 "configure"
14666 #include "confdefs.h"
14667
14668 #include <stdlib.h>
14669 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14670 #ifdef HAVE_INTTYPES_H
14671 #define __BIT_TYPES_DEFINED__
14672 #include <inttypes.h>
14673 #if !HAVE_U_INT8_T
14674 typedef uint8_t  u_int8_t;
14675 #endif
14676 #if !HAVE_U_INT16_T
14677 typedef uint16_t u_int16_t;
14678 #endif
14679 #if !HAVE_U_INT32_T
14680 typedef uint32_t u_int32_t;
14681 #endif
14682 #ifdef WE_DONT_NEED_QUADS
14683 #if !HAVE_U_INT64_T
14684 typedef uint64_t u_int64_t;
14685 #endif
14686 #endif
14687 #endif
14688 #endif
14689 #include <$header>
14690
14691 int main() {
14692
14693 ; return 0; }
14694 EOF
14695 if { (eval echo configure:14696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14696   rm -rf conftest*
14697   db_h_file="$header"; break
14698 else
14699   echo "configure: failed program was:" >&5
14700   cat conftest.$ac_ext >&5
14701 fi
14702 rm -f conftest*
14703         ;;
14704         esac
14705   done
14706   if test -z "$db_h_file"
14707   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14708   else echo "$ac_t""$db_h_file" 1>&6
14709   fi
14710
14711   if test "$with_database_berkdb" != "no"; then
14712     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14713 echo "configure:14714: checking for Berkeley DB version" >&5
14714     cat > conftest.$ac_ext <<EOF
14715 #line 14716 "configure"
14716 #include "confdefs.h"
14717 #include <$db_h_file>
14718 #if DB_VERSION_MAJOR > 1
14719 yes
14720 #endif
14721
14722 EOF
14723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14724   egrep "yes" >/dev/null 2>&1; then
14725   rm -rf conftest*
14726   cat > conftest.$ac_ext <<EOF
14727 #line 14728 "configure"
14728 #include "confdefs.h"
14729 #include <$db_h_file>
14730 #if DB_VERSION_MAJOR > 2
14731 yes
14732 #endif
14733
14734 EOF
14735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14736   egrep "yes" >/dev/null 2>&1; then
14737   rm -rf conftest*
14738   echo "$ac_t""3" 1>&6; dbfunc=db_create
14739 else
14740   rm -rf conftest*
14741   
14742     echo "$ac_t""2" 1>&6; dbfunc=db_open
14743 fi
14744 rm -f conftest*
14745
14746 else
14747   rm -rf conftest*
14748   
14749     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14750 fi
14751 rm -f conftest*
14752
14753     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14754 echo "configure:14755: checking for $dbfunc" >&5
14755
14756 cat > conftest.$ac_ext <<EOF
14757 #line 14758 "configure"
14758 #include "confdefs.h"
14759 /* System header to define __stub macros and hopefully few prototypes,
14760     which can conflict with char $dbfunc(); below.  */
14761 #include <assert.h>
14762 /* Override any gcc2 internal prototype to avoid an error.  */
14763 /* We use char because int might match the return type of a gcc2
14764     builtin and then its argument prototype would still apply.  */
14765 char $dbfunc();
14766
14767 int main() {
14768
14769 /* The GNU C library defines this for functions which it implements
14770     to always fail with ENOSYS.  Some functions are actually named
14771     something starting with __ and the normal name is an alias.  */
14772 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14773 choke me
14774 #else
14775 $dbfunc();
14776 #endif
14777
14778 ; return 0; }
14779 EOF
14780 if { (eval echo configure:14781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14781   rm -rf conftest*
14782   eval "ac_cv_func_$dbfunc=yes"
14783 else
14784   echo "configure: failed program was:" >&5
14785   cat conftest.$ac_ext >&5
14786   rm -rf conftest*
14787   eval "ac_cv_func_$dbfunc=no"
14788 fi
14789 rm -f conftest*
14790
14791 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14792   echo "$ac_t""yes" 1>&6
14793   with_database_berkdb=yes need_libdb=no
14794 else
14795   echo "$ac_t""no" 1>&6
14796
14797     
14798 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14799 echo "configure:14800: checking for $dbfunc in -ldb" >&5
14800 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14801
14802 xe_check_libs=" -ldb "
14803 cat > conftest.$ac_ext <<EOF
14804 #line 14805 "configure"
14805 #include "confdefs.h"
14806 /* Override any gcc2 internal prototype to avoid an error.  */
14807 /* We use char because int might match the return type of a gcc2
14808     builtin and then its argument prototype would still apply.  */
14809 char $dbfunc();
14810
14811 int main() {
14812 $dbfunc()
14813 ; return 0; }
14814 EOF
14815 if { (eval echo configure:14816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14816   rm -rf conftest*
14817   eval "ac_cv_lib_$ac_lib_var=yes"
14818 else
14819   echo "configure: failed program was:" >&5
14820   cat conftest.$ac_ext >&5
14821   rm -rf conftest*
14822   eval "ac_cv_lib_$ac_lib_var=no"
14823 fi
14824 rm -f conftest*
14825 xe_check_libs=""
14826
14827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14828   echo "$ac_t""yes" 1>&6
14829   with_database_berkdb=yes need_libdb=yes
14830 else
14831   echo "$ac_t""no" 1>&6
14832 fi
14833
14834
14835 fi
14836
14837   fi
14838
14839   if test "$with_database_berkdb" = "yes"; then
14840     { test "$extra_verbose" = "yes" && cat << EOF
14841     Defining DB_H_FILE = "$db_h_file"
14842 EOF
14843 cat >> confdefs.h <<EOF
14844 #define DB_H_FILE "$db_h_file"
14845 EOF
14846 }
14847
14848     { test "$extra_verbose" = "yes" && cat << \EOF
14849     Defining HAVE_BERKELEY_DB
14850 EOF
14851 cat >> confdefs.h <<\EOF
14852 #define HAVE_BERKELEY_DB 1
14853 EOF
14854 }
14855
14856     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14857   else with_database_berkdb=no
14858   fi
14859 fi
14860
14861 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14862      != "no no no"; then
14863   { test "$extra_verbose" = "yes" && cat << \EOF
14864     Defining HAVE_DATABASE
14865 EOF
14866 cat >> confdefs.h <<\EOF
14867 #define HAVE_DATABASE 1
14868 EOF
14869 }
14870
14871   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14872    echo "    xemacs will be linked with \"database.o\""
14873  fi
14874 fi
14875
14876 if test "$with_socks" = "yes"; then
14877   
14878 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14879 echo "configure:14880: checking for SOCKSinit in -lsocks" >&5
14880 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14881
14882 xe_check_libs=" -lsocks "
14883 cat > conftest.$ac_ext <<EOF
14884 #line 14885 "configure"
14885 #include "confdefs.h"
14886 /* Override any gcc2 internal prototype to avoid an error.  */
14887 /* We use char because int might match the return type of a gcc2
14888     builtin and then its argument prototype would still apply.  */
14889 char SOCKSinit();
14890
14891 int main() {
14892 SOCKSinit()
14893 ; return 0; }
14894 EOF
14895 if { (eval echo configure:14896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14896   rm -rf conftest*
14897   eval "ac_cv_lib_$ac_lib_var=yes"
14898 else
14899   echo "configure: failed program was:" >&5
14900   cat conftest.$ac_ext >&5
14901   rm -rf conftest*
14902   eval "ac_cv_lib_$ac_lib_var=no"
14903 fi
14904 rm -f conftest*
14905 xe_check_libs=""
14906
14907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14908   echo "$ac_t""yes" 1>&6
14909     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14910     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14911   { test "$extra_verbose" = "yes" && cat << EOF
14912     Defining $ac_tr_lib
14913 EOF
14914 cat >> confdefs.h <<EOF
14915 #define $ac_tr_lib 1
14916 EOF
14917 }
14918
14919   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14920
14921 else
14922   echo "$ac_t""no" 1>&6
14923 fi
14924
14925
14926   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14927     Defining HAVE_SOCKS
14928 EOF
14929 cat >> confdefs.h <<\EOF
14930 #define HAVE_SOCKS 1
14931 EOF
14932 }
14933
14934 fi
14935
14936 if test "$usage_tracking" = "yes"; then
14937   { test "$extra_verbose" = "yes" && cat << \EOF
14938     Defining USAGE_TRACKING
14939 EOF
14940 cat >> confdefs.h <<\EOF
14941 #define USAGE_TRACKING 1
14942 EOF
14943 }
14944
14945   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14946 fi
14947
14948 if test "$with_modules" != "no"; then
14949   echo "checking for module support" 1>&6
14950 echo "configure:14951: checking for module support" >&5
14951
14952     if test "$with_msw" = "yes"; then
14953     have_dl=yes;
14954   else
14955         case "$opsys" in
14956       darwin) have_dl=yes; { test "$extra_verbose" = "yes" && cat << \EOF
14957     Defining HAVE_DYLD
14958 EOF
14959 cat >> confdefs.h <<\EOF
14960 #define HAVE_DYLD 1
14961 EOF
14962 }
14963  ;;
14964       *)          ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14965 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14966 echo "configure:14967: checking for dlfcn.h" >&5
14967
14968 cat > conftest.$ac_ext <<EOF
14969 #line 14970 "configure"
14970 #include "confdefs.h"
14971 #include <dlfcn.h>
14972 EOF
14973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14974 { (eval echo configure:14975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14976 if test -z "$ac_err"; then
14977   rm -rf conftest*
14978   eval "ac_cv_header_$ac_safe=yes"
14979 else
14980   echo "$ac_err" >&5
14981   echo "configure: failed program was:" >&5
14982   cat conftest.$ac_ext >&5
14983   rm -rf conftest*
14984   eval "ac_cv_header_$ac_safe=no"
14985 fi
14986 rm -f conftest*
14987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14988   echo "$ac_t""yes" 1>&6
14989   
14990            echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14991 echo "configure:14992: checking for dlopen in -lc" >&5
14992            cat > conftest.$ac_ext <<EOF
14993 #line 14994 "configure"
14994 #include "confdefs.h"
14995 #include <dlfcn.h>
14996 int main() {
14997               dlopen ("", 0);
14998 ; return 0; }
14999 EOF
15000 if { (eval echo configure:15001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15001   rm -rf conftest*
15002    have_dl=yes 
15003 else
15004   echo "configure: failed program was:" >&5
15005   cat conftest.$ac_ext >&5
15006   rm -rf conftest*
15007   
15008                echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
15009 echo "configure:15010: checking for dlopen in -ldl" >&5
15010                ac_save_LIBS="$LIBS"
15011                LIBS="-ldl $LIBS"
15012                cat > conftest.$ac_ext <<EOF
15013 #line 15014 "configure"
15014 #include "confdefs.h"
15015 #include <dlfcn.h>
15016 int main() {
15017                  dlopen ("", 0);
15018 ; return 0; }
15019 EOF
15020 if { (eval echo configure:15021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15021   rm -rf conftest*
15022    have_dl=yes 
15023 else
15024   echo "configure: failed program was:" >&5
15025   cat conftest.$ac_ext >&5
15026   rm -rf conftest*
15027   LIBS="$ac_save_LIBS"
15028 fi
15029 rm -f conftest*
15030                ac_save_LIBS=
15031 fi
15032 rm -f conftest*
15033 else
15034   echo "$ac_t""no" 1>&6
15035 fi
15036
15037         if test -n "$have_dl"; then
15038            { test "$extra_verbose" = "yes" && cat << \EOF
15039     Defining HAVE_DLOPEN
15040 EOF
15041 cat >> confdefs.h <<\EOF
15042 #define HAVE_DLOPEN 1
15043 EOF
15044 }
15045
15046         else
15047            
15048 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
15049 echo "configure:15050: checking for shl_load in -ldld" >&5
15050 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
15051
15052 xe_check_libs=" -ldld "
15053 cat > conftest.$ac_ext <<EOF
15054 #line 15055 "configure"
15055 #include "confdefs.h"
15056 /* Override any gcc2 internal prototype to avoid an error.  */
15057 /* We use char because int might match the return type of a gcc2
15058     builtin and then its argument prototype would still apply.  */
15059 char shl_load();
15060
15061 int main() {
15062 shl_load()
15063 ; return 0; }
15064 EOF
15065 if { (eval echo configure:15066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15066   rm -rf conftest*
15067   eval "ac_cv_lib_$ac_lib_var=yes"
15068 else
15069   echo "configure: failed program was:" >&5
15070   cat conftest.$ac_ext >&5
15071   rm -rf conftest*
15072   eval "ac_cv_lib_$ac_lib_var=no"
15073 fi
15074 rm -f conftest*
15075 xe_check_libs=""
15076
15077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15078   echo "$ac_t""yes" 1>&6
15079   libdl=dld have_dl=yes;
15080            { test "$extra_verbose" = "yes" && cat << \EOF
15081     Defining HAVE_SHL_LOAD
15082 EOF
15083 cat >> confdefs.h <<\EOF
15084 #define HAVE_SHL_LOAD 1
15085 EOF
15086 }
15087
15088 else
15089   echo "$ac_t""no" 1>&6
15090
15091 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
15092 echo "configure:15093: checking for dld_init in -ldld" >&5
15093 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
15094
15095 xe_check_libs=" -ldld "
15096 cat > conftest.$ac_ext <<EOF
15097 #line 15098 "configure"
15098 #include "confdefs.h"
15099 /* Override any gcc2 internal prototype to avoid an error.  */
15100 /* We use char because int might match the return type of a gcc2
15101     builtin and then its argument prototype would still apply.  */
15102 char dld_init();
15103
15104 int main() {
15105 dld_init()
15106 ; return 0; }
15107 EOF
15108 if { (eval echo configure:15109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15109   rm -rf conftest*
15110   eval "ac_cv_lib_$ac_lib_var=yes"
15111 else
15112   echo "configure: failed program was:" >&5
15113   cat conftest.$ac_ext >&5
15114   rm -rf conftest*
15115   eval "ac_cv_lib_$ac_lib_var=no"
15116 fi
15117 rm -f conftest*
15118 xe_check_libs=""
15119
15120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
15121   echo "$ac_t""yes" 1>&6
15122   libdl=dld have_dl=yes;
15123            { test "$extra_verbose" = "yes" && cat << \EOF
15124     Defining HAVE_DLD_INIT
15125 EOF
15126 cat >> confdefs.h <<\EOF
15127 #define HAVE_DLD_INIT 1
15128 EOF
15129 }
15130
15131 else
15132   echo "$ac_t""no" 1>&6
15133 fi
15134
15135
15136 fi
15137
15138
15139         fi
15140     ;;
15141     esac
15142   fi 
15143   if test -n "$have_dl"; then
15144         
15145 dll_ld=
15146 dll_ldflags=
15147 dll_cflags=
15148 dll_post=
15149 dll_ldo="-o"
15150 ld_dynamic_link_flags=
15151 xehost=$canonical
15152 xealias=$internal_configuration
15153
15154 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
15155 echo "configure:15156: checking how to build dynamic libraries for ${xehost}" >&5
15156 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
15157 case "$xehost" in
15158 *-*-linux-gnu*) ;;
15159 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
15160 esac
15161
15162 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
15163 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
15164 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
15165
15166 case "$xehost_os" in
15167 aix3*)
15168   # AIX sometimes has problems with the GCC collect2 program.  For some
15169   # reason, if we set the COLLECT_NAMES environment variable, the problems
15170   # vanish in a puff of smoke.
15171   if test "${COLLECT_NAMES+set}" != set; then
15172     COLLECT_NAMES=
15173     export COLLECT_NAMES
15174   fi
15175   ;;
15176 esac
15177
15178 # Now see if the compiler is really GCC.
15179 if test "$GCC" = "yes"; then
15180   XEGCC=yes
15181 else
15182   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
15183 echo "configure:15184: checking checking whether we are using GNU C" >&5
15184   cat > conftest.$ac_ext <<EOF
15185 #line 15186 "configure"
15186 #include "confdefs.h"
15187
15188 #ifdef __GNUC__
15189   yes;
15190 #endif
15191
15192 EOF
15193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15194   egrep "yes" >/dev/null 2>&1; then
15195   rm -rf conftest*
15196   XEGCC=yes
15197 else
15198   rm -rf conftest*
15199   XEGCC=no
15200 fi
15201 rm -f conftest*
15202
15203   echo "$ac_t""${XEGCC}" 1>&6
15204 fi
15205
15206 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
15207 echo "configure:15208: checking how to produce PIC code" >&5
15208 wl=
15209
15210 can_build_shared=yes
15211 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15212   wl='-Wl,'
15213
15214   case "$xehost_os" in
15215   aix[3-9]* | irix[5-9]* | osf[3-9])
15216     # PIC is the default for these OSes.
15217     ;;
15218
15219   os2*)
15220     # We can build DLLs from non-PIC.
15221     ;;
15222   amigaos*)
15223     # FIXME: we need at least 68020 code to build shared libraries, but
15224     # adding the `-m68020' flag to GCC prevents building anything better,
15225     # like `-m68040'.
15226     dll_cflags='-m68020 -resident32 -malways-restore-a4'
15227     ;;
15228   *cygwin* | *mingw* )
15229     # PIC is the default
15230     ;;
15231   *)
15232     dll_cflags='-fPIC'
15233     ;;
15234   esac
15235 else
15236   # PORTME Check for PIC flags for the system compiler.
15237   case "$xehost_os" in
15238   hpux9* | hpux1[0-9]*)
15239     # Is there a better link_static_flag that works with the bundled CC?
15240     wl='-Wl,'
15241     dll_cflags='+Z'
15242     ;;
15243
15244   irix[5-9]*)
15245     wl='-Wl,'
15246     # PIC (with -KPIC) is the default.
15247     ;;
15248
15249   os2*)
15250     # We can build DLLs from non-PIC.
15251     ;;
15252
15253   osf[3-9]*)
15254     # All OSF/1 code is PIC.
15255     wl='-Wl,'
15256     ;;
15257
15258   aix[3-9]*)
15259     # All AIX code is PIC.
15260     wl='-Wl,'
15261     ;;
15262
15263   sco3.2v5*)
15264     dll_cflags='-belf -Kpic'
15265     wl='-Wl,'
15266     ;;
15267
15268   unixware*)
15269     dll_cflags="-KPIC"
15270     wl="-Wl,"
15271     ;;
15272
15273   sysv4*)
15274     dll_cflags="-KPIC"
15275     wl="-Wl,"
15276     ;;
15277
15278   sysv5*)
15279     dll_cflags="-KPIC"
15280     wl="-Wl,"
15281     ;;
15282
15283   solaris2*)
15284     dll_cflags='-KPIC'
15285     wl='-Wl,'
15286     ;;
15287
15288   sunos4*)
15289     dll_cflags='-PIC'
15290     wl='-Qoption ld '
15291     ;;
15292
15293   uts4*)
15294     dll_cflags='-pic'
15295     ;;
15296
15297   *)
15298     can_build_shared=no
15299     ;;
15300   esac
15301 fi
15302
15303 if test -n "$dll_cflags"; then
15304   echo "$ac_t""${dll_cflags}" 1>&6
15305
15306   # Check to make sure the dll_cflags actually works.
15307   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
15308 echo "configure:15309: checking if PIC flag ${dll_cflags} really works" >&5
15309   save_CFLAGS="$CFLAGS"
15310   CFLAGS="$CFLAGS $dll_cflags -DPIC"
15311   cat > conftest.$ac_ext <<EOF
15312 #line 15313 "configure"
15313 #include "confdefs.h"
15314
15315 int main() {
15316 int x=0;
15317 ; return 0; }
15318 EOF
15319 if { (eval echo configure:15320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15320   rm -rf conftest*
15321   
15322     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
15323     # reports no error.  So, we need to grep stderr for (Bundled).
15324     if grep '(Bundled)' config.log >/dev/null; then
15325       echo "$ac_t""no" 1>&6
15326       can_build_shared=no
15327       dll_cflags=
15328     else
15329       echo "$ac_t""yes" 1>&6
15330     fi
15331 else
15332   echo "configure: failed program was:" >&5
15333   cat conftest.$ac_ext >&5
15334   rm -rf conftest*
15335   echo "$ac_t""no" 1>&6
15336     can_build_shared=no
15337     dll_cflags=
15338 fi
15339 rm -f conftest*
15340   CFLAGS="$save_CFLAGS"
15341 else
15342   echo "$ac_t""none" 1>&6
15343 fi
15344
15345 if test "$can_build_shared" = "yes"; then
15346 cc_produces_so=no
15347 xldf=
15348 xcldf=
15349 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
15350 echo "configure:15351: checking if C compiler can produce shared libraries" >&5
15351 if test "$XEGCC" = yes -o "$__ICC" = yes; then
15352   xcldf="-shared"
15353   xldf="-shared"
15354 else # Not using GCC
15355   case "$xehost_os" in
15356     aix[3-9]*)
15357       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
15358       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
15359       ;;
15360
15361     freebsd2* | netbsd* | openbsd*)
15362       xldf="-Bshareable"
15363       xcldf="${wl}-Bshareable"
15364       ;;
15365
15366     freebsd3*)
15367       xcldf="-shared"
15368       ;;
15369
15370     hpux*)
15371       xldf="-b +s"
15372       xcldf="${wl}-b ${wl}+s"
15373       ;;
15374
15375     irix[5-9]* | osf[3-9]*)
15376       xcldf="${wl}-shared"
15377       xldf="-shared"
15378       ;;
15379
15380     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
15381       xcldf="-G"
15382       xldf="-G"
15383       ;;
15384
15385     sunos4*)
15386       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
15387       xldf="-assert pure-text -Bstatic"
15388       ;;
15389   esac
15390 fi # End if if we are using gcc
15391
15392 if test -n "$xcldf"; then
15393   save_LDFLAGS=$LDFLAGS
15394   save_LIBS=$LIBS
15395   save_xe_libs=$xe_libs
15396   LDFLAGS="$xcldf $LDFLAGS"
15397   LIBS=
15398   xe_libs=
15399   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15400   cat > conftest.$ac_ext <<EOF
15401 #line 15402 "configure"
15402 #include "confdefs.h"
15403
15404 int main() {
15405 int x=0;
15406 ; return 0; }
15407 EOF
15408 if { (eval echo configure:15409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15409   rm -rf conftest*
15410   cc_produces_so=yes
15411 else
15412   echo "configure: failed program was:" >&5
15413   cat conftest.$ac_ext >&5
15414   rm -rf conftest*
15415   cc_produces_so=no
15416 fi
15417 rm -f conftest*
15418   LDFLAGS=$save_LDFLAGS
15419   LIBS=$save_LIBS
15420   xe_libs=$save_xe_libs
15421   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
15422 else
15423   cc_produces_so=no
15424 fi
15425 echo "$ac_t""${cc_produces_so}" 1>&6
15426
15427 LTLD=$LD
15428 if test -z "$LTLD"; then
15429   ac_prog=ld
15430   if test "$XEGCC" = yes; then
15431     # Check if gcc -print-prog-name=ld gives a path.
15432     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
15433 echo "configure:15434: checking for ld used by GCC" >&5
15434     ac_prog=`($CC -print-prog-name=ld) 2>&5`
15435     case "$ac_prog" in
15436     # Accept absolute paths.
15437     /*)
15438       if test -z "$LTLD"; then
15439 #        case "$ac_prog" in
15440 #          *gcc-lib*) LTLD="$CC"
15441 #                     ;;
15442 #          *)
15443          LTLD="$ac_prog"
15444 #                     ;;
15445 #        esac
15446       fi
15447       ;;
15448     "")
15449       # If it fails, then pretend we aren't using GCC.
15450       ac_prog=ld
15451       ;;
15452     *)
15453       # If it is relative, then search for the first ld in PATH.
15454       with_gnu_ld=unknown
15455       ;;
15456     esac
15457   else
15458     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
15459 echo "configure:15460: checking for GNU ld" >&5
15460   fi
15461
15462   if test -z "$LTLD"; then
15463     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
15464     for ac_dir in $PATH; do
15465       test -z "$ac_dir" && ac_dir=.
15466       if test -f "$ac_dir/$ac_prog"; then
15467         LTLD="$ac_dir/$ac_prog"
15468         # Check to see if the program is GNU ld.  I'd rather use --version,
15469         # but apparently some GNU ld's only accept -v.
15470         # Break only if it was the GNU/non-GNU ld that we prefer.
15471         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
15472           xe_gnu_ld=yes
15473         else
15474           xe_gnu_ld=no
15475         fi
15476       fi
15477     done
15478     IFS="$ac_save_ifs"
15479   fi
15480
15481   if test -n "$LTLD"; then
15482     echo "$ac_t""${LTLD}" 1>&6
15483   else
15484     echo "$ac_t""no" 1>&6
15485   fi
15486
15487   if test -z "$LTLD" -a "$cc_produces_so" = no; then
15488     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
15489     exit 1
15490   fi
15491 fi
15492
15493 ld_dynamic_link_flags=
15494
15495 # Check to see if it really is or isn't GNU ld.
15496 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
15497 echo "configure:15498: checking if the linker is GNU ld" >&5
15498 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
15499 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
15500   xe_gnu_ld=yes
15501 else
15502   xe_gnu_ld=no
15503 fi
15504 echo "$ac_t""${xe_gnu_ld}" 1>&6
15505
15506 case "$xehost_os" in
15507   amigaos* | sunos4*)
15508     # On these operating systems, we should treat GNU ld like the system ld.
15509     gnu_ld_acts_native=yes
15510     ;;
15511   *)
15512     gnu_ld_acts_native=no
15513     ;;
15514 esac
15515
15516 if test "$cc_produces_so" = "yes"; then
15517   dll_ld=$CC
15518   dll_ldflags=$xcldf
15519   can_build_shared=yes
15520   ld_shlibs=yes
15521 else
15522   # OK - only NOW do we futz about with ld.
15523   # See if the linker supports building shared libraries.
15524   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
15525 echo "configure:15526: checking whether the linker supports shared libraries" >&5
15526   dll_ld=$CC
15527   dll_ldflags=$LDFLAGS
15528   ld_shlibs=yes
15529   can_build_shared=yes
15530   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
15531     # See if GNU ld supports shared libraries.
15532     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
15533       dll_ld=$CC
15534       dll_ldflags="-shared"
15535       ld_shlibs=yes
15536     else
15537       ld_shlibs=no
15538     fi
15539   else
15540     # PORTME fill in a description of your system's linker (not GNU ld)
15541     case "$xehost_os" in
15542     aix3*)
15543       dll_ld=$LTLD
15544       dll_ldflags=$xldf
15545       ;;
15546
15547     aix[4-9]*)
15548       dll_ldflags=$xcldf
15549       ;;
15550
15551     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15552     # support.  Future versions do this automatically, but an explicit c++rt0.o
15553     # doesn't break anything, and helps significantly (at the cost of a little
15554     # extra space).
15555     freebsd2.2*)
15556       dll_ld=$LTLD
15557       dll_ldflags=$xldf
15558       dll_post="/usr/lib/c++rt0.o"
15559       ;;
15560
15561     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
15562     freebsd2*)
15563       dll_ld=$LTLD
15564       dll_ldflags="-Bshareable"
15565       ;;
15566
15567     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
15568     freebsd3*)
15569       dll_ldflags="-shared"
15570       ;;
15571
15572     hpux*)
15573       dll_ld=$LTLD
15574       dll_ldflags=$xldf
15575       ;;
15576
15577     irix[5-9]*)
15578       dll_ld=$LTLD
15579       dll_ldflags=$xldf
15580       ;;
15581
15582     netbsd*)
15583       # Tested with NetBSD 1.2 ld
15584       dll_ld=$LTLD
15585       dll_ldflags=$xldf
15586       ;;
15587
15588     openbsd*)
15589       dll_ld=$LTLD
15590       dll_ldflags=$xldf
15591       ;;
15592
15593     osf3* | osf4*)
15594       dll_ld=$LTLD
15595       dll_ldflags=$xldf
15596       ;;
15597
15598     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
15599     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
15600       dll_ld=$LTLD
15601       case "$dll_ld" in
15602         *gcc*) dll_ldflags="-shared"
15603                dll_ld=$CC
15604                ;;
15605         *)     dll_ldflags="-G"
15606                ;;
15607       esac
15608       ;;
15609
15610     sunos4*)
15611       if test "$XEGCC" = yes; then
15612         dll_ld=$CC
15613       else
15614         dll_ld=$LTLD
15615       fi
15616       dll_ldflags=$xldf
15617       ;;
15618
15619     uts4*)
15620       dll_ld=$LTLD
15621       dll_ldflags="-G"
15622       ;;
15623
15624     bsdi*)
15625       dll_ldflags="-r"
15626       dll_ld="shlicc2"
15627       ;;
15628
15629     *)
15630       ld_shlibs=no
15631       can_build_shared=no
15632       ;;
15633     esac
15634   fi
15635   echo "$ac_t""${ld_shlibs}" 1>&6
15636   if test "$ld_shlibs" = "no"; then
15637     can_build_shared=no
15638   fi
15639 fi # End of if cc_produces_so = no
15640
15641
15642 if test "$xe_gnu_ld" = yes; then
15643   if test "$ld_shlibs" = yes; then
15644     ld_dynamic_link_flags="${wl}-export-dynamic"
15645   fi
15646 fi
15647
15648 if test -z "$ld_dynamic_link_flags"; then
15649   case "$xehost_os" in
15650   aix[3-9]*)
15651     ld_dynamic_link_flags=
15652     ;;
15653
15654   freebsd2.2*)
15655     ld_dynamic_link_flags=
15656     ;;
15657
15658   freebsd2*)
15659     ld_dynamic_link_flags=
15660     ;;
15661
15662   freebsd3*)
15663     ld_dynamic_link_flags=
15664     ;;
15665
15666   hpux*)
15667     ld_dynamic_link_flags="${wl}-E"
15668     ;;
15669
15670   irix[5-9]*)
15671     ld_dynamic_link_flags=
15672     ;;
15673
15674   netbsd*)
15675     ld_dynamic_link_flags=
15676     ;;
15677
15678   openbsd*)
15679     ld_dynamic_link_flags=
15680     ;;
15681
15682   osf3* | osf4*)
15683     ld_dynamic_link_flags=
15684     ;;
15685
15686   solaris2* | solaris7*)
15687     ld_dynamic_link_flags=
15688     ;;
15689
15690   sco3.2v5* | unixware* | sysv5* | sysv4*)
15691     ld_dynamic_link_flags="${wl}-Bexport"
15692     ;;
15693
15694   sunos4*)
15695     ld_dynamic_link_flags=
15696     ;;
15697
15698   uts4*)
15699     ld_dynamic_link_flags=
15700     ;;
15701
15702   bsdi*)
15703     ld_dynamic_link_flags=
15704     ;;
15705
15706   esac
15707 fi # End of if -z ld_dynamic_link_flags
15708 fi # End of if test "$can_build_shared" = "yes"
15709
15710
15711
15712
15713
15714
15715
15716
15717   fi
15718
15719   if test "$can_build_shared" = "yes"; then
15720     { test "$extra_verbose" = "yes" && cat << \EOF
15721     Defining HAVE_SHLIB
15722 EOF
15723 cat >> confdefs.h <<\EOF
15724 #define HAVE_SHLIB 1
15725 EOF
15726 }
15727
15728     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15729    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15730  fi
15731     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15732     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15733     for ac_func in dlerror _dlerror
15734 do
15735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15736 echo "configure:15737: checking for $ac_func" >&5
15737
15738 cat > conftest.$ac_ext <<EOF
15739 #line 15740 "configure"
15740 #include "confdefs.h"
15741 /* System header to define __stub macros and hopefully few prototypes,
15742     which can conflict with char $ac_func(); below.  */
15743 #include <assert.h>
15744 /* Override any gcc2 internal prototype to avoid an error.  */
15745 /* We use char because int might match the return type of a gcc2
15746     builtin and then its argument prototype would still apply.  */
15747 char $ac_func();
15748
15749 int main() {
15750
15751 /* The GNU C library defines this for functions which it implements
15752     to always fail with ENOSYS.  Some functions are actually named
15753     something starting with __ and the normal name is an alias.  */
15754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15755 choke me
15756 #else
15757 $ac_func();
15758 #endif
15759
15760 ; return 0; }
15761 EOF
15762 if { (eval echo configure:15763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15763   rm -rf conftest*
15764   eval "ac_cv_func_$ac_func=yes"
15765 else
15766   echo "configure: failed program was:" >&5
15767   cat conftest.$ac_ext >&5
15768   rm -rf conftest*
15769   eval "ac_cv_func_$ac_func=no"
15770 fi
15771 rm -f conftest*
15772
15773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15774   echo "$ac_t""yes" 1>&6
15775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15776   { test "$extra_verbose" = "yes" && cat << EOF
15777     Defining $ac_tr_func
15778 EOF
15779 cat >> confdefs.h <<EOF
15780 #define $ac_tr_func 1
15781 EOF
15782 }
15783  
15784 else
15785   echo "$ac_t""no" 1>&6
15786 fi
15787 done
15788
15789     with_modules=yes
15790   else
15791     if test "$with_modules" = "yes"; then
15792       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15793     else
15794       echo "configure: warning: "Module support cannot be provided."" 1>&2
15795     fi
15796     with_modules=no
15797   fi
15798 fi
15799
15800 cat > conftest.$ac_ext <<EOF
15801 #line 15802 "configure"
15802 #include "confdefs.h"
15803 int main(int c,char *v[]){return 0;}
15804 EOF
15805 if { (eval echo configure:15806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15806 then
15807   :
15808 else
15809   conftest_rc="$?"
15810   echo "configure: failed program was:" >&5
15811   cat conftest.$ac_ext >&5
15812   rm -fr conftest*
15813   
15814   echo ""
15815   echo "*** PANIC *** configure forgot how to build working executables!"
15816   echo ""
15817   echo "*** This is most commonly due to an unforeseen environment, causing"
15818   echo "*** configure to incorrectly compute the sequence of libraries to link."
15819   echo "*** Please examine the tail of config.log for runtime errors."
15820   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15821   echo "*** Often adding or removing explicit options in the configure"
15822   echo "*** invocation can work around this kind of problem.  If so, please"
15823   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15824   echo "***"
15825   echo "*** Other possible causes are inability to write to the file system"
15826   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15827   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15828   echo "*** necessary.  On other systems, try telling configure where to find"
15829   echo "*** the shared libraries using the --site-runtime-libraries option."
15830   echo "***"
15831   echo "*** Another way to shoot yourself in the foot is to specify"
15832   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15833   echo "*** system.  Don't do that."
15834   exit 1
15835 fi
15836 rm -fr conftest*
15837
15838 if test "$win32_processes" = "yes"; then
15839   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15840    echo "    xemacs will be linked with \"process-nt.o\""
15841  fi
15842 else
15843   { test "$extra_verbose" = "yes" && cat << \EOF
15844     Defining HAVE_UNIX_PROCESSES
15845 EOF
15846 cat >> confdefs.h <<\EOF
15847 #define HAVE_UNIX_PROCESSES 1
15848 EOF
15849 }
15850
15851   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15852    echo "    xemacs will be linked with \"process-unix.o\""
15853  fi
15854 fi
15855
15856
15857
15858 T=""
15859 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15860 CFLAGS="$T"
15861
15862
15863 T=""
15864 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15865 extra_objs="$T"
15866
15867
15868 T=""
15869 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
15870 c_switch_general="$T"
15871
15872
15873 T=""
15874 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
15875 c_switch_window_system="$T"
15876
15877
15878 T=""
15879 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15880 c_switch_all="$T"
15881
15882
15883 T=""
15884 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
15885 ld_switch_general="$T"
15886
15887
15888 T=""
15889 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15890 ld_switch_window_system="$T"
15891
15892
15893 T=""
15894 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15895 ld_switch_all="$T"
15896
15897
15898 T=""
15899 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15900 ld_libs_general="$T"
15901
15902
15903 T=""
15904 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
15905 ld_libs_window_system="$T"
15906
15907
15908 T=""
15909 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15910 ld_libs_all="$T"
15911
15912
15913
15914 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15915 internal_makefile_list="Makefile.in"
15916 SUBDIR_MAKEFILES=''
15917 test -d lock || mkdir lock
15918 for dir in $MAKE_SUBDIR; do
15919   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15920         test -d "$d" || mkdir "$d"; cd "$d"
15921       done ) ;;
15922    * ) test -d "$dir" || mkdir "$dir" ;;
15923   esac
15924   
15925 T=""
15926 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15927 SUBDIR_MAKEFILES="$T"
15928
15929   
15930 T=""
15931 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15932 internal_makefile_list="$T"
15933
15934 done
15935
15936
15937
15938
15939 for dir in src/s src/m; do
15940   if test ! -d "$dir" ; then
15941     echo Making symbolic link to "$srcdir/$dir"
15942     ${LN_S} "$srcdir/$dir" "$dir"
15943   fi
15944 done
15945
15946 if test "$extra_verbose" = "yes"; then
15947   echo ""
15948   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
15949   echo ""
15950 fi
15951
15952
15953 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15954   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15955   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15956 fi
15957
15958 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15959   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15960   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15961 fi
15962
15963 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15964   test "$extra_verbose" = "yes" && echo "creating TAGS"
15965   echo "\f
15966 $srcdir/TAGS,include" > "TAGS"
15967 fi
15968
15969 if test "$__SUNPRO_C" = "yes"; then
15970   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15971   ( echo "# For use with Sun WorkShop's Source browser."
15972     echo "# See sbquery(1) and sbinit(4) for more information"
15973     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15974   ) > .sbinit
15975 fi
15976
15977 rm -f core
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998 PREFIX=$prefix
15999 while true; do
16000   case "$PREFIX" in
16001     *\$* ) eval "PREFIX=$PREFIX" ;;
16002     *) break ;;
16003   esac
16004 done
16005
16006
16007
16008
16009 EXEC_PREFIX=$exec_prefix
16010 while true; do
16011   case "$EXEC_PREFIX" in
16012     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
16013     *) break ;;
16014   esac
16015 done
16016
16017
16018
16019
16020 INFODIR=$infodir
16021 while true; do
16022   case "$INFODIR" in
16023     *\$* ) eval "INFODIR=$INFODIR" ;;
16024     *) break ;;
16025   esac
16026 done
16027
16028
16029
16030
16031 INFOPATH=$infopath
16032 while true; do
16033   case "$INFOPATH" in
16034     *\$* ) eval "INFOPATH=$INFOPATH" ;;
16035     *) break ;;
16036   esac
16037 done
16038
16039
16040
16041
16042 PACKAGE_PATH=$package_path
16043 while true; do
16044   case "$PACKAGE_PATH" in
16045     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
16046     *) break ;;
16047   esac
16048 done
16049
16050
16051
16052
16053 LISPDIR=$lispdir
16054 while true; do
16055   case "$LISPDIR" in
16056     *\$* ) eval "LISPDIR=$LISPDIR" ;;
16057     *) break ;;
16058   esac
16059 done
16060
16061
16062
16063
16064 MODULEDIR=$moduledir
16065 while true; do
16066   case "$MODULEDIR" in
16067     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
16068     *) break ;;
16069   esac
16070 done
16071
16072
16073
16074
16075 SITELISPDIR=$sitelispdir
16076 while true; do
16077   case "$SITELISPDIR" in
16078     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
16079     *) break ;;
16080   esac
16081 done
16082
16083
16084
16085
16086 SITEMODULEDIR=$sitemoduledir
16087 while true; do
16088   case "$SITEMODULEDIR" in
16089     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
16090     *) break ;;
16091   esac
16092 done
16093
16094
16095
16096
16097 ETCDIR=$etcdir
16098 while true; do
16099   case "$ETCDIR" in
16100     *\$* ) eval "ETCDIR=$ETCDIR" ;;
16101     *) break ;;
16102   esac
16103 done
16104
16105
16106
16107
16108 DOCDIR=$docdir
16109 while true; do
16110   case "$DOCDIR" in
16111     *\$* ) eval "DOCDIR=$DOCDIR" ;;
16112     *) break ;;
16113   esac
16114 done
16115
16116
16117
16118
16119 ARCHLIBDIR=$archlibdir
16120 while true; do
16121   case "$ARCHLIBDIR" in
16122     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
16123     *) break ;;
16124   esac
16125 done
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
16147
16148
16149
16150
16151
16152
16153
16154 : ${XEMACS_CC:=$CC}
16155
16156
16157 if test "$with_prefix" = "yes"; then
16158   { test "$extra_verbose" = "yes" && cat << \EOF
16159     Defining PREFIX_USER_DEFINED
16160 EOF
16161 cat >> confdefs.h <<\EOF
16162 #define PREFIX_USER_DEFINED 1
16163 EOF
16164 }
16165
16166 fi
16167
16168 if test "$with_site_lisp" = "no"; then
16169   { test "$extra_verbose" = "yes" && cat << \EOF
16170     Defining INHIBIT_SITE_LISP
16171 EOF
16172 cat >> confdefs.h <<\EOF
16173 #define INHIBIT_SITE_LISP 1
16174 EOF
16175 }
16176
16177 fi
16178 if test "$with_site_modules" = "no"; then
16179   { test "$extra_verbose" = "yes" && cat << \EOF
16180     Defining INHIBIT_SITE_MODULES
16181 EOF
16182 cat >> confdefs.h <<\EOF
16183 #define INHIBIT_SITE_MODULES 1
16184 EOF
16185 }
16186
16187 fi
16188
16189
16190 T=""
16191 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
16192 ac_configure_args="$T"
16193
16194 { test "$extra_verbose" = "yes" && cat << EOF
16195     Defining EMACS_CONFIGURATION = "$configuration"
16196 EOF
16197 cat >> confdefs.h <<EOF
16198 #define EMACS_CONFIGURATION "$configuration"
16199 EOF
16200 }
16201
16202 { test "$extra_verbose" = "yes" && cat << EOF
16203     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
16204 EOF
16205 cat >> confdefs.h <<EOF
16206 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
16207 EOF
16208 }
16209
16210
16211
16212 null_string=""
16213 { test "$extra_verbose" = "yes" && cat << EOF
16214     Defining LD_SWITCH_X_SITE = $null_string
16215 EOF
16216 cat >> confdefs.h <<EOF
16217 #define LD_SWITCH_X_SITE $null_string
16218 EOF
16219 }
16220
16221 { test "$extra_verbose" = "yes" && cat << EOF
16222     Defining LD_SWITCH_X_SITE_AUX = $null_string
16223 EOF
16224 cat >> confdefs.h <<EOF
16225 #define LD_SWITCH_X_SITE_AUX $null_string
16226 EOF
16227 }
16228
16229 { test "$extra_verbose" = "yes" && cat << EOF
16230     Defining C_SWITCH_X_SITE = $null_string
16231 EOF
16232 cat >> confdefs.h <<EOF
16233 #define C_SWITCH_X_SITE $null_string
16234 EOF
16235 }
16236
16237 { test "$extra_verbose" = "yes" && cat << EOF
16238     Defining LD_SWITCH_SITE = $null_string
16239 EOF
16240 cat >> confdefs.h <<EOF
16241 #define LD_SWITCH_SITE $null_string
16242 EOF
16243 }
16244
16245 { test "$extra_verbose" = "yes" && cat << EOF
16246     Defining C_SWITCH_SITE = $null_string
16247 EOF
16248 cat >> confdefs.h <<EOF
16249 #define C_SWITCH_SITE $null_string
16250 EOF
16251 }
16252
16253
16254
16255 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16256     Defining GNU_MALLOC
16257 EOF
16258 cat >> confdefs.h <<\EOF
16259 #define GNU_MALLOC 1
16260 EOF
16261 }
16262
16263 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16264     Defining USE_SYSTEM_MALLOC
16265 EOF
16266 cat >> confdefs.h <<\EOF
16267 #define USE_SYSTEM_MALLOC 1
16268 EOF
16269 }
16270
16271 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
16272     Defining USE_DEBUG_MALLOC
16273 EOF
16274 cat >> confdefs.h <<\EOF
16275 #define USE_DEBUG_MALLOC 1
16276 EOF
16277 }
16278
16279                                               { test "$extra_verbose" = "yes" && cat << \EOF
16280     Defining USE_SYSTEM_MALLOC
16281 EOF
16282 cat >> confdefs.h <<\EOF
16283 #define USE_SYSTEM_MALLOC 1
16284 EOF
16285 }
16286
16287 fi
16288 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16289     Defining I18N3
16290 EOF
16291 cat >> confdefs.h <<\EOF
16292 #define I18N3 1
16293 EOF
16294 }
16295
16296 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16297     Defining USE_GCC
16298 EOF
16299 cat >> confdefs.h <<\EOF
16300 #define USE_GCC 1
16301 EOF
16302 }
16303
16304 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16305     Defining EXTERNAL_WIDGET
16306 EOF
16307 cat >> confdefs.h <<\EOF
16308 #define EXTERNAL_WIDGET 1
16309 EOF
16310 }
16311
16312 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16313     Defining QUICK_BUILD
16314 EOF
16315 cat >> confdefs.h <<\EOF
16316 #define QUICK_BUILD 1
16317 EOF
16318 }
16319
16320 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16321     Defining PURIFY
16322 EOF
16323 cat >> confdefs.h <<\EOF
16324 #define PURIFY 1
16325 EOF
16326 }
16327
16328 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16329     Defining QUANTIFY
16330 EOF
16331 cat >> confdefs.h <<\EOF
16332 #define QUANTIFY 1
16333 EOF
16334 }
16335
16336 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16337     Defining MAIL_USE_POP
16338 EOF
16339 cat >> confdefs.h <<\EOF
16340 #define MAIL_USE_POP 1
16341 EOF
16342 }
16343
16344 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16345     Defining KERBEROS
16346 EOF
16347 cat >> confdefs.h <<\EOF
16348 #define KERBEROS 1
16349 EOF
16350 }
16351
16352 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16353     Defining HESIOD
16354 EOF
16355 cat >> confdefs.h <<\EOF
16356 #define HESIOD 1
16357 EOF
16358 }
16359
16360 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16361     Defining USE_UNION_TYPE
16362 EOF
16363 cat >> confdefs.h <<\EOF
16364 #define USE_UNION_TYPE 1
16365 EOF
16366 }
16367
16368 test "$use_regex_malloc"   = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16369     Defining REGEX_MALLOC
16370 EOF
16371 cat >> confdefs.h <<\EOF
16372 #define REGEX_MALLOC 1
16373 EOF
16374 }
16375
16376 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16377     Defining PDUMP
16378 EOF
16379 cat >> confdefs.h <<\EOF
16380 #define PDUMP 1
16381 EOF
16382 }
16383
16384 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
16385     Defining IPV6_CANONICALIZE
16386 EOF
16387 cat >> confdefs.h <<\EOF
16388 #define IPV6_CANONICALIZE 1
16389 EOF
16390 }
16391
16392
16393
16394 (
16395 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
16396 else
16397   echo "uname -a: `uname -a`"
16398 fi
16399 echo ""
16400 echo "$0 $quoted_arguments"
16401 ) > Installation
16402
16403 if test ! -z ${emacs_beta_version} ; then
16404   if test -z "${emacs_is_beta}" ; then
16405         xemacs_betaname=".${emacs_beta_version}"
16406   else
16407         xemacs_betaname="-b${emacs_beta_version}"
16408   fi
16409 else
16410   xemacs_betaname=""
16411 fi
16412
16413 (
16414 echo "
16415
16416 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
16417 "
16418 echo "
16419 Compilation / Installation:"
16420 echo "  Source code location:              $srcdir"
16421 echo "  Installation prefix:               $prefix"
16422 if test -n "$site_includes"; then
16423   echo "  Additional header files:           $site_includes"
16424 fi
16425 if test -n "$site_libraries"; then
16426   echo "  Additional libraries:              $site_libraries"
16427 fi
16428 if test -n "$site_prefixes"; then
16429   echo "  Additional prefixes:               $site_prefixes"
16430 fi
16431 if test -n "$runpath"; then
16432   echo "  Runtime library search path:       $runpath"
16433 fi
16434
16435 if test -n "$opsysfile"
16436 then echo "  Operating system description file: \`$opsysfile'"
16437 else echo "  Not using any operating system description file"
16438 fi
16439 if test -n "$machfile"
16440 then echo "  Machine description file:          \`$machfile'"
16441 else echo "  Not using any machine description file"
16442 fi
16443
16444 echo "  Compiler:                          $CC $CFLAGS"
16445 case "$CC" in
16446   gcc*) echo "  Compiler version:                  `$CC --version | sed 1q`"
16447         echo "  Compiler specs file:               `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | sed 1q`"
16448         ;;
16449   *) case "$canonical" in
16450         *-*-aix*   ) 
16451                   realcc=`which $CC`
16452                   if test -L $realcc ; then
16453             ccdir=`dirname $realcc`
16454             ccprog=`/bin/ls -l $realcc | sed 's/.* \([^ ]\)/\1/'`
16455                     case $ccprog in
16456                 */*) realcc=$ccprog;;
16457                 *) realcc=$ccdir/$ccprog;;
16458             esac
16459           fi
16460           lpp=`lslpp -wqc $realcc | cut -f2 -d:`
16461           if test ! -z "$lpp" ; then
16462             lppstr=`lslpp -Lqc $lpp`
16463             lpplev=`echo "$lppstr" | cut -f3 -d:`
16464             lppdesc=`echo "$lppstr" | cut -f8 -d:`
16465           fi
16466           if test ! -z "$lpplev" ; then
16467             echo "  Compiler version:                  $lpp $lpplev - $lppdesc"
16468           else
16469             echo "  Compiler version:                  (unknown version)"
16470           fi
16471         ;;
16472         
16473         *-*-solaris*)
16474           ccvers=`$CC -V 2>&1 | sed 1q`
16475           if test ! -z "$ccvers" ; then
16476             echo "  Compiler version:                  $ccvers"
16477           fi
16478         ;;
16479
16480         alpha*-dec-osf*)
16481           ccvers=`$CC -V | tr '\n' ' '`
16482           if test ! -z "$ccvers" ; then
16483             echo "  Compiler version:                  $ccvers"
16484           fi
16485         ;;
16486
16487         mips-sgi-irix*)
16488           ccvers=`$CC -version`
16489           if test ! -z "$ccvers" ; then
16490             echo "  Compiler version:                  $ccvers"
16491           fi
16492         ;;
16493
16494                 i[3-9]86-pc-linux)
16495           ccvers=`$CC -V 2>&1 | sed -n 's@^Intel.*Version @@'p`
16496           if test ! -z "$ccvers" ; then
16497             echo "  Compiler version:                  $ccvers"
16498           fi
16499         ;;
16500           
16501         *) echo "  Compiler version:                  $CC on $canonical";;
16502   esac
16503 esac
16504
16505 echo "  Relocating allocator for buffers:  $rel_alloc"
16506 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
16507 case "$ld_switch_site" in
16508   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
16509     - Consider configuring with --pdump." ;;
16510 esac
16511
16512 case "$canonical" in
16513         *-*-linux*) 
16514           if test -f /etc/redhat-release ; then
16515             echo "  libc:                              `rpm -q glibc`";
16516           else
16517             echo "Need to guess glibc1/2/etc here";
16518           fi
16519         ;;
16520
16521         *-*-aix*) 
16522           echo "  libc:                              bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
16523         ;;
16524
16525         *-*-solaris*)
16526           libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
16527           echo "  libc:                              SUNWcsl $libc"
16528
16529         ;;
16530
16531         mips-sgi-irix*)
16532           echo "  IRIX version:                      `uname -sRm`'"
16533         ;;
16534           
16535
16536         alpha*-dec-osf*)
16537                   (cd /usr/.smdb.;
16538                 libc=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
16539                 echo "  libc:                              $libc"
16540                 
16541           )
16542         ;;
16543
16544         *) echo "  libc:                              system-provided libc on $canonical" ;;
16545 esac
16546
16547
16548 echo "
16549 Window System:"
16550 if test "$with_msw" = "yes"; then
16551   echo "  Compiling in support for the Microsoft window system."
16552 fi
16553 if test "$with_x11" = "yes"; then
16554   echo "  Compiling in support for the X window system:"
16555   echo "    - X Windows headers location:                 $x_includes"
16556   echo "    - X Windows libraries location:               $x_libraries"
16557   if test "$with_xauth" != yes; then
16558     echo "    - Xau (X authority) not available."
16559   fi
16560   if test "$with_xmu" != yes; then
16561     echo "    - Xmu library not available; substituting equivalent routines."
16562   fi
16563   if test "$with_wmcommand" != no; then
16564     echo "    - Handling WM_COMMAND properly."
16565   fi
16566 fi
16567 if test "$need_motif" = "yes" ; then
16568   echo "  Compiling in support for Motif."
16569   if test "$have_lesstif" = "yes"; then
16570     echo "    - Using LessTif implementation."
16571   fi
16572   echo "  *WARNING*  Many versions of Motif are buggy, requiring workarounds."
16573   echo "             You are likely to experience slow redisplay."
16574   echo "             You may need to install vendor patches to Motif."
16575   echo "             See PROBLEMS for more information."
16576 fi
16577 if test "$need_athena" = "yes"; then
16578   echo "  Compiling in support for the Athena widget set:"
16579   echo "    - Athena headers location:                    $athena_h_path"
16580   echo "    - Athena library to link:                     $athena_lib"
16581 fi
16582 case "$with_menubars" in
16583   gtk   ) echo "  Using GTK menubars."   ;;
16584   lucid ) echo "  Using Lucid menubars." ;;
16585   motif ) echo "  Using Motif menubars."
16586           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
16587           echo "             We recommend using the Lucid menubar instead."
16588           echo "             Re-run configure with --with-menubars='lucid'." ;;
16589     msw ) echo "  Using MS-Windows menubars." ;;
16590 esac
16591 case "$with_scrollbars" in
16592   gtk    ) echo "  Using GTK scrollbars."        ;;
16593   lucid  ) echo "  Using Lucid scrollbars."      ;;
16594   motif  ) echo "  Using Motif scrollbars."      ;;
16595   athena ) echo "  Using Athena scrollbars."     ;;
16596      msw ) echo "  Using MS-Windows scrollbars." ;;
16597 esac
16598 case "$with_dialogs" in
16599   gtk    ) echo "  Using GTK dialog boxes." ;;
16600   motif  ) echo "  Using Motif dialog boxes."
16601            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
16602              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
16603              echo "             We recommend using the Athena dialog boxes instead."
16604              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
16605              echo "             Read the PROBLEMS file for more information."
16606            fi; fi ;;
16607   athena ) echo "  Using Athena dialog boxes."     ;;
16608      msw ) echo "  Using MS-Windows dialog boxes." ;;
16609 esac
16610 case "$with_widgets" in
16611   gtk    ) echo "  Using GTK native widgets."        ;;
16612   motif  ) echo "  Using Motif native widgets."      ;;
16613   athena ) echo "  Using Athena native widgets."     ;;
16614      msw ) echo "  Using MS-Windows native widgets." ;;
16615 esac
16616 if test "$with_dragndrop" = yes; then
16617   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
16618   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
16619 fi
16620
16621 echo "
16622 TTY:"
16623 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
16624 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
16625
16626 echo "
16627 Images:"
16628 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
16629 if test "$with_xpm" = yes; then
16630   echo "  Compiling in support for XPM  images."
16631 elif test "$with_x11" = yes; then
16632   echo "  WARNING: -----------------------------------------------------------"
16633   echo "  WARNING: Compiling without XPM image support."
16634   if test "$xpm_problem" != ""; then
16635     echo "  Reason: $xpm_problem"
16636   fi
16637   echo "  WARNING: You should strongly consider installing XPM."
16638   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
16639   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16640   echo "  WARNING: -----------------------------------------------------------"
16641 fi
16642 if test "$with_png" = yes; then
16643   echo "  Compiling in support for PNG  images."
16644 elif test "$window_system" != "none"; then
16645   echo "  WARNING: -----------------------------------------------------------"
16646   echo "  WARNING: Compiling without PNG image support."
16647   if test "$png_problem" != ""; then
16648     echo "  Reason: $png_problem"
16649   fi
16650   echo "  WARNING: You should strongly consider installing the PNG libraries."
16651   echo "  WARNING: Otherwise certain images and glyphs may not display."
16652   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
16653   echo "  WARNING: -----------------------------------------------------------"
16654 fi
16655 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
16656 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
16657 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
16658
16659 echo "
16660 Sound:"
16661 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
16662 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
16663 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
16664 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
16665
16666 echo "
16667 Databases:"
16668 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
16669 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
16670 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
16671 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
16672 if test "$with_postgresql" = yes; then
16673   echo "  Compiling in support for PostgreSQL."
16674   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
16675   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
16676 fi
16677
16678 echo "
16679 Internationalization:"
16680 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
16681 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
16682 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
16683 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
16684 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
16685 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
16686 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
16687 if test "$with_wnn" = yes; then
16688   echo "  Compiling in support for the WNN input method on Mule."
16689   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
16690 fi
16691 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
16692
16693 echo "
16694 Mail:"
16695 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
16696 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
16697 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
16698 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
16699
16700 echo "
16701 Other Features:"
16702 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
16703 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
16704 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
16705 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
16706 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
16707 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
16708 if test "$use_union_type" = yes; then
16709   echo "  WARNING: ---------------------------------------------------------"
16710   echo "  Using the union type for Lisp_Objects."
16711   echo "  Union type has been implicated in hard-to-debug runtime crashes."
16712   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
16713   echo "  WARNING: ---------------------------------------------------------"
16714 fi
16715 if test "$use_regex_malloc" = no; then
16716   echo "  WARNING: -----------------------------------------------------------"
16717   echo "  Using alloca to allocate the failure stack."
16718   echo "  It may be impossible to detect stack exhaustion, and you will crash."
16719   echo "  Do NOT use this build of XEmacs for ordinary work."
16720   echo "  WARNING: -----------------------------------------------------------"
16721 fi
16722 test "$pdump" = yes && echo "  Using the new portable dumper."
16723 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
16724 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
16725 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
16726   != "no no no no no no"; then
16727   echo "  WARNING: ---------------------------------------------------------"
16728   echo "  WARNING: Compiling in support for runtime error checking."
16729   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
16730   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
16731   echo "  WARNING: ---------------------------------------------------------"
16732 fi
16733 echo ""
16734 ) | tee -a Installation
16735 echo ""
16736
16737
16738 # Remove any trailing slashes in these variables.
16739 test -n "$prefix" &&
16740   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16741 test -n "$exec_prefix" &&
16742   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
16743
16744
16745 for file in $internal_makefile_list; do
16746   test "$file" = src/Makefile.in && \
16747     file="src/Makefile.in:src/Makefile.in.in:src/depend"
16748   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
16749 done
16750 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
16751 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
16752
16753 trap '' 1 2 15
16754
16755 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16756
16757 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16758 # Let make expand exec_prefix.
16759 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16760
16761 # Any assignment to VPATH causes Sun make to only execute
16762 # the first set of double-colon rules, so remove it if not needed.
16763 # If there is a colon in the path, we need to keep it.
16764 if test "x$srcdir" = x.; then
16765   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16766 fi
16767
16768 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16769
16770 DEFS=-DHAVE_CONFIG_H
16771
16772 # Without the "./", some shells look in PATH for config.status.
16773 : ${CONFIG_STATUS=./config.status}
16774
16775 echo creating $CONFIG_STATUS
16776 rm -f $CONFIG_STATUS
16777 cat > $CONFIG_STATUS <<EOF
16778 #! /bin/sh
16779 # Generated automatically by configure.
16780 # Run this file to recreate the current configuration.
16781 # This directory was configured as follows,
16782 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16783 #
16784 # $0 $ac_configure_args
16785 #
16786 # Compiler output produced by configure, useful for debugging
16787 # configure, is in ./config.log if it exists.
16788
16789 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16790 for ac_option
16791 do
16792   case "\$ac_option" in
16793   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16794     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16795     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16796   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16797     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16798     exit 0 ;;
16799   -help | --help | --hel | --he | --h)
16800     echo "\$ac_cs_usage"; exit 0 ;;
16801   *) echo "\$ac_cs_usage"; exit 1 ;;
16802   esac
16803 done
16804
16805 ac_given_srcdir=$srcdir
16806 ac_given_INSTALL="$INSTALL"
16807
16808 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16809 EOF
16810 cat >> $CONFIG_STATUS <<EOF
16811
16812 # Protect against being on the right side of a sed subst in config.status.
16813 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16814  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16815 $ac_vpsub
16816 $extrasub
16817 s%@SHELL@%$SHELL%g
16818 s%@CFLAGS@%$CFLAGS%g
16819 s%@CPPFLAGS@%$CPPFLAGS%g
16820 s%@CXXFLAGS@%$CXXFLAGS%g
16821 s%@FFLAGS@%$FFLAGS%g
16822 s%@DEFS@%$DEFS%g
16823 s%@LDFLAGS@%$LDFLAGS%g
16824 s%@LIBS@%$LIBS%g
16825 s%@exec_prefix@%$exec_prefix%g
16826 s%@prefix@%$prefix%g
16827 s%@program_transform_name@%$program_transform_name%g
16828 s%@bindir@%$bindir%g
16829 s%@sbindir@%$sbindir%g
16830 s%@libexecdir@%$libexecdir%g
16831 s%@datadir@%$datadir%g
16832 s%@sysconfdir@%$sysconfdir%g
16833 s%@sharedstatedir@%$sharedstatedir%g
16834 s%@localstatedir@%$localstatedir%g
16835 s%@libdir@%$libdir%g
16836 s%@includedir@%$includedir%g
16837 s%@oldincludedir@%$oldincludedir%g
16838 s%@infodir@%$infodir%g
16839 s%@mandir@%$mandir%g
16840 s%@LN_S@%$LN_S%g
16841 s%@blddir@%$blddir%g
16842 s%@CC@%$CC%g
16843 s%@CPP@%$CPP%g
16844 s%@start_flags@%$start_flags%g
16845 s%@ld_switch_shared@%$ld_switch_shared%g
16846 s%@start_files@%$start_files%g
16847 s%@ld@%$ld%g
16848 s%@lib_gcc@%$lib_gcc%g
16849 s%@RANLIB@%$RANLIB%g
16850 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16851 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16852 s%@INSTALL_DATA@%$INSTALL_DATA%g
16853 s%@YACC@%$YACC%g
16854 s%@SET_MAKE@%$SET_MAKE%g
16855 s%@GTK_CONFIG@%$GTK_CONFIG%g
16856 s%@X_CFLAGS@%$X_CFLAGS%g
16857 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16858 s%@X_LIBS@%$X_LIBS%g
16859 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16860 s%@install_pp@%$install_pp%g
16861 s%@libs_xauth@%$libs_xauth%g
16862 s%@dnd_objs@%$dnd_objs%g
16863 s%@lwlib_objs@%$lwlib_objs%g
16864 s%@ALLOCA@%$ALLOCA%g
16865 s%@have_esd_config@%$have_esd_config%g
16866 s%@dll_ld@%$dll_ld%g
16867 s%@dll_cflags@%$dll_cflags%g
16868 s%@dll_ldflags@%$dll_ldflags%g
16869 s%@dll_post@%$dll_post%g
16870 s%@dll_ldo@%$dll_ldo%g
16871 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16872 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16873 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16874 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16875 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16876 s%@PROGNAME@%$PROGNAME%g
16877 s%@version@%$version%g
16878 s%@configuration@%$configuration%g
16879 s%@canonical@%$canonical%g
16880 s%@inststaticdir@%$inststaticdir%g
16881 s%@instvardir@%$instvardir%g
16882 s%@srcdir@%$srcdir%g
16883 s%@pkgdir@%$pkgdir%g
16884 s%@statedir@%$statedir%g
16885 s%@extra_includes@%$extra_includes%g
16886 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16887 s%@PREFIX@%$PREFIX%g
16888 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16889 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16890 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16891 s%@INFODIR@%$INFODIR%g
16892 s%@infopath@%$infopath%g
16893 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16894 s%@INFOPATH@%$INFOPATH%g
16895 s%@package_path@%$package_path%g
16896 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16897 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16898 s%@lispdir@%$lispdir%g
16899 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16900 s%@LISPDIR@%$LISPDIR%g
16901 s%@moduledir@%$moduledir%g
16902 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16903 s%@MODULEDIR@%$MODULEDIR%g
16904 s%@sitelispdir@%$sitelispdir%g
16905 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16906 s%@SITELISPDIR@%$SITELISPDIR%g
16907 s%@sitemoduledir@%$sitemoduledir%g
16908 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16909 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16910 s%@etcdir@%$etcdir%g
16911 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16912 s%@ETCDIR@%$ETCDIR%g
16913 s%@docdir@%$docdir%g
16914 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16915 s%@DOCDIR@%$DOCDIR%g
16916 s%@archlibdir@%$archlibdir%g
16917 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16918 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16919 s%@bitmapdir@%$bitmapdir%g
16920 s%@extra_objs@%$extra_objs%g
16921 s%@machfile@%$machfile%g
16922 s%@opsysfile@%$opsysfile%g
16923 s%@c_switch_general@%$c_switch_general%g
16924 s%@c_switch_window_system@%$c_switch_window_system%g
16925 s%@c_switch_all@%$c_switch_all%g
16926 s%@ld_switch_general@%$ld_switch_general%g
16927 s%@ld_switch_window_system@%$ld_switch_window_system%g
16928 s%@ld_switch_all@%$ld_switch_all%g
16929 s%@ld_libs_general@%$ld_libs_general%g
16930 s%@ld_libs_window_system@%$ld_libs_window_system%g
16931 s%@ld_libs_all@%$ld_libs_all%g
16932 s%@RECURSIVE_MAKE_ARGS@%$RECURSIVE_MAKE_ARGS%g
16933 s%@native_sound_lib@%$native_sound_lib%g
16934 s%@sound_cflags@%$sound_cflags%g
16935 s%@dynodump_arch@%$dynodump_arch%g
16936 s%@XEMACS_CC@%$XEMACS_CC%g
16937 s%@internal_makefile_list@%$internal_makefile_list%g
16938
16939 CEOF
16940 EOF
16941
16942 cat >> $CONFIG_STATUS <<\EOF
16943
16944 # Split the substitutions into bite-sized pieces for seds with
16945 # small command number limits, like on Digital OSF/1 and HP-UX.
16946 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16947 ac_file=1 # Number of current file.
16948 ac_beg=1 # First line for current file.
16949 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16950 ac_more_lines=:
16951 ac_sed_cmds=""
16952 while $ac_more_lines; do
16953   if test $ac_beg -gt 1; then
16954     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16955   else
16956     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16957   fi
16958   if test ! -s conftest.s$ac_file; then
16959     ac_more_lines=false
16960     rm -f conftest.s$ac_file
16961   else
16962     if test -z "$ac_sed_cmds"; then
16963       ac_sed_cmds="sed -f conftest.s$ac_file"
16964     else
16965       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16966     fi
16967     ac_file=`expr $ac_file + 1`
16968     ac_beg=$ac_end
16969     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16970   fi
16971 done
16972 if test -z "$ac_sed_cmds"; then
16973   ac_sed_cmds=cat
16974 fi
16975 EOF
16976
16977 cat >> $CONFIG_STATUS <<EOF
16978
16979 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16980 EOF
16981 cat >> $CONFIG_STATUS <<\EOF
16982 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16983   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16984   case "$ac_file" in
16985   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16986        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16987   *) ac_file_in="${ac_file}.in" ;;
16988   esac
16989
16990   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16991
16992   # Remove last slash and all that follows it.  Not all systems have dirname.
16993   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16994   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16995     # The file is in a subdirectory.
16996     test ! -d "$ac_dir" && mkdir "$ac_dir"
16997     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16998     # A "../" for each directory in $ac_dir_suffix.
16999     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17000   else
17001     ac_dir_suffix= ac_dots=
17002   fi
17003
17004   case "$ac_given_srcdir" in
17005   .)  srcdir=.
17006       if test -z "$ac_dots"; then top_srcdir=.
17007       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17008   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17009   *) # Relative path.
17010     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17011     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17012   esac
17013
17014   case "$ac_given_INSTALL" in
17015   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17016   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17017   esac
17018
17019   echo creating "$ac_file"
17020   rm -f "$ac_file"
17021   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17022   case "$ac_file" in
17023   *Makefile*) ac_comsub="1i\\
17024 # $configure_input" ;;
17025   *) ac_comsub= ;;
17026   esac
17027
17028   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17029   sed -e "$ac_comsub
17030 s%@configure_input@%$configure_input%g
17031 s%@srcdir@%$srcdir%g
17032 s%@top_srcdir@%$top_srcdir%g
17033 s%@INSTALL@%$INSTALL%g
17034 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17035 fi; done
17036 rm -f conftest.s*
17037
17038 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17039 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17040 #
17041 # ac_d sets the value in "#define NAME VALUE" lines.
17042 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17043 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17044 ac_dC='\3'
17045 ac_dD='%g'
17046 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17047 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17048 ac_uB='\([      ]\)%\1#\2define\3'
17049 ac_uC=' '
17050 ac_uD='\4%g'
17051 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17052 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17053 ac_eB='$%\1#\2define\3'
17054 ac_eC=' '
17055 ac_eD='%g'
17056
17057 if test "${CONFIG_HEADERS+set}" != set; then
17058 EOF
17059 cat >> $CONFIG_STATUS <<EOF
17060   CONFIG_HEADERS="src/config.h lwlib/config.h"
17061 EOF
17062 cat >> $CONFIG_STATUS <<\EOF
17063 fi
17064 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17065   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17066   case "$ac_file" in
17067   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17068        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17069   *) ac_file_in="${ac_file}.in" ;;
17070   esac
17071
17072   echo creating $ac_file
17073
17074   rm -f conftest.frag conftest.in conftest.out
17075   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17076   cat $ac_file_inputs > conftest.in
17077
17078 EOF
17079
17080 # Transform confdefs.h into a sed script conftest.vals that substitutes
17081 # the proper values into config.h.in to produce config.h.  And first:
17082 # Protect against being on the right side of a sed subst in config.status.
17083 # Protect against being in an unquoted here document in config.status.
17084 rm -f conftest.vals
17085 cat > conftest.hdr <<\EOF
17086 s/[\\&%]/\\&/g
17087 s%[\\$`]%\\&%g
17088 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17089 s%ac_d%ac_u%gp
17090 s%ac_u%ac_e%gp
17091 EOF
17092 sed -n -f conftest.hdr confdefs.h > conftest.vals
17093 rm -f conftest.hdr
17094
17095 # This sed command replaces #undef with comments.  This is necessary, for
17096 # example, in the case of _POSIX_SOURCE, which is predefined and required
17097 # on some systems where configure will not decide to define it.
17098 cat >> conftest.vals <<\EOF
17099 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17100 EOF
17101
17102 # Break up conftest.vals because some shells have a limit on
17103 # the size of here documents, and old seds have small limits too.
17104
17105 rm -f conftest.tail
17106 while :
17107 do
17108   ac_lines=`grep -c . conftest.vals`
17109   # grep -c gives empty output for an empty file on some AIX systems.
17110   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17111   # Write a limited-size here document to conftest.frag.
17112   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17113   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17114   echo 'CEOF
17115   sed -f conftest.frag conftest.in > conftest.out
17116   rm -f conftest.in
17117   mv conftest.out conftest.in
17118 ' >> $CONFIG_STATUS
17119   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17120   rm -f conftest.vals
17121   mv conftest.tail conftest.vals
17122 done
17123 rm -f conftest.vals
17124
17125 cat >> $CONFIG_STATUS <<\EOF
17126   rm -f conftest.frag conftest.h
17127   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17128   cat conftest.in >> conftest.h
17129   rm -f conftest.in
17130   if cmp -s $ac_file conftest.h 2>/dev/null; then
17131     echo "$ac_file is unchanged"
17132     rm -f conftest.h
17133   else
17134     # Remove last slash and all that follows it.  Not all systems have dirname.
17135       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17136       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17137       # The file is in a subdirectory.
17138       test ! -d "$ac_dir" && mkdir "$ac_dir"
17139     fi
17140     rm -f $ac_file
17141     mv conftest.h $ac_file
17142   fi
17143 fi; done
17144
17145 EOF
17146 cat >> $CONFIG_STATUS <<EOF
17147 CPP="$CPP"
17148  top_srcdir="$srcdir"
17149  MAKE_SUBDIR="$MAKE_SUBDIR"
17150
17151 EOF
17152 cat >> $CONFIG_STATUS <<\EOF
17153 for dir in . $MAKE_SUBDIR; do
17154   (
17155     cd $dir
17156     rm -f junk.c
17157     < Makefile.in \
17158       sed -e '/^# Generated/d' \
17159           -e 's%/\*\*/#.*%%' \
17160           -e 's/^ *# */#/' \
17161           -e '/^##/d' \
17162           -e '/^#/ {
17163 p
17164 d
17165 }'        \
17166           -e '/./ {
17167 s/\([\"]\)/\\\1/g
17168 s/^/"/
17169 s/$/"/
17170 }'  > junk.c;
17171
17172
17173
17174     echo creating $dir/Makefile
17175 $CPP -I. -I${top_srcdir}/src  junk.c \
17176   | sed -e 's/^\#.*//'          \
17177         -e 's/^[        ][      ]*$//'\
17178         -e 's/^ /       /'              \
17179         -e '/^[ \f]*$/d' \
17180         -e '/^\"/ {
17181         s/\\\([\"]\)/\1/g
17182         s/^[    ]*\"//
17183         s/\"[   ]*$//
17184 }' > Makefile.new
17185     chmod 444 Makefile.new
17186     mv -f Makefile.new Makefile
17187
17188     echo creating $dir/GNUmakefile
17189 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
17190   | sed -e 's/^\#.*//'          \
17191         -e 's/^[        ][      ]*$//'\
17192         -e 's/^ /       /'              \
17193         -e '/^[ \f]*$/d' \
17194         -e '/^\"/ {
17195         s/\\\([\"]\)/\1/g
17196         s/^[    ]*\"//
17197         s/\"[   ]*$//
17198 }' > Makefile.new
17199     chmod 444 Makefile.new
17200     mv -f Makefile.new GNUmakefile
17201
17202     rm -f junk.c
17203   )
17204 done
17205
17206 sed < config.status >> lib-src/config.values \
17207   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
17208   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
17209   -e 's/^\([^ ]*\) $/\1 ""/' \
17210   -e 's/ 1$/ t/'
17211
17212
17213 exit 0
17214 EOF
17215 chmod +x $CONFIG_STATUS
17216 rm -fr confdefs* $ac_clean_files
17217 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1